@forgerock/login-widget 1.0.0-alpha.6 → 1.0.0-alpha.8
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/CHANGELOG.md +7 -0
- package/LICENSE +28 -0
- package/README.md +693 -0
- package/inline.cjs +25818 -0
- package/inline.cjs.map +1 -0
- package/inline.d.ts +2003 -0
- package/inline.js +25811 -1
- package/inline.js.map +1 -0
- package/modal.cjs +26537 -0
- package/modal.cjs.map +1 -0
- package/modal.d.ts +2033 -0
- package/modal.js +26529 -1
- package/modal.js.map +1 -0
- package/package.json +20 -4
- package/widget.css +2 -3
- package/_virtual/default.js +0 -1
- package/_virtual/default2.js +0 -1
- package/_virtual/index.js +0 -1
- package/_virtual/index2.js +0 -1
- package/_virtual/parser.js +0 -1
- package/src/lib/_utilities/i18n.utilities.js +0 -1
- package/src/lib/components/_utilities/locale-strings.js +0 -1
- package/src/lib/components/_utilities/server-strings.js +0 -1
- package/src/lib/components/compositions/checkbox/animated.js +0 -1
- package/src/lib/components/compositions/checkbox/standard.js +0 -1
- package/src/lib/components/compositions/dialog/dialog.js +0 -1
- package/src/lib/components/compositions/input-floating/floating-label.js +0 -1
- package/src/lib/components/compositions/input-stacked/stacked-label.js +0 -1
- package/src/lib/components/compositions/radio/animated.js +0 -1
- package/src/lib/components/compositions/select-floating/floating-label.js +0 -1
- package/src/lib/components/icons/alert-icon.js +0 -1
- package/src/lib/components/icons/apple-icon.js +0 -1
- package/src/lib/components/icons/eye-icon.js +0 -1
- package/src/lib/components/icons/facebook-icon.js +0 -1
- package/src/lib/components/icons/google-icon.js +0 -1
- package/src/lib/components/icons/info-icon.js +0 -1
- package/src/lib/components/icons/key-icon.js +0 -1
- package/src/lib/components/icons/lock-icon.js +0 -1
- package/src/lib/components/icons/new-user-icon.js +0 -1
- package/src/lib/components/icons/shield-icon.js +0 -1
- package/src/lib/components/icons/warning-icon.js +0 -1
- package/src/lib/components/icons/x-icon.js +0 -1
- package/src/lib/components/primitives/alert/alert.js +0 -1
- package/src/lib/components/primitives/button/button.js +0 -1
- package/src/lib/components/primitives/checkbox/checkbox.js +0 -1
- package/src/lib/components/primitives/form/form.js +0 -1
- package/src/lib/components/primitives/grid/grid.js +0 -1
- package/src/lib/components/primitives/input/input.js +0 -1
- package/src/lib/components/primitives/label/label.js +0 -1
- package/src/lib/components/primitives/link/link.js +0 -1
- package/src/lib/components/primitives/message/input-message.js +0 -1
- package/src/lib/components/primitives/select/select.js +0 -1
- package/src/lib/components/primitives/spinner/spinner.js +0 -1
- package/src/lib/components/primitives/text/text.js +0 -1
- package/src/lib/journey/_utilities/decode.utilities.js +0 -1
- package/src/lib/journey/_utilities/map-callback.utilities.js +0 -1
- package/src/lib/journey/_utilities/map-stage.utilities.js +0 -1
- package/src/lib/journey/_utilities/metadata.utilities.js +0 -1
- package/src/lib/journey/_utilities/step.utilities.js +0 -1
- package/src/lib/journey/callbacks/_utilities/callback.utilities.js +0 -1
- package/src/lib/journey/callbacks/_utilities/policies.js +0 -1
- package/src/lib/journey/callbacks/boolean/boolean.js +0 -1
- package/src/lib/journey/callbacks/choice/choice.js +0 -1
- package/src/lib/journey/callbacks/confirmation/confirmation.js +0 -1
- package/src/lib/journey/callbacks/hidden-value/hidden-value.js +0 -1
- package/src/lib/journey/callbacks/kba/kba-create.js +0 -1
- package/src/lib/journey/callbacks/password/base.js +0 -1
- package/src/lib/journey/callbacks/password/password.js +0 -1
- package/src/lib/journey/callbacks/password/validated-create-password.js +0 -1
- package/src/lib/journey/callbacks/polling-wait/polling-wait.js +0 -1
- package/src/lib/journey/callbacks/redirect/redirect.js +0 -1
- package/src/lib/journey/callbacks/select-idp/select-idp.js +0 -1
- package/src/lib/journey/callbacks/string-attribute/string-attribute-input.js +0 -1
- package/src/lib/journey/callbacks/terms-and-conditions/terms-conditions.js +0 -1
- package/src/lib/journey/callbacks/text-output/text-output.js +0 -1
- package/src/lib/journey/callbacks/unknown/unknown.js +0 -1
- package/src/lib/journey/callbacks/username/name.js +0 -1
- package/src/lib/journey/callbacks/username/validated-create-username.js +0 -1
- package/src/lib/journey/config.store.js +0 -1
- package/src/lib/journey/journey.js +0 -1
- package/src/lib/journey/journey.store.js +0 -1
- package/src/lib/journey/stages/_utilities/back-to.js +0 -1
- package/src/lib/journey/stages/_utilities/stage.utilities.js +0 -1
- package/src/lib/journey/stages/generic.js +0 -1
- package/src/lib/journey/stages/registration.js +0 -1
- package/src/lib/journey/stages/username-password.js +0 -1
- package/src/lib/links.store.js +0 -1
- package/src/lib/locale.store.js +0 -1
- package/src/lib/oauth/oauth.store.js +0 -1
- package/src/lib/sdk.config.js +0 -1
- package/src/lib/style.store.js +0 -1
- package/src/lib/user/user.store.js +0 -1
- package/src/locales/us/en/index.json.js +0 -1
package/modal.d.ts
ADDED
|
@@ -0,0 +1,2033 @@
|
|
|
1
|
+
interface StringDict<T> {
|
|
2
|
+
[name: string]: T;
|
|
3
|
+
}
|
|
4
|
+
interface Tokens {
|
|
5
|
+
accessToken: string;
|
|
6
|
+
idToken?: string;
|
|
7
|
+
refreshToken?: string;
|
|
8
|
+
tokenExpiry?: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare enum ActionTypes {
|
|
12
|
+
Authenticate = "AUTHENTICATE",
|
|
13
|
+
Authorize = "AUTHORIZE",
|
|
14
|
+
EndSession = "END_SESSION",
|
|
15
|
+
Logout = "LOGOUT",
|
|
16
|
+
ExchangeToken = "EXCHANGE_TOKEN",
|
|
17
|
+
RefreshToken = "REFRESH_TOKEN",
|
|
18
|
+
ResumeAuthenticate = "RESUME_AUTHENTICATE",
|
|
19
|
+
RevokeToken = "REVOKE_TOKEN",
|
|
20
|
+
StartAuthenticate = "START_AUTHENTICATE",
|
|
21
|
+
UserInfo = "USER_INFO"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Types of callbacks directly supported by the SDK.
|
|
26
|
+
*/
|
|
27
|
+
declare enum CallbackType {
|
|
28
|
+
BooleanAttributeInputCallback = "BooleanAttributeInputCallback",
|
|
29
|
+
ChoiceCallback = "ChoiceCallback",
|
|
30
|
+
ConfirmationCallback = "ConfirmationCallback",
|
|
31
|
+
DeviceProfileCallback = "DeviceProfileCallback",
|
|
32
|
+
HiddenValueCallback = "HiddenValueCallback",
|
|
33
|
+
KbaCreateCallback = "KbaCreateCallback",
|
|
34
|
+
MetadataCallback = "MetadataCallback",
|
|
35
|
+
NameCallback = "NameCallback",
|
|
36
|
+
NumberAttributeInputCallback = "NumberAttributeInputCallback",
|
|
37
|
+
PasswordCallback = "PasswordCallback",
|
|
38
|
+
PollingWaitCallback = "PollingWaitCallback",
|
|
39
|
+
ReCaptchaCallback = "ReCaptchaCallback",
|
|
40
|
+
RedirectCallback = "RedirectCallback",
|
|
41
|
+
SelectIdPCallback = "SelectIdPCallback",
|
|
42
|
+
StringAttributeInputCallback = "StringAttributeInputCallback",
|
|
43
|
+
SuspendedTextOutputCallback = "SuspendedTextOutputCallback",
|
|
44
|
+
TermsAndConditionsCallback = "TermsAndConditionsCallback",
|
|
45
|
+
TextInputCallback = "TextInputCallback",
|
|
46
|
+
TextOutputCallback = "TextOutputCallback",
|
|
47
|
+
ValidatedCreatePasswordCallback = "ValidatedCreatePasswordCallback",
|
|
48
|
+
ValidatedCreateUsernameCallback = "ValidatedCreateUsernameCallback"
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Represents the authentication tree API payload schema.
|
|
53
|
+
*/
|
|
54
|
+
interface Step {
|
|
55
|
+
authId?: string;
|
|
56
|
+
callbacks?: Callback[];
|
|
57
|
+
code?: number;
|
|
58
|
+
description?: string;
|
|
59
|
+
detail?: StepDetail;
|
|
60
|
+
header?: string;
|
|
61
|
+
message?: string;
|
|
62
|
+
ok?: string;
|
|
63
|
+
realm?: string;
|
|
64
|
+
reason?: string;
|
|
65
|
+
stage?: string;
|
|
66
|
+
status?: number;
|
|
67
|
+
successUrl?: string;
|
|
68
|
+
tokenId?: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Represents details of a failure in an authentication step.
|
|
72
|
+
*/
|
|
73
|
+
interface StepDetail {
|
|
74
|
+
failedPolicyRequirements?: FailedPolicyRequirement[];
|
|
75
|
+
failureUrl?: string;
|
|
76
|
+
result?: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Represents configuration overrides used when requesting the next
|
|
80
|
+
* step in an authentication tree.
|
|
81
|
+
*/
|
|
82
|
+
interface StepOptions extends ConfigOptions {
|
|
83
|
+
query?: StringDict<string>;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Represents failed policies for a matching property.
|
|
87
|
+
*/
|
|
88
|
+
interface FailedPolicyRequirement {
|
|
89
|
+
policyRequirements: PolicyRequirement[];
|
|
90
|
+
property: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Represents a failed policy policy and failed policy params.
|
|
94
|
+
*/
|
|
95
|
+
interface PolicyRequirement {
|
|
96
|
+
params?: Partial<PolicyParams>;
|
|
97
|
+
policyRequirement: string;
|
|
98
|
+
}
|
|
99
|
+
interface PolicyParams {
|
|
100
|
+
[key: string]: unknown;
|
|
101
|
+
disallowedFields: string;
|
|
102
|
+
duplicateValue: string;
|
|
103
|
+
forbiddenChars: string;
|
|
104
|
+
maxLength: number;
|
|
105
|
+
minLength: number;
|
|
106
|
+
numCaps: number;
|
|
107
|
+
numNums: number;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Represents the authentication tree API callback schema.
|
|
111
|
+
*/
|
|
112
|
+
interface Callback {
|
|
113
|
+
_id?: number;
|
|
114
|
+
input?: NameValue[];
|
|
115
|
+
output: NameValue[];
|
|
116
|
+
type: CallbackType;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Represents a name/value pair found in an authentication tree callback.
|
|
120
|
+
*/
|
|
121
|
+
interface NameValue {
|
|
122
|
+
name: string;
|
|
123
|
+
value: unknown;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Base class for authentication tree callback wrappers.
|
|
128
|
+
*/
|
|
129
|
+
declare class FRCallback {
|
|
130
|
+
payload: Callback;
|
|
131
|
+
/**
|
|
132
|
+
* @param payload The raw payload returned by OpenAM
|
|
133
|
+
*/
|
|
134
|
+
constructor(payload: Callback);
|
|
135
|
+
/**
|
|
136
|
+
* Gets the name of this callback type.
|
|
137
|
+
*/
|
|
138
|
+
getType(): string;
|
|
139
|
+
/**
|
|
140
|
+
* Gets the value of the specified input element, or the first element if `selector` is not
|
|
141
|
+
* provided.
|
|
142
|
+
*
|
|
143
|
+
* @param selector The index position or name of the desired element
|
|
144
|
+
*/
|
|
145
|
+
getInputValue(selector?: number | string): unknown;
|
|
146
|
+
/**
|
|
147
|
+
* Sets the value of the specified input element, or the first element if `selector` is not
|
|
148
|
+
* provided.
|
|
149
|
+
*
|
|
150
|
+
* @param selector The index position or name of the desired element
|
|
151
|
+
*/
|
|
152
|
+
setInputValue(value: unknown, selector?: number | string | RegExp): void;
|
|
153
|
+
/**
|
|
154
|
+
* Gets the value of the specified output element, or the first element if `selector`
|
|
155
|
+
* is not provided.
|
|
156
|
+
*
|
|
157
|
+
* @param selector The index position or name of the desired element
|
|
158
|
+
*/
|
|
159
|
+
getOutputValue(selector?: number | string): unknown;
|
|
160
|
+
/**
|
|
161
|
+
* Gets the value of the first output element with the specified name or the
|
|
162
|
+
* specified default value.
|
|
163
|
+
*
|
|
164
|
+
* @param name The name of the desired element
|
|
165
|
+
*/
|
|
166
|
+
getOutputByName<T>(name: string, defaultValue: T): T;
|
|
167
|
+
private getArrayElement;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
declare type FRCallbackFactory = (callback: Callback) => FRCallback;
|
|
171
|
+
|
|
172
|
+
interface Action {
|
|
173
|
+
type: ActionTypes;
|
|
174
|
+
payload: any;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Configuration options.
|
|
178
|
+
*/
|
|
179
|
+
interface ConfigOptions {
|
|
180
|
+
callbackFactory?: FRCallbackFactory;
|
|
181
|
+
clientId?: string;
|
|
182
|
+
middleware?: RequestMiddleware[];
|
|
183
|
+
realmPath?: string;
|
|
184
|
+
redirectUri?: string;
|
|
185
|
+
scope?: string;
|
|
186
|
+
serverConfig?: ServerConfig;
|
|
187
|
+
support?: 'modern' | 'legacy' | undefined;
|
|
188
|
+
tokenStore?: TokenStoreObject | 'indexedDB' | 'sessionStorage' | 'localStorage';
|
|
189
|
+
tree?: string;
|
|
190
|
+
type?: string;
|
|
191
|
+
oauthThreshold?: number;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Optional configuration for custom paths for actions
|
|
195
|
+
*/
|
|
196
|
+
interface CustomPathConfig {
|
|
197
|
+
authenticate?: string;
|
|
198
|
+
authorize?: string;
|
|
199
|
+
accessToken?: string;
|
|
200
|
+
endSession?: string;
|
|
201
|
+
userInfo?: string;
|
|
202
|
+
revoke?: string;
|
|
203
|
+
sessions?: string;
|
|
204
|
+
}
|
|
205
|
+
declare type RequestMiddleware = (req: RequestObj, action: Action, next: () => RequestObj) => void;
|
|
206
|
+
interface RequestObj {
|
|
207
|
+
url: URL;
|
|
208
|
+
init: RequestInit;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Configuration settings for connecting to a server.
|
|
212
|
+
*/
|
|
213
|
+
interface ServerConfig {
|
|
214
|
+
baseUrl: string;
|
|
215
|
+
paths?: CustomPathConfig;
|
|
216
|
+
timeout: number;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* API for implementing a custom token store
|
|
220
|
+
*/
|
|
221
|
+
interface TokenStoreObject {
|
|
222
|
+
get: (clientId: string) => Promise<Tokens>;
|
|
223
|
+
set: (clientId: string, token: Tokens) => Promise<void>;
|
|
224
|
+
remove: (clientId: string) => Promise<void>;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Tokens returned after successful authentication.
|
|
229
|
+
*/
|
|
230
|
+
interface OAuth2Tokens {
|
|
231
|
+
accessToken: string;
|
|
232
|
+
idToken?: string;
|
|
233
|
+
refreshToken?: string;
|
|
234
|
+
tokenExpiry?: number;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
declare function noop(): void;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* INTERNAL, DO NOT USE. Code may change at any time.
|
|
242
|
+
*/
|
|
243
|
+
interface Fragment {
|
|
244
|
+
key: string | null;
|
|
245
|
+
first: null;
|
|
246
|
+
c: () => void;
|
|
247
|
+
l: (nodes: any) => void;
|
|
248
|
+
h: () => void;
|
|
249
|
+
m: (target: HTMLElement, anchor: any) => void;
|
|
250
|
+
p: (ctx: T$$['ctx'], dirty: T$$['dirty']) => void;
|
|
251
|
+
r: () => void;
|
|
252
|
+
f: () => void;
|
|
253
|
+
a: () => void;
|
|
254
|
+
i: (local: any) => void;
|
|
255
|
+
o: (local: any) => void;
|
|
256
|
+
d: (detaching: 0 | 1) => void;
|
|
257
|
+
}
|
|
258
|
+
interface T$$ {
|
|
259
|
+
dirty: number[];
|
|
260
|
+
ctx: any[];
|
|
261
|
+
bound: any;
|
|
262
|
+
update: () => void;
|
|
263
|
+
callbacks: any;
|
|
264
|
+
after_update: any[];
|
|
265
|
+
props: Record<string, 0 | string>;
|
|
266
|
+
fragment: null | false | Fragment;
|
|
267
|
+
not_equal: any;
|
|
268
|
+
before_update: any[];
|
|
269
|
+
context: Map<any, any>;
|
|
270
|
+
on_mount: any[];
|
|
271
|
+
on_destroy: any[];
|
|
272
|
+
skip_bound: boolean;
|
|
273
|
+
on_disconnect: any[];
|
|
274
|
+
root: Element | ShadowRoot;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Base class for Svelte components. Used when dev=false.
|
|
279
|
+
*/
|
|
280
|
+
declare class SvelteComponent {
|
|
281
|
+
$$: T$$;
|
|
282
|
+
$$set?: ($$props: any) => void;
|
|
283
|
+
$destroy(): void;
|
|
284
|
+
$on(type: any, callback: any): typeof noop;
|
|
285
|
+
$set($$props: any): void;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
declare type Props = Record<string, any>;
|
|
289
|
+
interface ComponentConstructorOptions<Props extends Record<string, any> = Record<string, any>> {
|
|
290
|
+
target: Element | ShadowRoot;
|
|
291
|
+
anchor?: Element;
|
|
292
|
+
props?: Props;
|
|
293
|
+
context?: Map<any, any>;
|
|
294
|
+
hydrate?: boolean;
|
|
295
|
+
intro?: boolean;
|
|
296
|
+
$$inline?: boolean;
|
|
297
|
+
}
|
|
298
|
+
interface SvelteComponentDev$1 {
|
|
299
|
+
$set(props?: Props): void;
|
|
300
|
+
$on(event: string, callback: ((event: any) => void) | null | undefined): () => void;
|
|
301
|
+
$destroy(): void;
|
|
302
|
+
[accessor: string]: any;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Base class for Svelte components with some minor dev-enhancements. Used when dev=true.
|
|
306
|
+
*/
|
|
307
|
+
declare class SvelteComponentDev$1 extends SvelteComponent {
|
|
308
|
+
/**
|
|
309
|
+
* @private
|
|
310
|
+
* For type checking capabilities only.
|
|
311
|
+
* Does not exist at runtime.
|
|
312
|
+
* ### DO NOT USE!
|
|
313
|
+
*/
|
|
314
|
+
$$prop_def: Props;
|
|
315
|
+
/**
|
|
316
|
+
* @private
|
|
317
|
+
* For type checking capabilities only.
|
|
318
|
+
* Does not exist at runtime.
|
|
319
|
+
* ### DO NOT USE!
|
|
320
|
+
*/
|
|
321
|
+
$$events_def: any;
|
|
322
|
+
/**
|
|
323
|
+
* @private
|
|
324
|
+
* For type checking capabilities only.
|
|
325
|
+
* Does not exist at runtime.
|
|
326
|
+
* ### DO NOT USE!
|
|
327
|
+
*/
|
|
328
|
+
$$slot_def: any;
|
|
329
|
+
constructor(options: ComponentConstructorOptions);
|
|
330
|
+
$capture_state(): void;
|
|
331
|
+
$inject_state(): void;
|
|
332
|
+
}
|
|
333
|
+
interface SvelteComponentTyped<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any> {
|
|
334
|
+
$set(props?: Partial<Props>): void;
|
|
335
|
+
$on<K extends Extract<keyof Events, string>>(type: K, callback: ((e: Events[K]) => void) | null | undefined): () => void;
|
|
336
|
+
$destroy(): void;
|
|
337
|
+
[accessor: string]: any;
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Base class to create strongly typed Svelte components.
|
|
341
|
+
* This only exists for typing purposes and should be used in `.d.ts` files.
|
|
342
|
+
*
|
|
343
|
+
* ### Example:
|
|
344
|
+
*
|
|
345
|
+
* You have component library on npm called `component-library`, from which
|
|
346
|
+
* you export a component called `MyComponent`. For Svelte+TypeScript users,
|
|
347
|
+
* you want to provide typings. Therefore you create a `index.d.ts`:
|
|
348
|
+
* ```ts
|
|
349
|
+
* import { SvelteComponentTyped } from "svelte";
|
|
350
|
+
* export class MyComponent extends SvelteComponentTyped<{foo: string}> {}
|
|
351
|
+
* ```
|
|
352
|
+
* Typing this makes it possible for IDEs like VS Code with the Svelte extension
|
|
353
|
+
* to provide intellisense and to use the component like this in a Svelte file
|
|
354
|
+
* with TypeScript:
|
|
355
|
+
* ```svelte
|
|
356
|
+
* <script lang="ts">
|
|
357
|
+
* import { MyComponent } from "component-library";
|
|
358
|
+
* </script>
|
|
359
|
+
* <MyComponent foo={'bar'} />
|
|
360
|
+
* ```
|
|
361
|
+
*
|
|
362
|
+
* #### Why not make this part of `SvelteComponent(Dev)`?
|
|
363
|
+
* Because
|
|
364
|
+
* ```ts
|
|
365
|
+
* class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}
|
|
366
|
+
* const component: typeof SvelteComponent = ASubclassOfSvelteComponent;
|
|
367
|
+
* ```
|
|
368
|
+
* will throw a type error, so we need to separate the more strictly typed class.
|
|
369
|
+
*/
|
|
370
|
+
declare class SvelteComponentTyped<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any> extends SvelteComponentDev$1 {
|
|
371
|
+
/**
|
|
372
|
+
* @private
|
|
373
|
+
* For type checking capabilities only.
|
|
374
|
+
* Does not exist at runtime.
|
|
375
|
+
* ### DO NOT USE!
|
|
376
|
+
*/
|
|
377
|
+
$$prop_def: Props;
|
|
378
|
+
/**
|
|
379
|
+
* @private
|
|
380
|
+
* For type checking capabilities only.
|
|
381
|
+
* Does not exist at runtime.
|
|
382
|
+
* ### DO NOT USE!
|
|
383
|
+
*/
|
|
384
|
+
$$events_def: Events;
|
|
385
|
+
/**
|
|
386
|
+
* @private
|
|
387
|
+
* For type checking capabilities only.
|
|
388
|
+
* Does not exist at runtime.
|
|
389
|
+
* ### DO NOT USE!
|
|
390
|
+
*/
|
|
391
|
+
$$slot_def: Slots;
|
|
392
|
+
constructor(options: ComponentConstructorOptions<Props>);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
interface MessageCreator {
|
|
396
|
+
[key: string]: (propertyName: string, params?: {
|
|
397
|
+
[key: string]: unknown;
|
|
398
|
+
}) => string;
|
|
399
|
+
}
|
|
400
|
+
interface ProcessedPropertyError {
|
|
401
|
+
detail: FailedPolicyRequirement;
|
|
402
|
+
messages: string[];
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Types of steps returned by the authentication tree.
|
|
407
|
+
*/
|
|
408
|
+
declare enum StepType {
|
|
409
|
+
LoginFailure = "LoginFailure",
|
|
410
|
+
LoginSuccess = "LoginSuccess",
|
|
411
|
+
Step = "Step"
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Base interface for all types of authentication step responses.
|
|
416
|
+
*/
|
|
417
|
+
interface AuthResponse {
|
|
418
|
+
type: StepType;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Represents details of a failure in an authentication step.
|
|
422
|
+
*/
|
|
423
|
+
interface FailureDetail {
|
|
424
|
+
failureUrl?: string;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
declare class FRLoginFailure implements AuthResponse {
|
|
428
|
+
payload: Step;
|
|
429
|
+
/**
|
|
430
|
+
* The type of step.
|
|
431
|
+
*/
|
|
432
|
+
readonly type = StepType.LoginFailure;
|
|
433
|
+
/**
|
|
434
|
+
* @param payload The raw payload returned by OpenAM
|
|
435
|
+
*/
|
|
436
|
+
constructor(payload: Step);
|
|
437
|
+
/**
|
|
438
|
+
* Gets the error code.
|
|
439
|
+
*/
|
|
440
|
+
getCode(): number;
|
|
441
|
+
/**
|
|
442
|
+
* Gets the failure details.
|
|
443
|
+
*/
|
|
444
|
+
getDetail(): FailureDetail | undefined;
|
|
445
|
+
/**
|
|
446
|
+
* Gets the failure message.
|
|
447
|
+
*/
|
|
448
|
+
getMessage(): string | undefined;
|
|
449
|
+
/**
|
|
450
|
+
* Gets processed failure message.
|
|
451
|
+
*/
|
|
452
|
+
getProcessedMessage(messageCreator?: MessageCreator): ProcessedPropertyError[];
|
|
453
|
+
/**
|
|
454
|
+
* Gets the failure reason.
|
|
455
|
+
*/
|
|
456
|
+
getReason(): string | undefined;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
declare class FRLoginSuccess implements AuthResponse {
|
|
460
|
+
payload: Step;
|
|
461
|
+
/**
|
|
462
|
+
* The type of step.
|
|
463
|
+
*/
|
|
464
|
+
readonly type = StepType.LoginSuccess;
|
|
465
|
+
/**
|
|
466
|
+
* @param payload The raw payload returned by OpenAM
|
|
467
|
+
*/
|
|
468
|
+
constructor(payload: Step);
|
|
469
|
+
/**
|
|
470
|
+
* Gets the step's realm.
|
|
471
|
+
*/
|
|
472
|
+
getRealm(): string | undefined;
|
|
473
|
+
/**
|
|
474
|
+
* Gets the step's session token.
|
|
475
|
+
*/
|
|
476
|
+
getSessionToken(): string | undefined;
|
|
477
|
+
/**
|
|
478
|
+
* Gets the step's success URL.
|
|
479
|
+
*/
|
|
480
|
+
getSuccessUrl(): string | undefined;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Represents a single step of an authentication tree.
|
|
485
|
+
*/
|
|
486
|
+
declare class FRStep implements AuthResponse {
|
|
487
|
+
payload: Step;
|
|
488
|
+
/**
|
|
489
|
+
* The type of step.
|
|
490
|
+
*/
|
|
491
|
+
readonly type = StepType.Step;
|
|
492
|
+
/**
|
|
493
|
+
* The callbacks contained in this step.
|
|
494
|
+
*/
|
|
495
|
+
callbacks: FRCallback[];
|
|
496
|
+
/**
|
|
497
|
+
* @param payload The raw payload returned by OpenAM
|
|
498
|
+
* @param callbackFactory A function that returns am implementation of FRCallback
|
|
499
|
+
*/
|
|
500
|
+
constructor(payload: Step, callbackFactory?: FRCallbackFactory);
|
|
501
|
+
/**
|
|
502
|
+
* Gets the first callback of the specified type in this step.
|
|
503
|
+
*
|
|
504
|
+
* @param type The type of callback to find.
|
|
505
|
+
*/
|
|
506
|
+
getCallbackOfType<T extends FRCallback>(type: CallbackType): T;
|
|
507
|
+
/**
|
|
508
|
+
* Gets all callbacks of the specified type in this step.
|
|
509
|
+
*
|
|
510
|
+
* @param type The type of callback to find.
|
|
511
|
+
*/
|
|
512
|
+
getCallbacksOfType<T extends FRCallback>(type: CallbackType): T[];
|
|
513
|
+
/**
|
|
514
|
+
* Sets the value of the first callback of the specified type in this step.
|
|
515
|
+
*
|
|
516
|
+
* @param type The type of callback to find.
|
|
517
|
+
* @param value The value to set for the callback.
|
|
518
|
+
*/
|
|
519
|
+
setCallbackValue(type: CallbackType, value: unknown): void;
|
|
520
|
+
/**
|
|
521
|
+
* Gets the step's description.
|
|
522
|
+
*/
|
|
523
|
+
getDescription(): string | undefined;
|
|
524
|
+
/**
|
|
525
|
+
* Gets the step's header.
|
|
526
|
+
*/
|
|
527
|
+
getHeader(): string | undefined;
|
|
528
|
+
/**
|
|
529
|
+
* Gets the step's stage.
|
|
530
|
+
*/
|
|
531
|
+
getStage(): string | undefined;
|
|
532
|
+
private convertCallbacks;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
declare type HandleStep = (step: FRStep) => Promise<FRStep>;
|
|
536
|
+
/**
|
|
537
|
+
* Options to use when making an HTTP call.
|
|
538
|
+
*/
|
|
539
|
+
interface HttpClientRequestOptions {
|
|
540
|
+
bypassAuthentication?: boolean;
|
|
541
|
+
authorization?: {
|
|
542
|
+
config?: ConfigOptions;
|
|
543
|
+
handleStep: HandleStep;
|
|
544
|
+
idToken?: string;
|
|
545
|
+
txnID?: string;
|
|
546
|
+
};
|
|
547
|
+
init: RequestInit;
|
|
548
|
+
requiresNewToken?: RequiresNewTokenFn;
|
|
549
|
+
timeout: number;
|
|
550
|
+
url: string;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* A function that determines whether a new token is required based on a HTTP response.
|
|
554
|
+
*/
|
|
555
|
+
declare type RequiresNewTokenFn = (res: Response) => boolean;
|
|
556
|
+
|
|
557
|
+
interface GetTokensOptions extends ConfigOptions {
|
|
558
|
+
forceRenew?: boolean;
|
|
559
|
+
login?: 'embedded' | 'redirect' | undefined;
|
|
560
|
+
query?: StringDict<string>;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
type Maybe<T> = T | null | undefined;
|
|
564
|
+
|
|
565
|
+
interface JourneyStoreValue {
|
|
566
|
+
completed: boolean;
|
|
567
|
+
error: Maybe<{
|
|
568
|
+
code: Maybe<number>;
|
|
569
|
+
message: Maybe<string>;
|
|
570
|
+
step: Maybe<Step>;
|
|
571
|
+
}>;
|
|
572
|
+
loading: boolean;
|
|
573
|
+
step: StepTypes;
|
|
574
|
+
successful: boolean;
|
|
575
|
+
response: Maybe<Step>;
|
|
576
|
+
}
|
|
577
|
+
type StepTypes = WidgetStep | FRLoginSuccess | FRLoginFailure | null;
|
|
578
|
+
interface WidgetStep extends FRStep {
|
|
579
|
+
/**
|
|
580
|
+
* TODO: It's complicated, but this `any` is needed for `callback` compatibility with
|
|
581
|
+
* the `mapCallbackToComponent`. FRStep types this callback array as `FRCallback[]`
|
|
582
|
+
* which is not _exactly_ correct as it's an array of various types of callbacks, all
|
|
583
|
+
* which extend FRCallback. So, there are heterogeneous types within the array.
|
|
584
|
+
*/
|
|
585
|
+
callbacks: any[];
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
interface OAuthTokenStoreValue {
|
|
589
|
+
completed: boolean;
|
|
590
|
+
error: Maybe<{
|
|
591
|
+
code?: Maybe<number>;
|
|
592
|
+
message: Maybe<string>;
|
|
593
|
+
}>;
|
|
594
|
+
loading: boolean;
|
|
595
|
+
successful: boolean;
|
|
596
|
+
response: Maybe<OAuth2Tokens> | void;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
interface UserStoreValue {
|
|
600
|
+
completed: boolean;
|
|
601
|
+
error: Maybe<{
|
|
602
|
+
code?: Maybe<number>;
|
|
603
|
+
message: Maybe<string>;
|
|
604
|
+
}>;
|
|
605
|
+
loading: boolean;
|
|
606
|
+
successful: boolean;
|
|
607
|
+
response: unknown;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
interface Response$1 {
|
|
611
|
+
journey?: JourneyStoreValue;
|
|
612
|
+
oauth?: OAuthTokenStoreValue;
|
|
613
|
+
user?: UserStoreValue;
|
|
614
|
+
}
|
|
615
|
+
interface JourneyOptions {
|
|
616
|
+
config?: StepOptions;
|
|
617
|
+
journey?: string;
|
|
618
|
+
oauth?: boolean;
|
|
619
|
+
resumeUrl?: string;
|
|
620
|
+
user?: boolean;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
declare type Primitive = string | number | bigint | boolean | null | undefined;
|
|
624
|
+
|
|
625
|
+
declare namespace util {
|
|
626
|
+
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
|
|
627
|
+
export const assertEqual: <A, B>(val: AssertEqual<A, B>) => AssertEqual<A, B>;
|
|
628
|
+
export function assertIs<T>(_arg: T): void;
|
|
629
|
+
export function assertNever(_x: never): never;
|
|
630
|
+
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
631
|
+
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
|
|
632
|
+
export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
633
|
+
export const arrayToEnum: <T extends string, U extends [T, ...T[]]>(items: U) => { [k in U[number]]: k; };
|
|
634
|
+
export const getValidEnumValues: (obj: any) => any[];
|
|
635
|
+
export const objectValues: (obj: any) => any[];
|
|
636
|
+
export const objectKeys: ObjectConstructor["keys"];
|
|
637
|
+
export const find: <T>(arr: T[], checker: (arg: T) => any) => T | undefined;
|
|
638
|
+
export type identity<T> = T;
|
|
639
|
+
export type flatten<T> = identity<{
|
|
640
|
+
[k in keyof T]: T[k];
|
|
641
|
+
}>;
|
|
642
|
+
export type noUndefined<T> = T extends undefined ? never : T;
|
|
643
|
+
export const isInteger: NumberConstructor["isInteger"];
|
|
644
|
+
export function joinValues<T extends any[]>(array: T, separator?: string): string;
|
|
645
|
+
export const jsonStringifyReplacer: (_: string, value: any) => any;
|
|
646
|
+
export {};
|
|
647
|
+
}
|
|
648
|
+
declare const ZodParsedType: {
|
|
649
|
+
function: "function";
|
|
650
|
+
number: "number";
|
|
651
|
+
string: "string";
|
|
652
|
+
nan: "nan";
|
|
653
|
+
integer: "integer";
|
|
654
|
+
float: "float";
|
|
655
|
+
boolean: "boolean";
|
|
656
|
+
date: "date";
|
|
657
|
+
bigint: "bigint";
|
|
658
|
+
symbol: "symbol";
|
|
659
|
+
undefined: "undefined";
|
|
660
|
+
null: "null";
|
|
661
|
+
array: "array";
|
|
662
|
+
object: "object";
|
|
663
|
+
unknown: "unknown";
|
|
664
|
+
promise: "promise";
|
|
665
|
+
void: "void";
|
|
666
|
+
never: "never";
|
|
667
|
+
map: "map";
|
|
668
|
+
set: "set";
|
|
669
|
+
};
|
|
670
|
+
declare type ZodParsedType = keyof typeof ZodParsedType;
|
|
671
|
+
|
|
672
|
+
declare type allKeys<T> = T extends any ? keyof T : never;
|
|
673
|
+
declare type typeToFlattenedError<T, U = string> = {
|
|
674
|
+
formErrors: U[];
|
|
675
|
+
fieldErrors: {
|
|
676
|
+
[P in allKeys<T>]?: U[];
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
declare const ZodIssueCode: {
|
|
680
|
+
invalid_type: "invalid_type";
|
|
681
|
+
invalid_literal: "invalid_literal";
|
|
682
|
+
custom: "custom";
|
|
683
|
+
invalid_union: "invalid_union";
|
|
684
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
685
|
+
invalid_enum_value: "invalid_enum_value";
|
|
686
|
+
unrecognized_keys: "unrecognized_keys";
|
|
687
|
+
invalid_arguments: "invalid_arguments";
|
|
688
|
+
invalid_return_type: "invalid_return_type";
|
|
689
|
+
invalid_date: "invalid_date";
|
|
690
|
+
invalid_string: "invalid_string";
|
|
691
|
+
too_small: "too_small";
|
|
692
|
+
too_big: "too_big";
|
|
693
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
694
|
+
not_multiple_of: "not_multiple_of";
|
|
695
|
+
};
|
|
696
|
+
declare type ZodIssueCode = keyof typeof ZodIssueCode;
|
|
697
|
+
declare type ZodIssueBase = {
|
|
698
|
+
path: (string | number)[];
|
|
699
|
+
message?: string;
|
|
700
|
+
};
|
|
701
|
+
interface ZodInvalidTypeIssue extends ZodIssueBase {
|
|
702
|
+
code: typeof ZodIssueCode.invalid_type;
|
|
703
|
+
expected: ZodParsedType;
|
|
704
|
+
received: ZodParsedType;
|
|
705
|
+
}
|
|
706
|
+
interface ZodInvalidLiteralIssue extends ZodIssueBase {
|
|
707
|
+
code: typeof ZodIssueCode.invalid_literal;
|
|
708
|
+
expected: unknown;
|
|
709
|
+
}
|
|
710
|
+
interface ZodUnrecognizedKeysIssue extends ZodIssueBase {
|
|
711
|
+
code: typeof ZodIssueCode.unrecognized_keys;
|
|
712
|
+
keys: string[];
|
|
713
|
+
}
|
|
714
|
+
interface ZodInvalidUnionIssue extends ZodIssueBase {
|
|
715
|
+
code: typeof ZodIssueCode.invalid_union;
|
|
716
|
+
unionErrors: ZodError[];
|
|
717
|
+
}
|
|
718
|
+
interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {
|
|
719
|
+
code: typeof ZodIssueCode.invalid_union_discriminator;
|
|
720
|
+
options: Primitive[];
|
|
721
|
+
}
|
|
722
|
+
interface ZodInvalidEnumValueIssue extends ZodIssueBase {
|
|
723
|
+
received: string | number;
|
|
724
|
+
code: typeof ZodIssueCode.invalid_enum_value;
|
|
725
|
+
options: (string | number)[];
|
|
726
|
+
}
|
|
727
|
+
interface ZodInvalidArgumentsIssue extends ZodIssueBase {
|
|
728
|
+
code: typeof ZodIssueCode.invalid_arguments;
|
|
729
|
+
argumentsError: ZodError;
|
|
730
|
+
}
|
|
731
|
+
interface ZodInvalidReturnTypeIssue extends ZodIssueBase {
|
|
732
|
+
code: typeof ZodIssueCode.invalid_return_type;
|
|
733
|
+
returnTypeError: ZodError;
|
|
734
|
+
}
|
|
735
|
+
interface ZodInvalidDateIssue extends ZodIssueBase {
|
|
736
|
+
code: typeof ZodIssueCode.invalid_date;
|
|
737
|
+
}
|
|
738
|
+
declare type StringValidation = "email" | "url" | "uuid" | "regex" | "cuid" | {
|
|
739
|
+
startsWith: string;
|
|
740
|
+
} | {
|
|
741
|
+
endsWith: string;
|
|
742
|
+
};
|
|
743
|
+
interface ZodInvalidStringIssue extends ZodIssueBase {
|
|
744
|
+
code: typeof ZodIssueCode.invalid_string;
|
|
745
|
+
validation: StringValidation;
|
|
746
|
+
}
|
|
747
|
+
interface ZodTooSmallIssue extends ZodIssueBase {
|
|
748
|
+
code: typeof ZodIssueCode.too_small;
|
|
749
|
+
minimum: number;
|
|
750
|
+
inclusive: boolean;
|
|
751
|
+
type: "array" | "string" | "number" | "set" | "date";
|
|
752
|
+
}
|
|
753
|
+
interface ZodTooBigIssue extends ZodIssueBase {
|
|
754
|
+
code: typeof ZodIssueCode.too_big;
|
|
755
|
+
maximum: number;
|
|
756
|
+
inclusive: boolean;
|
|
757
|
+
type: "array" | "string" | "number" | "set" | "date";
|
|
758
|
+
}
|
|
759
|
+
interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
|
|
760
|
+
code: typeof ZodIssueCode.invalid_intersection_types;
|
|
761
|
+
}
|
|
762
|
+
interface ZodNotMultipleOfIssue extends ZodIssueBase {
|
|
763
|
+
code: typeof ZodIssueCode.not_multiple_of;
|
|
764
|
+
multipleOf: number;
|
|
765
|
+
}
|
|
766
|
+
interface ZodCustomIssue extends ZodIssueBase {
|
|
767
|
+
code: typeof ZodIssueCode.custom;
|
|
768
|
+
params?: {
|
|
769
|
+
[k: string]: any;
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
declare type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodCustomIssue;
|
|
773
|
+
declare type ZodIssue = ZodIssueOptionalMessage & {
|
|
774
|
+
message: string;
|
|
775
|
+
};
|
|
776
|
+
declare type ZodFormattedError<T, U = string> = {
|
|
777
|
+
_errors: U[];
|
|
778
|
+
} & (T extends [any, ...any[]] ? {
|
|
779
|
+
[K in keyof T]?: ZodFormattedError<T[K]>;
|
|
780
|
+
} : T extends any[] ? {
|
|
781
|
+
[k: number]: ZodFormattedError<T[number]>;
|
|
782
|
+
} : T extends object ? {
|
|
783
|
+
[K in keyof T]?: ZodFormattedError<T[K]>;
|
|
784
|
+
} : unknown);
|
|
785
|
+
declare class ZodError<T = any> extends Error {
|
|
786
|
+
issues: ZodIssue[];
|
|
787
|
+
get errors(): ZodIssue[];
|
|
788
|
+
constructor(issues: ZodIssue[]);
|
|
789
|
+
format(): ZodFormattedError<T>;
|
|
790
|
+
format<U>(mapper: (issue: ZodIssue) => U): ZodFormattedError<T, U>;
|
|
791
|
+
static create: (issues: ZodIssue[]) => ZodError<any>;
|
|
792
|
+
toString(): string;
|
|
793
|
+
get message(): string;
|
|
794
|
+
get isEmpty(): boolean;
|
|
795
|
+
addIssue: (sub: ZodIssue) => void;
|
|
796
|
+
addIssues: (subs?: ZodIssue[]) => void;
|
|
797
|
+
flatten(): typeToFlattenedError<T>;
|
|
798
|
+
flatten<U>(mapper?: (issue: ZodIssue) => U): typeToFlattenedError<T, U>;
|
|
799
|
+
get formErrors(): typeToFlattenedError<T, string>;
|
|
800
|
+
}
|
|
801
|
+
declare type stripPath<T extends object> = T extends any ? util.OmitKeys<T, "path"> : never;
|
|
802
|
+
declare type IssueData = stripPath<ZodIssueOptionalMessage> & {
|
|
803
|
+
path?: (string | number)[];
|
|
804
|
+
fatal?: boolean;
|
|
805
|
+
};
|
|
806
|
+
declare type ErrorMapCtx = {
|
|
807
|
+
defaultError: string;
|
|
808
|
+
data: any;
|
|
809
|
+
};
|
|
810
|
+
declare type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => {
|
|
811
|
+
message: string;
|
|
812
|
+
};
|
|
813
|
+
|
|
814
|
+
declare type ParseParams = {
|
|
815
|
+
path: (string | number)[];
|
|
816
|
+
errorMap: ZodErrorMap;
|
|
817
|
+
async: boolean;
|
|
818
|
+
};
|
|
819
|
+
declare type ParsePathComponent = string | number;
|
|
820
|
+
declare type ParsePath = ParsePathComponent[];
|
|
821
|
+
interface ParseContext {
|
|
822
|
+
readonly common: {
|
|
823
|
+
readonly issues: ZodIssue[];
|
|
824
|
+
readonly contextualErrorMap?: ZodErrorMap;
|
|
825
|
+
readonly async: boolean;
|
|
826
|
+
};
|
|
827
|
+
readonly path: ParsePath;
|
|
828
|
+
readonly schemaErrorMap?: ZodErrorMap;
|
|
829
|
+
readonly parent: ParseContext | null;
|
|
830
|
+
readonly data: any;
|
|
831
|
+
readonly parsedType: ZodParsedType;
|
|
832
|
+
}
|
|
833
|
+
declare type ParseInput = {
|
|
834
|
+
data: any;
|
|
835
|
+
path: (string | number)[];
|
|
836
|
+
parent: ParseContext;
|
|
837
|
+
};
|
|
838
|
+
declare class ParseStatus {
|
|
839
|
+
value: "aborted" | "dirty" | "valid";
|
|
840
|
+
dirty(): void;
|
|
841
|
+
abort(): void;
|
|
842
|
+
static mergeArray(status: ParseStatus, results: SyncParseReturnType<any>[]): SyncParseReturnType;
|
|
843
|
+
static mergeObjectAsync(status: ParseStatus, pairs: {
|
|
844
|
+
key: ParseReturnType<any>;
|
|
845
|
+
value: ParseReturnType<any>;
|
|
846
|
+
}[]): Promise<SyncParseReturnType<any>>;
|
|
847
|
+
static mergeObjectSync(status: ParseStatus, pairs: {
|
|
848
|
+
key: SyncParseReturnType<any>;
|
|
849
|
+
value: SyncParseReturnType<any>;
|
|
850
|
+
alwaysSet?: boolean;
|
|
851
|
+
}[]): SyncParseReturnType;
|
|
852
|
+
}
|
|
853
|
+
declare type INVALID = {
|
|
854
|
+
status: "aborted";
|
|
855
|
+
};
|
|
856
|
+
declare const INVALID: INVALID;
|
|
857
|
+
declare type DIRTY<T> = {
|
|
858
|
+
status: "dirty";
|
|
859
|
+
value: T;
|
|
860
|
+
};
|
|
861
|
+
declare const DIRTY: <T>(value: T) => DIRTY<T>;
|
|
862
|
+
declare type OK<T> = {
|
|
863
|
+
status: "valid";
|
|
864
|
+
value: T;
|
|
865
|
+
};
|
|
866
|
+
declare const OK: <T>(value: T) => OK<T>;
|
|
867
|
+
declare type SyncParseReturnType<T = any> = OK<T> | DIRTY<T> | INVALID;
|
|
868
|
+
declare type AsyncParseReturnType<T> = Promise<SyncParseReturnType<T>>;
|
|
869
|
+
declare type ParseReturnType<T> = SyncParseReturnType<T> | AsyncParseReturnType<T>;
|
|
870
|
+
|
|
871
|
+
declare namespace enumUtil {
|
|
872
|
+
type UnionToIntersectionFn<T> = (T extends unknown ? (k: () => T) => void : never) extends (k: infer Intersection) => void ? Intersection : never;
|
|
873
|
+
type GetUnionLast<T> = UnionToIntersectionFn<T> extends () => infer Last ? Last : never;
|
|
874
|
+
type UnionToTuple<T, Tuple extends unknown[] = []> = [T] extends [never] ? Tuple : UnionToTuple<Exclude<T, GetUnionLast<T>>, [GetUnionLast<T>, ...Tuple]>;
|
|
875
|
+
type CastToStringTuple<T> = T extends [string, ...string[]] ? T : never;
|
|
876
|
+
export type UnionToTupleString<T> = CastToStringTuple<UnionToTuple<T>>;
|
|
877
|
+
export {};
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
declare namespace errorUtil {
|
|
881
|
+
type ErrMessage = string | {
|
|
882
|
+
message?: string;
|
|
883
|
+
};
|
|
884
|
+
const errToObj: (message?: string | {
|
|
885
|
+
message?: string | undefined;
|
|
886
|
+
} | undefined) => {
|
|
887
|
+
message?: string | undefined;
|
|
888
|
+
};
|
|
889
|
+
const toString: (message?: string | {
|
|
890
|
+
message?: string | undefined;
|
|
891
|
+
} | undefined) => string | undefined;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
declare namespace partialUtil {
|
|
895
|
+
type DeepPartial<T extends ZodTypeAny> = T extends ZodObject<infer Shape, infer Params, infer Catchall> ? ZodObject<{
|
|
896
|
+
[k in keyof Shape]: ZodOptional<DeepPartial<Shape[k]>>;
|
|
897
|
+
}, 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> ? {
|
|
898
|
+
[k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial<Items[k]> : never;
|
|
899
|
+
} extends infer PI ? PI extends ZodTupleItems ? ZodTuple<PI> : never : never : T;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
declare type RefinementCtx = {
|
|
903
|
+
addIssue: (arg: IssueData) => void;
|
|
904
|
+
path: (string | number)[];
|
|
905
|
+
};
|
|
906
|
+
declare type ZodRawShape = {
|
|
907
|
+
[k: string]: ZodTypeAny;
|
|
908
|
+
};
|
|
909
|
+
declare type ZodTypeAny = ZodType<any, any, any>;
|
|
910
|
+
declare type TypeOf<T extends ZodType<any, any, any>> = T["_output"];
|
|
911
|
+
declare type CustomErrorParams = Partial<util.Omit<ZodCustomIssue, "code">>;
|
|
912
|
+
interface ZodTypeDef {
|
|
913
|
+
errorMap?: ZodErrorMap;
|
|
914
|
+
description?: string;
|
|
915
|
+
}
|
|
916
|
+
declare type RawCreateParams = {
|
|
917
|
+
errorMap?: ZodErrorMap;
|
|
918
|
+
invalid_type_error?: string;
|
|
919
|
+
required_error?: string;
|
|
920
|
+
description?: string;
|
|
921
|
+
} | undefined;
|
|
922
|
+
declare type SafeParseSuccess<Output> = {
|
|
923
|
+
success: true;
|
|
924
|
+
data: Output;
|
|
925
|
+
};
|
|
926
|
+
declare type SafeParseError<Input> = {
|
|
927
|
+
success: false;
|
|
928
|
+
error: ZodError<Input>;
|
|
929
|
+
};
|
|
930
|
+
declare type SafeParseReturnType<Input, Output> = SafeParseSuccess<Output> | SafeParseError<Input>;
|
|
931
|
+
declare abstract class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> {
|
|
932
|
+
readonly _type: Output;
|
|
933
|
+
readonly _output: Output;
|
|
934
|
+
readonly _input: Input;
|
|
935
|
+
readonly _def: Def;
|
|
936
|
+
get description(): string | undefined;
|
|
937
|
+
abstract _parse(input: ParseInput): ParseReturnType<Output>;
|
|
938
|
+
_getType(input: ParseInput): string;
|
|
939
|
+
_getOrReturnCtx(input: ParseInput, ctx?: ParseContext | undefined): ParseContext;
|
|
940
|
+
_processInputParams(input: ParseInput): {
|
|
941
|
+
status: ParseStatus;
|
|
942
|
+
ctx: ParseContext;
|
|
943
|
+
};
|
|
944
|
+
_parseSync(input: ParseInput): SyncParseReturnType<Output>;
|
|
945
|
+
_parseAsync(input: ParseInput): AsyncParseReturnType<Output>;
|
|
946
|
+
parse(data: unknown, params?: Partial<ParseParams>): Output;
|
|
947
|
+
safeParse(data: unknown, params?: Partial<ParseParams>): SafeParseReturnType<Input, Output>;
|
|
948
|
+
parseAsync(data: unknown, params?: Partial<ParseParams>): Promise<Output>;
|
|
949
|
+
safeParseAsync(data: unknown, params?: Partial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;
|
|
950
|
+
/** Alias of safeParseAsync */
|
|
951
|
+
spa: (data: unknown, params?: Partial<ParseParams> | undefined) => Promise<SafeParseReturnType<Input, Output>>;
|
|
952
|
+
refine<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, RefinedOutput, Input>;
|
|
953
|
+
refine(check: (arg: Output) => unknown | Promise<unknown>, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, Output, Input>;
|
|
954
|
+
refinement<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, RefinedOutput, Input>;
|
|
955
|
+
refinement(check: (arg: Output) => boolean, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, Output, Input>;
|
|
956
|
+
_refinement(refinement: RefinementEffect<Output>["refinement"]): ZodEffects<this, Output, Input>;
|
|
957
|
+
superRefine: (refinement: RefinementEffect<Output>["refinement"]) => ZodEffects<this, Output, Input>;
|
|
958
|
+
constructor(def: Def);
|
|
959
|
+
optional(): ZodOptional<this>;
|
|
960
|
+
nullable(): ZodNullable<this>;
|
|
961
|
+
nullish(): ZodNullable<ZodOptional<this>>;
|
|
962
|
+
array(): ZodArray<this>;
|
|
963
|
+
promise(): ZodPromise<this>;
|
|
964
|
+
or<T extends ZodTypeAny>(option: T): ZodUnion<[this, T]>;
|
|
965
|
+
and<T extends ZodTypeAny>(incoming: T): ZodIntersection<this, T>;
|
|
966
|
+
transform<NewOut>(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise<NewOut>): ZodEffects<this, NewOut>;
|
|
967
|
+
default(def: util.noUndefined<Input>): ZodDefault<this>;
|
|
968
|
+
default(def: () => util.noUndefined<Input>): ZodDefault<this>;
|
|
969
|
+
brand<B extends string | number | symbol>(): ZodBranded<this, B>;
|
|
970
|
+
describe(description: string): this;
|
|
971
|
+
isOptional(): boolean;
|
|
972
|
+
isNullable(): boolean;
|
|
973
|
+
}
|
|
974
|
+
declare type ZodStringCheck = {
|
|
975
|
+
kind: "min";
|
|
976
|
+
value: number;
|
|
977
|
+
message?: string;
|
|
978
|
+
} | {
|
|
979
|
+
kind: "max";
|
|
980
|
+
value: number;
|
|
981
|
+
message?: string;
|
|
982
|
+
} | {
|
|
983
|
+
kind: "email";
|
|
984
|
+
message?: string;
|
|
985
|
+
} | {
|
|
986
|
+
kind: "url";
|
|
987
|
+
message?: string;
|
|
988
|
+
} | {
|
|
989
|
+
kind: "uuid";
|
|
990
|
+
message?: string;
|
|
991
|
+
} | {
|
|
992
|
+
kind: "cuid";
|
|
993
|
+
message?: string;
|
|
994
|
+
} | {
|
|
995
|
+
kind: "startsWith";
|
|
996
|
+
value: string;
|
|
997
|
+
message?: string;
|
|
998
|
+
} | {
|
|
999
|
+
kind: "endsWith";
|
|
1000
|
+
value: string;
|
|
1001
|
+
message?: string;
|
|
1002
|
+
} | {
|
|
1003
|
+
kind: "regex";
|
|
1004
|
+
regex: RegExp;
|
|
1005
|
+
message?: string;
|
|
1006
|
+
} | {
|
|
1007
|
+
kind: "trim";
|
|
1008
|
+
message?: string;
|
|
1009
|
+
};
|
|
1010
|
+
interface ZodStringDef extends ZodTypeDef {
|
|
1011
|
+
checks: ZodStringCheck[];
|
|
1012
|
+
typeName: ZodFirstPartyTypeKind.ZodString;
|
|
1013
|
+
}
|
|
1014
|
+
declare class ZodString extends ZodType<string, ZodStringDef> {
|
|
1015
|
+
_parse(input: ParseInput): ParseReturnType<string>;
|
|
1016
|
+
protected _regex: (regex: RegExp, validation: StringValidation, message?: string | {
|
|
1017
|
+
message?: string | undefined;
|
|
1018
|
+
} | undefined) => ZodEffects<this, string, string>;
|
|
1019
|
+
_addCheck(check: ZodStringCheck): ZodString;
|
|
1020
|
+
email(message?: errorUtil.ErrMessage): ZodString;
|
|
1021
|
+
url(message?: errorUtil.ErrMessage): ZodString;
|
|
1022
|
+
uuid(message?: errorUtil.ErrMessage): ZodString;
|
|
1023
|
+
cuid(message?: errorUtil.ErrMessage): ZodString;
|
|
1024
|
+
regex(regex: RegExp, message?: errorUtil.ErrMessage): ZodString;
|
|
1025
|
+
startsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
|
|
1026
|
+
endsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
|
|
1027
|
+
min(minLength: number, message?: errorUtil.ErrMessage): ZodString;
|
|
1028
|
+
max(maxLength: number, message?: errorUtil.ErrMessage): ZodString;
|
|
1029
|
+
length(len: number, message?: errorUtil.ErrMessage): ZodString;
|
|
1030
|
+
/**
|
|
1031
|
+
* @deprecated Use z.string().min(1) instead.
|
|
1032
|
+
* @see {@link ZodString.min}
|
|
1033
|
+
*/
|
|
1034
|
+
nonempty: (message?: string | {
|
|
1035
|
+
message?: string | undefined;
|
|
1036
|
+
} | undefined) => ZodString;
|
|
1037
|
+
trim: () => ZodString;
|
|
1038
|
+
get isEmail(): boolean;
|
|
1039
|
+
get isURL(): boolean;
|
|
1040
|
+
get isUUID(): boolean;
|
|
1041
|
+
get isCUID(): boolean;
|
|
1042
|
+
get minLength(): number | null;
|
|
1043
|
+
get maxLength(): number | null;
|
|
1044
|
+
static create: (params?: RawCreateParams) => ZodString;
|
|
1045
|
+
}
|
|
1046
|
+
declare type ZodNumberCheck = {
|
|
1047
|
+
kind: "min";
|
|
1048
|
+
value: number;
|
|
1049
|
+
inclusive: boolean;
|
|
1050
|
+
message?: string;
|
|
1051
|
+
} | {
|
|
1052
|
+
kind: "max";
|
|
1053
|
+
value: number;
|
|
1054
|
+
inclusive: boolean;
|
|
1055
|
+
message?: string;
|
|
1056
|
+
} | {
|
|
1057
|
+
kind: "int";
|
|
1058
|
+
message?: string;
|
|
1059
|
+
} | {
|
|
1060
|
+
kind: "multipleOf";
|
|
1061
|
+
value: number;
|
|
1062
|
+
message?: string;
|
|
1063
|
+
};
|
|
1064
|
+
interface ZodNumberDef extends ZodTypeDef {
|
|
1065
|
+
checks: ZodNumberCheck[];
|
|
1066
|
+
typeName: ZodFirstPartyTypeKind.ZodNumber;
|
|
1067
|
+
}
|
|
1068
|
+
declare class ZodNumber extends ZodType<number, ZodNumberDef> {
|
|
1069
|
+
_parse(input: ParseInput): ParseReturnType<number>;
|
|
1070
|
+
static create: (params?: RawCreateParams) => ZodNumber;
|
|
1071
|
+
gte(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
1072
|
+
min: (value: number, message?: string | {
|
|
1073
|
+
message?: string | undefined;
|
|
1074
|
+
} | undefined) => ZodNumber;
|
|
1075
|
+
gt(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
1076
|
+
lte(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
1077
|
+
max: (value: number, message?: string | {
|
|
1078
|
+
message?: string | undefined;
|
|
1079
|
+
} | undefined) => ZodNumber;
|
|
1080
|
+
lt(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
1081
|
+
protected setLimit(kind: "min" | "max", value: number, inclusive: boolean, message?: string): ZodNumber;
|
|
1082
|
+
_addCheck(check: ZodNumberCheck): ZodNumber;
|
|
1083
|
+
int(message?: errorUtil.ErrMessage): ZodNumber;
|
|
1084
|
+
positive(message?: errorUtil.ErrMessage): ZodNumber;
|
|
1085
|
+
negative(message?: errorUtil.ErrMessage): ZodNumber;
|
|
1086
|
+
nonpositive(message?: errorUtil.ErrMessage): ZodNumber;
|
|
1087
|
+
nonnegative(message?: errorUtil.ErrMessage): ZodNumber;
|
|
1088
|
+
multipleOf(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
1089
|
+
step: (value: number, message?: string | {
|
|
1090
|
+
message?: string | undefined;
|
|
1091
|
+
} | undefined) => ZodNumber;
|
|
1092
|
+
get minValue(): number | null;
|
|
1093
|
+
get maxValue(): number | null;
|
|
1094
|
+
get isInt(): boolean;
|
|
1095
|
+
}
|
|
1096
|
+
interface ZodUnknownDef extends ZodTypeDef {
|
|
1097
|
+
typeName: ZodFirstPartyTypeKind.ZodUnknown;
|
|
1098
|
+
}
|
|
1099
|
+
declare class ZodUnknown extends ZodType<unknown, ZodUnknownDef> {
|
|
1100
|
+
_unknown: true;
|
|
1101
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1102
|
+
static create: (params?: RawCreateParams) => ZodUnknown;
|
|
1103
|
+
}
|
|
1104
|
+
interface ZodVoidDef extends ZodTypeDef {
|
|
1105
|
+
typeName: ZodFirstPartyTypeKind.ZodVoid;
|
|
1106
|
+
}
|
|
1107
|
+
declare class ZodVoid extends ZodType<void, ZodVoidDef> {
|
|
1108
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1109
|
+
static create: (params?: RawCreateParams) => ZodVoid;
|
|
1110
|
+
}
|
|
1111
|
+
interface ZodArrayDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1112
|
+
type: T;
|
|
1113
|
+
typeName: ZodFirstPartyTypeKind.ZodArray;
|
|
1114
|
+
minLength: {
|
|
1115
|
+
value: number;
|
|
1116
|
+
message?: string;
|
|
1117
|
+
} | null;
|
|
1118
|
+
maxLength: {
|
|
1119
|
+
value: number;
|
|
1120
|
+
message?: string;
|
|
1121
|
+
} | null;
|
|
1122
|
+
}
|
|
1123
|
+
declare type ArrayCardinality = "many" | "atleastone";
|
|
1124
|
+
declare type arrayOutputType<T extends ZodTypeAny, Cardinality extends ArrayCardinality = "many"> = Cardinality extends "atleastone" ? [T["_output"], ...T["_output"][]] : T["_output"][];
|
|
1125
|
+
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"][]> {
|
|
1126
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1127
|
+
get element(): T;
|
|
1128
|
+
min(minLength: number, message?: errorUtil.ErrMessage): this;
|
|
1129
|
+
max(maxLength: number, message?: errorUtil.ErrMessage): this;
|
|
1130
|
+
length(len: number, message?: errorUtil.ErrMessage): this;
|
|
1131
|
+
nonempty(message?: errorUtil.ErrMessage): ZodArray<T, "atleastone">;
|
|
1132
|
+
static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodArray<T_1, "many">;
|
|
1133
|
+
}
|
|
1134
|
+
declare namespace objectUtil {
|
|
1135
|
+
export type MergeShapes<U extends ZodRawShape, V extends ZodRawShape> = {
|
|
1136
|
+
[k in Exclude<keyof U, keyof V>]: U[k];
|
|
1137
|
+
} & V;
|
|
1138
|
+
type optionalKeys<T extends object> = {
|
|
1139
|
+
[k in keyof T]: undefined extends T[k] ? k : never;
|
|
1140
|
+
}[keyof T];
|
|
1141
|
+
type requiredKeys<T extends object> = {
|
|
1142
|
+
[k in keyof T]: undefined extends T[k] ? never : k;
|
|
1143
|
+
}[keyof T];
|
|
1144
|
+
export type addQuestionMarks<T extends object> = Partial<Pick<T, optionalKeys<T>>> & Pick<T, requiredKeys<T>>;
|
|
1145
|
+
export type identity<T> = T;
|
|
1146
|
+
export type flatten<T extends object> = identity<{
|
|
1147
|
+
[k in keyof T]: T[k];
|
|
1148
|
+
}>;
|
|
1149
|
+
export type noNeverKeys<T extends ZodRawShape> = {
|
|
1150
|
+
[k in keyof T]: [T[k]] extends [never] ? never : k;
|
|
1151
|
+
}[keyof T];
|
|
1152
|
+
export type noNever<T extends ZodRawShape> = identity<{
|
|
1153
|
+
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;
|
|
1154
|
+
}>;
|
|
1155
|
+
export const mergeShapes: <U extends ZodRawShape, T extends ZodRawShape>(first: U, second: T) => T & U;
|
|
1156
|
+
export {};
|
|
1157
|
+
}
|
|
1158
|
+
declare type extendShape<A, B> = Omit<A, keyof B> & B;
|
|
1159
|
+
declare type UnknownKeysParam = "passthrough" | "strict" | "strip";
|
|
1160
|
+
interface ZodObjectDef<T extends ZodRawShape = ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1161
|
+
typeName: ZodFirstPartyTypeKind.ZodObject;
|
|
1162
|
+
shape: () => T;
|
|
1163
|
+
catchall: Catchall;
|
|
1164
|
+
unknownKeys: UnknownKeys;
|
|
1165
|
+
}
|
|
1166
|
+
declare type baseObjectOutputType<Shape extends ZodRawShape> = objectUtil.flatten<objectUtil.addQuestionMarks<{
|
|
1167
|
+
[k in keyof Shape]: Shape[k]["_output"];
|
|
1168
|
+
}>>;
|
|
1169
|
+
declare type objectOutputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny> = ZodTypeAny extends Catchall ? baseObjectOutputType<Shape> : objectUtil.flatten<baseObjectOutputType<Shape> & {
|
|
1170
|
+
[k: string]: Catchall["_output"];
|
|
1171
|
+
}>;
|
|
1172
|
+
declare type baseObjectInputType<Shape extends ZodRawShape> = objectUtil.flatten<objectUtil.addQuestionMarks<{
|
|
1173
|
+
[k in keyof Shape]: Shape[k]["_input"];
|
|
1174
|
+
}>>;
|
|
1175
|
+
declare type objectInputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny> = ZodTypeAny extends Catchall ? baseObjectInputType<Shape> : objectUtil.flatten<baseObjectInputType<Shape> & {
|
|
1176
|
+
[k: string]: Catchall["_input"];
|
|
1177
|
+
}>;
|
|
1178
|
+
declare type deoptional<T extends ZodTypeAny> = T extends ZodOptional<infer U> ? deoptional<U> : T;
|
|
1179
|
+
declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysParam = "strip", Catchall extends ZodTypeAny = ZodTypeAny, Output = objectOutputType<T, Catchall>, Input = objectInputType<T, Catchall>> extends ZodType<Output, ZodObjectDef<T, UnknownKeys, Catchall>, Input> {
|
|
1180
|
+
private _cached;
|
|
1181
|
+
_getCached(): {
|
|
1182
|
+
shape: T;
|
|
1183
|
+
keys: string[];
|
|
1184
|
+
};
|
|
1185
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1186
|
+
get shape(): T;
|
|
1187
|
+
strict(message?: errorUtil.ErrMessage): ZodObject<T, "strict", Catchall>;
|
|
1188
|
+
strip(): ZodObject<T, "strip", Catchall>;
|
|
1189
|
+
passthrough(): ZodObject<T, "passthrough", Catchall>;
|
|
1190
|
+
/**
|
|
1191
|
+
* @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.
|
|
1192
|
+
* If you want to pass through unknown properties, use `.passthrough()` instead.
|
|
1193
|
+
*/
|
|
1194
|
+
nonstrict: () => ZodObject<T, "passthrough", Catchall>;
|
|
1195
|
+
augment: <Augmentation extends ZodRawShape>(augmentation: Augmentation) => ZodObject<extendShape<T, Augmentation>, UnknownKeys, Catchall, objectOutputType<extendShape<T, Augmentation>, Catchall>, objectInputType<extendShape<T, Augmentation>, Catchall>>;
|
|
1196
|
+
extend: <Augmentation extends ZodRawShape>(augmentation: Augmentation) => ZodObject<extendShape<T, Augmentation>, UnknownKeys, Catchall, objectOutputType<extendShape<T, Augmentation>, Catchall>, objectInputType<extendShape<T, Augmentation>, Catchall>>;
|
|
1197
|
+
setKey<Key extends string, Schema extends ZodTypeAny>(key: Key, schema: Schema): ZodObject<T & {
|
|
1198
|
+
[k in Key]: Schema;
|
|
1199
|
+
}, UnknownKeys, Catchall>;
|
|
1200
|
+
/**
|
|
1201
|
+
* Prior to zod@1.0.12 there was a bug in the
|
|
1202
|
+
* inferred type of merged objects. Please
|
|
1203
|
+
* upgrade if you are experiencing issues.
|
|
1204
|
+
*/
|
|
1205
|
+
merge<Incoming extends AnyZodObject>(merging: Incoming): ZodObject<extendShape<T, ReturnType<Incoming["_def"]["shape"]>>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>;
|
|
1206
|
+
catchall<Index extends ZodTypeAny>(index: Index): ZodObject<T, UnknownKeys, Index>;
|
|
1207
|
+
pick<Mask extends {
|
|
1208
|
+
[k in keyof T]?: true;
|
|
1209
|
+
}>(mask: Mask): ZodObject<Pick<T, Extract<keyof T, keyof Mask>>, UnknownKeys, Catchall>;
|
|
1210
|
+
omit<Mask extends {
|
|
1211
|
+
[k in keyof T]?: true;
|
|
1212
|
+
}>(mask: Mask): ZodObject<Omit<T, keyof Mask>, UnknownKeys, Catchall>;
|
|
1213
|
+
deepPartial(): partialUtil.DeepPartial<this>;
|
|
1214
|
+
partial(): ZodObject<{
|
|
1215
|
+
[k in keyof T]: ZodOptional<T[k]>;
|
|
1216
|
+
}, UnknownKeys, Catchall>;
|
|
1217
|
+
partial<Mask extends {
|
|
1218
|
+
[k in keyof T]?: true;
|
|
1219
|
+
}>(mask: Mask): ZodObject<objectUtil.noNever<{
|
|
1220
|
+
[k in keyof T]: k extends keyof Mask ? ZodOptional<T[k]> : T[k];
|
|
1221
|
+
}>, UnknownKeys, Catchall>;
|
|
1222
|
+
required(): ZodObject<{
|
|
1223
|
+
[k in keyof T]: deoptional<T[k]>;
|
|
1224
|
+
}, UnknownKeys, Catchall>;
|
|
1225
|
+
keyof(): ZodEnum<enumUtil.UnionToTupleString<keyof T>>;
|
|
1226
|
+
static create: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>[k_3]; }>;
|
|
1227
|
+
static strictCreate: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strict", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>[k_3]; }>;
|
|
1228
|
+
static lazycreate: <T_1 extends ZodRawShape>(shape: () => T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>[k_3]; }>;
|
|
1229
|
+
}
|
|
1230
|
+
declare type AnyZodObject = ZodObject<any, any, any>;
|
|
1231
|
+
declare type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>;
|
|
1232
|
+
interface ZodUnionDef<T extends ZodUnionOptions = Readonly<[
|
|
1233
|
+
ZodTypeAny,
|
|
1234
|
+
ZodTypeAny,
|
|
1235
|
+
...ZodTypeAny[]
|
|
1236
|
+
]>> extends ZodTypeDef {
|
|
1237
|
+
options: T;
|
|
1238
|
+
typeName: ZodFirstPartyTypeKind.ZodUnion;
|
|
1239
|
+
}
|
|
1240
|
+
declare class ZodUnion<T extends ZodUnionOptions> extends ZodType<T[number]["_output"], ZodUnionDef<T>, T[number]["_input"]> {
|
|
1241
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1242
|
+
get options(): T;
|
|
1243
|
+
static create: <T_1 extends readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(types: T_1, params?: RawCreateParams) => ZodUnion<T_1>;
|
|
1244
|
+
}
|
|
1245
|
+
interface ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1246
|
+
left: T;
|
|
1247
|
+
right: U;
|
|
1248
|
+
typeName: ZodFirstPartyTypeKind.ZodIntersection;
|
|
1249
|
+
}
|
|
1250
|
+
declare class ZodIntersection<T extends ZodTypeAny, U extends ZodTypeAny> extends ZodType<T["_output"] & U["_output"], ZodIntersectionDef<T, U>, T["_input"] & U["_input"]> {
|
|
1251
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1252
|
+
static create: <T_1 extends ZodTypeAny, U_1 extends ZodTypeAny>(left: T_1, right: U_1, params?: RawCreateParams) => ZodIntersection<T_1, U_1>;
|
|
1253
|
+
}
|
|
1254
|
+
declare type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];
|
|
1255
|
+
declare type AssertArray<T> = T extends any[] ? T : never;
|
|
1256
|
+
declare type OutputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
|
|
1257
|
+
[k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_output"] : never;
|
|
1258
|
+
}>;
|
|
1259
|
+
declare type OutputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...OutputTypeOfTuple<T>, ...Rest["_output"][]] : OutputTypeOfTuple<T>;
|
|
1260
|
+
declare type InputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
|
|
1261
|
+
[k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_input"] : never;
|
|
1262
|
+
}>;
|
|
1263
|
+
declare type InputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = Rest extends ZodTypeAny ? [...InputTypeOfTuple<T>, ...Rest["_input"][]] : InputTypeOfTuple<T>;
|
|
1264
|
+
interface ZodTupleDef<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends ZodTypeAny | null = null> extends ZodTypeDef {
|
|
1265
|
+
items: T;
|
|
1266
|
+
rest: Rest;
|
|
1267
|
+
typeName: ZodFirstPartyTypeKind.ZodTuple;
|
|
1268
|
+
}
|
|
1269
|
+
declare type AnyZodTuple = ZodTuple<[
|
|
1270
|
+
ZodTypeAny,
|
|
1271
|
+
...ZodTypeAny[]
|
|
1272
|
+
] | [], ZodTypeAny | null>;
|
|
1273
|
+
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>> {
|
|
1274
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1275
|
+
get items(): T;
|
|
1276
|
+
rest<Rest extends ZodTypeAny>(rest: Rest): ZodTuple<T, Rest>;
|
|
1277
|
+
static create: <T_1 extends [] | [ZodTypeAny, ...ZodTypeAny[]]>(schemas: T_1, params?: RawCreateParams) => ZodTuple<T_1, null>;
|
|
1278
|
+
}
|
|
1279
|
+
interface ZodFunctionDef<Args extends ZodTuple<any, any> = ZodTuple<any, any>, Returns extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1280
|
+
args: Args;
|
|
1281
|
+
returns: Returns;
|
|
1282
|
+
typeName: ZodFirstPartyTypeKind.ZodFunction;
|
|
1283
|
+
}
|
|
1284
|
+
declare type OuterTypeOfFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> = Args["_input"] extends Array<any> ? (...args: Args["_input"]) => Returns["_output"] : never;
|
|
1285
|
+
declare type InnerTypeOfFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> = Args["_output"] extends Array<any> ? (...args: Args["_output"]) => Returns["_input"] : never;
|
|
1286
|
+
declare class ZodFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> extends ZodType<OuterTypeOfFunction<Args, Returns>, ZodFunctionDef<Args, Returns>, InnerTypeOfFunction<Args, Returns>> {
|
|
1287
|
+
_parse(input: ParseInput): ParseReturnType<any>;
|
|
1288
|
+
parameters(): Args;
|
|
1289
|
+
returnType(): Returns;
|
|
1290
|
+
args<Items extends Parameters<typeof ZodTuple["create"]>[0]>(...items: Items): ZodFunction<ZodTuple<Items, ZodUnknown>, Returns>;
|
|
1291
|
+
returns<NewReturnType extends ZodType<any, any>>(returnType: NewReturnType): ZodFunction<Args, NewReturnType>;
|
|
1292
|
+
implement<F extends InnerTypeOfFunction<Args, Returns>>(func: F): ReturnType<F> extends Returns["_output"] ? (...args: Args["_input"]) => ReturnType<F> : OuterTypeOfFunction<Args, Returns>;
|
|
1293
|
+
strictImplement(func: InnerTypeOfFunction<Args, Returns>): InnerTypeOfFunction<Args, Returns>;
|
|
1294
|
+
validate: <F extends InnerTypeOfFunction<Args, Returns>>(func: F) => ReturnType<F> extends Returns["_output"] ? (...args: Args["_input"]) => ReturnType<F> : OuterTypeOfFunction<Args, Returns>;
|
|
1295
|
+
static create(): ZodFunction<ZodTuple<[], ZodUnknown>, ZodUnknown>;
|
|
1296
|
+
static create<T extends AnyZodTuple = ZodTuple<[], ZodUnknown>>(args: T): ZodFunction<T, ZodUnknown>;
|
|
1297
|
+
static create<T extends AnyZodTuple, U extends ZodTypeAny>(args: T, returns: U): ZodFunction<T, U>;
|
|
1298
|
+
static create<T extends AnyZodTuple = ZodTuple<[], ZodUnknown>, U extends ZodTypeAny = ZodUnknown>(args: T, returns: U, params?: RawCreateParams): ZodFunction<T, U>;
|
|
1299
|
+
}
|
|
1300
|
+
interface ZodLiteralDef<T = any> extends ZodTypeDef {
|
|
1301
|
+
value: T;
|
|
1302
|
+
typeName: ZodFirstPartyTypeKind.ZodLiteral;
|
|
1303
|
+
}
|
|
1304
|
+
declare class ZodLiteral<T> extends ZodType<T, ZodLiteralDef<T>> {
|
|
1305
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1306
|
+
get value(): T;
|
|
1307
|
+
static create: <T_1 extends string | number | bigint | boolean | null | undefined>(value: T_1, params?: RawCreateParams) => ZodLiteral<T_1>;
|
|
1308
|
+
}
|
|
1309
|
+
declare type EnumValues = [string, ...string[]];
|
|
1310
|
+
declare type Values<T extends EnumValues> = {
|
|
1311
|
+
[k in T[number]]: k;
|
|
1312
|
+
};
|
|
1313
|
+
interface ZodEnumDef<T extends EnumValues = EnumValues> extends ZodTypeDef {
|
|
1314
|
+
values: T;
|
|
1315
|
+
typeName: ZodFirstPartyTypeKind.ZodEnum;
|
|
1316
|
+
}
|
|
1317
|
+
declare type Writeable<T> = {
|
|
1318
|
+
-readonly [P in keyof T]: T[P];
|
|
1319
|
+
};
|
|
1320
|
+
declare function createZodEnum<U extends string, T extends Readonly<[U, ...U[]]>>(values: T, params?: RawCreateParams): ZodEnum<Writeable<T>>;
|
|
1321
|
+
declare function createZodEnum<U extends string, T extends [U, ...U[]]>(values: T, params?: RawCreateParams): ZodEnum<T>;
|
|
1322
|
+
declare class ZodEnum<T extends [string, ...string[]]> extends ZodType<T[number], ZodEnumDef<T>> {
|
|
1323
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1324
|
+
get options(): T;
|
|
1325
|
+
get enum(): Values<T>;
|
|
1326
|
+
get Values(): Values<T>;
|
|
1327
|
+
get Enum(): Values<T>;
|
|
1328
|
+
static create: typeof createZodEnum;
|
|
1329
|
+
}
|
|
1330
|
+
interface ZodNativeEnumDef<T extends EnumLike = EnumLike> extends ZodTypeDef {
|
|
1331
|
+
values: T;
|
|
1332
|
+
typeName: ZodFirstPartyTypeKind.ZodNativeEnum;
|
|
1333
|
+
}
|
|
1334
|
+
declare type EnumLike = {
|
|
1335
|
+
[k: string]: string | number;
|
|
1336
|
+
[nu: number]: string;
|
|
1337
|
+
};
|
|
1338
|
+
declare class ZodNativeEnum<T extends EnumLike> extends ZodType<T[keyof T], ZodNativeEnumDef<T>> {
|
|
1339
|
+
_parse(input: ParseInput): ParseReturnType<T[keyof T]>;
|
|
1340
|
+
get enum(): T;
|
|
1341
|
+
static create: <T_1 extends EnumLike>(values: T_1, params?: RawCreateParams) => ZodNativeEnum<T_1>;
|
|
1342
|
+
}
|
|
1343
|
+
interface ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1344
|
+
type: T;
|
|
1345
|
+
typeName: ZodFirstPartyTypeKind.ZodPromise;
|
|
1346
|
+
}
|
|
1347
|
+
declare class ZodPromise<T extends ZodTypeAny> extends ZodType<Promise<T["_output"]>, ZodPromiseDef<T>, Promise<T["_input"]>> {
|
|
1348
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1349
|
+
static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodPromise<T_1>;
|
|
1350
|
+
}
|
|
1351
|
+
declare type RefinementEffect<T> = {
|
|
1352
|
+
type: "refinement";
|
|
1353
|
+
refinement: (arg: T, ctx: RefinementCtx) => any;
|
|
1354
|
+
};
|
|
1355
|
+
declare type TransformEffect<T> = {
|
|
1356
|
+
type: "transform";
|
|
1357
|
+
transform: (arg: T, ctx: RefinementCtx) => any;
|
|
1358
|
+
};
|
|
1359
|
+
declare type PreprocessEffect<T> = {
|
|
1360
|
+
type: "preprocess";
|
|
1361
|
+
transform: (arg: T) => any;
|
|
1362
|
+
};
|
|
1363
|
+
declare type Effect<T> = RefinementEffect<T> | TransformEffect<T> | PreprocessEffect<T>;
|
|
1364
|
+
interface ZodEffectsDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1365
|
+
schema: T;
|
|
1366
|
+
typeName: ZodFirstPartyTypeKind.ZodEffects;
|
|
1367
|
+
effect: Effect<any>;
|
|
1368
|
+
}
|
|
1369
|
+
declare class ZodEffects<T extends ZodTypeAny, Output = T["_output"], Input = T["_input"]> extends ZodType<Output, ZodEffectsDef<T>, Input> {
|
|
1370
|
+
innerType(): T;
|
|
1371
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1372
|
+
static create: <I extends ZodTypeAny>(schema: I, effect: Effect<I["_output"]>, params?: RawCreateParams) => ZodEffects<I, I["_output"], I["_input"]>;
|
|
1373
|
+
static createWithPreprocess: <I extends ZodTypeAny>(preprocess: (arg: unknown) => unknown, schema: I, params?: RawCreateParams) => ZodEffects<I, I["_output"], unknown>;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
interface ZodOptionalDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1377
|
+
innerType: T;
|
|
1378
|
+
typeName: ZodFirstPartyTypeKind.ZodOptional;
|
|
1379
|
+
}
|
|
1380
|
+
declare class ZodOptional<T extends ZodTypeAny> extends ZodType<T["_output"] | undefined, ZodOptionalDef<T>, T["_input"] | undefined> {
|
|
1381
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1382
|
+
unwrap(): T;
|
|
1383
|
+
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodOptional<T_1>;
|
|
1384
|
+
}
|
|
1385
|
+
interface ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1386
|
+
innerType: T;
|
|
1387
|
+
typeName: ZodFirstPartyTypeKind.ZodNullable;
|
|
1388
|
+
}
|
|
1389
|
+
declare class ZodNullable<T extends ZodTypeAny> extends ZodType<T["_output"] | null, ZodNullableDef<T>, T["_input"] | null> {
|
|
1390
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1391
|
+
unwrap(): T;
|
|
1392
|
+
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodNullable<T_1>;
|
|
1393
|
+
}
|
|
1394
|
+
interface ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1395
|
+
innerType: T;
|
|
1396
|
+
defaultValue: () => util.noUndefined<T["_input"]>;
|
|
1397
|
+
typeName: ZodFirstPartyTypeKind.ZodDefault;
|
|
1398
|
+
}
|
|
1399
|
+
declare class ZodDefault<T extends ZodTypeAny> extends ZodType<util.noUndefined<T["_output"]>, ZodDefaultDef<T>, T["_input"] | undefined> {
|
|
1400
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1401
|
+
removeDefault(): T;
|
|
1402
|
+
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodOptional<T_1>;
|
|
1403
|
+
}
|
|
1404
|
+
interface ZodBrandedDef<T extends ZodTypeAny> extends ZodTypeDef {
|
|
1405
|
+
type: T;
|
|
1406
|
+
typeName: ZodFirstPartyTypeKind.ZodBranded;
|
|
1407
|
+
}
|
|
1408
|
+
declare const BRAND: unique symbol;
|
|
1409
|
+
declare type BRAND<T extends string | number | symbol> = {
|
|
1410
|
+
[BRAND]: {
|
|
1411
|
+
[k in T]: true;
|
|
1412
|
+
};
|
|
1413
|
+
};
|
|
1414
|
+
declare class ZodBranded<T extends ZodTypeAny, B extends string | number | symbol> extends ZodType<T["_output"] & BRAND<B>, ZodBrandedDef<T>, T["_input"] & BRAND<B>> {
|
|
1415
|
+
_parse(input: ParseInput): ParseReturnType<any>;
|
|
1416
|
+
unwrap(): T;
|
|
1417
|
+
}
|
|
1418
|
+
declare enum ZodFirstPartyTypeKind {
|
|
1419
|
+
ZodString = "ZodString",
|
|
1420
|
+
ZodNumber = "ZodNumber",
|
|
1421
|
+
ZodNaN = "ZodNaN",
|
|
1422
|
+
ZodBigInt = "ZodBigInt",
|
|
1423
|
+
ZodBoolean = "ZodBoolean",
|
|
1424
|
+
ZodDate = "ZodDate",
|
|
1425
|
+
ZodUndefined = "ZodUndefined",
|
|
1426
|
+
ZodNull = "ZodNull",
|
|
1427
|
+
ZodAny = "ZodAny",
|
|
1428
|
+
ZodUnknown = "ZodUnknown",
|
|
1429
|
+
ZodNever = "ZodNever",
|
|
1430
|
+
ZodVoid = "ZodVoid",
|
|
1431
|
+
ZodArray = "ZodArray",
|
|
1432
|
+
ZodObject = "ZodObject",
|
|
1433
|
+
ZodUnion = "ZodUnion",
|
|
1434
|
+
ZodDiscriminatedUnion = "ZodDiscriminatedUnion",
|
|
1435
|
+
ZodIntersection = "ZodIntersection",
|
|
1436
|
+
ZodTuple = "ZodTuple",
|
|
1437
|
+
ZodRecord = "ZodRecord",
|
|
1438
|
+
ZodMap = "ZodMap",
|
|
1439
|
+
ZodSet = "ZodSet",
|
|
1440
|
+
ZodFunction = "ZodFunction",
|
|
1441
|
+
ZodLazy = "ZodLazy",
|
|
1442
|
+
ZodLiteral = "ZodLiteral",
|
|
1443
|
+
ZodEnum = "ZodEnum",
|
|
1444
|
+
ZodEffects = "ZodEffects",
|
|
1445
|
+
ZodNativeEnum = "ZodNativeEnum",
|
|
1446
|
+
ZodOptional = "ZodOptional",
|
|
1447
|
+
ZodNullable = "ZodNullable",
|
|
1448
|
+
ZodDefault = "ZodDefault",
|
|
1449
|
+
ZodPromise = "ZodPromise",
|
|
1450
|
+
ZodBranded = "ZodBranded"
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
declare const partialLinksSchema: ZodObject<{
|
|
1454
|
+
termsAndConditions: ZodOptional<ZodString>;
|
|
1455
|
+
}, "strip", ZodTypeAny, {
|
|
1456
|
+
termsAndConditions?: string | undefined;
|
|
1457
|
+
}, {
|
|
1458
|
+
termsAndConditions?: string | undefined;
|
|
1459
|
+
}>;
|
|
1460
|
+
|
|
1461
|
+
interface Logo {
|
|
1462
|
+
dark?: string;
|
|
1463
|
+
height?: number;
|
|
1464
|
+
light: string;
|
|
1465
|
+
width?: number;
|
|
1466
|
+
}
|
|
1467
|
+
interface Style {
|
|
1468
|
+
checksAndRadios?: 'animated' | 'standard';
|
|
1469
|
+
labels?: 'floating' | 'stacked';
|
|
1470
|
+
logo?: Logo;
|
|
1471
|
+
sections?: {
|
|
1472
|
+
header?: boolean;
|
|
1473
|
+
};
|
|
1474
|
+
stage?: {
|
|
1475
|
+
icon: boolean;
|
|
1476
|
+
};
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
declare const partialConfigSchema: ZodObject<{
|
|
1480
|
+
callbackFactory: ZodOptional<ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
|
|
1481
|
+
_id: ZodOptional<ZodNumber>;
|
|
1482
|
+
input: ZodOptional<ZodArray<ZodObject<{
|
|
1483
|
+
name: ZodString;
|
|
1484
|
+
value: ZodUnknown;
|
|
1485
|
+
}, "strip", ZodTypeAny, {
|
|
1486
|
+
value?: unknown;
|
|
1487
|
+
name: string;
|
|
1488
|
+
}, {
|
|
1489
|
+
value?: unknown;
|
|
1490
|
+
name: string;
|
|
1491
|
+
}>, "many">>;
|
|
1492
|
+
output: ZodArray<ZodObject<{
|
|
1493
|
+
name: ZodString;
|
|
1494
|
+
value: ZodUnknown;
|
|
1495
|
+
}, "strip", ZodTypeAny, {
|
|
1496
|
+
value?: unknown;
|
|
1497
|
+
name: string;
|
|
1498
|
+
}, {
|
|
1499
|
+
value?: unknown;
|
|
1500
|
+
name: string;
|
|
1501
|
+
}>, "many">;
|
|
1502
|
+
type: ZodNativeEnum<typeof CallbackType>;
|
|
1503
|
+
}, "strip", ZodTypeAny, {
|
|
1504
|
+
input?: {
|
|
1505
|
+
value?: unknown;
|
|
1506
|
+
name: string;
|
|
1507
|
+
}[] | undefined;
|
|
1508
|
+
_id?: number | undefined;
|
|
1509
|
+
type: CallbackType;
|
|
1510
|
+
output: {
|
|
1511
|
+
value?: unknown;
|
|
1512
|
+
name: string;
|
|
1513
|
+
}[];
|
|
1514
|
+
}, {
|
|
1515
|
+
input?: {
|
|
1516
|
+
value?: unknown;
|
|
1517
|
+
name: string;
|
|
1518
|
+
}[] | undefined;
|
|
1519
|
+
_id?: number | undefined;
|
|
1520
|
+
type: CallbackType;
|
|
1521
|
+
output: {
|
|
1522
|
+
value?: unknown;
|
|
1523
|
+
name: string;
|
|
1524
|
+
}[];
|
|
1525
|
+
}>], ZodUnknown>, ZodType<FRCallback, ZodTypeDef, FRCallback>>>>;
|
|
1526
|
+
clientId: ZodOptional<ZodOptional<ZodString>>;
|
|
1527
|
+
middleware: ZodOptional<ZodOptional<ZodArray<ZodFunction<ZodTuple<[], ZodUnknown>, ZodUnknown>, "many">>>;
|
|
1528
|
+
realmPath: ZodOptional<ZodString>;
|
|
1529
|
+
redirectUri: ZodOptional<ZodOptional<ZodString>>;
|
|
1530
|
+
scope: ZodOptional<ZodOptional<ZodString>>;
|
|
1531
|
+
serverConfig: ZodOptional<ZodObject<{
|
|
1532
|
+
baseUrl: ZodString;
|
|
1533
|
+
paths: ZodOptional<ZodObject<{
|
|
1534
|
+
authenticate: ZodString;
|
|
1535
|
+
authorize: ZodString;
|
|
1536
|
+
accessToken: ZodString;
|
|
1537
|
+
endSession: ZodString;
|
|
1538
|
+
userInfo: ZodString;
|
|
1539
|
+
revoke: ZodString;
|
|
1540
|
+
sessions: ZodString;
|
|
1541
|
+
}, "strip", ZodTypeAny, {
|
|
1542
|
+
authenticate: string;
|
|
1543
|
+
authorize: string;
|
|
1544
|
+
accessToken: string;
|
|
1545
|
+
endSession: string;
|
|
1546
|
+
userInfo: string;
|
|
1547
|
+
revoke: string;
|
|
1548
|
+
sessions: string;
|
|
1549
|
+
}, {
|
|
1550
|
+
authenticate: string;
|
|
1551
|
+
authorize: string;
|
|
1552
|
+
accessToken: string;
|
|
1553
|
+
endSession: string;
|
|
1554
|
+
userInfo: string;
|
|
1555
|
+
revoke: string;
|
|
1556
|
+
sessions: string;
|
|
1557
|
+
}>>;
|
|
1558
|
+
timeout: ZodNumber;
|
|
1559
|
+
}, "strip", ZodTypeAny, {
|
|
1560
|
+
paths?: {
|
|
1561
|
+
authenticate: string;
|
|
1562
|
+
authorize: string;
|
|
1563
|
+
accessToken: string;
|
|
1564
|
+
endSession: string;
|
|
1565
|
+
userInfo: string;
|
|
1566
|
+
revoke: string;
|
|
1567
|
+
sessions: string;
|
|
1568
|
+
} | undefined;
|
|
1569
|
+
timeout: number;
|
|
1570
|
+
baseUrl: string;
|
|
1571
|
+
}, {
|
|
1572
|
+
paths?: {
|
|
1573
|
+
authenticate: string;
|
|
1574
|
+
authorize: string;
|
|
1575
|
+
accessToken: string;
|
|
1576
|
+
endSession: string;
|
|
1577
|
+
userInfo: string;
|
|
1578
|
+
revoke: string;
|
|
1579
|
+
sessions: string;
|
|
1580
|
+
} | undefined;
|
|
1581
|
+
timeout: number;
|
|
1582
|
+
baseUrl: string;
|
|
1583
|
+
}>>;
|
|
1584
|
+
support: ZodOptional<ZodOptional<ZodUnion<[ZodLiteral<"legacy">, ZodLiteral<"modern">]>>>;
|
|
1585
|
+
tokenStore: ZodOptional<ZodOptional<ZodUnion<[ZodObject<{
|
|
1586
|
+
get: ZodFunction<ZodTuple<[ZodString], ZodUnknown>, ZodPromise<ZodObject<{
|
|
1587
|
+
accessToken: ZodString;
|
|
1588
|
+
idToken: ZodOptional<ZodString>;
|
|
1589
|
+
refreshToken: ZodOptional<ZodString>;
|
|
1590
|
+
tokenExpiry: ZodOptional<ZodNumber>;
|
|
1591
|
+
}, "strip", ZodTypeAny, {
|
|
1592
|
+
idToken?: string | undefined;
|
|
1593
|
+
refreshToken?: string | undefined;
|
|
1594
|
+
tokenExpiry?: number | undefined;
|
|
1595
|
+
accessToken: string;
|
|
1596
|
+
}, {
|
|
1597
|
+
idToken?: string | undefined;
|
|
1598
|
+
refreshToken?: string | undefined;
|
|
1599
|
+
tokenExpiry?: number | undefined;
|
|
1600
|
+
accessToken: string;
|
|
1601
|
+
}>>>;
|
|
1602
|
+
set: ZodFunction<ZodTuple<[ZodString], ZodUnknown>, ZodPromise<ZodVoid>>;
|
|
1603
|
+
remove: ZodFunction<ZodTuple<[ZodString], ZodUnknown>, ZodPromise<ZodVoid>>;
|
|
1604
|
+
}, "strip", ZodTypeAny, {
|
|
1605
|
+
set: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1606
|
+
remove: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1607
|
+
get: (args_0: string, ...args_1: unknown[]) => Promise<{
|
|
1608
|
+
idToken?: string | undefined;
|
|
1609
|
+
refreshToken?: string | undefined;
|
|
1610
|
+
tokenExpiry?: number | undefined;
|
|
1611
|
+
accessToken: string;
|
|
1612
|
+
}>;
|
|
1613
|
+
}, {
|
|
1614
|
+
set: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1615
|
+
remove: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1616
|
+
get: (args_0: string, ...args_1: unknown[]) => Promise<{
|
|
1617
|
+
idToken?: string | undefined;
|
|
1618
|
+
refreshToken?: string | undefined;
|
|
1619
|
+
tokenExpiry?: number | undefined;
|
|
1620
|
+
accessToken: string;
|
|
1621
|
+
}>;
|
|
1622
|
+
}>, ZodLiteral<"indexedDB">, ZodLiteral<"sessionStorage">, ZodLiteral<"localStorage">]>>>;
|
|
1623
|
+
tree: ZodOptional<ZodOptional<ZodString>>;
|
|
1624
|
+
type: ZodOptional<ZodOptional<ZodString>>;
|
|
1625
|
+
oauthThreshold: ZodOptional<ZodOptional<ZodNumber>>;
|
|
1626
|
+
}, "strict", ZodTypeAny, {
|
|
1627
|
+
type?: string | undefined;
|
|
1628
|
+
callbackFactory?: ((args_0: {
|
|
1629
|
+
input?: {
|
|
1630
|
+
value?: unknown;
|
|
1631
|
+
name: string;
|
|
1632
|
+
}[] | undefined;
|
|
1633
|
+
_id?: number | undefined;
|
|
1634
|
+
type: CallbackType;
|
|
1635
|
+
output: {
|
|
1636
|
+
value?: unknown;
|
|
1637
|
+
name: string;
|
|
1638
|
+
}[];
|
|
1639
|
+
}, ...args_1: unknown[]) => FRCallback) | undefined;
|
|
1640
|
+
clientId?: string | undefined;
|
|
1641
|
+
middleware?: ((...args: unknown[]) => unknown)[] | undefined;
|
|
1642
|
+
realmPath?: string | undefined;
|
|
1643
|
+
redirectUri?: string | undefined;
|
|
1644
|
+
scope?: string | undefined;
|
|
1645
|
+
serverConfig?: {
|
|
1646
|
+
paths?: {
|
|
1647
|
+
authenticate: string;
|
|
1648
|
+
authorize: string;
|
|
1649
|
+
accessToken: string;
|
|
1650
|
+
endSession: string;
|
|
1651
|
+
userInfo: string;
|
|
1652
|
+
revoke: string;
|
|
1653
|
+
sessions: string;
|
|
1654
|
+
} | undefined;
|
|
1655
|
+
timeout: number;
|
|
1656
|
+
baseUrl: string;
|
|
1657
|
+
} | undefined;
|
|
1658
|
+
support?: "modern" | "legacy" | undefined;
|
|
1659
|
+
tokenStore?: "localStorage" | "indexedDB" | "sessionStorage" | {
|
|
1660
|
+
set: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1661
|
+
remove: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1662
|
+
get: (args_0: string, ...args_1: unknown[]) => Promise<{
|
|
1663
|
+
idToken?: string | undefined;
|
|
1664
|
+
refreshToken?: string | undefined;
|
|
1665
|
+
tokenExpiry?: number | undefined;
|
|
1666
|
+
accessToken: string;
|
|
1667
|
+
}>;
|
|
1668
|
+
} | undefined;
|
|
1669
|
+
tree?: string | undefined;
|
|
1670
|
+
oauthThreshold?: number | undefined;
|
|
1671
|
+
}, {
|
|
1672
|
+
type?: string | undefined;
|
|
1673
|
+
callbackFactory?: ((args_0: {
|
|
1674
|
+
input?: {
|
|
1675
|
+
value?: unknown;
|
|
1676
|
+
name: string;
|
|
1677
|
+
}[] | undefined;
|
|
1678
|
+
_id?: number | undefined;
|
|
1679
|
+
type: CallbackType;
|
|
1680
|
+
output: {
|
|
1681
|
+
value?: unknown;
|
|
1682
|
+
name: string;
|
|
1683
|
+
}[];
|
|
1684
|
+
}, ...args_1: unknown[]) => FRCallback) | undefined;
|
|
1685
|
+
clientId?: string | undefined;
|
|
1686
|
+
middleware?: ((...args: unknown[]) => unknown)[] | undefined;
|
|
1687
|
+
realmPath?: string | undefined;
|
|
1688
|
+
redirectUri?: string | undefined;
|
|
1689
|
+
scope?: string | undefined;
|
|
1690
|
+
serverConfig?: {
|
|
1691
|
+
paths?: {
|
|
1692
|
+
authenticate: string;
|
|
1693
|
+
authorize: string;
|
|
1694
|
+
accessToken: string;
|
|
1695
|
+
endSession: string;
|
|
1696
|
+
userInfo: string;
|
|
1697
|
+
revoke: string;
|
|
1698
|
+
sessions: string;
|
|
1699
|
+
} | undefined;
|
|
1700
|
+
timeout: number;
|
|
1701
|
+
baseUrl: string;
|
|
1702
|
+
} | undefined;
|
|
1703
|
+
support?: "modern" | "legacy" | undefined;
|
|
1704
|
+
tokenStore?: "localStorage" | "indexedDB" | "sessionStorage" | {
|
|
1705
|
+
set: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1706
|
+
remove: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1707
|
+
get: (args_0: string, ...args_1: unknown[]) => Promise<{
|
|
1708
|
+
idToken?: string | undefined;
|
|
1709
|
+
refreshToken?: string | undefined;
|
|
1710
|
+
tokenExpiry?: number | undefined;
|
|
1711
|
+
accessToken: string;
|
|
1712
|
+
}>;
|
|
1713
|
+
} | undefined;
|
|
1714
|
+
tree?: string | undefined;
|
|
1715
|
+
oauthThreshold?: number | undefined;
|
|
1716
|
+
}>;
|
|
1717
|
+
|
|
1718
|
+
declare const journeyConfigSchema: ZodObject<{
|
|
1719
|
+
forgotPassword: ZodObject<{
|
|
1720
|
+
journey: ZodOptional<ZodString>;
|
|
1721
|
+
match: ZodArray<ZodString, "many">;
|
|
1722
|
+
}, "strip", ZodTypeAny, {
|
|
1723
|
+
journey?: string | undefined;
|
|
1724
|
+
match: string[];
|
|
1725
|
+
}, {
|
|
1726
|
+
journey?: string | undefined;
|
|
1727
|
+
match: string[];
|
|
1728
|
+
}>;
|
|
1729
|
+
forgotUsername: ZodObject<{
|
|
1730
|
+
journey: ZodOptional<ZodString>;
|
|
1731
|
+
match: ZodArray<ZodString, "many">;
|
|
1732
|
+
}, "strip", ZodTypeAny, {
|
|
1733
|
+
journey?: string | undefined;
|
|
1734
|
+
match: string[];
|
|
1735
|
+
}, {
|
|
1736
|
+
journey?: string | undefined;
|
|
1737
|
+
match: string[];
|
|
1738
|
+
}>;
|
|
1739
|
+
login: ZodObject<{
|
|
1740
|
+
journey: ZodOptional<ZodString>;
|
|
1741
|
+
match: ZodArray<ZodString, "many">;
|
|
1742
|
+
}, "strip", ZodTypeAny, {
|
|
1743
|
+
journey?: string | undefined;
|
|
1744
|
+
match: string[];
|
|
1745
|
+
}, {
|
|
1746
|
+
journey?: string | undefined;
|
|
1747
|
+
match: string[];
|
|
1748
|
+
}>;
|
|
1749
|
+
register: ZodObject<{
|
|
1750
|
+
journey: ZodOptional<ZodString>;
|
|
1751
|
+
match: ZodArray<ZodString, "many">;
|
|
1752
|
+
}, "strip", ZodTypeAny, {
|
|
1753
|
+
journey?: string | undefined;
|
|
1754
|
+
match: string[];
|
|
1755
|
+
}, {
|
|
1756
|
+
journey?: string | undefined;
|
|
1757
|
+
match: string[];
|
|
1758
|
+
}>;
|
|
1759
|
+
}, "strip", ZodTypeAny, {
|
|
1760
|
+
forgotPassword: {
|
|
1761
|
+
journey?: string | undefined;
|
|
1762
|
+
match: string[];
|
|
1763
|
+
};
|
|
1764
|
+
forgotUsername: {
|
|
1765
|
+
journey?: string | undefined;
|
|
1766
|
+
match: string[];
|
|
1767
|
+
};
|
|
1768
|
+
login: {
|
|
1769
|
+
journey?: string | undefined;
|
|
1770
|
+
match: string[];
|
|
1771
|
+
};
|
|
1772
|
+
register: {
|
|
1773
|
+
journey?: string | undefined;
|
|
1774
|
+
match: string[];
|
|
1775
|
+
};
|
|
1776
|
+
}, {
|
|
1777
|
+
forgotPassword: {
|
|
1778
|
+
journey?: string | undefined;
|
|
1779
|
+
match: string[];
|
|
1780
|
+
};
|
|
1781
|
+
forgotUsername: {
|
|
1782
|
+
journey?: string | undefined;
|
|
1783
|
+
match: string[];
|
|
1784
|
+
};
|
|
1785
|
+
login: {
|
|
1786
|
+
journey?: string | undefined;
|
|
1787
|
+
match: string[];
|
|
1788
|
+
};
|
|
1789
|
+
register: {
|
|
1790
|
+
journey?: string | undefined;
|
|
1791
|
+
match: string[];
|
|
1792
|
+
};
|
|
1793
|
+
}>;
|
|
1794
|
+
|
|
1795
|
+
declare const partialStringsSchema: ZodObject<{
|
|
1796
|
+
alreadyHaveAnAccount: ZodOptional<ZodString>;
|
|
1797
|
+
backToDefault: ZodOptional<ZodString>;
|
|
1798
|
+
backToLogin: ZodOptional<ZodString>;
|
|
1799
|
+
dontHaveAnAccount: ZodOptional<ZodString>;
|
|
1800
|
+
closeModal: ZodOptional<ZodString>;
|
|
1801
|
+
chooseDifferentUsername: ZodOptional<ZodString>;
|
|
1802
|
+
constraintViolationForPassword: ZodOptional<ZodString>;
|
|
1803
|
+
constraintViolationForValue: ZodOptional<ZodString>;
|
|
1804
|
+
continueWith: ZodOptional<ZodString>;
|
|
1805
|
+
customSecurityQuestion: ZodOptional<ZodString>;
|
|
1806
|
+
doesNotMeetMinimumCharacterLength: ZodOptional<ZodString>;
|
|
1807
|
+
ensurePasswordIsMoreThan: ZodOptional<ZodString>;
|
|
1808
|
+
ensurePasswordHasOne: ZodOptional<ZodString>;
|
|
1809
|
+
exceedsMaximumCharacterLength: ZodOptional<ZodString>;
|
|
1810
|
+
fieldCanNotContainFollowingCharacters: ZodOptional<ZodString>;
|
|
1811
|
+
fieldCanNotContainFollowingValues: ZodOptional<ZodString>;
|
|
1812
|
+
forgotPassword: ZodOptional<ZodString>;
|
|
1813
|
+
forgotUsername: ZodOptional<ZodString>;
|
|
1814
|
+
givenName: ZodOptional<ZodString>;
|
|
1815
|
+
inputRequiredError: ZodOptional<ZodString>;
|
|
1816
|
+
loading: ZodOptional<ZodString>;
|
|
1817
|
+
loginButton: ZodOptional<ZodString>;
|
|
1818
|
+
loginFailure: ZodOptional<ZodString>;
|
|
1819
|
+
loginHeader: ZodOptional<ZodString>;
|
|
1820
|
+
loginSuccess: ZodOptional<ZodString>;
|
|
1821
|
+
mail: ZodOptional<ZodString>;
|
|
1822
|
+
minimumNumberOfNumbers: ZodOptional<ZodString>;
|
|
1823
|
+
minimumNumberOfLowercase: ZodOptional<ZodString>;
|
|
1824
|
+
minimumNumberOfUppercase: ZodOptional<ZodString>;
|
|
1825
|
+
minimumNumberOfSymbols: ZodOptional<ZodString>;
|
|
1826
|
+
nameCallback: ZodOptional<ZodString>;
|
|
1827
|
+
nextButton: ZodOptional<ZodString>;
|
|
1828
|
+
notToExceedMaximumCharacterLength: ZodOptional<ZodString>;
|
|
1829
|
+
noLessThanMinimumCharacterLength: ZodOptional<ZodString>;
|
|
1830
|
+
passwordCallback: ZodOptional<ZodString>;
|
|
1831
|
+
passwordRequirements: ZodOptional<ZodString>;
|
|
1832
|
+
pleaseCheckValue: ZodOptional<ZodString>;
|
|
1833
|
+
pleaseConfirm: ZodOptional<ZodString>;
|
|
1834
|
+
preferencesMarketing: ZodOptional<ZodString>;
|
|
1835
|
+
preferencesUpdates: ZodOptional<ZodString>;
|
|
1836
|
+
provideCustomQuestion: ZodOptional<ZodString>;
|
|
1837
|
+
redirectingTo: ZodOptional<ZodString>;
|
|
1838
|
+
registerButton: ZodOptional<ZodString>;
|
|
1839
|
+
registerHeader: ZodOptional<ZodString>;
|
|
1840
|
+
registerSuccess: ZodOptional<ZodString>;
|
|
1841
|
+
requiredField: ZodOptional<ZodString>;
|
|
1842
|
+
securityAnswer: ZodOptional<ZodString>;
|
|
1843
|
+
securityQuestions: ZodOptional<ZodString>;
|
|
1844
|
+
securityQuestionsPrompt: ZodOptional<ZodString>;
|
|
1845
|
+
showPassword: ZodOptional<ZodString>;
|
|
1846
|
+
sn: ZodOptional<ZodString>;
|
|
1847
|
+
submitButton: ZodOptional<ZodString>;
|
|
1848
|
+
successMessage: ZodOptional<ZodString>;
|
|
1849
|
+
termsAndConditions: ZodOptional<ZodString>;
|
|
1850
|
+
termsAndConditionsLinkText: ZodOptional<ZodString>;
|
|
1851
|
+
tryAgain: ZodOptional<ZodString>;
|
|
1852
|
+
useValidEmail: ZodOptional<ZodString>;
|
|
1853
|
+
unrecoverableError: ZodOptional<ZodString>;
|
|
1854
|
+
unknownNetworkError: ZodOptional<ZodString>;
|
|
1855
|
+
usernameRequirements: ZodOptional<ZodString>;
|
|
1856
|
+
validatedCreatePasswordCallback: ZodOptional<ZodString>;
|
|
1857
|
+
validatedCreateUsernameCallback: ZodOptional<ZodString>;
|
|
1858
|
+
valueRequirements: ZodOptional<ZodString>;
|
|
1859
|
+
}, "strict", ZodTypeAny, {
|
|
1860
|
+
loading?: string | undefined;
|
|
1861
|
+
termsAndConditions?: string | undefined;
|
|
1862
|
+
alreadyHaveAnAccount?: string | undefined;
|
|
1863
|
+
backToDefault?: string | undefined;
|
|
1864
|
+
backToLogin?: string | undefined;
|
|
1865
|
+
dontHaveAnAccount?: string | undefined;
|
|
1866
|
+
closeModal?: string | undefined;
|
|
1867
|
+
chooseDifferentUsername?: string | undefined;
|
|
1868
|
+
constraintViolationForPassword?: string | undefined;
|
|
1869
|
+
constraintViolationForValue?: string | undefined;
|
|
1870
|
+
continueWith?: string | undefined;
|
|
1871
|
+
customSecurityQuestion?: string | undefined;
|
|
1872
|
+
doesNotMeetMinimumCharacterLength?: string | undefined;
|
|
1873
|
+
ensurePasswordIsMoreThan?: string | undefined;
|
|
1874
|
+
ensurePasswordHasOne?: string | undefined;
|
|
1875
|
+
exceedsMaximumCharacterLength?: string | undefined;
|
|
1876
|
+
fieldCanNotContainFollowingCharacters?: string | undefined;
|
|
1877
|
+
fieldCanNotContainFollowingValues?: string | undefined;
|
|
1878
|
+
forgotPassword?: string | undefined;
|
|
1879
|
+
forgotUsername?: string | undefined;
|
|
1880
|
+
givenName?: string | undefined;
|
|
1881
|
+
inputRequiredError?: string | undefined;
|
|
1882
|
+
loginButton?: string | undefined;
|
|
1883
|
+
loginFailure?: string | undefined;
|
|
1884
|
+
loginHeader?: string | undefined;
|
|
1885
|
+
loginSuccess?: string | undefined;
|
|
1886
|
+
mail?: string | undefined;
|
|
1887
|
+
minimumNumberOfNumbers?: string | undefined;
|
|
1888
|
+
minimumNumberOfLowercase?: string | undefined;
|
|
1889
|
+
minimumNumberOfUppercase?: string | undefined;
|
|
1890
|
+
minimumNumberOfSymbols?: string | undefined;
|
|
1891
|
+
nameCallback?: string | undefined;
|
|
1892
|
+
nextButton?: string | undefined;
|
|
1893
|
+
notToExceedMaximumCharacterLength?: string | undefined;
|
|
1894
|
+
noLessThanMinimumCharacterLength?: string | undefined;
|
|
1895
|
+
passwordCallback?: string | undefined;
|
|
1896
|
+
passwordRequirements?: string | undefined;
|
|
1897
|
+
pleaseCheckValue?: string | undefined;
|
|
1898
|
+
pleaseConfirm?: string | undefined;
|
|
1899
|
+
preferencesMarketing?: string | undefined;
|
|
1900
|
+
preferencesUpdates?: string | undefined;
|
|
1901
|
+
provideCustomQuestion?: string | undefined;
|
|
1902
|
+
redirectingTo?: string | undefined;
|
|
1903
|
+
registerButton?: string | undefined;
|
|
1904
|
+
registerHeader?: string | undefined;
|
|
1905
|
+
registerSuccess?: string | undefined;
|
|
1906
|
+
requiredField?: string | undefined;
|
|
1907
|
+
securityAnswer?: string | undefined;
|
|
1908
|
+
securityQuestions?: string | undefined;
|
|
1909
|
+
securityQuestionsPrompt?: string | undefined;
|
|
1910
|
+
showPassword?: string | undefined;
|
|
1911
|
+
sn?: string | undefined;
|
|
1912
|
+
submitButton?: string | undefined;
|
|
1913
|
+
successMessage?: string | undefined;
|
|
1914
|
+
termsAndConditionsLinkText?: string | undefined;
|
|
1915
|
+
tryAgain?: string | undefined;
|
|
1916
|
+
useValidEmail?: string | undefined;
|
|
1917
|
+
unrecoverableError?: string | undefined;
|
|
1918
|
+
unknownNetworkError?: string | undefined;
|
|
1919
|
+
usernameRequirements?: string | undefined;
|
|
1920
|
+
validatedCreatePasswordCallback?: string | undefined;
|
|
1921
|
+
validatedCreateUsernameCallback?: string | undefined;
|
|
1922
|
+
valueRequirements?: string | undefined;
|
|
1923
|
+
}, {
|
|
1924
|
+
loading?: string | undefined;
|
|
1925
|
+
termsAndConditions?: string | undefined;
|
|
1926
|
+
alreadyHaveAnAccount?: string | undefined;
|
|
1927
|
+
backToDefault?: string | undefined;
|
|
1928
|
+
backToLogin?: string | undefined;
|
|
1929
|
+
dontHaveAnAccount?: string | undefined;
|
|
1930
|
+
closeModal?: string | undefined;
|
|
1931
|
+
chooseDifferentUsername?: string | undefined;
|
|
1932
|
+
constraintViolationForPassword?: string | undefined;
|
|
1933
|
+
constraintViolationForValue?: string | undefined;
|
|
1934
|
+
continueWith?: string | undefined;
|
|
1935
|
+
customSecurityQuestion?: string | undefined;
|
|
1936
|
+
doesNotMeetMinimumCharacterLength?: string | undefined;
|
|
1937
|
+
ensurePasswordIsMoreThan?: string | undefined;
|
|
1938
|
+
ensurePasswordHasOne?: string | undefined;
|
|
1939
|
+
exceedsMaximumCharacterLength?: string | undefined;
|
|
1940
|
+
fieldCanNotContainFollowingCharacters?: string | undefined;
|
|
1941
|
+
fieldCanNotContainFollowingValues?: string | undefined;
|
|
1942
|
+
forgotPassword?: string | undefined;
|
|
1943
|
+
forgotUsername?: string | undefined;
|
|
1944
|
+
givenName?: string | undefined;
|
|
1945
|
+
inputRequiredError?: string | undefined;
|
|
1946
|
+
loginButton?: string | undefined;
|
|
1947
|
+
loginFailure?: string | undefined;
|
|
1948
|
+
loginHeader?: string | undefined;
|
|
1949
|
+
loginSuccess?: string | undefined;
|
|
1950
|
+
mail?: string | undefined;
|
|
1951
|
+
minimumNumberOfNumbers?: string | undefined;
|
|
1952
|
+
minimumNumberOfLowercase?: string | undefined;
|
|
1953
|
+
minimumNumberOfUppercase?: string | undefined;
|
|
1954
|
+
minimumNumberOfSymbols?: string | undefined;
|
|
1955
|
+
nameCallback?: string | undefined;
|
|
1956
|
+
nextButton?: string | undefined;
|
|
1957
|
+
notToExceedMaximumCharacterLength?: string | undefined;
|
|
1958
|
+
noLessThanMinimumCharacterLength?: string | undefined;
|
|
1959
|
+
passwordCallback?: string | undefined;
|
|
1960
|
+
passwordRequirements?: string | undefined;
|
|
1961
|
+
pleaseCheckValue?: string | undefined;
|
|
1962
|
+
pleaseConfirm?: string | undefined;
|
|
1963
|
+
preferencesMarketing?: string | undefined;
|
|
1964
|
+
preferencesUpdates?: string | undefined;
|
|
1965
|
+
provideCustomQuestion?: string | undefined;
|
|
1966
|
+
redirectingTo?: string | undefined;
|
|
1967
|
+
registerButton?: string | undefined;
|
|
1968
|
+
registerHeader?: string | undefined;
|
|
1969
|
+
registerSuccess?: string | undefined;
|
|
1970
|
+
requiredField?: string | undefined;
|
|
1971
|
+
securityAnswer?: string | undefined;
|
|
1972
|
+
securityQuestions?: string | undefined;
|
|
1973
|
+
securityQuestionsPrompt?: string | undefined;
|
|
1974
|
+
showPassword?: string | undefined;
|
|
1975
|
+
sn?: string | undefined;
|
|
1976
|
+
submitButton?: string | undefined;
|
|
1977
|
+
successMessage?: string | undefined;
|
|
1978
|
+
termsAndConditionsLinkText?: string | undefined;
|
|
1979
|
+
tryAgain?: string | undefined;
|
|
1980
|
+
useValidEmail?: string | undefined;
|
|
1981
|
+
unrecoverableError?: string | undefined;
|
|
1982
|
+
unknownNetworkError?: string | undefined;
|
|
1983
|
+
usernameRequirements?: string | undefined;
|
|
1984
|
+
validatedCreatePasswordCallback?: string | undefined;
|
|
1985
|
+
validatedCreateUsernameCallback?: string | undefined;
|
|
1986
|
+
valueRequirements?: string | undefined;
|
|
1987
|
+
}>;
|
|
1988
|
+
|
|
1989
|
+
declare const journey: {
|
|
1990
|
+
start(options?: JourneyOptions): void;
|
|
1991
|
+
onFailure(fn: (response: Response$1) => void): void;
|
|
1992
|
+
onSuccess(fn: (response: Response$1) => void): void;
|
|
1993
|
+
};
|
|
1994
|
+
declare const modal: {
|
|
1995
|
+
close(args?: {
|
|
1996
|
+
reason: 'auto' | 'external' | 'user';
|
|
1997
|
+
}): void;
|
|
1998
|
+
onClose(fn: (args: {
|
|
1999
|
+
reason: 'auto' | 'external' | 'user';
|
|
2000
|
+
}) => void): void;
|
|
2001
|
+
onMount(fn: (dialog: HTMLDialogElement, form: HTMLFormElement) => void): void;
|
|
2002
|
+
open(options?: JourneyOptions): void;
|
|
2003
|
+
};
|
|
2004
|
+
declare const request: (options: HttpClientRequestOptions) => Promise<globalThis.Response>;
|
|
2005
|
+
declare const user: {
|
|
2006
|
+
authorized(remote?: boolean): Promise<boolean>;
|
|
2007
|
+
info(remote?: boolean): Promise<unknown>;
|
|
2008
|
+
logout(): Promise<void>;
|
|
2009
|
+
tokens(options?: GetTokensOptions): Promise<void | OAuth2Tokens>;
|
|
2010
|
+
};
|
|
2011
|
+
|
|
2012
|
+
declare const __propDef: {
|
|
2013
|
+
props: {
|
|
2014
|
+
config: TypeOf<typeof partialConfigSchema>;
|
|
2015
|
+
content: TypeOf<typeof partialStringsSchema>;
|
|
2016
|
+
journeys?: TypeOf<typeof journeyConfigSchema> | undefined;
|
|
2017
|
+
links: TypeOf<typeof partialLinksSchema>;
|
|
2018
|
+
style?: Style | undefined;
|
|
2019
|
+
};
|
|
2020
|
+
events: {
|
|
2021
|
+
'modal-mount': CustomEvent<any>;
|
|
2022
|
+
} & {
|
|
2023
|
+
[evt: string]: CustomEvent<any>;
|
|
2024
|
+
};
|
|
2025
|
+
slots: {};
|
|
2026
|
+
};
|
|
2027
|
+
type ModalProps = typeof __propDef.props;
|
|
2028
|
+
type ModalEvents = typeof __propDef.events;
|
|
2029
|
+
type ModalSlots = typeof __propDef.slots;
|
|
2030
|
+
declare class Modal extends SvelteComponentTyped<ModalProps, ModalEvents, ModalSlots> {
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
export { ModalEvents, ModalProps, ModalSlots, Modal as default, journey, modal, request, user };
|