@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 19 lines 867 Bytes
Raw
1 import * as iotfleetwise from "@distilled.cloud/aws/iotfleetwise";
2 import * as Layer from "effect/Layer";
3 import { makeFleetWiseResourceHttpBinding } from "./BindingHttp.ts";
4 import { GetVehicleStatus } from "./GetVehicleStatus.ts";
5 import type { Vehicle } from "./Vehicle.ts";
6
7 export const GetVehicleStatusHttp = Layer.effect(
8 GetVehicleStatus,
9 makeFleetWiseResourceHttpBinding({
10 tag: "AWS.IoTFleetWise.GetVehicleStatus",
11 operation: iotfleetwise.getVehicleStatus,
12 actions: ["iotfleetwise:GetVehicleStatus"],
13 requestKey: "vehicleName",
14 identifier: (vehicle: Vehicle) => vehicle.vehicleName,
15 // GetVehicleStatus authorizes on both the vehicle and its associated
16 // campaigns — the campaign ARNs are unknowable at deploy time.
17 resources: (vehicle: Vehicle) => [vehicle.vehicleArn, "arn:aws:iotfleetwise:*:*:campaign/*"],
18 }),
19 );