| 1 | import * as paymentcryptographydata from "@distilled.cloud/aws/payment-cryptography-data"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makePaymentCryptographyKeyPairHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { ReEncryptData } from "./ReEncryptData.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of {@link ReEncryptData} — grants the host Function |
| 8 | * `payment-cryptography:ReEncryptData` on both the incoming and outgoing |
| 9 | * keys and calls the Payment Cryptography Data API at runtime. |
| 10 | */ |
| 11 | export const ReEncryptDataHttp = Layer.effect( |
| 12 | ReEncryptData, |
| 13 | makePaymentCryptographyKeyPairHttpBinding({ |
| 14 | tag: "AWS.PaymentCryptography.ReEncryptData", |
| 15 | operation: paymentcryptographydata.reEncryptData, |
| 16 | actions: ["payment-cryptography:ReEncryptData"], |
| 17 | keyFields: ["IncomingKeyIdentifier", "OutgoingKeyIdentifier"], |
| 18 | }), |
| 19 | ); |