@opencode/ai 2.1.3 → 2.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/README.md +283 -114
- package/dist/ai-client.d.ts +2 -2
- package/dist/ai-client.js +2 -1
- package/dist/cache-policy.d.ts +4 -0
- package/dist/cache-policy.js +20 -6
- package/dist/decision-client.d.ts +21 -0
- package/dist/decision-client.js +55 -0
- package/dist/decision.d.ts +472 -0
- package/dist/decision.js +158 -0
- package/dist/effect.d.ts +38 -0
- package/dist/effect.js +27 -0
- package/dist/effort-updates.d.ts +2 -2
- package/dist/experimental/cloudflare-run-extraction.d.ts +13 -0
- package/dist/experimental/cloudflare-run-extraction.js +83 -0
- package/dist/experimental/extraction.d.ts +183 -0
- package/dist/experimental/extraction.js +102 -0
- package/dist/experimental/realtime.d.ts +7 -2
- package/dist/experimental/realtime.js +5 -5
- package/dist/experimental.d.ts +2 -3
- package/dist/experimental.js +1 -2
- package/dist/image-client.d.ts +13 -22
- package/dist/image-client.js +0 -1
- package/dist/image.d.ts +154 -324
- package/dist/image.js +4 -11
- package/dist/index.d.ts +1426 -34
- package/dist/index.js +127 -24
- package/dist/llm.d.ts +16 -1
- package/dist/llm.js +34 -0
- package/dist/media-client.d.ts +2 -1
- package/dist/media-model.d.ts +3 -0
- package/dist/media-model.js +4 -1
- package/dist/media.d.ts +0 -7
- package/dist/media.js +0 -6
- package/dist/protocols/alibaba-chat.d.ts +32 -12
- package/dist/protocols/alibaba-images.d.ts +22 -0
- package/dist/protocols/alibaba-images.js +77 -0
- package/dist/protocols/alibaba-messages.d.ts +62 -27
- package/dist/protocols/alibaba-responses.d.ts +41 -38
- package/dist/protocols/anthropic-messages.d.ts +196 -94
- package/dist/protocols/anthropic-messages.js +47 -16
- package/dist/protocols/bedrock-converse.d.ts +140 -47
- package/dist/protocols/bedrock-converse.js +114 -18
- package/dist/protocols/bedrock-event-stream.js +1 -0
- package/dist/protocols/bfl-images.d.ts +9 -0
- package/dist/protocols/bfl-images.js +17 -15
- package/dist/protocols/cartesia-speech.d.ts +32 -50
- package/dist/protocols/cloudflare-run-decisions.d.ts +9 -0
- package/dist/protocols/cloudflare-run-decisions.js +36 -0
- package/dist/protocols/cloudflare-workers-ai-images.d.ts +23 -0
- package/dist/protocols/cloudflare-workers-ai-images.js +80 -0
- package/dist/protocols/cohere-chat.d.ts +7 -8
- package/dist/protocols/deepgram-speech.d.ts +32 -50
- package/dist/protocols/elevenlabs-speech.d.ts +32 -50
- package/dist/protocols/fal-images.d.ts +10 -1
- package/dist/protocols/fal-images.js +16 -25
- package/dist/protocols/fal-video.js +1 -1
- package/dist/protocols/gemini.d.ts +37 -34
- package/dist/protocols/gemini.js +13 -8
- package/dist/protocols/google-images.d.ts +2 -2
- package/dist/protocols/google-images.js +8 -37
- package/dist/protocols/google-interactions.d.ts +18 -14
- package/dist/protocols/google-interactions.js +14 -7
- package/dist/protocols/google-speech.d.ts +32 -50
- package/dist/protocols/google-speech.js +0 -1
- package/dist/protocols/google-transcription.d.ts +32 -50
- package/dist/protocols/google-transcription.js +0 -1
- package/dist/protocols/google-video.d.ts +1 -1
- package/dist/protocols/google-video.js +2 -7
- package/dist/protocols/index.d.ts +3 -0
- package/dist/protocols/index.js +3 -0
- package/dist/protocols/meta-images.d.ts +7 -1
- package/dist/protocols/meta-images.js +10 -8
- package/dist/protocols/meta-messages.d.ts +73 -38
- package/dist/protocols/meta-messages.js +14 -1
- package/dist/protocols/meta-responses.d.ts +84 -78
- package/dist/protocols/meta-responses.js +29 -1
- package/dist/protocols/mistral-chat.d.ts +81 -78
- package/dist/protocols/mistral-chat.js +2 -1
- package/dist/protocols/open-responses-channel.js +47 -46
- package/dist/protocols/open-responses-continuation.d.ts +8 -2
- package/dist/protocols/open-responses-continuation.js +3 -1
- package/dist/protocols/open-responses.d.ts +426 -396
- package/dist/protocols/open-responses.js +16 -25
- package/dist/protocols/openai-chat.d.ts +764 -52
- package/dist/protocols/openai-chat.js +38 -25
- package/dist/protocols/openai-compatible-chat.d.ts +35 -15
- package/dist/protocols/openai-compatible-responses.d.ts +44 -42
- package/dist/protocols/openai-decisions.d.ts +22 -0
- package/dist/protocols/openai-decisions.js +128 -0
- package/dist/protocols/openai-images.d.ts +53 -56
- package/dist/protocols/openai-images.js +100 -34
- package/dist/protocols/openai-responses.d.ts +322 -264
- package/dist/protocols/openai-responses.js +33 -3
- package/dist/protocols/openai-speech.d.ts +32 -50
- package/dist/protocols/openai-speech.js +15 -5
- package/dist/protocols/openai-transcription.d.ts +32 -50
- package/dist/protocols/openai-transcription.js +15 -11
- package/dist/protocols/replicate-images.js +1 -1
- package/dist/protocols/runway-video.d.ts +1 -1
- package/dist/protocols/runway-video.js +1 -1
- package/dist/protocols/shared.d.ts +9 -1
- package/dist/protocols/shared.js +13 -2
- package/dist/protocols/stability-images.d.ts +5 -0
- package/dist/protocols/stability-images.js +4 -9
- package/dist/protocols/system-one.d.ts +101 -0
- package/dist/protocols/system-one.js +230 -0
- package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
- package/dist/protocols/utils/bedrock-cache.js +7 -6
- package/dist/protocols/utils/cache.d.ts +14 -3
- package/dist/protocols/utils/cache.js +11 -4
- package/dist/protocols/utils/gemini-generate-content.d.ts +3 -3
- package/dist/protocols/utils/gemini-generate-content.js +10 -16
- package/dist/protocols/utils/gemini-json-schema.d.ts +5 -0
- package/dist/protocols/utils/gemini-json-schema.js +3 -3
- package/dist/protocols/utils/image-sizing.d.ts +31 -0
- package/dist/protocols/utils/image-sizing.js +73 -0
- package/dist/protocols/utils/media-input.d.ts +4 -5
- package/dist/protocols/utils/media-input.js +8 -5
- package/dist/protocols/utils/partial-json-options.d.ts +0 -1
- package/dist/protocols/utils/partial-json-options.js +0 -1
- package/dist/protocols/utils/speech-stream.d.ts +0 -1
- package/dist/protocols/utils/speech-stream.js +0 -1
- package/dist/protocols/utils/tool-schema.js +15 -5
- package/dist/protocols/utils/tool-stream.d.ts +10 -1
- package/dist/protocols/venice-chat.d.ts +71 -53
- package/dist/protocols/venice-chat.js +7 -6
- package/dist/protocols/xai-images.d.ts +1 -2
- package/dist/protocols/xai-images.js +9 -2
- package/dist/protocols/xai-responses.d.ts +88 -78
- package/dist/protocols/xai-responses.js +28 -2
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/xai-video.js +11 -8
- package/dist/protocols/zai-chat.d.ts +54 -30
- package/dist/protocols/zai-chat.js +8 -3
- package/dist/protocols/zai-images.d.ts +3 -1
- package/dist/protocols/zai-images.js +12 -11
- package/dist/protocols/zai-messages.d.ts +72 -35
- package/dist/protocols/zai-messages.js +3 -2
- package/dist/provider-error.js +24 -7
- package/dist/providers/alibaba/images.d.ts +2 -0
- package/dist/providers/alibaba/images.js +1 -0
- package/dist/providers/alibaba.d.ts +146 -85
- package/dist/providers/alibaba.js +16 -8
- package/dist/providers/amazon-bedrock-mantle.d.ts +277 -218
- package/dist/providers/amazon-bedrock.d.ts +48 -28
- package/dist/providers/amazon-bedrock.js +11 -11
- package/dist/providers/anthropic-compatible.d.ts +64 -29
- package/dist/providers/anthropic.d.ts +64 -29
- package/dist/providers/azure/images.d.ts +2 -0
- package/dist/providers/azure/images.js +1 -0
- package/dist/providers/azure.d.ts +156 -115
- package/dist/providers/azure.js +19 -1
- package/dist/providers/baseten/decisions.d.ts +2 -0
- package/dist/providers/baseten/decisions.js +1 -0
- package/dist/providers/baseten.d.ts +75 -25
- package/dist/providers/baseten.js +41 -8
- package/dist/providers/cerebras.d.ts +66 -24
- package/dist/providers/cloudflare-ai-gateway/decisions.d.ts +2 -0
- package/dist/providers/cloudflare-ai-gateway/decisions.js +1 -0
- package/dist/providers/cloudflare-ai-gateway.d.ts +409 -272
- package/dist/providers/cloudflare-ai-gateway.js +33 -6
- package/dist/providers/cloudflare-workers-ai/decisions.d.ts +2 -0
- package/dist/providers/cloudflare-workers-ai/decisions.js +1 -0
- package/dist/providers/cloudflare-workers-ai/images.d.ts +2 -0
- package/dist/providers/cloudflare-workers-ai/images.js +1 -0
- package/dist/providers/cloudflare-workers-ai.d.ts +79 -25
- package/dist/providers/cloudflare-workers-ai.js +45 -9
- package/dist/providers/cohere.d.ts +117 -75
- package/dist/providers/deepinfra.d.ts +66 -24
- package/dist/providers/deepseek.d.ts +66 -24
- package/dist/providers/digitalocean/decisions.d.ts +2 -0
- package/dist/providers/digitalocean/decisions.js +1 -0
- package/dist/providers/digitalocean/images.d.ts +2 -0
- package/dist/providers/digitalocean/images.js +1 -0
- package/dist/providers/digitalocean.d.ts +108 -37
- package/dist/providers/digitalocean.js +39 -8
- package/dist/providers/fireworks.d.ts +66 -24
- package/dist/providers/google/images.d.ts +2 -0
- package/dist/providers/google/images.js +1 -0
- package/dist/providers/google-vertex/images.d.ts +2 -0
- package/dist/providers/google-vertex/images.js +1 -0
- package/dist/providers/google-vertex-chat.d.ts +33 -12
- package/dist/providers/google-vertex-messages.d.ts +64 -29
- package/dist/providers/google-vertex-mistral.d.ts +17 -17
- package/dist/providers/google-vertex-responses.d.ts +38 -35
- package/dist/providers/google-vertex.d.ts +20 -18
- package/dist/providers/google-vertex.js +32 -15
- package/dist/providers/google.d.ts +22 -21
- package/dist/providers/google.js +15 -8
- package/dist/providers/groq.d.ts +66 -28
- package/dist/providers/groq.js +0 -6
- package/dist/providers/meta.d.ts +144 -85
- package/dist/providers/minimax.d.ts +145 -86
- package/dist/providers/mistral.d.ts +28 -28
- package/dist/providers/moonshot.d.ts +277 -218
- package/dist/providers/open-responses-options.d.ts +0 -1
- package/dist/providers/open-responses-options.js +1 -1
- package/dist/providers/openai/images.d.ts +2 -0
- package/dist/providers/openai/images.js +1 -0
- package/dist/providers/openai-compatible/images.d.ts +2 -0
- package/dist/providers/openai-compatible/images.js +1 -0
- package/dist/providers/openai-compatible-responses.d.ts +38 -35
- package/dist/providers/openai-compatible.d.ts +36 -13
- package/dist/providers/openai-compatible.js +22 -10
- package/dist/providers/openai-options.d.ts +3 -2
- package/dist/providers/openai-options.js +0 -1
- package/dist/providers/openai.d.ts +146 -109
- package/dist/providers/openai.js +20 -4
- package/dist/providers/opencode/decisions.d.ts +2 -0
- package/dist/providers/opencode/decisions.js +1 -0
- package/dist/providers/opencode.d.ts +9 -10
- package/dist/providers/opencode.js +10 -8
- package/dist/providers/openrouter/decisions.d.ts +2 -0
- package/dist/providers/openrouter/decisions.js +1 -0
- package/dist/providers/openrouter/images.d.ts +2 -0
- package/dist/providers/openrouter/images.js +1 -0
- package/dist/providers/openrouter.d.ts +128 -47
- package/dist/providers/openrouter.js +38 -16
- package/dist/providers/togetherai.d.ts +66 -24
- package/dist/providers/typesafe-ai/decisions.d.ts +2 -0
- package/dist/providers/typesafe-ai/decisions.js +1 -0
- package/dist/providers/typesafe-ai.d.ts +9 -10
- package/dist/providers/typesafe-ai.js +10 -8
- package/dist/providers/venice.d.ts +214 -20
- package/dist/providers/vercel-ai-gateway/decisions.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/decisions.js +1 -0
- package/dist/providers/vercel-ai-gateway/images.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/images.js +1 -0
- package/dist/providers/vercel-ai-gateway.d.ts +10 -16
- package/dist/providers/vercel-ai-gateway.js +31 -85
- package/dist/providers/xai/images.d.ts +2 -0
- package/dist/providers/xai/images.js +1 -0
- package/dist/providers/xai.d.ts +40 -17
- package/dist/providers/xai.js +15 -8
- package/dist/providers/zai/images.d.ts +2 -0
- package/dist/providers/zai/images.js +1 -0
- package/dist/providers/zai-coding-plan.d.ts +224 -85
- package/dist/providers/zai.d.ts +110 -23
- package/dist/providers/zai.js +15 -8
- package/dist/route/auth-options.d.ts +0 -3
- package/dist/route/auth.d.ts +0 -2
- package/dist/route/auth.js +0 -2
- package/dist/route/client.d.ts +2 -4
- package/dist/route/client.js +29 -8
- package/dist/route/decision.d.ts +58 -0
- package/dist/route/decision.js +75 -0
- package/dist/route/executor-service.js +1 -1
- package/dist/route/executor.d.ts +1 -1
- package/dist/route/framing.d.ts +2 -0
- package/dist/route/index.d.ts +3 -0
- package/dist/route/index.js +3 -0
- package/dist/route/media-protocol.d.ts +1 -0
- package/dist/route/media-protocol.js +12 -8
- package/dist/route/media.d.ts +5 -1
- package/dist/route/media.js +6 -2
- package/dist/route/transport/http.js +1 -0
- package/dist/route/transport/index.d.ts +1 -0
- package/dist/schema/events.d.ts +148 -6
- package/dist/schema/events.js +20 -0
- package/dist/schema/messages.d.ts +6 -2
- package/dist/schema/messages.js +3 -0
- package/dist/schema/options.d.ts +5 -3
- package/dist/schema/options.js +8 -3
- package/dist/speech-client.d.ts +13 -22
- package/dist/speech-client.js +0 -1
- package/dist/speech.d.ts +148 -283
- package/dist/speech.js +2 -4
- package/dist/testing.d.ts +25 -24
- package/dist/testing.js +3 -21
- package/dist/transcription-client.d.ts +13 -22
- package/dist/transcription.d.ts +148 -283
- package/dist/transcription.js +1 -1
- package/dist/utils/media-type.js +22 -1
- package/dist/video-client.d.ts +13 -22
- package/dist/video-client.js +0 -1
- package/dist/video.d.ts +115 -250
- package/dist/video.js +3 -5
- package/package.json +516 -13
- package/dist/experimental/evaluation-client.d.ts +0 -21
- package/dist/experimental/evaluation-client.js +0 -64
- package/dist/experimental/evaluation.d.ts +0 -242
- package/dist/experimental/evaluation.js +0 -115
- package/dist/experimental/system-one.d.ts +0 -16
- package/dist/experimental/system-one.js +0 -135
- package/dist/promise.d.ts +0 -1021
- package/dist/promise.js +0 -101
- package/dist/provider.d.ts +0 -23
- package/dist/provider.js +0 -2
package/dist/video.d.ts
CHANGED
|
@@ -224,7 +224,7 @@ declare const VideoRequest_base: Schema.Class<VideoRequest, Schema.Struct<{
|
|
|
224
224
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
225
225
|
}>, never, never>>;
|
|
226
226
|
readonly durationSeconds: Schema.optional<Schema.Number>;
|
|
227
|
-
readonly
|
|
227
|
+
readonly aspect: Schema.optional<Schema.declare<`${number}:${number}`, `${number}:${number}`>>;
|
|
228
228
|
readonly resolution: Schema.optional<Schema.String>;
|
|
229
229
|
/** Whether to generate an audio track; routes whose audio is always on fail typed on `false`. */
|
|
230
230
|
readonly audio: Schema.optional<Schema.Boolean>;
|
|
@@ -299,11 +299,6 @@ declare const VideoResponse_base: Schema.Class<VideoResponse, Schema.Struct<{
|
|
|
299
299
|
readonly type: Schema.Literal<"compute">;
|
|
300
300
|
readonly seconds: Schema.Number;
|
|
301
301
|
}>]>>;
|
|
302
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
303
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
304
|
-
readonly message: Schema.String;
|
|
305
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
306
|
-
}>>>;
|
|
307
302
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
308
303
|
}>, {}>;
|
|
309
304
|
export declare class VideoResponse extends VideoResponse_base {
|
|
@@ -365,11 +360,6 @@ export declare const VideoFinishEvent: Schema.Struct<{
|
|
|
365
360
|
readonly type: Schema.Literal<"compute">;
|
|
366
361
|
readonly seconds: Schema.Number;
|
|
367
362
|
}>]>>;
|
|
368
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
369
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
370
|
-
readonly message: Schema.String;
|
|
371
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
372
|
-
}>>>;
|
|
373
363
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
374
364
|
}>;
|
|
375
365
|
declare const videoEventTagged: Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
@@ -435,11 +425,6 @@ declare const videoEventTagged: Schema.toTaggedUnion<"type", readonly [Schema.St
|
|
|
435
425
|
readonly type: Schema.Literal<"compute">;
|
|
436
426
|
readonly seconds: Schema.Number;
|
|
437
427
|
}>]>>;
|
|
438
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
439
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
440
|
-
readonly message: Schema.String;
|
|
441
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
442
|
-
}>>>;
|
|
443
428
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
444
429
|
}>]>;
|
|
445
430
|
export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -505,11 +490,6 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
505
490
|
readonly type: Schema.Literal<"compute">;
|
|
506
491
|
readonly seconds: Schema.Number;
|
|
507
492
|
}>]>>;
|
|
508
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
509
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
510
|
-
readonly message: Schema.String;
|
|
511
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
512
|
-
}>>>;
|
|
513
493
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
514
494
|
}>]> & {
|
|
515
495
|
readonly discriminants: readonly ["generation-queued", "generation-progress", "video", "finish"];
|
|
@@ -535,11 +515,6 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
535
515
|
readonly type: Schema.Literal<"compute">;
|
|
536
516
|
readonly seconds: Schema.Number;
|
|
537
517
|
}>]>>;
|
|
538
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
539
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
540
|
-
readonly message: Schema.String;
|
|
541
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
542
|
-
}>>>;
|
|
543
518
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
544
519
|
}>;
|
|
545
520
|
"generation-progress": Schema.Struct<{
|
|
@@ -589,6 +564,10 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
589
564
|
}>;
|
|
590
565
|
};
|
|
591
566
|
readonly isAnyOf: <const Keys>(keys: readonly Keys[]) => (value: {
|
|
567
|
+
readonly type: "video";
|
|
568
|
+
readonly index: number;
|
|
569
|
+
readonly video: Media.Asset;
|
|
570
|
+
} | {
|
|
592
571
|
readonly type: "generation-queued";
|
|
593
572
|
readonly id: string;
|
|
594
573
|
readonly position?: number | undefined;
|
|
@@ -596,21 +575,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
596
575
|
readonly type: "generation-progress";
|
|
597
576
|
readonly id: string;
|
|
598
577
|
readonly progress?: number | undefined;
|
|
599
|
-
} | {
|
|
600
|
-
readonly type: "video";
|
|
601
|
-
readonly index: number;
|
|
602
|
-
readonly video: Media.Asset;
|
|
603
578
|
} | {
|
|
604
579
|
readonly type: "finish";
|
|
605
580
|
readonly usage?: {
|
|
606
|
-
readonly type: "tokens";
|
|
607
|
-
readonly input?: number | undefined;
|
|
608
|
-
readonly output?: number | undefined;
|
|
609
|
-
readonly total?: number | undefined;
|
|
610
|
-
readonly details?: {
|
|
611
|
-
readonly [x: string]: unknown;
|
|
612
|
-
} | undefined;
|
|
613
|
-
} | {
|
|
614
581
|
readonly type: "seconds";
|
|
615
582
|
readonly seconds: number;
|
|
616
583
|
} | {
|
|
@@ -622,22 +589,27 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
622
589
|
} | {
|
|
623
590
|
readonly type: "compute";
|
|
624
591
|
readonly seconds: number;
|
|
625
|
-
} |
|
|
626
|
-
|
|
627
|
-
readonly
|
|
628
|
-
readonly
|
|
629
|
-
readonly
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
};
|
|
592
|
+
} | {
|
|
593
|
+
readonly type: "tokens";
|
|
594
|
+
readonly input?: number | undefined;
|
|
595
|
+
readonly output?: number | undefined;
|
|
596
|
+
readonly total?: number | undefined;
|
|
597
|
+
readonly details?: {
|
|
598
|
+
readonly [x: string]: unknown;
|
|
633
599
|
} | undefined;
|
|
634
|
-
}
|
|
600
|
+
} | undefined;
|
|
635
601
|
readonly providerMetadata?: {
|
|
636
602
|
readonly [x: string]: {
|
|
637
603
|
readonly [x: string]: unknown;
|
|
638
604
|
};
|
|
639
605
|
} | undefined;
|
|
640
606
|
}) => value is Extract<{
|
|
607
|
+
readonly type: "video";
|
|
608
|
+
readonly index: number;
|
|
609
|
+
readonly video: Media.Asset;
|
|
610
|
+
}, {
|
|
611
|
+
readonly type: Keys;
|
|
612
|
+
}> | Extract<{
|
|
641
613
|
readonly type: "generation-queued";
|
|
642
614
|
readonly id: string;
|
|
643
615
|
readonly position?: number | undefined;
|
|
@@ -649,23 +621,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
649
621
|
readonly progress?: number | undefined;
|
|
650
622
|
}, {
|
|
651
623
|
readonly type: Keys;
|
|
652
|
-
}> | Extract<{
|
|
653
|
-
readonly type: "video";
|
|
654
|
-
readonly index: number;
|
|
655
|
-
readonly video: Media.Asset;
|
|
656
|
-
}, {
|
|
657
|
-
readonly type: Keys;
|
|
658
624
|
}> | Extract<{
|
|
659
625
|
readonly type: "finish";
|
|
660
626
|
readonly usage?: {
|
|
661
|
-
readonly type: "tokens";
|
|
662
|
-
readonly input?: number | undefined;
|
|
663
|
-
readonly output?: number | undefined;
|
|
664
|
-
readonly total?: number | undefined;
|
|
665
|
-
readonly details?: {
|
|
666
|
-
readonly [x: string]: unknown;
|
|
667
|
-
} | undefined;
|
|
668
|
-
} | {
|
|
669
627
|
readonly type: "seconds";
|
|
670
628
|
readonly seconds: number;
|
|
671
629
|
} | {
|
|
@@ -677,16 +635,15 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
677
635
|
} | {
|
|
678
636
|
readonly type: "compute";
|
|
679
637
|
readonly seconds: number;
|
|
680
|
-
} |
|
|
681
|
-
|
|
682
|
-
readonly
|
|
683
|
-
readonly
|
|
684
|
-
readonly
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
};
|
|
638
|
+
} | {
|
|
639
|
+
readonly type: "tokens";
|
|
640
|
+
readonly input?: number | undefined;
|
|
641
|
+
readonly output?: number | undefined;
|
|
642
|
+
readonly total?: number | undefined;
|
|
643
|
+
readonly details?: {
|
|
644
|
+
readonly [x: string]: unknown;
|
|
688
645
|
} | undefined;
|
|
689
|
-
}
|
|
646
|
+
} | undefined;
|
|
690
647
|
readonly providerMetadata?: {
|
|
691
648
|
readonly [x: string]: {
|
|
692
649
|
readonly [x: string]: unknown;
|
|
@@ -699,14 +656,6 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
699
656
|
finish: (u: unknown) => u is {
|
|
700
657
|
readonly type: "finish";
|
|
701
658
|
readonly usage?: {
|
|
702
|
-
readonly type: "tokens";
|
|
703
|
-
readonly input?: number | undefined;
|
|
704
|
-
readonly output?: number | undefined;
|
|
705
|
-
readonly total?: number | undefined;
|
|
706
|
-
readonly details?: {
|
|
707
|
-
readonly [x: string]: unknown;
|
|
708
|
-
} | undefined;
|
|
709
|
-
} | {
|
|
710
659
|
readonly type: "seconds";
|
|
711
660
|
readonly seconds: number;
|
|
712
661
|
} | {
|
|
@@ -718,16 +667,15 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
718
667
|
} | {
|
|
719
668
|
readonly type: "compute";
|
|
720
669
|
readonly seconds: number;
|
|
721
|
-
} |
|
|
722
|
-
|
|
723
|
-
readonly
|
|
724
|
-
readonly
|
|
725
|
-
readonly
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
};
|
|
670
|
+
} | {
|
|
671
|
+
readonly type: "tokens";
|
|
672
|
+
readonly input?: number | undefined;
|
|
673
|
+
readonly output?: number | undefined;
|
|
674
|
+
readonly total?: number | undefined;
|
|
675
|
+
readonly details?: {
|
|
676
|
+
readonly [x: string]: unknown;
|
|
729
677
|
} | undefined;
|
|
730
|
-
}
|
|
678
|
+
} | undefined;
|
|
731
679
|
readonly providerMetadata?: {
|
|
732
680
|
readonly [x: string]: {
|
|
733
681
|
readonly [x: string]: unknown;
|
|
@@ -814,13 +762,12 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
814
762
|
readonly type: Schema.Literal<"compute">;
|
|
815
763
|
readonly seconds: Schema.Number;
|
|
816
764
|
}>]>>;
|
|
817
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
818
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
819
|
-
readonly message: Schema.String;
|
|
820
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
821
|
-
}>>>;
|
|
822
765
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
823
766
|
}> as M["Type"]["type"]]: (value: M["Type"]) => any; }>(value: {
|
|
767
|
+
readonly type: "video";
|
|
768
|
+
readonly index: number;
|
|
769
|
+
readonly video: Media.Asset;
|
|
770
|
+
} | {
|
|
824
771
|
readonly type: "generation-queued";
|
|
825
772
|
readonly id: string;
|
|
826
773
|
readonly position?: number | undefined;
|
|
@@ -828,21 +775,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
828
775
|
readonly type: "generation-progress";
|
|
829
776
|
readonly id: string;
|
|
830
777
|
readonly progress?: number | undefined;
|
|
831
|
-
} | {
|
|
832
|
-
readonly type: "video";
|
|
833
|
-
readonly index: number;
|
|
834
|
-
readonly video: Media.Asset;
|
|
835
778
|
} | {
|
|
836
779
|
readonly type: "finish";
|
|
837
780
|
readonly usage?: {
|
|
838
|
-
readonly type: "tokens";
|
|
839
|
-
readonly input?: number | undefined;
|
|
840
|
-
readonly output?: number | undefined;
|
|
841
|
-
readonly total?: number | undefined;
|
|
842
|
-
readonly details?: {
|
|
843
|
-
readonly [x: string]: unknown;
|
|
844
|
-
} | undefined;
|
|
845
|
-
} | {
|
|
846
781
|
readonly type: "seconds";
|
|
847
782
|
readonly seconds: number;
|
|
848
783
|
} | {
|
|
@@ -854,16 +789,15 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
854
789
|
} | {
|
|
855
790
|
readonly type: "compute";
|
|
856
791
|
readonly seconds: number;
|
|
857
|
-
} |
|
|
858
|
-
|
|
859
|
-
readonly
|
|
860
|
-
readonly
|
|
861
|
-
readonly
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
};
|
|
792
|
+
} | {
|
|
793
|
+
readonly type: "tokens";
|
|
794
|
+
readonly input?: number | undefined;
|
|
795
|
+
readonly output?: number | undefined;
|
|
796
|
+
readonly total?: number | undefined;
|
|
797
|
+
readonly details?: {
|
|
798
|
+
readonly [x: string]: unknown;
|
|
865
799
|
} | undefined;
|
|
866
|
-
}
|
|
800
|
+
} | undefined;
|
|
867
801
|
readonly providerMetadata?: {
|
|
868
802
|
readonly [x: string]: {
|
|
869
803
|
readonly [x: string]: unknown;
|
|
@@ -933,13 +867,12 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
933
867
|
readonly type: Schema.Literal<"compute">;
|
|
934
868
|
readonly seconds: Schema.Number;
|
|
935
869
|
}>]>>;
|
|
936
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
937
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
938
|
-
readonly message: Schema.String;
|
|
939
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
940
|
-
}>>>;
|
|
941
870
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
942
871
|
}> as M["Type"]["type"]]: (value: M["Type"]) => any; }>(cases: Cases): (value: {
|
|
872
|
+
readonly type: "video";
|
|
873
|
+
readonly index: number;
|
|
874
|
+
readonly video: Media.Asset;
|
|
875
|
+
} | {
|
|
943
876
|
readonly type: "generation-queued";
|
|
944
877
|
readonly id: string;
|
|
945
878
|
readonly position?: number | undefined;
|
|
@@ -947,21 +880,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
947
880
|
readonly type: "generation-progress";
|
|
948
881
|
readonly id: string;
|
|
949
882
|
readonly progress?: number | undefined;
|
|
950
|
-
} | {
|
|
951
|
-
readonly type: "video";
|
|
952
|
-
readonly index: number;
|
|
953
|
-
readonly video: Media.Asset;
|
|
954
883
|
} | {
|
|
955
884
|
readonly type: "finish";
|
|
956
885
|
readonly usage?: {
|
|
957
|
-
readonly type: "tokens";
|
|
958
|
-
readonly input?: number | undefined;
|
|
959
|
-
readonly output?: number | undefined;
|
|
960
|
-
readonly total?: number | undefined;
|
|
961
|
-
readonly details?: {
|
|
962
|
-
readonly [x: string]: unknown;
|
|
963
|
-
} | undefined;
|
|
964
|
-
} | {
|
|
965
886
|
readonly type: "seconds";
|
|
966
887
|
readonly seconds: number;
|
|
967
888
|
} | {
|
|
@@ -973,16 +894,15 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
973
894
|
} | {
|
|
974
895
|
readonly type: "compute";
|
|
975
896
|
readonly seconds: number;
|
|
976
|
-
} |
|
|
977
|
-
|
|
978
|
-
readonly
|
|
979
|
-
readonly
|
|
980
|
-
readonly
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
};
|
|
897
|
+
} | {
|
|
898
|
+
readonly type: "tokens";
|
|
899
|
+
readonly input?: number | undefined;
|
|
900
|
+
readonly output?: number | undefined;
|
|
901
|
+
readonly total?: number | undefined;
|
|
902
|
+
readonly details?: {
|
|
903
|
+
readonly [x: string]: unknown;
|
|
984
904
|
} | undefined;
|
|
985
|
-
}
|
|
905
|
+
} | undefined;
|
|
986
906
|
readonly providerMetadata?: {
|
|
987
907
|
readonly [x: string]: {
|
|
988
908
|
readonly [x: string]: unknown;
|
|
@@ -1054,13 +974,12 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1054
974
|
readonly type: Schema.Literal<"compute">;
|
|
1055
975
|
readonly seconds: Schema.Number;
|
|
1056
976
|
}>]>>;
|
|
1057
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1058
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
1059
|
-
readonly message: Schema.String;
|
|
1060
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1061
|
-
}>>>;
|
|
1062
977
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1063
978
|
}> as M["Type"]["type"]]+?: (value: M["Type"]) => any; } & { [K in Exclude<keyof Cases, "finish" | "generation-progress" | "generation-queued" | "video">]: never; }, OrElse extends (value: Exclude<{
|
|
979
|
+
readonly type: "video";
|
|
980
|
+
readonly index: number;
|
|
981
|
+
readonly video: Media.Asset;
|
|
982
|
+
} | {
|
|
1064
983
|
readonly type: "generation-queued";
|
|
1065
984
|
readonly id: string;
|
|
1066
985
|
readonly position?: number | undefined;
|
|
@@ -1068,21 +987,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1068
987
|
readonly type: "generation-progress";
|
|
1069
988
|
readonly id: string;
|
|
1070
989
|
readonly progress?: number | undefined;
|
|
1071
|
-
} | {
|
|
1072
|
-
readonly type: "video";
|
|
1073
|
-
readonly index: number;
|
|
1074
|
-
readonly video: Media.Asset;
|
|
1075
990
|
} | {
|
|
1076
991
|
readonly type: "finish";
|
|
1077
992
|
readonly usage?: {
|
|
1078
|
-
readonly type: "tokens";
|
|
1079
|
-
readonly input?: number | undefined;
|
|
1080
|
-
readonly output?: number | undefined;
|
|
1081
|
-
readonly total?: number | undefined;
|
|
1082
|
-
readonly details?: {
|
|
1083
|
-
readonly [x: string]: unknown;
|
|
1084
|
-
} | undefined;
|
|
1085
|
-
} | {
|
|
1086
993
|
readonly type: "seconds";
|
|
1087
994
|
readonly seconds: number;
|
|
1088
995
|
} | {
|
|
@@ -1094,22 +1001,25 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1094
1001
|
} | {
|
|
1095
1002
|
readonly type: "compute";
|
|
1096
1003
|
readonly seconds: number;
|
|
1097
|
-
} |
|
|
1098
|
-
|
|
1099
|
-
readonly
|
|
1100
|
-
readonly
|
|
1101
|
-
readonly
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
};
|
|
1004
|
+
} | {
|
|
1005
|
+
readonly type: "tokens";
|
|
1006
|
+
readonly input?: number | undefined;
|
|
1007
|
+
readonly output?: number | undefined;
|
|
1008
|
+
readonly total?: number | undefined;
|
|
1009
|
+
readonly details?: {
|
|
1010
|
+
readonly [x: string]: unknown;
|
|
1105
1011
|
} | undefined;
|
|
1106
|
-
}
|
|
1012
|
+
} | undefined;
|
|
1107
1013
|
readonly providerMetadata?: {
|
|
1108
1014
|
readonly [x: string]: {
|
|
1109
1015
|
readonly [x: string]: unknown;
|
|
1110
1016
|
};
|
|
1111
1017
|
} | undefined;
|
|
1112
1018
|
}, { readonly [K in "type"]: keyof Cases; }>) => any>(value: {
|
|
1019
|
+
readonly type: "video";
|
|
1020
|
+
readonly index: number;
|
|
1021
|
+
readonly video: Media.Asset;
|
|
1022
|
+
} | {
|
|
1113
1023
|
readonly type: "generation-queued";
|
|
1114
1024
|
readonly id: string;
|
|
1115
1025
|
readonly position?: number | undefined;
|
|
@@ -1117,21 +1027,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1117
1027
|
readonly type: "generation-progress";
|
|
1118
1028
|
readonly id: string;
|
|
1119
1029
|
readonly progress?: number | undefined;
|
|
1120
|
-
} | {
|
|
1121
|
-
readonly type: "video";
|
|
1122
|
-
readonly index: number;
|
|
1123
|
-
readonly video: Media.Asset;
|
|
1124
1030
|
} | {
|
|
1125
1031
|
readonly type: "finish";
|
|
1126
1032
|
readonly usage?: {
|
|
1127
|
-
readonly type: "tokens";
|
|
1128
|
-
readonly input?: number | undefined;
|
|
1129
|
-
readonly output?: number | undefined;
|
|
1130
|
-
readonly total?: number | undefined;
|
|
1131
|
-
readonly details?: {
|
|
1132
|
-
readonly [x: string]: unknown;
|
|
1133
|
-
} | undefined;
|
|
1134
|
-
} | {
|
|
1135
1033
|
readonly type: "seconds";
|
|
1136
1034
|
readonly seconds: number;
|
|
1137
1035
|
} | {
|
|
@@ -1143,16 +1041,15 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1143
1041
|
} | {
|
|
1144
1042
|
readonly type: "compute";
|
|
1145
1043
|
readonly seconds: number;
|
|
1146
|
-
} |
|
|
1147
|
-
|
|
1148
|
-
readonly
|
|
1149
|
-
readonly
|
|
1150
|
-
readonly
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
};
|
|
1044
|
+
} | {
|
|
1045
|
+
readonly type: "tokens";
|
|
1046
|
+
readonly input?: number | undefined;
|
|
1047
|
+
readonly output?: number | undefined;
|
|
1048
|
+
readonly total?: number | undefined;
|
|
1049
|
+
readonly details?: {
|
|
1050
|
+
readonly [x: string]: unknown;
|
|
1154
1051
|
} | undefined;
|
|
1155
|
-
}
|
|
1052
|
+
} | undefined;
|
|
1156
1053
|
readonly providerMetadata?: {
|
|
1157
1054
|
readonly [x: string]: {
|
|
1158
1055
|
readonly [x: string]: unknown;
|
|
@@ -1222,13 +1119,12 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1222
1119
|
readonly type: Schema.Literal<"compute">;
|
|
1223
1120
|
readonly seconds: Schema.Number;
|
|
1224
1121
|
}>]>>;
|
|
1225
|
-
readonly notices: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1226
|
-
readonly type: Schema.Literals<readonly ["moderated", "filtered", "other"]>;
|
|
1227
|
-
readonly message: Schema.String;
|
|
1228
|
-
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1229
|
-
}>>>;
|
|
1230
1122
|
readonly providerMetadata: Schema.optional<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Unknown>>>;
|
|
1231
1123
|
}> as M["Type"]["type"]]+?: (value: M["Type"]) => any; } & { [K in Exclude<keyof Cases, "finish" | "generation-progress" | "generation-queued" | "video">]: never; }, OrElse extends (value: Exclude<{
|
|
1124
|
+
readonly type: "video";
|
|
1125
|
+
readonly index: number;
|
|
1126
|
+
readonly video: Media.Asset;
|
|
1127
|
+
} | {
|
|
1232
1128
|
readonly type: "generation-queued";
|
|
1233
1129
|
readonly id: string;
|
|
1234
1130
|
readonly position?: number | undefined;
|
|
@@ -1236,21 +1132,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1236
1132
|
readonly type: "generation-progress";
|
|
1237
1133
|
readonly id: string;
|
|
1238
1134
|
readonly progress?: number | undefined;
|
|
1239
|
-
} | {
|
|
1240
|
-
readonly type: "video";
|
|
1241
|
-
readonly index: number;
|
|
1242
|
-
readonly video: Media.Asset;
|
|
1243
1135
|
} | {
|
|
1244
1136
|
readonly type: "finish";
|
|
1245
1137
|
readonly usage?: {
|
|
1246
|
-
readonly type: "tokens";
|
|
1247
|
-
readonly input?: number | undefined;
|
|
1248
|
-
readonly output?: number | undefined;
|
|
1249
|
-
readonly total?: number | undefined;
|
|
1250
|
-
readonly details?: {
|
|
1251
|
-
readonly [x: string]: unknown;
|
|
1252
|
-
} | undefined;
|
|
1253
|
-
} | {
|
|
1254
1138
|
readonly type: "seconds";
|
|
1255
1139
|
readonly seconds: number;
|
|
1256
1140
|
} | {
|
|
@@ -1262,22 +1146,25 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1262
1146
|
} | {
|
|
1263
1147
|
readonly type: "compute";
|
|
1264
1148
|
readonly seconds: number;
|
|
1265
|
-
} |
|
|
1266
|
-
|
|
1267
|
-
readonly
|
|
1268
|
-
readonly
|
|
1269
|
-
readonly
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
};
|
|
1149
|
+
} | {
|
|
1150
|
+
readonly type: "tokens";
|
|
1151
|
+
readonly input?: number | undefined;
|
|
1152
|
+
readonly output?: number | undefined;
|
|
1153
|
+
readonly total?: number | undefined;
|
|
1154
|
+
readonly details?: {
|
|
1155
|
+
readonly [x: string]: unknown;
|
|
1273
1156
|
} | undefined;
|
|
1274
|
-
}
|
|
1157
|
+
} | undefined;
|
|
1275
1158
|
readonly providerMetadata?: {
|
|
1276
1159
|
readonly [x: string]: {
|
|
1277
1160
|
readonly [x: string]: unknown;
|
|
1278
1161
|
};
|
|
1279
1162
|
} | undefined;
|
|
1280
1163
|
}, { readonly [K in "type"]: keyof Cases; }>) => any>(cases: Cases, orElse: OrElse): (value: {
|
|
1164
|
+
readonly type: "video";
|
|
1165
|
+
readonly index: number;
|
|
1166
|
+
readonly video: Media.Asset;
|
|
1167
|
+
} | {
|
|
1281
1168
|
readonly type: "generation-queued";
|
|
1282
1169
|
readonly id: string;
|
|
1283
1170
|
readonly position?: number | undefined;
|
|
@@ -1285,21 +1172,9 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1285
1172
|
readonly type: "generation-progress";
|
|
1286
1173
|
readonly id: string;
|
|
1287
1174
|
readonly progress?: number | undefined;
|
|
1288
|
-
} | {
|
|
1289
|
-
readonly type: "video";
|
|
1290
|
-
readonly index: number;
|
|
1291
|
-
readonly video: Media.Asset;
|
|
1292
1175
|
} | {
|
|
1293
1176
|
readonly type: "finish";
|
|
1294
1177
|
readonly usage?: {
|
|
1295
|
-
readonly type: "tokens";
|
|
1296
|
-
readonly input?: number | undefined;
|
|
1297
|
-
readonly output?: number | undefined;
|
|
1298
|
-
readonly total?: number | undefined;
|
|
1299
|
-
readonly details?: {
|
|
1300
|
-
readonly [x: string]: unknown;
|
|
1301
|
-
} | undefined;
|
|
1302
|
-
} | {
|
|
1303
1178
|
readonly type: "seconds";
|
|
1304
1179
|
readonly seconds: number;
|
|
1305
1180
|
} | {
|
|
@@ -1311,16 +1186,15 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1311
1186
|
} | {
|
|
1312
1187
|
readonly type: "compute";
|
|
1313
1188
|
readonly seconds: number;
|
|
1314
|
-
} |
|
|
1315
|
-
|
|
1316
|
-
readonly
|
|
1317
|
-
readonly
|
|
1318
|
-
readonly
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
};
|
|
1189
|
+
} | {
|
|
1190
|
+
readonly type: "tokens";
|
|
1191
|
+
readonly input?: number | undefined;
|
|
1192
|
+
readonly output?: number | undefined;
|
|
1193
|
+
readonly total?: number | undefined;
|
|
1194
|
+
readonly details?: {
|
|
1195
|
+
readonly [x: string]: unknown;
|
|
1322
1196
|
} | undefined;
|
|
1323
|
-
}
|
|
1197
|
+
} | undefined;
|
|
1324
1198
|
readonly providerMetadata?: {
|
|
1325
1199
|
readonly [x: string]: {
|
|
1326
1200
|
readonly [x: string]: unknown;
|
|
@@ -1348,14 +1222,6 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1348
1222
|
finish: (u: unknown) => u is {
|
|
1349
1223
|
readonly type: "finish";
|
|
1350
1224
|
readonly usage?: {
|
|
1351
|
-
readonly type: "tokens";
|
|
1352
|
-
readonly input?: number | undefined;
|
|
1353
|
-
readonly output?: number | undefined;
|
|
1354
|
-
readonly total?: number | undefined;
|
|
1355
|
-
readonly details?: {
|
|
1356
|
-
readonly [x: string]: unknown;
|
|
1357
|
-
} | undefined;
|
|
1358
|
-
} | {
|
|
1359
1225
|
readonly type: "seconds";
|
|
1360
1226
|
readonly seconds: number;
|
|
1361
1227
|
} | {
|
|
@@ -1367,16 +1233,15 @@ export declare const VideoEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
1367
1233
|
} | {
|
|
1368
1234
|
readonly type: "compute";
|
|
1369
1235
|
readonly seconds: number;
|
|
1370
|
-
} |
|
|
1371
|
-
|
|
1372
|
-
readonly
|
|
1373
|
-
readonly
|
|
1374
|
-
readonly
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
};
|
|
1236
|
+
} | {
|
|
1237
|
+
readonly type: "tokens";
|
|
1238
|
+
readonly input?: number | undefined;
|
|
1239
|
+
readonly output?: number | undefined;
|
|
1240
|
+
readonly total?: number | undefined;
|
|
1241
|
+
readonly details?: {
|
|
1242
|
+
readonly [x: string]: unknown;
|
|
1378
1243
|
} | undefined;
|
|
1379
|
-
}
|
|
1244
|
+
} | undefined;
|
|
1380
1245
|
readonly providerMetadata?: {
|
|
1381
1246
|
readonly [x: string]: {
|
|
1382
1247
|
readonly [x: string]: unknown;
|