@wix/auto_sdk_identity_authentication 1.0.30 → 1.0.32
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.
- package/build/cjs/index.d.ts +33 -13
- package/build/cjs/index.js +2 -153
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +208 -180
- package/build/cjs/index.typings.js +2 -144
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +414 -59
- package/build/cjs/meta.js +120 -103
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +33 -13
- package/build/es/index.mjs +1 -150
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +208 -180
- package/build/es/index.typings.mjs +1 -141
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +414 -59
- package/build/es/meta.mjs +107 -101
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +33 -13
- package/build/internal/cjs/index.js +2 -153
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +208 -180
- package/build/internal/cjs/index.typings.js +2 -144
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +414 -59
- package/build/internal/cjs/meta.js +120 -103
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +33 -13
- package/build/internal/es/index.mjs +1 -150
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +208 -180
- package/build/internal/es/index.typings.mjs +1 -141
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +414 -59
- package/build/internal/es/meta.mjs +107 -101
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -30,13 +30,13 @@ interface LoginIdTypeOneOf {
|
|
|
30
30
|
email?: string;
|
|
31
31
|
}
|
|
32
32
|
interface IdentityProfile {
|
|
33
|
-
/**
|
|
33
|
+
/** Member's first name. */
|
|
34
34
|
firstName?: string | null;
|
|
35
|
-
/**
|
|
35
|
+
/** Member's last name. */
|
|
36
36
|
lastName?: string | null;
|
|
37
|
-
/**
|
|
37
|
+
/** Member's display nickname. */
|
|
38
38
|
nickname?: string | null;
|
|
39
|
-
/**
|
|
39
|
+
/** URL to member's profile picture. */
|
|
40
40
|
picture?: string | null;
|
|
41
41
|
/**
|
|
42
42
|
* Deprecated. Use `secondaryEmails` instead.
|
|
@@ -53,27 +53,27 @@ interface IdentityProfile {
|
|
|
53
53
|
*/
|
|
54
54
|
phones?: string[];
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Labels associated with the member.
|
|
57
57
|
* @maxSize 2000
|
|
58
58
|
*/
|
|
59
59
|
labels?: string[];
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* Member's preferred language code.
|
|
62
62
|
* @format LANGUAGE
|
|
63
63
|
*/
|
|
64
64
|
language?: string | null;
|
|
65
|
-
/**
|
|
65
|
+
/** Member's profile visibility setting. */
|
|
66
66
|
privacyStatus?: PrivacyStatusWithLiterals;
|
|
67
67
|
/**
|
|
68
68
|
* Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)
|
|
69
69
|
* are used to store additional information about your site or app's contacts.
|
|
70
70
|
*/
|
|
71
71
|
customFields?: CustomField[];
|
|
72
|
-
/**
|
|
72
|
+
/** Additional email addresses for the member. */
|
|
73
73
|
secondaryEmails?: SecondaryEmail[];
|
|
74
|
-
/**
|
|
74
|
+
/** Phone numbers associated with the member. */
|
|
75
75
|
phonesV2?: Phone[];
|
|
76
|
-
/**
|
|
76
|
+
/** Physical addresses for the member. */
|
|
77
77
|
addresses?: AddressWrapper[];
|
|
78
78
|
/**
|
|
79
79
|
* Company name.
|
|
@@ -86,79 +86,79 @@ interface IdentityProfile {
|
|
|
86
86
|
*/
|
|
87
87
|
position?: string | null;
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* Member's birth date in `YYYY-MM-DD` format.
|
|
90
90
|
* @format LOCAL_DATE
|
|
91
91
|
*/
|
|
92
92
|
birthdate?: string | null;
|
|
93
93
|
/**
|
|
94
|
-
*
|
|
94
|
+
* URL-friendly slug for the member's profile.
|
|
95
95
|
* @maxLength 255
|
|
96
96
|
*/
|
|
97
97
|
slug?: string | null;
|
|
98
|
-
/**
|
|
98
|
+
/** Whether the member consents to receive marketing communications. */
|
|
99
99
|
subscription?: boolean | null;
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
101
|
+
* Tax ID or VAT number for personal or corporate use.
|
|
102
102
|
* @maxLength 1000
|
|
103
103
|
*/
|
|
104
104
|
vatId?: string | null;
|
|
105
105
|
}
|
|
106
106
|
declare enum PrivacyStatus {
|
|
107
|
-
/** No
|
|
107
|
+
/** No privacy status defined. */
|
|
108
108
|
UNDEFINED = "UNDEFINED",
|
|
109
|
-
/** Profile details
|
|
109
|
+
/** Profile details are visible to other members. */
|
|
110
110
|
PUBLIC = "PUBLIC",
|
|
111
|
-
/** Profile details
|
|
111
|
+
/** Profile details are hidden from other members. */
|
|
112
112
|
PRIVATE = "PRIVATE"
|
|
113
113
|
}
|
|
114
114
|
/** @enumType */
|
|
115
115
|
type PrivacyStatusWithLiterals = PrivacyStatus | 'UNDEFINED' | 'PUBLIC' | 'PRIVATE';
|
|
116
116
|
interface CustomField {
|
|
117
117
|
/**
|
|
118
|
-
* Custom field name
|
|
119
|
-
*
|
|
120
|
-
*
|
|
118
|
+
* Custom field name matching an extended field key (without `custom.` prefix).
|
|
119
|
+
*
|
|
120
|
+
* Must match a key from [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields).
|
|
121
121
|
*/
|
|
122
122
|
name?: string;
|
|
123
|
-
/**
|
|
123
|
+
/** Value for the custom field. */
|
|
124
124
|
value?: V1CustomValue;
|
|
125
125
|
}
|
|
126
126
|
interface V1CustomValue extends V1CustomValueValueOneOf {
|
|
127
|
-
/**
|
|
127
|
+
/** Text value. */
|
|
128
128
|
strValue?: string;
|
|
129
|
-
/**
|
|
129
|
+
/** Numeric value. */
|
|
130
130
|
numValue?: number;
|
|
131
|
-
/** Date value. */
|
|
131
|
+
/** Date/time value. */
|
|
132
132
|
dateValue?: Date | null;
|
|
133
|
-
/**
|
|
133
|
+
/** List of values. */
|
|
134
134
|
listValue?: V1ListValue;
|
|
135
|
-
/**
|
|
135
|
+
/** Key-value pairs. */
|
|
136
136
|
mapValue?: V1MapValue;
|
|
137
137
|
}
|
|
138
138
|
/** @oneof */
|
|
139
139
|
interface V1CustomValueValueOneOf {
|
|
140
|
-
/**
|
|
140
|
+
/** Text value. */
|
|
141
141
|
strValue?: string;
|
|
142
|
-
/**
|
|
142
|
+
/** Numeric value. */
|
|
143
143
|
numValue?: number;
|
|
144
|
-
/** Date value. */
|
|
144
|
+
/** Date/time value. */
|
|
145
145
|
dateValue?: Date | null;
|
|
146
|
-
/**
|
|
146
|
+
/** List of values. */
|
|
147
147
|
listValue?: V1ListValue;
|
|
148
|
-
/**
|
|
148
|
+
/** Key-value pairs. */
|
|
149
149
|
mapValue?: V1MapValue;
|
|
150
150
|
}
|
|
151
151
|
interface V1ListValue {
|
|
152
|
-
/**
|
|
152
|
+
/** List of custom values. */
|
|
153
153
|
value?: V1CustomValue[];
|
|
154
154
|
}
|
|
155
155
|
interface V1MapValue {
|
|
156
|
-
/**
|
|
156
|
+
/** Map of custom field values. */
|
|
157
157
|
value?: Record<string, V1CustomValue>;
|
|
158
158
|
}
|
|
159
159
|
interface SecondaryEmail {
|
|
160
160
|
/**
|
|
161
|
-
*
|
|
161
|
+
* Secondary email address.
|
|
162
162
|
* @format EMAIL
|
|
163
163
|
*/
|
|
164
164
|
email?: string;
|
|
@@ -175,12 +175,12 @@ declare enum EmailTag {
|
|
|
175
175
|
type EmailTagWithLiterals = EmailTag | 'UNTAGGED' | 'MAIN' | 'HOME' | 'WORK';
|
|
176
176
|
interface Phone {
|
|
177
177
|
/**
|
|
178
|
-
*
|
|
178
|
+
* Country code for the phone number.
|
|
179
179
|
* @format COUNTRY
|
|
180
180
|
*/
|
|
181
181
|
countryCode?: string | null;
|
|
182
182
|
/**
|
|
183
|
-
* Phone number.
|
|
183
|
+
* Phone number without country code.
|
|
184
184
|
* @format PHONE
|
|
185
185
|
*/
|
|
186
186
|
phone?: string;
|
|
@@ -198,7 +198,7 @@ declare enum PhoneTag {
|
|
|
198
198
|
/** @enumType */
|
|
199
199
|
type PhoneTagWithLiterals = PhoneTag | 'UNTAGGED' | 'MAIN' | 'HOME' | 'MOBILE' | 'WORK' | 'FAX';
|
|
200
200
|
interface AddressWrapper {
|
|
201
|
-
/**
|
|
201
|
+
/** Physical address details. */
|
|
202
202
|
address?: Address;
|
|
203
203
|
/** Address tag. */
|
|
204
204
|
tag?: AddressTagWithLiterals;
|
|
@@ -267,11 +267,11 @@ declare enum StateType {
|
|
|
267
267
|
UNKNOWN_STATE = "UNKNOWN_STATE",
|
|
268
268
|
/** Login completed successfully. */
|
|
269
269
|
SUCCESS = "SUCCESS",
|
|
270
|
-
/**
|
|
270
|
+
/** Member needs the owner to approve their registration. */
|
|
271
271
|
REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
|
|
272
|
-
/**
|
|
272
|
+
/** Member needs to verify their email. */
|
|
273
273
|
REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
|
|
274
|
-
/**
|
|
274
|
+
/** The `status` is not one that prevents the member logging in, meaning it's not `OFFLINE`, `BLOCKED`, or `DELETED`. */
|
|
275
275
|
STATUS_CHECK = "STATUS_CHECK"
|
|
276
276
|
}
|
|
277
277
|
/** @enumType */
|
|
@@ -313,8 +313,6 @@ interface Identity {
|
|
|
313
313
|
email?: Email;
|
|
314
314
|
/** Identity's current status. */
|
|
315
315
|
status?: StatusV2;
|
|
316
|
-
/** Custom attributes. */
|
|
317
|
-
customAttributes?: Record<string, any> | null;
|
|
318
316
|
/**
|
|
319
317
|
* Identity verification factors.
|
|
320
318
|
* @maxSize 10
|
|
@@ -546,91 +544,10 @@ interface WebAuthnChallengeData {
|
|
|
546
544
|
*/
|
|
547
545
|
challengeId?: string;
|
|
548
546
|
/**
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
* The value is used to prevent replay attacks and MUST be randomly generated by the implementer.
|
|
552
|
-
*/
|
|
553
|
-
challenge?: Uint8Array;
|
|
554
|
-
/**
|
|
555
|
-
* The timeout in milliseconds for the WebAuthn authentication ceremony.
|
|
556
|
-
* After this time, the challenge will be considered expired and the authentication will need to be restarted.
|
|
557
|
-
* This is optional and may be overridden by the client if provided.
|
|
558
|
-
* The WebAuthn spec recommends a timeout of at least 1 minute (60000ms).
|
|
559
|
-
*/
|
|
560
|
-
timeoutMs?: number | null;
|
|
561
|
-
/**
|
|
562
|
-
* Optional list of credentials that are acceptable for this authentication ceremony.
|
|
563
|
-
* If empty, all credentials associated with the user will be considered.
|
|
564
|
-
* @maxSize 50
|
|
565
|
-
*/
|
|
566
|
-
allowCredentials?: PublicKeyCredentialDescriptor[];
|
|
567
|
-
/** Specifies the requirement for user verification during the authentication ceremony. */
|
|
568
|
-
userVerification?: UserVerificationRequirementWithLiterals;
|
|
569
|
-
/**
|
|
570
|
-
* Optional hints to guide the client UI
|
|
571
|
-
* Examples include "security-key" to emphasize external authenticators
|
|
572
|
-
* or "client-device" to emphasize built-in authenticators
|
|
573
|
-
* @maxLength 50
|
|
574
|
-
* @maxSize 10
|
|
575
|
-
*/
|
|
576
|
-
hints?: string[];
|
|
577
|
-
/**
|
|
578
|
-
* Optional extensions for the authentication ceremony
|
|
579
|
-
* Provides additional parameters for specialized WebAuthn functionality
|
|
580
|
-
*/
|
|
581
|
-
extensions?: AuthenticationExtensionInputs;
|
|
582
|
-
}
|
|
583
|
-
interface PublicKeyCredentialDescriptor {
|
|
584
|
-
/** The credential ID */
|
|
585
|
-
_id?: Uint8Array;
|
|
586
|
-
/**
|
|
587
|
-
* An optional hint as to the transports used by the credential
|
|
588
|
-
* Examples include "usb", "nfc", "ble", "internal", "hybrid"
|
|
589
|
-
* @maxLength 50
|
|
590
|
-
* @maxSize 10
|
|
591
|
-
*/
|
|
592
|
-
transports?: string[];
|
|
593
|
-
}
|
|
594
|
-
declare enum UserVerificationRequirement {
|
|
595
|
-
/** Default unspecified value */
|
|
596
|
-
USER_VERIFICATION_UNSPECIFIED = "USER_VERIFICATION_UNSPECIFIED",
|
|
597
|
-
/**
|
|
598
|
-
* The Relying Party requires user verification and will fail the operation if the response doesn't have the UV flag
|
|
599
|
-
* set
|
|
600
|
-
*/
|
|
601
|
-
USER_VERIFICATION_REQUIRED = "USER_VERIFICATION_REQUIRED",
|
|
602
|
-
/** The Relying Party prefers user verification but will not fail the operation if unavailable */
|
|
603
|
-
USER_VERIFICATION_PREFERRED = "USER_VERIFICATION_PREFERRED",
|
|
604
|
-
/** The Relying Party does not want user verification employed (e.g., to minimize disruption to the user experience) */
|
|
605
|
-
USER_VERIFICATION_DISCOURAGED = "USER_VERIFICATION_DISCOURAGED"
|
|
606
|
-
}
|
|
607
|
-
/** @enumType */
|
|
608
|
-
type UserVerificationRequirementWithLiterals = UserVerificationRequirement | 'USER_VERIFICATION_UNSPECIFIED' | 'USER_VERIFICATION_REQUIRED' | 'USER_VERIFICATION_PREFERRED' | 'USER_VERIFICATION_DISCOURAGED';
|
|
609
|
-
interface AuthenticationExtensionInputs extends AuthenticationExtensionInputsLargeBlobOperationOneOf {
|
|
610
|
-
/** Read existing large blob data from the authenticator */
|
|
611
|
-
largeBlobRead?: boolean;
|
|
612
|
-
/** Write data to the authenticator's large blob storage */
|
|
613
|
-
largeBlobWrite?: Uint8Array;
|
|
614
|
-
/**
|
|
615
|
-
* FIDO AppID Extension (appid)
|
|
616
|
-
* An AppID that was used for previously registered U2F authenticators
|
|
617
|
-
* This makes already-registered U2F credentials forward-compatible with the WebAuthn API
|
|
618
|
-
* @maxLength 256
|
|
619
|
-
*/
|
|
620
|
-
appid?: string;
|
|
621
|
-
/**
|
|
622
|
-
* User Verification Method Extension (uvm)
|
|
623
|
-
* Requests the authenticator to report which verification methods were used
|
|
624
|
-
* Examples include fingerprint, PIN, or facial recognition
|
|
547
|
+
* A PublicKeyCredentialRequestOptions JSON as defined in the WebAuthn spec (https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialrequestoptions).
|
|
548
|
+
* @maxLength 40000
|
|
625
549
|
*/
|
|
626
|
-
|
|
627
|
-
}
|
|
628
|
-
/** @oneof */
|
|
629
|
-
interface AuthenticationExtensionInputsLargeBlobOperationOneOf {
|
|
630
|
-
/** Read existing large blob data from the authenticator */
|
|
631
|
-
largeBlobRead?: boolean;
|
|
632
|
-
/** Write data to the authenticator's large blob storage */
|
|
633
|
-
largeBlobWrite?: Uint8Array;
|
|
550
|
+
publicKeyCredentialRequestOptionsJson?: string;
|
|
634
551
|
}
|
|
635
552
|
interface LoginV2Request {
|
|
636
553
|
/** Identifier of identity logging in. */
|
|
@@ -673,7 +590,11 @@ interface ExternalEmailVerifyData {
|
|
|
673
590
|
code?: string | null;
|
|
674
591
|
}
|
|
675
592
|
interface ChangePasswordRequest {
|
|
676
|
-
/**
|
|
593
|
+
/**
|
|
594
|
+
* New password to set for the logged-in member.
|
|
595
|
+
*
|
|
596
|
+
* The password must meet the site's configured password requirements for length and complexity.
|
|
597
|
+
*/
|
|
677
598
|
newPassword: string;
|
|
678
599
|
}
|
|
679
600
|
interface ChangePasswordResponse {
|
|
@@ -698,8 +619,24 @@ interface LoginWithIdpConnectionRequest {
|
|
|
698
619
|
* Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload
|
|
699
620
|
*/
|
|
700
621
|
sessionId?: string;
|
|
622
|
+
/**
|
|
623
|
+
* Base64-encoded encryption key for securing the authentication response.
|
|
624
|
+
*
|
|
625
|
+
* Used to encrypt the authentication response sent via BroadcastChannel API.
|
|
626
|
+
* Encryption uses AES-GCM with a random IV.
|
|
627
|
+
*/
|
|
701
628
|
encryptionKey?: string;
|
|
629
|
+
/**
|
|
630
|
+
* Visitor ID for tracking purposes.
|
|
631
|
+
*
|
|
632
|
+
* Optional identifier for analytics and tracking the authentication flow.
|
|
633
|
+
*/
|
|
702
634
|
visitorId?: string | null;
|
|
635
|
+
/**
|
|
636
|
+
* Browser session identifier.
|
|
637
|
+
*
|
|
638
|
+
* Optional identifier for correlating the authentication request with browser session data.
|
|
639
|
+
*/
|
|
703
640
|
bsi?: string | null;
|
|
704
641
|
}
|
|
705
642
|
declare enum TenantType {
|
|
@@ -754,58 +691,122 @@ interface LoginWithIdpConnectionTokenParamsRequest {
|
|
|
754
691
|
tokenParams?: Record<string, string>;
|
|
755
692
|
}
|
|
756
693
|
interface SignOnRequest {
|
|
757
|
-
/**
|
|
694
|
+
/**
|
|
695
|
+
* Member identifier for authentication.
|
|
696
|
+
*
|
|
697
|
+
* Currently only email addresses are supported.
|
|
698
|
+
*/
|
|
758
699
|
loginId: LoginId;
|
|
759
|
-
/**
|
|
700
|
+
/**
|
|
701
|
+
* Member profile information.
|
|
702
|
+
*
|
|
703
|
+
* Profile data such as first name, last name, and other member details.
|
|
704
|
+
* If the member already exists, provided profile information will update the existing member's profile.
|
|
705
|
+
* If the member doesn't exist, this profile information is used to create the new member.
|
|
706
|
+
*/
|
|
760
707
|
profile?: IdentityProfile;
|
|
761
|
-
/**
|
|
708
|
+
/**
|
|
709
|
+
* Whether to mark the member's email as verified without requiring verification.
|
|
710
|
+
*
|
|
711
|
+
* When `true`, marks the email as verified without requiring verification.
|
|
712
|
+
* Use with caution in production as this bypasses security verification.
|
|
713
|
+
*
|
|
714
|
+
* Default: `false`
|
|
715
|
+
*/
|
|
762
716
|
verifyEmail?: boolean;
|
|
763
|
-
/**
|
|
717
|
+
/**
|
|
718
|
+
* Whether to merge with an existing contact with the same email address.
|
|
719
|
+
*
|
|
720
|
+
* When `true`, links the member to an existing contact record with the same email
|
|
721
|
+
* and inherits contact data. When `false`, creates a new contact record.
|
|
722
|
+
*
|
|
723
|
+
* Default: `true`
|
|
724
|
+
*/
|
|
764
725
|
mergeExistingContact?: boolean;
|
|
765
726
|
}
|
|
766
727
|
interface SignOnResponse {
|
|
767
|
-
/**
|
|
728
|
+
/**
|
|
729
|
+
* Session token for the authenticated member.
|
|
730
|
+
*
|
|
731
|
+
* Use this token to obtain access and refresh tokens for subsequent API calls.
|
|
732
|
+
*/
|
|
768
733
|
sessionToken?: string;
|
|
769
|
-
/**
|
|
734
|
+
/**
|
|
735
|
+
* Member identity information.
|
|
736
|
+
*
|
|
737
|
+
* Contains the member's identity details after successful authentication.
|
|
738
|
+
*/
|
|
770
739
|
identity?: Identity;
|
|
771
740
|
}
|
|
772
741
|
/** logout request payload */
|
|
773
742
|
interface LogoutRequest {
|
|
774
743
|
/**
|
|
775
|
-
* redirect after logout
|
|
744
|
+
* URL to redirect to after logout.
|
|
745
|
+
*
|
|
746
|
+
* Optional redirect destination after the logout process completes.
|
|
776
747
|
* @format WEB_URL
|
|
777
748
|
*/
|
|
778
749
|
postLogoutRedirectUri?: string | null;
|
|
779
750
|
/**
|
|
780
|
-
*
|
|
751
|
+
* Client identifier for the logout request.
|
|
752
|
+
*
|
|
753
|
+
* Identifies the application or client initiating the logout.
|
|
781
754
|
* @format GUID
|
|
782
755
|
*/
|
|
783
756
|
clientId?: string | null;
|
|
784
757
|
}
|
|
785
758
|
interface VerifyRequest extends VerifyRequestFactorDataOneOf {
|
|
759
|
+
/** SMS verification code sent to the member's phone number. */
|
|
786
760
|
smsData?: SmsVerifyData;
|
|
761
|
+
/** Voice call verification code received by the member. */
|
|
787
762
|
callData?: CallVerifyData;
|
|
763
|
+
/** Email verification code sent to the member's email address. */
|
|
788
764
|
emailData?: ExternalEmailVerifyData;
|
|
765
|
+
/** TOTP code from the member's authenticator app. */
|
|
789
766
|
totpData?: TotpVerifyData;
|
|
767
|
+
/** Push notification authentication response from the member's device. */
|
|
790
768
|
pushData?: PushVerifyData;
|
|
769
|
+
/** WebAuthn response from biometric or security key authentication. */
|
|
791
770
|
webauthnData?: WebAuthnVerifyData;
|
|
771
|
+
/** RecoveryCode response from a one-time code. */
|
|
772
|
+
recoveryCodeData?: RecoveryCodeVerifyData;
|
|
792
773
|
/**
|
|
793
|
-
*
|
|
774
|
+
* State token from the initial authentication response.
|
|
775
|
+
*
|
|
776
|
+
* Required to continue the multi-step authentication process.
|
|
794
777
|
* @maxLength 1000
|
|
795
778
|
*/
|
|
796
779
|
stateToken?: string;
|
|
797
|
-
|
|
798
|
-
|
|
780
|
+
/**
|
|
781
|
+
* Type of authentication factor being verified.
|
|
782
|
+
*
|
|
783
|
+
* Specifies which verification method is being used (SMS, email, TOTP, etc.).
|
|
784
|
+
*/
|
|
785
|
+
factorType?: FactorTypeWithLiterals;
|
|
786
|
+
/**
|
|
787
|
+
* Whether to remember this device for future authentication.
|
|
788
|
+
*
|
|
789
|
+
* When `true`, reduces future authentication requirements for this device.
|
|
790
|
+
* Only applicable for second factor authentication.
|
|
791
|
+
*/
|
|
799
792
|
rememberThisDevice?: boolean;
|
|
800
793
|
}
|
|
801
794
|
/** @oneof */
|
|
802
795
|
interface VerifyRequestFactorDataOneOf {
|
|
796
|
+
/** SMS verification code sent to the member's phone number. */
|
|
803
797
|
smsData?: SmsVerifyData;
|
|
798
|
+
/** Voice call verification code received by the member. */
|
|
804
799
|
callData?: CallVerifyData;
|
|
800
|
+
/** Email verification code sent to the member's email address. */
|
|
805
801
|
emailData?: ExternalEmailVerifyData;
|
|
802
|
+
/** TOTP code from the member's authenticator app. */
|
|
806
803
|
totpData?: TotpVerifyData;
|
|
804
|
+
/** Push notification authentication response from the member's device. */
|
|
807
805
|
pushData?: PushVerifyData;
|
|
806
|
+
/** WebAuthn response from biometric or security key authentication. */
|
|
808
807
|
webauthnData?: WebAuthnVerifyData;
|
|
808
|
+
/** RecoveryCode response from a one-time code. */
|
|
809
|
+
recoveryCodeData?: RecoveryCodeVerifyData;
|
|
809
810
|
}
|
|
810
811
|
interface SmsVerifyData {
|
|
811
812
|
/**
|
|
@@ -832,10 +833,18 @@ interface PushVerifyData {
|
|
|
832
833
|
/** @maxLength 36 */
|
|
833
834
|
transactionId?: string | null;
|
|
834
835
|
}
|
|
836
|
+
interface RecoveryCodeVerifyData {
|
|
837
|
+
/**
|
|
838
|
+
* @minLength 1
|
|
839
|
+
* @maxLength 100
|
|
840
|
+
*/
|
|
841
|
+
code?: string | null;
|
|
842
|
+
}
|
|
835
843
|
interface GetWebauthnChallengeRequest {
|
|
836
844
|
/**
|
|
837
|
-
* Identifier of
|
|
838
|
-
*
|
|
845
|
+
* Identifier of the member requesting the WebAuthn challenge.
|
|
846
|
+
*
|
|
847
|
+
* If not provided, returns an anonymous WebAuthn challenge for usernameless authentication.
|
|
839
848
|
*/
|
|
840
849
|
loginId?: LoginId;
|
|
841
850
|
}
|
|
@@ -1005,8 +1014,18 @@ interface LoginV2Options {
|
|
|
1005
1014
|
clientMetaData?: Record<string, any> | null;
|
|
1006
1015
|
}
|
|
1007
1016
|
/**
|
|
1008
|
-
* Changes the password of a logged
|
|
1009
|
-
*
|
|
1017
|
+
* Changes the password of a logged-in member.
|
|
1018
|
+
*
|
|
1019
|
+
* Updates the password for an authenticated member. The member must have a valid session
|
|
1020
|
+
* to use this method.
|
|
1021
|
+
*
|
|
1022
|
+
* The member's session remains valid after password change.
|
|
1023
|
+
*
|
|
1024
|
+
* The new password must meet the site's configured password requirements for length
|
|
1025
|
+
* and complexity. These requirements are enforced automatically when processing the request.
|
|
1026
|
+
* @param newPassword - New password to set for the logged-in member.
|
|
1027
|
+
*
|
|
1028
|
+
* The password must meet the site's configured password requirements for length and complexity.
|
|
1010
1029
|
* @public
|
|
1011
1030
|
* @documentationMaturity preview
|
|
1012
1031
|
* @requiredField newPassword
|
|
@@ -1014,7 +1033,15 @@ interface LoginV2Options {
|
|
|
1014
1033
|
* @fqn wix.iam.authentication.v1.AuthenticationService.ChangePassword
|
|
1015
1034
|
*/
|
|
1016
1035
|
declare function changePassword(newPassword: string): Promise<void>;
|
|
1017
|
-
/**
|
|
1036
|
+
/**
|
|
1037
|
+
* Authenticates a member without credentials and returns a session token.
|
|
1038
|
+
*
|
|
1039
|
+
* This method provides authentication that automatically creates or updates
|
|
1040
|
+
* member accounts as needed during the authentication process.
|
|
1041
|
+
* Use this for trusted integrations and scenarios where you already have verified user information.
|
|
1042
|
+
* @param loginId - Member identifier for authentication.
|
|
1043
|
+
*
|
|
1044
|
+
* Currently only email addresses are supported.
|
|
1018
1045
|
* @public
|
|
1019
1046
|
* @documentationMaturity preview
|
|
1020
1047
|
* @requiredField loginId
|
|
@@ -1024,15 +1051,42 @@ declare function changePassword(newPassword: string): Promise<void>;
|
|
|
1024
1051
|
*/
|
|
1025
1052
|
declare function signOn(loginId: LoginId, options?: SignOnOptions): Promise<NonNullablePaths<SignOnResponse, `sessionToken` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`, 7>>;
|
|
1026
1053
|
interface SignOnOptions {
|
|
1027
|
-
/**
|
|
1054
|
+
/**
|
|
1055
|
+
* Member profile information.
|
|
1056
|
+
*
|
|
1057
|
+
* Profile data such as first name, last name, and other member details.
|
|
1058
|
+
* If the member already exists, provided profile information will update the existing member's profile.
|
|
1059
|
+
* If the member doesn't exist, this profile information is used to create the new member.
|
|
1060
|
+
*/
|
|
1028
1061
|
profile?: IdentityProfile;
|
|
1029
|
-
/**
|
|
1062
|
+
/**
|
|
1063
|
+
* Whether to mark the member's email as verified without requiring verification.
|
|
1064
|
+
*
|
|
1065
|
+
* When `true`, marks the email as verified without requiring verification.
|
|
1066
|
+
* Use with caution in production as this bypasses security verification.
|
|
1067
|
+
*
|
|
1068
|
+
* Default: `false`
|
|
1069
|
+
*/
|
|
1030
1070
|
verifyEmail?: boolean;
|
|
1031
|
-
/**
|
|
1071
|
+
/**
|
|
1072
|
+
* Whether to merge with an existing contact with the same email address.
|
|
1073
|
+
*
|
|
1074
|
+
* When `true`, links the member to an existing contact record with the same email
|
|
1075
|
+
* and inherits contact data. When `false`, creates a new contact record.
|
|
1076
|
+
*
|
|
1077
|
+
* Default: `true`
|
|
1078
|
+
*/
|
|
1032
1079
|
mergeExistingContact?: boolean;
|
|
1033
1080
|
}
|
|
1034
1081
|
/**
|
|
1035
|
-
*
|
|
1082
|
+
* Terminates the member's session and clears authentication cookies.
|
|
1083
|
+
*
|
|
1084
|
+
* Returns the following:
|
|
1085
|
+
* - `body`: HTML content for the logout response
|
|
1086
|
+
* - `statusCode`: HTTP status code (200 for success, 302 for redirect)
|
|
1087
|
+
* - `headers`: Array of key-value pairs including:
|
|
1088
|
+
* - `Set-Cookie` headers to remove all session cookies
|
|
1089
|
+
* - `Location` header (when `postLogoutRedirectUri` is provided, with 302 status)
|
|
1036
1090
|
* @public
|
|
1037
1091
|
* @documentationMaturity preview
|
|
1038
1092
|
* @fqn wix.iam.authentication.v1.AuthenticationService.Logout
|
|
@@ -1040,45 +1094,19 @@ interface SignOnOptions {
|
|
|
1040
1094
|
declare function logout(options?: LogoutOptions): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`, 4>>;
|
|
1041
1095
|
interface LogoutOptions {
|
|
1042
1096
|
/**
|
|
1043
|
-
* redirect after logout
|
|
1097
|
+
* URL to redirect to after logout.
|
|
1098
|
+
*
|
|
1099
|
+
* Optional redirect destination after the logout process completes.
|
|
1044
1100
|
* @format WEB_URL
|
|
1045
1101
|
*/
|
|
1046
1102
|
postLogoutRedirectUri?: string | null;
|
|
1047
1103
|
/**
|
|
1048
|
-
*
|
|
1104
|
+
* Client identifier for the logout request.
|
|
1105
|
+
*
|
|
1106
|
+
* Identifies the application or client initiating the logout.
|
|
1049
1107
|
* @format GUID
|
|
1050
1108
|
*/
|
|
1051
1109
|
clientId?: string | null;
|
|
1052
1110
|
}
|
|
1053
|
-
/** @public
|
|
1054
|
-
* @documentationMaturity preview
|
|
1055
|
-
* @requiredField factorType
|
|
1056
|
-
* @fqn wix.iam.authentication.v1.AuthenticationService.Verify
|
|
1057
|
-
*/
|
|
1058
|
-
declare function verify(factorType: FactorTypeWithLiterals, options?: VerifyOptions): Promise<NonNullablePaths<StateMachineResponse, `state` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`, 7>>;
|
|
1059
|
-
interface VerifyOptions extends VerifyOptionsFactorDataOneOf {
|
|
1060
|
-
/**
|
|
1061
|
-
* TODO: is this a reasonable maxLength?
|
|
1062
|
-
* @maxLength 1000
|
|
1063
|
-
*/
|
|
1064
|
-
stateToken?: string;
|
|
1065
|
-
/** Relevant for second factors only. */
|
|
1066
|
-
rememberThisDevice?: boolean;
|
|
1067
|
-
smsData?: SmsVerifyData;
|
|
1068
|
-
callData?: CallVerifyData;
|
|
1069
|
-
emailData?: ExternalEmailVerifyData;
|
|
1070
|
-
totpData?: TotpVerifyData;
|
|
1071
|
-
pushData?: PushVerifyData;
|
|
1072
|
-
webauthnData?: WebAuthnVerifyData;
|
|
1073
|
-
}
|
|
1074
|
-
/** @oneof */
|
|
1075
|
-
interface VerifyOptionsFactorDataOneOf {
|
|
1076
|
-
smsData?: SmsVerifyData;
|
|
1077
|
-
callData?: CallVerifyData;
|
|
1078
|
-
emailData?: ExternalEmailVerifyData;
|
|
1079
|
-
totpData?: TotpVerifyData;
|
|
1080
|
-
pushData?: PushVerifyData;
|
|
1081
|
-
webauthnData?: WebAuthnVerifyData;
|
|
1082
|
-
}
|
|
1083
1111
|
|
|
1084
|
-
export { type Address, AddressTag, type AddressTagWithLiterals, type AddressWrapper, type Authentication, type
|
|
1112
|
+
export { type Address, AddressTag, type AddressTagWithLiterals, type AddressWrapper, type Authentication, type AuthenticatorConnection, type CallVerifyData, type CaptchaToken, type CaptchaTokenTokenOneOf, type ChangePasswordRequest, type ChangePasswordResponse, type Connection, type ConnectionTypeOneOf, type CustomField, type CustomValue, type CustomValueValueOneOf, type Email, EmailTag, type EmailTagWithLiterals, type ExternalEmailVerifyData, type Factor, FactorStatus, type FactorStatusWithLiterals, FactorType, type FactorTypeWithLiterals, type GetWebauthnChallengeRequest, type GetWebauthnChallengeResponse, type HeadersEntry, type Identity, type IdentityProfile, type IdpConnection, type ListValue, type LoginCallbackRequest, type LoginId, type LoginIdTypeOneOf, type LoginV2ApplicationErrors, type LoginV2Options, type LoginV2Request, type LoginV2ValidationErrors, type LoginWithIdpConnectionRequest, type LoginWithIdpConnectionTokenParamsRequest, type LogoutOptions, type LogoutRequest, type MapValue, type Metadata, type MfaChallengeData, MfaReason, type MfaReasonWithLiterals, type PathParametersEntry, type Phone, PhoneTag, type PhoneTagWithLiterals, PrivacyStatus, type PrivacyStatusWithLiterals, type PushChallengeData, type PushVerifyData, type QueryParametersEntry, type RawHttpRequest, type RawHttpResponse, Reason, type ReasonWithLiterals, type RecoveryCodeVerifyData, type RegisterV2ApplicationErrors, type RegisterV2Options, type RegisterV2Request, type RegisterV2ValidationErrors, type RequireMfaData, type SecondaryEmail, type SignOnOptions, type SignOnRequest, type SignOnResponse, type SmsVerifyData, type StateMachineResponse, type StateMachineResponseStateDataOneOf, StateType, type StateTypeWithLiterals, Status, StatusName, type StatusNameWithLiterals, type StatusV2, type StatusWithLiterals, TenantType, type TenantTypeWithLiterals, type TotpVerifyData, type V1CustomValue, type V1CustomValueValueOneOf, type V1Factor, type V1ListValue, type V1MapValue, type VerificationChallenge, type VerificationChallengeFactorChallengeDataOneOf, type VerifyRequest, type VerifyRequestFactorDataOneOf, type WebAuthnChallengeData, type WebAuthnVerifyData, changePassword, loginV2, logout, registerV2, signOn };
|