@crewdle/web-sdk-types 1.0.9 → 1.0.10
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,6 @@
|
|
|
1
|
+
import { IAgentCapacity } from '.';
|
|
1
2
|
import { IAuthNode, NodeType } from '..';
|
|
3
|
+
import { Unsubscribe } from '../..';
|
|
2
4
|
/**
|
|
3
5
|
* The authenticated agent interface.
|
|
4
6
|
* @category Core
|
|
@@ -8,4 +10,16 @@ export interface IAuthAgent extends IAuthNode {
|
|
|
8
10
|
* The type of the node.
|
|
9
11
|
*/
|
|
10
12
|
type: NodeType.Agent;
|
|
13
|
+
/**
|
|
14
|
+
* Subscribe to when the agent configuration changes.
|
|
15
|
+
* @param callback The callback to invoke when the agent configuration changes.
|
|
16
|
+
* @returns The unsubscribe function.
|
|
17
|
+
*/
|
|
18
|
+
onConfigurationChange(callback: () => Promise<void>): Unsubscribe;
|
|
19
|
+
/**
|
|
20
|
+
* Set the report capacity callback.
|
|
21
|
+
* @param reportCapacity The report capacity callback.
|
|
22
|
+
* @returns The unsubscribe function.
|
|
23
|
+
*/
|
|
24
|
+
setReportCapacity(reportCapacity: () => Promise<IAgentCapacity>): Unsubscribe;
|
|
11
25
|
}
|
package/dist/core/sdk/SDK.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ICluster } from '../cluster';
|
|
2
|
-
import { IAgentCredentials, IAuthAgent
|
|
2
|
+
import { IAgentCredentials, IAuthAgent } from '../node/agent';
|
|
3
3
|
import { IAuthUser, IUserCredentials } from '../node/user';
|
|
4
4
|
/**
|
|
5
5
|
* The SDK interface.
|
|
@@ -19,10 +19,9 @@ export interface ISDK {
|
|
|
19
19
|
/**
|
|
20
20
|
* Authenticate an agent.
|
|
21
21
|
* @param credentials The credentials to authenticate the agent with.
|
|
22
|
-
* @param reportCapacity A callback to report the agent capacity.
|
|
23
22
|
* @returns A promise that resolves with the authenticated agent.
|
|
24
23
|
*/
|
|
25
|
-
authenticateAgent(credentials: IAgentCredentials
|
|
24
|
+
authenticateAgent(credentials: IAgentCredentials): Promise<IAuthAgent>;
|
|
26
25
|
/**
|
|
27
26
|
* Join a cluster.
|
|
28
27
|
* @param clusterId The ID of the cluster to join.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/core/sdk/index.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
+
import { Unsubscribe } from '../core';
|
|
1
2
|
import { IMediaStream, MediaTrackKind, MediaSubscriptionParams } from '.';
|
|
2
|
-
/**
|
|
3
|
-
* The unsubscribe callback.
|
|
4
|
-
* @category Media Stream
|
|
5
|
-
*/
|
|
6
|
-
export type Unsubscribe = () => void;
|
|
7
3
|
/**
|
|
8
4
|
* The remote media stream interface.
|
|
9
5
|
* @category Media Stream
|
|
@@ -36,5 +32,5 @@ export interface IRemoteMediaStream extends IMediaStream {
|
|
|
36
32
|
* Subscribe to when the provider of the stream changes.
|
|
37
33
|
* @param callback The callback to invoke when the provider changes.
|
|
38
34
|
*/
|
|
39
|
-
|
|
35
|
+
onProviderChange(callback: (providerId: string | undefined) => void): Unsubscribe;
|
|
40
36
|
}
|