@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
@@ -0,0 +1,435 @@
1
+ import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
2
+ import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
3
+ import * as ambassadorWixIamAuthenticationV1Authentication from './iam-authentication-v1-authentication-authentication.http.js';
4
+ import { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';
5
+ import { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';
6
+ import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
7
+ export var PrivacyStatus;
8
+ (function (PrivacyStatus) {
9
+ /** No defined privacy status. */
10
+ PrivacyStatus["UNDEFINED"] = "UNDEFINED";
11
+ /** Profile details, such as profile name and profile picture, are visible to other members. */
12
+ PrivacyStatus["PUBLIC"] = "PUBLIC";
13
+ /** Profile details aren't visible to other members. */
14
+ PrivacyStatus["PRIVATE"] = "PRIVATE";
15
+ })(PrivacyStatus || (PrivacyStatus = {}));
16
+ export var EmailTag;
17
+ (function (EmailTag) {
18
+ EmailTag["UNTAGGED"] = "UNTAGGED";
19
+ EmailTag["MAIN"] = "MAIN";
20
+ EmailTag["HOME"] = "HOME";
21
+ EmailTag["WORK"] = "WORK";
22
+ })(EmailTag || (EmailTag = {}));
23
+ export var PhoneTag;
24
+ (function (PhoneTag) {
25
+ PhoneTag["UNTAGGED"] = "UNTAGGED";
26
+ PhoneTag["MAIN"] = "MAIN";
27
+ PhoneTag["HOME"] = "HOME";
28
+ PhoneTag["MOBILE"] = "MOBILE";
29
+ PhoneTag["WORK"] = "WORK";
30
+ PhoneTag["FAX"] = "FAX";
31
+ })(PhoneTag || (PhoneTag = {}));
32
+ export var AddressTag;
33
+ (function (AddressTag) {
34
+ AddressTag["UNTAGGED"] = "UNTAGGED";
35
+ AddressTag["HOME"] = "HOME";
36
+ AddressTag["WORK"] = "WORK";
37
+ AddressTag["BILLING"] = "BILLING";
38
+ AddressTag["SHIPPING"] = "SHIPPING";
39
+ })(AddressTag || (AddressTag = {}));
40
+ export var StateType;
41
+ (function (StateType) {
42
+ /** Initial unknown state. */
43
+ StateType["UNKNOWN_STATE"] = "UNKNOWN_STATE";
44
+ /** Login completed successfully. */
45
+ StateType["SUCCESS"] = "SUCCESS";
46
+ /** Indicates that the member needs the owner to approve their registration. */
47
+ StateType["REQUIRE_OWNER_APPROVAL"] = "REQUIRE_OWNER_APPROVAL";
48
+ /** Indicates that the member needs to verify their email. */
49
+ StateType["REQUIRE_EMAIL_VERIFICATION"] = "REQUIRE_EMAIL_VERIFICATION";
50
+ /** Indicates that the `status` is not one that prevents the member logging in, meaning it's not `OFFLINE`, `BLOCKED`, or `DELETED`. */
51
+ StateType["STATUS_CHECK"] = "STATUS_CHECK";
52
+ })(StateType || (StateType = {}));
53
+ export var StatusName;
54
+ (function (StatusName) {
55
+ StatusName["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
56
+ StatusName["PENDING"] = "PENDING";
57
+ StatusName["ACTIVE"] = "ACTIVE";
58
+ StatusName["DELETED"] = "DELETED";
59
+ StatusName["BLOCKED"] = "BLOCKED";
60
+ StatusName["OFFLINE"] = "OFFLINE";
61
+ })(StatusName || (StatusName = {}));
62
+ export var Reason;
63
+ (function (Reason) {
64
+ Reason["UNKNOWN_REASON"] = "UNKNOWN_REASON";
65
+ Reason["PENDING_ADMIN_APPROVAL_REQUIRED"] = "PENDING_ADMIN_APPROVAL_REQUIRED";
66
+ Reason["PENDING_EMAIL_VERIFICATION_REQUIRED"] = "PENDING_EMAIL_VERIFICATION_REQUIRED";
67
+ })(Reason || (Reason = {}));
68
+ export var FactorType;
69
+ (function (FactorType) {
70
+ /** Unknown factor type. */
71
+ FactorType["UNKNOWN_FACTOR_TYPE"] = "UNKNOWN_FACTOR_TYPE";
72
+ /** Requires a password. */
73
+ FactorType["PASSWORD"] = "PASSWORD";
74
+ /** Requires a code sent via SMS. */
75
+ FactorType["SMS"] = "SMS";
76
+ /** Requires a code sent by phone call. */
77
+ FactorType["CALL"] = "CALL";
78
+ /** Requires a code sent by email. */
79
+ FactorType["EMAIL"] = "EMAIL";
80
+ /** Requires authentication via an authenticator app. */
81
+ FactorType["TOTP"] = "TOTP";
82
+ /** Requires authentication via a push notification. */
83
+ FactorType["PUSH"] = "PUSH";
84
+ /** Requires authentication via WebAuthn/passkey. */
85
+ FactorType["WEBAUTHN"] = "WEBAUTHN";
86
+ })(FactorType || (FactorType = {}));
87
+ export var Status;
88
+ (function (Status) {
89
+ /** Factor requires activation. */
90
+ Status["INACTIVE"] = "INACTIVE";
91
+ /** Factor is active and can be used for authentication. */
92
+ Status["ACTIVE"] = "ACTIVE";
93
+ /** Factor is blocked and cannot be used for authentication. The user should reenroll the factor. */
94
+ Status["REQUIRE_REENROLL"] = "REQUIRE_REENROLL";
95
+ })(Status || (Status = {}));
96
+ export var FactorStatus;
97
+ (function (FactorStatus) {
98
+ FactorStatus["UNKNOWN_FACTOR_STATUS"] = "UNKNOWN_FACTOR_STATUS";
99
+ FactorStatus["ENABLED"] = "ENABLED";
100
+ FactorStatus["REQUIRE_ACTIVATION"] = "REQUIRE_ACTIVATION";
101
+ FactorStatus["REQUIRE_REENROLL"] = "REQUIRE_REENROLL";
102
+ FactorStatus["ENABLED_BY_RULE"] = "ENABLED_BY_RULE";
103
+ FactorStatus["DISABLED_BY_RULE"] = "DISABLED_BY_RULE";
104
+ })(FactorStatus || (FactorStatus = {}));
105
+ export var MfaReason;
106
+ (function (MfaReason) {
107
+ MfaReason["UNKNOWN_MFA_REASON"] = "UNKNOWN_MFA_REASON";
108
+ /** Mfa is required due to user settings */
109
+ MfaReason["USER_SETTINGS"] = "USER_SETTINGS";
110
+ /** Mfa is required due to high risk login */
111
+ MfaReason["HIGH_RISK_LOGIN"] = "HIGH_RISK_LOGIN";
112
+ })(MfaReason || (MfaReason = {}));
113
+ export var UserVerificationRequirement;
114
+ (function (UserVerificationRequirement) {
115
+ /** Default unspecified value */
116
+ UserVerificationRequirement["USER_VERIFICATION_UNSPECIFIED"] = "USER_VERIFICATION_UNSPECIFIED";
117
+ /**
118
+ * The Relying Party requires user verification and will fail the operation if the response doesn't have the UV flag
119
+ * set
120
+ */
121
+ UserVerificationRequirement["USER_VERIFICATION_REQUIRED"] = "USER_VERIFICATION_REQUIRED";
122
+ /** The Relying Party prefers user verification but will not fail the operation if unavailable */
123
+ UserVerificationRequirement["USER_VERIFICATION_PREFERRED"] = "USER_VERIFICATION_PREFERRED";
124
+ /** The Relying Party does not want user verification employed (e.g., to minimize disruption to the user experience) */
125
+ UserVerificationRequirement["USER_VERIFICATION_DISCOURAGED"] = "USER_VERIFICATION_DISCOURAGED";
126
+ })(UserVerificationRequirement || (UserVerificationRequirement = {}));
127
+ export var TenantType;
128
+ (function (TenantType) {
129
+ TenantType["UNKNOWN_TENANT_TYPE"] = "UNKNOWN_TENANT_TYPE";
130
+ TenantType["ACCOUNT"] = "ACCOUNT";
131
+ TenantType["SITE"] = "SITE";
132
+ TenantType["ROOT"] = "ROOT";
133
+ })(TenantType || (TenantType = {}));
134
+ /**
135
+ * Registers a new member.
136
+ *
137
+ * Typically, after a successful registration, you generate and use member tokens for the
138
+ * registered member so that subsequent API calls are called as part of a member session.
139
+ * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).
140
+ *
141
+ * If the email used to register the member already exists as a contact email, the registering
142
+ * member need to verify the email address using a code that is sent to the address.
143
+ * @param loginId - Identifier of the registering member.
144
+ * @public
145
+ * @requiredField loginId
146
+ * @fqn wix.iam.authentication.v1.AuthenticationService.RegisterV2
147
+ */
148
+ export async function registerV2(loginId, options) {
149
+ // @ts-ignore
150
+ const { httpClient, sideEffects } = arguments[2];
151
+ const payload = transformPaths(renameKeysFromSDKRequestToRESTRequest({
152
+ loginId: loginId,
153
+ password: options?.password,
154
+ profile: options?.profile,
155
+ captchaTokens: options?.captchaTokens,
156
+ clientMetaData: options?.clientMetaData,
157
+ }), [
158
+ {
159
+ transformFn: transformSDKAddressToRESTAddress,
160
+ paths: [{ path: 'profile.addresses.address' }],
161
+ },
162
+ ]);
163
+ const reqOpts = ambassadorWixIamAuthenticationV1Authentication.registerV2(payload);
164
+ sideEffects?.onSiteCall?.();
165
+ try {
166
+ const result = await httpClient.request(reqOpts);
167
+ sideEffects?.onSuccess?.(result);
168
+ return renameKeysFromRESTResponseToSDKResponse(transformPaths(result.data, [
169
+ {
170
+ transformFn: transformRESTAddressToSDKAddress,
171
+ paths: [{ path: 'identity.identityProfile.addresses.address' }],
172
+ },
173
+ ]));
174
+ }
175
+ catch (err) {
176
+ const transformedError = sdkTransformError(err, {
177
+ spreadPathsToArguments: {},
178
+ explicitPathsToArguments: {
179
+ loginId: '$[0]',
180
+ password: '$[1].password',
181
+ profile: '$[1].profile',
182
+ captchaTokens: '$[1].captchaTokens',
183
+ clientMetaData: '$[1].clientMetaData',
184
+ },
185
+ singleArgumentUnchanged: false,
186
+ }, ['loginId', 'options']);
187
+ sideEffects?.onError?.(err);
188
+ throw transformedError;
189
+ }
190
+ }
191
+ /**
192
+ * Logs in an existing member.
193
+ *
194
+ * Typically, after a successful login, you generate and use member tokens for the
195
+ * logged-in member so that subsequent API calls are called as part of a member session.
196
+ * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).
197
+ * @param loginId - Identifier of identity logging in.
198
+ * @public
199
+ * @requiredField loginId
200
+ * @fqn wix.iam.authentication.v1.AuthenticationService.LoginV2
201
+ */
202
+ export async function loginV2(loginId, options) {
203
+ // @ts-ignore
204
+ const { httpClient, sideEffects } = arguments[2];
205
+ const payload = renameKeysFromSDKRequestToRESTRequest({
206
+ loginId: loginId,
207
+ password: options?.password,
208
+ captchaTokens: options?.captchaTokens,
209
+ clientMetaData: options?.clientMetaData,
210
+ });
211
+ const reqOpts = ambassadorWixIamAuthenticationV1Authentication.loginV2(payload);
212
+ sideEffects?.onSiteCall?.();
213
+ try {
214
+ const result = await httpClient.request(reqOpts);
215
+ sideEffects?.onSuccess?.(result);
216
+ return renameKeysFromRESTResponseToSDKResponse(transformPaths(result.data, [
217
+ {
218
+ transformFn: transformRESTAddressToSDKAddress,
219
+ paths: [{ path: 'identity.identityProfile.addresses.address' }],
220
+ },
221
+ ]));
222
+ }
223
+ catch (err) {
224
+ const transformedError = sdkTransformError(err, {
225
+ spreadPathsToArguments: {},
226
+ explicitPathsToArguments: {
227
+ loginId: '$[0]',
228
+ password: '$[1].password',
229
+ captchaTokens: '$[1].captchaTokens',
230
+ clientMetaData: '$[1].clientMetaData',
231
+ },
232
+ singleArgumentUnchanged: false,
233
+ }, ['loginId', 'options']);
234
+ sideEffects?.onError?.(err);
235
+ throw transformedError;
236
+ }
237
+ }
238
+ /**
239
+ * Changes the password of a logged in user.
240
+ * @param newPassword - The new password to set for the logged in user
241
+ * @public
242
+ * @documentationMaturity preview
243
+ * @requiredField newPassword
244
+ * @permissionId IAM.CHANGE_PASSWORD
245
+ * @fqn wix.iam.authentication.v1.AuthenticationService.ChangePassword
246
+ */
247
+ export async function changePassword(newPassword) {
248
+ // @ts-ignore
249
+ const { httpClient, sideEffects } = arguments[1];
250
+ const payload = renameKeysFromSDKRequestToRESTRequest({
251
+ newPassword: newPassword,
252
+ });
253
+ const reqOpts = ambassadorWixIamAuthenticationV1Authentication.changePassword(payload);
254
+ sideEffects?.onSiteCall?.();
255
+ try {
256
+ const result = await httpClient.request(reqOpts);
257
+ sideEffects?.onSuccess?.(result);
258
+ }
259
+ catch (err) {
260
+ const transformedError = sdkTransformError(err, {
261
+ spreadPathsToArguments: {},
262
+ explicitPathsToArguments: { newPassword: '$[0]' },
263
+ singleArgumentUnchanged: false,
264
+ }, ['newPassword']);
265
+ sideEffects?.onError?.(err);
266
+ throw transformedError;
267
+ }
268
+ }
269
+ /** @public
270
+ * @documentationMaturity preview
271
+ * @fqn wix.iam.authentication.v1.AuthenticationService.LoginCallback
272
+ */
273
+ export async function loginCallback(options) {
274
+ // @ts-ignore
275
+ const { httpClient, sideEffects } = arguments[1];
276
+ const payload = renameKeysFromSDKRequestToRESTRequest({
277
+ state: options?.state,
278
+ sessionToken: options?.sessionToken,
279
+ });
280
+ const reqOpts = ambassadorWixIamAuthenticationV1Authentication.loginCallback(payload);
281
+ sideEffects?.onSiteCall?.();
282
+ try {
283
+ const result = await httpClient.request(reqOpts);
284
+ sideEffects?.onSuccess?.(result);
285
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
286
+ }
287
+ catch (err) {
288
+ const transformedError = sdkTransformError(err, {
289
+ spreadPathsToArguments: {},
290
+ explicitPathsToArguments: {
291
+ state: '$[0].state',
292
+ sessionToken: '$[0].sessionToken',
293
+ },
294
+ singleArgumentUnchanged: false,
295
+ }, ['options']);
296
+ sideEffects?.onError?.(err);
297
+ throw transformedError;
298
+ }
299
+ }
300
+ /** @param loginId - the identifier of the identity
301
+ * @public
302
+ * @documentationMaturity preview
303
+ * @requiredField loginId
304
+ * @permissionId IAM.AUTHENTICAITON_SIGN_ON
305
+ * @permissionScope Manage Members Authentication
306
+ * @permissionScopeId SCOPE.DC-IDENTITY.MANAGE_AUTHENTICATION
307
+ * @applicableIdentity APP
308
+ * @fqn wix.iam.authentication.v1.AuthenticationService.SignOn
309
+ */
310
+ export async function signOn(loginId, options) {
311
+ // @ts-ignore
312
+ const { httpClient, sideEffects } = arguments[2];
313
+ const payload = transformPaths(renameKeysFromSDKRequestToRESTRequest({
314
+ loginId: loginId,
315
+ profile: options?.profile,
316
+ verifyEmail: options?.verifyEmail,
317
+ mergeExistingContact: options?.mergeExistingContact,
318
+ }), [
319
+ {
320
+ transformFn: transformSDKAddressToRESTAddress,
321
+ paths: [{ path: 'profile.addresses.address' }],
322
+ },
323
+ ]);
324
+ const reqOpts = ambassadorWixIamAuthenticationV1Authentication.signOn(payload);
325
+ sideEffects?.onSiteCall?.();
326
+ try {
327
+ const result = await httpClient.request(reqOpts);
328
+ sideEffects?.onSuccess?.(result);
329
+ return renameKeysFromRESTResponseToSDKResponse(transformPaths(result.data, [
330
+ {
331
+ transformFn: transformRESTAddressToSDKAddress,
332
+ paths: [{ path: 'identity.identityProfile.addresses.address' }],
333
+ },
334
+ ]));
335
+ }
336
+ catch (err) {
337
+ const transformedError = sdkTransformError(err, {
338
+ spreadPathsToArguments: {},
339
+ explicitPathsToArguments: {
340
+ loginId: '$[0]',
341
+ profile: '$[1].profile',
342
+ verifyEmail: '$[1].verifyEmail',
343
+ mergeExistingContact: '$[1].mergeExistingContact',
344
+ },
345
+ singleArgumentUnchanged: false,
346
+ }, ['loginId', 'options']);
347
+ sideEffects?.onError?.(err);
348
+ throw transformedError;
349
+ }
350
+ }
351
+ /**
352
+ * Logs out a member.
353
+ * @public
354
+ * @documentationMaturity preview
355
+ * @fqn wix.iam.authentication.v1.AuthenticationService.Logout
356
+ */
357
+ export async function logout(options) {
358
+ // @ts-ignore
359
+ const { httpClient, sideEffects } = arguments[1];
360
+ const payload = renameKeysFromSDKRequestToRESTRequest({
361
+ postLogoutRedirectUri: options?.postLogoutRedirectUri,
362
+ clientId: options?.clientId,
363
+ });
364
+ const reqOpts = ambassadorWixIamAuthenticationV1Authentication.logout(payload);
365
+ sideEffects?.onSiteCall?.();
366
+ try {
367
+ const result = await httpClient.request(reqOpts);
368
+ sideEffects?.onSuccess?.(result);
369
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
370
+ }
371
+ catch (err) {
372
+ const transformedError = sdkTransformError(err, {
373
+ spreadPathsToArguments: {},
374
+ explicitPathsToArguments: {
375
+ postLogoutRedirectUri: '$[0].postLogoutRedirectUri',
376
+ clientId: '$[0].clientId',
377
+ },
378
+ singleArgumentUnchanged: false,
379
+ }, ['options']);
380
+ sideEffects?.onError?.(err);
381
+ throw transformedError;
382
+ }
383
+ }
384
+ /** @public
385
+ * @documentationMaturity preview
386
+ * @requiredField factorType
387
+ * @fqn wix.iam.authentication.v1.AuthenticationService.Verify
388
+ */
389
+ export async function verify(factorType, options) {
390
+ // @ts-ignore
391
+ const { httpClient, sideEffects } = arguments[2];
392
+ const payload = renameKeysFromSDKRequestToRESTRequest({
393
+ factorType: factorType,
394
+ stateToken: options?.stateToken,
395
+ rememberThisDevice: options?.rememberThisDevice,
396
+ smsData: options?.smsData,
397
+ callData: options?.callData,
398
+ emailData: options?.emailData,
399
+ totpData: options?.totpData,
400
+ pushData: options?.pushData,
401
+ webauthnData: options?.webauthnData,
402
+ });
403
+ const reqOpts = ambassadorWixIamAuthenticationV1Authentication.verify(payload);
404
+ sideEffects?.onSiteCall?.();
405
+ try {
406
+ const result = await httpClient.request(reqOpts);
407
+ sideEffects?.onSuccess?.(result);
408
+ return renameKeysFromRESTResponseToSDKResponse(transformPaths(result.data, [
409
+ {
410
+ transformFn: transformRESTAddressToSDKAddress,
411
+ paths: [{ path: 'identity.identityProfile.addresses.address' }],
412
+ },
413
+ ]));
414
+ }
415
+ catch (err) {
416
+ const transformedError = sdkTransformError(err, {
417
+ spreadPathsToArguments: {},
418
+ explicitPathsToArguments: {
419
+ factorType: '$[0]',
420
+ stateToken: '$[1].stateToken',
421
+ rememberThisDevice: '$[1].rememberThisDevice',
422
+ smsData: '$[1].smsData',
423
+ callData: '$[1].callData',
424
+ emailData: '$[1].emailData',
425
+ totpData: '$[1].totpData',
426
+ pushData: '$[1].pushData',
427
+ webauthnData: '$[1].webauthnData',
428
+ },
429
+ singleArgumentUnchanged: false,
430
+ }, ['factorType', 'options']);
431
+ sideEffects?.onError?.(err);
432
+ throw transformedError;
433
+ }
434
+ }
435
+ //# sourceMappingURL=iam-authentication-v1-authentication-authentication.universal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iam-authentication-v1-authentication-authentication.universal.js","sourceRoot":"","sources":["../../../../src/iam-authentication-v1-authentication-authentication.universal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,8CAA8C,MAAM,+DAA+D,CAAC;AAChI,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAsGlF,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,iCAAiC;IACjC,wCAAuB,CAAA;IACvB,+FAA+F;IAC/F,kCAAiB,CAAA;IACjB,uDAAuD;IACvD,oCAAmB,CAAA;AACrB,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AA4DD,MAAM,CAAN,IAAY,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- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
7
7
  },
8
8
  "keywords": [],
9
9
  "sideEffects": false,
10
- "main": "/build/index.js",
11
- "types": "./build/index.d.mts",
10
+ "main": "./build/cjs/index.js",
11
+ "types": "./build/es/index.d.ts",
12
12
  "exports": {
13
13
  ".": {
14
- "import": "./build/index.mjs",
15
- "require": "./build/index.js",
16
- "types": "./build/index.d.mts"
14
+ "import": "./build/es/index.js",
15
+ "require": "./build/cjs/index.js",
16
+ "types": "./build/es/index.d.ts"
17
17
  },
18
18
  "./package.json": "./package.json",
19
19
  "./meta": {
20
- "import": "./build/meta.mjs",
21
- "require": "./build/meta.js",
22
- "types": "./build/meta.d.mts"
20
+ "import": "./build/es/meta.js",
21
+ "require": "./build/cjs/meta.js",
22
+ "types": "./build/es/meta.d.ts"
23
23
  }
24
24
  },
25
25
  "files": [
@@ -32,11 +32,10 @@
32
32
  "@wix/sdk-types": "^1.13.16"
33
33
  },
34
34
  "devDependencies": {
35
- "tsup": "^8.4.0",
36
35
  "typescript": "^5.3.2"
37
36
  },
38
37
  "scripts": {
39
- "build": "tsup",
38
+ "build": "tsc -b tsconfig.json tsconfig.esm.json tsconfig.internal.json tsconfig.internal.esm.json",
40
39
  "test": ":"
41
40
  },
42
41
  "wix": {
@@ -49,5 +48,5 @@
49
48
  "fqdn": "wix.iam.authentication.v1.authentication"
50
49
  }
51
50
  },
52
- "falconPackageHash": "cf0a81184d82c0590357e9481c217890f62d149314527fcacc687292"
51
+ "falconPackageHash": "d53268650384cb38159575fe338b599a7cb316f41761248d686e71fc"
53
52
  }
package/build/index.d.mts DELETED
@@ -1,71 +0,0 @@
1
- import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { L as LoginId, R as RegisterV2Options, S as StateMachineResponse, a as LoginV2Options, b as LoginCallbackOptions, c as RawHttpResponse, d as SignOnOptions, e as SignOnResponse, f as LogoutOptions, F as FactorType, V as VerifyOptions } from './iam-authentication-v1-authentication-authentication.universal-ByfoI5Md.mjs';
3
- export { w as Address, A as AddressTag, v as AddressWrapper, m as Authentication, a6 as AuthenticationExtensionInputs, a7 as AuthenticationExtensionInputsLargeBlobOperationOneOf, J as AuthenticatorConnection, an as CallVerifyData, x as CaptchaToken, y as CaptchaTokenTokenOneOf, a9 as ChangePasswordRequest, aa as ChangePasswordResponse, D as Connection, G as ConnectionTypeOneOf, C as CustomField, W as CustomValue, X as CustomValueValueOneOf, N as Email, E as EmailTag, ao as ExternalEmailVerifyData, Q as Factor, l as FactorStatus, ac as HeadersEntry, B as Identity, I as IdentityProfile, H as IdpConnection, Y as ListValue, ag as LoginCallbackRequest, o as LoginIdTypeOneOf, a8 as LoginV2Request, ab as LoginWithIdpConnectionRequest, ah as LoginWithIdpConnectionTokenParamsRequest, aj as LogoutRequest, Z as MapValue, K as Metadata, a0 as MfaChallengeData, M as MfaReason, ae as PathParametersEntry, u as Phone, g as PhoneTag, P as PrivacyStatus, a5 as PublicKeyCredentialDescriptor, a3 as PushChallengeData, aq as PushVerifyData, af as QueryParametersEntry, ad as RawHttpRequest, j as Reason, n as RegisterV2Request, _ as RequireMfaData, t as SecondaryEmail, ai as SignOnRequest, am as SmsVerifyData, z as StateMachineResponseStateDataOneOf, h as StateType, k as Status, i as StatusName, O as StatusV2, T as TenantType, ap as TotpVerifyData, U as UserVerificationRequirement, p as V1CustomValue, q as V1CustomValueValueOneOf, $ as V1Factor, r as V1ListValue, s as V1MapValue, a1 as VerificationChallenge, a2 as VerificationChallengeFactorChallengeDataOneOf, as as VerifyOptionsFactorDataOneOf, ak as VerifyRequest, al as VerifyRequestFactorDataOneOf, a4 as WebAuthnChallengeData, ar as WebAuthnVerifyData } from './iam-authentication-v1-authentication-authentication.universal-ByfoI5Md.mjs';
4
-
5
- declare function registerV2$1(httpClient: HttpClient): RegisterV2Signature;
6
- interface RegisterV2Signature {
7
- /**
8
- * Registers a new member.
9
- *
10
- * Typically, after a successful registration, you generate and use member tokens for the
11
- * registered member so that subsequent API calls are called as part of a member session.
12
- * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).
13
- *
14
- * If the email used to register the member already exists as a contact email, the registering
15
- * member need to verify the email address using a code that is sent to the address.
16
- * @param - Identifier of the registering member.
17
- */
18
- (loginId: LoginId, options?: RegisterV2Options | undefined): Promise<StateMachineResponse>;
19
- }
20
- declare function loginV2$1(httpClient: HttpClient): LoginV2Signature;
21
- interface LoginV2Signature {
22
- /**
23
- * Logs in an existing member.
24
- *
25
- * Typically, after a successful login, you generate and use member tokens for the
26
- * logged-in member so that subsequent API calls are called as part of a member session.
27
- * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).
28
- * @param - Identifier of identity logging in.
29
- */
30
- (loginId: LoginId, options?: LoginV2Options | undefined): Promise<StateMachineResponse>;
31
- }
32
- declare function changePassword$1(httpClient: HttpClient): ChangePasswordSignature;
33
- interface ChangePasswordSignature {
34
- /**
35
- * Changes the password of a logged in user.
36
- * @param - The new password to set for the logged in user
37
- */
38
- (newPassword: string): Promise<void>;
39
- }
40
- declare function loginCallback$1(httpClient: HttpClient): LoginCallbackSignature;
41
- interface LoginCallbackSignature {
42
- /** */
43
- (options?: LoginCallbackOptions | undefined): Promise<RawHttpResponse>;
44
- }
45
- declare function signOn$1(httpClient: HttpClient): SignOnSignature;
46
- interface SignOnSignature {
47
- /** @param - the identifier of the identity */
48
- (loginId: LoginId, options?: SignOnOptions | undefined): Promise<SignOnResponse>;
49
- }
50
- declare function logout$1(httpClient: HttpClient): LogoutSignature;
51
- interface LogoutSignature {
52
- /**
53
- * Logs out a member.
54
- */
55
- (options?: LogoutOptions | undefined): Promise<RawHttpResponse>;
56
- }
57
- declare function verify$1(httpClient: HttpClient): VerifySignature;
58
- interface VerifySignature {
59
- /** */
60
- (factorType: FactorType, options?: VerifyOptions | undefined): Promise<StateMachineResponse>;
61
- }
62
-
63
- declare const registerV2: MaybeContext<BuildRESTFunction<typeof registerV2$1> & typeof registerV2$1>;
64
- declare const loginV2: MaybeContext<BuildRESTFunction<typeof loginV2$1> & typeof loginV2$1>;
65
- declare const changePassword: MaybeContext<BuildRESTFunction<typeof changePassword$1> & typeof changePassword$1>;
66
- declare const loginCallback: MaybeContext<BuildRESTFunction<typeof loginCallback$1> & typeof loginCallback$1>;
67
- declare const signOn: MaybeContext<BuildRESTFunction<typeof signOn$1> & typeof signOn$1>;
68
- declare const logout: MaybeContext<BuildRESTFunction<typeof logout$1> & typeof logout$1>;
69
- declare const verify: MaybeContext<BuildRESTFunction<typeof verify$1> & typeof verify$1>;
70
-
71
- export { FactorType, LoginCallbackOptions, LoginId, LoginV2Options, LogoutOptions, RawHttpResponse, RegisterV2Options, SignOnOptions, SignOnResponse, StateMachineResponse, VerifyOptions, changePassword, loginCallback, loginV2, logout, registerV2, signOn, verify };
package/build/index.d.ts DELETED
@@ -1,71 +0,0 @@
1
- import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { L as LoginId, R as RegisterV2Options, S as StateMachineResponse, a as LoginV2Options, b as LoginCallbackOptions, c as RawHttpResponse, d as SignOnOptions, e as SignOnResponse, f as LogoutOptions, F as FactorType, V as VerifyOptions } from './iam-authentication-v1-authentication-authentication.universal-ByfoI5Md.js';
3
- export { w as Address, A as AddressTag, v as AddressWrapper, m as Authentication, a6 as AuthenticationExtensionInputs, a7 as AuthenticationExtensionInputsLargeBlobOperationOneOf, J as AuthenticatorConnection, an as CallVerifyData, x as CaptchaToken, y as CaptchaTokenTokenOneOf, a9 as ChangePasswordRequest, aa as ChangePasswordResponse, D as Connection, G as ConnectionTypeOneOf, C as CustomField, W as CustomValue, X as CustomValueValueOneOf, N as Email, E as EmailTag, ao as ExternalEmailVerifyData, Q as Factor, l as FactorStatus, ac as HeadersEntry, B as Identity, I as IdentityProfile, H as IdpConnection, Y as ListValue, ag as LoginCallbackRequest, o as LoginIdTypeOneOf, a8 as LoginV2Request, ab as LoginWithIdpConnectionRequest, ah as LoginWithIdpConnectionTokenParamsRequest, aj as LogoutRequest, Z as MapValue, K as Metadata, a0 as MfaChallengeData, M as MfaReason, ae as PathParametersEntry, u as Phone, g as PhoneTag, P as PrivacyStatus, a5 as PublicKeyCredentialDescriptor, a3 as PushChallengeData, aq as PushVerifyData, af as QueryParametersEntry, ad as RawHttpRequest, j as Reason, n as RegisterV2Request, _ as RequireMfaData, t as SecondaryEmail, ai as SignOnRequest, am as SmsVerifyData, z as StateMachineResponseStateDataOneOf, h as StateType, k as Status, i as StatusName, O as StatusV2, T as TenantType, ap as TotpVerifyData, U as UserVerificationRequirement, p as V1CustomValue, q as V1CustomValueValueOneOf, $ as V1Factor, r as V1ListValue, s as V1MapValue, a1 as VerificationChallenge, a2 as VerificationChallengeFactorChallengeDataOneOf, as as VerifyOptionsFactorDataOneOf, ak as VerifyRequest, al as VerifyRequestFactorDataOneOf, a4 as WebAuthnChallengeData, ar as WebAuthnVerifyData } from './iam-authentication-v1-authentication-authentication.universal-ByfoI5Md.js';
4
-
5
- declare function registerV2$1(httpClient: HttpClient): RegisterV2Signature;
6
- interface RegisterV2Signature {
7
- /**
8
- * Registers a new member.
9
- *
10
- * Typically, after a successful registration, you generate and use member tokens for the
11
- * registered member so that subsequent API calls are called as part of a member session.
12
- * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).
13
- *
14
- * If the email used to register the member already exists as a contact email, the registering
15
- * member need to verify the email address using a code that is sent to the address.
16
- * @param - Identifier of the registering member.
17
- */
18
- (loginId: LoginId, options?: RegisterV2Options | undefined): Promise<StateMachineResponse>;
19
- }
20
- declare function loginV2$1(httpClient: HttpClient): LoginV2Signature;
21
- interface LoginV2Signature {
22
- /**
23
- * Logs in an existing member.
24
- *
25
- * Typically, after a successful login, you generate and use member tokens for the
26
- * logged-in member so that subsequent API calls are called as part of a member session.
27
- * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).
28
- * @param - Identifier of identity logging in.
29
- */
30
- (loginId: LoginId, options?: LoginV2Options | undefined): Promise<StateMachineResponse>;
31
- }
32
- declare function changePassword$1(httpClient: HttpClient): ChangePasswordSignature;
33
- interface ChangePasswordSignature {
34
- /**
35
- * Changes the password of a logged in user.
36
- * @param - The new password to set for the logged in user
37
- */
38
- (newPassword: string): Promise<void>;
39
- }
40
- declare function loginCallback$1(httpClient: HttpClient): LoginCallbackSignature;
41
- interface LoginCallbackSignature {
42
- /** */
43
- (options?: LoginCallbackOptions | undefined): Promise<RawHttpResponse>;
44
- }
45
- declare function signOn$1(httpClient: HttpClient): SignOnSignature;
46
- interface SignOnSignature {
47
- /** @param - the identifier of the identity */
48
- (loginId: LoginId, options?: SignOnOptions | undefined): Promise<SignOnResponse>;
49
- }
50
- declare function logout$1(httpClient: HttpClient): LogoutSignature;
51
- interface LogoutSignature {
52
- /**
53
- * Logs out a member.
54
- */
55
- (options?: LogoutOptions | undefined): Promise<RawHttpResponse>;
56
- }
57
- declare function verify$1(httpClient: HttpClient): VerifySignature;
58
- interface VerifySignature {
59
- /** */
60
- (factorType: FactorType, options?: VerifyOptions | undefined): Promise<StateMachineResponse>;
61
- }
62
-
63
- declare const registerV2: MaybeContext<BuildRESTFunction<typeof registerV2$1> & typeof registerV2$1>;
64
- declare const loginV2: MaybeContext<BuildRESTFunction<typeof loginV2$1> & typeof loginV2$1>;
65
- declare const changePassword: MaybeContext<BuildRESTFunction<typeof changePassword$1> & typeof changePassword$1>;
66
- declare const loginCallback: MaybeContext<BuildRESTFunction<typeof loginCallback$1> & typeof loginCallback$1>;
67
- declare const signOn: MaybeContext<BuildRESTFunction<typeof signOn$1> & typeof signOn$1>;
68
- declare const logout: MaybeContext<BuildRESTFunction<typeof logout$1> & typeof logout$1>;
69
- declare const verify: MaybeContext<BuildRESTFunction<typeof verify$1> & typeof verify$1>;
70
-
71
- export { FactorType, LoginCallbackOptions, LoginId, LoginV2Options, LogoutOptions, RawHttpResponse, RegisterV2Options, SignOnOptions, SignOnResponse, StateMachineResponse, VerifyOptions, changePassword, loginCallback, loginV2, logout, registerV2, signOn, verify };