@stream-io/node-sdk 0.7.49 → 0.7.50

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.
@@ -679,7 +679,7 @@ export interface ActivityRequest {
679
679
 
680
680
  /**
681
681
  * @deprecated
682
- * Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
682
+ * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
683
683
  */
684
684
  copy_custom_to_notification?: boolean;
685
685
 
@@ -1172,7 +1172,7 @@ export interface AddActivityRequest {
1172
1172
 
1173
1173
  /**
1174
1174
  * @deprecated
1175
- * Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
1175
+ * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
1176
1176
  */
1177
1177
  copy_custom_to_notification?: boolean;
1178
1178
 
@@ -1321,7 +1321,7 @@ export interface AddCommentReactionRequest {
1321
1321
 
1322
1322
  /**
1323
1323
  * @deprecated
1324
- * Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
1324
+ * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
1325
1325
  */
1326
1326
  copy_custom_to_notification?: boolean;
1327
1327
 
@@ -1371,7 +1371,7 @@ export interface AddCommentRequest {
1371
1371
 
1372
1372
  /**
1373
1373
  * @deprecated
1374
- * Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
1374
+ * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
1375
1375
  */
1376
1376
  copy_custom_to_notification?: boolean;
1377
1377
 
@@ -1479,7 +1479,7 @@ export interface AddReactionRequest {
1479
1479
 
1480
1480
  /**
1481
1481
  * @deprecated
1482
- * Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
1482
+ * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
1483
1483
  */
1484
1484
  copy_custom_to_notification?: boolean;
1485
1485
 
@@ -2146,6 +2146,11 @@ export interface BackstageSettingsResponse {
2146
2146
  }
2147
2147
 
2148
2148
  export interface BanActionRequestPayload {
2149
+ /**
2150
+ * Also ban user from all channels this moderator creates in the future
2151
+ */
2152
+ ban_from_future_channels?: boolean;
2153
+
2149
2154
  /**
2150
2155
  * Ban only from specific channel
2151
2156
  */
@@ -2989,6 +2994,16 @@ export interface CallIngressResponse {
2989
2994
  whip: WHIPIngress;
2990
2995
  }
2991
2996
 
2997
+ export interface CallLevelEventPayload {
2998
+ event_type: string;
2999
+
3000
+ timestamp: number;
3001
+
3002
+ user_id: string;
3003
+
3004
+ payload?: Record<string, any>;
3005
+ }
3006
+
2992
3007
  export interface CallLiveStartedEvent {
2993
3008
  call_cid: string;
2994
3009
 
@@ -3873,6 +3888,8 @@ export interface CallStatsParticipantCounts {
3873
3888
 
3874
3889
  sessions: number;
3875
3890
 
3891
+ call_event_count?: number;
3892
+
3876
3893
  cq_score?: number;
3877
3894
 
3878
3895
  total_participant_duration?: number;
@@ -5726,6 +5743,11 @@ export interface CheckRequest {
5726
5743
  */
5727
5744
  config_team?: string;
5728
5745
 
5746
+ /**
5747
+ * Original timestamp when the content was produced (for correlating flagged content with source video timeline)
5748
+ */
5749
+ content_published_at?: Date;
5750
+
5729
5751
  /**
5730
5752
  * Whether to run moderation in test mode
5731
5753
  */
@@ -8500,6 +8522,31 @@ export interface ErrorResult {
8500
8522
  version?: string;
8501
8523
  }
8502
8524
 
8525
+ export interface EscalatePayload {
8526
+ /**
8527
+ * Additional context for the reviewer
8528
+ */
8529
+ notes?: string;
8530
+
8531
+ /**
8532
+ * Priority of the escalation (low, medium, high)
8533
+ */
8534
+ priority?: string;
8535
+
8536
+ /**
8537
+ * Reason for the escalation (from configured escalation_reasons)
8538
+ */
8539
+ reason?: string;
8540
+ }
8541
+
8542
+ export interface EscalationMetadata {
8543
+ notes?: string;
8544
+
8545
+ priority?: string;
8546
+
8547
+ reason?: string;
8548
+ }
8549
+
8503
8550
  export interface EventHook {
8504
8551
  created_at?: Date;
8505
8552
 
@@ -9952,7 +9999,7 @@ export interface FollowRequest {
9952
9999
 
9953
10000
  /**
9954
10001
  * @deprecated
9955
- * Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
10002
+ * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
9956
10003
  */
9957
10004
  copy_custom_to_notification?: boolean;
9958
10005
 
@@ -10538,6 +10585,31 @@ export interface GetEdgesResponse {
10538
10585
  edges: EdgeResponse[];
10539
10586
  }
10540
10587
 
10588
+ export interface GetExternalStorageAWSS3Response {
10589
+ bucket: string;
10590
+
10591
+ region: string;
10592
+
10593
+ role_arn: string;
10594
+
10595
+ path_prefix?: string;
10596
+ }
10597
+
10598
+ export interface GetExternalStorageResponse {
10599
+ created_at: Date;
10600
+
10601
+ /**
10602
+ * Duration of the request in milliseconds
10603
+ */
10604
+ duration: string;
10605
+
10606
+ type: string;
10607
+
10608
+ updated_at: Date;
10609
+
10610
+ aws_s3?: GetExternalStorageAWSS3Response;
10611
+ }
10612
+
10541
10613
  export interface GetFeedGroupResponse {
10542
10614
  duration: string;
10543
10615
 
@@ -10580,6 +10652,27 @@ export interface GetFeedsRateLimitsResponse {
10580
10652
  web?: Record<string, LimitInfoResponse>;
10581
10653
  }
10582
10654
 
10655
+ export interface GetFlagCountRequest {
10656
+ /**
10657
+ * ID of the user whose content was flagged
10658
+ */
10659
+ entity_creator_id: string;
10660
+
10661
+ /**
10662
+ * Optional entity type filter (e.g., stream:chat:v1:message, stream:user)
10663
+ */
10664
+ entity_type?: string;
10665
+ }
10666
+
10667
+ export interface GetFlagCountResponse {
10668
+ /**
10669
+ * Total number of flags against the specified user's content
10670
+ */
10671
+ count: number;
10672
+
10673
+ duration: string;
10674
+ }
10675
+
10583
10676
  export interface GetFollowSuggestionsResponse {
10584
10677
  duration: string;
10585
10678
 
@@ -10967,8 +11060,14 @@ export interface GetRetentionPolicyRunsRequest {
10967
11060
 
10968
11061
  prev?: string;
10969
11062
 
11063
+ /**
11064
+ * Array of sort parameters
11065
+ */
10970
11066
  sort?: SortParamRequest[];
10971
11067
 
11068
+ /**
11069
+ * Filter conditions to apply to the query
11070
+ */
10972
11071
  filter_conditions?: Record<string, any>;
10973
11072
  }
10974
11073
 
@@ -13556,6 +13655,11 @@ export interface ModerationActionConfigResponse {
13556
13655
  */
13557
13656
  order: number;
13558
13657
 
13658
+ /**
13659
+ * Queue type this action config belongs to
13660
+ */
13661
+ queue_type?: string;
13662
+
13559
13663
  /**
13560
13664
  * Custom data for the action
13561
13665
  */
@@ -13661,12 +13765,16 @@ export interface ModerationDashboardPreferences {
13661
13765
 
13662
13766
  disable_flagging_reviewed_entity?: boolean;
13663
13767
 
13768
+ escalation_queue_enabled?: boolean;
13769
+
13664
13770
  flag_user_on_flagged_content?: boolean;
13665
13771
 
13666
13772
  media_queue_blur_enabled?: boolean;
13667
13773
 
13668
13774
  allowed_moderation_action_reasons?: string[];
13669
13775
 
13776
+ escalation_reasons?: string[];
13777
+
13670
13778
  keyframe_classifications_map?: Record<string, Record<string, boolean>>;
13671
13779
 
13672
13780
  overview_dashboard?: OverviewDashboardConfig;
@@ -15591,6 +15699,9 @@ export interface QueryAppealsResponse {
15591
15699
  }
15592
15700
 
15593
15701
  export interface QueryBannedUsersPayload {
15702
+ /**
15703
+ * Filter conditions to apply to the query
15704
+ */
15594
15705
  filter_conditions: Record<string, any>;
15595
15706
 
15596
15707
  /**
@@ -15717,8 +15828,14 @@ export interface QueryCallMembersRequest {
15717
15828
 
15718
15829
  prev?: string;
15719
15830
 
15831
+ /**
15832
+ * Array of sort parameters
15833
+ */
15720
15834
  sort?: SortParamRequest[];
15721
15835
 
15836
+ /**
15837
+ * Filter conditions to apply to the query
15838
+ */
15722
15839
  filter_conditions?: Record<string, any>;
15723
15840
  }
15724
15841
 
@@ -15761,6 +15878,9 @@ export interface QueryCallParticipantSessionsResponse {
15761
15878
  }
15762
15879
 
15763
15880
  export interface QueryCallParticipantsRequest {
15881
+ /**
15882
+ * Filter conditions to apply to the query
15883
+ */
15764
15884
  filter_conditions?: Record<string, any>;
15765
15885
  }
15766
15886
 
@@ -15806,6 +15926,8 @@ export interface QueryCallSessionParticipantStatsResponse {
15806
15926
  prev?: string;
15807
15927
 
15808
15928
  tmp_data_source?: string;
15929
+
15930
+ call_events?: CallLevelEventPayload[];
15809
15931
  }
15810
15932
 
15811
15933
  export interface QueryCallSessionParticipantStatsTimelineResponse {
@@ -15867,8 +15989,14 @@ export interface QueryCallStatsRequest {
15867
15989
 
15868
15990
  prev?: string;
15869
15991
 
15992
+ /**
15993
+ * Array of sort parameters
15994
+ */
15870
15995
  sort?: SortParamRequest[];
15871
15996
 
15997
+ /**
15998
+ * Filter conditions to apply to the query
15999
+ */
15872
16000
  filter_conditions?: Record<string, any>;
15873
16001
  }
15874
16002
 
@@ -15897,6 +16025,9 @@ export interface QueryCallsRequest {
15897
16025
  */
15898
16026
  sort?: SortParamRequest[];
15899
16027
 
16028
+ /**
16029
+ * Filter conditions to apply to the query
16030
+ */
15900
16031
  filter_conditions?: Record<string, any>;
15901
16032
  }
15902
16033
 
@@ -15978,6 +16109,9 @@ export interface QueryChannelsRequest {
15978
16109
  */
15979
16110
  sort?: SortParamRequest[];
15980
16111
 
16112
+ /**
16113
+ * Filter conditions to apply to the query
16114
+ */
15981
16115
  filter_conditions?: Record<string, any>;
15982
16116
 
15983
16117
  /**
@@ -16369,6 +16503,9 @@ export interface QueryFutureChannelBansResponse {
16369
16503
  export interface QueryMembersPayload {
16370
16504
  type: string;
16371
16505
 
16506
+ /**
16507
+ * Filter conditions to apply to the query
16508
+ */
16372
16509
  filter_conditions: Record<string, any>;
16373
16510
 
16374
16511
  id?: string;
@@ -16381,6 +16518,9 @@ export interface QueryMembersPayload {
16381
16518
 
16382
16519
  members?: ChannelMemberRequest[];
16383
16520
 
16521
+ /**
16522
+ * Array of sort parameters
16523
+ */
16384
16524
  sort?: SortParamRequest[];
16385
16525
 
16386
16526
  user?: UserRequest;
@@ -16432,8 +16572,14 @@ export interface QueryMessageFlagsPayload {
16432
16572
 
16433
16573
  user_id?: string;
16434
16574
 
16575
+ /**
16576
+ * Array of sort parameters
16577
+ */
16435
16578
  sort?: SortParamRequest[];
16436
16579
 
16580
+ /**
16581
+ * Filter conditions to apply to the query
16582
+ */
16437
16583
  filter_conditions?: Record<string, any>;
16438
16584
 
16439
16585
  user?: UserRequest;
@@ -17042,8 +17188,14 @@ export interface QueryUserFeedbackRequest {
17042
17188
 
17043
17189
  prev?: string;
17044
17190
 
17191
+ /**
17192
+ * Array of sort parameters
17193
+ */
17045
17194
  sort?: SortParamRequest[];
17046
17195
 
17196
+ /**
17197
+ * Filter conditions to apply to the query
17198
+ */
17047
17199
  filter_conditions?: Record<string, any>;
17048
17200
  }
17049
17201
 
@@ -17061,6 +17213,9 @@ export interface QueryUserFeedbackResponse {
17061
17213
  }
17062
17214
 
17063
17215
  export interface QueryUsersPayload {
17216
+ /**
17217
+ * Filter conditions to apply to the query
17218
+ */
17064
17219
  filter_conditions: Record<string, any>;
17065
17220
 
17066
17221
  include_deactivated_users?: boolean;
@@ -17073,6 +17228,9 @@ export interface QueryUsersPayload {
17073
17228
 
17074
17229
  user_id?: string;
17075
17230
 
17231
+ /**
17232
+ * Array of sort parameters
17233
+ */
17076
17234
  sort?: SortParamRequest[];
17077
17235
 
17078
17236
  user?: UserRequest;
@@ -18149,6 +18307,11 @@ export interface ReviewQueueItemResponse {
18149
18307
  */
18150
18308
  entity_type: string;
18151
18309
 
18310
+ /**
18311
+ * Whether the item has been escalated
18312
+ */
18313
+ escalated: boolean;
18314
+
18152
18315
  flags_count: number;
18153
18316
 
18154
18317
  /**
@@ -18215,6 +18378,16 @@ export interface ReviewQueueItemResponse {
18215
18378
  */
18216
18379
  entity_creator_id?: string;
18217
18380
 
18381
+ /**
18382
+ * When the item was escalated
18383
+ */
18384
+ escalated_at?: Date;
18385
+
18386
+ /**
18387
+ * ID of the moderator who escalated the item
18388
+ */
18389
+ escalated_by?: string;
18390
+
18218
18391
  /**
18219
18392
  * When the item was reviewed
18220
18393
  */
@@ -18235,6 +18408,8 @@ export interface ReviewQueueItemResponse {
18235
18408
 
18236
18409
  entity_creator?: EntityCreatorResponse;
18237
18410
 
18411
+ escalation_metadata?: EscalationMetadata;
18412
+
18238
18413
  feeds_v2_activity?: EnrichedActivity;
18239
18414
 
18240
18415
  feeds_v2_reaction?: Reaction;
@@ -19296,9 +19471,9 @@ export interface SessionWarningResponse {
19296
19471
  }
19297
19472
 
19298
19473
  export interface SetRetentionPolicyRequest {
19299
- policy: 'old-messages' | 'inactive-channels';
19474
+ max_age_hours: number;
19300
19475
 
19301
- max_age_hours?: number;
19476
+ policy: 'old-messages' | 'inactive-channels';
19302
19477
  }
19303
19478
 
19304
19479
  export interface SetRetentionPolicyResponse {
@@ -19823,7 +19998,7 @@ export interface StoriesFeedUpdatedEvent {
19823
19998
 
19824
19999
  export interface SubmitActionRequest {
19825
20000
  /**
19826
- * Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, ban, custom, unban, restore, delete_user, unblock, block, shadow_block, unmask, kick_user, end_call
20001
+ * Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, ban, custom, unban, restore, delete_user, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalate
19827
20002
  */
19828
20003
 
19829
20004
  action_type:
@@ -19844,7 +20019,9 @@ export interface SubmitActionRequest {
19844
20019
  | 'unmask'
19845
20020
  | 'kick_user'
19846
20021
  | 'end_call'
19847
- | 'reject_appeal';
20022
+ | 'reject_appeal'
20023
+ | 'escalate'
20024
+ | 'de_escalate';
19848
20025
 
19849
20026
  /**
19850
20027
  * UUID of the appeal to act on (required for reject_appeal, optional for other actions)
@@ -19874,6 +20051,8 @@ export interface SubmitActionRequest {
19874
20051
 
19875
20052
  delete_user?: DeleteUserRequestPayload;
19876
20053
 
20054
+ escalate?: EscalatePayload;
20055
+
19877
20056
  flag?: FlagRequest;
19878
20057
 
19879
20058
  mark_reviewed?: MarkReviewedRequestPayload;
@@ -20677,6 +20856,11 @@ export interface UnbanActionRequestPayload {
20677
20856
  * Reason for the appeal decision
20678
20857
  */
20679
20858
  decision_reason?: string;
20859
+
20860
+ /**
20861
+ * Also remove the future channels ban for this user
20862
+ */
20863
+ remove_future_channels_ban?: boolean;
20680
20864
  }
20681
20865
 
20682
20866
  export interface UnbanRequest {
@@ -20954,7 +21138,7 @@ export interface UpdateActivityPartialChangeRequest {
20954
21138
 
20955
21139
  /**
20956
21140
  * @deprecated
20957
- * Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
21141
+ * Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
20958
21142
  */
20959
21143
  copy_custom_to_notification?: boolean;
20960
21144
 
@@ -20977,7 +21161,7 @@ export interface UpdateActivityPartialChangeRequest {
20977
21161
  export interface UpdateActivityPartialRequest {
20978
21162
  /**
20979
21163
  * @deprecated
20980
- * Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
21164
+ * Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
20981
21165
  */
20982
21166
  copy_custom_to_notification?: boolean;
20983
21167
 
@@ -21020,7 +21204,7 @@ export interface UpdateActivityPartialResponse {
21020
21204
  export interface UpdateActivityRequest {
21021
21205
  /**
21022
21206
  * @deprecated
21023
- * Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
21207
+ * Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
21024
21208
  */
21025
21209
  copy_custom_to_notification?: boolean;
21026
21210
 
@@ -21727,7 +21911,7 @@ export interface UpdateCommandResponse {
21727
21911
  export interface UpdateCommentPartialRequest {
21728
21912
  /**
21729
21913
  * @deprecated
21730
- * Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
21914
+ * Whether to copy custom data to notification activities Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
21731
21915
  */
21732
21916
  copy_custom_to_notification?: boolean;
21733
21917
 
@@ -21775,7 +21959,7 @@ export interface UpdateCommentRequest {
21775
21959
 
21776
21960
  /**
21777
21961
  * @deprecated
21778
- * Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
21962
+ * Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
21779
21963
  */
21780
21964
  copy_custom_to_notification?: boolean;
21781
21965
 
@@ -22009,7 +22193,7 @@ export interface UpdateFollowRequest {
22009
22193
 
22010
22194
  /**
22011
22195
  * @deprecated
22012
- * Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
22196
+ * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
22013
22197
  */
22014
22198
  copy_custom_to_notification?: boolean;
22015
22199
 
@@ -22627,6 +22811,29 @@ export interface UpsertConfigResponse {
22627
22811
  config?: ConfigResponse;
22628
22812
  }
22629
22813
 
22814
+ export interface UpsertExternalStorageAWSS3Request {
22815
+ bucket: string;
22816
+
22817
+ region: string;
22818
+
22819
+ role_arn: string;
22820
+
22821
+ path_prefix?: string;
22822
+ }
22823
+
22824
+ export interface UpsertExternalStorageRequest {
22825
+ type: 'aws_s3';
22826
+
22827
+ aws_s3?: UpsertExternalStorageAWSS3Request;
22828
+ }
22829
+
22830
+ export interface UpsertExternalStorageResponse {
22831
+ /**
22832
+ * Duration of the request in milliseconds
22833
+ */
22834
+ duration: string;
22835
+ }
22836
+
22630
22837
  export interface UpsertModerationRuleRequest {
22631
22838
  name: string;
22632
22839
 
@@ -23625,6 +23832,13 @@ export interface UserUpdatedEvent {
23625
23832
  received_at?: Date;
23626
23833
  }
23627
23834
 
23835
+ export interface ValidateExternalStorageResponse {
23836
+ /**
23837
+ * Duration of the request in milliseconds
23838
+ */
23839
+ duration: string;
23840
+ }
23841
+
23628
23842
  export interface VelocityFilterConfig {
23629
23843
  advanced_filters?: boolean;
23630
23844
 
@@ -19,8 +19,12 @@ import {
19
19
  FlagResponse,
20
20
  GetAppealResponse,
21
21
  GetConfigResponse,
22
+ GetFlagCountRequest,
23
+ GetFlagCountResponse,
22
24
  GetModerationRuleResponse,
23
25
  GetReviewQueueItemResponse,
26
+ InsertActionLogRequest,
27
+ InsertActionLogResponse,
24
28
  MuteRequest,
25
29
  MuteResponse,
26
30
  QueryAppealsRequest,
@@ -54,6 +58,34 @@ import { decoders } from '../model-decoders/decoders';
54
58
  export class ModerationApi {
55
59
  constructor(public readonly apiClient: ApiClient) {}
56
60
 
61
+ async insertActionLog(
62
+ request: InsertActionLogRequest,
63
+ ): Promise<StreamResponse<InsertActionLogResponse>> {
64
+ const body = {
65
+ action_type: request?.action_type,
66
+ entity_creator_id: request?.entity_creator_id,
67
+ entity_id: request?.entity_id,
68
+ entity_type: request?.entity_type,
69
+ reason: request?.reason,
70
+ custom: request?.custom,
71
+ };
72
+
73
+ const response = await this.apiClient.sendRequest<
74
+ StreamResponse<InsertActionLogResponse>
75
+ >(
76
+ 'POST',
77
+ '/api/v2/moderation/action_logs',
78
+ undefined,
79
+ undefined,
80
+ body,
81
+ 'application/json',
82
+ );
83
+
84
+ decoders.InsertActionLogResponse?.(response.body);
85
+
86
+ return { ...response.body, metadata: response.metadata };
87
+ }
88
+
57
89
  async appeal(
58
90
  request: AppealRequest,
59
91
  ): Promise<StreamResponse<AppealResponse>> {
@@ -186,6 +218,7 @@ export class ModerationApi {
186
218
  entity_type: request?.entity_type,
187
219
  config_key: request?.config_key,
188
220
  config_team: request?.config_team,
221
+ content_published_at: request?.content_published_at,
189
222
  test_mode: request?.test_mode,
190
223
  user_id: request?.user_id,
191
224
  config: request?.config,
@@ -459,6 +492,30 @@ export class ModerationApi {
459
492
  return { ...response.body, metadata: response.metadata };
460
493
  }
461
494
 
495
+ async getFlagCount(
496
+ request: GetFlagCountRequest,
497
+ ): Promise<StreamResponse<GetFlagCountResponse>> {
498
+ const body = {
499
+ entity_creator_id: request?.entity_creator_id,
500
+ entity_type: request?.entity_type,
501
+ };
502
+
503
+ const response = await this.apiClient.sendRequest<
504
+ StreamResponse<GetFlagCountResponse>
505
+ >(
506
+ 'POST',
507
+ '/api/v2/moderation/flag_count',
508
+ undefined,
509
+ undefined,
510
+ body,
511
+ 'application/json',
512
+ );
513
+
514
+ decoders.GetFlagCountResponse?.(response.body);
515
+
516
+ return { ...response.body, metadata: response.metadata };
517
+ }
518
+
462
519
  async queryModerationFlags(
463
520
  request?: QueryModerationFlagsRequest,
464
521
  ): Promise<StreamResponse<QueryModerationFlagsResponse>> {
@@ -696,6 +753,7 @@ export class ModerationApi {
696
753
  delete_message: request?.delete_message,
697
754
  delete_reaction: request?.delete_reaction,
698
755
  delete_user: request?.delete_user,
756
+ escalate: request?.escalate,
699
757
  flag: request?.flag,
700
758
  mark_reviewed: request?.mark_reviewed,
701
759
  reject_appeal: request?.reject_appeal,