@idapt/browser-app-sdk 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-AQZ2QVBK.js → chunk-KHPTFRT3.js} +660 -101
- package/dist/chunk-KHPTFRT3.js.map +1 -0
- package/dist/{chunk-6FSNLUVJ.js → chunk-OKOO2JCS.js} +4 -4
- package/dist/{chunk-6FSNLUVJ.js.map → chunk-OKOO2JCS.js.map} +1 -1
- package/dist/{client-CO-P-xYI.d.cts → client-CZAWglsD.d.ts} +170 -53
- package/dist/{client-h2Wsvn7a.d.ts → client-DjipcztO.d.cts} +170 -53
- package/dist/{data-Chus9wn2.d.cts → data-BuXXki1D.d.cts} +180 -38
- package/dist/{data-Chus9wn2.d.ts → data-BuXXki1D.d.ts} +180 -38
- package/dist/index.cjs +660 -100
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +75 -5
- package/dist/index.d.ts +75 -5
- package/dist/index.js +2 -2
- package/dist/react.cjs +166 -56
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +2 -2
- package/dist/testing.d.cts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-AQZ2QVBK.js.map +0 -1
|
@@ -173,34 +173,6 @@ declare const blobObjectResponseSchema: z.ZodObject<{
|
|
|
173
173
|
}, z.core.$strip>;
|
|
174
174
|
type BlobObjectResponse = z.infer<typeof blobObjectResponseSchema>;
|
|
175
175
|
|
|
176
|
-
/** `execution_run` record — `transformExecutionRun` output, snake_case. */
|
|
177
|
-
declare const executionRunResponseSchema: z.ZodObject<{
|
|
178
|
-
id: z.ZodString;
|
|
179
|
-
backend: z.ZodString;
|
|
180
|
-
mode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
181
|
-
status: z.ZodString;
|
|
182
|
-
workspace_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
183
|
-
file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
184
|
-
file_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
185
|
-
runtime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
186
|
-
exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
187
|
-
stdout: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
188
|
-
stderr: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
189
|
-
duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
190
|
-
timed_out: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
191
|
-
timeout_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
192
|
-
trigger_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
193
|
-
error_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
194
|
-
created_at: z.ZodString;
|
|
195
|
-
started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
196
|
-
completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
197
|
-
output_files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
198
|
-
file_id: z.ZodString;
|
|
199
|
-
path: z.ZodString;
|
|
200
|
-
}, z.core.$strip>>>;
|
|
201
|
-
}, z.core.$strip>;
|
|
202
|
-
type ExecutionRunResponse = z.infer<typeof executionRunResponseSchema>;
|
|
203
|
-
|
|
204
176
|
declare const computerResponseSchema: z.ZodObject<{
|
|
205
177
|
id: z.ZodString;
|
|
206
178
|
name: z.ZodString;
|
|
@@ -552,6 +524,67 @@ declare const fileUploadResponseSchema: z.ZodObject<{
|
|
|
552
524
|
}, z.core.$strip>;
|
|
553
525
|
type FileUploadResponse = z.infer<typeof fileUploadResponseSchema>;
|
|
554
526
|
|
|
527
|
+
/** `execution_run` record — `transformExecutionRun` output, snake_case. */
|
|
528
|
+
declare const functionRunResponseSchema: z.ZodObject<{
|
|
529
|
+
id: z.ZodString;
|
|
530
|
+
backend: z.ZodString;
|
|
531
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
532
|
+
status: z.ZodString;
|
|
533
|
+
workspace_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
534
|
+
file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
535
|
+
file_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
536
|
+
runtime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
537
|
+
exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
538
|
+
stdout: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
539
|
+
stderr: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
540
|
+
duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
541
|
+
timed_out: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
542
|
+
timeout_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
543
|
+
trigger_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
544
|
+
error_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
545
|
+
created_at: z.ZodString;
|
|
546
|
+
started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
547
|
+
completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
548
|
+
output_files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
549
|
+
file_id: z.ZodString;
|
|
550
|
+
path: z.ZodString;
|
|
551
|
+
}, z.core.$strip>>>;
|
|
552
|
+
}, z.core.$strip>;
|
|
553
|
+
type FunctionRunResponse = z.infer<typeof functionRunResponseSchema>;
|
|
554
|
+
declare const functionResponseSchema: z.ZodObject<{
|
|
555
|
+
id: z.ZodString;
|
|
556
|
+
name: z.ZodString;
|
|
557
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
558
|
+
runtime: z.ZodString;
|
|
559
|
+
entrypoint: z.ZodString;
|
|
560
|
+
auth_mode: z.ZodString;
|
|
561
|
+
timeout_seconds: z.ZodNumber;
|
|
562
|
+
active_deployment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
563
|
+
source_repo_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
564
|
+
branch: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
565
|
+
browser_app_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
566
|
+
size_bytes: z.ZodNumber;
|
|
567
|
+
invoke_url: z.ZodString;
|
|
568
|
+
created_at: z.ZodString;
|
|
569
|
+
updated_at: z.ZodString;
|
|
570
|
+
}, z.core.$strip>;
|
|
571
|
+
type FunctionResponse = z.infer<typeof functionResponseSchema>;
|
|
572
|
+
declare const functionDeploymentResponseSchema: z.ZodObject<{
|
|
573
|
+
id: z.ZodString;
|
|
574
|
+
function_id: z.ZodString;
|
|
575
|
+
status: z.ZodString;
|
|
576
|
+
runtime: z.ZodString;
|
|
577
|
+
entrypoint: z.ZodString;
|
|
578
|
+
size_bytes: z.ZodNumber;
|
|
579
|
+
file_count: z.ZodNumber;
|
|
580
|
+
content_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
581
|
+
producer_type: z.ZodString;
|
|
582
|
+
producer_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
583
|
+
created_at: z.ZodString;
|
|
584
|
+
built_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
585
|
+
}, z.core.$strip>;
|
|
586
|
+
type FunctionDeploymentResponse = z.infer<typeof functionDeploymentResponseSchema>;
|
|
587
|
+
|
|
555
588
|
/**
|
|
556
589
|
* A hub/store item from `GET /hub/search` (snake_case wire). `id` is the item's
|
|
557
590
|
* resourceId (non-null). The catalog has heterogeneous payloads per type
|
|
@@ -852,18 +885,41 @@ type SendMessageResult = {
|
|
|
852
885
|
chat_id: string;
|
|
853
886
|
};
|
|
854
887
|
/**
|
|
855
|
-
* Lifecycle status of
|
|
856
|
-
* cancelled via `POST /
|
|
888
|
+
* Lifecycle status of a one-off function run. `interrupted` lands when a run is
|
|
889
|
+
* cancelled via `POST /functions/runs/:id/interrupt`.
|
|
857
890
|
*/
|
|
858
891
|
type ExecutionRunStatus = "pending" | "running" | "completed" | "failed" | "timed_out" | "interrupted";
|
|
859
|
-
/** Where
|
|
892
|
+
/** Where a function run executes — sandboxed Lambda or a paired computer. */
|
|
860
893
|
type ExecutionBackend = "computer" | "lambda";
|
|
861
894
|
/**
|
|
862
|
-
*
|
|
863
|
-
* `GET /
|
|
864
|
-
* this single shape (there is no separate
|
|
895
|
+
* A one-off function-run row. Returned by `POST /functions/runs`,
|
|
896
|
+
* `POST /files/:id/run`, `GET /functions/runs` and `GET /functions/runs/:id` —
|
|
897
|
+
* the one-off run lane always yields this single shape (there is no separate
|
|
898
|
+
* stripped run-summary type).
|
|
899
|
+
*/
|
|
900
|
+
type ExecutionRun = FunctionRunResponse;
|
|
901
|
+
/** Alias for the one-off run row — the `client.functions.run*` result shape. */
|
|
902
|
+
type FunctionRun = ExecutionRun;
|
|
903
|
+
/**
|
|
904
|
+
* A deployed function — a named, versioned, HTTP-invokable unit served on
|
|
905
|
+
* `fn.idapt.host`. Returned by `GET/POST /functions`, `GET/PATCH /functions/:id`
|
|
906
|
+
* and `POST /functions/:id/promote`.
|
|
907
|
+
*/
|
|
908
|
+
type FunctionResource = FunctionResponse;
|
|
909
|
+
/**
|
|
910
|
+
* One deployment (build) of a function. Returned by
|
|
911
|
+
* `POST /functions/:id/deploy` and `GET /functions/:id/deployments`.
|
|
865
912
|
*/
|
|
866
|
-
type
|
|
913
|
+
type FunctionDeployment = FunctionDeploymentResponse;
|
|
914
|
+
/**
|
|
915
|
+
* Result of `POST /functions/:id/invoke` — the deployed handler's response:
|
|
916
|
+
* an HTTP `status`, a decoded `body`, and optional response `headers`.
|
|
917
|
+
*/
|
|
918
|
+
interface FunctionInvokeResult {
|
|
919
|
+
status: number;
|
|
920
|
+
body: unknown;
|
|
921
|
+
headers?: Record<string, string>;
|
|
922
|
+
}
|
|
867
923
|
type TriggerType = "webhook" | "schedule" | "manual" | string;
|
|
868
924
|
type TriggerActionType = "run_code" | "run_chat" | string;
|
|
869
925
|
/**
|
|
@@ -926,9 +982,10 @@ interface CreateTriggerInput {
|
|
|
926
982
|
type UpdateTriggerInput = Partial<CreateTriggerInput>;
|
|
927
983
|
/**
|
|
928
984
|
* Modality bucket a model belongs to. Every model row across `/v1/models`,
|
|
929
|
-
* `/v1/audio/models` and `/v1/
|
|
985
|
+
* `/v1/audio/models`, `/v1/images/models` and `/v1/videos/models` carries
|
|
986
|
+
* this discriminant.
|
|
930
987
|
*/
|
|
931
|
-
type ModelModality = "chat" | "audio" | "image";
|
|
988
|
+
type ModelModality = "chat" | "audio" | "image" | "video";
|
|
932
989
|
/**
|
|
933
990
|
* Fields shared by every model row regardless of modality. Modality-specific
|
|
934
991
|
* shapes (`LLMModel`, `AudioModel`, `ImageModel`) extend this.
|
|
@@ -1063,6 +1120,91 @@ interface ImageGenerationResult {
|
|
|
1063
1120
|
model: string;
|
|
1064
1121
|
cost_usd?: number | null;
|
|
1065
1122
|
}
|
|
1123
|
+
/** One row of a video model's per-resolution rate table (post-markup). */
|
|
1124
|
+
interface VideoModelRate {
|
|
1125
|
+
resolution: string;
|
|
1126
|
+
audio?: boolean;
|
|
1127
|
+
per_second: number;
|
|
1128
|
+
}
|
|
1129
|
+
/** Video model pricing — USD per second of OUTPUT video (post-markup). */
|
|
1130
|
+
interface VideoModelPricing {
|
|
1131
|
+
/** Cheapest rate in the table. */
|
|
1132
|
+
per_second: number;
|
|
1133
|
+
rates: VideoModelRate[];
|
|
1134
|
+
}
|
|
1135
|
+
/** Video model capability block. */
|
|
1136
|
+
interface VideoModelCapabilities {
|
|
1137
|
+
/** Generation modes: t2v (text), i2v (image ref), v2v (video edit). */
|
|
1138
|
+
modes: ("t2v" | "i2v" | "v2v")[];
|
|
1139
|
+
/** Fixed output durations in seconds — requests must pick one. */
|
|
1140
|
+
durations: number[];
|
|
1141
|
+
resolutions: string[];
|
|
1142
|
+
aspect_ratios: string[];
|
|
1143
|
+
/** Whether the model generates native audio with the video. */
|
|
1144
|
+
audio: boolean;
|
|
1145
|
+
max_duration_seconds: number;
|
|
1146
|
+
max_input_images?: number | null;
|
|
1147
|
+
}
|
|
1148
|
+
/** A video model from `GET /v1/videos/models` (`modality: "video"`). */
|
|
1149
|
+
interface VideoModel extends ModelBase {
|
|
1150
|
+
modality: "video";
|
|
1151
|
+
provider_display_name?: string | null;
|
|
1152
|
+
provider_slug?: string | null;
|
|
1153
|
+
pricing: VideoModelPricing;
|
|
1154
|
+
capabilities: VideoModelCapabilities;
|
|
1155
|
+
paid: boolean;
|
|
1156
|
+
required_tier?: string | null;
|
|
1157
|
+
locked?: boolean;
|
|
1158
|
+
speed?: string | null;
|
|
1159
|
+
is_new?: boolean;
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1162
|
+
* The completed operation's `result` for `video generate` — surfaced by
|
|
1163
|
+
* `client.videos.generate()` (wait mode) or `client.operations.get(id)`.
|
|
1164
|
+
*/
|
|
1165
|
+
interface VideoGenerationResult {
|
|
1166
|
+
file_id: string;
|
|
1167
|
+
path: string;
|
|
1168
|
+
url: string;
|
|
1169
|
+
raw_url?: string | null;
|
|
1170
|
+
model: string;
|
|
1171
|
+
cost_usd?: number | null;
|
|
1172
|
+
duration_seconds: number;
|
|
1173
|
+
resolution: string;
|
|
1174
|
+
}
|
|
1175
|
+
/** One row of `GET /v1/videos/models/search`. */
|
|
1176
|
+
interface VideoModelSearchItem {
|
|
1177
|
+
id: string;
|
|
1178
|
+
display_name: string;
|
|
1179
|
+
provider: string;
|
|
1180
|
+
provider_slug: string;
|
|
1181
|
+
/** Cheapest post-markup USD per second of output video. */
|
|
1182
|
+
per_second: number;
|
|
1183
|
+
modes: ("t2v" | "i2v" | "v2v")[];
|
|
1184
|
+
durations: number[];
|
|
1185
|
+
resolutions: string[];
|
|
1186
|
+
audio: boolean;
|
|
1187
|
+
speed: "fast" | "standard" | "slow";
|
|
1188
|
+
description?: string | null;
|
|
1189
|
+
}
|
|
1190
|
+
/** The shared search envelope instantiated for video models. */
|
|
1191
|
+
interface VideoModelSearchResult {
|
|
1192
|
+
items: VideoModelSearchItem[];
|
|
1193
|
+
total_count: number;
|
|
1194
|
+
offset: number;
|
|
1195
|
+
has_more: boolean;
|
|
1196
|
+
query?: string | null;
|
|
1197
|
+
applied_filters: Record<string, unknown>;
|
|
1198
|
+
}
|
|
1199
|
+
/**
|
|
1200
|
+
* An async-operation handle (`{id: "mg_…", status}`) — what `video generate`
|
|
1201
|
+
* resolves with under `wait: false`; poll via `client.operations.get(id)`.
|
|
1202
|
+
*/
|
|
1203
|
+
interface OperationHandle {
|
|
1204
|
+
id: string;
|
|
1205
|
+
status: string;
|
|
1206
|
+
[key: string]: unknown;
|
|
1207
|
+
}
|
|
1066
1208
|
/** Audio (TTS) model pricing block — price per 1,000 characters (post-markup). */
|
|
1067
1209
|
interface AudioModelPricing {
|
|
1068
1210
|
per_thousand_chars: number;
|
|
@@ -1711,4 +1853,4 @@ declare class DataFolder {
|
|
|
1711
1853
|
private rebuildNameCache;
|
|
1712
1854
|
}
|
|
1713
1855
|
|
|
1714
|
-
export { type
|
|
1856
|
+
export { type FunctionResource as $, type AiGatewayProvider as A, type BlobObject as B, type CallOptions as C, type DataStore as D, type ComputerLoggingLevel as E, type File as F, type ComputerPort as G, type HttpContext as H, type ComputerServerInfo as I, type ComputerState as J, type ComputerType as K, type ComputerUser as L, type CreateTriggerInput as M, type DataCreateFolderInput as N, type OperationHandle as O, DataFolder as P, type DataUploadInput as Q, type DatastoreEntry as R, type EscalateRequest as S, type ExecutionBackend as T, type ExecutionRun as U, type VideoModel as V, type WriteOptions as W, type ExecutionRunStatus as X, type FileList as Y, type FunctionDeployment as Z, type FunctionInvokeResult as _, type AiGatewayUsageRow as a, type TriggerActionType as a$, type FunctionRun as a0, type HttpRequest as a1, type ImageGenerationResult as a2, type ImageModel as a3, type ImageModelPricing as a4, type LLMModel as a5, type LLMModelCapabilities as a6, type LLMModelPricing as a7, type ListEnvelope as a8, type ManagedProviderPreset as a9, type RuntimeMode as aA, type SearchResult as aB, type Secret as aC, type SecretWithValue as aD, type SendMessageResult as aE, type Settings as aF, type SftpEntry as aG, type Share as aH, type ShareDeletedResult as aI, type SharePermission as aJ, type ShareResourceType as aK, type SharedWithMeItem as aL, type SingleEnvelope as aM, type SpeechResult as aN, type SpeechStreamEvent as aO, type StoreInstallResult as aP, type StoreItem as aQ, type StoreItemType as aR, type StoredCredential as aS, type Subscription as aT, type SubscriptionPlan as aU, type TableCollection as aV, type TableRecord as aW, type TmuxWindow as aX, type TranscriptionResult as aY, type TranscriptionStreamEvent as aZ, type Trigger as a_, type Message as aa, type MessageCostEntry as ab, type MessageCosts as ac, type ModelBase as ad, type ModelModality as ae, type Notification as af, type NotificationConfig as ag, type NotificationPreference as ah, type NotificationSenderKind as ai, type Pagination as aj, type Permission as ak, type ProviderEndpoint as al, type ProviderEndpointConnectionType as am, type ProviderEndpointKind as an, type ProviderEndpointModality as ao, type ProviderEndpointModelMapping as ap, type ProviderEndpointProtocol as aq, type ProviderEndpointProviderKey as ar, type ProviderEndpointRuntime as as, type ProviderEndpointTestResult as at, type ProviderEndpointTransport as au, type ProviderEndpointVisibility as av, type QueryInput as aw, RemoteBundleReader as ax, type RepromptResult as ay, type RunCostMetrics as az, type VideoModelSearchResult as b, type TriggerCostStats as b0, type TriggerRun as b1, type TriggerType as b2, type TriggerWithSecret as b3, type TtsVoice as b4, type TtsVoiceGender as b5, type UpdateTriggerInput as b6, type UsageRecord as b7, type UsageSummary as b8, type User as b9, type VideoModelCapabilities as ba, type VideoModelPricing as bb, type VideoModelRate as bc, type VideoModelSearchItem as bd, type WebSearchHit as be, type WebSearchResponse as bf, type Workspace as bg, type WorkspaceInvitation as bh, type WorkspaceMember as bi, type WorkspaceMemberRole as bj, buildUrl as bk, request as bl, requestRaw as bm, type VideoGenerationResult as c, type DeletedResponse as d, type DataStoreUploadInput as e, type FileUploadResult as f, type DataStoreCreateFolderInput as g, type ConnectOptions as h, type Agent as i, type AgentRun as j, type AgentRunState as k, type ApiKey as l, AppFolder as m, type AudioModel as n, type AudioModelCapabilities as o, type AudioModelPricing as p, type AuthMode as q, type BundleReader as r, type Chat as s, type ChatCost as t, type ChatCostByCallType as u, type ChatStopResult as v, type ClientMeta as w, type Computer as x, type ComputerEnvVar as y, type ComputerExecResult as z };
|