@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 50 lines 1.6 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 GenerateCardValidationDataRequest extends Omit<
7 paymentcryptographydata.GenerateCardValidationDataInput,
8 "KeyIdentifier"
9 > {}
10
11 /**
12 * Runtime binding for `payment-cryptography:GenerateCardValidationData` —
13 * generates card validation values (CVV/CVV2, dCVV, CSC) under a Card
14 * Verification Key (CVK) {@link Key}. Provide
15 * `GenerateCardValidationDataHttp` on the Function to satisfy this service.
16 * ### Card Validation Data
17 * **Example:** Generate a CVV2 for a card
18 * ```typescript
19 * // init
20 * const generateCvv2 = yield* PaymentCryptography.GenerateCardValidationData(cvk);
21 *
22 * // runtime
23 * const generated = yield* generateCvv2({
24 * PrimaryAccountNumber: "9123456789012345",
25 * GenerationAttributes: {
26 * CardVerificationValue2: { CardExpiryDate: "0130" },
27 * },
28 * });
29 * ```
30 *
31 * @binding
32 */
33 export interface GenerateCardValidationData extends Binding.Service<
34 GenerateCardValidationData,
35 "AWS.PaymentCryptography.GenerateCardValidationData",
36 <K extends Key>(
37 key: K,
38 ) => Effect.Effect<
39 (
40 request: GenerateCardValidationDataRequest,
41 ) => Effect.Effect<
42 paymentcryptographydata.GenerateCardValidationDataOutput,
43 paymentcryptographydata.GenerateCardValidationDataError
44 >
45 >
46 > {}
47
48 export const GenerateCardValidationData = Binding.Service<GenerateCardValidationData>(
49 "AWS.PaymentCryptography.GenerateCardValidationData",
50 );