@wix/identity 1.0.97 → 1.0.99

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.
@@ -1,3214 +0,0 @@
1
- type HostModule<T, H extends Host> = {
2
- __type: 'host';
3
- create(host: H): T;
4
- };
5
- type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
6
- type Host<Environment = unknown> = {
7
- channel: {
8
- observeState(callback: (props: unknown, environment: Environment) => unknown): {
9
- disconnect: () => void;
10
- } | Promise<{
11
- disconnect: () => void;
12
- }>;
13
- };
14
- environment?: Environment;
15
- /**
16
- * Optional name of the environment, use for logging
17
- */
18
- name?: string;
19
- /**
20
- * Optional bast url to use for API requests, for example `www.wixapis.com`
21
- */
22
- apiBaseUrl?: string;
23
- /**
24
- * Possible data to be provided by every host, for cross cutting concerns
25
- * like internationalization, billing, etc.
26
- */
27
- essentials?: {
28
- /**
29
- * The language of the currently viewed session
30
- */
31
- language?: string;
32
- /**
33
- * The locale of the currently viewed session
34
- */
35
- locale?: string;
36
- /**
37
- * Any headers that should be passed through to the API requests
38
- */
39
- passThroughHeaders?: Record<string, string>;
40
- };
41
- };
42
-
43
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
44
- interface HttpClient {
45
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
46
- fetchWithAuth: typeof fetch;
47
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
48
- getActiveToken?: () => string | undefined;
49
- }
50
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
51
- type HttpResponse<T = any> = {
52
- data: T;
53
- status: number;
54
- statusText: string;
55
- headers: any;
56
- request?: any;
57
- };
58
- type RequestOptions<_TResponse = any, Data = any> = {
59
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
60
- url: string;
61
- data?: Data;
62
- params?: URLSearchParams;
63
- } & APIMetadata;
64
- type APIMetadata = {
65
- methodFqn?: string;
66
- entityFqdn?: string;
67
- packageName?: string;
68
- };
69
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
70
- type EventDefinition<Payload = unknown, Type extends string = string> = {
71
- __type: 'event-definition';
72
- type: Type;
73
- isDomainEvent?: boolean;
74
- transformations?: (envelope: unknown) => Payload;
75
- __payload: Payload;
76
- };
77
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
78
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
79
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
80
-
81
- type ServicePluginMethodInput = {
82
- request: any;
83
- metadata: any;
84
- };
85
- type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
86
- type ServicePluginMethodMetadata = {
87
- name: string;
88
- primaryHttpMappingPath: string;
89
- transformations: {
90
- fromREST: (...args: unknown[]) => ServicePluginMethodInput;
91
- toREST: (...args: unknown[]) => unknown;
92
- };
93
- };
94
- type ServicePluginDefinition<Contract extends ServicePluginContract> = {
95
- __type: 'service-plugin-definition';
96
- componentType: string;
97
- methods: ServicePluginMethodMetadata[];
98
- __contract: Contract;
99
- };
100
- declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
101
- type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
102
- declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
103
-
104
- type RequestContext = {
105
- isSSR: boolean;
106
- host: string;
107
- protocol?: string;
108
- };
109
- type ResponseTransformer = (data: any, headers?: any) => any;
110
- /**
111
- * Ambassador request options types are copied mostly from AxiosRequestConfig.
112
- * They are copied and not imported to reduce the amount of dependencies (to reduce install time).
113
- * https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
114
- */
115
- type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
116
- type AmbassadorRequestOptions<T = any> = {
117
- _?: T;
118
- url?: string;
119
- method?: Method;
120
- params?: any;
121
- data?: any;
122
- transformResponse?: ResponseTransformer | ResponseTransformer[];
123
- };
124
- type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
125
- __isAmbassador: boolean;
126
- };
127
- type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
128
- type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
129
-
130
- declare global {
131
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
132
- interface SymbolConstructor {
133
- readonly observable: symbol;
134
- }
135
- }
136
-
137
- declare const emptyObjectSymbol: unique symbol;
138
-
139
- /**
140
- Represents a strictly empty plain object, the `{}` value.
141
-
142
- When you annotate something as the type `{}`, it can be anything except `null` and `undefined`. This means that you cannot use `{}` to represent an empty plain object ([read more](https://stackoverflow.com/questions/47339869/typescript-empty-object-and-any-difference/52193484#52193484)).
143
-
144
- @example
145
- ```
146
- import type {EmptyObject} from 'type-fest';
147
-
148
- // The following illustrates the problem with `{}`.
149
- const foo1: {} = {}; // Pass
150
- const foo2: {} = []; // Pass
151
- const foo3: {} = 42; // Pass
152
- const foo4: {} = {a: 1}; // Pass
153
-
154
- // With `EmptyObject` only the first case is valid.
155
- const bar1: EmptyObject = {}; // Pass
156
- const bar2: EmptyObject = 42; // Fail
157
- const bar3: EmptyObject = []; // Fail
158
- const bar4: EmptyObject = {a: 1}; // Fail
159
- ```
160
-
161
- Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<never, never>` do not work. See {@link https://github.com/sindresorhus/type-fest/issues/395 #395}.
162
-
163
- @category Object
164
- */
165
- type EmptyObject = {[emptyObjectSymbol]?: never};
166
-
167
- /**
168
- Returns a boolean for whether the two given types are equal.
169
-
170
- @link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
171
- @link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
172
-
173
- Use-cases:
174
- - If you want to make a conditional branch based on the result of a comparison of two types.
175
-
176
- @example
177
- ```
178
- import type {IsEqual} from 'type-fest';
179
-
180
- // This type returns a boolean for whether the given array includes the given item.
181
- // `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
182
- type Includes<Value extends readonly any[], Item> =
183
- Value extends readonly [Value[0], ...infer rest]
184
- ? IsEqual<Value[0], Item> extends true
185
- ? true
186
- : Includes<rest, Item>
187
- : false;
188
- ```
189
-
190
- @category Type Guard
191
- @category Utilities
192
- */
193
- type IsEqual<A, B> =
194
- (<G>() => G extends A ? 1 : 2) extends
195
- (<G>() => G extends B ? 1 : 2)
196
- ? true
197
- : false;
198
-
199
- /**
200
- Filter out keys from an object.
201
-
202
- Returns `never` if `Exclude` is strictly equal to `Key`.
203
- Returns `never` if `Key` extends `Exclude`.
204
- Returns `Key` otherwise.
205
-
206
- @example
207
- ```
208
- type Filtered = Filter<'foo', 'foo'>;
209
- //=> never
210
- ```
211
-
212
- @example
213
- ```
214
- type Filtered = Filter<'bar', string>;
215
- //=> never
216
- ```
217
-
218
- @example
219
- ```
220
- type Filtered = Filter<'bar', 'foo'>;
221
- //=> 'bar'
222
- ```
223
-
224
- @see {Except}
225
- */
226
- type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
227
-
228
- type ExceptOptions = {
229
- /**
230
- Disallow assigning non-specified properties.
231
-
232
- Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
233
-
234
- @default false
235
- */
236
- requireExactProps?: boolean;
237
- };
238
-
239
- /**
240
- Create a type from an object type without certain keys.
241
-
242
- We recommend setting the `requireExactProps` option to `true`.
243
-
244
- This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
245
-
246
- This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
247
-
248
- @example
249
- ```
250
- import type {Except} from 'type-fest';
251
-
252
- type Foo = {
253
- a: number;
254
- b: string;
255
- };
256
-
257
- type FooWithoutA = Except<Foo, 'a'>;
258
- //=> {b: string}
259
-
260
- const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
261
- //=> errors: 'a' does not exist in type '{ b: string; }'
262
-
263
- type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
264
- //=> {a: number} & Partial<Record<"b", never>>
265
-
266
- const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
267
- //=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
268
- ```
269
-
270
- @category Object
271
- */
272
- type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
273
- [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
274
- } & (Options['requireExactProps'] extends true
275
- ? Partial<Record<KeysType, never>>
276
- : {});
277
-
278
- /**
279
- Returns a boolean for whether the given type is `never`.
280
-
281
- @link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
282
- @link https://stackoverflow.com/a/53984913/10292952
283
- @link https://www.zhenghao.io/posts/ts-never
284
-
285
- Useful in type utilities, such as checking if something does not occur.
286
-
287
- @example
288
- ```
289
- import type {IsNever, And} from 'type-fest';
290
-
291
- // https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
292
- type AreStringsEqual<A extends string, B extends string> =
293
- And<
294
- IsNever<Exclude<A, B>> extends true ? true : false,
295
- IsNever<Exclude<B, A>> extends true ? true : false
296
- >;
297
-
298
- type EndIfEqual<I extends string, O extends string> =
299
- AreStringsEqual<I, O> extends true
300
- ? never
301
- : void;
302
-
303
- function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
304
- if (input === output) {
305
- process.exit(0);
306
- }
307
- }
308
-
309
- endIfEqual('abc', 'abc');
310
- //=> never
311
-
312
- endIfEqual('abc', '123');
313
- //=> void
314
- ```
315
-
316
- @category Type Guard
317
- @category Utilities
318
- */
319
- type IsNever<T> = [T] extends [never] ? true : false;
320
-
321
- /**
322
- An if-else-like type that resolves depending on whether the given type is `never`.
323
-
324
- @see {@link IsNever}
325
-
326
- @example
327
- ```
328
- import type {IfNever} from 'type-fest';
329
-
330
- type ShouldBeTrue = IfNever<never>;
331
- //=> true
332
-
333
- type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
334
- //=> 'bar'
335
- ```
336
-
337
- @category Type Guard
338
- @category Utilities
339
- */
340
- type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
341
- IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
342
- );
343
-
344
- /**
345
- Extract the keys from a type where the value type of the key extends the given `Condition`.
346
-
347
- Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
348
-
349
- @example
350
- ```
351
- import type {ConditionalKeys} from 'type-fest';
352
-
353
- interface Example {
354
- a: string;
355
- b: string | number;
356
- c?: string;
357
- d: {};
358
- }
359
-
360
- type StringKeysOnly = ConditionalKeys<Example, string>;
361
- //=> 'a'
362
- ```
363
-
364
- To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
365
-
366
- @example
367
- ```
368
- import type {ConditionalKeys} from 'type-fest';
369
-
370
- type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
371
- //=> 'a' | 'c'
372
- ```
373
-
374
- @category Object
375
- */
376
- type ConditionalKeys<Base, Condition> =
377
- {
378
- // Map through all the keys of the given base type.
379
- [Key in keyof Base]-?:
380
- // Pick only keys with types extending the given `Condition` type.
381
- Base[Key] extends Condition
382
- // Retain this key
383
- // If the value for the key extends never, only include it if `Condition` also extends never
384
- ? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
385
- // Discard this key since the condition fails.
386
- : never;
387
- // Convert the produced object into a union type of the keys which passed the conditional test.
388
- }[keyof Base];
389
-
390
- /**
391
- Exclude keys from a shape that matches the given `Condition`.
392
-
393
- This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
394
-
395
- @example
396
- ```
397
- import type {Primitive, ConditionalExcept} from 'type-fest';
398
-
399
- class Awesome {
400
- name: string;
401
- successes: number;
402
- failures: bigint;
403
-
404
- run() {}
405
- }
406
-
407
- type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
408
- //=> {run: () => void}
409
- ```
410
-
411
- @example
412
- ```
413
- import type {ConditionalExcept} from 'type-fest';
414
-
415
- interface Example {
416
- a: string;
417
- b: string | number;
418
- c: () => void;
419
- d: {};
420
- }
421
-
422
- type NonStringKeysOnly = ConditionalExcept<Example, string>;
423
- //=> {b: string | number; c: () => void; d: {}}
424
- ```
425
-
426
- @category Object
427
- */
428
- type ConditionalExcept<Base, Condition> = Except<
429
- Base,
430
- ConditionalKeys<Base, Condition>
431
- >;
432
-
433
- /**
434
- * Descriptors are objects that describe the API of a module, and the module
435
- * can either be a REST module or a host module.
436
- * This type is recursive, so it can describe nested modules.
437
- */
438
- type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
439
- [key: string]: Descriptors | PublicMetadata | any;
440
- };
441
- /**
442
- * This type takes in a descriptors object of a certain Host (including an `unknown` host)
443
- * and returns an object with the same structure, but with all descriptors replaced with their API.
444
- * Any non-descriptor properties are removed from the returned object, including descriptors that
445
- * do not match the given host (as they will not work with the given host).
446
- */
447
- type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
448
- done: T;
449
- recurse: T extends {
450
- __type: typeof SERVICE_PLUGIN_ERROR_TYPE;
451
- } ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition<any> ? BuildEventDefinition<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
452
- [Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
453
- -1,
454
- 0,
455
- 1,
456
- 2,
457
- 3,
458
- 4,
459
- 5
460
- ][Depth]> : never;
461
- }, EmptyObject>;
462
- }[Depth extends -1 ? 'done' : 'recurse'];
463
- type PublicMetadata = {
464
- PACKAGE_NAME?: string;
465
- };
466
-
467
- declare global {
468
- interface ContextualClient {
469
- }
470
- }
471
- /**
472
- * A type used to create concerete types from SDK descriptors in
473
- * case a contextual client is available.
474
- */
475
- type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
476
- host: Host;
477
- } ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
478
-
479
- interface Authentication {
480
- }
481
- interface RegisterV2Request {
482
- /** Identifier of registering member. */
483
- loginId: LoginId;
484
- /** Password of registering member. */
485
- password?: string;
486
- /** Profile information of registering member. */
487
- profile?: IdentityProfile$2;
488
- /** CAPTCHA tokens, when CAPTCHA setting is on. */
489
- captchaTokens?: CaptchaToken[];
490
- /** Additional data, relevant for the flow. */
491
- clientMetaData?: Record<string, any> | null;
492
- }
493
- interface LoginId extends LoginIdTypeOneOf {
494
- /** Login email address. */
495
- email?: string;
496
- }
497
- /** @oneof */
498
- interface LoginIdTypeOneOf {
499
- /** Login email address. */
500
- email?: string;
501
- }
502
- interface IdentityProfile$2 {
503
- /** Profile first name. */
504
- firstName?: string | null;
505
- /** Profile last name. */
506
- lastName?: string | null;
507
- /** Profile nickname. */
508
- nickname?: string | null;
509
- /** Profile picture URL. */
510
- picture?: string | null;
511
- /**
512
- * Deprecated. Use `secondaryEmails` instead.
513
- * @deprecated Deprecated. Use `secondaryEmails` instead.
514
- * @replacedBy secondary_emails
515
- * @targetRemovalDate 2023-11-01
516
- */
517
- emails?: string[];
518
- /**
519
- * Deprecated. Use `phonesV2` instead.
520
- * @deprecated Deprecated. Use `phonesV2` instead.
521
- * @replacedBy phones_v2
522
- * @targetRemovalDate 2023-11-01
523
- */
524
- phones?: string[];
525
- /** List of profile labels. */
526
- labels?: string[];
527
- /** Profile language. */
528
- language?: string | null;
529
- /** Profile privacy status. */
530
- privacyStatus?: PrivacyStatus$2;
531
- /**
532
- * Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)
533
- * are used to store additional information about your site or app's contacts.
534
- */
535
- customFields?: CustomField$2[];
536
- /** List of profile email addresses. */
537
- secondaryEmails?: SecondaryEmail$2[];
538
- /** List of profile phone numbers. */
539
- phonesV2?: Phone$2[];
540
- /** List of profile physical addresses. */
541
- addresses?: AddressWrapper$2[];
542
- /** Company name. */
543
- company?: string | null;
544
- /** Position within company. */
545
- position?: string | null;
546
- /** Profile birthdate - ISO-8601 extended local date format (YYYY-MM-DD). */
547
- birthdate?: string | null;
548
- /** slug */
549
- slug?: string | null;
550
- }
551
- declare enum PrivacyStatus$2 {
552
- UNDEFINED = "UNDEFINED",
553
- PUBLIC = "PUBLIC",
554
- PRIVATE = "PRIVATE"
555
- }
556
- interface CustomField$2 {
557
- /**
558
- * Custom field name. The name must match one of the key properties of the objects returned by
559
- * [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields)
560
- * with the `custom.` prefix removed.
561
- */
562
- name?: string;
563
- /** Custom field value. */
564
- value?: V1CustomValue$2;
565
- }
566
- interface V1CustomValue$2 extends V1CustomValueValueOneOf$2 {
567
- /** String value. */
568
- strValue?: string;
569
- /** Number value. */
570
- numValue?: number;
571
- /** Date value. */
572
- dateValue?: Date | null;
573
- /** List value. */
574
- listValue?: V1ListValue$2;
575
- /** Map value. */
576
- mapValue?: V1MapValue$2;
577
- }
578
- /** @oneof */
579
- interface V1CustomValueValueOneOf$2 {
580
- /** String value. */
581
- strValue?: string;
582
- /** Number value. */
583
- numValue?: number;
584
- /** Date value. */
585
- dateValue?: Date | null;
586
- /** List value. */
587
- listValue?: V1ListValue$2;
588
- /** Map value. */
589
- mapValue?: V1MapValue$2;
590
- }
591
- interface V1ListValue$2 {
592
- /** Custom value. */
593
- value?: V1CustomValue$2[];
594
- }
595
- interface V1MapValue$2 {
596
- /** Mapped custom value. */
597
- value?: Record<string, V1CustomValue$2>;
598
- }
599
- interface SecondaryEmail$2 {
600
- /** Email address. */
601
- email?: string;
602
- /** Email tag. */
603
- tag?: EmailTag$2;
604
- }
605
- declare enum EmailTag$2 {
606
- UNTAGGED = "UNTAGGED",
607
- MAIN = "MAIN",
608
- HOME = "HOME",
609
- WORK = "WORK"
610
- }
611
- interface Phone$2 {
612
- /** Phone country code. */
613
- countryCode?: string | null;
614
- /** Phone number. */
615
- phone?: string;
616
- /** Phone tag. */
617
- tag?: PhoneTag$2;
618
- }
619
- declare enum PhoneTag$2 {
620
- UNTAGGED = "UNTAGGED",
621
- MAIN = "MAIN",
622
- HOME = "HOME",
623
- MOBILE = "MOBILE",
624
- WORK = "WORK",
625
- FAX = "FAX"
626
- }
627
- interface AddressWrapper$2 {
628
- /** Address. */
629
- address?: Address$2;
630
- /** Address tag. */
631
- tag?: AddressTag$2;
632
- }
633
- /** Physical address */
634
- interface Address$2 {
635
- /** Country code. */
636
- country?: string | null;
637
- /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
638
- subdivision?: string | null;
639
- /** City name. */
640
- city?: string | null;
641
- /** Zip/postal code. */
642
- postalCode?: string | null;
643
- /** Main address line, usually street and number as free text. */
644
- addressLine1?: string | null;
645
- /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
646
- addressLine2?: string | null;
647
- }
648
- declare enum AddressTag$2 {
649
- UNTAGGED = "UNTAGGED",
650
- HOME = "HOME",
651
- WORK = "WORK",
652
- BILLING = "BILLING",
653
- SHIPPING = "SHIPPING"
654
- }
655
- interface CaptchaToken extends CaptchaTokenTokenOneOf {
656
- Recaptcha?: string;
657
- InvisibleRecaptcha?: string;
658
- NoCaptcha?: string;
659
- }
660
- /** @oneof */
661
- interface CaptchaTokenTokenOneOf {
662
- Recaptcha?: string;
663
- InvisibleRecaptcha?: string;
664
- NoCaptcha?: string;
665
- }
666
- interface StateMachineResponse$2 extends StateMachineResponseStateDataOneOf$2 {
667
- requireMfaData?: RequireMfaData$2;
668
- mfaChallengeData?: MfaChallengeData$2;
669
- /** The current state of the login or registration process. */
670
- state?: StateType$2;
671
- /** If state is `SUCCESS`, a session token. */
672
- sessionToken?: string | null;
673
- /** A token representing the current state of the login or registration process. */
674
- stateToken?: string | null;
675
- /** Identing of the current member. */
676
- identity?: Identity$2;
677
- /** additional_data = 5; //TBD */
678
- additionalData?: Record<string, CustomValue$2>;
679
- }
680
- /** @oneof */
681
- interface StateMachineResponseStateDataOneOf$2 {
682
- requireMfaData?: RequireMfaData$2;
683
- mfaChallengeData?: MfaChallengeData$2;
684
- }
685
- declare enum StateType$2 {
686
- /** Initial unknown state. */
687
- UNKNOWN_STATE = "UNKNOWN_STATE",
688
- /** The operation completed successfully. */
689
- SUCCESS = "SUCCESS",
690
- /** State that indicates that the member needs owner approval to proceed, available action in: OwnerApprovalStateHandler */
691
- REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
692
- /**
693
- * State that indicates a member waiting for verification, available action are: verifyDuringAuthentication or resendDuringAuthentication
694
- * https://dev.wix.com/docs/rest/api-reference/auth-management/verification-v1/verify-during-authentication
695
- */
696
- REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
697
- /** State that indicates checking that the status is not one of the `invalidStates` before proceeding. */
698
- STATUS_CHECK = "STATUS_CHECK",
699
- REQUIRE_MFA = "REQUIRE_MFA",
700
- MFA_CHALLENGE = "MFA_CHALLENGE"
701
- }
702
- interface Identity$2 {
703
- /** Identity ID */
704
- _id?: string | null;
705
- /**
706
- * Represents the current state of an item. Each time the item is modified, its `revision` changes.
707
- * For an update operation to succeed, you MUST pass the latest revision.
708
- */
709
- revision?: string | null;
710
- /**
711
- * The time this identity was created.
712
- * @readonly
713
- */
714
- _createdDate?: Date | null;
715
- /**
716
- * The time this identity was last updated.
717
- * @readonly
718
- */
719
- _updatedDate?: Date | null;
720
- /** The identity configured connections to authenticate with. */
721
- connections?: Connection$2[];
722
- /** Identity profile. */
723
- identityProfile?: IdentityProfile$2;
724
- /**
725
- * Additional information about the identity that can impact user access.
726
- * This data cannot be set.
727
- */
728
- metadata?: Metadata$2;
729
- /** Identity email address. */
730
- email?: Email$3;
731
- /** Identity's current status. */
732
- status?: StatusV2$2;
733
- /** filled by pre registered spi */
734
- customAttributes?: Record<string, any> | null;
735
- /**
736
- * Identity factors.
737
- * @readonly
738
- */
739
- factors?: Factor$2[];
740
- }
741
- interface Connection$2 extends ConnectionTypeOneOf$2 {
742
- /** IDP connection. */
743
- idpConnection?: IdpConnection$2;
744
- /** Authenticator connection. */
745
- authenticatorConnection?: AuthenticatorConnection$2;
746
- }
747
- /** @oneof */
748
- interface ConnectionTypeOneOf$2 {
749
- /** IDP connection. */
750
- idpConnection?: IdpConnection$2;
751
- /** Authenticator connection. */
752
- authenticatorConnection?: AuthenticatorConnection$2;
753
- }
754
- interface IdpConnection$2 {
755
- /** IDP connection ID. */
756
- idpConnectionId?: string;
757
- /** IDP user ID. */
758
- idpUserId?: string;
759
- }
760
- interface AuthenticatorConnection$2 {
761
- /** Authenticator connection ID. */
762
- authenticatorConnectionId?: string;
763
- /** Whether re-enrollment is required. */
764
- reEnrollmentRequired?: boolean;
765
- }
766
- interface Metadata$2 {
767
- /**
768
- * represents general tags such as "isOwner", "isContributor"
769
- * @readonly
770
- */
771
- tags?: string[];
772
- }
773
- interface Email$3 {
774
- address?: string;
775
- isVerified?: boolean;
776
- }
777
- interface StatusV2$2 {
778
- name?: StatusName$2;
779
- reasons?: Reason$2[];
780
- }
781
- declare enum StatusName$2 {
782
- UNKNOWN_STATUS = "UNKNOWN_STATUS",
783
- PENDING = "PENDING",
784
- ACTIVE = "ACTIVE",
785
- DELETED = "DELETED",
786
- BLOCKED = "BLOCKED",
787
- OFFLINE = "OFFLINE"
788
- }
789
- declare enum Reason$2 {
790
- UNKNOWN_REASON = "UNKNOWN_REASON",
791
- PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
792
- PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
793
- }
794
- interface Factor$2 {
795
- /** Factor ID. */
796
- factorId?: string;
797
- /** Factor type. */
798
- type?: FactorType$2;
799
- /** Factor status. */
800
- status?: Status$2;
801
- }
802
- declare enum FactorType$2 {
803
- UNKNOWN_FACTOR_TYPE = "UNKNOWN_FACTOR_TYPE",
804
- PASSWORD = "PASSWORD",
805
- SMS = "SMS",
806
- CALL = "CALL",
807
- EMAIL = "EMAIL",
808
- TOTP = "TOTP",
809
- PUSH = "PUSH"
810
- }
811
- declare enum Status$2 {
812
- /** Factor requires activation. */
813
- INACTIVE = "INACTIVE",
814
- /** Factor is active and can be used for authentication. */
815
- ACTIVE = "ACTIVE",
816
- /** Factor is blocked and cannot be used for authentication. The user should reenroll the factor. */
817
- REQUIRE_REENROLL = "REQUIRE_REENROLL"
818
- }
819
- interface CustomValue$2 extends CustomValueValueOneOf$2 {
820
- /** String value. */
821
- strValue?: string;
822
- /** Number value. */
823
- numValue?: number;
824
- /** Date value. */
825
- dateValue?: Date | null;
826
- /** List value. */
827
- listValue?: ListValue$2;
828
- /** Map value. */
829
- mapValue?: MapValue$2;
830
- }
831
- /** @oneof */
832
- interface CustomValueValueOneOf$2 {
833
- /** String value. */
834
- strValue?: string;
835
- /** Number value. */
836
- numValue?: number;
837
- /** Date value. */
838
- dateValue?: Date | null;
839
- /** List value. */
840
- listValue?: ListValue$2;
841
- /** Map value. */
842
- mapValue?: MapValue$2;
843
- }
844
- interface ListValue$2 {
845
- /** Custom value. */
846
- value?: CustomValue$2[];
847
- }
848
- interface MapValue$2 {
849
- /** Mapped custom value. */
850
- value?: Record<string, CustomValue$2>;
851
- }
852
- interface RequireMfaData$2 {
853
- availableFactors?: V1Factor$2[];
854
- }
855
- interface V1Factor$2 {
856
- factorType?: FactorType$2;
857
- }
858
- interface MfaChallengeData$2 {
859
- factorType?: FactorType$2;
860
- verificationChallengeData?: VerificationChallenge$2;
861
- availableFactors?: V1Factor$2[];
862
- }
863
- interface VerificationChallenge$2 {
864
- hint?: string | null;
865
- }
866
- interface LoginV2Request {
867
- /** Identifier of identity logging in. */
868
- loginId: LoginId;
869
- /** Password of the identity logging in. */
870
- password?: string;
871
- /** CAPTCHA tokens, when CAPTCHA setting is on. */
872
- captchaTokens?: CaptchaToken[];
873
- /** Additional data, relevant for the flow. */
874
- clientMetaData?: Record<string, any> | null;
875
- }
876
- interface ChangePasswordRequest {
877
- /** The new password to set for the logged in user */
878
- newPassword: string;
879
- }
880
- interface ChangePasswordResponse {
881
- }
882
- interface LoginWithIdpConnectionRequest {
883
- /** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
884
- idpConnectionId: string;
885
- /** The id of the tenant the caller wants to login into */
886
- tenantId: string;
887
- /** The type of the tenant the caller wants to login into */
888
- tenantType: TenantType$1;
889
- customPayload?: Record<string, string>;
890
- /**
891
- * This flow ultimately returns an HTML page that asynchronously posts the LoginResponse via the BroadcastChannel API.
892
- * The message will be posted to a channel named `wix-idp-$session_id`, and encrypted with the `encryption_key`.
893
- * Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload
894
- */
895
- sessionId: string;
896
- encryptionKey: string;
897
- visitorId?: string | null;
898
- bsi?: string | null;
899
- }
900
- declare enum TenantType$1 {
901
- UNKNOWN_TENANT_TYPE = "UNKNOWN_TENANT_TYPE",
902
- ACCOUNT = "ACCOUNT",
903
- SITE = "SITE",
904
- ROOT = "ROOT"
905
- }
906
- interface RawHttpResponse$1 {
907
- body?: Uint8Array;
908
- statusCode?: number | null;
909
- headers?: HeadersEntry$1[];
910
- }
911
- interface HeadersEntry$1 {
912
- key?: string;
913
- value?: string;
914
- }
915
- interface RawHttpRequest$1 {
916
- body?: Uint8Array;
917
- pathParams?: PathParametersEntry$1[];
918
- queryParams?: QueryParametersEntry$1[];
919
- headers?: HeadersEntry$1[];
920
- method?: string;
921
- rawPath?: string;
922
- rawQuery?: string;
923
- }
924
- interface PathParametersEntry$1 {
925
- key?: string;
926
- value?: string;
927
- }
928
- interface QueryParametersEntry$1 {
929
- key?: string;
930
- value?: string;
931
- }
932
- interface LoginCallbackRequest {
933
- /** state that that received on the redirect */
934
- state?: string;
935
- /** session token */
936
- sessionToken?: string;
937
- }
938
- interface LoginWithIdpConnectionTokenParamsRequest {
939
- /** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
940
- idpConnectionId?: string;
941
- /** A set of fields that are required for the connection to be able to identify and authenticate the user */
942
- tokenParams?: Record<string, string>;
943
- }
944
- interface SignOnRequest {
945
- /** the identifier of the identity */
946
- loginId: LoginId;
947
- /** profile of the identity */
948
- profile?: IdentityProfile$2;
949
- /** when true will mark the email of the identity as verified */
950
- verifyEmail?: boolean;
951
- /** when false will create a new contact instead of merging the existing contact into the identity */
952
- mergeExistingContact?: boolean;
953
- }
954
- interface SignOnResponse {
955
- /** session token for the requested identity */
956
- sessionToken?: string;
957
- /** The Identity of the provided login_id */
958
- identity?: Identity$2;
959
- }
960
- /** logout request payload */
961
- interface LogoutRequest {
962
- /** redirect after logout */
963
- postLogoutRedirectUri?: string | null;
964
- /** caller identifier */
965
- clientId?: string | null;
966
- }
967
- interface VerifyRequest$1 extends VerifyRequestFactorDataOneOf {
968
- smsData?: SmsVerifyData;
969
- callData?: CallVerifyData;
970
- emailData?: EmailVerifyData;
971
- totpData?: TotpVerifyData;
972
- /** TODO: is this a reasonable maxLength? */
973
- stateToken?: string;
974
- factorType: FactorType$2;
975
- rememberThisDevice?: boolean;
976
- }
977
- /** @oneof */
978
- interface VerifyRequestFactorDataOneOf {
979
- smsData?: SmsVerifyData;
980
- callData?: CallVerifyData;
981
- emailData?: EmailVerifyData;
982
- totpData?: TotpVerifyData;
983
- }
984
- interface SmsVerifyData {
985
- code?: string | null;
986
- }
987
- interface CallVerifyData {
988
- code?: string | null;
989
- }
990
- interface EmailVerifyData {
991
- code?: string | null;
992
- }
993
- interface TotpVerifyData {
994
- code?: string | null;
995
- }
996
- interface V1FactorNonNullableFields$2 {
997
- factorType: FactorType$2;
998
- }
999
- interface RequireMfaDataNonNullableFields$2 {
1000
- availableFactors: V1FactorNonNullableFields$2[];
1001
- }
1002
- interface MfaChallengeDataNonNullableFields$2 {
1003
- factorType: FactorType$2;
1004
- availableFactors: V1FactorNonNullableFields$2[];
1005
- }
1006
- interface IdpConnectionNonNullableFields$2 {
1007
- idpConnectionId: string;
1008
- idpUserId: string;
1009
- }
1010
- interface AuthenticatorConnectionNonNullableFields$2 {
1011
- authenticatorConnectionId: string;
1012
- reEnrollmentRequired: boolean;
1013
- }
1014
- interface ConnectionNonNullableFields$2 {
1015
- idpConnection?: IdpConnectionNonNullableFields$2;
1016
- authenticatorConnection?: AuthenticatorConnectionNonNullableFields$2;
1017
- }
1018
- interface V1ListValueNonNullableFields$2 {
1019
- value: V1CustomValueNonNullableFields$2[];
1020
- }
1021
- interface V1CustomValueNonNullableFields$2 {
1022
- strValue: string;
1023
- numValue: number;
1024
- listValue?: V1ListValueNonNullableFields$2;
1025
- }
1026
- interface CustomFieldNonNullableFields$2 {
1027
- name: string;
1028
- value?: V1CustomValueNonNullableFields$2;
1029
- }
1030
- interface SecondaryEmailNonNullableFields$2 {
1031
- email: string;
1032
- tag: EmailTag$2;
1033
- }
1034
- interface PhoneNonNullableFields$2 {
1035
- phone: string;
1036
- tag: PhoneTag$2;
1037
- }
1038
- interface AddressWrapperNonNullableFields$2 {
1039
- tag: AddressTag$2;
1040
- }
1041
- interface IdentityProfileNonNullableFields$2 {
1042
- emails: string[];
1043
- phones: string[];
1044
- labels: string[];
1045
- privacyStatus: PrivacyStatus$2;
1046
- customFields: CustomFieldNonNullableFields$2[];
1047
- secondaryEmails: SecondaryEmailNonNullableFields$2[];
1048
- phonesV2: PhoneNonNullableFields$2[];
1049
- addresses: AddressWrapperNonNullableFields$2[];
1050
- }
1051
- interface MetadataNonNullableFields$2 {
1052
- tags: string[];
1053
- }
1054
- interface EmailNonNullableFields$2 {
1055
- address: string;
1056
- isVerified: boolean;
1057
- }
1058
- interface StatusV2NonNullableFields$2 {
1059
- name: StatusName$2;
1060
- reasons: Reason$2[];
1061
- }
1062
- interface FactorNonNullableFields$2 {
1063
- factorId: string;
1064
- type: FactorType$2;
1065
- status: Status$2;
1066
- }
1067
- interface IdentityNonNullableFields$2 {
1068
- connections: ConnectionNonNullableFields$2[];
1069
- identityProfile?: IdentityProfileNonNullableFields$2;
1070
- metadata?: MetadataNonNullableFields$2;
1071
- email?: EmailNonNullableFields$2;
1072
- status?: StatusV2NonNullableFields$2;
1073
- factors: FactorNonNullableFields$2[];
1074
- }
1075
- interface StateMachineResponseNonNullableFields$2 {
1076
- requireMfaData?: RequireMfaDataNonNullableFields$2;
1077
- mfaChallengeData?: MfaChallengeDataNonNullableFields$2;
1078
- state: StateType$2;
1079
- identity?: IdentityNonNullableFields$2;
1080
- }
1081
- interface HeadersEntryNonNullableFields$1 {
1082
- key: string;
1083
- value: string;
1084
- }
1085
- interface RawHttpResponseNonNullableFields$1 {
1086
- body: Uint8Array;
1087
- headers: HeadersEntryNonNullableFields$1[];
1088
- }
1089
- interface SignOnResponseNonNullableFields {
1090
- sessionToken: string;
1091
- identity?: IdentityNonNullableFields$2;
1092
- }
1093
- interface RegisterV2Options {
1094
- /** Password of registering member. */
1095
- password?: string;
1096
- /** Profile information of registering member. */
1097
- profile?: IdentityProfile$2;
1098
- /** CAPTCHA tokens, when CAPTCHA setting is on. */
1099
- captchaTokens?: CaptchaToken[];
1100
- /** Additional data, relevant for the flow. */
1101
- clientMetaData?: Record<string, any> | null;
1102
- }
1103
- interface LoginV2Options {
1104
- /** Password of the identity logging in. */
1105
- password?: string;
1106
- /** CAPTCHA tokens, when CAPTCHA setting is on. */
1107
- captchaTokens?: CaptchaToken[];
1108
- /** Additional data, relevant for the flow. */
1109
- clientMetaData?: Record<string, any> | null;
1110
- }
1111
- interface LoginWithIdpConnectionIdentifiers {
1112
- /** The id of the tenant the caller wants to login into */
1113
- tenantId: string;
1114
- /** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
1115
- idpConnectionId: string;
1116
- }
1117
- interface LoginWithIdpConnectionOptions {
1118
- customPayload?: Record<string, string>;
1119
- /**
1120
- * This flow ultimately returns an HTML page that asynchronously posts the LoginResponse via the BroadcastChannel API.
1121
- * The message will be posted to a channel named `wix-idp-$session_id`, and encrypted with the `encryption_key`.
1122
- * Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload
1123
- */
1124
- sessionId: string;
1125
- encryptionKey: string;
1126
- visitorId?: string | null;
1127
- bsi?: string | null;
1128
- }
1129
- interface LoginCallbackOptions {
1130
- /** state that that received on the redirect */
1131
- state?: string;
1132
- /** session token */
1133
- sessionToken?: string;
1134
- }
1135
- interface LoginWithIdpConnectionTokenParamsOptions {
1136
- /** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
1137
- idpConnectionId?: string;
1138
- /** A set of fields that are required for the connection to be able to identify and authenticate the user */
1139
- tokenParams?: Record<string, string>;
1140
- }
1141
- interface SignOnOptions {
1142
- /** profile of the identity */
1143
- profile?: IdentityProfile$2;
1144
- /** when true will mark the email of the identity as verified */
1145
- verifyEmail?: boolean;
1146
- /** when false will create a new contact instead of merging the existing contact into the identity */
1147
- mergeExistingContact?: boolean;
1148
- }
1149
- interface LogoutOptions {
1150
- /** redirect after logout */
1151
- postLogoutRedirectUri?: string | null;
1152
- /** caller identifier */
1153
- clientId?: string | null;
1154
- }
1155
- interface VerifyOptions extends VerifyRequestFactorDataOneOf {
1156
- /** TODO: is this a reasonable maxLength? */
1157
- stateToken?: string;
1158
- rememberThisDevice?: boolean;
1159
- smsData?: SmsVerifyData;
1160
- callData?: CallVerifyData;
1161
- emailData?: EmailVerifyData;
1162
- totpData?: TotpVerifyData;
1163
- }
1164
-
1165
- declare function registerV2$1(httpClient: HttpClient): RegisterV2Signature;
1166
- interface RegisterV2Signature {
1167
- /**
1168
- * Registers a new member.
1169
- *
1170
- * Typically, after a sucessful registration, you generate and use member tokens for the
1171
- * registered member so that subsequent API calls are called as part of a member session.
1172
- *
1173
- * If the email used to register the member already exists as a contact email, the registering
1174
- * member need to verify the email address using a code that is sent to the address.
1175
- * @param - Identifier of registering member.
1176
- */
1177
- (loginId: LoginId, options?: RegisterV2Options | undefined): Promise<StateMachineResponse$2 & StateMachineResponseNonNullableFields$2>;
1178
- }
1179
- declare function loginV2$1(httpClient: HttpClient): LoginV2Signature;
1180
- interface LoginV2Signature {
1181
- /**
1182
- * Logs in an existing user.
1183
- *
1184
- * Typically, after a sucessful login, you generate and use member tokens for the
1185
- * logged-in member so that subsequent API calls are called as part of a member session.
1186
- * @param - Identifier of identity logging in.
1187
- */
1188
- (loginId: LoginId, options?: LoginV2Options | undefined): Promise<StateMachineResponse$2 & StateMachineResponseNonNullableFields$2>;
1189
- }
1190
- declare function changePassword$1(httpClient: HttpClient): ChangePasswordSignature;
1191
- interface ChangePasswordSignature {
1192
- /**
1193
- * Changes the password of a logged in user.
1194
- * @param - The new password to set for the logged in user
1195
- */
1196
- (newPassword: string): Promise<void>;
1197
- }
1198
- declare function loginWithIdpConnection$1(httpClient: HttpClient): LoginWithIdpConnectionSignature;
1199
- interface LoginWithIdpConnectionSignature {
1200
- /** @param - The type of the tenant the caller wants to login into */
1201
- (identifiers: LoginWithIdpConnectionIdentifiers, tenantType: TenantType$1, options?: LoginWithIdpConnectionOptions | undefined): Promise<RawHttpResponse$1 & RawHttpResponseNonNullableFields$1>;
1202
- }
1203
- declare function loginCallback$1(httpClient: HttpClient): LoginCallbackSignature;
1204
- interface LoginCallbackSignature {
1205
- /** */
1206
- (options?: LoginCallbackOptions | undefined): Promise<RawHttpResponse$1 & RawHttpResponseNonNullableFields$1>;
1207
- }
1208
- declare function loginWithIdpConnectionTokenParams$1(httpClient: HttpClient): LoginWithIdpConnectionTokenParamsSignature;
1209
- interface LoginWithIdpConnectionTokenParamsSignature {
1210
- /** */
1211
- (options?: LoginWithIdpConnectionTokenParamsOptions | undefined): Promise<StateMachineResponse$2 & StateMachineResponseNonNullableFields$2>;
1212
- }
1213
- declare function signOn$1(httpClient: HttpClient): SignOnSignature;
1214
- interface SignOnSignature {
1215
- /** @param - the identifier of the identity */
1216
- (loginId: LoginId, options?: SignOnOptions | undefined): Promise<SignOnResponse & SignOnResponseNonNullableFields>;
1217
- }
1218
- declare function logout$1(httpClient: HttpClient): LogoutSignature;
1219
- interface LogoutSignature {
1220
- /**
1221
- * Logs out a member.
1222
- */
1223
- (options?: LogoutOptions | undefined): Promise<RawHttpResponse$1 & RawHttpResponseNonNullableFields$1>;
1224
- }
1225
- declare function verify$1(httpClient: HttpClient): VerifySignature;
1226
- interface VerifySignature {
1227
- /** */
1228
- (factorType: FactorType$2, options?: VerifyOptions | undefined): Promise<StateMachineResponse$2 & StateMachineResponseNonNullableFields$2>;
1229
- }
1230
-
1231
- declare const registerV2: MaybeContext<BuildRESTFunction<typeof registerV2$1> & typeof registerV2$1>;
1232
- declare const loginV2: MaybeContext<BuildRESTFunction<typeof loginV2$1> & typeof loginV2$1>;
1233
- declare const changePassword: MaybeContext<BuildRESTFunction<typeof changePassword$1> & typeof changePassword$1>;
1234
- declare const loginWithIdpConnection: MaybeContext<BuildRESTFunction<typeof loginWithIdpConnection$1> & typeof loginWithIdpConnection$1>;
1235
- declare const loginCallback: MaybeContext<BuildRESTFunction<typeof loginCallback$1> & typeof loginCallback$1>;
1236
- declare const loginWithIdpConnectionTokenParams: MaybeContext<BuildRESTFunction<typeof loginWithIdpConnectionTokenParams$1> & typeof loginWithIdpConnectionTokenParams$1>;
1237
- declare const signOn: MaybeContext<BuildRESTFunction<typeof signOn$1> & typeof signOn$1>;
1238
- declare const logout: MaybeContext<BuildRESTFunction<typeof logout$1> & typeof logout$1>;
1239
- declare const verify: MaybeContext<BuildRESTFunction<typeof verify$1> & typeof verify$1>;
1240
-
1241
- type index_d$4_Authentication = Authentication;
1242
- type index_d$4_CallVerifyData = CallVerifyData;
1243
- type index_d$4_CaptchaToken = CaptchaToken;
1244
- type index_d$4_CaptchaTokenTokenOneOf = CaptchaTokenTokenOneOf;
1245
- type index_d$4_ChangePasswordRequest = ChangePasswordRequest;
1246
- type index_d$4_ChangePasswordResponse = ChangePasswordResponse;
1247
- type index_d$4_EmailVerifyData = EmailVerifyData;
1248
- type index_d$4_LoginCallbackOptions = LoginCallbackOptions;
1249
- type index_d$4_LoginCallbackRequest = LoginCallbackRequest;
1250
- type index_d$4_LoginId = LoginId;
1251
- type index_d$4_LoginIdTypeOneOf = LoginIdTypeOneOf;
1252
- type index_d$4_LoginV2Options = LoginV2Options;
1253
- type index_d$4_LoginV2Request = LoginV2Request;
1254
- type index_d$4_LoginWithIdpConnectionIdentifiers = LoginWithIdpConnectionIdentifiers;
1255
- type index_d$4_LoginWithIdpConnectionOptions = LoginWithIdpConnectionOptions;
1256
- type index_d$4_LoginWithIdpConnectionRequest = LoginWithIdpConnectionRequest;
1257
- type index_d$4_LoginWithIdpConnectionTokenParamsOptions = LoginWithIdpConnectionTokenParamsOptions;
1258
- type index_d$4_LoginWithIdpConnectionTokenParamsRequest = LoginWithIdpConnectionTokenParamsRequest;
1259
- type index_d$4_LogoutOptions = LogoutOptions;
1260
- type index_d$4_LogoutRequest = LogoutRequest;
1261
- type index_d$4_RegisterV2Options = RegisterV2Options;
1262
- type index_d$4_RegisterV2Request = RegisterV2Request;
1263
- type index_d$4_SignOnOptions = SignOnOptions;
1264
- type index_d$4_SignOnRequest = SignOnRequest;
1265
- type index_d$4_SignOnResponse = SignOnResponse;
1266
- type index_d$4_SignOnResponseNonNullableFields = SignOnResponseNonNullableFields;
1267
- type index_d$4_SmsVerifyData = SmsVerifyData;
1268
- type index_d$4_TotpVerifyData = TotpVerifyData;
1269
- type index_d$4_VerifyOptions = VerifyOptions;
1270
- type index_d$4_VerifyRequestFactorDataOneOf = VerifyRequestFactorDataOneOf;
1271
- declare const index_d$4_changePassword: typeof changePassword;
1272
- declare const index_d$4_loginCallback: typeof loginCallback;
1273
- declare const index_d$4_loginV2: typeof loginV2;
1274
- declare const index_d$4_loginWithIdpConnection: typeof loginWithIdpConnection;
1275
- declare const index_d$4_loginWithIdpConnectionTokenParams: typeof loginWithIdpConnectionTokenParams;
1276
- declare const index_d$4_logout: typeof logout;
1277
- declare const index_d$4_registerV2: typeof registerV2;
1278
- declare const index_d$4_signOn: typeof signOn;
1279
- declare const index_d$4_verify: typeof verify;
1280
- declare namespace index_d$4 {
1281
- export { type Address$2 as Address, AddressTag$2 as AddressTag, type AddressWrapper$2 as AddressWrapper, type index_d$4_Authentication as Authentication, type AuthenticatorConnection$2 as AuthenticatorConnection, type index_d$4_CallVerifyData as CallVerifyData, type index_d$4_CaptchaToken as CaptchaToken, type index_d$4_CaptchaTokenTokenOneOf as CaptchaTokenTokenOneOf, type index_d$4_ChangePasswordRequest as ChangePasswordRequest, type index_d$4_ChangePasswordResponse as ChangePasswordResponse, type Connection$2 as Connection, type ConnectionTypeOneOf$2 as ConnectionTypeOneOf, type CustomField$2 as CustomField, type CustomValue$2 as CustomValue, type CustomValueValueOneOf$2 as CustomValueValueOneOf, type Email$3 as Email, EmailTag$2 as EmailTag, type index_d$4_EmailVerifyData as EmailVerifyData, type Factor$2 as Factor, FactorType$2 as FactorType, type HeadersEntry$1 as HeadersEntry, type Identity$2 as Identity, type IdentityProfile$2 as IdentityProfile, type IdpConnection$2 as IdpConnection, type ListValue$2 as ListValue, type index_d$4_LoginCallbackOptions as LoginCallbackOptions, type index_d$4_LoginCallbackRequest as LoginCallbackRequest, type index_d$4_LoginId as LoginId, type index_d$4_LoginIdTypeOneOf as LoginIdTypeOneOf, type index_d$4_LoginV2Options as LoginV2Options, type index_d$4_LoginV2Request as LoginV2Request, type index_d$4_LoginWithIdpConnectionIdentifiers as LoginWithIdpConnectionIdentifiers, type index_d$4_LoginWithIdpConnectionOptions as LoginWithIdpConnectionOptions, type index_d$4_LoginWithIdpConnectionRequest as LoginWithIdpConnectionRequest, type index_d$4_LoginWithIdpConnectionTokenParamsOptions as LoginWithIdpConnectionTokenParamsOptions, type index_d$4_LoginWithIdpConnectionTokenParamsRequest as LoginWithIdpConnectionTokenParamsRequest, type index_d$4_LogoutOptions as LogoutOptions, type index_d$4_LogoutRequest as LogoutRequest, type MapValue$2 as MapValue, type Metadata$2 as Metadata, type MfaChallengeData$2 as MfaChallengeData, type PathParametersEntry$1 as PathParametersEntry, type Phone$2 as Phone, PhoneTag$2 as PhoneTag, PrivacyStatus$2 as PrivacyStatus, type QueryParametersEntry$1 as QueryParametersEntry, type RawHttpRequest$1 as RawHttpRequest, type RawHttpResponse$1 as RawHttpResponse, type RawHttpResponseNonNullableFields$1 as RawHttpResponseNonNullableFields, Reason$2 as Reason, type index_d$4_RegisterV2Options as RegisterV2Options, type index_d$4_RegisterV2Request as RegisterV2Request, type RequireMfaData$2 as RequireMfaData, type SecondaryEmail$2 as SecondaryEmail, type index_d$4_SignOnOptions as SignOnOptions, type index_d$4_SignOnRequest as SignOnRequest, type index_d$4_SignOnResponse as SignOnResponse, type index_d$4_SignOnResponseNonNullableFields as SignOnResponseNonNullableFields, type index_d$4_SmsVerifyData as SmsVerifyData, type StateMachineResponse$2 as StateMachineResponse, type StateMachineResponseNonNullableFields$2 as StateMachineResponseNonNullableFields, type StateMachineResponseStateDataOneOf$2 as StateMachineResponseStateDataOneOf, StateType$2 as StateType, Status$2 as Status, StatusName$2 as StatusName, type StatusV2$2 as StatusV2, TenantType$1 as TenantType, type index_d$4_TotpVerifyData as TotpVerifyData, type V1CustomValue$2 as V1CustomValue, type V1CustomValueValueOneOf$2 as V1CustomValueValueOneOf, type V1Factor$2 as V1Factor, type V1ListValue$2 as V1ListValue, type V1MapValue$2 as V1MapValue, type VerificationChallenge$2 as VerificationChallenge, type index_d$4_VerifyOptions as VerifyOptions, type VerifyRequest$1 as VerifyRequest, type index_d$4_VerifyRequestFactorDataOneOf as VerifyRequestFactorDataOneOf, index_d$4_changePassword as changePassword, index_d$4_loginCallback as loginCallback, index_d$4_loginV2 as loginV2, index_d$4_loginWithIdpConnection as loginWithIdpConnection, index_d$4_loginWithIdpConnectionTokenParams as loginWithIdpConnectionTokenParams, index_d$4_logout as logout, index_d$4_registerV2 as registerV2, index_d$4_signOn as signOn, index_d$4_verify as verify };
1282
- }
1283
-
1284
- /** Recovery token proto is the saved data on the recovery token. */
1285
- interface RecoveryToken {
1286
- /**
1287
- * Recovery token ID
1288
- * @readonly
1289
- */
1290
- _id?: string | null;
1291
- /**
1292
- * Represents the time this SessionToken was created
1293
- * @readonly
1294
- */
1295
- _createdDate?: Date | null;
1296
- /**
1297
- * tenantId
1298
- * @readonly
1299
- */
1300
- tenantId?: string;
1301
- /**
1302
- * TenantType
1303
- * @readonly
1304
- */
1305
- tenantType?: TenantType;
1306
- /**
1307
- * identity id
1308
- * @readonly
1309
- */
1310
- identityId?: string;
1311
- }
1312
- declare enum TenantType {
1313
- UNKNOWN_TENANT_TYPE = "UNKNOWN_TENANT_TYPE",
1314
- ACCOUNT = "ACCOUNT",
1315
- SITE = "SITE",
1316
- ROOT = "ROOT"
1317
- }
1318
- interface SendRecoveryEmailRequest {
1319
- /** Email address associated with the account to recover. */
1320
- email: string;
1321
- /** Language of the email to be sent. Defaults to the language specified in the member's profile. */
1322
- language?: string | null;
1323
- /** Where to redirect to after a successful recovery. */
1324
- redirect?: Redirect;
1325
- }
1326
- interface Redirect {
1327
- /** The URL to redirect to after a successful recovery. */
1328
- url?: string;
1329
- /** Caller identifier. */
1330
- clientId?: string | null;
1331
- }
1332
- interface SendRecoveryEmailResponse {
1333
- }
1334
- interface SendActivationEmailRequest {
1335
- /** Id of the activating user */
1336
- identityId: string;
1337
- /** Options for the activation email */
1338
- emailOptions?: EmailOptions;
1339
- }
1340
- interface EmailOptions {
1341
- /** language of the email - if not received will fallback to the identity language */
1342
- language?: string | null;
1343
- /** Where to redirect after a successful activation process */
1344
- redirect?: Redirect;
1345
- }
1346
- interface SendActivationEmailResponse {
1347
- }
1348
- interface RecoverRequest {
1349
- /** recovery token */
1350
- recoveryToken: string;
1351
- /** new password to set for the identity */
1352
- password?: string | null;
1353
- }
1354
- interface StateMachineResponse$1 extends StateMachineResponseStateDataOneOf$1 {
1355
- requireMfaData?: RequireMfaData$1;
1356
- mfaChallengeData?: MfaChallengeData$1;
1357
- /** The current state of the login or registration process. */
1358
- state?: StateType$1;
1359
- /** If state is `SUCCESS`, a session token. */
1360
- sessionToken?: string | null;
1361
- /** A token representing the current state of the login or registration process. */
1362
- stateToken?: string | null;
1363
- /** Identing of the current member. */
1364
- identity?: Identity$1;
1365
- /** additional_data = 5; //TBD */
1366
- additionalData?: Record<string, CustomValue$1>;
1367
- }
1368
- /** @oneof */
1369
- interface StateMachineResponseStateDataOneOf$1 {
1370
- requireMfaData?: RequireMfaData$1;
1371
- mfaChallengeData?: MfaChallengeData$1;
1372
- }
1373
- declare enum StateType$1 {
1374
- /** Initial unknown state. */
1375
- UNKNOWN_STATE = "UNKNOWN_STATE",
1376
- /** The operation completed successfully. */
1377
- SUCCESS = "SUCCESS",
1378
- /** State that indicates that the member needs owner approval to proceed, available action in: OwnerApprovalStateHandler */
1379
- REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
1380
- /**
1381
- * State that indicates a member waiting for verification, available action are: verifyDuringAuthentication or resendDuringAuthentication
1382
- * https://dev.wix.com/docs/rest/api-reference/auth-management/verification-v1/verify-during-authentication
1383
- */
1384
- REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
1385
- /** State that indicates checking that the status is not one of the `invalidStates` before proceeding. */
1386
- STATUS_CHECK = "STATUS_CHECK",
1387
- REQUIRE_MFA = "REQUIRE_MFA",
1388
- MFA_CHALLENGE = "MFA_CHALLENGE"
1389
- }
1390
- interface Identity$1 {
1391
- /** Identity ID */
1392
- _id?: string | null;
1393
- /**
1394
- * Represents the current state of an item. Each time the item is modified, its `revision` changes.
1395
- * For an update operation to succeed, you MUST pass the latest revision.
1396
- */
1397
- revision?: string | null;
1398
- /**
1399
- * The time this identity was created.
1400
- * @readonly
1401
- */
1402
- _createdDate?: Date | null;
1403
- /**
1404
- * The time this identity was last updated.
1405
- * @readonly
1406
- */
1407
- _updatedDate?: Date | null;
1408
- /** The identity configured connections to authenticate with. */
1409
- connections?: Connection$1[];
1410
- /** Identity profile. */
1411
- identityProfile?: IdentityProfile$1;
1412
- /**
1413
- * Additional information about the identity that can impact user access.
1414
- * This data cannot be set.
1415
- */
1416
- metadata?: Metadata$1;
1417
- /** Identity email address. */
1418
- email?: Email$2;
1419
- /** Identity's current status. */
1420
- status?: StatusV2$1;
1421
- /** filled by pre registered spi */
1422
- customAttributes?: Record<string, any> | null;
1423
- /**
1424
- * Identity factors.
1425
- * @readonly
1426
- */
1427
- factors?: Factor$1[];
1428
- }
1429
- interface Connection$1 extends ConnectionTypeOneOf$1 {
1430
- /** IDP connection. */
1431
- idpConnection?: IdpConnection$1;
1432
- /** Authenticator connection. */
1433
- authenticatorConnection?: AuthenticatorConnection$1;
1434
- }
1435
- /** @oneof */
1436
- interface ConnectionTypeOneOf$1 {
1437
- /** IDP connection. */
1438
- idpConnection?: IdpConnection$1;
1439
- /** Authenticator connection. */
1440
- authenticatorConnection?: AuthenticatorConnection$1;
1441
- }
1442
- interface IdpConnection$1 {
1443
- /** IDP connection ID. */
1444
- idpConnectionId?: string;
1445
- /** IDP user ID. */
1446
- idpUserId?: string;
1447
- }
1448
- interface AuthenticatorConnection$1 {
1449
- /** Authenticator connection ID. */
1450
- authenticatorConnectionId?: string;
1451
- /** Whether re-enrollment is required. */
1452
- reEnrollmentRequired?: boolean;
1453
- }
1454
- interface IdentityProfile$1 {
1455
- /** Profile first name. */
1456
- firstName?: string | null;
1457
- /** Profile last name. */
1458
- lastName?: string | null;
1459
- /** Profile nickname. */
1460
- nickname?: string | null;
1461
- /** Profile picture URL. */
1462
- picture?: string | null;
1463
- /**
1464
- * Deprecated. Use `secondaryEmails` instead.
1465
- * @deprecated Deprecated. Use `secondaryEmails` instead.
1466
- * @replacedBy secondary_emails
1467
- * @targetRemovalDate 2023-11-01
1468
- */
1469
- emails?: string[];
1470
- /**
1471
- * Deprecated. Use `phonesV2` instead.
1472
- * @deprecated Deprecated. Use `phonesV2` instead.
1473
- * @replacedBy phones_v2
1474
- * @targetRemovalDate 2023-11-01
1475
- */
1476
- phones?: string[];
1477
- /** List of profile labels. */
1478
- labels?: string[];
1479
- /** Profile language. */
1480
- language?: string | null;
1481
- /** Profile privacy status. */
1482
- privacyStatus?: PrivacyStatus$1;
1483
- /**
1484
- * Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)
1485
- * are used to store additional information about your site or app's contacts.
1486
- */
1487
- customFields?: CustomField$1[];
1488
- /** List of profile email addresses. */
1489
- secondaryEmails?: SecondaryEmail$1[];
1490
- /** List of profile phone numbers. */
1491
- phonesV2?: Phone$1[];
1492
- /** List of profile physical addresses. */
1493
- addresses?: AddressWrapper$1[];
1494
- /** Company name. */
1495
- company?: string | null;
1496
- /** Position within company. */
1497
- position?: string | null;
1498
- /** Profile birthdate - ISO-8601 extended local date format (YYYY-MM-DD). */
1499
- birthdate?: string | null;
1500
- /** slug */
1501
- slug?: string | null;
1502
- }
1503
- declare enum PrivacyStatus$1 {
1504
- UNDEFINED = "UNDEFINED",
1505
- PUBLIC = "PUBLIC",
1506
- PRIVATE = "PRIVATE"
1507
- }
1508
- interface CustomField$1 {
1509
- /**
1510
- * Custom field name. The name must match one of the key properties of the objects returned by
1511
- * [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields)
1512
- * with the `custom.` prefix removed.
1513
- */
1514
- name?: string;
1515
- /** Custom field value. */
1516
- value?: V1CustomValue$1;
1517
- }
1518
- interface V1CustomValue$1 extends V1CustomValueValueOneOf$1 {
1519
- /** String value. */
1520
- strValue?: string;
1521
- /** Number value. */
1522
- numValue?: number;
1523
- /** Date value. */
1524
- dateValue?: Date | null;
1525
- /** List value. */
1526
- listValue?: V1ListValue$1;
1527
- /** Map value. */
1528
- mapValue?: V1MapValue$1;
1529
- }
1530
- /** @oneof */
1531
- interface V1CustomValueValueOneOf$1 {
1532
- /** String value. */
1533
- strValue?: string;
1534
- /** Number value. */
1535
- numValue?: number;
1536
- /** Date value. */
1537
- dateValue?: Date | null;
1538
- /** List value. */
1539
- listValue?: V1ListValue$1;
1540
- /** Map value. */
1541
- mapValue?: V1MapValue$1;
1542
- }
1543
- interface V1ListValue$1 {
1544
- /** Custom value. */
1545
- value?: V1CustomValue$1[];
1546
- }
1547
- interface V1MapValue$1 {
1548
- /** Mapped custom value. */
1549
- value?: Record<string, V1CustomValue$1>;
1550
- }
1551
- interface SecondaryEmail$1 {
1552
- /** Email address. */
1553
- email?: string;
1554
- /** Email tag. */
1555
- tag?: EmailTag$1;
1556
- }
1557
- declare enum EmailTag$1 {
1558
- UNTAGGED = "UNTAGGED",
1559
- MAIN = "MAIN",
1560
- HOME = "HOME",
1561
- WORK = "WORK"
1562
- }
1563
- interface Phone$1 {
1564
- /** Phone country code. */
1565
- countryCode?: string | null;
1566
- /** Phone number. */
1567
- phone?: string;
1568
- /** Phone tag. */
1569
- tag?: PhoneTag$1;
1570
- }
1571
- declare enum PhoneTag$1 {
1572
- UNTAGGED = "UNTAGGED",
1573
- MAIN = "MAIN",
1574
- HOME = "HOME",
1575
- MOBILE = "MOBILE",
1576
- WORK = "WORK",
1577
- FAX = "FAX"
1578
- }
1579
- interface AddressWrapper$1 {
1580
- /** Address. */
1581
- address?: Address$1;
1582
- /** Address tag. */
1583
- tag?: AddressTag$1;
1584
- }
1585
- /** Physical address */
1586
- interface Address$1 {
1587
- /** Country code. */
1588
- country?: string | null;
1589
- /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
1590
- subdivision?: string | null;
1591
- /** City name. */
1592
- city?: string | null;
1593
- /** Zip/postal code. */
1594
- postalCode?: string | null;
1595
- /** Main address line, usually street and number as free text. */
1596
- addressLine1?: string | null;
1597
- /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
1598
- addressLine2?: string | null;
1599
- }
1600
- declare enum AddressTag$1 {
1601
- UNTAGGED = "UNTAGGED",
1602
- HOME = "HOME",
1603
- WORK = "WORK",
1604
- BILLING = "BILLING",
1605
- SHIPPING = "SHIPPING"
1606
- }
1607
- interface Metadata$1 {
1608
- /**
1609
- * represents general tags such as "isOwner", "isContributor"
1610
- * @readonly
1611
- */
1612
- tags?: string[];
1613
- }
1614
- interface Email$2 {
1615
- address?: string;
1616
- isVerified?: boolean;
1617
- }
1618
- interface StatusV2$1 {
1619
- name?: StatusName$1;
1620
- reasons?: Reason$1[];
1621
- }
1622
- declare enum StatusName$1 {
1623
- UNKNOWN_STATUS = "UNKNOWN_STATUS",
1624
- PENDING = "PENDING",
1625
- ACTIVE = "ACTIVE",
1626
- DELETED = "DELETED",
1627
- BLOCKED = "BLOCKED",
1628
- OFFLINE = "OFFLINE"
1629
- }
1630
- declare enum Reason$1 {
1631
- UNKNOWN_REASON = "UNKNOWN_REASON",
1632
- PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
1633
- PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
1634
- }
1635
- interface Factor$1 {
1636
- /** Factor ID. */
1637
- factorId?: string;
1638
- /** Factor type. */
1639
- type?: FactorType$1;
1640
- /** Factor status. */
1641
- status?: Status$1;
1642
- }
1643
- declare enum FactorType$1 {
1644
- UNKNOWN_FACTOR_TYPE = "UNKNOWN_FACTOR_TYPE",
1645
- PASSWORD = "PASSWORD",
1646
- SMS = "SMS",
1647
- CALL = "CALL",
1648
- EMAIL = "EMAIL",
1649
- TOTP = "TOTP",
1650
- PUSH = "PUSH"
1651
- }
1652
- declare enum Status$1 {
1653
- /** Factor requires activation. */
1654
- INACTIVE = "INACTIVE",
1655
- /** Factor is active and can be used for authentication. */
1656
- ACTIVE = "ACTIVE",
1657
- /** Factor is blocked and cannot be used for authentication. The user should reenroll the factor. */
1658
- REQUIRE_REENROLL = "REQUIRE_REENROLL"
1659
- }
1660
- interface CustomValue$1 extends CustomValueValueOneOf$1 {
1661
- /** String value. */
1662
- strValue?: string;
1663
- /** Number value. */
1664
- numValue?: number;
1665
- /** Date value. */
1666
- dateValue?: Date | null;
1667
- /** List value. */
1668
- listValue?: ListValue$1;
1669
- /** Map value. */
1670
- mapValue?: MapValue$1;
1671
- }
1672
- /** @oneof */
1673
- interface CustomValueValueOneOf$1 {
1674
- /** String value. */
1675
- strValue?: string;
1676
- /** Number value. */
1677
- numValue?: number;
1678
- /** Date value. */
1679
- dateValue?: Date | null;
1680
- /** List value. */
1681
- listValue?: ListValue$1;
1682
- /** Map value. */
1683
- mapValue?: MapValue$1;
1684
- }
1685
- interface ListValue$1 {
1686
- /** Custom value. */
1687
- value?: CustomValue$1[];
1688
- }
1689
- interface MapValue$1 {
1690
- /** Mapped custom value. */
1691
- value?: Record<string, CustomValue$1>;
1692
- }
1693
- interface RequireMfaData$1 {
1694
- availableFactors?: V1Factor$1[];
1695
- }
1696
- interface V1Factor$1 {
1697
- factorType?: FactorType$1;
1698
- }
1699
- interface MfaChallengeData$1 {
1700
- factorType?: FactorType$1;
1701
- verificationChallengeData?: VerificationChallenge$1;
1702
- availableFactors?: V1Factor$1[];
1703
- }
1704
- interface VerificationChallenge$1 {
1705
- hint?: string | null;
1706
- }
1707
- interface V1FactorNonNullableFields$1 {
1708
- factorType: FactorType$1;
1709
- }
1710
- interface RequireMfaDataNonNullableFields$1 {
1711
- availableFactors: V1FactorNonNullableFields$1[];
1712
- }
1713
- interface MfaChallengeDataNonNullableFields$1 {
1714
- factorType: FactorType$1;
1715
- availableFactors: V1FactorNonNullableFields$1[];
1716
- }
1717
- interface IdpConnectionNonNullableFields$1 {
1718
- idpConnectionId: string;
1719
- idpUserId: string;
1720
- }
1721
- interface AuthenticatorConnectionNonNullableFields$1 {
1722
- authenticatorConnectionId: string;
1723
- reEnrollmentRequired: boolean;
1724
- }
1725
- interface ConnectionNonNullableFields$1 {
1726
- idpConnection?: IdpConnectionNonNullableFields$1;
1727
- authenticatorConnection?: AuthenticatorConnectionNonNullableFields$1;
1728
- }
1729
- interface V1ListValueNonNullableFields$1 {
1730
- value: V1CustomValueNonNullableFields$1[];
1731
- }
1732
- interface V1CustomValueNonNullableFields$1 {
1733
- strValue: string;
1734
- numValue: number;
1735
- listValue?: V1ListValueNonNullableFields$1;
1736
- }
1737
- interface CustomFieldNonNullableFields$1 {
1738
- name: string;
1739
- value?: V1CustomValueNonNullableFields$1;
1740
- }
1741
- interface SecondaryEmailNonNullableFields$1 {
1742
- email: string;
1743
- tag: EmailTag$1;
1744
- }
1745
- interface PhoneNonNullableFields$1 {
1746
- phone: string;
1747
- tag: PhoneTag$1;
1748
- }
1749
- interface AddressWrapperNonNullableFields$1 {
1750
- tag: AddressTag$1;
1751
- }
1752
- interface IdentityProfileNonNullableFields$1 {
1753
- emails: string[];
1754
- phones: string[];
1755
- labels: string[];
1756
- privacyStatus: PrivacyStatus$1;
1757
- customFields: CustomFieldNonNullableFields$1[];
1758
- secondaryEmails: SecondaryEmailNonNullableFields$1[];
1759
- phonesV2: PhoneNonNullableFields$1[];
1760
- addresses: AddressWrapperNonNullableFields$1[];
1761
- }
1762
- interface MetadataNonNullableFields$1 {
1763
- tags: string[];
1764
- }
1765
- interface EmailNonNullableFields$1 {
1766
- address: string;
1767
- isVerified: boolean;
1768
- }
1769
- interface StatusV2NonNullableFields$1 {
1770
- name: StatusName$1;
1771
- reasons: Reason$1[];
1772
- }
1773
- interface FactorNonNullableFields$1 {
1774
- factorId: string;
1775
- type: FactorType$1;
1776
- status: Status$1;
1777
- }
1778
- interface IdentityNonNullableFields$1 {
1779
- connections: ConnectionNonNullableFields$1[];
1780
- identityProfile?: IdentityProfileNonNullableFields$1;
1781
- metadata?: MetadataNonNullableFields$1;
1782
- email?: EmailNonNullableFields$1;
1783
- status?: StatusV2NonNullableFields$1;
1784
- factors: FactorNonNullableFields$1[];
1785
- }
1786
- interface StateMachineResponseNonNullableFields$1 {
1787
- requireMfaData?: RequireMfaDataNonNullableFields$1;
1788
- mfaChallengeData?: MfaChallengeDataNonNullableFields$1;
1789
- state: StateType$1;
1790
- identity?: IdentityNonNullableFields$1;
1791
- }
1792
- interface SendRecoveryEmailOptions {
1793
- /** Language of the email to be sent. Defaults to the language specified in the member's profile. */
1794
- language?: string | null;
1795
- /** Where to redirect to after a successful recovery. */
1796
- redirect?: Redirect;
1797
- }
1798
- interface SendActivationEmailOptions {
1799
- /** Options for the activation email */
1800
- emailOptions?: EmailOptions;
1801
- }
1802
- interface RecoverOptions {
1803
- /** new password to set for the identity */
1804
- password?: string | null;
1805
- }
1806
-
1807
- declare function sendRecoveryEmail$1(httpClient: HttpClient): SendRecoveryEmailSignature;
1808
- interface SendRecoveryEmailSignature {
1809
- /**
1810
- * Sends a member an email containing a customized link to a Wix-managed page
1811
- * where the member can set a new password for their account.
1812
- * @param - Email address associated with the account to recover.
1813
- */
1814
- (email: string, options?: SendRecoveryEmailOptions | undefined): Promise<void>;
1815
- }
1816
- declare function sendActivationEmail$1(httpClient: HttpClient): SendActivationEmailSignature;
1817
- interface SendActivationEmailSignature {
1818
- /**
1819
- * Sends an activation email with an activation token
1820
- * making the transition from initial contact to a site member
1821
- * @param - Id of the activating user
1822
- */
1823
- (identityId: string, options?: SendActivationEmailOptions | undefined): Promise<void>;
1824
- }
1825
- declare function recover$1(httpClient: HttpClient): RecoverSignature;
1826
- interface RecoverSignature {
1827
- /** @param - recovery token */
1828
- (recoveryToken: string, options?: RecoverOptions | undefined): Promise<StateMachineResponse$1 & StateMachineResponseNonNullableFields$1>;
1829
- }
1830
-
1831
- declare const sendRecoveryEmail: MaybeContext<BuildRESTFunction<typeof sendRecoveryEmail$1> & typeof sendRecoveryEmail$1>;
1832
- declare const sendActivationEmail: MaybeContext<BuildRESTFunction<typeof sendActivationEmail$1> & typeof sendActivationEmail$1>;
1833
- declare const recover: MaybeContext<BuildRESTFunction<typeof recover$1> & typeof recover$1>;
1834
-
1835
- type index_d$3_EmailOptions = EmailOptions;
1836
- type index_d$3_RecoverOptions = RecoverOptions;
1837
- type index_d$3_RecoverRequest = RecoverRequest;
1838
- type index_d$3_RecoveryToken = RecoveryToken;
1839
- type index_d$3_Redirect = Redirect;
1840
- type index_d$3_SendActivationEmailOptions = SendActivationEmailOptions;
1841
- type index_d$3_SendActivationEmailRequest = SendActivationEmailRequest;
1842
- type index_d$3_SendActivationEmailResponse = SendActivationEmailResponse;
1843
- type index_d$3_SendRecoveryEmailOptions = SendRecoveryEmailOptions;
1844
- type index_d$3_SendRecoveryEmailRequest = SendRecoveryEmailRequest;
1845
- type index_d$3_SendRecoveryEmailResponse = SendRecoveryEmailResponse;
1846
- type index_d$3_TenantType = TenantType;
1847
- declare const index_d$3_TenantType: typeof TenantType;
1848
- declare const index_d$3_recover: typeof recover;
1849
- declare const index_d$3_sendActivationEmail: typeof sendActivationEmail;
1850
- declare const index_d$3_sendRecoveryEmail: typeof sendRecoveryEmail;
1851
- declare namespace index_d$3 {
1852
- export { type Address$1 as Address, AddressTag$1 as AddressTag, type AddressWrapper$1 as AddressWrapper, type AuthenticatorConnection$1 as AuthenticatorConnection, type Connection$1 as Connection, type ConnectionTypeOneOf$1 as ConnectionTypeOneOf, type CustomField$1 as CustomField, type CustomValue$1 as CustomValue, type CustomValueValueOneOf$1 as CustomValueValueOneOf, type Email$2 as Email, type index_d$3_EmailOptions as EmailOptions, EmailTag$1 as EmailTag, type Factor$1 as Factor, FactorType$1 as FactorType, type Identity$1 as Identity, type IdentityProfile$1 as IdentityProfile, type IdpConnection$1 as IdpConnection, type ListValue$1 as ListValue, type MapValue$1 as MapValue, type Metadata$1 as Metadata, type MfaChallengeData$1 as MfaChallengeData, type Phone$1 as Phone, PhoneTag$1 as PhoneTag, PrivacyStatus$1 as PrivacyStatus, Reason$1 as Reason, type index_d$3_RecoverOptions as RecoverOptions, type index_d$3_RecoverRequest as RecoverRequest, type index_d$3_RecoveryToken as RecoveryToken, type index_d$3_Redirect as Redirect, type RequireMfaData$1 as RequireMfaData, type SecondaryEmail$1 as SecondaryEmail, type index_d$3_SendActivationEmailOptions as SendActivationEmailOptions, type index_d$3_SendActivationEmailRequest as SendActivationEmailRequest, type index_d$3_SendActivationEmailResponse as SendActivationEmailResponse, type index_d$3_SendRecoveryEmailOptions as SendRecoveryEmailOptions, type index_d$3_SendRecoveryEmailRequest as SendRecoveryEmailRequest, type index_d$3_SendRecoveryEmailResponse as SendRecoveryEmailResponse, type StateMachineResponse$1 as StateMachineResponse, type StateMachineResponseNonNullableFields$1 as StateMachineResponseNonNullableFields, type StateMachineResponseStateDataOneOf$1 as StateMachineResponseStateDataOneOf, StateType$1 as StateType, Status$1 as Status, StatusName$1 as StatusName, type StatusV2$1 as StatusV2, index_d$3_TenantType as TenantType, type V1CustomValue$1 as V1CustomValue, type V1CustomValueValueOneOf$1 as V1CustomValueValueOneOf, type V1Factor$1 as V1Factor, type V1ListValue$1 as V1ListValue, type V1MapValue$1 as V1MapValue, type VerificationChallenge$1 as VerificationChallenge, index_d$3_recover as recover, index_d$3_sendActivationEmail as sendActivationEmail, index_d$3_sendRecoveryEmail as sendRecoveryEmail };
1853
- }
1854
-
1855
- interface StartResponse {
1856
- /** the identifier of the verification process */
1857
- verificationId?: string;
1858
- }
1859
- interface StartRequest {
1860
- /**
1861
- * an identity_Id.
1862
- * If not provided - currently, an exception is thrown. In the future the identity from identity response will be taken.
1863
- */
1864
- identityId?: string | null;
1865
- /** the delivery target */
1866
- target?: Target;
1867
- }
1868
- declare enum Target {
1869
- UNKNOWN_TARGET = "UNKNOWN_TARGET",
1870
- EMAIL = "EMAIL"
1871
- }
1872
- interface VerifyRequest {
1873
- /** the code to verify */
1874
- code?: string;
1875
- /** the identifier of the verification process */
1876
- verificationId?: string;
1877
- }
1878
- interface VerifyResponse {
1879
- }
1880
- interface VerifyDuringAuthenticationRequest {
1881
- /** The code to verify. */
1882
- code: string;
1883
- /** A state token representing the `REQUIRE_EMAIL_VERIFICATION` state. */
1884
- stateToken: string;
1885
- }
1886
- interface StateMachineResponse extends StateMachineResponseStateDataOneOf {
1887
- requireMfaData?: RequireMfaData;
1888
- mfaChallengeData?: MfaChallengeData;
1889
- /** The current state of the login or registration process. */
1890
- state?: StateType;
1891
- /** If state is `SUCCESS`, a session token. */
1892
- sessionToken?: string | null;
1893
- /** A token representing the current state of the login or registration process. */
1894
- stateToken?: string | null;
1895
- /** Identing of the current member. */
1896
- identity?: Identity;
1897
- /** additional_data = 5; //TBD */
1898
- additionalData?: Record<string, CustomValue>;
1899
- }
1900
- /** @oneof */
1901
- interface StateMachineResponseStateDataOneOf {
1902
- requireMfaData?: RequireMfaData;
1903
- mfaChallengeData?: MfaChallengeData;
1904
- }
1905
- declare enum StateType {
1906
- /** Initial unknown state. */
1907
- UNKNOWN_STATE = "UNKNOWN_STATE",
1908
- /** The operation completed successfully. */
1909
- SUCCESS = "SUCCESS",
1910
- /** State that indicates that the member needs owner approval to proceed, available action in: OwnerApprovalStateHandler */
1911
- REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
1912
- /**
1913
- * State that indicates a member waiting for verification, available action are: verifyDuringAuthentication or resendDuringAuthentication
1914
- * https://dev.wix.com/docs/rest/api-reference/auth-management/verification-v1/verify-during-authentication
1915
- */
1916
- REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
1917
- /** State that indicates checking that the status is not one of the `invalidStates` before proceeding. */
1918
- STATUS_CHECK = "STATUS_CHECK",
1919
- REQUIRE_MFA = "REQUIRE_MFA",
1920
- MFA_CHALLENGE = "MFA_CHALLENGE"
1921
- }
1922
- interface Identity {
1923
- /** Identity ID */
1924
- _id?: string | null;
1925
- /**
1926
- * Represents the current state of an item. Each time the item is modified, its `revision` changes.
1927
- * For an update operation to succeed, you MUST pass the latest revision.
1928
- */
1929
- revision?: string | null;
1930
- /**
1931
- * The time this identity was created.
1932
- * @readonly
1933
- */
1934
- _createdDate?: Date | null;
1935
- /**
1936
- * The time this identity was last updated.
1937
- * @readonly
1938
- */
1939
- _updatedDate?: Date | null;
1940
- /** The identity configured connections to authenticate with. */
1941
- connections?: Connection[];
1942
- /** Identity profile. */
1943
- identityProfile?: IdentityProfile;
1944
- /**
1945
- * Additional information about the identity that can impact user access.
1946
- * This data cannot be set.
1947
- */
1948
- metadata?: Metadata;
1949
- /** Identity email address. */
1950
- email?: Email$1;
1951
- /** Identity's current status. */
1952
- status?: StatusV2;
1953
- /** filled by pre registered spi */
1954
- customAttributes?: Record<string, any> | null;
1955
- /**
1956
- * Identity factors.
1957
- * @readonly
1958
- */
1959
- factors?: Factor[];
1960
- }
1961
- interface Connection extends ConnectionTypeOneOf {
1962
- /** IDP connection. */
1963
- idpConnection?: IdpConnection;
1964
- /** Authenticator connection. */
1965
- authenticatorConnection?: AuthenticatorConnection;
1966
- }
1967
- /** @oneof */
1968
- interface ConnectionTypeOneOf {
1969
- /** IDP connection. */
1970
- idpConnection?: IdpConnection;
1971
- /** Authenticator connection. */
1972
- authenticatorConnection?: AuthenticatorConnection;
1973
- }
1974
- interface IdpConnection {
1975
- /** IDP connection ID. */
1976
- idpConnectionId?: string;
1977
- /** IDP user ID. */
1978
- idpUserId?: string;
1979
- }
1980
- interface AuthenticatorConnection {
1981
- /** Authenticator connection ID. */
1982
- authenticatorConnectionId?: string;
1983
- /** Whether re-enrollment is required. */
1984
- reEnrollmentRequired?: boolean;
1985
- }
1986
- interface IdentityProfile {
1987
- /** Profile first name. */
1988
- firstName?: string | null;
1989
- /** Profile last name. */
1990
- lastName?: string | null;
1991
- /** Profile nickname. */
1992
- nickname?: string | null;
1993
- /** Profile picture URL. */
1994
- picture?: string | null;
1995
- /**
1996
- * Deprecated. Use `secondaryEmails` instead.
1997
- * @deprecated Deprecated. Use `secondaryEmails` instead.
1998
- * @replacedBy secondary_emails
1999
- * @targetRemovalDate 2023-11-01
2000
- */
2001
- emails?: string[];
2002
- /**
2003
- * Deprecated. Use `phonesV2` instead.
2004
- * @deprecated Deprecated. Use `phonesV2` instead.
2005
- * @replacedBy phones_v2
2006
- * @targetRemovalDate 2023-11-01
2007
- */
2008
- phones?: string[];
2009
- /** List of profile labels. */
2010
- labels?: string[];
2011
- /** Profile language. */
2012
- language?: string | null;
2013
- /** Profile privacy status. */
2014
- privacyStatus?: PrivacyStatus;
2015
- /**
2016
- * Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)
2017
- * are used to store additional information about your site or app's contacts.
2018
- */
2019
- customFields?: CustomField[];
2020
- /** List of profile email addresses. */
2021
- secondaryEmails?: SecondaryEmail[];
2022
- /** List of profile phone numbers. */
2023
- phonesV2?: Phone[];
2024
- /** List of profile physical addresses. */
2025
- addresses?: AddressWrapper[];
2026
- /** Company name. */
2027
- company?: string | null;
2028
- /** Position within company. */
2029
- position?: string | null;
2030
- /** Profile birthdate - ISO-8601 extended local date format (YYYY-MM-DD). */
2031
- birthdate?: string | null;
2032
- /** slug */
2033
- slug?: string | null;
2034
- }
2035
- declare enum PrivacyStatus {
2036
- UNDEFINED = "UNDEFINED",
2037
- PUBLIC = "PUBLIC",
2038
- PRIVATE = "PRIVATE"
2039
- }
2040
- interface CustomField {
2041
- /**
2042
- * Custom field name. The name must match one of the key properties of the objects returned by
2043
- * [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields)
2044
- * with the `custom.` prefix removed.
2045
- */
2046
- name?: string;
2047
- /** Custom field value. */
2048
- value?: V1CustomValue;
2049
- }
2050
- interface V1CustomValue extends V1CustomValueValueOneOf {
2051
- /** String value. */
2052
- strValue?: string;
2053
- /** Number value. */
2054
- numValue?: number;
2055
- /** Date value. */
2056
- dateValue?: Date | null;
2057
- /** List value. */
2058
- listValue?: V1ListValue;
2059
- /** Map value. */
2060
- mapValue?: V1MapValue;
2061
- }
2062
- /** @oneof */
2063
- interface V1CustomValueValueOneOf {
2064
- /** String value. */
2065
- strValue?: string;
2066
- /** Number value. */
2067
- numValue?: number;
2068
- /** Date value. */
2069
- dateValue?: Date | null;
2070
- /** List value. */
2071
- listValue?: V1ListValue;
2072
- /** Map value. */
2073
- mapValue?: V1MapValue;
2074
- }
2075
- interface V1ListValue {
2076
- /** Custom value. */
2077
- value?: V1CustomValue[];
2078
- }
2079
- interface V1MapValue {
2080
- /** Mapped custom value. */
2081
- value?: Record<string, V1CustomValue>;
2082
- }
2083
- interface SecondaryEmail {
2084
- /** Email address. */
2085
- email?: string;
2086
- /** Email tag. */
2087
- tag?: EmailTag;
2088
- }
2089
- declare enum EmailTag {
2090
- UNTAGGED = "UNTAGGED",
2091
- MAIN = "MAIN",
2092
- HOME = "HOME",
2093
- WORK = "WORK"
2094
- }
2095
- interface Phone {
2096
- /** Phone country code. */
2097
- countryCode?: string | null;
2098
- /** Phone number. */
2099
- phone?: string;
2100
- /** Phone tag. */
2101
- tag?: PhoneTag;
2102
- }
2103
- declare enum PhoneTag {
2104
- UNTAGGED = "UNTAGGED",
2105
- MAIN = "MAIN",
2106
- HOME = "HOME",
2107
- MOBILE = "MOBILE",
2108
- WORK = "WORK",
2109
- FAX = "FAX"
2110
- }
2111
- interface AddressWrapper {
2112
- /** Address. */
2113
- address?: Address;
2114
- /** Address tag. */
2115
- tag?: AddressTag;
2116
- }
2117
- /** Physical address */
2118
- interface Address {
2119
- /** Country code. */
2120
- country?: string | null;
2121
- /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
2122
- subdivision?: string | null;
2123
- /** City name. */
2124
- city?: string | null;
2125
- /** Zip/postal code. */
2126
- postalCode?: string | null;
2127
- /** Main address line, usually street and number as free text. */
2128
- addressLine1?: string | null;
2129
- /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
2130
- addressLine2?: string | null;
2131
- }
2132
- declare enum AddressTag {
2133
- UNTAGGED = "UNTAGGED",
2134
- HOME = "HOME",
2135
- WORK = "WORK",
2136
- BILLING = "BILLING",
2137
- SHIPPING = "SHIPPING"
2138
- }
2139
- interface Metadata {
2140
- /**
2141
- * represents general tags such as "isOwner", "isContributor"
2142
- * @readonly
2143
- */
2144
- tags?: string[];
2145
- }
2146
- interface Email$1 {
2147
- address?: string;
2148
- isVerified?: boolean;
2149
- }
2150
- interface StatusV2 {
2151
- name?: StatusName;
2152
- reasons?: Reason[];
2153
- }
2154
- declare enum StatusName {
2155
- UNKNOWN_STATUS = "UNKNOWN_STATUS",
2156
- PENDING = "PENDING",
2157
- ACTIVE = "ACTIVE",
2158
- DELETED = "DELETED",
2159
- BLOCKED = "BLOCKED",
2160
- OFFLINE = "OFFLINE"
2161
- }
2162
- declare enum Reason {
2163
- UNKNOWN_REASON = "UNKNOWN_REASON",
2164
- PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
2165
- PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
2166
- }
2167
- interface Factor {
2168
- /** Factor ID. */
2169
- factorId?: string;
2170
- /** Factor type. */
2171
- type?: FactorType;
2172
- /** Factor status. */
2173
- status?: Status;
2174
- }
2175
- declare enum FactorType {
2176
- UNKNOWN_FACTOR_TYPE = "UNKNOWN_FACTOR_TYPE",
2177
- PASSWORD = "PASSWORD",
2178
- SMS = "SMS",
2179
- CALL = "CALL",
2180
- EMAIL = "EMAIL",
2181
- TOTP = "TOTP",
2182
- PUSH = "PUSH"
2183
- }
2184
- declare enum Status {
2185
- /** Factor requires activation. */
2186
- INACTIVE = "INACTIVE",
2187
- /** Factor is active and can be used for authentication. */
2188
- ACTIVE = "ACTIVE",
2189
- /** Factor is blocked and cannot be used for authentication. The user should reenroll the factor. */
2190
- REQUIRE_REENROLL = "REQUIRE_REENROLL"
2191
- }
2192
- interface CustomValue extends CustomValueValueOneOf {
2193
- /** String value. */
2194
- strValue?: string;
2195
- /** Number value. */
2196
- numValue?: number;
2197
- /** Date value. */
2198
- dateValue?: Date | null;
2199
- /** List value. */
2200
- listValue?: ListValue;
2201
- /** Map value. */
2202
- mapValue?: MapValue;
2203
- }
2204
- /** @oneof */
2205
- interface CustomValueValueOneOf {
2206
- /** String value. */
2207
- strValue?: string;
2208
- /** Number value. */
2209
- numValue?: number;
2210
- /** Date value. */
2211
- dateValue?: Date | null;
2212
- /** List value. */
2213
- listValue?: ListValue;
2214
- /** Map value. */
2215
- mapValue?: MapValue;
2216
- }
2217
- interface ListValue {
2218
- /** Custom value. */
2219
- value?: CustomValue[];
2220
- }
2221
- interface MapValue {
2222
- /** Mapped custom value. */
2223
- value?: Record<string, CustomValue>;
2224
- }
2225
- interface RequireMfaData {
2226
- availableFactors?: V1Factor[];
2227
- }
2228
- interface V1Factor {
2229
- factorType?: FactorType;
2230
- }
2231
- interface MfaChallengeData {
2232
- factorType?: FactorType;
2233
- verificationChallengeData?: VerificationChallenge;
2234
- availableFactors?: V1Factor[];
2235
- }
2236
- interface VerificationChallenge {
2237
- hint?: string | null;
2238
- }
2239
- interface ResendDuringAuthenticationRequest {
2240
- /** A state token representing the `REQUIRE_EMAIL_VERIFICATION` state. */
2241
- stateToken: string;
2242
- }
2243
- interface StartResponseNonNullableFields {
2244
- verificationId: string;
2245
- }
2246
- interface V1FactorNonNullableFields {
2247
- factorType: FactorType;
2248
- }
2249
- interface RequireMfaDataNonNullableFields {
2250
- availableFactors: V1FactorNonNullableFields[];
2251
- }
2252
- interface MfaChallengeDataNonNullableFields {
2253
- factorType: FactorType;
2254
- availableFactors: V1FactorNonNullableFields[];
2255
- }
2256
- interface IdpConnectionNonNullableFields {
2257
- idpConnectionId: string;
2258
- idpUserId: string;
2259
- }
2260
- interface AuthenticatorConnectionNonNullableFields {
2261
- authenticatorConnectionId: string;
2262
- reEnrollmentRequired: boolean;
2263
- }
2264
- interface ConnectionNonNullableFields {
2265
- idpConnection?: IdpConnectionNonNullableFields;
2266
- authenticatorConnection?: AuthenticatorConnectionNonNullableFields;
2267
- }
2268
- interface V1ListValueNonNullableFields {
2269
- value: V1CustomValueNonNullableFields[];
2270
- }
2271
- interface V1CustomValueNonNullableFields {
2272
- strValue: string;
2273
- numValue: number;
2274
- listValue?: V1ListValueNonNullableFields;
2275
- }
2276
- interface CustomFieldNonNullableFields {
2277
- name: string;
2278
- value?: V1CustomValueNonNullableFields;
2279
- }
2280
- interface SecondaryEmailNonNullableFields {
2281
- email: string;
2282
- tag: EmailTag;
2283
- }
2284
- interface PhoneNonNullableFields {
2285
- phone: string;
2286
- tag: PhoneTag;
2287
- }
2288
- interface AddressWrapperNonNullableFields {
2289
- tag: AddressTag;
2290
- }
2291
- interface IdentityProfileNonNullableFields {
2292
- emails: string[];
2293
- phones: string[];
2294
- labels: string[];
2295
- privacyStatus: PrivacyStatus;
2296
- customFields: CustomFieldNonNullableFields[];
2297
- secondaryEmails: SecondaryEmailNonNullableFields[];
2298
- phonesV2: PhoneNonNullableFields[];
2299
- addresses: AddressWrapperNonNullableFields[];
2300
- }
2301
- interface MetadataNonNullableFields {
2302
- tags: string[];
2303
- }
2304
- interface EmailNonNullableFields {
2305
- address: string;
2306
- isVerified: boolean;
2307
- }
2308
- interface StatusV2NonNullableFields {
2309
- name: StatusName;
2310
- reasons: Reason[];
2311
- }
2312
- interface FactorNonNullableFields {
2313
- factorId: string;
2314
- type: FactorType;
2315
- status: Status;
2316
- }
2317
- interface IdentityNonNullableFields {
2318
- connections: ConnectionNonNullableFields[];
2319
- identityProfile?: IdentityProfileNonNullableFields;
2320
- metadata?: MetadataNonNullableFields;
2321
- email?: EmailNonNullableFields;
2322
- status?: StatusV2NonNullableFields;
2323
- factors: FactorNonNullableFields[];
2324
- }
2325
- interface StateMachineResponseNonNullableFields {
2326
- requireMfaData?: RequireMfaDataNonNullableFields;
2327
- mfaChallengeData?: MfaChallengeDataNonNullableFields;
2328
- state: StateType;
2329
- identity?: IdentityNonNullableFields;
2330
- }
2331
- interface StartOptions {
2332
- /**
2333
- * an identity_Id.
2334
- * If not provided - currently, an exception is thrown. In the future the identity from identity response will be taken.
2335
- */
2336
- identityId?: string | null;
2337
- /** the delivery target */
2338
- target?: Target;
2339
- }
2340
- interface VerifyDuringAuthenticationOptions {
2341
- /** A state token representing the `REQUIRE_EMAIL_VERIFICATION` state. */
2342
- stateToken: string;
2343
- }
2344
-
2345
- declare function start$1(httpClient: HttpClient): StartSignature;
2346
- interface StartSignature {
2347
- /**
2348
- * starts a verification process
2349
- * example: sends a code to the identity's email
2350
- */
2351
- (options?: StartOptions | undefined): Promise<StartResponse & StartResponseNonNullableFields>;
2352
- }
2353
- declare function verifyDuringAuthentication$1(httpClient: HttpClient): VerifyDuringAuthenticationSignature;
2354
- interface VerifyDuringAuthenticationSignature {
2355
- /**
2356
- * Continues the registration process when a member is required to verify an email address
2357
- * using a verification code received by email.
2358
- *
2359
- * Email verification is required when the registering member is already listed as a contact.
2360
- *
2361
- * Typically, after a successful verification, you generate and use member tokens for the
2362
- * registered member so that subsequent API calls are called as part of a member session.
2363
- * @param - The code to verify.
2364
- */
2365
- (code: string, options: VerifyDuringAuthenticationOptions): Promise<StateMachineResponse & StateMachineResponseNonNullableFields>;
2366
- }
2367
- declare function resendDuringAuthentication$1(httpClient: HttpClient): ResendDuringAuthenticationSignature;
2368
- interface ResendDuringAuthenticationSignature {
2369
- /**
2370
- * Resend the verification email and continue the registration process when a member is required to verify an email address
2371
- * using a verification code received by email.
2372
- * @param - A state token representing the `REQUIRE_EMAIL_VERIFICATION` state.
2373
- */
2374
- (stateToken: string): Promise<StateMachineResponse & StateMachineResponseNonNullableFields>;
2375
- }
2376
-
2377
- declare const start: MaybeContext<BuildRESTFunction<typeof start$1> & typeof start$1>;
2378
- declare const verifyDuringAuthentication: MaybeContext<BuildRESTFunction<typeof verifyDuringAuthentication$1> & typeof verifyDuringAuthentication$1>;
2379
- declare const resendDuringAuthentication: MaybeContext<BuildRESTFunction<typeof resendDuringAuthentication$1> & typeof resendDuringAuthentication$1>;
2380
-
2381
- type index_d$2_Address = Address;
2382
- type index_d$2_AddressTag = AddressTag;
2383
- declare const index_d$2_AddressTag: typeof AddressTag;
2384
- type index_d$2_AddressWrapper = AddressWrapper;
2385
- type index_d$2_AuthenticatorConnection = AuthenticatorConnection;
2386
- type index_d$2_Connection = Connection;
2387
- type index_d$2_ConnectionTypeOneOf = ConnectionTypeOneOf;
2388
- type index_d$2_CustomField = CustomField;
2389
- type index_d$2_CustomValue = CustomValue;
2390
- type index_d$2_CustomValueValueOneOf = CustomValueValueOneOf;
2391
- type index_d$2_EmailTag = EmailTag;
2392
- declare const index_d$2_EmailTag: typeof EmailTag;
2393
- type index_d$2_Factor = Factor;
2394
- type index_d$2_FactorType = FactorType;
2395
- declare const index_d$2_FactorType: typeof FactorType;
2396
- type index_d$2_Identity = Identity;
2397
- type index_d$2_IdentityProfile = IdentityProfile;
2398
- type index_d$2_IdpConnection = IdpConnection;
2399
- type index_d$2_ListValue = ListValue;
2400
- type index_d$2_MapValue = MapValue;
2401
- type index_d$2_Metadata = Metadata;
2402
- type index_d$2_MfaChallengeData = MfaChallengeData;
2403
- type index_d$2_Phone = Phone;
2404
- type index_d$2_PhoneTag = PhoneTag;
2405
- declare const index_d$2_PhoneTag: typeof PhoneTag;
2406
- type index_d$2_PrivacyStatus = PrivacyStatus;
2407
- declare const index_d$2_PrivacyStatus: typeof PrivacyStatus;
2408
- type index_d$2_Reason = Reason;
2409
- declare const index_d$2_Reason: typeof Reason;
2410
- type index_d$2_RequireMfaData = RequireMfaData;
2411
- type index_d$2_ResendDuringAuthenticationRequest = ResendDuringAuthenticationRequest;
2412
- type index_d$2_SecondaryEmail = SecondaryEmail;
2413
- type index_d$2_StartOptions = StartOptions;
2414
- type index_d$2_StartRequest = StartRequest;
2415
- type index_d$2_StartResponse = StartResponse;
2416
- type index_d$2_StartResponseNonNullableFields = StartResponseNonNullableFields;
2417
- type index_d$2_StateMachineResponse = StateMachineResponse;
2418
- type index_d$2_StateMachineResponseNonNullableFields = StateMachineResponseNonNullableFields;
2419
- type index_d$2_StateMachineResponseStateDataOneOf = StateMachineResponseStateDataOneOf;
2420
- type index_d$2_StateType = StateType;
2421
- declare const index_d$2_StateType: typeof StateType;
2422
- type index_d$2_Status = Status;
2423
- declare const index_d$2_Status: typeof Status;
2424
- type index_d$2_StatusName = StatusName;
2425
- declare const index_d$2_StatusName: typeof StatusName;
2426
- type index_d$2_StatusV2 = StatusV2;
2427
- type index_d$2_Target = Target;
2428
- declare const index_d$2_Target: typeof Target;
2429
- type index_d$2_V1CustomValue = V1CustomValue;
2430
- type index_d$2_V1CustomValueValueOneOf = V1CustomValueValueOneOf;
2431
- type index_d$2_V1Factor = V1Factor;
2432
- type index_d$2_V1ListValue = V1ListValue;
2433
- type index_d$2_V1MapValue = V1MapValue;
2434
- type index_d$2_VerificationChallenge = VerificationChallenge;
2435
- type index_d$2_VerifyDuringAuthenticationOptions = VerifyDuringAuthenticationOptions;
2436
- type index_d$2_VerifyDuringAuthenticationRequest = VerifyDuringAuthenticationRequest;
2437
- type index_d$2_VerifyRequest = VerifyRequest;
2438
- type index_d$2_VerifyResponse = VerifyResponse;
2439
- declare const index_d$2_resendDuringAuthentication: typeof resendDuringAuthentication;
2440
- declare const index_d$2_start: typeof start;
2441
- declare const index_d$2_verifyDuringAuthentication: typeof verifyDuringAuthentication;
2442
- declare namespace index_d$2 {
2443
- export { type index_d$2_Address as Address, index_d$2_AddressTag as AddressTag, type index_d$2_AddressWrapper as AddressWrapper, type index_d$2_AuthenticatorConnection as AuthenticatorConnection, type index_d$2_Connection as Connection, type index_d$2_ConnectionTypeOneOf as ConnectionTypeOneOf, type index_d$2_CustomField as CustomField, type index_d$2_CustomValue as CustomValue, type index_d$2_CustomValueValueOneOf as CustomValueValueOneOf, type Email$1 as Email, index_d$2_EmailTag as EmailTag, type index_d$2_Factor as Factor, index_d$2_FactorType as FactorType, type index_d$2_Identity as Identity, type index_d$2_IdentityProfile as IdentityProfile, type index_d$2_IdpConnection as IdpConnection, type index_d$2_ListValue as ListValue, type index_d$2_MapValue as MapValue, type index_d$2_Metadata as Metadata, type index_d$2_MfaChallengeData as MfaChallengeData, type index_d$2_Phone as Phone, index_d$2_PhoneTag as PhoneTag, index_d$2_PrivacyStatus as PrivacyStatus, index_d$2_Reason as Reason, type index_d$2_RequireMfaData as RequireMfaData, type index_d$2_ResendDuringAuthenticationRequest as ResendDuringAuthenticationRequest, type index_d$2_SecondaryEmail as SecondaryEmail, type index_d$2_StartOptions as StartOptions, type index_d$2_StartRequest as StartRequest, type index_d$2_StartResponse as StartResponse, type index_d$2_StartResponseNonNullableFields as StartResponseNonNullableFields, type index_d$2_StateMachineResponse as StateMachineResponse, type index_d$2_StateMachineResponseNonNullableFields as StateMachineResponseNonNullableFields, type index_d$2_StateMachineResponseStateDataOneOf as StateMachineResponseStateDataOneOf, index_d$2_StateType as StateType, index_d$2_Status as Status, index_d$2_StatusName as StatusName, type index_d$2_StatusV2 as StatusV2, index_d$2_Target as Target, type index_d$2_V1CustomValue as V1CustomValue, type index_d$2_V1CustomValueValueOneOf as V1CustomValueValueOneOf, type index_d$2_V1Factor as V1Factor, type index_d$2_V1ListValue as V1ListValue, type index_d$2_V1MapValue as V1MapValue, type index_d$2_VerificationChallenge as VerificationChallenge, type index_d$2_VerifyDuringAuthenticationOptions as VerifyDuringAuthenticationOptions, type index_d$2_VerifyDuringAuthenticationRequest as VerifyDuringAuthenticationRequest, type index_d$2_VerifyRequest as VerifyRequest, type index_d$2_VerifyResponse as VerifyResponse, index_d$2_resendDuringAuthentication as resendDuringAuthentication, index_d$2_start as start, index_d$2_verifyDuringAuthentication as verifyDuringAuthentication };
2444
- }
2445
-
2446
- interface AccountV2 {
2447
- /** Account ID. */
2448
- accountId?: string;
2449
- }
2450
- interface GetUserAccountRequest {
2451
- /** the user id that his account we query */
2452
- userId?: string;
2453
- }
2454
- interface Account {
2455
- /** Account ID. */
2456
- accountId?: string;
2457
- /** Account slug - used in the free URL prefix */
2458
- slug?: string;
2459
- /** Account name (display) */
2460
- accountName?: string | null;
2461
- /**
2462
- * DEPRECATED field of account image
2463
- * @deprecated
2464
- */
2465
- accountImg?: string | null;
2466
- /** account status */
2467
- status?: AccountStatus;
2468
- /** account owner user id */
2469
- accountOwner?: string;
2470
- /** account extra properties */
2471
- accountProperties?: AccountProperties;
2472
- /** the account creation date */
2473
- dateCreated?: Date | null;
2474
- /** last time account was updated */
2475
- dateUpdated?: Date | null;
2476
- }
2477
- /** enum with all available statuses of account */
2478
- declare enum AccountStatus {
2479
- ACTIVE = "ACTIVE",
2480
- BLOCKED = "BLOCKED",
2481
- DELETED = "DELETED"
2482
- }
2483
- /** All relevant account properties */
2484
- interface AccountProperties {
2485
- /** Whether this account is a team account. */
2486
- isTeam?: boolean;
2487
- /**
2488
- * Account image (display)
2489
- * relevant mainly for CoBranded accounts
2490
- */
2491
- accountImg?: string | null;
2492
- /**
2493
- * the account banner (display)
2494
- * relevant mainly for CoBranded accounts
2495
- */
2496
- accountBanner?: string | null;
2497
- /**
2498
- * the account logo (display)
2499
- * wll be shown as the account logo in the UI (top right corner, contributor list etc..)
2500
- */
2501
- accountLogo?: string | null;
2502
- /**
2503
- * account co branding flag (if exists)
2504
- * an enum for CoBranding flag contains 4 possible options:
2505
- * None - the account is not CoBranded
2506
- * CoBranded - the account has a CoBranding flag
2507
- * CoBranded_Customer_New - the account is a contributor of a CoBranded account. This account was created because of the contributor invite
2508
- * CoBranded_Customer_Existing - the account is a contributor of a CoBranded account. This account was created before the invite of the contributor invite
2509
- */
2510
- coBranding?: CoBranding;
2511
- /** account's website URL (shown on co branding customers sites) */
2512
- websiteUrl?: string | null;
2513
- /** the id of the parent account of this account, if it has a parent */
2514
- parentAccountId?: string | null;
2515
- }
2516
- /** co branding flag options for account */
2517
- declare enum CoBranding {
2518
- None = "None",
2519
- CoBranded = "CoBranded",
2520
- CoBranded_Customer_New = "CoBranded_Customer_New",
2521
- CoBranded_Customer_Existing = "CoBranded_Customer_Existing"
2522
- }
2523
- interface GetUserAccountsRequest {
2524
- /** the user id that his accounts we query */
2525
- userId?: string;
2526
- /** Limited to max 20 at a single request */
2527
- paging?: Paging;
2528
- }
2529
- interface Paging {
2530
- /** Number of items to load. */
2531
- limit?: number | null;
2532
- /** Number of items to skip in the current sort order. */
2533
- offset?: number | null;
2534
- }
2535
- interface AccountsResponse {
2536
- accounts?: Account[];
2537
- }
2538
- interface GetMyUserAccountsRequest {
2539
- /** Limited to max 20 at a single request */
2540
- paging?: Paging;
2541
- }
2542
- interface GetAccountRequest {
2543
- /** the account id that it's data should be retrieved */
2544
- accountId?: string;
2545
- }
2546
- interface AccountResponse {
2547
- account?: Account;
2548
- }
2549
- interface GetMyAccountRequest {
2550
- }
2551
- interface GetAccountsRequest {
2552
- /** the account id to retrieve */
2553
- accountIds?: string[];
2554
- }
2555
- interface CreateAccountRequest {
2556
- /** The user to create under the new account, with the roles defined in `roles`. */
2557
- user: User;
2558
- /**
2559
- * Roles to be assigned to the user in the new account. To retrieve all available roles, call Get Roles Info in the Users API.
2560
- * Default: OWNER.
2561
- */
2562
- roles?: string[] | null;
2563
- }
2564
- /** A User to be created under an implicitly provided accountId: must have a unique email. */
2565
- interface User {
2566
- /** User's unique email address details. Required. */
2567
- email?: Email;
2568
- /** User's single sign on identity, when the user is identified via SSO authentication response token params, as specified by [OpenID Connect](https://openid.net/developers/how-connect-works/) (aka. OIDC) protocol. */
2569
- ssoIdentities?: SsoIdentity[];
2570
- /** Additional user details. */
2571
- userDetails?: UserDetails;
2572
- }
2573
- /** User's email address. */
2574
- interface Email {
2575
- /** User's email address. */
2576
- emailAddress?: string;
2577
- /** Whether the caller has verified the user's email address. */
2578
- isVerified?: boolean;
2579
- }
2580
- /** Single Sign On (aka. SSO) identity; user is identified via SSO authentication response token params, as specified by OpenID Connect (aka. OIDC) protocol */
2581
- interface SsoIdentity {
2582
- /** An SSO setting (URLs, clientId, secret, etc. as required by OIDC protocol) for a specific Identity-Provider (aka. IdP) for a specific Wix account. */
2583
- ssoId?: string;
2584
- /**
2585
- * User ID as stored in IdP. For example a "sub" claim of OIDC protocol,
2586
- * or any other alternative, specified by IdP (Identity Provider).
2587
- */
2588
- userId?: string;
2589
- }
2590
- /** additional user details */
2591
- interface UserDetails {
2592
- /** User's first name. */
2593
- firstName?: string | null;
2594
- /** User's last name. */
2595
- lastName?: string | null;
2596
- /** URL to location of user's profile picture. */
2597
- profilePictureUrl?: string | null;
2598
- /** User's preferred language in [ISO 639-1:2002](https://en.wikipedia.org/wiki/ISO_639-1) format. For example, "en", "es". */
2599
- language?: string | null;
2600
- /**
2601
- * Original Client IP from which a request was made.
2602
- * This is useful in case where a createUser API is called by some server call, which, in turn, has been called by some client from another IP.
2603
- * Wix checks this IP against the [OFAC sanctioned countries](https://ofac.treasury.gov/sanctions-programs-and-country-information).
2604
- */
2605
- clientIp?: string | null;
2606
- }
2607
- interface CreateAccountResponse {
2608
- /** The created account. */
2609
- account?: AccountV2;
2610
- }
2611
- interface CreateAccountForMyUserRequest {
2612
- /** the account name */
2613
- accountName?: string | null;
2614
- /** account image url */
2615
- accountImg?: string | null;
2616
- /** whether to mark the account as `studio` */
2617
- studio?: boolean;
2618
- }
2619
- interface CreateAccountTenantRequest {
2620
- slug?: string | null;
2621
- }
2622
- interface CreateAccountTenantResponse {
2623
- account?: AccountV2;
2624
- }
2625
- interface CreateAccountAndAssignUserRequest {
2626
- /** the user id for which we are creating the account */
2627
- userId?: string;
2628
- /** the user name of the user for which the account is created */
2629
- userName?: string;
2630
- /** the parent account of the created account */
2631
- parentAccountId?: string | null;
2632
- /** whether to mark the account as `studio` */
2633
- studio?: boolean;
2634
- }
2635
- interface UpdateAccountRequest {
2636
- /** the account id to update */
2637
- accountId?: string;
2638
- /**
2639
- * DEPRECATED field of image
2640
- * @deprecated
2641
- */
2642
- accountImg?: string | null;
2643
- /** optional - new account name */
2644
- accountName?: string | null;
2645
- /**
2646
- * the new properties for the account.
2647
- * can be passed partially - and only relevant fields will be updated
2648
- */
2649
- accountProperties?: AccountProperties;
2650
- }
2651
- interface UpdateParentAccountRequest extends UpdateParentAccountRequestUpdateOneOf {
2652
- /** Removes the parent account */
2653
- remove?: RemoveParent;
2654
- }
2655
- /** @oneof */
2656
- interface UpdateParentAccountRequestUpdateOneOf {
2657
- /** Removes the parent account */
2658
- remove?: RemoveParent;
2659
- }
2660
- interface RemoveParent {
2661
- }
2662
- interface UpdateParentAccountResponse {
2663
- newParentAccountId?: string | null;
2664
- }
2665
- interface DeleteAccountRequest {
2666
- /** the account id to delete */
2667
- accountId?: string;
2668
- /** will throw exception if trying to delete the account of the last user when the value is true */
2669
- shouldNotDeleteLastAccount?: boolean;
2670
- }
2671
- interface EmptyResponse {
2672
- }
2673
- interface UpdateSlugRequest {
2674
- /** account id */
2675
- accountId?: string;
2676
- /** new slug */
2677
- newSlugName?: string;
2678
- }
2679
- interface IsTeamRequest {
2680
- /** the account id to check if it's a team account */
2681
- accountId?: string;
2682
- }
2683
- interface IsTeamResponse {
2684
- /** true if the account is marked as a team account, false if not */
2685
- isTeamAccount?: boolean;
2686
- }
2687
- interface MarkAccountFlagRequest extends MarkAccountFlagRequestFlagOneOf {
2688
- /**
2689
- * account co branding flag (if exists)
2690
- * an enum for CoBranding flag contains 4 possible options:
2691
- * None - the account is not CoBranded
2692
- * CoBranded - the account has a CoBranding flag
2693
- * CoBranded_Customer_New - the account is a contributor of a CoBranded account. This account was created because of the contributor invite
2694
- * CoBranded_Customer_Existing - the account is a contributor of a CoBranded account. This account was created before the invite of the contributor invite
2695
- */
2696
- coBranding?: CoBranding;
2697
- /** the account id to mark */
2698
- accountId?: string;
2699
- /** the inviting account id in case the flag is given by an invite */
2700
- invitedByAccountId?: string | null;
2701
- }
2702
- /** @oneof */
2703
- interface MarkAccountFlagRequestFlagOneOf {
2704
- /**
2705
- * account co branding flag (if exists)
2706
- * an enum for CoBranding flag contains 4 possible options:
2707
- * None - the account is not CoBranded
2708
- * CoBranded - the account has a CoBranding flag
2709
- * CoBranded_Customer_New - the account is a contributor of a CoBranded account. This account was created because of the contributor invite
2710
- * CoBranded_Customer_Existing - the account is a contributor of a CoBranded account. This account was created before the invite of the contributor invite
2711
- */
2712
- coBranding?: CoBranding;
2713
- }
2714
- interface GetParentAccountInfoRequest {
2715
- }
2716
- interface GetParentAccountInfoResponse {
2717
- /** The info of the parent account, if the account has a parent */
2718
- parentAccountInfo?: AccountInfo;
2719
- }
2720
- interface AccountInfo {
2721
- /** The name of the account */
2722
- name?: string | null;
2723
- /** The url of the image of the account */
2724
- image?: string | null;
2725
- }
2726
- interface GetSubAccountsRequest {
2727
- /** Offset-based pagination for the response. Default page size is 20, max page size is 50 */
2728
- paging?: Paging;
2729
- }
2730
- interface GetSubAccountsResponse {
2731
- /** The sub accounts of the target account */
2732
- subAccounts?: SubAccountInfo[];
2733
- /** Metadata of the response pagination */
2734
- pagingMetadata?: PagingMetadata;
2735
- }
2736
- interface SubAccountInfo {
2737
- /** The id of the sub account */
2738
- accountId?: string;
2739
- }
2740
- interface PagingMetadata {
2741
- /** Number of items returned in the response. */
2742
- count?: number | null;
2743
- /** Offset that was requested. */
2744
- offset?: number | null;
2745
- /** Total number of items that match the query. */
2746
- total?: number | null;
2747
- /** Flag that indicates the server failed to calculate the `total` field. */
2748
- tooManyToCount?: boolean | null;
2749
- }
2750
- interface ListChildAccountsRequest {
2751
- /**
2752
- * Paging options to limit and offset the number of items.
2753
- * Default: 20. Max: 50.
2754
- */
2755
- paging?: Paging;
2756
- }
2757
- interface ListChildAccountsResponse {
2758
- /** The requested child accounts. */
2759
- childAccounts?: AccountV2[];
2760
- /** Metadata of the response pagination. */
2761
- pagingMetadata?: PagingMetadata;
2762
- }
2763
- interface SetIsReadOnlyAccountRequest {
2764
- accountId?: string;
2765
- isReadOnly?: boolean;
2766
- }
2767
- interface AccountV2NonNullableFields {
2768
- accountId: string;
2769
- }
2770
- interface CreateAccountResponseNonNullableFields {
2771
- account?: AccountV2NonNullableFields;
2772
- }
2773
- interface ListChildAccountsResponseNonNullableFields {
2774
- childAccounts: AccountV2NonNullableFields[];
2775
- }
2776
- interface CreateAccountOptions {
2777
- /**
2778
- * Roles to be assigned to the user in the new account. To retrieve all available roles, call Get Roles Info in the Users API.
2779
- * Default: OWNER.
2780
- */
2781
- roles?: string[] | null;
2782
- }
2783
- interface ListChildAccountsOptions {
2784
- /**
2785
- * Paging options to limit and offset the number of items.
2786
- * Default: 20. Max: 50.
2787
- */
2788
- paging?: Paging;
2789
- }
2790
-
2791
- declare function createAccount$1(httpClient: HttpClient): CreateAccountSignature;
2792
- interface CreateAccountSignature {
2793
- /**
2794
- * Creates a new Wix account, and creates a new Wix user as the account owner.
2795
- * The newly created account is a child account of the account used to create it, making that account its parent.
2796
- *
2797
- * > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only.
2798
- * @param - The user to create under the new account, with the roles defined in `roles`.
2799
- * @param - Filter options.
2800
- */
2801
- (user: User, options?: CreateAccountOptions | undefined): Promise<CreateAccountResponse & CreateAccountResponseNonNullableFields>;
2802
- }
2803
- declare function listChildAccounts$1(httpClient: HttpClient): ListChildAccountsSignature;
2804
- interface ListChildAccountsSignature {
2805
- /**
2806
- * Retrieves a list of child account IDs for the requesting account.
2807
- * If no child accounts exist, an empty list will be returned.
2808
- *
2809
- * > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only.
2810
- * @param - Filter options.
2811
- */
2812
- (options?: ListChildAccountsOptions | undefined): Promise<ListChildAccountsResponse & ListChildAccountsResponseNonNullableFields>;
2813
- }
2814
-
2815
- declare const createAccount: MaybeContext<BuildRESTFunction<typeof createAccount$1> & typeof createAccount$1>;
2816
- declare const listChildAccounts: MaybeContext<BuildRESTFunction<typeof listChildAccounts$1> & typeof listChildAccounts$1>;
2817
-
2818
- type index_d$1_Account = Account;
2819
- type index_d$1_AccountInfo = AccountInfo;
2820
- type index_d$1_AccountProperties = AccountProperties;
2821
- type index_d$1_AccountResponse = AccountResponse;
2822
- type index_d$1_AccountStatus = AccountStatus;
2823
- declare const index_d$1_AccountStatus: typeof AccountStatus;
2824
- type index_d$1_AccountV2 = AccountV2;
2825
- type index_d$1_AccountsResponse = AccountsResponse;
2826
- type index_d$1_CoBranding = CoBranding;
2827
- declare const index_d$1_CoBranding: typeof CoBranding;
2828
- type index_d$1_CreateAccountAndAssignUserRequest = CreateAccountAndAssignUserRequest;
2829
- type index_d$1_CreateAccountForMyUserRequest = CreateAccountForMyUserRequest;
2830
- type index_d$1_CreateAccountOptions = CreateAccountOptions;
2831
- type index_d$1_CreateAccountRequest = CreateAccountRequest;
2832
- type index_d$1_CreateAccountResponse = CreateAccountResponse;
2833
- type index_d$1_CreateAccountResponseNonNullableFields = CreateAccountResponseNonNullableFields;
2834
- type index_d$1_CreateAccountTenantRequest = CreateAccountTenantRequest;
2835
- type index_d$1_CreateAccountTenantResponse = CreateAccountTenantResponse;
2836
- type index_d$1_DeleteAccountRequest = DeleteAccountRequest;
2837
- type index_d$1_Email = Email;
2838
- type index_d$1_EmptyResponse = EmptyResponse;
2839
- type index_d$1_GetAccountRequest = GetAccountRequest;
2840
- type index_d$1_GetAccountsRequest = GetAccountsRequest;
2841
- type index_d$1_GetMyAccountRequest = GetMyAccountRequest;
2842
- type index_d$1_GetMyUserAccountsRequest = GetMyUserAccountsRequest;
2843
- type index_d$1_GetParentAccountInfoRequest = GetParentAccountInfoRequest;
2844
- type index_d$1_GetParentAccountInfoResponse = GetParentAccountInfoResponse;
2845
- type index_d$1_GetSubAccountsRequest = GetSubAccountsRequest;
2846
- type index_d$1_GetSubAccountsResponse = GetSubAccountsResponse;
2847
- type index_d$1_GetUserAccountRequest = GetUserAccountRequest;
2848
- type index_d$1_GetUserAccountsRequest = GetUserAccountsRequest;
2849
- type index_d$1_IsTeamRequest = IsTeamRequest;
2850
- type index_d$1_IsTeamResponse = IsTeamResponse;
2851
- type index_d$1_ListChildAccountsOptions = ListChildAccountsOptions;
2852
- type index_d$1_ListChildAccountsRequest = ListChildAccountsRequest;
2853
- type index_d$1_ListChildAccountsResponse = ListChildAccountsResponse;
2854
- type index_d$1_ListChildAccountsResponseNonNullableFields = ListChildAccountsResponseNonNullableFields;
2855
- type index_d$1_MarkAccountFlagRequest = MarkAccountFlagRequest;
2856
- type index_d$1_MarkAccountFlagRequestFlagOneOf = MarkAccountFlagRequestFlagOneOf;
2857
- type index_d$1_Paging = Paging;
2858
- type index_d$1_PagingMetadata = PagingMetadata;
2859
- type index_d$1_RemoveParent = RemoveParent;
2860
- type index_d$1_SetIsReadOnlyAccountRequest = SetIsReadOnlyAccountRequest;
2861
- type index_d$1_SsoIdentity = SsoIdentity;
2862
- type index_d$1_SubAccountInfo = SubAccountInfo;
2863
- type index_d$1_UpdateAccountRequest = UpdateAccountRequest;
2864
- type index_d$1_UpdateParentAccountRequest = UpdateParentAccountRequest;
2865
- type index_d$1_UpdateParentAccountRequestUpdateOneOf = UpdateParentAccountRequestUpdateOneOf;
2866
- type index_d$1_UpdateParentAccountResponse = UpdateParentAccountResponse;
2867
- type index_d$1_UpdateSlugRequest = UpdateSlugRequest;
2868
- type index_d$1_User = User;
2869
- type index_d$1_UserDetails = UserDetails;
2870
- declare const index_d$1_createAccount: typeof createAccount;
2871
- declare const index_d$1_listChildAccounts: typeof listChildAccounts;
2872
- declare namespace index_d$1 {
2873
- export { type index_d$1_Account as Account, type index_d$1_AccountInfo as AccountInfo, type index_d$1_AccountProperties as AccountProperties, type index_d$1_AccountResponse as AccountResponse, index_d$1_AccountStatus as AccountStatus, type index_d$1_AccountV2 as AccountV2, type index_d$1_AccountsResponse as AccountsResponse, index_d$1_CoBranding as CoBranding, type index_d$1_CreateAccountAndAssignUserRequest as CreateAccountAndAssignUserRequest, type index_d$1_CreateAccountForMyUserRequest as CreateAccountForMyUserRequest, type index_d$1_CreateAccountOptions as CreateAccountOptions, type index_d$1_CreateAccountRequest as CreateAccountRequest, type index_d$1_CreateAccountResponse as CreateAccountResponse, type index_d$1_CreateAccountResponseNonNullableFields as CreateAccountResponseNonNullableFields, type index_d$1_CreateAccountTenantRequest as CreateAccountTenantRequest, type index_d$1_CreateAccountTenantResponse as CreateAccountTenantResponse, type index_d$1_DeleteAccountRequest as DeleteAccountRequest, type index_d$1_Email as Email, type index_d$1_EmptyResponse as EmptyResponse, type index_d$1_GetAccountRequest as GetAccountRequest, type index_d$1_GetAccountsRequest as GetAccountsRequest, type index_d$1_GetMyAccountRequest as GetMyAccountRequest, type index_d$1_GetMyUserAccountsRequest as GetMyUserAccountsRequest, type index_d$1_GetParentAccountInfoRequest as GetParentAccountInfoRequest, type index_d$1_GetParentAccountInfoResponse as GetParentAccountInfoResponse, type index_d$1_GetSubAccountsRequest as GetSubAccountsRequest, type index_d$1_GetSubAccountsResponse as GetSubAccountsResponse, type index_d$1_GetUserAccountRequest as GetUserAccountRequest, type index_d$1_GetUserAccountsRequest as GetUserAccountsRequest, type index_d$1_IsTeamRequest as IsTeamRequest, type index_d$1_IsTeamResponse as IsTeamResponse, type index_d$1_ListChildAccountsOptions as ListChildAccountsOptions, type index_d$1_ListChildAccountsRequest as ListChildAccountsRequest, type index_d$1_ListChildAccountsResponse as ListChildAccountsResponse, type index_d$1_ListChildAccountsResponseNonNullableFields as ListChildAccountsResponseNonNullableFields, type index_d$1_MarkAccountFlagRequest as MarkAccountFlagRequest, type index_d$1_MarkAccountFlagRequestFlagOneOf as MarkAccountFlagRequestFlagOneOf, type index_d$1_Paging as Paging, type index_d$1_PagingMetadata as PagingMetadata, type index_d$1_RemoveParent as RemoveParent, type index_d$1_SetIsReadOnlyAccountRequest as SetIsReadOnlyAccountRequest, type index_d$1_SsoIdentity as SsoIdentity, type index_d$1_SubAccountInfo as SubAccountInfo, type index_d$1_UpdateAccountRequest as UpdateAccountRequest, type index_d$1_UpdateParentAccountRequest as UpdateParentAccountRequest, type index_d$1_UpdateParentAccountRequestUpdateOneOf as UpdateParentAccountRequestUpdateOneOf, type index_d$1_UpdateParentAccountResponse as UpdateParentAccountResponse, type index_d$1_UpdateSlugRequest as UpdateSlugRequest, type index_d$1_User as User, type index_d$1_UserDetails as UserDetails, index_d$1_createAccount as createAccount, index_d$1_listChildAccounts as listChildAccounts };
2874
- }
2875
-
2876
- interface RefreshToken {
2877
- token?: string;
2878
- }
2879
- /**
2880
- * AuthorizeRequest is sent by the client to the authorization server to initiate
2881
- * the authorization process.
2882
- */
2883
- interface AuthorizeRequest {
2884
- /** ID of the Wix OAuth app requesting authorization. */
2885
- clientId?: string;
2886
- /**
2887
- * Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
2888
- *
2889
- * Supported values:
2890
- * + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
2891
- */
2892
- responseType?: string;
2893
- /** URI to redirect the browser to after authentication and authorization. The browser is redirected to this URI whether the authentication and authorization process is successful or not. */
2894
- redirectUri?: string | null;
2895
- /**
2896
- * Desired scope of access. If this field is left empty, only an access token is granted.
2897
- * To received a refresh token, pass `offline_access` as the value of this field.
2898
- */
2899
- scope?: string | null;
2900
- /**
2901
- * A value used to confirm the state of an application before and after it makes an authorization
2902
- * request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
2903
- * is redirected there.
2904
- * Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
2905
- */
2906
- state?: string;
2907
- /**
2908
- * esired response format.
2909
- *
2910
- * Supported values:
2911
- * + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
2912
- * + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
2913
- * + `web_message`: The response parameters are encoded as a JSON object and added to the body of a [web message response](https://datatracker.ietf.org/doc/html/draft-sakimura-oauth-wmrm-00).
2914
- *
2915
- * Default value: `query`
2916
- */
2917
- responseMode?: string | null;
2918
- /**
2919
- * Code challenge to use for PKCE verification.
2920
- * This field is only used if `responseType` is set to `code`.
2921
- */
2922
- codeChallenge?: string | null;
2923
- /**
2924
- * Code challenge method to use for PKCE verification.
2925
- * This field is only used if `responseType` is set to `code`.
2926
- *
2927
- * Supported values:
2928
- * + `S256`: The code challenge is transformed using SHA-256 encyption.
2929
- * + `S512`: The code challenge is transformed using SHA-512 encyption.
2930
- */
2931
- codeChallengeMethod?: string | null;
2932
- /** Session token of the site visitor to authorize. */
2933
- sessionToken?: string | null;
2934
- }
2935
- interface RawHttpResponse {
2936
- body?: Uint8Array;
2937
- statusCode?: number | null;
2938
- headers?: HeadersEntry[];
2939
- }
2940
- interface HeadersEntry {
2941
- key?: string;
2942
- value?: string;
2943
- }
2944
- interface RawHttpRequest {
2945
- body?: Uint8Array;
2946
- pathParams?: PathParametersEntry[];
2947
- queryParams?: QueryParametersEntry[];
2948
- headers?: HeadersEntry[];
2949
- method?: string;
2950
- rawPath?: string;
2951
- rawQuery?: string;
2952
- }
2953
- interface PathParametersEntry {
2954
- key?: string;
2955
- value?: string;
2956
- }
2957
- interface QueryParametersEntry {
2958
- key?: string;
2959
- value?: string;
2960
- }
2961
- interface DeviceCodeRequest {
2962
- /** The ID of the application that asks for authorization. */
2963
- clientId?: string;
2964
- /**
2965
- * scope is a space-delimited string that specifies the requested scope of the
2966
- * access request.
2967
- */
2968
- scope?: string | null;
2969
- }
2970
- interface DeviceCodeResponse {
2971
- /** is the unique code for the device. When the user goes to the verification_uri in their browser-based device, this code will be bound to their session. */
2972
- deviceCode?: string;
2973
- /** contains the code that should be input at the verification_uri to authorize the device. */
2974
- userCode?: string;
2975
- /** contains the URL the user should visit to authorize the device. */
2976
- verificationUri?: string;
2977
- /** indicates the lifetime (in seconds) of the device_code and user_code. */
2978
- expiresIn?: number;
2979
- /** indicates the interval (in seconds) at which the app should poll the token URL to request a token. clients MUST use 5 as the default */
2980
- interval?: number | null;
2981
- }
2982
- interface DeviceVerifyRequest {
2983
- /** User code representing a currently authorizing device. */
2984
- userCode?: string;
2985
- }
2986
- interface DeviceVerifyResponse {
2987
- }
2988
- interface DeviceVerifyV2Request {
2989
- /** User code representing a currently authorizing device. */
2990
- userCode?: string;
2991
- }
2992
- interface DeviceVerifyV2Response {
2993
- }
2994
- interface InvalidateUserCodeRequest {
2995
- /** user code to invalidate. Only the authorizing identity is able to invalidate it. */
2996
- userCode?: string;
2997
- }
2998
- interface InvalidateUserCodeResponse {
2999
- }
3000
- interface RevokeRefreshTokenRequest {
3001
- /** The refresh token itself. Anyone with the token itself is able to revoke it. */
3002
- token?: string;
3003
- }
3004
- interface RevokeRefreshTokenResponse {
3005
- }
3006
- interface TokenInfoResponse {
3007
- active?: boolean;
3008
- /** subject type. */
3009
- subjectType?: SubjectType;
3010
- /** subject id */
3011
- subjectId?: string;
3012
- /** Expiration time of the token */
3013
- exp?: string | null;
3014
- /** Issued time of the token */
3015
- iat?: string | null;
3016
- /** Client id */
3017
- clientId?: string;
3018
- /** Account id */
3019
- accountId?: string | null;
3020
- /** Site id */
3021
- siteId?: string | null;
3022
- /** Instance Id */
3023
- instanceId?: string | null;
3024
- /** Vendor Product Id */
3025
- vendorProductId?: string | null;
3026
- }
3027
- declare enum SubjectType {
3028
- /** unknown subject type */
3029
- UNKNOWN = "UNKNOWN",
3030
- /** user subject type */
3031
- USER = "USER",
3032
- /** visitor subject type */
3033
- VISITOR = "VISITOR",
3034
- /** member subject type */
3035
- MEMBER = "MEMBER",
3036
- /** app subject type */
3037
- APP = "APP"
3038
- }
3039
- interface Empty {
3040
- }
3041
- interface DomainEvent extends DomainEventBodyOneOf {
3042
- createdEvent?: EntityCreatedEvent;
3043
- updatedEvent?: EntityUpdatedEvent;
3044
- deletedEvent?: EntityDeletedEvent;
3045
- actionEvent?: ActionEvent;
3046
- /**
3047
- * Unique event ID.
3048
- * Allows clients to ignore duplicate webhooks.
3049
- */
3050
- _id?: string;
3051
- /**
3052
- * Assumes actions are also always typed to an entity_type
3053
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
3054
- */
3055
- entityFqdn?: string;
3056
- /**
3057
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
3058
- * This is although the created/updated/deleted notion is duplication of the oneof types
3059
- * Example: created/updated/deleted/started/completed/email_opened
3060
- */
3061
- slug?: string;
3062
- /** ID of the entity associated with the event. */
3063
- entityId?: string;
3064
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
3065
- eventTime?: Date | null;
3066
- /**
3067
- * Whether the event was triggered as a result of a privacy regulation application
3068
- * (for example, GDPR).
3069
- */
3070
- triggeredByAnonymizeRequest?: boolean | null;
3071
- /** If present, indicates the action that triggered the event. */
3072
- originatedFrom?: string | null;
3073
- /**
3074
- * A sequence number defining the order of updates to the underlying entity.
3075
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
3076
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
3077
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
3078
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
3079
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
3080
- */
3081
- entityEventSequence?: string | null;
3082
- }
3083
- /** @oneof */
3084
- interface DomainEventBodyOneOf {
3085
- createdEvent?: EntityCreatedEvent;
3086
- updatedEvent?: EntityUpdatedEvent;
3087
- deletedEvent?: EntityDeletedEvent;
3088
- actionEvent?: ActionEvent;
3089
- }
3090
- interface EntityCreatedEvent {
3091
- entity?: string;
3092
- }
3093
- interface RestoreInfo {
3094
- deletedDate?: Date | null;
3095
- }
3096
- interface EntityUpdatedEvent {
3097
- /**
3098
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
3099
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
3100
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
3101
- */
3102
- currentEntity?: string;
3103
- }
3104
- interface EntityDeletedEvent {
3105
- /** Entity that was deleted */
3106
- deletedEntity?: string | null;
3107
- }
3108
- interface ActionEvent {
3109
- body?: string;
3110
- }
3111
- interface HeadersEntryNonNullableFields {
3112
- key: string;
3113
- value: string;
3114
- }
3115
- interface RawHttpResponseNonNullableFields {
3116
- body: Uint8Array;
3117
- headers: HeadersEntryNonNullableFields[];
3118
- }
3119
- interface TokenInfoResponseNonNullableFields {
3120
- active: boolean;
3121
- subjectType: SubjectType;
3122
- subjectId: string;
3123
- clientId: string;
3124
- }
3125
- interface TokenOptions {
3126
- body?: Uint8Array;
3127
- pathParams?: PathParametersEntry[];
3128
- queryParams?: QueryParametersEntry[];
3129
- headers?: HeadersEntry[];
3130
- method?: string;
3131
- rawPath?: string;
3132
- rawQuery?: string;
3133
- }
3134
- interface TokenInfoOptions {
3135
- body?: Uint8Array;
3136
- pathParams?: PathParametersEntry[];
3137
- queryParams?: QueryParametersEntry[];
3138
- headers?: HeadersEntry[];
3139
- method?: string;
3140
- rawPath?: string;
3141
- rawQuery?: string;
3142
- }
3143
-
3144
- declare function token$1(httpClient: HttpClient): TokenSignature;
3145
- interface TokenSignature {
3146
- /**
3147
- * Creates an access token.
3148
- *
3149
- *
3150
- * The endpoint accepts raw HTTP requests. You must pass the request's body
3151
- * parameters formatted as bytes in the raw HTTP request's `body` field,
3152
- * following this template:
3153
- * `{"grantType": "client_credentials", "client_id": "<APP_ID>", "client_secret": "<APP_SECRET_KEY>", "instance_id": "<INSTANCE_ID>"}`.
3154
- *
3155
- * When the call succeeds, Wix returns `{"statusCode": 200}` and the created access
3156
- * token in the `body` field of the raw HTTP response.
3157
- *
3158
- * In case the call fails, Wix returns the relevant `4XX` error code in the raw
3159
- * HTTP response's `statusCode` field and details
3160
- * about the error in `body`. Error details follow the
3161
- * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).
3162
- */
3163
- (options?: TokenOptions | undefined): Promise<RawHttpResponse & RawHttpResponseNonNullableFields>;
3164
- }
3165
- declare function tokenInfo$1(httpClient: HttpClient): TokenInfoSignature;
3166
- interface TokenInfoSignature {
3167
- /**
3168
- * Token Introspection Endpoint.
3169
- */
3170
- (options?: TokenInfoOptions | undefined): Promise<TokenInfoResponse & TokenInfoResponseNonNullableFields>;
3171
- }
3172
-
3173
- declare const token: MaybeContext<BuildRESTFunction<typeof token$1> & typeof token$1>;
3174
- declare const tokenInfo: MaybeContext<BuildRESTFunction<typeof tokenInfo$1> & typeof tokenInfo$1>;
3175
-
3176
- type index_d_ActionEvent = ActionEvent;
3177
- type index_d_AuthorizeRequest = AuthorizeRequest;
3178
- type index_d_DeviceCodeRequest = DeviceCodeRequest;
3179
- type index_d_DeviceCodeResponse = DeviceCodeResponse;
3180
- type index_d_DeviceVerifyRequest = DeviceVerifyRequest;
3181
- type index_d_DeviceVerifyResponse = DeviceVerifyResponse;
3182
- type index_d_DeviceVerifyV2Request = DeviceVerifyV2Request;
3183
- type index_d_DeviceVerifyV2Response = DeviceVerifyV2Response;
3184
- type index_d_DomainEvent = DomainEvent;
3185
- type index_d_DomainEventBodyOneOf = DomainEventBodyOneOf;
3186
- type index_d_Empty = Empty;
3187
- type index_d_EntityCreatedEvent = EntityCreatedEvent;
3188
- type index_d_EntityDeletedEvent = EntityDeletedEvent;
3189
- type index_d_EntityUpdatedEvent = EntityUpdatedEvent;
3190
- type index_d_HeadersEntry = HeadersEntry;
3191
- type index_d_InvalidateUserCodeRequest = InvalidateUserCodeRequest;
3192
- type index_d_InvalidateUserCodeResponse = InvalidateUserCodeResponse;
3193
- type index_d_PathParametersEntry = PathParametersEntry;
3194
- type index_d_QueryParametersEntry = QueryParametersEntry;
3195
- type index_d_RawHttpRequest = RawHttpRequest;
3196
- type index_d_RawHttpResponse = RawHttpResponse;
3197
- type index_d_RawHttpResponseNonNullableFields = RawHttpResponseNonNullableFields;
3198
- type index_d_RefreshToken = RefreshToken;
3199
- type index_d_RestoreInfo = RestoreInfo;
3200
- type index_d_RevokeRefreshTokenRequest = RevokeRefreshTokenRequest;
3201
- type index_d_RevokeRefreshTokenResponse = RevokeRefreshTokenResponse;
3202
- type index_d_SubjectType = SubjectType;
3203
- declare const index_d_SubjectType: typeof SubjectType;
3204
- type index_d_TokenInfoOptions = TokenInfoOptions;
3205
- type index_d_TokenInfoResponse = TokenInfoResponse;
3206
- type index_d_TokenInfoResponseNonNullableFields = TokenInfoResponseNonNullableFields;
3207
- type index_d_TokenOptions = TokenOptions;
3208
- declare const index_d_token: typeof token;
3209
- declare const index_d_tokenInfo: typeof tokenInfo;
3210
- declare namespace index_d {
3211
- export { type index_d_ActionEvent as ActionEvent, type index_d_AuthorizeRequest as AuthorizeRequest, type index_d_DeviceCodeRequest as DeviceCodeRequest, type index_d_DeviceCodeResponse as DeviceCodeResponse, type index_d_DeviceVerifyRequest as DeviceVerifyRequest, type index_d_DeviceVerifyResponse as DeviceVerifyResponse, type index_d_DeviceVerifyV2Request as DeviceVerifyV2Request, type index_d_DeviceVerifyV2Response as DeviceVerifyV2Response, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_Empty as Empty, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_HeadersEntry as HeadersEntry, type index_d_InvalidateUserCodeRequest as InvalidateUserCodeRequest, type index_d_InvalidateUserCodeResponse as InvalidateUserCodeResponse, type index_d_PathParametersEntry as PathParametersEntry, type index_d_QueryParametersEntry as QueryParametersEntry, type index_d_RawHttpRequest as RawHttpRequest, type index_d_RawHttpResponse as RawHttpResponse, type index_d_RawHttpResponseNonNullableFields as RawHttpResponseNonNullableFields, type index_d_RefreshToken as RefreshToken, type index_d_RestoreInfo as RestoreInfo, type index_d_RevokeRefreshTokenRequest as RevokeRefreshTokenRequest, type index_d_RevokeRefreshTokenResponse as RevokeRefreshTokenResponse, index_d_SubjectType as SubjectType, type index_d_TokenInfoOptions as TokenInfoOptions, type index_d_TokenInfoResponse as TokenInfoResponse, type index_d_TokenInfoResponseNonNullableFields as TokenInfoResponseNonNullableFields, type index_d_TokenOptions as TokenOptions, index_d_token as token, index_d_tokenInfo as tokenInfo };
3212
- }
3213
-
3214
- export { index_d$1 as account, index_d$4 as authentication, index_d as oauth, index_d$3 as recovery, index_d$2 as verification };