@wix/auto_sdk_identity_authentication 1.0.7 → 1.0.9

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 (133) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/iam-authentication-v1-authentication-authentication.context.d.ts +11 -0
  11. package/build/cjs/src/iam-authentication-v1-authentication-authentication.context.js +27 -0
  12. package/build/cjs/src/iam-authentication-v1-authentication-authentication.context.js.map +1 -0
  13. package/build/cjs/src/iam-authentication-v1-authentication-authentication.http.d.ts +27 -0
  14. package/build/cjs/src/iam-authentication-v1-authentication-authentication.http.js +376 -0
  15. package/build/cjs/src/iam-authentication-v1-authentication-authentication.http.js.map +1 -0
  16. package/build/cjs/src/iam-authentication-v1-authentication-authentication.meta.d.ts +21 -0
  17. package/build/cjs/src/iam-authentication-v1-authentication-authentication.meta.js +161 -0
  18. package/build/cjs/src/iam-authentication-v1-authentication-authentication.meta.js.map +1 -0
  19. package/build/cjs/src/iam-authentication-v1-authentication-authentication.public.d.ts +63 -0
  20. package/build/cjs/src/iam-authentication-v1-authentication-authentication.public.js +62 -0
  21. package/build/cjs/src/iam-authentication-v1-authentication-authentication.public.js.map +1 -0
  22. package/build/{iam-authentication-v1-authentication-authentication.universal-ByfoI5Md.d.mts → cjs/src/iam-authentication-v1-authentication-authentication.types.d.ts} +81 -150
  23. package/build/cjs/src/iam-authentication-v1-authentication-authentication.types.js +131 -0
  24. package/build/cjs/src/iam-authentication-v1-authentication-authentication.types.js.map +1 -0
  25. package/build/cjs/src/iam-authentication-v1-authentication-authentication.universal.d.ts +922 -0
  26. package/build/cjs/src/iam-authentication-v1-authentication-authentication.universal.js +468 -0
  27. package/build/cjs/src/iam-authentication-v1-authentication-authentication.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/src/iam-authentication-v1-authentication-authentication.context.d.ts +11 -0
  38. package/build/es/src/iam-authentication-v1-authentication-authentication.context.js +11 -0
  39. package/build/es/src/iam-authentication-v1-authentication-authentication.context.js.map +1 -0
  40. package/build/es/src/iam-authentication-v1-authentication-authentication.http.d.ts +27 -0
  41. package/build/es/src/iam-authentication-v1-authentication-authentication.http.js +366 -0
  42. package/build/es/src/iam-authentication-v1-authentication-authentication.http.js.map +1 -0
  43. package/build/es/src/iam-authentication-v1-authentication-authentication.meta.d.ts +21 -0
  44. package/build/es/src/iam-authentication-v1-authentication-authentication.meta.js +128 -0
  45. package/build/es/src/iam-authentication-v1-authentication-authentication.meta.js.map +1 -0
  46. package/build/es/src/iam-authentication-v1-authentication-authentication.public.d.ts +63 -0
  47. package/build/es/src/iam-authentication-v1-authentication-authentication.public.js +39 -0
  48. package/build/es/src/iam-authentication-v1-authentication-authentication.public.js.map +1 -0
  49. package/build/{iam-authentication-v1-authentication-authentication.universal-ByfoI5Md.d.ts → es/src/iam-authentication-v1-authentication-authentication.types.d.ts} +81 -150
  50. package/build/es/src/iam-authentication-v1-authentication-authentication.types.js +128 -0
  51. package/build/es/src/iam-authentication-v1-authentication-authentication.types.js.map +1 -0
  52. package/build/es/src/iam-authentication-v1-authentication-authentication.universal.d.ts +922 -0
  53. package/build/es/src/iam-authentication-v1-authentication-authentication.universal.js +435 -0
  54. package/build/es/src/iam-authentication-v1-authentication-authentication.universal.js.map +1 -0
  55. package/build/internal/cjs/index.d.ts +1 -0
  56. package/build/internal/cjs/index.js +18 -0
  57. package/build/internal/cjs/index.js.map +1 -0
  58. package/build/internal/cjs/index.typings.d.ts +1 -0
  59. package/build/internal/cjs/index.typings.js +18 -0
  60. package/build/internal/cjs/index.typings.js.map +1 -0
  61. package/build/internal/cjs/meta.d.ts +1 -0
  62. package/build/internal/cjs/meta.js +18 -0
  63. package/build/internal/cjs/meta.js.map +1 -0
  64. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.context.d.ts +11 -0
  65. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.context.js +27 -0
  66. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.context.js.map +1 -0
  67. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.http.d.ts +27 -0
  68. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.http.js +376 -0
  69. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.http.js.map +1 -0
  70. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.meta.d.ts +21 -0
  71. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.meta.js +161 -0
  72. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.meta.js.map +1 -0
  73. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.public.d.ts +63 -0
  74. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.public.js +62 -0
  75. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.public.js.map +1 -0
  76. package/build/internal/{iam-authentication-v1-authentication-authentication.universal-ByfoI5Md.d.mts → cjs/src/iam-authentication-v1-authentication-authentication.types.d.ts} +81 -150
  77. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.types.js +131 -0
  78. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.types.js.map +1 -0
  79. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.universal.d.ts +922 -0
  80. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.universal.js +468 -0
  81. package/build/internal/cjs/src/iam-authentication-v1-authentication-authentication.universal.js.map +1 -0
  82. package/build/internal/es/index.d.ts +1 -0
  83. package/build/internal/es/index.js +2 -0
  84. package/build/internal/es/index.js.map +1 -0
  85. package/build/internal/es/index.typings.d.ts +1 -0
  86. package/build/internal/es/index.typings.js +2 -0
  87. package/build/internal/es/index.typings.js.map +1 -0
  88. package/build/internal/es/meta.d.ts +1 -0
  89. package/build/internal/es/meta.js +2 -0
  90. package/build/internal/es/meta.js.map +1 -0
  91. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.context.d.ts +11 -0
  92. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.context.js +11 -0
  93. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.context.js.map +1 -0
  94. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.http.d.ts +27 -0
  95. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.http.js +366 -0
  96. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.http.js.map +1 -0
  97. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.meta.d.ts +21 -0
  98. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.meta.js +128 -0
  99. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.meta.js.map +1 -0
  100. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.public.d.ts +63 -0
  101. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.public.js +39 -0
  102. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.public.js.map +1 -0
  103. package/build/internal/{iam-authentication-v1-authentication-authentication.universal-ByfoI5Md.d.ts → es/src/iam-authentication-v1-authentication-authentication.types.d.ts} +81 -150
  104. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.types.js +128 -0
  105. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.types.js.map +1 -0
  106. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.universal.d.ts +922 -0
  107. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.universal.js +435 -0
  108. package/build/internal/es/src/iam-authentication-v1-authentication-authentication.universal.js.map +1 -0
  109. package/package.json +11 -12
  110. package/build/index.d.mts +0 -71
  111. package/build/index.d.ts +0 -71
  112. package/build/index.js +0 -859
  113. package/build/index.js.map +0 -1
  114. package/build/index.mjs +0 -816
  115. package/build/index.mjs.map +0 -1
  116. package/build/internal/index.d.mts +0 -71
  117. package/build/internal/index.d.ts +0 -71
  118. package/build/internal/index.js +0 -859
  119. package/build/internal/index.js.map +0 -1
  120. package/build/internal/index.mjs +0 -816
  121. package/build/internal/index.mjs.map +0 -1
  122. package/build/internal/meta.d.mts +0 -600
  123. package/build/internal/meta.d.ts +0 -600
  124. package/build/internal/meta.js +0 -518
  125. package/build/internal/meta.js.map +0 -1
  126. package/build/internal/meta.mjs +0 -485
  127. package/build/internal/meta.mjs.map +0 -1
  128. package/build/meta.d.mts +0 -600
  129. package/build/meta.d.ts +0 -600
  130. package/build/meta.js +0 -518
  131. package/build/meta.js.map +0 -1
  132. package/build/meta.mjs +0 -485
  133. package/build/meta.mjs.map +0 -1
@@ -1,816 +0,0 @@
1
- // src/iam-authentication-v1-authentication-authentication.universal.ts
2
- import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
- import {
4
- renameKeysFromSDKRequestToRESTRequest,
5
- renameKeysFromRESTResponseToSDKResponse
6
- } from "@wix/sdk-runtime/rename-all-nested-keys";
7
-
8
- // src/iam-authentication-v1-authentication-authentication.http.ts
9
- import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
10
- import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
11
- import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
12
- import { transformRESTBytesToSDKBytes } from "@wix/sdk-runtime/transformations/bytes";
13
- import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
14
- import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
15
- import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
16
- import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
17
- function resolveWixIamAuthenticationV1AuthenticationServiceUrl(opts) {
18
- const domainToMappings = {
19
- _: [
20
- {
21
- srcPath: "/_api/iam/authentication",
22
- destPath: ""
23
- }
24
- ],
25
- "users._base_domain_": [
26
- {
27
- srcPath: "/iam/wix/google",
28
- destPath: "/v1/sso/callback/root/0e6a50f5-b523-4e29-990d-f37fa2ffdd69"
29
- },
30
- {
31
- srcPath: "/authentication",
32
- destPath: ""
33
- }
34
- ],
35
- "www.wixapis.com": [
36
- {
37
- srcPath: "/_api/iam/authentication",
38
- destPath: ""
39
- },
40
- {
41
- srcPath: "/iam/authentication",
42
- destPath: ""
43
- }
44
- ],
45
- "bo._base_domain_": [
46
- {
47
- srcPath: "/_api/iam/authentication",
48
- destPath: ""
49
- }
50
- ],
51
- "wixbo.ai": [
52
- {
53
- srcPath: "/_api/iam/authentication",
54
- destPath: ""
55
- }
56
- ],
57
- "wix-bo.com": [
58
- {
59
- srcPath: "/_api/iam/authentication",
60
- destPath: ""
61
- }
62
- ],
63
- "dev._base_domain_": [
64
- {
65
- srcPath: "/_api/iam/authentication",
66
- destPath: ""
67
- }
68
- ],
69
- "manage._base_domain_": [
70
- {
71
- srcPath: "/_api/authentication",
72
- destPath: ""
73
- }
74
- ],
75
- "www._base_domain_": [
76
- {
77
- srcPath: "/_api/iam/authentication",
78
- destPath: ""
79
- }
80
- ]
81
- };
82
- return resolveUrl(Object.assign(opts, { domainToMappings }));
83
- }
84
- var PACKAGE_NAME = "@wix/auto_sdk_identity_authentication";
85
- function registerV2(payload) {
86
- function __registerV2({ host }) {
87
- const serializedData = transformPaths(payload, [
88
- {
89
- transformFn: transformSDKFloatToRESTFloat,
90
- paths: [{ path: "profile.customFields.value.numValue" }]
91
- },
92
- {
93
- transformFn: transformSDKTimestampToRESTTimestamp,
94
- paths: [{ path: "profile.customFields.value.dateValue" }]
95
- }
96
- ]);
97
- const metadata = {
98
- entityFqdn: "wix.iam.authentication.v1.authentication",
99
- method: "POST",
100
- methodFqn: "wix.iam.authentication.v1.AuthenticationService.RegisterV2",
101
- packageName: PACKAGE_NAME,
102
- url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
103
- protoPath: "/v2/register",
104
- data: serializedData,
105
- host
106
- }),
107
- data: serializedData,
108
- transformResponse: (payload2) => transformPaths(payload2, [
109
- {
110
- transformFn: transformRESTBytesToSDKBytes,
111
- paths: [
112
- {
113
- path: "mfaChallengeData.verificationChallengeData.webauthnData.challenge"
114
- },
115
- {
116
- path: "mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id"
117
- },
118
- {
119
- path: "mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite"
120
- }
121
- ]
122
- },
123
- {
124
- transformFn: transformRESTTimestampToSDKTimestamp,
125
- paths: [
126
- { path: "identity.createdDate" },
127
- { path: "identity.updatedDate" },
128
- { path: "identity.identityProfile.customFields.value.dateValue" },
129
- { path: "additionalData.*.dateValue" }
130
- ]
131
- },
132
- {
133
- transformFn: transformRESTFloatToSDKFloat,
134
- paths: [
135
- { path: "identity.identityProfile.customFields.value.numValue" },
136
- { path: "additionalData.*.numValue" }
137
- ]
138
- }
139
- ])
140
- };
141
- return metadata;
142
- }
143
- return __registerV2;
144
- }
145
- function loginV2(payload) {
146
- function __loginV2({ host }) {
147
- const metadata = {
148
- entityFqdn: "wix.iam.authentication.v1.authentication",
149
- method: "POST",
150
- methodFqn: "wix.iam.authentication.v1.AuthenticationService.LoginV2",
151
- packageName: PACKAGE_NAME,
152
- url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
153
- protoPath: "/v2/login",
154
- data: payload,
155
- host
156
- }),
157
- data: payload,
158
- transformResponse: (payload2) => transformPaths(payload2, [
159
- {
160
- transformFn: transformRESTBytesToSDKBytes,
161
- paths: [
162
- {
163
- path: "mfaChallengeData.verificationChallengeData.webauthnData.challenge"
164
- },
165
- {
166
- path: "mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id"
167
- },
168
- {
169
- path: "mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite"
170
- }
171
- ]
172
- },
173
- {
174
- transformFn: transformRESTTimestampToSDKTimestamp,
175
- paths: [
176
- { path: "identity.createdDate" },
177
- { path: "identity.updatedDate" },
178
- { path: "identity.identityProfile.customFields.value.dateValue" },
179
- { path: "additionalData.*.dateValue" }
180
- ]
181
- },
182
- {
183
- transformFn: transformRESTFloatToSDKFloat,
184
- paths: [
185
- { path: "identity.identityProfile.customFields.value.numValue" },
186
- { path: "additionalData.*.numValue" }
187
- ]
188
- }
189
- ])
190
- };
191
- return metadata;
192
- }
193
- return __loginV2;
194
- }
195
- function changePassword(payload) {
196
- function __changePassword({ host }) {
197
- const metadata = {
198
- entityFqdn: "wix.iam.authentication.v1.authentication",
199
- method: "POST",
200
- methodFqn: "wix.iam.authentication.v1.AuthenticationService.ChangePassword",
201
- packageName: PACKAGE_NAME,
202
- url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
203
- protoPath: "/v2/change-password",
204
- data: payload,
205
- host
206
- }),
207
- data: payload
208
- };
209
- return metadata;
210
- }
211
- return __changePassword;
212
- }
213
- function loginCallback(payload) {
214
- function __loginCallback({ host }) {
215
- const metadata = {
216
- entityFqdn: "wix.iam.authentication.v1.authentication",
217
- method: "GET",
218
- methodFqn: "wix.iam.authentication.v1.AuthenticationService.LoginCallback",
219
- packageName: PACKAGE_NAME,
220
- url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
221
- protoPath: "/v1/callback",
222
- data: payload,
223
- host
224
- }),
225
- params: toURLSearchParams(payload),
226
- transformResponse: (payload2) => transformPaths(payload2, [
227
- {
228
- transformFn: transformRESTBytesToSDKBytes,
229
- paths: [{ path: "body" }]
230
- }
231
- ])
232
- };
233
- return metadata;
234
- }
235
- return __loginCallback;
236
- }
237
- function signOn(payload) {
238
- function __signOn({ host }) {
239
- const serializedData = transformPaths(payload, [
240
- {
241
- transformFn: transformSDKFloatToRESTFloat,
242
- paths: [{ path: "profile.customFields.value.numValue" }]
243
- },
244
- {
245
- transformFn: transformSDKTimestampToRESTTimestamp,
246
- paths: [{ path: "profile.customFields.value.dateValue" }]
247
- }
248
- ]);
249
- const metadata = {
250
- entityFqdn: "wix.iam.authentication.v1.authentication",
251
- method: "POST",
252
- methodFqn: "wix.iam.authentication.v1.AuthenticationService.SignOn",
253
- packageName: PACKAGE_NAME,
254
- url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
255
- protoPath: "/v2/sign-on",
256
- data: serializedData,
257
- host
258
- }),
259
- data: serializedData,
260
- transformResponse: (payload2) => transformPaths(payload2, [
261
- {
262
- transformFn: transformRESTTimestampToSDKTimestamp,
263
- paths: [
264
- { path: "identity.createdDate" },
265
- { path: "identity.updatedDate" },
266
- { path: "identity.identityProfile.customFields.value.dateValue" }
267
- ]
268
- },
269
- {
270
- transformFn: transformRESTFloatToSDKFloat,
271
- paths: [
272
- { path: "identity.identityProfile.customFields.value.numValue" }
273
- ]
274
- }
275
- ])
276
- };
277
- return metadata;
278
- }
279
- return __signOn;
280
- }
281
- function logout(payload) {
282
- function __logout({ host }) {
283
- const metadata = {
284
- entityFqdn: "wix.iam.authentication.v1.authentication",
285
- method: "GET",
286
- methodFqn: "wix.iam.authentication.v1.AuthenticationService.Logout",
287
- packageName: PACKAGE_NAME,
288
- url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
289
- protoPath: "/v1/logout",
290
- data: payload,
291
- host
292
- }),
293
- params: toURLSearchParams(payload),
294
- transformResponse: (payload2) => transformPaths(payload2, [
295
- {
296
- transformFn: transformRESTBytesToSDKBytes,
297
- paths: [{ path: "body" }]
298
- }
299
- ])
300
- };
301
- return metadata;
302
- }
303
- return __logout;
304
- }
305
- function verify(payload) {
306
- function __verify({ host }) {
307
- const metadata = {
308
- entityFqdn: "wix.iam.authentication.v1.authentication",
309
- method: "POST",
310
- methodFqn: "wix.iam.authentication.v1.AuthenticationService.Verify",
311
- packageName: PACKAGE_NAME,
312
- url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
313
- protoPath: "/v2/{factorType}/verify",
314
- data: payload,
315
- host
316
- }),
317
- data: payload,
318
- transformResponse: (payload2) => transformPaths(payload2, [
319
- {
320
- transformFn: transformRESTBytesToSDKBytes,
321
- paths: [
322
- {
323
- path: "mfaChallengeData.verificationChallengeData.webauthnData.challenge"
324
- },
325
- {
326
- path: "mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id"
327
- },
328
- {
329
- path: "mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite"
330
- }
331
- ]
332
- },
333
- {
334
- transformFn: transformRESTTimestampToSDKTimestamp,
335
- paths: [
336
- { path: "identity.createdDate" },
337
- { path: "identity.updatedDate" },
338
- { path: "identity.identityProfile.customFields.value.dateValue" },
339
- { path: "additionalData.*.dateValue" }
340
- ]
341
- },
342
- {
343
- transformFn: transformRESTFloatToSDKFloat,
344
- paths: [
345
- { path: "identity.identityProfile.customFields.value.numValue" },
346
- { path: "additionalData.*.numValue" }
347
- ]
348
- }
349
- ])
350
- };
351
- return metadata;
352
- }
353
- return __verify;
354
- }
355
-
356
- // src/iam-authentication-v1-authentication-authentication.universal.ts
357
- import { transformSDKAddressToRESTAddress } from "@wix/sdk-runtime/transformations/address";
358
- import { transformRESTAddressToSDKAddress } from "@wix/sdk-runtime/transformations/address";
359
- import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
360
- var PrivacyStatus = /* @__PURE__ */ ((PrivacyStatus2) => {
361
- PrivacyStatus2["UNDEFINED"] = "UNDEFINED";
362
- PrivacyStatus2["PUBLIC"] = "PUBLIC";
363
- PrivacyStatus2["PRIVATE"] = "PRIVATE";
364
- return PrivacyStatus2;
365
- })(PrivacyStatus || {});
366
- var EmailTag = /* @__PURE__ */ ((EmailTag2) => {
367
- EmailTag2["UNTAGGED"] = "UNTAGGED";
368
- EmailTag2["MAIN"] = "MAIN";
369
- EmailTag2["HOME"] = "HOME";
370
- EmailTag2["WORK"] = "WORK";
371
- return EmailTag2;
372
- })(EmailTag || {});
373
- var PhoneTag = /* @__PURE__ */ ((PhoneTag2) => {
374
- PhoneTag2["UNTAGGED"] = "UNTAGGED";
375
- PhoneTag2["MAIN"] = "MAIN";
376
- PhoneTag2["HOME"] = "HOME";
377
- PhoneTag2["MOBILE"] = "MOBILE";
378
- PhoneTag2["WORK"] = "WORK";
379
- PhoneTag2["FAX"] = "FAX";
380
- return PhoneTag2;
381
- })(PhoneTag || {});
382
- var AddressTag = /* @__PURE__ */ ((AddressTag2) => {
383
- AddressTag2["UNTAGGED"] = "UNTAGGED";
384
- AddressTag2["HOME"] = "HOME";
385
- AddressTag2["WORK"] = "WORK";
386
- AddressTag2["BILLING"] = "BILLING";
387
- AddressTag2["SHIPPING"] = "SHIPPING";
388
- return AddressTag2;
389
- })(AddressTag || {});
390
- var StateType = /* @__PURE__ */ ((StateType2) => {
391
- StateType2["UNKNOWN_STATE"] = "UNKNOWN_STATE";
392
- StateType2["SUCCESS"] = "SUCCESS";
393
- StateType2["REQUIRE_OWNER_APPROVAL"] = "REQUIRE_OWNER_APPROVAL";
394
- StateType2["REQUIRE_EMAIL_VERIFICATION"] = "REQUIRE_EMAIL_VERIFICATION";
395
- StateType2["STATUS_CHECK"] = "STATUS_CHECK";
396
- return StateType2;
397
- })(StateType || {});
398
- var StatusName = /* @__PURE__ */ ((StatusName2) => {
399
- StatusName2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
400
- StatusName2["PENDING"] = "PENDING";
401
- StatusName2["ACTIVE"] = "ACTIVE";
402
- StatusName2["DELETED"] = "DELETED";
403
- StatusName2["BLOCKED"] = "BLOCKED";
404
- StatusName2["OFFLINE"] = "OFFLINE";
405
- return StatusName2;
406
- })(StatusName || {});
407
- var Reason = /* @__PURE__ */ ((Reason2) => {
408
- Reason2["UNKNOWN_REASON"] = "UNKNOWN_REASON";
409
- Reason2["PENDING_ADMIN_APPROVAL_REQUIRED"] = "PENDING_ADMIN_APPROVAL_REQUIRED";
410
- Reason2["PENDING_EMAIL_VERIFICATION_REQUIRED"] = "PENDING_EMAIL_VERIFICATION_REQUIRED";
411
- return Reason2;
412
- })(Reason || {});
413
- var FactorType = /* @__PURE__ */ ((FactorType3) => {
414
- FactorType3["UNKNOWN_FACTOR_TYPE"] = "UNKNOWN_FACTOR_TYPE";
415
- FactorType3["PASSWORD"] = "PASSWORD";
416
- FactorType3["SMS"] = "SMS";
417
- FactorType3["CALL"] = "CALL";
418
- FactorType3["EMAIL"] = "EMAIL";
419
- FactorType3["TOTP"] = "TOTP";
420
- FactorType3["PUSH"] = "PUSH";
421
- FactorType3["WEBAUTHN"] = "WEBAUTHN";
422
- return FactorType3;
423
- })(FactorType || {});
424
- var Status = /* @__PURE__ */ ((Status2) => {
425
- Status2["INACTIVE"] = "INACTIVE";
426
- Status2["ACTIVE"] = "ACTIVE";
427
- Status2["REQUIRE_REENROLL"] = "REQUIRE_REENROLL";
428
- return Status2;
429
- })(Status || {});
430
- var FactorStatus = /* @__PURE__ */ ((FactorStatus2) => {
431
- FactorStatus2["UNKNOWN_FACTOR_STATUS"] = "UNKNOWN_FACTOR_STATUS";
432
- FactorStatus2["ENABLED"] = "ENABLED";
433
- FactorStatus2["REQUIRE_ACTIVATION"] = "REQUIRE_ACTIVATION";
434
- FactorStatus2["REQUIRE_REENROLL"] = "REQUIRE_REENROLL";
435
- FactorStatus2["ENABLED_BY_RULE"] = "ENABLED_BY_RULE";
436
- FactorStatus2["DISABLED_BY_RULE"] = "DISABLED_BY_RULE";
437
- return FactorStatus2;
438
- })(FactorStatus || {});
439
- var MfaReason = /* @__PURE__ */ ((MfaReason2) => {
440
- MfaReason2["UNKNOWN_MFA_REASON"] = "UNKNOWN_MFA_REASON";
441
- MfaReason2["USER_SETTINGS"] = "USER_SETTINGS";
442
- MfaReason2["HIGH_RISK_LOGIN"] = "HIGH_RISK_LOGIN";
443
- return MfaReason2;
444
- })(MfaReason || {});
445
- var UserVerificationRequirement = /* @__PURE__ */ ((UserVerificationRequirement2) => {
446
- UserVerificationRequirement2["USER_VERIFICATION_UNSPECIFIED"] = "USER_VERIFICATION_UNSPECIFIED";
447
- UserVerificationRequirement2["USER_VERIFICATION_REQUIRED"] = "USER_VERIFICATION_REQUIRED";
448
- UserVerificationRequirement2["USER_VERIFICATION_PREFERRED"] = "USER_VERIFICATION_PREFERRED";
449
- UserVerificationRequirement2["USER_VERIFICATION_DISCOURAGED"] = "USER_VERIFICATION_DISCOURAGED";
450
- return UserVerificationRequirement2;
451
- })(UserVerificationRequirement || {});
452
- var TenantType = /* @__PURE__ */ ((TenantType2) => {
453
- TenantType2["UNKNOWN_TENANT_TYPE"] = "UNKNOWN_TENANT_TYPE";
454
- TenantType2["ACCOUNT"] = "ACCOUNT";
455
- TenantType2["SITE"] = "SITE";
456
- TenantType2["ROOT"] = "ROOT";
457
- return TenantType2;
458
- })(TenantType || {});
459
- async function registerV22(loginId, options) {
460
- const { httpClient, sideEffects } = arguments[2];
461
- const payload = transformPaths2(
462
- renameKeysFromSDKRequestToRESTRequest({
463
- loginId,
464
- password: options?.password,
465
- profile: options?.profile,
466
- captchaTokens: options?.captchaTokens,
467
- clientMetaData: options?.clientMetaData
468
- }),
469
- [
470
- {
471
- transformFn: transformSDKAddressToRESTAddress,
472
- paths: [{ path: "profile.addresses.address" }]
473
- }
474
- ]
475
- );
476
- const reqOpts = registerV2(payload);
477
- sideEffects?.onSiteCall?.();
478
- try {
479
- const result = await httpClient.request(reqOpts);
480
- sideEffects?.onSuccess?.(result);
481
- return renameKeysFromRESTResponseToSDKResponse(
482
- transformPaths2(result.data, [
483
- {
484
- transformFn: transformRESTAddressToSDKAddress,
485
- paths: [{ path: "identity.identityProfile.addresses.address" }]
486
- }
487
- ])
488
- );
489
- } catch (err) {
490
- const transformedError = sdkTransformError(
491
- err,
492
- {
493
- spreadPathsToArguments: {},
494
- explicitPathsToArguments: {
495
- loginId: "$[0]",
496
- password: "$[1].password",
497
- profile: "$[1].profile",
498
- captchaTokens: "$[1].captchaTokens",
499
- clientMetaData: "$[1].clientMetaData"
500
- },
501
- singleArgumentUnchanged: false
502
- },
503
- ["loginId", "options"]
504
- );
505
- sideEffects?.onError?.(err);
506
- throw transformedError;
507
- }
508
- }
509
- async function loginV22(loginId, options) {
510
- const { httpClient, sideEffects } = arguments[2];
511
- const payload = renameKeysFromSDKRequestToRESTRequest({
512
- loginId,
513
- password: options?.password,
514
- captchaTokens: options?.captchaTokens,
515
- clientMetaData: options?.clientMetaData
516
- });
517
- const reqOpts = loginV2(payload);
518
- sideEffects?.onSiteCall?.();
519
- try {
520
- const result = await httpClient.request(reqOpts);
521
- sideEffects?.onSuccess?.(result);
522
- return renameKeysFromRESTResponseToSDKResponse(
523
- transformPaths2(result.data, [
524
- {
525
- transformFn: transformRESTAddressToSDKAddress,
526
- paths: [{ path: "identity.identityProfile.addresses.address" }]
527
- }
528
- ])
529
- );
530
- } catch (err) {
531
- const transformedError = sdkTransformError(
532
- err,
533
- {
534
- spreadPathsToArguments: {},
535
- explicitPathsToArguments: {
536
- loginId: "$[0]",
537
- password: "$[1].password",
538
- captchaTokens: "$[1].captchaTokens",
539
- clientMetaData: "$[1].clientMetaData"
540
- },
541
- singleArgumentUnchanged: false
542
- },
543
- ["loginId", "options"]
544
- );
545
- sideEffects?.onError?.(err);
546
- throw transformedError;
547
- }
548
- }
549
- async function changePassword2(newPassword) {
550
- const { httpClient, sideEffects } = arguments[1];
551
- const payload = renameKeysFromSDKRequestToRESTRequest({
552
- newPassword
553
- });
554
- const reqOpts = changePassword(payload);
555
- sideEffects?.onSiteCall?.();
556
- try {
557
- const result = await httpClient.request(reqOpts);
558
- sideEffects?.onSuccess?.(result);
559
- } catch (err) {
560
- const transformedError = sdkTransformError(
561
- err,
562
- {
563
- spreadPathsToArguments: {},
564
- explicitPathsToArguments: { newPassword: "$[0]" },
565
- singleArgumentUnchanged: false
566
- },
567
- ["newPassword"]
568
- );
569
- sideEffects?.onError?.(err);
570
- throw transformedError;
571
- }
572
- }
573
- async function loginCallback2(options) {
574
- const { httpClient, sideEffects } = arguments[1];
575
- const payload = renameKeysFromSDKRequestToRESTRequest({
576
- state: options?.state,
577
- sessionToken: options?.sessionToken
578
- });
579
- const reqOpts = loginCallback(payload);
580
- sideEffects?.onSiteCall?.();
581
- try {
582
- const result = await httpClient.request(reqOpts);
583
- sideEffects?.onSuccess?.(result);
584
- return renameKeysFromRESTResponseToSDKResponse(result.data);
585
- } catch (err) {
586
- const transformedError = sdkTransformError(
587
- err,
588
- {
589
- spreadPathsToArguments: {},
590
- explicitPathsToArguments: {
591
- state: "$[0].state",
592
- sessionToken: "$[0].sessionToken"
593
- },
594
- singleArgumentUnchanged: false
595
- },
596
- ["options"]
597
- );
598
- sideEffects?.onError?.(err);
599
- throw transformedError;
600
- }
601
- }
602
- async function signOn2(loginId, options) {
603
- const { httpClient, sideEffects } = arguments[2];
604
- const payload = transformPaths2(
605
- renameKeysFromSDKRequestToRESTRequest({
606
- loginId,
607
- profile: options?.profile,
608
- verifyEmail: options?.verifyEmail,
609
- mergeExistingContact: options?.mergeExistingContact
610
- }),
611
- [
612
- {
613
- transformFn: transformSDKAddressToRESTAddress,
614
- paths: [{ path: "profile.addresses.address" }]
615
- }
616
- ]
617
- );
618
- const reqOpts = signOn(payload);
619
- sideEffects?.onSiteCall?.();
620
- try {
621
- const result = await httpClient.request(reqOpts);
622
- sideEffects?.onSuccess?.(result);
623
- return renameKeysFromRESTResponseToSDKResponse(
624
- transformPaths2(result.data, [
625
- {
626
- transformFn: transformRESTAddressToSDKAddress,
627
- paths: [{ path: "identity.identityProfile.addresses.address" }]
628
- }
629
- ])
630
- );
631
- } catch (err) {
632
- const transformedError = sdkTransformError(
633
- err,
634
- {
635
- spreadPathsToArguments: {},
636
- explicitPathsToArguments: {
637
- loginId: "$[0]",
638
- profile: "$[1].profile",
639
- verifyEmail: "$[1].verifyEmail",
640
- mergeExistingContact: "$[1].mergeExistingContact"
641
- },
642
- singleArgumentUnchanged: false
643
- },
644
- ["loginId", "options"]
645
- );
646
- sideEffects?.onError?.(err);
647
- throw transformedError;
648
- }
649
- }
650
- async function logout2(options) {
651
- const { httpClient, sideEffects } = arguments[1];
652
- const payload = renameKeysFromSDKRequestToRESTRequest({
653
- postLogoutRedirectUri: options?.postLogoutRedirectUri,
654
- clientId: options?.clientId
655
- });
656
- const reqOpts = logout(payload);
657
- sideEffects?.onSiteCall?.();
658
- try {
659
- const result = await httpClient.request(reqOpts);
660
- sideEffects?.onSuccess?.(result);
661
- return renameKeysFromRESTResponseToSDKResponse(result.data);
662
- } catch (err) {
663
- const transformedError = sdkTransformError(
664
- err,
665
- {
666
- spreadPathsToArguments: {},
667
- explicitPathsToArguments: {
668
- postLogoutRedirectUri: "$[0].postLogoutRedirectUri",
669
- clientId: "$[0].clientId"
670
- },
671
- singleArgumentUnchanged: false
672
- },
673
- ["options"]
674
- );
675
- sideEffects?.onError?.(err);
676
- throw transformedError;
677
- }
678
- }
679
- async function verify2(factorType, options) {
680
- const { httpClient, sideEffects } = arguments[2];
681
- const payload = renameKeysFromSDKRequestToRESTRequest({
682
- factorType,
683
- stateToken: options?.stateToken,
684
- rememberThisDevice: options?.rememberThisDevice,
685
- smsData: options?.smsData,
686
- callData: options?.callData,
687
- emailData: options?.emailData,
688
- totpData: options?.totpData,
689
- pushData: options?.pushData,
690
- webauthnData: options?.webauthnData
691
- });
692
- const reqOpts = verify(payload);
693
- sideEffects?.onSiteCall?.();
694
- try {
695
- const result = await httpClient.request(reqOpts);
696
- sideEffects?.onSuccess?.(result);
697
- return renameKeysFromRESTResponseToSDKResponse(
698
- transformPaths2(result.data, [
699
- {
700
- transformFn: transformRESTAddressToSDKAddress,
701
- paths: [{ path: "identity.identityProfile.addresses.address" }]
702
- }
703
- ])
704
- );
705
- } catch (err) {
706
- const transformedError = sdkTransformError(
707
- err,
708
- {
709
- spreadPathsToArguments: {},
710
- explicitPathsToArguments: {
711
- factorType: "$[0]",
712
- stateToken: "$[1].stateToken",
713
- rememberThisDevice: "$[1].rememberThisDevice",
714
- smsData: "$[1].smsData",
715
- callData: "$[1].callData",
716
- emailData: "$[1].emailData",
717
- totpData: "$[1].totpData",
718
- pushData: "$[1].pushData",
719
- webauthnData: "$[1].webauthnData"
720
- },
721
- singleArgumentUnchanged: false
722
- },
723
- ["factorType", "options"]
724
- );
725
- sideEffects?.onError?.(err);
726
- throw transformedError;
727
- }
728
- }
729
-
730
- // src/iam-authentication-v1-authentication-authentication.public.ts
731
- function registerV23(httpClient) {
732
- return (loginId, options) => registerV22(
733
- loginId,
734
- options,
735
- // @ts-ignore
736
- { httpClient }
737
- );
738
- }
739
- function loginV23(httpClient) {
740
- return (loginId, options) => loginV22(
741
- loginId,
742
- options,
743
- // @ts-ignore
744
- { httpClient }
745
- );
746
- }
747
- function changePassword3(httpClient) {
748
- return (newPassword) => changePassword2(
749
- newPassword,
750
- // @ts-ignore
751
- { httpClient }
752
- );
753
- }
754
- function loginCallback3(httpClient) {
755
- return (options) => loginCallback2(
756
- options,
757
- // @ts-ignore
758
- { httpClient }
759
- );
760
- }
761
- function signOn3(httpClient) {
762
- return (loginId, options) => signOn2(
763
- loginId,
764
- options,
765
- // @ts-ignore
766
- { httpClient }
767
- );
768
- }
769
- function logout3(httpClient) {
770
- return (options) => logout2(
771
- options,
772
- // @ts-ignore
773
- { httpClient }
774
- );
775
- }
776
- function verify3(httpClient) {
777
- return (factorType, options) => verify2(
778
- factorType,
779
- options,
780
- // @ts-ignore
781
- { httpClient }
782
- );
783
- }
784
-
785
- // src/iam-authentication-v1-authentication-authentication.context.ts
786
- import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
787
- var registerV24 = /* @__PURE__ */ createRESTModule(registerV23);
788
- var loginV24 = /* @__PURE__ */ createRESTModule(loginV23);
789
- var changePassword4 = /* @__PURE__ */ createRESTModule(changePassword3);
790
- var loginCallback4 = /* @__PURE__ */ createRESTModule(loginCallback3);
791
- var signOn4 = /* @__PURE__ */ createRESTModule(signOn3);
792
- var logout4 = /* @__PURE__ */ createRESTModule(logout3);
793
- var verify4 = /* @__PURE__ */ createRESTModule(verify3);
794
- export {
795
- AddressTag,
796
- EmailTag,
797
- FactorStatus,
798
- FactorType,
799
- MfaReason,
800
- PhoneTag,
801
- PrivacyStatus,
802
- Reason,
803
- StateType,
804
- Status,
805
- StatusName,
806
- TenantType,
807
- UserVerificationRequirement,
808
- changePassword4 as changePassword,
809
- loginCallback4 as loginCallback,
810
- loginV24 as loginV2,
811
- logout4 as logout,
812
- registerV24 as registerV2,
813
- signOn4 as signOn,
814
- verify4 as verify
815
- };
816
- //# sourceMappingURL=index.mjs.map