@idapt/browser-app-sdk 0.1.0 → 0.3.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.
@@ -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;
@@ -217,7 +189,8 @@ declare const computerResponseSchema: z.ZodObject<{
217
189
  full: "full";
218
190
  minimal: "minimal";
219
191
  }>>>;
220
- workspace_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
192
+ owner: z.ZodString;
193
+ billing_account: z.ZodNullable<z.ZodString>;
221
194
  state: z.ZodNullable<z.ZodEnum<{
222
195
  unprovisioned: "unprovisioned";
223
196
  provisioning: "provisioning";
@@ -230,9 +203,15 @@ declare const computerResponseSchema: z.ZodObject<{
230
203
  terminating: "terminating";
231
204
  terminated: "terminated";
232
205
  }>>;
206
+ online: z.ZodBoolean;
207
+ last_heartbeat_at: z.ZodNullable<z.ZodNumber>;
233
208
  archived_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
234
209
  created_at: z.ZodString;
235
210
  updated_at: z.ZodString;
211
+ exposures: z.ZodArray<z.ZodObject<{
212
+ workspace: z.ZodString;
213
+ capabilities: z.ZodArray<z.ZodString>;
214
+ }, z.core.$strip>>;
236
215
  }, z.core.$strip>;
237
216
  type ComputerResponse = z.infer<typeof computerResponseSchema>;
238
217
  declare const computerUserResponseSchema: z.ZodObject<{
@@ -289,6 +268,7 @@ declare const agentResponseSchema: z.ZodObject<{
289
268
  compaction_trigger_value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
290
269
  source_template_resource_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
291
270
  memory_folder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
271
+ memory_resource_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
292
272
  default_model_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
293
273
  default_reasoning_effort: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
294
274
  default_auto_cost_level: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -354,7 +334,7 @@ declare const workspaceMemberResponseSchema: z.ZodObject<{
354
334
  created_at: z.ZodString;
355
335
  }, z.core.$strip>;
356
336
  type WorkspaceMemberResponse = z.infer<typeof workspaceMemberResponseSchema>;
357
- declare const triggerResponseSchema: z.ZodObject<{
337
+ declare const automationResponseSchema: z.ZodObject<{
358
338
  id: z.ZodString;
359
339
  name: z.ZodString;
360
340
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -379,20 +359,19 @@ declare const triggerResponseSchema: z.ZodObject<{
379
359
  compaction_preset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
380
360
  pasted_texts: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnknown>>>;
381
361
  active_skills: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
382
- file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
383
- runtime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
384
- timeout_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
385
- env: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
386
- working_dir_folder_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
362
+ function_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
363
+ method: z.ZodOptional<z.ZodNullable<z.ZodString>>;
364
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
365
+ body: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
387
366
  next_run_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
388
367
  last_fired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
389
368
  archived_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
390
369
  created_at: z.ZodString;
391
370
  updated_at: z.ZodString;
392
371
  }, z.core.$strip>;
393
- type TriggerResponse = z.infer<typeof triggerResponseSchema>;
394
- /** Trigger + its one-time plaintext webhook secret (create / rotate-secret). */
395
- declare const triggerWithSecretResponseSchema: z.ZodObject<{
372
+ type AutomationResponse = z.infer<typeof automationResponseSchema>;
373
+ /** Automation + its one-time plaintext webhook secret (create / rotate-secret). */
374
+ declare const automationWithSecretResponseSchema: z.ZodObject<{
396
375
  id: z.ZodString;
397
376
  name: z.ZodString;
398
377
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -417,11 +396,10 @@ declare const triggerWithSecretResponseSchema: z.ZodObject<{
417
396
  compaction_preset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
418
397
  pasted_texts: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnknown>>>;
419
398
  active_skills: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
420
- file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
421
- runtime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
422
- timeout_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
423
- env: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
424
- working_dir_folder_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
399
+ function_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
400
+ method: z.ZodOptional<z.ZodNullable<z.ZodString>>;
401
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
402
+ body: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
425
403
  next_run_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
426
404
  last_fired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
427
405
  archived_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -429,18 +407,19 @@ declare const triggerWithSecretResponseSchema: z.ZodObject<{
429
407
  updated_at: z.ZodString;
430
408
  secret: z.ZodString;
431
409
  }, z.core.$strip>;
432
- type TriggerWithSecretResponse = z.infer<typeof triggerWithSecretResponseSchema>;
433
- declare const triggerRunResponseSchema: z.ZodObject<{
410
+ type AutomationWithSecretResponse = z.infer<typeof automationWithSecretResponseSchema>;
411
+ declare const automationRunResponseSchema: z.ZodObject<{
434
412
  id: z.ZodString;
435
- trigger_id: z.ZodString;
413
+ automation_id: z.ZodNullable<z.ZodString>;
414
+ automation_name: z.ZodString;
436
415
  success: z.ZodBoolean;
437
416
  error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
438
417
  chat_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
439
418
  execution_run_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
440
419
  fired_at: z.ZodString;
441
420
  }, z.core.$strip>;
442
- type TriggerRunResponse = z.infer<typeof triggerRunResponseSchema>;
443
- declare const triggerCostStatsResponseSchema: z.ZodObject<{
421
+ type AutomationRunResponse = z.infer<typeof automationRunResponseSchema>;
422
+ declare const automationCostStatsResponseSchema: z.ZodObject<{
444
423
  runs_with_cost: z.ZodNumber;
445
424
  total_cost_usd: z.ZodNumber;
446
425
  today_cost_usd: z.ZodNumber;
@@ -449,7 +428,7 @@ declare const triggerCostStatsResponseSchema: z.ZodObject<{
449
428
  last7d_cost_usd: z.ZodNumber;
450
429
  first_fired_at: z.ZodNullable<z.ZodString>;
451
430
  }, z.core.$strip>;
452
- type TriggerCostStatsResponse = z.infer<typeof triggerCostStatsResponseSchema>;
431
+ type AutomationCostStatsResponse = z.infer<typeof automationCostStatsResponseSchema>;
453
432
  declare const notificationResponseSchema: z.ZodObject<{
454
433
  id: z.ZodString;
455
434
  type: z.ZodString;
@@ -552,6 +531,67 @@ declare const fileUploadResponseSchema: z.ZodObject<{
552
531
  }, z.core.$strip>;
553
532
  type FileUploadResponse = z.infer<typeof fileUploadResponseSchema>;
554
533
 
534
+ /** `execution_run` record — `transformExecutionRun` output, snake_case. */
535
+ declare const functionRunResponseSchema: z.ZodObject<{
536
+ id: z.ZodString;
537
+ backend: z.ZodString;
538
+ mode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
539
+ status: z.ZodString;
540
+ workspace_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
541
+ file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
542
+ file_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
543
+ runtime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
544
+ exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
545
+ stdout: z.ZodOptional<z.ZodNullable<z.ZodString>>;
546
+ stderr: z.ZodOptional<z.ZodNullable<z.ZodString>>;
547
+ duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
548
+ timed_out: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
549
+ timeout_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
550
+ trigger_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
551
+ error_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
552
+ created_at: z.ZodString;
553
+ started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
554
+ completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
555
+ output_files: z.ZodOptional<z.ZodArray<z.ZodObject<{
556
+ file_id: z.ZodString;
557
+ path: z.ZodString;
558
+ }, z.core.$strip>>>;
559
+ }, z.core.$strip>;
560
+ type FunctionRunResponse = z.infer<typeof functionRunResponseSchema>;
561
+ declare const functionResponseSchema: z.ZodObject<{
562
+ id: z.ZodString;
563
+ name: z.ZodString;
564
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
565
+ runtime: z.ZodString;
566
+ entrypoint: z.ZodString;
567
+ auth_mode: z.ZodString;
568
+ timeout_seconds: z.ZodNumber;
569
+ active_deployment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
570
+ source_repo_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
571
+ branch: z.ZodOptional<z.ZodNullable<z.ZodString>>;
572
+ browser_app_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
573
+ size_bytes: z.ZodNumber;
574
+ invoke_url: z.ZodString;
575
+ created_at: z.ZodString;
576
+ updated_at: z.ZodString;
577
+ }, z.core.$strip>;
578
+ type FunctionResponse = z.infer<typeof functionResponseSchema>;
579
+ declare const functionDeploymentResponseSchema: z.ZodObject<{
580
+ id: z.ZodString;
581
+ function_id: z.ZodString;
582
+ status: z.ZodString;
583
+ runtime: z.ZodString;
584
+ entrypoint: z.ZodString;
585
+ size_bytes: z.ZodNumber;
586
+ file_count: z.ZodNumber;
587
+ content_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
588
+ producer_type: z.ZodString;
589
+ producer_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
590
+ created_at: z.ZodString;
591
+ built_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
592
+ }, z.core.$strip>;
593
+ type FunctionDeploymentResponse = z.infer<typeof functionDeploymentResponseSchema>;
594
+
555
595
  /**
556
596
  * A hub/store item from `GET /hub/search` (snake_case wire). `id` is the item's
557
597
  * resourceId (non-null). The catalog has heterogeneous payloads per type
@@ -852,53 +892,77 @@ type SendMessageResult = {
852
892
  chat_id: string;
853
893
  };
854
894
  /**
855
- * Lifecycle status of an execution run. `interrupted` lands when a run is
856
- * cancelled via `POST /code-runs/:id/interrupt`.
895
+ * Lifecycle status of a one-off function run. `interrupted` lands when a run is
896
+ * cancelled via `POST /functions/runs/:id/interrupt`.
857
897
  */
858
898
  type ExecutionRunStatus = "pending" | "running" | "completed" | "failed" | "timed_out" | "interrupted";
859
- /** Where an execution run executes — sandboxed Lambda or a paired computer. */
899
+ /** Where a function run executes — sandboxed Lambda or a paired computer. */
860
900
  type ExecutionBackend = "computer" | "lambda";
861
901
  /**
862
- * An execution-run row. Returned by `POST /code-runs`, `POST /files/:id/run`,
863
- * `GET /code-runs` and `GET /code-runs/:id` — code execution always yields
864
- * this single shape (there is no separate stripped run-summary type).
902
+ * A one-off function-run row. Returned by `POST /functions/runs`,
903
+ * `POST /files/:id/run`, `GET /functions/runs` and `GET /functions/runs/:id` —
904
+ * the one-off run lane always yields this single shape (there is no separate
905
+ * stripped run-summary type).
865
906
  */
866
- type ExecutionRun = ExecutionRunResponse;
867
- type TriggerType = "webhook" | "schedule" | "manual" | string;
868
- type TriggerActionType = "run_code" | "run_chat" | string;
907
+ type ExecutionRun = FunctionRunResponse;
908
+ /** Alias for the one-off run row the `client.functions.run*` result shape. */
909
+ type FunctionRun = ExecutionRun;
869
910
  /**
870
- * A trigger resource. This is a flat object every scheduling field
911
+ * A deployed function a named, versioned, HTTP-invokable unit served on
912
+ * `fn.idapt.host`. Returned by `GET/POST /functions`, `GET/PATCH /functions/:id`
913
+ * and `POST /functions/:id/promote`.
914
+ */
915
+ type FunctionResource = FunctionResponse;
916
+ /**
917
+ * One deployment (build) of a function. Returned by
918
+ * `POST /functions/:id/deploy` and `GET /functions/:id/deployments`.
919
+ */
920
+ type FunctionDeployment = FunctionDeploymentResponse;
921
+ /**
922
+ * Result of `POST /functions/:id/invoke` — the deployed handler's response:
923
+ * an HTTP `status`, a decoded `body`, and optional response `headers`.
924
+ */
925
+ interface FunctionInvokeResult {
926
+ status: number;
927
+ body: unknown;
928
+ headers?: Record<string, string>;
929
+ }
930
+ type TriggerType = "cron" | "webhook";
931
+ type AutomationActionType = "agent-run" | "function-invoke" | "computer-run";
932
+ /**
933
+ * An automation resource. This is a flat object — every scheduling field
871
934
  * and every action field lives directly on the row, with no nested
872
935
  * `trigger_config` / `action_config` objects.
873
936
  *
874
- * `agent_id`, `file_id` and `working_dir_folder_id` are resourceIds.
937
+ * `agent_id` and `function_id` are resourceIds.
875
938
  */
876
- /** A trigger resource (flat). Sourced from the crud v1 contract. */
877
- type Trigger = TriggerResponse;
939
+ /** An automation resource (flat). Sourced from the crud v1 contract. */
940
+ type Automation = AutomationResponse;
878
941
  /**
879
- * A trigger plus its one-time webhook `secret`. Returned by
880
- * `POST /v1/triggers` (webhook creation) and `POST /v1/triggers/:id/rotate-secret`.
942
+ * An automation plus its one-time webhook `secret`. Returned by
943
+ * `POST /v1/automations` (webhook creation) and `POST /v1/automations/:id/rotate-secret`.
881
944
  * The plaintext `secret` is only ever echoed on these two responses.
882
945
  */
883
- /** Trigger + one-time webhook secret. Sourced from the crud v1 contract. */
884
- type TriggerWithSecret = TriggerWithSecretResponse;
885
- /** A trigger run record. Sourced from the crud v1 contract. */
886
- type TriggerRun = TriggerRunResponse;
887
- /** Trigger cost aggregates. Sourced from the crud v1 contract. */
888
- type TriggerCostStats = TriggerCostStatsResponse;
946
+ /** Automation + one-time webhook secret. Sourced from the crud v1 contract. */
947
+ type AutomationWithSecret = AutomationWithSecretResponse;
948
+ /** An automation run record. Sourced from the crud v1 contract. */
949
+ type AutomationRun = AutomationRunResponse;
950
+ /** Automation cost aggregates. Sourced from the crud v1 contract. */
951
+ type AutomationCostStats = AutomationCostStatsResponse;
889
952
  /**
890
- * Create-trigger request body — flat, mirrors the `Trigger` shape. The
953
+ * Create-automation request body — flat, mirrors the `Automation` shape. The
891
954
  * required fields depend on `trigger_type` / `action_type` (a schedule
892
- * trigger needs `cron_expression`; a `run_code` action needs `file_id`;
893
- * a `run_chat` action needs `prompt_template` or `agent_id`). The server
955
+ * automation needs `cron_expression`; an `agent-run` action needs
956
+ * `prompt_template` and `agent_id`; a `function-invoke` action needs
957
+ * `function_id`). The server
894
958
  * validates the combination.
895
959
  */
896
- interface CreateTriggerInput {
960
+ interface CreateAutomationInput {
897
961
  name: string;
898
962
  description?: string;
899
963
  enabled?: boolean;
900
964
  trigger_type: TriggerType;
901
- action_type: TriggerActionType;
965
+ action_type: AutomationActionType;
902
966
  cron_expression?: string;
903
967
  cron_timezone?: string;
904
968
  agent_id?: string;
@@ -916,19 +980,19 @@ interface CreateTriggerInput {
916
980
  compaction_preset?: string;
917
981
  pasted_texts?: unknown[];
918
982
  active_skills?: string[];
919
- file_id?: string;
920
- runtime?: string;
921
- timeout_seconds?: number;
922
- env?: Record<string, string>;
923
- working_dir_folder_id?: string;
924
- }
925
- /** Update-trigger request body — every create field plus `agent_id` is patchable. */
926
- type UpdateTriggerInput = Partial<CreateTriggerInput>;
983
+ function_id?: string;
984
+ method?: string;
985
+ path?: string;
986
+ body?: unknown;
987
+ }
988
+ /** Update-automation request body — every create field plus `agent_id` is patchable. */
989
+ type UpdateAutomationInput = Partial<CreateAutomationInput>;
927
990
  /**
928
991
  * Modality bucket a model belongs to. Every model row across `/v1/models`,
929
- * `/v1/audio/models` and `/v1/images/models` carries this discriminant.
992
+ * `/v1/audio/models`, `/v1/images/models` and `/v1/videos/models` carries
993
+ * this discriminant.
930
994
  */
931
- type ModelModality = "chat" | "audio" | "image";
995
+ type ModelModality = "chat" | "audio" | "image" | "video";
932
996
  /**
933
997
  * Fields shared by every model row regardless of modality. Modality-specific
934
998
  * shapes (`LLMModel`, `AudioModel`, `ImageModel`) extend this.
@@ -1063,6 +1127,91 @@ interface ImageGenerationResult {
1063
1127
  model: string;
1064
1128
  cost_usd?: number | null;
1065
1129
  }
1130
+ /** One row of a video model's per-resolution rate table (post-markup). */
1131
+ interface VideoModelRate {
1132
+ resolution: string;
1133
+ audio?: boolean;
1134
+ per_second: number;
1135
+ }
1136
+ /** Video model pricing — USD per second of OUTPUT video (post-markup). */
1137
+ interface VideoModelPricing {
1138
+ /** Cheapest rate in the table. */
1139
+ per_second: number;
1140
+ rates: VideoModelRate[];
1141
+ }
1142
+ /** Video model capability block. */
1143
+ interface VideoModelCapabilities {
1144
+ /** Generation modes: t2v (text), i2v (image ref), v2v (video edit). */
1145
+ modes: ("t2v" | "i2v" | "v2v")[];
1146
+ /** Fixed output durations in seconds — requests must pick one. */
1147
+ durations: number[];
1148
+ resolutions: string[];
1149
+ aspect_ratios: string[];
1150
+ /** Whether the model generates native audio with the video. */
1151
+ audio: boolean;
1152
+ max_duration_seconds: number;
1153
+ max_input_images?: number | null;
1154
+ }
1155
+ /** A video model from `GET /v1/videos/models` (`modality: "video"`). */
1156
+ interface VideoModel extends ModelBase {
1157
+ modality: "video";
1158
+ provider_display_name?: string | null;
1159
+ provider_slug?: string | null;
1160
+ pricing: VideoModelPricing;
1161
+ capabilities: VideoModelCapabilities;
1162
+ paid: boolean;
1163
+ required_tier?: string | null;
1164
+ locked?: boolean;
1165
+ speed?: string | null;
1166
+ is_new?: boolean;
1167
+ }
1168
+ /**
1169
+ * The completed operation's `result` for `video generate` — surfaced by
1170
+ * `client.videos.generate()` (wait mode) or `client.operations.get(id)`.
1171
+ */
1172
+ interface VideoGenerationResult {
1173
+ file_id: string;
1174
+ path: string;
1175
+ url: string;
1176
+ raw_url?: string | null;
1177
+ model: string;
1178
+ cost_usd?: number | null;
1179
+ duration_seconds: number;
1180
+ resolution: string;
1181
+ }
1182
+ /** One row of `GET /v1/videos/models/search`. */
1183
+ interface VideoModelSearchItem {
1184
+ id: string;
1185
+ display_name: string;
1186
+ provider: string;
1187
+ provider_slug: string;
1188
+ /** Cheapest post-markup USD per second of output video. */
1189
+ per_second: number;
1190
+ modes: ("t2v" | "i2v" | "v2v")[];
1191
+ durations: number[];
1192
+ resolutions: string[];
1193
+ audio: boolean;
1194
+ speed: "fast" | "standard" | "slow";
1195
+ description?: string | null;
1196
+ }
1197
+ /** The shared search envelope instantiated for video models. */
1198
+ interface VideoModelSearchResult {
1199
+ items: VideoModelSearchItem[];
1200
+ total_count: number;
1201
+ offset: number;
1202
+ has_more: boolean;
1203
+ query?: string | null;
1204
+ applied_filters: Record<string, unknown>;
1205
+ }
1206
+ /**
1207
+ * An async-operation handle (`{id: "mg_…", status}`) — what `video generate`
1208
+ * resolves with under `wait: false`; poll via `client.operations.get(id)`.
1209
+ */
1210
+ interface OperationHandle {
1211
+ id: string;
1212
+ status: string;
1213
+ [key: string]: unknown;
1214
+ }
1066
1215
  /** Audio (TTS) model pricing block — price per 1,000 characters (post-markup). */
1067
1216
  interface AudioModelPricing {
1068
1217
  per_thousand_chars: number;
@@ -1711,4 +1860,4 @@ declare class DataFolder {
1711
1860
  private rebuildNameCache;
1712
1861
  }
1713
1862
 
1714
- export { type LLMModelPricing as $, type AiGatewayProvider as A, type BlobObject as B, type CallOptions as C, type DataStore as D, type ComputerServerInfo as E, type File as F, type ComputerState as G, type HttpContext as H, type ComputerType as I, type ComputerUser as J, type CreateTriggerInput as K, type DataCreateFolderInput as L, DataFolder as M, type DataUploadInput as N, type DatastoreEntry as O, type EscalateRequest as P, type ExecutionBackend as Q, type ExecutionRun as R, type ExecutionRunStatus as S, type FileList as T, type HttpRequest as U, type ImageGenerationResult as V, type WriteOptions as W, type ImageModel as X, type ImageModelPricing as Y, type LLMModel as Z, type LLMModelCapabilities as _, type AiGatewayUsageRow as a, type UsageRecord as a$, type ListEnvelope as a0, type ManagedProviderPreset as a1, type Message as a2, type MessageCostEntry as a3, type MessageCosts as a4, type ModelBase as a5, type ModelModality as a6, type Notification as a7, type NotificationConfig as a8, type NotificationPreference as a9, type ShareDeletedResult as aA, type SharePermission as aB, type ShareResourceType as aC, type SharedWithMeItem as aD, type SingleEnvelope as aE, type SpeechResult as aF, type SpeechStreamEvent as aG, type StoreInstallResult as aH, type StoreItem as aI, type StoreItemType as aJ, type StoredCredential as aK, type Subscription as aL, type SubscriptionPlan as aM, type TableCollection as aN, type TableRecord as aO, type TmuxWindow as aP, type TranscriptionResult as aQ, type TranscriptionStreamEvent as aR, type Trigger as aS, type TriggerActionType as aT, type TriggerCostStats as aU, type TriggerRun as aV, type TriggerType as aW, type TriggerWithSecret as aX, type TtsVoice as aY, type TtsVoiceGender as aZ, type UpdateTriggerInput as a_, type NotificationSenderKind as aa, type Pagination as ab, type Permission as ac, type ProviderEndpoint as ad, type ProviderEndpointConnectionType as ae, type ProviderEndpointKind as af, type ProviderEndpointModality as ag, type ProviderEndpointModelMapping as ah, type ProviderEndpointProtocol as ai, type ProviderEndpointProviderKey as aj, type ProviderEndpointRuntime as ak, type ProviderEndpointTestResult as al, type ProviderEndpointTransport as am, type ProviderEndpointVisibility as an, type QueryInput as ao, RemoteBundleReader as ap, type RepromptResult as aq, type RunCostMetrics as ar, type RuntimeMode as as, type SearchResult as at, type Secret as au, type SecretWithValue as av, type SendMessageResult as aw, type Settings as ax, type SftpEntry as ay, type Share as az, type DeletedResponse as b, type UsageSummary as b0, type User as b1, type WebSearchHit as b2, type WebSearchResponse as b3, type Workspace as b4, type WorkspaceInvitation as b5, type WorkspaceMember as b6, type WorkspaceMemberRole as b7, buildUrl as b8, request as b9, requestRaw as ba, type DataStoreUploadInput as c, type FileUploadResult as d, type DataStoreCreateFolderInput as e, type ConnectOptions as f, type Agent as g, type AgentRun as h, type AgentRunState as i, type ApiKey as j, AppFolder as k, type AudioModel as l, type AudioModelCapabilities as m, type AudioModelPricing as n, type AuthMode as o, type BundleReader as p, type Chat as q, type ChatCost as r, type ChatCostByCallType as s, type ChatStopResult as t, type ClientMeta as u, type Computer as v, type ComputerEnvVar as w, type ComputerExecResult as x, type ComputerLoggingLevel as y, type ComputerPort as z };
1863
+ export { type ExecutionRun as $, type AiGatewayProvider as A, type BlobObject as B, type CallOptions as C, type DataStore as D, type ChatStopResult as E, type File as F, type ClientMeta as G, type HttpContext as H, type Computer as I, type ComputerEnvVar as J, type ComputerExecResult as K, type ComputerLoggingLevel as L, type ComputerPort as M, type ComputerServerInfo as N, type OperationHandle as O, type ComputerState as P, type ComputerType as Q, type ComputerUser as R, type CreateAutomationInput as S, type DataCreateFolderInput as T, DataFolder as U, type VideoModel as V, type WriteOptions as W, type DataUploadInput as X, type DatastoreEntry as Y, type EscalateRequest as Z, type ExecutionBackend as _, type AiGatewayUsageRow as a, type TableRecord as a$, type ExecutionRunStatus as a0, type FileList as a1, type FunctionDeployment as a2, type FunctionInvokeResult as a3, type FunctionResource as a4, type FunctionRun as a5, type HttpRequest as a6, type ImageGenerationResult as a7, type ImageModel as a8, type ImageModelPricing as a9, type ProviderEndpointVisibility as aA, type QueryInput as aB, RemoteBundleReader as aC, type RepromptResult as aD, type RunCostMetrics as aE, type RuntimeMode as aF, type SearchResult as aG, type Secret as aH, type SecretWithValue as aI, type SendMessageResult as aJ, type Settings as aK, type SftpEntry as aL, type Share as aM, type ShareDeletedResult as aN, type SharePermission as aO, type ShareResourceType as aP, type SharedWithMeItem as aQ, type SingleEnvelope as aR, type SpeechResult as aS, type SpeechStreamEvent as aT, type StoreInstallResult as aU, type StoreItem as aV, type StoreItemType as aW, type StoredCredential as aX, type Subscription as aY, type SubscriptionPlan as aZ, type TableCollection as a_, type LLMModel as aa, type LLMModelCapabilities as ab, type LLMModelPricing as ac, type ListEnvelope as ad, type ManagedProviderPreset as ae, type Message as af, type MessageCostEntry as ag, type MessageCosts as ah, type ModelBase as ai, type ModelModality as aj, type Notification as ak, type NotificationConfig as al, type NotificationPreference as am, type NotificationSenderKind as an, type Pagination as ao, type Permission as ap, type ProviderEndpoint as aq, type ProviderEndpointConnectionType as ar, type ProviderEndpointKind as as, type ProviderEndpointModality as at, type ProviderEndpointModelMapping as au, type ProviderEndpointProtocol as av, type ProviderEndpointProviderKey as aw, type ProviderEndpointRuntime as ax, type ProviderEndpointTestResult as ay, type ProviderEndpointTransport as az, type VideoModelSearchResult as b, type TmuxWindow as b0, type TranscriptionResult as b1, type TranscriptionStreamEvent as b2, type TriggerType as b3, type TtsVoice as b4, type TtsVoiceGender as b5, type UpdateAutomationInput 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 Automation as r, type AutomationActionType as s, type AutomationCostStats as t, type AutomationRun as u, type AutomationWithSecret as v, type BundleReader as w, type Chat as x, type ChatCost as y, type ChatCostByCallType as z };