@authsignal/browser 1.0.0-alpha1 → 1.0.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,5 @@
1
- import { ApiClientOptions, ChallengeResponse, EnrollResponse, ErrorResponse, VerifyResponse } from "./types/shared";
1
+ import { ChallengeResponse, EnrollResponse } from "../types";
2
+ import { ApiClientOptions, ErrorResponse, VerifyResponse } from "./types/shared";
2
3
  export declare class EmailApiClient {
3
4
  tenantId: string;
4
5
  baseUrl: string;
@@ -1,5 +1,5 @@
1
- import { AddAuthenticatorRequest, AddAuthenticatorResponse, AuthenticationOptsRequest, AuthenticationOptsResponse, ErrorResponse, PasskeyAuthenticatorResponse, RegistrationOptsRequest, RegistrationOptsResponse, VerifyRequest, VerifyResponse } from "./types/passkey";
2
- import { ApiClientOptions, ChallengeResponse } from "./types/shared";
1
+ import { AddAuthenticatorRequest, AddAuthenticatorResponse, AuthenticationOptsRequest, AuthenticationOptsResponse, ChallengeResponse, ErrorResponse, PasskeyAuthenticatorResponse, RegistrationOptsRequest, RegistrationOptsResponse, VerifyRequest, VerifyResponse } from "./types/passkey";
2
+ import { ApiClientOptions } from "./types/shared";
3
3
  export declare class PasskeyApiClient {
4
4
  tenantId: string;
5
5
  baseUrl: string;
@@ -1,4 +1,5 @@
1
- import { ApiClientOptions, ChallengeResponse, EnrollResponse, ErrorResponse, VerifyResponse } from "./types/shared";
1
+ import { ChallengeResponse, EnrollResponse } from "../types";
2
+ import { ApiClientOptions, ErrorResponse, VerifyResponse } from "./types/shared";
2
3
  export declare class SmsApiClient {
3
4
  tenantId: string;
4
5
  baseUrl: string;
@@ -1,5 +1,5 @@
1
1
  import { ApiClientOptions, ErrorResponse, VerifyResponse } from "./types/shared";
2
- import { EnrollTotpResponse } from "./types/totp";
2
+ import { EnrollTotpResponse } from "../types";
3
3
  export declare class TotpApiClient {
4
4
  tenantId: string;
5
5
  baseUrl: string;
@@ -3,13 +3,6 @@ export type ApiClientOptions = {
3
3
  tenantId: string;
4
4
  onTokenExpired?: () => void;
5
5
  };
6
- export type EnrollResponse = {
7
- userAuthenticatorId: string;
8
- userId: string;
9
- };
10
- export type ChallengeResponse = {
11
- challengeId: string;
12
- };
13
6
  export type VerifyResponse = {
14
7
  isVerified: boolean;
15
8
  accessToken?: string;
package/dist/email.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { ChallengeResponse, EnrollResponse, VerifyResponse } from "./api/types/shared";
2
- import { AuthsignalResponse } from "./types";
1
+ import { AuthsignalResponse, ChallengeResponse, EnrollResponse, VerifyResponse } from "./types";
3
2
  type EmailOptions = {
4
3
  baseUrl: string;
5
4
  tenantId: string;
package/dist/sms.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { ChallengeResponse, EnrollResponse, VerifyResponse } from "./api/types/shared";
2
- import { AuthsignalResponse } from "./types";
1
+ import { AuthsignalResponse, ChallengeResponse, EnrollResponse, VerifyResponse } from "./types";
3
2
  type SmsOptions = {
4
3
  baseUrl: string;
5
4
  tenantId: string;
package/dist/totp.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- import { VerifyResponse } from "./api/types/shared";
2
- import { EnrollTotpResponse } from "./api/types/totp";
3
- import { AuthsignalResponse } from "./types";
1
+ import { AuthsignalResponse, EnrollTotpResponse, VerifyResponse } from "./types";
4
2
  type TotpOptions = {
5
3
  baseUrl: string;
6
4
  tenantId: string;
package/dist/types.d.ts CHANGED
@@ -68,4 +68,20 @@ export type AuthsignalResponse<T> = {
68
68
  error?: string;
69
69
  data?: T;
70
70
  };
71
+ export type EnrollResponse = {
72
+ userAuthenticatorId: string;
73
+ userId: string;
74
+ };
75
+ export type EnrollTotpResponse = {
76
+ uri: string;
77
+ secret: string;
78
+ } & EnrollResponse;
79
+ export type ChallengeResponse = {
80
+ challengeId: string;
81
+ };
82
+ export type VerifyResponse = {
83
+ isVerified: boolean;
84
+ token?: string;
85
+ failureReason?: string;
86
+ };
71
87
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authsignal/browser",
3
- "version": "1.0.0-alpha1",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -1,6 +0,0 @@
1
- export type EnrollTotpResponse = {
2
- userAuthenticatorId: string;
3
- userId: string;
4
- uri: string;
5
- secret: string;
6
- };