@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 38 lines 1.04 KB
Raw
1 import type {
2 BillingAlert as StripeBillingAlert,
3 GetBillingAlertError,
4 GetBillingAlertRequest,
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 { Alert } from "./Alert.ts";
10
11 export interface RetrieveAlertRequest extends Omit<GetBillingAlertRequest, "id"> {}
12
13 /**
14 * Retrieve a bound Stripe Billing Alert over HTTP.
15 *
16 * ### Reading an Alert
17 * **Example:** Bind and retrieve
18 * ```typescript
19 * const retrieve = yield* Stripe.RetrieveAlert(highUsage);
20 * const live = yield* retrieve();
21 * ```
22 *
23 * @binding
24 * @product Billing
25 */
26 export interface RetrieveAlert extends Binding.Service<
27 RetrieveAlert,
28 "Stripe.RetrieveAlert",
29 (
30 alert: Alert,
31 ) => Effect.Effect<
32 (
33 request?: RetrieveAlertRequest,
34 ) => Effect.Effect<StripeBillingAlert, GetBillingAlertError, RuntimeContext>
35 >
36 > {}
37
38 export const RetrieveAlert = Binding.Service<RetrieveAlert>("Stripe.RetrieveAlert");