@formant/realtime-sdk 1.4.3 → 1.4.5

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.
Files changed (38) hide show
  1. package/README.md +32 -21
  2. package/dist/client/AuthClient.d.ts +1 -1
  3. package/dist/common/BaseClient.d.ts +3 -1
  4. package/dist/common/config/index.d.ts +1 -0
  5. package/dist/common/errorConstants.d.ts +7 -0
  6. package/dist/common/isValidTagString.d.ts +3 -1
  7. package/dist/common/redact.d.ts +2 -0
  8. package/dist/common/setPromiseInterval.d.ts +3 -2
  9. package/dist/common/truncate.d.ts +4 -0
  10. package/dist/index.js +1 -1
  11. package/dist/index.js.LICENSE.txt +5 -7
  12. package/dist/model/IAuditLog.d.ts +1 -0
  13. package/dist/model/IBitset.d.ts +5 -0
  14. package/dist/model/IFilter.d.ts +2 -2
  15. package/dist/model/IListResponse.d.ts +6 -0
  16. package/dist/model/IPath.d.ts +3 -1
  17. package/dist/model/IRequestToken.d.ts +4 -0
  18. package/dist/model/IUser.d.ts +6 -1
  19. package/dist/model/auditLogActionTypes.d.ts +1 -1
  20. package/dist/model/features.d.ts +1 -1
  21. package/dist/model/healthStatuses.d.ts +3 -3
  22. package/dist/model/reservedTagValues.d.ts +3 -0
  23. package/dist/model/rtcConnectionStatuses.d.ts +1 -1
  24. package/dist/model/rtcStreamTypes.d.ts +5 -1
  25. package/dist/model/userResources.d.ts +1 -0
  26. package/dist/protos/api/signaling/v1/BUILD.bazel +25 -0
  27. package/dist/protos/index.d.ts +3 -0
  28. package/dist/protos/index.js +14 -0
  29. package/dist/realtime-sdk/src/index.d.ts +3 -3
  30. package/dist/rtc-client/RtcConnection.d.ts +5 -1
  31. package/dist/rtc-client/models/IBinaryH264Message.d.ts +13 -0
  32. package/dist/rtc-client/models/IRtcClientConfiguration.d.ts +1 -2
  33. package/dist/rtc-client/models/IRtcConnectionBaseConfiguration.d.ts +1 -1
  34. package/dist/rtc-client/models/IRtcStreamPayload.d.ts +12 -0
  35. package/dist/rtc-client/models/RtcCommunicationType.d.ts +1 -1
  36. package/dist/rtc-client/utils/binaryMessageParser.d.ts +19 -0
  37. package/dist/rtc-client/utils/peerToRtcPeer.d.ts +1 -1
  38. package/package.json +19 -5
package/README.md CHANGED
@@ -18,36 +18,47 @@ Distributed under the MIT License. See LICENSE.txt for more information.
18
18
 
19
19
  ## Changelog
20
20
 
21
+ ### **1.3.0** - 2024-09-09
22
+
23
+ #### Fixed
24
+
25
+ - Redact sensitive ICE credentials.
26
+
21
27
  ### **1.2.0** - 2023-08-18
22
28
 
23
29
  #### Added
24
- - Exporting `IRtcPeer` and `RtcStreamType`.
30
+
31
+ - Exporting `IRtcPeer` and `RtcStreamType`.
25
32
 
26
33
  ### **1.1.0** - 2023-08-18
27
-
34
+
28
35
  #### Fixed
29
- - Fixed debug logging level output.
36
+
37
+ - Fixed debug logging level output.
30
38
 
31
39
  ### **1.0.0** - 2023-07-19
32
40
 
33
41
  #### Added
34
- - Odometry over teleop
35
- - Add support for eventing on all event trigger types
42
+
43
+ - Odometry over teleop
44
+ - Add support for eventing on all event trigger types
36
45
 
37
46
  #### Changed
38
- - Reduce ICE gathering timeout to 3s
39
-
40
- #### Fixed
41
- - Workaround for lack of getConfiguration method on RTCPeerConnection
42
- - Project de-cycling
43
- - Fix Odom
44
- - Use previously implemented util for detecting STUN vs TURN
45
- - Partition connections in a single step…
46
- - Immediately eject a disconnected connection from the connection set
47
- - More cleanup on rtcClient shutdown
48
- - Record RTC connection type metric (host, relay, etc)
49
- - Make best-effort to *release* the RtcPeerConnection on close
50
- - `isConnectionInitiator` never gets cleared, keeping RtcConnections alive
51
- - Add prettier plugin to deterministically sort import ordering
52
- - Dependency updates
53
- - Resolve realtime-sdk build warnings about re-exporting types
47
+
48
+ - Reduce ICE gathering timeout to 3s
49
+
50
+ #### Fixed
51
+
52
+ - Workaround for lack of getConfiguration method on RTCPeerConnection
53
+ - Project de-cycling
54
+ - Fix Odom
55
+ - Use previously implemented util for detecting STUN vs TURN
56
+ - Partition connections in a single step…
57
+ - Immediately eject a disconnected connection from the connection set
58
+ - More cleanup on rtcClient shutdown
59
+ - Record RTC connection type metric (host, relay, etc)
60
+ - Make best-effort to _release_ the RtcPeerConnection on close
61
+ - `isConnectionInitiator` never gets cleared, keeping RtcConnections alive
62
+ - Add prettier plugin to deterministically sort import ordering
63
+ - Dependency updates
64
+ - Resolve realtime-sdk build warnings about re-exporting types
@@ -35,7 +35,7 @@ export declare class AuthClient extends FormantBaseClient {
35
35
  }): Promise<void>;
36
36
  getDeviceCredentials(token: string): Promise<IDeviceCredentials>;
37
37
  impersonate(token: string, userId: Uuid): Promise<ILoginResult>;
38
- createServiceAccount(token: string, name: string, roleId: Uuid, tags: ITags): Promise<ICreateServiceAccountResponse>;
38
+ createServiceAccount(token: string, name: string, roleId: Uuid, tags: ITags, description?: string): Promise<ICreateServiceAccountResponse>;
39
39
  getFeatures(token: string): Promise<Feature[]>;
40
40
  checkSso(email: string, allowUserAutoCreation?: boolean): Promise<ICheckSsoResult>;
41
41
  loginWithSso(token: string, refreshToken?: string): Promise<ILoginResult>;
@@ -1,11 +1,12 @@
1
1
  import { IDictionary } from "../model/IDictionary";
2
+ import { IRequestToken } from "../model/IRequestToken";
2
3
  import { IValidation } from "../model/IValidation";
3
4
  import { ResponseError } from "./ResponseError";
4
5
  export interface IRequestInit {
5
6
  method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
6
7
  headers?: IDictionary;
7
8
  body?: any;
8
- token?: string;
9
+ token?: string | IRequestToken;
9
10
  allowUnsafeRetries?: boolean;
10
11
  json?: boolean;
11
12
  }
@@ -40,4 +41,5 @@ export declare abstract class BaseClient {
40
41
  protected fetchVerbose<T>(path: string, extendedInit?: IRequestInit): Promise<IResponse<T>>;
41
42
  private doFetch;
42
43
  private getConstructor;
44
+ static isNetworkError(error: any): boolean;
43
45
  }
@@ -1,3 +1,4 @@
1
+ export declare const workflowGoogleDriveClientId: string;
1
2
  export declare const environment: string;
2
3
  export declare const app: string;
3
4
  export declare const appPath: string;
@@ -0,0 +1,7 @@
1
+ export declare const temporaryPasswordExpired = "temporary password expired";
2
+ export declare const peerDoesNotExist = "peer does not exist";
3
+ export declare const deviceDisabled = "device disabled";
4
+ export declare const tagRestricted = "missing tag(s) to access this resource";
5
+ export declare const groupNameConflict = "group name already exists";
6
+ export declare const groupTagConflict = "group tag key and value already exists";
7
+ export declare const tooManyEventsToUpdate = "too many events to update";
@@ -1 +1,3 @@
1
- export declare function isValidTagString(keyOrValue: string, allowStar?: boolean): boolean;
1
+ export declare function isValidTagString(keyOrValue: string, config?: {
2
+ allowStar?: boolean;
3
+ }): boolean;
@@ -1,4 +1,6 @@
1
+ export declare const redactKeys: string[];
1
2
  /**
2
3
  * Returns a copy of an object with sensitive information redacted.
3
4
  */
4
5
  export declare function redact(object: unknown, visited?: WeakSet<any>): any;
6
+ export declare const redactStringifiedFields: (offerSignal: any) => Record<any, any>;
@@ -3,8 +3,9 @@ export interface IPromiseIntervalOptions {
3
3
  delay: number;
4
4
  immediate?: boolean;
5
5
  }
6
- export interface IShutdownPromiseInterval {
6
+ export interface IPromiseIntervalHandle {
7
7
  stop(): Promise<void>;
8
+ pending(): Promise<void>;
8
9
  }
9
10
  /**
10
11
  * Runs callback function f periodically.
@@ -13,4 +14,4 @@ export interface IShutdownPromiseInterval {
13
14
  *
14
15
  * Returns a function that stops execution if invoked.
15
16
  */
16
- export declare function setPromiseInterval({ func, delay, immediate, }: IPromiseIntervalOptions): IShutdownPromiseInterval;
17
+ export declare function setPromiseInterval({ func, delay, immediate, }: IPromiseIntervalOptions): IPromiseIntervalHandle;
@@ -0,0 +1,4 @@
1
+ export declare function truncate(message: string, options?: {
2
+ maxMessageLength?: number;
3
+ truncatedMessageEndLength?: number;
4
+ }): string;