@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 47 lines 1.32 KB
Raw
1 import type * as paymentcryptographydata from "@distilled.cloud/aws/payment-cryptography-data";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Key } from "./Key.ts";
5
6 export interface DecryptDataRequest extends Omit<
7 paymentcryptographydata.DecryptDataInput,
8 "KeyIdentifier"
9 > {}
10
11 /**
12 * Runtime binding for `payment-cryptography:DecryptData` — decrypts
13 * ciphertext under a {@link Key}. Provide `DecryptDataHttp` on the Function
14 * to satisfy this service.
15 * ### Decrypting Data
16 * **Example:** Decrypt ciphertext
17 * ```typescript
18 * // init
19 * const decrypt = yield* PaymentCryptography.DecryptData(key);
20 *
21 * // runtime
22 * const result = yield* decrypt({
23 * CipherText: cipherText,
24 * DecryptionAttributes: {
25 * Symmetric: { Mode: "CBC", InitializationVector: "00000000000000000000000000000000" },
26 * },
27 * });
28 * ```
29 *
30 * @binding
31 */
32 export interface DecryptData extends Binding.Service<
33 DecryptData,
34 "AWS.PaymentCryptography.DecryptData",
35 <K extends Key>(
36 key: K,
37 ) => Effect.Effect<
38 (
39 request: DecryptDataRequest,
40 ) => Effect.Effect<
41 paymentcryptographydata.DecryptDataOutput,
42 paymentcryptographydata.DecryptDataError
43 >
44 >
45 > {}
46
47 export const DecryptData = Binding.Service<DecryptData>("AWS.PaymentCryptography.DecryptData");