@stytch/vanilla-js 3.3.0 → 4.1.0

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/CHANGELOG.md CHANGED
@@ -1,6 +1,21 @@
1
1
  # @stytch/vanilla-js
2
2
 
3
- ## 3.3.0
3
+ ## 4.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2379b29: Add B2B TOTPs (Create/Authenticate)
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [2379b29]
12
+ - @stytch/core@2.1.0
13
+
14
+ ## 4.0.0
15
+
16
+ ### Major Changes
17
+
18
+ - b34293a: Improvements to error types in the JS and React Native SDKs
4
19
 
5
20
  ### Minor Changes
6
21
 
@@ -12,8 +27,10 @@
12
27
  - 9ee61b3: Allow "Login without a password" to immediately login a user who followed a valid password reset link
13
28
  - c3c108b: Remove bundled dependencies from package manifest
14
29
  - Updated dependencies [76ad832]
30
+ - Updated dependencies [b34293a]
31
+ - Updated dependencies [b34293a]
15
32
  - Updated dependencies [6890694]
16
- - @stytch/core@1.5.0
33
+ - @stytch/core@2.0.0
17
34
 
18
35
  ## 3.2.5
19
36
 
@@ -1,4 +1,4 @@
1
- import { IHeadlessB2BDiscoveryClient, IHeadlessB2BMagicLinksClient, IHeadlessB2BMemberClient, IHeadlessB2BSelfClient, IHeadlessB2BOAuthClient, IHeadlessB2BOrganizationClient, IHeadlessB2BOTPsClient, IHeadlessB2BSessionClient, IHeadlessB2BSSOClient, IHeadlessB2BRBACClient, StytchClientOptions } from "@stytch/core/public";
1
+ import { IHeadlessB2BDiscoveryClient, IHeadlessB2BMagicLinksClient, IHeadlessB2BMemberClient, IHeadlessB2BSelfClient, IHeadlessB2BOAuthClient, IHeadlessB2BOrganizationClient, IHeadlessB2BOTPsClient, IHeadlessB2BTOTPsClient, IHeadlessB2BSessionClient, IHeadlessB2BSSOClient, IHeadlessB2BRBACClient, StytchClientOptions } from "@stytch/core/public";
2
2
  import { Callbacks as Callbacks$0 } from "@stytch/core/public";
3
3
  import { StyleConfig as StyleConfig$0 } from "@stytch/core/public";
4
4
  import { StytchB2BUIConfig as StytchB2BUIConfig$0 } from "@stytch/core/public";
@@ -580,8 +580,8 @@ interface IHeadlessB2BPasswordClient {
580
580
  *
581
581
  * @returns A {@link B2BPasswordAuthenticateResponse} indicating the password is valid and that the Member is now logged in.
582
582
  *
583
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
584
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
583
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
584
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
585
585
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
586
586
  */
587
587
  authenticate(options: B2BPasswordAuthenticateOptions): Promise<B2BPasswordAuthenticateResponse>;
@@ -602,8 +602,8 @@ interface IHeadlessB2BPasswordClient {
602
602
  *
603
603
  * @returns A {@link B2BPasswordResetByEmailStartResponse} indicating the password is valid and that the Member is now logged in.
604
604
  *
605
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
606
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
605
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
606
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
607
607
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
608
608
  */
609
609
  resetByEmailStart(options: B2BPasswordResetByEmailStartOptions): Promise<B2BPasswordResetByEmailStartResponse>;
@@ -630,8 +630,8 @@ interface IHeadlessB2BPasswordClient {
630
630
  *
631
631
  * @returns A {@link B2BPasswordResetByEmailResponse} indicating the password is valid and that the Member is now logged in.
632
632
  *
633
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
634
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
633
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
634
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
635
635
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
636
636
  */
637
637
  resetByEmail(options: B2BPasswordResetByEmailOptions): Promise<B2BPasswordResetByEmailResponse>;
@@ -650,8 +650,8 @@ interface IHeadlessB2BPasswordClient {
650
650
  *
651
651
  * @returns A {@link B2BPasswordStrengthCheckResponse} containing password strength feedback.
652
652
  *
653
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
654
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
653
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
654
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
655
655
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
656
656
  */
657
657
  strengthCheck(options: B2BPasswordStrengthCheckOptions): Promise<B2BPasswordStrengthCheckResponse>;
@@ -672,8 +672,8 @@ interface IHeadlessB2BPasswordClient {
672
672
  *
673
673
  * @returns A {@link B2BPasswordResetByExistingPasswordResponse} indicating the password is valid and that the Member is now logged in.
674
674
  *
675
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
676
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
675
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
676
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
677
677
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
678
678
  */
679
679
  resetByExistingPassword(options: B2BPasswordResetByExistingPasswordOptions): Promise<B2BPasswordResetByExistingPasswordResponse>;
@@ -692,8 +692,8 @@ interface IHeadlessB2BPasswordClient {
692
692
  *
693
693
  * @returns A {@link B2BPasswordResetBySessionResponse} indicating the password is valid and that the Member is now logged in.
694
694
  *
695
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
696
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
695
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
696
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
697
697
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
698
698
  */
699
699
  resetBySession(options: B2BPasswordResetBySessionOptions): Promise<B2BPasswordResetBySessionResponse>;
@@ -727,6 +727,7 @@ declare class StytchB2BHeadlessClient {
727
727
  discovery: IHeadlessB2BDiscoveryClient;
728
728
  passwords: IHeadlessB2BPasswordClient;
729
729
  otps: IHeadlessB2BOTPsClient;
730
+ totp: IHeadlessB2BTOTPsClient;
730
731
  rbac: IHeadlessB2BRBACClient;
731
732
  constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);
732
733
  }
@@ -1,4 +1,4 @@
1
- import { IHeadlessB2BDiscoveryClient, IHeadlessB2BMagicLinksClient, IHeadlessB2BMemberClient, IHeadlessB2BSelfClient, IHeadlessB2BOAuthClient, IHeadlessB2BOrganizationClient, IHeadlessB2BOTPsClient, IHeadlessB2BSessionClient, IHeadlessB2BSSOClient, IHeadlessB2BRBACClient, StytchClientOptions } from "@stytch/core/public";
1
+ import { IHeadlessB2BDiscoveryClient, IHeadlessB2BMagicLinksClient, IHeadlessB2BMemberClient, IHeadlessB2BSelfClient, IHeadlessB2BOAuthClient, IHeadlessB2BOrganizationClient, IHeadlessB2BOTPsClient, IHeadlessB2BTOTPsClient, IHeadlessB2BSessionClient, IHeadlessB2BSSOClient, IHeadlessB2BRBACClient, StytchClientOptions } from "@stytch/core/public";
2
2
  import { Callbacks as Callbacks$0 } from "@stytch/core/public";
3
3
  import { StyleConfig as StyleConfig$0 } from "@stytch/core/public";
4
4
  import { StytchB2BUIConfig as StytchB2BUIConfig$0 } from "@stytch/core/public";
@@ -580,8 +580,8 @@ interface IHeadlessB2BPasswordClient {
580
580
  *
581
581
  * @returns A {@link B2BPasswordAuthenticateResponse} indicating the password is valid and that the Member is now logged in.
582
582
  *
583
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
584
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
583
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
584
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
585
585
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
586
586
  */
587
587
  authenticate(options: B2BPasswordAuthenticateOptions): Promise<B2BPasswordAuthenticateResponse>;
@@ -602,8 +602,8 @@ interface IHeadlessB2BPasswordClient {
602
602
  *
603
603
  * @returns A {@link B2BPasswordResetByEmailStartResponse} indicating the password is valid and that the Member is now logged in.
604
604
  *
605
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
606
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
605
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
606
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
607
607
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
608
608
  */
609
609
  resetByEmailStart(options: B2BPasswordResetByEmailStartOptions): Promise<B2BPasswordResetByEmailStartResponse>;
@@ -630,8 +630,8 @@ interface IHeadlessB2BPasswordClient {
630
630
  *
631
631
  * @returns A {@link B2BPasswordResetByEmailResponse} indicating the password is valid and that the Member is now logged in.
632
632
  *
633
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
634
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
633
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
634
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
635
635
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
636
636
  */
637
637
  resetByEmail(options: B2BPasswordResetByEmailOptions): Promise<B2BPasswordResetByEmailResponse>;
@@ -650,8 +650,8 @@ interface IHeadlessB2BPasswordClient {
650
650
  *
651
651
  * @returns A {@link B2BPasswordStrengthCheckResponse} containing password strength feedback.
652
652
  *
653
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
654
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
653
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
654
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
655
655
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
656
656
  */
657
657
  strengthCheck(options: B2BPasswordStrengthCheckOptions): Promise<B2BPasswordStrengthCheckResponse>;
@@ -672,8 +672,8 @@ interface IHeadlessB2BPasswordClient {
672
672
  *
673
673
  * @returns A {@link B2BPasswordResetByExistingPasswordResponse} indicating the password is valid and that the Member is now logged in.
674
674
  *
675
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
676
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
675
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
676
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
677
677
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
678
678
  */
679
679
  resetByExistingPassword(options: B2BPasswordResetByExistingPasswordOptions): Promise<B2BPasswordResetByExistingPasswordResponse>;
@@ -692,8 +692,8 @@ interface IHeadlessB2BPasswordClient {
692
692
  *
693
693
  * @returns A {@link B2BPasswordResetBySessionResponse} indicating the password is valid and that the Member is now logged in.
694
694
  *
695
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
696
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
695
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
696
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
697
697
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
698
698
  */
699
699
  resetBySession(options: B2BPasswordResetBySessionOptions): Promise<B2BPasswordResetBySessionResponse>;
@@ -727,6 +727,7 @@ declare class StytchB2BHeadlessClient {
727
727
  discovery: IHeadlessB2BDiscoveryClient;
728
728
  passwords: IHeadlessB2BPasswordClient;
729
729
  otps: IHeadlessB2BOTPsClient;
730
+ totp: IHeadlessB2BTOTPsClient;
730
731
  rbac: IHeadlessB2BRBACClient;
731
732
  constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);
732
733
  }