@formant/realtime-sdk 0.0.7 → 0.0.8

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.
@@ -6,6 +6,7 @@ import { IDeviceCredentials } from "../model/IDeviceCredentials";
6
6
  import { IGoogleLoginRequest } from "../model/IGoogleLoginRequest";
7
7
  import { ILoginRequest } from "../model/ILoginRequest";
8
8
  import { ILoginResult } from "../model/ILoginResult";
9
+ import { ITags } from "../model/ITags";
9
10
  import { IUser } from "../model/IUser";
10
11
  import { Uuid } from "../model/Uuid";
11
12
  export declare class AuthClient extends FormantBaseClient {
@@ -33,6 +34,6 @@ export declare class AuthClient extends FormantBaseClient {
33
34
  }): Promise<void>;
34
35
  getDeviceCredentials(token: string): Promise<IDeviceCredentials>;
35
36
  impersonate(token: string, userId: Uuid): Promise<ILoginResult>;
36
- createServiceAccount(token: string, name: string, roleId: Uuid): Promise<ICreateServiceAccountResponse>;
37
+ createServiceAccount(token: string, name: string, roleId: Uuid, tags: ITags): Promise<ICreateServiceAccountResponse>;
37
38
  getFeatures(token: string): Promise<Feature[]>;
38
39
  }
@@ -16,14 +16,16 @@ export interface IResponse<T> {
16
16
  }
17
17
  export declare abstract class BaseClient {
18
18
  protected endpoint: string | undefined;
19
+ ["constructor"]: typeof BaseClient;
19
20
  static retries: number;
20
21
  static waitForConnectivity: () => Promise<void>;
21
22
  static onResponseError: (error: ResponseError) => Promise<void>;
22
23
  private validateHeaders;
23
24
  private headers;
24
25
  private verbose;
25
- private retries;
26
+ private configuredRetries;
26
27
  private timeoutMs?;
28
+ private maxBackoffDelayMs;
27
29
  constructor(endpoint: string | undefined, options?: {
28
30
  validateHeaders?: (headers: Headers) => IValidation;
29
31
  headers?: {
@@ -32,7 +34,9 @@ export declare abstract class BaseClient {
32
34
  verbose?: boolean;
33
35
  retries?: number;
34
36
  timeoutMs?: number;
37
+ maxBackoffDelayMs?: number;
35
38
  });
39
+ protected getRetries(): number;
36
40
  protected fetch<T>(path: string, extendedInit?: IRequestInit): Promise<T>;
37
41
  protected fetchVerbose<T>(path: string, extendedInit?: IRequestInit): Promise<IResponse<T>>;
38
42
  private doFetch;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Safely stringify input.
3
+ * Similar to `JSON.stringify` but
4
+ * doesn't throw an error if input includes circular properties.
5
+ *
6
+ * Warning: output is not guaranteed to be a valid JSON string.
7
+ */
8
+ export declare function toStringSafe(input: any): string;