@rendobar/sdk 2.1.2 → 3.0.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/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.d.cts
1
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema.d.cts
2
2
  type _JSONSchema = boolean | JSONSchema;
3
3
  type JSONSchema = {
4
4
  [k: string]: unknown;
@@ -66,7 +66,7 @@ type JSONSchema = {
66
66
  };
67
67
  type BaseSchema = JSONSchema;
68
68
  //#endregion
69
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/standard-schema.d.cts
69
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/standard-schema.d.cts
70
70
  /** The Standard interface. */
71
71
  interface StandardTypedV1<Input = unknown, Output = Input> {
72
72
  /** The Standard properties. */
@@ -185,7 +185,7 @@ declare namespace StandardJSONSchemaV1 {
185
185
  }
186
186
  interface StandardSchemaWithJSONProps<Input = unknown, Output = Input> extends StandardSchemaV1.Props<Input, Output>, StandardJSONSchemaV1.Props<Input, Output> {}
187
187
  //#endregion
188
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.d.cts
188
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.d.cts
189
189
  declare const $output: unique symbol;
190
190
  type $output = typeof $output;
191
191
  declare const $input: unique symbol;
@@ -212,7 +212,7 @@ interface JSONSchemaMeta {
212
212
  }
213
213
  interface GlobalMeta extends JSONSchemaMeta {}
214
214
  //#endregion
215
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.cts
215
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.d.cts
216
216
  type Processor<T extends $ZodType = $ZodType> = (schema: T, ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void;
217
217
  interface JSONSchemaGeneratorParams {
218
218
  processors: Record<string, Processor>;
@@ -301,7 +301,7 @@ interface ZodStandardJSONSchemaPayload<T> extends BaseSchema {
301
301
  "~standard": ZodStandardSchemaWithJSON$1<T>;
302
302
  }
303
303
  //#endregion
304
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.d.cts
304
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.d.cts
305
305
  type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
306
306
  type MimeTypes = "application/json" | "application/xml" | "application/x-www-form-urlencoded" | "application/javascript" | "application/pdf" | "application/zip" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/octet-stream" | "application/graphql" | "text/html" | "text/plain" | "text/css" | "text/javascript" | "text/csv" | "image/png" | "image/jpeg" | "image/gif" | "image/svg+xml" | "image/webp" | "audio/mpeg" | "audio/ogg" | "audio/wav" | "audio/webm" | "video/mp4" | "video/webm" | "video/ogg" | "font/woff" | "font/woff2" | "font/ttf" | "font/otf" | "multipart/form-data" | (string & {});
307
307
  type IsAny<T> = 0 extends 1 & T ? true : false;
@@ -312,6 +312,7 @@ type LoosePartial<T extends object> = InexactPartial<T> & {
312
312
  [k: string]: unknown;
313
313
  };
314
314
  type Mask<Keys extends PropertyKey> = { [K in Keys]?: true };
315
+ type Writeable<T> = { -readonly [P in keyof T]: T[P] } & {};
315
316
  type InexactPartial<T> = { [P in keyof T]?: T[P] | undefined };
316
317
  type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
317
318
  readonly [Symbol.toStringTag]: string;
@@ -341,14 +342,14 @@ declare abstract class Class {
341
342
  constructor(..._args: any[]);
342
343
  }
343
344
  //#endregion
344
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.d.cts
345
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.d.cts
345
346
  declare const version: {
346
347
  readonly major: 4;
347
- readonly minor: 3;
348
+ readonly minor: 4;
348
349
  readonly patch: number;
349
350
  };
350
351
  //#endregion
351
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.d.cts
352
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.d.cts
352
353
  interface ParseContext<T extends $ZodIssueBase = never> {
353
354
  /** Customize error messages. */
354
355
  readonly error?: $ZodErrorMap<T>;
@@ -366,8 +367,13 @@ interface ParseContextInternal<T extends $ZodIssueBase = never> extends ParseCon
366
367
  interface ParsePayload<T = unknown> {
367
368
  value: T;
368
369
  issues: $ZodRawIssue[];
369
- /** A may to mark a whole payload as aborted. Used in codecs/pipes. */
370
+ /** A way to mark a whole payload as aborted. Used in codecs/pipes. */
370
371
  aborted?: boolean;
372
+ /** @internal Marks a value as a fallback that an outer wrapper (e.g.
373
+ * $ZodOptional) may override with its own interpretation when input was
374
+ * undefined. Set by $ZodCatch when catchValue substitutes and by every
375
+ * $ZodTransform invocation. */
376
+ fallback?: boolean | undefined;
371
377
  }
372
378
  type CheckFn<T> = (input: ParsePayload<T>) => MaybeAsync<void>;
373
379
  interface $ZodTypeDef {
@@ -509,10 +515,25 @@ interface $ZodNanoID extends $ZodType {
509
515
  _zod: $ZodNanoIDInternals;
510
516
  }
511
517
  declare const $ZodNanoID: $constructor<$ZodNanoID>;
518
+ /**
519
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
520
+ * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
521
+ * See https://github.com/paralleldrive/cuid.
522
+ */
512
523
  interface $ZodCUIDInternals extends $ZodStringFormatInternals<"cuid"> {}
524
+ /**
525
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
526
+ * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
527
+ * See https://github.com/paralleldrive/cuid.
528
+ */
513
529
  interface $ZodCUID extends $ZodType {
514
530
  _zod: $ZodCUIDInternals;
515
531
  }
532
+ /**
533
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
534
+ * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
535
+ * See https://github.com/paralleldrive/cuid.
536
+ */
516
537
  declare const $ZodCUID: $constructor<$ZodCUID>;
517
538
  interface $ZodCUID2Internals extends $ZodStringFormatInternals<"cuid2"> {}
518
539
  interface $ZodCUID2 extends $ZodType {
@@ -1327,13 +1348,13 @@ interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
1327
1348
  declare const $ZodCustom: $constructor<$ZodCustom>;
1328
1349
  type $ZodTypes = $ZodString | $ZodNumber | $ZodBigInt | $ZodBoolean | $ZodDate | $ZodSymbol | $ZodUndefined | $ZodNullable | $ZodNull | $ZodAny | $ZodUnknown | $ZodNever | $ZodVoid | $ZodArray | $ZodObject | $ZodUnion | $ZodIntersection | $ZodTuple | $ZodRecord | $ZodMap | $ZodSet | $ZodLiteral | $ZodEnum | $ZodFunction | $ZodPromise | $ZodLazy | $ZodOptional | $ZodDefault | $ZodPrefault | $ZodTemplateLiteral | $ZodCustom | $ZodTransform | $ZodNonOptional | $ZodReadonly | $ZodNaN | $ZodPipe | $ZodSuccess | $ZodCatch | $ZodFile;
1329
1350
  //#endregion
1330
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.d.cts
1351
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.d.cts
1331
1352
  interface $ZodCheckDef {
1332
1353
  check: string;
1333
1354
  error?: $ZodErrorMap<never> | undefined;
1334
1355
  /** If true, no later checks will be executed if this check fails. Default `false`. */
1335
1356
  abort?: boolean | undefined;
1336
- /** If provided, this check will only be executed if the function returns `true`. Defaults to `payload => z.util.isAborted(payload)`. */
1357
+ /** If provided, the check runs only when this returns `true`. By default, it is skipped if prior parsing produced aborting issues. */
1337
1358
  when?: ((payload: ParsePayload) => boolean) | undefined;
1338
1359
  }
1339
1360
  interface $ZodCheckInternals<T> {
@@ -1509,7 +1530,7 @@ interface $ZodCheckEndsWith extends $ZodCheckInternals<string> {
1509
1530
  }
1510
1531
  declare const $ZodCheckEndsWith: $constructor<$ZodCheckEndsWith>;
1511
1532
  //#endregion
1512
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.d.cts
1533
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.d.cts
1513
1534
  interface $ZodIssueBase {
1514
1535
  readonly code?: string;
1515
1536
  readonly input?: unknown;
@@ -1561,6 +1582,7 @@ interface $ZodIssueInvalidUnionNoMatch extends $ZodIssueBase {
1561
1582
  readonly errors: $ZodIssue[][];
1562
1583
  readonly input?: unknown;
1563
1584
  readonly discriminator?: string | undefined;
1585
+ readonly options?: Primitive[];
1564
1586
  readonly inclusive?: true;
1565
1587
  }
1566
1588
  interface $ZodIssueInvalidUnionMultipleMatch extends $ZodIssueBase {
@@ -1630,7 +1652,7 @@ type $ZodFormattedError<T, U = string> = {
1630
1652
  _errors: U[];
1631
1653
  } & Flatten<_ZodFormattedError<T, U>>;
1632
1654
  //#endregion
1633
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.d.cts
1655
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.d.cts
1634
1656
  type ZodTrait = {
1635
1657
  _zod: {
1636
1658
  def: any;
@@ -1673,7 +1695,7 @@ type output<T> = T extends {
1673
1695
  };
1674
1696
  } ? T["_zod"]["output"] : unknown;
1675
1697
  //#endregion
1676
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.d.cts
1698
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.d.cts
1677
1699
  type Params<T extends $ZodType | $ZodCheck, IssueTypes extends $ZodIssueBase, OmitKeys extends keyof T["_zod"]["def"] = never> = Flatten<Partial<EmptyToNever<Omit<T["_zod"]["def"], OmitKeys> & ([IssueTypes] extends [never] ? {} : {
1678
1700
  error?: string | $ZodErrorMap<IssueTypes> | undefined; /** @deprecated This parameter is deprecated. Use `error` instead. */
1679
1701
  message?: string | undefined;
@@ -1691,6 +1713,11 @@ type $ZodCheckUUIDParams = CheckStringFormatParams<$ZodUUID, "pattern" | "when">
1691
1713
  type $ZodCheckURLParams = CheckStringFormatParams<$ZodURL, "when">;
1692
1714
  type $ZodCheckEmojiParams = CheckStringFormatParams<$ZodEmoji, "when">;
1693
1715
  type $ZodCheckNanoIDParams = CheckStringFormatParams<$ZodNanoID, "when">;
1716
+ /**
1717
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
1718
+ * (timestamps embedded in the id). Use {@link _cuid2} instead.
1719
+ * See https://github.com/paralleldrive/cuid.
1720
+ */
1694
1721
  type $ZodCheckCUIDParams = CheckStringFormatParams<$ZodCUID, "when">;
1695
1722
  type $ZodCheckCUID2Params = CheckStringFormatParams<$ZodCUID2, "when">;
1696
1723
  type $ZodCheckULIDParams = CheckStringFormatParams<$ZodULID, "when">;
@@ -1732,8 +1759,12 @@ type RawIssue<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T,
1732
1759
  interface $RefinementCtx<T = unknown> extends ParsePayload<T> {
1733
1760
  addIssue(arg: string | $ZodSuperRefineIssue): void;
1734
1761
  }
1762
+ interface $ZodSuperRefineParams {
1763
+ /** If provided, the refinement runs only when this returns `true`. By default, it is skipped if prior parsing produced aborting issues. */
1764
+ when?: ((payload: ParsePayload) => boolean) | undefined;
1765
+ }
1735
1766
  //#endregion
1736
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.d.cts
1767
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.d.cts
1737
1768
  /** An Error-like class used to store Zod validation issues. */
1738
1769
  interface ZodError<T = unknown> extends $ZodError<T> {
1739
1770
  /** @deprecated Use the `z.treeifyError(err)` function instead. */
@@ -1751,7 +1782,7 @@ interface ZodError<T = unknown> extends $ZodError<T> {
1751
1782
  }
1752
1783
  declare const ZodError: $constructor<ZodError>;
1753
1784
  //#endregion
1754
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.d.cts
1785
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.d.cts
1755
1786
  type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
1756
1787
  type ZodSafeParseSuccess<T> = {
1757
1788
  success: true;
@@ -1764,7 +1795,7 @@ type ZodSafeParseError<T> = {
1764
1795
  error: ZodError<T>;
1765
1796
  };
1766
1797
  //#endregion
1767
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.d.cts
1798
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.d.cts
1768
1799
  type ZodStandardSchemaWithJSON<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
1769
1800
  interface ZodType<out Output = unknown, out Input = unknown, out Internals extends $ZodTypeInternals<Output, Input> = $ZodTypeInternals<Output, Input>> extends $ZodType<Output, Input, Internals> {
1770
1801
  def: Internals["def"];
@@ -1799,7 +1830,7 @@ interface ZodType<out Output = unknown, out Input = unknown, out Internals exten
1799
1830
  safeEncodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<input<this>>>;
1800
1831
  safeDecodeAsync(data: input<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
1801
1832
  refine<Ch extends (arg: output<this>) => unknown | Promise<unknown>>(check: Ch, params?: string | $ZodCustomParams): Ch extends ((arg: any) => arg is infer R) ? this & ZodType<R, input<this>> : this;
1802
- superRefine(refinement: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => void | Promise<void>): this;
1833
+ superRefine(refinement: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => void | Promise<void>, params?: $ZodSuperRefineParams): this;
1803
1834
  overwrite(fn: (x: output<this>) => output<this>): this;
1804
1835
  optional(): ZodOptional<this>;
1805
1836
  exactOptional(): ZodExactOptional<this>;
@@ -1891,7 +1922,11 @@ interface ZodString extends _ZodString<$ZodStringInternals<string>> {
1891
1922
  nanoid(params?: string | $ZodCheckNanoIDParams): this;
1892
1923
  /** @deprecated Use `z.guid()` instead. */
1893
1924
  guid(params?: string | $ZodCheckGUIDParams): this;
1894
- /** @deprecated Use `z.cuid()` instead. */
1925
+ /**
1926
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
1927
+ * (timestamps embedded in the id). Use `z.cuid2()` instead.
1928
+ * See https://github.com/paralleldrive/cuid.
1929
+ */
1895
1930
  cuid(params?: string | $ZodCheckCUIDParams): this;
1896
1931
  /** @deprecated Use `z.cuid2()` instead. */
1897
1932
  cuid2(params?: string | $ZodCheckCUID2Params): this;
@@ -1987,18 +2022,18 @@ interface ZodObject< /** @ts-ignore Cast variance */out Shape extends $ZodShape
1987
2022
  strict(): ZodObject<Shape, $strict>;
1988
2023
  /** This is the default behavior. This method call is likely unnecessary. */
1989
2024
  strip(): ZodObject<Shape, $strip>;
1990
- extend<U extends $ZodLooseShape>(shape: U): ZodObject<Extend<Shape, U>, Config>;
1991
- safeExtend<U extends $ZodLooseShape>(shape: SafeExtendShape<Shape, U> & Partial<Record<keyof Shape, SomeType>>): ZodObject<Extend<Shape, U>, Config>;
2025
+ extend<U extends $ZodLooseShape>(shape: U): ZodObject<Extend<Shape, Writeable<U>>, Config>;
2026
+ safeExtend<U extends $ZodLooseShape>(shape: SafeExtendShape<Shape, U> & Partial<Record<keyof Shape, SomeType>>): ZodObject<Extend<Shape, Writeable<U>>, Config>;
1992
2027
  /**
1993
2028
  * @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
1994
2029
  */
1995
2030
  merge<U extends ZodObject>(other: U): ZodObject<Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
1996
2031
  pick<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<Flatten<Pick<Shape, Extract<keyof Shape, keyof M>>>, Config>;
1997
2032
  omit<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<Flatten<Omit<Shape, Extract<keyof Shape, keyof M>>>, Config>;
1998
- partial(): ZodObject<{ [k in keyof Shape]: ZodOptional<Shape[k]> }, Config>;
1999
- partial<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{ [k in keyof Shape]: k extends keyof M ? ZodOptional<Shape[k]> : Shape[k] }, Config>;
2000
- required(): ZodObject<{ [k in keyof Shape]: ZodNonOptional<Shape[k]> }, Config>;
2001
- required<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{ [k in keyof Shape]: k extends keyof M ? ZodNonOptional<Shape[k]> : Shape[k] }, Config>;
2033
+ partial(): ZodObject<{ -readonly [k in keyof Shape]: ZodOptional<Shape[k]> }, Config>;
2034
+ partial<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{ -readonly [k in keyof Shape]: k extends keyof M ? ZodOptional<Shape[k]> : Shape[k] }, Config>;
2035
+ required(): ZodObject<{ -readonly [k in keyof Shape]: ZodNonOptional<Shape[k]> }, Config>;
2036
+ required<M extends Mask<keyof Shape>>(mask: M & Record<Exclude<keyof M, keyof Shape>, never>): ZodObject<{ -readonly [k in keyof Shape]: k extends keyof M ? ZodNonOptional<Shape[k]> : Shape[k] }, Config>;
2002
2037
  }
2003
2038
  declare const ZodObject: $constructor<ZodObject>;
2004
2039
  interface ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends _ZodType<$ZodUnionInternals<T>>, $ZodUnion<T> {
@@ -2109,28 +2144,194 @@ declare const jobStepSchema: ZodObject<{
2109
2144
  meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2110
2145
  error: ZodOptional<ZodString>;
2111
2146
  }, $strip>;
2112
- declare const jobResponseSchema: ZodObject<{
2147
+ /**
2148
+ * File type, an OPEN enum (tolerant-reader contract). Derived from the file
2149
+ * extension. Clients MUST tolerate unknown future values and fall back to
2150
+ * treating the file as opaque ("other"). Adding a value here is non-breaking.
2151
+ */
2152
+ declare const fileTypeSchema: ZodEnum<{
2153
+ video: "video";
2154
+ image: "image";
2155
+ audio: "audio";
2156
+ captions: "captions";
2157
+ playlist: "playlist";
2158
+ data: "data";
2159
+ other: "other";
2160
+ }>;
2161
+ /**
2162
+ * A single produced file. `url` is a ready-to-fetch, time-limited URL (signed
2163
+ * download URL for single-file jobs, token-in-path serving URL for served
2164
+ * multi-file jobs). `path` is the file's path within the job output (basename
2165
+ * for single-file jobs, prefix-relative path for served jobs).
2166
+ */
2167
+ declare const fileSchema: ZodObject<{
2168
+ url: ZodString;
2169
+ path: ZodString;
2170
+ type: ZodEnum<{
2171
+ video: "video";
2172
+ image: "image";
2173
+ audio: "audio";
2174
+ captions: "captions";
2175
+ playlist: "playlist";
2176
+ data: "data";
2177
+ other: "other";
2178
+ }>;
2179
+ size: ZodNumber;
2180
+ meta: ZodOptional<ZodObject<{
2181
+ format: ZodOptional<ZodString>;
2182
+ width: ZodOptional<ZodNumber>;
2183
+ height: ZodOptional<ZodNumber>;
2184
+ durationMs: ZodOptional<ZodNumber>;
2185
+ }, $strip>>;
2186
+ }, $strip>;
2187
+ declare const jobOutputSchema: ZodObject<{
2188
+ data: ZodUnknown;
2189
+ file: ZodNullable<ZodObject<{
2190
+ url: ZodString;
2191
+ path: ZodString;
2192
+ type: ZodEnum<{
2193
+ video: "video";
2194
+ image: "image";
2195
+ audio: "audio";
2196
+ captions: "captions";
2197
+ playlist: "playlist";
2198
+ data: "data";
2199
+ other: "other";
2200
+ }>;
2201
+ size: ZodNumber;
2202
+ meta: ZodOptional<ZodObject<{
2203
+ format: ZodOptional<ZodString>;
2204
+ width: ZodOptional<ZodNumber>;
2205
+ height: ZodOptional<ZodNumber>;
2206
+ durationMs: ZodOptional<ZodNumber>;
2207
+ }, $strip>>;
2208
+ }, $strip>>;
2209
+ files: ZodArray<ZodObject<{
2210
+ url: ZodString;
2211
+ path: ZodString;
2212
+ type: ZodEnum<{
2213
+ video: "video";
2214
+ image: "image";
2215
+ audio: "audio";
2216
+ captions: "captions";
2217
+ playlist: "playlist";
2218
+ data: "data";
2219
+ other: "other";
2220
+ }>;
2221
+ size: ZodNumber;
2222
+ meta: ZodOptional<ZodObject<{
2223
+ format: ZodOptional<ZodString>;
2224
+ width: ZodOptional<ZodNumber>;
2225
+ height: ZodOptional<ZodNumber>;
2226
+ durationMs: ZodOptional<ZodNumber>;
2227
+ }, $strip>>;
2228
+ }, $strip>>;
2229
+ expiresAt: ZodNullable<ZodNumber>;
2230
+ }, $strip>;
2231
+ declare const jobErrorSchema: ZodObject<{
2232
+ code: ZodString;
2233
+ message: ZodString;
2234
+ detail: ZodNullable<ZodString>;
2235
+ retryable: ZodBoolean;
2236
+ }, $strip>;
2237
+ declare const jobCostSchema: ZodObject<{
2238
+ amount: ZodNumber;
2239
+ currency: ZodLiteral<"USD">;
2240
+ formatted: ZodString;
2241
+ }, $strip>;
2242
+ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2243
+ id: ZodString;
2244
+ orgId: ZodString;
2245
+ type: ZodString;
2246
+ inputs: ZodRecord<ZodString, ZodUnknown>;
2247
+ params: ZodRecord<ZodString, ZodUnknown>;
2248
+ cost: ZodNullable<ZodObject<{
2249
+ amount: ZodNumber;
2250
+ currency: ZodLiteral<"USD">;
2251
+ formatted: ZodString;
2252
+ }, $strip>>;
2253
+ outputCategory: ZodEnum<{
2254
+ video: "video";
2255
+ image: "image";
2256
+ audio: "audio";
2257
+ captions: "captions";
2258
+ json: "json";
2259
+ raw: "raw";
2260
+ }>;
2261
+ steps: ZodArray<ZodObject<{
2262
+ id: ZodString;
2263
+ name: ZodString;
2264
+ status: ZodString;
2265
+ startedAt: ZodOptional<ZodNumber>;
2266
+ completedAt: ZodOptional<ZodNumber>;
2267
+ durationMs: ZodOptional<ZodNumber>;
2268
+ meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2269
+ error: ZodOptional<ZodString>;
2270
+ }, $strip>>;
2271
+ logsAvailable: ZodBoolean;
2272
+ createdAt: ZodNumber;
2273
+ dispatchedAt: ZodNullable<ZodNumber>;
2274
+ startedAt: ZodNullable<ZodNumber>;
2275
+ completedAt: ZodNullable<ZodNumber>;
2276
+ settledAt: ZodNullable<ZodNumber>;
2277
+ status: ZodLiteral<"waiting">;
2278
+ }, $strip>, ZodObject<{
2113
2279
  id: ZodString;
2114
2280
  orgId: ZodString;
2115
2281
  type: ZodString;
2116
- status: ZodString;
2117
2282
  inputs: ZodRecord<ZodString, ZodUnknown>;
2118
2283
  params: ZodRecord<ZodString, ZodUnknown>;
2119
- outputUrl: ZodNullable<ZodString>;
2120
- posterUrl: ZodNullable<ZodString>;
2121
- outputMeta: ZodNullable<ZodRecord<ZodString, ZodUnknown>>;
2122
- errorCode: ZodNullable<ZodString>;
2123
- errorMessage: ZodNullable<ZodString>;
2124
- price: ZodNullable<ZodNumber>;
2125
- priceFormatted: ZodNullable<ZodString>;
2126
2284
  cost: ZodNullable<ZodObject<{
2127
- total: ZodNumber;
2128
- currency: ZodString;
2285
+ amount: ZodNumber;
2286
+ currency: ZodLiteral<"USD">;
2287
+ formatted: ZodString;
2288
+ }, $strip>>;
2289
+ outputCategory: ZodEnum<{
2290
+ video: "video";
2291
+ image: "image";
2292
+ audio: "audio";
2293
+ captions: "captions";
2294
+ json: "json";
2295
+ raw: "raw";
2296
+ }>;
2297
+ steps: ZodArray<ZodObject<{
2298
+ id: ZodString;
2299
+ name: ZodString;
2300
+ status: ZodString;
2301
+ startedAt: ZodOptional<ZodNumber>;
2302
+ completedAt: ZodOptional<ZodNumber>;
2303
+ durationMs: ZodOptional<ZodNumber>;
2304
+ meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2305
+ error: ZodOptional<ZodString>;
2129
2306
  }, $strip>>;
2307
+ logsAvailable: ZodBoolean;
2130
2308
  createdAt: ZodNumber;
2131
2309
  dispatchedAt: ZodNullable<ZodNumber>;
2132
2310
  startedAt: ZodNullable<ZodNumber>;
2133
2311
  completedAt: ZodNullable<ZodNumber>;
2312
+ settledAt: ZodNullable<ZodNumber>;
2313
+ status: ZodLiteral<"dispatched">;
2314
+ progress: ZodOptional<ZodNumber>;
2315
+ eta: ZodOptional<ZodNullable<ZodNumber>>;
2316
+ }, $strip>, ZodObject<{
2317
+ id: ZodString;
2318
+ orgId: ZodString;
2319
+ type: ZodString;
2320
+ inputs: ZodRecord<ZodString, ZodUnknown>;
2321
+ params: ZodRecord<ZodString, ZodUnknown>;
2322
+ cost: ZodNullable<ZodObject<{
2323
+ amount: ZodNumber;
2324
+ currency: ZodLiteral<"USD">;
2325
+ formatted: ZodString;
2326
+ }, $strip>>;
2327
+ outputCategory: ZodEnum<{
2328
+ video: "video";
2329
+ image: "image";
2330
+ audio: "audio";
2331
+ captions: "captions";
2332
+ json: "json";
2333
+ raw: "raw";
2334
+ }>;
2134
2335
  steps: ZodArray<ZodObject<{
2135
2336
  id: ZodString;
2136
2337
  name: ZodString;
@@ -2141,11 +2342,174 @@ declare const jobResponseSchema: ZodObject<{
2141
2342
  meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2142
2343
  error: ZodOptional<ZodString>;
2143
2344
  }, $strip>>;
2144
- outputCategory: ZodString;
2145
- mediaType: ZodNullable<ZodString>;
2146
2345
  logsAvailable: ZodBoolean;
2346
+ createdAt: ZodNumber;
2347
+ dispatchedAt: ZodNullable<ZodNumber>;
2348
+ startedAt: ZodNullable<ZodNumber>;
2349
+ completedAt: ZodNullable<ZodNumber>;
2147
2350
  settledAt: ZodNullable<ZodNumber>;
2148
- }, $strip>;
2351
+ status: ZodLiteral<"running">;
2352
+ progress: ZodNumber;
2353
+ eta: ZodNullable<ZodNumber>;
2354
+ }, $strip>, ZodObject<{
2355
+ id: ZodString;
2356
+ orgId: ZodString;
2357
+ type: ZodString;
2358
+ inputs: ZodRecord<ZodString, ZodUnknown>;
2359
+ params: ZodRecord<ZodString, ZodUnknown>;
2360
+ cost: ZodNullable<ZodObject<{
2361
+ amount: ZodNumber;
2362
+ currency: ZodLiteral<"USD">;
2363
+ formatted: ZodString;
2364
+ }, $strip>>;
2365
+ outputCategory: ZodEnum<{
2366
+ video: "video";
2367
+ image: "image";
2368
+ audio: "audio";
2369
+ captions: "captions";
2370
+ json: "json";
2371
+ raw: "raw";
2372
+ }>;
2373
+ steps: ZodArray<ZodObject<{
2374
+ id: ZodString;
2375
+ name: ZodString;
2376
+ status: ZodString;
2377
+ startedAt: ZodOptional<ZodNumber>;
2378
+ completedAt: ZodOptional<ZodNumber>;
2379
+ durationMs: ZodOptional<ZodNumber>;
2380
+ meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2381
+ error: ZodOptional<ZodString>;
2382
+ }, $strip>>;
2383
+ logsAvailable: ZodBoolean;
2384
+ createdAt: ZodNumber;
2385
+ dispatchedAt: ZodNullable<ZodNumber>;
2386
+ startedAt: ZodNullable<ZodNumber>;
2387
+ completedAt: ZodNullable<ZodNumber>;
2388
+ settledAt: ZodNullable<ZodNumber>;
2389
+ status: ZodLiteral<"complete">;
2390
+ output: ZodObject<{
2391
+ data: ZodUnknown;
2392
+ file: ZodNullable<ZodObject<{
2393
+ url: ZodString;
2394
+ path: ZodString;
2395
+ type: ZodEnum<{
2396
+ video: "video";
2397
+ image: "image";
2398
+ audio: "audio";
2399
+ captions: "captions";
2400
+ playlist: "playlist";
2401
+ data: "data";
2402
+ other: "other";
2403
+ }>;
2404
+ size: ZodNumber;
2405
+ meta: ZodOptional<ZodObject<{
2406
+ format: ZodOptional<ZodString>;
2407
+ width: ZodOptional<ZodNumber>;
2408
+ height: ZodOptional<ZodNumber>;
2409
+ durationMs: ZodOptional<ZodNumber>;
2410
+ }, $strip>>;
2411
+ }, $strip>>;
2412
+ files: ZodArray<ZodObject<{
2413
+ url: ZodString;
2414
+ path: ZodString;
2415
+ type: ZodEnum<{
2416
+ video: "video";
2417
+ image: "image";
2418
+ audio: "audio";
2419
+ captions: "captions";
2420
+ playlist: "playlist";
2421
+ data: "data";
2422
+ other: "other";
2423
+ }>;
2424
+ size: ZodNumber;
2425
+ meta: ZodOptional<ZodObject<{
2426
+ format: ZodOptional<ZodString>;
2427
+ width: ZodOptional<ZodNumber>;
2428
+ height: ZodOptional<ZodNumber>;
2429
+ durationMs: ZodOptional<ZodNumber>;
2430
+ }, $strip>>;
2431
+ }, $strip>>;
2432
+ expiresAt: ZodNullable<ZodNumber>;
2433
+ }, $strip>;
2434
+ }, $strip>, ZodObject<{
2435
+ id: ZodString;
2436
+ orgId: ZodString;
2437
+ type: ZodString;
2438
+ inputs: ZodRecord<ZodString, ZodUnknown>;
2439
+ params: ZodRecord<ZodString, ZodUnknown>;
2440
+ cost: ZodNullable<ZodObject<{
2441
+ amount: ZodNumber;
2442
+ currency: ZodLiteral<"USD">;
2443
+ formatted: ZodString;
2444
+ }, $strip>>;
2445
+ outputCategory: ZodEnum<{
2446
+ video: "video";
2447
+ image: "image";
2448
+ audio: "audio";
2449
+ captions: "captions";
2450
+ json: "json";
2451
+ raw: "raw";
2452
+ }>;
2453
+ steps: ZodArray<ZodObject<{
2454
+ id: ZodString;
2455
+ name: ZodString;
2456
+ status: ZodString;
2457
+ startedAt: ZodOptional<ZodNumber>;
2458
+ completedAt: ZodOptional<ZodNumber>;
2459
+ durationMs: ZodOptional<ZodNumber>;
2460
+ meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2461
+ error: ZodOptional<ZodString>;
2462
+ }, $strip>>;
2463
+ logsAvailable: ZodBoolean;
2464
+ createdAt: ZodNumber;
2465
+ dispatchedAt: ZodNullable<ZodNumber>;
2466
+ startedAt: ZodNullable<ZodNumber>;
2467
+ completedAt: ZodNullable<ZodNumber>;
2468
+ settledAt: ZodNullable<ZodNumber>;
2469
+ status: ZodLiteral<"failed">;
2470
+ error: ZodObject<{
2471
+ code: ZodString;
2472
+ message: ZodString;
2473
+ detail: ZodNullable<ZodString>;
2474
+ retryable: ZodBoolean;
2475
+ }, $strip>;
2476
+ }, $strip>, ZodObject<{
2477
+ id: ZodString;
2478
+ orgId: ZodString;
2479
+ type: ZodString;
2480
+ inputs: ZodRecord<ZodString, ZodUnknown>;
2481
+ params: ZodRecord<ZodString, ZodUnknown>;
2482
+ cost: ZodNullable<ZodObject<{
2483
+ amount: ZodNumber;
2484
+ currency: ZodLiteral<"USD">;
2485
+ formatted: ZodString;
2486
+ }, $strip>>;
2487
+ outputCategory: ZodEnum<{
2488
+ video: "video";
2489
+ image: "image";
2490
+ audio: "audio";
2491
+ captions: "captions";
2492
+ json: "json";
2493
+ raw: "raw";
2494
+ }>;
2495
+ steps: ZodArray<ZodObject<{
2496
+ id: ZodString;
2497
+ name: ZodString;
2498
+ status: ZodString;
2499
+ startedAt: ZodOptional<ZodNumber>;
2500
+ completedAt: ZodOptional<ZodNumber>;
2501
+ durationMs: ZodOptional<ZodNumber>;
2502
+ meta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2503
+ error: ZodOptional<ZodString>;
2504
+ }, $strip>>;
2505
+ logsAvailable: ZodBoolean;
2506
+ createdAt: ZodNumber;
2507
+ dispatchedAt: ZodNullable<ZodNumber>;
2508
+ startedAt: ZodNullable<ZodNumber>;
2509
+ completedAt: ZodNullable<ZodNumber>;
2510
+ settledAt: ZodNullable<ZodNumber>;
2511
+ status: ZodLiteral<"cancelled">;
2512
+ }, $strip>], "status">;
2149
2513
  declare const jobCreatedResponseSchema: ZodObject<{
2150
2514
  id: ZodString;
2151
2515
  status: ZodLiteral<"waiting">;
@@ -2211,6 +2575,7 @@ declare const transactionSchema: ZodObject<{
2211
2575
  paidAmount: ZodNumber;
2212
2576
  bonusAmount: ZodNumber;
2213
2577
  jobId: ZodNullable<ZodString>;
2578
+ jobType: ZodNullable<ZodString>;
2214
2579
  balanceAfter: ZodNumber;
2215
2580
  createdAt: ZodNumber;
2216
2581
  }, $strip>;
@@ -2295,8 +2660,135 @@ declare const paymentMethodSchema: ZodObject<{
2295
2660
  wallet: ZodOptional<ZodNullable<ZodString>>;
2296
2661
  isDefault: ZodBoolean;
2297
2662
  }, $strip>;
2663
+ declare const assetSchema: ZodObject<{
2664
+ id: ZodString;
2665
+ url: ZodString;
2666
+ orgId: ZodString;
2667
+ createdBy: ZodNullable<ZodString>;
2668
+ lifecycle: ZodString;
2669
+ status: ZodString;
2670
+ source: ZodString;
2671
+ kind: ZodString;
2672
+ scope: ZodString;
2673
+ region: ZodString;
2674
+ etag: ZodNullable<ZodString>;
2675
+ checksum: ZodNullable<ZodString>;
2676
+ declaredSize: ZodNullable<ZodNumber>;
2677
+ sizeBytes: ZodNullable<ZodNumber>;
2678
+ contentType: ZodNullable<ZodString>;
2679
+ mediaType: ZodNullable<ZodString>;
2680
+ filename: ZodNullable<ZodString>;
2681
+ expiresAt: ZodNullable<ZodNumber>;
2682
+ metadata: ZodNullable<ZodString>;
2683
+ createdAt: ZodNumber;
2684
+ updatedAt: ZodNumber;
2685
+ }, $strip>;
2686
+ declare const assetInitResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2687
+ status: ZodLiteral<"presigned">;
2688
+ data: ZodObject<{
2689
+ id: ZodString;
2690
+ url: ZodString;
2691
+ orgId: ZodString;
2692
+ createdBy: ZodNullable<ZodString>;
2693
+ lifecycle: ZodString;
2694
+ status: ZodString;
2695
+ source: ZodString;
2696
+ kind: ZodString;
2697
+ scope: ZodString;
2698
+ region: ZodString;
2699
+ etag: ZodNullable<ZodString>;
2700
+ checksum: ZodNullable<ZodString>;
2701
+ declaredSize: ZodNullable<ZodNumber>;
2702
+ sizeBytes: ZodNullable<ZodNumber>;
2703
+ contentType: ZodNullable<ZodString>;
2704
+ mediaType: ZodNullable<ZodString>;
2705
+ filename: ZodNullable<ZodString>;
2706
+ expiresAt: ZodNullable<ZodNumber>;
2707
+ metadata: ZodNullable<ZodString>;
2708
+ createdAt: ZodNumber;
2709
+ updatedAt: ZodNumber;
2710
+ }, $strip>;
2711
+ upload: ZodObject<{
2712
+ method: ZodLiteral<"PUT">;
2713
+ url: ZodString;
2714
+ expiresAt: ZodNumber;
2715
+ }, $strip>;
2716
+ }, $strip>, ZodObject<{
2717
+ status: ZodLiteral<"multipart">;
2718
+ data: ZodObject<{
2719
+ id: ZodString;
2720
+ url: ZodString;
2721
+ orgId: ZodString;
2722
+ createdBy: ZodNullable<ZodString>;
2723
+ lifecycle: ZodString;
2724
+ status: ZodString;
2725
+ source: ZodString;
2726
+ kind: ZodString;
2727
+ scope: ZodString;
2728
+ region: ZodString;
2729
+ etag: ZodNullable<ZodString>;
2730
+ checksum: ZodNullable<ZodString>;
2731
+ declaredSize: ZodNullable<ZodNumber>;
2732
+ sizeBytes: ZodNullable<ZodNumber>;
2733
+ contentType: ZodNullable<ZodString>;
2734
+ mediaType: ZodNullable<ZodString>;
2735
+ filename: ZodNullable<ZodString>;
2736
+ expiresAt: ZodNullable<ZodNumber>;
2737
+ metadata: ZodNullable<ZodString>;
2738
+ createdAt: ZodNumber;
2739
+ updatedAt: ZodNumber;
2740
+ }, $strip>;
2741
+ upload: ZodObject<{
2742
+ uploadId: ZodString;
2743
+ partSize: ZodNumber;
2744
+ parts: ZodArray<ZodObject<{
2745
+ partNumber: ZodNumber;
2746
+ url: ZodString;
2747
+ }, $strip>>;
2748
+ expiresAt: ZodNumber;
2749
+ }, $strip>;
2750
+ }, $strip>, ZodObject<{
2751
+ status: ZodLiteral<"deduplicated">;
2752
+ data: ZodObject<{
2753
+ id: ZodString;
2754
+ url: ZodString;
2755
+ orgId: ZodString;
2756
+ createdBy: ZodNullable<ZodString>;
2757
+ lifecycle: ZodString;
2758
+ status: ZodString;
2759
+ source: ZodString;
2760
+ kind: ZodString;
2761
+ scope: ZodString;
2762
+ region: ZodString;
2763
+ etag: ZodNullable<ZodString>;
2764
+ checksum: ZodNullable<ZodString>;
2765
+ declaredSize: ZodNullable<ZodNumber>;
2766
+ sizeBytes: ZodNullable<ZodNumber>;
2767
+ contentType: ZodNullable<ZodString>;
2768
+ mediaType: ZodNullable<ZodString>;
2769
+ filename: ZodNullable<ZodString>;
2770
+ expiresAt: ZodNullable<ZodNumber>;
2771
+ metadata: ZodNullable<ZodString>;
2772
+ createdAt: ZodNumber;
2773
+ updatedAt: ZodNumber;
2774
+ }, $strip>;
2775
+ }, $strip>], "status">;
2776
+ declare const assetDownloadResponseSchema: ZodObject<{
2777
+ url: ZodString;
2778
+ expiresAt: ZodNumber;
2779
+ }, $strip>;
2780
+ declare const assetListMetaSchema: ZodObject<{
2781
+ total: ZodNumber;
2782
+ limit: ZodNumber;
2783
+ offset: ZodNumber;
2784
+ }, $strip>;
2298
2785
  type JobResponse = output<typeof jobResponseSchema>;
2299
2786
  type JobStep = output<typeof jobStepSchema>;
2787
+ type Output = output<typeof jobOutputSchema>;
2788
+ type OutputFile = output<typeof fileSchema>;
2789
+ type FileType = output<typeof fileTypeSchema>;
2790
+ type JobError = output<typeof jobErrorSchema>;
2791
+ type Cost = output<typeof jobCostSchema>;
2300
2792
  type JobCreatedResponse = output<typeof jobCreatedResponseSchema>;
2301
2793
  type JobType = output<typeof jobTypeSchema>;
2302
2794
  type BillingState = output<typeof billingStateSchema>;
@@ -2309,6 +2801,10 @@ type ApiKey = output<typeof apiKeySchema>;
2309
2801
  type PaginationMeta = output<typeof paginationMetaSchema>;
2310
2802
  type BillingInvoice = output<typeof billingInvoiceSchema>;
2311
2803
  type PaymentMethod = output<typeof paymentMethodSchema>;
2804
+ type AssetResponse = output<typeof assetSchema>;
2805
+ type AssetInitResponse = output<typeof assetInitResponseSchema>;
2806
+ type AssetDownloadResponse = output<typeof assetDownloadResponseSchema>;
2807
+ type AssetListMeta = output<typeof assetListMetaSchema>;
2312
2808
  //#endregion
2313
2809
  //#region ../shared/src/events/org-events.d.ts
2314
2810
  declare const orgEventSchema: ZodDiscriminatedUnion<[ZodObject<{
@@ -2326,7 +2822,6 @@ declare const orgEventSchema: ZodDiscriminatedUnion<[ZodObject<{
2326
2822
  }, $strip>, ZodObject<{
2327
2823
  type: ZodLiteral<"job.result">;
2328
2824
  jobId: ZodString;
2329
- outputMeta: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
2330
2825
  }, $strip>, ZodObject<{
2331
2826
  type: ZodLiteral<"balance.updated">;
2332
2827
  balance: ZodNumber;
@@ -2423,6 +2918,33 @@ interface LogEntryData {
2423
2918
  }
2424
2919
  //#endregion
2425
2920
  //#region src/types.d.ts
2921
+ /**
2922
+ * Primary playable/download URL for a completed job, or `undefined`.
2923
+ *
2924
+ * Returns `output.file.url` — the single download for a file job or the playlist
2925
+ * URL for a stream. A pure set (multiple files, no headline) or a data-only job
2926
+ * has no single primary URL: inspect `job.output.files` / `job.output.data`.
2927
+ */
2928
+ declare function outputUrl(job: JobResponse): string | undefined;
2929
+ /**
2930
+ * Typed accessor for a completed job's structured `data`, or `null`.
2931
+ *
2932
+ * `output.data` is job-type-specific (probe result, detections, transcript) and
2933
+ * is `unknown` at the contract level — its shape is documented per job type, not
2934
+ * by the API schema. This helper applies the caller-supplied type `T` so you can
2935
+ * read `data` without sprinkling assertions at each call site. `T` is your claim
2936
+ * about the shape for the job type you submitted; validate it yourself (e.g. with
2937
+ * Zod) if the input is untrusted.
2938
+ *
2939
+ * Returns `null` for non-complete jobs and for jobs with no structured data
2940
+ * (pure file transforms).
2941
+ *
2942
+ * @example
2943
+ * type Metadata = { format: string; durationMs: number };
2944
+ * const meta = jobData<Metadata>(await client.jobs.wait(id));
2945
+ * if (meta) console.log(meta.durationMs);
2946
+ */
2947
+ declare function jobData<T>(job: JobResponse): T | null;
2426
2948
  /**
2427
2949
  * Per-job execution timing breakdown. Returned by `client.jobs.getTimings(id)`.
2428
2950
  *
@@ -2547,10 +3069,7 @@ declare function createClient(config?: ClientConfig): {
2547
3069
  }>;
2548
3070
  };
2549
3071
  uploads: {
2550
- upload(file: BodyInit, options?: {
2551
- filename?: string;
2552
- signal?: AbortSignal;
2553
- }): Promise<UploadResult>;
3072
+ create(file: Blob | BufferSource, options: CreateUploadOptions): Promise<AssetResponse>;
2554
3073
  };
2555
3074
  webhooks: {
2556
3075
  create(params: CreateWebhookParams, options?: {
@@ -2658,12 +3177,26 @@ declare function createClient(config?: ClientConfig): {
2658
3177
  }>;
2659
3178
  };
2660
3179
  assets: {
3180
+ list(params?: ListAssetsParams, options?: {
3181
+ signal?: AbortSignal;
3182
+ }): Promise<AssetListPage>;
3183
+ get(id: string, options?: {
3184
+ signal?: AbortSignal;
3185
+ }): Promise<AssetResponse>;
3186
+ delete(id: string, options?: {
3187
+ signal?: AbortSignal;
3188
+ }): Promise<{
3189
+ deleted: boolean;
3190
+ }>;
3191
+ download(id: string, options?: {
3192
+ signal?: AbortSignal;
3193
+ }): Promise<AssetDownloadResponse>;
2661
3194
  templates(params?: {
2662
3195
  category?: string;
2663
3196
  limit?: number;
2664
3197
  }, options?: {
2665
3198
  signal?: AbortSignal;
2666
- }): Promise<Asset[]>;
3199
+ }): Promise<AssetListPage>;
2667
3200
  };
2668
3201
  team: {
2669
3202
  invite(params: {
@@ -2865,26 +3398,32 @@ type BatchResult = {
2865
3398
  };
2866
3399
  //#endregion
2867
3400
  //#region src/resources/uploads.d.ts
2868
- type UploadResult = {
2869
- downloadUrl: string;
3401
+ type UploadProgress = {
3402
+ loaded: number;
3403
+ total: number;
3404
+ };
3405
+ type CreateUploadOptions = {
3406
+ /** Display filename, sent to the API and used in Content-Disposition. */filename: string; /** Byte size. Auto-derived from the Blob when omitted. */
3407
+ size?: number; /** MIME type hint. */
3408
+ contentType?: string; /** Client-declared sha256, enables server-side dedup. */
3409
+ checksum?: string; /** true → 'persisted' lifecycle; default is ephemeral (24h TTL). */
3410
+ persist?: boolean; /** Parallel multipart part uploads. Default: 5. */
3411
+ concurrency?: number; /** Called as bytes finish uploading. */
3412
+ onProgress?: (p: UploadProgress) => void;
3413
+ signal?: AbortSignal;
2870
3414
  };
2871
3415
  //#endregion
2872
3416
  //#region src/resources/assets.d.ts
2873
- type Asset = {
2874
- id: string;
2875
- orgId: string;
2876
- type: string;
2877
- name: string;
2878
- filename: string;
2879
- r2Key: string;
2880
- fileSize: number;
2881
- metadata: string | null;
2882
- scope: string;
2883
- status: string;
2884
- category: string | null;
2885
- thumbnailKey: string | null;
2886
- createdAt: number;
2887
- updatedAt: number;
3417
+ type ListAssetsParams = {
3418
+ lifecycle?: "ephemeral" | "persisted";
3419
+ status?: "pending" | "uploading" | "ready" | "failed" | "expired";
3420
+ kind?: string;
3421
+ limit?: number;
3422
+ offset?: number;
3423
+ };
3424
+ type AssetListPage = {
3425
+ data: AssetResponse[];
3426
+ meta: AssetListMeta;
2888
3427
  };
2889
3428
  //#endregion
2890
- export { ApiError, type ApiKey, type Asset, type BatchResult, type BillingInvoice, type BillingState, type ClientConfig, type CreateJobParams, type CreateWebhookParams, type FfmpegParams, type JobResponse as Job, type JobCreatedResponse, type JobListPage, type JobStep, type JobSubscribeOptions, type JobSubscription, type JobTimings, type JobType, type ListDeliveriesParams, type ListJobsParams, type LogEntryData, type OrgCurrentResponse, type OrgEvent, type Organization, type PaginationMeta, type PaymentMethod, type RealtimeConnectOptions, type RealtimeConnection, type RendobarClient, type Transaction, type TransactionListParams, type UpdateWebhookParams, type UploadResult, type UsageParams, type UsageSummary, type WaitOptions, type WebhookDelivery, type WebhookEndpoint, createClient, isApiError };
3429
+ export { ApiError, type ApiKey, type AssetResponse as Asset, type AssetDownloadResponse, type AssetInitResponse, type AssetListMeta, type AssetListPage, type BatchResult, type BillingInvoice, type BillingState, type ClientConfig, type Cost, type CreateJobParams, type CreateUploadOptions, type CreateWebhookParams, type FfmpegParams, type FileType, type JobResponse as Job, type JobCreatedResponse, type JobError, type JobListPage, type JobStep, type JobSubscribeOptions, type JobSubscription, type JobTimings, type JobType, type ListAssetsParams, type ListDeliveriesParams, type ListJobsParams, type LogEntryData, type OrgCurrentResponse, type OrgEvent, type Organization, type Output, type OutputFile, type PaginationMeta, type PaymentMethod, type RealtimeConnectOptions, type RealtimeConnection, type RendobarClient, type Transaction, type TransactionListParams, type UpdateWebhookParams, type UploadProgress, type UsageParams, type UsageSummary, type WaitOptions, type WebhookDelivery, type WebhookEndpoint, createClient, isApiError, jobData, outputUrl };