| 1 | import { GetFileLink } from "@distilled.cloud/stripe/stripe"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { RetrieveFileLink } from "./RetrieveFileLink.ts"; |
| 4 | import { makeHttpStripeIdBinding } from "./StripeHttp.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of {@link RetrieveFileLink}. Provide it on the |
| 8 | * Function or Worker Effect. |
| 9 | * |
| 10 | * @layer |
| 11 | * @product Files |
| 12 | * @provides Stripe.RetrieveFileLink |
| 13 | */ |
| 14 | export const RetrieveFileLinkHttp = Layer.effect( |
| 15 | RetrieveFileLink, |
| 16 | makeHttpStripeIdBinding({ |
| 17 | tag: "Stripe.RetrieveFileLink", |
| 18 | operation: GetFileLink, |
| 19 | idField: "link", |
| 20 | permissions: ["files_read"], |
| 21 | }), |
| 22 | ); |