@stream-io/node-sdk 0.8.8 → 0.8.10
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 +15 -0
- package/dist/index.cjs.js +1171 -2371
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +1171 -2371
- 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 +279 -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 +545 -517
- package/src/gen/feeds/FeedsApi.ts +799 -855
- package/src/gen/model-decoders/decoders.ts +29 -0
- package/src/gen/models/index.ts +293 -4
- package/src/gen/moderation/ModerationApi.ts +339 -408
- package/src/gen/video/VideoApi.ts +470 -566
package/dist/src/ApiClient.d.ts
CHANGED
|
@@ -7,8 +7,7 @@ export declare class ApiClient {
|
|
|
7
7
|
*
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
|
-
sendRequest: <T>(method: string, url: string, pathParams?: Record<string, string>, queryParams?: Record<string, any>, body?: any, requestContentType?: string) => Promise<{
|
|
11
|
-
body: T;
|
|
10
|
+
sendRequest: <T>(method: string, url: string, pathParams?: Record<string, string>, queryParams?: Record<string, any>, body?: any, requestContentType?: string) => Promise<T & {
|
|
12
11
|
metadata: RequestMetadata;
|
|
13
12
|
}>;
|
|
14
13
|
protected multipartBodyStringify: (body: Record<string, any>) => FormData;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiClient, StreamResponse } from '../../gen-imports';
|
|
2
|
-
import { AcceptFeedMemberInviteRequest, AcceptFeedMemberInviteResponse, AcceptFollowRequest, AcceptFollowResponse, ActivityFeedbackRequest, ActivityFeedbackResponse, AddActivityRequest, AddActivityResponse, AddBookmarkRequest, AddBookmarkResponse, AddCommentBookmarkRequest, AddCommentBookmarkResponse, AddCommentReactionRequest, AddCommentReactionResponse, AddCommentRequest, AddCommentResponse, AddCommentsBatchRequest, AddCommentsBatchResponse, AddReactionRequest, AddReactionResponse, BatchQueryActivityReactionsRequest, BatchQueryActivityReactionsResponse, BatchQueryCommentReactionsRequest, BatchQueryCommentReactionsResponse, CastPollVoteRequest, ChangeFeedVisibilityRequest, ChangeFeedVisibilityResponse, CreateCollectionsRequest, CreateCollectionsResponse, CreateFeedGroupRequest, CreateFeedGroupResponse, CreateFeedViewRequest, CreateFeedViewResponse, CreateFeedsBatchRequest, CreateFeedsBatchResponse, CreateMembershipLevelRequest, CreateMembershipLevelResponse, DeleteActivitiesRequest, DeleteActivitiesResponse, DeleteActivityReactionResponse, DeleteActivityResponse, DeleteBookmarkFolderResponse, DeleteBookmarkResponse, DeleteCollectionsResponse, DeleteCommentBookmarkResponse, DeleteCommentReactionResponse, DeleteCommentResponse, DeleteFeedGroupResponse, DeleteFeedResponse, DeleteFeedUserDataRequest, DeleteFeedUserDataResponse, DeleteFeedViewResponse, DeleteFeedsBatchRequest, DeleteFeedsBatchResponse, DeleteUserInterestsResponse, ExportFeedUserDataResponse, FollowBatchRequest, FollowBatchResponse, FollowRequest, GetActivityResponse, GetCommentRepliesResponse, GetCommentResponse, GetCommentsResponse, GetFeedCountsResponse, GetFeedGroupResponse, GetFeedViewResponse, GetFeedVisibilityResponse, GetFeedsRateLimitsResponse, GetFollowSuggestionsResponse, GetOrCreateFeedGroupRequest, GetOrCreateFeedGroupResponse, GetOrCreateFeedRequest, GetOrCreateFeedResponse, GetOrCreateFeedViewRequest, GetOrCreateFeedViewResponse, GetOrCreateFollowResponse, GetOrCreateUnfollowRequest, GetOrCreateUnfollowResponse, GetUserInterestsResponse, ListFeedGroupsResponse, ListFeedViewsResponse, ListFeedVisibilitiesResponse, MarkActivityRequest, OwnBatchRequest, OwnBatchResponse, PinActivityRequest, PinActivityResponse, PollVoteResponse, QueryActivitiesRequest, QueryActivitiesResponse, QueryActivityReactionsRequest, QueryActivityReactionsResponse, QueryActivitySharesResponse, QueryBookmarkFoldersRequest, QueryBookmarkFoldersResponse, QueryBookmarksRequest, QueryBookmarksResponse, QueryCollectionsRequest, QueryCollectionsResponse, QueryCommentReactionsRequest, QueryCommentReactionsResponse, QueryCommentsRequest, QueryCommentsResponse, QueryFeedMembersRequest, QueryFeedMembersResponse, QueryFeedsRequest, QueryFeedsResponse, QueryFeedsUsageStatsRequest, QueryFeedsUsageStatsResponse, QueryFollowsRequest, QueryFollowsResponse, QueryMembershipLevelsRequest, QueryMembershipLevelsResponse, QueryPinnedActivitiesRequest, QueryPinnedActivitiesResponse, QueryRevisionHistoryRequest, QueryRevisionHistoryResponse, ReadCollectionsResponse, RejectFeedMemberInviteRequest, RejectFeedMemberInviteResponse, RejectFollowRequest, RejectFollowResponse, Response, RestoreActivityRequest, RestoreActivityResponse, RestoreCommentRequest, RestoreCommentResponse, RestoreFeedGroupResponse, SingleFollowResponse, TrackActivityMetricsRequest, TrackActivityMetricsResponse, TranslateActivityRequest, TranslateActivityResponse, TranslateCommentRequest, TranslateCommentResponse, UnfollowBatchRequest, UnfollowBatchResponse, UnfollowResponse, UnpinActivityResponse, UpdateActivitiesPartialBatchRequest, UpdateActivitiesPartialBatchResponse, UpdateActivityPartialRequest, UpdateActivityPartialResponse, UpdateActivityRequest, UpdateActivityResponse, UpdateBookmarkFolderRequest, UpdateBookmarkFolderResponse, UpdateBookmarkRequest, UpdateBookmarkResponse, UpdateCollectionsRequest, UpdateCollectionsResponse, UpdateCommentBookmarkRequest, UpdateCommentBookmarkResponse, UpdateCommentPartialRequest, UpdateCommentPartialResponse, UpdateCommentRequest, UpdateCommentResponse, UpdateFeedGroupRequest, UpdateFeedGroupResponse, UpdateFeedMembersRequest, UpdateFeedMembersResponse, UpdateFeedRequest, UpdateFeedResponse, UpdateFeedViewRequest, UpdateFeedViewResponse, UpdateFeedVisibilityRequest, UpdateFeedVisibilityResponse, UpdateFollowRequest, UpdateFollowResponse, UpdateMembershipLevelRequest, UpdateMembershipLevelResponse, UpsertActivitiesRequest, UpsertActivitiesResponse, UpsertCollectionsRequest, UpsertCollectionsResponse, UpsertUserInterestsRequest, UpsertUserInterestsResponse } from '../models';
|
|
2
|
+
import { AcceptFeedMemberInviteRequest, AcceptFeedMemberInviteResponse, AcceptFollowRequest, AcceptFollowResponse, ActivityFeedbackRequest, ActivityFeedbackResponse, AddActivityRequest, AddActivityResponse, AddBookmarkRequest, AddBookmarkResponse, AddCommentBookmarkRequest, AddCommentBookmarkResponse, AddCommentReactionRequest, AddCommentReactionResponse, AddCommentRequest, AddCommentResponse, AddCommentsBatchRequest, AddCommentsBatchResponse, AddReactionRequest, AddReactionResponse, BatchQueryActivityReactionsRequest, BatchQueryActivityReactionsResponse, BatchQueryCommentReactionsRequest, BatchQueryCommentReactionsResponse, CastPollVoteRequest, ChangeFeedVisibilityRequest, ChangeFeedVisibilityResponse, CreateCollectionsRequest, CreateCollectionsResponse, CreateFeedGroupRequest, CreateFeedGroupResponse, CreateFeedViewRequest, CreateFeedViewResponse, CreateFeedsBatchRequest, CreateFeedsBatchResponse, CreateMembershipLevelRequest, CreateMembershipLevelResponse, DeleteActivitiesRequest, DeleteActivitiesResponse, DeleteActivityReactionResponse, DeleteActivityResponse, DeleteBookmarkFolderResponse, DeleteBookmarkResponse, DeleteCollectionsResponse, DeleteCommentBookmarkResponse, DeleteCommentReactionResponse, DeleteCommentResponse, DeleteFeedGroupResponse, DeleteFeedResponse, DeleteFeedUserDataRequest, DeleteFeedUserDataResponse, DeleteFeedViewResponse, DeleteFeedsBatchRequest, DeleteFeedsBatchResponse, DeleteFeedsRetentionPolicyRequest, DeleteFeedsRetentionPolicyResponse, DeleteUserInterestsResponse, ExportFeedUserDataResponse, FollowBatchRequest, FollowBatchResponse, FollowRequest, GetActivityResponse, GetCommentRepliesResponse, GetCommentResponse, GetCommentsResponse, GetFeedCountsResponse, GetFeedGroupResponse, GetFeedViewResponse, GetFeedVisibilityResponse, GetFeedsRateLimitsResponse, GetFeedsRetentionPolicyResponse, GetFeedsRetentionPolicyRunsRequest, GetFeedsRetentionPolicyRunsResponse, GetFollowSuggestionsResponse, GetOrCreateFeedGroupRequest, GetOrCreateFeedGroupResponse, GetOrCreateFeedRequest, GetOrCreateFeedResponse, GetOrCreateFeedViewRequest, GetOrCreateFeedViewResponse, GetOrCreateFollowResponse, GetOrCreateUnfollowRequest, GetOrCreateUnfollowResponse, GetUserInterestsResponse, ListFeedGroupsResponse, ListFeedViewsResponse, ListFeedVisibilitiesResponse, MarkActivityRequest, OwnBatchRequest, OwnBatchResponse, PinActivityRequest, PinActivityResponse, PollVoteResponse, QueryActivitiesRequest, QueryActivitiesResponse, QueryActivityReactionsRequest, QueryActivityReactionsResponse, QueryActivitySharesResponse, QueryBookmarkFoldersRequest, QueryBookmarkFoldersResponse, QueryBookmarksRequest, QueryBookmarksResponse, QueryCollectionsRequest, QueryCollectionsResponse, QueryCommentReactionsRequest, QueryCommentReactionsResponse, QueryCommentsRequest, QueryCommentsResponse, QueryFeedMembersRequest, QueryFeedMembersResponse, QueryFeedsRequest, QueryFeedsResponse, QueryFeedsUsageStatsRequest, QueryFeedsUsageStatsResponse, QueryFollowsRequest, QueryFollowsResponse, QueryMembershipLevelsRequest, QueryMembershipLevelsResponse, QueryPinnedActivitiesRequest, QueryPinnedActivitiesResponse, QueryRevisionHistoryRequest, QueryRevisionHistoryResponse, ReadCollectionsResponse, RejectFeedMemberInviteRequest, RejectFeedMemberInviteResponse, RejectFollowRequest, RejectFollowResponse, Response, RestoreActivityRequest, RestoreActivityResponse, RestoreCommentRequest, RestoreCommentResponse, RestoreFeedGroupResponse, SetFeedsRetentionPolicyRequest, SetFeedsRetentionPolicyResponse, SingleFollowResponse, TrackActivityMetricsRequest, TrackActivityMetricsResponse, TranslateActivityRequest, TranslateActivityResponse, TranslateCommentRequest, TranslateCommentResponse, UnfollowBatchRequest, UnfollowBatchResponse, UnfollowResponse, UnpinActivityResponse, UpdateActivitiesPartialBatchRequest, UpdateActivitiesPartialBatchResponse, UpdateActivityPartialRequest, UpdateActivityPartialResponse, UpdateActivityRequest, UpdateActivityResponse, UpdateBookmarkFolderRequest, UpdateBookmarkFolderResponse, UpdateBookmarkRequest, UpdateBookmarkResponse, UpdateCollectionsRequest, UpdateCollectionsResponse, UpdateCommentBookmarkRequest, UpdateCommentBookmarkResponse, UpdateCommentPartialRequest, UpdateCommentPartialResponse, UpdateCommentRequest, UpdateCommentResponse, UpdateFeedGroupRequest, UpdateFeedGroupResponse, UpdateFeedMembersRequest, UpdateFeedMembersResponse, UpdateFeedRequest, UpdateFeedResponse, UpdateFeedViewRequest, UpdateFeedViewResponse, UpdateFeedVisibilityRequest, UpdateFeedVisibilityResponse, UpdateFollowRequest, UpdateFollowResponse, UpdateMembershipLevelRequest, UpdateMembershipLevelResponse, UpsertActivitiesRequest, UpsertActivitiesResponse, UpsertCollectionsRequest, UpsertCollectionsResponse, UpsertUserInterestsRequest, UpsertUserInterestsResponse } from '../models';
|
|
3
3
|
export declare class FeedsApi {
|
|
4
4
|
readonly apiClient: ApiClient;
|
|
5
5
|
constructor(apiClient: ApiClient);
|
|
@@ -68,6 +68,7 @@ export declare class FeedsApi {
|
|
|
68
68
|
user_id?: string;
|
|
69
69
|
language?: string;
|
|
70
70
|
translate_text?: boolean;
|
|
71
|
+
include_top_level_comment_count?: boolean;
|
|
71
72
|
}): Promise<StreamResponse<GetActivityResponse>>;
|
|
72
73
|
updateActivityPartial(request: UpdateActivityPartialRequest & {
|
|
73
74
|
id: string;
|
|
@@ -117,6 +118,7 @@ export declare class FeedsApi {
|
|
|
117
118
|
limit?: number;
|
|
118
119
|
prev?: string;
|
|
119
120
|
next?: string;
|
|
121
|
+
include_top_level_comment_count?: boolean;
|
|
120
122
|
}): Promise<StreamResponse<GetCommentsResponse>>;
|
|
121
123
|
addComment(request?: AddCommentRequest): Promise<StreamResponse<AddCommentResponse>>;
|
|
122
124
|
addCommentsBatch(request: AddCommentsBatchRequest): Promise<StreamResponse<AddCommentsBatchResponse>>;
|
|
@@ -330,6 +332,10 @@ export declare class FeedsApi {
|
|
|
330
332
|
updateMembershipLevel(request: UpdateMembershipLevelRequest & {
|
|
331
333
|
id: string;
|
|
332
334
|
}): Promise<StreamResponse<UpdateMembershipLevelResponse>>;
|
|
335
|
+
feedsGetRetentionPolicy(): Promise<StreamResponse<GetFeedsRetentionPolicyResponse>>;
|
|
336
|
+
feedsSetRetentionPolicy(request: SetFeedsRetentionPolicyRequest): Promise<StreamResponse<SetFeedsRetentionPolicyResponse>>;
|
|
337
|
+
feedsDeleteRetentionPolicy(request: DeleteFeedsRetentionPolicyRequest): Promise<StreamResponse<DeleteFeedsRetentionPolicyResponse>>;
|
|
338
|
+
feedsGetRetentionPolicyRuns(request?: GetFeedsRetentionPolicyRunsRequest): Promise<StreamResponse<GetFeedsRetentionPolicyRunsResponse>>;
|
|
333
339
|
queryRevisionHistory(request: QueryRevisionHistoryRequest): Promise<StreamResponse<QueryRevisionHistoryResponse>>;
|
|
334
340
|
queryFeedsUsageStats(request?: QueryFeedsUsageStatsRequest): Promise<StreamResponse<QueryFeedsUsageStatsResponse>>;
|
|
335
341
|
unfollowBatch(request: UnfollowBatchRequest): Promise<StreamResponse<UnfollowBatchResponse>>;
|
|
@@ -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
|
*/
|
|
@@ -2457,7 +2469,8 @@ export interface BulkActionAppealsRequest {
|
|
|
2457
2469
|
*/
|
|
2458
2470
|
unban?: UnbanActionRequestPayload;
|
|
2459
2471
|
/**
|
|
2460
|
-
*
|
|
2472
|
+
* @deprecated
|
|
2473
|
+
* Deprecated: Use restore instead, which now also reverses a block or shadow block. Configuration for unblock action.
|
|
2461
2474
|
*/
|
|
2462
2475
|
unblock?: UnblockActionRequestPayload;
|
|
2463
2476
|
/**
|
|
@@ -3916,6 +3929,9 @@ export interface ChannelConfig {
|
|
|
3916
3929
|
blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
|
|
3917
3930
|
partition_size?: number;
|
|
3918
3931
|
partition_ttl?: string;
|
|
3932
|
+
/**
|
|
3933
|
+
* Sets the push notification level for a channel type
|
|
3934
|
+
*/
|
|
3919
3935
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
3920
3936
|
allowed_flag_reasons?: Array<string>;
|
|
3921
3937
|
blocklists?: Array<BlockListOptions>;
|
|
@@ -4012,6 +4028,9 @@ export interface ChannelConfigWithInfo {
|
|
|
4012
4028
|
blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
|
|
4013
4029
|
partition_size?: number;
|
|
4014
4030
|
partition_ttl?: string;
|
|
4031
|
+
/**
|
|
4032
|
+
* Sets the push notification level for a channel type
|
|
4033
|
+
*/
|
|
4015
4034
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
4016
4035
|
allowed_flag_reasons?: Array<string>;
|
|
4017
4036
|
blocklists?: Array<BlockListOptions>;
|
|
@@ -4748,6 +4767,9 @@ export interface ChannelTypeConfig {
|
|
|
4748
4767
|
blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
|
|
4749
4768
|
partition_size?: number;
|
|
4750
4769
|
partition_ttl?: string;
|
|
4770
|
+
/**
|
|
4771
|
+
* Sets the push notification level for a channel type
|
|
4772
|
+
*/
|
|
4751
4773
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
4752
4774
|
allowed_flag_reasons?: Array<string>;
|
|
4753
4775
|
blocklists?: Array<BlockListOptions>;
|
|
@@ -5179,6 +5201,22 @@ export interface CheckResponse {
|
|
|
5179
5201
|
* Status of the moderation check (completed or pending)
|
|
5180
5202
|
*/
|
|
5181
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;
|
|
5182
5220
|
/**
|
|
5183
5221
|
* ID of the running moderation task
|
|
5184
5222
|
*/
|
|
@@ -5188,6 +5226,9 @@ export interface CheckResponse {
|
|
|
5188
5226
|
*/
|
|
5189
5227
|
triggered_rules?: Array<TriggeredRuleResponse>;
|
|
5190
5228
|
item?: ReviewQueueItemResponse;
|
|
5229
|
+
/**
|
|
5230
|
+
* @deprecated
|
|
5231
|
+
*/
|
|
5191
5232
|
triggered_rule?: TriggeredRuleResponse;
|
|
5192
5233
|
}
|
|
5193
5234
|
export interface CheckS3AccessRequest {
|
|
@@ -5741,6 +5782,9 @@ export interface ConfigOverridesRequest {
|
|
|
5741
5782
|
* Maximum message length
|
|
5742
5783
|
*/
|
|
5743
5784
|
max_message_length?: number;
|
|
5785
|
+
/**
|
|
5786
|
+
* Overrides the push notification level for this channel
|
|
5787
|
+
*/
|
|
5744
5788
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
5745
5789
|
/**
|
|
5746
5790
|
* Enable/disable quotes
|
|
@@ -5827,6 +5871,7 @@ export interface ConfigResponse {
|
|
|
5827
5871
|
automod_toxicity_config?: AutomodToxicityConfig;
|
|
5828
5872
|
block_list_config?: BlockListConfig;
|
|
5829
5873
|
flood_config?: FloodConfig;
|
|
5874
|
+
intent_config?: IntentConfigResponse;
|
|
5830
5875
|
llm_config?: LLMConfig;
|
|
5831
5876
|
velocity_filter_config?: VelocityFilterConfig;
|
|
5832
5877
|
video_call_rule_config?: VideoCallRuleConfig;
|
|
@@ -6123,6 +6168,9 @@ export interface CreateChannelTypeResponse {
|
|
|
6123
6168
|
created_at: Date;
|
|
6124
6169
|
custom_events: boolean;
|
|
6125
6170
|
delivery_events: boolean;
|
|
6171
|
+
/**
|
|
6172
|
+
* Duration of the request in milliseconds
|
|
6173
|
+
*/
|
|
6126
6174
|
duration: string;
|
|
6127
6175
|
mark_messages_pending: boolean;
|
|
6128
6176
|
max_message_length: number;
|
|
@@ -6151,6 +6199,9 @@ export interface CreateChannelTypeResponse {
|
|
|
6151
6199
|
blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
|
|
6152
6200
|
partition_size?: number;
|
|
6153
6201
|
partition_ttl?: string;
|
|
6202
|
+
/**
|
|
6203
|
+
* Sets the push notification level for a channel type
|
|
6204
|
+
*/
|
|
6154
6205
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
6155
6206
|
allowed_flag_reasons?: Array<string>;
|
|
6156
6207
|
blocklists?: Array<BlockListOptions>;
|
|
@@ -6583,6 +6634,7 @@ export interface CreateQueueRequest {
|
|
|
6583
6634
|
user?: UserRequest;
|
|
6584
6635
|
}
|
|
6585
6636
|
export interface CreateReminderRequest {
|
|
6637
|
+
expires_at?: Date;
|
|
6586
6638
|
remind_at?: Date;
|
|
6587
6639
|
user_id?: string;
|
|
6588
6640
|
/**
|
|
@@ -7149,6 +7201,15 @@ export interface DeleteFeedsBatchResponse {
|
|
|
7149
7201
|
*/
|
|
7150
7202
|
task_id: string;
|
|
7151
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
|
+
}
|
|
7152
7213
|
export interface DeleteImportV2TaskResponse {
|
|
7153
7214
|
/**
|
|
7154
7215
|
* Duration of the request in milliseconds
|
|
@@ -8683,6 +8744,12 @@ export interface FeedsReactionResponse {
|
|
|
8683
8744
|
comment_id?: string;
|
|
8684
8745
|
custom?: Record<string, any>;
|
|
8685
8746
|
}
|
|
8747
|
+
export interface FeedsRetentionRunResponse {
|
|
8748
|
+
app_pk: number;
|
|
8749
|
+
date: string;
|
|
8750
|
+
policy: string;
|
|
8751
|
+
stats: RunStats;
|
|
8752
|
+
}
|
|
8686
8753
|
export interface FeedsShareResponse {
|
|
8687
8754
|
activity_id: string;
|
|
8688
8755
|
created_at: Date;
|
|
@@ -8987,6 +9054,7 @@ export interface FloodSimilarConfig {
|
|
|
8987
9054
|
time_window?: string;
|
|
8988
9055
|
}
|
|
8989
9056
|
export interface FloodSimilarRuleParameters {
|
|
9057
|
+
min_text_length?: number;
|
|
8990
9058
|
similarity_distance?: number;
|
|
8991
9059
|
threshold?: number;
|
|
8992
9060
|
time_window?: string;
|
|
@@ -9188,6 +9256,10 @@ export interface FullUserResponse {
|
|
|
9188
9256
|
shadow_banned: boolean;
|
|
9189
9257
|
total_unread_count: number;
|
|
9190
9258
|
unread_channels: number;
|
|
9259
|
+
/**
|
|
9260
|
+
* @deprecated
|
|
9261
|
+
* Deprecated: Use total_unread_count instead.
|
|
9262
|
+
*/
|
|
9191
9263
|
unread_count: number;
|
|
9192
9264
|
unread_threads: number;
|
|
9193
9265
|
updated_at: Date;
|
|
@@ -9398,6 +9470,9 @@ export interface GetChannelTypeResponse {
|
|
|
9398
9470
|
blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
|
|
9399
9471
|
partition_size?: number;
|
|
9400
9472
|
partition_ttl?: string;
|
|
9473
|
+
/**
|
|
9474
|
+
* Sets the push notification level for a channel type
|
|
9475
|
+
*/
|
|
9401
9476
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
9402
9477
|
allowed_flag_reasons?: Array<string>;
|
|
9403
9478
|
blocklists?: Array<BlockListOptions>;
|
|
@@ -9434,6 +9509,10 @@ export interface GetCommentResponse {
|
|
|
9434
9509
|
comment: CommentResponse;
|
|
9435
9510
|
}
|
|
9436
9511
|
export interface GetCommentsResponse {
|
|
9512
|
+
/**
|
|
9513
|
+
* Total number of comments on the object, including replies at every depth
|
|
9514
|
+
*/
|
|
9515
|
+
comment_count: number;
|
|
9437
9516
|
duration: string;
|
|
9438
9517
|
/**
|
|
9439
9518
|
* Sort order used for the comments (first, last, top, best, controversial)
|
|
@@ -9445,6 +9524,10 @@ export interface GetCommentsResponse {
|
|
|
9445
9524
|
comments: Array<ThreadedCommentResponse>;
|
|
9446
9525
|
next?: string;
|
|
9447
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;
|
|
9448
9531
|
}
|
|
9449
9532
|
export interface GetConfigResponse {
|
|
9450
9533
|
duration: string;
|
|
@@ -9567,6 +9650,36 @@ export interface GetFeedsRateLimitsResponse {
|
|
|
9567
9650
|
*/
|
|
9568
9651
|
web?: Record<string, LimitInfoResponse>;
|
|
9569
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
|
+
}
|
|
9570
9683
|
export interface GetFlagCountRequest {
|
|
9571
9684
|
/**
|
|
9572
9685
|
* ID of the user whose content was flagged
|
|
@@ -10485,6 +10598,130 @@ export interface InsertActionLogRequest {
|
|
|
10485
10598
|
export interface InsertActionLogResponse {
|
|
10486
10599
|
duration: string;
|
|
10487
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
|
+
}
|
|
10488
10725
|
export interface InterestTagResponse {
|
|
10489
10726
|
/**
|
|
10490
10727
|
* Lifetime number of distinct reacted-to activities tagged with this value, without decay; 0 for manually set tags
|
|
@@ -13156,6 +13393,10 @@ export interface OwnUserResponse {
|
|
|
13156
13393
|
role: string;
|
|
13157
13394
|
total_unread_count: number;
|
|
13158
13395
|
unread_channels: number;
|
|
13396
|
+
/**
|
|
13397
|
+
* @deprecated
|
|
13398
|
+
* Deprecated: Use total_unread_count instead.
|
|
13399
|
+
*/
|
|
13159
13400
|
unread_count: number;
|
|
13160
13401
|
unread_threads: number;
|
|
13161
13402
|
updated_at: Date;
|
|
@@ -15209,7 +15450,7 @@ export interface QueryReviewQueueRequest {
|
|
|
15209
15450
|
*/
|
|
15210
15451
|
sort?: Array<SortParamRequest>;
|
|
15211
15452
|
/**
|
|
15212
|
-
* 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.
|
|
15453
|
+
* 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.
|
|
15213
15454
|
*/
|
|
15214
15455
|
filter?: Record<string, any>;
|
|
15215
15456
|
/**
|
|
@@ -16023,6 +16264,7 @@ export interface ReminderResponseData {
|
|
|
16023
16264
|
message_id: string;
|
|
16024
16265
|
updated_at: Date;
|
|
16025
16266
|
user_id: string;
|
|
16267
|
+
expires_at?: Date;
|
|
16026
16268
|
remind_at?: Date;
|
|
16027
16269
|
/**
|
|
16028
16270
|
* Represents channel in chat
|
|
@@ -16505,6 +16747,7 @@ export interface RuleBuilderCondition {
|
|
|
16505
16747
|
ocr_content_params?: OCRContentParameters;
|
|
16506
16748
|
text_content_params?: TextContentParameters;
|
|
16507
16749
|
text_rule_params?: TextRuleParameters;
|
|
16750
|
+
user_channel_count_params?: UserChannelCountRuleParameters;
|
|
16508
16751
|
user_created_within_params?: UserCreatedWithinParameters;
|
|
16509
16752
|
user_custom_property_params?: UserCustomPropertyParameters;
|
|
16510
16753
|
user_flag_count_rule_params?: FlagCountRuleParameters;
|
|
@@ -17242,6 +17485,19 @@ export interface SessionWarningResponse {
|
|
|
17242
17485
|
warning: string;
|
|
17243
17486
|
time?: Date;
|
|
17244
17487
|
}
|
|
17488
|
+
export interface SetFeedsRetentionPolicyRequest {
|
|
17489
|
+
max_age_hours: number;
|
|
17490
|
+
policy: 'old-activities';
|
|
17491
|
+
enabled?: boolean;
|
|
17492
|
+
}
|
|
17493
|
+
export interface SetFeedsRetentionPolicyResponse {
|
|
17494
|
+
/**
|
|
17495
|
+
* Duration of the request in milliseconds
|
|
17496
|
+
*/
|
|
17497
|
+
duration: string;
|
|
17498
|
+
enabled: boolean;
|
|
17499
|
+
policy: RetentionPolicy;
|
|
17500
|
+
}
|
|
17245
17501
|
export interface SetRetentionPolicyRequest {
|
|
17246
17502
|
max_age_hours: number;
|
|
17247
17503
|
policy: 'old-messages' | 'inactive-channels';
|
|
@@ -17724,7 +17980,8 @@ export interface SubmitActionRequest {
|
|
|
17724
17980
|
*/
|
|
17725
17981
|
unban?: UnbanActionRequestPayload;
|
|
17726
17982
|
/**
|
|
17727
|
-
*
|
|
17983
|
+
* @deprecated
|
|
17984
|
+
* Deprecated: Use restore instead, which now also reverses a block or shadow block. Configuration for unblock action.
|
|
17728
17985
|
*/
|
|
17729
17986
|
unblock?: UnblockActionRequestPayload;
|
|
17730
17987
|
/**
|
|
@@ -18368,6 +18625,7 @@ export interface UnbanRequest {
|
|
|
18368
18625
|
*/
|
|
18369
18626
|
unbanned_by_id?: string;
|
|
18370
18627
|
/**
|
|
18628
|
+
* @deprecated
|
|
18371
18629
|
* User request object
|
|
18372
18630
|
*/
|
|
18373
18631
|
unbanned_by?: UserRequest;
|
|
@@ -19082,6 +19340,9 @@ export interface UpdateChannelTypeRequest {
|
|
|
19082
19340
|
partition_size?: number;
|
|
19083
19341
|
partition_ttl?: string;
|
|
19084
19342
|
polls?: boolean;
|
|
19343
|
+
/**
|
|
19344
|
+
* Sets the push notification level for a channel type
|
|
19345
|
+
*/
|
|
19085
19346
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
19086
19347
|
push_notifications?: boolean;
|
|
19087
19348
|
quotes?: boolean;
|
|
@@ -19118,6 +19379,9 @@ export interface UpdateChannelTypeResponse {
|
|
|
19118
19379
|
created_at: Date;
|
|
19119
19380
|
custom_events: boolean;
|
|
19120
19381
|
delivery_events: boolean;
|
|
19382
|
+
/**
|
|
19383
|
+
* Duration of the request in milliseconds
|
|
19384
|
+
*/
|
|
19121
19385
|
duration: string;
|
|
19122
19386
|
mark_messages_pending: boolean;
|
|
19123
19387
|
max_message_length: number;
|
|
@@ -19146,6 +19410,9 @@ export interface UpdateChannelTypeResponse {
|
|
|
19146
19410
|
blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
|
|
19147
19411
|
partition_size?: number;
|
|
19148
19412
|
partition_ttl?: string;
|
|
19413
|
+
/**
|
|
19414
|
+
* Sets the push notification level for a channel type
|
|
19415
|
+
*/
|
|
19149
19416
|
push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none';
|
|
19150
19417
|
allowed_flag_reasons?: Array<string>;
|
|
19151
19418
|
blocklists?: Array<BlockListOptions>;
|
|
@@ -19748,6 +20015,7 @@ export interface UpdateQueueRequest {
|
|
|
19748
20015
|
user?: UserRequest;
|
|
19749
20016
|
}
|
|
19750
20017
|
export interface UpdateReminderRequest {
|
|
20018
|
+
expires_at?: Date;
|
|
19751
20019
|
remind_at?: Date;
|
|
19752
20020
|
user_id?: string;
|
|
19753
20021
|
/**
|
|
@@ -19925,7 +20193,7 @@ export interface UpdateUsersResponse {
|
|
|
19925
20193
|
duration: string;
|
|
19926
20194
|
/**
|
|
19927
20195
|
* @deprecated
|
|
19928
|
-
* Deprecated:
|
|
20196
|
+
* 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.
|
|
19929
20197
|
*/
|
|
19930
20198
|
membership_deletion_task_id: string;
|
|
19931
20199
|
/**
|
|
@@ -20122,6 +20390,7 @@ export interface UpsertConfigRequest {
|
|
|
20122
20390
|
bodyguard_config?: AITextConfig;
|
|
20123
20391
|
flood_config?: FloodConfig;
|
|
20124
20392
|
google_vision_config?: GoogleVisionConfig;
|
|
20393
|
+
intent_config?: IntentConfigRequest;
|
|
20125
20394
|
llm_config?: LLMConfig;
|
|
20126
20395
|
rule_builder_config?: RuleBuilderConfig;
|
|
20127
20396
|
/**
|
|
@@ -20392,6 +20661,10 @@ export interface UserBannedEvent {
|
|
|
20392
20661
|
channel_custom?: Record<string, any>;
|
|
20393
20662
|
created_by?: UserResponseCommonFields;
|
|
20394
20663
|
}
|
|
20664
|
+
export interface UserChannelCountRuleParameters {
|
|
20665
|
+
threshold?: number;
|
|
20666
|
+
time_window?: string;
|
|
20667
|
+
}
|
|
20395
20668
|
export interface UserCreatedWithinParameters {
|
|
20396
20669
|
max_age?: string;
|
|
20397
20670
|
}
|
|
@@ -21339,6 +21612,8 @@ export type WHEvent = ({
|
|
|
21339
21612
|
} & ModerationFlaggedEvent) | ({
|
|
21340
21613
|
type: 'moderation.image_analysis.complete';
|
|
21341
21614
|
} & ModerationImageAnalysisCompleteEvent) | ({
|
|
21615
|
+
type: 'moderation.intent_detected';
|
|
21616
|
+
} & IntentDetectedEvent) | ({
|
|
21342
21617
|
type: 'moderation.mark_reviewed';
|
|
21343
21618
|
} & ModerationMarkReviewedEvent) | ({
|
|
21344
21619
|
type: 'moderation.text_analysis.complete';
|
package/package.json
CHANGED
package/src/ApiClient.ts
CHANGED