@stytch/vanilla-js 3.3.0 → 4.1.1

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.
@@ -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
  type ResponseCommon = {
3
3
  /**
4
4
  * Globally unique UUID that is returned with every API call.
@@ -577,8 +577,8 @@ interface IHeadlessB2BPasswordClient {
577
577
  *
578
578
  * @returns A {@link B2BPasswordAuthenticateResponse} indicating the password is valid and that the Member is now logged in.
579
579
  *
580
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
581
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
580
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
581
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
582
582
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
583
583
  */
584
584
  authenticate(options: B2BPasswordAuthenticateOptions): Promise<B2BPasswordAuthenticateResponse>;
@@ -599,8 +599,8 @@ interface IHeadlessB2BPasswordClient {
599
599
  *
600
600
  * @returns A {@link B2BPasswordResetByEmailStartResponse} indicating the password is valid and that the Member is now logged in.
601
601
  *
602
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
603
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
602
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
603
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
604
604
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
605
605
  */
606
606
  resetByEmailStart(options: B2BPasswordResetByEmailStartOptions): Promise<B2BPasswordResetByEmailStartResponse>;
@@ -627,8 +627,8 @@ interface IHeadlessB2BPasswordClient {
627
627
  *
628
628
  * @returns A {@link B2BPasswordResetByEmailResponse} indicating the password is valid and that the Member is now logged in.
629
629
  *
630
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
631
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
630
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
631
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
632
632
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
633
633
  */
634
634
  resetByEmail(options: B2BPasswordResetByEmailOptions): Promise<B2BPasswordResetByEmailResponse>;
@@ -647,8 +647,8 @@ interface IHeadlessB2BPasswordClient {
647
647
  *
648
648
  * @returns A {@link B2BPasswordStrengthCheckResponse} containing password strength feedback.
649
649
  *
650
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
651
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
650
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
651
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
652
652
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
653
653
  */
654
654
  strengthCheck(options: B2BPasswordStrengthCheckOptions): Promise<B2BPasswordStrengthCheckResponse>;
@@ -669,8 +669,8 @@ interface IHeadlessB2BPasswordClient {
669
669
  *
670
670
  * @returns A {@link B2BPasswordResetByExistingPasswordResponse} indicating the password is valid and that the Member is now logged in.
671
671
  *
672
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
673
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
672
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
673
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
674
674
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
675
675
  */
676
676
  resetByExistingPassword(options: B2BPasswordResetByExistingPasswordOptions): Promise<B2BPasswordResetByExistingPasswordResponse>;
@@ -689,8 +689,8 @@ interface IHeadlessB2BPasswordClient {
689
689
  *
690
690
  * @returns A {@link B2BPasswordResetBySessionResponse} indicating the password is valid and that the Member is now logged in.
691
691
  *
692
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
693
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
692
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
693
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
694
694
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
695
695
  */
696
696
  resetBySession(options: B2BPasswordResetBySessionOptions): Promise<B2BPasswordResetBySessionResponse>;
@@ -724,6 +724,7 @@ declare class StytchB2BHeadlessClient {
724
724
  discovery: IHeadlessB2BDiscoveryClient;
725
725
  passwords: IHeadlessB2BPasswordClient;
726
726
  otps: IHeadlessB2BOTPsClient;
727
+ totp: IHeadlessB2BTOTPsClient;
727
728
  rbac: IHeadlessB2BRBACClient;
728
729
  constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);
729
730
  }
@@ -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
  type ResponseCommon = {
3
3
  /**
4
4
  * Globally unique UUID that is returned with every API call.
@@ -577,8 +577,8 @@ interface IHeadlessB2BPasswordClient {
577
577
  *
578
578
  * @returns A {@link B2BPasswordAuthenticateResponse} indicating the password is valid and that the Member is now logged in.
579
579
  *
580
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
581
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
580
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
581
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
582
582
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
583
583
  */
584
584
  authenticate(options: B2BPasswordAuthenticateOptions): Promise<B2BPasswordAuthenticateResponse>;
@@ -599,8 +599,8 @@ interface IHeadlessB2BPasswordClient {
599
599
  *
600
600
  * @returns A {@link B2BPasswordResetByEmailStartResponse} indicating the password is valid and that the Member is now logged in.
601
601
  *
602
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
603
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
602
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
603
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
604
604
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
605
605
  */
606
606
  resetByEmailStart(options: B2BPasswordResetByEmailStartOptions): Promise<B2BPasswordResetByEmailStartResponse>;
@@ -627,8 +627,8 @@ interface IHeadlessB2BPasswordClient {
627
627
  *
628
628
  * @returns A {@link B2BPasswordResetByEmailResponse} indicating the password is valid and that the Member is now logged in.
629
629
  *
630
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
631
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
630
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
631
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
632
632
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
633
633
  */
634
634
  resetByEmail(options: B2BPasswordResetByEmailOptions): Promise<B2BPasswordResetByEmailResponse>;
@@ -647,8 +647,8 @@ interface IHeadlessB2BPasswordClient {
647
647
  *
648
648
  * @returns A {@link B2BPasswordStrengthCheckResponse} containing password strength feedback.
649
649
  *
650
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
651
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
650
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
651
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
652
652
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
653
653
  */
654
654
  strengthCheck(options: B2BPasswordStrengthCheckOptions): Promise<B2BPasswordStrengthCheckResponse>;
@@ -669,8 +669,8 @@ interface IHeadlessB2BPasswordClient {
669
669
  *
670
670
  * @returns A {@link B2BPasswordResetByExistingPasswordResponse} indicating the password is valid and that the Member is now logged in.
671
671
  *
672
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
673
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
672
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
673
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
674
674
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
675
675
  */
676
676
  resetByExistingPassword(options: B2BPasswordResetByExistingPasswordOptions): Promise<B2BPasswordResetByExistingPasswordResponse>;
@@ -689,8 +689,8 @@ interface IHeadlessB2BPasswordClient {
689
689
  *
690
690
  * @returns A {@link B2BPasswordResetBySessionResponse} indicating the password is valid and that the Member is now logged in.
691
691
  *
692
- * @throws A {@link StytchSDKAPIError} when the Stytch API returns an error.
693
- * @throws A {@link SDKAPIUnreachableError} when the SDK cannot contact the Stytch API.
692
+ * @throws A {@link StytchAPIError} when the Stytch API returns an error.
693
+ * @throws A {@link StytchAPIUnreachableError} when the SDK cannot contact the Stytch API.
694
694
  * @throws A {@link StytchSDKUsageError} when called with invalid input (invalid email, invalid options, etc.)
695
695
  */
696
696
  resetBySession(options: B2BPasswordResetBySessionOptions): Promise<B2BPasswordResetBySessionResponse>;
@@ -724,6 +724,7 @@ declare class StytchB2BHeadlessClient {
724
724
  discovery: IHeadlessB2BDiscoveryClient;
725
725
  passwords: IHeadlessB2BPasswordClient;
726
726
  otps: IHeadlessB2BOTPsClient;
727
+ totp: IHeadlessB2BTOTPsClient;
727
728
  rbac: IHeadlessB2BRBACClient;
728
729
  constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);
729
730
  }