@wix/identity 1.0.73 → 1.0.75

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.
Files changed (145) hide show
  1. package/build/cjs/context.d.ts +4 -0
  2. package/build/cjs/{index.typings.js → context.js} +5 -5
  3. package/build/cjs/context.js.map +1 -0
  4. package/build/cjs/index.d.ts +4 -4
  5. package/build/cjs/index.js +4 -4
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/meta.d.ts +4 -4
  8. package/build/cjs/meta.js +4 -4
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/context.d.ts +4 -0
  11. package/build/es/context.js +5 -0
  12. package/build/es/context.js.map +1 -0
  13. package/build/es/index.d.ts +4 -4
  14. package/build/es/index.js +4 -4
  15. package/build/es/index.js.map +1 -1
  16. package/build/es/meta.d.ts +4 -4
  17. package/build/es/meta.js +4 -4
  18. package/build/es/meta.js.map +1 -1
  19. package/context/package.json +6 -0
  20. package/package.json +15 -8
  21. package/build/cjs/index.typings.d.ts +0 -4
  22. package/build/cjs/index.typings.js.map +0 -1
  23. package/build/cjs/src/iam-authentication-v1-authentication.http.d.ts +0 -28
  24. package/build/cjs/src/iam-authentication-v1-authentication.http.js +0 -408
  25. package/build/cjs/src/iam-authentication-v1-authentication.http.js.map +0 -1
  26. package/build/cjs/src/iam-authentication-v1-authentication.meta.d.ts +0 -21
  27. package/build/cjs/src/iam-authentication-v1-authentication.meta.js +0 -199
  28. package/build/cjs/src/iam-authentication-v1-authentication.meta.js.map +0 -1
  29. package/build/cjs/src/iam-authentication-v1-authentication.public.d.ts +0 -16
  30. package/build/cjs/src/iam-authentication-v1-authentication.public.js +0 -70
  31. package/build/cjs/src/iam-authentication-v1-authentication.public.js.map +0 -1
  32. package/build/cjs/src/iam-authentication-v1-authentication.types.d.ts +0 -669
  33. package/build/cjs/src/iam-authentication-v1-authentication.types.js +0 -78
  34. package/build/cjs/src/iam-authentication-v1-authentication.types.js.map +0 -1
  35. package/build/cjs/src/iam-authentication-v1-authentication.universal.d.ts +0 -790
  36. package/build/cjs/src/iam-authentication-v1-authentication.universal.js +0 -735
  37. package/build/cjs/src/iam-authentication-v1-authentication.universal.js.map +0 -1
  38. package/build/cjs/src/iam-recovery-v1-recovery.http.d.ts +0 -13
  39. package/build/cjs/src/iam-recovery-v1-recovery.http.js +0 -109
  40. package/build/cjs/src/iam-recovery-v1-recovery.http.js.map +0 -1
  41. package/build/cjs/src/iam-recovery-v1-recovery.meta.d.ts +0 -15
  42. package/build/cjs/src/iam-recovery-v1-recovery.meta.js +0 -85
  43. package/build/cjs/src/iam-recovery-v1-recovery.meta.js.map +0 -1
  44. package/build/cjs/src/iam-recovery-v1-recovery.public.d.ts +0 -10
  45. package/build/cjs/src/iam-recovery-v1-recovery.public.js +0 -33
  46. package/build/cjs/src/iam-recovery-v1-recovery.public.js.map +0 -1
  47. package/build/cjs/src/iam-recovery-v1-recovery.types.d.ts +0 -431
  48. package/build/cjs/src/iam-recovery-v1-recovery.types.js +0 -72
  49. package/build/cjs/src/iam-recovery-v1-recovery.types.js.map +0 -1
  50. package/build/cjs/src/iam-recovery-v1-recovery.universal.d.ts +0 -475
  51. package/build/cjs/src/iam-recovery-v1-recovery.universal.js +0 -321
  52. package/build/cjs/src/iam-recovery-v1-recovery.universal.js.map +0 -1
  53. package/build/cjs/src/iam-verification-v1-start-response.http.d.ts +0 -22
  54. package/build/cjs/src/iam-verification-v1-start-response.http.js +0 -132
  55. package/build/cjs/src/iam-verification-v1-start-response.http.js.map +0 -1
  56. package/build/cjs/src/iam-verification-v1-start-response.meta.d.ts +0 -15
  57. package/build/cjs/src/iam-verification-v1-start-response.meta.js +0 -85
  58. package/build/cjs/src/iam-verification-v1-start-response.meta.js.map +0 -1
  59. package/build/cjs/src/iam-verification-v1-start-response.public.d.ts +0 -10
  60. package/build/cjs/src/iam-verification-v1-start-response.public.js +0 -33
  61. package/build/cjs/src/iam-verification-v1-start-response.public.js.map +0 -1
  62. package/build/cjs/src/iam-verification-v1-start-response.types.d.ts +0 -398
  63. package/build/cjs/src/iam-verification-v1-start-response.types.js +0 -70
  64. package/build/cjs/src/iam-verification-v1-start-response.types.js.map +0 -1
  65. package/build/cjs/src/iam-verification-v1-start-response.universal.d.ts +0 -448
  66. package/build/cjs/src/iam-verification-v1-start-response.universal.js +0 -329
  67. package/build/cjs/src/iam-verification-v1-start-response.universal.js.map +0 -1
  68. package/build/cjs/src/identity-oauth-v1-refresh-token.http.d.ts +0 -14
  69. package/build/cjs/src/identity-oauth-v1-refresh-token.http.js +0 -154
  70. package/build/cjs/src/identity-oauth-v1-refresh-token.http.js.map +0 -1
  71. package/build/cjs/src/identity-oauth-v1-refresh-token.meta.d.ts +0 -17
  72. package/build/cjs/src/identity-oauth-v1-refresh-token.meta.js +0 -123
  73. package/build/cjs/src/identity-oauth-v1-refresh-token.meta.js.map +0 -1
  74. package/build/cjs/src/identity-oauth-v1-refresh-token.public.d.ts +0 -11
  75. package/build/cjs/src/identity-oauth-v1-refresh-token.public.js +0 -36
  76. package/build/cjs/src/identity-oauth-v1-refresh-token.public.js.map +0 -1
  77. package/build/cjs/src/identity-oauth-v1-refresh-token.types.d.ts +0 -206
  78. package/build/cjs/src/identity-oauth-v1-refresh-token.types.js +0 -3
  79. package/build/cjs/src/identity-oauth-v1-refresh-token.types.js.map +0 -1
  80. package/build/cjs/src/identity-oauth-v1-refresh-token.universal.d.ts +0 -319
  81. package/build/cjs/src/identity-oauth-v1-refresh-token.universal.js +0 -325
  82. package/build/cjs/src/identity-oauth-v1-refresh-token.universal.js.map +0 -1
  83. package/build/es/index.typings.d.ts +0 -4
  84. package/build/es/index.typings.js +0 -5
  85. package/build/es/index.typings.js.map +0 -1
  86. package/build/es/src/iam-authentication-v1-authentication.http.d.ts +0 -28
  87. package/build/es/src/iam-authentication-v1-authentication.http.js +0 -396
  88. package/build/es/src/iam-authentication-v1-authentication.http.js.map +0 -1
  89. package/build/es/src/iam-authentication-v1-authentication.meta.d.ts +0 -21
  90. package/build/es/src/iam-authentication-v1-authentication.meta.js +0 -164
  91. package/build/es/src/iam-authentication-v1-authentication.meta.js.map +0 -1
  92. package/build/es/src/iam-authentication-v1-authentication.public.d.ts +0 -16
  93. package/build/es/src/iam-authentication-v1-authentication.public.js +0 -49
  94. package/build/es/src/iam-authentication-v1-authentication.public.js.map +0 -1
  95. package/build/es/src/iam-authentication-v1-authentication.types.d.ts +0 -669
  96. package/build/es/src/iam-authentication-v1-authentication.types.js +0 -75
  97. package/build/es/src/iam-authentication-v1-authentication.types.js.map +0 -1
  98. package/build/es/src/iam-authentication-v1-authentication.universal.d.ts +0 -790
  99. package/build/es/src/iam-authentication-v1-authentication.universal.js +0 -700
  100. package/build/es/src/iam-authentication-v1-authentication.universal.js.map +0 -1
  101. package/build/es/src/iam-recovery-v1-recovery.http.d.ts +0 -13
  102. package/build/es/src/iam-recovery-v1-recovery.http.js +0 -103
  103. package/build/es/src/iam-recovery-v1-recovery.http.js.map +0 -1
  104. package/build/es/src/iam-recovery-v1-recovery.meta.d.ts +0 -15
  105. package/build/es/src/iam-recovery-v1-recovery.meta.js +0 -56
  106. package/build/es/src/iam-recovery-v1-recovery.meta.js.map +0 -1
  107. package/build/es/src/iam-recovery-v1-recovery.public.d.ts +0 -10
  108. package/build/es/src/iam-recovery-v1-recovery.public.js +0 -19
  109. package/build/es/src/iam-recovery-v1-recovery.public.js.map +0 -1
  110. package/build/es/src/iam-recovery-v1-recovery.types.d.ts +0 -431
  111. package/build/es/src/iam-recovery-v1-recovery.types.js +0 -69
  112. package/build/es/src/iam-recovery-v1-recovery.types.js.map +0 -1
  113. package/build/es/src/iam-recovery-v1-recovery.universal.d.ts +0 -475
  114. package/build/es/src/iam-recovery-v1-recovery.universal.js +0 -292
  115. package/build/es/src/iam-recovery-v1-recovery.universal.js.map +0 -1
  116. package/build/es/src/iam-verification-v1-start-response.http.d.ts +0 -22
  117. package/build/es/src/iam-verification-v1-start-response.http.js +0 -126
  118. package/build/es/src/iam-verification-v1-start-response.http.js.map +0 -1
  119. package/build/es/src/iam-verification-v1-start-response.meta.d.ts +0 -15
  120. package/build/es/src/iam-verification-v1-start-response.meta.js +0 -56
  121. package/build/es/src/iam-verification-v1-start-response.meta.js.map +0 -1
  122. package/build/es/src/iam-verification-v1-start-response.public.d.ts +0 -10
  123. package/build/es/src/iam-verification-v1-start-response.public.js +0 -19
  124. package/build/es/src/iam-verification-v1-start-response.public.js.map +0 -1
  125. package/build/es/src/iam-verification-v1-start-response.types.d.ts +0 -398
  126. package/build/es/src/iam-verification-v1-start-response.types.js +0 -67
  127. package/build/es/src/iam-verification-v1-start-response.types.js.map +0 -1
  128. package/build/es/src/iam-verification-v1-start-response.universal.d.ts +0 -448
  129. package/build/es/src/iam-verification-v1-start-response.universal.js +0 -300
  130. package/build/es/src/iam-verification-v1-start-response.universal.js.map +0 -1
  131. package/build/es/src/identity-oauth-v1-refresh-token.http.d.ts +0 -14
  132. package/build/es/src/identity-oauth-v1-refresh-token.http.js +0 -146
  133. package/build/es/src/identity-oauth-v1-refresh-token.http.js.map +0 -1
  134. package/build/es/src/identity-oauth-v1-refresh-token.meta.d.ts +0 -17
  135. package/build/es/src/identity-oauth-v1-refresh-token.meta.js +0 -92
  136. package/build/es/src/identity-oauth-v1-refresh-token.meta.js.map +0 -1
  137. package/build/es/src/identity-oauth-v1-refresh-token.public.d.ts +0 -11
  138. package/build/es/src/identity-oauth-v1-refresh-token.public.js +0 -28
  139. package/build/es/src/identity-oauth-v1-refresh-token.public.js.map +0 -1
  140. package/build/es/src/identity-oauth-v1-refresh-token.types.d.ts +0 -206
  141. package/build/es/src/identity-oauth-v1-refresh-token.types.js +0 -2
  142. package/build/es/src/identity-oauth-v1-refresh-token.types.js.map +0 -1
  143. package/build/es/src/identity-oauth-v1-refresh-token.universal.d.ts +0 -319
  144. package/build/es/src/identity-oauth-v1-refresh-token.universal.js +0 -294
  145. package/build/es/src/identity-oauth-v1-refresh-token.universal.js.map +0 -1
@@ -1,790 +0,0 @@
1
- export declare const __debug: {
2
- verboseLogging: {
3
- on: () => boolean;
4
- off: () => boolean;
5
- };
6
- };
7
- export interface Authentication {
8
- }
9
- export interface RegisterRequest {
10
- identity: Identity;
11
- /** TODO: when this becomes required, it will make more sense for it to be a `string` */
12
- authenticatorId?: string | null;
13
- inputs?: Record<string, string>;
14
- captchaTokens?: CaptchaToken[];
15
- }
16
- export interface Identity {
17
- /** Identity ID */
18
- _id?: string | null;
19
- /** Identifiers */
20
- identifiers?: Identifier[];
21
- /**
22
- * Represents the current state of an item. Each time the item is modified, its `revision` changes.
23
- * For an update operation to succeed, you MUST pass the latest revision.
24
- */
25
- revision?: string | null;
26
- /**
27
- * The time this identity was created.
28
- * @readonly
29
- */
30
- _createdDate?: Date;
31
- /**
32
- * The time this identity was last updated.
33
- * @readonly
34
- */
35
- _updatedDate?: Date;
36
- /** The identity configured connections to authenticate with. */
37
- connections?: Connection[];
38
- /** Identity profile. */
39
- identityProfile?: IdentityProfile;
40
- /**
41
- * Additional information about the identity that can impact user access.
42
- * This data cannot be set.
43
- */
44
- metadata?: Metadata;
45
- /** Identity email address. */
46
- email?: Email;
47
- /** Identity's current status. */
48
- status?: StatusV2;
49
- }
50
- export interface Identifier extends IdentifierValueOneOf {
51
- email?: string;
52
- userName?: string;
53
- }
54
- /** @oneof */
55
- export interface IdentifierValueOneOf {
56
- email?: string;
57
- userName?: string;
58
- }
59
- export interface Connection extends ConnectionTypeOneOf {
60
- /** IDP connection. */
61
- idpConnection?: IdpConnection;
62
- /** Authenticator connection. */
63
- authenticatorConnection?: AuthenticatorConnection;
64
- }
65
- /** @oneof */
66
- export interface ConnectionTypeOneOf {
67
- /** IDP connection. */
68
- idpConnection?: IdpConnection;
69
- /** Authenticator connection. */
70
- authenticatorConnection?: AuthenticatorConnection;
71
- }
72
- export interface IdpConnection {
73
- /** IDP connection ID. */
74
- idpConnectionId?: string;
75
- /** IDP user ID. */
76
- idpUserId?: string;
77
- }
78
- export interface AuthenticatorConnection {
79
- /** Authenticator connection ID. */
80
- authenticatorConnectionId?: string;
81
- /** Whether re-enrollment is required. */
82
- reEnrollmentRequired?: boolean;
83
- }
84
- export interface IdentityProfile {
85
- /** Profile first name. */
86
- firstName?: string | null;
87
- /** Profile last name. */
88
- lastName?: string | null;
89
- /** Profile nickname. */
90
- nickname?: string | null;
91
- /** Profile picture URL. */
92
- picture?: string | null;
93
- /** Deprecated. Use `secondaryEmails` instead. */
94
- emails?: string[];
95
- /** Deprecated. Use `phonesV2` instead. */
96
- phones?: string[];
97
- /** List of profile labels. */
98
- labels?: string[];
99
- /** Profile language. */
100
- language?: string | null;
101
- /** Profile privacy status. */
102
- privacyStatus?: PrivacyStatus;
103
- /**
104
- * Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)
105
- * are used to store additional information about your site or app's contacts.
106
- */
107
- customFields?: CustomField[];
108
- /** List of profile email addresses. */
109
- secondaryEmails?: SecondaryEmail[];
110
- /** List of profile phone numbers. */
111
- phonesV2?: Phone[];
112
- /** List of profile physical addresses. */
113
- addresses?: AddressWrapper[];
114
- /** Company name. */
115
- company?: string | null;
116
- /** Position within company. */
117
- position?: string | null;
118
- /** Profile birthdate. */
119
- birthdate?: string | null;
120
- }
121
- export declare enum PrivacyStatus {
122
- UNDEFINED = "UNDEFINED",
123
- PUBLIC = "PUBLIC",
124
- PRIVATE = "PRIVATE"
125
- }
126
- export interface CustomField {
127
- /**
128
- * Custom field name. The name must match one of the key properties of the objects returned by
129
- * [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields)
130
- * with the `custom.` prefix removed.
131
- */
132
- name?: string;
133
- /** Custom field value. */
134
- value?: CustomValue;
135
- }
136
- export interface CustomValue extends CustomValueValueOneOf {
137
- /** String value. */
138
- strValue?: string;
139
- /** Number value. */
140
- numValue?: number;
141
- /** Date value. */
142
- dateValue?: Date;
143
- /** List value. */
144
- listValue?: ListValue;
145
- /** Map value. */
146
- mapValue?: MapValue;
147
- }
148
- /** @oneof */
149
- export interface CustomValueValueOneOf {
150
- /** String value. */
151
- strValue?: string;
152
- /** Number value. */
153
- numValue?: number;
154
- /** Date value. */
155
- dateValue?: Date;
156
- /** List value. */
157
- listValue?: ListValue;
158
- /** Map value. */
159
- mapValue?: MapValue;
160
- }
161
- export interface ListValue {
162
- /** Custom value. */
163
- value?: CustomValue[];
164
- }
165
- export interface MapValue {
166
- /** Mapped custom value. */
167
- value?: Record<string, CustomValue>;
168
- }
169
- export interface SecondaryEmail {
170
- /** Email address. */
171
- email?: string;
172
- /** Email tag. */
173
- tag?: EmailTag;
174
- }
175
- export declare enum EmailTag {
176
- UNTAGGED = "UNTAGGED",
177
- MAIN = "MAIN",
178
- HOME = "HOME",
179
- WORK = "WORK"
180
- }
181
- export interface Phone {
182
- /** Phone country code. */
183
- countryCode?: string | null;
184
- /** Phone number. */
185
- phone?: string;
186
- /** Phone tag. */
187
- tag?: PhoneTag;
188
- }
189
- export declare enum PhoneTag {
190
- UNTAGGED = "UNTAGGED",
191
- MAIN = "MAIN",
192
- HOME = "HOME",
193
- MOBILE = "MOBILE",
194
- WORK = "WORK",
195
- FAX = "FAX"
196
- }
197
- export interface AddressWrapper {
198
- /** Address. */
199
- address?: Address;
200
- /** Address tag. */
201
- tag?: AddressTag;
202
- }
203
- /** Physical address */
204
- export interface Address {
205
- /** Country code. */
206
- country?: string | null;
207
- /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
208
- subdivision?: string | null;
209
- /** City name. */
210
- city?: string | null;
211
- /** Zip/postal code. */
212
- postalCode?: string | null;
213
- /** Main address line, usually street and number as free text. */
214
- addressLine1?: string | null;
215
- /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
216
- addressLine2?: string | null;
217
- }
218
- export declare enum AddressTag {
219
- UNTAGGED = "UNTAGGED",
220
- HOME = "HOME",
221
- WORK = "WORK",
222
- BILLING = "BILLING",
223
- SHIPPING = "SHIPPING"
224
- }
225
- export interface Metadata {
226
- /**
227
- * represents general tags such as "isOwner", "isContributor"
228
- * @readonly
229
- */
230
- tags?: string[];
231
- }
232
- export interface Email {
233
- address?: string;
234
- isVerified?: boolean;
235
- }
236
- export interface StatusV2 {
237
- name?: StatusName;
238
- reasons?: Reason[];
239
- }
240
- export declare enum StatusName {
241
- UNKNOWN_STATUS = "UNKNOWN_STATUS",
242
- PENDING = "PENDING",
243
- ACTIVE = "ACTIVE",
244
- DELETED = "DELETED",
245
- BLOCKED = "BLOCKED",
246
- OFFLINE = "OFFLINE"
247
- }
248
- export declare enum Reason {
249
- UNKNOWN_REASON = "UNKNOWN_REASON",
250
- PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
251
- PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
252
- }
253
- export interface CaptchaToken extends CaptchaTokenTokenOneOf {
254
- Recaptcha?: string;
255
- InvisibleRecaptcha?: string;
256
- }
257
- /** @oneof */
258
- export interface CaptchaTokenTokenOneOf {
259
- Recaptcha?: string;
260
- InvisibleRecaptcha?: string;
261
- }
262
- export interface LoginResponse {
263
- state?: State;
264
- sessionToken?: string | null;
265
- identity?: Identity;
266
- connection?: Connection;
267
- additionalData?: Record<string, CustomValue>;
268
- }
269
- export interface State {
270
- status?: StateStatus;
271
- stateToken?: string | null;
272
- }
273
- export declare enum StateStatus {
274
- DONE = "DONE",
275
- REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
276
- STATUS_CHECK = "STATUS_CHECK"
277
- }
278
- export interface LoginRequest {
279
- identifier: Identifier;
280
- /** TODO: when this becomes required, it will make more sense for it to be a `string` */
281
- authenticatorId?: string | null;
282
- inputs?: Record<string, string>;
283
- captchaTokens?: CaptchaToken[];
284
- /** the identifier of the identity */
285
- loginId?: LoginId;
286
- }
287
- export interface LoginId extends LoginIdTypeOneOf {
288
- /** Login email address. */
289
- email?: string;
290
- }
291
- /** @oneof */
292
- export interface LoginIdTypeOneOf {
293
- /** Login email address. */
294
- email?: string;
295
- }
296
- export interface SuccessfulLoginEvent {
297
- identity?: Identity;
298
- }
299
- export interface RegisterV2Request {
300
- /** Identifier of registering member. */
301
- loginId: LoginId;
302
- /** Password of registering member. */
303
- password?: string;
304
- /** Profile information of registering member. */
305
- profile?: IdentityProfile;
306
- /** CAPTCHA tokens, when CAPTCHA setting is on. */
307
- captchaTokens?: CaptchaToken[];
308
- }
309
- export interface StateMachineResponse {
310
- /** The current state of the login or registration process. */
311
- state?: StateType;
312
- /** If state is `SUCCESS`, a session token. */
313
- sessionToken?: string | null;
314
- /** A token representing the current state of the login or registration process. */
315
- stateToken?: string | null;
316
- /** Identing of the current member. */
317
- identity?: Identity;
318
- /** additional_data = 5; //TBD */
319
- additionalData?: Record<string, CommonCustomValue>;
320
- }
321
- export declare enum StateType {
322
- /** Initial unknown state. */
323
- UNKNOWN_STATE = "UNKNOWN_STATE",
324
- /** The operation completed successfully. */
325
- SUCCESS = "SUCCESS",
326
- /** State that indicates that the member needs owner approval to proceed, available action in: OwnerApprovalStateHandler */
327
- REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
328
- /**
329
- * State that indicates a member waiting for verification, available action are: verifyDuringAuthentication or resendDuringAuthentication
330
- * https://dev.wix.com/docs/rest/api-reference/auth-management/verification-v1/verify-during-authentication
331
- */
332
- REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
333
- /** State that indicates checking that the status is not one of the `invalidStates` before proceeding. */
334
- STATUS_CHECK = "STATUS_CHECK"
335
- }
336
- export interface CommonCustomValue extends CommonCustomValueValueOneOf {
337
- /** String value. */
338
- strValue?: string;
339
- /** Number value. */
340
- numValue?: number;
341
- /** Date value. */
342
- dateValue?: Date;
343
- /** List value. */
344
- listValue?: CommonListValue;
345
- /** Map value. */
346
- mapValue?: CommonMapValue;
347
- }
348
- /** @oneof */
349
- export interface CommonCustomValueValueOneOf {
350
- /** String value. */
351
- strValue?: string;
352
- /** Number value. */
353
- numValue?: number;
354
- /** Date value. */
355
- dateValue?: Date;
356
- /** List value. */
357
- listValue?: CommonListValue;
358
- /** Map value. */
359
- mapValue?: CommonMapValue;
360
- }
361
- export interface CommonListValue {
362
- /** Custom value. */
363
- value?: CommonCustomValue[];
364
- }
365
- export interface CommonMapValue {
366
- /** Mapped custom value. */
367
- value?: Record<string, CommonCustomValue>;
368
- }
369
- export interface LoginV2Request {
370
- /** Identifier of member logging in. */
371
- loginId: LoginId;
372
- /** Password of the member logging in. */
373
- password?: string;
374
- /** CAPTCHA tokens, when CAPTCHA setting is on. */
375
- captchaTokens?: CaptchaToken[];
376
- }
377
- export interface ChangePasswordRequest {
378
- /** The new password to set for the logged in user */
379
- newPassword: string;
380
- }
381
- export interface ChangePasswordResponse {
382
- }
383
- export interface LoginWithIdpConnectionRequest {
384
- /** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
385
- idpConnectionId?: string;
386
- /** The id of the tenant the caller wants to login into */
387
- tenantId?: string;
388
- /** The type of the tenant the caller wants to login into */
389
- tenantType?: TenantType;
390
- customPayload?: Record<string, string>;
391
- /**
392
- * This flow ultimately returns an HTML page that asynchronously posts the LoginResponse via the BroadcastChannel API.
393
- * The message will be posted to a channel named `wix-idp-$session_id`, and encrypted with the `encryption_key`.
394
- * Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload
395
- */
396
- sessionId?: string;
397
- encryptionKey?: string;
398
- visitorId?: string | null;
399
- bsi?: string | null;
400
- }
401
- export declare enum TenantType {
402
- UNKNOWN_TENANT_TYPE = "UNKNOWN_TENANT_TYPE",
403
- ACCOUNT = "ACCOUNT",
404
- SITE = "SITE",
405
- ROOT = "ROOT"
406
- }
407
- export interface RawHttpResponse {
408
- body?: Uint8Array;
409
- statusCode?: number | null;
410
- headers?: HeadersEntry[];
411
- }
412
- export interface HeadersEntry {
413
- key?: string;
414
- value?: string;
415
- }
416
- export interface RawHttpRequest {
417
- body?: Uint8Array;
418
- pathParams?: PathParametersEntry[];
419
- queryParams?: QueryParametersEntry[];
420
- headers?: HeadersEntry[];
421
- method?: string;
422
- rawPath?: string;
423
- rawQuery?: string;
424
- }
425
- export interface PathParametersEntry {
426
- key?: string;
427
- value?: string;
428
- }
429
- export interface QueryParametersEntry {
430
- key?: string;
431
- value?: string;
432
- }
433
- export interface LoginCallbackRequest {
434
- /** state that that received on the redirect */
435
- state?: string;
436
- /** session token */
437
- sessionToken?: string;
438
- }
439
- export interface LoginWithIdpConnectionTokenParamsRequest {
440
- /** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
441
- idpConnectionId?: string;
442
- /** A set of fields that are required for the connection to be able to identify and authenticate the user */
443
- tokenParams?: Record<string, string>;
444
- }
445
- export interface ProceedToNextStateRequest {
446
- /** State token received from the previous step in the registration or login process. */
447
- stateToken?: string;
448
- }
449
- export interface SignOnRequest {
450
- /** the identifier of the identity */
451
- loginId: LoginId;
452
- /** profile of the identity */
453
- profile?: IdentityProfile;
454
- /** when true will mark the email of the identity as verified */
455
- verifyEmail?: boolean;
456
- /** when false will create a new contact instead of merging the existing contact into the identity */
457
- mergeExistingContact?: boolean;
458
- }
459
- export interface SignOnResponse {
460
- /** session token for the requested identity */
461
- sessionToken?: string;
462
- /** The Identity of the provided login_id */
463
- identity?: Identity;
464
- }
465
- /** logout request payload */
466
- export interface LogoutRequest {
467
- /** redirect after logout */
468
- postLogoutRedirectUri?: string | null;
469
- /** caller identifier */
470
- clientId?: string | null;
471
- }
472
- export interface LoginResponseNonNullableFields {
473
- state?: {
474
- status: StateStatus;
475
- };
476
- identity?: {
477
- identifiers: {
478
- email: string;
479
- userName: string;
480
- }[];
481
- connections: {
482
- idpConnection?: {
483
- idpConnectionId: string;
484
- idpUserId: string;
485
- };
486
- authenticatorConnection?: {
487
- authenticatorConnectionId: string;
488
- reEnrollmentRequired: boolean;
489
- };
490
- }[];
491
- identityProfile?: {
492
- emails: string[];
493
- phones: string[];
494
- labels: string[];
495
- privacyStatus: PrivacyStatus;
496
- customFields: {
497
- name: string;
498
- value?: {
499
- strValue: string;
500
- numValue: number;
501
- listValue?: {
502
- value: NonNullable<NonNullable<NonNullable<NonNullable<LoginResponseNonNullableFields>['identity']>['identityProfile']>['customFields'][0]>['value'][];
503
- };
504
- };
505
- }[];
506
- secondaryEmails: {
507
- email: string;
508
- tag: EmailTag;
509
- }[];
510
- phonesV2: {
511
- phone: string;
512
- tag: PhoneTag;
513
- }[];
514
- addresses: {
515
- tag: AddressTag;
516
- }[];
517
- };
518
- metadata?: {
519
- tags: string[];
520
- };
521
- email?: {
522
- address: string;
523
- isVerified: boolean;
524
- };
525
- status?: {
526
- name: StatusName;
527
- reasons: Reason[];
528
- };
529
- };
530
- connection?: {
531
- idpConnection?: {
532
- idpConnectionId: string;
533
- idpUserId: string;
534
- };
535
- authenticatorConnection?: {
536
- authenticatorConnectionId: string;
537
- reEnrollmentRequired: boolean;
538
- };
539
- };
540
- additionalData?: {
541
- strValue: string;
542
- numValue: number;
543
- listValue?: {
544
- value: NonNullable<LoginResponseNonNullableFields>['additionalData'][];
545
- };
546
- };
547
- }
548
- export interface StateMachineResponseNonNullableFields {
549
- state: StateType;
550
- identity?: {
551
- identifiers: {
552
- email: string;
553
- userName: string;
554
- }[];
555
- connections: {
556
- idpConnection?: {
557
- idpConnectionId: string;
558
- idpUserId: string;
559
- };
560
- authenticatorConnection?: {
561
- authenticatorConnectionId: string;
562
- reEnrollmentRequired: boolean;
563
- };
564
- }[];
565
- identityProfile?: {
566
- emails: string[];
567
- phones: string[];
568
- labels: string[];
569
- privacyStatus: PrivacyStatus;
570
- customFields: {
571
- name: string;
572
- value?: {
573
- strValue: string;
574
- numValue: number;
575
- listValue?: {
576
- value: NonNullable<NonNullable<NonNullable<NonNullable<StateMachineResponseNonNullableFields>['identity']>['identityProfile']>['customFields'][0]>['value'][];
577
- };
578
- };
579
- }[];
580
- secondaryEmails: {
581
- email: string;
582
- tag: EmailTag;
583
- }[];
584
- phonesV2: {
585
- phone: string;
586
- tag: PhoneTag;
587
- }[];
588
- addresses: {
589
- tag: AddressTag;
590
- }[];
591
- };
592
- metadata?: {
593
- tags: string[];
594
- };
595
- email?: {
596
- address: string;
597
- isVerified: boolean;
598
- };
599
- status?: {
600
- name: StatusName;
601
- reasons: Reason[];
602
- };
603
- };
604
- additionalData?: {
605
- strValue: string;
606
- numValue: number;
607
- listValue?: {
608
- value: NonNullable<StateMachineResponseNonNullableFields>['additionalData'][];
609
- };
610
- };
611
- }
612
- export interface SignOnResponseNonNullableFields {
613
- sessionToken: string;
614
- identity?: {
615
- identifiers: {
616
- email: string;
617
- userName: string;
618
- }[];
619
- connections: {
620
- idpConnection?: {
621
- idpConnectionId: string;
622
- idpUserId: string;
623
- };
624
- authenticatorConnection?: {
625
- authenticatorConnectionId: string;
626
- reEnrollmentRequired: boolean;
627
- };
628
- }[];
629
- identityProfile?: {
630
- emails: string[];
631
- phones: string[];
632
- labels: string[];
633
- privacyStatus: PrivacyStatus;
634
- customFields: {
635
- name: string;
636
- value?: {
637
- strValue: string;
638
- numValue: number;
639
- listValue?: {
640
- value: NonNullable<NonNullable<NonNullable<NonNullable<SignOnResponseNonNullableFields>['identity']>['identityProfile']>['customFields'][0]>['value'][];
641
- };
642
- };
643
- }[];
644
- secondaryEmails: {
645
- email: string;
646
- tag: EmailTag;
647
- }[];
648
- phonesV2: {
649
- phone: string;
650
- tag: PhoneTag;
651
- }[];
652
- addresses: {
653
- tag: AddressTag;
654
- }[];
655
- };
656
- metadata?: {
657
- tags: string[];
658
- };
659
- email?: {
660
- address: string;
661
- isVerified: boolean;
662
- };
663
- status?: {
664
- name: StatusName;
665
- reasons: Reason[];
666
- };
667
- };
668
- }
669
- export interface RawHttpResponseNonNullableFields {
670
- body: Uint8Array;
671
- headers: {
672
- key: string;
673
- value: string;
674
- }[];
675
- }
676
- /** @public
677
- * @documentationMaturity preview
678
- * @requiredField identity
679
- */
680
- export declare function register(identity: Identity, options?: RegisterOptions): Promise<LoginResponse & LoginResponseNonNullableFields>;
681
- export interface RegisterOptions {
682
- /** TODO: when this becomes required, it will make more sense for it to be a `string` */
683
- authenticatorId?: string | null;
684
- inputs?: Record<string, string>;
685
- captchaTokens?: CaptchaToken[];
686
- }
687
- /** @public
688
- * @documentationMaturity preview
689
- * @requiredField identifier
690
- */
691
- export declare function login(identifier: Identifier, options?: LoginOptions): Promise<LoginResponse & LoginResponseNonNullableFields>;
692
- export interface LoginOptions {
693
- /** TODO: when this becomes required, it will make more sense for it to be a `string` */
694
- authenticatorId?: string | null;
695
- inputs?: Record<string, string>;
696
- captchaTokens?: CaptchaToken[];
697
- /** the identifier of the identity */
698
- loginId?: LoginId;
699
- }
700
- /**
701
- * Registers a new member.
702
- *
703
- * Typically, after a sucessful registration, you generate and use member tokens for the
704
- * registered member so that subsequent API calls are called as part of a member session.
705
- *
706
- * If the email used to register the member already exists as a contact email, the registering
707
- * member need to verify the email address using a code that is sent to the address.
708
- * @param loginId - Identifier of registering member.
709
- * @public
710
- * @documentationMaturity preview
711
- * @requiredField loginId
712
- */
713
- export declare function registerV2(loginId: LoginId, options?: RegisterV2Options): Promise<StateMachineResponse & StateMachineResponseNonNullableFields>;
714
- export interface RegisterV2Options {
715
- /** Password of registering member. */
716
- password?: string;
717
- /** Profile information of registering member. */
718
- profile?: IdentityProfile;
719
- /** CAPTCHA tokens, when CAPTCHA setting is on. */
720
- captchaTokens?: CaptchaToken[];
721
- }
722
- /**
723
- * Logs in an existing user.
724
- *
725
- * Typically, after a sucessful login, you generate and use member tokens for the
726
- * logged-in member so that subsequent API calls are called as part of a member session.
727
- * @param loginId - Identifier of member logging in.
728
- * @public
729
- * @documentationMaturity preview
730
- * @requiredField loginId
731
- */
732
- export declare function loginV2(loginId: LoginId, options?: LoginV2Options): Promise<StateMachineResponse & StateMachineResponseNonNullableFields>;
733
- export interface LoginV2Options {
734
- /** Password of the member logging in. */
735
- password?: string;
736
- /** CAPTCHA tokens, when CAPTCHA setting is on. */
737
- captchaTokens?: CaptchaToken[];
738
- }
739
- /**
740
- * Changes the password of a logged in user.
741
- * @param newPassword - The new password to set for the logged in user
742
- * @public
743
- * @documentationMaturity preview
744
- * @requiredField newPassword
745
- */
746
- export declare function changePassword(newPassword: string): Promise<void>;
747
- /** @public
748
- * @documentationMaturity preview
749
- */
750
- export declare function loginWithIdpConnectionTokenParams(options?: LoginWithIdpConnectionTokenParamsOptions): Promise<StateMachineResponse & StateMachineResponseNonNullableFields>;
751
- export interface LoginWithIdpConnectionTokenParamsOptions {
752
- /** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
753
- idpConnectionId?: string;
754
- /** A set of fields that are required for the connection to be able to identify and authenticate the user */
755
- tokenParams?: Record<string, string>;
756
- }
757
- /** @public
758
- * @documentationMaturity preview
759
- */
760
- export declare function proceedToNextState(options?: ProceedToNextStateOptions): Promise<LoginResponse & LoginResponseNonNullableFields>;
761
- export interface ProceedToNextStateOptions {
762
- /** State token received from the previous step in the registration or login process. */
763
- stateToken?: string;
764
- }
765
- /** @param loginId - the identifier of the identity
766
- * @public
767
- * @documentationMaturity preview
768
- * @requiredField loginId
769
- */
770
- export declare function signOn(loginId: LoginId, options?: SignOnOptions): Promise<SignOnResponse & SignOnResponseNonNullableFields>;
771
- export interface SignOnOptions {
772
- /** profile of the identity */
773
- profile?: IdentityProfile;
774
- /** when true will mark the email of the identity as verified */
775
- verifyEmail?: boolean;
776
- /** when false will create a new contact instead of merging the existing contact into the identity */
777
- mergeExistingContact?: boolean;
778
- }
779
- /**
780
- * Logs out a member.
781
- * @public
782
- * @documentationMaturity preview
783
- */
784
- export declare function logout(options?: LogoutOptions): Promise<RawHttpResponse & RawHttpResponseNonNullableFields>;
785
- export interface LogoutOptions {
786
- /** redirect after logout */
787
- postLogoutRedirectUri?: string | null;
788
- /** caller identifier */
789
- clientId?: string | null;
790
- }