@stream-io/node-sdk 0.9.1 → 0.9.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.2](https://github.com/GetStream/stream-node/compare/v0.9.1...v0.9.2) (2026-11-13)
4
+
5
+
6
+ ### Features
7
+
8
+ * regenerate OpenAPI clients from latest spec ([#392](https://github.com/GetStream/stream-node/issues/392)) ([315e419](https://github.com/GetStream/stream-node/commit/315e419fd043f8758bdb75b887395273d1a8e7d6))
9
+
3
10
  ## [0.9.1](https://github.com/GetStream/stream-node/compare/v0.9.0...v0.9.1) (2026-11-09)
4
11
 
5
12
 
package/dist/index.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region \0rolldown/runtime.js
2
+ // \0rolldown/runtime.js
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -20,14 +20,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
20
20
  value: mod,
21
21
  enumerable: true
22
22
  }) : target, mod));
23
- //#endregion
24
23
  let jsonwebtoken = require("jsonwebtoken");
25
24
  jsonwebtoken = __toESM(jsonwebtoken);
26
25
  let crypto = require("crypto");
27
26
  crypto = __toESM(crypto);
28
27
  let zlib = require("zlib");
29
28
  zlib = __toESM(zlib);
30
- //#region src/utils/create-token.ts
29
+ // src/utils/create-token.ts
31
30
  function JWTUserToken(apiSecret, payload) {
32
31
  if (jsonwebtoken.default?.sign == null) throw Error(`Unable to find jwt crypto, if you are getting this error is probably because you are trying to generate tokens on browser or React Native (or other environment where crypto functions are not available). Please Note: token should only be generated server-side.`);
33
32
  const opts = {
@@ -45,8 +44,7 @@ function JWTServerToken(apiSecret, jwtOptions = {}) {
45
44
  }, jwtOptions);
46
45
  return jsonwebtoken.default.sign(payload, apiSecret, opts);
47
46
  }
48
- //#endregion
49
- //#region src/utils/webhook.ts
47
+ // src/utils/webhook.ts
50
48
  /**
51
49
  * Canonical failure-mode messages for {@link InvalidWebhookError}.
52
50
  *
@@ -199,8 +197,7 @@ function parseSqs(messageBody) {
199
197
  function parseSns(notificationBody) {
200
198
  return parseEvent(decodeSnsPayload(notificationBody));
201
199
  }
202
- //#endregion
203
- //#region src/gen/model-decoders/decoders.ts
200
+ // src/gen/model-decoders/decoders.ts
204
201
  var decoders = {};
205
202
  var decodeDatetimeType = (input) => typeof input === "number" ? new Date(Math.floor(input / 1e6)) : new Date(input);
206
203
  decoders.DatetimeType = decodeDatetimeType;
@@ -245,8 +242,7 @@ decoders["GetApplicationResponse"] = (input) => {
245
242
  isSingle: true
246
243
  } }, input);
247
244
  };
248
- //#endregion
249
- //#region src/gen/common/CommonApi.ts
245
+ // src/gen/common/CommonApi.ts
250
246
  var CommonApi = class {
251
247
  apiClient;
252
248
  constructor(apiClient) {
@@ -309,6 +305,7 @@ var CommonApi = class {
309
305
  user_search_disallowed_roles: request?.user_search_disallowed_roles,
310
306
  webhook_events: request?.webhook_events,
311
307
  activity_metrics_config: request?.activity_metrics_config,
308
+ agent_review: request?.agent_review,
312
309
  apn_config: request?.apn_config,
313
310
  async_moderation_config: request?.async_moderation_config,
314
311
  datadog_info: request?.datadog_info,
@@ -534,8 +531,12 @@ var CommonApi = class {
534
531
  decoders["CreateImportURLResponse"]?.(response);
535
532
  return response;
536
533
  }
537
- async listImports() {
538
- const response = await this.apiClient.sendRequest("GET", "/api/v2/imports", void 0, void 0);
534
+ async listImports(request) {
535
+ const queryParams = {
536
+ limit: request?.limit,
537
+ offset: request?.offset
538
+ };
539
+ const response = await this.apiClient.sendRequest("GET", "/api/v2/imports", void 0, queryParams);
539
540
  decoders["ListImportsResponse"]?.(response);
540
541
  return response;
541
542
  }
@@ -1166,8 +1167,7 @@ var CommonApi = class {
1166
1167
  return response;
1167
1168
  }
1168
1169
  };
1169
- //#endregion
1170
- //#region src/gen/video/VideoApi.ts
1170
+ // src/gen/video/VideoApi.ts
1171
1171
  var VideoApi = class {
1172
1172
  apiClient;
1173
1173
  constructor(apiClient) {
@@ -1997,8 +1997,7 @@ var VideoApi = class {
1997
1997
  return response;
1998
1998
  }
1999
1999
  };
2000
- //#endregion
2001
- //#region src/gen/video/CallApi.ts
2000
+ // src/gen/video/CallApi.ts
2002
2001
  var CallApi = class {
2003
2002
  videoApi;
2004
2003
  type;
@@ -2282,8 +2281,7 @@ var CallApi = class {
2282
2281
  });
2283
2282
  }
2284
2283
  };
2285
- //#endregion
2286
- //#region src/StreamCall.ts
2284
+ // src/StreamCall.ts
2287
2285
  var StreamCall = class extends CallApi {
2288
2286
  type;
2289
2287
  id;
@@ -2324,8 +2322,7 @@ var StreamCall = class extends CallApi {
2324
2322
  return { address: this.data.ingress.srt.address.replace("{passphrase}", segments[2]).replace("{token}", token) };
2325
2323
  };
2326
2324
  };
2327
- //#endregion
2328
- //#region src/StreamVideoClient.ts
2325
+ // src/StreamVideoClient.ts
2329
2326
  var StreamVideoClient = class extends VideoApi {
2330
2327
  streamClient;
2331
2328
  constructor({ streamClient, apiClient }) {
@@ -2367,8 +2364,7 @@ var StreamVideoClient = class extends VideoApi {
2367
2364
  return realtimeClient;
2368
2365
  };
2369
2366
  };
2370
- //#endregion
2371
- //#region src/gen/chat/ChatApi.ts
2367
+ // src/gen/chat/ChatApi.ts
2372
2368
  var ChatApi = class {
2373
2369
  apiClient;
2374
2370
  constructor(apiClient) {
@@ -2591,6 +2587,7 @@ var ChatApi = class {
2591
2587
  messages_id_gt: request?.messages_id_gt,
2592
2588
  messages_id_gte: request?.messages_id_gte,
2593
2589
  messages_id_around: request?.messages_id_around,
2590
+ include_soft_deleted_channel: request?.include_soft_deleted_channel,
2594
2591
  user_id: request?.user_id
2595
2592
  };
2596
2593
  const pathParams = {
@@ -3554,6 +3551,17 @@ var ChatApi = class {
3554
3551
  decoders["SearchResponse"]?.(response);
3555
3552
  return response;
3556
3553
  }
3554
+ async searchAll(request) {
3555
+ const body = {
3556
+ limit: request?.limit,
3557
+ query: request?.query,
3558
+ entities: request?.entities,
3559
+ next: request?.next
3560
+ };
3561
+ const response = await this.apiClient.sendRequest("POST", "/api/v2/chat/search/all", void 0, void 0, body);
3562
+ decoders["SearchAllResponse"]?.(response);
3563
+ return response;
3564
+ }
3557
3565
  async createSegment(request) {
3558
3566
  const body = {
3559
3567
  type: request?.type,
@@ -3715,8 +3723,7 @@ var ChatApi = class {
3715
3723
  return response;
3716
3724
  }
3717
3725
  };
3718
- //#endregion
3719
- //#region src/gen/chat/ChannelApi.ts
3726
+ // src/gen/chat/ChannelApi.ts
3720
3727
  var ChannelApi = class {
3721
3728
  chatApi;
3722
3729
  type;
@@ -3927,8 +3934,7 @@ var ChannelApi = class {
3927
3934
  });
3928
3935
  }
3929
3936
  };
3930
- //#endregion
3931
- //#region src/StreamChannel.ts
3937
+ // src/StreamChannel.ts
3932
3938
  var StreamChannel = class extends ChannelApi {
3933
3939
  get cid() {
3934
3940
  return `${this.type}:${this.id}`;
@@ -3961,8 +3967,7 @@ var StreamChannel = class extends ChannelApi {
3961
3967
  return super.uploadChannelImage(request);
3962
3968
  };
3963
3969
  };
3964
- //#endregion
3965
- //#region src/StreamChatClient.ts
3970
+ // src/StreamChatClient.ts
3966
3971
  var StreamChatClient = class extends ChatApi {
3967
3972
  channel = (type, id) => {
3968
3973
  return new StreamChannel(this, type, id);
@@ -3974,8 +3979,7 @@ var StreamChatClient = class extends ChatApi {
3974
3979
  return super.uploadChannelImage(request);
3975
3980
  };
3976
3981
  };
3977
- //#endregion
3978
- //#region src/gen/moderation/ModerationApi.ts
3982
+ // src/gen/moderation/ModerationApi.ts
3979
3983
  var ModerationApi = class {
3980
3984
  apiClient;
3981
3985
  constructor(apiClient) {
@@ -4052,6 +4056,33 @@ var ModerationApi = class {
4052
4056
  decoders["InsertActionLogResponse"]?.(response);
4053
4057
  return response;
4054
4058
  }
4059
+ async listAgentFeedback(request) {
4060
+ const queryParams = {
4061
+ limit: request?.limit,
4062
+ next: request?.next
4063
+ };
4064
+ const response = await this.apiClient.sendRequest("GET", "/api/v2/moderation/agent_feedback", void 0, queryParams);
4065
+ decoders["ListAgentFeedbackResponse"]?.(response);
4066
+ return response;
4067
+ }
4068
+ async submitAgentFeedback(request) {
4069
+ const body = {
4070
+ item_id: request?.item_id,
4071
+ moderator_action: request?.moderator_action,
4072
+ improvement: request?.improvement,
4073
+ reason: request?.reason,
4074
+ user_id: request?.user_id,
4075
+ user: request?.user
4076
+ };
4077
+ const response = await this.apiClient.sendRequest("POST", "/api/v2/moderation/agent_feedback", void 0, void 0, body);
4078
+ decoders["SubmitAgentFeedbackResponse"]?.(response);
4079
+ return response;
4080
+ }
4081
+ async getAgentReviewStatus() {
4082
+ const response = await this.apiClient.sendRequest("GET", "/api/v2/moderation/agent_review_status", void 0, void 0);
4083
+ decoders["GetAgentReviewStatusResponse"]?.(response);
4084
+ return response;
4085
+ }
4055
4086
  async analyze(request) {
4056
4087
  const body = {
4057
4088
  async_response: request?.async_response,
@@ -4213,6 +4244,37 @@ var ModerationApi = class {
4213
4244
  decoders["UpsertConfigResponse"]?.(response);
4214
4245
  return response;
4215
4246
  }
4247
+ async saveConfigVersion(request) {
4248
+ const body = {
4249
+ base_version: request?.base_version,
4250
+ key: request?.key,
4251
+ async: request?.async,
4252
+ team: request?.team,
4253
+ user_id: request?.user_id,
4254
+ ai_audio_config: request?.ai_audio_config,
4255
+ ai_image_config: request?.ai_image_config,
4256
+ ai_text_config: request?.ai_text_config,
4257
+ ai_video_config: request?.ai_video_config,
4258
+ automod_platform_circumvention_config: request?.automod_platform_circumvention_config,
4259
+ automod_semantic_filters_config: request?.automod_semantic_filters_config,
4260
+ automod_toxicity_config: request?.automod_toxicity_config,
4261
+ aws_rekognition_config: request?.aws_rekognition_config,
4262
+ block_list_config: request?.block_list_config,
4263
+ bodyguard_config: request?.bodyguard_config,
4264
+ engine: request?.engine,
4265
+ flood_config: request?.flood_config,
4266
+ google_vision_config: request?.google_vision_config,
4267
+ intent_config: request?.intent_config,
4268
+ llm_config: request?.llm_config,
4269
+ rule_builder_config: request?.rule_builder_config,
4270
+ user: request?.user,
4271
+ velocity_filter_config: request?.velocity_filter_config,
4272
+ video_call_rule_config: request?.video_call_rule_config
4273
+ };
4274
+ const response = await this.apiClient.sendRequest("POST", "/api/v2/moderation/config/versions", void 0, void 0, body);
4275
+ decoders["SaveConfigVersionResponse"]?.(response);
4276
+ return response;
4277
+ }
4216
4278
  async deleteConfig(request) {
4217
4279
  const queryParams = {
4218
4280
  team: request?.team,
@@ -4230,6 +4292,37 @@ var ModerationApi = class {
4230
4292
  decoders["GetConfigResponse"]?.(response);
4231
4293
  return response;
4232
4294
  }
4295
+ async listConfigVersions(request) {
4296
+ const queryParams = { team: request?.team };
4297
+ const pathParams = { key: request?.key };
4298
+ const response = await this.apiClient.sendRequest("GET", "/api/v2/moderation/config/{key}/versions", pathParams, queryParams);
4299
+ decoders["ListConfigVersionsResponse"]?.(response);
4300
+ return response;
4301
+ }
4302
+ async getConfigVersion(request) {
4303
+ const queryParams = { team: request?.team };
4304
+ const pathParams = {
4305
+ key: request?.key,
4306
+ version: request?.version
4307
+ };
4308
+ const response = await this.apiClient.sendRequest("GET", "/api/v2/moderation/config/{key}/versions/{version}", pathParams, queryParams);
4309
+ decoders["GetConfigVersionResponse"]?.(response);
4310
+ return response;
4311
+ }
4312
+ async publishConfigVersion(request) {
4313
+ const pathParams = {
4314
+ key: request?.key,
4315
+ version: request?.version
4316
+ };
4317
+ const body = {
4318
+ team: request?.team,
4319
+ user_id: request?.user_id,
4320
+ user: request?.user
4321
+ };
4322
+ const response = await this.apiClient.sendRequest("POST", "/api/v2/moderation/config/{key}/versions/{version}/publish", pathParams, void 0, body);
4323
+ decoders["PublishConfigVersionResponse"]?.(response);
4324
+ return response;
4325
+ }
4233
4326
  async queryModerationConfigs(request) {
4234
4327
  const body = {
4235
4328
  limit: request?.limit,
@@ -4556,6 +4649,16 @@ var ModerationApi = class {
4556
4649
  decoders["QueryReviewQueueResponse"]?.(response);
4557
4650
  return response;
4558
4651
  }
4652
+ async countReviewQueue(request) {
4653
+ const body = {
4654
+ user_id: request?.user_id,
4655
+ filter: request?.filter,
4656
+ user: request?.user
4657
+ };
4658
+ const response = await this.apiClient.sendRequest("POST", "/api/v2/moderation/review_queue/count", void 0, void 0, body);
4659
+ decoders["CountReviewQueueResponse"]?.(response);
4660
+ return response;
4661
+ }
4559
4662
  async getReviewQueueItem(request) {
4560
4663
  const pathParams = { id: request?.id };
4561
4664
  const response = await this.apiClient.sendRequest("GET", "/api/v2/moderation/review_queue/{id}", pathParams, void 0);
@@ -4583,6 +4686,7 @@ var ModerationApi = class {
4583
4686
  appeal_id: request?.appeal_id,
4584
4687
  item_id: request?.item_id,
4585
4688
  user_id: request?.user_id,
4689
+ agent_recommendation: request?.agent_recommendation,
4586
4690
  ban: request?.ban,
4587
4691
  block: request?.block,
4588
4692
  bypass: request?.bypass,
@@ -4640,7 +4744,8 @@ var ModerationApi = class {
4640
4744
  const queryParams = {
4641
4745
  target_user_id: request?.target_user_id,
4642
4746
  channel_cid: request?.channel_cid,
4643
- created_by: request?.created_by
4747
+ created_by: request?.created_by,
4748
+ remove_future_channels_ban: request?.remove_future_channels_ban
4644
4749
  };
4645
4750
  const body = {
4646
4751
  unbanned_by_id: request?.unbanned_by_id,
@@ -4661,11 +4766,9 @@ var ModerationApi = class {
4661
4766
  return response;
4662
4767
  }
4663
4768
  };
4664
- //#endregion
4665
- //#region src/StreamModerationClient.ts
4769
+ // src/StreamModerationClient.ts
4666
4770
  var StreamModerationClient = class extends ModerationApi {};
4667
- //#endregion
4668
- //#region src/types.ts
4771
+ // src/types.ts
4669
4772
  var StreamError = class extends Error {
4670
4773
  metadata;
4671
4774
  code;
@@ -4677,8 +4780,7 @@ var StreamError = class extends Error {
4677
4780
  this.apiError = apiError;
4678
4781
  }
4679
4782
  };
4680
- //#endregion
4681
- //#region src/utils/rate-limit.ts
4783
+ // src/utils/rate-limit.ts
4682
4784
  var getRateLimitFromResponseHeader = (responseHeaders) => {
4683
4785
  return {
4684
4786
  rateLimit: responseHeaders.has("x-ratelimit-limit") ? +responseHeaders.get("x-ratelimit-limit") : void 0,
@@ -4686,8 +4788,7 @@ var getRateLimitFromResponseHeader = (responseHeaders) => {
4686
4788
  rateLimitReset: responseHeaders.has("x-ratelimit-reset") ? /* @__PURE__ */ new Date(+responseHeaders.get("x-ratelimit-reset") * 1e3) : void 0
4687
4789
  };
4688
4790
  };
4689
- //#endregion
4690
- //#region src/utils/query-params.ts
4791
+ // src/utils/query-params.ts
4691
4792
  var isScalar = (value) => {
4692
4793
  const type = typeof value;
4693
4794
  return type === "string" || type === "number" || type === "boolean";
@@ -4707,8 +4808,7 @@ var stringifyArrayParam = (param) => {
4707
4808
  }
4708
4809
  return allScalar ? entries.join(",") : JSON.stringify(entries);
4709
4810
  };
4710
- //#endregion
4711
- //#region src/ApiClient.ts
4811
+ // src/ApiClient.ts
4712
4812
  var ApiClient = class {
4713
4813
  apiConfig;
4714
4814
  dispatcher;
@@ -4725,14 +4825,14 @@ var ApiClient = class {
4725
4825
  queryParams.api_key = this.apiConfig.apiKey;
4726
4826
  const encodedParams = this.queryParamsStringify(queryParams);
4727
4827
  if (pathParams) Object.keys(pathParams).forEach((paramName) => {
4728
- url = url.replace(`{${paramName}}`, pathParams[paramName]);
4828
+ url = url.replace(`{${paramName}}`, encodeURIComponent(pathParams[paramName]));
4729
4829
  });
4730
4830
  url += `?${encodedParams}`;
4731
4831
  const clientRequestId = (0, crypto.randomUUID)();
4732
4832
  const headers = {
4733
4833
  Authorization: this.apiConfig.token,
4734
4834
  "stream-auth-type": "jwt",
4735
- "X-Stream-Client": "stream-node-0.9.1",
4835
+ "X-Stream-Client": "stream-node-0.9.2",
4736
4836
  "Accept-Encoding": "gzip",
4737
4837
  "x-client-request-id": clientRequestId
4738
4838
  };
@@ -4801,8 +4901,7 @@ var ApiClient = class {
4801
4901
  return newParams.join("&");
4802
4902
  };
4803
4903
  };
4804
- //#endregion
4805
- //#region src/gen/feeds/FeedsApi.ts
4904
+ // src/gen/feeds/FeedsApi.ts
4806
4905
  var FeedsApi = class {
4807
4906
  apiClient;
4808
4907
  constructor(apiClient) {
@@ -5076,7 +5175,8 @@ var FeedsApi = class {
5076
5175
  translate_text: request?.translate_text,
5077
5176
  include_top_level_comment_count: request?.include_top_level_comment_count,
5078
5177
  include_soft_deleted_activities: request?.include_soft_deleted_activities,
5079
- include_moderated_activities: request?.include_moderated_activities
5178
+ include_moderated_activities: request?.include_moderated_activities,
5179
+ skip_viewer_visibility: request?.skip_viewer_visibility
5080
5180
  };
5081
5181
  const pathParams = { id: request?.id };
5082
5182
  const response = await this.apiClient.sendRequest("GET", "/api/v2/feeds/activities/{id}", pathParams, queryParams);
@@ -6303,8 +6403,7 @@ var FeedsApi = class {
6303
6403
  return response;
6304
6404
  }
6305
6405
  };
6306
- //#endregion
6307
- //#region src/gen/feeds/FeedApi.ts
6406
+ // src/gen/feeds/FeedApi.ts
6308
6407
  var FeedApi = class {
6309
6408
  feedsApi;
6310
6409
  group;
@@ -6412,15 +6511,13 @@ var FeedApi = class {
6412
6511
  });
6413
6512
  }
6414
6513
  };
6415
- //#endregion
6416
- //#region src/StreamFeed.ts
6514
+ // src/StreamFeed.ts
6417
6515
  var StreamFeed = class extends FeedApi {
6418
6516
  get feed() {
6419
6517
  return `${this.group}:${this.id}`;
6420
6518
  }
6421
6519
  };
6422
- //#endregion
6423
- //#region src/StreamFeedsClient.ts
6520
+ // src/StreamFeedsClient.ts
6424
6521
  var StreamFeedsClient = class extends FeedsApi {
6425
6522
  feed = (group, id) => {
6426
6523
  return new StreamFeed(this, group, id);
@@ -6447,8 +6544,7 @@ var StreamFeedsClient = class extends FeedsApi {
6447
6544
  return super.unfollowBatch(request);
6448
6545
  };
6449
6546
  };
6450
- //#endregion
6451
- //#region src/StreamClient.ts
6547
+ // src/StreamClient.ts
6452
6548
  var StreamClient = class StreamClient extends CommonApi {
6453
6549
  apiKey;
6454
6550
  secret;
@@ -6645,8 +6741,7 @@ var StreamClient = class StreamClient extends CommonApi {
6645
6741
  */
6646
6742
  parseSns = (notificationBody) => parseSns(notificationBody);
6647
6743
  };
6648
- //#endregion
6649
- //#region src/gen/models/index.ts
6744
+ // src/gen/models/index.ts
6650
6745
  var ChannelOwnCapability = {
6651
6746
  BAN_CHANNEL_MEMBERS: "ban-channel-members",
6652
6747
  CAST_POLL_VOTE: "cast-poll-vote",
@@ -6761,8 +6856,7 @@ var OwnCapability = {
6761
6856
  UPDATE_CALL_PERMISSIONS: "update-call-permissions",
6762
6857
  UPDATE_CALL_SETTINGS: "update-call-settings"
6763
6858
  };
6764
- //#endregion
6765
- //#region src/utils/time.ts
6859
+ // src/utils/time.ts
6766
6860
  /**
6767
6861
  * Unit conversions between the API's timestamps and JavaScript's.
6768
6862
  *
@@ -6837,7 +6931,6 @@ var convertTimestampToDate = (timestamp) => {
6837
6931
  if (timestamp == null || !Number.isFinite(timestamp)) return void 0;
6838
6932
  return nsToDate(timestamp);
6839
6933
  };
6840
- //#endregion
6841
6934
  exports.ChannelOwnCapability = ChannelOwnCapability;
6842
6935
  exports.FeedOwnCapability = FeedOwnCapability;
6843
6936
  exports.InvalidWebhookError = InvalidWebhookError;