@rendobar/sdk 2.2.0 → 3.0.1

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> {
@@ -2540,6 +2575,7 @@ declare const transactionSchema: ZodObject<{
2540
2575
  paidAmount: ZodNumber;
2541
2576
  bonusAmount: ZodNumber;
2542
2577
  jobId: ZodNullable<ZodString>;
2578
+ jobType: ZodNullable<ZodString>;
2543
2579
  balanceAfter: ZodNumber;
2544
2580
  createdAt: ZodNumber;
2545
2581
  }, $strip>;
@@ -2624,6 +2660,128 @@ declare const paymentMethodSchema: ZodObject<{
2624
2660
  wallet: ZodOptional<ZodNullable<ZodString>>;
2625
2661
  isDefault: ZodBoolean;
2626
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>;
2627
2785
  type JobResponse = output<typeof jobResponseSchema>;
2628
2786
  type JobStep = output<typeof jobStepSchema>;
2629
2787
  type Output = output<typeof jobOutputSchema>;
@@ -2643,6 +2801,10 @@ type ApiKey = output<typeof apiKeySchema>;
2643
2801
  type PaginationMeta = output<typeof paginationMetaSchema>;
2644
2802
  type BillingInvoice = output<typeof billingInvoiceSchema>;
2645
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>;
2646
2808
  //#endregion
2647
2809
  //#region ../shared/src/events/org-events.d.ts
2648
2810
  declare const orgEventSchema: ZodDiscriminatedUnion<[ZodObject<{
@@ -2907,10 +3069,7 @@ declare function createClient(config?: ClientConfig): {
2907
3069
  }>;
2908
3070
  };
2909
3071
  uploads: {
2910
- upload(file: BodyInit, options?: {
2911
- filename?: string;
2912
- signal?: AbortSignal;
2913
- }): Promise<UploadResult>;
3072
+ create(file: Blob | BufferSource, options: CreateUploadOptions): Promise<AssetResponse>;
2914
3073
  };
2915
3074
  webhooks: {
2916
3075
  create(params: CreateWebhookParams, options?: {
@@ -3018,12 +3177,26 @@ declare function createClient(config?: ClientConfig): {
3018
3177
  }>;
3019
3178
  };
3020
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>;
3021
3194
  templates(params?: {
3022
3195
  category?: string;
3023
3196
  limit?: number;
3024
3197
  }, options?: {
3025
3198
  signal?: AbortSignal;
3026
- }): Promise<Asset[]>;
3199
+ }): Promise<AssetListPage>;
3027
3200
  };
3028
3201
  team: {
3029
3202
  invite(params: {
@@ -3225,26 +3398,32 @@ type BatchResult = {
3225
3398
  };
3226
3399
  //#endregion
3227
3400
  //#region src/resources/uploads.d.ts
3228
- type UploadResult = {
3229
- 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;
3230
3414
  };
3231
3415
  //#endregion
3232
3416
  //#region src/resources/assets.d.ts
3233
- type Asset = {
3234
- id: string;
3235
- orgId: string;
3236
- type: string;
3237
- name: string;
3238
- filename: string;
3239
- r2Key: string;
3240
- fileSize: number;
3241
- metadata: string | null;
3242
- scope: string;
3243
- status: string;
3244
- category: string | null;
3245
- thumbnailKey: string | null;
3246
- createdAt: number;
3247
- 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;
3248
3427
  };
3249
3428
  //#endregion
3250
- export { ApiError, type ApiKey, type Asset, type BatchResult, type BillingInvoice, type BillingState, type ClientConfig, type Cost, type CreateJobParams, 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 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 UploadResult, type UsageParams, type UsageSummary, type WaitOptions, type WebhookDelivery, type WebhookEndpoint, createClient, isApiError, jobData, outputUrl };
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 };