@formant/data-sdk 1.13.1 → 1.14.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.
@@ -148,4 +148,7 @@ export * from "./model/IRole";
148
148
  export * from "./model/IUser";
149
149
  export * from "./utils/timeout";
150
150
  export type { TelemetryResult } from "./model/TelemetryResult";
151
+ export type { IAuthentication } from "./stores/IAuthentication";
152
+ export type { IConfirmForgotPasswordRequest } from "./stores/IConfirmForgotPasswordRequest";
153
+ export type { IRespondToNewPasswordRequiredChallengeRequest } from "./stores/IRespondToNewPasswordRequiredChallengeRequest";
151
154
  import "./init.ts";
@@ -1,5 +1,5 @@
1
- import { IAuthentication } from "./IAuthenticationStore";
2
1
  import { IChallenge } from "../model/IChallenge";
2
+ import { IAuthentication } from "./IAuthentication";
3
3
  export interface AuthSuccessResult {
4
4
  result: "success";
5
5
  authentication: IAuthentication;
@@ -1,6 +1,9 @@
1
- import { IAuthentication, IAuthenticationStore, IConfirmForgotPasswordRequest, IRespondToNewPasswordRequiredChallengeRequest } from "./IAuthenticationStore";
1
+ import { IAuthenticationStore } from "./IAuthenticationStore";
2
2
  import { AuthenticationResult } from "./AuthenticationResult";
3
3
  import { IUser } from "../model/IUser";
4
+ import { IAuthentication } from "./IAuthentication";
5
+ import { IConfirmForgotPasswordRequest } from "./IConfirmForgotPasswordRequest";
6
+ import { IRespondToNewPasswordRequiredChallengeRequest } from "./IRespondToNewPasswordRequiredChallengeRequest";
4
7
  interface IAuthenticationStoreOptions {
5
8
  apiUrl: string;
6
9
  refreshAuthToken: () => void;
@@ -0,0 +1,6 @@
1
+ export interface IAuthentication {
2
+ accessToken: string;
3
+ organizationId: string;
4
+ refreshToken: string;
5
+ userId: string;
6
+ }
@@ -1,20 +1,8 @@
1
1
  import { IUser } from "../model/IUser";
2
- export interface IAuthentication {
3
- accessToken: string;
4
- organizationId: string;
5
- refreshToken: string;
6
- userId: string;
7
- }
8
- export interface IConfirmForgotPasswordRequest {
9
- email: string;
10
- confirmationCode: string;
11
- newPassword: string;
12
- }
13
- export interface IRespondToNewPasswordRequiredChallengeRequest {
14
- userId: string;
15
- session: string;
16
- newPassword: string;
17
- }
2
+ import { AuthenticationResult } from "./AuthenticationResult";
3
+ import { IConfirmForgotPasswordRequest } from "./IConfirmForgotPasswordRequest";
4
+ import { IAuthentication } from "./IAuthentication";
5
+ import { IRespondToNewPasswordRequiredChallengeRequest } from "./IRespondToNewPasswordRequiredChallengeRequest";
18
6
  export interface IAuthenticationStore {
19
7
  readonly token: string | undefined;
20
8
  readonly currentUser: IUser | undefined;
@@ -29,6 +17,9 @@ export interface IAuthenticationStore {
29
17
  */
30
18
  readonly isShareToken: boolean;
31
19
  login(email: string, password: string): Promise<IAuthentication>;
20
+ login(email: string, password: string, options: {
21
+ advanced: true;
22
+ }): Promise<AuthenticationResult>;
32
23
  loginWithToken(token: string, refreshToken?: string): Promise<void>;
33
24
  isAuthenticated(): boolean;
34
25
  getCurrentUser(): IUser | undefined;
@@ -0,0 +1,5 @@
1
+ export interface IConfirmForgotPasswordRequest {
2
+ email: string;
3
+ confirmationCode: string;
4
+ newPassword: string;
5
+ }
@@ -0,0 +1,5 @@
1
+ export interface IRespondToNewPasswordRequiredChallengeRequest {
2
+ userId: string;
3
+ session: string;
4
+ newPassword: string;
5
+ }
package/package.json CHANGED
@@ -24,7 +24,7 @@
24
24
  }
25
25
  }
26
26
  },
27
- "version": "1.13.1",
27
+ "version": "1.14.0",
28
28
  "scripts": {
29
29
  "preversion": "npm run verify",
30
30
  "postversion": "make",