@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 44 lines 1.6 KB
Raw
1 import type * as signer from "@distilled.cloud/aws/signer";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { SigningProfile } from "./SigningProfile.ts";
5
6 /**
7 * Runtime binding for `signer:RevokeSigningProfile`.
8 *
9 * Revokes a version of the bound {@link SigningProfile}, permanently
10 * invalidating every signature that version produced on or after
11 * `effectiveTime` — the incident-response lever when signing material is
12 * compromised. Revocation is irreversible. The profile name is injected from
13 * the binding; pass the `profileVersion` to revoke. Provide the
14 * implementation with `Effect.provide(AWS.Signer.RevokeSigningProfileHttp)`.
15 * ### Revoking Signatures
16 * **Example:** Revoke a Compromised Profile Version
17 * ```typescript
18 * // init — bind the operation to the profile
19 * const revokeSigningProfile = yield* AWS.Signer.RevokeSigningProfile(profile);
20 *
21 * // runtime — invalidate everything the version signed from now on
22 * yield* revokeSigningProfile({
23 * profileVersion,
24 * reason: "signing key compromised",
25 * effectiveTime: new Date(),
26 * });
27 * ```
28 *
29 * @binding
30 */
31 export interface RevokeSigningProfile extends Binding.Service<
32 RevokeSigningProfile,
33 "AWS.Signer.RevokeSigningProfile",
34 (
35 profile: SigningProfile,
36 ) => Effect.Effect<
37 (
38 request: Omit<signer.RevokeSigningProfileRequest, "profileName">,
39 ) => Effect.Effect<signer.RevokeSigningProfileResponse, signer.RevokeSigningProfileError>
40 >
41 > {}
42 export const RevokeSigningProfile = Binding.Service<RevokeSigningProfile>(
43 "AWS.Signer.RevokeSigningProfile",
44 );