@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.41 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 GetAccessToken}.
7 */
8 export interface GetAccessTokenRequest extends licensemanager.GetAccessTokenRequest {}
9
10 /**
11 * Runtime binding for `license-manager:GetAccessToken` — exchange a
12 * long-lived refresh token (minted by `CreateToken`) for a temporary
13 * access token to use with `AssumeRoleWithWebIdentity`. Both the refresh
14 * token and the returned access token are `Redacted` end-to-end.
15 *
16 * Provide the implementation with
17 * `Effect.provide(AWS.LicenseManager.GetAccessTokenHttp)`.
18 * ### License Checkout Data Plane
19 * **Example:** Exchange a Refresh Token for an Access Token
20 * ```typescript
21 * // init
22 * const getAccessToken = yield* AWS.LicenseManager.GetAccessToken();
23 *
24 * // runtime — AccessToken is Redacted; unwrap only at the point of use
25 * const { AccessToken } = yield* getAccessToken({ Token: refreshToken });
26 * ```
27 *
28 * @binding
29 */
30 export interface GetAccessToken extends Binding.Service<
31 GetAccessToken,
32 "AWS.LicenseManager.GetAccessToken",
33 () => Effect.Effect<
34 (
35 request: GetAccessTokenRequest,
36 ) => Effect.Effect<licensemanager.GetAccessTokenResponse, licensemanager.GetAccessTokenError>
37 >
38 > {}
39 export const GetAccessToken = Binding.Service<GetAccessToken>("AWS.LicenseManager.GetAccessToken");