@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, 06:00 UTC

main
ts 49 lines 1.59 KB
Raw
1 import type * as licensemanager from "@distilled.cloud/aws/license-manager";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Request for {@link CheckoutBorrowLicense}.
7 */
8 export interface CheckoutBorrowLicenseRequest extends licensemanager.CheckoutBorrowLicenseRequest {}
9
10 /**
11 * Runtime binding for `license-manager:CheckoutBorrowLicense` — check out
12 * an offline-capable (borrow) entitlement from a seller-issued license
13 * that allows borrowing. The signed token proves the entitlement while the
14 * consumer is disconnected.
15 *
16 * Provide the implementation with
17 * `Effect.provide(AWS.LicenseManager.CheckoutBorrowLicenseHttp)`.
18 * ### License Checkout Data Plane
19 * **Example:** Borrow an Entitlement for Offline Use
20 * ```typescript
21 * // init
22 * const checkoutBorrow = yield* AWS.LicenseManager.CheckoutBorrowLicense();
23 *
24 * // runtime
25 * const borrowed = yield* checkoutBorrow({
26 * LicenseArn: licenseArn,
27 * Entitlements: [{ Name: "seats", Value: "1", Unit: "Count" }],
28 * DigitalSignatureMethod: "JWT_PS384",
29 * ClientToken: crypto.randomUUID(),
30 * });
31 * ```
32 *
33 * @binding
34 */
35 export interface CheckoutBorrowLicense extends Binding.Service<
36 CheckoutBorrowLicense,
37 "AWS.LicenseManager.CheckoutBorrowLicense",
38 () => Effect.Effect<
39 (
40 request: CheckoutBorrowLicenseRequest,
41 ) => Effect.Effect<
42 licensemanager.CheckoutBorrowLicenseResponse,
43 licensemanager.CheckoutBorrowLicenseError
44 >
45 >
46 > {}
47 export const CheckoutBorrowLicense = Binding.Service<CheckoutBorrowLicense>(
48 "AWS.LicenseManager.CheckoutBorrowLicense",
49 );