@stream-io/node-sdk 0.8.7 → 0.8.9
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 +16 -0
- package/dist/index.cjs.js +1176 -2384
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +1176 -2384
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/ApiClient.d.ts +1 -2
- package/dist/src/gen/feeds/FeedsApi.d.ts +7 -1
- package/dist/src/gen/models/index.d.ts +322 -4
- package/package.json +1 -1
- package/src/ApiClient.ts +1 -1
- package/src/gen/chat/ChatApi.ts +563 -659
- package/src/gen/common/CommonApi.ts +546 -517
- package/src/gen/feeds/FeedsApi.ts +799 -855
- package/src/gen/model-decoders/decoders.ts +29 -9
- package/src/gen/models/index.ts +336 -6947
- package/src/gen/moderation/ModerationApi.ts +341 -408
- package/src/gen/video/VideoApi.ts +471 -566
|
@@ -768,6 +768,10 @@ export interface ActivityResponse {
|
|
|
768
768
|
* Text content of the activity
|
|
769
769
|
*/
|
|
770
770
|
text?: string;
|
|
771
|
+
/**
|
|
772
|
+
* Number of top-level comments (comments directly on the activity, excluding replies). Only returned by GetActivity when include_top_level_comment_count=true; never set on feed reads or events. Same status/deletion rules as comment_count; not adjusted per viewer.
|
|
773
|
+
*/
|
|
774
|
+
top_level_comment_count?: number;
|
|
771
775
|
/**
|
|
772
776
|
* If visibility is 'tag', this is the tag name
|
|
773
777
|
*/
|
|
@@ -826,6 +830,10 @@ export interface ActivitySelectorConfig {
|
|
|
826
830
|
* Minimum popularity threshold. For the 'popular' selector, omit to use the default (5); values below 1 are rejected
|
|
827
831
|
*/
|
|
828
832
|
min_popularity?: number;
|
|
833
|
+
/**
|
|
834
|
+
* Maximum number of candidate activities this selector contributes to a ranked feed (1-1000). Omit to use the default ranking buffer. Only supported on the popular, proximity, interest and query selectors, and ignored on feeds without ranking
|
|
835
|
+
*/
|
|
836
|
+
ranking_candidate_limit?: number;
|
|
829
837
|
/**
|
|
830
838
|
* Sort parameters for activity selection
|
|
831
839
|
*/
|
|
@@ -854,6 +862,10 @@ export interface ActivitySelectorConfigResponse {
|
|
|
854
862
|
* Minimum popularity threshold. For the 'popular' selector, values below 1 are normalized to the default (5) at read time.
|
|
855
863
|
*/
|
|
856
864
|
min_popularity?: number;
|
|
865
|
+
/**
|
|
866
|
+
* Maximum number of candidate activities this selector contributes to a ranked feed
|
|
867
|
+
*/
|
|
868
|
+
ranking_candidate_limit?: number;
|
|
857
869
|
/**
|
|
858
870
|
* Sort parameters for activity selection
|
|
859
871
|
*/
|
|
@@ -1350,6 +1362,10 @@ export interface AggregationConfig {
|
|
|
1350
1362
|
* Format for activity aggregation
|
|
1351
1363
|
*/
|
|
1352
1364
|
format?: string;
|
|
1365
|
+
/**
|
|
1366
|
+
* Maximum number of activities kept in each aggregated group. Omit to use the default of 100. Must be between 1 and 100 when set.
|
|
1367
|
+
*/
|
|
1368
|
+
group_size?: number;
|
|
1353
1369
|
/**
|
|
1354
1370
|
* Strategy for computing aggregated group scores from member activity scores when ranking is enabled. Valid values: sum, max, avg
|
|
1355
1371
|
*/
|
|
@@ -1394,6 +1410,10 @@ export interface AnalyzeRequest {
|
|
|
1394
1410
|
* Original timestamp when the content was produced. Used as the `published_at` timestamp on per-content log entries that surface in `matched_contents` on aggregation-rule webhooks.
|
|
1395
1411
|
*/
|
|
1396
1412
|
content_published_at?: Date;
|
|
1413
|
+
/**
|
|
1414
|
+
* ISO 3166-1 alpha-2 country the content is aimed at (e.g. US, DE). Forwarded to the AI text provider as country context so it can resolve words whose meaning changes between countries.
|
|
1415
|
+
*/
|
|
1416
|
+
country_code?: string;
|
|
1397
1417
|
/**
|
|
1398
1418
|
* ID of the user who created the content. Required with entity_type + entity_id; omit all three for stateless mode.
|
|
1399
1419
|
*/
|
|
@@ -1576,6 +1596,10 @@ export interface AppealItemResponse {
|
|
|
1576
1596
|
* Text severity level assigned by the AI provider
|
|
1577
1597
|
*/
|
|
1578
1598
|
ai_text_severity?: string;
|
|
1599
|
+
/**
|
|
1600
|
+
* Detected language of the appeal_reason text itself
|
|
1601
|
+
*/
|
|
1602
|
+
appeal_reason_language?: string;
|
|
1579
1603
|
/**
|
|
1580
1604
|
* CID of the channel the entity belongs to (content appeals), or of the channel ban being appealed (stream:user appeals). Empty for a global ban appeal.
|
|
1581
1605
|
*/
|
|
@@ -1620,6 +1644,10 @@ export interface AppealItemResponse {
|
|
|
1620
1644
|
* Per-provider flag records explaining why the action was taken
|
|
1621
1645
|
*/
|
|
1622
1646
|
flags?: Array<ModerationFlagResponse>;
|
|
1647
|
+
/**
|
|
1648
|
+
* Detected languages in the content
|
|
1649
|
+
*/
|
|
1650
|
+
languages?: Array<string>;
|
|
1623
1651
|
entity_content?: ModerationPayload;
|
|
1624
1652
|
moderation_action?: ActionLogResponse;
|
|
1625
1653
|
original_moderation_action?: ActionLogResponse;
|
|
@@ -2441,7 +2469,8 @@ export interface BulkActionAppealsRequest {
|
|
|
2441
2469
|
*/
|
|
2442
2470
|
unban?: UnbanActionRequestPayload;
|
|
2443
2471
|
/**
|
|
2444
|
-
*
|
|
2472
|
+
* @deprecated
|
|
2473
|
+
* Deprecated: Use restore instead, which now also reverses a block or shadow block. Configuration for unblock action.
|
|
2445
2474
|
*/
|
|
2446
2475
|
unblock?: UnblockActionRequestPayload;
|
|
2447
2476
|
/**
|
|
@@ -3179,6 +3208,10 @@ export interface CallRingEvent {
|
|
|
3179
3208
|
* The type of event: "call.notification" in this case
|
|
3180
3209
|
*/
|
|
3181
3210
|
type: string;
|
|
3211
|
+
/**
|
|
3212
|
+
* Identifies this ring of the call session
|
|
3213
|
+
*/
|
|
3214
|
+
ring_id?: string;
|
|
3182
3215
|
}
|
|
3183
3216
|
export interface CallRtmpBroadcastFailedEvent {
|
|
3184
3217
|
/**
|
|
@@ -3896,6 +3929,9 @@ export interface ChannelConfig {
|
|
|
3896
3929
|
blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
|
|
3897
3930
|
partition_size?: number;
|
|
3898
3931
|
partition_ttl?: string;
|
|
3932
|
+
/**
|
|
3933
|
+
* Sets the push notification level for a channel type
|
|
3934
|
+
*/
|
|
3899
3935
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
3900
3936
|
allowed_flag_reasons?: Array<string>;
|
|
3901
3937
|
blocklists?: Array<BlockListOptions>;
|
|
@@ -3992,6 +4028,9 @@ export interface ChannelConfigWithInfo {
|
|
|
3992
4028
|
blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
|
|
3993
4029
|
partition_size?: number;
|
|
3994
4030
|
partition_ttl?: string;
|
|
4031
|
+
/**
|
|
4032
|
+
* Sets the push notification level for a channel type
|
|
4033
|
+
*/
|
|
3995
4034
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
3996
4035
|
allowed_flag_reasons?: Array<string>;
|
|
3997
4036
|
blocklists?: Array<BlockListOptions>;
|
|
@@ -4728,6 +4767,9 @@ export interface ChannelTypeConfig {
|
|
|
4728
4767
|
blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
|
|
4729
4768
|
partition_size?: number;
|
|
4730
4769
|
partition_ttl?: string;
|
|
4770
|
+
/**
|
|
4771
|
+
* Sets the push notification level for a channel type
|
|
4772
|
+
*/
|
|
4731
4773
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
4732
4774
|
allowed_flag_reasons?: Array<string>;
|
|
4733
4775
|
blocklists?: Array<BlockListOptions>;
|
|
@@ -5129,6 +5171,10 @@ export interface CheckRequest {
|
|
|
5129
5171
|
* Original timestamp when the content was produced (for correlating flagged content with source video timeline)
|
|
5130
5172
|
*/
|
|
5131
5173
|
content_published_at?: Date;
|
|
5174
|
+
/**
|
|
5175
|
+
* ISO 3166-1 alpha-2 country the content is aimed at (e.g. US, DE), used as country context by AI text providers
|
|
5176
|
+
*/
|
|
5177
|
+
country_code?: string;
|
|
5132
5178
|
/**
|
|
5133
5179
|
* Whether to run moderation in test mode
|
|
5134
5180
|
*/
|
|
@@ -5155,6 +5201,22 @@ export interface CheckResponse {
|
|
|
5155
5201
|
* Status of the moderation check (completed or pending)
|
|
5156
5202
|
*/
|
|
5157
5203
|
status: string;
|
|
5204
|
+
/**
|
|
5205
|
+
* Intent topic label matched by this request's text (test mode only; omitted when no topic matched)
|
|
5206
|
+
*/
|
|
5207
|
+
intent_matched_topic?: string;
|
|
5208
|
+
/**
|
|
5209
|
+
* Stage 2 conversation score (0-100) computed synchronously against this request's texts (test mode only). Omitted -- not zero -- when intent_matched_topic is set but scoring could not be completed (matched topic disabled/removed, or the scoring call itself failed); only present when a real score was computed
|
|
5210
|
+
*/
|
|
5211
|
+
intent_score?: number;
|
|
5212
|
+
/**
|
|
5213
|
+
* The matched topic's configured score_threshold, for comparison against intent_score (test mode only). Same omitted-not-zero rule as intent_score
|
|
5214
|
+
*/
|
|
5215
|
+
intent_score_threshold?: number;
|
|
5216
|
+
/**
|
|
5217
|
+
* Whether intent_score clears intent_score_threshold, i.e. whether this would fire moderation.intent_detected in production (test mode only). Same omitted-not-zero rule as intent_score
|
|
5218
|
+
*/
|
|
5219
|
+
intent_would_fire?: boolean;
|
|
5158
5220
|
/**
|
|
5159
5221
|
* ID of the running moderation task
|
|
5160
5222
|
*/
|
|
@@ -5164,6 +5226,9 @@ export interface CheckResponse {
|
|
|
5164
5226
|
*/
|
|
5165
5227
|
triggered_rules?: Array<TriggeredRuleResponse>;
|
|
5166
5228
|
item?: ReviewQueueItemResponse;
|
|
5229
|
+
/**
|
|
5230
|
+
* @deprecated
|
|
5231
|
+
*/
|
|
5167
5232
|
triggered_rule?: TriggeredRuleResponse;
|
|
5168
5233
|
}
|
|
5169
5234
|
export interface CheckS3AccessRequest {
|
|
@@ -5717,6 +5782,9 @@ export interface ConfigOverridesRequest {
|
|
|
5717
5782
|
* Maximum message length
|
|
5718
5783
|
*/
|
|
5719
5784
|
max_message_length?: number;
|
|
5785
|
+
/**
|
|
5786
|
+
* Overrides the push notification level for this channel
|
|
5787
|
+
*/
|
|
5720
5788
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
5721
5789
|
/**
|
|
5722
5790
|
* Enable/disable quotes
|
|
@@ -5803,6 +5871,7 @@ export interface ConfigResponse {
|
|
|
5803
5871
|
automod_toxicity_config?: AutomodToxicityConfig;
|
|
5804
5872
|
block_list_config?: BlockListConfig;
|
|
5805
5873
|
flood_config?: FloodConfig;
|
|
5874
|
+
intent_config?: IntentConfigResponse;
|
|
5806
5875
|
llm_config?: LLMConfig;
|
|
5807
5876
|
velocity_filter_config?: VelocityFilterConfig;
|
|
5808
5877
|
video_call_rule_config?: VideoCallRuleConfig;
|
|
@@ -6099,6 +6168,9 @@ export interface CreateChannelTypeResponse {
|
|
|
6099
6168
|
created_at: Date;
|
|
6100
6169
|
custom_events: boolean;
|
|
6101
6170
|
delivery_events: boolean;
|
|
6171
|
+
/**
|
|
6172
|
+
* Duration of the request in milliseconds
|
|
6173
|
+
*/
|
|
6102
6174
|
duration: string;
|
|
6103
6175
|
mark_messages_pending: boolean;
|
|
6104
6176
|
max_message_length: number;
|
|
@@ -6127,6 +6199,9 @@ export interface CreateChannelTypeResponse {
|
|
|
6127
6199
|
blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
|
|
6128
6200
|
partition_size?: number;
|
|
6129
6201
|
partition_ttl?: string;
|
|
6202
|
+
/**
|
|
6203
|
+
* Sets the push notification level for a channel type
|
|
6204
|
+
*/
|
|
6130
6205
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
6131
6206
|
allowed_flag_reasons?: Array<string>;
|
|
6132
6207
|
blocklists?: Array<BlockListOptions>;
|
|
@@ -6507,6 +6582,7 @@ export interface CreatePollRequest {
|
|
|
6507
6582
|
* Indicates the maximum amount of votes a user can cast
|
|
6508
6583
|
*/
|
|
6509
6584
|
max_votes_allowed?: number;
|
|
6585
|
+
team?: string;
|
|
6510
6586
|
user_id?: string;
|
|
6511
6587
|
voting_visibility?: 'anonymous' | 'public';
|
|
6512
6588
|
options?: Array<PollOptionInput>;
|
|
@@ -6558,6 +6634,7 @@ export interface CreateQueueRequest {
|
|
|
6558
6634
|
user?: UserRequest;
|
|
6559
6635
|
}
|
|
6560
6636
|
export interface CreateReminderRequest {
|
|
6637
|
+
expires_at?: Date;
|
|
6561
6638
|
remind_at?: Date;
|
|
6562
6639
|
user_id?: string;
|
|
6563
6640
|
/**
|
|
@@ -7124,6 +7201,15 @@ export interface DeleteFeedsBatchResponse {
|
|
|
7124
7201
|
*/
|
|
7125
7202
|
task_id: string;
|
|
7126
7203
|
}
|
|
7204
|
+
export interface DeleteFeedsRetentionPolicyRequest {
|
|
7205
|
+
policy: 'old-activities';
|
|
7206
|
+
}
|
|
7207
|
+
export interface DeleteFeedsRetentionPolicyResponse {
|
|
7208
|
+
/**
|
|
7209
|
+
* Duration of the request in milliseconds
|
|
7210
|
+
*/
|
|
7211
|
+
duration: string;
|
|
7212
|
+
}
|
|
7127
7213
|
export interface DeleteImportV2TaskResponse {
|
|
7128
7214
|
/**
|
|
7129
7215
|
* Duration of the request in milliseconds
|
|
@@ -7798,6 +7884,7 @@ export interface EventHook {
|
|
|
7798
7884
|
sns_secret?: string;
|
|
7799
7885
|
sns_topic_arn?: string;
|
|
7800
7886
|
sqs_auth_type?: string;
|
|
7887
|
+
sqs_event_based_message_group_id_enabled?: boolean;
|
|
7801
7888
|
sqs_key?: string;
|
|
7802
7889
|
sqs_queue_url?: string;
|
|
7803
7890
|
sqs_region?: string;
|
|
@@ -8657,6 +8744,12 @@ export interface FeedsReactionResponse {
|
|
|
8657
8744
|
comment_id?: string;
|
|
8658
8745
|
custom?: Record<string, any>;
|
|
8659
8746
|
}
|
|
8747
|
+
export interface FeedsRetentionRunResponse {
|
|
8748
|
+
app_pk: number;
|
|
8749
|
+
date: string;
|
|
8750
|
+
policy: string;
|
|
8751
|
+
stats: RunStats;
|
|
8752
|
+
}
|
|
8660
8753
|
export interface FeedsShareResponse {
|
|
8661
8754
|
activity_id: string;
|
|
8662
8755
|
created_at: Date;
|
|
@@ -8806,6 +8899,10 @@ export interface FilterConfigResponse {
|
|
|
8806
8899
|
* The moderation_payload.custom keys the app has configured as review-queue filter chips (via moderation_dashboard_preferences.filterable_custom_keys). Discovery hint for the dashboard only — the filter accepts any custom key regardless of this list.
|
|
8807
8900
|
*/
|
|
8808
8901
|
filterable_custom_keys?: Array<string>;
|
|
8902
|
+
/**
|
|
8903
|
+
* Names of the app's moderation rules, available as filter values on the `label` field when filtering rule-flagged content. Includes disabled rules, since items flagged before a rule was turned off still carry its name; excludes deleted ones. Scoped to the caller's teams on a multi-tenant app. Capped at 30 names, ordered by name, so an app above that cap is listed partially.
|
|
8904
|
+
*/
|
|
8905
|
+
rule_names?: Array<string>;
|
|
8809
8906
|
/**
|
|
8810
8907
|
* AI image moderation labels available as filter values, as a map of L1 label to its L2 sub-labels. Reflects the app's effective image taxonomy: custom Bodyguard taxonomy when enabled, otherwise the standard catalogue of the org's enabled image providers.
|
|
8811
8908
|
*/
|
|
@@ -8957,6 +9054,7 @@ export interface FloodSimilarConfig {
|
|
|
8957
9054
|
time_window?: string;
|
|
8958
9055
|
}
|
|
8959
9056
|
export interface FloodSimilarRuleParameters {
|
|
9057
|
+
min_text_length?: number;
|
|
8960
9058
|
similarity_distance?: number;
|
|
8961
9059
|
threshold?: number;
|
|
8962
9060
|
time_window?: string;
|
|
@@ -9158,6 +9256,10 @@ export interface FullUserResponse {
|
|
|
9158
9256
|
shadow_banned: boolean;
|
|
9159
9257
|
total_unread_count: number;
|
|
9160
9258
|
unread_channels: number;
|
|
9259
|
+
/**
|
|
9260
|
+
* @deprecated
|
|
9261
|
+
* Deprecated: Use total_unread_count instead.
|
|
9262
|
+
*/
|
|
9161
9263
|
unread_count: number;
|
|
9162
9264
|
unread_threads: number;
|
|
9163
9265
|
updated_at: Date;
|
|
@@ -9368,6 +9470,9 @@ export interface GetChannelTypeResponse {
|
|
|
9368
9470
|
blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
|
|
9369
9471
|
partition_size?: number;
|
|
9370
9472
|
partition_ttl?: string;
|
|
9473
|
+
/**
|
|
9474
|
+
* Sets the push notification level for a channel type
|
|
9475
|
+
*/
|
|
9371
9476
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
9372
9477
|
allowed_flag_reasons?: Array<string>;
|
|
9373
9478
|
blocklists?: Array<BlockListOptions>;
|
|
@@ -9404,6 +9509,10 @@ export interface GetCommentResponse {
|
|
|
9404
9509
|
comment: CommentResponse;
|
|
9405
9510
|
}
|
|
9406
9511
|
export interface GetCommentsResponse {
|
|
9512
|
+
/**
|
|
9513
|
+
* Total number of comments on the object, including replies at every depth
|
|
9514
|
+
*/
|
|
9515
|
+
comment_count: number;
|
|
9407
9516
|
duration: string;
|
|
9408
9517
|
/**
|
|
9409
9518
|
* Sort order used for the comments (first, last, top, best, controversial)
|
|
@@ -9415,6 +9524,10 @@ export interface GetCommentsResponse {
|
|
|
9415
9524
|
comments: Array<ThreadedCommentResponse>;
|
|
9416
9525
|
next?: string;
|
|
9417
9526
|
prev?: string;
|
|
9527
|
+
/**
|
|
9528
|
+
* Number of comments directly on the object, excluding replies. Independent of depth, replies_limit and id_around, and not adjusted per viewer. Only present when include_top_level_comment_count is set
|
|
9529
|
+
*/
|
|
9530
|
+
top_level_comment_count?: number;
|
|
9418
9531
|
}
|
|
9419
9532
|
export interface GetConfigResponse {
|
|
9420
9533
|
duration: string;
|
|
@@ -9537,6 +9650,36 @@ export interface GetFeedsRateLimitsResponse {
|
|
|
9537
9650
|
*/
|
|
9538
9651
|
web?: Record<string, LimitInfoResponse>;
|
|
9539
9652
|
}
|
|
9653
|
+
export interface GetFeedsRetentionPolicyResponse {
|
|
9654
|
+
/**
|
|
9655
|
+
* Duration of the request in milliseconds
|
|
9656
|
+
*/
|
|
9657
|
+
duration: string;
|
|
9658
|
+
enabled: boolean;
|
|
9659
|
+
policies: Array<RetentionPolicy>;
|
|
9660
|
+
}
|
|
9661
|
+
export interface GetFeedsRetentionPolicyRunsRequest {
|
|
9662
|
+
limit?: number;
|
|
9663
|
+
next?: string;
|
|
9664
|
+
prev?: string;
|
|
9665
|
+
/**
|
|
9666
|
+
* Array of sort parameters
|
|
9667
|
+
*/
|
|
9668
|
+
sort?: Array<SortParamRequest>;
|
|
9669
|
+
/**
|
|
9670
|
+
* Filter conditions to apply to the query
|
|
9671
|
+
*/
|
|
9672
|
+
filter_conditions?: Record<string, any>;
|
|
9673
|
+
}
|
|
9674
|
+
export interface GetFeedsRetentionPolicyRunsResponse {
|
|
9675
|
+
/**
|
|
9676
|
+
* Duration of the request in milliseconds
|
|
9677
|
+
*/
|
|
9678
|
+
duration: string;
|
|
9679
|
+
runs: Array<FeedsRetentionRunResponse>;
|
|
9680
|
+
next?: string;
|
|
9681
|
+
prev?: string;
|
|
9682
|
+
}
|
|
9540
9683
|
export interface GetFlagCountRequest {
|
|
9541
9684
|
/**
|
|
9542
9685
|
* ID of the user whose content was flagged
|
|
@@ -10455,6 +10598,130 @@ export interface InsertActionLogRequest {
|
|
|
10455
10598
|
export interface InsertActionLogResponse {
|
|
10456
10599
|
duration: string;
|
|
10457
10600
|
}
|
|
10601
|
+
export interface IntentBufferedItem {
|
|
10602
|
+
/**
|
|
10603
|
+
* The ID of the user who authored the buffered message or comment
|
|
10604
|
+
*/
|
|
10605
|
+
author_user_id: string;
|
|
10606
|
+
/**
|
|
10607
|
+
* When the buffered message or comment was created
|
|
10608
|
+
*/
|
|
10609
|
+
created_at: Date;
|
|
10610
|
+
/**
|
|
10611
|
+
* The ID of the buffered message or comment
|
|
10612
|
+
*/
|
|
10613
|
+
id: string;
|
|
10614
|
+
/**
|
|
10615
|
+
* The text of the buffered message or comment
|
|
10616
|
+
*/
|
|
10617
|
+
text: string;
|
|
10618
|
+
}
|
|
10619
|
+
export interface IntentConfigRequest {
|
|
10620
|
+
/**
|
|
10621
|
+
* Topics to classify conversation text against (max 20, labels must be unique)
|
|
10622
|
+
*/
|
|
10623
|
+
topics?: Array<IntentTopicRequest>;
|
|
10624
|
+
}
|
|
10625
|
+
export interface IntentConfigResponse {
|
|
10626
|
+
/**
|
|
10627
|
+
* Topics conversation text is classified against
|
|
10628
|
+
*/
|
|
10629
|
+
topics: Array<IntentTopicResponse>;
|
|
10630
|
+
}
|
|
10631
|
+
export interface IntentDetectedEvent {
|
|
10632
|
+
/**
|
|
10633
|
+
* The channel CID (chat) or feed ID (feeds) the buffered conversation belongs to
|
|
10634
|
+
*/
|
|
10635
|
+
conversation_id: string;
|
|
10636
|
+
created_at: Date;
|
|
10637
|
+
/**
|
|
10638
|
+
* The ID of the most recently buffered entity
|
|
10639
|
+
*/
|
|
10640
|
+
entity_id: string;
|
|
10641
|
+
/**
|
|
10642
|
+
* The type of the most recently buffered entity (chat message or feed comment)
|
|
10643
|
+
*/
|
|
10644
|
+
entity_type: string;
|
|
10645
|
+
/**
|
|
10646
|
+
* The configured intent topic label that started the buffer
|
|
10647
|
+
*/
|
|
10648
|
+
matched_topic: string;
|
|
10649
|
+
/**
|
|
10650
|
+
* The Stage 2 conversation score (0-100) that cleared score_threshold
|
|
10651
|
+
*/
|
|
10652
|
+
score: number;
|
|
10653
|
+
/**
|
|
10654
|
+
* The ID of the user whose conversation was scored
|
|
10655
|
+
*/
|
|
10656
|
+
user_id: string;
|
|
10657
|
+
/**
|
|
10658
|
+
* The buffered items that were scored, in the order they were captured
|
|
10659
|
+
*/
|
|
10660
|
+
items: Array<IntentBufferedItem>;
|
|
10661
|
+
custom: Record<string, any>;
|
|
10662
|
+
type: string;
|
|
10663
|
+
received_at?: Date;
|
|
10664
|
+
}
|
|
10665
|
+
export interface IntentTopicRequest {
|
|
10666
|
+
/**
|
|
10667
|
+
* Unique topic label (e.g. purchase_intent)
|
|
10668
|
+
*/
|
|
10669
|
+
label: string;
|
|
10670
|
+
/**
|
|
10671
|
+
* How long the buffer collects items before scoring runs
|
|
10672
|
+
*/
|
|
10673
|
+
analysis_cooldown_seconds?: number;
|
|
10674
|
+
/**
|
|
10675
|
+
* Optional description used in the classification prompt; the label alone is used when empty
|
|
10676
|
+
*/
|
|
10677
|
+
description?: string;
|
|
10678
|
+
/**
|
|
10679
|
+
* Whether this topic is evaluated
|
|
10680
|
+
*/
|
|
10681
|
+
enabled?: boolean;
|
|
10682
|
+
/**
|
|
10683
|
+
* Items buffered per conversation before scoring runs early
|
|
10684
|
+
*/
|
|
10685
|
+
max_captured_items?: number;
|
|
10686
|
+
/**
|
|
10687
|
+
* Suppresses this topic for a user and conversation after it fires; 0 uses the default
|
|
10688
|
+
*/
|
|
10689
|
+
refire_cooldown_seconds?: number;
|
|
10690
|
+
/**
|
|
10691
|
+
* Conversation score (0-100) required to fire moderation.intent_detected
|
|
10692
|
+
*/
|
|
10693
|
+
score_threshold?: number;
|
|
10694
|
+
}
|
|
10695
|
+
export interface IntentTopicResponse {
|
|
10696
|
+
/**
|
|
10697
|
+
* How long the buffer collects items before scoring runs
|
|
10698
|
+
*/
|
|
10699
|
+
analysis_cooldown_seconds: number;
|
|
10700
|
+
/**
|
|
10701
|
+
* Whether this topic is evaluated
|
|
10702
|
+
*/
|
|
10703
|
+
enabled: boolean;
|
|
10704
|
+
/**
|
|
10705
|
+
* Unique topic label (e.g. purchase_intent)
|
|
10706
|
+
*/
|
|
10707
|
+
label: string;
|
|
10708
|
+
/**
|
|
10709
|
+
* Items buffered per conversation before scoring runs early
|
|
10710
|
+
*/
|
|
10711
|
+
max_captured_items: number;
|
|
10712
|
+
/**
|
|
10713
|
+
* Conversation score (0-100) required to fire moderation.intent_detected
|
|
10714
|
+
*/
|
|
10715
|
+
score_threshold: number;
|
|
10716
|
+
/**
|
|
10717
|
+
* Optional description used in the classification prompt; the label alone is used when empty
|
|
10718
|
+
*/
|
|
10719
|
+
description?: string;
|
|
10720
|
+
/**
|
|
10721
|
+
* Suppresses this topic for a user and conversation after it fires; 0 uses the default
|
|
10722
|
+
*/
|
|
10723
|
+
refire_cooldown_seconds?: number;
|
|
10724
|
+
}
|
|
10458
10725
|
export interface InterestTagResponse {
|
|
10459
10726
|
/**
|
|
10460
10727
|
* Lifetime number of distinct reacted-to activities tagged with this value, without decay; 0 for manually set tags
|
|
@@ -12479,6 +12746,7 @@ export interface ModerationMarkReviewedEvent {
|
|
|
12479
12746
|
message?: MessageResponse;
|
|
12480
12747
|
}
|
|
12481
12748
|
export interface ModerationPayload {
|
|
12749
|
+
country_code?: string;
|
|
12482
12750
|
audios?: Array<string>;
|
|
12483
12751
|
image_ordered_keys?: Array<string>;
|
|
12484
12752
|
images?: Array<string>;
|
|
@@ -13125,6 +13393,10 @@ export interface OwnUserResponse {
|
|
|
13125
13393
|
role: string;
|
|
13126
13394
|
total_unread_count: number;
|
|
13127
13395
|
unread_channels: number;
|
|
13396
|
+
/**
|
|
13397
|
+
* @deprecated
|
|
13398
|
+
* Deprecated: Use total_unread_count instead.
|
|
13399
|
+
*/
|
|
13128
13400
|
unread_count: number;
|
|
13129
13401
|
unread_threads: number;
|
|
13130
13402
|
updated_at: Date;
|
|
@@ -13606,6 +13878,7 @@ export interface PollOptionResponseData {
|
|
|
13606
13878
|
id: string;
|
|
13607
13879
|
text: string;
|
|
13608
13880
|
custom: Record<string, any>;
|
|
13881
|
+
text_i18n?: Record<string, string>;
|
|
13609
13882
|
}
|
|
13610
13883
|
export interface PollResponse {
|
|
13611
13884
|
/**
|
|
@@ -13642,6 +13915,8 @@ export interface PollResponseData {
|
|
|
13642
13915
|
* User response object
|
|
13643
13916
|
*/
|
|
13644
13917
|
created_by?: UserResponse;
|
|
13918
|
+
description_i18n?: Record<string, string>;
|
|
13919
|
+
name_i18n?: Record<string, string>;
|
|
13645
13920
|
}
|
|
13646
13921
|
export interface PollVoteResponse {
|
|
13647
13922
|
/**
|
|
@@ -13660,6 +13935,7 @@ export interface PollVoteResponseData {
|
|
|
13660
13935
|
answer_text?: string;
|
|
13661
13936
|
is_answer?: boolean;
|
|
13662
13937
|
user_id?: string;
|
|
13938
|
+
answer_text_i18n?: Record<string, string>;
|
|
13663
13939
|
/**
|
|
13664
13940
|
* User response object
|
|
13665
13941
|
*/
|
|
@@ -15170,7 +15446,7 @@ export interface QueryReviewQueueRequest {
|
|
|
15170
15446
|
*/
|
|
15171
15447
|
sort?: Array<SortParamRequest>;
|
|
15172
15448
|
/**
|
|
15173
|
-
* Filter conditions for review queue items. Accepts built-in fields (e.g. status, channel_cid, severity, recommended_action) and customer-supplied moderation_payload.custom keys: any key that is not a built-in field is matched against the item's custom moderation data (e.g. {"location_id": "loc-42"}). Use filter_config.filterable_custom_keys to discover which custom keys the app exposes as chips.
|
|
15449
|
+
* Filter conditions for review queue items. Accepts built-in fields (e.g. status, channel_cid, severity, recommended_action) and customer-supplied moderation_payload.custom keys: any key that is not a built-in field is matched against the item's custom moderation data (e.g. {"location_id": "loc-42"}). Use filter_config.filterable_custom_keys to discover which custom keys the app exposes as chips. content_text searches the moderated text: "$q" is a keyword search (terms ANDed, no adjacency) over the indexed tsvector, while "$eq" (or "$in" for several wordings) matches the text exactly. The exact form is unindexed, so scope it with date_range rather than running it across the whole queue.
|
|
15174
15450
|
*/
|
|
15175
15451
|
filter?: Record<string, any>;
|
|
15176
15452
|
/**
|
|
@@ -15984,6 +16260,7 @@ export interface ReminderResponseData {
|
|
|
15984
16260
|
message_id: string;
|
|
15985
16261
|
updated_at: Date;
|
|
15986
16262
|
user_id: string;
|
|
16263
|
+
expires_at?: Date;
|
|
15987
16264
|
remind_at?: Date;
|
|
15988
16265
|
/**
|
|
15989
16266
|
* Represents channel in chat
|
|
@@ -16373,6 +16650,10 @@ export interface RingCallRequest {
|
|
|
16373
16650
|
* Members that should receive the ring. If no ids are provided, all call members who are not already in the call will receive ring notifications.
|
|
16374
16651
|
*/
|
|
16375
16652
|
members_ids?: Array<string>;
|
|
16653
|
+
/**
|
|
16654
|
+
* Opaque context stored on the ring attempt; refs and IDs only
|
|
16655
|
+
*/
|
|
16656
|
+
custom?: Record<string, any>;
|
|
16376
16657
|
}
|
|
16377
16658
|
export interface RingCallResponse {
|
|
16378
16659
|
duration: string;
|
|
@@ -16380,6 +16661,10 @@ export interface RingCallResponse {
|
|
|
16380
16661
|
* List of members ringing notification was sent to
|
|
16381
16662
|
*/
|
|
16382
16663
|
members_ids: Array<string>;
|
|
16664
|
+
/**
|
|
16665
|
+
* The ring this call created, for correlating the accept, reject and missed outcomes that follow
|
|
16666
|
+
*/
|
|
16667
|
+
ring_id?: string;
|
|
16383
16668
|
}
|
|
16384
16669
|
export interface RingSettings {
|
|
16385
16670
|
auto_cancel_timeout_ms: number;
|
|
@@ -16458,6 +16743,7 @@ export interface RuleBuilderCondition {
|
|
|
16458
16743
|
ocr_content_params?: OCRContentParameters;
|
|
16459
16744
|
text_content_params?: TextContentParameters;
|
|
16460
16745
|
text_rule_params?: TextRuleParameters;
|
|
16746
|
+
user_channel_count_params?: UserChannelCountRuleParameters;
|
|
16461
16747
|
user_created_within_params?: UserCreatedWithinParameters;
|
|
16462
16748
|
user_custom_property_params?: UserCustomPropertyParameters;
|
|
16463
16749
|
user_flag_count_rule_params?: FlagCountRuleParameters;
|
|
@@ -17195,6 +17481,19 @@ export interface SessionWarningResponse {
|
|
|
17195
17481
|
warning: string;
|
|
17196
17482
|
time?: Date;
|
|
17197
17483
|
}
|
|
17484
|
+
export interface SetFeedsRetentionPolicyRequest {
|
|
17485
|
+
max_age_hours: number;
|
|
17486
|
+
policy: 'old-activities';
|
|
17487
|
+
enabled?: boolean;
|
|
17488
|
+
}
|
|
17489
|
+
export interface SetFeedsRetentionPolicyResponse {
|
|
17490
|
+
/**
|
|
17491
|
+
* Duration of the request in milliseconds
|
|
17492
|
+
*/
|
|
17493
|
+
duration: string;
|
|
17494
|
+
enabled: boolean;
|
|
17495
|
+
policy: RetentionPolicy;
|
|
17496
|
+
}
|
|
17198
17497
|
export interface SetRetentionPolicyRequest {
|
|
17199
17498
|
max_age_hours: number;
|
|
17200
17499
|
policy: 'old-messages' | 'inactive-channels';
|
|
@@ -17677,7 +17976,8 @@ export interface SubmitActionRequest {
|
|
|
17677
17976
|
*/
|
|
17678
17977
|
unban?: UnbanActionRequestPayload;
|
|
17679
17978
|
/**
|
|
17680
|
-
*
|
|
17979
|
+
* @deprecated
|
|
17980
|
+
* Deprecated: Use restore instead, which now also reverses a block or shadow block. Configuration for unblock action.
|
|
17681
17981
|
*/
|
|
17682
17982
|
unblock?: UnblockActionRequestPayload;
|
|
17683
17983
|
/**
|
|
@@ -18321,6 +18621,7 @@ export interface UnbanRequest {
|
|
|
18321
18621
|
*/
|
|
18322
18622
|
unbanned_by_id?: string;
|
|
18323
18623
|
/**
|
|
18624
|
+
* @deprecated
|
|
18324
18625
|
* User request object
|
|
18325
18626
|
*/
|
|
18326
18627
|
unbanned_by?: UserRequest;
|
|
@@ -19035,6 +19336,9 @@ export interface UpdateChannelTypeRequest {
|
|
|
19035
19336
|
partition_size?: number;
|
|
19036
19337
|
partition_ttl?: string;
|
|
19037
19338
|
polls?: boolean;
|
|
19339
|
+
/**
|
|
19340
|
+
* Sets the push notification level for a channel type
|
|
19341
|
+
*/
|
|
19038
19342
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
19039
19343
|
push_notifications?: boolean;
|
|
19040
19344
|
quotes?: boolean;
|
|
@@ -19071,6 +19375,9 @@ export interface UpdateChannelTypeResponse {
|
|
|
19071
19375
|
created_at: Date;
|
|
19072
19376
|
custom_events: boolean;
|
|
19073
19377
|
delivery_events: boolean;
|
|
19378
|
+
/**
|
|
19379
|
+
* Duration of the request in milliseconds
|
|
19380
|
+
*/
|
|
19074
19381
|
duration: string;
|
|
19075
19382
|
mark_messages_pending: boolean;
|
|
19076
19383
|
max_message_length: number;
|
|
@@ -19099,6 +19406,9 @@ export interface UpdateChannelTypeResponse {
|
|
|
19099
19406
|
blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
|
|
19100
19407
|
partition_size?: number;
|
|
19101
19408
|
partition_ttl?: string;
|
|
19409
|
+
/**
|
|
19410
|
+
* Sets the push notification level for a channel type
|
|
19411
|
+
*/
|
|
19102
19412
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
19103
19413
|
allowed_flag_reasons?: Array<string>;
|
|
19104
19414
|
blocklists?: Array<BlockListOptions>;
|
|
@@ -19701,6 +20011,7 @@ export interface UpdateQueueRequest {
|
|
|
19701
20011
|
user?: UserRequest;
|
|
19702
20012
|
}
|
|
19703
20013
|
export interface UpdateReminderRequest {
|
|
20014
|
+
expires_at?: Date;
|
|
19704
20015
|
remind_at?: Date;
|
|
19705
20016
|
user_id?: string;
|
|
19706
20017
|
/**
|
|
@@ -19878,7 +20189,7 @@ export interface UpdateUsersResponse {
|
|
|
19878
20189
|
duration: string;
|
|
19879
20190
|
/**
|
|
19880
20191
|
* @deprecated
|
|
19881
|
-
* Deprecated:
|
|
20192
|
+
* Deprecated: Always empty. Removing a user from a team no longer deletes their memberships in that team's channels, so there is no task to poll.
|
|
19882
20193
|
*/
|
|
19883
20194
|
membership_deletion_task_id: string;
|
|
19884
20195
|
/**
|
|
@@ -20075,6 +20386,7 @@ export interface UpsertConfigRequest {
|
|
|
20075
20386
|
bodyguard_config?: AITextConfig;
|
|
20076
20387
|
flood_config?: FloodConfig;
|
|
20077
20388
|
google_vision_config?: GoogleVisionConfig;
|
|
20389
|
+
intent_config?: IntentConfigRequest;
|
|
20078
20390
|
llm_config?: LLMConfig;
|
|
20079
20391
|
rule_builder_config?: RuleBuilderConfig;
|
|
20080
20392
|
/**
|
|
@@ -20345,6 +20657,10 @@ export interface UserBannedEvent {
|
|
|
20345
20657
|
channel_custom?: Record<string, any>;
|
|
20346
20658
|
created_by?: UserResponseCommonFields;
|
|
20347
20659
|
}
|
|
20660
|
+
export interface UserChannelCountRuleParameters {
|
|
20661
|
+
threshold?: number;
|
|
20662
|
+
time_window?: string;
|
|
20663
|
+
}
|
|
20348
20664
|
export interface UserCreatedWithinParameters {
|
|
20349
20665
|
max_age?: string;
|
|
20350
20666
|
}
|
|
@@ -21292,6 +21608,8 @@ export type WHEvent = ({
|
|
|
21292
21608
|
} & ModerationFlaggedEvent) | ({
|
|
21293
21609
|
type: 'moderation.image_analysis.complete';
|
|
21294
21610
|
} & ModerationImageAnalysisCompleteEvent) | ({
|
|
21611
|
+
type: 'moderation.intent_detected';
|
|
21612
|
+
} & IntentDetectedEvent) | ({
|
|
21295
21613
|
type: 'moderation.mark_reviewed';
|
|
21296
21614
|
} & ModerationMarkReviewedEvent) | ({
|
|
21297
21615
|
type: 'moderation.text_analysis.complete';
|
package/package.json
CHANGED
package/src/ApiClient.ts
CHANGED