zmp-sdk 2.44.3-beta.1 → 2.45.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apis/apis/trackingManager/logEvent.js +1 -1
- package/apis/common/utils.js +1 -1
- package/apis/index.d.ts +3 -11
- package/apis/package.json.js +1 -1
- package/browser.min.js +2 -2
- package/index.d.ts +1707 -1715
- package/index.es.js +2 -2
- package/index.js +2 -2
- package/index.umd.js +3 -3
- package/package.json +1 -1
- package/apis/common/apis/trackingManager/logEvent.js +0 -1
package/index.d.ts
CHANGED
|
@@ -1,245 +1,1191 @@
|
|
|
1
1
|
import { StreamType as StreamType$1, MediaConstraints as MediaConstraints$1, PhotoConstraint as PhotoConstraint$1, PhotoFrame as PhotoFrame$1, MediaDevice as MediaDevice$1, CameraEvents as CameraEvents$1 } from '@mp-types';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
AppResumed = "h5.event.resumed",
|
|
28
|
-
NetworkChanged = "h5.event.connection.changed",
|
|
29
|
-
OnDataCallback = "h5.event.webview.result",
|
|
30
|
-
WebviewClosed = "h5.event.webview.close",
|
|
31
|
-
OpenApp = "h5.event.open.mp",
|
|
32
|
-
AppClose = "h5.event.action.close",
|
|
33
|
-
PaymentCallback = "payment.callback",
|
|
34
|
-
PaymentResult = "action.payment.result",
|
|
35
|
-
PaymentClose = "action.payment.close",
|
|
36
|
-
DownloadProgress = "h5.event.webview.download.progress"
|
|
3
|
+
declare type Primitive = string | number | symbol | bigint | boolean | null | undefined;
|
|
4
|
+
|
|
5
|
+
declare namespace util {
|
|
6
|
+
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
|
|
7
|
+
export const assertEqual: <A, B>(val: AssertEqual<A, B>) => AssertEqual<A, B>;
|
|
8
|
+
export function assertIs<T>(_arg: T): void;
|
|
9
|
+
export function assertNever(_x: never): never;
|
|
10
|
+
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
11
|
+
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
|
|
12
|
+
export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
13
|
+
export const arrayToEnum: <T extends string, U extends [T, ...T[]]>(items: U) => { [k in U[number]]: k; };
|
|
14
|
+
export const getValidEnumValues: (obj: any) => any[];
|
|
15
|
+
export const objectValues: (obj: any) => any[];
|
|
16
|
+
export const objectKeys: ObjectConstructor["keys"];
|
|
17
|
+
export const find: <T>(arr: T[], checker: (arg: T) => any) => T | undefined;
|
|
18
|
+
export type identity<T> = T;
|
|
19
|
+
export type flatten<T> = identity<{
|
|
20
|
+
[k in keyof T]: T[k];
|
|
21
|
+
}>;
|
|
22
|
+
export type noUndefined<T> = T extends undefined ? never : T;
|
|
23
|
+
export const isInteger: NumberConstructor["isInteger"];
|
|
24
|
+
export function joinValues<T extends any[]>(array: T, separator?: string): string;
|
|
25
|
+
export const jsonStringifyReplacer: (_: string, value: any) => any;
|
|
26
|
+
export {};
|
|
37
27
|
}
|
|
38
|
-
declare
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
declare const ZodParsedType: {
|
|
29
|
+
function: "function";
|
|
30
|
+
number: "number";
|
|
31
|
+
string: "string";
|
|
32
|
+
nan: "nan";
|
|
33
|
+
integer: "integer";
|
|
34
|
+
float: "float";
|
|
35
|
+
boolean: "boolean";
|
|
36
|
+
date: "date";
|
|
37
|
+
bigint: "bigint";
|
|
38
|
+
symbol: "symbol";
|
|
39
|
+
undefined: "undefined";
|
|
40
|
+
null: "null";
|
|
41
|
+
array: "array";
|
|
42
|
+
object: "object";
|
|
43
|
+
unknown: "unknown";
|
|
44
|
+
promise: "promise";
|
|
45
|
+
void: "void";
|
|
46
|
+
never: "never";
|
|
47
|
+
map: "map";
|
|
48
|
+
set: "set";
|
|
49
|
+
};
|
|
50
|
+
declare type ZodParsedType = keyof typeof ZodParsedType;
|
|
51
|
+
|
|
52
|
+
declare type allKeys<T> = T extends any ? keyof T : never;
|
|
53
|
+
declare type typeToFlattenedError<T, U = string> = {
|
|
54
|
+
formErrors: U[];
|
|
55
|
+
fieldErrors: {
|
|
56
|
+
[P in allKeys<T>]?: U[];
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
declare const ZodIssueCode: {
|
|
60
|
+
invalid_type: "invalid_type";
|
|
61
|
+
invalid_literal: "invalid_literal";
|
|
62
|
+
custom: "custom";
|
|
63
|
+
invalid_union: "invalid_union";
|
|
64
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
65
|
+
invalid_enum_value: "invalid_enum_value";
|
|
66
|
+
unrecognized_keys: "unrecognized_keys";
|
|
67
|
+
invalid_arguments: "invalid_arguments";
|
|
68
|
+
invalid_return_type: "invalid_return_type";
|
|
69
|
+
invalid_date: "invalid_date";
|
|
70
|
+
invalid_string: "invalid_string";
|
|
71
|
+
too_small: "too_small";
|
|
72
|
+
too_big: "too_big";
|
|
73
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
74
|
+
not_multiple_of: "not_multiple_of";
|
|
75
|
+
not_finite: "not_finite";
|
|
76
|
+
};
|
|
77
|
+
declare type ZodIssueCode = keyof typeof ZodIssueCode;
|
|
78
|
+
declare type ZodIssueBase = {
|
|
79
|
+
path: (string | number)[];
|
|
80
|
+
message?: string;
|
|
81
|
+
};
|
|
82
|
+
interface ZodInvalidTypeIssue extends ZodIssueBase {
|
|
83
|
+
code: typeof ZodIssueCode.invalid_type;
|
|
84
|
+
expected: ZodParsedType;
|
|
85
|
+
received: ZodParsedType;
|
|
41
86
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
87
|
+
interface ZodInvalidLiteralIssue extends ZodIssueBase {
|
|
88
|
+
code: typeof ZodIssueCode.invalid_literal;
|
|
89
|
+
expected: unknown;
|
|
90
|
+
received: unknown;
|
|
46
91
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
92
|
+
interface ZodUnrecognizedKeysIssue extends ZodIssueBase {
|
|
93
|
+
code: typeof ZodIssueCode.unrecognized_keys;
|
|
94
|
+
keys: string[];
|
|
50
95
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
link = 4,
|
|
55
|
-
profile = 5
|
|
96
|
+
interface ZodInvalidUnionIssue extends ZodIssueBase {
|
|
97
|
+
code: typeof ZodIssueCode.invalid_union;
|
|
98
|
+
unionErrors: ZodError[];
|
|
56
99
|
}
|
|
57
|
-
|
|
58
|
-
|
|
100
|
+
interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {
|
|
101
|
+
code: typeof ZodIssueCode.invalid_union_discriminator;
|
|
102
|
+
options: Primitive[];
|
|
59
103
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
link = 4,
|
|
65
|
-
oa = 5,
|
|
66
|
-
zmp = 20,
|
|
67
|
-
multi_image = 21,
|
|
68
|
-
zmp_deep_link = 4,
|
|
69
|
-
text = 22
|
|
104
|
+
interface ZodInvalidEnumValueIssue extends ZodIssueBase {
|
|
105
|
+
received: string | number;
|
|
106
|
+
code: typeof ZodIssueCode.invalid_enum_value;
|
|
107
|
+
options: (string | number)[];
|
|
70
108
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
landscape = 3
|
|
109
|
+
interface ZodInvalidArgumentsIssue extends ZodIssueBase {
|
|
110
|
+
code: typeof ZodIssueCode.invalid_arguments;
|
|
111
|
+
argumentsError: ZodError;
|
|
75
112
|
}
|
|
76
|
-
|
|
77
|
-
|
|
113
|
+
interface ZodInvalidReturnTypeIssue extends ZodIssueBase {
|
|
114
|
+
code: typeof ZodIssueCode.invalid_return_type;
|
|
115
|
+
returnTypeError: ZodError;
|
|
78
116
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
zcamera_photo = 1,
|
|
82
|
-
zcamera_video = 2,
|
|
83
|
-
zcamera_scan = 7,
|
|
84
|
-
photo = 4,
|
|
85
|
-
video = 5,
|
|
86
|
-
file = 6
|
|
117
|
+
interface ZodInvalidDateIssue extends ZodIssueBase {
|
|
118
|
+
code: typeof ZodIssueCode.invalid_date;
|
|
87
119
|
}
|
|
88
|
-
declare
|
|
89
|
-
|
|
90
|
-
|
|
120
|
+
declare type StringValidation = "email" | "url" | "uuid" | "regex" | "cuid" | "cuid2" | "datetime" | {
|
|
121
|
+
startsWith: string;
|
|
122
|
+
} | {
|
|
123
|
+
endsWith: string;
|
|
124
|
+
};
|
|
125
|
+
interface ZodInvalidStringIssue extends ZodIssueBase {
|
|
126
|
+
code: typeof ZodIssueCode.invalid_string;
|
|
127
|
+
validation: StringValidation;
|
|
91
128
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
129
|
+
interface ZodTooSmallIssue extends ZodIssueBase {
|
|
130
|
+
code: typeof ZodIssueCode.too_small;
|
|
131
|
+
minimum: number;
|
|
132
|
+
inclusive: boolean;
|
|
133
|
+
exact?: boolean;
|
|
134
|
+
type: "array" | "string" | "number" | "set" | "date";
|
|
96
135
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
136
|
+
interface ZodTooBigIssue extends ZodIssueBase {
|
|
137
|
+
code: typeof ZodIssueCode.too_big;
|
|
138
|
+
maximum: number;
|
|
139
|
+
inclusive: boolean;
|
|
140
|
+
exact?: boolean;
|
|
141
|
+
type: "array" | "string" | "number" | "set" | "date";
|
|
101
142
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
hide = 0
|
|
143
|
+
interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
|
|
144
|
+
code: typeof ZodIssueCode.invalid_intersection_types;
|
|
105
145
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
146
|
+
interface ZodNotMultipleOfIssue extends ZodIssueBase {
|
|
147
|
+
code: typeof ZodIssueCode.not_multiple_of;
|
|
148
|
+
multipleOf: number;
|
|
109
149
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
center = 1
|
|
150
|
+
interface ZodNotFiniteIssue extends ZodIssueBase {
|
|
151
|
+
code: typeof ZodIssueCode.not_finite;
|
|
113
152
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
type Common = Record<string, any>;
|
|
119
|
-
type FunctionProps = {
|
|
120
|
-
[key: string]: {
|
|
121
|
-
lastCall?: number;
|
|
122
|
-
retry?: number;
|
|
123
|
-
limit?: number;
|
|
153
|
+
interface ZodCustomIssue extends ZodIssueBase {
|
|
154
|
+
code: typeof ZodIssueCode.custom;
|
|
155
|
+
params?: {
|
|
156
|
+
[k: string]: any;
|
|
124
157
|
};
|
|
158
|
+
}
|
|
159
|
+
declare type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue;
|
|
160
|
+
declare type ZodIssue = ZodIssueOptionalMessage & {
|
|
161
|
+
fatal?: boolean;
|
|
162
|
+
message: string;
|
|
125
163
|
};
|
|
126
|
-
type
|
|
127
|
-
[
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
164
|
+
declare type ZodFormattedError<T, U = string> = {
|
|
165
|
+
_errors: U[];
|
|
166
|
+
} & (NonNullable<T> extends [any, ...any[]] ? {
|
|
167
|
+
[K in keyof NonNullable<T>]?: ZodFormattedError<NonNullable<T>[K], U>;
|
|
168
|
+
} : NonNullable<T> extends any[] ? {
|
|
169
|
+
[k: number]: ZodFormattedError<NonNullable<T>[number], U>;
|
|
170
|
+
} : NonNullable<T> extends object ? {
|
|
171
|
+
[K in keyof NonNullable<T>]?: ZodFormattedError<NonNullable<T>[K], U>;
|
|
172
|
+
} : unknown);
|
|
173
|
+
declare class ZodError<T = any> extends Error {
|
|
174
|
+
issues: ZodIssue[];
|
|
175
|
+
get errors(): ZodIssue[];
|
|
176
|
+
constructor(issues: ZodIssue[]);
|
|
177
|
+
format(): ZodFormattedError<T>;
|
|
178
|
+
format<U>(mapper: (issue: ZodIssue) => U): ZodFormattedError<T, U>;
|
|
179
|
+
static create: (issues: ZodIssue[]) => ZodError<any>;
|
|
180
|
+
toString(): string;
|
|
181
|
+
get message(): string;
|
|
182
|
+
get isEmpty(): boolean;
|
|
183
|
+
addIssue: (sub: ZodIssue) => void;
|
|
184
|
+
addIssues: (subs?: ZodIssue[]) => void;
|
|
185
|
+
flatten(): typeToFlattenedError<T>;
|
|
186
|
+
flatten<U>(mapper?: (issue: ZodIssue) => U): typeToFlattenedError<T, U>;
|
|
187
|
+
get formErrors(): typeToFlattenedError<T, string>;
|
|
188
|
+
}
|
|
189
|
+
declare type stripPath<T extends object> = T extends any ? util.OmitKeys<T, "path"> : never;
|
|
190
|
+
declare type IssueData = stripPath<ZodIssueOptionalMessage> & {
|
|
191
|
+
path?: (string | number)[];
|
|
192
|
+
fatal?: boolean;
|
|
151
193
|
};
|
|
152
|
-
type
|
|
153
|
-
|
|
154
|
-
error_message: string;
|
|
155
|
-
action: string;
|
|
194
|
+
declare type ErrorMapCtx = {
|
|
195
|
+
defaultError: string;
|
|
156
196
|
data: any;
|
|
157
197
|
};
|
|
158
|
-
type
|
|
159
|
-
action: string;
|
|
160
|
-
error: number;
|
|
198
|
+
declare type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => {
|
|
161
199
|
message: string;
|
|
162
|
-
data: any;
|
|
163
200
|
};
|
|
164
201
|
|
|
165
|
-
declare
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
requireAccessToken: boolean;
|
|
178
|
-
};
|
|
179
|
-
OPEN_PAGE: {};
|
|
180
|
-
OPEN_PHOTODETAIL: {};
|
|
181
|
-
OPEN_GALARY: {};
|
|
182
|
-
OPEN_GAMECENTER: {};
|
|
183
|
-
OPEN_GAMENEWS: {};
|
|
184
|
-
OPEN_TAB_CONTACT: {};
|
|
185
|
-
OPEN_TAB_SOCIAL: {};
|
|
186
|
-
OPEN_FRIENDSUGGEST: {};
|
|
187
|
-
OPEN_GROUPLIST: {};
|
|
188
|
-
OPEN_NEARBY: {};
|
|
189
|
-
OPEN_ROOM: {};
|
|
190
|
-
OPEN_STICKERSTORE: {};
|
|
191
|
-
OPEN_CREATECHAT: {};
|
|
192
|
-
COPY_LINK_CATESTICKER: {};
|
|
193
|
-
REQUEST_BUY_STICKER: {};
|
|
194
|
-
OPEN_CHAT: {
|
|
195
|
-
requireAccessToken: boolean;
|
|
202
|
+
declare type ParseParams = {
|
|
203
|
+
path: (string | number)[];
|
|
204
|
+
errorMap: ZodErrorMap;
|
|
205
|
+
async: boolean;
|
|
206
|
+
};
|
|
207
|
+
declare type ParsePathComponent = string | number;
|
|
208
|
+
declare type ParsePath = ParsePathComponent[];
|
|
209
|
+
interface ParseContext {
|
|
210
|
+
readonly common: {
|
|
211
|
+
readonly issues: ZodIssue[];
|
|
212
|
+
readonly contextualErrorMap?: ZodErrorMap;
|
|
213
|
+
readonly async: boolean;
|
|
196
214
|
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
215
|
+
readonly path: ParsePath;
|
|
216
|
+
readonly schemaErrorMap?: ZodErrorMap;
|
|
217
|
+
readonly parent: ParseContext | null;
|
|
218
|
+
readonly data: any;
|
|
219
|
+
readonly parsedType: ZodParsedType;
|
|
220
|
+
}
|
|
221
|
+
declare type ParseInput = {
|
|
222
|
+
data: any;
|
|
223
|
+
path: (string | number)[];
|
|
224
|
+
parent: ParseContext;
|
|
225
|
+
};
|
|
226
|
+
declare class ParseStatus {
|
|
227
|
+
value: "aborted" | "dirty" | "valid";
|
|
228
|
+
dirty(): void;
|
|
229
|
+
abort(): void;
|
|
230
|
+
static mergeArray(status: ParseStatus, results: SyncParseReturnType<any>[]): SyncParseReturnType;
|
|
231
|
+
static mergeObjectAsync(status: ParseStatus, pairs: {
|
|
232
|
+
key: ParseReturnType<any>;
|
|
233
|
+
value: ParseReturnType<any>;
|
|
234
|
+
}[]): Promise<SyncParseReturnType<any>>;
|
|
235
|
+
static mergeObjectSync(status: ParseStatus, pairs: {
|
|
236
|
+
key: SyncParseReturnType<any>;
|
|
237
|
+
value: SyncParseReturnType<any>;
|
|
238
|
+
alwaysSet?: boolean;
|
|
239
|
+
}[]): SyncParseReturnType;
|
|
240
|
+
}
|
|
241
|
+
declare type INVALID = {
|
|
242
|
+
status: "aborted";
|
|
243
|
+
};
|
|
244
|
+
declare const INVALID: INVALID;
|
|
245
|
+
declare type DIRTY<T> = {
|
|
246
|
+
status: "dirty";
|
|
247
|
+
value: T;
|
|
248
|
+
};
|
|
249
|
+
declare const DIRTY: <T>(value: T) => DIRTY<T>;
|
|
250
|
+
declare type OK<T> = {
|
|
251
|
+
status: "valid";
|
|
252
|
+
value: T;
|
|
253
|
+
};
|
|
254
|
+
declare const OK: <T>(value: T) => OK<T>;
|
|
255
|
+
declare type SyncParseReturnType<T = any> = OK<T> | DIRTY<T> | INVALID;
|
|
256
|
+
declare type AsyncParseReturnType<T> = Promise<SyncParseReturnType<T>>;
|
|
257
|
+
declare type ParseReturnType<T> = SyncParseReturnType<T> | AsyncParseReturnType<T>;
|
|
258
|
+
|
|
259
|
+
declare namespace enumUtil {
|
|
260
|
+
type UnionToIntersectionFn<T> = (T extends unknown ? (k: () => T) => void : never) extends (k: infer Intersection) => void ? Intersection : never;
|
|
261
|
+
type GetUnionLast<T> = UnionToIntersectionFn<T> extends () => infer Last ? Last : never;
|
|
262
|
+
type UnionToTuple<T, Tuple extends unknown[] = []> = [T] extends [never] ? Tuple : UnionToTuple<Exclude<T, GetUnionLast<T>>, [GetUnionLast<T>, ...Tuple]>;
|
|
263
|
+
type CastToStringTuple<T> = T extends [string, ...string[]] ? T : never;
|
|
264
|
+
export type UnionToTupleString<T> = CastToStringTuple<UnionToTuple<T>>;
|
|
265
|
+
export {};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
declare namespace errorUtil {
|
|
269
|
+
type ErrMessage = string | {
|
|
270
|
+
message?: string;
|
|
203
271
|
};
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
REPORT_ABUSE: {
|
|
207
|
-
haveCallback: boolean;
|
|
272
|
+
const errToObj: (message?: ErrMessage | undefined) => {
|
|
273
|
+
message?: string | undefined;
|
|
208
274
|
};
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
275
|
+
const toString: (message?: ErrMessage | undefined) => string | undefined;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
declare namespace partialUtil {
|
|
279
|
+
type DeepPartial<T extends ZodTypeAny> = T extends ZodObject<infer Shape, infer Params, infer Catchall> ? ZodObject<{
|
|
280
|
+
[k in keyof Shape]: ZodOptional<DeepPartial<Shape[k]>>;
|
|
281
|
+
}, 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> ? {
|
|
282
|
+
[k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial<Items[k]> : never;
|
|
283
|
+
} extends infer PI ? PI extends ZodTupleItems ? ZodTuple<PI> : never : never : T;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
declare type RefinementCtx = {
|
|
287
|
+
addIssue: (arg: IssueData) => void;
|
|
288
|
+
path: (string | number)[];
|
|
289
|
+
};
|
|
290
|
+
declare type ZodRawShape = {
|
|
291
|
+
[k: string]: ZodTypeAny;
|
|
292
|
+
};
|
|
293
|
+
declare type ZodTypeAny = ZodType<any, any, any>;
|
|
294
|
+
declare type TypeOf<T extends ZodType<any, any, any>> = T["_output"];
|
|
295
|
+
declare type input<T extends ZodType<any, any, any>> = T["_input"];
|
|
296
|
+
declare type output<T extends ZodType<any, any, any>> = T["_output"];
|
|
297
|
+
|
|
298
|
+
declare type CustomErrorParams = Partial<util.Omit<ZodCustomIssue, "code">>;
|
|
299
|
+
interface ZodTypeDef {
|
|
300
|
+
errorMap?: ZodErrorMap;
|
|
301
|
+
description?: string;
|
|
302
|
+
}
|
|
303
|
+
declare type RawCreateParams = {
|
|
304
|
+
errorMap?: ZodErrorMap;
|
|
305
|
+
invalid_type_error?: string;
|
|
306
|
+
required_error?: string;
|
|
307
|
+
description?: string;
|
|
308
|
+
} | undefined;
|
|
309
|
+
declare type SafeParseSuccess<Output> = {
|
|
310
|
+
success: true;
|
|
311
|
+
data: Output;
|
|
312
|
+
};
|
|
313
|
+
declare type SafeParseError<Input> = {
|
|
314
|
+
success: false;
|
|
315
|
+
error: ZodError<Input>;
|
|
316
|
+
};
|
|
317
|
+
declare type SafeParseReturnType<Input, Output> = SafeParseSuccess<Output> | SafeParseError<Input>;
|
|
318
|
+
declare abstract class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> {
|
|
319
|
+
readonly _type: Output;
|
|
320
|
+
readonly _output: Output;
|
|
321
|
+
readonly _input: Input;
|
|
322
|
+
readonly _def: Def;
|
|
323
|
+
get description(): string | undefined;
|
|
324
|
+
abstract _parse(input: ParseInput): ParseReturnType<Output>;
|
|
325
|
+
_getType(input: ParseInput): string;
|
|
326
|
+
_getOrReturnCtx(input: ParseInput, ctx?: ParseContext | undefined): ParseContext;
|
|
327
|
+
_processInputParams(input: ParseInput): {
|
|
328
|
+
status: ParseStatus;
|
|
329
|
+
ctx: ParseContext;
|
|
230
330
|
};
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
331
|
+
_parseSync(input: ParseInput): SyncParseReturnType<Output>;
|
|
332
|
+
_parseAsync(input: ParseInput): AsyncParseReturnType<Output>;
|
|
333
|
+
parse(data: unknown, params?: Partial<ParseParams>): Output;
|
|
334
|
+
safeParse(data: unknown, params?: Partial<ParseParams>): SafeParseReturnType<Input, Output>;
|
|
335
|
+
parseAsync(data: unknown, params?: Partial<ParseParams>): Promise<Output>;
|
|
336
|
+
safeParseAsync(data: unknown, params?: Partial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;
|
|
337
|
+
/** Alias of safeParseAsync */
|
|
338
|
+
spa: (data: unknown, params?: Partial<ParseParams> | undefined) => Promise<SafeParseReturnType<Input, Output>>;
|
|
339
|
+
refine<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, RefinedOutput, Input>;
|
|
340
|
+
refine(check: (arg: Output) => unknown | Promise<unknown>, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, Output, Input>;
|
|
341
|
+
refinement<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, RefinedOutput, Input>;
|
|
342
|
+
refinement(check: (arg: Output) => boolean, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, Output, Input>;
|
|
343
|
+
_refinement(refinement: RefinementEffect<Output>["refinement"]): ZodEffects<this, Output, Input>;
|
|
344
|
+
superRefine<RefinedOutput extends Output>(refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput): ZodEffects<this, RefinedOutput, Input>;
|
|
345
|
+
superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects<this, Output, Input>;
|
|
346
|
+
constructor(def: Def);
|
|
347
|
+
optional(): ZodOptional<this>;
|
|
348
|
+
nullable(): ZodNullable<this>;
|
|
349
|
+
nullish(): ZodOptional<ZodNullable<this>>;
|
|
350
|
+
array(): ZodArray<this>;
|
|
351
|
+
promise(): ZodPromise<this>;
|
|
352
|
+
or<T extends ZodTypeAny>(option: T): ZodUnion<[this, T]>;
|
|
353
|
+
and<T extends ZodTypeAny>(incoming: T): ZodIntersection<this, T>;
|
|
354
|
+
transform<NewOut>(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise<NewOut>): ZodEffects<this, NewOut>;
|
|
355
|
+
default(def: util.noUndefined<Input>): ZodDefault<this>;
|
|
356
|
+
default(def: () => util.noUndefined<Input>): ZodDefault<this>;
|
|
357
|
+
brand<B extends string | number | symbol>(brand?: B): ZodBranded<this, B>;
|
|
358
|
+
catch(def: Output): ZodCatch<this>;
|
|
359
|
+
catch(def: () => Output): ZodCatch<this>;
|
|
360
|
+
describe(description: string): this;
|
|
361
|
+
pipe<T extends ZodTypeAny>(target: T): ZodPipeline<this, T>;
|
|
362
|
+
isOptional(): boolean;
|
|
363
|
+
isNullable(): boolean;
|
|
364
|
+
}
|
|
365
|
+
declare type ZodStringCheck = {
|
|
366
|
+
kind: "min";
|
|
367
|
+
value: number;
|
|
368
|
+
message?: string;
|
|
369
|
+
} | {
|
|
370
|
+
kind: "max";
|
|
371
|
+
value: number;
|
|
372
|
+
message?: string;
|
|
373
|
+
} | {
|
|
374
|
+
kind: "length";
|
|
375
|
+
value: number;
|
|
376
|
+
message?: string;
|
|
377
|
+
} | {
|
|
378
|
+
kind: "email";
|
|
379
|
+
message?: string;
|
|
380
|
+
} | {
|
|
381
|
+
kind: "url";
|
|
382
|
+
message?: string;
|
|
383
|
+
} | {
|
|
384
|
+
kind: "uuid";
|
|
385
|
+
message?: string;
|
|
386
|
+
} | {
|
|
387
|
+
kind: "cuid";
|
|
388
|
+
message?: string;
|
|
389
|
+
} | {
|
|
390
|
+
kind: "cuid2";
|
|
391
|
+
message?: string;
|
|
392
|
+
} | {
|
|
393
|
+
kind: "startsWith";
|
|
394
|
+
value: string;
|
|
395
|
+
message?: string;
|
|
396
|
+
} | {
|
|
397
|
+
kind: "endsWith";
|
|
398
|
+
value: string;
|
|
399
|
+
message?: string;
|
|
400
|
+
} | {
|
|
401
|
+
kind: "regex";
|
|
402
|
+
regex: RegExp;
|
|
403
|
+
message?: string;
|
|
404
|
+
} | {
|
|
405
|
+
kind: "trim";
|
|
406
|
+
message?: string;
|
|
407
|
+
} | {
|
|
408
|
+
kind: "datetime";
|
|
409
|
+
offset: boolean;
|
|
410
|
+
precision: number | null;
|
|
411
|
+
message?: string;
|
|
412
|
+
};
|
|
413
|
+
interface ZodStringDef extends ZodTypeDef {
|
|
414
|
+
checks: ZodStringCheck[];
|
|
415
|
+
typeName: ZodFirstPartyTypeKind.ZodString;
|
|
416
|
+
coerce: boolean;
|
|
417
|
+
}
|
|
418
|
+
declare class ZodString extends ZodType<string, ZodStringDef> {
|
|
419
|
+
_parse(input: ParseInput): ParseReturnType<string>;
|
|
420
|
+
protected _regex: (regex: RegExp, validation: StringValidation, message?: errorUtil.ErrMessage | undefined) => ZodEffects<this, string, string>;
|
|
421
|
+
_addCheck(check: ZodStringCheck): ZodString;
|
|
422
|
+
email(message?: errorUtil.ErrMessage): ZodString;
|
|
423
|
+
url(message?: errorUtil.ErrMessage): ZodString;
|
|
424
|
+
uuid(message?: errorUtil.ErrMessage): ZodString;
|
|
425
|
+
cuid(message?: errorUtil.ErrMessage): ZodString;
|
|
426
|
+
cuid2(message?: errorUtil.ErrMessage): ZodString;
|
|
427
|
+
datetime(options?: string | {
|
|
428
|
+
message?: string | undefined;
|
|
429
|
+
precision?: number | null;
|
|
430
|
+
offset?: boolean;
|
|
431
|
+
}): ZodString;
|
|
432
|
+
regex(regex: RegExp, message?: errorUtil.ErrMessage): ZodString;
|
|
433
|
+
startsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
|
|
434
|
+
endsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
|
|
435
|
+
min(minLength: number, message?: errorUtil.ErrMessage): ZodString;
|
|
436
|
+
max(maxLength: number, message?: errorUtil.ErrMessage): ZodString;
|
|
437
|
+
length(len: number, message?: errorUtil.ErrMessage): ZodString;
|
|
438
|
+
/**
|
|
439
|
+
* @deprecated Use z.string().min(1) instead.
|
|
440
|
+
* @see {@link ZodString.min}
|
|
441
|
+
*/
|
|
442
|
+
nonempty: (message?: errorUtil.ErrMessage | undefined) => ZodString;
|
|
443
|
+
trim: () => ZodString;
|
|
444
|
+
get isDatetime(): boolean;
|
|
445
|
+
get isEmail(): boolean;
|
|
446
|
+
get isURL(): boolean;
|
|
447
|
+
get isUUID(): boolean;
|
|
448
|
+
get isCUID(): boolean;
|
|
449
|
+
get isCUID2(): boolean;
|
|
450
|
+
get minLength(): number | null;
|
|
451
|
+
get maxLength(): number | null;
|
|
452
|
+
static create: (params?: ({
|
|
453
|
+
errorMap?: ZodErrorMap | undefined;
|
|
454
|
+
invalid_type_error?: string | undefined;
|
|
455
|
+
required_error?: string | undefined;
|
|
456
|
+
description?: string | undefined;
|
|
457
|
+
} & {
|
|
458
|
+
coerce?: true | undefined;
|
|
459
|
+
}) | undefined) => ZodString;
|
|
460
|
+
}
|
|
461
|
+
declare type ZodNumberCheck = {
|
|
462
|
+
kind: "min";
|
|
463
|
+
value: number;
|
|
464
|
+
inclusive: boolean;
|
|
465
|
+
message?: string;
|
|
466
|
+
} | {
|
|
467
|
+
kind: "max";
|
|
468
|
+
value: number;
|
|
469
|
+
inclusive: boolean;
|
|
470
|
+
message?: string;
|
|
471
|
+
} | {
|
|
472
|
+
kind: "int";
|
|
473
|
+
message?: string;
|
|
474
|
+
} | {
|
|
475
|
+
kind: "multipleOf";
|
|
476
|
+
value: number;
|
|
477
|
+
message?: string;
|
|
478
|
+
} | {
|
|
479
|
+
kind: "finite";
|
|
480
|
+
message?: string;
|
|
481
|
+
};
|
|
482
|
+
interface ZodNumberDef extends ZodTypeDef {
|
|
483
|
+
checks: ZodNumberCheck[];
|
|
484
|
+
typeName: ZodFirstPartyTypeKind.ZodNumber;
|
|
485
|
+
coerce: boolean;
|
|
486
|
+
}
|
|
487
|
+
declare class ZodNumber extends ZodType<number, ZodNumberDef> {
|
|
488
|
+
_parse(input: ParseInput): ParseReturnType<number>;
|
|
489
|
+
static create: (params?: ({
|
|
490
|
+
errorMap?: ZodErrorMap | undefined;
|
|
491
|
+
invalid_type_error?: string | undefined;
|
|
492
|
+
required_error?: string | undefined;
|
|
493
|
+
description?: string | undefined;
|
|
494
|
+
} & {
|
|
495
|
+
coerce?: boolean | undefined;
|
|
496
|
+
}) | undefined) => ZodNumber;
|
|
497
|
+
gte(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
498
|
+
min: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
499
|
+
gt(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
500
|
+
lte(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
501
|
+
max: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
502
|
+
lt(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
503
|
+
protected setLimit(kind: "min" | "max", value: number, inclusive: boolean, message?: string): ZodNumber;
|
|
504
|
+
_addCheck(check: ZodNumberCheck): ZodNumber;
|
|
505
|
+
int(message?: errorUtil.ErrMessage): ZodNumber;
|
|
506
|
+
positive(message?: errorUtil.ErrMessage): ZodNumber;
|
|
507
|
+
negative(message?: errorUtil.ErrMessage): ZodNumber;
|
|
508
|
+
nonpositive(message?: errorUtil.ErrMessage): ZodNumber;
|
|
509
|
+
nonnegative(message?: errorUtil.ErrMessage): ZodNumber;
|
|
510
|
+
multipleOf(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
511
|
+
finite(message?: errorUtil.ErrMessage): ZodNumber;
|
|
512
|
+
step: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
513
|
+
get minValue(): number | null;
|
|
514
|
+
get maxValue(): number | null;
|
|
515
|
+
get isInt(): boolean;
|
|
516
|
+
get isFinite(): boolean;
|
|
517
|
+
}
|
|
518
|
+
interface ZodBooleanDef extends ZodTypeDef {
|
|
519
|
+
typeName: ZodFirstPartyTypeKind.ZodBoolean;
|
|
520
|
+
coerce: boolean;
|
|
521
|
+
}
|
|
522
|
+
declare class ZodBoolean extends ZodType<boolean, ZodBooleanDef> {
|
|
523
|
+
_parse(input: ParseInput): ParseReturnType<boolean>;
|
|
524
|
+
static create: (params?: ({
|
|
525
|
+
errorMap?: ZodErrorMap | undefined;
|
|
526
|
+
invalid_type_error?: string | undefined;
|
|
527
|
+
required_error?: string | undefined;
|
|
528
|
+
description?: string | undefined;
|
|
529
|
+
} & {
|
|
530
|
+
coerce?: boolean | undefined;
|
|
531
|
+
}) | undefined) => ZodBoolean;
|
|
532
|
+
}
|
|
533
|
+
interface ZodAnyDef extends ZodTypeDef {
|
|
534
|
+
typeName: ZodFirstPartyTypeKind.ZodAny;
|
|
535
|
+
}
|
|
536
|
+
declare class ZodAny extends ZodType<any, ZodAnyDef> {
|
|
537
|
+
_any: true;
|
|
538
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
539
|
+
static create: (params?: RawCreateParams) => ZodAny;
|
|
540
|
+
}
|
|
541
|
+
interface ZodUnknownDef extends ZodTypeDef {
|
|
542
|
+
typeName: ZodFirstPartyTypeKind.ZodUnknown;
|
|
543
|
+
}
|
|
544
|
+
declare class ZodUnknown extends ZodType<unknown, ZodUnknownDef> {
|
|
545
|
+
_unknown: true;
|
|
546
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
547
|
+
static create: (params?: RawCreateParams) => ZodUnknown;
|
|
548
|
+
}
|
|
549
|
+
interface ZodVoidDef extends ZodTypeDef {
|
|
550
|
+
typeName: ZodFirstPartyTypeKind.ZodVoid;
|
|
551
|
+
}
|
|
552
|
+
declare class ZodVoid extends ZodType<void, ZodVoidDef> {
|
|
553
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
554
|
+
static create: (params?: RawCreateParams) => ZodVoid;
|
|
555
|
+
}
|
|
556
|
+
interface ZodArrayDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
557
|
+
type: T;
|
|
558
|
+
typeName: ZodFirstPartyTypeKind.ZodArray;
|
|
559
|
+
exactLength: {
|
|
560
|
+
value: number;
|
|
561
|
+
message?: string;
|
|
562
|
+
} | null;
|
|
563
|
+
minLength: {
|
|
564
|
+
value: number;
|
|
565
|
+
message?: string;
|
|
566
|
+
} | null;
|
|
567
|
+
maxLength: {
|
|
568
|
+
value: number;
|
|
569
|
+
message?: string;
|
|
570
|
+
} | null;
|
|
571
|
+
}
|
|
572
|
+
declare type ArrayCardinality = "many" | "atleastone";
|
|
573
|
+
declare type arrayOutputType<T extends ZodTypeAny, Cardinality extends ArrayCardinality = "many"> = Cardinality extends "atleastone" ? [T["_output"], ...T["_output"][]] : T["_output"][];
|
|
574
|
+
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"][]> {
|
|
575
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
576
|
+
get element(): T;
|
|
577
|
+
min(minLength: number, message?: errorUtil.ErrMessage): this;
|
|
578
|
+
max(maxLength: number, message?: errorUtil.ErrMessage): this;
|
|
579
|
+
length(len: number, message?: errorUtil.ErrMessage): this;
|
|
580
|
+
nonempty(message?: errorUtil.ErrMessage): ZodArray<T, "atleastone">;
|
|
581
|
+
static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodArray<T_1, "many">;
|
|
582
|
+
}
|
|
583
|
+
declare namespace objectUtil {
|
|
584
|
+
export type MergeShapes<U extends ZodRawShape, V extends ZodRawShape> = {
|
|
585
|
+
[k in Exclude<keyof U, keyof V>]: U[k];
|
|
586
|
+
} & V;
|
|
587
|
+
type optionalKeys<T extends object> = {
|
|
588
|
+
[k in keyof T]: undefined extends T[k] ? k : never;
|
|
589
|
+
}[keyof T];
|
|
590
|
+
type requiredKeys<T extends object> = {
|
|
591
|
+
[k in keyof T]: undefined extends T[k] ? never : k;
|
|
592
|
+
}[keyof T];
|
|
593
|
+
export type addQuestionMarks<T extends object> = Partial<Pick<T, optionalKeys<T>>> & Pick<T, requiredKeys<T>>;
|
|
594
|
+
export type identity<T> = T;
|
|
595
|
+
export type flatten<T extends object> = identity<{
|
|
596
|
+
[k in keyof T]: T[k];
|
|
597
|
+
}>;
|
|
598
|
+
export type noNeverKeys<T extends ZodRawShape> = {
|
|
599
|
+
[k in keyof T]: [T[k]] extends [never] ? never : k;
|
|
600
|
+
}[keyof T];
|
|
601
|
+
export type noNever<T extends ZodRawShape> = identity<{
|
|
602
|
+
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;
|
|
603
|
+
}>;
|
|
604
|
+
export const mergeShapes: <U extends ZodRawShape, T extends ZodRawShape>(first: U, second: T) => T & U;
|
|
605
|
+
export {};
|
|
606
|
+
}
|
|
607
|
+
declare type extendShape<A, B> = util.flatten<Omit<A, keyof B> & B>;
|
|
608
|
+
declare type UnknownKeysParam = "passthrough" | "strict" | "strip";
|
|
609
|
+
interface ZodObjectDef<T extends ZodRawShape = ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
610
|
+
typeName: ZodFirstPartyTypeKind.ZodObject;
|
|
611
|
+
shape: () => T;
|
|
612
|
+
catchall: Catchall;
|
|
613
|
+
unknownKeys: UnknownKeys;
|
|
614
|
+
}
|
|
615
|
+
declare type baseObjectOutputType<Shape extends ZodRawShape> = objectUtil.addQuestionMarks<{
|
|
616
|
+
[k in keyof Shape]: Shape[k]["_output"];
|
|
617
|
+
}>;
|
|
618
|
+
declare type objectOutputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny> = ZodTypeAny extends Catchall ? objectUtil.flatten<baseObjectOutputType<Shape>> : objectUtil.flatten<baseObjectOutputType<Shape> & {
|
|
619
|
+
[k: string]: Catchall["_output"];
|
|
620
|
+
}>;
|
|
621
|
+
declare type baseObjectInputType<Shape extends ZodRawShape> = objectUtil.flatten<objectUtil.addQuestionMarks<{
|
|
622
|
+
[k in keyof Shape]: Shape[k]["_input"];
|
|
623
|
+
}>>;
|
|
624
|
+
declare type objectInputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny> = ZodTypeAny extends Catchall ? baseObjectInputType<Shape> : objectUtil.flatten<baseObjectInputType<Shape> & {
|
|
625
|
+
[k: string]: Catchall["_input"];
|
|
626
|
+
}>;
|
|
627
|
+
declare type deoptional<T extends ZodTypeAny> = T extends ZodOptional<infer U> ? deoptional<U> : T extends ZodNullable<infer U> ? ZodNullable<deoptional<U>> : T;
|
|
628
|
+
declare type objectKeyMask<Obj> = {
|
|
629
|
+
[k in keyof Obj]?: true;
|
|
630
|
+
};
|
|
631
|
+
declare type noUnrecognized<Obj extends object, Shape extends object> = {
|
|
632
|
+
[k in keyof Obj]: k extends keyof Shape ? Obj[k] : never;
|
|
633
|
+
};
|
|
634
|
+
declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny, Output = objectOutputType<T, Catchall>, Input = objectInputType<T, Catchall>> extends ZodType<Output, ZodObjectDef<T, UnknownKeys, Catchall>, Input> {
|
|
635
|
+
private _cached;
|
|
636
|
+
_getCached(): {
|
|
637
|
+
shape: T;
|
|
638
|
+
keys: string[];
|
|
639
|
+
};
|
|
640
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
641
|
+
get shape(): T;
|
|
642
|
+
strict(message?: errorUtil.ErrMessage): ZodObject<T, "strict", Catchall>;
|
|
643
|
+
strip(): ZodObject<T, "strip", Catchall>;
|
|
644
|
+
passthrough(): ZodObject<T, "passthrough", Catchall>;
|
|
645
|
+
/**
|
|
646
|
+
* @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.
|
|
647
|
+
* If you want to pass through unknown properties, use `.passthrough()` instead.
|
|
648
|
+
*/
|
|
649
|
+
nonstrict: () => ZodObject<T, "passthrough", Catchall>;
|
|
650
|
+
extend<Augmentation extends ZodRawShape>(augmentation: Augmentation): ZodObject<extendShape<T, Augmentation>, UnknownKeys, Catchall>;
|
|
651
|
+
/**
|
|
652
|
+
* @deprecated Use `.extend` instead
|
|
653
|
+
* */
|
|
654
|
+
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>, objectInputType<{ [k in keyof (Omit<T, keyof Augmentation> & Augmentation)]: (Omit<T, keyof Augmentation> & Augmentation)[k]; }, Catchall>>;
|
|
655
|
+
/**
|
|
656
|
+
* Prior to zod@1.0.12 there was a bug in the
|
|
657
|
+
* inferred type of merged objects. Please
|
|
658
|
+
* upgrade if you are experiencing issues.
|
|
659
|
+
*/
|
|
660
|
+
merge<Incoming extends AnyZodObject, Augmentation extends Incoming["shape"]>(merging: Incoming): ZodObject<extendShape<T, Augmentation>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>;
|
|
661
|
+
setKey<Key extends string, Schema extends ZodTypeAny>(key: Key, schema: Schema): ZodObject<T & {
|
|
662
|
+
[k in Key]: Schema;
|
|
663
|
+
}, UnknownKeys, Catchall>;
|
|
664
|
+
catchall<Index extends ZodTypeAny>(index: Index): ZodObject<T, UnknownKeys, Index>;
|
|
665
|
+
pick<Mask extends objectKeyMask<T>>(mask: noUnrecognized<Mask, T>): ZodObject<Pick<T, Extract<keyof T, keyof Mask>>, UnknownKeys, Catchall>;
|
|
666
|
+
omit<Mask extends objectKeyMask<T>>(mask: noUnrecognized<Mask, objectKeyMask<T>>): ZodObject<Omit<T, keyof Mask>, UnknownKeys, Catchall>;
|
|
667
|
+
deepPartial(): partialUtil.DeepPartial<this>;
|
|
668
|
+
partial(): ZodObject<{
|
|
669
|
+
[k in keyof T]: ZodOptional<T[k]>;
|
|
670
|
+
}, UnknownKeys, Catchall>;
|
|
671
|
+
partial<Mask extends objectKeyMask<T>>(mask: noUnrecognized<Mask, objectKeyMask<T>>): ZodObject<objectUtil.noNever<{
|
|
672
|
+
[k in keyof T]: k extends keyof Mask ? ZodOptional<T[k]> : T[k];
|
|
673
|
+
}>, UnknownKeys, Catchall>;
|
|
674
|
+
required(): ZodObject<{
|
|
675
|
+
[k in keyof T]: deoptional<T[k]>;
|
|
676
|
+
}, UnknownKeys, Catchall>;
|
|
677
|
+
required<Mask extends objectKeyMask<T>>(mask: noUnrecognized<Mask, objectKeyMask<T>>): ZodObject<objectUtil.noNever<{
|
|
678
|
+
[k in keyof T]: k extends keyof Mask ? deoptional<T[k]> : T[k];
|
|
679
|
+
}>, UnknownKeys, Catchall>;
|
|
680
|
+
keyof(): ZodEnum<enumUtil.UnionToTupleString<keyof T>>;
|
|
681
|
+
static create: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k in keyof baseObjectOutputType<T_1>]: baseObjectOutputType<T_1>[k]; }, { [k_2 in keyof objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>[k_2]; }>;
|
|
682
|
+
static strictCreate: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strict", ZodTypeAny, { [k in keyof baseObjectOutputType<T_1>]: baseObjectOutputType<T_1>[k]; }, { [k_2 in keyof objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>[k_2]; }>;
|
|
683
|
+
static lazycreate: <T_1 extends ZodRawShape>(shape: () => T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k in keyof baseObjectOutputType<T_1>]: baseObjectOutputType<T_1>[k]; }, { [k_2 in keyof objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>[k_2]; }>;
|
|
684
|
+
}
|
|
685
|
+
declare type AnyZodObject = ZodObject<any, any, any>;
|
|
686
|
+
declare type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>;
|
|
687
|
+
interface ZodUnionDef<T extends ZodUnionOptions = Readonly<[
|
|
688
|
+
ZodTypeAny,
|
|
689
|
+
ZodTypeAny,
|
|
690
|
+
...ZodTypeAny[]
|
|
691
|
+
]>> extends ZodTypeDef {
|
|
692
|
+
options: T;
|
|
693
|
+
typeName: ZodFirstPartyTypeKind.ZodUnion;
|
|
694
|
+
}
|
|
695
|
+
declare class ZodUnion<T extends ZodUnionOptions> extends ZodType<T[number]["_output"], ZodUnionDef<T>, T[number]["_input"]> {
|
|
696
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
697
|
+
get options(): T;
|
|
698
|
+
static create: <T_1 extends readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(types: T_1, params?: RawCreateParams) => ZodUnion<T_1>;
|
|
699
|
+
}
|
|
700
|
+
interface ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
701
|
+
left: T;
|
|
702
|
+
right: U;
|
|
703
|
+
typeName: ZodFirstPartyTypeKind.ZodIntersection;
|
|
704
|
+
}
|
|
705
|
+
declare class ZodIntersection<T extends ZodTypeAny, U extends ZodTypeAny> extends ZodType<T["_output"] & U["_output"], ZodIntersectionDef<T, U>, T["_input"] & U["_input"]> {
|
|
706
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
707
|
+
static create: <T_1 extends ZodTypeAny, U_1 extends ZodTypeAny>(left: T_1, right: U_1, params?: RawCreateParams) => ZodIntersection<T_1, U_1>;
|
|
708
|
+
}
|
|
709
|
+
declare type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];
|
|
710
|
+
declare type AssertArray<T> = T extends any[] ? T : never;
|
|
711
|
+
declare type OutputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
|
|
712
|
+
[k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_output"] : never;
|
|
713
|
+
}>;
|
|
714
|
+
declare type OutputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...OutputTypeOfTuple<T>, ...Rest["_output"][]] : OutputTypeOfTuple<T>;
|
|
715
|
+
declare type InputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
|
|
716
|
+
[k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_input"] : never;
|
|
717
|
+
}>;
|
|
718
|
+
declare type InputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...InputTypeOfTuple<T>, ...Rest["_input"][]] : InputTypeOfTuple<T>;
|
|
719
|
+
interface ZodTupleDef<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends ZodTypeAny | null = null> extends ZodTypeDef {
|
|
720
|
+
items: T;
|
|
721
|
+
rest: Rest;
|
|
722
|
+
typeName: ZodFirstPartyTypeKind.ZodTuple;
|
|
723
|
+
}
|
|
724
|
+
declare type AnyZodTuple = ZodTuple<[
|
|
725
|
+
ZodTypeAny,
|
|
726
|
+
...ZodTypeAny[]
|
|
727
|
+
] | [], ZodTypeAny | null>;
|
|
728
|
+
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>> {
|
|
729
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
730
|
+
get items(): T;
|
|
731
|
+
rest<Rest extends ZodTypeAny>(rest: Rest): ZodTuple<T, Rest>;
|
|
732
|
+
static create: <T_1 extends [] | [ZodTypeAny, ...ZodTypeAny[]]>(schemas: T_1, params?: RawCreateParams) => ZodTuple<T_1, null>;
|
|
733
|
+
}
|
|
734
|
+
interface ZodRecordDef<Key extends KeySchema = ZodString, Value extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
735
|
+
valueType: Value;
|
|
736
|
+
keyType: Key;
|
|
737
|
+
typeName: ZodFirstPartyTypeKind.ZodRecord;
|
|
738
|
+
}
|
|
739
|
+
declare type KeySchema = ZodType<string | number | symbol, any, any>;
|
|
740
|
+
declare type RecordType<K extends string | number | symbol, V> = [
|
|
741
|
+
string
|
|
742
|
+
] extends [K] ? Record<K, V> : [number] extends [K] ? Record<K, V> : [symbol] extends [K] ? Record<K, V> : Partial<Record<K, V>>;
|
|
743
|
+
declare 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"]>> {
|
|
744
|
+
get keySchema(): Key;
|
|
745
|
+
get valueSchema(): Value;
|
|
746
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
747
|
+
get element(): Value;
|
|
748
|
+
static create<Value extends ZodTypeAny>(valueType: Value, params?: RawCreateParams): ZodRecord<ZodString, Value>;
|
|
749
|
+
static create<Keys extends KeySchema, Value extends ZodTypeAny>(keySchema: Keys, valueType: Value, params?: RawCreateParams): ZodRecord<Keys, Value>;
|
|
750
|
+
}
|
|
751
|
+
interface ZodFunctionDef<Args extends ZodTuple<any, any> = ZodTuple<any, any>, Returns extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
752
|
+
args: Args;
|
|
753
|
+
returns: Returns;
|
|
754
|
+
typeName: ZodFirstPartyTypeKind.ZodFunction;
|
|
755
|
+
}
|
|
756
|
+
declare type OuterTypeOfFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> = Args["_input"] extends Array<any> ? (...args: Args["_input"]) => Returns["_output"] : never;
|
|
757
|
+
declare type InnerTypeOfFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> = Args["_output"] extends Array<any> ? (...args: Args["_output"]) => Returns["_input"] : never;
|
|
758
|
+
declare class ZodFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> extends ZodType<OuterTypeOfFunction<Args, Returns>, ZodFunctionDef<Args, Returns>, InnerTypeOfFunction<Args, Returns>> {
|
|
759
|
+
_parse(input: ParseInput): ParseReturnType<any>;
|
|
760
|
+
parameters(): Args;
|
|
761
|
+
returnType(): Returns;
|
|
762
|
+
args<Items extends Parameters<typeof ZodTuple["create"]>[0]>(...items: Items): ZodFunction<ZodTuple<Items, ZodUnknown>, Returns>;
|
|
763
|
+
returns<NewReturnType extends ZodType<any, any>>(returnType: NewReturnType): ZodFunction<Args, NewReturnType>;
|
|
764
|
+
implement<F extends InnerTypeOfFunction<Args, Returns>>(func: F): ReturnType<F> extends Returns["_output"] ? (...args: Args["_input"]) => ReturnType<F> : OuterTypeOfFunction<Args, Returns>;
|
|
765
|
+
strictImplement(func: InnerTypeOfFunction<Args, Returns>): InnerTypeOfFunction<Args, Returns>;
|
|
766
|
+
validate: <F extends InnerTypeOfFunction<Args, Returns>>(func: F) => ReturnType<F> extends Returns["_output"] ? (...args: Args["_input"]) => ReturnType<F> : OuterTypeOfFunction<Args, Returns>;
|
|
767
|
+
static create(): ZodFunction<ZodTuple<[], ZodUnknown>, ZodUnknown>;
|
|
768
|
+
static create<T extends AnyZodTuple = ZodTuple<[], ZodUnknown>>(args: T): ZodFunction<T, ZodUnknown>;
|
|
769
|
+
static create<T extends AnyZodTuple, U extends ZodTypeAny>(args: T, returns: U): ZodFunction<T, U>;
|
|
770
|
+
static create<T extends AnyZodTuple = ZodTuple<[], ZodUnknown>, U extends ZodTypeAny = ZodUnknown>(args: T, returns: U, params?: RawCreateParams): ZodFunction<T, U>;
|
|
771
|
+
}
|
|
772
|
+
declare type EnumValues = [string, ...string[]];
|
|
773
|
+
declare type Values<T extends EnumValues> = {
|
|
774
|
+
[k in T[number]]: k;
|
|
775
|
+
};
|
|
776
|
+
interface ZodEnumDef<T extends EnumValues = EnumValues> extends ZodTypeDef {
|
|
777
|
+
values: T;
|
|
778
|
+
typeName: ZodFirstPartyTypeKind.ZodEnum;
|
|
779
|
+
}
|
|
780
|
+
declare type Writeable<T> = {
|
|
781
|
+
-readonly [P in keyof T]: T[P];
|
|
782
|
+
};
|
|
783
|
+
declare type FilterEnum<Values, ToExclude> = Values extends [] ? [] : Values extends [infer Head, ...infer Rest] ? Head extends ToExclude ? FilterEnum<Rest, ToExclude> : [Head, ...FilterEnum<Rest, ToExclude>] : never;
|
|
784
|
+
declare type typecast<A, T> = A extends T ? A : never;
|
|
785
|
+
declare function createZodEnum<U extends string, T extends Readonly<[U, ...U[]]>>(values: T, params?: RawCreateParams): ZodEnum<Writeable<T>>;
|
|
786
|
+
declare function createZodEnum<U extends string, T extends [U, ...U[]]>(values: T, params?: RawCreateParams): ZodEnum<T>;
|
|
787
|
+
declare class ZodEnum<T extends [string, ...string[]]> extends ZodType<T[number], ZodEnumDef<T>> {
|
|
788
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
789
|
+
get options(): T;
|
|
790
|
+
get enum(): Values<T>;
|
|
791
|
+
get Values(): Values<T>;
|
|
792
|
+
get Enum(): Values<T>;
|
|
793
|
+
extract<ToExtract extends readonly [T[number], ...T[number][]]>(values: ToExtract): ZodEnum<Writeable<ToExtract>>;
|
|
794
|
+
exclude<ToExclude extends readonly [T[number], ...T[number][]]>(values: ToExclude): ZodEnum<typecast<Writeable<FilterEnum<T, ToExclude[number]>>, [string, ...string[]]>>;
|
|
795
|
+
static create: typeof createZodEnum;
|
|
796
|
+
}
|
|
797
|
+
interface ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
798
|
+
type: T;
|
|
799
|
+
typeName: ZodFirstPartyTypeKind.ZodPromise;
|
|
800
|
+
}
|
|
801
|
+
declare class ZodPromise<T extends ZodTypeAny> extends ZodType<Promise<T["_output"]>, ZodPromiseDef<T>, Promise<T["_input"]>> {
|
|
802
|
+
unwrap(): T;
|
|
803
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
804
|
+
static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodPromise<T_1>;
|
|
805
|
+
}
|
|
806
|
+
declare type RefinementEffect<T> = {
|
|
807
|
+
type: "refinement";
|
|
808
|
+
refinement: (arg: T, ctx: RefinementCtx) => any;
|
|
809
|
+
};
|
|
810
|
+
declare type TransformEffect<T> = {
|
|
811
|
+
type: "transform";
|
|
812
|
+
transform: (arg: T, ctx: RefinementCtx) => any;
|
|
813
|
+
};
|
|
814
|
+
declare type PreprocessEffect<T> = {
|
|
815
|
+
type: "preprocess";
|
|
816
|
+
transform: (arg: T) => any;
|
|
817
|
+
};
|
|
818
|
+
declare type Effect<T> = RefinementEffect<T> | TransformEffect<T> | PreprocessEffect<T>;
|
|
819
|
+
interface ZodEffectsDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
820
|
+
schema: T;
|
|
821
|
+
typeName: ZodFirstPartyTypeKind.ZodEffects;
|
|
822
|
+
effect: Effect<any>;
|
|
823
|
+
}
|
|
824
|
+
declare class ZodEffects<T extends ZodTypeAny, Output = output<T>, Input = input<T>> extends ZodType<Output, ZodEffectsDef<T>, Input> {
|
|
825
|
+
innerType(): T;
|
|
826
|
+
sourceType(): T;
|
|
827
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
828
|
+
static create: <I extends ZodTypeAny>(schema: I, effect: Effect<I["_output"]>, params?: RawCreateParams) => ZodEffects<I, I["_output"], input<I>>;
|
|
829
|
+
static createWithPreprocess: <I extends ZodTypeAny>(preprocess: (arg: unknown) => unknown, schema: I, params?: RawCreateParams) => ZodEffects<I, I["_output"], unknown>;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
interface ZodOptionalDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
833
|
+
innerType: T;
|
|
834
|
+
typeName: ZodFirstPartyTypeKind.ZodOptional;
|
|
835
|
+
}
|
|
836
|
+
declare class ZodOptional<T extends ZodTypeAny> extends ZodType<T["_output"] | undefined, ZodOptionalDef<T>, T["_input"] | undefined> {
|
|
837
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
838
|
+
unwrap(): T;
|
|
839
|
+
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodOptional<T_1>;
|
|
840
|
+
}
|
|
841
|
+
interface ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
842
|
+
innerType: T;
|
|
843
|
+
typeName: ZodFirstPartyTypeKind.ZodNullable;
|
|
844
|
+
}
|
|
845
|
+
declare class ZodNullable<T extends ZodTypeAny> extends ZodType<T["_output"] | null, ZodNullableDef<T>, T["_input"] | null> {
|
|
846
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
847
|
+
unwrap(): T;
|
|
848
|
+
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodNullable<T_1>;
|
|
849
|
+
}
|
|
850
|
+
interface ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
851
|
+
innerType: T;
|
|
852
|
+
defaultValue: () => util.noUndefined<T["_input"]>;
|
|
853
|
+
typeName: ZodFirstPartyTypeKind.ZodDefault;
|
|
854
|
+
}
|
|
855
|
+
declare class ZodDefault<T extends ZodTypeAny> extends ZodType<util.noUndefined<T["_output"]>, ZodDefaultDef<T>, T["_input"] | undefined> {
|
|
856
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
857
|
+
removeDefault(): T;
|
|
858
|
+
static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
|
|
859
|
+
errorMap?: ZodErrorMap | undefined;
|
|
860
|
+
invalid_type_error?: string | undefined;
|
|
861
|
+
required_error?: string | undefined;
|
|
862
|
+
description?: string | undefined;
|
|
863
|
+
} & {
|
|
864
|
+
default: T_1["_input"] | (() => util.noUndefined<T_1["_input"]>);
|
|
865
|
+
}) => ZodDefault<T_1>;
|
|
866
|
+
}
|
|
867
|
+
interface ZodCatchDef<T extends ZodTypeAny = ZodTypeAny, C extends T["_input"] = T["_input"]> extends ZodTypeDef {
|
|
868
|
+
innerType: T;
|
|
869
|
+
catchValue: () => C;
|
|
870
|
+
typeName: ZodFirstPartyTypeKind.ZodCatch;
|
|
871
|
+
}
|
|
872
|
+
declare class ZodCatch<T extends ZodTypeAny> extends ZodType<T["_output"], ZodCatchDef<T>, unknown> {
|
|
873
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
874
|
+
removeCatch(): T;
|
|
875
|
+
static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
|
|
876
|
+
errorMap?: ZodErrorMap | undefined;
|
|
877
|
+
invalid_type_error?: string | undefined;
|
|
878
|
+
required_error?: string | undefined;
|
|
879
|
+
description?: string | undefined;
|
|
880
|
+
} & {
|
|
881
|
+
catch: T_1["_output"] | (() => T_1["_output"]);
|
|
882
|
+
}) => ZodCatch<T_1>;
|
|
883
|
+
}
|
|
884
|
+
interface ZodBrandedDef<T extends ZodTypeAny> extends ZodTypeDef {
|
|
885
|
+
type: T;
|
|
886
|
+
typeName: ZodFirstPartyTypeKind.ZodBranded;
|
|
887
|
+
}
|
|
888
|
+
declare const BRAND: unique symbol;
|
|
889
|
+
declare type BRAND<T extends string | number | symbol> = {
|
|
890
|
+
[BRAND]: {
|
|
891
|
+
[k in T]: true;
|
|
892
|
+
};
|
|
893
|
+
};
|
|
894
|
+
declare class ZodBranded<T extends ZodTypeAny, B extends string | number | symbol> extends ZodType<T["_output"] & BRAND<B>, ZodBrandedDef<T>, T["_input"]> {
|
|
895
|
+
_parse(input: ParseInput): ParseReturnType<any>;
|
|
896
|
+
unwrap(): T;
|
|
897
|
+
}
|
|
898
|
+
interface ZodPipelineDef<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodTypeDef {
|
|
899
|
+
in: A;
|
|
900
|
+
out: B;
|
|
901
|
+
typeName: ZodFirstPartyTypeKind.ZodPipeline;
|
|
902
|
+
}
|
|
903
|
+
declare class ZodPipeline<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodType<B["_output"], ZodPipelineDef<A, B>, A["_input"]> {
|
|
904
|
+
_parse(input: ParseInput): ParseReturnType<any>;
|
|
905
|
+
static create<A extends ZodTypeAny, B extends ZodTypeAny>(a: A, b: B): ZodPipeline<A, B>;
|
|
906
|
+
}
|
|
907
|
+
declare enum ZodFirstPartyTypeKind {
|
|
908
|
+
ZodString = "ZodString",
|
|
909
|
+
ZodNumber = "ZodNumber",
|
|
910
|
+
ZodNaN = "ZodNaN",
|
|
911
|
+
ZodBigInt = "ZodBigInt",
|
|
912
|
+
ZodBoolean = "ZodBoolean",
|
|
913
|
+
ZodDate = "ZodDate",
|
|
914
|
+
ZodSymbol = "ZodSymbol",
|
|
915
|
+
ZodUndefined = "ZodUndefined",
|
|
916
|
+
ZodNull = "ZodNull",
|
|
917
|
+
ZodAny = "ZodAny",
|
|
918
|
+
ZodUnknown = "ZodUnknown",
|
|
919
|
+
ZodNever = "ZodNever",
|
|
920
|
+
ZodVoid = "ZodVoid",
|
|
921
|
+
ZodArray = "ZodArray",
|
|
922
|
+
ZodObject = "ZodObject",
|
|
923
|
+
ZodUnion = "ZodUnion",
|
|
924
|
+
ZodDiscriminatedUnion = "ZodDiscriminatedUnion",
|
|
925
|
+
ZodIntersection = "ZodIntersection",
|
|
926
|
+
ZodTuple = "ZodTuple",
|
|
927
|
+
ZodRecord = "ZodRecord",
|
|
928
|
+
ZodMap = "ZodMap",
|
|
929
|
+
ZodSet = "ZodSet",
|
|
930
|
+
ZodFunction = "ZodFunction",
|
|
931
|
+
ZodLazy = "ZodLazy",
|
|
932
|
+
ZodLiteral = "ZodLiteral",
|
|
933
|
+
ZodEnum = "ZodEnum",
|
|
934
|
+
ZodEffects = "ZodEffects",
|
|
935
|
+
ZodNativeEnum = "ZodNativeEnum",
|
|
936
|
+
ZodOptional = "ZodOptional",
|
|
937
|
+
ZodNullable = "ZodNullable",
|
|
938
|
+
ZodDefault = "ZodDefault",
|
|
939
|
+
ZodCatch = "ZodCatch",
|
|
940
|
+
ZodPromise = "ZodPromise",
|
|
941
|
+
ZodBranded = "ZodBranded",
|
|
942
|
+
ZodPipeline = "ZodPipeline"
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
declare const eventTypeType: ZodEnum<["APP_INITIALIZING", "APP_READY"]>;
|
|
946
|
+
declare const payloadType: ZodAny;
|
|
947
|
+
declare function logEvent(eventType: TypeOf<typeof eventTypeType>, payload: TypeOf<typeof payloadType>): void;
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* @typedef {"none" | "wifi" | "cellular" | "unknown"} NetworkType
|
|
951
|
+
*/
|
|
952
|
+
declare enum NetworkType {
|
|
953
|
+
/** No Network */
|
|
954
|
+
none = "none",
|
|
955
|
+
/** Wi-Fi Network */
|
|
956
|
+
wifi = "wifi",
|
|
957
|
+
/** Cellular Network (2g/3g/4g) */
|
|
958
|
+
cellular = "cellular",
|
|
959
|
+
/** Uncommon network types for Android */
|
|
960
|
+
unknown = "unknown"
|
|
961
|
+
}
|
|
962
|
+
declare enum PlatformType {
|
|
963
|
+
/** Windows phone */
|
|
964
|
+
wp = "wp",
|
|
965
|
+
/** Android */
|
|
966
|
+
android = "android",
|
|
967
|
+
/** iOS */
|
|
968
|
+
iOS = "iOS",
|
|
969
|
+
unknown = "unknown"
|
|
970
|
+
}
|
|
971
|
+
declare enum Events {
|
|
972
|
+
AppPaused = "h5.event.paused",
|
|
973
|
+
AppResumed = "h5.event.resumed",
|
|
974
|
+
NetworkChanged = "h5.event.connection.changed",
|
|
975
|
+
OnDataCallback = "h5.event.webview.result",
|
|
976
|
+
WebviewClosed = "h5.event.webview.close",
|
|
977
|
+
OpenApp = "h5.event.open.mp",
|
|
978
|
+
AppClose = "h5.event.action.close",
|
|
979
|
+
PaymentCallback = "payment.callback",
|
|
980
|
+
PaymentResult = "action.payment.result",
|
|
981
|
+
PaymentClose = "action.payment.close",
|
|
982
|
+
DownloadProgress = "h5.event.webview.download.progress"
|
|
983
|
+
}
|
|
984
|
+
declare enum JumpStatus {
|
|
985
|
+
DOING = "doing",
|
|
986
|
+
DONE = "done"
|
|
987
|
+
}
|
|
988
|
+
declare enum ProfileType {
|
|
989
|
+
user = 1,
|
|
990
|
+
oa = 0,
|
|
991
|
+
aliasOA = 2
|
|
992
|
+
}
|
|
993
|
+
declare enum ChatType {
|
|
994
|
+
user = 1,
|
|
995
|
+
oa = 0
|
|
996
|
+
}
|
|
997
|
+
declare enum PostFeedType {
|
|
998
|
+
image = 1,
|
|
999
|
+
multi_image = 2,
|
|
1000
|
+
link = 4,
|
|
1001
|
+
profile = 5
|
|
1002
|
+
}
|
|
1003
|
+
declare enum ScanNFCType {
|
|
1004
|
+
cccd = 1
|
|
1005
|
+
}
|
|
1006
|
+
declare enum ShareSheetType {
|
|
1007
|
+
image = 1,
|
|
1008
|
+
gif = 11,
|
|
1009
|
+
video = 12,
|
|
1010
|
+
link = 4,
|
|
1011
|
+
oa = 5,
|
|
1012
|
+
zmp = 20,
|
|
1013
|
+
multi_image = 21,
|
|
1014
|
+
zmp_deep_link = 4,
|
|
1015
|
+
text = 22
|
|
1016
|
+
}
|
|
1017
|
+
declare enum OrientationType {
|
|
1018
|
+
auto = 1,
|
|
1019
|
+
portrait = 2,
|
|
1020
|
+
landscape = 3
|
|
1021
|
+
}
|
|
1022
|
+
declare enum VibrateType {
|
|
1023
|
+
oneShot = 0
|
|
1024
|
+
}
|
|
1025
|
+
declare enum MediaPickerType {
|
|
1026
|
+
zcamera = 3,
|
|
1027
|
+
zcamera_photo = 1,
|
|
1028
|
+
zcamera_video = 2,
|
|
1029
|
+
zcamera_scan = 7,
|
|
1030
|
+
photo = 4,
|
|
1031
|
+
video = 5,
|
|
1032
|
+
file = 6
|
|
1033
|
+
}
|
|
1034
|
+
declare enum IAPPayType {
|
|
1035
|
+
"SUBSCRIPTION" = "SUBSCRIPTION",
|
|
1036
|
+
"ONETIME" = "ONETIME"
|
|
1037
|
+
}
|
|
1038
|
+
declare enum ProrationMode {
|
|
1039
|
+
"UNKNOW" = 0,
|
|
1040
|
+
"DEFERRED" = 1,
|
|
1041
|
+
"IMMEDIATE_AND_CHARGE_FULL_PRICE" = 2
|
|
1042
|
+
}
|
|
1043
|
+
declare enum StatusBarType {
|
|
1044
|
+
normal = 1,
|
|
1045
|
+
hidden = 0,
|
|
1046
|
+
transparent = 2
|
|
1047
|
+
}
|
|
1048
|
+
declare enum AndroidBottomNavigationBarType {
|
|
1049
|
+
show = 1,
|
|
1050
|
+
hide = 0
|
|
1051
|
+
}
|
|
1052
|
+
declare enum IOSSafeAreaBottomType {
|
|
1053
|
+
show = 1,
|
|
1054
|
+
hide = 0
|
|
1055
|
+
}
|
|
1056
|
+
declare enum TextAlignType {
|
|
1057
|
+
left = 0,
|
|
1058
|
+
center = 1
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
type PickAttr<Attr extends keyof T, T = any> = {
|
|
1062
|
+
[P in keyof T]: T[Attr];
|
|
1063
|
+
}[keyof T];
|
|
1064
|
+
type Common = Record<string, any>;
|
|
1065
|
+
type FunctionProps = {
|
|
1066
|
+
[key: string]: {
|
|
1067
|
+
lastCall?: number;
|
|
1068
|
+
retry?: number;
|
|
1069
|
+
limit?: number;
|
|
1070
|
+
};
|
|
1071
|
+
};
|
|
1072
|
+
type Action<T> = {
|
|
1073
|
+
[K in keyof T]: {
|
|
1074
|
+
versionLive?: {
|
|
1075
|
+
android?: number;
|
|
1076
|
+
iOS?: number;
|
|
1077
|
+
};
|
|
1078
|
+
appSupport?: boolean;
|
|
1079
|
+
havePermission?: boolean;
|
|
1080
|
+
skipJump?: boolean;
|
|
1081
|
+
requireAccessToken?: boolean;
|
|
1082
|
+
whiteList?: boolean;
|
|
1083
|
+
haveCallback?: boolean;
|
|
1084
|
+
errorList?: {
|
|
1085
|
+
[L in PlatformType]?: {
|
|
1086
|
+
[code: string]: {
|
|
1087
|
+
mapTo: {
|
|
1088
|
+
code: number;
|
|
1089
|
+
message: string;
|
|
1090
|
+
};
|
|
1091
|
+
message?: string;
|
|
1092
|
+
needMoreDetail?: boolean;
|
|
1093
|
+
};
|
|
1094
|
+
};
|
|
1095
|
+
};
|
|
1096
|
+
};
|
|
1097
|
+
};
|
|
1098
|
+
type NativeCallBackData = {
|
|
1099
|
+
error_code: number;
|
|
1100
|
+
error_message: string;
|
|
1101
|
+
action: string;
|
|
1102
|
+
data: any;
|
|
1103
|
+
};
|
|
1104
|
+
type LogData = {
|
|
1105
|
+
action: string;
|
|
1106
|
+
error: number;
|
|
1107
|
+
message: string;
|
|
1108
|
+
data: any;
|
|
1109
|
+
};
|
|
1110
|
+
|
|
1111
|
+
declare const ACTION: {
|
|
1112
|
+
GET_DOWNLOADED_STICKER: {
|
|
1113
|
+
haveCallback: boolean;
|
|
1114
|
+
};
|
|
1115
|
+
OPEN_SHARE_STICKER: {};
|
|
1116
|
+
OPEN_PROFILE: {
|
|
1117
|
+
requireAccessToken: boolean;
|
|
1118
|
+
};
|
|
1119
|
+
OPEN_FEED_DETAIL: {};
|
|
1120
|
+
OPEN_FRIEND_RADA: {};
|
|
1121
|
+
OPEN_INAPP: {};
|
|
1122
|
+
OPEN_OUTAPP: {
|
|
1123
|
+
requireAccessToken: boolean;
|
|
1124
|
+
};
|
|
1125
|
+
OPEN_PAGE: {};
|
|
1126
|
+
OPEN_PHOTODETAIL: {};
|
|
1127
|
+
OPEN_GALARY: {};
|
|
1128
|
+
OPEN_GAMECENTER: {};
|
|
1129
|
+
OPEN_GAMENEWS: {};
|
|
1130
|
+
OPEN_TAB_CONTACT: {};
|
|
1131
|
+
OPEN_TAB_SOCIAL: {};
|
|
1132
|
+
OPEN_FRIENDSUGGEST: {};
|
|
1133
|
+
OPEN_GROUPLIST: {};
|
|
1134
|
+
OPEN_NEARBY: {};
|
|
1135
|
+
OPEN_ROOM: {};
|
|
1136
|
+
OPEN_STICKERSTORE: {};
|
|
1137
|
+
OPEN_CREATECHAT: {};
|
|
1138
|
+
COPY_LINK_CATESTICKER: {};
|
|
1139
|
+
REQUEST_BUY_STICKER: {};
|
|
1140
|
+
OPEN_CHAT: {
|
|
1141
|
+
requireAccessToken: boolean;
|
|
1142
|
+
};
|
|
1143
|
+
OPEN_TAB_CHAT: {};
|
|
1144
|
+
OPEN_CHATGROUP: {};
|
|
1145
|
+
OPEN_ADDFRIEND: {};
|
|
1146
|
+
OPEN_TAB_MORE: {};
|
|
1147
|
+
OPEN_POSTFEED: {
|
|
1148
|
+
requireAccessToken: boolean;
|
|
1149
|
+
};
|
|
1150
|
+
OPEN_LOGINDEVICES: {};
|
|
1151
|
+
OPEN_SENDSTICKER: {};
|
|
1152
|
+
REPORT_ABUSE: {
|
|
1153
|
+
haveCallback: boolean;
|
|
1154
|
+
};
|
|
1155
|
+
FOLLOW_OA: {
|
|
1156
|
+
haveCallback: boolean;
|
|
1157
|
+
requireAccessToken: boolean;
|
|
1158
|
+
errorList: {
|
|
1159
|
+
android: {
|
|
1160
|
+
"-400": {
|
|
1161
|
+
mapTo: {
|
|
1162
|
+
code: number;
|
|
1163
|
+
message: string;
|
|
1164
|
+
};
|
|
1165
|
+
};
|
|
1166
|
+
};
|
|
1167
|
+
iOS: {
|
|
1168
|
+
"-400": {
|
|
1169
|
+
mapTo: {
|
|
1170
|
+
code: number;
|
|
1171
|
+
message: string;
|
|
1172
|
+
};
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1175
|
+
};
|
|
1176
|
+
};
|
|
1177
|
+
UNFOLLOW_OA: {
|
|
1178
|
+
haveCallback: boolean;
|
|
1179
|
+
requireAccessToken: boolean;
|
|
1180
|
+
errorList: {
|
|
1181
|
+
android: {
|
|
1182
|
+
"-400": {
|
|
1183
|
+
mapTo: {
|
|
1184
|
+
code: number;
|
|
1185
|
+
message: string;
|
|
1186
|
+
};
|
|
1187
|
+
};
|
|
1188
|
+
};
|
|
243
1189
|
iOS: {
|
|
244
1190
|
"-400": {
|
|
245
1191
|
mapTo: {
|
|
@@ -572,294 +1518,33 @@ declare const ACTION: {
|
|
|
572
1518
|
message: string;
|
|
573
1519
|
};
|
|
574
1520
|
};
|
|
575
|
-
"-105": {
|
|
576
|
-
mapTo: {
|
|
577
|
-
code: number;
|
|
578
|
-
message: string;
|
|
579
|
-
};
|
|
580
|
-
};
|
|
581
|
-
"-106": {
|
|
582
|
-
mapTo: {
|
|
583
|
-
code: number;
|
|
584
|
-
message: string;
|
|
585
|
-
};
|
|
586
|
-
};
|
|
587
|
-
};
|
|
588
|
-
iOS: {
|
|
589
|
-
"-10": {
|
|
590
|
-
mapTo: {
|
|
591
|
-
code: number;
|
|
592
|
-
message: string;
|
|
593
|
-
};
|
|
594
|
-
};
|
|
595
|
-
"-101": {
|
|
596
|
-
mapTo: {
|
|
597
|
-
code: number;
|
|
598
|
-
message: string;
|
|
599
|
-
};
|
|
600
|
-
};
|
|
601
|
-
"-102": {
|
|
602
|
-
mapTo: {
|
|
603
|
-
code: number;
|
|
604
|
-
message: string;
|
|
605
|
-
};
|
|
606
|
-
};
|
|
607
|
-
};
|
|
608
|
-
};
|
|
609
|
-
};
|
|
610
|
-
WEBVIEW_SET_RESULT: {
|
|
611
|
-
versionLive: {
|
|
612
|
-
iOS: number;
|
|
613
|
-
};
|
|
614
|
-
};
|
|
615
|
-
MP_GET_NUMBER: {
|
|
616
|
-
versionLive: {
|
|
617
|
-
iOS: number;
|
|
618
|
-
};
|
|
619
|
-
errorList: {
|
|
620
|
-
android: {
|
|
621
|
-
"-1": {
|
|
622
|
-
mapTo: {
|
|
623
|
-
code: number;
|
|
624
|
-
message: string;
|
|
625
|
-
};
|
|
626
|
-
};
|
|
627
|
-
"-101": {
|
|
628
|
-
mapTo: {
|
|
629
|
-
code: number;
|
|
630
|
-
message: string;
|
|
631
|
-
};
|
|
632
|
-
};
|
|
633
|
-
"-400": {
|
|
634
|
-
mapTo: {
|
|
635
|
-
code: number;
|
|
636
|
-
message: string;
|
|
637
|
-
};
|
|
638
|
-
};
|
|
639
|
-
};
|
|
640
|
-
iOS: {
|
|
641
|
-
"-1": {
|
|
642
|
-
mapTo: {
|
|
643
|
-
code: number;
|
|
644
|
-
message: string;
|
|
645
|
-
};
|
|
646
|
-
};
|
|
647
|
-
"-10": {
|
|
648
|
-
mapTo: {
|
|
649
|
-
code: number;
|
|
650
|
-
message: string;
|
|
651
|
-
};
|
|
652
|
-
};
|
|
653
|
-
"-400": {
|
|
654
|
-
mapTo: {
|
|
655
|
-
code: number;
|
|
656
|
-
message: string;
|
|
657
|
-
};
|
|
658
|
-
};
|
|
659
|
-
};
|
|
660
|
-
};
|
|
661
|
-
};
|
|
662
|
-
MP_OPEN_PROFILE_PICKER: {
|
|
663
|
-
requireAccessToken: boolean;
|
|
664
|
-
versionLive: {
|
|
665
|
-
iOS: number;
|
|
666
|
-
};
|
|
667
|
-
errorList: {
|
|
668
|
-
android: {
|
|
669
|
-
"-101": {
|
|
670
|
-
mapTo: {
|
|
671
|
-
code: number;
|
|
672
|
-
message: string;
|
|
673
|
-
};
|
|
674
|
-
};
|
|
675
|
-
};
|
|
676
|
-
iOS: {
|
|
677
|
-
"-101": {
|
|
678
|
-
mapTo: {
|
|
679
|
-
code: number;
|
|
680
|
-
message: string;
|
|
681
|
-
};
|
|
682
|
-
};
|
|
683
|
-
};
|
|
684
|
-
};
|
|
685
|
-
};
|
|
686
|
-
GET_SUPPORTED_ACTIONS: {
|
|
687
|
-
whiteList: boolean;
|
|
688
|
-
};
|
|
689
|
-
MP_JOIN_WIFI: {
|
|
690
|
-
haveCallback: boolean;
|
|
691
|
-
timeout: boolean;
|
|
692
|
-
versionLive: {
|
|
693
|
-
android: number;
|
|
694
|
-
iOS: number;
|
|
695
|
-
};
|
|
696
|
-
havePermission: boolean;
|
|
697
|
-
whiteList: boolean;
|
|
698
|
-
};
|
|
699
|
-
PICK_MEDIA: {
|
|
700
|
-
requireAccessToken: boolean;
|
|
701
|
-
versionLive: {
|
|
702
|
-
iOS: number;
|
|
703
|
-
};
|
|
704
|
-
errorList: {
|
|
705
|
-
android: {
|
|
706
|
-
"-101": {
|
|
707
|
-
mapTo: {
|
|
708
|
-
code: number;
|
|
709
|
-
message: string;
|
|
710
|
-
};
|
|
711
|
-
};
|
|
712
|
-
"999": {
|
|
713
|
-
mapTo: {
|
|
714
|
-
code: number;
|
|
715
|
-
message: string;
|
|
716
|
-
};
|
|
717
|
-
needMoreDetail: boolean;
|
|
718
|
-
};
|
|
719
|
-
};
|
|
720
|
-
iOS: {
|
|
721
|
-
"-10": {
|
|
722
|
-
mapTo: {
|
|
723
|
-
code: number;
|
|
724
|
-
message: string;
|
|
725
|
-
};
|
|
726
|
-
};
|
|
727
|
-
};
|
|
728
|
-
};
|
|
729
|
-
};
|
|
730
|
-
MP_CLOSE_LOADINGVIEW: {
|
|
731
|
-
skipJump: boolean;
|
|
732
|
-
};
|
|
733
|
-
CHANGE_BOTTOMBAR: {
|
|
734
|
-
haveCallback: boolean;
|
|
735
|
-
timeout: number;
|
|
736
|
-
skipJump: boolean;
|
|
737
|
-
};
|
|
738
|
-
MA_MENU_MINIMIZE: {
|
|
739
|
-
skipJump: boolean;
|
|
740
|
-
versionLive: {
|
|
741
|
-
iOS: number;
|
|
742
|
-
};
|
|
743
|
-
};
|
|
744
|
-
MA_MENU_PERMISSION: {
|
|
745
|
-
skipJump: boolean;
|
|
746
|
-
versionLive: {
|
|
747
|
-
iOS: number;
|
|
748
|
-
};
|
|
749
|
-
};
|
|
750
|
-
MA_MENU_FAVORITES: {
|
|
751
|
-
skipJump: boolean;
|
|
752
|
-
versionLive: {
|
|
753
|
-
iOS: number;
|
|
754
|
-
};
|
|
755
|
-
};
|
|
756
|
-
MP_SEND_NOTIFICATION: {
|
|
757
|
-
skipJump: boolean;
|
|
758
|
-
versionLive: {
|
|
759
|
-
iOS: number;
|
|
760
|
-
};
|
|
761
|
-
errorList: {
|
|
762
|
-
android: {
|
|
763
|
-
"-1": {
|
|
764
|
-
mapTo: {
|
|
765
|
-
code: number;
|
|
766
|
-
message: string;
|
|
767
|
-
};
|
|
768
|
-
};
|
|
769
|
-
"-400": {
|
|
770
|
-
mapTo: {
|
|
771
|
-
code: number;
|
|
772
|
-
message: string;
|
|
773
|
-
};
|
|
774
|
-
};
|
|
775
|
-
};
|
|
776
|
-
iOS: {
|
|
777
|
-
"-1": {
|
|
778
|
-
mapTo: {
|
|
779
|
-
code: number;
|
|
780
|
-
message: string;
|
|
781
|
-
};
|
|
782
|
-
};
|
|
783
|
-
"-400": {
|
|
784
|
-
mapTo: {
|
|
785
|
-
code: number;
|
|
786
|
-
message: string;
|
|
787
|
-
};
|
|
788
|
-
};
|
|
789
|
-
};
|
|
790
|
-
};
|
|
791
|
-
};
|
|
792
|
-
MP_ADD_RATING: {
|
|
793
|
-
skipJump: boolean;
|
|
794
|
-
};
|
|
795
|
-
MP_ADD_MYFAVORITES: {
|
|
796
|
-
skipJump: boolean;
|
|
797
|
-
};
|
|
798
|
-
MP_INTERACT_OA: {
|
|
799
|
-
skipJump: boolean;
|
|
800
|
-
errorList: {
|
|
801
|
-
android: {
|
|
802
|
-
"-400": {
|
|
803
|
-
mapTo: {
|
|
804
|
-
code: number;
|
|
805
|
-
message: string;
|
|
806
|
-
};
|
|
807
|
-
};
|
|
808
|
-
};
|
|
809
|
-
iOS: {
|
|
810
|
-
"-400": {
|
|
811
|
-
mapTo: {
|
|
812
|
-
code: number;
|
|
813
|
-
message: string;
|
|
814
|
-
};
|
|
815
|
-
};
|
|
816
|
-
};
|
|
817
|
-
};
|
|
818
|
-
};
|
|
819
|
-
MP_USER_AUTHORIZE: {
|
|
820
|
-
skipJump: boolean;
|
|
821
|
-
errorList: {
|
|
822
|
-
android: {
|
|
823
|
-
"-400": {
|
|
824
|
-
mapTo: {
|
|
825
|
-
code: number;
|
|
826
|
-
message: string;
|
|
827
|
-
};
|
|
828
|
-
};
|
|
829
|
-
};
|
|
830
|
-
iOS: {
|
|
831
|
-
"-400": {
|
|
1521
|
+
"-105": {
|
|
1522
|
+
mapTo: {
|
|
1523
|
+
code: number;
|
|
1524
|
+
message: string;
|
|
1525
|
+
};
|
|
1526
|
+
};
|
|
1527
|
+
"-106": {
|
|
832
1528
|
mapTo: {
|
|
833
1529
|
code: number;
|
|
834
1530
|
message: string;
|
|
835
1531
|
};
|
|
836
1532
|
};
|
|
837
1533
|
};
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
MP_SELECT_PAYMENT_METHOD: {
|
|
841
|
-
skipJump: boolean;
|
|
842
|
-
};
|
|
843
|
-
CHECK_NFC: {
|
|
844
|
-
skipJump: boolean;
|
|
845
|
-
versionLive: {
|
|
846
|
-
iOS: number;
|
|
847
|
-
};
|
|
848
|
-
errorList: {
|
|
849
|
-
all: {
|
|
850
|
-
"-1": {
|
|
1534
|
+
iOS: {
|
|
1535
|
+
"-10": {
|
|
851
1536
|
mapTo: {
|
|
852
1537
|
code: number;
|
|
853
1538
|
message: string;
|
|
854
1539
|
};
|
|
855
1540
|
};
|
|
856
|
-
"-
|
|
1541
|
+
"-101": {
|
|
857
1542
|
mapTo: {
|
|
858
1543
|
code: number;
|
|
859
1544
|
message: string;
|
|
860
1545
|
};
|
|
861
1546
|
};
|
|
862
|
-
"-
|
|
1547
|
+
"-102": {
|
|
863
1548
|
mapTo: {
|
|
864
1549
|
code: number;
|
|
865
1550
|
message: string;
|
|
@@ -868,55 +1553,74 @@ declare const ACTION: {
|
|
|
868
1553
|
};
|
|
869
1554
|
};
|
|
870
1555
|
};
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
1556
|
+
WEBVIEW_SET_RESULT: {
|
|
1557
|
+
versionLive: {
|
|
1558
|
+
iOS: number;
|
|
1559
|
+
};
|
|
1560
|
+
};
|
|
1561
|
+
MP_GET_NUMBER: {
|
|
1562
|
+
versionLive: {
|
|
1563
|
+
iOS: number;
|
|
1564
|
+
};
|
|
875
1565
|
errorList: {
|
|
876
|
-
|
|
1566
|
+
android: {
|
|
877
1567
|
"-1": {
|
|
878
1568
|
mapTo: {
|
|
879
1569
|
code: number;
|
|
880
1570
|
message: string;
|
|
881
1571
|
};
|
|
882
1572
|
};
|
|
883
|
-
"-
|
|
1573
|
+
"-101": {
|
|
884
1574
|
mapTo: {
|
|
885
1575
|
code: number;
|
|
886
1576
|
message: string;
|
|
887
1577
|
};
|
|
888
1578
|
};
|
|
889
|
-
"-
|
|
1579
|
+
"-400": {
|
|
890
1580
|
mapTo: {
|
|
891
1581
|
code: number;
|
|
892
1582
|
message: string;
|
|
893
1583
|
};
|
|
894
1584
|
};
|
|
895
|
-
|
|
1585
|
+
};
|
|
1586
|
+
iOS: {
|
|
1587
|
+
"-1": {
|
|
896
1588
|
mapTo: {
|
|
897
1589
|
code: number;
|
|
898
1590
|
message: string;
|
|
899
1591
|
};
|
|
900
1592
|
};
|
|
901
|
-
"-
|
|
1593
|
+
"-10": {
|
|
902
1594
|
mapTo: {
|
|
903
1595
|
code: number;
|
|
904
1596
|
message: string;
|
|
905
1597
|
};
|
|
906
1598
|
};
|
|
907
|
-
"-
|
|
1599
|
+
"-400": {
|
|
908
1600
|
mapTo: {
|
|
909
1601
|
code: number;
|
|
910
1602
|
message: string;
|
|
911
1603
|
};
|
|
912
1604
|
};
|
|
913
|
-
|
|
1605
|
+
};
|
|
1606
|
+
};
|
|
1607
|
+
};
|
|
1608
|
+
MP_OPEN_PROFILE_PICKER: {
|
|
1609
|
+
requireAccessToken: boolean;
|
|
1610
|
+
versionLive: {
|
|
1611
|
+
iOS: number;
|
|
1612
|
+
};
|
|
1613
|
+
errorList: {
|
|
1614
|
+
android: {
|
|
1615
|
+
"-101": {
|
|
914
1616
|
mapTo: {
|
|
915
1617
|
code: number;
|
|
916
1618
|
message: string;
|
|
917
1619
|
};
|
|
918
1620
|
};
|
|
919
|
-
|
|
1621
|
+
};
|
|
1622
|
+
iOS: {
|
|
1623
|
+
"-101": {
|
|
920
1624
|
mapTo: {
|
|
921
1625
|
code: number;
|
|
922
1626
|
message: string;
|
|
@@ -925,14 +1629,24 @@ declare const ACTION: {
|
|
|
925
1629
|
};
|
|
926
1630
|
};
|
|
927
1631
|
};
|
|
928
|
-
|
|
929
|
-
|
|
1632
|
+
GET_SUPPORTED_ACTIONS: {
|
|
1633
|
+
whiteList: boolean;
|
|
930
1634
|
};
|
|
931
|
-
|
|
1635
|
+
MP_JOIN_WIFI: {
|
|
1636
|
+
haveCallback: boolean;
|
|
1637
|
+
timeout: boolean;
|
|
1638
|
+
versionLive: {
|
|
1639
|
+
android: number;
|
|
1640
|
+
iOS: number;
|
|
1641
|
+
};
|
|
1642
|
+
havePermission: boolean;
|
|
1643
|
+
whiteList: boolean;
|
|
1644
|
+
};
|
|
1645
|
+
PICK_MEDIA: {
|
|
1646
|
+
requireAccessToken: boolean;
|
|
932
1647
|
versionLive: {
|
|
933
1648
|
iOS: number;
|
|
934
1649
|
};
|
|
935
|
-
skipJump: boolean;
|
|
936
1650
|
errorList: {
|
|
937
1651
|
android: {
|
|
938
1652
|
"-101": {
|
|
@@ -940,9 +1654,8 @@ declare const ACTION: {
|
|
|
940
1654
|
code: number;
|
|
941
1655
|
message: string;
|
|
942
1656
|
};
|
|
943
|
-
needMoreDetail: boolean;
|
|
944
1657
|
};
|
|
945
|
-
"
|
|
1658
|
+
"999": {
|
|
946
1659
|
mapTo: {
|
|
947
1660
|
code: number;
|
|
948
1661
|
message: string;
|
|
@@ -956,1249 +1669,528 @@ declare const ACTION: {
|
|
|
956
1669
|
code: number;
|
|
957
1670
|
message: string;
|
|
958
1671
|
};
|
|
959
|
-
needMoreDetail: boolean;
|
|
960
1672
|
};
|
|
961
1673
|
};
|
|
962
1674
|
};
|
|
963
1675
|
};
|
|
964
|
-
|
|
965
|
-
skipJump: boolean;
|
|
966
|
-
};
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
};
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
};
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
};
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
};
|
|
1051
|
-
type GetNetworkTypeReturns = {
|
|
1052
|
-
networkType: NetworkType;
|
|
1053
|
-
};
|
|
1054
|
-
type iBeaconInfo = {
|
|
1055
|
-
/** The iBeacon device broadcast UUID. */
|
|
1056
|
-
uuid: string;
|
|
1057
|
-
/** The iBeacon device primary ID. */
|
|
1058
|
-
major: string;
|
|
1059
|
-
/** The iBeacon device secondary ID. */
|
|
1060
|
-
minor: string;
|
|
1061
|
-
/** The iBeacon device distance. */
|
|
1062
|
-
distance: number;
|
|
1063
|
-
/** The signal strength of the device. */
|
|
1064
|
-
rssi: number;
|
|
1065
|
-
};
|
|
1066
|
-
type GetBeaconDiscoveryReturns = {
|
|
1067
|
-
beacons: Array<iBeaconInfo>;
|
|
1068
|
-
};
|
|
1069
|
-
type ScanQRCodeReturns = {
|
|
1070
|
-
content: string;
|
|
1071
|
-
};
|
|
1072
|
-
type OpenPostFeedReturns = {
|
|
1073
|
-
status: 0 | 1;
|
|
1074
|
-
shareType: 0 | 1 | 2;
|
|
1075
|
-
numberOfUser: number;
|
|
1076
|
-
};
|
|
1077
|
-
type OpenShareSheetReturns = {
|
|
1078
|
-
status: 0 | 2 | 1;
|
|
1079
|
-
shareType: 0 | 2 | 1;
|
|
1080
|
-
numberOfUser: number;
|
|
1081
|
-
};
|
|
1082
|
-
type RequestCameraPermissionReturns = {
|
|
1083
|
-
userAllow: boolean;
|
|
1084
|
-
message: string;
|
|
1085
|
-
};
|
|
1086
|
-
type CheckZaloCameraPermissionReturns = {
|
|
1087
|
-
userAllow: boolean;
|
|
1088
|
-
};
|
|
1089
|
-
type OpenBioAuthenticationReturns = {
|
|
1090
|
-
code: number;
|
|
1091
|
-
message: string;
|
|
1092
|
-
data: {
|
|
1093
|
-
domain: string;
|
|
1094
|
-
code: number;
|
|
1095
|
-
message: string;
|
|
1096
|
-
payToken: string;
|
|
1097
|
-
};
|
|
1098
|
-
};
|
|
1099
|
-
type CheckStateBioAuthenticationReturns = {
|
|
1100
|
-
bioState: string;
|
|
1101
|
-
};
|
|
1102
|
-
type KeepScreenReturns = {
|
|
1103
|
-
success: boolean;
|
|
1104
|
-
};
|
|
1105
|
-
type OpenWebviewReturns = {
|
|
1106
|
-
success: boolean;
|
|
1107
|
-
};
|
|
1108
|
-
type GetAppInfoReturns = {
|
|
1109
|
-
description: string;
|
|
1110
|
-
version: string;
|
|
1111
|
-
name: string;
|
|
1112
|
-
appUrl: string;
|
|
1113
|
-
qrCodeUrl: string;
|
|
1114
|
-
logoUrl?: string;
|
|
1115
|
-
};
|
|
1116
|
-
type GetPhoneNumberReturns = {
|
|
1117
|
-
number?: string;
|
|
1118
|
-
token?: string;
|
|
1119
|
-
};
|
|
1120
|
-
type OpenProfilePickerReturns = {
|
|
1121
|
-
users: {
|
|
1122
|
-
id: string;
|
|
1123
|
-
profile: {
|
|
1124
|
-
name: string;
|
|
1125
|
-
avatar: string;
|
|
1676
|
+
MP_CLOSE_LOADINGVIEW: {
|
|
1677
|
+
skipJump: boolean;
|
|
1678
|
+
};
|
|
1679
|
+
CHANGE_BOTTOMBAR: {
|
|
1680
|
+
haveCallback: boolean;
|
|
1681
|
+
timeout: number;
|
|
1682
|
+
skipJump: boolean;
|
|
1683
|
+
};
|
|
1684
|
+
MA_MENU_MINIMIZE: {
|
|
1685
|
+
skipJump: boolean;
|
|
1686
|
+
versionLive: {
|
|
1687
|
+
iOS: number;
|
|
1688
|
+
};
|
|
1689
|
+
};
|
|
1690
|
+
MA_MENU_PERMISSION: {
|
|
1691
|
+
skipJump: boolean;
|
|
1692
|
+
versionLive: {
|
|
1693
|
+
iOS: number;
|
|
1694
|
+
};
|
|
1695
|
+
};
|
|
1696
|
+
MA_MENU_FAVORITES: {
|
|
1697
|
+
skipJump: boolean;
|
|
1698
|
+
versionLive: {
|
|
1699
|
+
iOS: number;
|
|
1700
|
+
};
|
|
1701
|
+
};
|
|
1702
|
+
MP_SEND_NOTIFICATION: {
|
|
1703
|
+
skipJump: boolean;
|
|
1704
|
+
versionLive: {
|
|
1705
|
+
iOS: number;
|
|
1706
|
+
};
|
|
1707
|
+
errorList: {
|
|
1708
|
+
android: {
|
|
1709
|
+
"-1": {
|
|
1710
|
+
mapTo: {
|
|
1711
|
+
code: number;
|
|
1712
|
+
message: string;
|
|
1713
|
+
};
|
|
1714
|
+
};
|
|
1715
|
+
"-400": {
|
|
1716
|
+
mapTo: {
|
|
1717
|
+
code: number;
|
|
1718
|
+
message: string;
|
|
1719
|
+
};
|
|
1720
|
+
};
|
|
1721
|
+
};
|
|
1722
|
+
iOS: {
|
|
1723
|
+
"-1": {
|
|
1724
|
+
mapTo: {
|
|
1725
|
+
code: number;
|
|
1726
|
+
message: string;
|
|
1727
|
+
};
|
|
1728
|
+
};
|
|
1729
|
+
"-400": {
|
|
1730
|
+
mapTo: {
|
|
1731
|
+
code: number;
|
|
1732
|
+
message: string;
|
|
1733
|
+
};
|
|
1734
|
+
};
|
|
1735
|
+
};
|
|
1736
|
+
};
|
|
1737
|
+
};
|
|
1738
|
+
MP_ADD_RATING: {
|
|
1739
|
+
skipJump: boolean;
|
|
1740
|
+
};
|
|
1741
|
+
MP_ADD_MYFAVORITES: {
|
|
1742
|
+
skipJump: boolean;
|
|
1743
|
+
};
|
|
1744
|
+
MP_INTERACT_OA: {
|
|
1745
|
+
skipJump: boolean;
|
|
1746
|
+
errorList: {
|
|
1747
|
+
android: {
|
|
1748
|
+
"-400": {
|
|
1749
|
+
mapTo: {
|
|
1750
|
+
code: number;
|
|
1751
|
+
message: string;
|
|
1752
|
+
};
|
|
1753
|
+
};
|
|
1754
|
+
};
|
|
1755
|
+
iOS: {
|
|
1756
|
+
"-400": {
|
|
1757
|
+
mapTo: {
|
|
1758
|
+
code: number;
|
|
1759
|
+
message: string;
|
|
1760
|
+
};
|
|
1761
|
+
};
|
|
1762
|
+
};
|
|
1126
1763
|
};
|
|
1127
|
-
code: number;
|
|
1128
|
-
message: string;
|
|
1129
|
-
}[];
|
|
1130
|
-
};
|
|
1131
|
-
type OpenMediaPickerReturns = {
|
|
1132
|
-
data: string;
|
|
1133
|
-
};
|
|
1134
|
-
/**
|
|
1135
|
-
* Context info
|
|
1136
|
-
*/
|
|
1137
|
-
type ContextInfo = {
|
|
1138
|
-
type?: string;
|
|
1139
|
-
id?: string;
|
|
1140
|
-
};
|
|
1141
|
-
type GetAuthCodeReturns = {
|
|
1142
|
-
authCode: string;
|
|
1143
|
-
authCodeVerify: string;
|
|
1144
|
-
};
|
|
1145
|
-
type GetZPITokenReturns = {
|
|
1146
|
-
utoken: string;
|
|
1147
|
-
gtoken: string;
|
|
1148
|
-
zpp: string;
|
|
1149
|
-
zpt: string;
|
|
1150
|
-
};
|
|
1151
|
-
type ChooseImageReturns = {
|
|
1152
|
-
filePaths: Array<string>;
|
|
1153
|
-
tempFiles: Array<{
|
|
1154
|
-
path: string;
|
|
1155
|
-
size: number;
|
|
1156
|
-
}>;
|
|
1157
|
-
};
|
|
1158
|
-
type CreateOrderReturns = {
|
|
1159
|
-
orderId: string;
|
|
1160
|
-
messageToken?: string;
|
|
1161
|
-
transId?: string;
|
|
1162
|
-
};
|
|
1163
|
-
type SelectPaymentMethodReturns = {
|
|
1164
|
-
method: string;
|
|
1165
|
-
isCustom?: boolean;
|
|
1166
|
-
displayName?: string;
|
|
1167
|
-
subMethod?: string;
|
|
1168
|
-
logo?: string;
|
|
1169
|
-
};
|
|
1170
|
-
type CheckTransactionReturns = {
|
|
1171
|
-
err: number;
|
|
1172
|
-
msg: string;
|
|
1173
|
-
orderId: string;
|
|
1174
|
-
transId: string;
|
|
1175
|
-
resultCode: number;
|
|
1176
|
-
transTime: string;
|
|
1177
|
-
createdAt: string;
|
|
1178
|
-
path?: string;
|
|
1179
|
-
method: string;
|
|
1180
|
-
isCustom: boolean;
|
|
1181
|
-
};
|
|
1182
|
-
type CreateOrderIAPReturns = {
|
|
1183
|
-
orderId: string;
|
|
1184
|
-
};
|
|
1185
|
-
type ScopeValues = (typeof AUTHEN_SCOPE_VALUES)[number] | (typeof GET_SETTINGS_SCOPE_VALUES)[number];
|
|
1186
|
-
type AuthorizeType<T extends ScopeValues> = Partial<{
|
|
1187
|
-
[key in T]: boolean;
|
|
1188
|
-
}>;
|
|
1189
|
-
type GetSettingReturn = {
|
|
1190
|
-
authSetting: AuthorizeType<(typeof GET_SETTINGS_SCOPE_VALUES)[number]>;
|
|
1191
|
-
};
|
|
1192
|
-
type SaveFileReturns = {
|
|
1193
|
-
savedPath: string;
|
|
1194
|
-
};
|
|
1195
|
-
|
|
1196
|
-
declare enum CameraEvents {
|
|
1197
|
-
OnFrameCallback = "h5.event.camera.frame",
|
|
1198
|
-
OnStartCallback = "h5.event.camera.start",
|
|
1199
|
-
OnStopCallback = "h5.event.camera.stop"
|
|
1200
|
-
}
|
|
1201
|
-
declare enum FacingMode {
|
|
1202
|
-
FRONT = "user",
|
|
1203
|
-
BACK = "environment"
|
|
1204
|
-
}
|
|
1205
|
-
declare enum PhotoFormat {
|
|
1206
|
-
WEBP = "image/webp",
|
|
1207
|
-
PNG = "image/png",
|
|
1208
|
-
JPEG = "image/jpeg"
|
|
1209
|
-
}
|
|
1210
|
-
declare enum PhotoQuality {
|
|
1211
|
-
HIGH = "high",
|
|
1212
|
-
NORMAL = "normal",
|
|
1213
|
-
LOW = "low"
|
|
1214
|
-
}
|
|
1215
|
-
declare enum StreamType {
|
|
1216
|
-
VIDEO = "video",
|
|
1217
|
-
AUDIO = "audio"
|
|
1218
|
-
}
|
|
1219
|
-
type PhotoFrame = {
|
|
1220
|
-
data: string;
|
|
1221
|
-
width: number;
|
|
1222
|
-
height: number;
|
|
1223
|
-
};
|
|
1224
|
-
type MediaDevice = {
|
|
1225
|
-
kind: string;
|
|
1226
|
-
label: string;
|
|
1227
|
-
deviceId: string;
|
|
1228
|
-
};
|
|
1229
|
-
type MediaConstraints = {
|
|
1230
|
-
width?: number;
|
|
1231
|
-
height?: number;
|
|
1232
|
-
facingMode?: FacingMode;
|
|
1233
|
-
deviceId?: string;
|
|
1234
|
-
audio?: boolean;
|
|
1235
|
-
video?: boolean;
|
|
1236
|
-
mirrored?: boolean;
|
|
1237
|
-
};
|
|
1238
|
-
type PhotoConstraint = {
|
|
1239
|
-
width?: number;
|
|
1240
|
-
height?: number;
|
|
1241
|
-
format?: PhotoFormat;
|
|
1242
|
-
quality?: PhotoQuality;
|
|
1243
|
-
mirrored?: boolean;
|
|
1244
|
-
useVideoSourceSize?: boolean;
|
|
1245
|
-
minScreenshotWidth?: number;
|
|
1246
|
-
minScreenshotHeight?: number;
|
|
1247
|
-
};
|
|
1248
|
-
|
|
1249
|
-
declare type Primitive = string | number | symbol | bigint | boolean | null | undefined;
|
|
1250
|
-
|
|
1251
|
-
declare namespace util {
|
|
1252
|
-
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
|
|
1253
|
-
export const assertEqual: <A, B>(val: AssertEqual<A, B>) => AssertEqual<A, B>;
|
|
1254
|
-
export function assertIs<T>(_arg: T): void;
|
|
1255
|
-
export function assertNever(_x: never): never;
|
|
1256
|
-
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
1257
|
-
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
|
|
1258
|
-
export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
1259
|
-
export const arrayToEnum: <T extends string, U extends [T, ...T[]]>(items: U) => { [k in U[number]]: k; };
|
|
1260
|
-
export const getValidEnumValues: (obj: any) => any[];
|
|
1261
|
-
export const objectValues: (obj: any) => any[];
|
|
1262
|
-
export const objectKeys: ObjectConstructor["keys"];
|
|
1263
|
-
export const find: <T>(arr: T[], checker: (arg: T) => any) => T | undefined;
|
|
1264
|
-
export type identity<T> = T;
|
|
1265
|
-
export type flatten<T> = identity<{
|
|
1266
|
-
[k in keyof T]: T[k];
|
|
1267
|
-
}>;
|
|
1268
|
-
export type noUndefined<T> = T extends undefined ? never : T;
|
|
1269
|
-
export const isInteger: NumberConstructor["isInteger"];
|
|
1270
|
-
export function joinValues<T extends any[]>(array: T, separator?: string): string;
|
|
1271
|
-
export const jsonStringifyReplacer: (_: string, value: any) => any;
|
|
1272
|
-
export {};
|
|
1273
|
-
}
|
|
1274
|
-
declare const ZodParsedType: {
|
|
1275
|
-
function: "function";
|
|
1276
|
-
number: "number";
|
|
1277
|
-
string: "string";
|
|
1278
|
-
nan: "nan";
|
|
1279
|
-
integer: "integer";
|
|
1280
|
-
float: "float";
|
|
1281
|
-
boolean: "boolean";
|
|
1282
|
-
date: "date";
|
|
1283
|
-
bigint: "bigint";
|
|
1284
|
-
symbol: "symbol";
|
|
1285
|
-
undefined: "undefined";
|
|
1286
|
-
null: "null";
|
|
1287
|
-
array: "array";
|
|
1288
|
-
object: "object";
|
|
1289
|
-
unknown: "unknown";
|
|
1290
|
-
promise: "promise";
|
|
1291
|
-
void: "void";
|
|
1292
|
-
never: "never";
|
|
1293
|
-
map: "map";
|
|
1294
|
-
set: "set";
|
|
1295
|
-
};
|
|
1296
|
-
declare type ZodParsedType = keyof typeof ZodParsedType;
|
|
1297
|
-
|
|
1298
|
-
declare type allKeys<T> = T extends any ? keyof T : never;
|
|
1299
|
-
declare type typeToFlattenedError<T, U = string> = {
|
|
1300
|
-
formErrors: U[];
|
|
1301
|
-
fieldErrors: {
|
|
1302
|
-
[P in allKeys<T>]?: U[];
|
|
1303
1764
|
};
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
};
|
|
1323
|
-
|
|
1324
|
-
declare type ZodIssueBase = {
|
|
1325
|
-
path: (string | number)[];
|
|
1326
|
-
message?: string;
|
|
1327
|
-
};
|
|
1328
|
-
interface ZodInvalidTypeIssue extends ZodIssueBase {
|
|
1329
|
-
code: typeof ZodIssueCode.invalid_type;
|
|
1330
|
-
expected: ZodParsedType;
|
|
1331
|
-
received: ZodParsedType;
|
|
1332
|
-
}
|
|
1333
|
-
interface ZodInvalidLiteralIssue extends ZodIssueBase {
|
|
1334
|
-
code: typeof ZodIssueCode.invalid_literal;
|
|
1335
|
-
expected: unknown;
|
|
1336
|
-
received: unknown;
|
|
1337
|
-
}
|
|
1338
|
-
interface ZodUnrecognizedKeysIssue extends ZodIssueBase {
|
|
1339
|
-
code: typeof ZodIssueCode.unrecognized_keys;
|
|
1340
|
-
keys: string[];
|
|
1341
|
-
}
|
|
1342
|
-
interface ZodInvalidUnionIssue extends ZodIssueBase {
|
|
1343
|
-
code: typeof ZodIssueCode.invalid_union;
|
|
1344
|
-
unionErrors: ZodError[];
|
|
1345
|
-
}
|
|
1346
|
-
interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {
|
|
1347
|
-
code: typeof ZodIssueCode.invalid_union_discriminator;
|
|
1348
|
-
options: Primitive[];
|
|
1349
|
-
}
|
|
1350
|
-
interface ZodInvalidEnumValueIssue extends ZodIssueBase {
|
|
1351
|
-
received: string | number;
|
|
1352
|
-
code: typeof ZodIssueCode.invalid_enum_value;
|
|
1353
|
-
options: (string | number)[];
|
|
1354
|
-
}
|
|
1355
|
-
interface ZodInvalidArgumentsIssue extends ZodIssueBase {
|
|
1356
|
-
code: typeof ZodIssueCode.invalid_arguments;
|
|
1357
|
-
argumentsError: ZodError;
|
|
1358
|
-
}
|
|
1359
|
-
interface ZodInvalidReturnTypeIssue extends ZodIssueBase {
|
|
1360
|
-
code: typeof ZodIssueCode.invalid_return_type;
|
|
1361
|
-
returnTypeError: ZodError;
|
|
1362
|
-
}
|
|
1363
|
-
interface ZodInvalidDateIssue extends ZodIssueBase {
|
|
1364
|
-
code: typeof ZodIssueCode.invalid_date;
|
|
1365
|
-
}
|
|
1366
|
-
declare type StringValidation = "email" | "url" | "uuid" | "regex" | "cuid" | "cuid2" | "datetime" | {
|
|
1367
|
-
startsWith: string;
|
|
1368
|
-
} | {
|
|
1369
|
-
endsWith: string;
|
|
1370
|
-
};
|
|
1371
|
-
interface ZodInvalidStringIssue extends ZodIssueBase {
|
|
1372
|
-
code: typeof ZodIssueCode.invalid_string;
|
|
1373
|
-
validation: StringValidation;
|
|
1374
|
-
}
|
|
1375
|
-
interface ZodTooSmallIssue extends ZodIssueBase {
|
|
1376
|
-
code: typeof ZodIssueCode.too_small;
|
|
1377
|
-
minimum: number;
|
|
1378
|
-
inclusive: boolean;
|
|
1379
|
-
exact?: boolean;
|
|
1380
|
-
type: "array" | "string" | "number" | "set" | "date";
|
|
1381
|
-
}
|
|
1382
|
-
interface ZodTooBigIssue extends ZodIssueBase {
|
|
1383
|
-
code: typeof ZodIssueCode.too_big;
|
|
1384
|
-
maximum: number;
|
|
1385
|
-
inclusive: boolean;
|
|
1386
|
-
exact?: boolean;
|
|
1387
|
-
type: "array" | "string" | "number" | "set" | "date";
|
|
1388
|
-
}
|
|
1389
|
-
interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
|
|
1390
|
-
code: typeof ZodIssueCode.invalid_intersection_types;
|
|
1391
|
-
}
|
|
1392
|
-
interface ZodNotMultipleOfIssue extends ZodIssueBase {
|
|
1393
|
-
code: typeof ZodIssueCode.not_multiple_of;
|
|
1394
|
-
multipleOf: number;
|
|
1395
|
-
}
|
|
1396
|
-
interface ZodNotFiniteIssue extends ZodIssueBase {
|
|
1397
|
-
code: typeof ZodIssueCode.not_finite;
|
|
1398
|
-
}
|
|
1399
|
-
interface ZodCustomIssue extends ZodIssueBase {
|
|
1400
|
-
code: typeof ZodIssueCode.custom;
|
|
1401
|
-
params?: {
|
|
1402
|
-
[k: string]: any;
|
|
1765
|
+
MP_USER_AUTHORIZE: {
|
|
1766
|
+
skipJump: boolean;
|
|
1767
|
+
errorList: {
|
|
1768
|
+
android: {
|
|
1769
|
+
"-400": {
|
|
1770
|
+
mapTo: {
|
|
1771
|
+
code: number;
|
|
1772
|
+
message: string;
|
|
1773
|
+
};
|
|
1774
|
+
};
|
|
1775
|
+
};
|
|
1776
|
+
iOS: {
|
|
1777
|
+
"-400": {
|
|
1778
|
+
mapTo: {
|
|
1779
|
+
code: number;
|
|
1780
|
+
message: string;
|
|
1781
|
+
};
|
|
1782
|
+
};
|
|
1783
|
+
};
|
|
1784
|
+
};
|
|
1403
1785
|
};
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
};
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
};
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1786
|
+
MP_SELECT_PAYMENT_METHOD: {
|
|
1787
|
+
skipJump: boolean;
|
|
1788
|
+
};
|
|
1789
|
+
CHECK_NFC: {
|
|
1790
|
+
skipJump: boolean;
|
|
1791
|
+
versionLive: {
|
|
1792
|
+
iOS: number;
|
|
1793
|
+
};
|
|
1794
|
+
errorList: {
|
|
1795
|
+
all: {
|
|
1796
|
+
"-1": {
|
|
1797
|
+
mapTo: {
|
|
1798
|
+
code: number;
|
|
1799
|
+
message: string;
|
|
1800
|
+
};
|
|
1801
|
+
};
|
|
1802
|
+
"-600": {
|
|
1803
|
+
mapTo: {
|
|
1804
|
+
code: number;
|
|
1805
|
+
message: string;
|
|
1806
|
+
};
|
|
1807
|
+
};
|
|
1808
|
+
"-602": {
|
|
1809
|
+
mapTo: {
|
|
1810
|
+
code: number;
|
|
1811
|
+
message: string;
|
|
1812
|
+
};
|
|
1813
|
+
};
|
|
1814
|
+
};
|
|
1815
|
+
};
|
|
1816
|
+
};
|
|
1817
|
+
SCAN_NFC: {
|
|
1818
|
+
skipJump: boolean;
|
|
1819
|
+
haveCallback: boolean;
|
|
1820
|
+
timeout: number;
|
|
1821
|
+
errorList: {
|
|
1822
|
+
all: {
|
|
1823
|
+
"-1": {
|
|
1824
|
+
mapTo: {
|
|
1825
|
+
code: number;
|
|
1826
|
+
message: string;
|
|
1827
|
+
};
|
|
1828
|
+
};
|
|
1829
|
+
"-600": {
|
|
1830
|
+
mapTo: {
|
|
1831
|
+
code: number;
|
|
1832
|
+
message: string;
|
|
1833
|
+
};
|
|
1834
|
+
};
|
|
1835
|
+
"-601": {
|
|
1836
|
+
mapTo: {
|
|
1837
|
+
code: number;
|
|
1838
|
+
message: string;
|
|
1839
|
+
};
|
|
1840
|
+
};
|
|
1841
|
+
"-602": {
|
|
1842
|
+
mapTo: {
|
|
1843
|
+
code: number;
|
|
1844
|
+
message: string;
|
|
1845
|
+
};
|
|
1846
|
+
};
|
|
1847
|
+
"-603": {
|
|
1848
|
+
mapTo: {
|
|
1849
|
+
code: number;
|
|
1850
|
+
message: string;
|
|
1851
|
+
};
|
|
1852
|
+
};
|
|
1853
|
+
"-604": {
|
|
1854
|
+
mapTo: {
|
|
1855
|
+
code: number;
|
|
1856
|
+
message: string;
|
|
1857
|
+
};
|
|
1858
|
+
};
|
|
1859
|
+
"-605": {
|
|
1860
|
+
mapTo: {
|
|
1861
|
+
code: number;
|
|
1862
|
+
message: string;
|
|
1863
|
+
};
|
|
1864
|
+
};
|
|
1865
|
+
"-606": {
|
|
1866
|
+
mapTo: {
|
|
1867
|
+
code: number;
|
|
1868
|
+
message: string;
|
|
1869
|
+
};
|
|
1870
|
+
};
|
|
1871
|
+
};
|
|
1872
|
+
};
|
|
1460
1873
|
};
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
readonly parent: ParseContext | null;
|
|
1464
|
-
readonly data: any;
|
|
1465
|
-
readonly parsedType: ZodParsedType;
|
|
1466
|
-
}
|
|
1467
|
-
declare type ParseInput = {
|
|
1468
|
-
data: any;
|
|
1469
|
-
path: (string | number)[];
|
|
1470
|
-
parent: ParseContext;
|
|
1471
|
-
};
|
|
1472
|
-
declare class ParseStatus {
|
|
1473
|
-
value: "aborted" | "dirty" | "valid";
|
|
1474
|
-
dirty(): void;
|
|
1475
|
-
abort(): void;
|
|
1476
|
-
static mergeArray(status: ParseStatus, results: SyncParseReturnType<any>[]): SyncParseReturnType;
|
|
1477
|
-
static mergeObjectAsync(status: ParseStatus, pairs: {
|
|
1478
|
-
key: ParseReturnType<any>;
|
|
1479
|
-
value: ParseReturnType<any>;
|
|
1480
|
-
}[]): Promise<SyncParseReturnType<any>>;
|
|
1481
|
-
static mergeObjectSync(status: ParseStatus, pairs: {
|
|
1482
|
-
key: SyncParseReturnType<any>;
|
|
1483
|
-
value: SyncParseReturnType<any>;
|
|
1484
|
-
alwaysSet?: boolean;
|
|
1485
|
-
}[]): SyncParseReturnType;
|
|
1486
|
-
}
|
|
1487
|
-
declare type INVALID = {
|
|
1488
|
-
status: "aborted";
|
|
1489
|
-
};
|
|
1490
|
-
declare const INVALID: INVALID;
|
|
1491
|
-
declare type DIRTY<T> = {
|
|
1492
|
-
status: "dirty";
|
|
1493
|
-
value: T;
|
|
1494
|
-
};
|
|
1495
|
-
declare const DIRTY: <T>(value: T) => DIRTY<T>;
|
|
1496
|
-
declare type OK<T> = {
|
|
1497
|
-
status: "valid";
|
|
1498
|
-
value: T;
|
|
1499
|
-
};
|
|
1500
|
-
declare const OK: <T>(value: T) => OK<T>;
|
|
1501
|
-
declare type SyncParseReturnType<T = any> = OK<T> | DIRTY<T> | INVALID;
|
|
1502
|
-
declare type AsyncParseReturnType<T> = Promise<SyncParseReturnType<T>>;
|
|
1503
|
-
declare type ParseReturnType<T> = SyncParseReturnType<T> | AsyncParseReturnType<T>;
|
|
1504
|
-
|
|
1505
|
-
declare namespace enumUtil {
|
|
1506
|
-
type UnionToIntersectionFn<T> = (T extends unknown ? (k: () => T) => void : never) extends (k: infer Intersection) => void ? Intersection : never;
|
|
1507
|
-
type GetUnionLast<T> = UnionToIntersectionFn<T> extends () => infer Last ? Last : never;
|
|
1508
|
-
type UnionToTuple<T, Tuple extends unknown[] = []> = [T] extends [never] ? Tuple : UnionToTuple<Exclude<T, GetUnionLast<T>>, [GetUnionLast<T>, ...Tuple]>;
|
|
1509
|
-
type CastToStringTuple<T> = T extends [string, ...string[]] ? T : never;
|
|
1510
|
-
export type UnionToTupleString<T> = CastToStringTuple<UnionToTuple<T>>;
|
|
1511
|
-
export {};
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
declare namespace errorUtil {
|
|
1515
|
-
type ErrMessage = string | {
|
|
1516
|
-
message?: string;
|
|
1874
|
+
MP_CONFIRM_REQUEST_PAYMENT: {
|
|
1875
|
+
skipJump: boolean;
|
|
1517
1876
|
};
|
|
1518
|
-
|
|
1519
|
-
|
|
1877
|
+
SAVE_FILE: {
|
|
1878
|
+
versionLive: {
|
|
1879
|
+
iOS: number;
|
|
1880
|
+
};
|
|
1881
|
+
skipJump: boolean;
|
|
1882
|
+
errorList: {
|
|
1883
|
+
android: {
|
|
1884
|
+
"-101": {
|
|
1885
|
+
mapTo: {
|
|
1886
|
+
code: number;
|
|
1887
|
+
message: string;
|
|
1888
|
+
};
|
|
1889
|
+
needMoreDetail: boolean;
|
|
1890
|
+
};
|
|
1891
|
+
"-102": {
|
|
1892
|
+
mapTo: {
|
|
1893
|
+
code: number;
|
|
1894
|
+
message: string;
|
|
1895
|
+
};
|
|
1896
|
+
needMoreDetail: boolean;
|
|
1897
|
+
};
|
|
1898
|
+
};
|
|
1899
|
+
iOS: {
|
|
1900
|
+
"-10": {
|
|
1901
|
+
mapTo: {
|
|
1902
|
+
code: number;
|
|
1903
|
+
message: string;
|
|
1904
|
+
};
|
|
1905
|
+
needMoreDetail: boolean;
|
|
1906
|
+
};
|
|
1907
|
+
};
|
|
1908
|
+
};
|
|
1909
|
+
};
|
|
1910
|
+
MP_APP_LIFECYCLE_TRACKING: {
|
|
1911
|
+
skipJump: boolean;
|
|
1520
1912
|
};
|
|
1521
|
-
const toString: (message?: ErrMessage | undefined) => string | undefined;
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
declare namespace partialUtil {
|
|
1525
|
-
type DeepPartial<T extends ZodTypeAny> = T extends ZodObject<infer Shape, infer Params, infer Catchall> ? ZodObject<{
|
|
1526
|
-
[k in keyof Shape]: ZodOptional<DeepPartial<Shape[k]>>;
|
|
1527
|
-
}, 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> ? {
|
|
1528
|
-
[k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial<Items[k]> : never;
|
|
1529
|
-
} extends infer PI ? PI extends ZodTupleItems ? ZodTuple<PI> : never : never : T;
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
declare type RefinementCtx = {
|
|
1533
|
-
addIssue: (arg: IssueData) => void;
|
|
1534
|
-
path: (string | number)[];
|
|
1535
|
-
};
|
|
1536
|
-
declare type ZodRawShape = {
|
|
1537
|
-
[k: string]: ZodTypeAny;
|
|
1538
1913
|
};
|
|
1539
|
-
declare
|
|
1540
|
-
declare
|
|
1541
|
-
declare type input<T extends ZodType<any, any, any>> = T["_input"];
|
|
1542
|
-
declare type output<T extends ZodType<any, any, any>> = T["_output"];
|
|
1914
|
+
declare const AUTHEN_SCOPE_VALUES: readonly ["scope.userInfo", "scope.userLocation", "scope.userPhonenumber"];
|
|
1915
|
+
declare const GET_SETTINGS_SCOPE_VALUES: readonly ["scope.userInfo", "scope.userLocation", "scope.userPhonenumber", "scope.camera", "scope.micro"];
|
|
1543
1916
|
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
declare type RawCreateParams = {
|
|
1550
|
-
errorMap?: ZodErrorMap;
|
|
1551
|
-
invalid_type_error?: string;
|
|
1552
|
-
required_error?: string;
|
|
1553
|
-
description?: string;
|
|
1554
|
-
} | undefined;
|
|
1555
|
-
declare type SafeParseSuccess<Output> = {
|
|
1556
|
-
success: true;
|
|
1557
|
-
data: Output;
|
|
1558
|
-
};
|
|
1559
|
-
declare type SafeParseError<Input> = {
|
|
1560
|
-
success: false;
|
|
1561
|
-
error: ZodError<Input>;
|
|
1917
|
+
type AsyncCallbackFailObject = {
|
|
1918
|
+
code: number;
|
|
1919
|
+
message?: string | undefined;
|
|
1920
|
+
api?: string | undefined;
|
|
1921
|
+
[key: string]: any;
|
|
1562
1922
|
};
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
abstract _parse(input: ParseInput): ParseReturnType<Output>;
|
|
1571
|
-
_getType(input: ParseInput): string;
|
|
1572
|
-
_getOrReturnCtx(input: ParseInput, ctx?: ParseContext | undefined): ParseContext;
|
|
1573
|
-
_processInputParams(input: ParseInput): {
|
|
1574
|
-
status: ParseStatus;
|
|
1575
|
-
ctx: ParseContext;
|
|
1576
|
-
};
|
|
1577
|
-
_parseSync(input: ParseInput): SyncParseReturnType<Output>;
|
|
1578
|
-
_parseAsync(input: ParseInput): AsyncParseReturnType<Output>;
|
|
1579
|
-
parse(data: unknown, params?: Partial<ParseParams>): Output;
|
|
1580
|
-
safeParse(data: unknown, params?: Partial<ParseParams>): SafeParseReturnType<Input, Output>;
|
|
1581
|
-
parseAsync(data: unknown, params?: Partial<ParseParams>): Promise<Output>;
|
|
1582
|
-
safeParseAsync(data: unknown, params?: Partial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;
|
|
1583
|
-
/** Alias of safeParseAsync */
|
|
1584
|
-
spa: (data: unknown, params?: Partial<ParseParams> | undefined) => Promise<SafeParseReturnType<Input, Output>>;
|
|
1585
|
-
refine<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, RefinedOutput, Input>;
|
|
1586
|
-
refine(check: (arg: Output) => unknown | Promise<unknown>, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, Output, Input>;
|
|
1587
|
-
refinement<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, RefinedOutput, Input>;
|
|
1588
|
-
refinement(check: (arg: Output) => boolean, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, Output, Input>;
|
|
1589
|
-
_refinement(refinement: RefinementEffect<Output>["refinement"]): ZodEffects<this, Output, Input>;
|
|
1590
|
-
superRefine<RefinedOutput extends Output>(refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput): ZodEffects<this, RefinedOutput, Input>;
|
|
1591
|
-
superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects<this, Output, Input>;
|
|
1592
|
-
constructor(def: Def);
|
|
1593
|
-
optional(): ZodOptional<this>;
|
|
1594
|
-
nullable(): ZodNullable<this>;
|
|
1595
|
-
nullish(): ZodOptional<ZodNullable<this>>;
|
|
1596
|
-
array(): ZodArray<this>;
|
|
1597
|
-
promise(): ZodPromise<this>;
|
|
1598
|
-
or<T extends ZodTypeAny>(option: T): ZodUnion<[this, T]>;
|
|
1599
|
-
and<T extends ZodTypeAny>(incoming: T): ZodIntersection<this, T>;
|
|
1600
|
-
transform<NewOut>(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise<NewOut>): ZodEffects<this, NewOut>;
|
|
1601
|
-
default(def: util.noUndefined<Input>): ZodDefault<this>;
|
|
1602
|
-
default(def: () => util.noUndefined<Input>): ZodDefault<this>;
|
|
1603
|
-
brand<B extends string | number | symbol>(brand?: B): ZodBranded<this, B>;
|
|
1604
|
-
catch(def: Output): ZodCatch<this>;
|
|
1605
|
-
catch(def: () => Output): ZodCatch<this>;
|
|
1606
|
-
describe(description: string): this;
|
|
1607
|
-
pipe<T extends ZodTypeAny>(target: T): ZodPipeline<this, T>;
|
|
1608
|
-
isOptional(): boolean;
|
|
1609
|
-
isNullable(): boolean;
|
|
1610
|
-
}
|
|
1611
|
-
declare type ZodStringCheck = {
|
|
1612
|
-
kind: "min";
|
|
1613
|
-
value: number;
|
|
1614
|
-
message?: string;
|
|
1615
|
-
} | {
|
|
1616
|
-
kind: "max";
|
|
1617
|
-
value: number;
|
|
1618
|
-
message?: string;
|
|
1619
|
-
} | {
|
|
1620
|
-
kind: "length";
|
|
1621
|
-
value: number;
|
|
1622
|
-
message?: string;
|
|
1623
|
-
} | {
|
|
1624
|
-
kind: "email";
|
|
1625
|
-
message?: string;
|
|
1626
|
-
} | {
|
|
1627
|
-
kind: "url";
|
|
1628
|
-
message?: string;
|
|
1629
|
-
} | {
|
|
1630
|
-
kind: "uuid";
|
|
1631
|
-
message?: string;
|
|
1632
|
-
} | {
|
|
1633
|
-
kind: "cuid";
|
|
1634
|
-
message?: string;
|
|
1635
|
-
} | {
|
|
1636
|
-
kind: "cuid2";
|
|
1637
|
-
message?: string;
|
|
1638
|
-
} | {
|
|
1639
|
-
kind: "startsWith";
|
|
1640
|
-
value: string;
|
|
1641
|
-
message?: string;
|
|
1642
|
-
} | {
|
|
1643
|
-
kind: "endsWith";
|
|
1644
|
-
value: string;
|
|
1645
|
-
message?: string;
|
|
1646
|
-
} | {
|
|
1647
|
-
kind: "regex";
|
|
1648
|
-
regex: RegExp;
|
|
1649
|
-
message?: string;
|
|
1650
|
-
} | {
|
|
1651
|
-
kind: "trim";
|
|
1652
|
-
message?: string;
|
|
1653
|
-
} | {
|
|
1654
|
-
kind: "datetime";
|
|
1655
|
-
offset: boolean;
|
|
1656
|
-
precision: number | null;
|
|
1657
|
-
message?: string;
|
|
1923
|
+
type IAPPayTypeType = "SUBSCRIPTION" | "ONETIME";
|
|
1924
|
+
type IAPMethodType = "IAP" | "IAP_SANDBOX";
|
|
1925
|
+
type ProrationModeType = "UNKNOW" | "DEFERRED" | "IMMEDIATE_AND_CHARGE_FULL_PRICE";
|
|
1926
|
+
type AsyncCallback<T = any> = {
|
|
1927
|
+
action?: keyof typeof ACTION;
|
|
1928
|
+
success?: ((res: T) => void) | undefined;
|
|
1929
|
+
fail?: ((err: AsyncCallbackFailObject) => void) | undefined;
|
|
1658
1930
|
};
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
}
|
|
1664
|
-
declare class ZodString extends ZodType<string, ZodStringDef> {
|
|
1665
|
-
_parse(input: ParseInput): ParseReturnType<string>;
|
|
1666
|
-
protected _regex: (regex: RegExp, validation: StringValidation, message?: errorUtil.ErrMessage | undefined) => ZodEffects<this, string, string>;
|
|
1667
|
-
_addCheck(check: ZodStringCheck): ZodString;
|
|
1668
|
-
email(message?: errorUtil.ErrMessage): ZodString;
|
|
1669
|
-
url(message?: errorUtil.ErrMessage): ZodString;
|
|
1670
|
-
uuid(message?: errorUtil.ErrMessage): ZodString;
|
|
1671
|
-
cuid(message?: errorUtil.ErrMessage): ZodString;
|
|
1672
|
-
cuid2(message?: errorUtil.ErrMessage): ZodString;
|
|
1673
|
-
datetime(options?: string | {
|
|
1674
|
-
message?: string | undefined;
|
|
1675
|
-
precision?: number | null;
|
|
1676
|
-
offset?: boolean;
|
|
1677
|
-
}): ZodString;
|
|
1678
|
-
regex(regex: RegExp, message?: errorUtil.ErrMessage): ZodString;
|
|
1679
|
-
startsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
|
|
1680
|
-
endsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
|
|
1681
|
-
min(minLength: number, message?: errorUtil.ErrMessage): ZodString;
|
|
1682
|
-
max(maxLength: number, message?: errorUtil.ErrMessage): ZodString;
|
|
1683
|
-
length(len: number, message?: errorUtil.ErrMessage): ZodString;
|
|
1684
|
-
/**
|
|
1685
|
-
* @deprecated Use z.string().min(1) instead.
|
|
1686
|
-
* @see {@link ZodString.min}
|
|
1687
|
-
*/
|
|
1688
|
-
nonempty: (message?: errorUtil.ErrMessage | undefined) => ZodString;
|
|
1689
|
-
trim: () => ZodString;
|
|
1690
|
-
get isDatetime(): boolean;
|
|
1691
|
-
get isEmail(): boolean;
|
|
1692
|
-
get isURL(): boolean;
|
|
1693
|
-
get isUUID(): boolean;
|
|
1694
|
-
get isCUID(): boolean;
|
|
1695
|
-
get isCUID2(): boolean;
|
|
1696
|
-
get minLength(): number | null;
|
|
1697
|
-
get maxLength(): number | null;
|
|
1698
|
-
static create: (params?: ({
|
|
1699
|
-
errorMap?: ZodErrorMap | undefined;
|
|
1700
|
-
invalid_type_error?: string | undefined;
|
|
1701
|
-
required_error?: string | undefined;
|
|
1702
|
-
description?: string | undefined;
|
|
1703
|
-
} & {
|
|
1704
|
-
coerce?: true | undefined;
|
|
1705
|
-
}) | undefined) => ZodString;
|
|
1706
|
-
}
|
|
1707
|
-
declare type ZodNumberCheck = {
|
|
1708
|
-
kind: "min";
|
|
1709
|
-
value: number;
|
|
1710
|
-
inclusive: boolean;
|
|
1711
|
-
message?: string;
|
|
1712
|
-
} | {
|
|
1713
|
-
kind: "max";
|
|
1714
|
-
value: number;
|
|
1715
|
-
inclusive: boolean;
|
|
1716
|
-
message?: string;
|
|
1717
|
-
} | {
|
|
1718
|
-
kind: "int";
|
|
1719
|
-
message?: string;
|
|
1720
|
-
} | {
|
|
1721
|
-
kind: "multipleOf";
|
|
1722
|
-
value: number;
|
|
1723
|
-
message?: string;
|
|
1724
|
-
} | {
|
|
1725
|
-
kind: "finite";
|
|
1726
|
-
message?: string;
|
|
1931
|
+
type AsyncVoidCallback = {
|
|
1932
|
+
action?: keyof typeof ACTION;
|
|
1933
|
+
success?: () => void;
|
|
1934
|
+
fail?: ((err: AsyncCallbackFailObject) => void) | undefined;
|
|
1727
1935
|
};
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
declare class ZodBoolean extends ZodType<boolean, ZodBooleanDef> {
|
|
1769
|
-
_parse(input: ParseInput): ParseReturnType<boolean>;
|
|
1770
|
-
static create: (params?: ({
|
|
1771
|
-
errorMap?: ZodErrorMap | undefined;
|
|
1772
|
-
invalid_type_error?: string | undefined;
|
|
1773
|
-
required_error?: string | undefined;
|
|
1774
|
-
description?: string | undefined;
|
|
1775
|
-
} & {
|
|
1776
|
-
coerce?: boolean | undefined;
|
|
1777
|
-
}) | undefined) => ZodBoolean;
|
|
1778
|
-
}
|
|
1779
|
-
interface ZodAnyDef extends ZodTypeDef {
|
|
1780
|
-
typeName: ZodFirstPartyTypeKind.ZodAny;
|
|
1781
|
-
}
|
|
1782
|
-
declare class ZodAny extends ZodType<any, ZodAnyDef> {
|
|
1783
|
-
_any: true;
|
|
1784
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1785
|
-
static create: (params?: RawCreateParams) => ZodAny;
|
|
1786
|
-
}
|
|
1787
|
-
interface ZodUnknownDef extends ZodTypeDef {
|
|
1788
|
-
typeName: ZodFirstPartyTypeKind.ZodUnknown;
|
|
1789
|
-
}
|
|
1790
|
-
declare class ZodUnknown extends ZodType<unknown, ZodUnknownDef> {
|
|
1791
|
-
_unknown: true;
|
|
1792
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1793
|
-
static create: (params?: RawCreateParams) => ZodUnknown;
|
|
1794
|
-
}
|
|
1795
|
-
interface ZodVoidDef extends ZodTypeDef {
|
|
1796
|
-
typeName: ZodFirstPartyTypeKind.ZodVoid;
|
|
1797
|
-
}
|
|
1798
|
-
declare class ZodVoid extends ZodType<void, ZodVoidDef> {
|
|
1799
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1800
|
-
static create: (params?: RawCreateParams) => ZodVoid;
|
|
1801
|
-
}
|
|
1802
|
-
interface ZodArrayDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1803
|
-
type: T;
|
|
1804
|
-
typeName: ZodFirstPartyTypeKind.ZodArray;
|
|
1805
|
-
exactLength: {
|
|
1806
|
-
value: number;
|
|
1807
|
-
message?: string;
|
|
1808
|
-
} | null;
|
|
1809
|
-
minLength: {
|
|
1810
|
-
value: number;
|
|
1811
|
-
message?: string;
|
|
1812
|
-
} | null;
|
|
1813
|
-
maxLength: {
|
|
1814
|
-
value: number;
|
|
1815
|
-
message?: string;
|
|
1816
|
-
} | null;
|
|
1817
|
-
}
|
|
1818
|
-
declare type ArrayCardinality = "many" | "atleastone";
|
|
1819
|
-
declare type arrayOutputType<T extends ZodTypeAny, Cardinality extends ArrayCardinality = "many"> = Cardinality extends "atleastone" ? [T["_output"], ...T["_output"][]] : T["_output"][];
|
|
1820
|
-
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"][]> {
|
|
1821
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1822
|
-
get element(): T;
|
|
1823
|
-
min(minLength: number, message?: errorUtil.ErrMessage): this;
|
|
1824
|
-
max(maxLength: number, message?: errorUtil.ErrMessage): this;
|
|
1825
|
-
length(len: number, message?: errorUtil.ErrMessage): this;
|
|
1826
|
-
nonempty(message?: errorUtil.ErrMessage): ZodArray<T, "atleastone">;
|
|
1827
|
-
static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodArray<T_1, "many">;
|
|
1828
|
-
}
|
|
1829
|
-
declare namespace objectUtil {
|
|
1830
|
-
export type MergeShapes<U extends ZodRawShape, V extends ZodRawShape> = {
|
|
1831
|
-
[k in Exclude<keyof U, keyof V>]: U[k];
|
|
1832
|
-
} & V;
|
|
1833
|
-
type optionalKeys<T extends object> = {
|
|
1834
|
-
[k in keyof T]: undefined extends T[k] ? k : never;
|
|
1835
|
-
}[keyof T];
|
|
1836
|
-
type requiredKeys<T extends object> = {
|
|
1837
|
-
[k in keyof T]: undefined extends T[k] ? never : k;
|
|
1838
|
-
}[keyof T];
|
|
1839
|
-
export type addQuestionMarks<T extends object> = Partial<Pick<T, optionalKeys<T>>> & Pick<T, requiredKeys<T>>;
|
|
1840
|
-
export type identity<T> = T;
|
|
1841
|
-
export type flatten<T extends object> = identity<{
|
|
1842
|
-
[k in keyof T]: T[k];
|
|
1843
|
-
}>;
|
|
1844
|
-
export type noNeverKeys<T extends ZodRawShape> = {
|
|
1845
|
-
[k in keyof T]: [T[k]] extends [never] ? never : k;
|
|
1846
|
-
}[keyof T];
|
|
1847
|
-
export type noNever<T extends ZodRawShape> = identity<{
|
|
1848
|
-
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;
|
|
1849
|
-
}>;
|
|
1850
|
-
export const mergeShapes: <U extends ZodRawShape, T extends ZodRawShape>(first: U, second: T) => T & U;
|
|
1851
|
-
export {};
|
|
1852
|
-
}
|
|
1853
|
-
declare type extendShape<A, B> = util.flatten<Omit<A, keyof B> & B>;
|
|
1854
|
-
declare type UnknownKeysParam = "passthrough" | "strict" | "strip";
|
|
1855
|
-
interface ZodObjectDef<T extends ZodRawShape = ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1856
|
-
typeName: ZodFirstPartyTypeKind.ZodObject;
|
|
1857
|
-
shape: () => T;
|
|
1858
|
-
catchall: Catchall;
|
|
1859
|
-
unknownKeys: UnknownKeys;
|
|
1860
|
-
}
|
|
1861
|
-
declare type baseObjectOutputType<Shape extends ZodRawShape> = objectUtil.addQuestionMarks<{
|
|
1862
|
-
[k in keyof Shape]: Shape[k]["_output"];
|
|
1863
|
-
}>;
|
|
1864
|
-
declare type objectOutputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny> = ZodTypeAny extends Catchall ? objectUtil.flatten<baseObjectOutputType<Shape>> : objectUtil.flatten<baseObjectOutputType<Shape> & {
|
|
1865
|
-
[k: string]: Catchall["_output"];
|
|
1866
|
-
}>;
|
|
1867
|
-
declare type baseObjectInputType<Shape extends ZodRawShape> = objectUtil.flatten<objectUtil.addQuestionMarks<{
|
|
1868
|
-
[k in keyof Shape]: Shape[k]["_input"];
|
|
1869
|
-
}>>;
|
|
1870
|
-
declare type objectInputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny> = ZodTypeAny extends Catchall ? baseObjectInputType<Shape> : objectUtil.flatten<baseObjectInputType<Shape> & {
|
|
1871
|
-
[k: string]: Catchall["_input"];
|
|
1872
|
-
}>;
|
|
1873
|
-
declare type deoptional<T extends ZodTypeAny> = T extends ZodOptional<infer U> ? deoptional<U> : T extends ZodNullable<infer U> ? ZodNullable<deoptional<U>> : T;
|
|
1874
|
-
declare type objectKeyMask<Obj> = {
|
|
1875
|
-
[k in keyof Obj]?: true;
|
|
1936
|
+
type AsyncProgressCallback = {
|
|
1937
|
+
action?: keyof typeof ACTION;
|
|
1938
|
+
onProgress?: (progress: number) => void;
|
|
1939
|
+
success?: () => void;
|
|
1940
|
+
fail?: ((err: AsyncCallbackFailObject) => void) | undefined;
|
|
1941
|
+
};
|
|
1942
|
+
type GetLocationReturns = {
|
|
1943
|
+
/** latitude */
|
|
1944
|
+
latitude?: string;
|
|
1945
|
+
/** longitude */
|
|
1946
|
+
longitude?: string;
|
|
1947
|
+
/** timestamp */
|
|
1948
|
+
timestamp?: string;
|
|
1949
|
+
/** provider */
|
|
1950
|
+
provider?: string;
|
|
1951
|
+
token?: string;
|
|
1952
|
+
};
|
|
1953
|
+
type CameraParams = {
|
|
1954
|
+
mediaConstraints?: MediaConstraints;
|
|
1955
|
+
canvasElement?: HTMLCanvasElement;
|
|
1956
|
+
videoElement: HTMLVideoElement;
|
|
1957
|
+
};
|
|
1958
|
+
interface SystemInfo {
|
|
1959
|
+
/** Mini app version */
|
|
1960
|
+
version: string;
|
|
1961
|
+
/** SDK version */
|
|
1962
|
+
apiVersion: string;
|
|
1963
|
+
/** Zalo version */
|
|
1964
|
+
zaloVersion: string;
|
|
1965
|
+
/** Client platform */
|
|
1966
|
+
platform: string;
|
|
1967
|
+
/** Language set in Zalo */
|
|
1968
|
+
language: string;
|
|
1969
|
+
/** Language set in Zalo */
|
|
1970
|
+
zaloLanguage: string;
|
|
1971
|
+
/** Theme set in Zalo */
|
|
1972
|
+
zaloTheme: string;
|
|
1973
|
+
}
|
|
1974
|
+
type SetStorageReturns = {
|
|
1975
|
+
errorKeys: string[];
|
|
1876
1976
|
};
|
|
1877
|
-
|
|
1878
|
-
[
|
|
1977
|
+
type GetStorageReturns = {
|
|
1978
|
+
[key: string]: any;
|
|
1879
1979
|
};
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1980
|
+
type StorageInfo = {
|
|
1981
|
+
currentSize: number;
|
|
1982
|
+
limitSize: number;
|
|
1983
|
+
};
|
|
1984
|
+
type RemoveStorageReturns = {
|
|
1985
|
+
errorKeys: string[];
|
|
1986
|
+
};
|
|
1987
|
+
type GetUserInfoReturns = {
|
|
1988
|
+
userInfo: {
|
|
1989
|
+
id: string;
|
|
1990
|
+
name: string;
|
|
1991
|
+
avatar: string;
|
|
1992
|
+
idByOA?: string;
|
|
1993
|
+
isSensitive?: boolean;
|
|
1994
|
+
followedOA?: boolean;
|
|
1885
1995
|
};
|
|
1886
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1887
|
-
get shape(): T;
|
|
1888
|
-
strict(message?: errorUtil.ErrMessage): ZodObject<T, "strict", Catchall>;
|
|
1889
|
-
strip(): ZodObject<T, "strip", Catchall>;
|
|
1890
|
-
passthrough(): ZodObject<T, "passthrough", Catchall>;
|
|
1891
|
-
/**
|
|
1892
|
-
* @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.
|
|
1893
|
-
* If you want to pass through unknown properties, use `.passthrough()` instead.
|
|
1894
|
-
*/
|
|
1895
|
-
nonstrict: () => ZodObject<T, "passthrough", Catchall>;
|
|
1896
|
-
extend<Augmentation extends ZodRawShape>(augmentation: Augmentation): ZodObject<extendShape<T, Augmentation>, UnknownKeys, Catchall>;
|
|
1897
|
-
/**
|
|
1898
|
-
* @deprecated Use `.extend` instead
|
|
1899
|
-
* */
|
|
1900
|
-
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>, objectInputType<{ [k in keyof (Omit<T, keyof Augmentation> & Augmentation)]: (Omit<T, keyof Augmentation> & Augmentation)[k]; }, Catchall>>;
|
|
1901
|
-
/**
|
|
1902
|
-
* Prior to zod@1.0.12 there was a bug in the
|
|
1903
|
-
* inferred type of merged objects. Please
|
|
1904
|
-
* upgrade if you are experiencing issues.
|
|
1905
|
-
*/
|
|
1906
|
-
merge<Incoming extends AnyZodObject, Augmentation extends Incoming["shape"]>(merging: Incoming): ZodObject<extendShape<T, Augmentation>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>;
|
|
1907
|
-
setKey<Key extends string, Schema extends ZodTypeAny>(key: Key, schema: Schema): ZodObject<T & {
|
|
1908
|
-
[k in Key]: Schema;
|
|
1909
|
-
}, UnknownKeys, Catchall>;
|
|
1910
|
-
catchall<Index extends ZodTypeAny>(index: Index): ZodObject<T, UnknownKeys, Index>;
|
|
1911
|
-
pick<Mask extends objectKeyMask<T>>(mask: noUnrecognized<Mask, T>): ZodObject<Pick<T, Extract<keyof T, keyof Mask>>, UnknownKeys, Catchall>;
|
|
1912
|
-
omit<Mask extends objectKeyMask<T>>(mask: noUnrecognized<Mask, objectKeyMask<T>>): ZodObject<Omit<T, keyof Mask>, UnknownKeys, Catchall>;
|
|
1913
|
-
deepPartial(): partialUtil.DeepPartial<this>;
|
|
1914
|
-
partial(): ZodObject<{
|
|
1915
|
-
[k in keyof T]: ZodOptional<T[k]>;
|
|
1916
|
-
}, UnknownKeys, Catchall>;
|
|
1917
|
-
partial<Mask extends objectKeyMask<T>>(mask: noUnrecognized<Mask, objectKeyMask<T>>): ZodObject<objectUtil.noNever<{
|
|
1918
|
-
[k in keyof T]: k extends keyof Mask ? ZodOptional<T[k]> : T[k];
|
|
1919
|
-
}>, UnknownKeys, Catchall>;
|
|
1920
|
-
required(): ZodObject<{
|
|
1921
|
-
[k in keyof T]: deoptional<T[k]>;
|
|
1922
|
-
}, UnknownKeys, Catchall>;
|
|
1923
|
-
required<Mask extends objectKeyMask<T>>(mask: noUnrecognized<Mask, objectKeyMask<T>>): ZodObject<objectUtil.noNever<{
|
|
1924
|
-
[k in keyof T]: k extends keyof Mask ? deoptional<T[k]> : T[k];
|
|
1925
|
-
}>, UnknownKeys, Catchall>;
|
|
1926
|
-
keyof(): ZodEnum<enumUtil.UnionToTupleString<keyof T>>;
|
|
1927
|
-
static create: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k in keyof baseObjectOutputType<T_1>]: baseObjectOutputType<T_1>[k]; }, { [k_2 in keyof objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>[k_2]; }>;
|
|
1928
|
-
static strictCreate: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strict", ZodTypeAny, { [k in keyof baseObjectOutputType<T_1>]: baseObjectOutputType<T_1>[k]; }, { [k_2 in keyof objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>[k_2]; }>;
|
|
1929
|
-
static lazycreate: <T_1 extends ZodRawShape>(shape: () => T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k in keyof baseObjectOutputType<T_1>]: baseObjectOutputType<T_1>[k]; }, { [k_2 in keyof objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_1 in keyof T_1]: T_1[k_1]["_input"]; }>[k_2]; }>;
|
|
1930
|
-
}
|
|
1931
|
-
declare type AnyZodObject = ZodObject<any, any, any>;
|
|
1932
|
-
declare type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>;
|
|
1933
|
-
interface ZodUnionDef<T extends ZodUnionOptions = Readonly<[
|
|
1934
|
-
ZodTypeAny,
|
|
1935
|
-
ZodTypeAny,
|
|
1936
|
-
...ZodTypeAny[]
|
|
1937
|
-
]>> extends ZodTypeDef {
|
|
1938
|
-
options: T;
|
|
1939
|
-
typeName: ZodFirstPartyTypeKind.ZodUnion;
|
|
1940
|
-
}
|
|
1941
|
-
declare class ZodUnion<T extends ZodUnionOptions> extends ZodType<T[number]["_output"], ZodUnionDef<T>, T[number]["_input"]> {
|
|
1942
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1943
|
-
get options(): T;
|
|
1944
|
-
static create: <T_1 extends readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(types: T_1, params?: RawCreateParams) => ZodUnion<T_1>;
|
|
1945
|
-
}
|
|
1946
|
-
interface ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1947
|
-
left: T;
|
|
1948
|
-
right: U;
|
|
1949
|
-
typeName: ZodFirstPartyTypeKind.ZodIntersection;
|
|
1950
|
-
}
|
|
1951
|
-
declare class ZodIntersection<T extends ZodTypeAny, U extends ZodTypeAny> extends ZodType<T["_output"] & U["_output"], ZodIntersectionDef<T, U>, T["_input"] & U["_input"]> {
|
|
1952
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1953
|
-
static create: <T_1 extends ZodTypeAny, U_1 extends ZodTypeAny>(left: T_1, right: U_1, params?: RawCreateParams) => ZodIntersection<T_1, U_1>;
|
|
1954
|
-
}
|
|
1955
|
-
declare type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];
|
|
1956
|
-
declare type AssertArray<T> = T extends any[] ? T : never;
|
|
1957
|
-
declare type OutputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
|
|
1958
|
-
[k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_output"] : never;
|
|
1959
|
-
}>;
|
|
1960
|
-
declare type OutputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...OutputTypeOfTuple<T>, ...Rest["_output"][]] : OutputTypeOfTuple<T>;
|
|
1961
|
-
declare type InputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
|
|
1962
|
-
[k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_input"] : never;
|
|
1963
|
-
}>;
|
|
1964
|
-
declare type InputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...InputTypeOfTuple<T>, ...Rest["_input"][]] : InputTypeOfTuple<T>;
|
|
1965
|
-
interface ZodTupleDef<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends ZodTypeAny | null = null> extends ZodTypeDef {
|
|
1966
|
-
items: T;
|
|
1967
|
-
rest: Rest;
|
|
1968
|
-
typeName: ZodFirstPartyTypeKind.ZodTuple;
|
|
1969
|
-
}
|
|
1970
|
-
declare type AnyZodTuple = ZodTuple<[
|
|
1971
|
-
ZodTypeAny,
|
|
1972
|
-
...ZodTypeAny[]
|
|
1973
|
-
] | [], ZodTypeAny | null>;
|
|
1974
|
-
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>> {
|
|
1975
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1976
|
-
get items(): T;
|
|
1977
|
-
rest<Rest extends ZodTypeAny>(rest: Rest): ZodTuple<T, Rest>;
|
|
1978
|
-
static create: <T_1 extends [] | [ZodTypeAny, ...ZodTypeAny[]]>(schemas: T_1, params?: RawCreateParams) => ZodTuple<T_1, null>;
|
|
1979
|
-
}
|
|
1980
|
-
interface ZodRecordDef<Key extends KeySchema = ZodString, Value extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1981
|
-
valueType: Value;
|
|
1982
|
-
keyType: Key;
|
|
1983
|
-
typeName: ZodFirstPartyTypeKind.ZodRecord;
|
|
1984
|
-
}
|
|
1985
|
-
declare type KeySchema = ZodType<string | number | symbol, any, any>;
|
|
1986
|
-
declare type RecordType<K extends string | number | symbol, V> = [
|
|
1987
|
-
string
|
|
1988
|
-
] extends [K] ? Record<K, V> : [number] extends [K] ? Record<K, V> : [symbol] extends [K] ? Record<K, V> : Partial<Record<K, V>>;
|
|
1989
|
-
declare 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"]>> {
|
|
1990
|
-
get keySchema(): Key;
|
|
1991
|
-
get valueSchema(): Value;
|
|
1992
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1993
|
-
get element(): Value;
|
|
1994
|
-
static create<Value extends ZodTypeAny>(valueType: Value, params?: RawCreateParams): ZodRecord<ZodString, Value>;
|
|
1995
|
-
static create<Keys extends KeySchema, Value extends ZodTypeAny>(keySchema: Keys, valueType: Value, params?: RawCreateParams): ZodRecord<Keys, Value>;
|
|
1996
|
-
}
|
|
1997
|
-
interface ZodFunctionDef<Args extends ZodTuple<any, any> = ZodTuple<any, any>, Returns extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1998
|
-
args: Args;
|
|
1999
|
-
returns: Returns;
|
|
2000
|
-
typeName: ZodFirstPartyTypeKind.ZodFunction;
|
|
2001
|
-
}
|
|
2002
|
-
declare type OuterTypeOfFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> = Args["_input"] extends Array<any> ? (...args: Args["_input"]) => Returns["_output"] : never;
|
|
2003
|
-
declare type InnerTypeOfFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> = Args["_output"] extends Array<any> ? (...args: Args["_output"]) => Returns["_input"] : never;
|
|
2004
|
-
declare class ZodFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> extends ZodType<OuterTypeOfFunction<Args, Returns>, ZodFunctionDef<Args, Returns>, InnerTypeOfFunction<Args, Returns>> {
|
|
2005
|
-
_parse(input: ParseInput): ParseReturnType<any>;
|
|
2006
|
-
parameters(): Args;
|
|
2007
|
-
returnType(): Returns;
|
|
2008
|
-
args<Items extends Parameters<typeof ZodTuple["create"]>[0]>(...items: Items): ZodFunction<ZodTuple<Items, ZodUnknown>, Returns>;
|
|
2009
|
-
returns<NewReturnType extends ZodType<any, any>>(returnType: NewReturnType): ZodFunction<Args, NewReturnType>;
|
|
2010
|
-
implement<F extends InnerTypeOfFunction<Args, Returns>>(func: F): ReturnType<F> extends Returns["_output"] ? (...args: Args["_input"]) => ReturnType<F> : OuterTypeOfFunction<Args, Returns>;
|
|
2011
|
-
strictImplement(func: InnerTypeOfFunction<Args, Returns>): InnerTypeOfFunction<Args, Returns>;
|
|
2012
|
-
validate: <F extends InnerTypeOfFunction<Args, Returns>>(func: F) => ReturnType<F> extends Returns["_output"] ? (...args: Args["_input"]) => ReturnType<F> : OuterTypeOfFunction<Args, Returns>;
|
|
2013
|
-
static create(): ZodFunction<ZodTuple<[], ZodUnknown>, ZodUnknown>;
|
|
2014
|
-
static create<T extends AnyZodTuple = ZodTuple<[], ZodUnknown>>(args: T): ZodFunction<T, ZodUnknown>;
|
|
2015
|
-
static create<T extends AnyZodTuple, U extends ZodTypeAny>(args: T, returns: U): ZodFunction<T, U>;
|
|
2016
|
-
static create<T extends AnyZodTuple = ZodTuple<[], ZodUnknown>, U extends ZodTypeAny = ZodUnknown>(args: T, returns: U, params?: RawCreateParams): ZodFunction<T, U>;
|
|
2017
|
-
}
|
|
2018
|
-
declare type EnumValues = [string, ...string[]];
|
|
2019
|
-
declare type Values<T extends EnumValues> = {
|
|
2020
|
-
[k in T[number]]: k;
|
|
2021
1996
|
};
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
1997
|
+
type GetNetworkTypeReturns = {
|
|
1998
|
+
networkType: NetworkType;
|
|
1999
|
+
};
|
|
2000
|
+
type iBeaconInfo = {
|
|
2001
|
+
/** The iBeacon device broadcast UUID. */
|
|
2002
|
+
uuid: string;
|
|
2003
|
+
/** The iBeacon device primary ID. */
|
|
2004
|
+
major: string;
|
|
2005
|
+
/** The iBeacon device secondary ID. */
|
|
2006
|
+
minor: string;
|
|
2007
|
+
/** The iBeacon device distance. */
|
|
2008
|
+
distance: number;
|
|
2009
|
+
/** The signal strength of the device. */
|
|
2010
|
+
rssi: number;
|
|
2011
|
+
};
|
|
2012
|
+
type GetBeaconDiscoveryReturns = {
|
|
2013
|
+
beacons: Array<iBeaconInfo>;
|
|
2014
|
+
};
|
|
2015
|
+
type ScanQRCodeReturns = {
|
|
2016
|
+
content: string;
|
|
2017
|
+
};
|
|
2018
|
+
type OpenPostFeedReturns = {
|
|
2019
|
+
status: 0 | 1;
|
|
2020
|
+
shareType: 0 | 1 | 2;
|
|
2021
|
+
numberOfUser: number;
|
|
2022
|
+
};
|
|
2023
|
+
type OpenShareSheetReturns = {
|
|
2024
|
+
status: 0 | 2 | 1;
|
|
2025
|
+
shareType: 0 | 2 | 1;
|
|
2026
|
+
numberOfUser: number;
|
|
2027
|
+
};
|
|
2028
|
+
type RequestCameraPermissionReturns = {
|
|
2029
|
+
userAllow: boolean;
|
|
2030
|
+
message: string;
|
|
2031
|
+
};
|
|
2032
|
+
type CheckZaloCameraPermissionReturns = {
|
|
2033
|
+
userAllow: boolean;
|
|
2034
|
+
};
|
|
2035
|
+
type OpenBioAuthenticationReturns = {
|
|
2036
|
+
code: number;
|
|
2037
|
+
message: string;
|
|
2038
|
+
data: {
|
|
2039
|
+
domain: string;
|
|
2040
|
+
code: number;
|
|
2041
|
+
message: string;
|
|
2042
|
+
payToken: string;
|
|
2043
|
+
};
|
|
2044
|
+
};
|
|
2045
|
+
type CheckStateBioAuthenticationReturns = {
|
|
2046
|
+
bioState: string;
|
|
2047
|
+
};
|
|
2048
|
+
type KeepScreenReturns = {
|
|
2049
|
+
success: boolean;
|
|
2050
|
+
};
|
|
2051
|
+
type OpenWebviewReturns = {
|
|
2052
|
+
success: boolean;
|
|
2053
|
+
};
|
|
2054
|
+
type GetAppInfoReturns = {
|
|
2055
|
+
description: string;
|
|
2056
|
+
version: string;
|
|
2057
|
+
name: string;
|
|
2058
|
+
appUrl: string;
|
|
2059
|
+
qrCodeUrl: string;
|
|
2060
|
+
logoUrl?: string;
|
|
2061
|
+
};
|
|
2062
|
+
type GetPhoneNumberReturns = {
|
|
2063
|
+
number?: string;
|
|
2064
|
+
token?: string;
|
|
2065
|
+
};
|
|
2066
|
+
type OpenProfilePickerReturns = {
|
|
2067
|
+
users: {
|
|
2068
|
+
id: string;
|
|
2069
|
+
profile: {
|
|
2070
|
+
name: string;
|
|
2071
|
+
avatar: string;
|
|
2072
|
+
};
|
|
2073
|
+
code: number;
|
|
2074
|
+
message: string;
|
|
2075
|
+
}[];
|
|
2076
|
+
};
|
|
2077
|
+
type OpenMediaPickerReturns = {
|
|
2078
|
+
data: string;
|
|
2079
|
+
};
|
|
2080
|
+
/**
|
|
2081
|
+
* Context info
|
|
2082
|
+
*/
|
|
2083
|
+
type ContextInfo = {
|
|
2084
|
+
type?: string;
|
|
2085
|
+
id?: string;
|
|
2086
|
+
};
|
|
2087
|
+
type GetAuthCodeReturns = {
|
|
2088
|
+
authCode: string;
|
|
2089
|
+
authCodeVerify: string;
|
|
2090
|
+
};
|
|
2091
|
+
type GetZPITokenReturns = {
|
|
2092
|
+
utoken: string;
|
|
2093
|
+
gtoken: string;
|
|
2094
|
+
zpp: string;
|
|
2095
|
+
zpt: string;
|
|
2028
2096
|
};
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
get options(): T;
|
|
2036
|
-
get enum(): Values<T>;
|
|
2037
|
-
get Values(): Values<T>;
|
|
2038
|
-
get Enum(): Values<T>;
|
|
2039
|
-
extract<ToExtract extends readonly [T[number], ...T[number][]]>(values: ToExtract): ZodEnum<Writeable<ToExtract>>;
|
|
2040
|
-
exclude<ToExclude extends readonly [T[number], ...T[number][]]>(values: ToExclude): ZodEnum<typecast<Writeable<FilterEnum<T, ToExclude[number]>>, [string, ...string[]]>>;
|
|
2041
|
-
static create: typeof createZodEnum;
|
|
2042
|
-
}
|
|
2043
|
-
interface ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
2044
|
-
type: T;
|
|
2045
|
-
typeName: ZodFirstPartyTypeKind.ZodPromise;
|
|
2046
|
-
}
|
|
2047
|
-
declare class ZodPromise<T extends ZodTypeAny> extends ZodType<Promise<T["_output"]>, ZodPromiseDef<T>, Promise<T["_input"]>> {
|
|
2048
|
-
unwrap(): T;
|
|
2049
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
2050
|
-
static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodPromise<T_1>;
|
|
2051
|
-
}
|
|
2052
|
-
declare type RefinementEffect<T> = {
|
|
2053
|
-
type: "refinement";
|
|
2054
|
-
refinement: (arg: T, ctx: RefinementCtx) => any;
|
|
2097
|
+
type ChooseImageReturns = {
|
|
2098
|
+
filePaths: Array<string>;
|
|
2099
|
+
tempFiles: Array<{
|
|
2100
|
+
path: string;
|
|
2101
|
+
size: number;
|
|
2102
|
+
}>;
|
|
2055
2103
|
};
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2104
|
+
type CreateOrderReturns = {
|
|
2105
|
+
orderId: string;
|
|
2106
|
+
messageToken?: string;
|
|
2107
|
+
transId?: string;
|
|
2059
2108
|
};
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2109
|
+
type SelectPaymentMethodReturns = {
|
|
2110
|
+
method: string;
|
|
2111
|
+
isCustom?: boolean;
|
|
2112
|
+
displayName?: string;
|
|
2113
|
+
subMethod?: string;
|
|
2114
|
+
logo?: string;
|
|
2115
|
+
};
|
|
2116
|
+
type CheckTransactionReturns = {
|
|
2117
|
+
err: number;
|
|
2118
|
+
msg: string;
|
|
2119
|
+
orderId: string;
|
|
2120
|
+
transId: string;
|
|
2121
|
+
resultCode: number;
|
|
2122
|
+
transTime: string;
|
|
2123
|
+
createdAt: string;
|
|
2124
|
+
path?: string;
|
|
2125
|
+
method: string;
|
|
2126
|
+
isCustom: boolean;
|
|
2127
|
+
};
|
|
2128
|
+
type CreateOrderIAPReturns = {
|
|
2129
|
+
orderId: string;
|
|
2130
|
+
};
|
|
2131
|
+
type ScopeValues = (typeof AUTHEN_SCOPE_VALUES)[number] | (typeof GET_SETTINGS_SCOPE_VALUES)[number];
|
|
2132
|
+
type AuthorizeType<T extends ScopeValues> = Partial<{
|
|
2133
|
+
[key in T]: boolean;
|
|
2134
|
+
}>;
|
|
2135
|
+
type GetSettingReturn = {
|
|
2136
|
+
authSetting: AuthorizeType<(typeof GET_SETTINGS_SCOPE_VALUES)[number]>;
|
|
2137
|
+
};
|
|
2138
|
+
type SaveFileReturns = {
|
|
2139
|
+
savedPath: string;
|
|
2063
2140
|
};
|
|
2064
|
-
declare type Effect<T> = RefinementEffect<T> | TransformEffect<T> | PreprocessEffect<T>;
|
|
2065
|
-
interface ZodEffectsDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
2066
|
-
schema: T;
|
|
2067
|
-
typeName: ZodFirstPartyTypeKind.ZodEffects;
|
|
2068
|
-
effect: Effect<any>;
|
|
2069
|
-
}
|
|
2070
|
-
declare class ZodEffects<T extends ZodTypeAny, Output = output<T>, Input = input<T>> extends ZodType<Output, ZodEffectsDef<T>, Input> {
|
|
2071
|
-
innerType(): T;
|
|
2072
|
-
sourceType(): T;
|
|
2073
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
2074
|
-
static create: <I extends ZodTypeAny>(schema: I, effect: Effect<I["_output"]>, params?: RawCreateParams) => ZodEffects<I, I["_output"], input<I>>;
|
|
2075
|
-
static createWithPreprocess: <I extends ZodTypeAny>(preprocess: (arg: unknown) => unknown, schema: I, params?: RawCreateParams) => ZodEffects<I, I["_output"], unknown>;
|
|
2076
|
-
}
|
|
2077
2141
|
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
declare class ZodOptional<T extends ZodTypeAny> extends ZodType<T["_output"] | undefined, ZodOptionalDef<T>, T["_input"] | undefined> {
|
|
2083
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
2084
|
-
unwrap(): T;
|
|
2085
|
-
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodOptional<T_1>;
|
|
2086
|
-
}
|
|
2087
|
-
interface ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
2088
|
-
innerType: T;
|
|
2089
|
-
typeName: ZodFirstPartyTypeKind.ZodNullable;
|
|
2090
|
-
}
|
|
2091
|
-
declare class ZodNullable<T extends ZodTypeAny> extends ZodType<T["_output"] | null, ZodNullableDef<T>, T["_input"] | null> {
|
|
2092
|
-
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
2093
|
-
unwrap(): T;
|
|
2094
|
-
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodNullable<T_1>;
|
|
2095
|
-
}
|
|
2096
|
-
interface ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
2097
|
-
innerType: T;
|
|
2098
|
-
defaultValue: () => util.noUndefined<T["_input"]>;
|
|
2099
|
-
typeName: ZodFirstPartyTypeKind.ZodDefault;
|
|
2142
|
+
declare enum CameraEvents {
|
|
2143
|
+
OnFrameCallback = "h5.event.camera.frame",
|
|
2144
|
+
OnStartCallback = "h5.event.camera.start",
|
|
2145
|
+
OnStopCallback = "h5.event.camera.stop"
|
|
2100
2146
|
}
|
|
2101
|
-
declare
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
|
|
2105
|
-
errorMap?: ZodErrorMap | undefined;
|
|
2106
|
-
invalid_type_error?: string | undefined;
|
|
2107
|
-
required_error?: string | undefined;
|
|
2108
|
-
description?: string | undefined;
|
|
2109
|
-
} & {
|
|
2110
|
-
default: T_1["_input"] | (() => util.noUndefined<T_1["_input"]>);
|
|
2111
|
-
}) => ZodDefault<T_1>;
|
|
2147
|
+
declare enum FacingMode {
|
|
2148
|
+
FRONT = "user",
|
|
2149
|
+
BACK = "environment"
|
|
2112
2150
|
}
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2151
|
+
declare enum PhotoFormat {
|
|
2152
|
+
WEBP = "image/webp",
|
|
2153
|
+
PNG = "image/png",
|
|
2154
|
+
JPEG = "image/jpeg"
|
|
2117
2155
|
}
|
|
2118
|
-
declare
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
errorMap?: ZodErrorMap | undefined;
|
|
2123
|
-
invalid_type_error?: string | undefined;
|
|
2124
|
-
required_error?: string | undefined;
|
|
2125
|
-
description?: string | undefined;
|
|
2126
|
-
} & {
|
|
2127
|
-
catch: T_1["_output"] | (() => T_1["_output"]);
|
|
2128
|
-
}) => ZodCatch<T_1>;
|
|
2156
|
+
declare enum PhotoQuality {
|
|
2157
|
+
HIGH = "high",
|
|
2158
|
+
NORMAL = "normal",
|
|
2159
|
+
LOW = "low"
|
|
2129
2160
|
}
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2161
|
+
declare enum StreamType {
|
|
2162
|
+
VIDEO = "video",
|
|
2163
|
+
AUDIO = "audio"
|
|
2133
2164
|
}
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2165
|
+
type PhotoFrame = {
|
|
2166
|
+
data: string;
|
|
2167
|
+
width: number;
|
|
2168
|
+
height: number;
|
|
2169
|
+
};
|
|
2170
|
+
type MediaDevice = {
|
|
2171
|
+
kind: string;
|
|
2172
|
+
label: string;
|
|
2173
|
+
deviceId: string;
|
|
2174
|
+
};
|
|
2175
|
+
type MediaConstraints = {
|
|
2176
|
+
width?: number;
|
|
2177
|
+
height?: number;
|
|
2178
|
+
facingMode?: FacingMode;
|
|
2179
|
+
deviceId?: string;
|
|
2180
|
+
audio?: boolean;
|
|
2181
|
+
video?: boolean;
|
|
2182
|
+
mirrored?: boolean;
|
|
2183
|
+
};
|
|
2184
|
+
type PhotoConstraint = {
|
|
2185
|
+
width?: number;
|
|
2186
|
+
height?: number;
|
|
2187
|
+
format?: PhotoFormat;
|
|
2188
|
+
quality?: PhotoQuality;
|
|
2189
|
+
mirrored?: boolean;
|
|
2190
|
+
useVideoSourceSize?: boolean;
|
|
2191
|
+
minScreenshotWidth?: number;
|
|
2192
|
+
minScreenshotHeight?: number;
|
|
2139
2193
|
};
|
|
2140
|
-
declare class ZodBranded<T extends ZodTypeAny, B extends string | number | symbol> extends ZodType<T["_output"] & BRAND<B>, ZodBrandedDef<T>, T["_input"]> {
|
|
2141
|
-
_parse(input: ParseInput): ParseReturnType<any>;
|
|
2142
|
-
unwrap(): T;
|
|
2143
|
-
}
|
|
2144
|
-
interface ZodPipelineDef<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodTypeDef {
|
|
2145
|
-
in: A;
|
|
2146
|
-
out: B;
|
|
2147
|
-
typeName: ZodFirstPartyTypeKind.ZodPipeline;
|
|
2148
|
-
}
|
|
2149
|
-
declare class ZodPipeline<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodType<B["_output"], ZodPipelineDef<A, B>, A["_input"]> {
|
|
2150
|
-
_parse(input: ParseInput): ParseReturnType<any>;
|
|
2151
|
-
static create<A extends ZodTypeAny, B extends ZodTypeAny>(a: A, b: B): ZodPipeline<A, B>;
|
|
2152
|
-
}
|
|
2153
|
-
declare enum ZodFirstPartyTypeKind {
|
|
2154
|
-
ZodString = "ZodString",
|
|
2155
|
-
ZodNumber = "ZodNumber",
|
|
2156
|
-
ZodNaN = "ZodNaN",
|
|
2157
|
-
ZodBigInt = "ZodBigInt",
|
|
2158
|
-
ZodBoolean = "ZodBoolean",
|
|
2159
|
-
ZodDate = "ZodDate",
|
|
2160
|
-
ZodSymbol = "ZodSymbol",
|
|
2161
|
-
ZodUndefined = "ZodUndefined",
|
|
2162
|
-
ZodNull = "ZodNull",
|
|
2163
|
-
ZodAny = "ZodAny",
|
|
2164
|
-
ZodUnknown = "ZodUnknown",
|
|
2165
|
-
ZodNever = "ZodNever",
|
|
2166
|
-
ZodVoid = "ZodVoid",
|
|
2167
|
-
ZodArray = "ZodArray",
|
|
2168
|
-
ZodObject = "ZodObject",
|
|
2169
|
-
ZodUnion = "ZodUnion",
|
|
2170
|
-
ZodDiscriminatedUnion = "ZodDiscriminatedUnion",
|
|
2171
|
-
ZodIntersection = "ZodIntersection",
|
|
2172
|
-
ZodTuple = "ZodTuple",
|
|
2173
|
-
ZodRecord = "ZodRecord",
|
|
2174
|
-
ZodMap = "ZodMap",
|
|
2175
|
-
ZodSet = "ZodSet",
|
|
2176
|
-
ZodFunction = "ZodFunction",
|
|
2177
|
-
ZodLazy = "ZodLazy",
|
|
2178
|
-
ZodLiteral = "ZodLiteral",
|
|
2179
|
-
ZodEnum = "ZodEnum",
|
|
2180
|
-
ZodEffects = "ZodEffects",
|
|
2181
|
-
ZodNativeEnum = "ZodNativeEnum",
|
|
2182
|
-
ZodOptional = "ZodOptional",
|
|
2183
|
-
ZodNullable = "ZodNullable",
|
|
2184
|
-
ZodDefault = "ZodDefault",
|
|
2185
|
-
ZodCatch = "ZodCatch",
|
|
2186
|
-
ZodPromise = "ZodPromise",
|
|
2187
|
-
ZodBranded = "ZodBranded",
|
|
2188
|
-
ZodPipeline = "ZodPipeline"
|
|
2189
|
-
}
|
|
2190
|
-
|
|
2191
|
-
declare const logEventArgs: ZodOptional<ZodObject<{
|
|
2192
|
-
eventType: ZodEnum<["APP_INITIALIZING", "APP_READY"]>;
|
|
2193
|
-
payload: ZodAny;
|
|
2194
|
-
}, "strip", ZodTypeAny, {
|
|
2195
|
-
payload?: any;
|
|
2196
|
-
eventType: "APP_INITIALIZING" | "APP_READY";
|
|
2197
|
-
}, {
|
|
2198
|
-
payload?: any;
|
|
2199
|
-
eventType: "APP_INITIALIZING" | "APP_READY";
|
|
2200
|
-
}>>[];
|
|
2201
|
-
declare function logEvent(args: AsyncVoidCallback & TypeOf<(typeof logEventArgs)[0]>): Promise<void>;
|
|
2202
2194
|
|
|
2203
2195
|
declare function getStorageInfoSync(): StorageInfo;
|
|
2204
2196
|
|