@wix/auto_sdk_identity_authentication 1.0.12 → 1.0.13

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