@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, 04:45 UTC

main
ts 42 lines 1.42 KB
Raw
1 import type * as ssm from "@distilled.cloud/aws/ssm-contacts";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Rotation } from "./Rotation.ts";
5
6 /**
7 * Runtime binding for `ssm-contacts:CreateRotationOverride`.
8 *
9 * Temporarily override who is on call in the bound rotation — e.g. cover
10 * a shift while the scheduled contact is unavailable. The rotation's ARN
11 * is injected as `RotationId`.
12 * Provide the implementation with
13 * `Effect.provide(AWS.SSMContacts.CreateRotationOverrideHttp)`.
14 * ### Managing On-Call Rotations
15 * **Example:** Cover the Next Eight Hours
16 * ```typescript
17 * const createRotationOverride =
18 * yield* AWS.SSMContacts.CreateRotationOverride(rotation);
19 *
20 * const { RotationOverrideId } = yield* createRotationOverride({
21 * NewContactIds: [standbyContactArn],
22 * StartTime: new Date(),
23 * EndTime: new Date(Date.now() + 8 * 60 * 60 * 1000),
24 * });
25 * ```
26 *
27 * @binding
28 */
29 export interface CreateRotationOverride extends Binding.Service<
30 CreateRotationOverride,
31 "AWS.SSMContacts.CreateRotationOverride",
32 (
33 rotation: Rotation,
34 ) => Effect.Effect<
35 (
36 request: Omit<ssm.CreateRotationOverrideRequest, "RotationId">,
37 ) => Effect.Effect<ssm.CreateRotationOverrideResult, ssm.CreateRotationOverrideError>
38 >
39 > {}
40 export const CreateRotationOverride = Binding.Service<CreateRotationOverride>(
41 "AWS.SSMContacts.CreateRotationOverride",
42 );