@formant/data-sdk 0.0.136 → 0.0.137

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.
@@ -11,6 +11,16 @@ export interface IAuthentication {
11
11
  refreshToken: string;
12
12
  userId: string;
13
13
  }
14
+ export interface IConfirmForgotPasswordRequest {
15
+ email: string;
16
+ confirmationCode: string;
17
+ newPassword: string;
18
+ }
19
+ export interface IRespondToNewPasswordRequiredChallengeRequest {
20
+ userId: string;
21
+ session: string;
22
+ newPassword: string;
23
+ }
14
24
  export declare class Authentication {
15
25
  static token: string | undefined;
16
26
  static refreshToken: string | undefined;
@@ -25,4 +35,17 @@ export declare class Authentication {
25
35
  static getCurrentUser(): User | undefined;
26
36
  static waitTilAuthenticated(): Promise<boolean>;
27
37
  static listenForRefresh(): Promise<void>;
38
+ static forgotPassword(email: string): Promise<void>;
39
+ /**
40
+ * @example
41
+ * // Body
42
+ * await Authentication.confirmForgotPassword({
43
+ * email: "joe@gmail.com"
44
+ * confirmationCode: "1",
45
+ * newPassword: "NewPassword"
46
+ * });
47
+ */
48
+ static confirmForgotPassword(request: IConfirmForgotPasswordRequest): Promise<boolean>;
49
+ static respondToNewPasswordRequiredChallenge(request: IRespondToNewPasswordRequiredChallengeRequest): Promise<any>;
50
+ static loginWithGoogle(token: string): Promise<any>;
28
51
  }
@@ -9,8 +9,7 @@ import { PeerDevice } from "./PeerDevice";
9
9
  import { IDeviceQuery } from "./model/IDeviceQuery";
10
10
  import { IStream } from "./model/IStream";
11
11
  import { IView } from "./model/IView";
12
- import { AggregateLevel } from "./main";
13
- import { EventType } from "./main";
12
+ import { EventType, AggregateLevel, IShare } from "./main";
14
13
  import { IAnalyticsModule } from "./model/IAnalyticsModule";
15
14
  import { IStreamColumn } from "./model/IStreamColumn";
16
15
  import { ITaskReportColumn } from "./model/ITaskReportColumn";
@@ -181,4 +180,24 @@ export declare class Fleet {
181
180
  * });
182
181
  */
183
182
  static getTaskReportRows(query: ISqlQuery): Promise<any>;
183
+ /**
184
+ * @param scope is required
185
+ * @param time is required
186
+ * @returns
187
+ * Share link
188
+ * @example
189
+ * // Body
190
+ * const link = await Fleet.createShareLink({
191
+ * delegateTeleop: false
192
+ * message: "See bot in action",
193
+ * scope: {
194
+ * deviceIds: ["d64520a6-a308-4a59-9267-b7f8a7bfc7ab"],
195
+ * start: "2023-04-04T19:51:47.125Z",
196
+ * end: "2023-04-04T20:51:47.125Z"
197
+ * },
198
+ * time: "2023-04-04T20:21:47.125Z",
199
+ * userName: "User",
200
+ * });
201
+ */
202
+ static createShareLink(share: IShare): Promise<string>;
184
203
  }
@@ -1,3 +1,4 @@
1
1
  export * from "./aggregateFunctionUtils";
2
2
  export * from "./numericAggregateUtils";
3
3
  export * from "./timeout";
4
+ export * from "./serializeHash";
@@ -0,0 +1,2 @@
1
+ export declare function serializeHash(value: any): string;
2
+ export declare function deserializeHash(value: string): any;
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "require": "./dist/data-sdk.umd.js"
19
19
  }
20
20
  },
21
- "version": "0.0.136",
21
+ "version": "0.0.137",
22
22
  "scripts": {
23
23
  "dev": "vite --port 9146",
24
24
  "build": "tsc && vite build",
@@ -27,10 +27,13 @@
27
27
  "docs": "typedoc src/main.ts --theme default --out ../../docs/data-sdk/"
28
28
  },
29
29
  "devDependencies": {
30
+ "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
31
+ "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
32
+ "@rollup/plugin-node-resolve": "^15.0.2",
30
33
  "@types/node": "^18.15.11",
31
34
  "typedoc": "^0.22.13",
32
- "typescript": "^4.3.2",
33
- "vite": "^2.5.4"
35
+ "typescript": "^4.9.3",
36
+ "vite": "^4.1.0"
34
37
  },
35
38
  "types": "./dist/types/data-sdk/src/main.d.ts",
36
39
  "dependencies": {