stream-chat 10.0.0-rc.21 → 10.0.0-rc.23
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/cjs/index.browser.js +2196 -3902
- package/dist/cjs/index.browser.js.map +3 -3
- package/dist/cjs/index.node.js +2197 -3902
- package/dist/cjs/index.node.js.map +3 -3
- package/dist/esm/index.mjs +2199 -3905
- package/dist/esm/index.mjs.map +4 -4
- package/dist/types/ChannelManager.d.ts +120 -233
- package/dist/types/CooldownTimer.d.ts +8 -23
- package/dist/types/EventHandlerPipeline.d.ts +17 -37
- package/dist/types/LiveLocationManager.d.ts +22 -50
- package/dist/types/api-client.d.ts +9 -14
- package/dist/types/channel.d.ts +253 -448
- package/dist/types/channel_state.d.ts +48 -95
- package/dist/types/client.d.ts +245 -370
- package/dist/types/client_state.d.ts +1 -3
- package/dist/types/configuration/ConfigController.d.ts +30 -124
- package/dist/types/configuration/InstanceConfigurationRegistry.d.ts +31 -123
- package/dist/types/configuration/keys.d.ts +5 -19
- package/dist/types/configuration/shape.d.ts +12 -29
- package/dist/types/configuration/types.d.ts +59 -87
- package/dist/types/configuration/utils/applyInstanceConfiguration.d.ts +13 -35
- package/dist/types/configuration/utils/copyConfigPatch.d.ts +8 -0
- package/dist/types/configuration/utils/declarativeSlices.d.ts +5 -16
- package/dist/types/configuration/utils/deepFreezeConfig.d.ts +3 -17
- package/dist/types/configuration/utils/serverAuthority.d.ts +9 -29
- package/dist/types/connection/ConnectionIdManager.d.ts +18 -40
- package/dist/types/connection/ConnectionRecoveryManager.d.ts +29 -120
- package/dist/types/connection/networkConnection/NetworkConnectionObserver.d.ts +32 -103
- package/dist/types/connection/networkConnection/reporters.d.ts +9 -32
- package/dist/types/connection/networkConnection/types.d.ts +12 -27
- package/dist/types/connection/wsConnection/StableWSConnection.d.ts +37 -116
- package/dist/types/connection/wsConnection/WSConnection.d.ts +41 -104
- package/dist/types/connection/wsConnection/WSConnectionFallback.d.ts +8 -16
- package/dist/types/connection/wsConnection/config.d.ts +8 -28
- package/dist/types/connection/wsConnection/types.d.ts +17 -70
- package/dist/types/entityStore/EntityStore.d.ts +153 -113
- package/dist/types/entityStore/StoreBackedItemIndex.d.ts +13 -46
- package/dist/types/errors.d.ts +7 -19
- package/dist/types/gen/chat/ChannelApi.d.ts +2 -1
- package/dist/types/gen/chat/ChatApi.d.ts +28 -14
- package/dist/types/gen/models/index.d.ts +769 -86
- package/dist/types/gen/moderation/ModerationApi.d.ts +4 -4
- package/dist/types/index.d.ts +2 -4
- package/dist/types/languageNames.d.ts +9 -24
- package/dist/types/logger.d.ts +1 -3
- package/dist/types/messageComposer/LocationComposer.d.ts +1 -1
- package/dist/types/messageComposer/attachmentIdentity.d.ts +1 -6
- package/dist/types/messageComposer/attachmentManager.d.ts +10 -32
- package/dist/types/messageComposer/attachmentUtils.d.ts +3 -14
- package/dist/types/messageComposer/configuration/configuration.d.ts +2 -5
- package/dist/types/messageComposer/configuration/types.d.ts +29 -56
- package/dist/types/messageComposer/linkPreviewsManager.d.ts +6 -9
- package/dist/types/messageComposer/messageComposer.d.ts +30 -164
- package/dist/types/messageComposer/middleware/attachmentManager/postUpload/attachmentEnrichment.d.ts +4 -14
- package/dist/types/messageComposer/middleware/messageComposer/attachments.d.ts +2 -9
- package/dist/types/messageComposer/middleware/pollComposer/types.d.ts +2 -4
- package/dist/types/messageComposer/middleware/pollComposer/validation.d.ts +7 -19
- package/dist/types/messageComposer/middleware/textComposer/commands.d.ts +9 -0
- package/dist/types/messageComposer/middleware/textComposer/mentions.d.ts +11 -18
- package/dist/types/messageComposer/middleware/textComposer/textMiddlewareUtils.d.ts +9 -3
- package/dist/types/messageComposer/middleware/textComposer/types.d.ts +1 -6
- package/dist/types/messageComposer/pollComposer.d.ts +8 -4
- package/dist/types/messageComposer/textComposer.d.ts +3 -9
- package/dist/types/messageComposer/types.d.ts +5 -8
- package/dist/types/messageDelivery/MessageDeliveryReporter.d.ts +25 -79
- package/dist/types/messageDelivery/MessageReceiptsTracker.d.ts +15 -82
- package/dist/types/messageOperations/FailedSendCache.d.ts +4 -9
- package/dist/types/messageOperations/MessageOperationStatePolicy.d.ts +10 -20
- package/dist/types/messageOperations/MessageOperations.d.ts +20 -40
- package/dist/types/messageOperations/applyReactionLocally.d.ts +5 -22
- package/dist/types/messageOperations/createMessageOperations.d.ts +3 -5
- package/dist/types/messageOperations/reflectReactionEvent.d.ts +5 -13
- package/dist/types/messageOperations/sendOrdering.d.ts +4 -7
- package/dist/types/messageOperations/settlePendingAttachmentUploads.d.ts +7 -15
- package/dist/types/messageOperations/types.d.ts +15 -30
- package/dist/types/middleware.d.ts +7 -5
- package/dist/types/moderation.d.ts +21 -14
- package/dist/types/notifications/NotificationManager.d.ts +8 -31
- package/dist/types/notifications/types.d.ts +19 -59
- package/dist/types/offline-support/offline_support_api.d.ts +145 -539
- package/dist/types/offline-support/offline_sync_manager.d.ts +18 -42
- package/dist/types/offline-support/queueableOperations.d.ts +24 -52
- package/dist/types/offline-support/types.d.ts +24 -187
- package/dist/types/pagination/ItemIndex.d.ts +4 -12
- package/dist/types/pagination/cursorDerivation/aroundPaginationFlags.d.ts +13 -0
- package/dist/types/pagination/cursorDerivation/createdAtAroundPaginationFlags.d.ts +2 -4
- package/dist/types/pagination/cursorDerivation/linearPaginationFlags.d.ts +2 -3
- package/dist/types/pagination/paginators/BasePaginator.d.ts +235 -622
- package/dist/types/pagination/paginators/ChannelPaginator.d.ts +67 -125
- package/dist/types/pagination/paginators/MessageIntervalPaginator.d.ts +133 -292
- package/dist/types/pagination/paginators/MessagePaginator.d.ts +69 -118
- package/dist/types/pagination/paginators/PinnedMessagePaginator.d.ts +7 -26
- package/dist/types/pagination/paginators/ReminderPaginator.d.ts +2 -2
- package/dist/types/pagination/paginators/ThreadPaginator.d.ts +15 -23
- package/dist/types/pagination/paginators/UserGroupPaginator.d.ts +2 -6
- package/dist/types/pagination/sortCompiler.d.ts +11 -22
- package/dist/types/pagination/utility.normalization.d.ts +5 -23
- package/dist/types/pagination/utility.search.d.ts +3 -8
- package/dist/types/poll.d.ts +14 -14
- package/dist/types/poll_manager.d.ts +11 -2
- package/dist/types/poll_optimistic_votes.d.ts +10 -14
- package/dist/types/reminders/Reminder.d.ts +4 -4
- package/dist/types/reminders/ReminderManager.d.ts +7 -20
- package/dist/types/search/BaseSearchSource.d.ts +7 -12
- package/dist/types/search/ChannelSearchSource.d.ts +7 -7
- package/dist/types/search/MessageSearchSource.d.ts +7 -9
- package/dist/types/search/SearchController.d.ts +17 -22
- package/dist/types/search/types.d.ts +6 -10
- package/dist/types/signing.d.ts +12 -3
- package/dist/types/thread.d.ts +23 -71
- package/dist/types/thread_manager.d.ts +45 -70
- package/dist/types/token_manager.d.ts +8 -13
- package/dist/types/types.d.ts +64 -125
- package/dist/types/types.utility.d.ts +3 -3
- package/dist/types/upload-utils.d.ts +5 -10
- package/dist/types/uploadManager.d.ts +17 -45
- package/dist/types/utils/FixedSizeQueueCache.d.ts +6 -11
- package/dist/types/utils/WithSubscriptions.d.ts +5 -15
- package/dist/types/utils/concurrency.d.ts +11 -19
- package/dist/types/utils/mergeWith/mergeWith.d.ts +8 -11
- package/dist/types/utils/mergeWith/mergeWithCore.d.ts +5 -13
- package/dist/types/utils/mergeWith/mergeWithDiff.d.ts +22 -0
- package/dist/types/utils/objectPath.d.ts +6 -41
- package/dist/types/utils/retryable.d.ts +8 -12
- package/dist/types/utils/throttling/throttle.d.ts +8 -23
- package/dist/types/utils/time.d.ts +24 -64
- package/dist/types/utils.d.ts +40 -86
- package/package.json +7 -2
- package/src/ChannelManager.ts +159 -300
- package/src/CooldownTimer.ts +11 -29
- package/src/EventHandlerPipeline.ts +21 -44
- package/src/LiveLocationManager.ts +35 -74
- package/src/api-client.ts +43 -61
- package/src/campaign.ts +1 -1
- package/src/channel.ts +396 -749
- package/src/channel_batch_updater.ts +1 -1
- package/src/channel_state.ts +50 -105
- package/src/client.ts +360 -588
- package/src/client_state.ts +1 -6
- package/src/configuration/ConfigController.ts +41 -157
- package/src/configuration/InstanceConfigurationRegistry.ts +42 -171
- package/src/configuration/index.ts +1 -1
- package/src/configuration/keys.ts +13 -32
- package/src/configuration/shape.ts +67 -70
- package/src/configuration/types.ts +60 -100
- package/src/configuration/utils/applyInstanceConfiguration.ts +21 -53
- package/src/configuration/utils/copyConfigPatch.ts +11 -32
- package/src/configuration/utils/declarativeSlices.ts +9 -39
- package/src/configuration/utils/deepFreezeConfig.ts +3 -17
- package/src/configuration/utils/index.ts +2 -4
- package/src/configuration/utils/serverAuthority.ts +20 -68
- package/src/connection/ConnectionIdManager.ts +20 -49
- package/src/connection/ConnectionRecoveryManager.ts +51 -178
- package/src/connection/networkConnection/NetworkConnectionObserver.ts +37 -114
- package/src/connection/networkConnection/reporters.ts +9 -36
- package/src/connection/networkConnection/types.ts +12 -27
- package/src/connection/wsConnection/StableWSConnection.ts +73 -193
- package/src/connection/wsConnection/WSConnection.ts +56 -131
- package/src/connection/wsConnection/WSConnectionFallback.ts +22 -31
- package/src/connection/wsConnection/config.ts +13 -48
- package/src/connection/wsConnection/types.ts +17 -70
- package/src/constants.ts +4 -4
- package/src/entityStore/EntityStore.ts +162 -167
- package/src/entityStore/StoreBackedItemIndex.ts +14 -47
- package/src/errors.ts +7 -19
- package/src/formatMessageMemo.ts +3 -9
- package/src/gen/chat/ChannelApi.ts +19 -0
- package/src/gen/chat/ChatApi.ts +87 -13
- package/src/gen/models/index.ts +793 -71
- package/src/gen/moderation/ModerationApi.ts +0 -4
- package/src/index.ts +10 -14
- package/src/languageNames.ts +9 -24
- package/src/logger.ts +1 -3
- package/src/messageComposer/LocationComposer.ts +7 -23
- package/src/messageComposer/MessageComposerEffectHandlers.ts +1 -2
- package/src/messageComposer/attachmentIdentity.ts +2 -13
- package/src/messageComposer/attachmentManager.ts +17 -63
- package/src/messageComposer/attachmentUtils.ts +3 -17
- package/src/messageComposer/configuration/configuration.ts +5 -8
- package/src/messageComposer/configuration/types.ts +29 -56
- package/src/messageComposer/fileUtils.ts +1 -1
- package/src/messageComposer/linkPreviewsManager.ts +8 -20
- package/src/messageComposer/messageComposer.ts +54 -222
- package/src/messageComposer/middleware/attachmentManager/postUpload/attachmentEnrichment.ts +4 -16
- package/src/messageComposer/middleware/attachmentManager/postUpload/uploadErrorHandler.ts +1 -2
- package/src/messageComposer/middleware/messageComposer/attachments.ts +14 -40
- package/src/messageComposer/middleware/messageComposer/linkPreviews.ts +3 -4
- package/src/messageComposer/middleware/messageComposer/textComposer.ts +1 -1
- package/src/messageComposer/middleware/messageComposer/userDataInjection.ts +4 -11
- package/src/messageComposer/middleware/pollComposer/state.ts +2 -2
- package/src/messageComposer/middleware/pollComposer/types.ts +2 -4
- package/src/messageComposer/middleware/pollComposer/validation.ts +8 -26
- package/src/messageComposer/middleware/textComposer/TextComposerMiddlewareExecutor.ts +1 -6
- package/src/messageComposer/middleware/textComposer/commandUtils.ts +1 -2
- package/src/messageComposer/middleware/textComposer/commands.ts +11 -16
- package/src/messageComposer/middleware/textComposer/mentions.ts +32 -70
- package/src/messageComposer/middleware/textComposer/textMiddlewareUtils.ts +10 -4
- package/src/messageComposer/middleware/textComposer/types.ts +1 -6
- package/src/messageComposer/pollComposer.ts +11 -8
- package/src/messageComposer/textComposer.ts +9 -59
- package/src/messageComposer/types.ts +9 -12
- package/src/messageDelivery/MessageDeliveryReporter.ts +60 -113
- package/src/messageDelivery/MessageReceiptsTracker.ts +21 -105
- package/src/messageOperations/FailedSendCache.ts +4 -9
- package/src/messageOperations/MessageOperationStatePolicy.ts +40 -67
- package/src/messageOperations/MessageOperations.ts +33 -62
- package/src/messageOperations/applyReactionLocally.ts +9 -28
- package/src/messageOperations/createMessageOperations.ts +17 -33
- package/src/messageOperations/reflectReactionEvent.ts +5 -13
- package/src/messageOperations/sendOrdering.ts +4 -7
- package/src/messageOperations/settlePendingAttachmentUploads.ts +10 -21
- package/src/messageOperations/types.ts +15 -30
- package/src/middleware.ts +7 -10
- package/src/moderation.ts +25 -21
- package/src/notifications/NotificationManager.ts +11 -35
- package/src/notifications/types.ts +19 -59
- package/src/offline-support/offline_support_api.ts +178 -608
- package/src/offline-support/offline_sync_manager.ts +25 -69
- package/src/offline-support/queueableOperations.ts +31 -84
- package/src/offline-support/types.ts +25 -188
- package/src/pagination/ItemIndex.ts +4 -12
- package/src/pagination/cursorDerivation/aroundPaginationFlags.ts +29 -0
- package/src/pagination/cursorDerivation/createdAtAroundPaginationFlags.ts +13 -62
- package/src/pagination/cursorDerivation/idAroundPaginationFlags.ts +11 -39
- package/src/pagination/cursorDerivation/linearPaginationFlags.ts +4 -6
- package/src/pagination/filterCompiler.ts +11 -25
- package/src/pagination/paginators/BasePaginator.ts +422 -976
- package/src/pagination/paginators/ChannelPaginator.ts +130 -190
- package/src/pagination/paginators/MessageIntervalPaginator.ts +226 -457
- package/src/pagination/paginators/MessagePaginator.ts +135 -175
- package/src/pagination/paginators/PinnedMessagePaginator.ts +13 -38
- package/src/pagination/paginators/ReminderPaginator.ts +12 -15
- package/src/pagination/paginators/ThreadPaginator.ts +16 -26
- package/src/pagination/paginators/UserGroupPaginator.ts +6 -17
- package/src/pagination/paginators/stateThrottling.ts +5 -10
- package/src/pagination/sortCompiler.ts +23 -50
- package/src/pagination/utility.normalization.ts +8 -30
- package/src/pagination/utility.search.ts +4 -11
- package/src/poll.ts +19 -19
- package/src/poll_manager.ts +16 -20
- package/src/poll_optimistic_votes.ts +17 -22
- package/src/reminders/Reminder.ts +5 -6
- package/src/reminders/ReminderManager.ts +9 -34
- package/src/reminders/ReminderTimer.ts +1 -2
- package/src/search/BaseSearchSource.ts +14 -29
- package/src/search/ChannelSearchSource.ts +8 -8
- package/src/search/MessageSearchSource.ts +19 -25
- package/src/search/SearchController.ts +18 -24
- package/src/search/types.ts +6 -10
- package/src/segment.ts +1 -1
- package/src/signing.ts +23 -3
- package/src/thread.ts +72 -173
- package/src/thread_manager.ts +59 -76
- package/src/token_manager.ts +11 -21
- package/src/types.ts +78 -126
- package/src/types.utility.ts +3 -3
- package/src/upload-utils.ts +5 -10
- package/src/uploadManager.ts +22 -54
- package/src/utils/FixedSizeQueueCache.ts +13 -21
- package/src/utils/WithSubscriptions.ts +5 -15
- package/src/utils/concurrency.ts +16 -55
- package/src/utils/mergeWith/mergeWith.ts +10 -13
- package/src/utils/mergeWith/mergeWithCore.ts +24 -81
- package/src/utils/mergeWith/mergeWithDiff.ts +15 -33
- package/src/utils/objectPath.ts +6 -41
- package/src/utils/retryable.ts +10 -14
- package/src/utils/throttling/throttle.ts +9 -25
- package/src/utils/time.ts +26 -66
- package/src/utils.ts +72 -128
|
@@ -31,7 +31,9 @@ export type Filters<FilterConditions extends Record<string, {
|
|
|
31
31
|
}>> = QueryFilters<{
|
|
32
32
|
[Property in keyof FCHelper<FilterConditions>]: RequireOnlyOne<{
|
|
33
33
|
[Operator in FCHelper<FilterConditions>[Property]['operators']]: FilterValue<FCHelper<FilterConditions>[Property], Operator>;
|
|
34
|
-
}> | ('$eq' extends FCHelper<FilterConditions>[Property]['operators'] ? FilterValue<FCHelper<FilterConditions>[Property], '$eq'> : never)
|
|
34
|
+
}> | ('$eq' extends FCHelper<FilterConditions>[Property]['operators'] ? FilterValue<FCHelper<FilterConditions>[Property], '$eq'> : never) | (FCHelper<FilterConditions>[Property] extends {
|
|
35
|
+
allowEmpty: true;
|
|
36
|
+
} ? Record<string, never> : never);
|
|
35
37
|
}>;
|
|
36
38
|
export type FilterValue<Entry extends {
|
|
37
39
|
type: any;
|
|
@@ -53,7 +55,7 @@ export type CustomHelper<T extends {
|
|
|
53
55
|
type: any;
|
|
54
56
|
operators: string;
|
|
55
57
|
}> = {
|
|
56
|
-
[P in keyof T['type'] as string extends P ? never : P extends string ? `custom.${P}` : never]-?: {
|
|
58
|
+
[P in keyof T['type'] as string extends P ? never : P extends string ? NonNullable<T['type'][P]> extends string | boolean | number | Date ? `custom.${P}` : never : never]-?: {
|
|
57
59
|
type: NonNullable<T['type'][P]>;
|
|
58
60
|
operators: T['operators'];
|
|
59
61
|
};
|
|
@@ -137,6 +139,7 @@ export interface AIIndicatorClearEvent {
|
|
|
137
139
|
*/
|
|
138
140
|
cid?: string;
|
|
139
141
|
received_at?: TimestampNS;
|
|
142
|
+
user?: UserResponseCommonFields;
|
|
140
143
|
}
|
|
141
144
|
export interface AIIndicatorStopEvent {
|
|
142
145
|
/**
|
|
@@ -161,6 +164,7 @@ export interface AIIndicatorStopEvent {
|
|
|
161
164
|
*/
|
|
162
165
|
cid?: string;
|
|
163
166
|
received_at?: TimestampNS;
|
|
167
|
+
user?: UserResponseCommonFields;
|
|
164
168
|
}
|
|
165
169
|
export interface AIIndicatorUpdateEvent {
|
|
166
170
|
/**
|
|
@@ -197,6 +201,7 @@ export interface AIIndicatorUpdateEvent {
|
|
|
197
201
|
*/
|
|
198
202
|
cid?: string;
|
|
199
203
|
received_at?: TimestampNS;
|
|
204
|
+
user?: UserResponseCommonFields;
|
|
200
205
|
}
|
|
201
206
|
export interface AITextConfig {
|
|
202
207
|
enabled: boolean;
|
|
@@ -240,6 +245,10 @@ export interface APIError {
|
|
|
240
245
|
* Additional error-specific information
|
|
241
246
|
*/
|
|
242
247
|
details: Array<number>;
|
|
248
|
+
/**
|
|
249
|
+
* Milliseconds until the user's slow mode cool down period ends. Only set on code 60 (cool down) errors
|
|
250
|
+
*/
|
|
251
|
+
cooldown_remaining_ms?: number;
|
|
243
252
|
/**
|
|
244
253
|
* Flag that indicates if the error is unrecoverable, requests that return unrecoverable errors should not be retried, this error only applies to the request that caused it
|
|
245
254
|
*/
|
|
@@ -330,6 +339,16 @@ export interface AddUserGroupMembersResponse {
|
|
|
330
339
|
duration: string;
|
|
331
340
|
user_group?: UserGroupResponse;
|
|
332
341
|
}
|
|
342
|
+
export interface AppDefaults {
|
|
343
|
+
/**
|
|
344
|
+
* Defaults applied by the get-or-create channel endpoint.
|
|
345
|
+
*/
|
|
346
|
+
get_or_create_channel: GetOrCreateChannelDefaults;
|
|
347
|
+
/**
|
|
348
|
+
* Defaults applied by the query channels endpoint.
|
|
349
|
+
*/
|
|
350
|
+
query_channels: QueryChannelsDefaults;
|
|
351
|
+
}
|
|
333
352
|
export interface AppEventResponse {
|
|
334
353
|
/**
|
|
335
354
|
* boolean
|
|
@@ -361,6 +380,10 @@ export interface AppResponseFields {
|
|
|
361
380
|
*/
|
|
362
381
|
name: string;
|
|
363
382
|
placement: string;
|
|
383
|
+
/**
|
|
384
|
+
* Request limit defaults applied by the server when the corresponding field is omitted.
|
|
385
|
+
*/
|
|
386
|
+
defaults: AppDefaults;
|
|
364
387
|
file_upload_config: FileUploadConfig;
|
|
365
388
|
image_upload_config: FileUploadConfig;
|
|
366
389
|
}
|
|
@@ -640,11 +663,19 @@ export interface BanRequest {
|
|
|
640
663
|
* ID of the user to ban
|
|
641
664
|
*/
|
|
642
665
|
target_user_id: string;
|
|
666
|
+
/**
|
|
667
|
+
* Whether to also ban the user from future channels created by the banner
|
|
668
|
+
*/
|
|
669
|
+
ban_from_future_channels?: boolean;
|
|
643
670
|
/**
|
|
644
671
|
* Channel where the ban applies
|
|
645
672
|
*/
|
|
646
673
|
channel_cid?: string;
|
|
647
674
|
delete_messages?: 'soft' | 'pruning' | 'hard';
|
|
675
|
+
/**
|
|
676
|
+
* Whether to delete reactions by the banned user on other users' messages
|
|
677
|
+
*/
|
|
678
|
+
delete_reactions?: boolean;
|
|
648
679
|
/**
|
|
649
680
|
* Whether to ban the user's IP address
|
|
650
681
|
*/
|
|
@@ -900,6 +931,30 @@ export interface CallViolationCountParameters {
|
|
|
900
931
|
export interface CastPollVoteRequest {
|
|
901
932
|
vote?: VoteData;
|
|
902
933
|
}
|
|
934
|
+
export interface ChannelBanResponse {
|
|
935
|
+
created_at: TimestampNS;
|
|
936
|
+
scopes: Array<string>;
|
|
937
|
+
channel_ban?: ChannelBanScopeResponse;
|
|
938
|
+
future_channel_ban?: ChannelBanScopeResponse;
|
|
939
|
+
/**
|
|
940
|
+
* User response object
|
|
941
|
+
*/
|
|
942
|
+
user?: UserResponse;
|
|
943
|
+
}
|
|
944
|
+
export interface ChannelBanScopeResponse {
|
|
945
|
+
created_at: TimestampNS;
|
|
946
|
+
shadow: boolean;
|
|
947
|
+
expires?: TimestampNS;
|
|
948
|
+
reason?: string;
|
|
949
|
+
/**
|
|
950
|
+
* User response object
|
|
951
|
+
*/
|
|
952
|
+
banned_by?: UserResponse;
|
|
953
|
+
}
|
|
954
|
+
export interface ChannelBansScopeTotals {
|
|
955
|
+
channel: number;
|
|
956
|
+
future_channel: number;
|
|
957
|
+
}
|
|
903
958
|
export interface ChannelConfigOverrides {
|
|
904
959
|
blocklist?: string;
|
|
905
960
|
blocklist_behavior?: 'flag' | 'block';
|
|
@@ -1125,6 +1180,10 @@ export interface ChannelGetOrCreateRequest {
|
|
|
1125
1180
|
* Whether this channel will be hidden for the user who created the channel or not
|
|
1126
1181
|
*/
|
|
1127
1182
|
hide_for_creator?: boolean;
|
|
1183
|
+
/**
|
|
1184
|
+
* Adds scheduled_messages to the response: the caller's own scheduled, sending and failed messages in this channel. Client-side only. Absent from the response when there are more than 100 or they could not be loaded; use the scheduled messages query then
|
|
1185
|
+
*/
|
|
1186
|
+
include_scheduled_messages?: boolean;
|
|
1128
1187
|
/**
|
|
1129
1188
|
* Fetch user presence info
|
|
1130
1189
|
*/
|
|
@@ -1320,6 +1379,7 @@ export interface ChannelMemberResponse {
|
|
|
1320
1379
|
* Date/time of the last update
|
|
1321
1380
|
*/
|
|
1322
1381
|
updated_at: TimestampNS;
|
|
1382
|
+
user_id: string;
|
|
1323
1383
|
custom: CustomMemberData;
|
|
1324
1384
|
archived_at?: TimestampNS;
|
|
1325
1385
|
/**
|
|
@@ -1357,7 +1417,6 @@ export interface ChannelMemberResponse {
|
|
|
1357
1417
|
*/
|
|
1358
1418
|
role?: string;
|
|
1359
1419
|
status?: string;
|
|
1360
|
-
user_id?: string;
|
|
1361
1420
|
deleted_messages?: Array<string>;
|
|
1362
1421
|
/**
|
|
1363
1422
|
* User response object
|
|
@@ -1424,6 +1483,7 @@ export declare const ChannelOwnCapability: {
|
|
|
1424
1483
|
readonly QUERY_POLL_VOTES: "query-poll-votes";
|
|
1425
1484
|
readonly QUOTE_MESSAGE: "quote-message";
|
|
1426
1485
|
readonly READ_EVENTS: "read-events";
|
|
1486
|
+
readonly SCHEDULE_MESSAGE: "schedule-message";
|
|
1427
1487
|
readonly SEARCH_MESSAGES: "search-messages";
|
|
1428
1488
|
readonly SEND_CUSTOM_EVENTS: "send-custom-events";
|
|
1429
1489
|
readonly SEND_LINKS: "send-links";
|
|
@@ -1567,16 +1627,54 @@ export interface ChannelResponse {
|
|
|
1567
1627
|
}
|
|
1568
1628
|
export interface ChannelStateResponse {
|
|
1569
1629
|
duration: string;
|
|
1630
|
+
/**
|
|
1631
|
+
* List of channel members
|
|
1632
|
+
*/
|
|
1570
1633
|
members: Array<ChannelMemberResponse>;
|
|
1634
|
+
/**
|
|
1635
|
+
* List of channel messages
|
|
1636
|
+
*/
|
|
1571
1637
|
messages: Array<MessageResponse>;
|
|
1638
|
+
/**
|
|
1639
|
+
* List of pinned messages in the channel
|
|
1640
|
+
*/
|
|
1572
1641
|
pinned_messages: Array<MessageResponse>;
|
|
1573
1642
|
threads: Array<ThreadStateResponse>;
|
|
1643
|
+
/**
|
|
1644
|
+
* Milliseconds until the current user's slow mode cool down period ends. Only set on client-side get or create channel and get channel requests while the user is under cool down
|
|
1645
|
+
*/
|
|
1646
|
+
cooldown_remaining_ms?: number;
|
|
1647
|
+
/**
|
|
1648
|
+
* Whether this channel is hidden or not
|
|
1649
|
+
*/
|
|
1574
1650
|
hidden?: boolean;
|
|
1651
|
+
/**
|
|
1652
|
+
* Messages before this date are hidden from the user
|
|
1653
|
+
*/
|
|
1575
1654
|
hide_messages_before?: TimestampNS;
|
|
1655
|
+
/**
|
|
1656
|
+
* Number of channel watchers
|
|
1657
|
+
*/
|
|
1576
1658
|
watcher_count?: number;
|
|
1659
|
+
/**
|
|
1660
|
+
* Active live locations in the channel
|
|
1661
|
+
*/
|
|
1577
1662
|
active_live_locations?: Array<SharedLocationResponseData>;
|
|
1663
|
+
/**
|
|
1664
|
+
* Pending messages that this user has sent
|
|
1665
|
+
*/
|
|
1578
1666
|
pending_messages?: Array<PendingMessageResponse>;
|
|
1667
|
+
/**
|
|
1668
|
+
* List of read states
|
|
1669
|
+
*/
|
|
1579
1670
|
read?: Array<ReadStateResponse>;
|
|
1671
|
+
/**
|
|
1672
|
+
* The caller's own scheduled, sending and failed messages in this channel. Set only by a client-side GetOrCreateChannel with include_scheduled_messages; absent when not requested or not known, in which case use the scheduled messages query
|
|
1673
|
+
*/
|
|
1674
|
+
scheduled_messages?: Array<ScheduledMessageResponse>;
|
|
1675
|
+
/**
|
|
1676
|
+
* List of user who is watching the channel
|
|
1677
|
+
*/
|
|
1580
1678
|
watchers?: Array<UserResponse>;
|
|
1581
1679
|
/**
|
|
1582
1680
|
* Represents channel in chat
|
|
@@ -1603,6 +1701,10 @@ export interface ChannelStateResponseFields {
|
|
|
1603
1701
|
*/
|
|
1604
1702
|
pinned_messages: Array<MessageResponse>;
|
|
1605
1703
|
threads: Array<ThreadStateResponse>;
|
|
1704
|
+
/**
|
|
1705
|
+
* Milliseconds until the current user's slow mode cool down period ends. Only set on client-side get or create channel and get channel requests while the user is under cool down
|
|
1706
|
+
*/
|
|
1707
|
+
cooldown_remaining_ms?: number;
|
|
1606
1708
|
/**
|
|
1607
1709
|
* Whether this channel is hidden or not
|
|
1608
1710
|
*/
|
|
@@ -2147,6 +2249,10 @@ export interface ContentCountRuleParameters {
|
|
|
2147
2249
|
threshold?: number;
|
|
2148
2250
|
time_window?: string;
|
|
2149
2251
|
}
|
|
2252
|
+
export interface ContentCountryCodeParameters {
|
|
2253
|
+
operator?: string;
|
|
2254
|
+
country_codes?: Array<string>;
|
|
2255
|
+
}
|
|
2150
2256
|
export interface ContentCustomPropertyCountParameters {
|
|
2151
2257
|
operator?: string;
|
|
2152
2258
|
property_key?: string;
|
|
@@ -2461,6 +2567,28 @@ export interface DeleteMessageResponse {
|
|
|
2461
2567
|
export interface DeleteModerationConfigResponse {
|
|
2462
2568
|
duration: string;
|
|
2463
2569
|
}
|
|
2570
|
+
export interface DeletePollAnswerRequestPayload {
|
|
2571
|
+
/**
|
|
2572
|
+
* Reason for deletion
|
|
2573
|
+
*/
|
|
2574
|
+
reason?: string;
|
|
2575
|
+
}
|
|
2576
|
+
export interface DeletePollOptionRequestPayload {
|
|
2577
|
+
/**
|
|
2578
|
+
* Option to delete. Required on an item for a whole poll (create or edit); defaults to the option an add_option / update_option item was raised for
|
|
2579
|
+
*/
|
|
2580
|
+
option_id?: string;
|
|
2581
|
+
/**
|
|
2582
|
+
* Reason for deletion
|
|
2583
|
+
*/
|
|
2584
|
+
reason?: string;
|
|
2585
|
+
}
|
|
2586
|
+
export interface DeletePollRequestPayload {
|
|
2587
|
+
/**
|
|
2588
|
+
* Reason for deletion
|
|
2589
|
+
*/
|
|
2590
|
+
reason?: string;
|
|
2591
|
+
}
|
|
2464
2592
|
export interface DeleteQueueRequest {
|
|
2465
2593
|
}
|
|
2466
2594
|
export interface DeleteReactionRequestPayload {
|
|
@@ -2498,6 +2626,16 @@ export interface DeleteReminderResponse {
|
|
|
2498
2626
|
*/
|
|
2499
2627
|
duration: string;
|
|
2500
2628
|
}
|
|
2629
|
+
export interface DeleteScheduledMessageResponse {
|
|
2630
|
+
/**
|
|
2631
|
+
* Duration of the request in milliseconds
|
|
2632
|
+
*/
|
|
2633
|
+
duration: string;
|
|
2634
|
+
/**
|
|
2635
|
+
* A message scheduled to be sent later
|
|
2636
|
+
*/
|
|
2637
|
+
scheduled_message: ScheduledMessageResponse;
|
|
2638
|
+
}
|
|
2501
2639
|
export interface DeleteUserMessagesRequestPayload {
|
|
2502
2640
|
/**
|
|
2503
2641
|
* Message deletion mode: soft, pruning, or hard
|
|
@@ -2768,7 +2906,6 @@ export interface EntityCreatorResponse {
|
|
|
2768
2906
|
image?: string;
|
|
2769
2907
|
last_active?: TimestampNS;
|
|
2770
2908
|
name?: string;
|
|
2771
|
-
revoke_tokens_issued_before?: TimestampNS;
|
|
2772
2909
|
teams_role?: Record<string, string>;
|
|
2773
2910
|
}
|
|
2774
2911
|
export interface EscalatePayload {
|
|
@@ -2857,6 +2994,7 @@ export interface FeedsNotificationComment {
|
|
|
2857
2994
|
comment: string;
|
|
2858
2995
|
id: string;
|
|
2859
2996
|
user_id: string;
|
|
2997
|
+
parent_id?: string;
|
|
2860
2998
|
attachments?: Array<Attachment>;
|
|
2861
2999
|
}
|
|
2862
3000
|
export interface FeedsNotificationContext {
|
|
@@ -3016,6 +3154,7 @@ export interface FeedsV3CommentResponse {
|
|
|
3016
3154
|
confidence_score: number;
|
|
3017
3155
|
created_at: TimestampNS;
|
|
3018
3156
|
downvote_count: number;
|
|
3157
|
+
hidden: boolean;
|
|
3019
3158
|
id: string;
|
|
3020
3159
|
object_id: string;
|
|
3021
3160
|
object_type: string;
|
|
@@ -3241,7 +3380,6 @@ export interface FullUserResponse {
|
|
|
3241
3380
|
image?: string;
|
|
3242
3381
|
last_active?: TimestampNS;
|
|
3243
3382
|
name?: string;
|
|
3244
|
-
revoke_tokens_issued_before?: TimestampNS;
|
|
3245
3383
|
latest_hidden_channels?: Array<string>;
|
|
3246
3384
|
/**
|
|
3247
3385
|
* The privacy settings of the user.
|
|
@@ -3377,6 +3515,16 @@ export interface GetOGResponse {
|
|
|
3377
3515
|
fields?: Array<Field>;
|
|
3378
3516
|
giphy?: Images;
|
|
3379
3517
|
}
|
|
3518
|
+
export interface GetOrCreateChannelDefaults {
|
|
3519
|
+
/**
|
|
3520
|
+
* Resolved defaults for a nested pagination object.
|
|
3521
|
+
*/
|
|
3522
|
+
members: PagerDefaults;
|
|
3523
|
+
/**
|
|
3524
|
+
* Resolved defaults for a nested pagination object.
|
|
3525
|
+
*/
|
|
3526
|
+
messages: PagerDefaults;
|
|
3527
|
+
}
|
|
3380
3528
|
export interface GetPinnedMessagesResponse {
|
|
3381
3529
|
/**
|
|
3382
3530
|
* Duration of the request in milliseconds
|
|
@@ -3426,14 +3574,36 @@ export interface GroupedChannelsBucket {
|
|
|
3426
3574
|
*/
|
|
3427
3575
|
prev?: string;
|
|
3428
3576
|
/**
|
|
3429
|
-
*
|
|
3577
|
+
* Total unread channels matching this bucket and its filters, independent of page size
|
|
3430
3578
|
*/
|
|
3431
3579
|
unread_channels?: number;
|
|
3432
3580
|
}
|
|
3433
3581
|
export interface GroupedChannelsGroupRequest {
|
|
3582
|
+
/**
|
|
3583
|
+
* Max channels for this group; omitted or zero uses the request limit
|
|
3584
|
+
*/
|
|
3434
3585
|
limit?: number;
|
|
3586
|
+
/**
|
|
3587
|
+
* Cursor for the next page; only allowed when requesting one group
|
|
3588
|
+
*/
|
|
3435
3589
|
next?: string;
|
|
3590
|
+
/**
|
|
3591
|
+
* Cursor for the previous page; only allowed when requesting one group
|
|
3592
|
+
*/
|
|
3436
3593
|
prev?: string;
|
|
3594
|
+
/**
|
|
3595
|
+
* Optional query_timestamp $gte bound for a stored group, requiring query_timestamp sort; do not repeat its group name. For all, combine group equality/$in and date bounds with $or, or use one standalone group $ne exclusion. An empty object matches a stored group; omitted or null preserves legacy grouping.
|
|
3596
|
+
*/
|
|
3597
|
+
filter_conditions?: Filters<{
|
|
3598
|
+
group: {
|
|
3599
|
+
type: string;
|
|
3600
|
+
operators: '$eq' | '$in' | '$ne';
|
|
3601
|
+
};
|
|
3602
|
+
query_timestamp: {
|
|
3603
|
+
type: Date | string;
|
|
3604
|
+
operators: '$gte';
|
|
3605
|
+
};
|
|
3606
|
+
}>;
|
|
3437
3607
|
}
|
|
3438
3608
|
export interface GroupedQueryChannelsRequest {
|
|
3439
3609
|
/**
|
|
@@ -3449,7 +3619,11 @@ export interface GroupedQueryChannelsRequest {
|
|
|
3449
3619
|
*/
|
|
3450
3620
|
watch?: boolean;
|
|
3451
3621
|
/**
|
|
3452
|
-
*
|
|
3622
|
+
* Optional query_timestamp descending with NULLS LAST when enabled. Omitted sort preserves existing last_updated ordering and cursor formats
|
|
3623
|
+
*/
|
|
3624
|
+
sort?: Array<SortParamRequest>;
|
|
3625
|
+
/**
|
|
3626
|
+
* Groups to return, keyed by stored group name. Each entry can define limit, next, prev, and optional filter_conditions: date bounds for stored groups; all supports combined group/date branches or one group $ne exclusion. Cursors are only allowed when requesting exactly one group. Omitted or null filters preserve legacy grouping, including all.
|
|
3453
3627
|
*/
|
|
3454
3628
|
groups?: Record<string, GroupedChannelsGroupRequest>;
|
|
3455
3629
|
}
|
|
@@ -3459,7 +3633,7 @@ export interface GroupedQueryChannelsResponse {
|
|
|
3459
3633
|
*/
|
|
3460
3634
|
duration: string;
|
|
3461
3635
|
/**
|
|
3462
|
-
*
|
|
3636
|
+
* Groups keyed by the requested stored group name
|
|
3463
3637
|
*/
|
|
3464
3638
|
groups: Record<string, GroupedChannelsBucket>;
|
|
3465
3639
|
}
|
|
@@ -3589,65 +3763,29 @@ export interface IntentConfigResponse {
|
|
|
3589
3763
|
*/
|
|
3590
3764
|
topics: Array<IntentTopicResponse>;
|
|
3591
3765
|
}
|
|
3766
|
+
export interface IntentRuleParameters {
|
|
3767
|
+
topic: string;
|
|
3768
|
+
threshold?: number;
|
|
3769
|
+
}
|
|
3592
3770
|
export interface IntentTopicRequest {
|
|
3593
3771
|
/**
|
|
3594
3772
|
* Unique topic label (e.g. purchase_intent)
|
|
3595
3773
|
*/
|
|
3596
3774
|
label: string;
|
|
3597
|
-
/**
|
|
3598
|
-
* How long the buffer collects items before scoring runs
|
|
3599
|
-
*/
|
|
3600
|
-
analysis_cooldown_seconds?: number;
|
|
3601
3775
|
/**
|
|
3602
3776
|
* Optional description used in the classification prompt; the label alone is used when empty
|
|
3603
3777
|
*/
|
|
3604
3778
|
description?: string;
|
|
3605
|
-
/**
|
|
3606
|
-
* Whether this topic is evaluated
|
|
3607
|
-
*/
|
|
3608
|
-
enabled?: boolean;
|
|
3609
|
-
/**
|
|
3610
|
-
* Items buffered per conversation before scoring runs early
|
|
3611
|
-
*/
|
|
3612
|
-
max_captured_items?: number;
|
|
3613
|
-
/**
|
|
3614
|
-
* Suppresses this topic for a user and conversation after it fires; 0 uses the default
|
|
3615
|
-
*/
|
|
3616
|
-
refire_cooldown_seconds?: number;
|
|
3617
|
-
/**
|
|
3618
|
-
* Conversation score (0-100) required to fire moderation.intent_detected
|
|
3619
|
-
*/
|
|
3620
|
-
score_threshold?: number;
|
|
3621
3779
|
}
|
|
3622
3780
|
export interface IntentTopicResponse {
|
|
3623
|
-
/**
|
|
3624
|
-
* How long the buffer collects items before scoring runs
|
|
3625
|
-
*/
|
|
3626
|
-
analysis_cooldown_seconds: number;
|
|
3627
|
-
/**
|
|
3628
|
-
* Whether this topic is evaluated
|
|
3629
|
-
*/
|
|
3630
|
-
enabled: boolean;
|
|
3631
3781
|
/**
|
|
3632
3782
|
* Unique topic label (e.g. purchase_intent)
|
|
3633
3783
|
*/
|
|
3634
3784
|
label: string;
|
|
3635
|
-
/**
|
|
3636
|
-
* Items buffered per conversation before scoring runs early
|
|
3637
|
-
*/
|
|
3638
|
-
max_captured_items: number;
|
|
3639
|
-
/**
|
|
3640
|
-
* Conversation score (0-100) required to fire moderation.intent_detected
|
|
3641
|
-
*/
|
|
3642
|
-
score_threshold: number;
|
|
3643
3785
|
/**
|
|
3644
3786
|
* Optional description used in the classification prompt; the label alone is used when empty
|
|
3645
3787
|
*/
|
|
3646
3788
|
description?: string;
|
|
3647
|
-
/**
|
|
3648
|
-
* Suppresses this topic for a user and conversation after it fires; 0 uses the default
|
|
3649
|
-
*/
|
|
3650
|
-
refire_cooldown_seconds?: number;
|
|
3651
3789
|
}
|
|
3652
3790
|
export interface KeyframeOCRRuleParameters {
|
|
3653
3791
|
threshold?: number;
|
|
@@ -4143,6 +4281,9 @@ export interface MessageModerationResult {
|
|
|
4143
4281
|
* User who moderated the message
|
|
4144
4282
|
*/
|
|
4145
4283
|
moderated_by?: string;
|
|
4284
|
+
/**
|
|
4285
|
+
* Response from AI moderation
|
|
4286
|
+
*/
|
|
4146
4287
|
ai_moderation_response?: ModerationResponse;
|
|
4147
4288
|
/**
|
|
4148
4289
|
* Sets thresholds for AI moderation
|
|
@@ -5001,9 +5142,21 @@ export interface ModerationQueueResponse {
|
|
|
5001
5142
|
filters: Record<string, any>;
|
|
5002
5143
|
}
|
|
5003
5144
|
export interface ModerationResponse {
|
|
5145
|
+
/**
|
|
5146
|
+
* Action taken by automod
|
|
5147
|
+
*/
|
|
5004
5148
|
action: string;
|
|
5149
|
+
/**
|
|
5150
|
+
* Explicit score
|
|
5151
|
+
*/
|
|
5005
5152
|
explicit: number;
|
|
5153
|
+
/**
|
|
5154
|
+
* Spam score
|
|
5155
|
+
*/
|
|
5006
5156
|
spam: number;
|
|
5157
|
+
/**
|
|
5158
|
+
* Toxicity score
|
|
5159
|
+
*/
|
|
5007
5160
|
toxic: number;
|
|
5008
5161
|
}
|
|
5009
5162
|
export interface ModerationV2Response {
|
|
@@ -5091,7 +5244,20 @@ export interface NotificationAddedToChannelEvent {
|
|
|
5091
5244
|
* The team ID
|
|
5092
5245
|
*/
|
|
5093
5246
|
team?: string;
|
|
5247
|
+
/**
|
|
5248
|
+
* The total number of unread messages
|
|
5249
|
+
*/
|
|
5250
|
+
total_unread_count?: number;
|
|
5251
|
+
/**
|
|
5252
|
+
* The number of channels with unread messages
|
|
5253
|
+
*/
|
|
5254
|
+
unread_channels?: number;
|
|
5255
|
+
/**
|
|
5256
|
+
* The number of unread messages
|
|
5257
|
+
*/
|
|
5258
|
+
unread_count?: number;
|
|
5094
5259
|
channel_custom?: CustomChannelData;
|
|
5260
|
+
grouped_unread_channels?: Record<string, number>;
|
|
5095
5261
|
}
|
|
5096
5262
|
export interface NotificationChannelDeletedEvent {
|
|
5097
5263
|
/**
|
|
@@ -5684,6 +5850,7 @@ export interface OwnUserResponse {
|
|
|
5684
5850
|
unread_count: number;
|
|
5685
5851
|
unread_threads: number;
|
|
5686
5852
|
updated_at: TimestampNS;
|
|
5853
|
+
blocked_user_ids: Array<string>;
|
|
5687
5854
|
channel_mutes: Array<ChannelMute>;
|
|
5688
5855
|
devices: Array<DeviceResponse>;
|
|
5689
5856
|
mutes: Array<UserMuteResponse>;
|
|
@@ -5695,8 +5862,6 @@ export interface OwnUserResponse {
|
|
|
5695
5862
|
image?: string;
|
|
5696
5863
|
last_active?: TimestampNS;
|
|
5697
5864
|
name?: string;
|
|
5698
|
-
revoke_tokens_issued_before?: TimestampNS;
|
|
5699
|
-
blocked_user_ids?: Array<string>;
|
|
5700
5865
|
latest_hidden_channels?: Array<string>;
|
|
5701
5866
|
/**
|
|
5702
5867
|
* The privacy settings of the user.
|
|
@@ -5709,6 +5874,12 @@ export interface OwnUserResponse {
|
|
|
5709
5874
|
teams_role?: Record<string, string>;
|
|
5710
5875
|
total_unread_count_by_team?: Record<string, number>;
|
|
5711
5876
|
}
|
|
5877
|
+
export interface PagerDefaults {
|
|
5878
|
+
/**
|
|
5879
|
+
* Number of records returned when `limit` is omitted.
|
|
5880
|
+
*/
|
|
5881
|
+
limit: number;
|
|
5882
|
+
}
|
|
5712
5883
|
export interface PaginationParams {
|
|
5713
5884
|
id_gt?: number;
|
|
5714
5885
|
id_gte?: number;
|
|
@@ -6037,12 +6208,20 @@ export interface PushPreferenceInput {
|
|
|
6037
6208
|
* Remove the disabled until time. (IE stop snoozing notifications)
|
|
6038
6209
|
*/
|
|
6039
6210
|
remove_disable?: boolean;
|
|
6211
|
+
/**
|
|
6212
|
+
* Remove the user's quiet-hours schedule, the counterpart of remove_disable. It is applied before schedule, so sending both in one item replaces the stored schedule instead of merging into it. Cannot be combined with channel_cid. To switch from a schedule to a snooze, send remove_schedule together with disabled_until.
|
|
6213
|
+
*/
|
|
6214
|
+
remove_schedule?: boolean;
|
|
6040
6215
|
/**
|
|
6041
6216
|
* The user id for which to set the push preferences. Required when using server side auths, defaults to current user with client side auth.
|
|
6042
6217
|
*/
|
|
6043
6218
|
user_id?: string;
|
|
6044
6219
|
chat_preferences?: ChatPreferencesInput;
|
|
6045
6220
|
feeds_preferences?: FeedsPreferences;
|
|
6221
|
+
/**
|
|
6222
|
+
* A recurring quiet-hours schedule: while any quiet window is active, push notifications for the user are suppressed. Suppressed notifications are dropped, not delayed.
|
|
6223
|
+
*/
|
|
6224
|
+
schedule?: PushScheduleInput;
|
|
6046
6225
|
}
|
|
6047
6226
|
export interface PushPreferencesResponse {
|
|
6048
6227
|
call_level?: string;
|
|
@@ -6057,6 +6236,30 @@ export interface PushPreferencesResponse {
|
|
|
6057
6236
|
feeds_level?: string;
|
|
6058
6237
|
chat_preferences?: ChatPreferencesResponse;
|
|
6059
6238
|
feeds_preferences?: FeedsPreferencesResponse;
|
|
6239
|
+
/**
|
|
6240
|
+
* A recurring quiet-hours schedule: while any quiet window is active, push notifications for the user are suppressed. Suppressed notifications are dropped, not delayed.
|
|
6241
|
+
*/
|
|
6242
|
+
schedule?: PushScheduleResponse;
|
|
6243
|
+
}
|
|
6244
|
+
export interface PushScheduleInput {
|
|
6245
|
+
/**
|
|
6246
|
+
* IANA time zone name the quiet windows are evaluated in, for example Europe/Amsterdam or America/New_York. Daylight saving time is followed automatically for region-based names. Offsets such as +02:00 and the name "Local" are rejected; fixed-offset zones such as UTC or Etc/GMT-2 are accepted but never shift for daylight saving time. When updating an existing schedule, a non-empty timezone replaces the stored one and leaves the stored quiet_hours untouched.
|
|
6247
|
+
*/
|
|
6248
|
+
timezone?: string;
|
|
6249
|
+
/**
|
|
6250
|
+
* The quiet windows, 1 to 7 rules. Push is suppressed while any rule is active. When present it replaces all stored rules; omit it to keep them, for example to change only the timezone. An empty array counts as omitted, so it cannot be used to clear the rules: use remove_schedule for that.
|
|
6251
|
+
*/
|
|
6252
|
+
quiet_hours?: Array<QuietHoursRuleInput>;
|
|
6253
|
+
}
|
|
6254
|
+
export interface PushScheduleResponse {
|
|
6255
|
+
/**
|
|
6256
|
+
* IANA time zone name the quiet windows are evaluated in, for example Europe/Amsterdam.
|
|
6257
|
+
*/
|
|
6258
|
+
timezone: string;
|
|
6259
|
+
/**
|
|
6260
|
+
* The quiet windows. Push is suppressed while any rule is active.
|
|
6261
|
+
*/
|
|
6262
|
+
quiet_hours: Array<QuietHoursRuleResponse>;
|
|
6060
6263
|
}
|
|
6061
6264
|
export interface QueryAppealsRequest {
|
|
6062
6265
|
limit?: number;
|
|
@@ -6151,10 +6354,10 @@ export interface QueryBannedUsersPayload {
|
|
|
6151
6354
|
operators: '$eq' | '$exists' | '$gt' | '$gte' | '$in' | '$lt' | '$lte';
|
|
6152
6355
|
};
|
|
6153
6356
|
}>;
|
|
6154
|
-
created_at_after?:
|
|
6155
|
-
created_at_after_or_equal?:
|
|
6156
|
-
created_at_before?:
|
|
6157
|
-
created_at_before_or_equal?:
|
|
6357
|
+
created_at_after?: Date | string;
|
|
6358
|
+
created_at_after_or_equal?: Date | string;
|
|
6359
|
+
created_at_before?: Date | string;
|
|
6360
|
+
created_at_before_or_equal?: Date | string;
|
|
6158
6361
|
/**
|
|
6159
6362
|
* Whether to exclude expired bans or not
|
|
6160
6363
|
*/
|
|
@@ -6182,6 +6385,63 @@ export interface QueryBannedUsersResponse {
|
|
|
6182
6385
|
*/
|
|
6183
6386
|
bans: Array<BanResponse>;
|
|
6184
6387
|
}
|
|
6388
|
+
export interface QueryChannelBansRequest {
|
|
6389
|
+
/**
|
|
6390
|
+
* Whether to exclude expired bans or not
|
|
6391
|
+
*/
|
|
6392
|
+
exclude_expired_bans?: boolean;
|
|
6393
|
+
/**
|
|
6394
|
+
* When true, the response includes total and total_by_scope: the number of banned users overall and per scope, independent of paging
|
|
6395
|
+
*/
|
|
6396
|
+
include_total?: boolean;
|
|
6397
|
+
limit?: number;
|
|
6398
|
+
next?: string;
|
|
6399
|
+
prev?: string;
|
|
6400
|
+
/**
|
|
6401
|
+
* Filter conditions to apply to the query
|
|
6402
|
+
*/
|
|
6403
|
+
filter_conditions?: Filters<{
|
|
6404
|
+
user_id: {
|
|
6405
|
+
type: string;
|
|
6406
|
+
operators: '$autocomplete' | '$eq' | '$in';
|
|
6407
|
+
};
|
|
6408
|
+
}>;
|
|
6409
|
+
}
|
|
6410
|
+
export interface QueryChannelBansResponse {
|
|
6411
|
+
/**
|
|
6412
|
+
* Duration of the request in milliseconds
|
|
6413
|
+
*/
|
|
6414
|
+
duration: string;
|
|
6415
|
+
/**
|
|
6416
|
+
* Users banned from the channel, one entry per user, newest ban first
|
|
6417
|
+
*/
|
|
6418
|
+
bans: Array<ChannelBanResponse>;
|
|
6419
|
+
next?: string;
|
|
6420
|
+
prev?: string;
|
|
6421
|
+
/**
|
|
6422
|
+
* Number of banned users, each counted once, ignoring paging. Counted per scope with a cap of 100000 each, so it can reach 200000. Only present when include_total is set on the request; omitted when counting timed out
|
|
6423
|
+
*/
|
|
6424
|
+
total?: number;
|
|
6425
|
+
total_by_scope?: ChannelBansScopeTotals;
|
|
6426
|
+
}
|
|
6427
|
+
export interface QueryChannelsDefaults {
|
|
6428
|
+
/**
|
|
6429
|
+
* Number of channels returned when `limit` is omitted.
|
|
6430
|
+
*/
|
|
6431
|
+
limit: number;
|
|
6432
|
+
/**
|
|
6433
|
+
* Largest number of channels returned for one request. A bigger `limit` is silently clamped to this value rather than rejected. An app with no per-app override gets a higher ceiling for the narrow case of a request asking for at most one message and one member per channel.
|
|
6434
|
+
*/
|
|
6435
|
+
max_limit: number;
|
|
6436
|
+
/**
|
|
6437
|
+
* Number of members returned per channel when `member_limit` is omitted.
|
|
6438
|
+
*/
|
|
6439
|
+
member_limit: number;
|
|
6440
|
+
/**
|
|
6441
|
+
* Number of messages returned per channel when `message_limit` is omitted.
|
|
6442
|
+
*/
|
|
6443
|
+
message_limit: number;
|
|
6444
|
+
}
|
|
6185
6445
|
export interface QueryChannelsRequest {
|
|
6186
6446
|
/**
|
|
6187
6447
|
* Number of channels to limit
|
|
@@ -6338,6 +6598,7 @@ export interface QueryChannelsRequest {
|
|
|
6338
6598
|
team: {
|
|
6339
6599
|
type: string;
|
|
6340
6600
|
operators: '$eq' | '$exists' | '$gt' | '$gte' | '$in' | '$lt' | '$lte';
|
|
6601
|
+
allowEmpty: true;
|
|
6341
6602
|
};
|
|
6342
6603
|
type: {
|
|
6343
6604
|
type: string;
|
|
@@ -6404,10 +6665,10 @@ export interface QueryDraftsResponse {
|
|
|
6404
6665
|
prev?: string;
|
|
6405
6666
|
}
|
|
6406
6667
|
export interface QueryFutureChannelBansPayload {
|
|
6407
|
-
created_at_after?:
|
|
6408
|
-
created_at_after_or_equal?:
|
|
6409
|
-
created_at_before?:
|
|
6410
|
-
created_at_before_or_equal?:
|
|
6668
|
+
created_at_after?: Date | string;
|
|
6669
|
+
created_at_after_or_equal?: Date | string;
|
|
6670
|
+
created_at_before?: Date | string;
|
|
6671
|
+
created_at_before_or_equal?: Date | string;
|
|
6411
6672
|
/**
|
|
6412
6673
|
* Whether to exclude expired bans or not
|
|
6413
6674
|
*/
|
|
@@ -6445,10 +6706,10 @@ export interface QueryFutureChannelBansResponse {
|
|
|
6445
6706
|
}
|
|
6446
6707
|
export interface QueryMembersPayload {
|
|
6447
6708
|
type: string;
|
|
6448
|
-
created_at_after?:
|
|
6449
|
-
created_at_after_or_equal?:
|
|
6450
|
-
created_at_before?:
|
|
6451
|
-
created_at_before_or_equal?:
|
|
6709
|
+
created_at_after?: Date | string;
|
|
6710
|
+
created_at_after_or_equal?: Date | string;
|
|
6711
|
+
created_at_before?: Date | string;
|
|
6712
|
+
created_at_before_or_equal?: Date | string;
|
|
6452
6713
|
id?: string;
|
|
6453
6714
|
limit?: number;
|
|
6454
6715
|
offset?: number;
|
|
@@ -6939,6 +7200,10 @@ export interface QueryReviewQueueRequest {
|
|
|
6939
7200
|
type: string;
|
|
6940
7201
|
operators: '$eq' | '$in' | '$q';
|
|
6941
7202
|
};
|
|
7203
|
+
country_code: {
|
|
7204
|
+
type: string;
|
|
7205
|
+
operators: '$eq' | '$exists' | '$gt' | '$gte' | '$in' | '$lt' | '$lte';
|
|
7206
|
+
};
|
|
6942
7207
|
created_at: {
|
|
6943
7208
|
type: Date | string;
|
|
6944
7209
|
operators: '$eq' | '$exists' | '$gt' | '$gte' | '$in' | '$lt' | '$lte';
|
|
@@ -7096,29 +7361,61 @@ export interface QueryReviewQueueResponse {
|
|
|
7096
7361
|
default_action_config?: Record<string, Array<ModerationActionConfigResponse>>;
|
|
7097
7362
|
filter_config?: FilterConfigResponse;
|
|
7098
7363
|
}
|
|
7099
|
-
export interface
|
|
7364
|
+
export interface QueryScheduledMessagesRequest {
|
|
7365
|
+
/**
|
|
7366
|
+
* Page size, 1 to 100. Defaults to 20
|
|
7367
|
+
*/
|
|
7100
7368
|
limit?: number;
|
|
7101
|
-
|
|
7369
|
+
/**
|
|
7370
|
+
* Cursor from the previous page
|
|
7371
|
+
*/
|
|
7102
7372
|
next?: string;
|
|
7103
7373
|
/**
|
|
7104
|
-
*
|
|
7374
|
+
* Only scheduled_at ascending is supported. Pending messages come before failed ones
|
|
7105
7375
|
*/
|
|
7106
|
-
|
|
7107
|
-
prev?: string;
|
|
7376
|
+
sort?: Array<SortParamRequest>;
|
|
7108
7377
|
/**
|
|
7109
|
-
*
|
|
7378
|
+
* Filter for querying scheduled messages
|
|
7110
7379
|
*/
|
|
7111
|
-
|
|
7380
|
+
filter?: ScheduledMessagesFilter;
|
|
7381
|
+
}
|
|
7382
|
+
export interface QueryScheduledMessagesResponse {
|
|
7112
7383
|
/**
|
|
7113
|
-
*
|
|
7384
|
+
* Duration of the request in milliseconds
|
|
7114
7385
|
*/
|
|
7115
|
-
|
|
7386
|
+
duration: string;
|
|
7116
7387
|
/**
|
|
7117
|
-
*
|
|
7388
|
+
* Pending messages first, then failed ones, each by scheduled_at
|
|
7118
7389
|
*/
|
|
7119
|
-
|
|
7390
|
+
scheduled_messages: Array<ScheduledMessageResponse>;
|
|
7120
7391
|
/**
|
|
7121
|
-
*
|
|
7392
|
+
* Cursor for the next page; empty on the last page
|
|
7393
|
+
*/
|
|
7394
|
+
next?: string;
|
|
7395
|
+
}
|
|
7396
|
+
export interface QueryThreadsRequest {
|
|
7397
|
+
limit?: number;
|
|
7398
|
+
member_limit?: number;
|
|
7399
|
+
next?: string;
|
|
7400
|
+
/**
|
|
7401
|
+
* Limit the number of participants returned per each thread
|
|
7402
|
+
*/
|
|
7403
|
+
participant_limit?: number;
|
|
7404
|
+
prev?: string;
|
|
7405
|
+
/**
|
|
7406
|
+
* Limit the number of replies returned per each thread
|
|
7407
|
+
*/
|
|
7408
|
+
reply_limit?: number;
|
|
7409
|
+
/**
|
|
7410
|
+
* Start watching the channel this thread belongs to
|
|
7411
|
+
*/
|
|
7412
|
+
watch?: boolean;
|
|
7413
|
+
/**
|
|
7414
|
+
* Array of sort parameters
|
|
7415
|
+
*/
|
|
7416
|
+
sort?: Array<SortParamRequest>;
|
|
7417
|
+
/**
|
|
7418
|
+
* Filter to apply to the query
|
|
7122
7419
|
*/
|
|
7123
7420
|
filter?: Filters<{
|
|
7124
7421
|
active_participant_count: {
|
|
@@ -7279,6 +7576,34 @@ export interface QueueResponse {
|
|
|
7279
7576
|
duration: string;
|
|
7280
7577
|
queue?: ModerationQueueResponse;
|
|
7281
7578
|
}
|
|
7579
|
+
export interface QuietHoursRuleInput {
|
|
7580
|
+
/**
|
|
7581
|
+
* When the window closes, as HH:MM local wall-clock time between 00:00 and 24:00. The end is exclusive: a window ending at 07:00 is already over at 07:00. An end earlier than start wraps past midnight into the next day (start 22:00, end 07:00). 24:00 means the end of the day, so start 00:00 with end 24:00 covers the whole day.
|
|
7582
|
+
*/
|
|
7583
|
+
end: string;
|
|
7584
|
+
/**
|
|
7585
|
+
* When the window opens, as HH:MM local wall-clock time between 00:00 and 23:59. Must differ from end.
|
|
7586
|
+
*/
|
|
7587
|
+
start: string;
|
|
7588
|
+
/**
|
|
7589
|
+
* The days of the week the window opens on, any of mon, tue, wed, thu, fri, sat, sun, each at most once. A window belongs to the day it opens: ["fri"] with 22:00 to 07:00 is quiet from Friday 22:00 until Saturday 07:00, and not on Saturday night. Empty or omitted means every day.
|
|
7590
|
+
*/
|
|
7591
|
+
days?: Array<string>;
|
|
7592
|
+
}
|
|
7593
|
+
export interface QuietHoursRuleResponse {
|
|
7594
|
+
/**
|
|
7595
|
+
* When the window closes, as HH:MM local wall-clock time between 00:00 and 24:00. The end is exclusive. An end earlier than start wraps past midnight into the next day.
|
|
7596
|
+
*/
|
|
7597
|
+
end: string;
|
|
7598
|
+
/**
|
|
7599
|
+
* When the window opens, as HH:MM local wall-clock time between 00:00 and 23:59.
|
|
7600
|
+
*/
|
|
7601
|
+
start: string;
|
|
7602
|
+
/**
|
|
7603
|
+
* The days of the week the window opens on, any of mon, tue, wed, thu, fri, sat, sun. A window belongs to the day it opens: ["fri"] with 22:00 to 07:00 is quiet from Friday 22:00 until Saturday 07:00. Omitted means every day.
|
|
7604
|
+
*/
|
|
7605
|
+
days?: Array<string>;
|
|
7606
|
+
}
|
|
7282
7607
|
export interface Reaction {
|
|
7283
7608
|
activity_id: string;
|
|
7284
7609
|
created_at: TimestampNS;
|
|
@@ -7788,6 +8113,7 @@ export interface ReviewQueueItemResponse {
|
|
|
7788
8113
|
*/
|
|
7789
8114
|
confidence_score?: number;
|
|
7790
8115
|
config_key?: string;
|
|
8116
|
+
country_code?: string;
|
|
7791
8117
|
/**
|
|
7792
8118
|
* ID of who created the entity
|
|
7793
8119
|
*/
|
|
@@ -7826,6 +8152,7 @@ export interface ReviewQueueItemResponse {
|
|
|
7826
8152
|
* Content payload for moderation
|
|
7827
8153
|
*/
|
|
7828
8154
|
moderation_payload?: ModerationPayloadResponse;
|
|
8155
|
+
poll?: PollResponseData;
|
|
7829
8156
|
reaction?: Reaction;
|
|
7830
8157
|
}
|
|
7831
8158
|
export interface Role {
|
|
@@ -7867,6 +8194,7 @@ export interface RuleBuilderCondition {
|
|
|
7867
8194
|
channel_message_count_rule_params?: ChannelMessageCountRuleParameters;
|
|
7868
8195
|
closed_caption_rule_params?: ClosedCaptionRuleParameters;
|
|
7869
8196
|
content_count_rule_params?: ContentCountRuleParameters;
|
|
8197
|
+
content_country_code_params?: ContentCountryCodeParameters;
|
|
7870
8198
|
content_custom_property_count_params?: ContentCustomPropertyCountParameters;
|
|
7871
8199
|
content_custom_property_params?: ContentCustomPropertyParameters;
|
|
7872
8200
|
content_flag_count_rule_params?: FlagCountRuleParameters;
|
|
@@ -7874,6 +8202,10 @@ export interface RuleBuilderCondition {
|
|
|
7874
8202
|
flood_similar_params?: FloodSimilarRuleParameters;
|
|
7875
8203
|
image_content_params?: ImageContentParameters;
|
|
7876
8204
|
image_rule_params?: ImageRuleParameters;
|
|
8205
|
+
/**
|
|
8206
|
+
* intent_rule params: policy intent topic label and the minimum final score (1-100) that fires the condition
|
|
8207
|
+
*/
|
|
8208
|
+
intent_rule_params?: IntentRuleParameters;
|
|
7877
8209
|
ip_content_count_rule_params?: IPContentCountRuleParameters;
|
|
7878
8210
|
ip_flag_count_rule_params?: IPFlagCountRuleParameters;
|
|
7879
8211
|
keyframe_ocr_rule_params?: KeyframeOCRRuleParameters;
|
|
@@ -7881,6 +8213,7 @@ export interface RuleBuilderCondition {
|
|
|
7881
8213
|
ocr_content_params?: OCRContentParameters;
|
|
7882
8214
|
text_content_params?: TextContentParameters;
|
|
7883
8215
|
text_rule_params?: TextRuleParameters;
|
|
8216
|
+
user_channel_ban_count_params?: UserChannelBanCountRuleParameters;
|
|
7884
8217
|
user_channel_count_params?: UserChannelCountRuleParameters;
|
|
7885
8218
|
user_created_within_params?: UserCreatedWithinParameters;
|
|
7886
8219
|
user_custom_property_params?: UserCustomPropertyParameters;
|
|
@@ -7911,6 +8244,284 @@ export interface RuleBuilderRule {
|
|
|
7911
8244
|
groups?: Array<RuleBuilderConditionGroup>;
|
|
7912
8245
|
action?: RuleBuilderAction;
|
|
7913
8246
|
}
|
|
8247
|
+
export interface ScheduledMessageChannelResponse {
|
|
8248
|
+
/**
|
|
8249
|
+
* Channel CID (<type>:<id>)
|
|
8250
|
+
*/
|
|
8251
|
+
cid: string;
|
|
8252
|
+
/**
|
|
8253
|
+
* Channel ID
|
|
8254
|
+
*/
|
|
8255
|
+
id: string;
|
|
8256
|
+
/**
|
|
8257
|
+
* Channel type
|
|
8258
|
+
*/
|
|
8259
|
+
type: string;
|
|
8260
|
+
/**
|
|
8261
|
+
* Channel image, from its custom data
|
|
8262
|
+
*/
|
|
8263
|
+
image?: string;
|
|
8264
|
+
/**
|
|
8265
|
+
* Channel name, from its custom data
|
|
8266
|
+
*/
|
|
8267
|
+
name?: string;
|
|
8268
|
+
}
|
|
8269
|
+
export interface ScheduledMessageContentResponse {
|
|
8270
|
+
/**
|
|
8271
|
+
* Text of the message
|
|
8272
|
+
*/
|
|
8273
|
+
text: string;
|
|
8274
|
+
custom: Record<string, any>;
|
|
8275
|
+
/**
|
|
8276
|
+
* Contains HTML markup of the message
|
|
8277
|
+
*/
|
|
8278
|
+
html?: string;
|
|
8279
|
+
/**
|
|
8280
|
+
* Whether the message mentions the whole channel
|
|
8281
|
+
*/
|
|
8282
|
+
mentioned_channel?: boolean;
|
|
8283
|
+
/**
|
|
8284
|
+
* Whether the message mentions the online channel members
|
|
8285
|
+
*/
|
|
8286
|
+
mentioned_here?: boolean;
|
|
8287
|
+
/**
|
|
8288
|
+
* MML content of the message
|
|
8289
|
+
*/
|
|
8290
|
+
mml?: string;
|
|
8291
|
+
/**
|
|
8292
|
+
* ID of parent message (thread)
|
|
8293
|
+
*/
|
|
8294
|
+
parent_id?: string;
|
|
8295
|
+
/**
|
|
8296
|
+
* Date/time the pin expires
|
|
8297
|
+
*/
|
|
8298
|
+
pin_expires?: TimestampNS;
|
|
8299
|
+
/**
|
|
8300
|
+
* Whether the message will be pinned when sent
|
|
8301
|
+
*/
|
|
8302
|
+
pinned?: boolean;
|
|
8303
|
+
/**
|
|
8304
|
+
* Identifier of the poll to include in the message
|
|
8305
|
+
*/
|
|
8306
|
+
poll_id?: string;
|
|
8307
|
+
quoted_message_id?: string;
|
|
8308
|
+
/**
|
|
8309
|
+
* Whether thread reply should be shown in the channel as well
|
|
8310
|
+
*/
|
|
8311
|
+
show_in_channel?: boolean;
|
|
8312
|
+
/**
|
|
8313
|
+
* Whether message is silent or not
|
|
8314
|
+
*/
|
|
8315
|
+
silent?: boolean;
|
|
8316
|
+
/**
|
|
8317
|
+
* Contains type of the message. One of: regular, system
|
|
8318
|
+
*/
|
|
8319
|
+
type?: string;
|
|
8320
|
+
/**
|
|
8321
|
+
* Array of message attachments
|
|
8322
|
+
*/
|
|
8323
|
+
attachments?: Array<Attachment>;
|
|
8324
|
+
/**
|
|
8325
|
+
* IDs of the user groups mentioned in the message
|
|
8326
|
+
*/
|
|
8327
|
+
mentioned_group_ids?: Array<string>;
|
|
8328
|
+
/**
|
|
8329
|
+
* Roles mentioned in the message
|
|
8330
|
+
*/
|
|
8331
|
+
mentioned_roles?: Array<string>;
|
|
8332
|
+
/**
|
|
8333
|
+
* IDs of the users mentioned in the message
|
|
8334
|
+
*/
|
|
8335
|
+
mentioned_users?: Array<string>;
|
|
8336
|
+
/**
|
|
8337
|
+
* IDs of the users the message will be visible to
|
|
8338
|
+
*/
|
|
8339
|
+
restricted_visibility?: Array<string>;
|
|
8340
|
+
/**
|
|
8341
|
+
* The location a scheduled message will share
|
|
8342
|
+
*/
|
|
8343
|
+
shared_location?: ScheduledMessageLocation;
|
|
8344
|
+
}
|
|
8345
|
+
export interface ScheduledMessageCreatedEvent {
|
|
8346
|
+
/**
|
|
8347
|
+
* Date/time of creation
|
|
8348
|
+
*/
|
|
8349
|
+
created_at: TimestampNS;
|
|
8350
|
+
custom: Record<string, any>;
|
|
8351
|
+
user: UserResponseCommonFields;
|
|
8352
|
+
/**
|
|
8353
|
+
* The type of event: "scheduled_message.created" in this case
|
|
8354
|
+
*/
|
|
8355
|
+
type: string;
|
|
8356
|
+
/**
|
|
8357
|
+
* The CID of the channel the message is scheduled in
|
|
8358
|
+
*/
|
|
8359
|
+
cid?: string;
|
|
8360
|
+
received_at?: TimestampNS;
|
|
8361
|
+
/**
|
|
8362
|
+
* A message scheduled to be sent later
|
|
8363
|
+
*/
|
|
8364
|
+
scheduled_message?: ScheduledMessageResponse;
|
|
8365
|
+
}
|
|
8366
|
+
export interface ScheduledMessageDeletedEvent {
|
|
8367
|
+
/**
|
|
8368
|
+
* Date/time of creation
|
|
8369
|
+
*/
|
|
8370
|
+
created_at: TimestampNS;
|
|
8371
|
+
custom: Record<string, any>;
|
|
8372
|
+
user: UserResponseCommonFields;
|
|
8373
|
+
/**
|
|
8374
|
+
* The type of event: "scheduled_message.deleted" in this case
|
|
8375
|
+
*/
|
|
8376
|
+
type: string;
|
|
8377
|
+
/**
|
|
8378
|
+
* The CID of the channel the message is scheduled in
|
|
8379
|
+
*/
|
|
8380
|
+
cid?: string;
|
|
8381
|
+
received_at?: TimestampNS;
|
|
8382
|
+
/**
|
|
8383
|
+
* A message scheduled to be sent later
|
|
8384
|
+
*/
|
|
8385
|
+
scheduled_message?: ScheduledMessageResponse;
|
|
8386
|
+
}
|
|
8387
|
+
export interface ScheduledMessageFailedEvent {
|
|
8388
|
+
/**
|
|
8389
|
+
* Date/time of creation
|
|
8390
|
+
*/
|
|
8391
|
+
created_at: TimestampNS;
|
|
8392
|
+
custom: Record<string, any>;
|
|
8393
|
+
user: UserResponseCommonFields;
|
|
8394
|
+
/**
|
|
8395
|
+
* The type of event: "scheduled_message.failed" in this case
|
|
8396
|
+
*/
|
|
8397
|
+
type: string;
|
|
8398
|
+
/**
|
|
8399
|
+
* The CID of the channel the message is scheduled in
|
|
8400
|
+
*/
|
|
8401
|
+
cid?: string;
|
|
8402
|
+
received_at?: TimestampNS;
|
|
8403
|
+
/**
|
|
8404
|
+
* A message scheduled to be sent later
|
|
8405
|
+
*/
|
|
8406
|
+
scheduled_message?: ScheduledMessageResponse;
|
|
8407
|
+
}
|
|
8408
|
+
export interface ScheduledMessageLocation {
|
|
8409
|
+
/**
|
|
8410
|
+
* The ID of the device that created the location.
|
|
8411
|
+
*/
|
|
8412
|
+
created_by_device_id: string;
|
|
8413
|
+
/**
|
|
8414
|
+
* The date when the location sharing ends.
|
|
8415
|
+
* If it's empty, it means the location sharing is static instead of live.
|
|
8416
|
+
*/
|
|
8417
|
+
end_at?: TimestampNS;
|
|
8418
|
+
/**
|
|
8419
|
+
* The latitude of the location.
|
|
8420
|
+
*/
|
|
8421
|
+
latitude?: number;
|
|
8422
|
+
/**
|
|
8423
|
+
* The longitude of the location.
|
|
8424
|
+
*/
|
|
8425
|
+
longitude?: number;
|
|
8426
|
+
}
|
|
8427
|
+
export interface ScheduledMessageResponse {
|
|
8428
|
+
/**
|
|
8429
|
+
* The CID of the channel the message will be sent to
|
|
8430
|
+
*/
|
|
8431
|
+
cid: string;
|
|
8432
|
+
/**
|
|
8433
|
+
* Date/time of creation
|
|
8434
|
+
*/
|
|
8435
|
+
created_at: TimestampNS;
|
|
8436
|
+
/**
|
|
8437
|
+
* Unique identifier of the scheduled message
|
|
8438
|
+
*/
|
|
8439
|
+
id: string;
|
|
8440
|
+
/**
|
|
8441
|
+
* Date/time the message is scheduled to be sent
|
|
8442
|
+
*/
|
|
8443
|
+
scheduled_at: TimestampNS;
|
|
8444
|
+
/**
|
|
8445
|
+
* Status of the scheduled message. One of: scheduled, sending, failed, canceled, sent. A message is sending from its first send attempt until it is sent or fails, including while it waits to retry a failed attempt; it cannot be edited, canceled or sent now while sending
|
|
8446
|
+
*/
|
|
8447
|
+
status: string;
|
|
8448
|
+
/**
|
|
8449
|
+
* Date/time of the last update
|
|
8450
|
+
*/
|
|
8451
|
+
updated_at: TimestampNS;
|
|
8452
|
+
/**
|
|
8453
|
+
* The message a scheduled message will send
|
|
8454
|
+
*/
|
|
8455
|
+
message: ScheduledMessageContentResponse;
|
|
8456
|
+
/**
|
|
8457
|
+
* User response object
|
|
8458
|
+
*/
|
|
8459
|
+
user: UserResponse;
|
|
8460
|
+
/**
|
|
8461
|
+
* Why sending the message failed. Only set when status is failed. One of: banned, no_permission, channel_frozen, channel_deleted, user_deleted, moderation_blocked, hook_rejected, expired, internal_error, invalid_message, pending_not_supported
|
|
8462
|
+
*/
|
|
8463
|
+
failure_reason?: string;
|
|
8464
|
+
/**
|
|
8465
|
+
* The channel of a scheduled message
|
|
8466
|
+
*/
|
|
8467
|
+
channel?: ScheduledMessageChannelResponse;
|
|
8468
|
+
}
|
|
8469
|
+
export interface ScheduledMessageSentEvent {
|
|
8470
|
+
/**
|
|
8471
|
+
* Date/time of creation
|
|
8472
|
+
*/
|
|
8473
|
+
created_at: TimestampNS;
|
|
8474
|
+
/**
|
|
8475
|
+
* The ID of the message that was sent
|
|
8476
|
+
*/
|
|
8477
|
+
message_id: string;
|
|
8478
|
+
custom: Record<string, any>;
|
|
8479
|
+
user: UserResponseCommonFields;
|
|
8480
|
+
/**
|
|
8481
|
+
* The type of event: "scheduled_message.sent" in this case
|
|
8482
|
+
*/
|
|
8483
|
+
type: string;
|
|
8484
|
+
/**
|
|
8485
|
+
* The CID of the channel the message was sent to
|
|
8486
|
+
*/
|
|
8487
|
+
cid?: string;
|
|
8488
|
+
received_at?: TimestampNS;
|
|
8489
|
+
/**
|
|
8490
|
+
* A message scheduled to be sent later
|
|
8491
|
+
*/
|
|
8492
|
+
scheduled_message?: ScheduledMessageResponse;
|
|
8493
|
+
}
|
|
8494
|
+
export interface ScheduledMessageUpdatedEvent {
|
|
8495
|
+
/**
|
|
8496
|
+
* Date/time of creation
|
|
8497
|
+
*/
|
|
8498
|
+
created_at: TimestampNS;
|
|
8499
|
+
custom: Record<string, any>;
|
|
8500
|
+
user: UserResponseCommonFields;
|
|
8501
|
+
/**
|
|
8502
|
+
* The type of event: "scheduled_message.updated" in this case
|
|
8503
|
+
*/
|
|
8504
|
+
type: string;
|
|
8505
|
+
/**
|
|
8506
|
+
* The CID of the channel the message is scheduled in
|
|
8507
|
+
*/
|
|
8508
|
+
cid?: string;
|
|
8509
|
+
received_at?: TimestampNS;
|
|
8510
|
+
/**
|
|
8511
|
+
* A message scheduled to be sent later
|
|
8512
|
+
*/
|
|
8513
|
+
scheduled_message?: ScheduledMessageResponse;
|
|
8514
|
+
}
|
|
8515
|
+
export interface ScheduledMessagesFilter {
|
|
8516
|
+
/**
|
|
8517
|
+
* Only scheduled messages of this channel
|
|
8518
|
+
*/
|
|
8519
|
+
cid?: string;
|
|
8520
|
+
/**
|
|
8521
|
+
* Only these statuses, as reported in each scheduled message's status. One or more of: scheduled, sending, failed
|
|
8522
|
+
*/
|
|
8523
|
+
status?: Array<string>;
|
|
8524
|
+
}
|
|
7914
8525
|
export interface SearchPayload {
|
|
7915
8526
|
/**
|
|
7916
8527
|
* Channel filter conditions
|
|
@@ -8030,6 +8641,7 @@ export interface SearchPayload {
|
|
|
8030
8641
|
team: {
|
|
8031
8642
|
type: string;
|
|
8032
8643
|
operators: '$eq' | '$exists' | '$gt' | '$gte' | '$in' | '$lt' | '$lte';
|
|
8644
|
+
allowEmpty: true;
|
|
8033
8645
|
};
|
|
8034
8646
|
type: {
|
|
8035
8647
|
type: string;
|
|
@@ -8265,6 +8877,10 @@ export interface SendMessageRequest {
|
|
|
8265
8877
|
*/
|
|
8266
8878
|
include_mentioned_members?: boolean;
|
|
8267
8879
|
keep_channel_hidden?: boolean;
|
|
8880
|
+
/**
|
|
8881
|
+
* When set, the message is not sent now: it is stored and sent at this time (UTC). The response then carries scheduled_message. Must be at least 1 minute and at most the app's maximum lead time (120 days by default) from now. Slash commands cannot be scheduled
|
|
8882
|
+
*/
|
|
8883
|
+
scheduled_at?: Date;
|
|
8268
8884
|
skip_enrich_url?: boolean;
|
|
8269
8885
|
skip_push?: boolean;
|
|
8270
8886
|
}
|
|
@@ -8285,6 +8901,10 @@ export interface SendMessageResponse {
|
|
|
8285
8901
|
* Map of mentioned user ID to whether that user is currently an active channel member. Only set when include_mentioned_members was requested; omitted when the message has no mentions or the membership lookup failed
|
|
8286
8902
|
*/
|
|
8287
8903
|
mentioned_members?: Record<string, boolean>;
|
|
8904
|
+
/**
|
|
8905
|
+
* A message scheduled to be sent later
|
|
8906
|
+
*/
|
|
8907
|
+
scheduled_message?: ScheduledMessageResponse;
|
|
8288
8908
|
}
|
|
8289
8909
|
export interface SendReactionRequest {
|
|
8290
8910
|
/**
|
|
@@ -8311,6 +8931,18 @@ export interface SendReactionResponse {
|
|
|
8311
8931
|
message: MessageResponse;
|
|
8312
8932
|
reaction: ReactionResponse;
|
|
8313
8933
|
}
|
|
8934
|
+
export interface SendScheduledMessageNowRequest {
|
|
8935
|
+
}
|
|
8936
|
+
export interface SendScheduledMessageNowResponse {
|
|
8937
|
+
/**
|
|
8938
|
+
* Duration of the request in milliseconds
|
|
8939
|
+
*/
|
|
8940
|
+
duration: string;
|
|
8941
|
+
/**
|
|
8942
|
+
* A message scheduled to be sent later
|
|
8943
|
+
*/
|
|
8944
|
+
scheduled_message: ScheduledMessageResponse;
|
|
8945
|
+
}
|
|
8314
8946
|
export interface ShadowBlockActionRequestPayload {
|
|
8315
8947
|
/**
|
|
8316
8948
|
* Reason for shadow blocking
|
|
@@ -8445,9 +9077,9 @@ export interface SortParamRequest {
|
|
|
8445
9077
|
}
|
|
8446
9078
|
export interface SubmitActionRequest {
|
|
8447
9079
|
/**
|
|
8448
|
-
* Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, ban, custom, unban, restore, delete_user, delete_user_messages, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalate
|
|
9080
|
+
* Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, delete_poll, delete_poll_option, delete_poll_answer, ban, custom, unban, restore, delete_user, delete_user_messages, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalate
|
|
8449
9081
|
*/
|
|
8450
|
-
action_type: 'flag' | 'mark_reviewed' | 'delete_message' | 'delete_activity' | 'delete_comment' | 'delete_reaction' | 'ban' | 'custom' | 'unban' | 'restore' | 'delete_user' | 'delete_user_messages' | 'unblock' | 'block' | 'shadow_block' | 'unmask' | 'kick_user' | 'end_call' | 'reject_appeal' | 'escalate' | 'de_escalate' | 'bypass';
|
|
9082
|
+
action_type: 'flag' | 'mark_reviewed' | 'delete_message' | 'delete_activity' | 'delete_comment' | 'delete_reaction' | 'delete_poll' | 'delete_poll_option' | 'delete_poll_answer' | 'ban' | 'custom' | 'unban' | 'restore' | 'delete_user' | 'delete_user_messages' | 'unblock' | 'block' | 'shadow_block' | 'unmask' | 'kick_user' | 'end_call' | 'reject_appeal' | 'escalate' | 'de_escalate' | 'bypass';
|
|
8451
9083
|
/**
|
|
8452
9084
|
* UUID of the appeal to act on (required for reject_appeal, optional for other actions)
|
|
8453
9085
|
*/
|
|
@@ -8481,6 +9113,18 @@ export interface SubmitActionRequest {
|
|
|
8481
9113
|
* Configuration for message deletion action
|
|
8482
9114
|
*/
|
|
8483
9115
|
delete_message?: DeleteMessageRequestPayload;
|
|
9116
|
+
/**
|
|
9117
|
+
* Configuration for poll deletion action. Poll deletion is always permanent.
|
|
9118
|
+
*/
|
|
9119
|
+
delete_poll?: DeletePollRequestPayload;
|
|
9120
|
+
/**
|
|
9121
|
+
* Configuration for deleting the free-text poll answer a review item was raised for. Chat polls only. Deletion is permanent; the poll and other votes are kept.
|
|
9122
|
+
*/
|
|
9123
|
+
delete_poll_answer?: DeletePollAnswerRequestPayload;
|
|
9124
|
+
/**
|
|
9125
|
+
* Configuration for deleting the single poll option a review item was raised for. Deletion is permanent; the rest of the poll is kept.
|
|
9126
|
+
*/
|
|
9127
|
+
delete_poll_option?: DeletePollOptionRequestPayload;
|
|
8484
9128
|
/**
|
|
8485
9129
|
* Configuration for reaction deletion action
|
|
8486
9130
|
*/
|
|
@@ -9248,6 +9892,26 @@ export interface UpdateReminderResponse {
|
|
|
9248
9892
|
duration: string;
|
|
9249
9893
|
reminder: ReminderResponseData;
|
|
9250
9894
|
}
|
|
9895
|
+
export interface UpdateScheduledMessageRequest {
|
|
9896
|
+
/**
|
|
9897
|
+
* New send time (UTC). Must be at least 1 minute and at most the app's maximum lead time from now
|
|
9898
|
+
*/
|
|
9899
|
+
scheduled_at?: Date;
|
|
9900
|
+
/**
|
|
9901
|
+
* Message data for creating or updating a message
|
|
9902
|
+
*/
|
|
9903
|
+
message?: MessageRequest;
|
|
9904
|
+
}
|
|
9905
|
+
export interface UpdateScheduledMessageResponse {
|
|
9906
|
+
/**
|
|
9907
|
+
* Duration of the request in milliseconds
|
|
9908
|
+
*/
|
|
9909
|
+
duration: string;
|
|
9910
|
+
/**
|
|
9911
|
+
* A message scheduled to be sent later
|
|
9912
|
+
*/
|
|
9913
|
+
scheduled_message: ScheduledMessageResponse;
|
|
9914
|
+
}
|
|
9251
9915
|
export interface UpdateThreadPartialRequest {
|
|
9252
9916
|
/**
|
|
9253
9917
|
* Array of field names to unset
|
|
@@ -9515,6 +10179,11 @@ export interface UserBannedEvent {
|
|
|
9515
10179
|
channel_custom?: CustomChannelData;
|
|
9516
10180
|
created_by?: UserResponseCommonFields;
|
|
9517
10181
|
}
|
|
10182
|
+
export interface UserChannelBanCountRuleParameters {
|
|
10183
|
+
banned_by?: string;
|
|
10184
|
+
threshold?: number;
|
|
10185
|
+
time_window?: string;
|
|
10186
|
+
}
|
|
9518
10187
|
export interface UserChannelCountRuleParameters {
|
|
9519
10188
|
threshold?: number;
|
|
9520
10189
|
time_window?: string;
|
|
@@ -9872,10 +10541,6 @@ export interface UserResponse {
|
|
|
9872
10541
|
* Optional name of user
|
|
9873
10542
|
*/
|
|
9874
10543
|
name?: string;
|
|
9875
|
-
/**
|
|
9876
|
-
* Revocation date for tokens
|
|
9877
|
-
*/
|
|
9878
|
-
revoke_tokens_issued_before?: TimestampNS;
|
|
9879
10544
|
teams_role?: Record<string, string>;
|
|
9880
10545
|
}
|
|
9881
10546
|
export interface UserResponseCommonFields {
|
|
@@ -9895,7 +10560,6 @@ export interface UserResponseCommonFields {
|
|
|
9895
10560
|
image?: string;
|
|
9896
10561
|
last_active?: TimestampNS;
|
|
9897
10562
|
name?: string;
|
|
9898
|
-
revoke_tokens_issued_before?: TimestampNS;
|
|
9899
10563
|
teams_role?: Record<string, string>;
|
|
9900
10564
|
}
|
|
9901
10565
|
export interface UserResponsePrivacyFields {
|
|
@@ -9916,7 +10580,6 @@ export interface UserResponsePrivacyFields {
|
|
|
9916
10580
|
invisible?: boolean;
|
|
9917
10581
|
last_active?: TimestampNS;
|
|
9918
10582
|
name?: string;
|
|
9919
|
-
revoke_tokens_issued_before?: TimestampNS;
|
|
9920
10583
|
/**
|
|
9921
10584
|
* The privacy settings of the user.
|
|
9922
10585
|
*/
|
|
@@ -10091,6 +10754,10 @@ export interface WSAuthMessage {
|
|
|
10091
10754
|
*/
|
|
10092
10755
|
token: string;
|
|
10093
10756
|
user_details: ConnectUserDetailsRequest;
|
|
10757
|
+
/**
|
|
10758
|
+
* Realtime event protocol version. 3 omits channel.members from channel.updated, member.*, notification.message_new and notification.added_to_channel of channels with more than 100 members and sets members_included:false. Values above the newest supported version negotiate down to it.
|
|
10759
|
+
*/
|
|
10760
|
+
event_protocol?: number;
|
|
10094
10761
|
/**
|
|
10095
10762
|
* Channel-member custom keys to project onto message.member for messages this connection receives (opt-in; capped, off by default).
|
|
10096
10763
|
*/
|
|
@@ -10101,8 +10768,6 @@ export interface WSAuthMessage {
|
|
|
10101
10768
|
products?: Array<string>;
|
|
10102
10769
|
}
|
|
10103
10770
|
export type WSClientEvent = ({
|
|
10104
|
-
type: '*';
|
|
10105
|
-
} & CustomEvent) | ({
|
|
10106
10771
|
type: 'ai_indicator.clear';
|
|
10107
10772
|
} & AIIndicatorClearEvent) | ({
|
|
10108
10773
|
type: 'ai_indicator.stop';
|
|
@@ -10215,6 +10880,16 @@ export type WSClientEvent = ({
|
|
|
10215
10880
|
} & ReminderDeletedEvent) | ({
|
|
10216
10881
|
type: 'reminder.updated';
|
|
10217
10882
|
} & ReminderUpdatedEvent) | ({
|
|
10883
|
+
type: 'scheduled_message.created';
|
|
10884
|
+
} & ScheduledMessageCreatedEvent) | ({
|
|
10885
|
+
type: 'scheduled_message.deleted';
|
|
10886
|
+
} & ScheduledMessageDeletedEvent) | ({
|
|
10887
|
+
type: 'scheduled_message.failed';
|
|
10888
|
+
} & ScheduledMessageFailedEvent) | ({
|
|
10889
|
+
type: 'scheduled_message.sent';
|
|
10890
|
+
} & ScheduledMessageSentEvent) | ({
|
|
10891
|
+
type: 'scheduled_message.updated';
|
|
10892
|
+
} & ScheduledMessageUpdatedEvent) | ({
|
|
10218
10893
|
type: 'thread.updated';
|
|
10219
10894
|
} & ThreadUpdatedEvent) | ({
|
|
10220
10895
|
type: 'typing.start';
|
|
@@ -10254,8 +10929,6 @@ export type WSClientEvent = ({
|
|
|
10254
10929
|
type: 'user_group.updated';
|
|
10255
10930
|
} & UserGroupUpdatedEvent);
|
|
10256
10931
|
export type WSEvent = ({
|
|
10257
|
-
type: '*';
|
|
10258
|
-
} & CustomEvent) | ({
|
|
10259
10932
|
type: 'ai_indicator.clear';
|
|
10260
10933
|
} & AIIndicatorClearEvent) | ({
|
|
10261
10934
|
type: 'ai_indicator.stop';
|
|
@@ -10372,6 +11045,16 @@ export type WSEvent = ({
|
|
|
10372
11045
|
} & ReminderDeletedEvent) | ({
|
|
10373
11046
|
type: 'reminder.updated';
|
|
10374
11047
|
} & ReminderUpdatedEvent) | ({
|
|
11048
|
+
type: 'scheduled_message.created';
|
|
11049
|
+
} & ScheduledMessageCreatedEvent) | ({
|
|
11050
|
+
type: 'scheduled_message.deleted';
|
|
11051
|
+
} & ScheduledMessageDeletedEvent) | ({
|
|
11052
|
+
type: 'scheduled_message.failed';
|
|
11053
|
+
} & ScheduledMessageFailedEvent) | ({
|
|
11054
|
+
type: 'scheduled_message.sent';
|
|
11055
|
+
} & ScheduledMessageSentEvent) | ({
|
|
11056
|
+
type: 'scheduled_message.updated';
|
|
11057
|
+
} & ScheduledMessageUpdatedEvent) | ({
|
|
10375
11058
|
type: 'thread.updated';
|
|
10376
11059
|
} & ThreadUpdatedEvent) | ({
|
|
10377
11060
|
type: 'typing.start';
|