@stream-io/node-sdk 0.6.0 → 0.6.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/dist/index.cjs.js CHANGED
@@ -888,6 +888,7 @@ decoders.Channel = (input) => {
888
888
  updated_at: { type: 'DatetimeType', isSingle: true },
889
889
  deleted_at: { type: 'DatetimeType', isSingle: true },
890
890
  last_message_at: { type: 'DatetimeType', isSingle: true },
891
+ message_count_updated_at: { type: 'DatetimeType', isSingle: true },
891
892
  active_live_locations: { type: 'SharedLocation', isSingle: false },
892
893
  invites: { type: 'ChannelMember', isSingle: false },
893
894
  members: { type: 'ChannelMember', isSingle: false },
@@ -1466,6 +1467,7 @@ decoders.FeedMemberResponse = (input) => {
1466
1467
  user: { type: 'UserResponse', isSingle: true },
1467
1468
  invite_accepted_at: { type: 'DatetimeType', isSingle: true },
1468
1469
  invite_rejected_at: { type: 'DatetimeType', isSingle: true },
1470
+ membership_level: { type: 'MembershipLevelResponse', isSingle: true },
1469
1471
  };
1470
1472
  return decode(typeMappings, input);
1471
1473
  };
@@ -1823,6 +1825,14 @@ decoders.ImportTaskHistory = (input) => {
1823
1825
  };
1824
1826
  return decode(typeMappings, input);
1825
1827
  };
1828
+ decoders.KickedUserEvent = (input) => {
1829
+ const typeMappings = {
1830
+ created_at: { type: 'DatetimeType', isSingle: true },
1831
+ user: { type: 'UserResponse', isSingle: true },
1832
+ kicked_by_user: { type: 'UserResponse', isSingle: true },
1833
+ };
1834
+ return decode(typeMappings, input);
1835
+ };
1826
1836
  decoders.ListBlockListResponse = (input) => {
1827
1837
  const typeMappings = {
1828
1838
  blocklists: { type: 'BlockListResponse', isSingle: false },
@@ -3386,6 +3396,7 @@ class CommonApi {
3386
3396
  feeds_v2_region: request?.feeds_v2_region,
3387
3397
  guest_user_creation_disabled: request?.guest_user_creation_disabled,
3388
3398
  image_moderation_enabled: request?.image_moderation_enabled,
3399
+ max_aggregated_activities_length: request?.max_aggregated_activities_length,
3389
3400
  migrate_permissions_to_v2: request?.migrate_permissions_to_v2,
3390
3401
  moderation_enabled: request?.moderation_enabled,
3391
3402
  moderation_webhook_url: request?.moderation_webhook_url,
@@ -4243,6 +4254,21 @@ class VideoApi {
4243
4254
  decoders.GoLiveResponse?.(response.body);
4244
4255
  return { ...response.body, metadata: response.metadata };
4245
4256
  }
4257
+ async kickUser(request) {
4258
+ const pathParams = {
4259
+ type: request?.type,
4260
+ id: request?.id,
4261
+ };
4262
+ const body = {
4263
+ user_id: request?.user_id,
4264
+ block: request?.block,
4265
+ kicked_by_id: request?.kicked_by_id,
4266
+ kicked_by: request?.kicked_by,
4267
+ };
4268
+ const response = await this.apiClient.sendRequest('POST', '/api/v2/video/call/{type}/{id}/kick', pathParams, undefined, body, 'application/json');
4269
+ decoders.KickUserResponse?.(response.body);
4270
+ return { ...response.body, metadata: response.metadata };
4271
+ }
4246
4272
  async endCall(request) {
4247
4273
  const pathParams = {
4248
4274
  type: request?.type,
@@ -4693,6 +4719,9 @@ class CallApi {
4693
4719
  goLive(request) {
4694
4720
  return this.videoApi.goLive({ id: this.id, type: this.type, ...request });
4695
4721
  }
4722
+ kickUser(request) {
4723
+ return this.videoApi.kickUser({ id: this.id, type: this.type, ...request });
4724
+ }
4696
4725
  end() {
4697
4726
  return this.videoApi.endCall({ id: this.id, type: this.type });
4698
4727
  }
@@ -5354,6 +5383,7 @@ class ChatApi {
5354
5383
  blocklist: request?.blocklist,
5355
5384
  blocklist_behavior: request?.blocklist_behavior,
5356
5385
  connect_events: request?.connect_events,
5386
+ count_messages: request?.count_messages,
5357
5387
  custom_events: request?.custom_events,
5358
5388
  mark_messages_pending: request?.mark_messages_pending,
5359
5389
  mutes: request?.mutes,
@@ -5480,6 +5510,7 @@ class ChatApi {
5480
5510
  const queryParams = {
5481
5511
  hard: request?.hard,
5482
5512
  deleted_by: request?.deleted_by,
5513
+ delete_for_me: request?.delete_for_me,
5483
5514
  };
5484
5515
  const pathParams = {
5485
5516
  id: request?.id,
@@ -6230,6 +6261,7 @@ class ModerationApi {
6230
6261
  block_list_config: request?.block_list_config,
6231
6262
  bodyguard_config: request?.bodyguard_config,
6232
6263
  google_vision_config: request?.google_vision_config,
6264
+ llm_config: request?.llm_config,
6233
6265
  rule_builder_config: request?.rule_builder_config,
6234
6266
  user: request?.user,
6235
6267
  velocity_filter_config: request?.velocity_filter_config,
@@ -6481,7 +6513,7 @@ class ApiClient {
6481
6513
  const headers = {
6482
6514
  Authorization: this.apiConfig.token,
6483
6515
  'stream-auth-type': 'jwt',
6484
- 'X-Stream-Client': 'stream-node-' + "0.6.0",
6516
+ 'X-Stream-Client': 'stream-node-' + "0.6.2",
6485
6517
  'Accept-Encoding': 'gzip',
6486
6518
  'x-client-request-id': clientRequestId,
6487
6519
  };
@@ -7801,6 +7833,7 @@ const OwnCapability = {
7801
7833
  JOIN_BACKSTAGE: 'join-backstage',
7802
7834
  JOIN_CALL: 'join-call',
7803
7835
  JOIN_ENDED_CALL: 'join-ended-call',
7836
+ KICK_USER: 'kick-user',
7804
7837
  MUTE_USERS: 'mute-users',
7805
7838
  PIN_FOR_EVERYONE: 'pin-for-everyone',
7806
7839
  READ_CALL: 'read-call',