@rendobar/sdk 4.1.0 → 5.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
@@ -190,7 +190,7 @@ declare const $output: unique symbol;
190
190
  type $output = typeof $output;
191
191
  declare const $input: unique symbol;
192
192
  type $input = typeof $input;
193
- type $replace<Meta, S extends $ZodType> = Meta extends $output ? output<S> : Meta extends $input ? input<S> : Meta extends (infer M)[] ? $replace<M, S>[] : Meta extends ((...args: infer P) => infer R) ? (...args: { [K in keyof P]: $replace<P[K], S> }) => $replace<R, S> : Meta extends object ? { [K in keyof Meta]: $replace<Meta[K], S> } : Meta;
193
+ type $replace<Meta, S extends $ZodType> = Meta extends $output ? output<S> : Meta extends $input ? input<S> : Meta extends (infer M)[] ? $replace<M, S>[] : Meta extends ((...args: infer P) => infer R) ? (...args: { [K in keyof P]: $replace<P[K], S>; }) => $replace<R, S> : Meta extends object ? { [K in keyof Meta]: $replace<Meta[K], S>; } : Meta;
194
194
  type MetadataType = object | undefined;
195
195
  declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
196
196
  _meta: Meta;
@@ -311,24 +311,24 @@ type NoUndefined<T> = T extends undefined ? never : T;
311
311
  type LoosePartial<T extends object> = InexactPartial<T> & {
312
312
  [k: string]: unknown;
313
313
  };
314
- type Mask<Keys extends PropertyKey> = { [K in Keys]?: true };
315
- type Writeable<T> = { -readonly [P in keyof T]: T[P] } & {};
316
- type InexactPartial<T> = { [P in keyof T]?: T[P] | undefined };
314
+ type Mask<Keys extends PropertyKey> = { [K in Keys]?: true; };
315
+ type Writeable<T> = { -readonly [P in keyof T]: T[P]; } & {};
316
+ type InexactPartial<T> = { [P in keyof T]?: T[P] | undefined; };
317
317
  type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
318
318
  readonly [Symbol.toStringTag]: string;
319
319
  } | Date | Error | Generator | Promise<unknown> | RegExp;
320
320
  type MakeReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T extends Set<infer V> ? ReadonlySet<V> : T extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T extends Array<infer V> ? ReadonlyArray<V> : T extends BuiltIn ? T : Readonly<T>;
321
321
  type SomeObject = Record<PropertyKey, any>;
322
322
  type Identity<T> = T;
323
- type Flatten<T> = Identity<{ [k in keyof T]: T[k] }>;
324
- type Prettify<T> = { [K in keyof T]: T[K] } & {};
325
- type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : { [K in keyof A as K extends keyof B ? never : K]: A[K] } & { [K in keyof B]: B[K] }>;
323
+ type Flatten<T> = Identity<{ [k in keyof T]: T[k]; }>;
324
+ type Prettify<T> = { [K in keyof T]: T[K]; } & {};
325
+ type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : { [K in keyof A as K extends keyof B ? never : K]: A[K]; } & { [K in keyof B]: B[K]; }>;
326
326
  type TupleItems = ReadonlyArray<SomeType>;
327
327
  type AnyFunc = (...args: any[]) => any;
328
328
  type MaybeAsync<T> = T | Promise<T>;
329
329
  type EnumValue = string | number;
330
330
  type EnumLike = Readonly<Record<string, EnumValue>>;
331
- type ToEnum<T extends EnumValue> = Flatten<{ [k in T]: k }>;
331
+ type ToEnum<T extends EnumValue> = Flatten<{ [k in T]: k; }>;
332
332
  type Literal = string | number | bigint | boolean | null | undefined;
333
333
  type Primitive = string | number | symbol | bigint | boolean | null | undefined;
334
334
  type HasLength = {
@@ -828,8 +828,8 @@ type OptionalInSchema = {
828
828
  optin: "optional";
829
829
  };
830
830
  };
831
- type $InferObjectOutput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? IsAny<T[keyof T]> extends true ? Record<string, unknown> : Record<string, output<T[keyof T]>> : keyof (T & Extra) extends never ? Record<string, never> : Prettify<{ -readonly [k in keyof T as T[k] extends OptionalOutSchema ? never : k]: T[k]["_zod"]["output"] } & { -readonly [k in keyof T as T[k] extends OptionalOutSchema ? k : never]?: T[k]["_zod"]["output"] } & Extra>;
832
- type $InferObjectInput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? IsAny<T[keyof T]> extends true ? Record<string, unknown> : Record<string, input<T[keyof T]>> : keyof (T & Extra) extends never ? Record<string, never> : Prettify<{ -readonly [k in keyof T as T[k] extends OptionalInSchema ? never : k]: T[k]["_zod"]["input"] } & { -readonly [k in keyof T as T[k] extends OptionalInSchema ? k : never]?: T[k]["_zod"]["input"] } & Extra>;
831
+ type $InferObjectOutput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? IsAny<T[keyof T]> extends true ? Record<string, unknown> : Record<string, output<T[keyof T]>> : keyof (T & Extra) extends never ? Record<string, never> : Prettify<{ -readonly [k in keyof T as T[k] extends OptionalOutSchema ? never : k]: T[k]["_zod"]["output"]; } & { -readonly [k in keyof T as T[k] extends OptionalOutSchema ? k : never]?: T[k]["_zod"]["output"]; } & Extra>;
832
+ type $InferObjectInput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? IsAny<T[keyof T]> extends true ? Record<string, unknown> : Record<string, input<T[keyof T]>> : keyof (T & Extra) extends never ? Record<string, never> : Prettify<{ -readonly [k in keyof T as T[k] extends OptionalInSchema ? never : k]: T[k]["_zod"]["input"]; } & { -readonly [k in keyof T as T[k] extends OptionalInSchema ? k : never]?: T[k]["_zod"]["input"]; } & Extra>;
833
833
  type $ZodObjectConfig = {
834
834
  out: Record<string, unknown>;
835
835
  in: Record<string, unknown>;
@@ -862,7 +862,9 @@ interface $ZodObjectDef<Shape extends $ZodShape = $ZodShape> extends $ZodTypeDef
862
862
  shape: Shape;
863
863
  catchall?: $ZodType | undefined;
864
864
  }
865
- interface $ZodObjectInternals< /** @ts-ignore Cast variance */out Shape extends $ZodShape = $ZodShape, out Config extends $ZodObjectConfig = $ZodObjectConfig> extends _$ZodTypeInternals {
865
+ interface $ZodObjectInternals<
866
+ /** @ts-ignore Cast variance */
867
+ out Shape extends $ZodShape = $ZodShape, out Config extends $ZodObjectConfig = $ZodObjectConfig> extends _$ZodTypeInternals {
866
868
  def: $ZodObjectDef<Shape>;
867
869
  config: Config;
868
870
  isst: $ZodIssueInvalidType | $ZodIssueUnrecognizedKeys;
@@ -873,7 +875,9 @@ interface $ZodObjectInternals< /** @ts-ignore Cast variance */out Shape extends
873
875
  optout?: "optional" | undefined;
874
876
  }
875
877
  type $ZodLooseShape = Record<string, any>;
876
- interface $ZodObject< /** @ts-ignore Cast variance */out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Params extends $ZodObjectConfig = $ZodObjectConfig> extends $ZodType<any, any, $ZodObjectInternals<Shape, Params>> {}
878
+ interface $ZodObject<
879
+ /** @ts-ignore Cast variance */
880
+ out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Params extends $ZodObjectConfig = $ZodObjectConfig> extends $ZodType<any, any, $ZodObjectInternals<Shape, Params>> {}
877
881
  declare const $ZodObject: $constructor<$ZodObject>;
878
882
  type $InferUnionOutput<T extends SomeType> = T extends any ? output<T> : never;
879
883
  type $InferUnionInput<T extends SomeType> = T extends any ? input<T> : never;
@@ -933,10 +937,10 @@ interface $ZodTupleDef<T extends TupleItems = readonly $ZodType[], Rest extends
933
937
  rest: Rest;
934
938
  }
935
939
  type $InferTupleInputType<T extends TupleItems, Rest extends SomeType | null> = [...TupleInputTypeWithOptionals<T>, ...(Rest extends SomeType ? input<Rest>[] : [])];
936
- type TupleInputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: input<T[k]> };
940
+ type TupleInputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: input<T[k]>; };
937
941
  type TupleInputTypeWithOptionals<T extends TupleItems> = T extends readonly [...infer Prefix extends SomeType[], infer Tail extends SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...TupleInputTypeWithOptionals<Prefix>, input<Tail>?] : TupleInputTypeNoOptionals<T> : [];
938
942
  type $InferTupleOutputType<T extends TupleItems, Rest extends SomeType | null> = [...TupleOutputTypeWithOptionals<T>, ...(Rest extends SomeType ? output<Rest>[] : [])];
939
- type TupleOutputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: output<T[k]> };
943
+ type TupleOutputTypeNoOptionals<T extends TupleItems> = { [k in keyof T]: output<T[k]>; };
940
944
  type TupleOutputTypeWithOptionals<T extends TupleItems> = T extends readonly [...infer Prefix extends SomeType[], infer Tail extends SomeType] ? Tail["_zod"]["optout"] extends "optional" ? [...TupleOutputTypeWithOptionals<Prefix>, output<Tail>?] : TupleOutputTypeNoOptionals<T> : [];
941
945
  interface $ZodTupleInternals<T extends TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends _$ZodTypeInternals {
942
946
  def: $ZodTupleDef<T, Rest>;
@@ -1006,7 +1010,9 @@ interface $ZodEnumDef<T extends EnumLike = EnumLike> extends $ZodTypeDef {
1006
1010
  type: "enum";
1007
1011
  entries: T;
1008
1012
  }
1009
- interface $ZodEnumInternals< /** @ts-ignore Cast variance */out T extends EnumLike = EnumLike> extends $ZodTypeInternals<$InferEnumOutput<T>, $InferEnumInput<T>> {
1013
+ interface $ZodEnumInternals<
1014
+ /** @ts-ignore Cast variance */
1015
+ out T extends EnumLike = EnumLike> extends $ZodTypeInternals<$InferEnumOutput<T>, $InferEnumInput<T>> {
1010
1016
  def: $ZodEnumDef<T>;
1011
1017
  /** @deprecated Internal API, use with caution (not deprecated) */
1012
1018
  values: PrimitiveSet;
@@ -1032,9 +1038,6 @@ interface $ZodLiteral<T extends Literal = Literal> extends $ZodType {
1032
1038
  _zod: $ZodLiteralInternals<T>;
1033
1039
  }
1034
1040
  declare const $ZodLiteral: $constructor<$ZodLiteral>;
1035
- type _File = typeof globalThis extends {
1036
- File: infer F extends new (...args: any[]) => any;
1037
- } ? InstanceType<F> : {};
1038
1041
  /** Do not reference this directly. */
1039
1042
  interface File extends _File {
1040
1043
  readonly type: string;
@@ -1619,8 +1622,11 @@ interface $ZodIssueCustom extends $ZodIssueBase {
1619
1622
  type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;
1620
1623
  type $ZodInternalIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue$1<T> : never;
1621
1624
  type RawIssue$1<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
1622
- /** The input data */readonly input: unknown; /** The schema or check that originated this issue. */
1623
- readonly inst?: $ZodType | $ZodCheck; /** If `true`, Zod will continue executing checks/refinements after this issue. */
1625
+ /** The input data */
1626
+ readonly input: unknown;
1627
+ /** The schema or check that originated this issue. */
1628
+ readonly inst?: $ZodType | $ZodCheck;
1629
+ /** If `true`, Zod will continue executing checks/refinements after this issue. */
1624
1630
  readonly continue?: boolean | undefined;
1625
1631
  } & Record<string, unknown>> : never;
1626
1632
  type $ZodRawIssue<T extends $ZodIssueBase = $ZodIssue> = $ZodInternalIssue<T>;
@@ -1643,11 +1649,11 @@ declare const $ZodError: $constructor<$ZodError>;
1643
1649
  type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;
1644
1650
  type _FlattenedError<T, U = string> = {
1645
1651
  formErrors: U[];
1646
- fieldErrors: { [P in keyof T]?: U[] };
1652
+ fieldErrors: { [P in keyof T]?: U[]; };
1647
1653
  };
1648
- type _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? { [K in keyof T]?: $ZodFormattedError<T[K], U> } : T extends any[] ? {
1654
+ type _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? { [K in keyof T]?: $ZodFormattedError<T[K], U>; } : T extends any[] ? {
1649
1655
  [k: number]: $ZodFormattedError<T[number], U>;
1650
- } : T extends object ? Flatten<{ [K in keyof T]?: $ZodFormattedError<T[K], U> }> : any;
1656
+ } : T extends object ? Flatten<{ [K in keyof T]?: $ZodFormattedError<T[K], U>; }> : any;
1651
1657
  type $ZodFormattedError<T, U = string> = {
1652
1658
  _errors: U[];
1653
1659
  } & Flatten<_ZodFormattedError<T, U>>;
@@ -1668,7 +1674,7 @@ declare function $constructor<T extends ZodTrait, D = T["_zod"]["def"]>(name: st
1668
1674
  }): $constructor<T, D>;
1669
1675
  declare const $brand: unique symbol;
1670
1676
  type $brand<T extends string | number | symbol = string | number | symbol> = {
1671
- [$brand]: { [k in T]: true };
1677
+ [$brand]: { [k in T]: true; };
1672
1678
  };
1673
1679
  type $ZodBranded<T extends SomeType, Brand extends string | number | symbol, Dir extends "in" | "out" | "inout" = "out"> = T & (Dir extends "inout" ? {
1674
1680
  _zod: {
@@ -1697,14 +1703,15 @@ type output<T> = T extends {
1697
1703
  //#endregion
1698
1704
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.d.cts
1699
1705
  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] ? {} : {
1700
- error?: string | $ZodErrorMap<IssueTypes> | undefined; /** @deprecated This parameter is deprecated. Use `error` instead. */
1706
+ error?: string | $ZodErrorMap<IssueTypes> | undefined;
1707
+ /** @deprecated This parameter is deprecated. Use `error` instead. */
1701
1708
  message?: string | undefined;
1702
1709
  })>>>;
1703
1710
  type TypeParams<T extends $ZodType = $ZodType & {
1704
1711
  _isst: never;
1705
1712
  }, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never> = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
1706
- type CheckParams<T extends $ZodCheck = $ZodCheck, // & { _issc: never },
1707
- AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
1713
+ type CheckParams<T extends $ZodCheck = $ZodCheck // & { _issc: never },
1714
+ , AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
1708
1715
  type CheckStringFormatParams<T extends $ZodStringFormat = $ZodStringFormat, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "coerce" | "checks" | "error" | "check" | "format"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "type" | "coerce" | "checks" | "error" | "check" | "format" | AlsoOmit>;
1709
1716
  type CheckTypeParams<T extends $ZodType & $ZodCheck = $ZodType & $ZodCheck, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error" | "check"> = never> = Params<T, NonNullable<T["_zod"]["isst"] | T["_zod"]["issc"]>, "type" | "checks" | "error" | "check" | AlsoOmit>;
1710
1717
  type $ZodCheckEmailParams = CheckStringFormatParams<$ZodEmail, "when">;
@@ -1753,7 +1760,9 @@ type $ZodNonOptionalParams = TypeParams<$ZodNonOptional, "innerType">;
1753
1760
  type $ZodCustomParams = CheckTypeParams<$ZodCustom, "fn">;
1754
1761
  type $ZodSuperRefineIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;
1755
1762
  type RawIssue<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
1756
- /** The schema or check that originated this issue. */readonly inst?: $ZodType | $ZodCheck; /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */
1763
+ /** The schema or check that originated this issue. */
1764
+ readonly inst?: $ZodType | $ZodCheck;
1765
+ /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */
1757
1766
  readonly continue?: boolean | undefined;
1758
1767
  } & Record<string, unknown>> : never;
1759
1768
  interface $RefinementCtx<T = unknown> extends ParsePayload<T> {
@@ -2007,8 +2016,10 @@ interface ZodArray<T extends SomeType = $ZodType> extends _ZodType<$ZodArrayInte
2007
2016
  "~standard": ZodStandardSchemaWithJSON<this>;
2008
2017
  }
2009
2018
  declare const ZodArray: $constructor<ZodArray>;
2010
- type SafeExtendShape<Base extends $ZodShape, Ext extends $ZodLooseShape> = { [K in keyof Ext]: K extends keyof Base ? output<Ext[K]> extends output<Base[K]> ? input<Ext[K]> extends input<Base[K]> ? Ext[K] : never : never : Ext[K] };
2011
- interface ZodObject< /** @ts-ignore Cast variance */out Shape extends $ZodShape = $ZodLooseShape, out Config extends $ZodObjectConfig = $strip> extends _ZodType<$ZodObjectInternals<Shape, Config>>, $ZodObject<Shape, Config> {
2019
+ type SafeExtendShape<Base extends $ZodShape, Ext extends $ZodLooseShape> = { [K in keyof Ext]: K extends keyof Base ? output<Ext[K]> extends output<Base[K]> ? input<Ext[K]> extends input<Base[K]> ? Ext[K] : never : never : Ext[K]; };
2020
+ interface ZodObject<
2021
+ /** @ts-ignore Cast variance */
2022
+ out Shape extends $ZodShape = $ZodLooseShape, out Config extends $ZodObjectConfig = $strip> extends _ZodType<$ZodObjectInternals<Shape, Config>>, $ZodObject<Shape, Config> {
2012
2023
  "~standard": ZodStandardSchemaWithJSON<this>;
2013
2024
  shape: Shape;
2014
2025
  keyof(): ZodEnum<ToEnum<keyof Shape & string>>;
@@ -2030,10 +2041,10 @@ interface ZodObject< /** @ts-ignore Cast variance */out Shape extends $ZodShape
2030
2041
  merge<U extends ZodObject>(other: U): ZodObject<Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
2031
2042
  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>;
2032
2043
  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>;
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>;
2044
+ partial(): ZodObject<{ -readonly [k in keyof Shape]: ZodOptional<Shape[k]>; }, Config>;
2045
+ 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>;
2046
+ required(): ZodObject<{ -readonly [k in keyof Shape]: ZodNonOptional<Shape[k]>; }, Config>;
2047
+ 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>;
2037
2048
  }
2038
2049
  declare const ZodObject: $constructor<ZodObject>;
2039
2050
  interface ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends _ZodType<$ZodUnionInternals<T>>, $ZodUnion<T> {
@@ -2057,7 +2068,9 @@ interface ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends Som
2057
2068
  valueType: Value;
2058
2069
  }
2059
2070
  declare const ZodRecord: $constructor<ZodRecord>;
2060
- interface ZodEnum< /** @ts-ignore Cast variance */out T extends EnumLike = EnumLike> extends _ZodType<$ZodEnumInternals<T>>, $ZodEnum<T> {
2071
+ interface ZodEnum<
2072
+ /** @ts-ignore Cast variance */
2073
+ out T extends EnumLike = EnumLike> extends _ZodType<$ZodEnumInternals<T>>, $ZodEnum<T> {
2061
2074
  "~standard": ZodStandardSchemaWithJSON<this>;
2062
2075
  enum: T;
2063
2076
  options: Array<T[keyof T]>;
@@ -2233,6 +2246,11 @@ declare const jobErrorSchema: ZodObject<{
2233
2246
  message: ZodString;
2234
2247
  detail: ZodNullable<ZodString>;
2235
2248
  retryable: ZodBoolean;
2249
+ failedPhase: ZodOptional<ZodEnum<{
2250
+ preparing: "preparing";
2251
+ processing: "processing";
2252
+ finalizing: "finalizing";
2253
+ }>>;
2236
2254
  }, $strip>;
2237
2255
  declare const jobCostSchema: ZodObject<{
2238
2256
  amount: ZodNumber;
@@ -2274,7 +2292,8 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2274
2292
  error: ZodOptional<ZodString>;
2275
2293
  }, $strip>>;
2276
2294
  logsAvailable: ZodBoolean;
2277
- metricsAvailable: ZodBoolean;
2295
+ resourcesAvailable: ZodBoolean;
2296
+ metricsAvailable: ZodOptional<ZodBoolean>;
2278
2297
  region: ZodOptional<ZodNullable<ZodString>>;
2279
2298
  createdAt: ZodNumber;
2280
2299
  dispatchedAt: ZodNullable<ZodNumber>;
@@ -2318,7 +2337,8 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2318
2337
  error: ZodOptional<ZodString>;
2319
2338
  }, $strip>>;
2320
2339
  logsAvailable: ZodBoolean;
2321
- metricsAvailable: ZodBoolean;
2340
+ resourcesAvailable: ZodBoolean;
2341
+ metricsAvailable: ZodOptional<ZodBoolean>;
2322
2342
  region: ZodOptional<ZodNullable<ZodString>>;
2323
2343
  createdAt: ZodNumber;
2324
2344
  dispatchedAt: ZodNullable<ZodNumber>;
@@ -2327,7 +2347,7 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2327
2347
  settledAt: ZodNullable<ZodNumber>;
2328
2348
  retentionExpiresAt: ZodNullable<ZodNumber>;
2329
2349
  status: ZodLiteral<"dispatched">;
2330
- progress: ZodOptional<ZodNumber>;
2350
+ progress: ZodOptional<ZodNullable<ZodNumber>>;
2331
2351
  eta: ZodOptional<ZodNullable<ZodNumber>>;
2332
2352
  }, $strip>, ZodObject<{
2333
2353
  id: ZodString;
@@ -2364,7 +2384,8 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2364
2384
  error: ZodOptional<ZodString>;
2365
2385
  }, $strip>>;
2366
2386
  logsAvailable: ZodBoolean;
2367
- metricsAvailable: ZodBoolean;
2387
+ resourcesAvailable: ZodBoolean;
2388
+ metricsAvailable: ZodOptional<ZodBoolean>;
2368
2389
  region: ZodOptional<ZodNullable<ZodString>>;
2369
2390
  createdAt: ZodNumber;
2370
2391
  dispatchedAt: ZodNullable<ZodNumber>;
@@ -2373,7 +2394,7 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2373
2394
  settledAt: ZodNullable<ZodNumber>;
2374
2395
  retentionExpiresAt: ZodNullable<ZodNumber>;
2375
2396
  status: ZodLiteral<"running">;
2376
- progress: ZodNumber;
2397
+ progress: ZodNullable<ZodNumber>;
2377
2398
  eta: ZodNullable<ZodNumber>;
2378
2399
  }, $strip>, ZodObject<{
2379
2400
  id: ZodString;
@@ -2410,7 +2431,8 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2410
2431
  error: ZodOptional<ZodString>;
2411
2432
  }, $strip>>;
2412
2433
  logsAvailable: ZodBoolean;
2413
- metricsAvailable: ZodBoolean;
2434
+ resourcesAvailable: ZodBoolean;
2435
+ metricsAvailable: ZodOptional<ZodBoolean>;
2414
2436
  region: ZodOptional<ZodNullable<ZodString>>;
2415
2437
  createdAt: ZodNumber;
2416
2438
  dispatchedAt: ZodNullable<ZodNumber>;
@@ -2498,7 +2520,8 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2498
2520
  error: ZodOptional<ZodString>;
2499
2521
  }, $strip>>;
2500
2522
  logsAvailable: ZodBoolean;
2501
- metricsAvailable: ZodBoolean;
2523
+ resourcesAvailable: ZodBoolean;
2524
+ metricsAvailable: ZodOptional<ZodBoolean>;
2502
2525
  region: ZodOptional<ZodNullable<ZodString>>;
2503
2526
  createdAt: ZodNumber;
2504
2527
  dispatchedAt: ZodNullable<ZodNumber>;
@@ -2512,6 +2535,11 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2512
2535
  message: ZodString;
2513
2536
  detail: ZodNullable<ZodString>;
2514
2537
  retryable: ZodBoolean;
2538
+ failedPhase: ZodOptional<ZodEnum<{
2539
+ preparing: "preparing";
2540
+ processing: "processing";
2541
+ finalizing: "finalizing";
2542
+ }>>;
2515
2543
  }, $strip>;
2516
2544
  }, $strip>, ZodObject<{
2517
2545
  id: ZodString;
@@ -2548,7 +2576,8 @@ declare const jobResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
2548
2576
  error: ZodOptional<ZodString>;
2549
2577
  }, $strip>>;
2550
2578
  logsAvailable: ZodBoolean;
2551
- metricsAvailable: ZodBoolean;
2579
+ resourcesAvailable: ZodBoolean;
2580
+ metricsAvailable: ZodOptional<ZodBoolean>;
2552
2581
  region: ZodOptional<ZodNullable<ZodString>>;
2553
2582
  createdAt: ZodNumber;
2554
2583
  dispatchedAt: ZodNullable<ZodNumber>;
@@ -2951,14 +2980,35 @@ declare const orgEventSchema: ZodDiscriminatedUnion<[ZodObject<{
2951
2980
  type: ZodLiteral<"job.progress">;
2952
2981
  jobId: ZodString;
2953
2982
  timestamp: ZodNumber;
2954
- progress: ZodNumber;
2983
+ progress: ZodNullable<ZodNumber>;
2984
+ phase: ZodOptional<ZodEnum<{
2985
+ preparing: "preparing";
2986
+ processing: "processing";
2987
+ finalizing: "finalizing";
2988
+ }>>;
2955
2989
  step: ZodString;
2956
2990
  stepProgress: ZodOptional<ZodNumber>;
2957
2991
  eta: ZodOptional<ZodNumber>;
2958
2992
  metrics: ZodOptional<ZodRecord<ZodString, ZodUnion<readonly [ZodNumber, ZodString]>>>;
2959
2993
  }, $strip>, ZodObject<{
2960
- type: ZodLiteral<"job.metrics">;
2994
+ timestamp: ZodNumber;
2995
+ cpuPct: ZodNumber;
2996
+ cpuCores: ZodNumber;
2997
+ allocatedCores: ZodOptional<ZodNumber>;
2998
+ memUsedMB: ZodNumber;
2999
+ memLimitMB: ZodNumber;
3000
+ diskRMBps: ZodOptional<ZodNumber>;
3001
+ diskWMBps: ZodOptional<ZodNumber>;
3002
+ netRxMBps: ZodOptional<ZodNumber>;
3003
+ netTxMBps: ZodOptional<ZodNumber>;
3004
+ gpuPct: ZodOptional<ZodNumber>;
3005
+ gpuMemUsedMB: ZodOptional<ZodNumber>;
3006
+ gpuMemTotalMB: ZodOptional<ZodNumber>;
3007
+ gpuTempC: ZodOptional<ZodNumber>;
3008
+ gpuPowerW: ZodOptional<ZodNumber>;
3009
+ type: ZodLiteral<"job.resources">;
2961
3010
  jobId: ZodString;
3011
+ }, $strip>, ZodObject<{
2962
3012
  timestamp: ZodNumber;
2963
3013
  cpuPct: ZodNumber;
2964
3014
  cpuCores: ZodNumber;
@@ -2969,6 +3019,13 @@ declare const orgEventSchema: ZodDiscriminatedUnion<[ZodObject<{
2969
3019
  diskWMBps: ZodOptional<ZodNumber>;
2970
3020
  netRxMBps: ZodOptional<ZodNumber>;
2971
3021
  netTxMBps: ZodOptional<ZodNumber>;
3022
+ gpuPct: ZodOptional<ZodNumber>;
3023
+ gpuMemUsedMB: ZodOptional<ZodNumber>;
3024
+ gpuMemTotalMB: ZodOptional<ZodNumber>;
3025
+ gpuTempC: ZodOptional<ZodNumber>;
3026
+ gpuPowerW: ZodOptional<ZodNumber>;
3027
+ type: ZodLiteral<"job.metrics">;
3028
+ jobId: ZodString;
2972
3029
  }, $strip>, ZodObject<{
2973
3030
  type: ZodLiteral<"job.step">;
2974
3031
  jobId: ZodString;
@@ -3142,7 +3199,7 @@ interface Envelope<E extends string, D> {
3142
3199
  * The exact JSON body Rendobar POSTs to your endpoint, discriminated by `event`.
3143
3200
  * Switch on `payload.event` and `payload.data` narrows to the matching shape.
3144
3201
  */
3145
- type WebhookPayload = { [E in WebhookEventType]: Envelope<E, WebhookEventDataMap[E]> }[WebhookEventType] | Envelope<"test", TestEventData>;
3202
+ type WebhookPayload = { [E in WebhookEventType]: Envelope<E, WebhookEventDataMap[E]>; }[WebhookEventType] | Envelope<"test", TestEventData>;
3146
3203
  //#endregion
3147
3204
  //#region src/types.d.ts
3148
3205
  /**
@@ -3222,35 +3279,35 @@ interface ClientConfig {
3222
3279
  }
3223
3280
  declare function createClient(config?: ClientConfig): {
3224
3281
  jobs: {
3225
- create(params: CreateJobParams, options?: {
3282
+ create: (params: CreateJobParams, options?: {
3226
3283
  signal?: AbortSignal;
3227
- }): Promise<JobCreatedResponse>;
3228
- get(id: string, options?: {
3284
+ }) => Promise<JobCreatedResponse>;
3285
+ get: (id: string, options?: {
3229
3286
  signal?: AbortSignal;
3230
- }): Promise<JobResponse>;
3231
- list(params?: ListJobsParams, options?: {
3287
+ }) => Promise<JobResponse>;
3288
+ list: (params?: ListJobsParams, options?: {
3232
3289
  signal?: AbortSignal;
3233
- }): Promise<JobListPage>;
3234
- listAll(params?: Omit<ListJobsParams, "offset">): AsyncGenerator<JobResponse>;
3235
- wait(id: string, options?: WaitOptions): Promise<JobResponse>;
3236
- cancel(id: string, options?: {
3290
+ }) => Promise<JobListPage>;
3291
+ listAll: (params?: Omit<ListJobsParams, "offset">) => AsyncGenerator<JobResponse>;
3292
+ wait: (id: string, options?: WaitOptions) => Promise<JobResponse>;
3293
+ cancel: (id: string, options?: {
3237
3294
  signal?: AbortSignal;
3238
- }): Promise<JobResponse>;
3239
- download(id: string, options?: {
3295
+ }) => Promise<JobResponse>;
3296
+ download: (id: string, options?: {
3240
3297
  signal?: AbortSignal;
3241
- }): Promise<Response>;
3242
- logs(id: string, options?: {
3298
+ }) => Promise<Response>;
3299
+ logs: (id: string, options?: {
3243
3300
  signal?: AbortSignal;
3244
- }): Promise<LogEntryData[]>;
3245
- getTimings(id: string, options?: {
3301
+ }) => Promise<LogEntryData[]>;
3302
+ getTimings: (id: string, options?: {
3246
3303
  signal?: AbortSignal;
3247
- }): Promise<JobTimings>;
3248
- types(options?: {
3304
+ }) => Promise<JobTimings>;
3305
+ types: (options?: {
3249
3306
  signal?: AbortSignal;
3250
- }): Promise<JobType[]>;
3251
- stats(params?: StatsParams, options?: {
3307
+ }) => Promise<JobType[]>;
3308
+ stats: (params?: StatsParams, options?: {
3252
3309
  signal?: AbortSignal;
3253
- }): Promise<JobStats>;
3310
+ }) => Promise<JobStats>;
3254
3311
  };
3255
3312
  billing: {
3256
3313
  state(options?: {
@@ -3401,7 +3458,7 @@ declare function createClient(config?: ClientConfig): {
3401
3458
  signal?: AbortSignal;
3402
3459
  }): Promise<void>;
3403
3460
  getSettings(options?: {
3404
- signal? /** Custom fetch function for testing or special runtimes. */: AbortSignal;
3461
+ signal? /** Custom fetch function for testing or special runtimes. */ : AbortSignal;
3405
3462
  }): Promise<OrgSettings>;
3406
3463
  updateSettings(body: Partial<Pick<OrgSettings, "billingEmailsEnabled" | "defaultRegion" | "regionPinned">>, options?: {
3407
3464
  signal?: AbortSignal;
@@ -3505,9 +3562,19 @@ interface RealtimeConnection {
3505
3562
  disconnect: () => void;
3506
3563
  }
3507
3564
  interface JobSubscribeOptions {
3565
+ /**
3566
+ * Overall progress. Build your UI on `event.phase` (stable: preparing |
3567
+ * processing | finalizing) and `event.progress`. `event.step` is the internal
3568
+ * step id — implementation detail, prefer `phase`.
3569
+ */
3508
3570
  onProgress?: (event: Extract<OrgEvent, {
3509
3571
  type: "job.progress";
3510
3572
  }>) => void;
3573
+ /**
3574
+ * @deprecated Internal step transitions leak pipeline detail and vary by job
3575
+ * type. Use `onProgress` (it carries `phase`, and `step` when you need it).
3576
+ * Kept for the dashboard Trace/debug view; not recommended for app UIs.
3577
+ */
3511
3578
  onStep?: (event: Extract<OrgEvent, {
3512
3579
  type: "job.step";
3513
3580
  }>) => void;
@@ -3523,8 +3590,14 @@ interface JobSubscribeOptions {
3523
3590
  onComplete?: (event: Extract<OrgEvent, {
3524
3591
  type: "job.status";
3525
3592
  }>) => void;
3593
+ /** Container resource utilization (CPU, memory, disk, network, GPU). */
3594
+ onResources?: (event: Extract<OrgEvent, {
3595
+ type: "job.resources";
3596
+ }>) => void;
3597
+ /** @deprecated renamed to onResources. Still fires for both event names.
3598
+ * Remove at the next SDK major — tracked in docs/DEPRECATIONS.md (Group A). */
3526
3599
  onMetrics?: (event: Extract<OrgEvent, {
3527
- type: "job.metrics";
3600
+ type: "job.resources";
3528
3601
  }>) => void;
3529
3602
  onContext?: (event: Extract<OrgEvent, {
3530
3603
  type: "job.context";
@@ -3575,21 +3648,32 @@ type ListJobsParams = {
3575
3648
  status?: string;
3576
3649
  type?: string;
3577
3650
  limit?: number;
3578
- offset?: number; /** Sort field. Default: created. */
3579
- sort?: "created" | "duration" | "cost"; /** Sort direction. Default: desc. */
3580
- order?: "asc" | "desc"; /** Filter by originating client (sdk | cli | mcp | dashboard | ...). */
3581
- client?: string; /** Filter jobs created at or after this Unix ms timestamp. */
3582
- from?: number; /** Filter jobs created at or before this Unix ms timestamp. */
3651
+ offset?: number;
3652
+ /** Sort field. Default: created. */
3653
+ sort?: "created" | "duration" | "cost";
3654
+ /** Sort direction. Default: desc. */
3655
+ order?: "asc" | "desc";
3656
+ /** Filter by originating client (sdk | cli | mcp | dashboard | ...). */
3657
+ client?: string;
3658
+ /** Filter jobs created at or after this Unix ms timestamp. */
3659
+ from?: number;
3660
+ /** Filter jobs created at or before this Unix ms timestamp. */
3583
3661
  to?: number;
3584
3662
  };
3585
3663
  type StatsParams = {
3586
- /** Time window for the aggregate. Default: 24h. */window?: "24h" | "7d" | "30d";
3664
+ /** Time window for the aggregate. Default: 24h. */
3665
+ window?: "24h" | "7d" | "30d";
3587
3666
  };
3588
3667
  type WaitOptions = {
3589
- /** Max wait time in ms. Default: 300_000 (5 minutes). */timeout?: number; /** Initial poll interval in ms. Default: 2_000. Grows with exponential backoff. */
3590
- interval?: number; /** Cap for the backoff poll interval in ms. Default: 10_000. */
3591
- maxInterval?: number; /** Called on each poll with the latest job state. */
3592
- onProgress?: (job: JobResponse) => void; /** Abort signal for cancellation. */
3668
+ /** Max wait time in ms. Default: 300_000 (5 minutes). */
3669
+ timeout?: number;
3670
+ /** Initial poll interval in ms. Default: 2_000. Grows with exponential backoff. */
3671
+ interval?: number;
3672
+ /** Cap for the backoff poll interval in ms. Default: 10_000. */
3673
+ maxInterval?: number;
3674
+ /** Called on each poll with the latest job state. */
3675
+ onProgress?: (job: JobResponse) => void;
3676
+ /** Abort signal for cancellation. */
3593
3677
  signal?: AbortSignal;
3594
3678
  /**
3595
3679
  * When true, throw JobFailedError if the job ends with status "failed" or "cancelled".
@@ -3671,12 +3755,19 @@ type UploadProgress = {
3671
3755
  total: number;
3672
3756
  };
3673
3757
  type CreateUploadOptions = {
3674
- /** Display filename, sent to the API and used in Content-Disposition. */filename: string; /** Byte size. Auto-derived from the Blob when omitted. */
3675
- size?: number; /** MIME type hint. */
3676
- contentType?: string; /** Client-declared sha256, enables server-side dedup. */
3677
- checksum?: string; /** true → 'persisted' lifecycle; default is ephemeral (24h TTL). */
3678
- persist?: boolean; /** Parallel multipart part uploads. Default: 5. */
3679
- concurrency?: number; /** Called as bytes finish uploading. */
3758
+ /** Display filename, sent to the API and used in Content-Disposition. */
3759
+ filename: string;
3760
+ /** Byte size. Auto-derived from the Blob when omitted. */
3761
+ size?: number;
3762
+ /** MIME type hint. */
3763
+ contentType?: string;
3764
+ /** Client-declared sha256, enables server-side dedup. */
3765
+ checksum?: string;
3766
+ /** true → 'persisted' lifecycle; default is ephemeral (24h TTL). */
3767
+ persist?: boolean;
3768
+ /** Parallel multipart part uploads. Default: 5. */
3769
+ concurrency?: number;
3770
+ /** Called as bytes finish uploading. */
3680
3771
  onProgress?: (p: UploadProgress) => void;
3681
3772
  signal?: AbortSignal;
3682
3773
  };