@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 39 lines 1.13 KB
Raw
1 import type {
2 FileLink as StripeFileLink,
3 UpdateFileLinkError,
4 UpdateFileLinkRequest as DistilledUpdateFileLinkRequest,
5 } from "@distilled.cloud/stripe/stripe";
6 import * as Binding from "alchemy/Binding";
7 import type { RuntimeContext } from "alchemy/RuntimeContext";
8 import type * as Effect from "effect/Effect";
9 import type { FileLink } from "./FileLink.ts";
10
11 export interface UpdateFileLinkRequest extends Omit<DistilledUpdateFileLinkRequest, "link"> {}
12
13 /**
14 * Update a bound Stripe File Link over HTTP. Expired links cannot be
15 * updated.
16 *
17 * ### Updating a File Link
18 * **Example:** Bind and expire
19 * ```typescript
20 * const update = yield* Stripe.UpdateFileLink(link);
21 * const live = yield* update({ expires_at: "now" });
22 * ```
23 *
24 * @binding
25 * @product Files
26 */
27 export interface UpdateFileLink extends Binding.Service<
28 UpdateFileLink,
29 "Stripe.UpdateFileLink",
30 (
31 fileLink: FileLink,
32 ) => Effect.Effect<
33 (
34 request?: UpdateFileLinkRequest,
35 ) => Effect.Effect<StripeFileLink, UpdateFileLinkError, RuntimeContext>
36 >
37 > {}
38
39 export const UpdateFileLink = Binding.Service<UpdateFileLink>("Stripe.UpdateFileLink");