@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.
Files changed (107) hide show
  1. package/dist/main/AnamClient.d.ts.map +1 -1
  2. package/dist/main/AnamClient.js +5 -12
  3. package/dist/main/AnamClient.js.map +1 -1
  4. package/dist/main/modules/CoreApiRestClient.d.ts +2 -7
  5. package/dist/main/modules/CoreApiRestClient.d.ts.map +1 -1
  6. package/dist/main/modules/CoreApiRestClient.js +10 -36
  7. package/dist/main/modules/CoreApiRestClient.js.map +1 -1
  8. package/dist/main/modules/EngineApiRestClient.d.ts +1 -3
  9. package/dist/main/modules/EngineApiRestClient.d.ts.map +1 -1
  10. package/dist/main/modules/EngineApiRestClient.js +5 -23
  11. package/dist/main/modules/EngineApiRestClient.js.map +1 -1
  12. package/dist/main/modules/SignallingClient.d.ts +2 -3
  13. package/dist/main/modules/SignallingClient.d.ts.map +1 -1
  14. package/dist/main/modules/SignallingClient.js +10 -39
  15. package/dist/main/modules/SignallingClient.js.map +1 -1
  16. package/dist/main/modules/StreamingClient.d.ts +0 -1
  17. package/dist/main/modules/StreamingClient.d.ts.map +1 -1
  18. package/dist/main/modules/StreamingClient.js +20 -6
  19. package/dist/main/modules/StreamingClient.js.map +1 -1
  20. package/dist/main/types/AnamPublicClientOptions.d.ts +2 -2
  21. package/dist/main/types/AnamPublicClientOptions.d.ts.map +1 -1
  22. package/dist/main/types/coreApi/CoreApiRestClientOptions.d.ts +5 -0
  23. package/dist/main/types/coreApi/CoreApiRestClientOptions.d.ts.map +1 -0
  24. package/dist/main/types/{ApiGatewayConfig.js → coreApi/CoreApiRestClientOptions.js} +1 -1
  25. package/dist/main/types/coreApi/CoreApiRestClientOptions.js.map +1 -0
  26. package/dist/main/types/coreApi/index.d.ts +1 -2
  27. package/dist/main/types/coreApi/index.d.ts.map +1 -1
  28. package/dist/main/types/index.d.ts +1 -1
  29. package/dist/main/types/index.d.ts.map +1 -1
  30. package/dist/main/types/index.js +3 -1
  31. package/dist/main/types/index.js.map +1 -1
  32. package/dist/main/types/streaming/DataChannelMessage.d.ts +4 -0
  33. package/dist/main/types/streaming/DataChannelMessage.d.ts.map +1 -0
  34. package/dist/main/types/streaming/DataChannelMessage.js +8 -0
  35. package/dist/main/types/streaming/DataChannelMessage.js.map +1 -0
  36. package/dist/main/types/streaming/StreamingClientOptions.d.ts +0 -2
  37. package/dist/main/types/streaming/StreamingClientOptions.d.ts.map +1 -1
  38. package/dist/main/types/streaming/index.d.ts +1 -0
  39. package/dist/main/types/streaming/index.d.ts.map +1 -1
  40. package/dist/main/types/streaming/index.js +3 -0
  41. package/dist/main/types/streaming/index.js.map +1 -1
  42. package/dist/module/AnamClient.d.ts.map +1 -1
  43. package/dist/module/AnamClient.js +5 -12
  44. package/dist/module/AnamClient.js.map +1 -1
  45. package/dist/module/modules/CoreApiRestClient.d.ts +2 -7
  46. package/dist/module/modules/CoreApiRestClient.d.ts.map +1 -1
  47. package/dist/module/modules/CoreApiRestClient.js +10 -36
  48. package/dist/module/modules/CoreApiRestClient.js.map +1 -1
  49. package/dist/module/modules/EngineApiRestClient.d.ts +1 -3
  50. package/dist/module/modules/EngineApiRestClient.d.ts.map +1 -1
  51. package/dist/module/modules/EngineApiRestClient.js +5 -23
  52. package/dist/module/modules/EngineApiRestClient.js.map +1 -1
  53. package/dist/module/modules/SignallingClient.d.ts +2 -3
  54. package/dist/module/modules/SignallingClient.d.ts.map +1 -1
  55. package/dist/module/modules/SignallingClient.js +10 -39
  56. package/dist/module/modules/SignallingClient.js.map +1 -1
  57. package/dist/module/modules/StreamingClient.d.ts +0 -1
  58. package/dist/module/modules/StreamingClient.d.ts.map +1 -1
  59. package/dist/module/modules/StreamingClient.js +21 -7
  60. package/dist/module/modules/StreamingClient.js.map +1 -1
  61. package/dist/module/types/AnamPublicClientOptions.d.ts +2 -2
  62. package/dist/module/types/AnamPublicClientOptions.d.ts.map +1 -1
  63. package/dist/module/types/coreApi/CoreApiRestClientOptions.d.ts +5 -0
  64. package/dist/module/types/coreApi/CoreApiRestClientOptions.d.ts.map +1 -0
  65. package/dist/module/types/coreApi/CoreApiRestClientOptions.js +2 -0
  66. package/dist/module/types/coreApi/CoreApiRestClientOptions.js.map +1 -0
  67. package/dist/module/types/coreApi/index.d.ts +1 -2
  68. package/dist/module/types/coreApi/index.d.ts.map +1 -1
  69. package/dist/module/types/index.d.ts +1 -1
  70. package/dist/module/types/index.d.ts.map +1 -1
  71. package/dist/module/types/index.js +1 -0
  72. package/dist/module/types/index.js.map +1 -1
  73. package/dist/module/types/streaming/DataChannelMessage.d.ts +4 -0
  74. package/dist/module/types/streaming/DataChannelMessage.d.ts.map +1 -0
  75. package/dist/module/types/streaming/DataChannelMessage.js +5 -0
  76. package/dist/module/types/streaming/DataChannelMessage.js.map +1 -0
  77. package/dist/module/types/streaming/StreamingClientOptions.d.ts +0 -2
  78. package/dist/module/types/streaming/StreamingClientOptions.d.ts.map +1 -1
  79. package/dist/module/types/streaming/index.d.ts +1 -0
  80. package/dist/module/types/streaming/index.d.ts.map +1 -1
  81. package/dist/module/types/streaming/index.js +1 -1
  82. package/dist/module/types/streaming/index.js.map +1 -1
  83. package/dist/umd/anam.js +1 -1
  84. package/package.json +1 -1
  85. package/dist/main/lib/validateApiGatewayConfig.d.ts +0 -8
  86. package/dist/main/lib/validateApiGatewayConfig.d.ts.map +0 -1
  87. package/dist/main/lib/validateApiGatewayConfig.js +0 -35
  88. package/dist/main/lib/validateApiGatewayConfig.js.map +0 -1
  89. package/dist/main/types/ApiGatewayConfig.d.ts +0 -45
  90. package/dist/main/types/ApiGatewayConfig.d.ts.map +0 -1
  91. package/dist/main/types/ApiGatewayConfig.js.map +0 -1
  92. package/dist/main/types/coreApi/ApiOptions.d.ts +0 -7
  93. package/dist/main/types/coreApi/ApiOptions.d.ts.map +0 -1
  94. package/dist/main/types/coreApi/ApiOptions.js +0 -3
  95. package/dist/main/types/coreApi/ApiOptions.js.map +0 -1
  96. package/dist/module/lib/validateApiGatewayConfig.d.ts +0 -8
  97. package/dist/module/lib/validateApiGatewayConfig.d.ts.map +0 -1
  98. package/dist/module/lib/validateApiGatewayConfig.js +0 -31
  99. package/dist/module/lib/validateApiGatewayConfig.js.map +0 -1
  100. package/dist/module/types/ApiGatewayConfig.d.ts +0 -45
  101. package/dist/module/types/ApiGatewayConfig.d.ts.map +0 -1
  102. package/dist/module/types/ApiGatewayConfig.js +0 -2
  103. package/dist/module/types/ApiGatewayConfig.js.map +0 -1
  104. package/dist/module/types/coreApi/ApiOptions.d.ts +0 -7
  105. package/dist/module/types/coreApi/ApiOptions.d.ts.map +0 -1
  106. package/dist/module/types/coreApi/ApiOptions.js +0 -2
  107. 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,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ApiGatewayConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApiGatewayConfig.js","sourceRoot":"","sources":["../../../src/types/ApiGatewayConfig.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import { ApiGatewayConfig } from '../ApiGatewayConfig';
2
- export interface ApiOptions {
3
- baseUrl?: string;
4
- apiVersion?: string;
5
- apiGateway?: ApiGatewayConfig;
6
- }
7
- //# sourceMappingURL=ApiOptions.d.ts.map
@@ -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,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ApiOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApiOptions.js","sourceRoot":"","sources":["../../../../src/types/coreApi/ApiOptions.ts"],"names":[],"mappings":""}