@layercode/js-sdk 2.3.0 → 2.3.1
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.
package/dist/types/index.d.ts
CHANGED
|
@@ -17,6 +17,16 @@ export interface AgentConfig {
|
|
|
17
17
|
frame_samples?: number;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
+
interface AuthorizeSessionRequestParams {
|
|
21
|
+
url: string;
|
|
22
|
+
body: {
|
|
23
|
+
agent_id: string;
|
|
24
|
+
metadata: Record<string, any>;
|
|
25
|
+
sdk_version: string;
|
|
26
|
+
conversation_id?: string | null;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
type AuthorizeSessionRequest = (params: AuthorizeSessionRequestParams) => Promise<Response>;
|
|
20
30
|
/**
|
|
21
31
|
* Interface for LayercodeClient public methods
|
|
22
32
|
*/
|
|
@@ -49,6 +59,8 @@ interface LayercodeClientOptions {
|
|
|
49
59
|
conversationId?: string | null;
|
|
50
60
|
/** The endpoint URL for the audio agent API */
|
|
51
61
|
authorizeSessionEndpoint: string;
|
|
62
|
+
/** Optional custom request handler for authorizing a session */
|
|
63
|
+
authorizeSessionRequest?: AuthorizeSessionRequest;
|
|
52
64
|
/** Metadata to send with webhooks */
|
|
53
65
|
metadata?: Record<string, any>;
|
|
54
66
|
/** Milliseconds before resuming assistant audio after temporary pause due to user interruption (which was actually a false interruption) */
|
|
@@ -207,4 +219,4 @@ declare class LayercodeClient implements ILayercodeClient {
|
|
|
207
219
|
unmute(): void;
|
|
208
220
|
}
|
|
209
221
|
export default LayercodeClient;
|
|
210
|
-
export type {
|
|
222
|
+
export type { ILayercodeClient, LayercodeClientOptions, AuthorizeSessionRequest, AuthorizeSessionRequestParams };
|
package/package.json
CHANGED