@stream-io/node-sdk 0.7.49 → 0.7.51
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 +95 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +95 -1
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/chat/ChatApi.d.ts +5 -1
- package/dist/src/gen/common/CommonApi.d.ts +5 -1
- package/dist/src/gen/models/index.d.ts +195 -15
- package/dist/src/gen/moderation/ModerationApi.d.ts +3 -1
- package/package.json +1 -1
- package/src/gen/chat/ChatApi.ts +93 -0
- package/src/gen/common/CommonApi.ts +70 -0
- package/src/gen/feeds/FeedsApi.ts +3 -0
- package/src/gen/model-decoders/decoders.ts +11 -0
- package/src/gen/models/index.ts +245 -16
- package/src/gen/moderation/ModerationApi.ts +58 -0
package/src/gen/models/index.ts
CHANGED
|
@@ -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
|
|
|
@@ -9950,9 +9997,14 @@ export interface FollowRequest {
|
|
|
9950
9997
|
*/
|
|
9951
9998
|
target: string;
|
|
9952
9999
|
|
|
10000
|
+
/**
|
|
10001
|
+
* Maximum number of historical activities to copy from the target feed when the follow is first materialized. Not set = unlimited (default). 0 = copy nothing. Range: 0-1000.
|
|
10002
|
+
*/
|
|
10003
|
+
activity_copy_limit?: number;
|
|
10004
|
+
|
|
9953
10005
|
/**
|
|
9954
10006
|
* @deprecated
|
|
9955
|
-
* Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
|
|
10007
|
+
* 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
10008
|
*/
|
|
9957
10009
|
copy_custom_to_notification?: boolean;
|
|
9958
10010
|
|
|
@@ -10538,6 +10590,31 @@ export interface GetEdgesResponse {
|
|
|
10538
10590
|
edges: EdgeResponse[];
|
|
10539
10591
|
}
|
|
10540
10592
|
|
|
10593
|
+
export interface GetExternalStorageAWSS3Response {
|
|
10594
|
+
bucket: string;
|
|
10595
|
+
|
|
10596
|
+
region: string;
|
|
10597
|
+
|
|
10598
|
+
role_arn: string;
|
|
10599
|
+
|
|
10600
|
+
path_prefix?: string;
|
|
10601
|
+
}
|
|
10602
|
+
|
|
10603
|
+
export interface GetExternalStorageResponse {
|
|
10604
|
+
created_at: Date;
|
|
10605
|
+
|
|
10606
|
+
/**
|
|
10607
|
+
* Duration of the request in milliseconds
|
|
10608
|
+
*/
|
|
10609
|
+
duration: string;
|
|
10610
|
+
|
|
10611
|
+
type: string;
|
|
10612
|
+
|
|
10613
|
+
updated_at: Date;
|
|
10614
|
+
|
|
10615
|
+
aws_s3?: GetExternalStorageAWSS3Response;
|
|
10616
|
+
}
|
|
10617
|
+
|
|
10541
10618
|
export interface GetFeedGroupResponse {
|
|
10542
10619
|
duration: string;
|
|
10543
10620
|
|
|
@@ -10580,6 +10657,27 @@ export interface GetFeedsRateLimitsResponse {
|
|
|
10580
10657
|
web?: Record<string, LimitInfoResponse>;
|
|
10581
10658
|
}
|
|
10582
10659
|
|
|
10660
|
+
export interface GetFlagCountRequest {
|
|
10661
|
+
/**
|
|
10662
|
+
* ID of the user whose content was flagged
|
|
10663
|
+
*/
|
|
10664
|
+
entity_creator_id: string;
|
|
10665
|
+
|
|
10666
|
+
/**
|
|
10667
|
+
* Optional entity type filter (e.g., stream:chat:v1:message, stream:user)
|
|
10668
|
+
*/
|
|
10669
|
+
entity_type?: string;
|
|
10670
|
+
}
|
|
10671
|
+
|
|
10672
|
+
export interface GetFlagCountResponse {
|
|
10673
|
+
/**
|
|
10674
|
+
* Total number of flags against the specified user's content
|
|
10675
|
+
*/
|
|
10676
|
+
count: number;
|
|
10677
|
+
|
|
10678
|
+
duration: string;
|
|
10679
|
+
}
|
|
10680
|
+
|
|
10583
10681
|
export interface GetFollowSuggestionsResponse {
|
|
10584
10682
|
duration: string;
|
|
10585
10683
|
|
|
@@ -10967,8 +11065,14 @@ export interface GetRetentionPolicyRunsRequest {
|
|
|
10967
11065
|
|
|
10968
11066
|
prev?: string;
|
|
10969
11067
|
|
|
11068
|
+
/**
|
|
11069
|
+
* Array of sort parameters
|
|
11070
|
+
*/
|
|
10970
11071
|
sort?: SortParamRequest[];
|
|
10971
11072
|
|
|
11073
|
+
/**
|
|
11074
|
+
* Filter conditions to apply to the query
|
|
11075
|
+
*/
|
|
10972
11076
|
filter_conditions?: Record<string, any>;
|
|
10973
11077
|
}
|
|
10974
11078
|
|
|
@@ -13556,6 +13660,11 @@ export interface ModerationActionConfigResponse {
|
|
|
13556
13660
|
*/
|
|
13557
13661
|
order: number;
|
|
13558
13662
|
|
|
13663
|
+
/**
|
|
13664
|
+
* Queue type this action config belongs to
|
|
13665
|
+
*/
|
|
13666
|
+
queue_type?: string;
|
|
13667
|
+
|
|
13559
13668
|
/**
|
|
13560
13669
|
* Custom data for the action
|
|
13561
13670
|
*/
|
|
@@ -13661,12 +13770,16 @@ export interface ModerationDashboardPreferences {
|
|
|
13661
13770
|
|
|
13662
13771
|
disable_flagging_reviewed_entity?: boolean;
|
|
13663
13772
|
|
|
13773
|
+
escalation_queue_enabled?: boolean;
|
|
13774
|
+
|
|
13664
13775
|
flag_user_on_flagged_content?: boolean;
|
|
13665
13776
|
|
|
13666
13777
|
media_queue_blur_enabled?: boolean;
|
|
13667
13778
|
|
|
13668
13779
|
allowed_moderation_action_reasons?: string[];
|
|
13669
13780
|
|
|
13781
|
+
escalation_reasons?: string[];
|
|
13782
|
+
|
|
13670
13783
|
keyframe_classifications_map?: Record<string, Record<string, boolean>>;
|
|
13671
13784
|
|
|
13672
13785
|
overview_dashboard?: OverviewDashboardConfig;
|
|
@@ -15461,6 +15574,11 @@ export interface QueryActivitiesRequest {
|
|
|
15461
15574
|
|
|
15462
15575
|
include_private_activities?: boolean;
|
|
15463
15576
|
|
|
15577
|
+
/**
|
|
15578
|
+
* When true, include soft-deleted activities in the result.
|
|
15579
|
+
*/
|
|
15580
|
+
include_soft_deleted_activities?: boolean;
|
|
15581
|
+
|
|
15464
15582
|
limit?: number;
|
|
15465
15583
|
|
|
15466
15584
|
next?: string;
|
|
@@ -15591,6 +15709,9 @@ export interface QueryAppealsResponse {
|
|
|
15591
15709
|
}
|
|
15592
15710
|
|
|
15593
15711
|
export interface QueryBannedUsersPayload {
|
|
15712
|
+
/**
|
|
15713
|
+
* Filter conditions to apply to the query
|
|
15714
|
+
*/
|
|
15594
15715
|
filter_conditions: Record<string, any>;
|
|
15595
15716
|
|
|
15596
15717
|
/**
|
|
@@ -15717,8 +15838,14 @@ export interface QueryCallMembersRequest {
|
|
|
15717
15838
|
|
|
15718
15839
|
prev?: string;
|
|
15719
15840
|
|
|
15841
|
+
/**
|
|
15842
|
+
* Array of sort parameters
|
|
15843
|
+
*/
|
|
15720
15844
|
sort?: SortParamRequest[];
|
|
15721
15845
|
|
|
15846
|
+
/**
|
|
15847
|
+
* Filter conditions to apply to the query
|
|
15848
|
+
*/
|
|
15722
15849
|
filter_conditions?: Record<string, any>;
|
|
15723
15850
|
}
|
|
15724
15851
|
|
|
@@ -15761,6 +15888,9 @@ export interface QueryCallParticipantSessionsResponse {
|
|
|
15761
15888
|
}
|
|
15762
15889
|
|
|
15763
15890
|
export interface QueryCallParticipantsRequest {
|
|
15891
|
+
/**
|
|
15892
|
+
* Filter conditions to apply to the query
|
|
15893
|
+
*/
|
|
15764
15894
|
filter_conditions?: Record<string, any>;
|
|
15765
15895
|
}
|
|
15766
15896
|
|
|
@@ -15806,6 +15936,8 @@ export interface QueryCallSessionParticipantStatsResponse {
|
|
|
15806
15936
|
prev?: string;
|
|
15807
15937
|
|
|
15808
15938
|
tmp_data_source?: string;
|
|
15939
|
+
|
|
15940
|
+
call_events?: CallLevelEventPayload[];
|
|
15809
15941
|
}
|
|
15810
15942
|
|
|
15811
15943
|
export interface QueryCallSessionParticipantStatsTimelineResponse {
|
|
@@ -15867,8 +15999,14 @@ export interface QueryCallStatsRequest {
|
|
|
15867
15999
|
|
|
15868
16000
|
prev?: string;
|
|
15869
16001
|
|
|
16002
|
+
/**
|
|
16003
|
+
* Array of sort parameters
|
|
16004
|
+
*/
|
|
15870
16005
|
sort?: SortParamRequest[];
|
|
15871
16006
|
|
|
16007
|
+
/**
|
|
16008
|
+
* Filter conditions to apply to the query
|
|
16009
|
+
*/
|
|
15872
16010
|
filter_conditions?: Record<string, any>;
|
|
15873
16011
|
}
|
|
15874
16012
|
|
|
@@ -15897,6 +16035,9 @@ export interface QueryCallsRequest {
|
|
|
15897
16035
|
*/
|
|
15898
16036
|
sort?: SortParamRequest[];
|
|
15899
16037
|
|
|
16038
|
+
/**
|
|
16039
|
+
* Filter conditions to apply to the query
|
|
16040
|
+
*/
|
|
15900
16041
|
filter_conditions?: Record<string, any>;
|
|
15901
16042
|
}
|
|
15902
16043
|
|
|
@@ -15978,6 +16119,9 @@ export interface QueryChannelsRequest {
|
|
|
15978
16119
|
*/
|
|
15979
16120
|
sort?: SortParamRequest[];
|
|
15980
16121
|
|
|
16122
|
+
/**
|
|
16123
|
+
* Filter conditions to apply to the query
|
|
16124
|
+
*/
|
|
15981
16125
|
filter_conditions?: Record<string, any>;
|
|
15982
16126
|
|
|
15983
16127
|
/**
|
|
@@ -16369,6 +16513,9 @@ export interface QueryFutureChannelBansResponse {
|
|
|
16369
16513
|
export interface QueryMembersPayload {
|
|
16370
16514
|
type: string;
|
|
16371
16515
|
|
|
16516
|
+
/**
|
|
16517
|
+
* Filter conditions to apply to the query
|
|
16518
|
+
*/
|
|
16372
16519
|
filter_conditions: Record<string, any>;
|
|
16373
16520
|
|
|
16374
16521
|
id?: string;
|
|
@@ -16381,6 +16528,9 @@ export interface QueryMembersPayload {
|
|
|
16381
16528
|
|
|
16382
16529
|
members?: ChannelMemberRequest[];
|
|
16383
16530
|
|
|
16531
|
+
/**
|
|
16532
|
+
* Array of sort parameters
|
|
16533
|
+
*/
|
|
16384
16534
|
sort?: SortParamRequest[];
|
|
16385
16535
|
|
|
16386
16536
|
user?: UserRequest;
|
|
@@ -16432,8 +16582,14 @@ export interface QueryMessageFlagsPayload {
|
|
|
16432
16582
|
|
|
16433
16583
|
user_id?: string;
|
|
16434
16584
|
|
|
16585
|
+
/**
|
|
16586
|
+
* Array of sort parameters
|
|
16587
|
+
*/
|
|
16435
16588
|
sort?: SortParamRequest[];
|
|
16436
16589
|
|
|
16590
|
+
/**
|
|
16591
|
+
* Filter conditions to apply to the query
|
|
16592
|
+
*/
|
|
16437
16593
|
filter_conditions?: Record<string, any>;
|
|
16438
16594
|
|
|
16439
16595
|
user?: UserRequest;
|
|
@@ -17042,8 +17198,14 @@ export interface QueryUserFeedbackRequest {
|
|
|
17042
17198
|
|
|
17043
17199
|
prev?: string;
|
|
17044
17200
|
|
|
17201
|
+
/**
|
|
17202
|
+
* Array of sort parameters
|
|
17203
|
+
*/
|
|
17045
17204
|
sort?: SortParamRequest[];
|
|
17046
17205
|
|
|
17206
|
+
/**
|
|
17207
|
+
* Filter conditions to apply to the query
|
|
17208
|
+
*/
|
|
17047
17209
|
filter_conditions?: Record<string, any>;
|
|
17048
17210
|
}
|
|
17049
17211
|
|
|
@@ -17061,6 +17223,9 @@ export interface QueryUserFeedbackResponse {
|
|
|
17061
17223
|
}
|
|
17062
17224
|
|
|
17063
17225
|
export interface QueryUsersPayload {
|
|
17226
|
+
/**
|
|
17227
|
+
* Filter conditions to apply to the query
|
|
17228
|
+
*/
|
|
17064
17229
|
filter_conditions: Record<string, any>;
|
|
17065
17230
|
|
|
17066
17231
|
include_deactivated_users?: boolean;
|
|
@@ -17073,6 +17238,9 @@ export interface QueryUsersPayload {
|
|
|
17073
17238
|
|
|
17074
17239
|
user_id?: string;
|
|
17075
17240
|
|
|
17241
|
+
/**
|
|
17242
|
+
* Array of sort parameters
|
|
17243
|
+
*/
|
|
17076
17244
|
sort?: SortParamRequest[];
|
|
17077
17245
|
|
|
17078
17246
|
user?: UserRequest;
|
|
@@ -18149,6 +18317,11 @@ export interface ReviewQueueItemResponse {
|
|
|
18149
18317
|
*/
|
|
18150
18318
|
entity_type: string;
|
|
18151
18319
|
|
|
18320
|
+
/**
|
|
18321
|
+
* Whether the item has been escalated
|
|
18322
|
+
*/
|
|
18323
|
+
escalated: boolean;
|
|
18324
|
+
|
|
18152
18325
|
flags_count: number;
|
|
18153
18326
|
|
|
18154
18327
|
/**
|
|
@@ -18215,6 +18388,16 @@ export interface ReviewQueueItemResponse {
|
|
|
18215
18388
|
*/
|
|
18216
18389
|
entity_creator_id?: string;
|
|
18217
18390
|
|
|
18391
|
+
/**
|
|
18392
|
+
* When the item was escalated
|
|
18393
|
+
*/
|
|
18394
|
+
escalated_at?: Date;
|
|
18395
|
+
|
|
18396
|
+
/**
|
|
18397
|
+
* ID of the moderator who escalated the item
|
|
18398
|
+
*/
|
|
18399
|
+
escalated_by?: string;
|
|
18400
|
+
|
|
18218
18401
|
/**
|
|
18219
18402
|
* When the item was reviewed
|
|
18220
18403
|
*/
|
|
@@ -18235,6 +18418,8 @@ export interface ReviewQueueItemResponse {
|
|
|
18235
18418
|
|
|
18236
18419
|
entity_creator?: EntityCreatorResponse;
|
|
18237
18420
|
|
|
18421
|
+
escalation_metadata?: EscalationMetadata;
|
|
18422
|
+
|
|
18238
18423
|
feeds_v2_activity?: EnrichedActivity;
|
|
18239
18424
|
|
|
18240
18425
|
feeds_v2_reaction?: Reaction;
|
|
@@ -19296,9 +19481,9 @@ export interface SessionWarningResponse {
|
|
|
19296
19481
|
}
|
|
19297
19482
|
|
|
19298
19483
|
export interface SetRetentionPolicyRequest {
|
|
19299
|
-
|
|
19484
|
+
max_age_hours: number;
|
|
19300
19485
|
|
|
19301
|
-
|
|
19486
|
+
policy: 'old-messages' | 'inactive-channels';
|
|
19302
19487
|
}
|
|
19303
19488
|
|
|
19304
19489
|
export interface SetRetentionPolicyResponse {
|
|
@@ -19823,7 +20008,7 @@ export interface StoriesFeedUpdatedEvent {
|
|
|
19823
20008
|
|
|
19824
20009
|
export interface SubmitActionRequest {
|
|
19825
20010
|
/**
|
|
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
|
|
20011
|
+
* 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
20012
|
*/
|
|
19828
20013
|
|
|
19829
20014
|
action_type:
|
|
@@ -19844,7 +20029,9 @@ export interface SubmitActionRequest {
|
|
|
19844
20029
|
| 'unmask'
|
|
19845
20030
|
| 'kick_user'
|
|
19846
20031
|
| 'end_call'
|
|
19847
|
-
| 'reject_appeal'
|
|
20032
|
+
| 'reject_appeal'
|
|
20033
|
+
| 'escalate'
|
|
20034
|
+
| 'de_escalate';
|
|
19848
20035
|
|
|
19849
20036
|
/**
|
|
19850
20037
|
* UUID of the appeal to act on (required for reject_appeal, optional for other actions)
|
|
@@ -19874,6 +20061,8 @@ export interface SubmitActionRequest {
|
|
|
19874
20061
|
|
|
19875
20062
|
delete_user?: DeleteUserRequestPayload;
|
|
19876
20063
|
|
|
20064
|
+
escalate?: EscalatePayload;
|
|
20065
|
+
|
|
19877
20066
|
flag?: FlagRequest;
|
|
19878
20067
|
|
|
19879
20068
|
mark_reviewed?: MarkReviewedRequestPayload;
|
|
@@ -20677,6 +20866,11 @@ export interface UnbanActionRequestPayload {
|
|
|
20677
20866
|
* Reason for the appeal decision
|
|
20678
20867
|
*/
|
|
20679
20868
|
decision_reason?: string;
|
|
20869
|
+
|
|
20870
|
+
/**
|
|
20871
|
+
* Also remove the future channels ban for this user
|
|
20872
|
+
*/
|
|
20873
|
+
remove_future_channels_ban?: boolean;
|
|
20680
20874
|
}
|
|
20681
20875
|
|
|
20682
20876
|
export interface UnbanRequest {
|
|
@@ -20954,7 +21148,7 @@ export interface UpdateActivityPartialChangeRequest {
|
|
|
20954
21148
|
|
|
20955
21149
|
/**
|
|
20956
21150
|
* @deprecated
|
|
20957
|
-
* Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
|
|
21151
|
+
* 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
21152
|
*/
|
|
20959
21153
|
copy_custom_to_notification?: boolean;
|
|
20960
21154
|
|
|
@@ -20977,7 +21171,7 @@ export interface UpdateActivityPartialChangeRequest {
|
|
|
20977
21171
|
export interface UpdateActivityPartialRequest {
|
|
20978
21172
|
/**
|
|
20979
21173
|
* @deprecated
|
|
20980
|
-
* Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
|
|
21174
|
+
* 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
21175
|
*/
|
|
20982
21176
|
copy_custom_to_notification?: boolean;
|
|
20983
21177
|
|
|
@@ -21020,7 +21214,7 @@ export interface UpdateActivityPartialResponse {
|
|
|
21020
21214
|
export interface UpdateActivityRequest {
|
|
21021
21215
|
/**
|
|
21022
21216
|
* @deprecated
|
|
21023
|
-
* Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
|
|
21217
|
+
* 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
21218
|
*/
|
|
21025
21219
|
copy_custom_to_notification?: boolean;
|
|
21026
21220
|
|
|
@@ -21727,7 +21921,7 @@ export interface UpdateCommandResponse {
|
|
|
21727
21921
|
export interface UpdateCommentPartialRequest {
|
|
21728
21922
|
/**
|
|
21729
21923
|
* @deprecated
|
|
21730
|
-
* Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
|
|
21924
|
+
* Whether to copy custom data to notification activities Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
|
|
21731
21925
|
*/
|
|
21732
21926
|
copy_custom_to_notification?: boolean;
|
|
21733
21927
|
|
|
@@ -21775,7 +21969,7 @@ export interface UpdateCommentRequest {
|
|
|
21775
21969
|
|
|
21776
21970
|
/**
|
|
21777
21971
|
* @deprecated
|
|
21778
|
-
* Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
|
|
21972
|
+
* 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
21973
|
*/
|
|
21780
21974
|
copy_custom_to_notification?: boolean;
|
|
21781
21975
|
|
|
@@ -22007,9 +22201,14 @@ export interface UpdateFollowRequest {
|
|
|
22007
22201
|
*/
|
|
22008
22202
|
target: string;
|
|
22009
22203
|
|
|
22204
|
+
/**
|
|
22205
|
+
* Maximum number of historical activities to copy from the target feed when the follow is first materialized. Not set = unlimited (default). 0 = copy nothing. Range: 0-1000.
|
|
22206
|
+
*/
|
|
22207
|
+
activity_copy_limit?: number;
|
|
22208
|
+
|
|
22010
22209
|
/**
|
|
22011
22210
|
* @deprecated
|
|
22012
|
-
* Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
|
|
22211
|
+
* 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
22212
|
*/
|
|
22014
22213
|
copy_custom_to_notification?: boolean;
|
|
22015
22214
|
|
|
@@ -22627,6 +22826,29 @@ export interface UpsertConfigResponse {
|
|
|
22627
22826
|
config?: ConfigResponse;
|
|
22628
22827
|
}
|
|
22629
22828
|
|
|
22829
|
+
export interface UpsertExternalStorageAWSS3Request {
|
|
22830
|
+
bucket: string;
|
|
22831
|
+
|
|
22832
|
+
region: string;
|
|
22833
|
+
|
|
22834
|
+
role_arn: string;
|
|
22835
|
+
|
|
22836
|
+
path_prefix?: string;
|
|
22837
|
+
}
|
|
22838
|
+
|
|
22839
|
+
export interface UpsertExternalStorageRequest {
|
|
22840
|
+
type: 'aws_s3';
|
|
22841
|
+
|
|
22842
|
+
aws_s3?: UpsertExternalStorageAWSS3Request;
|
|
22843
|
+
}
|
|
22844
|
+
|
|
22845
|
+
export interface UpsertExternalStorageResponse {
|
|
22846
|
+
/**
|
|
22847
|
+
* Duration of the request in milliseconds
|
|
22848
|
+
*/
|
|
22849
|
+
duration: string;
|
|
22850
|
+
}
|
|
22851
|
+
|
|
22630
22852
|
export interface UpsertModerationRuleRequest {
|
|
22631
22853
|
name: string;
|
|
22632
22854
|
|
|
@@ -23625,6 +23847,13 @@ export interface UserUpdatedEvent {
|
|
|
23625
23847
|
received_at?: Date;
|
|
23626
23848
|
}
|
|
23627
23849
|
|
|
23850
|
+
export interface ValidateExternalStorageResponse {
|
|
23851
|
+
/**
|
|
23852
|
+
* Duration of the request in milliseconds
|
|
23853
|
+
*/
|
|
23854
|
+
duration: string;
|
|
23855
|
+
}
|
|
23856
|
+
|
|
23628
23857
|
export interface VelocityFilterConfig {
|
|
23629
23858
|
advanced_filters?: boolean;
|
|
23630
23859
|
|
|
@@ -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,
|