@anam-ai/js-sdk 4.2.0-oz-alpha.6 → 4.2.0-robbie-alpha.0
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/main/AnamClient.d.ts.map +1 -1
- package/dist/main/AnamClient.js +5 -12
- package/dist/main/AnamClient.js.map +1 -1
- package/dist/main/modules/CoreApiRestClient.d.ts +2 -7
- package/dist/main/modules/CoreApiRestClient.d.ts.map +1 -1
- package/dist/main/modules/CoreApiRestClient.js +10 -36
- package/dist/main/modules/CoreApiRestClient.js.map +1 -1
- package/dist/main/modules/EngineApiRestClient.d.ts +1 -3
- package/dist/main/modules/EngineApiRestClient.d.ts.map +1 -1
- package/dist/main/modules/EngineApiRestClient.js +5 -23
- package/dist/main/modules/EngineApiRestClient.js.map +1 -1
- package/dist/main/modules/SignallingClient.d.ts +2 -3
- package/dist/main/modules/SignallingClient.d.ts.map +1 -1
- package/dist/main/modules/SignallingClient.js +10 -39
- package/dist/main/modules/SignallingClient.js.map +1 -1
- package/dist/main/modules/StreamingClient.d.ts +0 -1
- package/dist/main/modules/StreamingClient.d.ts.map +1 -1
- package/dist/main/modules/StreamingClient.js +20 -6
- package/dist/main/modules/StreamingClient.js.map +1 -1
- package/dist/main/types/AnamPublicClientOptions.d.ts +2 -2
- package/dist/main/types/AnamPublicClientOptions.d.ts.map +1 -1
- package/dist/main/types/coreApi/CoreApiRestClientOptions.d.ts +5 -0
- package/dist/main/types/coreApi/CoreApiRestClientOptions.d.ts.map +1 -0
- package/dist/main/types/{ApiGatewayConfig.js → coreApi/CoreApiRestClientOptions.js} +1 -1
- package/dist/main/types/coreApi/CoreApiRestClientOptions.js.map +1 -0
- package/dist/main/types/coreApi/index.d.ts +1 -2
- package/dist/main/types/coreApi/index.d.ts.map +1 -1
- package/dist/main/types/index.d.ts +1 -1
- package/dist/main/types/index.d.ts.map +1 -1
- package/dist/main/types/index.js +3 -1
- package/dist/main/types/index.js.map +1 -1
- package/dist/main/types/streaming/DataChannelMessage.d.ts +4 -0
- package/dist/main/types/streaming/DataChannelMessage.d.ts.map +1 -0
- package/dist/main/types/streaming/DataChannelMessage.js +8 -0
- package/dist/main/types/streaming/DataChannelMessage.js.map +1 -0
- package/dist/main/types/streaming/StreamingClientOptions.d.ts +0 -2
- package/dist/main/types/streaming/StreamingClientOptions.d.ts.map +1 -1
- package/dist/main/types/streaming/index.d.ts +1 -0
- package/dist/main/types/streaming/index.d.ts.map +1 -1
- package/dist/main/types/streaming/index.js +3 -0
- package/dist/main/types/streaming/index.js.map +1 -1
- package/dist/module/AnamClient.d.ts.map +1 -1
- package/dist/module/AnamClient.js +5 -12
- package/dist/module/AnamClient.js.map +1 -1
- package/dist/module/modules/CoreApiRestClient.d.ts +2 -7
- package/dist/module/modules/CoreApiRestClient.d.ts.map +1 -1
- package/dist/module/modules/CoreApiRestClient.js +10 -36
- package/dist/module/modules/CoreApiRestClient.js.map +1 -1
- package/dist/module/modules/EngineApiRestClient.d.ts +1 -3
- package/dist/module/modules/EngineApiRestClient.d.ts.map +1 -1
- package/dist/module/modules/EngineApiRestClient.js +5 -23
- package/dist/module/modules/EngineApiRestClient.js.map +1 -1
- package/dist/module/modules/SignallingClient.d.ts +2 -3
- package/dist/module/modules/SignallingClient.d.ts.map +1 -1
- package/dist/module/modules/SignallingClient.js +10 -39
- package/dist/module/modules/SignallingClient.js.map +1 -1
- package/dist/module/modules/StreamingClient.d.ts +0 -1
- package/dist/module/modules/StreamingClient.d.ts.map +1 -1
- package/dist/module/modules/StreamingClient.js +21 -7
- package/dist/module/modules/StreamingClient.js.map +1 -1
- package/dist/module/types/AnamPublicClientOptions.d.ts +2 -2
- package/dist/module/types/AnamPublicClientOptions.d.ts.map +1 -1
- package/dist/module/types/coreApi/CoreApiRestClientOptions.d.ts +5 -0
- package/dist/module/types/coreApi/CoreApiRestClientOptions.d.ts.map +1 -0
- package/dist/module/types/coreApi/CoreApiRestClientOptions.js +2 -0
- package/dist/module/types/coreApi/CoreApiRestClientOptions.js.map +1 -0
- package/dist/module/types/coreApi/index.d.ts +1 -2
- package/dist/module/types/coreApi/index.d.ts.map +1 -1
- package/dist/module/types/index.d.ts +1 -1
- package/dist/module/types/index.d.ts.map +1 -1
- package/dist/module/types/index.js +1 -0
- package/dist/module/types/index.js.map +1 -1
- package/dist/module/types/streaming/DataChannelMessage.d.ts +4 -0
- package/dist/module/types/streaming/DataChannelMessage.d.ts.map +1 -0
- package/dist/module/types/streaming/DataChannelMessage.js +5 -0
- package/dist/module/types/streaming/DataChannelMessage.js.map +1 -0
- package/dist/module/types/streaming/StreamingClientOptions.d.ts +0 -2
- package/dist/module/types/streaming/StreamingClientOptions.d.ts.map +1 -1
- package/dist/module/types/streaming/index.d.ts +1 -0
- package/dist/module/types/streaming/index.d.ts.map +1 -1
- package/dist/module/types/streaming/index.js +1 -1
- package/dist/module/types/streaming/index.js.map +1 -1
- package/dist/umd/anam.js +1 -1
- package/package.json +1 -1
- package/dist/main/lib/validateApiGatewayConfig.d.ts +0 -8
- package/dist/main/lib/validateApiGatewayConfig.d.ts.map +0 -1
- package/dist/main/lib/validateApiGatewayConfig.js +0 -35
- package/dist/main/lib/validateApiGatewayConfig.js.map +0 -1
- package/dist/main/types/ApiGatewayConfig.d.ts +0 -45
- package/dist/main/types/ApiGatewayConfig.d.ts.map +0 -1
- package/dist/main/types/ApiGatewayConfig.js.map +0 -1
- package/dist/main/types/coreApi/ApiOptions.d.ts +0 -7
- package/dist/main/types/coreApi/ApiOptions.d.ts.map +0 -1
- package/dist/main/types/coreApi/ApiOptions.js +0 -3
- package/dist/main/types/coreApi/ApiOptions.js.map +0 -1
- package/dist/module/lib/validateApiGatewayConfig.d.ts +0 -8
- package/dist/module/lib/validateApiGatewayConfig.d.ts.map +0 -1
- package/dist/module/lib/validateApiGatewayConfig.js +0 -31
- package/dist/module/lib/validateApiGatewayConfig.js.map +0 -1
- package/dist/module/types/ApiGatewayConfig.d.ts +0 -45
- package/dist/module/types/ApiGatewayConfig.d.ts.map +0 -1
- package/dist/module/types/ApiGatewayConfig.js +0 -2
- package/dist/module/types/ApiGatewayConfig.js.map +0 -1
- package/dist/module/types/coreApi/ApiOptions.d.ts +0 -7
- package/dist/module/types/coreApi/ApiOptions.d.ts.map +0 -1
- package/dist/module/types/coreApi/ApiOptions.js +0 -2
- package/dist/module/types/coreApi/ApiOptions.js.map +0 -1
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validates API Gateway configuration
|
|
3
|
-
* @param apiGatewayConfig - The API Gateway configuration to validate
|
|
4
|
-
* @returns Error message if invalid, undefined if valid
|
|
5
|
-
*/
|
|
6
|
-
export function validateApiGatewayConfig(apiGatewayConfig) {
|
|
7
|
-
if (!apiGatewayConfig || !apiGatewayConfig.enabled) {
|
|
8
|
-
return undefined;
|
|
9
|
-
}
|
|
10
|
-
if (!apiGatewayConfig.baseUrl) {
|
|
11
|
-
return 'API Gateway baseUrl is required when enabled';
|
|
12
|
-
}
|
|
13
|
-
// Validate baseUrl format
|
|
14
|
-
try {
|
|
15
|
-
const url = new URL(apiGatewayConfig.baseUrl);
|
|
16
|
-
if (!['http:', 'https:', 'ws:', 'wss:'].includes(url.protocol)) {
|
|
17
|
-
return `Invalid API Gateway baseUrl protocol: ${url.protocol}. Must be http:, https:, ws:, or wss:`;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
return `Invalid API Gateway baseUrl: ${apiGatewayConfig.baseUrl}`;
|
|
22
|
-
}
|
|
23
|
-
// Validate wsPath if provided
|
|
24
|
-
if (apiGatewayConfig.wsPath) {
|
|
25
|
-
if (!apiGatewayConfig.wsPath.startsWith('/')) {
|
|
26
|
-
return 'API Gateway wsPath must start with /';
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=validateApiGatewayConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validateApiGatewayConfig.js","sourceRoot":"","sources":["../../../src/lib/validateApiGatewayConfig.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CACtC,gBAA8C;IAE9C,IAAI,CAAC,gBAAgB,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC;QACnD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC;QAC9B,OAAO,8CAA8C,CAAC;IACxD,CAAC;IAED,0BAA0B;IAC1B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC9C,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC/D,OAAO,yCAAyC,GAAG,CAAC,QAAQ,uCAAuC,CAAC;QACtG,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,gCAAgC,gBAAgB,CAAC,OAAO,EAAE,CAAC;IACpE,CAAC;IAED,8BAA8B;IAC9B,IAAI,gBAAgB,CAAC,MAAM,EAAE,CAAC;QAC5B,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YAC7C,OAAO,sCAAsC,CAAC;QAChD,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration for routing SDK requests through an API Gateway.
|
|
3
|
-
*
|
|
4
|
-
* When enabled, the SDK will route HTTP REST calls and WebSocket signalling
|
|
5
|
-
* through the specified API Gateway while maintaining direct WebRTC peer connections.
|
|
6
|
-
*
|
|
7
|
-
* @remarks
|
|
8
|
-
* - API Gateway is opt-in and disabled by default
|
|
9
|
-
* - The SDK passes complete target URLs to the gateway via headers/query params
|
|
10
|
-
* - The gateway handles routing and forwarding to Anam's infrastructure
|
|
11
|
-
* - WebRTC peer connections remain direct (not routed through gateway)
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```typescript
|
|
15
|
-
* const client = createClient(sessionToken, {
|
|
16
|
-
* apiGateway: {
|
|
17
|
-
* enabled: true,
|
|
18
|
-
* baseUrl: 'https://my-gateway.com', // Base URL for all gateway requests
|
|
19
|
-
* wsPath: '/ws' // WebSocket endpoint path (default: '/ws')
|
|
20
|
-
* }
|
|
21
|
-
* });
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export interface ApiGatewayConfig {
|
|
25
|
-
/**
|
|
26
|
-
* Enable or disable API Gateway routing
|
|
27
|
-
*/
|
|
28
|
-
enabled: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Base URL of the API Gateway server
|
|
31
|
-
* Used for both HTTP and WebSocket connections
|
|
32
|
-
*
|
|
33
|
-
* @example 'https://my-gateway.com' or 'http://localhost:3001'
|
|
34
|
-
*/
|
|
35
|
-
baseUrl: string;
|
|
36
|
-
/**
|
|
37
|
-
* WebSocket endpoint path on the gateway
|
|
38
|
-
* Defaults to '/ws' if not specified
|
|
39
|
-
*
|
|
40
|
-
* @example '/ws' or '/api/websocket'
|
|
41
|
-
* @default '/ws'
|
|
42
|
-
*/
|
|
43
|
-
wsPath?: string;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=ApiGatewayConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ApiGatewayConfig.d.ts","sourceRoot":"","sources":["../../../src/types/ApiGatewayConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ApiGatewayConfig.js","sourceRoot":"","sources":["../../../src/types/ApiGatewayConfig.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ApiOptions.d.ts","sourceRoot":"","sources":["../../../../src/types/coreApi/ApiOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ApiOptions.js","sourceRoot":"","sources":["../../../../src/types/coreApi/ApiOptions.ts"],"names":[],"mappings":""}
|