zmp-sdk 2.24.0 → 2.25.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +18 -0
- package/apis/_virtual/_commonjsHelpers.js +1 -0
- package/apis/apis/checkStateBioAuthentication.js +1 -0
- package/apis/apis/checkTransaction.js +1 -0
- package/apis/apis/chooseImage.js +1 -0
- package/apis/apis/clearStorage.js +1 -0
- package/apis/apis/closeApp.js +1 -0
- package/apis/apis/closeLoading.js +1 -0
- package/apis/apis/connectWifi.js +1 -0
- package/apis/apis/createOrder.js +1 -0
- package/apis/apis/createShortcut.js +1 -0
- package/apis/apis/events.js +1 -0
- package/apis/apis/followOA.js +1 -0
- package/apis/apis/getAccessToken.js +1 -0
- package/apis/apis/getAppInfo.js +1 -0
- package/apis/apis/getAuthCode.js +1 -0
- package/apis/apis/getBeacons.js +1 -0
- package/apis/apis/getContext.js +1 -0
- package/apis/apis/getContextAsync.js +1 -0
- package/apis/apis/getDeviceId.js +1 -0
- package/apis/apis/getDeviceIdAsync.js +1 -0
- package/apis/apis/getLocation.js +1 -0
- package/apis/apis/getNetworkType.js +1 -0
- package/apis/apis/getPhoneNumber.js +1 -0
- package/apis/apis/getRouteParams.js +1 -0
- package/apis/apis/getShareableLink.js +1 -0
- package/apis/apis/getStorage.js +1 -0
- package/apis/apis/getStorageInfo.js +1 -0
- package/apis/apis/getSystemInfo.js +1 -0
- package/apis/apis/getUserInfo.js +1 -0
- package/apis/apis/getVersion.js +1 -0
- package/apis/apis/getZPIToken.js +1 -0
- package/apis/apis/hideKeyboard.js +1 -0
- package/apis/apis/keepScreen.js +1 -0
- package/apis/apis/login.js +1 -0
- package/apis/apis/offConfirmToExit.js +1 -0
- package/apis/apis/offKeepScreen.js +1 -0
- package/apis/apis/onCallbackData.js +1 -0
- package/apis/apis/onConfirmToExit.js +1 -0
- package/apis/apis/onKeepScreen.js +1 -0
- package/apis/apis/onNetworkStatusChange.js +1 -0
- package/apis/apis/openBioAuthentication.js +1 -0
- package/apis/apis/openChat.js +1 -0
- package/apis/apis/openMediaPicker.js +1 -0
- package/apis/apis/openMiniApp.js +1 -0
- package/apis/apis/openOutApp.js +1 -0
- package/apis/apis/openPhone.js +1 -0
- package/apis/apis/openPostFeed.js +1 -0
- package/apis/apis/openProfile.js +1 -0
- package/apis/apis/openProfilePicker.js +1 -0
- package/apis/apis/openSMS.js +1 -0
- package/apis/apis/openShareSheet.js +1 -0
- package/apis/apis/openWebview.js +1 -0
- package/apis/apis/removeStorage.js +1 -0
- package/apis/apis/requestCameraPermission.js +1 -0
- package/apis/apis/requestUpdateZalo.js +1 -0
- package/apis/apis/saveImageToGallery.js +1 -0
- package/apis/apis/scanQRCode.js +1 -0
- package/apis/apis/sendDataToPreviousMiniApp.js +1 -0
- package/apis/apis/setAccessToken.js +1 -0
- package/apis/apis/setNavigationBarColor.js +1 -0
- package/apis/apis/setNavigationBarLeftButton.js +1 -0
- package/apis/apis/setNavigationBarTitle.js +1 -0
- package/apis/apis/setStorage.js +1 -0
- package/apis/apis/showToast.js +1 -0
- package/apis/apis/startBeaconDiscovery.js +1 -0
- package/apis/apis/stopBeaconDiscovery.js +1 -0
- package/apis/apis/unfollowOA.js +1 -0
- package/apis/apis/vibrate.js +1 -0
- package/apis/apis/viewOAQr.js +1 -0
- package/apis/appEnv/getEnv.js +1 -0
- package/apis/appEnv/index.js +1 -0
- package/apis/common/apis/general/checkStateBioAuthentication.js +1 -0
- package/apis/common/apis/general/closeApp.js +1 -0
- package/apis/common/apis/general/closeLoading.js +1 -0
- package/apis/common/apis/general/connectWifi.js +1 -0
- package/apis/common/apis/general/createAndroidShortcut.js +1 -0
- package/apis/common/apis/general/followOA.js +1 -0
- package/apis/common/apis/general/getAppInfo.js +1 -0
- package/apis/common/apis/general/getBeacons.js +1 -0
- package/apis/common/apis/general/getLocation.js +1 -0
- package/apis/common/apis/general/getNetworkType.js +1 -0
- package/apis/common/apis/general/getPhoneNumber.js +1 -0
- package/apis/common/apis/general/getRouteParams.js +1 -0
- package/apis/common/apis/general/getSystemInfo.js +1 -0
- package/apis/common/apis/general/getUserInfo.js +1 -0
- package/apis/common/apis/general/getZMPShareInfo.js +1 -0
- package/apis/common/apis/general/hideKeyboard.js +1 -0
- package/apis/common/apis/general/keepScreen.js +1 -0
- package/apis/common/apis/general/onCallbackData.js +1 -0
- package/apis/common/apis/general/onNetworkStatusChange.js +1 -0
- package/apis/common/apis/general/openBioAuthentication.js +1 -0
- package/apis/common/apis/general/openChat.js +1 -0
- package/apis/common/apis/general/openMediaPicker.js +1 -0
- package/apis/common/apis/general/openMiniApp.js +1 -0
- package/apis/common/apis/general/openOutApp.js +1 -0
- package/apis/common/apis/general/openPhone.js +1 -0
- package/apis/common/apis/general/openPostFeed.js +1 -0
- package/apis/common/apis/general/openProfile.js +1 -0
- package/apis/common/apis/general/openProfilePicker.js +1 -0
- package/apis/common/apis/general/openSMS.js +1 -0
- package/apis/common/apis/general/openShareSheet.js +1 -0
- package/apis/common/apis/general/openWebview.js +1 -0
- package/apis/common/apis/general/payment/checkTransaction.js +1 -0
- package/apis/common/apis/general/payment/createOrder.js +1 -0
- package/apis/common/apis/general/requestCameraPermission.js +1 -0
- package/apis/common/apis/general/saveImageToGallery.js +1 -0
- package/apis/common/apis/general/scanQRCode.js +1 -0
- package/apis/common/apis/general/sendDataToPreviousMiniApp.js +1 -0
- package/apis/common/apis/general/showToast.js +1 -0
- package/apis/common/apis/general/startBeaconDiscovery.js +1 -0
- package/apis/common/apis/general/stopBeaconDiscovery.js +1 -0
- package/apis/common/apis/general/storage/index.js +1 -0
- package/apis/common/apis/general/storage/localStorage.js +1 -0
- package/apis/common/apis/general/storage/nativeStorage.js +1 -0
- package/apis/common/apis/general/unfollowOA.js +1 -0
- package/apis/common/apis/general/vibrate.js +1 -0
- package/apis/common/apis/general/view.js +1 -0
- package/apis/common/apis/general/viewOAQr.js +1 -0
- package/apis/common/call/index.js +1 -0
- package/apis/common/call/zaloNative.js +1 -0
- package/apis/common/eventEmitter.js +1 -0
- package/apis/common/logger.js +1 -0
- package/apis/common/notFound.js +1 -0
- package/apis/common/token.js +1 -0
- package/apis/common/utils.js +1 -0
- package/apis/constants.js +1 -0
- package/apis/external/@swc/helpers/src/_array_like_to_array.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_array_with_holes.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_array_without_holes.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_assert_this_initialized.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_async_to_generator.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_check_private_redeclaration.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_class_apply_descriptor_get.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_class_apply_descriptor_set.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_class_call_check.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_class_extract_field_descriptor.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_class_private_field_get.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_class_private_field_init.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_class_private_field_set.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_create_class.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_create_super.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_define_property.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_get.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_get_prototype_of.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_inherits.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_instanceof.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_is_native_reflect_construct.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_iterable_to_array.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_non_iterable_rest.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_non_iterable_spread.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_object_spread.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_object_spread_props.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_possible_constructor_return.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_set_prototype_of.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_sliced_to_array.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_super_prop_base.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_to_consumable_array.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_type_of.mjs.js +1 -0
- package/apis/external/@swc/helpers/src/_unsupported_iterable_to_array.mjs.js +1 -0
- package/apis/external/eventemitter3/index.js +1 -0
- package/apis/external/tslib/tslib.es6.js +1 -0
- package/apis/external/zod/lib/index.mjs.js +1 -0
- package/apis/index.d.ts +1958 -0
- package/apis/index.js +1 -0
- package/apis/package.json.js +1 -0
- package/apis/types/enum.js +1 -0
- package/apis/utils/common.js +1 -0
- package/apis/utils/debug.js +1 -0
- package/apis/utils/decorator.js +1 -0
- package/apis/utils/errorHandler.js +1 -0
- package/apis/utils/lodash.js +1 -0
- package/apis/utils/query-string.js +1 -0
- package/apis/utils/request.js +1 -0
- package/apis/utils/response.js +1 -0
- package/apis/utils/silent.js +1 -0
- package/browser.min.js +9 -0
- package/index.d.ts +1966 -0
- package/index.es.js +9 -0
- package/index.js +9 -0
- package/index.umd.js +23 -0
- package/package.json +13 -84
- package/CHANGELOG.json +0 -15228
- package/README.git.md +0 -37
- package/README.md +0 -424
- package/changelog/changelog-setup.js +0 -20
- package/changelog/changelog-template.hbs +0 -30
- package/changelog/dist/changelog-setup.dev.js +0 -24
- package/dist/browser.min.js +0 -8359
- package/dist/index.es.js +0 -9713
- package/dist/index.js +0 -16
- package/dist/index.umd.js +0 -15
- package/dist/types/src/apis/index.d.ts +0 -136
- package/dist/types/src/apis/payment.d.ts +0 -33
- package/dist/types/src/browser.d.ts +0 -1
- package/dist/types/src/constants.d.ts +0 -168
- package/dist/types/src/decorator.d.ts +0 -22
- package/dist/types/src/errorHandler.d.ts +0 -12
- package/dist/types/src/event-emitter.d.ts +0 -10
- package/dist/types/src/index.d.ts +0 -11
- package/dist/types/src/services/background.d.ts +0 -26
- package/dist/types/src/services/basic.d.ts +0 -32
- package/dist/types/src/services/dataCaching.d.ts +0 -92
- package/dist/types/src/services/device.d.ts +0 -329
- package/dist/types/src/services/location.d.ts +0 -30
- package/dist/types/src/services/media.d.ts +0 -23
- package/dist/types/src/services/mock-mp-service.d.ts +0 -95
- package/dist/types/src/services/mock-payment-service.d.ts +0 -11
- package/dist/types/src/services/navigationBar.d.ts +0 -90
- package/dist/types/src/services/openApi.d.ts +0 -30
- package/dist/types/src/services/payment.d.ts +0 -27
- package/dist/types/src/services/routing.d.ts +0 -32
- package/dist/types/src/services/window.d.ts +0 -40
- package/dist/types/src/services/zalo-mp-service.d.ts +0 -105
- package/dist/types/src/services/zalo.d.ts +0 -114
- package/dist/types/src/storage/index.d.ts +0 -28
- package/dist/types/src/storage/localStorage.d.ts +0 -23
- package/dist/types/src/storage/nativeStorage.d.ts +0 -16
- package/dist/types/src/storage/storage.d.ts +0 -18
- package/dist/types/src/types/callbackData.d.ts +0 -198
- package/dist/types/src/types/entity.d.ts +0 -50
- package/dist/types/src/types/enum.d.ts +0 -70
- package/dist/types/src/types/inputData.d.ts +0 -495
- package/dist/types/src/types/interface.d.ts +0 -95
- package/dist/types/src/utils/common.d.ts +0 -93
- package/dist/types/src/utils/cookie.d.ts +0 -2
- package/dist/types/src/utils/debug.d.ts +0 -1
- package/dist/types/src/utils/lodash.d.ts +0 -40
- package/dist/types/src/utils/logger.d.ts +0 -11
- package/dist/types/src/utils/qr.d.ts +0 -1
- package/dist/types/src/utils/query-string.d.ts +0 -15
- package/dist/types/src/utils/request.d.ts +0 -5
- package/dist/types/src/utils/response.d.ts +0 -17
- package/dist/types/src/zaloJsBridge.d.ts +0 -48
package/apis/index.d.ts
ADDED
|
@@ -0,0 +1,1958 @@
|
|
|
1
|
+
import { MPEEmitter } from '@common/eventEmitter';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {"none" | "wifi" | "cellular" | "unknown"} NetworkType
|
|
5
|
+
*/
|
|
6
|
+
declare enum NetworkType {
|
|
7
|
+
/** No Network */
|
|
8
|
+
none = "none",
|
|
9
|
+
/** Wi-Fi Network */
|
|
10
|
+
wifi = "wifi",
|
|
11
|
+
/** Cellular Network (2g/3g/4g) */
|
|
12
|
+
cellular = "cellular",
|
|
13
|
+
/** Uncommon network types for Android */
|
|
14
|
+
unknown = "unknown"
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare type Primitive = string | number | symbol | bigint | boolean | null | undefined;
|
|
18
|
+
|
|
19
|
+
declare namespace util {
|
|
20
|
+
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
|
|
21
|
+
export const assertEqual: <A, B>(val: AssertEqual<A, B>) => AssertEqual<A, B>;
|
|
22
|
+
export function assertIs<T>(_arg: T): void;
|
|
23
|
+
export function assertNever(_x: never): never;
|
|
24
|
+
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
25
|
+
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
|
|
26
|
+
export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
27
|
+
export const arrayToEnum: <T extends string, U extends [T, ...T[]]>(items: U) => { [k in U[number]]: k; };
|
|
28
|
+
export const getValidEnumValues: (obj: any) => any[];
|
|
29
|
+
export const objectValues: (obj: any) => any[];
|
|
30
|
+
export const objectKeys: ObjectConstructor["keys"];
|
|
31
|
+
export const find: <T>(arr: T[], checker: (arg: T) => any) => T | undefined;
|
|
32
|
+
export type identity<T> = T;
|
|
33
|
+
export type flatten<T> = identity<{
|
|
34
|
+
[k in keyof T]: T[k];
|
|
35
|
+
}>;
|
|
36
|
+
export type noUndefined<T> = T extends undefined ? never : T;
|
|
37
|
+
export const isInteger: NumberConstructor["isInteger"];
|
|
38
|
+
export function joinValues<T extends any[]>(array: T, separator?: string): string;
|
|
39
|
+
export const jsonStringifyReplacer: (_: string, value: any) => any;
|
|
40
|
+
export {};
|
|
41
|
+
}
|
|
42
|
+
declare const ZodParsedType: {
|
|
43
|
+
function: "function";
|
|
44
|
+
number: "number";
|
|
45
|
+
string: "string";
|
|
46
|
+
nan: "nan";
|
|
47
|
+
integer: "integer";
|
|
48
|
+
float: "float";
|
|
49
|
+
boolean: "boolean";
|
|
50
|
+
date: "date";
|
|
51
|
+
bigint: "bigint";
|
|
52
|
+
symbol: "symbol";
|
|
53
|
+
undefined: "undefined";
|
|
54
|
+
null: "null";
|
|
55
|
+
array: "array";
|
|
56
|
+
object: "object";
|
|
57
|
+
unknown: "unknown";
|
|
58
|
+
promise: "promise";
|
|
59
|
+
void: "void";
|
|
60
|
+
never: "never";
|
|
61
|
+
map: "map";
|
|
62
|
+
set: "set";
|
|
63
|
+
};
|
|
64
|
+
declare type ZodParsedType = keyof typeof ZodParsedType;
|
|
65
|
+
|
|
66
|
+
declare type allKeys<T> = T extends any ? keyof T : never;
|
|
67
|
+
declare type typeToFlattenedError<T, U = string> = {
|
|
68
|
+
formErrors: U[];
|
|
69
|
+
fieldErrors: {
|
|
70
|
+
[P in allKeys<T>]?: U[];
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
declare const ZodIssueCode: {
|
|
74
|
+
invalid_type: "invalid_type";
|
|
75
|
+
invalid_literal: "invalid_literal";
|
|
76
|
+
custom: "custom";
|
|
77
|
+
invalid_union: "invalid_union";
|
|
78
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
79
|
+
invalid_enum_value: "invalid_enum_value";
|
|
80
|
+
unrecognized_keys: "unrecognized_keys";
|
|
81
|
+
invalid_arguments: "invalid_arguments";
|
|
82
|
+
invalid_return_type: "invalid_return_type";
|
|
83
|
+
invalid_date: "invalid_date";
|
|
84
|
+
invalid_string: "invalid_string";
|
|
85
|
+
too_small: "too_small";
|
|
86
|
+
too_big: "too_big";
|
|
87
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
88
|
+
not_multiple_of: "not_multiple_of";
|
|
89
|
+
not_finite: "not_finite";
|
|
90
|
+
};
|
|
91
|
+
declare type ZodIssueCode = keyof typeof ZodIssueCode;
|
|
92
|
+
declare type ZodIssueBase = {
|
|
93
|
+
path: (string | number)[];
|
|
94
|
+
message?: string;
|
|
95
|
+
};
|
|
96
|
+
interface ZodInvalidTypeIssue extends ZodIssueBase {
|
|
97
|
+
code: typeof ZodIssueCode.invalid_type;
|
|
98
|
+
expected: ZodParsedType;
|
|
99
|
+
received: ZodParsedType;
|
|
100
|
+
}
|
|
101
|
+
interface ZodInvalidLiteralIssue extends ZodIssueBase {
|
|
102
|
+
code: typeof ZodIssueCode.invalid_literal;
|
|
103
|
+
expected: unknown;
|
|
104
|
+
received: unknown;
|
|
105
|
+
}
|
|
106
|
+
interface ZodUnrecognizedKeysIssue extends ZodIssueBase {
|
|
107
|
+
code: typeof ZodIssueCode.unrecognized_keys;
|
|
108
|
+
keys: string[];
|
|
109
|
+
}
|
|
110
|
+
interface ZodInvalidUnionIssue extends ZodIssueBase {
|
|
111
|
+
code: typeof ZodIssueCode.invalid_union;
|
|
112
|
+
unionErrors: ZodError[];
|
|
113
|
+
}
|
|
114
|
+
interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {
|
|
115
|
+
code: typeof ZodIssueCode.invalid_union_discriminator;
|
|
116
|
+
options: Primitive[];
|
|
117
|
+
}
|
|
118
|
+
interface ZodInvalidEnumValueIssue extends ZodIssueBase {
|
|
119
|
+
received: string | number;
|
|
120
|
+
code: typeof ZodIssueCode.invalid_enum_value;
|
|
121
|
+
options: (string | number)[];
|
|
122
|
+
}
|
|
123
|
+
interface ZodInvalidArgumentsIssue extends ZodIssueBase {
|
|
124
|
+
code: typeof ZodIssueCode.invalid_arguments;
|
|
125
|
+
argumentsError: ZodError;
|
|
126
|
+
}
|
|
127
|
+
interface ZodInvalidReturnTypeIssue extends ZodIssueBase {
|
|
128
|
+
code: typeof ZodIssueCode.invalid_return_type;
|
|
129
|
+
returnTypeError: ZodError;
|
|
130
|
+
}
|
|
131
|
+
interface ZodInvalidDateIssue extends ZodIssueBase {
|
|
132
|
+
code: typeof ZodIssueCode.invalid_date;
|
|
133
|
+
}
|
|
134
|
+
declare type StringValidation = "email" | "url" | "uuid" | "regex" | "cuid" | "cuid2" | "datetime" | {
|
|
135
|
+
startsWith: string;
|
|
136
|
+
} | {
|
|
137
|
+
endsWith: string;
|
|
138
|
+
};
|
|
139
|
+
interface ZodInvalidStringIssue extends ZodIssueBase {
|
|
140
|
+
code: typeof ZodIssueCode.invalid_string;
|
|
141
|
+
validation: StringValidation;
|
|
142
|
+
}
|
|
143
|
+
interface ZodTooSmallIssue extends ZodIssueBase {
|
|
144
|
+
code: typeof ZodIssueCode.too_small;
|
|
145
|
+
minimum: number;
|
|
146
|
+
inclusive: boolean;
|
|
147
|
+
exact?: boolean;
|
|
148
|
+
type: "array" | "string" | "number" | "set" | "date";
|
|
149
|
+
}
|
|
150
|
+
interface ZodTooBigIssue extends ZodIssueBase {
|
|
151
|
+
code: typeof ZodIssueCode.too_big;
|
|
152
|
+
maximum: number;
|
|
153
|
+
inclusive: boolean;
|
|
154
|
+
exact?: boolean;
|
|
155
|
+
type: "array" | "string" | "number" | "set" | "date";
|
|
156
|
+
}
|
|
157
|
+
interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
|
|
158
|
+
code: typeof ZodIssueCode.invalid_intersection_types;
|
|
159
|
+
}
|
|
160
|
+
interface ZodNotMultipleOfIssue extends ZodIssueBase {
|
|
161
|
+
code: typeof ZodIssueCode.not_multiple_of;
|
|
162
|
+
multipleOf: number;
|
|
163
|
+
}
|
|
164
|
+
interface ZodNotFiniteIssue extends ZodIssueBase {
|
|
165
|
+
code: typeof ZodIssueCode.not_finite;
|
|
166
|
+
}
|
|
167
|
+
interface ZodCustomIssue extends ZodIssueBase {
|
|
168
|
+
code: typeof ZodIssueCode.custom;
|
|
169
|
+
params?: {
|
|
170
|
+
[k: string]: any;
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
declare type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue;
|
|
174
|
+
declare type ZodIssue = ZodIssueOptionalMessage & {
|
|
175
|
+
fatal?: boolean;
|
|
176
|
+
message: string;
|
|
177
|
+
};
|
|
178
|
+
declare type ZodFormattedError<T, U = string> = {
|
|
179
|
+
_errors: U[];
|
|
180
|
+
} & (NonNullable<T> extends [any, ...any[]] ? {
|
|
181
|
+
[K in keyof NonNullable<T>]?: ZodFormattedError<NonNullable<T>[K], U>;
|
|
182
|
+
} : NonNullable<T> extends any[] ? {
|
|
183
|
+
[k: number]: ZodFormattedError<NonNullable<T>[number], U>;
|
|
184
|
+
} : NonNullable<T> extends object ? {
|
|
185
|
+
[K in keyof NonNullable<T>]?: ZodFormattedError<NonNullable<T>[K], U>;
|
|
186
|
+
} : unknown);
|
|
187
|
+
declare class ZodError<T = any> extends Error {
|
|
188
|
+
issues: ZodIssue[];
|
|
189
|
+
get errors(): ZodIssue[];
|
|
190
|
+
constructor(issues: ZodIssue[]);
|
|
191
|
+
format(): ZodFormattedError<T>;
|
|
192
|
+
format<U>(mapper: (issue: ZodIssue) => U): ZodFormattedError<T, U>;
|
|
193
|
+
static create: (issues: ZodIssue[]) => ZodError<any>;
|
|
194
|
+
toString(): string;
|
|
195
|
+
get message(): string;
|
|
196
|
+
get isEmpty(): boolean;
|
|
197
|
+
addIssue: (sub: ZodIssue) => void;
|
|
198
|
+
addIssues: (subs?: ZodIssue[]) => void;
|
|
199
|
+
flatten(): typeToFlattenedError<T>;
|
|
200
|
+
flatten<U>(mapper?: (issue: ZodIssue) => U): typeToFlattenedError<T, U>;
|
|
201
|
+
get formErrors(): typeToFlattenedError<T, string>;
|
|
202
|
+
}
|
|
203
|
+
declare type stripPath<T extends object> = T extends any ? util.OmitKeys<T, "path"> : never;
|
|
204
|
+
declare type IssueData = stripPath<ZodIssueOptionalMessage> & {
|
|
205
|
+
path?: (string | number)[];
|
|
206
|
+
fatal?: boolean;
|
|
207
|
+
};
|
|
208
|
+
declare type ErrorMapCtx = {
|
|
209
|
+
defaultError: string;
|
|
210
|
+
data: any;
|
|
211
|
+
};
|
|
212
|
+
declare type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => {
|
|
213
|
+
message: string;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
declare type ParseParams = {
|
|
217
|
+
path: (string | number)[];
|
|
218
|
+
errorMap: ZodErrorMap;
|
|
219
|
+
async: boolean;
|
|
220
|
+
};
|
|
221
|
+
declare type ParsePathComponent = string | number;
|
|
222
|
+
declare type ParsePath = ParsePathComponent[];
|
|
223
|
+
interface ParseContext {
|
|
224
|
+
readonly common: {
|
|
225
|
+
readonly issues: ZodIssue[];
|
|
226
|
+
readonly contextualErrorMap?: ZodErrorMap;
|
|
227
|
+
readonly async: boolean;
|
|
228
|
+
};
|
|
229
|
+
readonly path: ParsePath;
|
|
230
|
+
readonly schemaErrorMap?: ZodErrorMap;
|
|
231
|
+
readonly parent: ParseContext | null;
|
|
232
|
+
readonly data: any;
|
|
233
|
+
readonly parsedType: ZodParsedType;
|
|
234
|
+
}
|
|
235
|
+
declare type ParseInput = {
|
|
236
|
+
data: any;
|
|
237
|
+
path: (string | number)[];
|
|
238
|
+
parent: ParseContext;
|
|
239
|
+
};
|
|
240
|
+
declare class ParseStatus {
|
|
241
|
+
value: "aborted" | "dirty" | "valid";
|
|
242
|
+
dirty(): void;
|
|
243
|
+
abort(): void;
|
|
244
|
+
static mergeArray(status: ParseStatus, results: SyncParseReturnType<any>[]): SyncParseReturnType;
|
|
245
|
+
static mergeObjectAsync(status: ParseStatus, pairs: {
|
|
246
|
+
key: ParseReturnType<any>;
|
|
247
|
+
value: ParseReturnType<any>;
|
|
248
|
+
}[]): Promise<SyncParseReturnType<any>>;
|
|
249
|
+
static mergeObjectSync(status: ParseStatus, pairs: {
|
|
250
|
+
key: SyncParseReturnType<any>;
|
|
251
|
+
value: SyncParseReturnType<any>;
|
|
252
|
+
alwaysSet?: boolean;
|
|
253
|
+
}[]): SyncParseReturnType;
|
|
254
|
+
}
|
|
255
|
+
declare type INVALID = {
|
|
256
|
+
status: "aborted";
|
|
257
|
+
};
|
|
258
|
+
declare const INVALID: INVALID;
|
|
259
|
+
declare type DIRTY<T> = {
|
|
260
|
+
status: "dirty";
|
|
261
|
+
value: T;
|
|
262
|
+
};
|
|
263
|
+
declare const DIRTY: <T>(value: T) => DIRTY<T>;
|
|
264
|
+
declare type OK<T> = {
|
|
265
|
+
status: "valid";
|
|
266
|
+
value: T;
|
|
267
|
+
};
|
|
268
|
+
declare const OK: <T>(value: T) => OK<T>;
|
|
269
|
+
declare type SyncParseReturnType<T = any> = OK<T> | DIRTY<T> | INVALID;
|
|
270
|
+
declare type AsyncParseReturnType<T> = Promise<SyncParseReturnType<T>>;
|
|
271
|
+
declare type ParseReturnType<T> = SyncParseReturnType<T> | AsyncParseReturnType<T>;
|
|
272
|
+
|
|
273
|
+
declare namespace enumUtil {
|
|
274
|
+
type UnionToIntersectionFn<T> = (T extends unknown ? (k: () => T) => void : never) extends (k: infer Intersection) => void ? Intersection : never;
|
|
275
|
+
type GetUnionLast<T> = UnionToIntersectionFn<T> extends () => infer Last ? Last : never;
|
|
276
|
+
type UnionToTuple<T, Tuple extends unknown[] = []> = [T] extends [never] ? Tuple : UnionToTuple<Exclude<T, GetUnionLast<T>>, [GetUnionLast<T>, ...Tuple]>;
|
|
277
|
+
type CastToStringTuple<T> = T extends [string, ...string[]] ? T : never;
|
|
278
|
+
export type UnionToTupleString<T> = CastToStringTuple<UnionToTuple<T>>;
|
|
279
|
+
export {};
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
declare namespace errorUtil {
|
|
283
|
+
type ErrMessage = string | {
|
|
284
|
+
message?: string;
|
|
285
|
+
};
|
|
286
|
+
const errToObj: (message?: ErrMessage | undefined) => {
|
|
287
|
+
message?: string | undefined;
|
|
288
|
+
};
|
|
289
|
+
const toString: (message?: ErrMessage | undefined) => string | undefined;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
declare namespace partialUtil {
|
|
293
|
+
type DeepPartial<T extends ZodTypeAny> = T extends ZodObject<infer Shape, infer Params, infer Catchall> ? ZodObject<{
|
|
294
|
+
[k in keyof Shape]: ZodOptional<DeepPartial<Shape[k]>>;
|
|
295
|
+
}, 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> ? {
|
|
296
|
+
[k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial<Items[k]> : never;
|
|
297
|
+
} extends infer PI ? PI extends ZodTupleItems ? ZodTuple<PI> : never : never : T;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
declare type RefinementCtx = {
|
|
301
|
+
addIssue: (arg: IssueData) => void;
|
|
302
|
+
path: (string | number)[];
|
|
303
|
+
};
|
|
304
|
+
declare type ZodRawShape = {
|
|
305
|
+
[k: string]: ZodTypeAny;
|
|
306
|
+
};
|
|
307
|
+
declare type ZodTypeAny = ZodType<any, any, any>;
|
|
308
|
+
declare type TypeOf<T extends ZodType<any, any, any>> = T["_output"];
|
|
309
|
+
declare type input<T extends ZodType<any, any, any>> = T["_input"];
|
|
310
|
+
declare type output<T extends ZodType<any, any, any>> = T["_output"];
|
|
311
|
+
|
|
312
|
+
declare type CustomErrorParams = Partial<util.Omit<ZodCustomIssue, "code">>;
|
|
313
|
+
interface ZodTypeDef {
|
|
314
|
+
errorMap?: ZodErrorMap;
|
|
315
|
+
description?: string;
|
|
316
|
+
}
|
|
317
|
+
declare type RawCreateParams = {
|
|
318
|
+
errorMap?: ZodErrorMap;
|
|
319
|
+
invalid_type_error?: string;
|
|
320
|
+
required_error?: string;
|
|
321
|
+
description?: string;
|
|
322
|
+
} | undefined;
|
|
323
|
+
declare type SafeParseSuccess<Output> = {
|
|
324
|
+
success: true;
|
|
325
|
+
data: Output;
|
|
326
|
+
};
|
|
327
|
+
declare type SafeParseError<Input> = {
|
|
328
|
+
success: false;
|
|
329
|
+
error: ZodError<Input>;
|
|
330
|
+
};
|
|
331
|
+
declare type SafeParseReturnType<Input, Output> = SafeParseSuccess<Output> | SafeParseError<Input>;
|
|
332
|
+
declare abstract class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> {
|
|
333
|
+
readonly _type: Output;
|
|
334
|
+
readonly _output: Output;
|
|
335
|
+
readonly _input: Input;
|
|
336
|
+
readonly _def: Def;
|
|
337
|
+
get description(): string | undefined;
|
|
338
|
+
abstract _parse(input: ParseInput): ParseReturnType<Output>;
|
|
339
|
+
_getType(input: ParseInput): string;
|
|
340
|
+
_getOrReturnCtx(input: ParseInput, ctx?: ParseContext | undefined): ParseContext;
|
|
341
|
+
_processInputParams(input: ParseInput): {
|
|
342
|
+
status: ParseStatus;
|
|
343
|
+
ctx: ParseContext;
|
|
344
|
+
};
|
|
345
|
+
_parseSync(input: ParseInput): SyncParseReturnType<Output>;
|
|
346
|
+
_parseAsync(input: ParseInput): AsyncParseReturnType<Output>;
|
|
347
|
+
parse(data: unknown, params?: Partial<ParseParams>): Output;
|
|
348
|
+
safeParse(data: unknown, params?: Partial<ParseParams>): SafeParseReturnType<Input, Output>;
|
|
349
|
+
parseAsync(data: unknown, params?: Partial<ParseParams>): Promise<Output>;
|
|
350
|
+
safeParseAsync(data: unknown, params?: Partial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;
|
|
351
|
+
/** Alias of safeParseAsync */
|
|
352
|
+
spa: (data: unknown, params?: Partial<ParseParams> | undefined) => Promise<SafeParseReturnType<Input, Output>>;
|
|
353
|
+
refine<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, RefinedOutput, Input>;
|
|
354
|
+
refine(check: (arg: Output) => unknown | Promise<unknown>, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, Output, Input>;
|
|
355
|
+
refinement<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, RefinedOutput, Input>;
|
|
356
|
+
refinement(check: (arg: Output) => boolean, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, Output, Input>;
|
|
357
|
+
_refinement(refinement: RefinementEffect<Output>["refinement"]): ZodEffects<this, Output, Input>;
|
|
358
|
+
superRefine<RefinedOutput extends Output>(refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput): ZodEffects<this, RefinedOutput, Input>;
|
|
359
|
+
superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects<this, Output, Input>;
|
|
360
|
+
constructor(def: Def);
|
|
361
|
+
optional(): ZodOptional<this>;
|
|
362
|
+
nullable(): ZodNullable<this>;
|
|
363
|
+
nullish(): ZodOptional<ZodNullable<this>>;
|
|
364
|
+
array(): ZodArray<this>;
|
|
365
|
+
promise(): ZodPromise<this>;
|
|
366
|
+
or<T extends ZodTypeAny>(option: T): ZodUnion<[this, T]>;
|
|
367
|
+
and<T extends ZodTypeAny>(incoming: T): ZodIntersection<this, T>;
|
|
368
|
+
transform<NewOut>(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise<NewOut>): ZodEffects<this, NewOut>;
|
|
369
|
+
default(def: util.noUndefined<Input>): ZodDefault<this>;
|
|
370
|
+
default(def: () => util.noUndefined<Input>): ZodDefault<this>;
|
|
371
|
+
brand<B extends string | number | symbol>(brand?: B): ZodBranded<this, B>;
|
|
372
|
+
catch(def: Output): ZodCatch<this>;
|
|
373
|
+
catch(def: () => Output): ZodCatch<this>;
|
|
374
|
+
describe(description: string): this;
|
|
375
|
+
pipe<T extends ZodTypeAny>(target: T): ZodPipeline<this, T>;
|
|
376
|
+
isOptional(): boolean;
|
|
377
|
+
isNullable(): boolean;
|
|
378
|
+
}
|
|
379
|
+
declare type ZodStringCheck = {
|
|
380
|
+
kind: "min";
|
|
381
|
+
value: number;
|
|
382
|
+
message?: string;
|
|
383
|
+
} | {
|
|
384
|
+
kind: "max";
|
|
385
|
+
value: number;
|
|
386
|
+
message?: string;
|
|
387
|
+
} | {
|
|
388
|
+
kind: "length";
|
|
389
|
+
value: number;
|
|
390
|
+
message?: string;
|
|
391
|
+
} | {
|
|
392
|
+
kind: "email";
|
|
393
|
+
message?: string;
|
|
394
|
+
} | {
|
|
395
|
+
kind: "url";
|
|
396
|
+
message?: string;
|
|
397
|
+
} | {
|
|
398
|
+
kind: "uuid";
|
|
399
|
+
message?: string;
|
|
400
|
+
} | {
|
|
401
|
+
kind: "cuid";
|
|
402
|
+
message?: string;
|
|
403
|
+
} | {
|
|
404
|
+
kind: "cuid2";
|
|
405
|
+
message?: string;
|
|
406
|
+
} | {
|
|
407
|
+
kind: "startsWith";
|
|
408
|
+
value: string;
|
|
409
|
+
message?: string;
|
|
410
|
+
} | {
|
|
411
|
+
kind: "endsWith";
|
|
412
|
+
value: string;
|
|
413
|
+
message?: string;
|
|
414
|
+
} | {
|
|
415
|
+
kind: "regex";
|
|
416
|
+
regex: RegExp;
|
|
417
|
+
message?: string;
|
|
418
|
+
} | {
|
|
419
|
+
kind: "trim";
|
|
420
|
+
message?: string;
|
|
421
|
+
} | {
|
|
422
|
+
kind: "datetime";
|
|
423
|
+
offset: boolean;
|
|
424
|
+
precision: number | null;
|
|
425
|
+
message?: string;
|
|
426
|
+
};
|
|
427
|
+
interface ZodStringDef extends ZodTypeDef {
|
|
428
|
+
checks: ZodStringCheck[];
|
|
429
|
+
typeName: ZodFirstPartyTypeKind.ZodString;
|
|
430
|
+
coerce: boolean;
|
|
431
|
+
}
|
|
432
|
+
declare class ZodString extends ZodType<string, ZodStringDef> {
|
|
433
|
+
_parse(input: ParseInput): ParseReturnType<string>;
|
|
434
|
+
protected _regex: (regex: RegExp, validation: StringValidation, message?: errorUtil.ErrMessage | undefined) => ZodEffects<this, string, string>;
|
|
435
|
+
_addCheck(check: ZodStringCheck): ZodString;
|
|
436
|
+
email(message?: errorUtil.ErrMessage): ZodString;
|
|
437
|
+
url(message?: errorUtil.ErrMessage): ZodString;
|
|
438
|
+
uuid(message?: errorUtil.ErrMessage): ZodString;
|
|
439
|
+
cuid(message?: errorUtil.ErrMessage): ZodString;
|
|
440
|
+
cuid2(message?: errorUtil.ErrMessage): ZodString;
|
|
441
|
+
datetime(options?: string | {
|
|
442
|
+
message?: string | undefined;
|
|
443
|
+
precision?: number | null;
|
|
444
|
+
offset?: boolean;
|
|
445
|
+
}): ZodString;
|
|
446
|
+
regex(regex: RegExp, message?: errorUtil.ErrMessage): ZodString;
|
|
447
|
+
startsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
|
|
448
|
+
endsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
|
|
449
|
+
min(minLength: number, message?: errorUtil.ErrMessage): ZodString;
|
|
450
|
+
max(maxLength: number, message?: errorUtil.ErrMessage): ZodString;
|
|
451
|
+
length(len: number, message?: errorUtil.ErrMessage): ZodString;
|
|
452
|
+
/**
|
|
453
|
+
* @deprecated Use z.string().min(1) instead.
|
|
454
|
+
* @see {@link ZodString.min}
|
|
455
|
+
*/
|
|
456
|
+
nonempty: (message?: errorUtil.ErrMessage | undefined) => ZodString;
|
|
457
|
+
trim: () => ZodString;
|
|
458
|
+
get isDatetime(): boolean;
|
|
459
|
+
get isEmail(): boolean;
|
|
460
|
+
get isURL(): boolean;
|
|
461
|
+
get isUUID(): boolean;
|
|
462
|
+
get isCUID(): boolean;
|
|
463
|
+
get isCUID2(): boolean;
|
|
464
|
+
get minLength(): number | null;
|
|
465
|
+
get maxLength(): number | null;
|
|
466
|
+
static create: (params?: ({
|
|
467
|
+
errorMap?: ZodErrorMap | undefined;
|
|
468
|
+
invalid_type_error?: string | undefined;
|
|
469
|
+
required_error?: string | undefined;
|
|
470
|
+
description?: string | undefined;
|
|
471
|
+
} & {
|
|
472
|
+
coerce?: true | undefined;
|
|
473
|
+
}) | undefined) => ZodString;
|
|
474
|
+
}
|
|
475
|
+
declare type ZodNumberCheck = {
|
|
476
|
+
kind: "min";
|
|
477
|
+
value: number;
|
|
478
|
+
inclusive: boolean;
|
|
479
|
+
message?: string;
|
|
480
|
+
} | {
|
|
481
|
+
kind: "max";
|
|
482
|
+
value: number;
|
|
483
|
+
inclusive: boolean;
|
|
484
|
+
message?: string;
|
|
485
|
+
} | {
|
|
486
|
+
kind: "int";
|
|
487
|
+
message?: string;
|
|
488
|
+
} | {
|
|
489
|
+
kind: "multipleOf";
|
|
490
|
+
value: number;
|
|
491
|
+
message?: string;
|
|
492
|
+
} | {
|
|
493
|
+
kind: "finite";
|
|
494
|
+
message?: string;
|
|
495
|
+
};
|
|
496
|
+
interface ZodNumberDef extends ZodTypeDef {
|
|
497
|
+
checks: ZodNumberCheck[];
|
|
498
|
+
typeName: ZodFirstPartyTypeKind.ZodNumber;
|
|
499
|
+
coerce: boolean;
|
|
500
|
+
}
|
|
501
|
+
declare class ZodNumber extends ZodType<number, ZodNumberDef> {
|
|
502
|
+
_parse(input: ParseInput): ParseReturnType<number>;
|
|
503
|
+
static create: (params?: ({
|
|
504
|
+
errorMap?: ZodErrorMap | undefined;
|
|
505
|
+
invalid_type_error?: string | undefined;
|
|
506
|
+
required_error?: string | undefined;
|
|
507
|
+
description?: string | undefined;
|
|
508
|
+
} & {
|
|
509
|
+
coerce?: boolean | undefined;
|
|
510
|
+
}) | undefined) => ZodNumber;
|
|
511
|
+
gte(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
512
|
+
min: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
513
|
+
gt(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
514
|
+
lte(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
515
|
+
max: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
516
|
+
lt(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
517
|
+
protected setLimit(kind: "min" | "max", value: number, inclusive: boolean, message?: string): ZodNumber;
|
|
518
|
+
_addCheck(check: ZodNumberCheck): ZodNumber;
|
|
519
|
+
int(message?: errorUtil.ErrMessage): ZodNumber;
|
|
520
|
+
positive(message?: errorUtil.ErrMessage): ZodNumber;
|
|
521
|
+
negative(message?: errorUtil.ErrMessage): ZodNumber;
|
|
522
|
+
nonpositive(message?: errorUtil.ErrMessage): ZodNumber;
|
|
523
|
+
nonnegative(message?: errorUtil.ErrMessage): ZodNumber;
|
|
524
|
+
multipleOf(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
525
|
+
finite(message?: errorUtil.ErrMessage): ZodNumber;
|
|
526
|
+
step: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
527
|
+
get minValue(): number | null;
|
|
528
|
+
get maxValue(): number | null;
|
|
529
|
+
get isInt(): boolean;
|
|
530
|
+
get isFinite(): boolean;
|
|
531
|
+
}
|
|
532
|
+
interface ZodBooleanDef extends ZodTypeDef {
|
|
533
|
+
typeName: ZodFirstPartyTypeKind.ZodBoolean;
|
|
534
|
+
coerce: boolean;
|
|
535
|
+
}
|
|
536
|
+
declare class ZodBoolean extends ZodType<boolean, ZodBooleanDef> {
|
|
537
|
+
_parse(input: ParseInput): ParseReturnType<boolean>;
|
|
538
|
+
static create: (params?: ({
|
|
539
|
+
errorMap?: ZodErrorMap | undefined;
|
|
540
|
+
invalid_type_error?: string | undefined;
|
|
541
|
+
required_error?: string | undefined;
|
|
542
|
+
description?: string | undefined;
|
|
543
|
+
} & {
|
|
544
|
+
coerce?: boolean | undefined;
|
|
545
|
+
}) | undefined) => ZodBoolean;
|
|
546
|
+
}
|
|
547
|
+
interface ZodAnyDef extends ZodTypeDef {
|
|
548
|
+
typeName: ZodFirstPartyTypeKind.ZodAny;
|
|
549
|
+
}
|
|
550
|
+
declare class ZodAny extends ZodType<any, ZodAnyDef> {
|
|
551
|
+
_any: true;
|
|
552
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
553
|
+
static create: (params?: RawCreateParams) => ZodAny;
|
|
554
|
+
}
|
|
555
|
+
interface ZodUnknownDef extends ZodTypeDef {
|
|
556
|
+
typeName: ZodFirstPartyTypeKind.ZodUnknown;
|
|
557
|
+
}
|
|
558
|
+
declare class ZodUnknown extends ZodType<unknown, ZodUnknownDef> {
|
|
559
|
+
_unknown: true;
|
|
560
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
561
|
+
static create: (params?: RawCreateParams) => ZodUnknown;
|
|
562
|
+
}
|
|
563
|
+
interface ZodVoidDef extends ZodTypeDef {
|
|
564
|
+
typeName: ZodFirstPartyTypeKind.ZodVoid;
|
|
565
|
+
}
|
|
566
|
+
declare class ZodVoid extends ZodType<void, ZodVoidDef> {
|
|
567
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
568
|
+
static create: (params?: RawCreateParams) => ZodVoid;
|
|
569
|
+
}
|
|
570
|
+
interface ZodArrayDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
571
|
+
type: T;
|
|
572
|
+
typeName: ZodFirstPartyTypeKind.ZodArray;
|
|
573
|
+
exactLength: {
|
|
574
|
+
value: number;
|
|
575
|
+
message?: string;
|
|
576
|
+
} | null;
|
|
577
|
+
minLength: {
|
|
578
|
+
value: number;
|
|
579
|
+
message?: string;
|
|
580
|
+
} | null;
|
|
581
|
+
maxLength: {
|
|
582
|
+
value: number;
|
|
583
|
+
message?: string;
|
|
584
|
+
} | null;
|
|
585
|
+
}
|
|
586
|
+
declare type ArrayCardinality = "many" | "atleastone";
|
|
587
|
+
declare type arrayOutputType<T extends ZodTypeAny, Cardinality extends ArrayCardinality = "many"> = Cardinality extends "atleastone" ? [T["_output"], ...T["_output"][]] : T["_output"][];
|
|
588
|
+
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"][]> {
|
|
589
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
590
|
+
get element(): T;
|
|
591
|
+
min(minLength: number, message?: errorUtil.ErrMessage): this;
|
|
592
|
+
max(maxLength: number, message?: errorUtil.ErrMessage): this;
|
|
593
|
+
length(len: number, message?: errorUtil.ErrMessage): this;
|
|
594
|
+
nonempty(message?: errorUtil.ErrMessage): ZodArray<T, "atleastone">;
|
|
595
|
+
static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodArray<T_1, "many">;
|
|
596
|
+
}
|
|
597
|
+
declare namespace objectUtil {
|
|
598
|
+
export type MergeShapes<U extends ZodRawShape, V extends ZodRawShape> = {
|
|
599
|
+
[k in Exclude<keyof U, keyof V>]: U[k];
|
|
600
|
+
} & V;
|
|
601
|
+
type optionalKeys<T extends object> = {
|
|
602
|
+
[k in keyof T]: undefined extends T[k] ? k : never;
|
|
603
|
+
}[keyof T];
|
|
604
|
+
type requiredKeys<T extends object> = {
|
|
605
|
+
[k in keyof T]: undefined extends T[k] ? never : k;
|
|
606
|
+
}[keyof T];
|
|
607
|
+
export type addQuestionMarks<T extends object> = Partial<Pick<T, optionalKeys<T>>> & Pick<T, requiredKeys<T>>;
|
|
608
|
+
export type identity<T> = T;
|
|
609
|
+
export type flatten<T extends object> = identity<{
|
|
610
|
+
[k in keyof T]: T[k];
|
|
611
|
+
}>;
|
|
612
|
+
export type noNeverKeys<T extends ZodRawShape> = {
|
|
613
|
+
[k in keyof T]: [T[k]] extends [never] ? never : k;
|
|
614
|
+
}[keyof T];
|
|
615
|
+
export type noNever<T extends ZodRawShape> = identity<{
|
|
616
|
+
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;
|
|
617
|
+
}>;
|
|
618
|
+
export const mergeShapes: <U extends ZodRawShape, T extends ZodRawShape>(first: U, second: T) => T & U;
|
|
619
|
+
export {};
|
|
620
|
+
}
|
|
621
|
+
declare type extendShape<A, B> = util.flatten<Omit<A, keyof B> & B>;
|
|
622
|
+
declare type UnknownKeysParam = "passthrough" | "strict" | "strip";
|
|
623
|
+
interface ZodObjectDef<T extends ZodRawShape = ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
624
|
+
typeName: ZodFirstPartyTypeKind.ZodObject;
|
|
625
|
+
shape: () => T;
|
|
626
|
+
catchall: Catchall;
|
|
627
|
+
unknownKeys: UnknownKeys;
|
|
628
|
+
}
|
|
629
|
+
declare type baseObjectOutputType<Shape extends ZodRawShape> = objectUtil.addQuestionMarks<{
|
|
630
|
+
[k in keyof Shape]: Shape[k]["_output"];
|
|
631
|
+
}>;
|
|
632
|
+
declare type objectOutputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny> = ZodTypeAny extends Catchall ? objectUtil.flatten<baseObjectOutputType<Shape>> : objectUtil.flatten<baseObjectOutputType<Shape> & {
|
|
633
|
+
[k: string]: Catchall["_output"];
|
|
634
|
+
}>;
|
|
635
|
+
declare type baseObjectInputType<Shape extends ZodRawShape> = objectUtil.flatten<objectUtil.addQuestionMarks<{
|
|
636
|
+
[k in keyof Shape]: Shape[k]["_input"];
|
|
637
|
+
}>>;
|
|
638
|
+
declare type objectInputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny> = ZodTypeAny extends Catchall ? baseObjectInputType<Shape> : objectUtil.flatten<baseObjectInputType<Shape> & {
|
|
639
|
+
[k: string]: Catchall["_input"];
|
|
640
|
+
}>;
|
|
641
|
+
declare type deoptional<T extends ZodTypeAny> = T extends ZodOptional<infer U> ? deoptional<U> : T extends ZodNullable<infer U> ? ZodNullable<deoptional<U>> : T;
|
|
642
|
+
declare type objectKeyMask<Obj> = {
|
|
643
|
+
[k in keyof Obj]?: true;
|
|
644
|
+
};
|
|
645
|
+
declare type noUnrecognized<Obj extends object, Shape extends object> = {
|
|
646
|
+
[k in keyof Obj]: k extends keyof Shape ? Obj[k] : never;
|
|
647
|
+
};
|
|
648
|
+
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> {
|
|
649
|
+
private _cached;
|
|
650
|
+
_getCached(): {
|
|
651
|
+
shape: T;
|
|
652
|
+
keys: string[];
|
|
653
|
+
};
|
|
654
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
655
|
+
get shape(): T;
|
|
656
|
+
strict(message?: errorUtil.ErrMessage): ZodObject<T, "strict", Catchall>;
|
|
657
|
+
strip(): ZodObject<T, "strip", Catchall>;
|
|
658
|
+
passthrough(): ZodObject<T, "passthrough", Catchall>;
|
|
659
|
+
/**
|
|
660
|
+
* @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.
|
|
661
|
+
* If you want to pass through unknown properties, use `.passthrough()` instead.
|
|
662
|
+
*/
|
|
663
|
+
nonstrict: () => ZodObject<T, "passthrough", Catchall>;
|
|
664
|
+
extend<Augmentation extends ZodRawShape>(augmentation: Augmentation): ZodObject<extendShape<T, Augmentation>, UnknownKeys, Catchall>;
|
|
665
|
+
/**
|
|
666
|
+
* @deprecated Use `.extend` instead
|
|
667
|
+
* */
|
|
668
|
+
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>>;
|
|
669
|
+
/**
|
|
670
|
+
* Prior to zod@1.0.12 there was a bug in the
|
|
671
|
+
* inferred type of merged objects. Please
|
|
672
|
+
* upgrade if you are experiencing issues.
|
|
673
|
+
*/
|
|
674
|
+
merge<Incoming extends AnyZodObject, Augmentation extends Incoming["shape"]>(merging: Incoming): ZodObject<extendShape<T, Augmentation>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>;
|
|
675
|
+
setKey<Key extends string, Schema extends ZodTypeAny>(key: Key, schema: Schema): ZodObject<T & {
|
|
676
|
+
[k in Key]: Schema;
|
|
677
|
+
}, UnknownKeys, Catchall>;
|
|
678
|
+
catchall<Index extends ZodTypeAny>(index: Index): ZodObject<T, UnknownKeys, Index>;
|
|
679
|
+
pick<Mask extends objectKeyMask<T>>(mask: noUnrecognized<Mask, T>): ZodObject<Pick<T, Extract<keyof T, keyof Mask>>, UnknownKeys, Catchall>;
|
|
680
|
+
omit<Mask extends objectKeyMask<T>>(mask: noUnrecognized<Mask, objectKeyMask<T>>): ZodObject<Omit<T, keyof Mask>, UnknownKeys, Catchall>;
|
|
681
|
+
deepPartial(): partialUtil.DeepPartial<this>;
|
|
682
|
+
partial(): ZodObject<{
|
|
683
|
+
[k in keyof T]: ZodOptional<T[k]>;
|
|
684
|
+
}, UnknownKeys, Catchall>;
|
|
685
|
+
partial<Mask extends objectKeyMask<T>>(mask: noUnrecognized<Mask, objectKeyMask<T>>): ZodObject<objectUtil.noNever<{
|
|
686
|
+
[k in keyof T]: k extends keyof Mask ? ZodOptional<T[k]> : T[k];
|
|
687
|
+
}>, UnknownKeys, Catchall>;
|
|
688
|
+
required(): ZodObject<{
|
|
689
|
+
[k in keyof T]: deoptional<T[k]>;
|
|
690
|
+
}, UnknownKeys, Catchall>;
|
|
691
|
+
required<Mask extends objectKeyMask<T>>(mask: noUnrecognized<Mask, objectKeyMask<T>>): ZodObject<objectUtil.noNever<{
|
|
692
|
+
[k in keyof T]: k extends keyof Mask ? deoptional<T[k]> : T[k];
|
|
693
|
+
}>, UnknownKeys, Catchall>;
|
|
694
|
+
keyof(): ZodEnum<enumUtil.UnionToTupleString<keyof T>>;
|
|
695
|
+
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]; }>;
|
|
696
|
+
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]; }>;
|
|
697
|
+
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]; }>;
|
|
698
|
+
}
|
|
699
|
+
declare type AnyZodObject = ZodObject<any, any, any>;
|
|
700
|
+
declare type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>;
|
|
701
|
+
interface ZodUnionDef<T extends ZodUnionOptions = Readonly<[
|
|
702
|
+
ZodTypeAny,
|
|
703
|
+
ZodTypeAny,
|
|
704
|
+
...ZodTypeAny[]
|
|
705
|
+
]>> extends ZodTypeDef {
|
|
706
|
+
options: T;
|
|
707
|
+
typeName: ZodFirstPartyTypeKind.ZodUnion;
|
|
708
|
+
}
|
|
709
|
+
declare class ZodUnion<T extends ZodUnionOptions> extends ZodType<T[number]["_output"], ZodUnionDef<T>, T[number]["_input"]> {
|
|
710
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
711
|
+
get options(): T;
|
|
712
|
+
static create: <T_1 extends readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(types: T_1, params?: RawCreateParams) => ZodUnion<T_1>;
|
|
713
|
+
}
|
|
714
|
+
interface ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
715
|
+
left: T;
|
|
716
|
+
right: U;
|
|
717
|
+
typeName: ZodFirstPartyTypeKind.ZodIntersection;
|
|
718
|
+
}
|
|
719
|
+
declare class ZodIntersection<T extends ZodTypeAny, U extends ZodTypeAny> extends ZodType<T["_output"] & U["_output"], ZodIntersectionDef<T, U>, T["_input"] & U["_input"]> {
|
|
720
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
721
|
+
static create: <T_1 extends ZodTypeAny, U_1 extends ZodTypeAny>(left: T_1, right: U_1, params?: RawCreateParams) => ZodIntersection<T_1, U_1>;
|
|
722
|
+
}
|
|
723
|
+
declare type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];
|
|
724
|
+
declare type AssertArray<T> = T extends any[] ? T : never;
|
|
725
|
+
declare type OutputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
|
|
726
|
+
[k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_output"] : never;
|
|
727
|
+
}>;
|
|
728
|
+
declare type OutputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...OutputTypeOfTuple<T>, ...Rest["_output"][]] : OutputTypeOfTuple<T>;
|
|
729
|
+
declare type InputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
|
|
730
|
+
[k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_input"] : never;
|
|
731
|
+
}>;
|
|
732
|
+
declare type InputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...InputTypeOfTuple<T>, ...Rest["_input"][]] : InputTypeOfTuple<T>;
|
|
733
|
+
interface ZodTupleDef<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends ZodTypeAny | null = null> extends ZodTypeDef {
|
|
734
|
+
items: T;
|
|
735
|
+
rest: Rest;
|
|
736
|
+
typeName: ZodFirstPartyTypeKind.ZodTuple;
|
|
737
|
+
}
|
|
738
|
+
declare type AnyZodTuple = ZodTuple<[
|
|
739
|
+
ZodTypeAny,
|
|
740
|
+
...ZodTypeAny[]
|
|
741
|
+
] | [], ZodTypeAny | null>;
|
|
742
|
+
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>> {
|
|
743
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
744
|
+
get items(): T;
|
|
745
|
+
rest<Rest extends ZodTypeAny>(rest: Rest): ZodTuple<T, Rest>;
|
|
746
|
+
static create: <T_1 extends [] | [ZodTypeAny, ...ZodTypeAny[]]>(schemas: T_1, params?: RawCreateParams) => ZodTuple<T_1, null>;
|
|
747
|
+
}
|
|
748
|
+
interface ZodRecordDef<Key extends KeySchema = ZodString, Value extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
749
|
+
valueType: Value;
|
|
750
|
+
keyType: Key;
|
|
751
|
+
typeName: ZodFirstPartyTypeKind.ZodRecord;
|
|
752
|
+
}
|
|
753
|
+
declare type KeySchema = ZodType<string | number | symbol, any, any>;
|
|
754
|
+
declare type RecordType<K extends string | number | symbol, V> = [
|
|
755
|
+
string
|
|
756
|
+
] extends [K] ? Record<K, V> : [number] extends [K] ? Record<K, V> : [symbol] extends [K] ? Record<K, V> : Partial<Record<K, V>>;
|
|
757
|
+
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"]>> {
|
|
758
|
+
get keySchema(): Key;
|
|
759
|
+
get valueSchema(): Value;
|
|
760
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
761
|
+
get element(): Value;
|
|
762
|
+
static create<Value extends ZodTypeAny>(valueType: Value, params?: RawCreateParams): ZodRecord<ZodString, Value>;
|
|
763
|
+
static create<Keys extends KeySchema, Value extends ZodTypeAny>(keySchema: Keys, valueType: Value, params?: RawCreateParams): ZodRecord<Keys, Value>;
|
|
764
|
+
}
|
|
765
|
+
interface ZodFunctionDef<Args extends ZodTuple<any, any> = ZodTuple<any, any>, Returns extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
766
|
+
args: Args;
|
|
767
|
+
returns: Returns;
|
|
768
|
+
typeName: ZodFirstPartyTypeKind.ZodFunction;
|
|
769
|
+
}
|
|
770
|
+
declare type OuterTypeOfFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> = Args["_input"] extends Array<any> ? (...args: Args["_input"]) => Returns["_output"] : never;
|
|
771
|
+
declare type InnerTypeOfFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> = Args["_output"] extends Array<any> ? (...args: Args["_output"]) => Returns["_input"] : never;
|
|
772
|
+
declare class ZodFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> extends ZodType<OuterTypeOfFunction<Args, Returns>, ZodFunctionDef<Args, Returns>, InnerTypeOfFunction<Args, Returns>> {
|
|
773
|
+
_parse(input: ParseInput): ParseReturnType<any>;
|
|
774
|
+
parameters(): Args;
|
|
775
|
+
returnType(): Returns;
|
|
776
|
+
args<Items extends Parameters<typeof ZodTuple["create"]>[0]>(...items: Items): ZodFunction<ZodTuple<Items, ZodUnknown>, Returns>;
|
|
777
|
+
returns<NewReturnType extends ZodType<any, any>>(returnType: NewReturnType): ZodFunction<Args, NewReturnType>;
|
|
778
|
+
implement<F extends InnerTypeOfFunction<Args, Returns>>(func: F): ReturnType<F> extends Returns["_output"] ? (...args: Args["_input"]) => ReturnType<F> : OuterTypeOfFunction<Args, Returns>;
|
|
779
|
+
strictImplement(func: InnerTypeOfFunction<Args, Returns>): InnerTypeOfFunction<Args, Returns>;
|
|
780
|
+
validate: <F extends InnerTypeOfFunction<Args, Returns>>(func: F) => ReturnType<F> extends Returns["_output"] ? (...args: Args["_input"]) => ReturnType<F> : OuterTypeOfFunction<Args, Returns>;
|
|
781
|
+
static create(): ZodFunction<ZodTuple<[], ZodUnknown>, ZodUnknown>;
|
|
782
|
+
static create<T extends AnyZodTuple = ZodTuple<[], ZodUnknown>>(args: T): ZodFunction<T, ZodUnknown>;
|
|
783
|
+
static create<T extends AnyZodTuple, U extends ZodTypeAny>(args: T, returns: U): ZodFunction<T, U>;
|
|
784
|
+
static create<T extends AnyZodTuple = ZodTuple<[], ZodUnknown>, U extends ZodTypeAny = ZodUnknown>(args: T, returns: U, params?: RawCreateParams): ZodFunction<T, U>;
|
|
785
|
+
}
|
|
786
|
+
declare type EnumValues = [string, ...string[]];
|
|
787
|
+
declare type Values<T extends EnumValues> = {
|
|
788
|
+
[k in T[number]]: k;
|
|
789
|
+
};
|
|
790
|
+
interface ZodEnumDef<T extends EnumValues = EnumValues> extends ZodTypeDef {
|
|
791
|
+
values: T;
|
|
792
|
+
typeName: ZodFirstPartyTypeKind.ZodEnum;
|
|
793
|
+
}
|
|
794
|
+
declare type Writeable<T> = {
|
|
795
|
+
-readonly [P in keyof T]: T[P];
|
|
796
|
+
};
|
|
797
|
+
declare type FilterEnum<Values, ToExclude> = Values extends [] ? [] : Values extends [infer Head, ...infer Rest] ? Head extends ToExclude ? FilterEnum<Rest, ToExclude> : [Head, ...FilterEnum<Rest, ToExclude>] : never;
|
|
798
|
+
declare type typecast<A, T> = A extends T ? A : never;
|
|
799
|
+
declare function createZodEnum<U extends string, T extends Readonly<[U, ...U[]]>>(values: T, params?: RawCreateParams): ZodEnum<Writeable<T>>;
|
|
800
|
+
declare function createZodEnum<U extends string, T extends [U, ...U[]]>(values: T, params?: RawCreateParams): ZodEnum<T>;
|
|
801
|
+
declare class ZodEnum<T extends [string, ...string[]]> extends ZodType<T[number], ZodEnumDef<T>> {
|
|
802
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
803
|
+
get options(): T;
|
|
804
|
+
get enum(): Values<T>;
|
|
805
|
+
get Values(): Values<T>;
|
|
806
|
+
get Enum(): Values<T>;
|
|
807
|
+
extract<ToExtract extends readonly [T[number], ...T[number][]]>(values: ToExtract): ZodEnum<Writeable<ToExtract>>;
|
|
808
|
+
exclude<ToExclude extends readonly [T[number], ...T[number][]]>(values: ToExclude): ZodEnum<typecast<Writeable<FilterEnum<T, ToExclude[number]>>, [string, ...string[]]>>;
|
|
809
|
+
static create: typeof createZodEnum;
|
|
810
|
+
}
|
|
811
|
+
interface ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
812
|
+
type: T;
|
|
813
|
+
typeName: ZodFirstPartyTypeKind.ZodPromise;
|
|
814
|
+
}
|
|
815
|
+
declare class ZodPromise<T extends ZodTypeAny> extends ZodType<Promise<T["_output"]>, ZodPromiseDef<T>, Promise<T["_input"]>> {
|
|
816
|
+
unwrap(): T;
|
|
817
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
818
|
+
static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodPromise<T_1>;
|
|
819
|
+
}
|
|
820
|
+
declare type RefinementEffect<T> = {
|
|
821
|
+
type: "refinement";
|
|
822
|
+
refinement: (arg: T, ctx: RefinementCtx) => any;
|
|
823
|
+
};
|
|
824
|
+
declare type TransformEffect<T> = {
|
|
825
|
+
type: "transform";
|
|
826
|
+
transform: (arg: T, ctx: RefinementCtx) => any;
|
|
827
|
+
};
|
|
828
|
+
declare type PreprocessEffect<T> = {
|
|
829
|
+
type: "preprocess";
|
|
830
|
+
transform: (arg: T) => any;
|
|
831
|
+
};
|
|
832
|
+
declare type Effect<T> = RefinementEffect<T> | TransformEffect<T> | PreprocessEffect<T>;
|
|
833
|
+
interface ZodEffectsDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
834
|
+
schema: T;
|
|
835
|
+
typeName: ZodFirstPartyTypeKind.ZodEffects;
|
|
836
|
+
effect: Effect<any>;
|
|
837
|
+
}
|
|
838
|
+
declare class ZodEffects<T extends ZodTypeAny, Output = output<T>, Input = input<T>> extends ZodType<Output, ZodEffectsDef<T>, Input> {
|
|
839
|
+
innerType(): T;
|
|
840
|
+
sourceType(): T;
|
|
841
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
842
|
+
static create: <I extends ZodTypeAny>(schema: I, effect: Effect<I["_output"]>, params?: RawCreateParams) => ZodEffects<I, I["_output"], input<I>>;
|
|
843
|
+
static createWithPreprocess: <I extends ZodTypeAny>(preprocess: (arg: unknown) => unknown, schema: I, params?: RawCreateParams) => ZodEffects<I, I["_output"], unknown>;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
interface ZodOptionalDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
847
|
+
innerType: T;
|
|
848
|
+
typeName: ZodFirstPartyTypeKind.ZodOptional;
|
|
849
|
+
}
|
|
850
|
+
declare class ZodOptional<T extends ZodTypeAny> extends ZodType<T["_output"] | undefined, ZodOptionalDef<T>, T["_input"] | undefined> {
|
|
851
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
852
|
+
unwrap(): T;
|
|
853
|
+
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodOptional<T_1>;
|
|
854
|
+
}
|
|
855
|
+
interface ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
856
|
+
innerType: T;
|
|
857
|
+
typeName: ZodFirstPartyTypeKind.ZodNullable;
|
|
858
|
+
}
|
|
859
|
+
declare class ZodNullable<T extends ZodTypeAny> extends ZodType<T["_output"] | null, ZodNullableDef<T>, T["_input"] | null> {
|
|
860
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
861
|
+
unwrap(): T;
|
|
862
|
+
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodNullable<T_1>;
|
|
863
|
+
}
|
|
864
|
+
interface ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
865
|
+
innerType: T;
|
|
866
|
+
defaultValue: () => util.noUndefined<T["_input"]>;
|
|
867
|
+
typeName: ZodFirstPartyTypeKind.ZodDefault;
|
|
868
|
+
}
|
|
869
|
+
declare class ZodDefault<T extends ZodTypeAny> extends ZodType<util.noUndefined<T["_output"]>, ZodDefaultDef<T>, T["_input"] | undefined> {
|
|
870
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
871
|
+
removeDefault(): T;
|
|
872
|
+
static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
|
|
873
|
+
errorMap?: ZodErrorMap | undefined;
|
|
874
|
+
invalid_type_error?: string | undefined;
|
|
875
|
+
required_error?: string | undefined;
|
|
876
|
+
description?: string | undefined;
|
|
877
|
+
} & {
|
|
878
|
+
default: T_1["_input"] | (() => util.noUndefined<T_1["_input"]>);
|
|
879
|
+
}) => ZodDefault<T_1>;
|
|
880
|
+
}
|
|
881
|
+
interface ZodCatchDef<T extends ZodTypeAny = ZodTypeAny, C extends T["_input"] = T["_input"]> extends ZodTypeDef {
|
|
882
|
+
innerType: T;
|
|
883
|
+
catchValue: () => C;
|
|
884
|
+
typeName: ZodFirstPartyTypeKind.ZodCatch;
|
|
885
|
+
}
|
|
886
|
+
declare class ZodCatch<T extends ZodTypeAny> extends ZodType<T["_output"], ZodCatchDef<T>, unknown> {
|
|
887
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
888
|
+
removeCatch(): T;
|
|
889
|
+
static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
|
|
890
|
+
errorMap?: ZodErrorMap | undefined;
|
|
891
|
+
invalid_type_error?: string | undefined;
|
|
892
|
+
required_error?: string | undefined;
|
|
893
|
+
description?: string | undefined;
|
|
894
|
+
} & {
|
|
895
|
+
catch: T_1["_output"] | (() => T_1["_output"]);
|
|
896
|
+
}) => ZodCatch<T_1>;
|
|
897
|
+
}
|
|
898
|
+
interface ZodBrandedDef<T extends ZodTypeAny> extends ZodTypeDef {
|
|
899
|
+
type: T;
|
|
900
|
+
typeName: ZodFirstPartyTypeKind.ZodBranded;
|
|
901
|
+
}
|
|
902
|
+
declare const BRAND: unique symbol;
|
|
903
|
+
declare type BRAND<T extends string | number | symbol> = {
|
|
904
|
+
[BRAND]: {
|
|
905
|
+
[k in T]: true;
|
|
906
|
+
};
|
|
907
|
+
};
|
|
908
|
+
declare class ZodBranded<T extends ZodTypeAny, B extends string | number | symbol> extends ZodType<T["_output"] & BRAND<B>, ZodBrandedDef<T>, T["_input"]> {
|
|
909
|
+
_parse(input: ParseInput): ParseReturnType<any>;
|
|
910
|
+
unwrap(): T;
|
|
911
|
+
}
|
|
912
|
+
interface ZodPipelineDef<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodTypeDef {
|
|
913
|
+
in: A;
|
|
914
|
+
out: B;
|
|
915
|
+
typeName: ZodFirstPartyTypeKind.ZodPipeline;
|
|
916
|
+
}
|
|
917
|
+
declare class ZodPipeline<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodType<B["_output"], ZodPipelineDef<A, B>, A["_input"]> {
|
|
918
|
+
_parse(input: ParseInput): ParseReturnType<any>;
|
|
919
|
+
static create<A extends ZodTypeAny, B extends ZodTypeAny>(a: A, b: B): ZodPipeline<A, B>;
|
|
920
|
+
}
|
|
921
|
+
declare enum ZodFirstPartyTypeKind {
|
|
922
|
+
ZodString = "ZodString",
|
|
923
|
+
ZodNumber = "ZodNumber",
|
|
924
|
+
ZodNaN = "ZodNaN",
|
|
925
|
+
ZodBigInt = "ZodBigInt",
|
|
926
|
+
ZodBoolean = "ZodBoolean",
|
|
927
|
+
ZodDate = "ZodDate",
|
|
928
|
+
ZodSymbol = "ZodSymbol",
|
|
929
|
+
ZodUndefined = "ZodUndefined",
|
|
930
|
+
ZodNull = "ZodNull",
|
|
931
|
+
ZodAny = "ZodAny",
|
|
932
|
+
ZodUnknown = "ZodUnknown",
|
|
933
|
+
ZodNever = "ZodNever",
|
|
934
|
+
ZodVoid = "ZodVoid",
|
|
935
|
+
ZodArray = "ZodArray",
|
|
936
|
+
ZodObject = "ZodObject",
|
|
937
|
+
ZodUnion = "ZodUnion",
|
|
938
|
+
ZodDiscriminatedUnion = "ZodDiscriminatedUnion",
|
|
939
|
+
ZodIntersection = "ZodIntersection",
|
|
940
|
+
ZodTuple = "ZodTuple",
|
|
941
|
+
ZodRecord = "ZodRecord",
|
|
942
|
+
ZodMap = "ZodMap",
|
|
943
|
+
ZodSet = "ZodSet",
|
|
944
|
+
ZodFunction = "ZodFunction",
|
|
945
|
+
ZodLazy = "ZodLazy",
|
|
946
|
+
ZodLiteral = "ZodLiteral",
|
|
947
|
+
ZodEnum = "ZodEnum",
|
|
948
|
+
ZodEffects = "ZodEffects",
|
|
949
|
+
ZodNativeEnum = "ZodNativeEnum",
|
|
950
|
+
ZodOptional = "ZodOptional",
|
|
951
|
+
ZodNullable = "ZodNullable",
|
|
952
|
+
ZodDefault = "ZodDefault",
|
|
953
|
+
ZodCatch = "ZodCatch",
|
|
954
|
+
ZodPromise = "ZodPromise",
|
|
955
|
+
ZodBranded = "ZodBranded",
|
|
956
|
+
ZodPipeline = "ZodPipeline"
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
type AsyncCallbackFailObject = {
|
|
960
|
+
code: number;
|
|
961
|
+
message?: string | undefined;
|
|
962
|
+
api?: string | undefined;
|
|
963
|
+
[key: string]: any;
|
|
964
|
+
};
|
|
965
|
+
type AsyncCallback<T = any> = {
|
|
966
|
+
success?: ((res: T) => void) | undefined;
|
|
967
|
+
fail?: ((err: AsyncCallbackFailObject) => void) | undefined;
|
|
968
|
+
};
|
|
969
|
+
type AsyncVoidCallback = {
|
|
970
|
+
success?: () => void;
|
|
971
|
+
fail?: ((err: AsyncCallbackFailObject) => void) | undefined;
|
|
972
|
+
};
|
|
973
|
+
type GetLocationReturns = {
|
|
974
|
+
/** latitude */
|
|
975
|
+
latitude?: string;
|
|
976
|
+
/** longitude */
|
|
977
|
+
longitude?: string;
|
|
978
|
+
/** timestamp */
|
|
979
|
+
timestamp?: string;
|
|
980
|
+
/** provider */
|
|
981
|
+
provider?: string;
|
|
982
|
+
token?: string;
|
|
983
|
+
};
|
|
984
|
+
interface SystemInfo {
|
|
985
|
+
/** Mini app version */
|
|
986
|
+
version: string;
|
|
987
|
+
/** SDK version */
|
|
988
|
+
apiVersion: string;
|
|
989
|
+
/** Zalo version */
|
|
990
|
+
zaloVersion: string;
|
|
991
|
+
/** Client platform */
|
|
992
|
+
platform: string;
|
|
993
|
+
/** Language set in Zalo */
|
|
994
|
+
language: string;
|
|
995
|
+
/** Language set in Zalo */
|
|
996
|
+
zaloLanguage: string;
|
|
997
|
+
/** Theme set in Zalo */
|
|
998
|
+
zaloTheme: string;
|
|
999
|
+
}
|
|
1000
|
+
type SetStorageReturns = {
|
|
1001
|
+
errorKeys: string[];
|
|
1002
|
+
};
|
|
1003
|
+
type GetStorageReturns = {
|
|
1004
|
+
[key: string]: any;
|
|
1005
|
+
};
|
|
1006
|
+
type StorageInfo = {
|
|
1007
|
+
currentSize: number;
|
|
1008
|
+
limitSize: number;
|
|
1009
|
+
};
|
|
1010
|
+
type RemoveStorageReturns = {
|
|
1011
|
+
errorKeys: string[];
|
|
1012
|
+
};
|
|
1013
|
+
type GetUserInfoReturns = {
|
|
1014
|
+
userInfo: {
|
|
1015
|
+
id: string;
|
|
1016
|
+
name: string;
|
|
1017
|
+
avatar: string;
|
|
1018
|
+
idByOA?: string;
|
|
1019
|
+
};
|
|
1020
|
+
};
|
|
1021
|
+
type GetNetworkTypeReturns = {
|
|
1022
|
+
networkType: NetworkType;
|
|
1023
|
+
};
|
|
1024
|
+
type iBeaconInfo = {
|
|
1025
|
+
/** The iBeacon device broadcast UUID. */
|
|
1026
|
+
uuid: string;
|
|
1027
|
+
/** The iBeacon device primary ID. */
|
|
1028
|
+
major: string;
|
|
1029
|
+
/** The iBeacon device secondary ID. */
|
|
1030
|
+
minor: string;
|
|
1031
|
+
/** The iBeacon device distance. */
|
|
1032
|
+
distance: number;
|
|
1033
|
+
/** The signal strength of the device. */
|
|
1034
|
+
rssi: number;
|
|
1035
|
+
};
|
|
1036
|
+
type GetBeaconDiscoveryReturns = {
|
|
1037
|
+
beacons: Array<iBeaconInfo>;
|
|
1038
|
+
};
|
|
1039
|
+
type ScanQRCodeReturns = {
|
|
1040
|
+
content: string;
|
|
1041
|
+
};
|
|
1042
|
+
type OpenPostFeedReturns = {
|
|
1043
|
+
status: 0 | 1;
|
|
1044
|
+
shareType: 0 | 1 | 2;
|
|
1045
|
+
numberOfUser: number;
|
|
1046
|
+
};
|
|
1047
|
+
type OpenShareSheetReturns = {
|
|
1048
|
+
status: 0 | 2 | 1;
|
|
1049
|
+
shareType: 0 | 2 | 1;
|
|
1050
|
+
numberOfUser: number;
|
|
1051
|
+
};
|
|
1052
|
+
type RequestCameraPermissionReturns = {
|
|
1053
|
+
userAllow: boolean;
|
|
1054
|
+
message: string;
|
|
1055
|
+
};
|
|
1056
|
+
type OpenBioAuthenticationReturns = {
|
|
1057
|
+
code: number;
|
|
1058
|
+
message: string;
|
|
1059
|
+
data: {
|
|
1060
|
+
domain: string;
|
|
1061
|
+
code: number;
|
|
1062
|
+
message: string;
|
|
1063
|
+
payToken: string;
|
|
1064
|
+
};
|
|
1065
|
+
};
|
|
1066
|
+
type CheckStateBioAuthenticationReturns = {
|
|
1067
|
+
bioState: string;
|
|
1068
|
+
};
|
|
1069
|
+
type KeepScreenReturns = {
|
|
1070
|
+
success: boolean;
|
|
1071
|
+
};
|
|
1072
|
+
type OpenWebviewReturns = {
|
|
1073
|
+
success: boolean;
|
|
1074
|
+
};
|
|
1075
|
+
type GetAppInfoReturns = {
|
|
1076
|
+
description: string;
|
|
1077
|
+
version: string;
|
|
1078
|
+
name: string;
|
|
1079
|
+
appUrl: string;
|
|
1080
|
+
qrCodeUrl: string;
|
|
1081
|
+
logoUrl?: string;
|
|
1082
|
+
};
|
|
1083
|
+
type GetPhoneNumberReturns = {
|
|
1084
|
+
number?: string;
|
|
1085
|
+
token?: string;
|
|
1086
|
+
};
|
|
1087
|
+
type OpenProfilePickerReturns = {
|
|
1088
|
+
users: {
|
|
1089
|
+
id: string;
|
|
1090
|
+
profile: {
|
|
1091
|
+
name: string;
|
|
1092
|
+
avatar: string;
|
|
1093
|
+
};
|
|
1094
|
+
code: number;
|
|
1095
|
+
message: string;
|
|
1096
|
+
}[];
|
|
1097
|
+
};
|
|
1098
|
+
type OpenMediaPickerReturns = {
|
|
1099
|
+
data: string;
|
|
1100
|
+
};
|
|
1101
|
+
/**
|
|
1102
|
+
* Context info
|
|
1103
|
+
*/
|
|
1104
|
+
type ContextInfo = {
|
|
1105
|
+
type?: string;
|
|
1106
|
+
id?: string;
|
|
1107
|
+
};
|
|
1108
|
+
type GetAuthCodeReturns = {
|
|
1109
|
+
authCode: string;
|
|
1110
|
+
authCodeVerify: string;
|
|
1111
|
+
};
|
|
1112
|
+
type GetZPITokenReturns = {
|
|
1113
|
+
utoken: string;
|
|
1114
|
+
gtoken: string;
|
|
1115
|
+
zpp: string;
|
|
1116
|
+
};
|
|
1117
|
+
type ChooseImageReturns = {
|
|
1118
|
+
filePaths: Array<string>;
|
|
1119
|
+
tempFiles: Array<{
|
|
1120
|
+
path: string;
|
|
1121
|
+
size: number;
|
|
1122
|
+
}>;
|
|
1123
|
+
};
|
|
1124
|
+
type CreateOrderReturns = {
|
|
1125
|
+
orderId: string;
|
|
1126
|
+
};
|
|
1127
|
+
type CheckTransactionReturns = {
|
|
1128
|
+
msg: string;
|
|
1129
|
+
orderId: string;
|
|
1130
|
+
transId: string;
|
|
1131
|
+
resultCode: number;
|
|
1132
|
+
transTime: string;
|
|
1133
|
+
createdAt: string;
|
|
1134
|
+
};
|
|
1135
|
+
|
|
1136
|
+
declare function login(args?: AsyncCallback<string>): Promise<string>;
|
|
1137
|
+
|
|
1138
|
+
declare function getAccessToken(args: AsyncCallback<string>): Promise<string>;
|
|
1139
|
+
|
|
1140
|
+
declare function getVersion(): string;
|
|
1141
|
+
|
|
1142
|
+
declare function getSystemInfo(): SystemInfo;
|
|
1143
|
+
|
|
1144
|
+
declare const setNavigationBarTitleArgs: ZodOptional<ZodObject<{
|
|
1145
|
+
title: ZodString;
|
|
1146
|
+
}, "strip", ZodTypeAny, {
|
|
1147
|
+
title: string;
|
|
1148
|
+
}, {
|
|
1149
|
+
title: string;
|
|
1150
|
+
}>>[];
|
|
1151
|
+
declare function setNavigationBarTitle(args: AsyncVoidCallback & TypeOf<typeof setNavigationBarTitleArgs[0]>): Promise<void>;
|
|
1152
|
+
|
|
1153
|
+
declare const setNavigationBarColorArgs: ZodOptional<ZodObject<{
|
|
1154
|
+
color: ZodString;
|
|
1155
|
+
textColor: ZodOptional<ZodEnum<["black", "white"]>>;
|
|
1156
|
+
statusBarColor: ZodOptional<ZodString>;
|
|
1157
|
+
}, "strip", ZodTypeAny, {
|
|
1158
|
+
textColor?: "black" | "white" | undefined;
|
|
1159
|
+
statusBarColor?: string | undefined;
|
|
1160
|
+
color: string;
|
|
1161
|
+
}, {
|
|
1162
|
+
textColor?: "black" | "white" | undefined;
|
|
1163
|
+
statusBarColor?: string | undefined;
|
|
1164
|
+
color: string;
|
|
1165
|
+
}>>[];
|
|
1166
|
+
declare function setNavigationBarColor(args: AsyncVoidCallback & TypeOf<typeof setNavigationBarColorArgs[0]>): Promise<void>;
|
|
1167
|
+
|
|
1168
|
+
declare const setNavigationBarLeftButtonArgs: ZodOptional<ZodObject<{
|
|
1169
|
+
type: ZodEnum<["none", "back", "home", "both"]>;
|
|
1170
|
+
}, "strip", ZodTypeAny, {
|
|
1171
|
+
type: "none" | "back" | "home" | "both";
|
|
1172
|
+
}, {
|
|
1173
|
+
type: "none" | "back" | "home" | "both";
|
|
1174
|
+
}>>[];
|
|
1175
|
+
declare function setNavigationBarLeftButton(args: AsyncVoidCallback & TypeOf<typeof setNavigationBarLeftButtonArgs[0]>): Promise<void>;
|
|
1176
|
+
|
|
1177
|
+
declare const setStorageArgs: ZodOptional<ZodObject<{
|
|
1178
|
+
data: ZodRecord<ZodString, ZodAny>;
|
|
1179
|
+
}, "strip", ZodTypeAny, {
|
|
1180
|
+
data: Record<string, any>;
|
|
1181
|
+
}, {
|
|
1182
|
+
data: Record<string, any>;
|
|
1183
|
+
}>>[];
|
|
1184
|
+
declare function setStorage(args: AsyncCallback<SetStorageReturns> & TypeOf<typeof setStorageArgs[0]>): Promise<SetStorageReturns>;
|
|
1185
|
+
|
|
1186
|
+
declare const getStorageArgs: ZodOptional<ZodObject<{
|
|
1187
|
+
keys: ZodArray<ZodString, "many">;
|
|
1188
|
+
}, "strip", ZodTypeAny, {
|
|
1189
|
+
keys: string[];
|
|
1190
|
+
}, {
|
|
1191
|
+
keys: string[];
|
|
1192
|
+
}>>[];
|
|
1193
|
+
declare function getStorage(args: AsyncCallback<GetStorageReturns> & TypeOf<typeof getStorageArgs[0]>): Promise<GetStorageReturns>;
|
|
1194
|
+
|
|
1195
|
+
declare function getStorageInfo(args: AsyncCallback<StorageInfo>): Promise<StorageInfo>;
|
|
1196
|
+
|
|
1197
|
+
declare const removeStorageArgs: ZodOptional<ZodObject<{
|
|
1198
|
+
keys: ZodArray<ZodString, "many">;
|
|
1199
|
+
}, "strip", ZodTypeAny, {
|
|
1200
|
+
keys: string[];
|
|
1201
|
+
}, {
|
|
1202
|
+
keys: string[];
|
|
1203
|
+
}>>[];
|
|
1204
|
+
declare function removeStorage(args: AsyncCallback<RemoveStorageReturns> & TypeOf<typeof removeStorageArgs[0]>): Promise<RemoveStorageReturns>;
|
|
1205
|
+
|
|
1206
|
+
declare const clearStorageArgs: ZodOptional<ZodObject<{
|
|
1207
|
+
prefix: ZodOptional<ZodString>;
|
|
1208
|
+
}, "strip", ZodTypeAny, {
|
|
1209
|
+
prefix?: string | undefined;
|
|
1210
|
+
}, {
|
|
1211
|
+
prefix?: string | undefined;
|
|
1212
|
+
}>>[];
|
|
1213
|
+
declare function clearStorage(args: AsyncVoidCallback & TypeOf<typeof clearStorageArgs[0]>): Promise<void>;
|
|
1214
|
+
|
|
1215
|
+
declare const getUserInfoArgs: ZodOptional<ZodObject<{
|
|
1216
|
+
avatarType: ZodOptional<ZodEnum<["small", "normal", "large"]>>;
|
|
1217
|
+
}, "strip", ZodTypeAny, {
|
|
1218
|
+
avatarType?: "small" | "normal" | "large" | undefined;
|
|
1219
|
+
}, {
|
|
1220
|
+
avatarType?: "small" | "normal" | "large" | undefined;
|
|
1221
|
+
}>>[];
|
|
1222
|
+
declare function getUserInfo(args: AsyncCallback<GetUserInfoReturns> & TypeOf<typeof getUserInfoArgs[0]>): Promise<GetUserInfoReturns>;
|
|
1223
|
+
|
|
1224
|
+
declare function getNetworkType(args: AsyncCallback<GetNetworkTypeReturns>): Promise<GetNetworkTypeReturns>;
|
|
1225
|
+
|
|
1226
|
+
declare const onNetworkStatusChangeArgs: ZodFunction<ZodTuple<[ZodObject<{
|
|
1227
|
+
isConnected: ZodBoolean;
|
|
1228
|
+
networkType: ZodEnum<["none", "wifi", "cellular", "unknown"]>;
|
|
1229
|
+
}, "strip", ZodTypeAny, {
|
|
1230
|
+
isConnected: boolean;
|
|
1231
|
+
networkType: "unknown" | "none" | "wifi" | "cellular";
|
|
1232
|
+
}, {
|
|
1233
|
+
isConnected: boolean;
|
|
1234
|
+
networkType: "unknown" | "none" | "wifi" | "cellular";
|
|
1235
|
+
}>], ZodUnknown>, ZodVoid>[];
|
|
1236
|
+
declare function onNetworkStatusChange(args: TypeOf<typeof onNetworkStatusChangeArgs[0]>): void;
|
|
1237
|
+
|
|
1238
|
+
declare const startBeaconDiscoveryArgs: ZodOptional<ZodObject<{
|
|
1239
|
+
scanningType: ZodOptional<ZodDefault<ZodEffects<ZodNumber, number, number>>>;
|
|
1240
|
+
expire: ZodOptional<ZodNumber>;
|
|
1241
|
+
monitorInterval: ZodOptional<ZodNumber>;
|
|
1242
|
+
domain: ZodOptional<ZodString>;
|
|
1243
|
+
scanConfig: ZodOptional<ZodObject<{
|
|
1244
|
+
scanTime: ZodOptional<ZodNumber>;
|
|
1245
|
+
timeBetweenScan: ZodOptional<ZodNumber>;
|
|
1246
|
+
beaconTimeout: ZodOptional<ZodNumber>;
|
|
1247
|
+
delayCheckConnectedTimeout: ZodOptional<ZodNumber>;
|
|
1248
|
+
beaconConnectedTimeout: ZodOptional<ZodNumber>;
|
|
1249
|
+
}, "strip", ZodTypeAny, {
|
|
1250
|
+
scanTime?: number | undefined;
|
|
1251
|
+
timeBetweenScan?: number | undefined;
|
|
1252
|
+
beaconTimeout?: number | undefined;
|
|
1253
|
+
delayCheckConnectedTimeout?: number | undefined;
|
|
1254
|
+
beaconConnectedTimeout?: number | undefined;
|
|
1255
|
+
}, {
|
|
1256
|
+
scanTime?: number | undefined;
|
|
1257
|
+
timeBetweenScan?: number | undefined;
|
|
1258
|
+
beaconTimeout?: number | undefined;
|
|
1259
|
+
delayCheckConnectedTimeout?: number | undefined;
|
|
1260
|
+
beaconConnectedTimeout?: number | undefined;
|
|
1261
|
+
}>>;
|
|
1262
|
+
items: ZodOptional<ZodArray<ZodObject<{
|
|
1263
|
+
id: ZodOptional<ZodString>;
|
|
1264
|
+
distance: ZodOptional<ZodNumber>;
|
|
1265
|
+
monitor: ZodOptional<ZodObject<{
|
|
1266
|
+
enable: ZodOptional<ZodBoolean>;
|
|
1267
|
+
movingRange: ZodOptional<ZodNumber>;
|
|
1268
|
+
}, "strip", ZodTypeAny, {
|
|
1269
|
+
enable?: boolean | undefined;
|
|
1270
|
+
movingRange?: number | undefined;
|
|
1271
|
+
}, {
|
|
1272
|
+
enable?: boolean | undefined;
|
|
1273
|
+
movingRange?: number | undefined;
|
|
1274
|
+
}>>;
|
|
1275
|
+
}, "strip", ZodTypeAny, {
|
|
1276
|
+
id?: string | undefined;
|
|
1277
|
+
distance?: number | undefined;
|
|
1278
|
+
monitor?: {
|
|
1279
|
+
enable?: boolean | undefined;
|
|
1280
|
+
movingRange?: number | undefined;
|
|
1281
|
+
} | undefined;
|
|
1282
|
+
}, {
|
|
1283
|
+
id?: string | undefined;
|
|
1284
|
+
distance?: number | undefined;
|
|
1285
|
+
monitor?: {
|
|
1286
|
+
enable?: boolean | undefined;
|
|
1287
|
+
movingRange?: number | undefined;
|
|
1288
|
+
} | undefined;
|
|
1289
|
+
}>, "many">>;
|
|
1290
|
+
scanFromSource: ZodOptional<ZodString>;
|
|
1291
|
+
}, "strip", ZodTypeAny, {
|
|
1292
|
+
scanningType?: number | undefined;
|
|
1293
|
+
expire?: number | undefined;
|
|
1294
|
+
monitorInterval?: number | undefined;
|
|
1295
|
+
domain?: string | undefined;
|
|
1296
|
+
scanConfig?: {
|
|
1297
|
+
scanTime?: number | undefined;
|
|
1298
|
+
timeBetweenScan?: number | undefined;
|
|
1299
|
+
beaconTimeout?: number | undefined;
|
|
1300
|
+
delayCheckConnectedTimeout?: number | undefined;
|
|
1301
|
+
beaconConnectedTimeout?: number | undefined;
|
|
1302
|
+
} | undefined;
|
|
1303
|
+
items?: {
|
|
1304
|
+
id?: string | undefined;
|
|
1305
|
+
distance?: number | undefined;
|
|
1306
|
+
monitor?: {
|
|
1307
|
+
enable?: boolean | undefined;
|
|
1308
|
+
movingRange?: number | undefined;
|
|
1309
|
+
} | undefined;
|
|
1310
|
+
}[] | undefined;
|
|
1311
|
+
scanFromSource?: string | undefined;
|
|
1312
|
+
}, {
|
|
1313
|
+
scanningType?: number | undefined;
|
|
1314
|
+
expire?: number | undefined;
|
|
1315
|
+
monitorInterval?: number | undefined;
|
|
1316
|
+
domain?: string | undefined;
|
|
1317
|
+
scanConfig?: {
|
|
1318
|
+
scanTime?: number | undefined;
|
|
1319
|
+
timeBetweenScan?: number | undefined;
|
|
1320
|
+
beaconTimeout?: number | undefined;
|
|
1321
|
+
delayCheckConnectedTimeout?: number | undefined;
|
|
1322
|
+
beaconConnectedTimeout?: number | undefined;
|
|
1323
|
+
} | undefined;
|
|
1324
|
+
items?: {
|
|
1325
|
+
id?: string | undefined;
|
|
1326
|
+
distance?: number | undefined;
|
|
1327
|
+
monitor?: {
|
|
1328
|
+
enable?: boolean | undefined;
|
|
1329
|
+
movingRange?: number | undefined;
|
|
1330
|
+
} | undefined;
|
|
1331
|
+
}[] | undefined;
|
|
1332
|
+
scanFromSource?: string | undefined;
|
|
1333
|
+
}>>[];
|
|
1334
|
+
declare function startBeaconDiscovery(args: AsyncCallback<boolean> & TypeOf<typeof startBeaconDiscoveryArgs[0]>): Promise<boolean>;
|
|
1335
|
+
|
|
1336
|
+
declare function stopBeaconDiscovery(args: AsyncCallback<boolean>): Promise<boolean>;
|
|
1337
|
+
|
|
1338
|
+
declare function getBeacons(args: AsyncCallback<GetBeaconDiscoveryReturns>): Promise<GetBeaconDiscoveryReturns>;
|
|
1339
|
+
|
|
1340
|
+
declare function closeApp(args: AsyncVoidCallback): Promise<void>;
|
|
1341
|
+
|
|
1342
|
+
declare function scanQRCode(args: AsyncCallback<ScanQRCodeReturns>): Promise<ScanQRCodeReturns>;
|
|
1343
|
+
|
|
1344
|
+
declare const openProfileArgs: ZodOptional<ZodObject<{
|
|
1345
|
+
id: ZodString;
|
|
1346
|
+
type: ZodEnum<["user", "oa", "aliasOA"]>;
|
|
1347
|
+
sourceId: ZodOptional<ZodAny>;
|
|
1348
|
+
sourceIndex: ZodOptional<ZodAny>;
|
|
1349
|
+
}, "strip", ZodTypeAny, {
|
|
1350
|
+
sourceId?: any;
|
|
1351
|
+
sourceIndex?: any;
|
|
1352
|
+
type: "user" | "oa" | "aliasOA";
|
|
1353
|
+
id: string;
|
|
1354
|
+
}, {
|
|
1355
|
+
sourceId?: any;
|
|
1356
|
+
sourceIndex?: any;
|
|
1357
|
+
type: "user" | "oa" | "aliasOA";
|
|
1358
|
+
id: string;
|
|
1359
|
+
}>>[];
|
|
1360
|
+
declare function openProfile(args: AsyncVoidCallback & TypeOf<typeof openProfileArgs[0]>): Promise<void>;
|
|
1361
|
+
|
|
1362
|
+
declare const openChatArgs: ZodOptional<ZodObject<{
|
|
1363
|
+
id: ZodString;
|
|
1364
|
+
type: ZodEnum<["user", "oa"]>;
|
|
1365
|
+
sourceId: ZodOptional<ZodAny>;
|
|
1366
|
+
sourceIndex: ZodOptional<ZodAny>;
|
|
1367
|
+
message: ZodOptional<ZodString>;
|
|
1368
|
+
}, "strip", ZodTypeAny, {
|
|
1369
|
+
message?: string | undefined;
|
|
1370
|
+
sourceId?: any;
|
|
1371
|
+
sourceIndex?: any;
|
|
1372
|
+
type: "user" | "oa";
|
|
1373
|
+
id: string;
|
|
1374
|
+
}, {
|
|
1375
|
+
message?: string | undefined;
|
|
1376
|
+
sourceId?: any;
|
|
1377
|
+
sourceIndex?: any;
|
|
1378
|
+
type: "user" | "oa";
|
|
1379
|
+
id: string;
|
|
1380
|
+
}>>[];
|
|
1381
|
+
declare function openChat(args: AsyncVoidCallback & TypeOf<typeof openChatArgs[0]>): Promise<void>;
|
|
1382
|
+
|
|
1383
|
+
declare const openPostFeedArgs: ZodUnion<[ZodObject<{
|
|
1384
|
+
type: ZodEnum<["image"]>;
|
|
1385
|
+
data: ZodObject<{
|
|
1386
|
+
imageUrl: ZodOptional<ZodString>;
|
|
1387
|
+
}, "strip", ZodTypeAny, {
|
|
1388
|
+
imageUrl?: string | undefined;
|
|
1389
|
+
}, {
|
|
1390
|
+
imageUrl?: string | undefined;
|
|
1391
|
+
}>;
|
|
1392
|
+
}, "strip", ZodTypeAny, {
|
|
1393
|
+
type: "image";
|
|
1394
|
+
data: {
|
|
1395
|
+
imageUrl?: string | undefined;
|
|
1396
|
+
};
|
|
1397
|
+
}, {
|
|
1398
|
+
type: "image";
|
|
1399
|
+
data: {
|
|
1400
|
+
imageUrl?: string | undefined;
|
|
1401
|
+
};
|
|
1402
|
+
}>, ZodObject<{
|
|
1403
|
+
type: ZodEnum<["link"]>;
|
|
1404
|
+
data: ZodObject<{
|
|
1405
|
+
link: ZodString;
|
|
1406
|
+
title: ZodOptional<ZodString>;
|
|
1407
|
+
thumb: ZodOptional<ZodString>;
|
|
1408
|
+
description: ZodOptional<ZodDefault<ZodString>>;
|
|
1409
|
+
}, "strip", ZodTypeAny, {
|
|
1410
|
+
title?: string | undefined;
|
|
1411
|
+
thumb?: string | undefined;
|
|
1412
|
+
description?: string | undefined;
|
|
1413
|
+
link: string;
|
|
1414
|
+
}, {
|
|
1415
|
+
title?: string | undefined;
|
|
1416
|
+
thumb?: string | undefined;
|
|
1417
|
+
description?: string | undefined;
|
|
1418
|
+
link: string;
|
|
1419
|
+
}>;
|
|
1420
|
+
}, "strip", ZodTypeAny, {
|
|
1421
|
+
type: "link";
|
|
1422
|
+
data: {
|
|
1423
|
+
title?: string | undefined;
|
|
1424
|
+
thumb?: string | undefined;
|
|
1425
|
+
description?: string | undefined;
|
|
1426
|
+
link: string;
|
|
1427
|
+
};
|
|
1428
|
+
}, {
|
|
1429
|
+
type: "link";
|
|
1430
|
+
data: {
|
|
1431
|
+
title?: string | undefined;
|
|
1432
|
+
thumb?: string | undefined;
|
|
1433
|
+
description?: string | undefined;
|
|
1434
|
+
link: string;
|
|
1435
|
+
};
|
|
1436
|
+
}>, ZodObject<{
|
|
1437
|
+
type: ZodEnum<["profile"]>;
|
|
1438
|
+
data: ZodObject<{
|
|
1439
|
+
id: ZodOptional<ZodString>;
|
|
1440
|
+
}, "strip", ZodTypeAny, {
|
|
1441
|
+
id?: string | undefined;
|
|
1442
|
+
}, {
|
|
1443
|
+
id?: string | undefined;
|
|
1444
|
+
}>;
|
|
1445
|
+
}, "strip", ZodTypeAny, {
|
|
1446
|
+
type: "profile";
|
|
1447
|
+
data: {
|
|
1448
|
+
id?: string | undefined;
|
|
1449
|
+
};
|
|
1450
|
+
}, {
|
|
1451
|
+
type: "profile";
|
|
1452
|
+
data: {
|
|
1453
|
+
id?: string | undefined;
|
|
1454
|
+
};
|
|
1455
|
+
}>]>[];
|
|
1456
|
+
declare function openPostFeed(args: AsyncCallback<OpenPostFeedReturns> & TypeOf<typeof openPostFeedArgs[0]>): Promise<OpenPostFeedReturns>;
|
|
1457
|
+
|
|
1458
|
+
declare const followOAArgs: ZodOptional<ZodObject<{
|
|
1459
|
+
id: ZodString;
|
|
1460
|
+
showDialogConfirm: ZodOptional<ZodBoolean>;
|
|
1461
|
+
}, "strip", ZodTypeAny, {
|
|
1462
|
+
showDialogConfirm?: boolean | undefined;
|
|
1463
|
+
id: string;
|
|
1464
|
+
}, {
|
|
1465
|
+
showDialogConfirm?: boolean | undefined;
|
|
1466
|
+
id: string;
|
|
1467
|
+
}>>[];
|
|
1468
|
+
declare function followOA(args: AsyncVoidCallback & TypeOf<typeof followOAArgs[0]>): Promise<void>;
|
|
1469
|
+
|
|
1470
|
+
declare const unfollowOAArgs: ZodOptional<ZodObject<{
|
|
1471
|
+
id: ZodString;
|
|
1472
|
+
}, "strip", ZodTypeAny, {
|
|
1473
|
+
id: string;
|
|
1474
|
+
}, {
|
|
1475
|
+
id: string;
|
|
1476
|
+
}>>[];
|
|
1477
|
+
declare function unfollowOA(args: AsyncVoidCallback & TypeOf<typeof unfollowOAArgs[0]>): Promise<void>;
|
|
1478
|
+
|
|
1479
|
+
declare const openShareSheetArgs: ZodUnion<[ZodObject<{
|
|
1480
|
+
type: ZodEnum<["image"]>;
|
|
1481
|
+
data: ZodObject<{
|
|
1482
|
+
imageUrl: ZodOptional<ZodString>;
|
|
1483
|
+
imageUrls: ZodOptional<ZodArray<ZodString, "many">>;
|
|
1484
|
+
}, "strip", ZodTypeAny, {
|
|
1485
|
+
imageUrl?: string | undefined;
|
|
1486
|
+
imageUrls?: string[] | undefined;
|
|
1487
|
+
}, {
|
|
1488
|
+
imageUrl?: string | undefined;
|
|
1489
|
+
imageUrls?: string[] | undefined;
|
|
1490
|
+
}>;
|
|
1491
|
+
}, "strip", ZodTypeAny, {
|
|
1492
|
+
type: "image";
|
|
1493
|
+
data: {
|
|
1494
|
+
imageUrl?: string | undefined;
|
|
1495
|
+
imageUrls?: string[] | undefined;
|
|
1496
|
+
};
|
|
1497
|
+
}, {
|
|
1498
|
+
type: "image";
|
|
1499
|
+
data: {
|
|
1500
|
+
imageUrl?: string | undefined;
|
|
1501
|
+
imageUrls?: string[] | undefined;
|
|
1502
|
+
};
|
|
1503
|
+
}>, ZodObject<{
|
|
1504
|
+
type: ZodEnum<["link"]>;
|
|
1505
|
+
data: ZodObject<{
|
|
1506
|
+
link: ZodOptional<ZodString>;
|
|
1507
|
+
}, "strip", ZodTypeAny, {
|
|
1508
|
+
link?: string | undefined;
|
|
1509
|
+
}, {
|
|
1510
|
+
link?: string | undefined;
|
|
1511
|
+
}>;
|
|
1512
|
+
}, "strip", ZodTypeAny, {
|
|
1513
|
+
type: "link";
|
|
1514
|
+
data: {
|
|
1515
|
+
link?: string | undefined;
|
|
1516
|
+
};
|
|
1517
|
+
}, {
|
|
1518
|
+
type: "link";
|
|
1519
|
+
data: {
|
|
1520
|
+
link?: string | undefined;
|
|
1521
|
+
};
|
|
1522
|
+
}>, ZodObject<{
|
|
1523
|
+
type: ZodEnum<["oa"]>;
|
|
1524
|
+
data: ZodObject<{
|
|
1525
|
+
id: ZodOptional<ZodString>;
|
|
1526
|
+
}, "strip", ZodTypeAny, {
|
|
1527
|
+
id?: string | undefined;
|
|
1528
|
+
}, {
|
|
1529
|
+
id?: string | undefined;
|
|
1530
|
+
}>;
|
|
1531
|
+
}, "strip", ZodTypeAny, {
|
|
1532
|
+
type: "oa";
|
|
1533
|
+
data: {
|
|
1534
|
+
id?: string | undefined;
|
|
1535
|
+
};
|
|
1536
|
+
}, {
|
|
1537
|
+
type: "oa";
|
|
1538
|
+
data: {
|
|
1539
|
+
id?: string | undefined;
|
|
1540
|
+
};
|
|
1541
|
+
}>, ZodObject<{
|
|
1542
|
+
type: ZodEnum<["gif"]>;
|
|
1543
|
+
data: ZodObject<{
|
|
1544
|
+
gifUrl: ZodOptional<ZodString>;
|
|
1545
|
+
}, "strip", ZodTypeAny, {
|
|
1546
|
+
gifUrl?: string | undefined;
|
|
1547
|
+
}, {
|
|
1548
|
+
gifUrl?: string | undefined;
|
|
1549
|
+
}>;
|
|
1550
|
+
}, "strip", ZodTypeAny, {
|
|
1551
|
+
type: "gif";
|
|
1552
|
+
data: {
|
|
1553
|
+
gifUrl?: string | undefined;
|
|
1554
|
+
};
|
|
1555
|
+
}, {
|
|
1556
|
+
type: "gif";
|
|
1557
|
+
data: {
|
|
1558
|
+
gifUrl?: string | undefined;
|
|
1559
|
+
};
|
|
1560
|
+
}>, ZodObject<{
|
|
1561
|
+
type: ZodEnum<["video"]>;
|
|
1562
|
+
data: ZodObject<{
|
|
1563
|
+
videoThumb: ZodOptional<ZodString>;
|
|
1564
|
+
videoUrl: ZodOptional<ZodString>;
|
|
1565
|
+
}, "strip", ZodTypeAny, {
|
|
1566
|
+
videoThumb?: string | undefined;
|
|
1567
|
+
videoUrl?: string | undefined;
|
|
1568
|
+
}, {
|
|
1569
|
+
videoThumb?: string | undefined;
|
|
1570
|
+
videoUrl?: string | undefined;
|
|
1571
|
+
}>;
|
|
1572
|
+
}, "strip", ZodTypeAny, {
|
|
1573
|
+
type: "video";
|
|
1574
|
+
data: {
|
|
1575
|
+
videoThumb?: string | undefined;
|
|
1576
|
+
videoUrl?: string | undefined;
|
|
1577
|
+
};
|
|
1578
|
+
}, {
|
|
1579
|
+
type: "video";
|
|
1580
|
+
data: {
|
|
1581
|
+
videoThumb?: string | undefined;
|
|
1582
|
+
videoUrl?: string | undefined;
|
|
1583
|
+
};
|
|
1584
|
+
}>, ZodObject<{
|
|
1585
|
+
type: ZodEnum<["zmp"]>;
|
|
1586
|
+
data: ZodObject<{
|
|
1587
|
+
title: ZodOptional<ZodString>;
|
|
1588
|
+
thumbnail: ZodOptional<ZodString>;
|
|
1589
|
+
path: ZodOptional<ZodString>;
|
|
1590
|
+
description: ZodOptional<ZodDefault<ZodString>>;
|
|
1591
|
+
}, "strip", ZodTypeAny, {
|
|
1592
|
+
path?: string | undefined;
|
|
1593
|
+
title?: string | undefined;
|
|
1594
|
+
description?: string | undefined;
|
|
1595
|
+
thumbnail?: string | undefined;
|
|
1596
|
+
}, {
|
|
1597
|
+
path?: string | undefined;
|
|
1598
|
+
title?: string | undefined;
|
|
1599
|
+
description?: string | undefined;
|
|
1600
|
+
thumbnail?: string | undefined;
|
|
1601
|
+
}>;
|
|
1602
|
+
}, "strip", ZodTypeAny, {
|
|
1603
|
+
type: "zmp";
|
|
1604
|
+
data: {
|
|
1605
|
+
path?: string | undefined;
|
|
1606
|
+
title?: string | undefined;
|
|
1607
|
+
description?: string | undefined;
|
|
1608
|
+
thumbnail?: string | undefined;
|
|
1609
|
+
};
|
|
1610
|
+
}, {
|
|
1611
|
+
type: "zmp";
|
|
1612
|
+
data: {
|
|
1613
|
+
path?: string | undefined;
|
|
1614
|
+
title?: string | undefined;
|
|
1615
|
+
description?: string | undefined;
|
|
1616
|
+
thumbnail?: string | undefined;
|
|
1617
|
+
};
|
|
1618
|
+
}>]>[];
|
|
1619
|
+
declare function openShareSheet(args: AsyncCallback<OpenShareSheetReturns> & TypeOf<typeof openShareSheetArgs[0]>): Promise<OpenShareSheetReturns>;
|
|
1620
|
+
|
|
1621
|
+
declare function requestCameraPermission(args: AsyncCallback<RequestCameraPermissionReturns>): Promise<RequestCameraPermissionReturns>;
|
|
1622
|
+
|
|
1623
|
+
declare const createShortcutArgs: ZodOptional<ZodObject<{
|
|
1624
|
+
params: ZodOptional<ZodRecord<ZodString, ZodString>>;
|
|
1625
|
+
}, "strip", ZodTypeAny, {
|
|
1626
|
+
params?: Record<string, string> | undefined;
|
|
1627
|
+
}, {
|
|
1628
|
+
params?: Record<string, string> | undefined;
|
|
1629
|
+
}>>[];
|
|
1630
|
+
declare function createShortcut(args: AsyncCallback<any> & TypeOf<typeof createShortcutArgs[0]>): Promise<any>;
|
|
1631
|
+
|
|
1632
|
+
declare const openBioAuthenticationArgs: ZodOptional<ZodObject<{
|
|
1633
|
+
secretData: ZodString;
|
|
1634
|
+
ui: ZodOptional<ZodObject<{
|
|
1635
|
+
title: ZodOptional<ZodDefault<ZodString>>;
|
|
1636
|
+
subTitle: ZodOptional<ZodDefault<ZodString>>;
|
|
1637
|
+
negativeButtonText: ZodOptional<ZodDefault<ZodString>>;
|
|
1638
|
+
}, "strip", ZodTypeAny, {
|
|
1639
|
+
title?: string | undefined;
|
|
1640
|
+
subTitle?: string | undefined;
|
|
1641
|
+
negativeButtonText?: string | undefined;
|
|
1642
|
+
}, {
|
|
1643
|
+
title?: string | undefined;
|
|
1644
|
+
subTitle?: string | undefined;
|
|
1645
|
+
negativeButtonText?: string | undefined;
|
|
1646
|
+
}>>;
|
|
1647
|
+
requireFingerprint: ZodOptional<ZodDefault<ZodBoolean>>;
|
|
1648
|
+
}, "strip", ZodTypeAny, {
|
|
1649
|
+
ui?: {
|
|
1650
|
+
title?: string | undefined;
|
|
1651
|
+
subTitle?: string | undefined;
|
|
1652
|
+
negativeButtonText?: string | undefined;
|
|
1653
|
+
} | undefined;
|
|
1654
|
+
requireFingerprint?: boolean | undefined;
|
|
1655
|
+
secretData: string;
|
|
1656
|
+
}, {
|
|
1657
|
+
ui?: {
|
|
1658
|
+
title?: string | undefined;
|
|
1659
|
+
subTitle?: string | undefined;
|
|
1660
|
+
negativeButtonText?: string | undefined;
|
|
1661
|
+
} | undefined;
|
|
1662
|
+
requireFingerprint?: boolean | undefined;
|
|
1663
|
+
secretData: string;
|
|
1664
|
+
}>>[];
|
|
1665
|
+
declare function openBioAuthentication(args: AsyncCallback<OpenBioAuthenticationReturns> & TypeOf<typeof openBioAuthenticationArgs[0]>): Promise<OpenBioAuthenticationReturns>;
|
|
1666
|
+
|
|
1667
|
+
declare function checkStateBioAuthentication(args: AsyncCallback<CheckStateBioAuthenticationReturns>): Promise<CheckStateBioAuthenticationReturns>;
|
|
1668
|
+
|
|
1669
|
+
declare const showToastArgs: ZodOptional<ZodObject<{
|
|
1670
|
+
message: ZodString;
|
|
1671
|
+
}, "strip", ZodTypeAny, {
|
|
1672
|
+
message: string;
|
|
1673
|
+
}, {
|
|
1674
|
+
message: string;
|
|
1675
|
+
}>>[];
|
|
1676
|
+
declare function showToast(args: AsyncVoidCallback & TypeOf<typeof showToastArgs[0]>): Promise<void>;
|
|
1677
|
+
|
|
1678
|
+
declare function hideKeyboard(args: AsyncVoidCallback): Promise<void>;
|
|
1679
|
+
|
|
1680
|
+
declare const openPhoneArgs: ZodObject<{
|
|
1681
|
+
phoneNumber: ZodString;
|
|
1682
|
+
}, "strip", ZodTypeAny, {
|
|
1683
|
+
phoneNumber: string;
|
|
1684
|
+
}, {
|
|
1685
|
+
phoneNumber: string;
|
|
1686
|
+
}>[];
|
|
1687
|
+
declare function openPhone(args: AsyncVoidCallback & TypeOf<typeof openPhoneArgs[0]>): Promise<void>;
|
|
1688
|
+
|
|
1689
|
+
declare const openSMSArgs: ZodObject<{
|
|
1690
|
+
content: ZodString;
|
|
1691
|
+
phoneNumber: ZodString;
|
|
1692
|
+
}, "strip", ZodTypeAny, {
|
|
1693
|
+
phoneNumber: string;
|
|
1694
|
+
content: string;
|
|
1695
|
+
}, {
|
|
1696
|
+
phoneNumber: string;
|
|
1697
|
+
content: string;
|
|
1698
|
+
}>[];
|
|
1699
|
+
declare function openSMS(args: AsyncVoidCallback & TypeOf<typeof openSMSArgs[0]>): Promise<void>;
|
|
1700
|
+
|
|
1701
|
+
declare const viewOAQrArgs: ZodObject<{
|
|
1702
|
+
id: ZodString;
|
|
1703
|
+
displayName: ZodOptional<ZodDefault<ZodString>>;
|
|
1704
|
+
}, "strip", ZodTypeAny, {
|
|
1705
|
+
displayName?: string | undefined;
|
|
1706
|
+
id: string;
|
|
1707
|
+
}, {
|
|
1708
|
+
displayName?: string | undefined;
|
|
1709
|
+
id: string;
|
|
1710
|
+
}>[];
|
|
1711
|
+
declare function viewOAQr(args: AsyncVoidCallback & TypeOf<typeof viewOAQrArgs[0]>): Promise<void>;
|
|
1712
|
+
|
|
1713
|
+
declare const keepScreenArgs: ZodObject<{
|
|
1714
|
+
keepScreenOn: ZodBoolean;
|
|
1715
|
+
}, "strip", ZodTypeAny, {
|
|
1716
|
+
keepScreenOn: boolean;
|
|
1717
|
+
}, {
|
|
1718
|
+
keepScreenOn: boolean;
|
|
1719
|
+
}>[];
|
|
1720
|
+
declare function keepScreen(args: AsyncCallback<KeepScreenReturns> & TypeOf<typeof keepScreenArgs[0]>): Promise<void>;
|
|
1721
|
+
|
|
1722
|
+
declare function onKeepScreen(args: AsyncVoidCallback): Promise<void>;
|
|
1723
|
+
|
|
1724
|
+
declare function offKeepScreen(args: AsyncVoidCallback): Promise<void>;
|
|
1725
|
+
|
|
1726
|
+
declare const saveImageToGalleryArgs: ZodOptional<ZodObject<{
|
|
1727
|
+
imageBase64Data: ZodOptional<ZodString>;
|
|
1728
|
+
imageUrl: ZodOptional<ZodString>;
|
|
1729
|
+
}, "strip", ZodTypeAny, {
|
|
1730
|
+
imageUrl?: string | undefined;
|
|
1731
|
+
imageBase64Data?: string | undefined;
|
|
1732
|
+
}, {
|
|
1733
|
+
imageUrl?: string | undefined;
|
|
1734
|
+
imageBase64Data?: string | undefined;
|
|
1735
|
+
}>>[];
|
|
1736
|
+
declare function saveImageToGallery(args: AsyncVoidCallback & TypeOf<typeof saveImageToGalleryArgs[0]>): Promise<void>;
|
|
1737
|
+
|
|
1738
|
+
declare const openMiniAppArgs: ZodObject<{
|
|
1739
|
+
appId: ZodString;
|
|
1740
|
+
params: ZodOptional<ZodRecord<ZodString, ZodString>>;
|
|
1741
|
+
}, "strip", ZodTypeAny, {
|
|
1742
|
+
params?: Record<string, string> | undefined;
|
|
1743
|
+
appId: string;
|
|
1744
|
+
}, {
|
|
1745
|
+
params?: Record<string, string> | undefined;
|
|
1746
|
+
appId: string;
|
|
1747
|
+
}>[];
|
|
1748
|
+
declare function openMiniApp(args: AsyncVoidCallback & TypeOf<typeof openMiniAppArgs[0]>): Promise<void>;
|
|
1749
|
+
|
|
1750
|
+
declare const vibrateArgs: ZodObject<{
|
|
1751
|
+
type: ZodEnum<["oneShot"]>;
|
|
1752
|
+
milliseconds: ZodOptional<ZodNumber>;
|
|
1753
|
+
}, "strip", ZodTypeAny, {
|
|
1754
|
+
milliseconds?: number | undefined;
|
|
1755
|
+
type: "oneShot";
|
|
1756
|
+
}, {
|
|
1757
|
+
milliseconds?: number | undefined;
|
|
1758
|
+
type: "oneShot";
|
|
1759
|
+
}>[];
|
|
1760
|
+
declare function vibrate(args: AsyncVoidCallback & TypeOf<typeof vibrateArgs[0]>): Promise<void>;
|
|
1761
|
+
|
|
1762
|
+
declare const openWebviewArgs: ZodObject<{
|
|
1763
|
+
url: ZodString;
|
|
1764
|
+
}, "strip", ZodTypeAny, {
|
|
1765
|
+
url: string;
|
|
1766
|
+
}, {
|
|
1767
|
+
url: string;
|
|
1768
|
+
}>[];
|
|
1769
|
+
declare function openWebview(args: AsyncCallback<OpenWebviewReturns> & TypeOf<typeof openWebviewArgs[0]>): Promise<void>;
|
|
1770
|
+
|
|
1771
|
+
declare function getRouteParams(): Record<string, string>;
|
|
1772
|
+
|
|
1773
|
+
declare function getAppInfo(args: AsyncCallback<GetAppInfoReturns>): Promise<GetAppInfoReturns>;
|
|
1774
|
+
|
|
1775
|
+
declare const sendDataToPreviousMiniAppArgs: ZodObject<{
|
|
1776
|
+
data: ZodAny;
|
|
1777
|
+
}, "strip", ZodTypeAny, {
|
|
1778
|
+
data?: any;
|
|
1779
|
+
}, {
|
|
1780
|
+
data?: any;
|
|
1781
|
+
}>[];
|
|
1782
|
+
declare function sendDataToPreviousMiniApp(args: AsyncVoidCallback & TypeOf<typeof sendDataToPreviousMiniAppArgs[0]>): Promise<void>;
|
|
1783
|
+
|
|
1784
|
+
declare function getPhoneNumber(args: AsyncCallback<GetPhoneNumberReturns>): Promise<GetPhoneNumberReturns>;
|
|
1785
|
+
|
|
1786
|
+
declare const openProfilePickerArgs: ZodObject<{
|
|
1787
|
+
maxProfile: ZodDefault<ZodOptional<ZodNumber>>;
|
|
1788
|
+
}, "strip", ZodTypeAny, {
|
|
1789
|
+
maxProfile: number;
|
|
1790
|
+
}, {
|
|
1791
|
+
maxProfile?: number | undefined;
|
|
1792
|
+
}>[];
|
|
1793
|
+
declare function openProfilePicker(args: AsyncCallback<OpenProfilePickerReturns> & TypeOf<typeof openProfilePickerArgs[0]>): Promise<OpenProfilePickerReturns>;
|
|
1794
|
+
|
|
1795
|
+
declare const connectWifiArgs: ZodObject<{
|
|
1796
|
+
SSID: ZodString;
|
|
1797
|
+
password: ZodOptional<ZodString>;
|
|
1798
|
+
hiddenSSID: ZodOptional<ZodBoolean>;
|
|
1799
|
+
}, "strip", ZodTypeAny, {
|
|
1800
|
+
password?: string | undefined;
|
|
1801
|
+
hiddenSSID?: boolean | undefined;
|
|
1802
|
+
SSID: string;
|
|
1803
|
+
}, {
|
|
1804
|
+
password?: string | undefined;
|
|
1805
|
+
hiddenSSID?: boolean | undefined;
|
|
1806
|
+
SSID: string;
|
|
1807
|
+
}>[];
|
|
1808
|
+
declare function connectWifi(args: AsyncVoidCallback & TypeOf<typeof connectWifiArgs[0]>): Promise<void>;
|
|
1809
|
+
|
|
1810
|
+
declare const openMediaPickerArgs: ZodObject<{
|
|
1811
|
+
type: ZodEnum<["video", "photo", "file", "zcamera", "zcamera_photo", "zcamera_video", "zcamera_scan"]>;
|
|
1812
|
+
serverUploadUrl: ZodString;
|
|
1813
|
+
maxItemSize: ZodOptional<ZodNumber>;
|
|
1814
|
+
editView: ZodOptional<ZodObject<{
|
|
1815
|
+
enable: ZodOptional<ZodBoolean>;
|
|
1816
|
+
aspectRatio: ZodOptional<ZodString>;
|
|
1817
|
+
}, "strip", ZodTypeAny, {
|
|
1818
|
+
enable?: boolean | undefined;
|
|
1819
|
+
aspectRatio?: string | undefined;
|
|
1820
|
+
}, {
|
|
1821
|
+
enable?: boolean | undefined;
|
|
1822
|
+
aspectRatio?: string | undefined;
|
|
1823
|
+
}>>;
|
|
1824
|
+
silentRequest: ZodOptional<ZodBoolean>;
|
|
1825
|
+
maxSelectItem: ZodOptional<ZodNumber>;
|
|
1826
|
+
}, "strip", ZodTypeAny, {
|
|
1827
|
+
maxItemSize?: number | undefined;
|
|
1828
|
+
editView?: {
|
|
1829
|
+
enable?: boolean | undefined;
|
|
1830
|
+
aspectRatio?: string | undefined;
|
|
1831
|
+
} | undefined;
|
|
1832
|
+
silentRequest?: boolean | undefined;
|
|
1833
|
+
maxSelectItem?: number | undefined;
|
|
1834
|
+
type: "video" | "photo" | "file" | "zcamera" | "zcamera_photo" | "zcamera_video" | "zcamera_scan";
|
|
1835
|
+
serverUploadUrl: string;
|
|
1836
|
+
}, {
|
|
1837
|
+
maxItemSize?: number | undefined;
|
|
1838
|
+
editView?: {
|
|
1839
|
+
enable?: boolean | undefined;
|
|
1840
|
+
aspectRatio?: string | undefined;
|
|
1841
|
+
} | undefined;
|
|
1842
|
+
silentRequest?: boolean | undefined;
|
|
1843
|
+
maxSelectItem?: number | undefined;
|
|
1844
|
+
type: "video" | "photo" | "file" | "zcamera" | "zcamera_photo" | "zcamera_video" | "zcamera_scan";
|
|
1845
|
+
serverUploadUrl: string;
|
|
1846
|
+
}>[];
|
|
1847
|
+
declare function openMediaPicker(args: AsyncCallback<OpenMediaPickerReturns> & TypeOf<typeof openMediaPickerArgs[0]>): Promise<OpenMediaPickerReturns>;
|
|
1848
|
+
|
|
1849
|
+
declare const getShareableLinkArgs: ZodObject<{
|
|
1850
|
+
title: ZodString;
|
|
1851
|
+
description: ZodDefault<ZodString>;
|
|
1852
|
+
thumbnail: ZodOptional<ZodString>;
|
|
1853
|
+
path: ZodOptional<ZodString>;
|
|
1854
|
+
}, "strip", ZodTypeAny, {
|
|
1855
|
+
path?: string | undefined;
|
|
1856
|
+
thumbnail?: string | undefined;
|
|
1857
|
+
title: string;
|
|
1858
|
+
description: string;
|
|
1859
|
+
}, {
|
|
1860
|
+
path?: string | undefined;
|
|
1861
|
+
description?: string | undefined;
|
|
1862
|
+
thumbnail?: string | undefined;
|
|
1863
|
+
title: string;
|
|
1864
|
+
}>[];
|
|
1865
|
+
declare function getShareableLink(args: AsyncCallback<string> & TypeOf<typeof getShareableLinkArgs[0]>): Promise<string>;
|
|
1866
|
+
|
|
1867
|
+
declare function closeLoading(args: AsyncVoidCallback): Promise<void>;
|
|
1868
|
+
|
|
1869
|
+
declare function requestUpdateZalo(args: AsyncVoidCallback): Promise<void>;
|
|
1870
|
+
|
|
1871
|
+
declare const onConfirmToExitArgs: ZodFunction<ZodTuple<[], ZodUnknown>, ZodUnknown>[];
|
|
1872
|
+
declare function onConfirmToExit(args: TypeOf<typeof onConfirmToExitArgs[0]>): void;
|
|
1873
|
+
|
|
1874
|
+
declare function offConfirmToExit(): void;
|
|
1875
|
+
|
|
1876
|
+
declare function getDeviceId(): string;
|
|
1877
|
+
|
|
1878
|
+
declare function getDeviceIdAsync(args: AsyncCallback<string>): Promise<string>;
|
|
1879
|
+
|
|
1880
|
+
declare function getContext(): ContextInfo | null;
|
|
1881
|
+
|
|
1882
|
+
declare function getContextAsync(args: AsyncCallback<ContextInfo>): Promise<ContextInfo | null>;
|
|
1883
|
+
|
|
1884
|
+
declare function getAuthCode(args: AsyncCallback<GetAuthCodeReturns>): Promise<GetAuthCodeReturns>;
|
|
1885
|
+
|
|
1886
|
+
declare function getZPIToken(args: AsyncCallback<GetZPITokenReturns>): Promise<GetZPITokenReturns>;
|
|
1887
|
+
|
|
1888
|
+
declare const setAccessTokenArgs: ZodString[];
|
|
1889
|
+
declare function setAccessToken(args: TypeOf<typeof setAccessTokenArgs[0]>): void;
|
|
1890
|
+
|
|
1891
|
+
declare const openOutAppArgs: ZodObject<{
|
|
1892
|
+
url: ZodString;
|
|
1893
|
+
}, "strip", ZodTypeAny, {
|
|
1894
|
+
url: string;
|
|
1895
|
+
}, {
|
|
1896
|
+
url: string;
|
|
1897
|
+
}>[];
|
|
1898
|
+
declare function openOutApp(args: TypeOf<typeof openOutAppArgs[0]>): Promise<void>;
|
|
1899
|
+
|
|
1900
|
+
declare const chooseImageArgs: ZodObject<{
|
|
1901
|
+
count: ZodDefault<ZodOptional<ZodNumber>>;
|
|
1902
|
+
sourceType: ZodOptional<ZodDefault<ZodArray<ZodEnum<["album", "camera"]>, "many">>>;
|
|
1903
|
+
cameraType: ZodOptional<ZodDefault<ZodEnum<["back", "front"]>>>;
|
|
1904
|
+
}, "strip", ZodTypeAny, {
|
|
1905
|
+
sourceType?: ("album" | "camera")[] | undefined;
|
|
1906
|
+
cameraType?: "back" | "front" | undefined;
|
|
1907
|
+
count: number;
|
|
1908
|
+
}, {
|
|
1909
|
+
count?: number | undefined;
|
|
1910
|
+
sourceType?: ("album" | "camera")[] | undefined;
|
|
1911
|
+
cameraType?: "back" | "front" | undefined;
|
|
1912
|
+
}>[];
|
|
1913
|
+
declare function chooseImage(args: AsyncCallback<ChooseImageReturns> & TypeOf<typeof chooseImageArgs[0]>): Promise<ChooseImageReturns>;
|
|
1914
|
+
|
|
1915
|
+
declare function getLocation(args: AsyncCallback<GetLocationReturns>): Promise<GetLocationReturns>;
|
|
1916
|
+
|
|
1917
|
+
declare const onCallbackDataArgs: ZodFunction<ZodTuple<[ZodObject<{
|
|
1918
|
+
data: ZodAny;
|
|
1919
|
+
}, "strip", ZodTypeAny, {
|
|
1920
|
+
data?: any;
|
|
1921
|
+
}, {
|
|
1922
|
+
data?: any;
|
|
1923
|
+
}>], ZodUnknown>, ZodVoid>[];
|
|
1924
|
+
declare function onCallbackData(args: TypeOf<typeof onCallbackDataArgs[0]>): void;
|
|
1925
|
+
|
|
1926
|
+
declare const createOrderArgs: ZodObject<{
|
|
1927
|
+
amount: ZodUnion<[ZodString, ZodNumber]>;
|
|
1928
|
+
item: ZodArray<ZodRecord<ZodString, ZodAny>, "many">;
|
|
1929
|
+
desc: ZodString;
|
|
1930
|
+
extradata: ZodOptional<ZodAny>;
|
|
1931
|
+
method: ZodOptional<ZodEnum<["MOMO", "ZALOPAY", "MOMO_SANDBOX", "ZALOPAY_SANDBOX", "CC", "CC_SANDBOX", "ATM", "ATM_SANDBOX"]>>;
|
|
1932
|
+
}, "strip", ZodTypeAny, {
|
|
1933
|
+
extradata?: any;
|
|
1934
|
+
method?: "MOMO" | "ZALOPAY" | "MOMO_SANDBOX" | "ZALOPAY_SANDBOX" | "CC" | "CC_SANDBOX" | "ATM" | "ATM_SANDBOX" | undefined;
|
|
1935
|
+
amount: string | number;
|
|
1936
|
+
item: Record<string, any>[];
|
|
1937
|
+
desc: string;
|
|
1938
|
+
}, {
|
|
1939
|
+
extradata?: any;
|
|
1940
|
+
method?: "MOMO" | "ZALOPAY" | "MOMO_SANDBOX" | "ZALOPAY_SANDBOX" | "CC" | "CC_SANDBOX" | "ATM" | "ATM_SANDBOX" | undefined;
|
|
1941
|
+
amount: string | number;
|
|
1942
|
+
item: Record<string, any>[];
|
|
1943
|
+
desc: string;
|
|
1944
|
+
}>[];
|
|
1945
|
+
declare function createOrder(args: AsyncCallback<CreateOrderReturns> & TypeOf<typeof createOrderArgs[0]>): Promise<CreateOrderReturns>;
|
|
1946
|
+
|
|
1947
|
+
declare const checkTransactionArgs: ZodObject<{
|
|
1948
|
+
data: ZodUnion<[ZodString, ZodRecord<ZodString, ZodString>]>;
|
|
1949
|
+
}, "strip", ZodTypeAny, {
|
|
1950
|
+
data: string | Record<string, string>;
|
|
1951
|
+
}, {
|
|
1952
|
+
data: string | Record<string, string>;
|
|
1953
|
+
}>[];
|
|
1954
|
+
declare function checkTransaction(args: AsyncCallback<CheckTransactionReturns> & TypeOf<typeof checkTransactionArgs[0]>): Promise<CheckTransactionReturns>;
|
|
1955
|
+
|
|
1956
|
+
declare const events: MPEEmitter;
|
|
1957
|
+
|
|
1958
|
+
export { checkStateBioAuthentication, checkTransaction, chooseImage, clearStorage, closeApp, closeLoading, connectWifi, createOrder, createShortcut, events, followOA, getAccessToken, getAppInfo, getAuthCode, getBeacons, getContext, getContextAsync, getDeviceId, getDeviceIdAsync, getLocation, getNetworkType, getPhoneNumber, getRouteParams, getShareableLink, getStorage, getStorageInfo, getSystemInfo, getUserInfo, getVersion, getZPIToken, hideKeyboard, keepScreen, login, offConfirmToExit, offKeepScreen, onCallbackData, onConfirmToExit, onKeepScreen, onNetworkStatusChange, openBioAuthentication, openChat, openMediaPicker, openMiniApp, openOutApp, openPhone, openPostFeed, openProfile, openProfilePicker, openSMS, openShareSheet, openWebview, removeStorage, requestCameraPermission, requestUpdateZalo, saveImageToGallery, scanQRCode, sendDataToPreviousMiniApp, setAccessToken, setNavigationBarColor, setNavigationBarLeftButton, setNavigationBarTitle, setStorage, showToast, startBeaconDiscovery, stopBeaconDiscovery, unfollowOA, vibrate, viewOAQr };
|