@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 59 lines 1.91 KB
Raw
1 import type * as qbusiness from "@distilled.cloud/aws/qbusiness";
2 import * as Binding from "alchemy/Binding";
3 import type * as Duration from "effect/Duration";
4 import type * as Effect from "effect/Effect";
5 import type { WebExperience } from "./WebExperience.ts";
6
7 /**
8 * `CreateAnonymousWebExperienceUrl` request with `applicationId` +
9 * `webExperienceId` injected from the bound web experience.
10 */
11 export interface CreateAnonymousWebExperienceUrlRequest {
12 /**
13 * How long the session opened from the returned URL lasts (wire:
14 * `sessionDurationInMinutes`, 15-60 minutes).
15 * @default 15 minutes
16 */
17 sessionDuration?: Duration.Input;
18 }
19
20 /**
21 * Runtime binding for the `CreateAnonymousWebExperienceUrl` operation (IAM action
22 * `qbusiness:CreateAnonymousWebExperienceUrl`), scoped to one {@link WebExperience}.
23 *
24 * Mints a short-lived URL that opens the web experience without
25 * authentication (applications created with the `ANONYMOUS`
26 * identity type).
27 * Provide the implementation with
28 * `Effect.provide(AWS.QBusiness.CreateAnonymousWebExperienceUrlHttp)`.
29 *
30 * ### Anonymous Access
31 * **Example:** Mint an Anonymous Chat URL
32 * ```typescript
33 * const createUrl =
34 * yield* AWS.QBusiness.CreateAnonymousWebExperienceUrl(web);
35 *
36 * const { anonymousUrl } = yield* createUrl({
37 * sessionDuration: "30 minutes",
38 * });
39 * ```
40 *
41 * @binding
42 */
43 export interface CreateAnonymousWebExperienceUrl extends Binding.Service<
44 CreateAnonymousWebExperienceUrl,
45 "AWS.QBusiness.CreateAnonymousWebExperienceUrl",
46 (
47 webExperience: WebExperience,
48 ) => Effect.Effect<
49 (
50 request?: CreateAnonymousWebExperienceUrlRequest,
51 ) => Effect.Effect<
52 qbusiness.CreateAnonymousWebExperienceUrlResponse,
53 qbusiness.CreateAnonymousWebExperienceUrlError
54 >
55 >
56 > {}
57 export const CreateAnonymousWebExperienceUrl = Binding.Service<CreateAnonymousWebExperienceUrl>(
58 "AWS.QBusiness.CreateAnonymousWebExperienceUrl",
59 );