@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 24 lines 913 Bytes
Raw
1 import * as sitewise from "@distilled.cloud/aws/iotsitewise";
2 import * as Layer from "effect/Layer";
3 import {
4 BatchPutAssetPropertyValue,
5 type BatchPutAssetPropertyValueRequest,
6 } from "./BatchPutAssetPropertyValue.ts";
7 import { makeSiteWiseAssetHttpBinding } from "./BindingHttp.ts";
8
9 export const BatchPutAssetPropertyValueHttp = Layer.effect(
10 BatchPutAssetPropertyValue,
11 makeSiteWiseAssetHttpBinding({
12 capability: "BatchPutAssetPropertyValue",
13 iamActions: ["iotsitewise:BatchPutAssetPropertyValue"],
14 operation: sitewise.batchPutAssetPropertyValue,
15 // Inject the bound asset's id into every entry that does not target a
16 // data stream by alias.
17 prepare: (request: BatchPutAssetPropertyValueRequest, assetId) => ({
18 ...request,
19 entries: request.entries.map((entry) =>
20 entry.propertyAlias === undefined ? { ...entry, assetId } : entry,
21 ),
22 }),
23 }),
24 );