@stream-io/node-sdk 0.7.2 → 0.7.4

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.
@@ -14,7 +14,7 @@ export declare class StreamCall extends CallApi {
14
14
  queryMembers: (request?: OmitTypeId<QueryCallMembersRequest>) => Promise<import("./types").StreamResponse<import("./gen/models").QueryCallMembersResponse>>;
15
15
  getOrCreate: (request?: GetOrCreateCallRequest) => Promise<import("./types").StreamResponse<import("./gen/models").GetOrCreateCallResponse>>;
16
16
  get: () => Promise<import("./types").StreamResponse<import("./gen/models").GetCallResponse>>;
17
- createSRTCredetials: (userID: string) => {
17
+ createSRTCredentials: (userID: string) => {
18
18
  address: string;
19
19
  };
20
20
  }
@@ -322,6 +322,7 @@ export interface ActivityResponse {
322
322
  edited_at?: Date;
323
323
  expires_at?: Date;
324
324
  hidden?: boolean;
325
+ is_watched?: boolean;
325
326
  text?: string;
326
327
  visibility_tag?: string;
327
328
  current_feed?: FeedResponse;
@@ -332,13 +333,6 @@ export interface ActivityResponse {
332
333
  poll?: PollResponseData;
333
334
  }
334
335
  export interface ActivitySelectorConfig {
335
- cutoff_time?: string;
336
- min_popularity?: number;
337
- type?: string;
338
- sort?: SortParam[];
339
- filter?: Record<string, any>;
340
- }
341
- export interface ActivitySelectorConfigResponse {
342
336
  cutoff_time?: Date;
343
337
  min_popularity?: number;
344
338
  type?: string;
@@ -463,6 +457,7 @@ export interface AggregatedActivityResponse {
463
457
  updated_at: Date;
464
458
  user_count: number;
465
459
  user_count_truncated: boolean;
460
+ is_watched?: boolean;
466
461
  activities: ActivityResponse[];
467
462
  }
468
463
  export interface AggregationConfig {
@@ -611,11 +606,13 @@ export interface AudioSettings {
611
606
  opus_dtx_enabled: boolean;
612
607
  redundant_coding_enabled: boolean;
613
608
  speaker_default_on: boolean;
609
+ hifi_audio_enabled?: boolean;
614
610
  noise_cancellation?: NoiseCancellationSettings;
615
611
  }
616
612
  export interface AudioSettingsRequest {
617
613
  default_device: 'speaker' | 'earpiece';
618
614
  access_request_enabled?: boolean;
615
+ hifi_audio_enabled?: boolean;
619
616
  mic_default_on?: boolean;
620
617
  opus_dtx_enabled?: boolean;
621
618
  redundant_coding_enabled?: boolean;
@@ -629,6 +626,7 @@ export interface AudioSettingsResponse {
629
626
  opus_dtx_enabled: boolean;
630
627
  redundant_coding_enabled: boolean;
631
628
  speaker_default_on: boolean;
629
+ hifi_audio_enabled?: boolean;
632
630
  noise_cancellation?: NoiseCancellationSettings;
633
631
  }
634
632
  export interface AutomodDetails {
@@ -2332,6 +2330,7 @@ export interface CreateFeedGroupRequest {
2332
2330
  notification?: NotificationConfig;
2333
2331
  push_notification?: PushNotificationConfig;
2334
2332
  ranking?: RankingConfig;
2333
+ stories?: StoriesConfig;
2335
2334
  }
2336
2335
  export interface CreateFeedGroupResponse {
2337
2336
  duration: string;
@@ -2998,7 +2997,7 @@ export interface FeedGroupResponse {
2998
2997
  updated_at: Date;
2999
2998
  default_visibility?: string;
3000
2999
  activity_processors?: ActivityProcessorConfig[];
3001
- activity_selectors?: ActivitySelectorConfigResponse[];
3000
+ activity_selectors?: ActivitySelectorConfig[];
3002
3001
  aggregation?: AggregationConfig;
3003
3002
  custom?: Record<string, any>;
3004
3003
  notification?: NotificationConfig;
@@ -3140,7 +3139,7 @@ export interface FeedViewResponse {
3140
3139
  id: string;
3141
3140
  last_used_at?: Date;
3142
3141
  activity_processors?: ActivityProcessorConfig[];
3143
- activity_selectors?: ActivitySelectorConfigResponse[];
3142
+ activity_selectors?: ActivitySelectorConfig[];
3144
3143
  aggregation?: AggregationConfig;
3145
3144
  ranking?: RankingConfig;
3146
3145
  }
@@ -3209,20 +3208,18 @@ export interface FirebaseConfigFields {
3209
3208
  }
3210
3209
  export interface Flag {
3211
3210
  created_at: Date;
3212
- entity_id: string;
3213
- entity_type: string;
3211
+ created_by_automod: boolean;
3214
3212
  updated_at: Date;
3215
- result: Array<Record<string, any>>;
3216
- entity_creator_id?: string;
3217
- is_streamed_content?: boolean;
3218
- moderation_payload_hash?: string;
3213
+ approved_at?: Date;
3219
3214
  reason?: string;
3220
- review_queue_item_id?: string;
3221
- type?: string;
3222
- labels?: string[];
3215
+ rejected_at?: Date;
3216
+ reviewed_at?: Date;
3217
+ reviewed_by?: string;
3218
+ target_message_id?: string;
3223
3219
  custom?: Record<string, any>;
3224
- moderation_payload?: ModerationPayload;
3225
- review_queue_item?: ReviewQueueItem;
3220
+ details?: FlagDetails;
3221
+ target_message?: Message;
3222
+ target_user?: User;
3226
3223
  user?: User;
3227
3224
  }
3228
3225
  export interface FlagDetails {
@@ -5687,8 +5684,8 @@ export interface RTMPSettingsResponse {
5687
5684
  layout: LayoutSettingsResponse;
5688
5685
  }
5689
5686
  export interface RankingConfig {
5687
+ type: 'recency' | 'expression' | 'interest';
5690
5688
  score?: string;
5691
- type?: string;
5692
5689
  defaults?: Record<string, any>;
5693
5690
  functions?: Record<string, DecayFunctionConfig>;
5694
5691
  }
@@ -6083,6 +6080,16 @@ export interface SFUIDLastSeen {
6083
6080
  export interface SRTIngress {
6084
6081
  address: string;
6085
6082
  }
6083
+ export interface StoriesFeedUpdatedEvent {
6084
+ created_at: Date;
6085
+ fid: string;
6086
+ custom: Record<string, any>;
6087
+ type: string;
6088
+ feed_visibility?: string;
6089
+ received_at?: Date;
6090
+ aggregated_activities?: AggregatedActivityResponse[];
6091
+ user?: UserResponseCommonFields;
6092
+ }
6086
6093
  export interface STTEgressConfig {
6087
6094
  closed_captions_enabled?: boolean;
6088
6095
  language?: string;
@@ -6446,8 +6453,8 @@ export interface StopTranscriptionResponse {
6446
6453
  duration: string;
6447
6454
  }
6448
6455
  export interface StoriesConfig {
6449
- expiration_behaviour?: string;
6450
6456
  skip_watched?: boolean;
6457
+ track_watched?: boolean;
6451
6458
  }
6452
6459
  export interface SubmitActionRequest {
6453
6460
  action_type: 'mark_reviewed' | 'delete_message' | 'delete_activity' | 'delete_reaction' | 'ban' | 'custom' | 'unban' | 'restore' | 'delete_user' | 'unblock' | 'shadow_block' | 'unmask' | 'kick_user' | 'end_call';
@@ -7888,6 +7895,8 @@ export type WebhookEvent = ({
7888
7895
  } & FollowUpdatedEvent) | ({
7889
7896
  type: 'feeds.notification_feed.updated';
7890
7897
  } & NotificationFeedUpdatedEvent) | ({
7898
+ type: 'feeds.stories_feed.updated';
7899
+ } & StoriesFeedUpdatedEvent) | ({
7891
7900
  type: 'flag.updated';
7892
7901
  } & FlagUpdatedEvent) | ({
7893
7902
  type: 'member.added';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/node-sdk",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {
package/src/StreamCall.ts CHANGED
@@ -46,7 +46,7 @@ export class StreamCall extends CallApi {
46
46
  return response;
47
47
  };
48
48
 
49
- createSRTCredetials = (
49
+ createSRTCredentials = (
50
50
  userID: string,
51
51
  ): {
52
52
  address: string;
@@ -225,13 +225,6 @@ decoders.ActivityResponse = (input?: Record<string, any>) => {
225
225
  };
226
226
 
227
227
  decoders.ActivitySelectorConfig = (input?: Record<string, any>) => {
228
- const typeMappings: TypeMapping = {
229
- cutoff_time: { type: 'StringType', isSingle: true },
230
- };
231
- return decode(typeMappings, input);
232
- };
233
-
234
- decoders.ActivitySelectorConfigResponse = (input?: Record<string, any>) => {
235
228
  const typeMappings: TypeMapping = {
236
229
  cutoff_time: { type: 'DatetimeType', isSingle: true },
237
230
  };
@@ -1910,10 +1903,7 @@ decoders.FeedGroupResponse = (input?: Record<string, any>) => {
1910
1903
 
1911
1904
  updated_at: { type: 'DatetimeType', isSingle: true },
1912
1905
 
1913
- activity_selectors: {
1914
- type: 'ActivitySelectorConfigResponse',
1915
- isSingle: false,
1916
- },
1906
+ activity_selectors: { type: 'ActivitySelectorConfig', isSingle: false },
1917
1907
  };
1918
1908
  return decode(typeMappings, input);
1919
1909
  };
@@ -2006,10 +1996,7 @@ decoders.FeedViewResponse = (input?: Record<string, any>) => {
2006
1996
  const typeMappings: TypeMapping = {
2007
1997
  last_used_at: { type: 'DatetimeType', isSingle: true },
2008
1998
 
2009
- activity_selectors: {
2010
- type: 'ActivitySelectorConfigResponse',
2011
- isSingle: false,
2012
- },
1999
+ activity_selectors: { type: 'ActivitySelectorConfig', isSingle: false },
2013
2000
  };
2014
2001
  return decode(typeMappings, input);
2015
2002
  };
@@ -3880,6 +3867,22 @@ decoders.StopLiveResponse = (input?: Record<string, any>) => {
3880
3867
  return decode(typeMappings, input);
3881
3868
  };
3882
3869
 
3870
+ decoders.StoriesFeedUpdatedEvent = (input?: Record<string, any>) => {
3871
+ const typeMappings: TypeMapping = {
3872
+ created_at: { type: 'DatetimeType', isSingle: true },
3873
+
3874
+ received_at: { type: 'DatetimeType', isSingle: true },
3875
+
3876
+ aggregated_activities: {
3877
+ type: 'AggregatedActivityResponse',
3878
+ isSingle: false,
3879
+ },
3880
+
3881
+ user: { type: 'UserResponseCommonFields', isSingle: true },
3882
+ };
3883
+ return decode(typeMappings, input);
3884
+ };
3885
+
3883
3886
  decoders.SubmitActionResponse = (input?: Record<string, any>) => {
3884
3887
  const typeMappings: TypeMapping = {
3885
3888
  item: { type: 'ReviewQueueItemResponse', isSingle: true },
@@ -577,6 +577,8 @@ export interface ActivityResponse {
577
577
 
578
578
  hidden?: boolean;
579
579
 
580
+ is_watched?: boolean;
581
+
580
582
  text?: string;
581
583
 
582
584
  visibility_tag?: string;
@@ -595,18 +597,6 @@ export interface ActivityResponse {
595
597
  }
596
598
 
597
599
  export interface ActivitySelectorConfig {
598
- cutoff_time?: string;
599
-
600
- min_popularity?: number;
601
-
602
- type?: string;
603
-
604
- sort?: SortParam[];
605
-
606
- filter?: Record<string, any>;
607
- }
608
-
609
- export interface ActivitySelectorConfigResponse {
610
600
  cutoff_time?: Date;
611
601
 
612
602
  min_popularity?: number;
@@ -823,6 +813,8 @@ export interface AggregatedActivityResponse {
823
813
 
824
814
  user_count_truncated: boolean;
825
815
 
816
+ is_watched?: boolean;
817
+
826
818
  activities: ActivityResponse[];
827
819
  }
828
820
 
@@ -1095,6 +1087,8 @@ export interface AudioSettings {
1095
1087
 
1096
1088
  speaker_default_on: boolean;
1097
1089
 
1090
+ hifi_audio_enabled?: boolean;
1091
+
1098
1092
  noise_cancellation?: NoiseCancellationSettings;
1099
1093
  }
1100
1094
 
@@ -1103,6 +1097,8 @@ export interface AudioSettingsRequest {
1103
1097
 
1104
1098
  access_request_enabled?: boolean;
1105
1099
 
1100
+ hifi_audio_enabled?: boolean;
1101
+
1106
1102
  mic_default_on?: boolean;
1107
1103
 
1108
1104
  opus_dtx_enabled?: boolean;
@@ -1127,6 +1123,8 @@ export interface AudioSettingsResponse {
1127
1123
 
1128
1124
  speaker_default_on: boolean;
1129
1125
 
1126
+ hifi_audio_enabled?: boolean;
1127
+
1130
1128
  noise_cancellation?: NoiseCancellationSettings;
1131
1129
  }
1132
1130
 
@@ -4156,6 +4154,8 @@ export interface CreateFeedGroupRequest {
4156
4154
  push_notification?: PushNotificationConfig;
4157
4155
 
4158
4156
  ranking?: RankingConfig;
4157
+
4158
+ stories?: StoriesConfig;
4159
4159
  }
4160
4160
 
4161
4161
  export interface CreateFeedGroupResponse {
@@ -5269,7 +5269,7 @@ export interface FeedGroupResponse {
5269
5269
 
5270
5270
  activity_processors?: ActivityProcessorConfig[];
5271
5271
 
5272
- activity_selectors?: ActivitySelectorConfigResponse[];
5272
+ activity_selectors?: ActivitySelectorConfig[];
5273
5273
 
5274
5274
  aggregation?: AggregationConfig;
5275
5275
 
@@ -5505,7 +5505,7 @@ export interface FeedViewResponse {
5505
5505
 
5506
5506
  activity_processors?: ActivityProcessorConfig[];
5507
5507
 
5508
- activity_selectors?: ActivitySelectorConfigResponse[];
5508
+ activity_selectors?: ActivitySelectorConfig[];
5509
5509
 
5510
5510
  aggregation?: AggregationConfig;
5511
5511
 
@@ -5621,33 +5621,29 @@ export interface FirebaseConfigFields {
5621
5621
  export interface Flag {
5622
5622
  created_at: Date;
5623
5623
 
5624
- entity_id: string;
5625
-
5626
- entity_type: string;
5624
+ created_by_automod: boolean;
5627
5625
 
5628
5626
  updated_at: Date;
5629
5627
 
5630
- result: Array<Record<string, any>>;
5631
-
5632
- entity_creator_id?: string;
5633
-
5634
- is_streamed_content?: boolean;
5635
-
5636
- moderation_payload_hash?: string;
5628
+ approved_at?: Date;
5637
5629
 
5638
5630
  reason?: string;
5639
5631
 
5640
- review_queue_item_id?: string;
5632
+ rejected_at?: Date;
5641
5633
 
5642
- type?: string;
5634
+ reviewed_at?: Date;
5643
5635
 
5644
- labels?: string[];
5636
+ reviewed_by?: string;
5637
+
5638
+ target_message_id?: string;
5645
5639
 
5646
5640
  custom?: Record<string, any>;
5647
5641
 
5648
- moderation_payload?: ModerationPayload;
5642
+ details?: FlagDetails;
5649
5643
 
5650
- review_queue_item?: ReviewQueueItem;
5644
+ target_message?: Message;
5645
+
5646
+ target_user?: User;
5651
5647
 
5652
5648
  user?: User;
5653
5649
  }
@@ -9935,9 +9931,9 @@ export interface RTMPSettingsResponse {
9935
9931
  }
9936
9932
 
9937
9933
  export interface RankingConfig {
9938
- score?: string;
9934
+ type: 'recency' | 'expression' | 'interest';
9939
9935
 
9940
- type?: string;
9936
+ score?: string;
9941
9937
 
9942
9938
  defaults?: Record<string, any>;
9943
9939
 
@@ -10634,6 +10630,24 @@ export interface SRTIngress {
10634
10630
  address: string;
10635
10631
  }
10636
10632
 
10633
+ export interface StoriesFeedUpdatedEvent {
10634
+ created_at: Date;
10635
+
10636
+ fid: string;
10637
+
10638
+ custom: Record<string, any>;
10639
+
10640
+ type: string;
10641
+
10642
+ feed_visibility?: string;
10643
+
10644
+ received_at?: Date;
10645
+
10646
+ aggregated_activities?: AggregatedActivityResponse[];
10647
+
10648
+ user?: UserResponseCommonFields;
10649
+ }
10650
+
10637
10651
  export interface STTEgressConfig {
10638
10652
  closed_captions_enabled?: boolean;
10639
10653
 
@@ -11299,9 +11313,9 @@ export interface StopTranscriptionResponse {
11299
11313
  }
11300
11314
 
11301
11315
  export interface StoriesConfig {
11302
- expiration_behaviour?: string;
11303
-
11304
11316
  skip_watched?: boolean;
11317
+
11318
+ track_watched?: boolean;
11305
11319
  }
11306
11320
 
11307
11321
  export interface SubmitActionRequest {
@@ -13724,6 +13738,7 @@ export type WebhookEvent =
13724
13738
  | ({ type: 'feeds.follow.deleted' } & FollowDeletedEvent)
13725
13739
  | ({ type: 'feeds.follow.updated' } & FollowUpdatedEvent)
13726
13740
  | ({ type: 'feeds.notification_feed.updated' } & NotificationFeedUpdatedEvent)
13741
+ | ({ type: 'feeds.stories_feed.updated' } & StoriesFeedUpdatedEvent)
13727
13742
  | ({ type: 'flag.updated' } & FlagUpdatedEvent)
13728
13743
  | ({ type: 'member.added' } & MemberAddedEvent)
13729
13744
  | ({ type: 'member.removed' } & MemberRemovedEvent)