UNPKG

135 kBTypeScriptView Raw
1declare type Primitive = string | number | symbol | bigint | boolean | null | undefined;
2
3declare namespace util {
4 type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
5 export const assertEqual: <A, B>(val: AssertEqual<A, B>) => AssertEqual<A, B>;
6 export function assertIs<T>(_arg: T): void;
7 export function assertNever(_x: never): never;
8 export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
9 export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
10 export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
11 export const arrayToEnum: <T extends string, U extends [T, ...T[]]>(items: U) => { [k in U[number]]: k; };
12 export const getValidEnumValues: (obj: any) => any[];
13 export const objectValues: (obj: any) => any[];
14 export const objectKeys: ObjectConstructor["keys"];
15 export const find: <T>(arr: T[], checker: (arg: T) => any) => T | undefined;
16 export type identity<T> = T;
17 export type flatten<T> = identity<{
18 [k in keyof T]: T[k];
19 }>;
20 export type noUndefined<T> = T extends undefined ? never : T;
21 export const isInteger: NumberConstructor["isInteger"];
22 export function joinValues<T extends any[]>(array: T, separator?: string): string;
23 export const jsonStringifyReplacer: (_: string, value: any) => any;
24 export {};
25}
26declare const ZodParsedType: {
27 function: "function";
28 number: "number";
29 string: "string";
30 nan: "nan";
31 integer: "integer";
32 float: "float";
33 boolean: "boolean";
34 date: "date";
35 bigint: "bigint";
36 symbol: "symbol";
37 undefined: "undefined";
38 null: "null";
39 array: "array";
40 object: "object";
41 unknown: "unknown";
42 promise: "promise";
43 void: "void";
44 never: "never";
45 map: "map";
46 set: "set";
47};
48declare type ZodParsedType = keyof typeof ZodParsedType;
49
50declare type allKeys<T> = T extends any ? keyof T : never;
51declare type typeToFlattenedError<T, U = string> = {
52 formErrors: U[];
53 fieldErrors: {
54 [P in allKeys<T>]?: U[];
55 };
56};
57declare const ZodIssueCode: {
58 invalid_type: "invalid_type";
59 invalid_literal: "invalid_literal";
60 custom: "custom";
61 invalid_union: "invalid_union";
62 invalid_union_discriminator: "invalid_union_discriminator";
63 invalid_enum_value: "invalid_enum_value";
64 unrecognized_keys: "unrecognized_keys";
65 invalid_arguments: "invalid_arguments";
66 invalid_return_type: "invalid_return_type";
67 invalid_date: "invalid_date";
68 invalid_string: "invalid_string";
69 too_small: "too_small";
70 too_big: "too_big";
71 invalid_intersection_types: "invalid_intersection_types";
72 not_multiple_of: "not_multiple_of";
73 not_finite: "not_finite";
74};
75declare type ZodIssueCode = keyof typeof ZodIssueCode;
76declare type ZodIssueBase = {
77 path: (string | number)[];
78 message?: string;
79};
80interface ZodInvalidTypeIssue extends ZodIssueBase {
81 code: typeof ZodIssueCode.invalid_type;
82 expected: ZodParsedType;
83 received: ZodParsedType;
84}
85interface ZodInvalidLiteralIssue extends ZodIssueBase {
86 code: typeof ZodIssueCode.invalid_literal;
87 expected: unknown;
88}
89interface ZodUnrecognizedKeysIssue extends ZodIssueBase {
90 code: typeof ZodIssueCode.unrecognized_keys;
91 keys: string[];
92}
93interface ZodInvalidUnionIssue extends ZodIssueBase {
94 code: typeof ZodIssueCode.invalid_union;
95 unionErrors: ZodError[];
96}
97interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {
98 code: typeof ZodIssueCode.invalid_union_discriminator;
99 options: Primitive[];
100}
101interface ZodInvalidEnumValueIssue extends ZodIssueBase {
102 received: string | number;
103 code: typeof ZodIssueCode.invalid_enum_value;
104 options: (string | number)[];
105}
106interface ZodInvalidArgumentsIssue extends ZodIssueBase {
107 code: typeof ZodIssueCode.invalid_arguments;
108 argumentsError: ZodError;
109}
110interface ZodInvalidReturnTypeIssue extends ZodIssueBase {
111 code: typeof ZodIssueCode.invalid_return_type;
112 returnTypeError: ZodError;
113}
114interface ZodInvalidDateIssue extends ZodIssueBase {
115 code: typeof ZodIssueCode.invalid_date;
116}
117declare type StringValidation = "email" | "url" | "uuid" | "regex" | "cuid" | "datetime" | {
118 startsWith: string;
119} | {
120 endsWith: string;
121};
122interface ZodInvalidStringIssue extends ZodIssueBase {
123 code: typeof ZodIssueCode.invalid_string;
124 validation: StringValidation;
125}
126interface ZodTooSmallIssue extends ZodIssueBase {
127 code: typeof ZodIssueCode.too_small;
128 minimum: number;
129 inclusive: boolean;
130 exact?: boolean;
131 type: "array" | "string" | "number" | "set" | "date";
132}
133interface ZodTooBigIssue extends ZodIssueBase {
134 code: typeof ZodIssueCode.too_big;
135 maximum: number;
136 inclusive: boolean;
137 exact?: boolean;
138 type: "array" | "string" | "number" | "set" | "date";
139}
140interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
141 code: typeof ZodIssueCode.invalid_intersection_types;
142}
143interface ZodNotMultipleOfIssue extends ZodIssueBase {
144 code: typeof ZodIssueCode.not_multiple_of;
145 multipleOf: number;
146}
147interface ZodNotFiniteIssue extends ZodIssueBase {
148 code: typeof ZodIssueCode.not_finite;
149}
150interface ZodCustomIssue extends ZodIssueBase {
151 code: typeof ZodIssueCode.custom;
152 params?: {
153 [k: string]: any;
154 };
155}
156declare type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue;
157declare type ZodIssue = ZodIssueOptionalMessage & {
158 fatal?: boolean;
159 message: string;
160};
161declare type ZodFormattedError<T, U = string> = {
162 _errors: U[];
163} & (NonNullable<T> extends [any, ...any[]] ? {
164 [K in keyof NonNullable<T>]?: ZodFormattedError<NonNullable<T>[K]>;
165} : NonNullable<T> extends any[] ? {
166 [k: number]: ZodFormattedError<NonNullable<T>[number]>;
167} : NonNullable<T> extends object ? {
168 [K in keyof NonNullable<T>]?: ZodFormattedError<NonNullable<T>[K]>;
169} : unknown);
170declare class ZodError<T = any> extends Error {
171 issues: ZodIssue[];
172 get errors(): ZodIssue[];
173 constructor(issues: ZodIssue[]);
174 format(): ZodFormattedError<T>;
175 format<U>(mapper: (issue: ZodIssue) => U): ZodFormattedError<T, U>;
176 static create: (issues: ZodIssue[]) => ZodError<any>;
177 toString(): string;
178 get message(): string;
179 get isEmpty(): boolean;
180 addIssue: (sub: ZodIssue) => void;
181 addIssues: (subs?: ZodIssue[]) => void;
182 flatten(): typeToFlattenedError<T>;
183 flatten<U>(mapper?: (issue: ZodIssue) => U): typeToFlattenedError<T, U>;
184 get formErrors(): typeToFlattenedError<T, string>;
185}
186declare type stripPath<T extends object> = T extends any ? util.OmitKeys<T, "path"> : never;
187declare type IssueData = stripPath<ZodIssueOptionalMessage> & {
188 path?: (string | number)[];
189 fatal?: boolean;
190};
191declare type ErrorMapCtx = {
192 defaultError: string;
193 data: any;
194};
195declare type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => {
196 message: string;
197};
198
199declare type ParseParams = {
200 path: (string | number)[];
201 errorMap: ZodErrorMap;
202 async: boolean;
203};
204declare type ParsePathComponent = string | number;
205declare type ParsePath = ParsePathComponent[];
206interface ParseContext {
207 readonly common: {
208 readonly issues: ZodIssue[];
209 readonly contextualErrorMap?: ZodErrorMap;
210 readonly async: boolean;
211 };
212 readonly path: ParsePath;
213 readonly schemaErrorMap?: ZodErrorMap;
214 readonly parent: ParseContext | null;
215 readonly data: any;
216 readonly parsedType: ZodParsedType;
217}
218declare type ParseInput = {
219 data: any;
220 path: (string | number)[];
221 parent: ParseContext;
222};
223declare class ParseStatus {
224 value: "aborted" | "dirty" | "valid";
225 dirty(): void;
226 abort(): void;
227 static mergeArray(status: ParseStatus, results: SyncParseReturnType<any>[]): SyncParseReturnType;
228 static mergeObjectAsync(status: ParseStatus, pairs: {
229 key: ParseReturnType<any>;
230 value: ParseReturnType<any>;
231 }[]): Promise<SyncParseReturnType<any>>;
232 static mergeObjectSync(status: ParseStatus, pairs: {
233 key: SyncParseReturnType<any>;
234 value: SyncParseReturnType<any>;
235 alwaysSet?: boolean;
236 }[]): SyncParseReturnType;
237}
238declare type INVALID = {
239 status: "aborted";
240};
241declare const INVALID: INVALID;
242declare type DIRTY<T> = {
243 status: "dirty";
244 value: T;
245};
246declare const DIRTY: <T>(value: T) => DIRTY<T>;
247declare type OK<T> = {
248 status: "valid";
249 value: T;
250};
251declare const OK: <T>(value: T) => OK<T>;
252declare type SyncParseReturnType<T = any> = OK<T> | DIRTY<T> | INVALID;
253declare type AsyncParseReturnType<T> = Promise<SyncParseReturnType<T>>;
254declare type ParseReturnType<T> = SyncParseReturnType<T> | AsyncParseReturnType<T>;
255
256declare namespace enumUtil {
257 type UnionToIntersectionFn<T> = (T extends unknown ? (k: () => T) => void : never) extends (k: infer Intersection) => void ? Intersection : never;
258 type GetUnionLast<T> = UnionToIntersectionFn<T> extends () => infer Last ? Last : never;
259 type UnionToTuple<T, Tuple extends unknown[] = []> = [T] extends [never] ? Tuple : UnionToTuple<Exclude<T, GetUnionLast<T>>, [GetUnionLast<T>, ...Tuple]>;
260 type CastToStringTuple<T> = T extends [string, ...string[]] ? T : never;
261 export type UnionToTupleString<T> = CastToStringTuple<UnionToTuple<T>>;
262 export {};
263}
264
265declare namespace errorUtil {
266 type ErrMessage = string | {
267 message?: string;
268 };
269 const errToObj: (message?: ErrMessage | undefined) => {
270 message?: string | undefined;
271 };
272 const toString: (message?: ErrMessage | undefined) => string | undefined;
273}
274
275declare namespace partialUtil {
276 type DeepPartial<T extends ZodTypeAny> = T extends ZodObject<infer Shape, infer Params, infer Catchall> ? ZodObject<{
277 [k in keyof Shape]: ZodOptional<DeepPartial<Shape[k]>>;
278 }, Params, Catchall> : T extends ZodArray<infer Type, infer Card> ? ZodArray<DeepPartial<Type>, Card> : T extends ZodOptional<infer Type> ? ZodOptional<DeepPartial<Type>> : T extends ZodNullable<infer Type> ? ZodNullable<DeepPartial<Type>> : T extends ZodTuple<infer Items> ? {
279 [k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial<Items[k]> : never;
280 } extends infer PI ? PI extends ZodTupleItems ? ZodTuple<PI> : never : never : T;
281}
282
283declare type RefinementCtx = {
284 addIssue: (arg: IssueData) => void;
285 path: (string | number)[];
286};
287declare type ZodRawShape = {
288 [k: string]: ZodTypeAny;
289};
290declare type ZodTypeAny = ZodType<any, any, any>;
291declare type TypeOf<T extends ZodType<any, any, any>> = T["_output"];
292declare type input<T extends ZodType<any, any, any>> = T["_input"];
293declare type output<T extends ZodType<any, any, any>> = T["_output"];
294
295declare type CustomErrorParams = Partial<util.Omit<ZodCustomIssue, "code">>;
296interface ZodTypeDef {
297 errorMap?: ZodErrorMap;
298 description?: string;
299}
300declare type RawCreateParams = {
301 errorMap?: ZodErrorMap;
302 invalid_type_error?: string;
303 required_error?: string;
304 description?: string;
305} | undefined;
306declare type SafeParseSuccess<Output> = {
307 success: true;
308 data: Output;
309};
310declare type SafeParseError<Input> = {
311 success: false;
312 error: ZodError<Input>;
313};
314declare type SafeParseReturnType<Input, Output> = SafeParseSuccess<Output> | SafeParseError<Input>;
315declare abstract class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> {
316 readonly _type: Output;
317 readonly _output: Output;
318 readonly _input: Input;
319 readonly _def: Def;
320 get description(): string | undefined;
321 abstract _parse(input: ParseInput): ParseReturnType<Output>;
322 _getType(input: ParseInput): string;
323 _getOrReturnCtx(input: ParseInput, ctx?: ParseContext | undefined): ParseContext;
324 _processInputParams(input: ParseInput): {
325 status: ParseStatus;
326 ctx: ParseContext;
327 };
328 _parseSync(input: ParseInput): SyncParseReturnType<Output>;
329 _parseAsync(input: ParseInput): AsyncParseReturnType<Output>;
330 parse(data: unknown, params?: Partial<ParseParams>): Output;
331 safeParse(data: unknown, params?: Partial<ParseParams>): SafeParseReturnType<Input, Output>;
332 parseAsync(data: unknown, params?: Partial<ParseParams>): Promise<Output>;
333 safeParseAsync(data: unknown, params?: Partial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;
334 /** Alias of safeParseAsync */
335 spa: (data: unknown, params?: Partial<ParseParams> | undefined) => Promise<SafeParseReturnType<Input, Output>>;
336 refine<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, RefinedOutput, Input>;
337 refine(check: (arg: Output) => unknown | Promise<unknown>, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, Output, Input>;
338 refinement<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, RefinedOutput, Input>;
339 refinement(check: (arg: Output) => boolean, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, Output, Input>;
340 _refinement(refinement: RefinementEffect<Output>["refinement"]): ZodEffects<this, Output, Input>;
341 superRefine<RefinedOutput extends Output>(refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput): ZodEffects<this, RefinedOutput, Input>;
342 superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects<this, Output, Input>;
343 constructor(def: Def);
344 optional(): ZodOptional<this>;
345 nullable(): ZodNullable<this>;
346 nullish(): ZodNullable<ZodOptional<this>>;
347 array(): ZodArray<this>;
348 promise(): ZodPromise<this>;
349 or<T extends ZodTypeAny>(option: T): ZodUnion<[this, T]>;
350 and<T extends ZodTypeAny>(incoming: T): ZodIntersection<this, T>;
351 transform<NewOut>(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise<NewOut>): ZodEffects<this, NewOut>;
352 default(def: util.noUndefined<Input>): ZodDefault<this>;
353 default(def: () => util.noUndefined<Input>): ZodDefault<this>;
354 brand<B extends string | number | symbol>(brand?: B): ZodBranded<this, B>;
355 catch(def: Input): ZodCatch<this>;
356 catch(def: () => Input): ZodCatch<this>;
357 describe(description: string): this;
358 pipe<T extends ZodTypeAny>(target: T): ZodPipeline<this, T>;
359 isOptional(): boolean;
360 isNullable(): boolean;
361}
362declare type ZodStringCheck = {
363 kind: "min";
364 value: number;
365 message?: string;
366} | {
367 kind: "max";
368 value: number;
369 message?: string;
370} | {
371 kind: "length";
372 value: number;
373 message?: string;
374} | {
375 kind: "email";
376 message?: string;
377} | {
378 kind: "url";
379 message?: string;
380} | {
381 kind: "uuid";
382 message?: string;
383} | {
384 kind: "cuid";
385 message?: string;
386} | {
387 kind: "startsWith";
388 value: string;
389 message?: string;
390} | {
391 kind: "endsWith";
392 value: string;
393 message?: string;
394} | {
395 kind: "regex";
396 regex: RegExp;
397 message?: string;
398} | {
399 kind: "trim";
400 message?: string;
401} | {
402 kind: "datetime";
403 offset: boolean;
404 precision: number | null;
405 message?: string;
406};
407interface ZodStringDef extends ZodTypeDef {
408 checks: ZodStringCheck[];
409 typeName: ZodFirstPartyTypeKind.ZodString;
410 coerce: boolean;
411}
412declare class ZodString extends ZodType<string, ZodStringDef> {
413 _parse(input: ParseInput): ParseReturnType<string>;
414 protected _regex: (regex: RegExp, validation: StringValidation, message?: errorUtil.ErrMessage | undefined) => ZodEffects<this, string, string>;
415 _addCheck(check: ZodStringCheck): ZodString;
416 email(message?: errorUtil.ErrMessage): ZodString;
417 url(message?: errorUtil.ErrMessage): ZodString;
418 uuid(message?: errorUtil.ErrMessage): ZodString;
419 cuid(message?: errorUtil.ErrMessage): ZodString;
420 datetime(options?: string | {
421 message?: string | undefined;
422 precision?: number | null;
423 offset?: boolean;
424 }): ZodString;
425 regex(regex: RegExp, message?: errorUtil.ErrMessage): ZodString;
426 startsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
427 endsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
428 min(minLength: number, message?: errorUtil.ErrMessage): ZodString;
429 max(maxLength: number, message?: errorUtil.ErrMessage): ZodString;
430 length(len: number, message?: errorUtil.ErrMessage): ZodString;
431 /**
432 * @deprecated Use z.string().min(1) instead.
433 * @see {@link ZodString.min}
434 */
435 nonempty: (message?: errorUtil.ErrMessage | undefined) => ZodString;
436 trim: () => ZodString;
437 get isDatetime(): boolean;
438 get isEmail(): boolean;
439 get isURL(): boolean;
440 get isUUID(): boolean;
441 get isCUID(): boolean;
442 get minLength(): number | null;
443 get maxLength(): number | null;
444 static create: (params?: ({
445 errorMap?: ZodErrorMap | undefined;
446 invalid_type_error?: string | undefined;
447 required_error?: string | undefined;
448 description?: string | undefined;
449 } & {
450 coerce?: true | undefined;
451 }) | undefined) => ZodString;
452}
453declare type ZodNumberCheck = {
454 kind: "min";
455 value: number;
456 inclusive: boolean;
457 message?: string;
458} | {
459 kind: "max";
460 value: number;
461 inclusive: boolean;
462 message?: string;
463} | {
464 kind: "int";
465 message?: string;
466} | {
467 kind: "multipleOf";
468 value: number;
469 message?: string;
470} | {
471 kind: "finite";
472 message?: string;
473};
474interface ZodNumberDef extends ZodTypeDef {
475 checks: ZodNumberCheck[];
476 typeName: ZodFirstPartyTypeKind.ZodNumber;
477 coerce: boolean;
478}
479declare class ZodNumber extends ZodType<number, ZodNumberDef> {
480 _parse(input: ParseInput): ParseReturnType<number>;
481 static create: (params?: ({
482 errorMap?: ZodErrorMap | undefined;
483 invalid_type_error?: string | undefined;
484 required_error?: string | undefined;
485 description?: string | undefined;
486 } & {
487 coerce?: boolean | undefined;
488 }) | undefined) => ZodNumber;
489 gte(value: number, message?: errorUtil.ErrMessage): ZodNumber;
490 min: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
491 gt(value: number, message?: errorUtil.ErrMessage): ZodNumber;
492 lte(value: number, message?: errorUtil.ErrMessage): ZodNumber;
493 max: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
494 lt(value: number, message?: errorUtil.ErrMessage): ZodNumber;
495 protected setLimit(kind: "min" | "max", value: number, inclusive: boolean, message?: string): ZodNumber;
496 _addCheck(check: ZodNumberCheck): ZodNumber;
497 int(message?: errorUtil.ErrMessage): ZodNumber;
498 positive(message?: errorUtil.ErrMessage): ZodNumber;
499 negative(message?: errorUtil.ErrMessage): ZodNumber;
500 nonpositive(message?: errorUtil.ErrMessage): ZodNumber;
501 nonnegative(message?: errorUtil.ErrMessage): ZodNumber;
502 multipleOf(value: number, message?: errorUtil.ErrMessage): ZodNumber;
503 finite(message?: errorUtil.ErrMessage): ZodNumber;
504 step: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
505 get minValue(): number | null;
506 get maxValue(): number | null;
507 get isInt(): boolean;
508}
509interface ZodBooleanDef extends ZodTypeDef {
510 typeName: ZodFirstPartyTypeKind.ZodBoolean;
511 coerce: boolean;
512}
513declare class ZodBoolean extends ZodType<boolean, ZodBooleanDef> {
514 _parse(input: ParseInput): ParseReturnType<boolean>;
515 static create: (params?: ({
516 errorMap?: ZodErrorMap | undefined;
517 invalid_type_error?: string | undefined;
518 required_error?: string | undefined;
519 description?: string | undefined;
520 } & {
521 coerce?: boolean | undefined;
522 }) | undefined) => ZodBoolean;
523}
524interface ZodNullDef extends ZodTypeDef {
525 typeName: ZodFirstPartyTypeKind.ZodNull;
526}
527declare class ZodNull extends ZodType<null, ZodNullDef> {
528 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
529 static create: (params?: RawCreateParams) => ZodNull;
530}
531interface ZodArrayDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
532 type: T;
533 typeName: ZodFirstPartyTypeKind.ZodArray;
534 exactLength: {
535 value: number;
536 message?: string;
537 } | null;
538 minLength: {
539 value: number;
540 message?: string;
541 } | null;
542 maxLength: {
543 value: number;
544 message?: string;
545 } | null;
546}
547declare type ArrayCardinality = "many" | "atleastone";
548declare type arrayOutputType<T extends ZodTypeAny, Cardinality extends ArrayCardinality = "many"> = Cardinality extends "atleastone" ? [T["_output"], ...T["_output"][]] : T["_output"][];
549declare class ZodArray<T extends ZodTypeAny, Cardinality extends ArrayCardinality = "many"> extends ZodType<arrayOutputType<T, Cardinality>, ZodArrayDef<T>, Cardinality extends "atleastone" ? [T["_input"], ...T["_input"][]] : T["_input"][]> {
550 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
551 get element(): T;
552 min(minLength: number, message?: errorUtil.ErrMessage): this;
553 max(maxLength: number, message?: errorUtil.ErrMessage): this;
554 length(len: number, message?: errorUtil.ErrMessage): this;
555 nonempty(message?: errorUtil.ErrMessage): ZodArray<T, "atleastone">;
556 static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodArray<T_1, "many">;
557}
558declare namespace objectUtil {
559 export type MergeShapes<U extends ZodRawShape, V extends ZodRawShape> = {
560 [k in Exclude<keyof U, keyof V>]: U[k];
561 } & V;
562 type optionalKeys<T extends object> = {
563 [k in keyof T]: undefined extends T[k] ? k : never;
564 }[keyof T];
565 type requiredKeys<T extends object> = {
566 [k in keyof T]: undefined extends T[k] ? never : k;
567 }[keyof T];
568 export type addQuestionMarks<T extends object> = Partial<Pick<T, optionalKeys<T>>> & Pick<T, requiredKeys<T>>;
569 export type identity<T> = T;
570 export type flatten<T extends object> = identity<{
571 [k in keyof T]: T[k];
572 }>;
573 export type noNeverKeys<T extends ZodRawShape> = {
574 [k in keyof T]: [T[k]] extends [never] ? never : k;
575 }[keyof T];
576 export type noNever<T extends ZodRawShape> = identity<{
577 [k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;
578 }>;
579 export const mergeShapes: <U extends ZodRawShape, T extends ZodRawShape>(first: U, second: T) => T & U;
580 export {};
581}
582declare type extendShape<A, B> = Omit<A, keyof B> & B;
583declare type UnknownKeysParam = "passthrough" | "strict" | "strip";
584interface ZodObjectDef<T extends ZodRawShape = ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
585 typeName: ZodFirstPartyTypeKind.ZodObject;
586 shape: () => T;
587 catchall: Catchall;
588 unknownKeys: UnknownKeys;
589}
590declare type baseObjectOutputType<Shape extends ZodRawShape> = objectUtil.flatten<objectUtil.addQuestionMarks<{
591 [k in keyof Shape]: Shape[k]["_output"];
592}>>;
593declare type objectOutputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny> = ZodTypeAny extends Catchall ? baseObjectOutputType<Shape> : objectUtil.flatten<baseObjectOutputType<Shape> & {
594 [k: string]: Catchall["_output"];
595}>;
596declare type baseObjectInputType<Shape extends ZodRawShape> = objectUtil.flatten<objectUtil.addQuestionMarks<{
597 [k in keyof Shape]: Shape[k]["_input"];
598}>>;
599declare type objectInputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny> = ZodTypeAny extends Catchall ? baseObjectInputType<Shape> : objectUtil.flatten<baseObjectInputType<Shape> & {
600 [k: string]: Catchall["_input"];
601}>;
602declare type deoptional<T extends ZodTypeAny> = T extends ZodOptional<infer U> ? deoptional<U> : T extends ZodNullable<infer U> ? ZodNullable<deoptional<U>> : T;
603declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysParam = "strip", Catchall extends ZodTypeAny = ZodTypeAny, Output = objectOutputType<T, Catchall>, Input = objectInputType<T, Catchall>> extends ZodType<Output, ZodObjectDef<T, UnknownKeys, Catchall>, Input> {
604 private _cached;
605 _getCached(): {
606 shape: T;
607 keys: string[];
608 };
609 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
610 get shape(): T;
611 strict(message?: errorUtil.ErrMessage): ZodObject<T, "strict", Catchall>;
612 strip(): ZodObject<T, "strip", Catchall>;
613 passthrough(): ZodObject<T, "passthrough", Catchall>;
614 /**
615 * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.
616 * If you want to pass through unknown properties, use `.passthrough()` instead.
617 */
618 nonstrict: () => ZodObject<T, "passthrough", Catchall>;
619 augment: <Augmentation extends ZodRawShape>(augmentation: Augmentation) => ZodObject<extendShape<T, Augmentation>, UnknownKeys, Catchall, objectOutputType<extendShape<T, Augmentation>, Catchall>, objectInputType<extendShape<T, Augmentation>, Catchall>>;
620 extend: <Augmentation extends ZodRawShape>(augmentation: Augmentation) => ZodObject<extendShape<T, Augmentation>, UnknownKeys, Catchall, objectOutputType<extendShape<T, Augmentation>, Catchall>, objectInputType<extendShape<T, Augmentation>, Catchall>>;
621 setKey<Key extends string, Schema extends ZodTypeAny>(key: Key, schema: Schema): ZodObject<T & {
622 [k in Key]: Schema;
623 }, UnknownKeys, Catchall>;
624 /**
625 * Prior to zod@1.0.12 there was a bug in the
626 * inferred type of merged objects. Please
627 * upgrade if you are experiencing issues.
628 */
629 merge<Incoming extends AnyZodObject>(merging: Incoming): ZodObject<extendShape<T, ReturnType<Incoming["_def"]["shape"]>>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>;
630 catchall<Index extends ZodTypeAny>(index: Index): ZodObject<T, UnknownKeys, Index>;
631 pick<Mask extends {
632 [k in keyof T]?: true;
633 }>(mask: Mask): ZodObject<Pick<T, Extract<keyof T, keyof Mask>>, UnknownKeys, Catchall>;
634 omit<Mask extends {
635 [k in keyof T]?: true;
636 }>(mask: Mask): ZodObject<Omit<T, keyof Mask>, UnknownKeys, Catchall>;
637 deepPartial(): partialUtil.DeepPartial<this>;
638 partial(): ZodObject<{
639 [k in keyof T]: ZodOptional<T[k]>;
640 }, UnknownKeys, Catchall>;
641 partial<Mask extends {
642 [k in keyof T]?: true;
643 }>(mask: Mask): ZodObject<objectUtil.noNever<{
644 [k in keyof T]: k extends keyof Mask ? ZodOptional<T[k]> : T[k];
645 }>, UnknownKeys, Catchall>;
646 required(): ZodObject<{
647 [k in keyof T]: deoptional<T[k]>;
648 }, UnknownKeys, Catchall>;
649 required<Mask extends {
650 [k in keyof T]?: true;
651 }>(mask: Mask): ZodObject<objectUtil.noNever<{
652 [k in keyof T]: k extends keyof Mask ? deoptional<T[k]> : T[k];
653 }>, UnknownKeys, Catchall>;
654 keyof(): ZodEnum<enumUtil.UnionToTupleString<keyof T>>;
655 static create: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>[k_3]; }>;
656 static strictCreate: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strict", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>[k_3]; }>;
657 static lazycreate: <T_1 extends ZodRawShape>(shape: () => T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>[k_3]; }>;
658}
659declare type AnyZodObject = ZodObject<any, any, any>;
660declare type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>;
661interface ZodUnionDef<T extends ZodUnionOptions = Readonly<[
662 ZodTypeAny,
663 ZodTypeAny,
664 ...ZodTypeAny[]
665]>> extends ZodTypeDef {
666 options: T;
667 typeName: ZodFirstPartyTypeKind.ZodUnion;
668}
669declare class ZodUnion<T extends ZodUnionOptions> extends ZodType<T[number]["_output"], ZodUnionDef<T>, T[number]["_input"]> {
670 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
671 get options(): T;
672 static create: <T_1 extends readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(types: T_1, params?: RawCreateParams) => ZodUnion<T_1>;
673}
674declare type ZodDiscriminatedUnionOption<Discriminator extends string> = ZodObject<{
675 [key in Discriminator]: ZodTypeAny;
676} & ZodRawShape, any, any>;
677interface ZodDiscriminatedUnionDef<Discriminator extends string, Options extends ZodDiscriminatedUnionOption<any>[] = ZodDiscriminatedUnionOption<any>[]> extends ZodTypeDef {
678 discriminator: Discriminator;
679 options: Options;
680 optionsMap: Map<Primitive, ZodDiscriminatedUnionOption<any>>;
681 typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion;
682}
683declare class ZodDiscriminatedUnion<Discriminator extends string, Options extends ZodDiscriminatedUnionOption<Discriminator>[]> extends ZodType<output<Options[number]>, ZodDiscriminatedUnionDef<Discriminator, Options>, input<Options[number]>> {
684 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
685 get discriminator(): Discriminator;
686 get options(): Options;
687 get optionsMap(): Map<Primitive, ZodDiscriminatedUnionOption<any>>;
688 /**
689 * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
690 * However, it only allows a union of objects, all of which need to share a discriminator property. This property must
691 * have a different value for each object in the union.
692 * @param discriminator the name of the discriminator property
693 * @param types an array of object schemas
694 * @param params
695 */
696 static create<Discriminator extends string, Types extends [
697 ZodDiscriminatedUnionOption<Discriminator>,
698 ...ZodDiscriminatedUnionOption<Discriminator>[]
699 ]>(discriminator: Discriminator, options: Types, params?: RawCreateParams): ZodDiscriminatedUnion<Discriminator, Types>;
700}
701interface ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
702 left: T;
703 right: U;
704 typeName: ZodFirstPartyTypeKind.ZodIntersection;
705}
706declare class ZodIntersection<T extends ZodTypeAny, U extends ZodTypeAny> extends ZodType<T["_output"] & U["_output"], ZodIntersectionDef<T, U>, T["_input"] & U["_input"]> {
707 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
708 static create: <T_1 extends ZodTypeAny, U_1 extends ZodTypeAny>(left: T_1, right: U_1, params?: RawCreateParams) => ZodIntersection<T_1, U_1>;
709}
710declare type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];
711declare type AssertArray<T> = T extends any[] ? T : never;
712declare type OutputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
713 [k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_output"] : never;
714}>;
715declare type OutputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...OutputTypeOfTuple<T>, ...Rest["_output"][]] : OutputTypeOfTuple<T>;
716declare type InputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
717 [k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_input"] : never;
718}>;
719declare type InputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...InputTypeOfTuple<T>, ...Rest["_input"][]] : InputTypeOfTuple<T>;
720interface ZodTupleDef<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends ZodTypeAny | null = null> extends ZodTypeDef {
721 items: T;
722 rest: Rest;
723 typeName: ZodFirstPartyTypeKind.ZodTuple;
724}
725declare class ZodTuple<T extends [ZodTypeAny, ...ZodTypeAny[]] | [] = [ZodTypeAny, ...ZodTypeAny[]], Rest extends ZodTypeAny | null = null> extends ZodType<OutputTypeOfTupleWithRest<T, Rest>, ZodTupleDef<T, Rest>, InputTypeOfTupleWithRest<T, Rest>> {
726 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
727 get items(): T;
728 rest<Rest extends ZodTypeAny>(rest: Rest): ZodTuple<T, Rest>;
729 static create: <T_1 extends [] | [ZodTypeAny, ...ZodTypeAny[]]>(schemas: T_1, params?: RawCreateParams) => ZodTuple<T_1, null>;
730}
731interface ZodRecordDef<Key extends KeySchema = ZodString, Value extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
732 valueType: Value;
733 keyType: Key;
734 typeName: ZodFirstPartyTypeKind.ZodRecord;
735}
736declare type KeySchema = ZodType<string | number | symbol, any, any>;
737declare type RecordType<K extends string | number | symbol, V> = [
738 string
739] extends [K] ? Record<K, V> : [number] extends [K] ? Record<K, V> : [symbol] extends [K] ? Record<K, V> : Partial<Record<K, V>>;
740declare class ZodRecord<Key extends KeySchema = ZodString, Value extends ZodTypeAny = ZodTypeAny> extends ZodType<RecordType<Key["_output"], Value["_output"]>, ZodRecordDef<Key, Value>, RecordType<Key["_input"], Value["_input"]>> {
741 get keySchema(): Key;
742 get valueSchema(): Value;
743 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
744 get element(): Value;
745 static create<Value extends ZodTypeAny>(valueType: Value, params?: RawCreateParams): ZodRecord<ZodString, Value>;
746 static create<Keys extends KeySchema, Value extends ZodTypeAny>(keySchema: Keys, valueType: Value, params?: RawCreateParams): ZodRecord<Keys, Value>;
747}
748interface ZodLiteralDef<T = any> extends ZodTypeDef {
749 value: T;
750 typeName: ZodFirstPartyTypeKind.ZodLiteral;
751}
752declare class ZodLiteral<T> extends ZodType<T, ZodLiteralDef<T>> {
753 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
754 get value(): T;
755 static create: <T_1 extends Primitive>(value: T_1, params?: RawCreateParams) => ZodLiteral<T_1>;
756}
757declare type EnumValues = [string, ...string[]];
758declare type Values<T extends EnumValues> = {
759 [k in T[number]]: k;
760};
761interface ZodEnumDef<T extends EnumValues = EnumValues> extends ZodTypeDef {
762 values: T;
763 typeName: ZodFirstPartyTypeKind.ZodEnum;
764}
765declare type Writeable<T> = {
766 -readonly [P in keyof T]: T[P];
767};
768declare function createZodEnum<U extends string, T extends Readonly<[U, ...U[]]>>(values: T, params?: RawCreateParams): ZodEnum<Writeable<T>>;
769declare function createZodEnum<U extends string, T extends [U, ...U[]]>(values: T, params?: RawCreateParams): ZodEnum<T>;
770declare class ZodEnum<T extends [string, ...string[]]> extends ZodType<T[number], ZodEnumDef<T>> {
771 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
772 get options(): T;
773 get enum(): Values<T>;
774 get Values(): Values<T>;
775 get Enum(): Values<T>;
776 static create: typeof createZodEnum;
777}
778interface ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
779 type: T;
780 typeName: ZodFirstPartyTypeKind.ZodPromise;
781}
782declare class ZodPromise<T extends ZodTypeAny> extends ZodType<Promise<T["_output"]>, ZodPromiseDef<T>, Promise<T["_input"]>> {
783 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
784 static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodPromise<T_1>;
785}
786declare type RefinementEffect<T> = {
787 type: "refinement";
788 refinement: (arg: T, ctx: RefinementCtx) => any;
789};
790declare type TransformEffect<T> = {
791 type: "transform";
792 transform: (arg: T, ctx: RefinementCtx) => any;
793};
794declare type PreprocessEffect<T> = {
795 type: "preprocess";
796 transform: (arg: T) => any;
797};
798declare type Effect<T> = RefinementEffect<T> | TransformEffect<T> | PreprocessEffect<T>;
799interface ZodEffectsDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
800 schema: T;
801 typeName: ZodFirstPartyTypeKind.ZodEffects;
802 effect: Effect<any>;
803}
804declare class ZodEffects<T extends ZodTypeAny, Output = output<T>, Input = input<T>> extends ZodType<Output, ZodEffectsDef<T>, Input> {
805 innerType(): T;
806 sourceType(): T;
807 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
808 static create: <I extends ZodTypeAny>(schema: I, effect: Effect<I["_output"]>, params?: RawCreateParams) => ZodEffects<I, I["_output"], input<I>>;
809 static createWithPreprocess: <I extends ZodTypeAny>(preprocess: (arg: unknown) => unknown, schema: I, params?: RawCreateParams) => ZodEffects<I, I["_output"], unknown>;
810}
811
812interface ZodOptionalDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
813 innerType: T;
814 typeName: ZodFirstPartyTypeKind.ZodOptional;
815}
816declare class ZodOptional<T extends ZodTypeAny> extends ZodType<T["_output"] | undefined, ZodOptionalDef<T>, T["_input"] | undefined> {
817 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
818 unwrap(): T;
819 static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodOptional<T_1>;
820}
821interface ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
822 innerType: T;
823 typeName: ZodFirstPartyTypeKind.ZodNullable;
824}
825declare class ZodNullable<T extends ZodTypeAny> extends ZodType<T["_output"] | null, ZodNullableDef<T>, T["_input"] | null> {
826 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
827 unwrap(): T;
828 static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodNullable<T_1>;
829}
830interface ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
831 innerType: T;
832 defaultValue: () => util.noUndefined<T["_input"]>;
833 typeName: ZodFirstPartyTypeKind.ZodDefault;
834}
835declare class ZodDefault<T extends ZodTypeAny> extends ZodType<util.noUndefined<T["_output"]>, ZodDefaultDef<T>, T["_input"] | undefined> {
836 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
837 removeDefault(): T;
838 static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
839 errorMap?: ZodErrorMap | undefined;
840 invalid_type_error?: string | undefined;
841 required_error?: string | undefined;
842 description?: string | undefined;
843 } & {
844 default: T_1["_input"] | (() => util.noUndefined<T_1["_input"]>);
845 }) => ZodDefault<T_1>;
846}
847interface ZodCatchDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
848 innerType: T;
849 defaultValue: () => T["_input"];
850 typeName: ZodFirstPartyTypeKind.ZodCatch;
851}
852declare class ZodCatch<T extends ZodTypeAny> extends ZodType<util.noUndefined<T["_output"]>, ZodCatchDef<T>, T["_input"] | undefined> {
853 _parse(input: ParseInput): ParseReturnType<this["_output"]>;
854 removeDefault(): T;
855 static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
856 errorMap?: ZodErrorMap | undefined;
857 invalid_type_error?: string | undefined;
858 required_error?: string | undefined;
859 description?: string | undefined;
860 } & {
861 default: T_1["_input"] | (() => T_1["_input"]);
862 }) => ZodCatch<T_1>;
863}
864interface ZodBrandedDef<T extends ZodTypeAny> extends ZodTypeDef {
865 type: T;
866 typeName: ZodFirstPartyTypeKind.ZodBranded;
867}
868declare const BRAND: unique symbol;
869declare type BRAND<T extends string | number | symbol> = {
870 [BRAND]: {
871 [k in T]: true;
872 };
873};
874declare class ZodBranded<T extends ZodTypeAny, B extends string | number | symbol> extends ZodType<T["_output"] & BRAND<B>, ZodBrandedDef<T>, T["_input"]> {
875 _parse(input: ParseInput): ParseReturnType<any>;
876 unwrap(): T;
877}
878interface ZodPipelineDef<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodTypeDef {
879 in: A;
880 out: B;
881 typeName: ZodFirstPartyTypeKind.ZodPipeline;
882}
883declare class ZodPipeline<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodType<B["_output"], ZodPipelineDef<A, B>, A["_input"]> {
884 _parse(input: ParseInput): ParseReturnType<any>;
885 static create<A extends ZodTypeAny, B extends ZodTypeAny>(a: A, b: B): ZodPipeline<A, B>;
886}
887declare enum ZodFirstPartyTypeKind {
888 ZodString = "ZodString",
889 ZodNumber = "ZodNumber",
890 ZodNaN = "ZodNaN",
891 ZodBigInt = "ZodBigInt",
892 ZodBoolean = "ZodBoolean",
893 ZodDate = "ZodDate",
894 ZodSymbol = "ZodSymbol",
895 ZodUndefined = "ZodUndefined",
896 ZodNull = "ZodNull",
897 ZodAny = "ZodAny",
898 ZodUnknown = "ZodUnknown",
899 ZodNever = "ZodNever",
900 ZodVoid = "ZodVoid",
901 ZodArray = "ZodArray",
902 ZodObject = "ZodObject",
903 ZodUnion = "ZodUnion",
904 ZodDiscriminatedUnion = "ZodDiscriminatedUnion",
905 ZodIntersection = "ZodIntersection",
906 ZodTuple = "ZodTuple",
907 ZodRecord = "ZodRecord",
908 ZodMap = "ZodMap",
909 ZodSet = "ZodSet",
910 ZodFunction = "ZodFunction",
911 ZodLazy = "ZodLazy",
912 ZodLiteral = "ZodLiteral",
913 ZodEnum = "ZodEnum",
914 ZodEffects = "ZodEffects",
915 ZodNativeEnum = "ZodNativeEnum",
916 ZodOptional = "ZodOptional",
917 ZodNullable = "ZodNullable",
918 ZodDefault = "ZodDefault",
919 ZodCatch = "ZodCatch",
920 ZodPromise = "ZodPromise",
921 ZodBranded = "ZodBranded",
922 ZodPipeline = "ZodPipeline"
923}
924
925declare const literalSchema: ZodUnion<[ZodString, ZodNumber, ZodBoolean, ZodNull]>;
926type Literal = TypeOf<typeof literalSchema>;
927type Json = Literal | {
928 [key: string]: Json;
929} | Json[];
930declare const ItemRequestSchema: ZodObject<Pick<{
931 itemData: ZodArray<ZodObject<{
932 hash: ZodString;
933 hashType: ZodUnion<[ZodLiteral<"sha1">, ZodLiteral<"sha-256">, ZodLiteral<"sha-384">, ZodLiteral<"sha-512">]>;
934 people: ZodOptional<ZodArray<ZodObject<{
935 givenName: ZodOptional<ZodString>;
936 surname: ZodOptional<ZodString>;
937 organizationName: ZodOptional<ZodString>;
938 roles: ZodOptional<ZodArray<ZodString, "many">>;
939 email: ZodOptional<ZodString>;
940 uri: ZodOptional<ZodString>;
941 address: ZodOptional<ZodObject<{
942 streetNo: ZodOptional<ZodString>;
943 streetName: ZodOptional<ZodString>;
944 streetType: ZodOptional<ZodString>;
945 floor: ZodOptional<ZodString>;
946 town: ZodOptional<ZodString>;
947 region: ZodOptional<ZodString>;
948 postcode: ZodOptional<ZodString>;
949 countryCode: ZodOptional<ZodEffects<ZodString, string, string>>;
950 }, "strip", ZodTypeAny, {
951 streetNo?: string | undefined;
952 streetName?: string | undefined;
953 streetType?: string | undefined;
954 floor?: string | undefined;
955 town?: string | undefined;
956 region?: string | undefined;
957 postcode?: string | undefined;
958 countryCode?: string | undefined;
959 }, {
960 streetNo?: string | undefined;
961 streetName?: string | undefined;
962 streetType?: string | undefined;
963 floor?: string | undefined;
964 town?: string | undefined;
965 region?: string | undefined;
966 postcode?: string | undefined;
967 countryCode?: string | undefined;
968 }>>;
969 }, "strip", ZodTypeAny, {
970 givenName?: string | undefined;
971 surname?: string | undefined;
972 organizationName?: string | undefined;
973 roles?: string[] | undefined;
974 email?: string | undefined;
975 uri?: string | undefined;
976 address?: {
977 streetNo?: string | undefined;
978 streetName?: string | undefined;
979 streetType?: string | undefined;
980 floor?: string | undefined;
981 town?: string | undefined;
982 region?: string | undefined;
983 postcode?: string | undefined;
984 countryCode?: string | undefined;
985 } | undefined;
986 }, {
987 givenName?: string | undefined;
988 surname?: string | undefined;
989 organizationName?: string | undefined;
990 roles?: string[] | undefined;
991 email?: string | undefined;
992 uri?: string | undefined;
993 address?: {
994 streetNo?: string | undefined;
995 streetName?: string | undefined;
996 streetType?: string | undefined;
997 floor?: string | undefined;
998 town?: string | undefined;
999 region?: string | undefined;
1000 postcode?: string | undefined;
1001 countryCode?: string | undefined;
1002 } | undefined;
1003 }>, "many">>;
1004 description: ZodOptional<ZodString>;
1005 address: ZodOptional<ZodObject<{
1006 streetNo: ZodOptional<ZodString>;
1007 streetName: ZodOptional<ZodString>;
1008 streetType: ZodOptional<ZodString>;
1009 floor: ZodOptional<ZodString>;
1010 town: ZodOptional<ZodString>;
1011 region: ZodOptional<ZodString>;
1012 postcode: ZodOptional<ZodString>;
1013 countryCode: ZodOptional<ZodEffects<ZodString, string, string>>;
1014 }, "strip", ZodTypeAny, {
1015 streetNo?: string | undefined;
1016 streetName?: string | undefined;
1017 streetType?: string | undefined;
1018 floor?: string | undefined;
1019 town?: string | undefined;
1020 region?: string | undefined;
1021 postcode?: string | undefined;
1022 countryCode?: string | undefined;
1023 }, {
1024 streetNo?: string | undefined;
1025 streetName?: string | undefined;
1026 streetType?: string | undefined;
1027 floor?: string | undefined;
1028 town?: string | undefined;
1029 region?: string | undefined;
1030 postcode?: string | undefined;
1031 countryCode?: string | undefined;
1032 }>>;
1033 location: ZodOptional<ZodObject<{
1034 coordinate: ZodObject<{
1035 latitude: ZodEffects<ZodString, string, string>;
1036 longitude: ZodEffects<ZodString, string, string>;
1037 }, "strip", ZodTypeAny, {
1038 latitude: string;
1039 longitude: string;
1040 }, {
1041 latitude: string;
1042 longitude: string;
1043 }>;
1044 altitude: ZodOptional<ZodNumber>;
1045 ellipsoidalAltitude: ZodOptional<ZodNumber>;
1046 floor: ZodOptional<ZodNumber>;
1047 horizontalAccuracy: ZodOptional<ZodNumber>;
1048 verticalAccuracy: ZodOptional<ZodNumber>;
1049 timestamp: ZodOptional<ZodEffects<ZodString, string, string>>;
1050 speed: ZodOptional<ZodNumber>;
1051 speedAccuracy: ZodOptional<ZodNumber>;
1052 course: ZodOptional<ZodNumber>;
1053 courseAccuracy: ZodOptional<ZodNumber>;
1054 magneticHeading: ZodOptional<ZodNumber>;
1055 headingAccuracy: ZodOptional<ZodNumber>;
1056 trueHeading: ZodOptional<ZodNumber>;
1057 }, "strip", ZodTypeAny, {
1058 floor?: number | undefined;
1059 altitude?: number | undefined;
1060 ellipsoidalAltitude?: number | undefined;
1061 horizontalAccuracy?: number | undefined;
1062 verticalAccuracy?: number | undefined;
1063 timestamp?: string | undefined;
1064 speed?: number | undefined;
1065 speedAccuracy?: number | undefined;
1066 course?: number | undefined;
1067 courseAccuracy?: number | undefined;
1068 magneticHeading?: number | undefined;
1069 headingAccuracy?: number | undefined;
1070 trueHeading?: number | undefined;
1071 coordinate: {
1072 latitude: string;
1073 longitude: string;
1074 };
1075 }, {
1076 floor?: number | undefined;
1077 altitude?: number | undefined;
1078 ellipsoidalAltitude?: number | undefined;
1079 horizontalAccuracy?: number | undefined;
1080 verticalAccuracy?: number | undefined;
1081 timestamp?: string | undefined;
1082 speed?: number | undefined;
1083 speedAccuracy?: number | undefined;
1084 course?: number | undefined;
1085 courseAccuracy?: number | undefined;
1086 magneticHeading?: number | undefined;
1087 headingAccuracy?: number | undefined;
1088 trueHeading?: number | undefined;
1089 coordinate: {
1090 latitude: string;
1091 longitude: string;
1092 };
1093 }>>;
1094 timestamp: ZodOptional<ZodEffects<ZodString, string, string>>;
1095 extra: ZodOptional<ZodType<Json, ZodTypeDef, Json>>;
1096 }, "strip", ZodTypeAny, {
1097 timestamp?: string | undefined;
1098 address?: {
1099 streetNo?: string | undefined;
1100 streetName?: string | undefined;
1101 streetType?: string | undefined;
1102 floor?: string | undefined;
1103 town?: string | undefined;
1104 region?: string | undefined;
1105 postcode?: string | undefined;
1106 countryCode?: string | undefined;
1107 } | undefined;
1108 people?: {
1109 givenName?: string | undefined;
1110 surname?: string | undefined;
1111 organizationName?: string | undefined;
1112 roles?: string[] | undefined;
1113 email?: string | undefined;
1114 uri?: string | undefined;
1115 address?: {
1116 streetNo?: string | undefined;
1117 streetName?: string | undefined;
1118 streetType?: string | undefined;
1119 floor?: string | undefined;
1120 town?: string | undefined;
1121 region?: string | undefined;
1122 postcode?: string | undefined;
1123 countryCode?: string | undefined;
1124 } | undefined;
1125 }[] | undefined;
1126 description?: string | undefined;
1127 location?: {
1128 floor?: number | undefined;
1129 altitude?: number | undefined;
1130 ellipsoidalAltitude?: number | undefined;
1131 horizontalAccuracy?: number | undefined;
1132 verticalAccuracy?: number | undefined;
1133 timestamp?: string | undefined;
1134 speed?: number | undefined;
1135 speedAccuracy?: number | undefined;
1136 course?: number | undefined;
1137 courseAccuracy?: number | undefined;
1138 magneticHeading?: number | undefined;
1139 headingAccuracy?: number | undefined;
1140 trueHeading?: number | undefined;
1141 coordinate: {
1142 latitude: string;
1143 longitude: string;
1144 };
1145 } | undefined;
1146 extra?: Json | undefined;
1147 hash: string;
1148 hashType: "sha1" | "sha-256" | "sha-384" | "sha-512";
1149 }, {
1150 timestamp?: string | undefined;
1151 address?: {
1152 streetNo?: string | undefined;
1153 streetName?: string | undefined;
1154 streetType?: string | undefined;
1155 floor?: string | undefined;
1156 town?: string | undefined;
1157 region?: string | undefined;
1158 postcode?: string | undefined;
1159 countryCode?: string | undefined;
1160 } | undefined;
1161 people?: {
1162 givenName?: string | undefined;
1163 surname?: string | undefined;
1164 organizationName?: string | undefined;
1165 roles?: string[] | undefined;
1166 email?: string | undefined;
1167 uri?: string | undefined;
1168 address?: {
1169 streetNo?: string | undefined;
1170 streetName?: string | undefined;
1171 streetType?: string | undefined;
1172 floor?: string | undefined;
1173 town?: string | undefined;
1174 region?: string | undefined;
1175 postcode?: string | undefined;
1176 countryCode?: string | undefined;
1177 } | undefined;
1178 }[] | undefined;
1179 description?: string | undefined;
1180 location?: {
1181 floor?: number | undefined;
1182 altitude?: number | undefined;
1183 ellipsoidalAltitude?: number | undefined;
1184 horizontalAccuracy?: number | undefined;
1185 verticalAccuracy?: number | undefined;
1186 timestamp?: string | undefined;
1187 speed?: number | undefined;
1188 speedAccuracy?: number | undefined;
1189 course?: number | undefined;
1190 courseAccuracy?: number | undefined;
1191 magneticHeading?: number | undefined;
1192 headingAccuracy?: number | undefined;
1193 trueHeading?: number | undefined;
1194 coordinate: {
1195 latitude: string;
1196 longitude: string;
1197 };
1198 } | undefined;
1199 extra?: Json | undefined;
1200 hash: string;
1201 hashType: "sha1" | "sha-256" | "sha-384" | "sha-512";
1202 }>, "many">;
1203 itemSignals: ZodOptional<ZodObject<{
1204 cf: ZodOptional<ZodObject<{
1205 asn: ZodOptional<ZodNullable<ZodUnion<[ZodNumber, ZodString]>>>;
1206 colo: ZodOptional<ZodNullable<ZodString>>;
1207 country: ZodOptional<ZodNullable<ZodString>>;
1208 city: ZodOptional<ZodNullable<ZodString>>;
1209 continent: ZodOptional<ZodNullable<ZodString>>;
1210 latitude: ZodOptional<ZodNullable<ZodString>>;
1211 longitude: ZodOptional<ZodNullable<ZodString>>;
1212 postalCode: ZodOptional<ZodNullable<ZodString>>;
1213 metroCode: ZodOptional<ZodNullable<ZodString>>;
1214 region: ZodOptional<ZodNullable<ZodString>>;
1215 regionCode: ZodOptional<ZodNullable<ZodString>>;
1216 timezone: ZodOptional<ZodNullable<ZodString>>;
1217 }, "strip", ZodTypeAny, {
1218 region?: string | null | undefined;
1219 latitude?: string | null | undefined;
1220 longitude?: string | null | undefined;
1221 asn?: string | number | null | undefined;
1222 colo?: string | null | undefined;
1223 country?: string | null | undefined;
1224 city?: string | null | undefined;
1225 continent?: string | null | undefined;
1226 postalCode?: string | null | undefined;
1227 metroCode?: string | null | undefined;
1228 regionCode?: string | null | undefined;
1229 timezone?: string | null | undefined;
1230 }, {
1231 region?: string | null | undefined;
1232 latitude?: string | null | undefined;
1233 longitude?: string | null | undefined;
1234 asn?: string | number | null | undefined;
1235 colo?: string | null | undefined;
1236 country?: string | null | undefined;
1237 city?: string | null | undefined;
1238 continent?: string | null | undefined;
1239 postalCode?: string | null | undefined;
1240 metroCode?: string | null | undefined;
1241 regionCode?: string | null | undefined;
1242 timezone?: string | null | undefined;
1243 }>>;
1244 observableEntropy: ZodOptional<ZodString>;
1245 submittedAt: ZodEffects<ZodString, string, string>;
1246 }, "strip", ZodTypeAny, {
1247 cf?: {
1248 region?: string | null | undefined;
1249 latitude?: string | null | undefined;
1250 longitude?: string | null | undefined;
1251 asn?: string | number | null | undefined;
1252 colo?: string | null | undefined;
1253 country?: string | null | undefined;
1254 city?: string | null | undefined;
1255 continent?: string | null | undefined;
1256 postalCode?: string | null | undefined;
1257 metroCode?: string | null | undefined;
1258 regionCode?: string | null | undefined;
1259 timezone?: string | null | undefined;
1260 } | undefined;
1261 observableEntropy?: string | undefined;
1262 submittedAt: string;
1263 }, {
1264 cf?: {
1265 region?: string | null | undefined;
1266 latitude?: string | null | undefined;
1267 longitude?: string | null | undefined;
1268 asn?: string | number | null | undefined;
1269 colo?: string | null | undefined;
1270 country?: string | null | undefined;
1271 city?: string | null | undefined;
1272 continent?: string | null | undefined;
1273 postalCode?: string | null | undefined;
1274 metroCode?: string | null | undefined;
1275 regionCode?: string | null | undefined;
1276 timezone?: string | null | undefined;
1277 } | undefined;
1278 observableEntropy?: string | undefined;
1279 submittedAt: string;
1280 }>>;
1281 itemDataSignatures: ZodOptional<ZodArray<ZodObject<{
1282 publicKey: ZodEffects<ZodString, string, string>;
1283 signature: ZodEffects<ZodString, string, string>;
1284 signatureType: ZodLiteral<"ed25519">;
1285 signer: ZodOptional<ZodObject<{
1286 givenName: ZodOptional<ZodString>;
1287 surname: ZodOptional<ZodString>;
1288 organizationName: ZodOptional<ZodString>;
1289 roles: ZodOptional<ZodArray<ZodString, "many">>;
1290 email: ZodOptional<ZodString>;
1291 uri: ZodOptional<ZodString>;
1292 address: ZodOptional<ZodObject<{
1293 streetNo: ZodOptional<ZodString>;
1294 streetName: ZodOptional<ZodString>;
1295 streetType: ZodOptional<ZodString>;
1296 floor: ZodOptional<ZodString>;
1297 town: ZodOptional<ZodString>;
1298 region: ZodOptional<ZodString>;
1299 postcode: ZodOptional<ZodString>;
1300 countryCode: ZodOptional<ZodEffects<ZodString, string, string>>;
1301 }, "strip", ZodTypeAny, {
1302 streetNo?: string | undefined;
1303 streetName?: string | undefined;
1304 streetType?: string | undefined;
1305 floor?: string | undefined;
1306 town?: string | undefined;
1307 region?: string | undefined;
1308 postcode?: string | undefined;
1309 countryCode?: string | undefined;
1310 }, {
1311 streetNo?: string | undefined;
1312 streetName?: string | undefined;
1313 streetType?: string | undefined;
1314 floor?: string | undefined;
1315 town?: string | undefined;
1316 region?: string | undefined;
1317 postcode?: string | undefined;
1318 countryCode?: string | undefined;
1319 }>>;
1320 }, "strip", ZodTypeAny, {
1321 givenName?: string | undefined;
1322 surname?: string | undefined;
1323 organizationName?: string | undefined;
1324 roles?: string[] | undefined;
1325 email?: string | undefined;
1326 uri?: string | undefined;
1327 address?: {
1328 streetNo?: string | undefined;
1329 streetName?: string | undefined;
1330 streetType?: string | undefined;
1331 floor?: string | undefined;
1332 town?: string | undefined;
1333 region?: string | undefined;
1334 postcode?: string | undefined;
1335 countryCode?: string | undefined;
1336 } | undefined;
1337 }, {
1338 givenName?: string | undefined;
1339 surname?: string | undefined;
1340 organizationName?: string | undefined;
1341 roles?: string[] | undefined;
1342 email?: string | undefined;
1343 uri?: string | undefined;
1344 address?: {
1345 streetNo?: string | undefined;
1346 streetName?: string | undefined;
1347 streetType?: string | undefined;
1348 floor?: string | undefined;
1349 town?: string | undefined;
1350 region?: string | undefined;
1351 postcode?: string | undefined;
1352 countryCode?: string | undefined;
1353 } | undefined;
1354 }>>;
1355 }, "strip", ZodTypeAny, {
1356 signer?: {
1357 givenName?: string | undefined;
1358 surname?: string | undefined;
1359 organizationName?: string | undefined;
1360 roles?: string[] | undefined;
1361 email?: string | undefined;
1362 uri?: string | undefined;
1363 address?: {
1364 streetNo?: string | undefined;
1365 streetName?: string | undefined;
1366 streetType?: string | undefined;
1367 floor?: string | undefined;
1368 town?: string | undefined;
1369 region?: string | undefined;
1370 postcode?: string | undefined;
1371 countryCode?: string | undefined;
1372 } | undefined;
1373 } | undefined;
1374 publicKey: string;
1375 signature: string;
1376 signatureType: "ed25519";
1377 }, {
1378 signer?: {
1379 givenName?: string | undefined;
1380 surname?: string | undefined;
1381 organizationName?: string | undefined;
1382 roles?: string[] | undefined;
1383 email?: string | undefined;
1384 uri?: string | undefined;
1385 address?: {
1386 streetNo?: string | undefined;
1387 streetName?: string | undefined;
1388 streetType?: string | undefined;
1389 floor?: string | undefined;
1390 town?: string | undefined;
1391 region?: string | undefined;
1392 postcode?: string | undefined;
1393 countryCode?: string | undefined;
1394 } | undefined;
1395 } | undefined;
1396 publicKey: string;
1397 signature: string;
1398 signatureType: "ed25519";
1399 }>, "many">>;
1400}, "itemData" | "itemDataSignatures">, "strip", ZodTypeAny, {
1401 itemDataSignatures?: {
1402 signer?: {
1403 givenName?: string | undefined;
1404 surname?: string | undefined;
1405 organizationName?: string | undefined;
1406 roles?: string[] | undefined;
1407 email?: string | undefined;
1408 uri?: string | undefined;
1409 address?: {
1410 streetNo?: string | undefined;
1411 streetName?: string | undefined;
1412 streetType?: string | undefined;
1413 floor?: string | undefined;
1414 town?: string | undefined;
1415 region?: string | undefined;
1416 postcode?: string | undefined;
1417 countryCode?: string | undefined;
1418 } | undefined;
1419 } | undefined;
1420 publicKey: string;
1421 signature: string;
1422 signatureType: "ed25519";
1423 }[] | undefined;
1424 itemData: {
1425 timestamp?: string | undefined;
1426 address?: {
1427 streetNo?: string | undefined;
1428 streetName?: string | undefined;
1429 streetType?: string | undefined;
1430 floor?: string | undefined;
1431 town?: string | undefined;
1432 region?: string | undefined;
1433 postcode?: string | undefined;
1434 countryCode?: string | undefined;
1435 } | undefined;
1436 people?: {
1437 givenName?: string | undefined;
1438 surname?: string | undefined;
1439 organizationName?: string | undefined;
1440 roles?: string[] | undefined;
1441 email?: string | undefined;
1442 uri?: string | undefined;
1443 address?: {
1444 streetNo?: string | undefined;
1445 streetName?: string | undefined;
1446 streetType?: string | undefined;
1447 floor?: string | undefined;
1448 town?: string | undefined;
1449 region?: string | undefined;
1450 postcode?: string | undefined;
1451 countryCode?: string | undefined;
1452 } | undefined;
1453 }[] | undefined;
1454 description?: string | undefined;
1455 location?: {
1456 floor?: number | undefined;
1457 altitude?: number | undefined;
1458 ellipsoidalAltitude?: number | undefined;
1459 horizontalAccuracy?: number | undefined;
1460 verticalAccuracy?: number | undefined;
1461 timestamp?: string | undefined;
1462 speed?: number | undefined;
1463 speedAccuracy?: number | undefined;
1464 course?: number | undefined;
1465 courseAccuracy?: number | undefined;
1466 magneticHeading?: number | undefined;
1467 headingAccuracy?: number | undefined;
1468 trueHeading?: number | undefined;
1469 coordinate: {
1470 latitude: string;
1471 longitude: string;
1472 };
1473 } | undefined;
1474 extra?: Json | undefined;
1475 hash: string;
1476 hashType: "sha1" | "sha-256" | "sha-384" | "sha-512";
1477 }[];
1478}, {
1479 itemDataSignatures?: {
1480 signer?: {
1481 givenName?: string | undefined;
1482 surname?: string | undefined;
1483 organizationName?: string | undefined;
1484 roles?: string[] | undefined;
1485 email?: string | undefined;
1486 uri?: string | undefined;
1487 address?: {
1488 streetNo?: string | undefined;
1489 streetName?: string | undefined;
1490 streetType?: string | undefined;
1491 floor?: string | undefined;
1492 town?: string | undefined;
1493 region?: string | undefined;
1494 postcode?: string | undefined;
1495 countryCode?: string | undefined;
1496 } | undefined;
1497 } | undefined;
1498 publicKey: string;
1499 signature: string;
1500 signatureType: "ed25519";
1501 }[] | undefined;
1502 itemData: {
1503 timestamp?: string | undefined;
1504 address?: {
1505 streetNo?: string | undefined;
1506 streetName?: string | undefined;
1507 streetType?: string | undefined;
1508 floor?: string | undefined;
1509 town?: string | undefined;
1510 region?: string | undefined;
1511 postcode?: string | undefined;
1512 countryCode?: string | undefined;
1513 } | undefined;
1514 people?: {
1515 givenName?: string | undefined;
1516 surname?: string | undefined;
1517 organizationName?: string | undefined;
1518 roles?: string[] | undefined;
1519 email?: string | undefined;
1520 uri?: string | undefined;
1521 address?: {
1522 streetNo?: string | undefined;
1523 streetName?: string | undefined;
1524 streetType?: string | undefined;
1525 floor?: string | undefined;
1526 town?: string | undefined;
1527 region?: string | undefined;
1528 postcode?: string | undefined;
1529 countryCode?: string | undefined;
1530 } | undefined;
1531 }[] | undefined;
1532 description?: string | undefined;
1533 location?: {
1534 floor?: number | undefined;
1535 altitude?: number | undefined;
1536 ellipsoidalAltitude?: number | undefined;
1537 horizontalAccuracy?: number | undefined;
1538 verticalAccuracy?: number | undefined;
1539 timestamp?: string | undefined;
1540 speed?: number | undefined;
1541 speedAccuracy?: number | undefined;
1542 course?: number | undefined;
1543 courseAccuracy?: number | undefined;
1544 magneticHeading?: number | undefined;
1545 headingAccuracy?: number | undefined;
1546 trueHeading?: number | undefined;
1547 coordinate: {
1548 latitude: string;
1549 longitude: string;
1550 };
1551 } | undefined;
1552 extra?: Json | undefined;
1553 hash: string;
1554 hashType: "sha1" | "sha-256" | "sha-384" | "sha-512";
1555 }[];
1556}>;
1557type ItemRequest = TypeOf<typeof ItemRequestSchema>;
1558declare const ItemResponseSchema: ZodObject<{
1559 id: ZodEffects<ZodString, string, string>;
1560}, "strip", ZodTypeAny, {
1561 id: string;
1562}, {
1563 id: string;
1564}>;
1565type ItemResponse = TypeOf<typeof ItemResponseSchema>;
1566declare const HealthResponseSchema: ZodObject<{
1567 status: ZodUnion<[ZodLiteral<"pass">, ZodLiteral<"fail">]>;
1568 description: ZodOptional<ZodString>;
1569 checks: ZodOptional<ZodObject<{
1570 uptime: ZodOptional<ZodArray<ZodObject<{
1571 status: ZodLiteral<"pass">;
1572 componentType: ZodString;
1573 time: ZodString;
1574 }, "strip", ZodTypeAny, {
1575 status: "pass";
1576 componentType: string;
1577 time: string;
1578 }, {
1579 status: "pass";
1580 componentType: string;
1581 time: string;
1582 }>, "many">>;
1583 }, "strip", ZodTypeAny, {
1584 uptime?: {
1585 status: "pass";
1586 componentType: string;
1587 time: string;
1588 }[] | undefined;
1589 }, {
1590 uptime?: {
1591 status: "pass";
1592 componentType: string;
1593 time: string;
1594 }[] | undefined;
1595 }>>;
1596 links: ZodOptional<ZodArray<ZodString, "many">>;
1597}, "strip", ZodTypeAny, {
1598 description?: string | undefined;
1599 checks?: {
1600 uptime?: {
1601 status: "pass";
1602 componentType: string;
1603 time: string;
1604 }[] | undefined;
1605 } | undefined;
1606 links?: string[] | undefined;
1607 status: "pass" | "fail";
1608}, {
1609 description?: string | undefined;
1610 checks?: {
1611 uptime?: {
1612 status: "pass";
1613 componentType: string;
1614 time: string;
1615 }[] | undefined;
1616 } | undefined;
1617 links?: string[] | undefined;
1618 status: "pass" | "fail";
1619}>;
1620type HealthResponse = TypeOf<typeof HealthResponseSchema>;
1621declare const ApiKeyBodySchema: ZodObject<{
1622 refreshToken: ZodString;
1623 description: ZodOptional<ZodString>;
1624 ttl: ZodOptional<ZodNumber>;
1625}, "strip", ZodTypeAny, {
1626 description?: string | undefined;
1627 ttl?: number | undefined;
1628 refreshToken: string;
1629}, {
1630 description?: string | undefined;
1631 ttl?: number | undefined;
1632 refreshToken: string;
1633}>;
1634type ApiKeyBody = TypeOf<typeof ApiKeyBodySchema>;
1635declare const ApiKeyResponseSchema: ZodObject<{
1636 apiKey: ZodString;
1637 expiration: ZodString;
1638 description: ZodString;
1639}, "strip", ZodTypeAny, {
1640 description: string;
1641 apiKey: string;
1642 expiration: string;
1643}, {
1644 description: string;
1645 apiKey: string;
1646 expiration: string;
1647}>;
1648type ApiKeyResponse = TypeOf<typeof ApiKeyResponseSchema>;
1649declare const Commitment: ZodObject<{
1650 commitmentData: ZodObject<{
1651 id: ZodEffects<ZodString, string, string>;
1652 itemData: ZodArray<ZodObject<{
1653 hash: ZodString;
1654 hashType: ZodUnion<[ZodLiteral<"sha1">, ZodLiteral<"sha-256">, ZodLiteral<"sha-384">, ZodLiteral<"sha-512">]>;
1655 people: ZodOptional<ZodArray<ZodObject<{
1656 givenName: ZodOptional<ZodString>;
1657 surname: ZodOptional<ZodString>;
1658 organizationName: ZodOptional<ZodString>;
1659 roles: ZodOptional<ZodArray<ZodString, "many">>;
1660 email: ZodOptional<ZodString>;
1661 uri: ZodOptional<ZodString>;
1662 address: ZodOptional<ZodObject<{
1663 streetNo: ZodOptional<ZodString>;
1664 streetName: ZodOptional<ZodString>;
1665 streetType: ZodOptional<ZodString>;
1666 floor: ZodOptional<ZodString>;
1667 town: ZodOptional<ZodString>;
1668 region: ZodOptional<ZodString>;
1669 postcode: ZodOptional<ZodString>;
1670 countryCode: ZodOptional<ZodEffects<ZodString, string, string>>;
1671 }, "strip", ZodTypeAny, {
1672 streetNo?: string | undefined;
1673 streetName?: string | undefined;
1674 streetType?: string | undefined;
1675 floor?: string | undefined;
1676 town?: string | undefined;
1677 region?: string | undefined;
1678 postcode?: string | undefined;
1679 countryCode?: string | undefined;
1680 }, {
1681 streetNo?: string | undefined;
1682 streetName?: string | undefined;
1683 streetType?: string | undefined;
1684 floor?: string | undefined;
1685 town?: string | undefined;
1686 region?: string | undefined;
1687 postcode?: string | undefined;
1688 countryCode?: string | undefined;
1689 }>>;
1690 }, "strip", ZodTypeAny, {
1691 givenName?: string | undefined;
1692 surname?: string | undefined;
1693 organizationName?: string | undefined;
1694 roles?: string[] | undefined;
1695 email?: string | undefined;
1696 uri?: string | undefined;
1697 address?: {
1698 streetNo?: string | undefined;
1699 streetName?: string | undefined;
1700 streetType?: string | undefined;
1701 floor?: string | undefined;
1702 town?: string | undefined;
1703 region?: string | undefined;
1704 postcode?: string | undefined;
1705 countryCode?: string | undefined;
1706 } | undefined;
1707 }, {
1708 givenName?: string | undefined;
1709 surname?: string | undefined;
1710 organizationName?: string | undefined;
1711 roles?: string[] | undefined;
1712 email?: string | undefined;
1713 uri?: string | undefined;
1714 address?: {
1715 streetNo?: string | undefined;
1716 streetName?: string | undefined;
1717 streetType?: string | undefined;
1718 floor?: string | undefined;
1719 town?: string | undefined;
1720 region?: string | undefined;
1721 postcode?: string | undefined;
1722 countryCode?: string | undefined;
1723 } | undefined;
1724 }>, "many">>;
1725 description: ZodOptional<ZodString>;
1726 address: ZodOptional<ZodObject<{
1727 streetNo: ZodOptional<ZodString>;
1728 streetName: ZodOptional<ZodString>;
1729 streetType: ZodOptional<ZodString>;
1730 floor: ZodOptional<ZodString>;
1731 town: ZodOptional<ZodString>;
1732 region: ZodOptional<ZodString>;
1733 postcode: ZodOptional<ZodString>;
1734 countryCode: ZodOptional<ZodEffects<ZodString, string, string>>;
1735 }, "strip", ZodTypeAny, {
1736 streetNo?: string | undefined;
1737 streetName?: string | undefined;
1738 streetType?: string | undefined;
1739 floor?: string | undefined;
1740 town?: string | undefined;
1741 region?: string | undefined;
1742 postcode?: string | undefined;
1743 countryCode?: string | undefined;
1744 }, {
1745 streetNo?: string | undefined;
1746 streetName?: string | undefined;
1747 streetType?: string | undefined;
1748 floor?: string | undefined;
1749 town?: string | undefined;
1750 region?: string | undefined;
1751 postcode?: string | undefined;
1752 countryCode?: string | undefined;
1753 }>>;
1754 location: ZodOptional<ZodObject<{
1755 coordinate: ZodObject<{
1756 latitude: ZodEffects<ZodString, string, string>;
1757 longitude: ZodEffects<ZodString, string, string>;
1758 }, "strip", ZodTypeAny, {
1759 latitude: string;
1760 longitude: string;
1761 }, {
1762 latitude: string;
1763 longitude: string;
1764 }>;
1765 altitude: ZodOptional<ZodNumber>;
1766 ellipsoidalAltitude: ZodOptional<ZodNumber>;
1767 floor: ZodOptional<ZodNumber>;
1768 horizontalAccuracy: ZodOptional<ZodNumber>;
1769 verticalAccuracy: ZodOptional<ZodNumber>;
1770 timestamp: ZodOptional<ZodEffects<ZodString, string, string>>;
1771 speed: ZodOptional<ZodNumber>;
1772 speedAccuracy: ZodOptional<ZodNumber>;
1773 course: ZodOptional<ZodNumber>;
1774 courseAccuracy: ZodOptional<ZodNumber>;
1775 magneticHeading: ZodOptional<ZodNumber>;
1776 headingAccuracy: ZodOptional<ZodNumber>;
1777 trueHeading: ZodOptional<ZodNumber>;
1778 }, "strip", ZodTypeAny, {
1779 floor?: number | undefined;
1780 altitude?: number | undefined;
1781 ellipsoidalAltitude?: number | undefined;
1782 horizontalAccuracy?: number | undefined;
1783 verticalAccuracy?: number | undefined;
1784 timestamp?: string | undefined;
1785 speed?: number | undefined;
1786 speedAccuracy?: number | undefined;
1787 course?: number | undefined;
1788 courseAccuracy?: number | undefined;
1789 magneticHeading?: number | undefined;
1790 headingAccuracy?: number | undefined;
1791 trueHeading?: number | undefined;
1792 coordinate: {
1793 latitude: string;
1794 longitude: string;
1795 };
1796 }, {
1797 floor?: number | undefined;
1798 altitude?: number | undefined;
1799 ellipsoidalAltitude?: number | undefined;
1800 horizontalAccuracy?: number | undefined;
1801 verticalAccuracy?: number | undefined;
1802 timestamp?: string | undefined;
1803 speed?: number | undefined;
1804 speedAccuracy?: number | undefined;
1805 course?: number | undefined;
1806 courseAccuracy?: number | undefined;
1807 magneticHeading?: number | undefined;
1808 headingAccuracy?: number | undefined;
1809 trueHeading?: number | undefined;
1810 coordinate: {
1811 latitude: string;
1812 longitude: string;
1813 };
1814 }>>;
1815 timestamp: ZodOptional<ZodEffects<ZodString, string, string>>;
1816 extra: ZodOptional<ZodType<Json, ZodTypeDef, Json>>;
1817 }, "strip", ZodTypeAny, {
1818 timestamp?: string | undefined;
1819 address?: {
1820 streetNo?: string | undefined;
1821 streetName?: string | undefined;
1822 streetType?: string | undefined;
1823 floor?: string | undefined;
1824 town?: string | undefined;
1825 region?: string | undefined;
1826 postcode?: string | undefined;
1827 countryCode?: string | undefined;
1828 } | undefined;
1829 people?: {
1830 givenName?: string | undefined;
1831 surname?: string | undefined;
1832 organizationName?: string | undefined;
1833 roles?: string[] | undefined;
1834 email?: string | undefined;
1835 uri?: string | undefined;
1836 address?: {
1837 streetNo?: string | undefined;
1838 streetName?: string | undefined;
1839 streetType?: string | undefined;
1840 floor?: string | undefined;
1841 town?: string | undefined;
1842 region?: string | undefined;
1843 postcode?: string | undefined;
1844 countryCode?: string | undefined;
1845 } | undefined;
1846 }[] | undefined;
1847 description?: string | undefined;
1848 location?: {
1849 floor?: number | undefined;
1850 altitude?: number | undefined;
1851 ellipsoidalAltitude?: number | undefined;
1852 horizontalAccuracy?: number | undefined;
1853 verticalAccuracy?: number | undefined;
1854 timestamp?: string | undefined;
1855 speed?: number | undefined;
1856 speedAccuracy?: number | undefined;
1857 course?: number | undefined;
1858 courseAccuracy?: number | undefined;
1859 magneticHeading?: number | undefined;
1860 headingAccuracy?: number | undefined;
1861 trueHeading?: number | undefined;
1862 coordinate: {
1863 latitude: string;
1864 longitude: string;
1865 };
1866 } | undefined;
1867 extra?: Json | undefined;
1868 hash: string;
1869 hashType: "sha1" | "sha-256" | "sha-384" | "sha-512";
1870 }, {
1871 timestamp?: string | undefined;
1872 address?: {
1873 streetNo?: string | undefined;
1874 streetName?: string | undefined;
1875 streetType?: string | undefined;
1876 floor?: string | undefined;
1877 town?: string | undefined;
1878 region?: string | undefined;
1879 postcode?: string | undefined;
1880 countryCode?: string | undefined;
1881 } | undefined;
1882 people?: {
1883 givenName?: string | undefined;
1884 surname?: string | undefined;
1885 organizationName?: string | undefined;
1886 roles?: string[] | undefined;
1887 email?: string | undefined;
1888 uri?: string | undefined;
1889 address?: {
1890 streetNo?: string | undefined;
1891 streetName?: string | undefined;
1892 streetType?: string | undefined;
1893 floor?: string | undefined;
1894 town?: string | undefined;
1895 region?: string | undefined;
1896 postcode?: string | undefined;
1897 countryCode?: string | undefined;
1898 } | undefined;
1899 }[] | undefined;
1900 description?: string | undefined;
1901 location?: {
1902 floor?: number | undefined;
1903 altitude?: number | undefined;
1904 ellipsoidalAltitude?: number | undefined;
1905 horizontalAccuracy?: number | undefined;
1906 verticalAccuracy?: number | undefined;
1907 timestamp?: string | undefined;
1908 speed?: number | undefined;
1909 speedAccuracy?: number | undefined;
1910 course?: number | undefined;
1911 courseAccuracy?: number | undefined;
1912 magneticHeading?: number | undefined;
1913 headingAccuracy?: number | undefined;
1914 trueHeading?: number | undefined;
1915 coordinate: {
1916 latitude: string;
1917 longitude: string;
1918 };
1919 } | undefined;
1920 extra?: Json | undefined;
1921 hash: string;
1922 hashType: "sha1" | "sha-256" | "sha-384" | "sha-512";
1923 }>, "many">;
1924 itemDataSignatures: ZodOptional<ZodArray<ZodObject<{
1925 publicKey: ZodEffects<ZodString, string, string>;
1926 signature: ZodEffects<ZodString, string, string>;
1927 signatureType: ZodLiteral<"ed25519">;
1928 signer: ZodOptional<ZodObject<{
1929 givenName: ZodOptional<ZodString>;
1930 surname: ZodOptional<ZodString>;
1931 organizationName: ZodOptional<ZodString>;
1932 roles: ZodOptional<ZodArray<ZodString, "many">>;
1933 email: ZodOptional<ZodString>;
1934 uri: ZodOptional<ZodString>;
1935 address: ZodOptional<ZodObject<{
1936 streetNo: ZodOptional<ZodString>;
1937 streetName: ZodOptional<ZodString>;
1938 streetType: ZodOptional<ZodString>;
1939 floor: ZodOptional<ZodString>;
1940 town: ZodOptional<ZodString>;
1941 region: ZodOptional<ZodString>;
1942 postcode: ZodOptional<ZodString>;
1943 countryCode: ZodOptional<ZodEffects<ZodString, string, string>>;
1944 }, "strip", ZodTypeAny, {
1945 streetNo?: string | undefined;
1946 streetName?: string | undefined;
1947 streetType?: string | undefined;
1948 floor?: string | undefined;
1949 town?: string | undefined;
1950 region?: string | undefined;
1951 postcode?: string | undefined;
1952 countryCode?: string | undefined;
1953 }, {
1954 streetNo?: string | undefined;
1955 streetName?: string | undefined;
1956 streetType?: string | undefined;
1957 floor?: string | undefined;
1958 town?: string | undefined;
1959 region?: string | undefined;
1960 postcode?: string | undefined;
1961 countryCode?: string | undefined;
1962 }>>;
1963 }, "strip", ZodTypeAny, {
1964 givenName?: string | undefined;
1965 surname?: string | undefined;
1966 organizationName?: string | undefined;
1967 roles?: string[] | undefined;
1968 email?: string | undefined;
1969 uri?: string | undefined;
1970 address?: {
1971 streetNo?: string | undefined;
1972 streetName?: string | undefined;
1973 streetType?: string | undefined;
1974 floor?: string | undefined;
1975 town?: string | undefined;
1976 region?: string | undefined;
1977 postcode?: string | undefined;
1978 countryCode?: string | undefined;
1979 } | undefined;
1980 }, {
1981 givenName?: string | undefined;
1982 surname?: string | undefined;
1983 organizationName?: string | undefined;
1984 roles?: string[] | undefined;
1985 email?: string | undefined;
1986 uri?: string | undefined;
1987 address?: {
1988 streetNo?: string | undefined;
1989 streetName?: string | undefined;
1990 streetType?: string | undefined;
1991 floor?: string | undefined;
1992 town?: string | undefined;
1993 region?: string | undefined;
1994 postcode?: string | undefined;
1995 countryCode?: string | undefined;
1996 } | undefined;
1997 }>>;
1998 }, "strip", ZodTypeAny, {
1999 signer?: {
2000 givenName?: string | undefined;
2001 surname?: string | undefined;
2002 organizationName?: string | undefined;
2003 roles?: string[] | undefined;
2004 email?: string | undefined;
2005 uri?: string | undefined;
2006 address?: {
2007 streetNo?: string | undefined;
2008 streetName?: string | undefined;
2009 streetType?: string | undefined;
2010 floor?: string | undefined;
2011 town?: string | undefined;
2012 region?: string | undefined;
2013 postcode?: string | undefined;
2014 countryCode?: string | undefined;
2015 } | undefined;
2016 } | undefined;
2017 publicKey: string;
2018 signature: string;
2019 signatureType: "ed25519";
2020 }, {
2021 signer?: {
2022 givenName?: string | undefined;
2023 surname?: string | undefined;
2024 organizationName?: string | undefined;
2025 roles?: string[] | undefined;
2026 email?: string | undefined;
2027 uri?: string | undefined;
2028 address?: {
2029 streetNo?: string | undefined;
2030 streetName?: string | undefined;
2031 streetType?: string | undefined;
2032 floor?: string | undefined;
2033 town?: string | undefined;
2034 region?: string | undefined;
2035 postcode?: string | undefined;
2036 countryCode?: string | undefined;
2037 } | undefined;
2038 } | undefined;
2039 publicKey: string;
2040 signature: string;
2041 signatureType: "ed25519";
2042 }>, "many">>;
2043 itemSignals: ZodOptional<ZodObject<{
2044 cf: ZodOptional<ZodObject<{
2045 asn: ZodOptional<ZodNullable<ZodUnion<[ZodNumber, ZodString]>>>;
2046 colo: ZodOptional<ZodNullable<ZodString>>;
2047 country: ZodOptional<ZodNullable<ZodString>>;
2048 city: ZodOptional<ZodNullable<ZodString>>;
2049 continent: ZodOptional<ZodNullable<ZodString>>;
2050 latitude: ZodOptional<ZodNullable<ZodString>>;
2051 longitude: ZodOptional<ZodNullable<ZodString>>;
2052 postalCode: ZodOptional<ZodNullable<ZodString>>;
2053 metroCode: ZodOptional<ZodNullable<ZodString>>;
2054 region: ZodOptional<ZodNullable<ZodString>>;
2055 regionCode: ZodOptional<ZodNullable<ZodString>>;
2056 timezone: ZodOptional<ZodNullable<ZodString>>;
2057 }, "strip", ZodTypeAny, {
2058 region?: string | null | undefined;
2059 latitude?: string | null | undefined;
2060 longitude?: string | null | undefined;
2061 asn?: string | number | null | undefined;
2062 colo?: string | null | undefined;
2063 country?: string | null | undefined;
2064 city?: string | null | undefined;
2065 continent?: string | null | undefined;
2066 postalCode?: string | null | undefined;
2067 metroCode?: string | null | undefined;
2068 regionCode?: string | null | undefined;
2069 timezone?: string | null | undefined;
2070 }, {
2071 region?: string | null | undefined;
2072 latitude?: string | null | undefined;
2073 longitude?: string | null | undefined;
2074 asn?: string | number | null | undefined;
2075 colo?: string | null | undefined;
2076 country?: string | null | undefined;
2077 city?: string | null | undefined;
2078 continent?: string | null | undefined;
2079 postalCode?: string | null | undefined;
2080 metroCode?: string | null | undefined;
2081 regionCode?: string | null | undefined;
2082 timezone?: string | null | undefined;
2083 }>>;
2084 observableEntropy: ZodOptional<ZodString>;
2085 submittedAt: ZodEffects<ZodString, string, string>;
2086 }, "strip", ZodTypeAny, {
2087 cf?: {
2088 region?: string | null | undefined;
2089 latitude?: string | null | undefined;
2090 longitude?: string | null | undefined;
2091 asn?: string | number | null | undefined;
2092 colo?: string | null | undefined;
2093 country?: string | null | undefined;
2094 city?: string | null | undefined;
2095 continent?: string | null | undefined;
2096 postalCode?: string | null | undefined;
2097 metroCode?: string | null | undefined;
2098 regionCode?: string | null | undefined;
2099 timezone?: string | null | undefined;
2100 } | undefined;
2101 observableEntropy?: string | undefined;
2102 submittedAt: string;
2103 }, {
2104 cf?: {
2105 region?: string | null | undefined;
2106 latitude?: string | null | undefined;
2107 longitude?: string | null | undefined;
2108 asn?: string | number | null | undefined;
2109 colo?: string | null | undefined;
2110 country?: string | null | undefined;
2111 city?: string | null | undefined;
2112 continent?: string | null | undefined;
2113 postalCode?: string | null | undefined;
2114 metroCode?: string | null | undefined;
2115 regionCode?: string | null | undefined;
2116 timezone?: string | null | undefined;
2117 } | undefined;
2118 observableEntropy?: string | undefined;
2119 submittedAt: string;
2120 }>>;
2121 proofs: ZodArray<ZodObject<{
2122 inputHash: ZodString;
2123 inclusionProof: ZodObject<{
2124 v: ZodNumber;
2125 h: ZodUnion<[ZodLiteral<"sha224">, ZodLiteral<"sha256">, ZodLiteral<"sha384">, ZodLiteral<"sha512">, ZodLiteral<"sha512_256">, ZodLiteral<"sha3_224">, ZodLiteral<"sha3_256">, ZodLiteral<"sha3_384">, ZodLiteral<"sha3_512">]>;
2126 p: ZodArray<ZodTuple<[ZodNumber, ZodString], null>, "many">;
2127 }, "strip", ZodTypeAny, {
2128 v: number;
2129 h: "sha224" | "sha256" | "sha384" | "sha512" | "sha512_256" | "sha3_224" | "sha3_256" | "sha3_384" | "sha3_512";
2130 p: [number, string][];
2131 }, {
2132 v: number;
2133 h: "sha224" | "sha256" | "sha384" | "sha512" | "sha512_256" | "sha3_224" | "sha3_256" | "sha3_384" | "sha3_512";
2134 p: [number, string][];
2135 }>;
2136 merkleRoot: ZodString;
2137 }, "strip", ZodTypeAny, {
2138 inputHash: string;
2139 inclusionProof: {
2140 v: number;
2141 h: "sha224" | "sha256" | "sha384" | "sha512" | "sha512_256" | "sha3_224" | "sha3_256" | "sha3_384" | "sha3_512";
2142 p: [number, string][];
2143 };
2144 merkleRoot: string;
2145 }, {
2146 inputHash: string;
2147 inclusionProof: {
2148 v: number;
2149 h: "sha224" | "sha256" | "sha384" | "sha512" | "sha512_256" | "sha3_224" | "sha3_256" | "sha3_384" | "sha3_512";
2150 p: [number, string][];
2151 };
2152 merkleRoot: string;
2153 }>, "many">;
2154 transactions: ZodRecord<ZodString, ZodArray<ZodDiscriminatedUnion<"intent", [ZodObject<extendShape<{
2155 inputHash: ZodString;
2156 }, {
2157 intent: ZodLiteral<"bitcoin">;
2158 hash: ZodString;
2159 }>, "strict", ZodTypeAny, {
2160 hash: string;
2161 inputHash: string;
2162 intent: "bitcoin";
2163 }, {
2164 hash: string;
2165 inputHash: string;
2166 intent: "bitcoin";
2167 }>, ZodObject<extendShape<{
2168 inputHash: ZodString;
2169 }, {
2170 intent: ZodLiteral<"ethereum">;
2171 hash: ZodString;
2172 }>, "strict", ZodTypeAny, {
2173 hash: string;
2174 inputHash: string;
2175 intent: "ethereum";
2176 }, {
2177 hash: string;
2178 inputHash: string;
2179 intent: "ethereum";
2180 }>, ZodObject<extendShape<{
2181 inputHash: ZodString;
2182 }, {
2183 intent: ZodLiteral<"stellar">;
2184 hash: ZodString;
2185 ledger: ZodNumber;
2186 }>, "strict", ZodTypeAny, {
2187 hash: string;
2188 inputHash: string;
2189 intent: "stellar";
2190 ledger: number;
2191 }, {
2192 hash: string;
2193 inputHash: string;
2194 intent: "stellar";
2195 ledger: number;
2196 }>]>, "many">>;
2197 }, "strip", ZodTypeAny, {
2198 itemSignals?: {
2199 cf?: {
2200 region?: string | null | undefined;
2201 latitude?: string | null | undefined;
2202 longitude?: string | null | undefined;
2203 asn?: string | number | null | undefined;
2204 colo?: string | null | undefined;
2205 country?: string | null | undefined;
2206 city?: string | null | undefined;
2207 continent?: string | null | undefined;
2208 postalCode?: string | null | undefined;
2209 metroCode?: string | null | undefined;
2210 regionCode?: string | null | undefined;
2211 timezone?: string | null | undefined;
2212 } | undefined;
2213 observableEntropy?: string | undefined;
2214 submittedAt: string;
2215 } | undefined;
2216 itemDataSignatures?: {
2217 signer?: {
2218 givenName?: string | undefined;
2219 surname?: string | undefined;
2220 organizationName?: string | undefined;
2221 roles?: string[] | undefined;
2222 email?: string | undefined;
2223 uri?: string | undefined;
2224 address?: {
2225 streetNo?: string | undefined;
2226 streetName?: string | undefined;
2227 streetType?: string | undefined;
2228 floor?: string | undefined;
2229 town?: string | undefined;
2230 region?: string | undefined;
2231 postcode?: string | undefined;
2232 countryCode?: string | undefined;
2233 } | undefined;
2234 } | undefined;
2235 publicKey: string;
2236 signature: string;
2237 signatureType: "ed25519";
2238 }[] | undefined;
2239 itemData: {
2240 timestamp?: string | undefined;
2241 address?: {
2242 streetNo?: string | undefined;
2243 streetName?: string | undefined;
2244 streetType?: string | undefined;
2245 floor?: string | undefined;
2246 town?: string | undefined;
2247 region?: string | undefined;
2248 postcode?: string | undefined;
2249 countryCode?: string | undefined;
2250 } | undefined;
2251 people?: {
2252 givenName?: string | undefined;
2253 surname?: string | undefined;
2254 organizationName?: string | undefined;
2255 roles?: string[] | undefined;
2256 email?: string | undefined;
2257 uri?: string | undefined;
2258 address?: {
2259 streetNo?: string | undefined;
2260 streetName?: string | undefined;
2261 streetType?: string | undefined;
2262 floor?: string | undefined;
2263 town?: string | undefined;
2264 region?: string | undefined;
2265 postcode?: string | undefined;
2266 countryCode?: string | undefined;
2267 } | undefined;
2268 }[] | undefined;
2269 description?: string | undefined;
2270 location?: {
2271 floor?: number | undefined;
2272 altitude?: number | undefined;
2273 ellipsoidalAltitude?: number | undefined;
2274 horizontalAccuracy?: number | undefined;
2275 verticalAccuracy?: number | undefined;
2276 timestamp?: string | undefined;
2277 speed?: number | undefined;
2278 speedAccuracy?: number | undefined;
2279 course?: number | undefined;
2280 courseAccuracy?: number | undefined;
2281 magneticHeading?: number | undefined;
2282 headingAccuracy?: number | undefined;
2283 trueHeading?: number | undefined;
2284 coordinate: {
2285 latitude: string;
2286 longitude: string;
2287 };
2288 } | undefined;
2289 extra?: Json | undefined;
2290 hash: string;
2291 hashType: "sha1" | "sha-256" | "sha-384" | "sha-512";
2292 }[];
2293 id: string;
2294 proofs: {
2295 inputHash: string;
2296 inclusionProof: {
2297 v: number;
2298 h: "sha224" | "sha256" | "sha384" | "sha512" | "sha512_256" | "sha3_224" | "sha3_256" | "sha3_384" | "sha3_512";
2299 p: [number, string][];
2300 };
2301 merkleRoot: string;
2302 }[];
2303 transactions: Record<string, ({
2304 hash: string;
2305 inputHash: string;
2306 intent: "bitcoin";
2307 } | {
2308 hash: string;
2309 inputHash: string;
2310 intent: "ethereum";
2311 } | {
2312 hash: string;
2313 inputHash: string;
2314 intent: "stellar";
2315 ledger: number;
2316 })[]>;
2317 }, {
2318 itemSignals?: {
2319 cf?: {
2320 region?: string | null | undefined;
2321 latitude?: string | null | undefined;
2322 longitude?: string | null | undefined;
2323 asn?: string | number | null | undefined;
2324 colo?: string | null | undefined;
2325 country?: string | null | undefined;
2326 city?: string | null | undefined;
2327 continent?: string | null | undefined;
2328 postalCode?: string | null | undefined;
2329 metroCode?: string | null | undefined;
2330 regionCode?: string | null | undefined;
2331 timezone?: string | null | undefined;
2332 } | undefined;
2333 observableEntropy?: string | undefined;
2334 submittedAt: string;
2335 } | undefined;
2336 itemDataSignatures?: {
2337 signer?: {
2338 givenName?: string | undefined;
2339 surname?: string | undefined;
2340 organizationName?: string | undefined;
2341 roles?: string[] | undefined;
2342 email?: string | undefined;
2343 uri?: string | undefined;
2344 address?: {
2345 streetNo?: string | undefined;
2346 streetName?: string | undefined;
2347 streetType?: string | undefined;
2348 floor?: string | undefined;
2349 town?: string | undefined;
2350 region?: string | undefined;
2351 postcode?: string | undefined;
2352 countryCode?: string | undefined;
2353 } | undefined;
2354 } | undefined;
2355 publicKey: string;
2356 signature: string;
2357 signatureType: "ed25519";
2358 }[] | undefined;
2359 itemData: {
2360 timestamp?: string | undefined;
2361 address?: {
2362 streetNo?: string | undefined;
2363 streetName?: string | undefined;
2364 streetType?: string | undefined;
2365 floor?: string | undefined;
2366 town?: string | undefined;
2367 region?: string | undefined;
2368 postcode?: string | undefined;
2369 countryCode?: string | undefined;
2370 } | undefined;
2371 people?: {
2372 givenName?: string | undefined;
2373 surname?: string | undefined;
2374 organizationName?: string | undefined;
2375 roles?: string[] | undefined;
2376 email?: string | undefined;
2377 uri?: string | undefined;
2378 address?: {
2379 streetNo?: string | undefined;
2380 streetName?: string | undefined;
2381 streetType?: string | undefined;
2382 floor?: string | undefined;
2383 town?: string | undefined;
2384 region?: string | undefined;
2385 postcode?: string | undefined;
2386 countryCode?: string | undefined;
2387 } | undefined;
2388 }[] | undefined;
2389 description?: string | undefined;
2390 location?: {
2391 floor?: number | undefined;
2392 altitude?: number | undefined;
2393 ellipsoidalAltitude?: number | undefined;
2394 horizontalAccuracy?: number | undefined;
2395 verticalAccuracy?: number | undefined;
2396 timestamp?: string | undefined;
2397 speed?: number | undefined;
2398 speedAccuracy?: number | undefined;
2399 course?: number | undefined;
2400 courseAccuracy?: number | undefined;
2401 magneticHeading?: number | undefined;
2402 headingAccuracy?: number | undefined;
2403 trueHeading?: number | undefined;
2404 coordinate: {
2405 latitude: string;
2406 longitude: string;
2407 };
2408 } | undefined;
2409 extra?: Json | undefined;
2410 hash: string;
2411 hashType: "sha1" | "sha-256" | "sha-384" | "sha-512";
2412 }[];
2413 id: string;
2414 proofs: {
2415 inputHash: string;
2416 inclusionProof: {
2417 v: number;
2418 h: "sha224" | "sha256" | "sha384" | "sha512" | "sha512_256" | "sha3_224" | "sha3_256" | "sha3_384" | "sha3_512";
2419 p: [number, string][];
2420 };
2421 merkleRoot: string;
2422 }[];
2423 transactions: Record<string, ({
2424 hash: string;
2425 inputHash: string;
2426 intent: "bitcoin";
2427 } | {
2428 hash: string;
2429 inputHash: string;
2430 intent: "ethereum";
2431 } | {
2432 hash: string;
2433 inputHash: string;
2434 intent: "stellar";
2435 ledger: number;
2436 })[]>;
2437 }>;
2438 commitmentDataSignatures: ZodArray<ZodObject<{
2439 publicKey: ZodEffects<ZodString, string, string>;
2440 signature: ZodEffects<ZodString, string, string>;
2441 signatureType: ZodLiteral<"ed25519">;
2442 signer: ZodOptional<ZodObject<{
2443 givenName: ZodOptional<ZodString>;
2444 surname: ZodOptional<ZodString>;
2445 organizationName: ZodOptional<ZodString>;
2446 roles: ZodOptional<ZodArray<ZodString, "many">>;
2447 email: ZodOptional<ZodString>;
2448 uri: ZodOptional<ZodString>;
2449 address: ZodOptional<ZodObject<{
2450 streetNo: ZodOptional<ZodString>;
2451 streetName: ZodOptional<ZodString>;
2452 streetType: ZodOptional<ZodString>;
2453 floor: ZodOptional<ZodString>;
2454 town: ZodOptional<ZodString>;
2455 region: ZodOptional<ZodString>;
2456 postcode: ZodOptional<ZodString>;
2457 countryCode: ZodOptional<ZodEffects<ZodString, string, string>>;
2458 }, "strip", ZodTypeAny, {
2459 streetNo?: string | undefined;
2460 streetName?: string | undefined;
2461 streetType?: string | undefined;
2462 floor?: string | undefined;
2463 town?: string | undefined;
2464 region?: string | undefined;
2465 postcode?: string | undefined;
2466 countryCode?: string | undefined;
2467 }, {
2468 streetNo?: string | undefined;
2469 streetName?: string | undefined;
2470 streetType?: string | undefined;
2471 floor?: string | undefined;
2472 town?: string | undefined;
2473 region?: string | undefined;
2474 postcode?: string | undefined;
2475 countryCode?: string | undefined;
2476 }>>;
2477 }, "strip", ZodTypeAny, {
2478 givenName?: string | undefined;
2479 surname?: string | undefined;
2480 organizationName?: string | undefined;
2481 roles?: string[] | undefined;
2482 email?: string | undefined;
2483 uri?: string | undefined;
2484 address?: {
2485 streetNo?: string | undefined;
2486 streetName?: string | undefined;
2487 streetType?: string | undefined;
2488 floor?: string | undefined;
2489 town?: string | undefined;
2490 region?: string | undefined;
2491 postcode?: string | undefined;
2492 countryCode?: string | undefined;
2493 } | undefined;
2494 }, {
2495 givenName?: string | undefined;
2496 surname?: string | undefined;
2497 organizationName?: string | undefined;
2498 roles?: string[] | undefined;
2499 email?: string | undefined;
2500 uri?: string | undefined;
2501 address?: {
2502 streetNo?: string | undefined;
2503 streetName?: string | undefined;
2504 streetType?: string | undefined;
2505 floor?: string | undefined;
2506 town?: string | undefined;
2507 region?: string | undefined;
2508 postcode?: string | undefined;
2509 countryCode?: string | undefined;
2510 } | undefined;
2511 }>>;
2512 }, "strip", ZodTypeAny, {
2513 signer?: {
2514 givenName?: string | undefined;
2515 surname?: string | undefined;
2516 organizationName?: string | undefined;
2517 roles?: string[] | undefined;
2518 email?: string | undefined;
2519 uri?: string | undefined;
2520 address?: {
2521 streetNo?: string | undefined;
2522 streetName?: string | undefined;
2523 streetType?: string | undefined;
2524 floor?: string | undefined;
2525 town?: string | undefined;
2526 region?: string | undefined;
2527 postcode?: string | undefined;
2528 countryCode?: string | undefined;
2529 } | undefined;
2530 } | undefined;
2531 publicKey: string;
2532 signature: string;
2533 signatureType: "ed25519";
2534 }, {
2535 signer?: {
2536 givenName?: string | undefined;
2537 surname?: string | undefined;
2538 organizationName?: string | undefined;
2539 roles?: string[] | undefined;
2540 email?: string | undefined;
2541 uri?: string | undefined;
2542 address?: {
2543 streetNo?: string | undefined;
2544 streetName?: string | undefined;
2545 streetType?: string | undefined;
2546 floor?: string | undefined;
2547 town?: string | undefined;
2548 region?: string | undefined;
2549 postcode?: string | undefined;
2550 countryCode?: string | undefined;
2551 } | undefined;
2552 } | undefined;
2553 publicKey: string;
2554 signature: string;
2555 signatureType: "ed25519";
2556 }>, "many">;
2557}, "strip", ZodTypeAny, {
2558 commitmentData: {
2559 itemSignals?: {
2560 cf?: {
2561 region?: string | null | undefined;
2562 latitude?: string | null | undefined;
2563 longitude?: string | null | undefined;
2564 asn?: string | number | null | undefined;
2565 colo?: string | null | undefined;
2566 country?: string | null | undefined;
2567 city?: string | null | undefined;
2568 continent?: string | null | undefined;
2569 postalCode?: string | null | undefined;
2570 metroCode?: string | null | undefined;
2571 regionCode?: string | null | undefined;
2572 timezone?: string | null | undefined;
2573 } | undefined;
2574 observableEntropy?: string | undefined;
2575 submittedAt: string;
2576 } | undefined;
2577 itemDataSignatures?: {
2578 signer?: {
2579 givenName?: string | undefined;
2580 surname?: string | undefined;
2581 organizationName?: string | undefined;
2582 roles?: string[] | undefined;
2583 email?: string | undefined;
2584 uri?: string | undefined;
2585 address?: {
2586 streetNo?: string | undefined;
2587 streetName?: string | undefined;
2588 streetType?: string | undefined;
2589 floor?: string | undefined;
2590 town?: string | undefined;
2591 region?: string | undefined;
2592 postcode?: string | undefined;
2593 countryCode?: string | undefined;
2594 } | undefined;
2595 } | undefined;
2596 publicKey: string;
2597 signature: string;
2598 signatureType: "ed25519";
2599 }[] | undefined;
2600 itemData: {
2601 timestamp?: string | undefined;
2602 address?: {
2603 streetNo?: string | undefined;
2604 streetName?: string | undefined;
2605 streetType?: string | undefined;
2606 floor?: string | undefined;
2607 town?: string | undefined;
2608 region?: string | undefined;
2609 postcode?: string | undefined;
2610 countryCode?: string | undefined;
2611 } | undefined;
2612 people?: {
2613 givenName?: string | undefined;
2614 surname?: string | undefined;
2615 organizationName?: string | undefined;
2616 roles?: string[] | undefined;
2617 email?: string | undefined;
2618 uri?: string | undefined;
2619 address?: {
2620 streetNo?: string | undefined;
2621 streetName?: string | undefined;
2622 streetType?: string | undefined;
2623 floor?: string | undefined;
2624 town?: string | undefined;
2625 region?: string | undefined;
2626 postcode?: string | undefined;
2627 countryCode?: string | undefined;
2628 } | undefined;
2629 }[] | undefined;
2630 description?: string | undefined;
2631 location?: {
2632 floor?: number | undefined;
2633 altitude?: number | undefined;
2634 ellipsoidalAltitude?: number | undefined;
2635 horizontalAccuracy?: number | undefined;
2636 verticalAccuracy?: number | undefined;
2637 timestamp?: string | undefined;
2638 speed?: number | undefined;
2639 speedAccuracy?: number | undefined;
2640 course?: number | undefined;
2641 courseAccuracy?: number | undefined;
2642 magneticHeading?: number | undefined;
2643 headingAccuracy?: number | undefined;
2644 trueHeading?: number | undefined;
2645 coordinate: {
2646 latitude: string;
2647 longitude: string;
2648 };
2649 } | undefined;
2650 extra?: Json | undefined;
2651 hash: string;
2652 hashType: "sha1" | "sha-256" | "sha-384" | "sha-512";
2653 }[];
2654 id: string;
2655 proofs: {
2656 inputHash: string;
2657 inclusionProof: {
2658 v: number;
2659 h: "sha224" | "sha256" | "sha384" | "sha512" | "sha512_256" | "sha3_224" | "sha3_256" | "sha3_384" | "sha3_512";
2660 p: [number, string][];
2661 };
2662 merkleRoot: string;
2663 }[];
2664 transactions: Record<string, ({
2665 hash: string;
2666 inputHash: string;
2667 intent: "bitcoin";
2668 } | {
2669 hash: string;
2670 inputHash: string;
2671 intent: "ethereum";
2672 } | {
2673 hash: string;
2674 inputHash: string;
2675 intent: "stellar";
2676 ledger: number;
2677 })[]>;
2678 };
2679 commitmentDataSignatures: {
2680 signer?: {
2681 givenName?: string | undefined;
2682 surname?: string | undefined;
2683 organizationName?: string | undefined;
2684 roles?: string[] | undefined;
2685 email?: string | undefined;
2686 uri?: string | undefined;
2687 address?: {
2688 streetNo?: string | undefined;
2689 streetName?: string | undefined;
2690 streetType?: string | undefined;
2691 floor?: string | undefined;
2692 town?: string | undefined;
2693 region?: string | undefined;
2694 postcode?: string | undefined;
2695 countryCode?: string | undefined;
2696 } | undefined;
2697 } | undefined;
2698 publicKey: string;
2699 signature: string;
2700 signatureType: "ed25519";
2701 }[];
2702}, {
2703 commitmentData: {
2704 itemSignals?: {
2705 cf?: {
2706 region?: string | null | undefined;
2707 latitude?: string | null | undefined;
2708 longitude?: string | null | undefined;
2709 asn?: string | number | null | undefined;
2710 colo?: string | null | undefined;
2711 country?: string | null | undefined;
2712 city?: string | null | undefined;
2713 continent?: string | null | undefined;
2714 postalCode?: string | null | undefined;
2715 metroCode?: string | null | undefined;
2716 regionCode?: string | null | undefined;
2717 timezone?: string | null | undefined;
2718 } | undefined;
2719 observableEntropy?: string | undefined;
2720 submittedAt: string;
2721 } | undefined;
2722 itemDataSignatures?: {
2723 signer?: {
2724 givenName?: string | undefined;
2725 surname?: string | undefined;
2726 organizationName?: string | undefined;
2727 roles?: string[] | undefined;
2728 email?: string | undefined;
2729 uri?: string | undefined;
2730 address?: {
2731 streetNo?: string | undefined;
2732 streetName?: string | undefined;
2733 streetType?: string | undefined;
2734 floor?: string | undefined;
2735 town?: string | undefined;
2736 region?: string | undefined;
2737 postcode?: string | undefined;
2738 countryCode?: string | undefined;
2739 } | undefined;
2740 } | undefined;
2741 publicKey: string;
2742 signature: string;
2743 signatureType: "ed25519";
2744 }[] | undefined;
2745 itemData: {
2746 timestamp?: string | undefined;
2747 address?: {
2748 streetNo?: string | undefined;
2749 streetName?: string | undefined;
2750 streetType?: string | undefined;
2751 floor?: string | undefined;
2752 town?: string | undefined;
2753 region?: string | undefined;
2754 postcode?: string | undefined;
2755 countryCode?: string | undefined;
2756 } | undefined;
2757 people?: {
2758 givenName?: string | undefined;
2759 surname?: string | undefined;
2760 organizationName?: string | undefined;
2761 roles?: string[] | undefined;
2762 email?: string | undefined;
2763 uri?: string | undefined;
2764 address?: {
2765 streetNo?: string | undefined;
2766 streetName?: string | undefined;
2767 streetType?: string | undefined;
2768 floor?: string | undefined;
2769 town?: string | undefined;
2770 region?: string | undefined;
2771 postcode?: string | undefined;
2772 countryCode?: string | undefined;
2773 } | undefined;
2774 }[] | undefined;
2775 description?: string | undefined;
2776 location?: {
2777 floor?: number | undefined;
2778 altitude?: number | undefined;
2779 ellipsoidalAltitude?: number | undefined;
2780 horizontalAccuracy?: number | undefined;
2781 verticalAccuracy?: number | undefined;
2782 timestamp?: string | undefined;
2783 speed?: number | undefined;
2784 speedAccuracy?: number | undefined;
2785 course?: number | undefined;
2786 courseAccuracy?: number | undefined;
2787 magneticHeading?: number | undefined;
2788 headingAccuracy?: number | undefined;
2789 trueHeading?: number | undefined;
2790 coordinate: {
2791 latitude: string;
2792 longitude: string;
2793 };
2794 } | undefined;
2795 extra?: Json | undefined;
2796 hash: string;
2797 hashType: "sha1" | "sha-256" | "sha-384" | "sha-512";
2798 }[];
2799 id: string;
2800 proofs: {
2801 inputHash: string;
2802 inclusionProof: {
2803 v: number;
2804 h: "sha224" | "sha256" | "sha384" | "sha512" | "sha512_256" | "sha3_224" | "sha3_256" | "sha3_384" | "sha3_512";
2805 p: [number, string][];
2806 };
2807 merkleRoot: string;
2808 }[];
2809 transactions: Record<string, ({
2810 hash: string;
2811 inputHash: string;
2812 intent: "bitcoin";
2813 } | {
2814 hash: string;
2815 inputHash: string;
2816 intent: "ethereum";
2817 } | {
2818 hash: string;
2819 inputHash: string;
2820 intent: "stellar";
2821 ledger: number;
2822 })[]>;
2823 };
2824 commitmentDataSignatures: {
2825 signer?: {
2826 givenName?: string | undefined;
2827 surname?: string | undefined;
2828 organizationName?: string | undefined;
2829 roles?: string[] | undefined;
2830 email?: string | undefined;
2831 uri?: string | undefined;
2832 address?: {
2833 streetNo?: string | undefined;
2834 streetName?: string | undefined;
2835 streetType?: string | undefined;
2836 floor?: string | undefined;
2837 town?: string | undefined;
2838 region?: string | undefined;
2839 postcode?: string | undefined;
2840 countryCode?: string | undefined;
2841 } | undefined;
2842 } | undefined;
2843 publicKey: string;
2844 signature: string;
2845 signatureType: "ed25519";
2846 }[];
2847}>;
2848type Commitment = TypeOf<typeof Commitment>;
2849declare const CommitmentVerification: ZodObject<{
2850 verified: ZodBoolean;
2851 id: ZodOptional<ZodEffects<ZodString, string, string>>;
2852 idData: ZodOptional<ZodObject<{
2853 test: ZodBoolean;
2854 timestamp: ZodString;
2855 ulid: ZodString;
2856 }, "strip", ZodTypeAny, {
2857 timestamp: string;
2858 ulid: string;
2859 test: boolean;
2860 }, {
2861 timestamp: string;
2862 ulid: string;
2863 test: boolean;
2864 }>>;
2865 itemData: ZodOptional<ZodObject<{
2866 hash: ZodString;
2867 hashType: ZodUnion<[ZodLiteral<"sha1">, ZodLiteral<"sha-256">, ZodLiteral<"sha-384">, ZodLiteral<"sha-512">]>;
2868 signaturesCount: ZodOptional<ZodNumber>;
2869 }, "strip", ZodTypeAny, {
2870 signaturesCount?: number | undefined;
2871 hash: string;
2872 hashType: "sha1" | "sha-256" | "sha-384" | "sha-512";
2873 }, {
2874 signaturesCount?: number | undefined;
2875 hash: string;
2876 hashType: "sha1" | "sha-256" | "sha-384" | "sha-512";
2877 }>>;
2878 item: ZodOptional<ZodObject<{
2879 hash: ZodString;
2880 hashType: ZodLiteral<"sha-256">;
2881 }, "strip", ZodTypeAny, {
2882 hash: string;
2883 hashType: "sha-256";
2884 }, {
2885 hash: string;
2886 hashType: "sha-256";
2887 }>>;
2888 commitmentData: ZodOptional<ZodObject<{
2889 hash: ZodString;
2890 hashType: ZodLiteral<"sha-256">;
2891 signaturesCount: ZodOptional<ZodNumber>;
2892 }, "strip", ZodTypeAny, {
2893 signaturesCount?: number | undefined;
2894 hash: string;
2895 hashType: "sha-256";
2896 }, {
2897 signaturesCount?: number | undefined;
2898 hash: string;
2899 hashType: "sha-256";
2900 }>>;
2901 proofs: ZodOptional<ZodArray<ZodObject<{
2902 inputHash: ZodString;
2903 merkleRoot: ZodString;
2904 }, "strict", ZodTypeAny, {
2905 inputHash: string;
2906 merkleRoot: string;
2907 }, {
2908 inputHash: string;
2909 merkleRoot: string;
2910 }>, "many">>;
2911 transactions: ZodOptional<ZodArray<ZodObject<{
2912 intent: ZodUnion<[ZodLiteral<"bitcoin">, ZodLiteral<"ethereum">, ZodLiteral<"stellar">]>;
2913 verified: ZodBoolean;
2914 transaction: ZodDiscriminatedUnion<"intent", [ZodObject<extendShape<{
2915 inputHash: ZodString;
2916 }, {
2917 intent: ZodLiteral<"bitcoin">;
2918 hash: ZodString;
2919 }>, "strict", ZodTypeAny, {
2920 hash: string;
2921 inputHash: string;
2922 intent: "bitcoin";
2923 }, {
2924 hash: string;
2925 inputHash: string;
2926 intent: "bitcoin";
2927 }>, ZodObject<extendShape<{
2928 inputHash: ZodString;
2929 }, {
2930 intent: ZodLiteral<"ethereum">;
2931 hash: ZodString;
2932 }>, "strict", ZodTypeAny, {
2933 hash: string;
2934 inputHash: string;
2935 intent: "ethereum";
2936 }, {
2937 hash: string;
2938 inputHash: string;
2939 intent: "ethereum";
2940 }>, ZodObject<extendShape<{
2941 inputHash: ZodString;
2942 }, {
2943 intent: ZodLiteral<"stellar">;
2944 hash: ZodString;
2945 ledger: ZodNumber;
2946 }>, "strict", ZodTypeAny, {
2947 hash: string;
2948 inputHash: string;
2949 intent: "stellar";
2950 ledger: number;
2951 }, {
2952 hash: string;
2953 inputHash: string;
2954 intent: "stellar";
2955 ledger: number;
2956 }>]>;
2957 timestamp: ZodOptional<ZodEffects<ZodString, string, string>>;
2958 urls: ZodOptional<ZodObject<{
2959 machine: ZodOptional<ZodArray<ZodString, "many">>;
2960 human: ZodOptional<ZodArray<ZodString, "many">>;
2961 }, "strip", ZodTypeAny, {
2962 machine?: string[] | undefined;
2963 human?: string[] | undefined;
2964 }, {
2965 machine?: string[] | undefined;
2966 human?: string[] | undefined;
2967 }>>;
2968 error: ZodOptional<ZodString>;
2969 }, "strict", ZodTypeAny, {
2970 error?: string | undefined;
2971 timestamp?: string | undefined;
2972 urls?: {
2973 machine?: string[] | undefined;
2974 human?: string[] | undefined;
2975 } | undefined;
2976 intent: "bitcoin" | "ethereum" | "stellar";
2977 verified: boolean;
2978 transaction: {
2979 hash: string;
2980 inputHash: string;
2981 intent: "bitcoin";
2982 } | {
2983 hash: string;
2984 inputHash: string;
2985 intent: "ethereum";
2986 } | {
2987 hash: string;
2988 inputHash: string;
2989 intent: "stellar";
2990 ledger: number;
2991 };
2992 }, {
2993 error?: string | undefined;
2994 timestamp?: string | undefined;
2995 urls?: {
2996 machine?: string[] | undefined;
2997 human?: string[] | undefined;
2998 } | undefined;
2999 intent: "bitcoin" | "ethereum" | "stellar";
3000 verified: boolean;
3001 transaction: {
3002 hash: string;
3003 inputHash: string;
3004 intent: "bitcoin";
3005 } | {
3006 hash: string;
3007 inputHash: string;
3008 intent: "ethereum";
3009 } | {
3010 hash: string;
3011 inputHash: string;
3012 intent: "stellar";
3013 ledger: number;
3014 };
3015 }>, "many">>;
3016 commitsTo: ZodOptional<ZodObject<{
3017 hashes: ZodArray<ZodObject<{
3018 hash: ZodString;
3019 hashType: ZodString;
3020 }, "strip", ZodTypeAny, {
3021 hash: string;
3022 hashType: string;
3023 }, {
3024 hash: string;
3025 hashType: string;
3026 }>, "many">;
3027 observableEntropy: ZodOptional<ZodString>;
3028 timestamps: ZodObject<{
3029 submittedAfter: ZodOptional<ZodEffects<ZodString, string, string>>;
3030 submittedAt: ZodEffects<ZodString, string, string>;
3031 submittedBefore: ZodOptional<ZodArray<ZodString, "many">>;
3032 submitWindowMilliseconds: ZodOptional<ZodNumber>;
3033 }, "strip", ZodTypeAny, {
3034 submittedAfter?: string | undefined;
3035 submittedBefore?: string[] | undefined;
3036 submitWindowMilliseconds?: number | undefined;
3037 submittedAt: string;
3038 }, {
3039 submittedAfter?: string | undefined;
3040 submittedBefore?: string[] | undefined;
3041 submitWindowMilliseconds?: number | undefined;
3042 submittedAt: string;
3043 }>;
3044 }, "strip", ZodTypeAny, {
3045 observableEntropy?: string | undefined;
3046 hashes: {
3047 hash: string;
3048 hashType: string;
3049 }[];
3050 timestamps: {
3051 submittedAfter?: string | undefined;
3052 submittedBefore?: string[] | undefined;
3053 submitWindowMilliseconds?: number | undefined;
3054 submittedAt: string;
3055 };
3056 }, {
3057 observableEntropy?: string | undefined;
3058 hashes: {
3059 hash: string;
3060 hashType: string;
3061 }[];
3062 timestamps: {
3063 submittedAfter?: string | undefined;
3064 submittedBefore?: string[] | undefined;
3065 submitWindowMilliseconds?: number | undefined;
3066 submittedAt: string;
3067 };
3068 }>>;
3069 error: ZodOptional<ZodString>;
3070}, "strict", ZodTypeAny, {
3071 error?: string | undefined;
3072 itemData?: {
3073 signaturesCount?: number | undefined;
3074 hash: string;
3075 hashType: "sha1" | "sha-256" | "sha-384" | "sha-512";
3076 } | undefined;
3077 id?: string | undefined;
3078 item?: {
3079 hash: string;
3080 hashType: "sha-256";
3081 } | undefined;
3082 proofs?: {
3083 inputHash: string;
3084 merkleRoot: string;
3085 }[] | undefined;
3086 transactions?: {
3087 error?: string | undefined;
3088 timestamp?: string | undefined;
3089 urls?: {
3090 machine?: string[] | undefined;
3091 human?: string[] | undefined;
3092 } | undefined;
3093 intent: "bitcoin" | "ethereum" | "stellar";
3094 verified: boolean;
3095 transaction: {
3096 hash: string;
3097 inputHash: string;
3098 intent: "bitcoin";
3099 } | {
3100 hash: string;
3101 inputHash: string;
3102 intent: "ethereum";
3103 } | {
3104 hash: string;
3105 inputHash: string;
3106 intent: "stellar";
3107 ledger: number;
3108 };
3109 }[] | undefined;
3110 commitmentData?: {
3111 signaturesCount?: number | undefined;
3112 hash: string;
3113 hashType: "sha-256";
3114 } | undefined;
3115 idData?: {
3116 timestamp: string;
3117 ulid: string;
3118 test: boolean;
3119 } | undefined;
3120 commitsTo?: {
3121 observableEntropy?: string | undefined;
3122 hashes: {
3123 hash: string;
3124 hashType: string;
3125 }[];
3126 timestamps: {
3127 submittedAfter?: string | undefined;
3128 submittedBefore?: string[] | undefined;
3129 submitWindowMilliseconds?: number | undefined;
3130 submittedAt: string;
3131 };
3132 } | undefined;
3133 verified: boolean;
3134}, {
3135 error?: string | undefined;
3136 itemData?: {
3137 signaturesCount?: number | undefined;
3138 hash: string;
3139 hashType: "sha1" | "sha-256" | "sha-384" | "sha-512";
3140 } | undefined;
3141 id?: string | undefined;
3142 item?: {
3143 hash: string;
3144 hashType: "sha-256";
3145 } | undefined;
3146 proofs?: {
3147 inputHash: string;
3148 merkleRoot: string;
3149 }[] | undefined;
3150 transactions?: {
3151 error?: string | undefined;
3152 timestamp?: string | undefined;
3153 urls?: {
3154 machine?: string[] | undefined;
3155 human?: string[] | undefined;
3156 } | undefined;
3157 intent: "bitcoin" | "ethereum" | "stellar";
3158 verified: boolean;
3159 transaction: {
3160 hash: string;
3161 inputHash: string;
3162 intent: "bitcoin";
3163 } | {
3164 hash: string;
3165 inputHash: string;
3166 intent: "ethereum";
3167 } | {
3168 hash: string;
3169 inputHash: string;
3170 intent: "stellar";
3171 ledger: number;
3172 };
3173 }[] | undefined;
3174 commitmentData?: {
3175 signaturesCount?: number | undefined;
3176 hash: string;
3177 hashType: "sha-256";
3178 } | undefined;
3179 idData?: {
3180 timestamp: string;
3181 ulid: string;
3182 test: boolean;
3183 } | undefined;
3184 commitsTo?: {
3185 observableEntropy?: string | undefined;
3186 hashes: {
3187 hash: string;
3188 hashType: string;
3189 }[];
3190 timestamps: {
3191 submittedAfter?: string | undefined;
3192 submittedBefore?: string[] | undefined;
3193 submitWindowMilliseconds?: number | undefined;
3194 submittedAt: string;
3195 };
3196 } | undefined;
3197 verified: boolean;
3198}>;
3199type CommitmentVerification = TypeOf<typeof CommitmentVerification>;
3200
3201declare const ClientConfigSchema: ZodObject<{
3202 apiBaseUrl: ZodOptional<ZodString>;
3203 apiKey: ZodString;
3204}, "strip", ZodTypeAny, {
3205 apiBaseUrl?: string | undefined;
3206 apiKey: string;
3207}, {
3208 apiBaseUrl?: string | undefined;
3209 apiKey: string;
3210}>;
3211type ClientConfig = TypeOf<typeof ClientConfigSchema>;
3212declare class TruestampClient {
3213 private readonly API_KEY;
3214 private readonly API_VERSION;
3215 private readonly BASE_URL;
3216 private readonly BASE_URL_W_VERSION;
3217 private readonly COMMON_HEADERS;
3218 constructor(config: ClientConfig);
3219 /**
3220 * Retrieve the current health of the API.
3221 * @return An object reflecting the current health of the API.
3222 */
3223 getHealth(): Promise<HealthResponse>;
3224 /**
3225 * Create a new API key for an account.
3226 * @param body The body of the request including a refresh token to be used for key generation.
3227 * @return The new API key along with its description and expiration date.
3228 */
3229 createApiKey(body: ApiKeyBody): Promise<ApiKeyResponse>;
3230 /**
3231 * Get the current commitment for an Item ID.
3232 * @param id The Item ID that the commitment is for.
3233 * @return A commitment object.
3234 */
3235 getCommitment(id: string): Promise<Commitment>;
3236 /**
3237 * Get the verification result for a commitment associated with an Item ID.
3238 * @param id The Item ID for the commitment that should be verified.
3239 * @return A commitment verification object.
3240 */
3241 getCommitmentVerification(id: string): Promise<CommitmentVerification>;
3242 /**
3243 * Create a new Item.
3244 * @param body The Item body.
3245 * @param args An object with additional arguments for the API.
3246 * @param args.skipCF A boolean indicating whether to skip adding Cloudflare request data to the Item.
3247 * @param args.skipOE A boolean indicating whether to skip adding Observable Entropy hash to the Item.
3248 * @return An object containing the ID of the new Item.
3249 */
3250 createItem(body: ItemRequest, args?: {
3251 skipCF?: boolean;
3252 skipOE?: boolean;
3253 }): Promise<ItemResponse>;
3254 /**
3255 * Update an existing Item specified by an Item ID.
3256 * @param body The updated Item body.
3257 * @param args An object with additional arguments for the API.
3258 * @param args.skipCF A boolean indicating whether to skip adding Cloudflare request data to the Item.
3259 * @param args.skipOE A boolean indicating whether to skip adding Observable Entropy hash to the Item.
3260 * @return An object containing the ID of the updated Item.
3261 */
3262 updateItem(id: string, body: ItemRequest, args?: {
3263 skipCF?: boolean;
3264 skipOE?: boolean;
3265 }): Promise<ItemResponse>;
3266}
3267
3268export { ClientConfig, TruestampClient };