@stream-io/node-sdk 0.9.0 → 0.9.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.
@@ -11,6 +11,13 @@ export declare class StreamVideoClient extends VideoApi {
11
11
  apiClient: ApiClient;
12
12
  });
13
13
  call: (type: string, id: string) => StreamCall;
14
+ /**
15
+ * Connects an OpenAI Realtime agent to a call through Stream's `/video/connect_agent` proxy.
16
+ *
17
+ * @deprecated The OpenAI Realtime proxy is deprecated and will be removed in a
18
+ * future major release. Build voice and video AI agents with Vision Agents
19
+ * instead: https://visionagents.ai/integrations/llm/openai
20
+ */
14
21
  connectOpenAi: (options: {
15
22
  call: StreamCall;
16
23
  agentUserId: string;
@@ -1,3 +1,4 @@
1
+ import type { APIError } from './gen/models';
1
2
  export type OmitTypeId<T> = Omit<T, 'type' | 'id' | 'connection_id'>;
2
3
  export interface ApiConfig {
3
4
  apiKey: string;
@@ -20,7 +21,19 @@ export type StreamResponse<T> = T & {
20
21
  export declare class StreamError extends Error {
21
22
  metadata: Partial<RequestMetadata>;
22
23
  code?: number | undefined;
23
- constructor(message: string, metadata: Partial<RequestMetadata>, code?: number | undefined, errorOptions?: ErrorOptions);
24
+ /**
25
+ * The error body the API returned (`exception_fields`, `details`,
26
+ * `more_info`, `status_code`, ...). Undefined when the request failed
27
+ * before a response arrived or the response body was not JSON.
28
+ */
29
+ apiError?: APIError | undefined;
30
+ constructor(message: string, metadata: Partial<RequestMetadata>, code?: number | undefined, errorOptions?: ErrorOptions,
31
+ /**
32
+ * The error body the API returned (`exception_fields`, `details`,
33
+ * `more_info`, `status_code`, ...). Undefined when the request failed
34
+ * before a response arrived or the response body was not JSON.
35
+ */
36
+ apiError?: APIError | undefined);
24
37
  }
25
38
  export interface RateLimit {
26
39
  rateLimit?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/node-sdk",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {
package/src/ApiClient.ts CHANGED
@@ -89,6 +89,7 @@ export class ApiClient {
89
89
  metadata,
90
90
  error!.code,
91
91
  undefined,
92
+ error!,
92
93
  );
93
94
  }
94
95
 
@@ -28,6 +28,13 @@ export class StreamVideoClient extends VideoApi {
28
28
  return new StreamCall(this, type, id, this.streamClient);
29
29
  };
30
30
 
31
+ /**
32
+ * Connects an OpenAI Realtime agent to a call through Stream's `/video/connect_agent` proxy.
33
+ *
34
+ * @deprecated The OpenAI Realtime proxy is deprecated and will be removed in a
35
+ * future major release. Build voice and video AI agents with Vision Agents
36
+ * instead: https://visionagents.ai/integrations/llm/openai
37
+ */
31
38
  connectOpenAi = async (options: {
32
39
  call: StreamCall;
33
40
  agentUserId: string;
package/src/types.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { APIError } from './gen/models';
2
+
1
3
  export type OmitTypeId<T> = Omit<T, 'type' | 'id' | 'connection_id'>;
2
4
 
3
5
  export interface ApiConfig {
@@ -27,6 +29,12 @@ export class StreamError extends Error {
27
29
  public metadata: Partial<RequestMetadata>,
28
30
  public code?: number,
29
31
  errorOptions?: ErrorOptions,
32
+ /**
33
+ * The error body the API returned (`exception_fields`, `details`,
34
+ * `more_info`, `status_code`, ...). Undefined when the request failed
35
+ * before a response arrived or the response body was not JSON.
36
+ */
37
+ public apiError?: APIError,
30
38
  ) {
31
39
  super(message, errorOptions);
32
40
  }