@wix/cli-app 1.0.66 → 1.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/certificate-OSVGOZD2.js +19 -0
- package/build/{certificate-QM2J25NL.js.map → certificate-OSVGOZD2.js.map} +1 -1
- package/build/chunk-XPJ5XNVU.js +6 -0
- package/build/{chunk-AKY22ML4.js.map → chunk-XPJ5XNVU.js.map} +1 -1
- package/build/devtools-XEZBZR2L.js +12 -0
- package/build/devtools-XEZBZR2L.js.map +1 -0
- package/build/index.js +359 -69341
- package/build/index.js.map +1 -1
- package/package.json +24 -14
- package/build/certificate-QM2J25NL.js +0 -11986
- package/build/chunk-AKY22ML4.js +0 -64
- package/build/index.d.ts +0 -1062
package/build/index.d.ts
DELETED
|
@@ -1,1062 +0,0 @@
|
|
|
1
|
-
declare type Primitive = string | number | symbol | bigint | boolean | null | undefined;
|
|
2
|
-
|
|
3
|
-
declare namespace util {
|
|
4
|
-
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
|
|
5
|
-
export type isAny<T> = 0 extends 1 & T ? true : false;
|
|
6
|
-
export const assertEqual: <A, B>(val: AssertEqual<A, B>) => AssertEqual<A, B>;
|
|
7
|
-
export function assertIs<T>(_arg: T): void;
|
|
8
|
-
export function assertNever(_x: never): never;
|
|
9
|
-
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
10
|
-
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
|
|
11
|
-
export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
12
|
-
export const arrayToEnum: <T extends string, U extends [T, ...T[]]>(items: U) => { [k in U[number]]: k; };
|
|
13
|
-
export const getValidEnumValues: (obj: any) => any[];
|
|
14
|
-
export const objectValues: (obj: any) => any[];
|
|
15
|
-
export const objectKeys: ObjectConstructor["keys"];
|
|
16
|
-
export const find: <T>(arr: T[], checker: (arg: T) => any) => T | undefined;
|
|
17
|
-
export type identity<T> = objectUtil.identity<T>;
|
|
18
|
-
export type flatten<T> = objectUtil.flatten<T>;
|
|
19
|
-
export type noUndefined<T> = T extends undefined ? never : T;
|
|
20
|
-
export const isInteger: NumberConstructor["isInteger"];
|
|
21
|
-
export function joinValues<T extends any[]>(array: T, separator?: string): string;
|
|
22
|
-
export const jsonStringifyReplacer: (_: string, value: any) => any;
|
|
23
|
-
export {};
|
|
24
|
-
}
|
|
25
|
-
declare namespace objectUtil {
|
|
26
|
-
export type MergeShapes<U, V> = {
|
|
27
|
-
[k in Exclude<keyof U, keyof V>]: U[k];
|
|
28
|
-
} & V;
|
|
29
|
-
type requiredKeys<T extends object> = {
|
|
30
|
-
[k in keyof T]: undefined extends T[k] ? never : k;
|
|
31
|
-
}[keyof T];
|
|
32
|
-
export type addQuestionMarks<T extends object, R extends keyof T = requiredKeys<T>> = Pick<Required<T>, R> & Partial<T>;
|
|
33
|
-
export type identity<T> = T;
|
|
34
|
-
export type flatten<T> = identity<{
|
|
35
|
-
[k in keyof T]: T[k];
|
|
36
|
-
}>;
|
|
37
|
-
export type noNeverKeys<T> = {
|
|
38
|
-
[k in keyof T]: [T[k]] extends [never] ? never : k;
|
|
39
|
-
}[keyof T];
|
|
40
|
-
export type noNever<T> = identity<{
|
|
41
|
-
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;
|
|
42
|
-
}>;
|
|
43
|
-
export const mergeShapes: <U, T>(first: U, second: T) => T & U;
|
|
44
|
-
export type extendShape<A, B> = flatten<Omit<A, keyof B> & B>;
|
|
45
|
-
export {};
|
|
46
|
-
}
|
|
47
|
-
declare const ZodParsedType: {
|
|
48
|
-
function: "function";
|
|
49
|
-
number: "number";
|
|
50
|
-
string: "string";
|
|
51
|
-
nan: "nan";
|
|
52
|
-
integer: "integer";
|
|
53
|
-
float: "float";
|
|
54
|
-
boolean: "boolean";
|
|
55
|
-
date: "date";
|
|
56
|
-
bigint: "bigint";
|
|
57
|
-
symbol: "symbol";
|
|
58
|
-
undefined: "undefined";
|
|
59
|
-
null: "null";
|
|
60
|
-
array: "array";
|
|
61
|
-
object: "object";
|
|
62
|
-
unknown: "unknown";
|
|
63
|
-
promise: "promise";
|
|
64
|
-
void: "void";
|
|
65
|
-
never: "never";
|
|
66
|
-
map: "map";
|
|
67
|
-
set: "set";
|
|
68
|
-
};
|
|
69
|
-
declare type ZodParsedType = keyof typeof ZodParsedType;
|
|
70
|
-
|
|
71
|
-
declare type allKeys<T> = T extends any ? keyof T : never;
|
|
72
|
-
declare type typeToFlattenedError<T, U = string> = {
|
|
73
|
-
formErrors: U[];
|
|
74
|
-
fieldErrors: {
|
|
75
|
-
[P in allKeys<T>]?: U[];
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
declare const ZodIssueCode: {
|
|
79
|
-
invalid_type: "invalid_type";
|
|
80
|
-
invalid_literal: "invalid_literal";
|
|
81
|
-
custom: "custom";
|
|
82
|
-
invalid_union: "invalid_union";
|
|
83
|
-
invalid_union_discriminator: "invalid_union_discriminator";
|
|
84
|
-
invalid_enum_value: "invalid_enum_value";
|
|
85
|
-
unrecognized_keys: "unrecognized_keys";
|
|
86
|
-
invalid_arguments: "invalid_arguments";
|
|
87
|
-
invalid_return_type: "invalid_return_type";
|
|
88
|
-
invalid_date: "invalid_date";
|
|
89
|
-
invalid_string: "invalid_string";
|
|
90
|
-
too_small: "too_small";
|
|
91
|
-
too_big: "too_big";
|
|
92
|
-
invalid_intersection_types: "invalid_intersection_types";
|
|
93
|
-
not_multiple_of: "not_multiple_of";
|
|
94
|
-
not_finite: "not_finite";
|
|
95
|
-
};
|
|
96
|
-
declare type ZodIssueCode = keyof typeof ZodIssueCode;
|
|
97
|
-
declare type ZodIssueBase = {
|
|
98
|
-
path: (string | number)[];
|
|
99
|
-
message?: string;
|
|
100
|
-
};
|
|
101
|
-
interface ZodInvalidTypeIssue extends ZodIssueBase {
|
|
102
|
-
code: typeof ZodIssueCode.invalid_type;
|
|
103
|
-
expected: ZodParsedType;
|
|
104
|
-
received: ZodParsedType;
|
|
105
|
-
}
|
|
106
|
-
interface ZodInvalidLiteralIssue extends ZodIssueBase {
|
|
107
|
-
code: typeof ZodIssueCode.invalid_literal;
|
|
108
|
-
expected: unknown;
|
|
109
|
-
received: unknown;
|
|
110
|
-
}
|
|
111
|
-
interface ZodUnrecognizedKeysIssue extends ZodIssueBase {
|
|
112
|
-
code: typeof ZodIssueCode.unrecognized_keys;
|
|
113
|
-
keys: string[];
|
|
114
|
-
}
|
|
115
|
-
interface ZodInvalidUnionIssue extends ZodIssueBase {
|
|
116
|
-
code: typeof ZodIssueCode.invalid_union;
|
|
117
|
-
unionErrors: ZodError[];
|
|
118
|
-
}
|
|
119
|
-
interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {
|
|
120
|
-
code: typeof ZodIssueCode.invalid_union_discriminator;
|
|
121
|
-
options: Primitive[];
|
|
122
|
-
}
|
|
123
|
-
interface ZodInvalidEnumValueIssue extends ZodIssueBase {
|
|
124
|
-
received: string | number;
|
|
125
|
-
code: typeof ZodIssueCode.invalid_enum_value;
|
|
126
|
-
options: (string | number)[];
|
|
127
|
-
}
|
|
128
|
-
interface ZodInvalidArgumentsIssue extends ZodIssueBase {
|
|
129
|
-
code: typeof ZodIssueCode.invalid_arguments;
|
|
130
|
-
argumentsError: ZodError;
|
|
131
|
-
}
|
|
132
|
-
interface ZodInvalidReturnTypeIssue extends ZodIssueBase {
|
|
133
|
-
code: typeof ZodIssueCode.invalid_return_type;
|
|
134
|
-
returnTypeError: ZodError;
|
|
135
|
-
}
|
|
136
|
-
interface ZodInvalidDateIssue extends ZodIssueBase {
|
|
137
|
-
code: typeof ZodIssueCode.invalid_date;
|
|
138
|
-
}
|
|
139
|
-
declare type StringValidation = "email" | "url" | "emoji" | "uuid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "ip" | {
|
|
140
|
-
includes: string;
|
|
141
|
-
position?: number;
|
|
142
|
-
} | {
|
|
143
|
-
startsWith: string;
|
|
144
|
-
} | {
|
|
145
|
-
endsWith: string;
|
|
146
|
-
};
|
|
147
|
-
interface ZodInvalidStringIssue extends ZodIssueBase {
|
|
148
|
-
code: typeof ZodIssueCode.invalid_string;
|
|
149
|
-
validation: StringValidation;
|
|
150
|
-
}
|
|
151
|
-
interface ZodTooSmallIssue extends ZodIssueBase {
|
|
152
|
-
code: typeof ZodIssueCode.too_small;
|
|
153
|
-
minimum: number | bigint;
|
|
154
|
-
inclusive: boolean;
|
|
155
|
-
exact?: boolean;
|
|
156
|
-
type: "array" | "string" | "number" | "set" | "date" | "bigint";
|
|
157
|
-
}
|
|
158
|
-
interface ZodTooBigIssue extends ZodIssueBase {
|
|
159
|
-
code: typeof ZodIssueCode.too_big;
|
|
160
|
-
maximum: number | bigint;
|
|
161
|
-
inclusive: boolean;
|
|
162
|
-
exact?: boolean;
|
|
163
|
-
type: "array" | "string" | "number" | "set" | "date" | "bigint";
|
|
164
|
-
}
|
|
165
|
-
interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
|
|
166
|
-
code: typeof ZodIssueCode.invalid_intersection_types;
|
|
167
|
-
}
|
|
168
|
-
interface ZodNotMultipleOfIssue extends ZodIssueBase {
|
|
169
|
-
code: typeof ZodIssueCode.not_multiple_of;
|
|
170
|
-
multipleOf: number | bigint;
|
|
171
|
-
}
|
|
172
|
-
interface ZodNotFiniteIssue extends ZodIssueBase {
|
|
173
|
-
code: typeof ZodIssueCode.not_finite;
|
|
174
|
-
}
|
|
175
|
-
interface ZodCustomIssue extends ZodIssueBase {
|
|
176
|
-
code: typeof ZodIssueCode.custom;
|
|
177
|
-
params?: {
|
|
178
|
-
[k: string]: any;
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
declare type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue;
|
|
182
|
-
declare type ZodIssue = ZodIssueOptionalMessage & {
|
|
183
|
-
fatal?: boolean;
|
|
184
|
-
message: string;
|
|
185
|
-
};
|
|
186
|
-
declare type recursiveZodFormattedError<T> = T extends [any, ...any[]] ? {
|
|
187
|
-
[K in keyof T]?: ZodFormattedError<T[K]>;
|
|
188
|
-
} : T extends any[] ? {
|
|
189
|
-
[k: number]: ZodFormattedError<T[number]>;
|
|
190
|
-
} : T extends object ? {
|
|
191
|
-
[K in keyof T]?: ZodFormattedError<T[K]>;
|
|
192
|
-
} : unknown;
|
|
193
|
-
declare type ZodFormattedError<T, U = string> = {
|
|
194
|
-
_errors: U[];
|
|
195
|
-
} & recursiveZodFormattedError<NonNullable<T>>;
|
|
196
|
-
declare class ZodError<T = any> extends Error {
|
|
197
|
-
issues: ZodIssue[];
|
|
198
|
-
get errors(): ZodIssue[];
|
|
199
|
-
constructor(issues: ZodIssue[]);
|
|
200
|
-
format(): ZodFormattedError<T>;
|
|
201
|
-
format<U>(mapper: (issue: ZodIssue) => U): ZodFormattedError<T, U>;
|
|
202
|
-
static create: (issues: ZodIssue[]) => ZodError<any>;
|
|
203
|
-
toString(): string;
|
|
204
|
-
get message(): string;
|
|
205
|
-
get isEmpty(): boolean;
|
|
206
|
-
addIssue: (sub: ZodIssue) => void;
|
|
207
|
-
addIssues: (subs?: ZodIssue[]) => void;
|
|
208
|
-
flatten(): typeToFlattenedError<T>;
|
|
209
|
-
flatten<U>(mapper?: (issue: ZodIssue) => U): typeToFlattenedError<T, U>;
|
|
210
|
-
get formErrors(): typeToFlattenedError<T, string>;
|
|
211
|
-
}
|
|
212
|
-
declare type stripPath<T extends object> = T extends any ? util.OmitKeys<T, "path"> : never;
|
|
213
|
-
declare type IssueData = stripPath<ZodIssueOptionalMessage> & {
|
|
214
|
-
path?: (string | number)[];
|
|
215
|
-
fatal?: boolean;
|
|
216
|
-
};
|
|
217
|
-
declare type ErrorMapCtx = {
|
|
218
|
-
defaultError: string;
|
|
219
|
-
data: any;
|
|
220
|
-
};
|
|
221
|
-
declare type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => {
|
|
222
|
-
message: string;
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
declare type ParseParams = {
|
|
226
|
-
path: (string | number)[];
|
|
227
|
-
errorMap: ZodErrorMap;
|
|
228
|
-
async: boolean;
|
|
229
|
-
};
|
|
230
|
-
declare type ParsePathComponent = string | number;
|
|
231
|
-
declare type ParsePath = ParsePathComponent[];
|
|
232
|
-
interface ParseContext {
|
|
233
|
-
readonly common: {
|
|
234
|
-
readonly issues: ZodIssue[];
|
|
235
|
-
readonly contextualErrorMap?: ZodErrorMap;
|
|
236
|
-
readonly async: boolean;
|
|
237
|
-
};
|
|
238
|
-
readonly path: ParsePath;
|
|
239
|
-
readonly schemaErrorMap?: ZodErrorMap;
|
|
240
|
-
readonly parent: ParseContext | null;
|
|
241
|
-
readonly data: any;
|
|
242
|
-
readonly parsedType: ZodParsedType;
|
|
243
|
-
}
|
|
244
|
-
declare type ParseInput = {
|
|
245
|
-
data: any;
|
|
246
|
-
path: (string | number)[];
|
|
247
|
-
parent: ParseContext;
|
|
248
|
-
};
|
|
249
|
-
declare class ParseStatus {
|
|
250
|
-
value: "aborted" | "dirty" | "valid";
|
|
251
|
-
dirty(): void;
|
|
252
|
-
abort(): void;
|
|
253
|
-
static mergeArray(status: ParseStatus, results: SyncParseReturnType<any>[]): SyncParseReturnType;
|
|
254
|
-
static mergeObjectAsync(status: ParseStatus, pairs: {
|
|
255
|
-
key: ParseReturnType<any>;
|
|
256
|
-
value: ParseReturnType<any>;
|
|
257
|
-
}[]): Promise<SyncParseReturnType<any>>;
|
|
258
|
-
static mergeObjectSync(status: ParseStatus, pairs: {
|
|
259
|
-
key: SyncParseReturnType<any>;
|
|
260
|
-
value: SyncParseReturnType<any>;
|
|
261
|
-
alwaysSet?: boolean;
|
|
262
|
-
}[]): SyncParseReturnType;
|
|
263
|
-
}
|
|
264
|
-
declare type INVALID = {
|
|
265
|
-
status: "aborted";
|
|
266
|
-
};
|
|
267
|
-
declare const INVALID: INVALID;
|
|
268
|
-
declare type DIRTY<T> = {
|
|
269
|
-
status: "dirty";
|
|
270
|
-
value: T;
|
|
271
|
-
};
|
|
272
|
-
declare const DIRTY: <T>(value: T) => DIRTY<T>;
|
|
273
|
-
declare type OK<T> = {
|
|
274
|
-
status: "valid";
|
|
275
|
-
value: T;
|
|
276
|
-
};
|
|
277
|
-
declare const OK: <T>(value: T) => OK<T>;
|
|
278
|
-
declare type SyncParseReturnType<T = any> = OK<T> | DIRTY<T> | INVALID;
|
|
279
|
-
declare type AsyncParseReturnType<T> = Promise<SyncParseReturnType<T>>;
|
|
280
|
-
declare type ParseReturnType<T> = SyncParseReturnType<T> | AsyncParseReturnType<T>;
|
|
281
|
-
|
|
282
|
-
declare namespace enumUtil {
|
|
283
|
-
type UnionToIntersectionFn<T> = (T extends unknown ? (k: () => T) => void : never) extends (k: infer Intersection) => void ? Intersection : never;
|
|
284
|
-
type GetUnionLast<T> = UnionToIntersectionFn<T> extends () => infer Last ? Last : never;
|
|
285
|
-
type UnionToTuple<T, Tuple extends unknown[] = []> = [T] extends [never] ? Tuple : UnionToTuple<Exclude<T, GetUnionLast<T>>, [GetUnionLast<T>, ...Tuple]>;
|
|
286
|
-
type CastToStringTuple<T> = T extends [string, ...string[]] ? T : never;
|
|
287
|
-
export type UnionToTupleString<T> = CastToStringTuple<UnionToTuple<T>>;
|
|
288
|
-
export {};
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
declare namespace errorUtil {
|
|
292
|
-
type ErrMessage = string | {
|
|
293
|
-
message?: string;
|
|
294
|
-
};
|
|
295
|
-
const errToObj: (message?: ErrMessage | undefined) => {
|
|
296
|
-
message?: string | undefined;
|
|
297
|
-
};
|
|
298
|
-
const toString: (message?: ErrMessage | undefined) => string | undefined;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
declare namespace partialUtil {
|
|
302
|
-
type DeepPartial<T extends ZodTypeAny> = T extends ZodObject<ZodRawShape> ? ZodObject<{
|
|
303
|
-
[k in keyof T["shape"]]: ZodOptional<DeepPartial<T["shape"][k]>>;
|
|
304
|
-
}, T["_def"]["unknownKeys"], T["_def"]["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> ? {
|
|
305
|
-
[k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial<Items[k]> : never;
|
|
306
|
-
} extends infer PI ? PI extends ZodTupleItems ? ZodTuple<PI> : never : never : T;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
declare type RefinementCtx = {
|
|
310
|
-
addIssue: (arg: IssueData) => void;
|
|
311
|
-
path: (string | number)[];
|
|
312
|
-
};
|
|
313
|
-
declare type ZodRawShape = {
|
|
314
|
-
[k: string]: ZodTypeAny;
|
|
315
|
-
};
|
|
316
|
-
declare type ZodTypeAny = ZodType<any, any, any>;
|
|
317
|
-
declare type TypeOf<T extends ZodType<any, any, any>> = T["_output"];
|
|
318
|
-
declare type input<T extends ZodType<any, any, any>> = T["_input"];
|
|
319
|
-
declare type output<T extends ZodType<any, any, any>> = T["_output"];
|
|
320
|
-
|
|
321
|
-
declare type CustomErrorParams = Partial<util.Omit<ZodCustomIssue, "code">>;
|
|
322
|
-
interface ZodTypeDef {
|
|
323
|
-
errorMap?: ZodErrorMap;
|
|
324
|
-
description?: string;
|
|
325
|
-
}
|
|
326
|
-
declare type RawCreateParams = {
|
|
327
|
-
errorMap?: ZodErrorMap;
|
|
328
|
-
invalid_type_error?: string;
|
|
329
|
-
required_error?: string;
|
|
330
|
-
description?: string;
|
|
331
|
-
} | undefined;
|
|
332
|
-
declare type SafeParseSuccess<Output> = {
|
|
333
|
-
success: true;
|
|
334
|
-
data: Output;
|
|
335
|
-
};
|
|
336
|
-
declare type SafeParseError<Input> = {
|
|
337
|
-
success: false;
|
|
338
|
-
error: ZodError<Input>;
|
|
339
|
-
};
|
|
340
|
-
declare type SafeParseReturnType<Input, Output> = SafeParseSuccess<Output> | SafeParseError<Input>;
|
|
341
|
-
declare abstract class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> {
|
|
342
|
-
readonly _type: Output;
|
|
343
|
-
readonly _output: Output;
|
|
344
|
-
readonly _input: Input;
|
|
345
|
-
readonly _def: Def;
|
|
346
|
-
get description(): string | undefined;
|
|
347
|
-
abstract _parse(input: ParseInput): ParseReturnType<Output>;
|
|
348
|
-
_getType(input: ParseInput): string;
|
|
349
|
-
_getOrReturnCtx(input: ParseInput, ctx?: ParseContext | undefined): ParseContext;
|
|
350
|
-
_processInputParams(input: ParseInput): {
|
|
351
|
-
status: ParseStatus;
|
|
352
|
-
ctx: ParseContext;
|
|
353
|
-
};
|
|
354
|
-
_parseSync(input: ParseInput): SyncParseReturnType<Output>;
|
|
355
|
-
_parseAsync(input: ParseInput): AsyncParseReturnType<Output>;
|
|
356
|
-
parse(data: unknown, params?: Partial<ParseParams>): Output;
|
|
357
|
-
safeParse(data: unknown, params?: Partial<ParseParams>): SafeParseReturnType<Input, Output>;
|
|
358
|
-
parseAsync(data: unknown, params?: Partial<ParseParams>): Promise<Output>;
|
|
359
|
-
safeParseAsync(data: unknown, params?: Partial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;
|
|
360
|
-
spa: (data: unknown, params?: Partial<ParseParams> | undefined) => Promise<SafeParseReturnType<Input, Output>>;
|
|
361
|
-
refine<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, RefinedOutput, Input>;
|
|
362
|
-
refine(check: (arg: Output) => unknown | Promise<unknown>, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, Output, Input>;
|
|
363
|
-
refinement<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, RefinedOutput, Input>;
|
|
364
|
-
refinement(check: (arg: Output) => boolean, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, Output, Input>;
|
|
365
|
-
_refinement(refinement: RefinementEffect<Output>["refinement"]): ZodEffects<this, Output, Input>;
|
|
366
|
-
superRefine<RefinedOutput extends Output>(refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput): ZodEffects<this, RefinedOutput, Input>;
|
|
367
|
-
superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects<this, Output, Input>;
|
|
368
|
-
constructor(def: Def);
|
|
369
|
-
optional(): ZodOptional<this>;
|
|
370
|
-
nullable(): ZodNullable<this>;
|
|
371
|
-
nullish(): ZodOptional<ZodNullable<this>>;
|
|
372
|
-
array(): ZodArray<this>;
|
|
373
|
-
promise(): ZodPromise<this>;
|
|
374
|
-
or<T extends ZodTypeAny>(option: T): ZodUnion<[this, T]>;
|
|
375
|
-
and<T extends ZodTypeAny>(incoming: T): ZodIntersection<this, T>;
|
|
376
|
-
transform<NewOut>(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise<NewOut>): ZodEffects<this, NewOut>;
|
|
377
|
-
default(def: util.noUndefined<Input>): ZodDefault<this>;
|
|
378
|
-
default(def: () => util.noUndefined<Input>): ZodDefault<this>;
|
|
379
|
-
brand<B extends string | number | symbol>(brand?: B): ZodBranded<this, B>;
|
|
380
|
-
catch(def: Output): ZodCatch<this>;
|
|
381
|
-
catch(def: (ctx: {
|
|
382
|
-
error: ZodError;
|
|
383
|
-
input: Input;
|
|
384
|
-
}) => Output): ZodCatch<this>;
|
|
385
|
-
describe(description: string): this;
|
|
386
|
-
pipe<T extends ZodTypeAny>(target: T): ZodPipeline<this, T>;
|
|
387
|
-
isOptional(): boolean;
|
|
388
|
-
isNullable(): boolean;
|
|
389
|
-
}
|
|
390
|
-
declare type IpVersion = "v4" | "v6";
|
|
391
|
-
declare type ZodStringCheck = {
|
|
392
|
-
kind: "min";
|
|
393
|
-
value: number;
|
|
394
|
-
message?: string;
|
|
395
|
-
} | {
|
|
396
|
-
kind: "max";
|
|
397
|
-
value: number;
|
|
398
|
-
message?: string;
|
|
399
|
-
} | {
|
|
400
|
-
kind: "length";
|
|
401
|
-
value: number;
|
|
402
|
-
message?: string;
|
|
403
|
-
} | {
|
|
404
|
-
kind: "email";
|
|
405
|
-
message?: string;
|
|
406
|
-
} | {
|
|
407
|
-
kind: "url";
|
|
408
|
-
message?: string;
|
|
409
|
-
} | {
|
|
410
|
-
kind: "emoji";
|
|
411
|
-
message?: string;
|
|
412
|
-
} | {
|
|
413
|
-
kind: "uuid";
|
|
414
|
-
message?: string;
|
|
415
|
-
} | {
|
|
416
|
-
kind: "cuid";
|
|
417
|
-
message?: string;
|
|
418
|
-
} | {
|
|
419
|
-
kind: "includes";
|
|
420
|
-
value: string;
|
|
421
|
-
position?: number;
|
|
422
|
-
message?: string;
|
|
423
|
-
} | {
|
|
424
|
-
kind: "cuid2";
|
|
425
|
-
message?: string;
|
|
426
|
-
} | {
|
|
427
|
-
kind: "ulid";
|
|
428
|
-
message?: string;
|
|
429
|
-
} | {
|
|
430
|
-
kind: "startsWith";
|
|
431
|
-
value: string;
|
|
432
|
-
message?: string;
|
|
433
|
-
} | {
|
|
434
|
-
kind: "endsWith";
|
|
435
|
-
value: string;
|
|
436
|
-
message?: string;
|
|
437
|
-
} | {
|
|
438
|
-
kind: "regex";
|
|
439
|
-
regex: RegExp;
|
|
440
|
-
message?: string;
|
|
441
|
-
} | {
|
|
442
|
-
kind: "trim";
|
|
443
|
-
message?: string;
|
|
444
|
-
} | {
|
|
445
|
-
kind: "toLowerCase";
|
|
446
|
-
message?: string;
|
|
447
|
-
} | {
|
|
448
|
-
kind: "toUpperCase";
|
|
449
|
-
message?: string;
|
|
450
|
-
} | {
|
|
451
|
-
kind: "datetime";
|
|
452
|
-
offset: boolean;
|
|
453
|
-
precision: number | null;
|
|
454
|
-
message?: string;
|
|
455
|
-
} | {
|
|
456
|
-
kind: "ip";
|
|
457
|
-
version?: IpVersion;
|
|
458
|
-
message?: string;
|
|
459
|
-
};
|
|
460
|
-
interface ZodStringDef extends ZodTypeDef {
|
|
461
|
-
checks: ZodStringCheck[];
|
|
462
|
-
typeName: ZodFirstPartyTypeKind.ZodString;
|
|
463
|
-
coerce: boolean;
|
|
464
|
-
}
|
|
465
|
-
declare class ZodString extends ZodType<string, ZodStringDef> {
|
|
466
|
-
_parse(input: ParseInput): ParseReturnType<string>;
|
|
467
|
-
protected _regex: (regex: RegExp, validation: StringValidation, message?: errorUtil.ErrMessage | undefined) => ZodEffects<this, string, string>;
|
|
468
|
-
_addCheck(check: ZodStringCheck): ZodString;
|
|
469
|
-
email(message?: errorUtil.ErrMessage): ZodString;
|
|
470
|
-
url(message?: errorUtil.ErrMessage): ZodString;
|
|
471
|
-
emoji(message?: errorUtil.ErrMessage): ZodString;
|
|
472
|
-
uuid(message?: errorUtil.ErrMessage): ZodString;
|
|
473
|
-
cuid(message?: errorUtil.ErrMessage): ZodString;
|
|
474
|
-
cuid2(message?: errorUtil.ErrMessage): ZodString;
|
|
475
|
-
ulid(message?: errorUtil.ErrMessage): ZodString;
|
|
476
|
-
ip(options?: string | {
|
|
477
|
-
version?: "v4" | "v6";
|
|
478
|
-
message?: string;
|
|
479
|
-
}): ZodString;
|
|
480
|
-
datetime(options?: string | {
|
|
481
|
-
message?: string | undefined;
|
|
482
|
-
precision?: number | null;
|
|
483
|
-
offset?: boolean;
|
|
484
|
-
}): ZodString;
|
|
485
|
-
regex(regex: RegExp, message?: errorUtil.ErrMessage): ZodString;
|
|
486
|
-
includes(value: string, options?: {
|
|
487
|
-
message?: string;
|
|
488
|
-
position?: number;
|
|
489
|
-
}): ZodString;
|
|
490
|
-
startsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
|
|
491
|
-
endsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
|
|
492
|
-
min(minLength: number, message?: errorUtil.ErrMessage): ZodString;
|
|
493
|
-
max(maxLength: number, message?: errorUtil.ErrMessage): ZodString;
|
|
494
|
-
length(len: number, message?: errorUtil.ErrMessage): ZodString;
|
|
495
|
-
nonempty: (message?: errorUtil.ErrMessage | undefined) => ZodString;
|
|
496
|
-
trim: () => ZodString;
|
|
497
|
-
toLowerCase: () => ZodString;
|
|
498
|
-
toUpperCase: () => ZodString;
|
|
499
|
-
get isDatetime(): boolean;
|
|
500
|
-
get isEmail(): boolean;
|
|
501
|
-
get isURL(): boolean;
|
|
502
|
-
get isEmoji(): boolean;
|
|
503
|
-
get isUUID(): boolean;
|
|
504
|
-
get isCUID(): boolean;
|
|
505
|
-
get isCUID2(): boolean;
|
|
506
|
-
get isULID(): boolean;
|
|
507
|
-
get isIP(): boolean;
|
|
508
|
-
get minLength(): number | null;
|
|
509
|
-
get maxLength(): number | null;
|
|
510
|
-
static create: (params?: ({
|
|
511
|
-
errorMap?: ZodErrorMap | undefined;
|
|
512
|
-
invalid_type_error?: string | undefined;
|
|
513
|
-
required_error?: string | undefined;
|
|
514
|
-
description?: string | undefined;
|
|
515
|
-
} & {
|
|
516
|
-
coerce?: true | undefined;
|
|
517
|
-
}) | undefined) => ZodString;
|
|
518
|
-
}
|
|
519
|
-
declare type ZodNumberCheck = {
|
|
520
|
-
kind: "min";
|
|
521
|
-
value: number;
|
|
522
|
-
inclusive: boolean;
|
|
523
|
-
message?: string;
|
|
524
|
-
} | {
|
|
525
|
-
kind: "max";
|
|
526
|
-
value: number;
|
|
527
|
-
inclusive: boolean;
|
|
528
|
-
message?: string;
|
|
529
|
-
} | {
|
|
530
|
-
kind: "int";
|
|
531
|
-
message?: string;
|
|
532
|
-
} | {
|
|
533
|
-
kind: "multipleOf";
|
|
534
|
-
value: number;
|
|
535
|
-
message?: string;
|
|
536
|
-
} | {
|
|
537
|
-
kind: "finite";
|
|
538
|
-
message?: string;
|
|
539
|
-
};
|
|
540
|
-
interface ZodNumberDef extends ZodTypeDef {
|
|
541
|
-
checks: ZodNumberCheck[];
|
|
542
|
-
typeName: ZodFirstPartyTypeKind.ZodNumber;
|
|
543
|
-
coerce: boolean;
|
|
544
|
-
}
|
|
545
|
-
declare class ZodNumber extends ZodType<number, ZodNumberDef> {
|
|
546
|
-
_parse(input: ParseInput): ParseReturnType<number>;
|
|
547
|
-
static create: (params?: ({
|
|
548
|
-
errorMap?: ZodErrorMap | undefined;
|
|
549
|
-
invalid_type_error?: string | undefined;
|
|
550
|
-
required_error?: string | undefined;
|
|
551
|
-
description?: string | undefined;
|
|
552
|
-
} & {
|
|
553
|
-
coerce?: boolean | undefined;
|
|
554
|
-
}) | undefined) => ZodNumber;
|
|
555
|
-
gte(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
556
|
-
min: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
557
|
-
gt(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
558
|
-
lte(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
559
|
-
max: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
560
|
-
lt(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
561
|
-
protected setLimit(kind: "min" | "max", value: number, inclusive: boolean, message?: string): ZodNumber;
|
|
562
|
-
_addCheck(check: ZodNumberCheck): ZodNumber;
|
|
563
|
-
int(message?: errorUtil.ErrMessage): ZodNumber;
|
|
564
|
-
positive(message?: errorUtil.ErrMessage): ZodNumber;
|
|
565
|
-
negative(message?: errorUtil.ErrMessage): ZodNumber;
|
|
566
|
-
nonpositive(message?: errorUtil.ErrMessage): ZodNumber;
|
|
567
|
-
nonnegative(message?: errorUtil.ErrMessage): ZodNumber;
|
|
568
|
-
multipleOf(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
569
|
-
step: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
570
|
-
finite(message?: errorUtil.ErrMessage): ZodNumber;
|
|
571
|
-
safe(message?: errorUtil.ErrMessage): ZodNumber;
|
|
572
|
-
get minValue(): number | null;
|
|
573
|
-
get maxValue(): number | null;
|
|
574
|
-
get isInt(): boolean;
|
|
575
|
-
get isFinite(): boolean;
|
|
576
|
-
}
|
|
577
|
-
interface ZodBooleanDef extends ZodTypeDef {
|
|
578
|
-
typeName: ZodFirstPartyTypeKind.ZodBoolean;
|
|
579
|
-
coerce: boolean;
|
|
580
|
-
}
|
|
581
|
-
declare class ZodBoolean extends ZodType<boolean, ZodBooleanDef> {
|
|
582
|
-
_parse(input: ParseInput): ParseReturnType<boolean>;
|
|
583
|
-
static create: (params?: ({
|
|
584
|
-
errorMap?: ZodErrorMap | undefined;
|
|
585
|
-
invalid_type_error?: string | undefined;
|
|
586
|
-
required_error?: string | undefined;
|
|
587
|
-
description?: string | undefined;
|
|
588
|
-
} & {
|
|
589
|
-
coerce?: boolean | undefined;
|
|
590
|
-
}) | undefined) => ZodBoolean;
|
|
591
|
-
}
|
|
592
|
-
interface ZodArrayDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
593
|
-
type: T;
|
|
594
|
-
typeName: ZodFirstPartyTypeKind.ZodArray;
|
|
595
|
-
exactLength: {
|
|
596
|
-
value: number;
|
|
597
|
-
message?: string;
|
|
598
|
-
} | null;
|
|
599
|
-
minLength: {
|
|
600
|
-
value: number;
|
|
601
|
-
message?: string;
|
|
602
|
-
} | null;
|
|
603
|
-
maxLength: {
|
|
604
|
-
value: number;
|
|
605
|
-
message?: string;
|
|
606
|
-
} | null;
|
|
607
|
-
}
|
|
608
|
-
declare type ArrayCardinality = "many" | "atleastone";
|
|
609
|
-
declare type arrayOutputType<T extends ZodTypeAny, Cardinality extends ArrayCardinality = "many"> = Cardinality extends "atleastone" ? [T["_output"], ...T["_output"][]] : T["_output"][];
|
|
610
|
-
declare 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"][]> {
|
|
611
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
612
|
-
get element(): T;
|
|
613
|
-
min(minLength: number, message?: errorUtil.ErrMessage): this;
|
|
614
|
-
max(maxLength: number, message?: errorUtil.ErrMessage): this;
|
|
615
|
-
length(len: number, message?: errorUtil.ErrMessage): this;
|
|
616
|
-
nonempty(message?: errorUtil.ErrMessage): ZodArray<T, "atleastone">;
|
|
617
|
-
static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodArray<T_1, "many">;
|
|
618
|
-
}
|
|
619
|
-
declare type UnknownKeysParam = "passthrough" | "strict" | "strip";
|
|
620
|
-
interface ZodObjectDef<T extends ZodRawShape = ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
621
|
-
typeName: ZodFirstPartyTypeKind.ZodObject;
|
|
622
|
-
shape: () => T;
|
|
623
|
-
catchall: Catchall;
|
|
624
|
-
unknownKeys: UnknownKeys;
|
|
625
|
-
}
|
|
626
|
-
declare type objectOutputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny, UnknownKeys extends UnknownKeysParam = UnknownKeysParam> = objectUtil.flatten<objectUtil.addQuestionMarks<baseObjectOutputType<Shape>>> & CatchallOutput<Catchall> & PassthroughType<UnknownKeys>;
|
|
627
|
-
declare type baseObjectOutputType<Shape extends ZodRawShape> = {
|
|
628
|
-
[k in keyof Shape]: Shape[k]["_output"];
|
|
629
|
-
};
|
|
630
|
-
declare type objectInputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny, UnknownKeys extends UnknownKeysParam = UnknownKeysParam> = objectUtil.flatten<baseObjectInputType<Shape>> & CatchallInput<Catchall> & PassthroughType<UnknownKeys>;
|
|
631
|
-
declare type baseObjectInputType<Shape extends ZodRawShape> = objectUtil.addQuestionMarks<{
|
|
632
|
-
[k in keyof Shape]: Shape[k]["_input"];
|
|
633
|
-
}>;
|
|
634
|
-
declare type CatchallOutput<T extends ZodTypeAny> = ZodTypeAny extends T ? unknown : {
|
|
635
|
-
[k: string]: T["_output"];
|
|
636
|
-
};
|
|
637
|
-
declare type CatchallInput<T extends ZodTypeAny> = ZodTypeAny extends T ? unknown : {
|
|
638
|
-
[k: string]: T["_input"];
|
|
639
|
-
};
|
|
640
|
-
declare type PassthroughType<T extends UnknownKeysParam> = T extends "passthrough" ? {
|
|
641
|
-
[k: string]: unknown;
|
|
642
|
-
} : unknown;
|
|
643
|
-
declare type deoptional<T extends ZodTypeAny> = T extends ZodOptional<infer U> ? deoptional<U> : T extends ZodNullable<infer U> ? ZodNullable<deoptional<U>> : T;
|
|
644
|
-
declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny, Output = objectOutputType<T, Catchall, UnknownKeys>, Input = objectInputType<T, Catchall, UnknownKeys>> extends ZodType<Output, ZodObjectDef<T, UnknownKeys, Catchall>, Input> {
|
|
645
|
-
private _cached;
|
|
646
|
-
_getCached(): {
|
|
647
|
-
shape: T;
|
|
648
|
-
keys: string[];
|
|
649
|
-
};
|
|
650
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
651
|
-
get shape(): T;
|
|
652
|
-
strict(message?: errorUtil.ErrMessage): ZodObject<T, "strict", Catchall>;
|
|
653
|
-
strip(): ZodObject<T, "strip", Catchall>;
|
|
654
|
-
passthrough(): ZodObject<T, "passthrough", Catchall>;
|
|
655
|
-
nonstrict: () => ZodObject<T, "passthrough", Catchall>;
|
|
656
|
-
extend<Augmentation extends ZodRawShape>(augmentation: Augmentation): ZodObject<objectUtil.extendShape<T, Augmentation>, UnknownKeys, Catchall>;
|
|
657
|
-
augment: <Augmentation extends ZodRawShape>(augmentation: Augmentation) => ZodObject<{ [k in keyof (Omit<T, keyof Augmentation> & Augmentation)]: (Omit<T, keyof Augmentation> & Augmentation)[k]; }, UnknownKeys, Catchall, objectOutputType<{ [k in keyof (Omit<T, keyof Augmentation> & Augmentation)]: (Omit<T, keyof Augmentation> & Augmentation)[k]; }, Catchall, UnknownKeys>, objectInputType<{ [k in keyof (Omit<T, keyof Augmentation> & Augmentation)]: (Omit<T, keyof Augmentation> & Augmentation)[k]; }, Catchall, UnknownKeys>>;
|
|
658
|
-
merge<Incoming extends AnyZodObject, Augmentation extends Incoming["shape"]>(merging: Incoming): ZodObject<objectUtil.extendShape<T, Augmentation>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>;
|
|
659
|
-
setKey<Key extends string, Schema extends ZodTypeAny>(key: Key, schema: Schema): ZodObject<T & {
|
|
660
|
-
[k in Key]: Schema;
|
|
661
|
-
}, UnknownKeys, Catchall>;
|
|
662
|
-
catchall<Index extends ZodTypeAny>(index: Index): ZodObject<T, UnknownKeys, Index>;
|
|
663
|
-
pick<Mask extends {
|
|
664
|
-
[k in keyof T]?: true;
|
|
665
|
-
}>(mask: Mask): ZodObject<Pick<T, Extract<keyof T, keyof Mask>>, UnknownKeys, Catchall>;
|
|
666
|
-
omit<Mask extends {
|
|
667
|
-
[k in keyof T]?: true;
|
|
668
|
-
}>(mask: Mask): ZodObject<Omit<T, keyof Mask>, UnknownKeys, Catchall>;
|
|
669
|
-
deepPartial(): partialUtil.DeepPartial<this>;
|
|
670
|
-
partial(): ZodObject<{
|
|
671
|
-
[k in keyof T]: ZodOptional<T[k]>;
|
|
672
|
-
}, UnknownKeys, Catchall>;
|
|
673
|
-
partial<Mask extends {
|
|
674
|
-
[k in keyof T]?: true;
|
|
675
|
-
}>(mask: Mask): ZodObject<objectUtil.noNever<{
|
|
676
|
-
[k in keyof T]: k extends keyof Mask ? ZodOptional<T[k]> : T[k];
|
|
677
|
-
}>, UnknownKeys, Catchall>;
|
|
678
|
-
required(): ZodObject<{
|
|
679
|
-
[k in keyof T]: deoptional<T[k]>;
|
|
680
|
-
}, UnknownKeys, Catchall>;
|
|
681
|
-
required<Mask extends {
|
|
682
|
-
[k in keyof T]?: true;
|
|
683
|
-
}>(mask: Mask): ZodObject<objectUtil.noNever<{
|
|
684
|
-
[k in keyof T]: k extends keyof Mask ? deoptional<T[k]> : T[k];
|
|
685
|
-
}>, UnknownKeys, Catchall>;
|
|
686
|
-
keyof(): ZodEnum<enumUtil.UnionToTupleString<keyof T>>;
|
|
687
|
-
static create: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, { [k in keyof baseObjectOutputType<T_1>]: undefined extends baseObjectOutputType<T_1>[k] ? never : k; }[keyof T_1]>]: objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, { [k in keyof baseObjectOutputType<T_1>]: undefined extends baseObjectOutputType<T_1>[k] ? never : k; }[keyof T_1]>[k_1]; }, { [k_2 in keyof baseObjectInputType<T_1>]: baseObjectInputType<T_1>[k_2]; }>;
|
|
688
|
-
static strictCreate: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strict", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, { [k in keyof baseObjectOutputType<T_1>]: undefined extends baseObjectOutputType<T_1>[k] ? never : k; }[keyof T_1]>]: objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, { [k in keyof baseObjectOutputType<T_1>]: undefined extends baseObjectOutputType<T_1>[k] ? never : k; }[keyof T_1]>[k_1]; }, { [k_2 in keyof baseObjectInputType<T_1>]: baseObjectInputType<T_1>[k_2]; }>;
|
|
689
|
-
static lazycreate: <T_1 extends ZodRawShape>(shape: () => T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, { [k in keyof baseObjectOutputType<T_1>]: undefined extends baseObjectOutputType<T_1>[k] ? never : k; }[keyof T_1]>]: objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, { [k in keyof baseObjectOutputType<T_1>]: undefined extends baseObjectOutputType<T_1>[k] ? never : k; }[keyof T_1]>[k_1]; }, { [k_2 in keyof baseObjectInputType<T_1>]: baseObjectInputType<T_1>[k_2]; }>;
|
|
690
|
-
}
|
|
691
|
-
declare type AnyZodObject = ZodObject<any, any, any>;
|
|
692
|
-
declare type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>;
|
|
693
|
-
interface ZodUnionDef<T extends ZodUnionOptions = Readonly<[
|
|
694
|
-
ZodTypeAny,
|
|
695
|
-
ZodTypeAny,
|
|
696
|
-
...ZodTypeAny[]
|
|
697
|
-
]>> extends ZodTypeDef {
|
|
698
|
-
options: T;
|
|
699
|
-
typeName: ZodFirstPartyTypeKind.ZodUnion;
|
|
700
|
-
}
|
|
701
|
-
declare class ZodUnion<T extends ZodUnionOptions> extends ZodType<T[number]["_output"], ZodUnionDef<T>, T[number]["_input"]> {
|
|
702
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
703
|
-
get options(): T;
|
|
704
|
-
static create: <T_1 extends readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(types: T_1, params?: RawCreateParams) => ZodUnion<T_1>;
|
|
705
|
-
}
|
|
706
|
-
interface ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
707
|
-
left: T;
|
|
708
|
-
right: U;
|
|
709
|
-
typeName: ZodFirstPartyTypeKind.ZodIntersection;
|
|
710
|
-
}
|
|
711
|
-
declare class ZodIntersection<T extends ZodTypeAny, U extends ZodTypeAny> extends ZodType<T["_output"] & U["_output"], ZodIntersectionDef<T, U>, T["_input"] & U["_input"]> {
|
|
712
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
713
|
-
static create: <T_1 extends ZodTypeAny, U_1 extends ZodTypeAny>(left: T_1, right: U_1, params?: RawCreateParams) => ZodIntersection<T_1, U_1>;
|
|
714
|
-
}
|
|
715
|
-
declare type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];
|
|
716
|
-
declare type AssertArray<T> = T extends any[] ? T : never;
|
|
717
|
-
declare type OutputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
|
|
718
|
-
[k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_output"] : never;
|
|
719
|
-
}>;
|
|
720
|
-
declare type OutputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...OutputTypeOfTuple<T>, ...Rest["_output"][]] : OutputTypeOfTuple<T>;
|
|
721
|
-
declare type InputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
|
|
722
|
-
[k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_input"] : never;
|
|
723
|
-
}>;
|
|
724
|
-
declare type InputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...InputTypeOfTuple<T>, ...Rest["_input"][]] : InputTypeOfTuple<T>;
|
|
725
|
-
interface ZodTupleDef<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends ZodTypeAny | null = null> extends ZodTypeDef {
|
|
726
|
-
items: T;
|
|
727
|
-
rest: Rest;
|
|
728
|
-
typeName: ZodFirstPartyTypeKind.ZodTuple;
|
|
729
|
-
}
|
|
730
|
-
declare class ZodTuple<T extends [ZodTypeAny, ...ZodTypeAny[]] | [] = [ZodTypeAny, ...ZodTypeAny[]], Rest extends ZodTypeAny | null = null> extends ZodType<OutputTypeOfTupleWithRest<T, Rest>, ZodTupleDef<T, Rest>, InputTypeOfTupleWithRest<T, Rest>> {
|
|
731
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
732
|
-
get items(): T;
|
|
733
|
-
rest<Rest extends ZodTypeAny>(rest: Rest): ZodTuple<T, Rest>;
|
|
734
|
-
static create: <T_1 extends [] | [ZodTypeAny, ...ZodTypeAny[]]>(schemas: T_1, params?: RawCreateParams) => ZodTuple<T_1, null>;
|
|
735
|
-
}
|
|
736
|
-
declare type EnumValues = [string, ...string[]];
|
|
737
|
-
declare type Values<T extends EnumValues> = {
|
|
738
|
-
[k in T[number]]: k;
|
|
739
|
-
};
|
|
740
|
-
interface ZodEnumDef<T extends EnumValues = EnumValues> extends ZodTypeDef {
|
|
741
|
-
values: T;
|
|
742
|
-
typeName: ZodFirstPartyTypeKind.ZodEnum;
|
|
743
|
-
}
|
|
744
|
-
declare type Writeable<T> = {
|
|
745
|
-
-readonly [P in keyof T]: T[P];
|
|
746
|
-
};
|
|
747
|
-
declare type FilterEnum<Values, ToExclude> = Values extends [] ? [] : Values extends [infer Head, ...infer Rest] ? Head extends ToExclude ? FilterEnum<Rest, ToExclude> : [Head, ...FilterEnum<Rest, ToExclude>] : never;
|
|
748
|
-
declare type typecast<A, T> = A extends T ? A : never;
|
|
749
|
-
declare function createZodEnum<U extends string, T extends Readonly<[U, ...U[]]>>(values: T, params?: RawCreateParams): ZodEnum<Writeable<T>>;
|
|
750
|
-
declare function createZodEnum<U extends string, T extends [U, ...U[]]>(values: T, params?: RawCreateParams): ZodEnum<T>;
|
|
751
|
-
declare class ZodEnum<T extends [string, ...string[]]> extends ZodType<T[number], ZodEnumDef<T>> {
|
|
752
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
753
|
-
get options(): T;
|
|
754
|
-
get enum(): Values<T>;
|
|
755
|
-
get Values(): Values<T>;
|
|
756
|
-
get Enum(): Values<T>;
|
|
757
|
-
extract<ToExtract extends readonly [T[number], ...T[number][]]>(values: ToExtract): ZodEnum<Writeable<ToExtract>>;
|
|
758
|
-
exclude<ToExclude extends readonly [T[number], ...T[number][]]>(values: ToExclude): ZodEnum<typecast<Writeable<FilterEnum<T, ToExclude[number]>>, [string, ...string[]]>>;
|
|
759
|
-
static create: typeof createZodEnum;
|
|
760
|
-
}
|
|
761
|
-
interface ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
762
|
-
type: T;
|
|
763
|
-
typeName: ZodFirstPartyTypeKind.ZodPromise;
|
|
764
|
-
}
|
|
765
|
-
declare class ZodPromise<T extends ZodTypeAny> extends ZodType<Promise<T["_output"]>, ZodPromiseDef<T>, Promise<T["_input"]>> {
|
|
766
|
-
unwrap(): T;
|
|
767
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
768
|
-
static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodPromise<T_1>;
|
|
769
|
-
}
|
|
770
|
-
declare type RefinementEffect<T> = {
|
|
771
|
-
type: "refinement";
|
|
772
|
-
refinement: (arg: T, ctx: RefinementCtx) => any;
|
|
773
|
-
};
|
|
774
|
-
declare type TransformEffect<T> = {
|
|
775
|
-
type: "transform";
|
|
776
|
-
transform: (arg: T, ctx: RefinementCtx) => any;
|
|
777
|
-
};
|
|
778
|
-
declare type PreprocessEffect<T> = {
|
|
779
|
-
type: "preprocess";
|
|
780
|
-
transform: (arg: T) => any;
|
|
781
|
-
};
|
|
782
|
-
declare type Effect<T> = RefinementEffect<T> | TransformEffect<T> | PreprocessEffect<T>;
|
|
783
|
-
interface ZodEffectsDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
784
|
-
schema: T;
|
|
785
|
-
typeName: ZodFirstPartyTypeKind.ZodEffects;
|
|
786
|
-
effect: Effect<any>;
|
|
787
|
-
}
|
|
788
|
-
declare class ZodEffects<T extends ZodTypeAny, Output = output<T>, Input = input<T>> extends ZodType<Output, ZodEffectsDef<T>, Input> {
|
|
789
|
-
innerType(): T;
|
|
790
|
-
sourceType(): T;
|
|
791
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
792
|
-
static create: <I extends ZodTypeAny>(schema: I, effect: Effect<I["_output"]>, params?: RawCreateParams) => ZodEffects<I, I["_output"], input<I>>;
|
|
793
|
-
static createWithPreprocess: <I extends ZodTypeAny>(preprocess: (arg: unknown) => unknown, schema: I, params?: RawCreateParams) => ZodEffects<I, I["_output"], unknown>;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
interface ZodOptionalDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
797
|
-
innerType: T;
|
|
798
|
-
typeName: ZodFirstPartyTypeKind.ZodOptional;
|
|
799
|
-
}
|
|
800
|
-
declare class ZodOptional<T extends ZodTypeAny> extends ZodType<T["_output"] | undefined, ZodOptionalDef<T>, T["_input"] | undefined> {
|
|
801
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
802
|
-
unwrap(): T;
|
|
803
|
-
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodOptional<T_1>;
|
|
804
|
-
}
|
|
805
|
-
interface ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
806
|
-
innerType: T;
|
|
807
|
-
typeName: ZodFirstPartyTypeKind.ZodNullable;
|
|
808
|
-
}
|
|
809
|
-
declare class ZodNullable<T extends ZodTypeAny> extends ZodType<T["_output"] | null, ZodNullableDef<T>, T["_input"] | null> {
|
|
810
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
811
|
-
unwrap(): T;
|
|
812
|
-
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodNullable<T_1>;
|
|
813
|
-
}
|
|
814
|
-
interface ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
815
|
-
innerType: T;
|
|
816
|
-
defaultValue: () => util.noUndefined<T["_input"]>;
|
|
817
|
-
typeName: ZodFirstPartyTypeKind.ZodDefault;
|
|
818
|
-
}
|
|
819
|
-
declare class ZodDefault<T extends ZodTypeAny> extends ZodType<util.noUndefined<T["_output"]>, ZodDefaultDef<T>, T["_input"] | undefined> {
|
|
820
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
821
|
-
removeDefault(): T;
|
|
822
|
-
static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
|
|
823
|
-
errorMap?: ZodErrorMap | undefined;
|
|
824
|
-
invalid_type_error?: string | undefined;
|
|
825
|
-
required_error?: string | undefined;
|
|
826
|
-
description?: string | undefined;
|
|
827
|
-
} & {
|
|
828
|
-
default: T_1["_input"] | (() => util.noUndefined<T_1["_input"]>);
|
|
829
|
-
}) => ZodDefault<T_1>;
|
|
830
|
-
}
|
|
831
|
-
interface ZodCatchDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
832
|
-
innerType: T;
|
|
833
|
-
catchValue: (ctx: {
|
|
834
|
-
error: ZodError;
|
|
835
|
-
input: unknown;
|
|
836
|
-
}) => T["_input"];
|
|
837
|
-
typeName: ZodFirstPartyTypeKind.ZodCatch;
|
|
838
|
-
}
|
|
839
|
-
declare class ZodCatch<T extends ZodTypeAny> extends ZodType<T["_output"], ZodCatchDef<T>, unknown> {
|
|
840
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
841
|
-
removeCatch(): T;
|
|
842
|
-
static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
|
|
843
|
-
errorMap?: ZodErrorMap | undefined;
|
|
844
|
-
invalid_type_error?: string | undefined;
|
|
845
|
-
required_error?: string | undefined;
|
|
846
|
-
description?: string | undefined;
|
|
847
|
-
} & {
|
|
848
|
-
catch: T_1["_output"] | (() => T_1["_output"]);
|
|
849
|
-
}) => ZodCatch<T_1>;
|
|
850
|
-
}
|
|
851
|
-
interface ZodBrandedDef<T extends ZodTypeAny> extends ZodTypeDef {
|
|
852
|
-
type: T;
|
|
853
|
-
typeName: ZodFirstPartyTypeKind.ZodBranded;
|
|
854
|
-
}
|
|
855
|
-
declare const BRAND: unique symbol;
|
|
856
|
-
declare type BRAND<T extends string | number | symbol> = {
|
|
857
|
-
[BRAND]: {
|
|
858
|
-
[k in T]: true;
|
|
859
|
-
};
|
|
860
|
-
};
|
|
861
|
-
declare class ZodBranded<T extends ZodTypeAny, B extends string | number | symbol> extends ZodType<T["_output"] & BRAND<B>, ZodBrandedDef<T>, T["_input"]> {
|
|
862
|
-
_parse(input: ParseInput): ParseReturnType<any>;
|
|
863
|
-
unwrap(): T;
|
|
864
|
-
}
|
|
865
|
-
interface ZodPipelineDef<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodTypeDef {
|
|
866
|
-
in: A;
|
|
867
|
-
out: B;
|
|
868
|
-
typeName: ZodFirstPartyTypeKind.ZodPipeline;
|
|
869
|
-
}
|
|
870
|
-
declare class ZodPipeline<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodType<B["_output"], ZodPipelineDef<A, B>, A["_input"]> {
|
|
871
|
-
_parse(input: ParseInput): ParseReturnType<any>;
|
|
872
|
-
static create<A extends ZodTypeAny, B extends ZodTypeAny>(a: A, b: B): ZodPipeline<A, B>;
|
|
873
|
-
}
|
|
874
|
-
declare enum ZodFirstPartyTypeKind {
|
|
875
|
-
ZodString = "ZodString",
|
|
876
|
-
ZodNumber = "ZodNumber",
|
|
877
|
-
ZodNaN = "ZodNaN",
|
|
878
|
-
ZodBigInt = "ZodBigInt",
|
|
879
|
-
ZodBoolean = "ZodBoolean",
|
|
880
|
-
ZodDate = "ZodDate",
|
|
881
|
-
ZodSymbol = "ZodSymbol",
|
|
882
|
-
ZodUndefined = "ZodUndefined",
|
|
883
|
-
ZodNull = "ZodNull",
|
|
884
|
-
ZodAny = "ZodAny",
|
|
885
|
-
ZodUnknown = "ZodUnknown",
|
|
886
|
-
ZodNever = "ZodNever",
|
|
887
|
-
ZodVoid = "ZodVoid",
|
|
888
|
-
ZodArray = "ZodArray",
|
|
889
|
-
ZodObject = "ZodObject",
|
|
890
|
-
ZodUnion = "ZodUnion",
|
|
891
|
-
ZodDiscriminatedUnion = "ZodDiscriminatedUnion",
|
|
892
|
-
ZodIntersection = "ZodIntersection",
|
|
893
|
-
ZodTuple = "ZodTuple",
|
|
894
|
-
ZodRecord = "ZodRecord",
|
|
895
|
-
ZodMap = "ZodMap",
|
|
896
|
-
ZodSet = "ZodSet",
|
|
897
|
-
ZodFunction = "ZodFunction",
|
|
898
|
-
ZodLazy = "ZodLazy",
|
|
899
|
-
ZodLiteral = "ZodLiteral",
|
|
900
|
-
ZodEnum = "ZodEnum",
|
|
901
|
-
ZodEffects = "ZodEffects",
|
|
902
|
-
ZodNativeEnum = "ZodNativeEnum",
|
|
903
|
-
ZodOptional = "ZodOptional",
|
|
904
|
-
ZodNullable = "ZodNullable",
|
|
905
|
-
ZodDefault = "ZodDefault",
|
|
906
|
-
ZodCatch = "ZodCatch",
|
|
907
|
-
ZodPromise = "ZodPromise",
|
|
908
|
-
ZodBranded = "ZodBranded",
|
|
909
|
-
ZodPipeline = "ZodPipeline"
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
declare const wixConfigSchema: ZodObject<{
|
|
913
|
-
appId: ZodString;
|
|
914
|
-
trusted: ZodDefault<ZodBoolean>;
|
|
915
|
-
}, "strip", ZodTypeAny, {
|
|
916
|
-
appId: string;
|
|
917
|
-
trusted: boolean;
|
|
918
|
-
}, {
|
|
919
|
-
appId: string;
|
|
920
|
-
trusted?: boolean | undefined;
|
|
921
|
-
}>;
|
|
922
|
-
type WixConfig = TypeOf<typeof wixConfigSchema>;
|
|
923
|
-
declare const dashboardPageConfigSchema: ZodObject<{
|
|
924
|
-
id: ZodString;
|
|
925
|
-
title: ZodString;
|
|
926
|
-
fullPage: ZodOptional<ZodBoolean>;
|
|
927
|
-
hideInSidebar: ZodOptional<ZodBoolean>;
|
|
928
|
-
priority: ZodOptional<ZodNumber>;
|
|
929
|
-
}, "strip", ZodTypeAny, {
|
|
930
|
-
id: string;
|
|
931
|
-
title: string;
|
|
932
|
-
fullPage?: boolean | undefined;
|
|
933
|
-
hideInSidebar?: boolean | undefined;
|
|
934
|
-
priority?: number | undefined;
|
|
935
|
-
}, {
|
|
936
|
-
id: string;
|
|
937
|
-
title: string;
|
|
938
|
-
fullPage?: boolean | undefined;
|
|
939
|
-
hideInSidebar?: boolean | undefined;
|
|
940
|
-
priority?: number | undefined;
|
|
941
|
-
}>;
|
|
942
|
-
type DashboardPageConfig = TypeOf<typeof dashboardPageConfigSchema>;
|
|
943
|
-
|
|
944
|
-
interface DashboardPageComponent extends DashboardPageConfig {
|
|
945
|
-
relativePath: string;
|
|
946
|
-
route: string;
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
type ProjectModel = {
|
|
950
|
-
config: WixConfig;
|
|
951
|
-
projectFolder: string;
|
|
952
|
-
components: DashboardPageComponent[];
|
|
953
|
-
};
|
|
954
|
-
declare function loadProjectModel(projectFolder: string): Promise<ProjectModel>;
|
|
955
|
-
|
|
956
|
-
declare const authDataSchema: ZodObject<{
|
|
957
|
-
username: ZodString;
|
|
958
|
-
authToken: ZodString;
|
|
959
|
-
userGuid: ZodOptional<ZodString>;
|
|
960
|
-
aci: ZodOptional<ZodString>;
|
|
961
|
-
}, "strip", ZodTypeAny, {
|
|
962
|
-
username: string;
|
|
963
|
-
authToken: string;
|
|
964
|
-
userGuid?: string | undefined;
|
|
965
|
-
aci?: string | undefined;
|
|
966
|
-
}, {
|
|
967
|
-
username: string;
|
|
968
|
-
authToken: string;
|
|
969
|
-
userGuid?: string | undefined;
|
|
970
|
-
aci?: string | undefined;
|
|
971
|
-
}>;
|
|
972
|
-
type AuthData = TypeOf<typeof authDataSchema>;
|
|
973
|
-
|
|
974
|
-
interface Url extends String {}
|
|
975
|
-
interface GUID extends String {}
|
|
976
|
-
interface DateTime extends Number {}
|
|
977
|
-
|
|
978
|
-
interface Base {
|
|
979
|
-
src?: string | number;
|
|
980
|
-
evid?: string | number;
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
type BiEvent = Base & {
|
|
984
|
-
[property: string]: string | number | boolean | object;
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
interface BiEventMap {
|
|
988
|
-
[key: string]: BiEvent;
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
interface BiValidator {
|
|
992
|
-
match: (event: BiEvent) => boolean;
|
|
993
|
-
execute: (event: BiEvent) => void;
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
interface ReportParams {
|
|
997
|
-
src: number;
|
|
998
|
-
evid: number;
|
|
999
|
-
params: Record<string, string | number | boolean | DateTime | GUID | Url | undefined>;
|
|
1000
|
-
useBatch?: boolean;
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
type BiPublisher<T> = (event: BiEvent, context: T) => Promise<void>
|
|
1004
|
-
|
|
1005
|
-
type BiEventDefaults = BiEvent | Promise<BiEvent> | (() => BiEvent) | (() => Promise<BiEvent>)
|
|
1006
|
-
|
|
1007
|
-
interface BiLoggerOptions<T> {
|
|
1008
|
-
publishers: BiPublisher<T>[];
|
|
1009
|
-
validators: BiValidator[];
|
|
1010
|
-
defaults: BiEventDefaults;
|
|
1011
|
-
events: BiEventMap;
|
|
1012
|
-
defaultValueTimeout?: number;
|
|
1013
|
-
defaultContinueOnFail?: boolean;
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
declare class BiLogger<T = object> {
|
|
1017
|
-
constructor(options: BiLoggerOptions<T>, context: T);
|
|
1018
|
-
report(event: ReportParams): Promise<void>;
|
|
1019
|
-
log(event: BiEvent, contextOverrides?: T): Promise<void>;
|
|
1020
|
-
log(eventKey: string): Promise<void>;
|
|
1021
|
-
log(eventKey: string, eventOverrides: BiEvent, contextOverrides?: T): Promise<void>;
|
|
1022
|
-
flush(): Promise<void>;
|
|
1023
|
-
updateDefaults(defaults: BiEventDefaults): BiLogger<T>;
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
declare function getDefaultBiFields({ authData, model, }?: {
|
|
1027
|
-
authData?: AuthData | null;
|
|
1028
|
-
model?: ProjectModel | null;
|
|
1029
|
-
}): Record<string, string>;
|
|
1030
|
-
|
|
1031
|
-
interface ErrorReporterOptions {
|
|
1032
|
-
dsn: string;
|
|
1033
|
-
release: string;
|
|
1034
|
-
}
|
|
1035
|
-
type ErrorReporter = ReturnType<typeof createErrorReporter>;
|
|
1036
|
-
declare function createErrorReporter({ dsn, release }: ErrorReporterOptions): {
|
|
1037
|
-
reportError: (error: unknown, { data }?: {
|
|
1038
|
-
data?: unknown;
|
|
1039
|
-
}) => void;
|
|
1040
|
-
};
|
|
1041
|
-
|
|
1042
|
-
interface CommandServices {
|
|
1043
|
-
errorReporter: ErrorReporter;
|
|
1044
|
-
biLogger: BiLogger;
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
declare function dev(services: CommandServices): Promise<void>;
|
|
1048
|
-
|
|
1049
|
-
declare function build(_services: CommandServices): Promise<void>;
|
|
1050
|
-
|
|
1051
|
-
declare function serve(services: CommandServices): Promise<void>;
|
|
1052
|
-
|
|
1053
|
-
declare function preview(options: {
|
|
1054
|
-
site?: string;
|
|
1055
|
-
}, services: CommandServices): Promise<void>;
|
|
1056
|
-
|
|
1057
|
-
declare function createVersion(options: {
|
|
1058
|
-
versionType?: string;
|
|
1059
|
-
approvePreview?: boolean;
|
|
1060
|
-
}, services: CommandServices): Promise<void>;
|
|
1061
|
-
|
|
1062
|
-
export { build, createVersion, dev, getDefaultBiFields, loadProjectModel, preview, serve };
|