@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.
package/dist/index.es.mjs CHANGED
@@ -2309,6 +2309,13 @@ var StreamVideoClient = class extends VideoApi {
2309
2309
  call = (type, id) => {
2310
2310
  return new StreamCall(this, type, id, this.streamClient);
2311
2311
  };
2312
+ /**
2313
+ * Connects an OpenAI Realtime agent to a call through Stream's `/video/connect_agent` proxy.
2314
+ *
2315
+ * @deprecated The OpenAI Realtime proxy is deprecated and will be removed in a
2316
+ * future major release. Build voice and video AI agents with Vision Agents
2317
+ * instead: https://visionagents.ai/integrations/llm/openai
2318
+ */
2312
2319
  connectOpenAi = async (options) => {
2313
2320
  let doCreateRealtimeClient;
2314
2321
  try {
@@ -4636,10 +4643,12 @@ var StreamModerationClient = class extends ModerationApi {};
4636
4643
  var StreamError = class extends Error {
4637
4644
  metadata;
4638
4645
  code;
4639
- constructor(message, metadata, code, errorOptions) {
4646
+ apiError;
4647
+ constructor(message, metadata, code, errorOptions, apiError) {
4640
4648
  super(message, errorOptions);
4641
4649
  this.metadata = metadata;
4642
4650
  this.code = code;
4651
+ this.apiError = apiError;
4643
4652
  }
4644
4653
  };
4645
4654
  //#endregion
@@ -4697,7 +4706,7 @@ var ApiClient = class {
4697
4706
  const headers = {
4698
4707
  Authorization: this.apiConfig.token,
4699
4708
  "stream-auth-type": "jwt",
4700
- "X-Stream-Client": "stream-node-0.9.0",
4709
+ "X-Stream-Client": "stream-node-0.9.1",
4701
4710
  "Accept-Encoding": "gzip",
4702
4711
  "x-client-request-id": clientRequestId
4703
4712
  };
@@ -4726,7 +4735,7 @@ var ApiClient = class {
4726
4735
  } catch {
4727
4736
  throw new StreamError(`Stream error: ${response.status} - ${response.statusText}`, metadata, response.status);
4728
4737
  }
4729
- throw new StreamError(`Stream error code ${error.code}: ${error.message}`, metadata, error.code, void 0);
4738
+ throw new StreamError(`Stream error code ${error.code}: ${error.message}`, metadata, error.code, void 0, error);
4730
4739
  }
4731
4740
  return {
4732
4741
  ...await response.json(),