From 93fb57ae84f5a327cf3357daae6e4a0918232644 Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Wed, 16 Sep 2026 15:45:38 -0500 Subject: [PATCH 01/13] feat: update to API spec v238.16.2 --- src/gen/chat/ChannelApi.ts | 1 + src/gen/chat/ChatApi.ts | 5 + src/gen/common/CommonApi.ts | 10 +- src/gen/feeds/FeedsApi.ts | 63 ++++++++ src/gen/models/index.ts | 231 ++++++++++++++++++++++++++-- src/gen/moderation/ModerationApi.ts | 1 + 6 files changed, 301 insertions(+), 10 deletions(-) diff --git a/src/gen/chat/ChannelApi.ts b/src/gen/chat/ChannelApi.ts index 7291439..8d793e3 100644 --- a/src/gen/chat/ChannelApi.ts +++ b/src/gen/chat/ChannelApi.ts @@ -42,6 +42,7 @@ export class ChannelApi { delete(request?: { hard_delete?: boolean; + skip_truncate?: boolean; }): Promise> { if (!this.id) { throw new Error( diff --git a/src/gen/chat/ChatApi.ts b/src/gen/chat/ChatApi.ts index a146814..c7b0dee 100644 --- a/src/gen/chat/ChatApi.ts +++ b/src/gen/chat/ChatApi.ts @@ -391,6 +391,8 @@ export class ChatApi { const body = { operation: request?.operation, filter: request?.filter, + hide_history_before: request?.hide_history_before, + synchronous: request?.synchronous, custom_unset: request?.custom_unset, members: request?.members, custom_set: request?.custom_set, @@ -419,6 +421,7 @@ export class ChatApi { const body = { cids: request?.cids, hard_delete: request?.hard_delete, + skip_truncate: request?.skip_truncate, }; const response = await this.apiClient.sendRequest< @@ -551,9 +554,11 @@ export class ChatApi { type: string; id: string; hard_delete?: boolean; + skip_truncate?: boolean; }): Promise> { const queryParams = { hard_delete: request?.hard_delete, + skip_truncate: request?.skip_truncate, }; const pathParams = { type: request?.type, diff --git a/src/gen/common/CommonApi.ts b/src/gen/common/CommonApi.ts index 5103094..1fa27ef 100644 --- a/src/gen/common/CommonApi.ts +++ b/src/gen/common/CommonApi.ts @@ -1257,7 +1257,11 @@ export class CommonApi { async getPollOption(request: { poll_id: string; option_id: string; + user_id?: string; }): Promise> { + const queryParams = { + user_id: request?.user_id, + }; const pathParams = { poll_id: request?.poll_id, option_id: request?.option_id, @@ -1269,7 +1273,7 @@ export class CommonApi { 'GET', '/api/v2/polls/{poll_id}/options/{option_id}', pathParams, - undefined, + queryParams, ); decoders['PollOptionResponse']?.(response.body); @@ -1440,6 +1444,8 @@ export class CommonApi { ios?: boolean; web?: boolean; unity?: boolean; + unity_desktop?: boolean; + unity_console?: boolean; endpoints?: string; }): Promise> { const queryParams = { @@ -1448,6 +1454,8 @@ export class CommonApi { ios: request?.ios, web: request?.web, unity: request?.unity, + unity_desktop: request?.unity_desktop, + unity_console: request?.unity_console, endpoints: request?.endpoints, }; diff --git a/src/gen/feeds/FeedsApi.ts b/src/gen/feeds/FeedsApi.ts index 92fc884..777360b 100644 --- a/src/gen/feeds/FeedsApi.ts +++ b/src/gen/feeds/FeedsApi.ts @@ -54,6 +54,7 @@ import { DeleteFeedViewResponse, DeleteFeedsBatchRequest, DeleteFeedsBatchResponse, + DeleteUserInterestsResponse, ExportFeedUserDataResponse, FollowBatchRequest, FollowBatchResponse, @@ -174,6 +175,8 @@ import { UpsertActivitiesResponse, UpsertCollectionsRequest, UpsertCollectionsResponse, + UpsertUserInterestsRequest, + UpsertUserInterestsResponse, } from '../models'; import { decoders } from '../model-decoders/decoders'; @@ -726,6 +729,7 @@ export class FeedsApi { id: string; comment_sort?: string; comment_limit?: number; + skip_own_followings?: boolean; user_id?: string; language?: string; translate_text?: boolean; @@ -733,6 +737,7 @@ export class FeedsApi { const queryParams = { comment_sort: request?.comment_sort, comment_limit: request?.comment_limit, + skip_own_followings: request?.skip_own_followings, user_id: request?.user_id, language: request?.language, translate_text: request?.translate_text, @@ -1720,6 +1725,7 @@ export class FeedsApi { activity_processors: request?.activity_processors, activity_selectors: request?.activity_selectors, activity_filter: request?.activity_filter, + activity_marks: request?.activity_marks, activity_processing: request?.activity_processing, aggregation: request?.aggregation, custom: request?.custom, @@ -2282,6 +2288,7 @@ export class FeedsApi { activity_processors: request?.activity_processors, activity_selectors: request?.activity_selectors, activity_filter: request?.activity_filter, + activity_marks: request?.activity_marks, activity_processing: request?.activity_processing, aggregation: request?.aggregation, custom: request?.custom, @@ -2319,6 +2326,7 @@ export class FeedsApi { activity_processors: request?.activity_processors, activity_selectors: request?.activity_selectors, activity_filter: request?.activity_filter, + activity_marks: request?.activity_marks, activity_processing: request?.activity_processing, aggregation: request?.aggregation, custom: request?.custom, @@ -2633,6 +2641,8 @@ export class FeedsApi { ios?: boolean; web?: boolean; unity?: boolean; + unity_desktop?: boolean; + unity_console?: boolean; server_side?: boolean; }): Promise> { const queryParams = { @@ -2641,6 +2651,8 @@ export class FeedsApi { ios: request?.ios, web: request?.web, unity: request?.unity, + unity_desktop: request?.unity_desktop, + unity_console: request?.unity_console, server_side: request?.server_side, }; @@ -3184,6 +3196,31 @@ export class FeedsApi { return { ...response.body, metadata: response.metadata }; } + async deleteUserInterests(request: { + user_id: string; + tags: Array; + }): Promise> { + const queryParams = { + tags: request?.tags, + }; + const pathParams = { + user_id: request?.user_id, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'DELETE', + '/api/v2/feeds/users/{user_id}/interests', + pathParams, + queryParams, + ); + + decoders['DeleteUserInterestsResponse']?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + async getUserInterests(request: { user_id: string; limit?: number; @@ -3208,4 +3245,30 @@ export class FeedsApi { return { ...response.body, metadata: response.metadata }; } + + async upsertUserInterests( + request: UpsertUserInterestsRequest & { user_id: string }, + ): Promise> { + const pathParams = { + user_id: request?.user_id, + }; + const body = { + interests: request?.interests, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'PUT', + '/api/v2/feeds/users/{user_id}/interests', + pathParams, + undefined, + body, + 'application/json', + ); + + decoders['UpsertUserInterestsResponse']?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } } diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index c8db36d..07707e8 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -49,8 +49,6 @@ export interface AIVideoConfig { enabled?: boolean; - provider?: string; - rules?: Array; } @@ -557,6 +555,18 @@ export interface ActivityMarkEvent { user?: UserResponseCommonFields; } +export interface ActivityMarksConfig { + /** + * Whether to return per-activity read status on content feeds + */ + track_read?: boolean; + + /** + * Whether to return per-activity seen status on content feeds + */ + track_seen?: boolean; +} + export interface ActivityPinResponse { /** * When the pin was created @@ -1953,6 +1963,8 @@ export interface AppResponseFields { auto_translation_enabled: boolean; + before_message_send_hook_system_messages: boolean; + campaign_enabled: boolean; cdn_expiration_seconds: number; @@ -2139,7 +2151,7 @@ export interface AppealItemResponse { ai_text_severity?: string; /** - * CID of the channel the entity belongs to, if applicable + * CID of the channel the entity belongs to (content appeals), or of the channel ban being appealed (stream:user appeals). Empty for a global ban appeal. */ channel_cid?: string; @@ -2233,6 +2245,11 @@ export interface AppealRequest { */ entity_type: string; + /** + * CID of the channel ban being appealed. Only used when entity_type is stream:user; omit to appeal the global ban. + */ + channel_cid?: string; + /** * ID of the review queue item (flagged message) that triggered the ban. Applicable only for user ban appeals. */ @@ -5424,6 +5441,7 @@ export interface ChannelBatchStartedEvent { export interface ChannelBatchUpdateRequest { operation: | 'addMembers' + | 'addMembersHideHistory' | 'removeMembers' | 'inviteMembers' | 'invites' @@ -5441,6 +5459,16 @@ export interface ChannelBatchUpdateRequest { */ filter: Record; + /** + * Required with the `addMembersHideHistory` operation, and rejected with every other operation including `addMembers`. Hides each matched channel's history before this time from the members the operation adds. Members that already belong to a matched channel are never affected. Must be in RFC3339 format (e.g., "2024-01-01T10:00:00Z") and in the past. + */ + hide_history_before?: Date; + + /** + * For updateData only. Requires a root cids $eq or $in filter with at most 100 CIDs and no root $or/$and. Split larger selections into requests of at most 100 CIDs. A success_channels_count response means the database update completed; a task_id response means it was queued and must be polled, including on older API nodes. + */ + synchronous?: boolean; + /** * `updateData` only. Deletes these keys from each channel's existing custom object, leaving every other custom key untouched. Keys are dot-paths; deleting a key that does not exist is a no-op. Cannot be combined with `data.custom` */ @@ -5457,11 +5485,16 @@ export interface ChannelBatchUpdateRequest { } export interface ChannelBatchUpdateResponse { + duration: string; + /** - * Duration of the request in milliseconds + * Positive count of channels selected for a completed synchronous database update, not an affected-row count. Concurrent deletion may reduce the rows written. task_id is absent. */ - duration: string; + success_channels_count?: number; + /** + * Present for asynchronous updates. Poll this task even if synchronous was requested: an older API node may have queued the update. + */ task_id?: string; } @@ -7551,6 +7584,11 @@ export interface ClientEvent { */ sfu_id?: string; + /** + * Source of the coordinator join. Optional on CoordinatorJoin events; omitted when not provided. + */ + source?: string; + /** * Discriminator identifying the event kind. JoinInitiated marks the start of a join attempt; join-lifecycle events use CoordinatorJoin, CoordinatorWS, WSJoin, or PeerConnectionConnect; media-readiness events use FirstAudioFrame or FirstVideoFrame; MediaDevicePermission reports device permission results; other values denote generic client events. */ @@ -8841,6 +8879,8 @@ export interface CreateFeedGroupRequest { activity_filter?: ActivityFilterConfig; + activity_marks?: ActivityMarksConfig; + activity_processing?: ActivityProcessingConfig; aggregation?: AggregationConfig; @@ -9807,9 +9847,14 @@ export interface DeleteChannelsRequest { cids: Array; /** - * Specify if channels and all ressources should be hard deleted + * Server-side only. When true, the channels and all their resources are permanently deleted instead of soft-deleted. */ hard_delete?: boolean; + + /** + * Server-side only. When true, the soft delete preserves message history instead of hiding it, so a later recreation of any of these channel IDs restores the full history. Only supported for distinct channels. Cannot be combined with hard_delete. + */ + skip_truncate?: boolean; } export interface DeleteChannelsResponse { @@ -10106,6 +10151,15 @@ export interface DeleteTranscriptionResponse { duration: string; } +export interface DeleteUserInterestsResponse { + duration: string; + + /** + * Interest tags still set on the user + */ + interests: Array; +} + export interface DeleteUserMessagesRequestPayload { /** * Message deletion mode: soft, pruning, or hard @@ -11249,6 +11303,8 @@ export interface FeedGroupResponse { activity_filter?: ActivityFilterConfig; + activity_marks?: ActivityMarksConfig; + activity_processing?: ActivityProcessingConfig; aggregation?: AggregationConfig; @@ -12536,10 +12592,14 @@ export interface FloodIdenticalConfig { } export interface FloodIdenticalRuleParameters { + min_text_length?: number; + threshold?: number; time_window?: string; + track_across_users?: boolean; + allowlist?: Array; } @@ -13401,6 +13461,16 @@ export interface GetFeedsRateLimitsResponse { */ unity?: Record; + /** + * Rate limits for Unity console platform (endpoint name -> limit info) + */ + unity_console?: Record; + + /** + * Rate limits for Unity desktop platform (endpoint name -> limit info) + */ + unity_desktop?: Record; + /** * Rate limits for Web platform (endpoint name -> limit info) */ @@ -13642,6 +13712,8 @@ export interface GetOrCreateFeedGroupRequest { activity_filter?: ActivityFilterConfig; + activity_marks?: ActivityMarksConfig; + activity_processing?: ActivityProcessingConfig; aggregation?: AggregationConfig; @@ -13882,6 +13954,16 @@ export interface GetRateLimitsResponse { */ unity?: Record; + /** + * Map of endpoint rate limits for the Unity console platform + */ + unity_console?: Record; + + /** + * Map of endpoint rate limits for the Unity desktop platform + */ + unity_desktop?: Record; + /** * Map of endpoint rate limits for the web platform */ @@ -14008,7 +14090,7 @@ export interface GetUserInterestsResponse { duration: string; /** - * Top-N interest tags sorted by descending count, then alphabetically by tag + * Interest tags sorted by descending weight, then manually set tags before computed ones, then descending count, then alphabetically by tag */ interests: Array; } @@ -14702,14 +14784,24 @@ export interface InsertActionLogResponse { export interface InterestTagResponse { /** - * Number of distinct reacted-to activities tagged with this value + * Lifetime number of distinct reacted-to activities tagged with this value, without decay; 0 for manually set tags */ count: number; + /** + * How the tag was set: computed (from the user's reactions) or manual (through the API) + */ + source: string; + /** * The interest tag value */ tag: string; + + /** + * Ranking weight between -1.0 and 1.0. Computed tags carry a recency-decayed weight in (0, 1.0]: the user's strongest tag is 1.0 and every other a proportional share + */ + weight: number; } export interface JoinCallAPIMetrics { @@ -14953,7 +15045,7 @@ export interface LabelsRequest { dry_run?: boolean; /** - * Optional moderation policy key (max 128 chars). For username moderation, set this to a policy whose key starts with 'username:' (e.g. 'username:default') to opt into the low-latency fast-path: blocklists (customer + Stream-managed defaults) short-circuit the LLM, and the LLM fallback uses gpt-4.1-nano with a 24h Valkey verdict cache. Without a 'username:' prefix the request falls through to the standard Bodyguard Analyze v1 username path. + * Optional moderation policy key (max 128 chars). For username moderation, set this to a policy whose key starts with 'username:' (e.g. 'username:default') to opt into the low-latency fast-path: blocklists (customer + Stream-managed defaults) short-circuit the LLM, and the LLM fallback uses gpt-4o-mini (overridable via moderation_settings.llm_username_model) with a 24h Valkey verdict cache. Without a 'username:' prefix the request falls through to the standard Bodyguard Analyze v1 username path. */ policy?: string; @@ -17283,6 +17375,8 @@ export interface ModerationDashboardPreferences { custom_views_enabled?: boolean; + disable_action_logs?: boolean; + disable_audit_logs?: boolean; disable_flagging_reviewed_entity?: boolean; @@ -18386,6 +18480,14 @@ export interface PagerResponse { } export interface PaginationParams { + id_gt?: number; + + id_gte?: number; + + id_lt?: number; + + id_lte?: number; + limit?: number; offset?: number; @@ -19829,6 +19931,14 @@ export interface QueryBannedUsersPayload { */ filter_conditions: Record; + created_at_after?: Date; + + created_at_after_or_equal?: Date; + + created_at_before?: Date; + + created_at_before_or_equal?: Date; + /** * Whether to exclude expired bans or not */ @@ -20660,6 +20770,14 @@ export interface QueryFollowsResponse { } export interface QueryFutureChannelBansPayload { + created_at_after?: Date; + + created_at_after_or_equal?: Date; + + created_at_before?: Date; + + created_at_before_or_equal?: Date; + /** * Whether to exclude expired bans or not */ @@ -20751,6 +20869,14 @@ export interface QueryLabelResultsResponse { export interface QueryMembersPayload { type: string; + created_at_after?: Date; + + created_at_after_or_equal?: Date; + + created_at_before?: Date; + + created_at_before_or_equal?: Date; + id?: string; limit?: number; @@ -20759,6 +20885,14 @@ export interface QueryMembersPayload { user_id?: string; + user_id_gt?: string; + + user_id_gte?: string; + + user_id_lt?: string; + + user_id_lte?: string; + members?: Array; /** @@ -21571,6 +21705,14 @@ export interface QueryUsersPayload { */ filter_conditions: Record; + id_gt?: string; + + id_gte?: string; + + id_lt?: string; + + id_lte?: string; + include_deactivated_users?: boolean; limit?: number; @@ -22822,6 +22964,11 @@ export interface ReviewQueueItemResponse { */ completed_at?: Date; + /** + * Highest per-label confidence (0-1) any provider reported across the item's flags; absent when no flag carried one + */ + confidence_score?: number; + config_key?: string; /** @@ -23084,6 +23231,10 @@ export interface RuleBuilderCondition { user_identical_content_count_params?: UserIdenticalContentCountParameters; + user_identical_image_count_params?: UserIdenticalImageCountParameters; + + user_reaction_count_params?: UserReactionCountRuleParameters; + user_role_params?: UserRoleParameters; user_rule_params?: UserRuleParameters; @@ -23124,6 +23275,8 @@ export interface RuleBuilderRule { } export interface RunStats { + activities_deleted?: number; + channels_deleted?: number; messages_deleted?: number; @@ -27271,6 +27424,8 @@ export interface UpdateFeedGroupRequest { activity_filter?: ActivityFilterConfig; + activity_marks?: ActivityMarksConfig; + activity_processing?: ActivityProcessingConfig; aggregation?: AggregationConfig; @@ -28538,6 +28693,22 @@ export interface UpsertSetupSessionResponse { setup_session?: SetupSession; } +export interface UpsertUserInterestsRequest { + /** + * Interest tags to add or update (1-50) + */ + interests: Array; +} + +export interface UpsertUserInterestsResponse { + duration: string; + + /** + * All interest tags of the user after the write + */ + interests: Array; +} + export interface User { id: string; @@ -28925,6 +29096,28 @@ export interface UserIdenticalContentCountParameters { time_window?: string; } +export interface UserIdenticalImageCountParameters { + match?: string; + + similarity_distance?: number; + + threshold?: number; + + time_window?: string; +} + +export interface UserInterestRequest { + /** + * The interest tag; trimmed and lower-cased like activity interest_tags + */ + tag: string; + + /** + * Ranking weight between -1.0 (dislike) and 1.0 (like). Defaults to 1.0 + */ + weight?: number; +} + export interface UserMessagesDeletedEvent { /** * Date/time of creation @@ -29023,6 +29216,14 @@ export interface UserRatingReportResponse { count: number; } +export interface UserReactionCountRuleParameters { + count?: string; + + threshold?: number; + + time_window?: string; +} + export interface UserReactivatedEvent { /** * Date/time of creation @@ -29838,6 +30039,18 @@ export interface WebhookFailoverConfig { gcs_path?: string; + s3_api_key?: string; + + s3_bucket?: string; + + s3_path?: string; + + s3_region?: string; + + s3_role_arn?: string; + + s3_secret?: string; + type?: string; } diff --git a/src/gen/moderation/ModerationApi.ts b/src/gen/moderation/ModerationApi.ts index c85f461..a43d62c 100644 --- a/src/gen/moderation/ModerationApi.ts +++ b/src/gen/moderation/ModerationApi.ts @@ -292,6 +292,7 @@ export class ModerationApi { appeal_reason: request?.appeal_reason, entity_id: request?.entity_id, entity_type: request?.entity_type, + channel_cid: request?.channel_cid, review_queue_item_id: request?.review_queue_item_id, user_id: request?.user_id, attachments: request?.attachments, From bf1d78d7b8cea53f2c70e53eaf57f39669e105bc Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Fri, 18 Sep 2026 09:09:58 -0500 Subject: [PATCH 02/13] feat!: turn off date transformers --- generate-openapi.sh | 2 +- src/gen/model-decoders/decoders.ts | 6125 +--------------------------- src/gen/models/index.ts | 1456 +++---- 3 files changed, 735 insertions(+), 6848 deletions(-) diff --git a/generate-openapi.sh b/generate-openapi.sh index d657c58..b12df3b 100755 --- a/generate-openapi.sh +++ b/generate-openapi.sh @@ -6,6 +6,6 @@ CHAT_DIR="../chat" rm -rf $OUTPUT_DIR -( cd $CHAT_DIR ; make openapi ; ./build/chat-manager openapi generate-client --language ts --spec ./releases/v2/serverside-api.yaml --output $OUTPUT_DIR ) +( cd $CHAT_DIR ; make openapi ; ./build/chat-manager openapi generate-client --language ts --spec ./releases/v2/serverside-api.yaml --opt response_dates_as_number=true --output $OUTPUT_DIR ) yarn lint:gen diff --git a/src/gen/model-decoders/decoders.ts b/src/gen/model-decoders/decoders.ts index 8f2c0a6..81c8031 100644 --- a/src/gen/model-decoders/decoders.ts +++ b/src/gen/model-decoders/decoders.ts @@ -34,6147 +34,34 @@ const decode = (typeMappings: TypeMapping, input?: Record) => { return input; }; -decoders['AcceptFeedMemberInviteResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - member: { type: 'FeedMemberResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AcceptFollowResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - follow: { type: 'FollowResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActionLogResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - review_queue_item: { type: 'ReviewQueueItemResponse', isSingle: true }, - - target_user: { type: 'UserResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivityAddedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - activity: { type: 'ActivityResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivityDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - activity: { type: 'ActivityResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivityFeedbackEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivityMarkEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivityPinResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - activity: { type: 'ActivityResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivityPinnedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - pinned_activity: { type: 'PinActivityResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivityReactionAddedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - activity: { type: 'ActivityResponse', isSingle: true }, - - reaction: { type: 'FeedsReactionResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivityReactionDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - activity: { type: 'ActivityResponse', isSingle: true }, - - reaction: { type: 'FeedsReactionResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivityReactionUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - activity: { type: 'ActivityResponse', isSingle: true }, - - reaction: { type: 'FeedsReactionResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivityRemovedFromFeedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - activity: { type: 'ActivityResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivityResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - comments: { type: 'CommentResponse', isSingle: false }, - - latest_reactions: { type: 'FeedsReactionResponse', isSingle: false }, - - mentioned_users: { type: 'UserResponse', isSingle: false }, - - own_bookmarks: { type: 'BookmarkResponse', isSingle: false }, - - own_reactions: { type: 'FeedsReactionResponse', isSingle: false }, - - collections: { type: 'EnrichedCollectionResponse', isSingle: false }, - - reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false }, - - user: { type: 'UserResponse', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - edited_at: { type: 'DatetimeType', isSingle: true }, - - expires_at: { type: 'DatetimeType', isSingle: true }, - - friend_reactions: { type: 'FeedsReactionResponse', isSingle: false }, - - latest_shares: { type: 'ShareResponse', isSingle: false }, - - current_feed: { type: 'FeedResponse', isSingle: true }, - - parent: { type: 'ActivityResponse', isSingle: true }, - - poll: { type: 'PollResponseData', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivityRestoredEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - activity: { type: 'ActivityResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivitySelectorConfigResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - cutoff_time: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivityUnpinnedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - pinned_activity: { type: 'PinActivityResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ActivityUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - activity: { type: 'ActivityResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AddActivityResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - activity: { type: 'ActivityResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AddBookmarkResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - bookmark: { type: 'BookmarkResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AddCommentBookmarkResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - bookmark: { type: 'BookmarkResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AddCommentReactionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - comment: { type: 'CommentResponse', isSingle: true }, - - reaction: { type: 'FeedsReactionResponse', isSingle: true }, - - reference_activity: { type: 'ActivityResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AddCommentResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - comment: { type: 'CommentResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AddCommentsBatchResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - comments: { type: 'CommentResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['AddReactionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - activity: { type: 'ActivityResponse', isSingle: true }, - - reaction: { type: 'FeedsReactionResponse', isSingle: true }, - - reference_activity: { type: 'ActivityResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AddUserGroupMembersResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - user_group: { type: 'UserGroupResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AggregatedActivityResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - activities: { type: 'ActivityResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - decoders['AppResponseFields'] = (input?: { [key: string]: any }) => { const typeMappings: TypeMapping = { event_hooks: { type: 'EventHook', isSingle: false }, - - call_types: { type: 'CallType', isSingle: false }, - - channel_configs: { type: 'ChannelConfig', isSingle: false }, - - push_notifications: { type: 'PushNotificationFields', isSingle: true }, - - revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true }, }; return decode(typeMappings, input); }; -decoders['AppealAcceptedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - appeal: { type: 'AppealItemResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AppealCreatedEvent'] = (input?: { [key: string]: any }) => { +decoders['ClientEvent'] = (input?: { [key: string]: any }) => { const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, + previously_connected_timestamp: { type: 'DatetimeType', isSingle: true }, - appeal: { type: 'AppealItemResponse', isSingle: true }, + timestamp: { type: 'DatetimeType', isSingle: true }, }; return decode(typeMappings, input); }; -decoders['AppealItemResponse'] = (input?: { [key: string]: any }) => { +decoders['EventHook'] = (input?: { [key: string]: any }) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, updated_at: { type: 'DatetimeType', isSingle: true }, - - actions: { type: 'ActionLogResponse', isSingle: false }, - - flags: { type: 'ModerationFlagResponse', isSingle: false }, - - moderation_action: { type: 'ActionLogResponse', isSingle: true }, - - original_moderation_action: { type: 'ActionLogResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AppealRejectedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - appeal: { type: 'AppealItemResponse', isSingle: true }, }; return decode(typeMappings, input); }; -decoders['AsyncBulkImageModerationEvent'] = (input?: { - [key: string]: any; -}) => { +decoders['GetApplicationResponse'] = (input?: { [key: string]: any }) => { const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - finished_at: { type: 'DatetimeType', isSingle: true }, - - started_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AsyncExportChannelsEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - finished_at: { type: 'DatetimeType', isSingle: true }, - - started_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AsyncExportErrorEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - finished_at: { type: 'DatetimeType', isSingle: true }, - - started_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AsyncExportModerationLogsEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - finished_at: { type: 'DatetimeType', isSingle: true }, - - started_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AsyncExportReviewQueueEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - finished_at: { type: 'DatetimeType', isSingle: true }, - - started_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AsyncExportUsersEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - finished_at: { type: 'DatetimeType', isSingle: true }, - - started_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['AutomodDetailsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - result: { type: 'MessageModerationResult', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['BanInfoResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - expires: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelMetadata', isSingle: true }, - - created_by: { type: 'UserResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['BanResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - expires: { type: 'DatetimeType', isSingle: true }, - - banned_by: { type: 'UserResponse', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['BatchQueryActivityReactionsResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - reactions: { type: 'FeedsReactionResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['BatchQueryCommentReactionsResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - reactions: { type: 'FeedsReactionResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['BlockListResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['BlockUsersResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['BlockedUserEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - - blocked_by_user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['BlockedUserResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - blocked_user: { type: 'UserResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['BookmarkAddedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - bookmark: { type: 'BookmarkResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['BookmarkDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - bookmark: { type: 'BookmarkResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['BookmarkFolderDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - bookmark_folder: { type: 'BookmarkFolderResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['BookmarkFolderResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['BookmarkFolderUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - bookmark_folder: { type: 'BookmarkFolderResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['BookmarkResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - activity: { type: 'ActivityResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - - comment: { type: 'CommentResponse', isSingle: true }, - - folder: { type: 'BookmarkFolderResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['BookmarkUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - bookmark: { type: 'BookmarkResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['BulkActionAppealsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - results: { type: 'BulkAppealResult', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['BulkAppealResult'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - appeal_item: { type: 'AppealItemResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallAcceptedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call: { type: 'CallResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallClosedCaptionsFailedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallClosedCaptionsStartedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallClosedCaptionsStoppedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallCreatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - members: { type: 'MemberResponse', isSingle: false }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallDTMFEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - timestamp: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallEndedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call: { type: 'CallResponse', isSingle: true }, - - members: { type: 'MemberResponse', isSingle: false }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallFrameRecordingFailedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallFrameRecordingFrameReadyEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - captured_at: { type: 'DatetimeType', isSingle: true }, - - created_at: { type: 'DatetimeType', isSingle: true }, - - users: { type: 'UserResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['CallFrameRecordingStartedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallFrameRecordingStoppedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallHLSBroadcastingFailedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallHLSBroadcastingStartedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallHLSBroadcastingStoppedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallLiveStartedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallMemberAddedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - members: { type: 'MemberResponse', isSingle: false }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallMemberRemovedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallMemberUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - members: { type: 'MemberResponse', isSingle: false }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallMemberUpdatedPermissionEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - members: { type: 'MemberResponse', isSingle: false }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallMissedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - members: { type: 'MemberResponse', isSingle: false }, - - call: { type: 'CallResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallModerationBlurEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallModerationWarningEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallNotificationEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - members: { type: 'MemberResponse', isSingle: false }, - - call: { type: 'CallResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallParticipantResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - joined_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallParticipantTimeline'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - timestamp: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallReactionEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallRecording'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - end_time: { type: 'DatetimeType', isSingle: true }, - - start_time: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallRecordingFailedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallRecordingReadyEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call_recording: { type: 'CallRecording', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallRecordingStartedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallRecordingStoppedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallRejectedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call: { type: 'CallResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallReportResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - ended_at: { type: 'DatetimeType', isSingle: true }, - - started_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - created_by: { type: 'UserResponse', isSingle: true }, - - egress: { type: 'EgressResponse', isSingle: true }, - - ended_at: { type: 'DatetimeType', isSingle: true }, - - starts_at: { type: 'DatetimeType', isSingle: true }, - - session: { type: 'CallSessionResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallRingEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - members: { type: 'MemberResponse', isSingle: false }, - - call: { type: 'CallResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallRtmpBroadcastFailedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallRtmpBroadcastStartedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallRtmpBroadcastStoppedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallSessionEndedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallSessionParticipantCountsUpdatedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallSessionParticipantJoinedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - participant: { type: 'CallParticipantResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallSessionParticipantLeftEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - participant: { type: 'CallParticipantResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallSessionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - participants: { type: 'CallParticipantResponse', isSingle: false }, - - accepted_by: { type: 'DatetimeType', isSingle: false }, - - missed_by: { type: 'DatetimeType', isSingle: false }, - - rejected_by: { type: 'DatetimeType', isSingle: false }, - - ended_at: { type: 'DatetimeType', isSingle: true }, - - live_ended_at: { type: 'DatetimeType', isSingle: true }, - - live_started_at: { type: 'DatetimeType', isSingle: true }, - - started_at: { type: 'DatetimeType', isSingle: true }, - - timer_ends_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallSessionStartedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallStateResponseFields'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - members: { type: 'MemberResponse', isSingle: false }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallStatsParticipant'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - sessions: { type: 'CallStatsParticipantSession', isSingle: false }, - - latest_activity_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallStatsParticipantSession'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - ended_at: { type: 'DatetimeType', isSingle: true }, - - started_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallStatsReportReadyEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - participants_overview: { type: 'CallStatsParticipant', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['CallStatsReportSummaryResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - first_stats_time: { type: 'DatetimeType', isSingle: true }, - - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallStatsSessionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - generated_at: { type: 'DatetimeType', isSingle: true }, - - call_ended_at: { type: 'DatetimeType', isSingle: true }, - - call_started_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallTranscription'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - end_time: { type: 'DatetimeType', isSingle: true }, - - start_time: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallTranscriptionFailedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallTranscriptionReadyEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call_transcription: { type: 'CallTranscription', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallTranscriptionStartedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallTranscriptionStoppedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallType'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallTypeResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallUserFeedbackSubmittedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CallUserMutedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CampaignCompletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - campaign: { type: 'CampaignResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CampaignResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - segments: { type: 'Segment', isSingle: false }, - - users: { type: 'UserResponse', isSingle: false }, - - stats: { type: 'CampaignStatsResponse', isSingle: true }, - - scheduled_for: { type: 'DatetimeType', isSingle: true }, - - stop_at: { type: 'DatetimeType', isSingle: true }, - - sender: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CampaignStartedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - campaign: { type: 'CampaignResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CampaignStatsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - stats_completed_at: { type: 'DatetimeType', isSingle: true }, - - stats_started_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChangeFeedVisibilityResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - feed: { type: 'FeedResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelBatchCompletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - batch_created_at: { type: 'DatetimeType', isSingle: true }, - - created_at: { type: 'DatetimeType', isSingle: true }, - - finished_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelBatchStartedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - batch_created_at: { type: 'DatetimeType', isSingle: true }, - - created_at: { type: 'DatetimeType', isSingle: true }, - - finished_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelConfig'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelConfigWithInfo'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - commands: { type: 'Command', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelContextResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_by: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelCreatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelFrozenEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelHiddenEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelMemberResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - archived_at: { type: 'DatetimeType', isSingle: true }, - - ban_expires: { type: 'DatetimeType', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - future_channel_ban_expires: { type: 'DatetimeType', isSingle: true }, - - invite_accepted_at: { type: 'DatetimeType', isSingle: true }, - - invite_rejected_at: { type: 'DatetimeType', isSingle: true }, - - pinned_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelMetadata'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - last_message_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelMute'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - expires: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelMutedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - mutes: { type: 'ChannelMute', isSingle: false }, - - mute: { type: 'ChannelMute', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelPushPreferencesResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - disabled_until: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - hide_messages_before: { type: 'DatetimeType', isSingle: true }, - - last_message_at: { type: 'DatetimeType', isSingle: true }, - - mute_expires_at: { type: 'DatetimeType', isSingle: true }, - - truncated_at: { type: 'DatetimeType', isSingle: true }, - - members: { type: 'ChannelMemberResponse', isSingle: false }, - - config: { type: 'ChannelConfigWithInfo', isSingle: true }, - - created_by: { type: 'UserResponse', isSingle: true }, - - truncated_by: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelStateResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - members: { type: 'ChannelMemberResponse', isSingle: false }, - - messages: { type: 'MessageResponse', isSingle: false }, - - pinned_messages: { type: 'MessageResponse', isSingle: false }, - - threads: { type: 'ThreadStateResponse', isSingle: false }, - - hide_messages_before: { type: 'DatetimeType', isSingle: true }, - - active_live_locations: { - type: 'SharedLocationResponseData', - isSingle: false, - }, - - pending_messages: { type: 'PendingMessageResponse', isSingle: false }, - - read: { type: 'ReadStateResponse', isSingle: false }, - - watchers: { type: 'UserResponse', isSingle: false }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - draft: { type: 'DraftResponse', isSingle: true }, - - membership: { type: 'ChannelMemberResponse', isSingle: true }, - - push_preferences: { - type: 'ChannelPushPreferencesResponse', - isSingle: true, - }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelStateResponseFields'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - members: { type: 'ChannelMemberResponse', isSingle: false }, - - messages: { type: 'MessageResponse', isSingle: false }, - - pinned_messages: { type: 'MessageResponse', isSingle: false }, - - threads: { type: 'ThreadStateResponse', isSingle: false }, - - hide_messages_before: { type: 'DatetimeType', isSingle: true }, - - active_live_locations: { - type: 'SharedLocationResponseData', - isSingle: false, - }, - - pending_messages: { type: 'PendingMessageResponse', isSingle: false }, - - read: { type: 'ReadStateResponse', isSingle: false }, - - watchers: { type: 'UserResponse', isSingle: false }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - draft: { type: 'DraftResponse', isSingle: true }, - - membership: { type: 'ChannelMemberResponse', isSingle: true }, - - push_preferences: { - type: 'ChannelPushPreferencesResponse', - isSingle: true, - }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelTruncatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelTypeConfig'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - commands: { type: 'Command', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelUnFrozenEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelUnmutedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - mutes: { type: 'ChannelMute', isSingle: false }, - - mute: { type: 'ChannelMute', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChannelVisibleEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChatActivityStatsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - messages: { type: 'MessageStatsResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChatDraftPayloadResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - mentioned_users: { type: 'UserResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ChatDraftResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - message: { type: 'ChatDraftPayloadResponse', isSingle: true }, - - parent_message: { type: 'ChatMessageResponse', isSingle: true }, - - quoted_message: { type: 'ChatMessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChatMessageResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - latest_reactions: { type: 'ChatReactionResponse', isSingle: false }, - - mentioned_users: { type: 'UserResponse', isSingle: false }, - - own_reactions: { type: 'ChatReactionResponse', isSingle: false }, - - user: { type: 'UserResponse', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - message_text_updated_at: { type: 'DatetimeType', isSingle: true }, - - pin_expires: { type: 'DatetimeType', isSingle: true }, - - pinned_at: { type: 'DatetimeType', isSingle: true }, - - mentioned_groups: { type: 'UserGroupResponse', isSingle: false }, - - thread_participants: { type: 'UserResponse', isSingle: false }, - - draft: { type: 'ChatDraftResponse', isSingle: true }, - - pinned_by: { type: 'UserResponse', isSingle: true }, - - poll: { type: 'PollResponseData', isSingle: true }, - - quoted_message: { type: 'ChatMessageResponse', isSingle: true }, - - reaction_groups: { type: 'ChatReactionGroupResponse', isSingle: false }, - - reminder: { type: 'ChatReminderResponseData', isSingle: true }, - - shared_location: { type: 'ChatSharedLocationResponseData', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChatReactionGroupResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - first_reaction_at: { type: 'DatetimeType', isSingle: true }, - - last_reaction_at: { type: 'DatetimeType', isSingle: true }, - - latest_reactions_by: { - type: 'ChatReactionGroupUserResponse', - isSingle: false, - }, - }; - return decode(typeMappings, input); -}; - -decoders['ChatReactionGroupUserResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChatReactionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChatReminderResponseData'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - remind_at: { type: 'DatetimeType', isSingle: true }, - - message: { type: 'ChatMessageResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ChatSharedLocationResponseData'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - end_at: { type: 'DatetimeType', isSingle: true }, - - message: { type: 'ChatMessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CheckResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - item: { type: 'ReviewQueueItemResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ClientEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - previously_connected_timestamp: { type: 'DatetimeType', isSingle: true }, - - timestamp: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ClosedCaptionEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CollectionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['Command'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CommentAddedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - activity: { type: 'ActivityResponse', isSingle: true }, - - comment: { type: 'CommentResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CommentDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - comment: { type: 'CommentResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CommentReactionAddedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - activity: { type: 'ActivityResponse', isSingle: true }, - - comment: { type: 'CommentResponse', isSingle: true }, - - reaction: { type: 'FeedsReactionResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CommentReactionDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - comment: { type: 'CommentResponse', isSingle: true }, - - reaction: { type: 'FeedsReactionResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CommentReactionUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - activity: { type: 'ActivityResponse', isSingle: true }, - - comment: { type: 'CommentResponse', isSingle: true }, - - reaction: { type: 'FeedsReactionResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CommentResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - mentioned_users: { type: 'UserResponse', isSingle: false }, - - own_reactions: { type: 'FeedsReactionResponse', isSingle: false }, - - user: { type: 'UserResponse', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - edited_at: { type: 'DatetimeType', isSingle: true }, - - latest_reactions: { type: 'FeedsReactionResponse', isSingle: false }, - - reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['CommentRestoredEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - comment: { type: 'CommentResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CommentUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - comment: { type: 'CommentResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ConfigResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CountByMinuteResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - start_ts: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateBlockListResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - blocklist: { type: 'BlockListResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateCallTypeResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateCampaignResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - campaign: { type: 'CampaignResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateChannelTypeResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateCollectionsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - collections: { type: 'CollectionResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateCommandResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - command: { type: 'Command', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateFeedGroupResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - feed_group: { type: 'FeedGroupResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateFeedViewResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - feed_view: { type: 'FeedViewResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateFeedsBatchResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - feeds: { type: 'FeedResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateGuestResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateImportResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - import_task: { type: 'ImportTask', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateImportV2TaskResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateMembershipLevelResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - membership_level: { type: 'MembershipLevelResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreatePredefinedFilterResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - predefined_filter: { type: 'PredefinedFilterResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateReminderResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - reminder: { type: 'ReminderResponseData', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateRoleResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - role: { type: 'Role', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateSIPTrunkResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - sip_trunk: { type: 'SIPTrunkResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateSegmentResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - segment: { type: 'SegmentResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CreateUserGroupResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - user_group: { type: 'UserGroupResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CustomCheckResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - item: { type: 'ReviewQueueItemResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CustomEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['CustomVideoEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['DeactivateUserResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['DeleteActivityReactionResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - activity: { type: 'ActivityResponse', isSingle: true }, - - reaction: { type: 'FeedsReactionResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['DeleteBookmarkResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - bookmark: { type: 'BookmarkResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['DeleteCallResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['DeleteChannelResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - channel: { type: 'ChannelResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['DeleteCommentBookmarkResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - bookmark: { type: 'BookmarkResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['DeleteCommentReactionResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - comment: { type: 'CommentResponse', isSingle: true }, - - reaction: { type: 'FeedsReactionResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['DeleteCommentResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - activity: { type: 'ActivityResponse', isSingle: true }, - - comment: { type: 'CommentResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['DeleteMessageResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['DeleteReactionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - message: { type: 'MessageResponse', isSingle: true }, - - reaction: { type: 'ReactionResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['DeviceResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['DraftPayloadResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - mentioned_users: { type: 'UserResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['DraftResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - message: { type: 'DraftPayloadResponse', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - parent_message: { type: 'MessageResponse', isSingle: true }, - - quoted_message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['EgressRTMPResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - started_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['EgressResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - rtmps: { type: 'EgressRTMPResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['EnrichedCollectionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['EntityCreatorResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - ban_expires: { type: 'DatetimeType', isSingle: true }, - - deactivated_at: { type: 'DatetimeType', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - last_active: { type: 'DatetimeType', isSingle: true }, - - revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true }, - - devices: { type: 'DeviceResponse', isSingle: false }, - - push_notifications: { - type: 'PushNotificationSettingsResponse', - isSingle: true, - }, - }; - return decode(typeMappings, input); -}; - -decoders['EventHook'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['EventResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - event: { type: 'WSEvent', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ExportUserResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - messages: { type: 'MessageResponse', isSingle: false }, - - reactions: { type: 'ReactionResponse', isSingle: false }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedCreatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - members: { type: 'FeedMemberResponse', isSingle: false }, - - feed: { type: 'FeedResponse', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedGroupChangedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedGroupDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedGroupResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - activity_selectors: { - type: 'ActivitySelectorConfigResponse', - isSingle: false, - }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedGroupRestoredEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedMemberAddedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - member: { type: 'FeedMemberResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedMemberRemovedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedMemberResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - - invite_accepted_at: { type: 'DatetimeType', isSingle: true }, - - invite_rejected_at: { type: 'DatetimeType', isSingle: true }, - - membership_level: { type: 'MembershipLevelResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedMemberUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - member: { type: 'FeedMemberResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedOwnData'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - own_followings: { type: 'FollowResponse', isSingle: false }, - - own_follows: { type: 'FollowResponse', isSingle: false }, - - own_membership: { type: 'FeedMemberResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - created_by: { type: 'UserResponse', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - own_followings: { type: 'FollowResponse', isSingle: false }, - - own_follows: { type: 'FollowResponse', isSingle: false }, - - own_membership: { type: 'FeedMemberResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedSuggestionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - created_by: { type: 'UserResponse', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - own_followings: { type: 'FollowResponse', isSingle: false }, - - own_follows: { type: 'FollowResponse', isSingle: false }, - - own_membership: { type: 'FeedMemberResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - feed: { type: 'FeedResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedViewResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - last_used_at: { type: 'DatetimeType', isSingle: true }, - - activity_selectors: { - type: 'ActivitySelectorConfigResponse', - isSingle: false, - }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedsBookmarkResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedsEnrichedCollectionResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedsFeedResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - created_by: { type: 'UserResponse', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedsReactionGroupResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - first_reaction_at: { type: 'DatetimeType', isSingle: true }, - - last_reaction_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedsReactionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedsShareResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedsV3ActivityResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - comments: { type: 'FeedsV3CommentResponse', isSingle: false }, - - latest_reactions: { type: 'FeedsReactionResponse', isSingle: false }, - - mentioned_users: { type: 'UserResponse', isSingle: false }, - - own_bookmarks: { type: 'FeedsBookmarkResponse', isSingle: false }, - - own_reactions: { type: 'FeedsReactionResponse', isSingle: false }, - - collections: { type: 'FeedsEnrichedCollectionResponse', isSingle: false }, - - reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false }, - - user: { type: 'UserResponse', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - edited_at: { type: 'DatetimeType', isSingle: true }, - - expires_at: { type: 'DatetimeType', isSingle: true }, - - friend_reactions: { type: 'FeedsReactionResponse', isSingle: false }, - - latest_shares: { type: 'FeedsShareResponse', isSingle: false }, - - current_feed: { type: 'FeedsFeedResponse', isSingle: true }, - - parent: { type: 'FeedsV3ActivityResponse', isSingle: true }, - - poll: { type: 'PollResponseData', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FeedsV3CommentResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - mentioned_users: { type: 'UserResponse', isSingle: false }, - - own_reactions: { type: 'FeedsReactionResponse', isSingle: false }, - - user: { type: 'UserResponse', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - edited_at: { type: 'DatetimeType', isSingle: true }, - - latest_reactions: { type: 'FeedsReactionResponse', isSingle: false }, - - reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['FlagDetailsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - automod: { type: 'AutomodDetailsResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FlagFeedbackResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FlagUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - created_by: { type: 'UserResponse', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FollowBatchResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created: { type: 'FollowResponse', isSingle: false }, - - follows: { type: 'FollowResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['FollowCreatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - follow: { type: 'FollowResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FollowDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - follow: { type: 'FollowResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FollowResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - source_feed: { type: 'FeedResponse', isSingle: true }, - - target_feed: { type: 'FeedResponse', isSingle: true }, - - request_accepted_at: { type: 'DatetimeType', isSingle: true }, - - request_rejected_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FollowUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - follow: { type: 'FollowResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FullUserResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - channel_mutes: { type: 'ChannelMute', isSingle: false }, - - devices: { type: 'DeviceResponse', isSingle: false }, - - mutes: { type: 'UserMuteResponse', isSingle: false }, - - ban_expires: { type: 'DatetimeType', isSingle: true }, - - deactivated_at: { type: 'DatetimeType', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - last_active: { type: 'DatetimeType', isSingle: true }, - - revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['FutureChannelBanResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - expires: { type: 'DatetimeType', isSingle: true }, - - banned_by: { type: 'UserResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetActiveCallsStatusResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - end_time: { type: 'DatetimeType', isSingle: true }, - - start_time: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetActivityResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - activity: { type: 'ActivityResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetAppealResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - item: { type: 'AppealItemResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetApplicationResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - app: { type: 'AppResponseFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetBlockListResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - blocklist: { type: 'BlockListResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetBlockedUsersResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - blocks: { type: 'BlockedUserResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['GetCallParticipantSessionMetricsResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - joined_at: { type: 'DatetimeType', isSingle: true }, - - published_tracks: { type: 'PublishedTrackMetrics', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['GetCallReportResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - report: { type: 'ReportResponse', isSingle: true }, - - video_reactions: { type: 'VideoReactionsResponse', isSingle: false }, - - chat_activity: { type: 'ChatActivityStatsResponse', isSingle: true }, - - session: { type: 'CallSessionResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetCallResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - members: { type: 'MemberResponse', isSingle: false }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetCallSessionParticipantStatsDetailsResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - timeframe: { type: 'ParticipantSeriesTimeframe', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetCallTypeResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetCampaignResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - campaign: { type: 'CampaignResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetChannelTypeResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - commands: { type: 'Command', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['GetCommandResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetCommentRepliesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - comments: { type: 'ThreadedCommentResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['GetCommentResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - comment: { type: 'CommentResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetCommentsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - comments: { type: 'ThreadedCommentResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['GetConfigResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - config: { type: 'ConfigResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetDraftResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - draft: { type: 'DraftResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetExternalStorageResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetFeedGroupResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - feed_group: { type: 'FeedGroupResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetFeedViewResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - feed_view: { type: 'FeedViewResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetFollowSuggestionsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - suggestions: { type: 'FeedSuggestionResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['GetImportResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - import_task: { type: 'ImportTask', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetImportV2TaskResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetManyMessagesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - messages: { type: 'MessageResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['GetMessageResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - message: { type: 'MessageWithChannelResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetModerationRuleResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - rule: { type: 'ModerationRuleV2Response', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetOrCreateCallResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - members: { type: 'MemberResponse', isSingle: false }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetOrCreateFeedGroupResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - feed_group: { type: 'FeedGroupResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetOrCreateFeedResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - activities: { type: 'ActivityResponse', isSingle: false }, - - aggregated_activities: { - type: 'AggregatedActivityResponse', - isSingle: false, - }, - - followers: { type: 'FollowResponse', isSingle: false }, - - following: { type: 'FollowResponse', isSingle: false }, - - members: { type: 'FeedMemberResponse', isSingle: false }, - - pinned_activities: { type: 'ActivityPinResponse', isSingle: false }, - - feed: { type: 'FeedResponse', isSingle: true }, - - notification_status: { type: 'NotificationStatusResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetOrCreateFeedViewResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - feed_view: { type: 'FeedViewResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetOrCreateFollowResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - follow: { type: 'FollowResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetOrCreateUnfollowResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - follow: { type: 'FollowResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetPinnedMessagesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - messages: { type: 'MessageResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['GetPredefinedFilterResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - predefined_filter: { type: 'PredefinedFilterResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetPushTemplatesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - templates: { type: 'PushTemplateResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['GetReactionsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - reactions: { type: 'ReactionResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['GetRepliesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - messages: { type: 'MessageResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['GetRetentionPolicyResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - policies: { type: 'RetentionPolicy', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['GetReviewQueueItemResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - item: { type: 'ReviewQueueItemResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetSegmentResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - segment: { type: 'SegmentResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetSetupSessionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - setup_session: { type: 'SetupSession', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetTaskResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetThreadResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - thread: { type: 'ThreadStateResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GetUserGroupResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - user_group: { type: 'UserGroupResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GoLiveResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['GroupedChannelsBucket'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - channels: { type: 'ChannelStateResponseFields', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['GroupedQueryChannelsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - groups: { type: 'GroupedChannelsBucket', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ImportTask'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - history: { type: 'ImportTaskHistory', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ImportTaskHistory'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ImportV2TaskItem'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['IngressErrorEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['IngressStartedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['IngressStoppedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['KickedUserEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - - kicked_by_user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['LabelResultResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ListBlockListResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - blocklists: { type: 'BlockListResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListCallTypeResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - call_types: { type: 'CallTypeResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListChannelTypesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - channel_types: { type: 'ChannelTypeConfig', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListCommandsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - commands: { type: 'Command', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListDevicesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - devices: { type: 'DeviceResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListFeedGroupsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - groups: { type: 'FeedGroupResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListFeedViewsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - views: { type: 'FeedViewResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListImportV2TasksResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - import_tasks: { type: 'ImportV2TaskItem', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListImportsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - import_tasks: { type: 'ImportTask', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListPushProvidersResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - push_providers: { type: 'PushProviderResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListQueuesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - queues: { type: 'ModerationQueueResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListRecordingsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - recordings: { type: 'CallRecording', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListRolesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - roles: { type: 'Role', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListSIPInboundRoutingRuleResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - sip_inbound_routing_rules: { - type: 'SIPInboundRoutingRuleResponse', - isSingle: false, - }, - }; - return decode(typeMappings, input); -}; - -decoders['ListSIPTrunksResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - sip_trunks: { type: 'SIPTrunkResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListTranscriptionsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - transcriptions: { type: 'CallTranscription', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ListUserGroupsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - user_groups: { type: 'UserGroupResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['MarkReadResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - event: { type: 'MarkReadResponseEvent', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MarkReadResponseEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel_last_message_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - thread: { type: 'ThreadResponse', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MaxStreakChangedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MemberAddedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - member: { type: 'ChannelMemberResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MemberRemovedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - member: { type: 'ChannelMemberResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MemberResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MemberUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - member: { type: 'ChannelMemberResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MembersResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - members: { type: 'ChannelMemberResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['MembershipLevelResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MessageActionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MessageDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MessageFlagResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - approved_at: { type: 'DatetimeType', isSingle: true }, - - rejected_at: { type: 'DatetimeType', isSingle: true }, - - reviewed_at: { type: 'DatetimeType', isSingle: true }, - - details: { type: 'FlagDetailsResponse', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - moderation_feedback: { type: 'FlagFeedbackResponse', isSingle: true }, - - moderation_result: { type: 'MessageModerationResult', isSingle: true }, - - reviewed_by: { type: 'UserResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MessageFlaggedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - details: { type: 'MessageModerationResult', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MessageHistoryEntryResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - message_updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MessageModerationResult'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MessageNewEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - thread_participants: { type: 'UserResponseCommonFields', isSingle: false }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MessageReadEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - thread: { type: 'ThreadResponse', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MessageResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - latest_reactions: { type: 'ReactionResponse', isSingle: false }, - - mentioned_users: { type: 'UserResponse', isSingle: false }, - - own_reactions: { type: 'ReactionResponse', isSingle: false }, - - user: { type: 'UserResponse', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - message_text_updated_at: { type: 'DatetimeType', isSingle: true }, - - pin_expires: { type: 'DatetimeType', isSingle: true }, - - pinned_at: { type: 'DatetimeType', isSingle: true }, - - mentioned_groups: { type: 'UserGroupResponse', isSingle: false }, - - thread_participants: { type: 'UserResponse', isSingle: false }, - - draft: { type: 'DraftResponse', isSingle: true }, - - pinned_by: { type: 'UserResponse', isSingle: true }, - - poll: { type: 'PollResponseData', isSingle: true }, - - quoted_message: { type: 'MessageResponse', isSingle: true }, - - reaction_groups: { type: 'ReactionGroupResponse', isSingle: false }, - - reminder: { type: 'ReminderResponseData', isSingle: true }, - - shared_location: { type: 'SharedLocationResponseData', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MessageStatsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - count_over_time: { type: 'CountByMinuteResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['MessageUnblockedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MessageUndeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MessageUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MessageWithChannelResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - latest_reactions: { type: 'ReactionResponse', isSingle: false }, - - mentioned_users: { type: 'UserResponse', isSingle: false }, - - own_reactions: { type: 'ReactionResponse', isSingle: false }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - message_text_updated_at: { type: 'DatetimeType', isSingle: true }, - - pin_expires: { type: 'DatetimeType', isSingle: true }, - - pinned_at: { type: 'DatetimeType', isSingle: true }, - - mentioned_groups: { type: 'UserGroupResponse', isSingle: false }, - - thread_participants: { type: 'UserResponse', isSingle: false }, - - draft: { type: 'DraftResponse', isSingle: true }, - - pinned_by: { type: 'UserResponse', isSingle: true }, - - poll: { type: 'PollResponseData', isSingle: true }, - - quoted_message: { type: 'MessageResponse', isSingle: true }, - - reaction_groups: { type: 'ReactionGroupResponse', isSingle: false }, - - reminder: { type: 'ReminderResponseData', isSingle: true }, - - shared_location: { type: 'SharedLocationResponseData', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ModerationAnalysisFailedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ModerationCallResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - ended_at: { type: 'DatetimeType', isSingle: true }, - - starts_at: { type: 'DatetimeType', isSingle: true }, - - created_by: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ModerationCheckCompletedEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ModerationCustomActionEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - review_queue_item: { type: 'ReviewQueueItemResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ModerationFlagResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - content_published_at: { type: 'DatetimeType', isSingle: true }, - - review_queue_item: { type: 'ReviewQueueItemResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ModerationFlaggedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ModerationImageAnalysisCompleteEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ModerationMarkReviewedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - item: { type: 'ReviewQueueItemResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ModerationQueueResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ModerationRuleV2Response'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ModerationRulesTriggeredEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ModerationTextAnalysisCompleteEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MuteChannelResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - channel_mutes: { type: 'ChannelMute', isSingle: false }, - - channel_mute: { type: 'ChannelMute', isSingle: true }, - - own_user: { type: 'OwnUserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['MuteResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - mutes: { type: 'UserMuteResponse', isSingle: false }, - - own_user: { type: 'OwnUserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['NotificationFeedUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - aggregated_activities: { - type: 'AggregatedActivityResponse', - isSingle: false, - }, - - notification_status: { type: 'NotificationStatusResponse', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['NotificationMarkUnreadEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - last_read_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['NotificationStatusResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - last_read_at: { type: 'DatetimeType', isSingle: true }, - - last_seen_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['NotificationThreadMessageNewEvent'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - thread_participants: { type: 'UserResponseCommonFields', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['OwnBatchResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - data: { type: 'FeedOwnData', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['OwnUserResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - channel_mutes: { type: 'ChannelMute', isSingle: false }, - - devices: { type: 'DeviceResponse', isSingle: false }, - - mutes: { type: 'UserMuteResponse', isSingle: false }, - - deactivated_at: { type: 'DatetimeType', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - last_active: { type: 'DatetimeType', isSingle: true }, - - revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true }, - - push_preferences: { type: 'PushPreferencesResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ParticipantCountByMinuteResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - start_ts: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ParticipantCountOverTimeResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - by_minute: { type: 'ParticipantCountByMinuteResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ParticipantReportResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - count_over_time: { - type: 'ParticipantCountOverTimeResponse', - isSingle: true, - }, - }; - return decode(typeMappings, input); -}; - -decoders['ParticipantSeriesTimeframe'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - since: { type: 'DatetimeType', isSingle: true }, - - until: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ParticipantSessionDetails'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - joined_at: { type: 'DatetimeType', isSingle: true }, - - left_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PendingMessageEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PendingMessageResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - channel: { type: 'ChannelResponse', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PerformanceAnalysisResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - last_analyzed: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PermissionRequestEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PinActivityResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - activity: { type: 'ActivityResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PolicyTestResult'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PolicyTestRun'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - completed_at: { type: 'DatetimeType', isSingle: true }, - - config_updated_at: { type: 'DatetimeType', isSingle: true }, - - started_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PolicyTestRunResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - results: { type: 'PolicyTestResult', isSingle: false }, - - run: { type: 'PolicyTestRun', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PolicyTestSet'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - last_run: { type: 'PolicyTestRun', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PolicyTestSetListResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - sets: { type: 'PolicyTestSet', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['PolicyTestSetResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - recent_runs: { type: 'PolicyTestRun', isSingle: false }, - - set: { type: 'PolicyTestSet', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PollResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - poll: { type: 'PollResponseData', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PollResponseData'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - latest_answers: { type: 'PollVoteResponseData', isSingle: false }, - - own_votes: { type: 'PollVoteResponseData', isSingle: false }, - - created_by: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PollVoteResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - poll: { type: 'PollResponseData', isSingle: true }, - - vote: { type: 'PollVoteResponseData', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PollVoteResponseData'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PollVotesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - votes: { type: 'PollVoteResponseData', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['PredefinedFilterResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - performance: { type: 'PerformanceAnalysisResponse', isSingle: true }, - - stats: { type: 'PredefinedFilterStatsResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PredefinedFilterStatsResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - last_seen: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PublishedTrackMetrics'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - warnings: { type: 'SessionWarningResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['PushNotificationFields'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - providers: { type: 'PushProvider', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['PushNotificationSettingsResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - disabled_until: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PushPreferencesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - disabled_until: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PushProvider'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - disabled_at: { type: 'DatetimeType', isSingle: true }, - - push_templates: { type: 'PushTemplate', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['PushProviderResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - disabled_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PushTemplate'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['PushTemplateResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryActivitiesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - activities: { type: 'ActivityResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryActivityReactionsResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - reactions: { type: 'FeedsReactionResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryActivitySharesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - shares: { type: 'ShareResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryAppealsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - items: { type: 'AppealItemResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryBannedUsersResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - bans: { type: 'BanResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryBookmarkFoldersResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - bookmark_folders: { type: 'BookmarkFolderResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryBookmarksResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - bookmarks: { type: 'BookmarkResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryCallMembersResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - members: { type: 'MemberResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryCallParticipantSessionsResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - participants_sessions: { - type: 'ParticipantSessionDetails', - isSingle: false, - }, - - session: { type: 'CallSessionResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryCallParticipantsResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - members: { type: 'MemberResponse', isSingle: false }, - - participants: { type: 'CallParticipantResponse', isSingle: false }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryCallSessionParticipantStatsResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - participants: { type: 'CallStatsParticipant', isSingle: false }, - - call_ended_at: { type: 'DatetimeType', isSingle: true }, - - call_started_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryCallSessionParticipantStatsTimelineResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - events: { type: 'CallParticipantTimeline', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryCallSessionStatsResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - call_stats: { type: 'CallStatsSessionResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryCallStatsMapResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - call_ended_at: { type: 'DatetimeType', isSingle: true }, - - call_started_at: { type: 'DatetimeType', isSingle: true }, - - end_time: { type: 'DatetimeType', isSingle: true }, - - generated_at: { type: 'DatetimeType', isSingle: true }, - - start_time: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryCallStatsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - reports: { type: 'CallStatsReportSummaryResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryCallsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - calls: { type: 'CallStateResponseFields', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryCampaignsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - campaigns: { type: 'CampaignResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryChannelsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - channels: { type: 'ChannelStateResponseFields', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryCollectionsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - collections: { type: 'CollectionResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryCommentReactionsResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - reactions: { type: 'FeedsReactionResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryCommentsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - comments: { type: 'CommentResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryDraftsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - drafts: { type: 'DraftResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryFeedMembersResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - members: { type: 'FeedMemberResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryFeedModerationTemplate'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryFeedModerationTemplatesResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - templates: { type: 'QueryFeedModerationTemplate', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryFeedsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - feeds: { type: 'FeedResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryFollowsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - follows: { type: 'FollowResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryFutureChannelBansResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - bans: { type: 'FutureChannelBanResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryLabelResultsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - label_results: { type: 'LabelResultResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryMembershipLevelsResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - membership_levels: { type: 'MembershipLevelResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryMessageFlagsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - flags: { type: 'MessageFlagResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryMessageHistoryResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - message_history: { type: 'MessageHistoryEntryResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryModerationConfigsResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - configs: { type: 'ConfigResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryModerationFlagsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - flags: { type: 'ModerationFlagResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryModerationLogsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - logs: { type: 'ActionLogResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryModerationRulesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - rules: { type: 'ModerationRuleV2Response', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryPinnedActivitiesResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - pinned_activities: { type: 'ActivityPinResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryPollsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - polls: { type: 'PollResponseData', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryPredefinedFiltersResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - predefined_filters: { type: 'PredefinedFilterResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryReactionsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - reactions: { type: 'ReactionResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryRemindersResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - reminders: { type: 'ReminderResponseData', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryReviewQueueResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - items: { type: 'ReviewQueueItemResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryRevisionHistoryResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - revisions: { type: 'RevisionHistoryResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QuerySegmentTargetsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - targets: { type: 'SegmentTargetResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QuerySegmentsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - segments: { type: 'SegmentResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryThreadsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - threads: { type: 'ThreadStateResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueryUsersResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - users: { type: 'FullUserResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['QueueResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - queue: { type: 'ModerationQueueResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['Reaction'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReactionDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - thread_participants: { type: 'UserResponseCommonFields', isSingle: false }, - - message: { type: 'MessageResponse', isSingle: true }, - - reaction: { type: 'ReactionResponse', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReactionGroupResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - first_reaction_at: { type: 'DatetimeType', isSingle: true }, - - last_reaction_at: { type: 'DatetimeType', isSingle: true }, - - latest_reactions_by: { type: 'ReactionGroupUserResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ReactionGroupUserResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReactionNewEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - thread_participants: { type: 'UserResponseCommonFields', isSingle: false }, - - message: { type: 'MessageResponse', isSingle: true }, - - reaction: { type: 'ReactionResponse', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReactionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReactionUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - reaction: { type: 'ReactionResponse', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReactivateUserResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReadCollectionsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - collections: { type: 'CollectionResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['ReadStateResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - last_read: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - - last_delivered_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['RejectFeedMemberInviteResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - member: { type: 'FeedMemberResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['RejectFollowResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - follow: { type: 'FollowResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReminderCreatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - reminder: { type: 'ReminderResponseData', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReminderDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - reminder: { type: 'ReminderResponseData', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReminderNotificationEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - reminder: { type: 'ReminderResponseData', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReminderResponseData'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - remind_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReminderUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - reminder: { type: 'ReminderResponseData', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['RemoveUserGroupMembersResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - user_group: { type: 'UserGroupResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReportResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - call: { type: 'CallReportResponse', isSingle: true }, - - participants: { type: 'ParticipantReportResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ResolveSipInboundResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - sip_routing_rule: { type: 'SIPInboundRoutingRuleResponse', isSingle: true }, - - sip_trunk: { type: 'SIPTrunkResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['RestoreActivityResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - activity: { type: 'ActivityResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['RestoreCommentResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - activity: { type: 'ActivityResponse', isSingle: true }, - - comment: { type: 'CommentResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['RestoreFeedGroupResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - feed_group: { type: 'FeedGroupResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['RetentionPolicy'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - enabled_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReviewQueueItemNewEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - flags: { type: 'ModerationFlagResponse', isSingle: false }, - - action: { type: 'ActionLogResponse', isSingle: true }, - - review_queue_item: { type: 'ReviewQueueItemResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReviewQueueItemResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - actions: { type: 'ActionLogResponse', isSingle: false }, - - bans: { type: 'BanInfoResponse', isSingle: false }, - - flags: { type: 'ModerationFlagResponse', isSingle: false }, - - completed_at: { type: 'DatetimeType', isSingle: true }, - - escalated_at: { type: 'DatetimeType', isSingle: true }, - - reviewed_at: { type: 'DatetimeType', isSingle: true }, - - appeal: { type: 'AppealItemResponse', isSingle: true }, - - assigned_to: { type: 'UserResponse', isSingle: true }, - - call: { type: 'ModerationCallResponse', isSingle: true }, - - entity_creator: { type: 'EntityCreatorResponse', isSingle: true }, - - feeds_v2_reaction: { type: 'Reaction', isSingle: true }, - - feeds_v3_activity: { type: 'FeedsV3ActivityResponse', isSingle: true }, - - feeds_v3_comment: { type: 'FeedsV3CommentResponse', isSingle: true }, - - message: { type: 'ChatMessageResponse', isSingle: true }, - - reaction: { type: 'Reaction', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ReviewQueueItemUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - flags: { type: 'ModerationFlagResponse', isSingle: false }, - - action: { type: 'ActionLogResponse', isSingle: true }, - - review_queue_item: { type: 'ReviewQueueItemResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['RevisionHistoryResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['Role'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SIPInboundRoutingRuleResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SIPTrunkResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SearchResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - results: { type: 'SearchResult', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['SearchResult'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - message: { type: 'SearchResultMessage', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SearchResultMessage'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - latest_reactions: { type: 'ReactionResponse', isSingle: false }, - - mentioned_users: { type: 'UserResponse', isSingle: false }, - - own_reactions: { type: 'ReactionResponse', isSingle: false }, - - user: { type: 'UserResponse', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - message_text_updated_at: { type: 'DatetimeType', isSingle: true }, - - pin_expires: { type: 'DatetimeType', isSingle: true }, - - pinned_at: { type: 'DatetimeType', isSingle: true }, - - mentioned_groups: { type: 'UserGroupResponse', isSingle: false }, - - thread_participants: { type: 'UserResponse', isSingle: false }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - draft: { type: 'DraftResponse', isSingle: true }, - - pinned_by: { type: 'UserResponse', isSingle: true }, - - poll: { type: 'PollResponseData', isSingle: true }, - - quoted_message: { type: 'MessageResponse', isSingle: true }, - - reaction_groups: { type: 'ReactionGroupResponse', isSingle: false }, - - reminder: { type: 'ReminderResponseData', isSingle: true }, - - shared_location: { type: 'SharedLocationResponseData', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SearchRolesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - roles: { type: 'Role', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['SearchUserGroupsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - user_groups: { type: 'UserGroupResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['Segment'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SegmentResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SegmentTargetResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SendMessageResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - message: { type: 'MessageResponse', isSingle: true }, - - channel_context: { type: 'ChannelContextResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SendReactionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - message: { type: 'MessageResponse', isSingle: true }, - - reaction: { type: 'ReactionResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SessionWarningResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - time: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SetRetentionPolicyResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - policy: { type: 'RetentionPolicy', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SetupSession'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - completed_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ShareResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SharedLocationResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - end_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SharedLocationResponseData'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - end_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SharedLocationsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - active_live_locations: { - type: 'SharedLocationResponseData', - isSingle: false, - }, - }; - return decode(typeMappings, input); -}; - -decoders['SingleFollowResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - follow: { type: 'FollowResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['StartCampaignResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - campaign: { type: 'CampaignResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['StopLiveResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['StoriesFeedUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - activities: { type: 'ActivityResponse', isSingle: false }, - - aggregated_activities: { - type: 'AggregatedActivityResponse', - isSingle: false, - }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['SubmitActionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - appeal_item: { type: 'AppealItemResponse', isSingle: true }, - - item: { type: 'ReviewQueueItemResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ThreadParticipant'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - last_read_at: { type: 'DatetimeType', isSingle: true }, - - last_thread_message_at: { type: 'DatetimeType', isSingle: true }, - - left_thread_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ThreadResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - last_message_at: { type: 'DatetimeType', isSingle: true }, - - thread_participants: { type: 'ThreadParticipant', isSingle: false }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - created_by: { type: 'UserResponse', isSingle: true }, - - parent_message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ThreadStateResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - latest_replies: { type: 'MessageResponse', isSingle: false }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - last_message_at: { type: 'DatetimeType', isSingle: true }, - - read: { type: 'ReadStateResponse', isSingle: false }, - - thread_participants: { type: 'ThreadParticipant', isSingle: false }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - created_by: { type: 'UserResponse', isSingle: true }, - - draft: { type: 'DraftResponse', isSingle: true }, - - parent_message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ThreadUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - thread: { type: 'ThreadResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['ThreadedCommentResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - mentioned_users: { type: 'UserResponse', isSingle: false }, - - own_reactions: { type: 'FeedsReactionResponse', isSingle: false }, - - user: { type: 'UserResponse', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - edited_at: { type: 'DatetimeType', isSingle: true }, - - latest_reactions: { type: 'FeedsReactionResponse', isSingle: false }, - - replies: { type: 'ThreadedCommentResponse', isSingle: false }, - - reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['TranslateActivityResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - activity: { type: 'ActivityResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['TranslateCommentResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - comment: { type: 'CommentResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['TranslateMessageResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['TruncateChannelResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - channel: { type: 'ChannelResponse', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UnblockedUserEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UndeleteMessageResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UnfollowBatchResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - follows: { type: 'FollowResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['UnfollowResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - follow: { type: 'FollowResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UnpinActivityResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - activity: { type: 'ActivityResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UnreadCountsBatchResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - counts_by_user: { type: 'UnreadCountsResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['UnreadCountsChannel'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - last_read: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UnreadCountsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - channels: { type: 'UnreadCountsChannel', isSingle: false }, - - threads: { type: 'UnreadCountsThread', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['UnreadCountsThread'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - last_read: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateActivitiesPartialBatchResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - activities: { type: 'ActivityResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateActivityPartialResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - activity: { type: 'ActivityResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateActivityResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - activity: { type: 'ActivityResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateBlockListResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - blocklist: { type: 'BlockListResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateBookmarkFolderResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - bookmark_folder: { type: 'BookmarkFolderResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateBookmarkResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - bookmark: { type: 'BookmarkResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateCallMembersResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - members: { type: 'MemberResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateCallResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - members: { type: 'MemberResponse', isSingle: false }, - - call: { type: 'CallResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateCallTypeResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateChannelPartialResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - members: { type: 'ChannelMemberResponse', isSingle: false }, - - channel: { type: 'ChannelResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateChannelResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - members: { type: 'ChannelMemberResponse', isSingle: false }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateChannelTypeResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateCollectionsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - collections: { type: 'CollectionResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateCommandResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - command: { type: 'Command', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateCommentBookmarkResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - bookmark: { type: 'BookmarkResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateCommentPartialResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - comment: { type: 'CommentResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateCommentResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - comment: { type: 'CommentResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateFeedGroupResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - feed_group: { type: 'FeedGroupResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateFeedMembersResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - added: { type: 'FeedMemberResponse', isSingle: false }, - - updated: { type: 'FeedMemberResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateFeedResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - feed: { type: 'FeedResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateFeedViewResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - feed_view: { type: 'FeedViewResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateFollowResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - follow: { type: 'FollowResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateMemberPartialResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - channel_member: { type: 'ChannelMemberResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateMembershipLevelResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - membership_level: { type: 'MembershipLevelResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateMessagePartialResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateMessageResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - message: { type: 'MessageResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdatePredefinedFilterResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - predefined_filter: { type: 'PredefinedFilterResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateReminderResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - reminder: { type: 'ReminderResponseData', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateSIPInboundRoutingRuleResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - sip_inbound_routing_rule: { - type: 'SIPInboundRoutingRuleResponse', - isSingle: true, - }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateSIPTrunkResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - sip_trunk: { type: 'SIPTrunkResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateSegmentResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - segment: { type: 'SegmentResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateThreadPartialResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - thread: { type: 'ThreadResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateUserGroupResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - user_group: { type: 'UserGroupResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdateUsersResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - users: { type: 'FullUserResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['UpdatedCallPermissionsEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpsertActivitiesResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - activities: { type: 'ActivityResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['UpsertCollectionsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - collections: { type: 'CollectionResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['UpsertConfigResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - config: { type: 'ConfigResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpsertModerationRuleResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - rule: { type: 'ModerationRuleV2Response', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpsertModerationTemplateResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpsertPushPreferencesResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - user_preferences: { type: 'PushPreferencesResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['UpsertPushProviderResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - push_provider: { type: 'PushProviderResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpsertPushTemplateResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - template: { type: 'PushTemplateResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UpsertSetupSessionResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - setup_session: { type: 'SetupSession', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserBannedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - - expiration: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - created_by: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserDeactivatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - created_by: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserFlaggedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - target_user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserGroupCreatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserGroupDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserGroupMember'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserGroupMemberAddedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserGroupMemberRemovedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserGroupResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - members: { type: 'UserGroupMember', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['UserGroupUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserMessagesDeletedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserMuteResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - expires: { type: 'DatetimeType', isSingle: true }, - - target: { type: 'UserResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserMutedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - target_users: { type: 'UserResponseCommonFields', isSingle: false }, - - target_user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserReactivatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - created_by: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - ban_expires: { type: 'DatetimeType', isSingle: true }, - - deactivated_at: { type: 'DatetimeType', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - last_active: { type: 'DatetimeType', isSingle: true }, - - revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true }, - - devices: { type: 'DeviceResponse', isSingle: false }, - - push_notifications: { - type: 'PushNotificationSettingsResponse', - isSingle: true, - }, - }; - return decode(typeMappings, input); -}; - -decoders['UserResponseCommonFields'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - deactivated_at: { type: 'DatetimeType', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - last_active: { type: 'DatetimeType', isSingle: true }, - - revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserUnbannedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - created_by: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserUnmutedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - - target_users: { type: 'UserResponseCommonFields', isSingle: false }, - - target_user: { type: 'UserResponseCommonFields', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserUnreadReminderEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponseCommonFields', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['UserUpdatedEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - received_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['VideoReactionOverTimeResponse'] = (input?: { - [key: string]: any; -}) => { - const typeMappings: TypeMapping = { - by_minute: { type: 'CountByMinuteResponse', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders['VideoReactionsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - count_over_time: { type: 'VideoReactionOverTimeResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['WSEvent'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - channel_last_message_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'ChannelResponse', isSingle: true }, - - created_by: { type: 'UserResponse', isSingle: true }, - - me: { type: 'OwnUserResponse', isSingle: true }, - - member: { type: 'ChannelMemberResponse', isSingle: true }, - - message: { type: 'MessageResponse', isSingle: true }, - - poll: { type: 'PollResponseData', isSingle: true }, - - poll_vote: { type: 'PollVoteResponseData', isSingle: true }, - - reaction: { type: 'ReactionResponse', isSingle: true }, - - thread: { type: 'ThreadResponse', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders['WrappedUnreadCountsResponse'] = (input?: { [key: string]: any }) => { - const typeMappings: TypeMapping = { - channels: { type: 'UnreadCountsChannel', isSingle: false }, - - threads: { type: 'UnreadCountsThread', isSingle: false }, + app: { type: 'AppResponseFields', isSingle: true }, }; return decode(typeMappings, input); }; diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index 07707e8..b6124a7 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -253,7 +253,7 @@ export interface ActionLogResponse { /** * Timestamp when the action was taken */ - created_at: Date; + created_at: number; /** * Unique identifier of the action log @@ -371,7 +371,7 @@ export interface ActivityAddedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -386,7 +386,7 @@ export interface ActivityAddedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -395,7 +395,7 @@ export interface ActivityDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -410,7 +410,7 @@ export interface ActivityDeletedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -419,7 +419,7 @@ export interface ActivityFeedbackEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; activity_feedback: ActivityFeedbackEventPayload; @@ -430,7 +430,7 @@ export interface ActivityFeedbackEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -450,12 +450,12 @@ export interface ActivityFeedbackEventPayload { /** * When the feedback was created */ - created_at: Date; + created_at: number; /** * When the feedback was last updated */ - updated_at: Date; + updated_at: number; /** * The feedback value (true/false) @@ -512,7 +512,7 @@ export interface ActivityMarkEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -535,7 +535,7 @@ export interface ActivityMarkEvent { */ mark_all_seen?: boolean; - received_at?: Date; + received_at?: number; /** * The IDs of activities marked as read @@ -571,7 +571,7 @@ export interface ActivityPinResponse { /** * When the pin was created */ - created_at: Date; + created_at: number; /** * ID of the feed where activity is pinned @@ -581,7 +581,7 @@ export interface ActivityPinResponse { /** * When the pin was last updated */ - updated_at: Date; + updated_at: number; activity: ActivityResponse; @@ -595,7 +595,7 @@ export interface ActivityPinnedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The ID of the feed @@ -613,7 +613,7 @@ export interface ActivityPinnedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -656,7 +656,7 @@ export interface ActivityReactionAddedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -673,7 +673,7 @@ export interface ActivityReactionAddedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -682,7 +682,7 @@ export interface ActivityReactionDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -699,7 +699,7 @@ export interface ActivityReactionDeletedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -708,7 +708,7 @@ export interface ActivityReactionUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -725,7 +725,7 @@ export interface ActivityReactionUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -734,7 +734,7 @@ export interface ActivityRemovedFromFeedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -749,7 +749,7 @@ export interface ActivityRemovedFromFeedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -890,7 +890,7 @@ export interface ActivityResponse { /** * When the activity was created */ - created_at: Date; + created_at: number; /** * If this activity is hidden by this user (using activity feedback) @@ -941,7 +941,7 @@ export interface ActivityResponse { /** * When the activity was last updated */ - updated_at: Date; + updated_at: number; /** * Visibility setting for the activity. One of: public, private, tag @@ -1022,17 +1022,17 @@ export interface ActivityResponse { /** * When the activity was deleted */ - deleted_at?: Date; + deleted_at?: number; /** * When the activity was last edited */ - edited_at?: Date; + edited_at?: number; /** * When the activity will expire */ - expires_at?: Date; + expires_at?: number; /** * Total count of reactions from friends on this activity @@ -1104,7 +1104,7 @@ export interface ActivityRestoredEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -1119,7 +1119,7 @@ export interface ActivityRestoredEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -1185,7 +1185,7 @@ export interface ActivitySelectorConfigResponse { /** * Time threshold for activity selection (timestamp) */ - cutoff_time?: Date; + cutoff_time?: number; /** * Flexible relative time window for activity selection (e.g., '1h', '3d', '1y') @@ -1219,7 +1219,7 @@ export interface ActivityUnpinnedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The ID of the feed @@ -1237,7 +1237,7 @@ export interface ActivityUnpinnedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -1246,7 +1246,7 @@ export interface ActivityUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -1261,7 +1261,7 @@ export interface ActivityUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -1755,7 +1755,7 @@ export interface AggregatedActivityResponse { /** * When the aggregation was created */ - created_at: Date; + created_at: number; /** * Grouping identifier @@ -1770,7 +1770,7 @@ export interface AggregatedActivityResponse { /** * When the aggregation was last updated */ - updated_at: Date; + updated_at: number; /** * Number of unique users in this aggregation @@ -2071,7 +2071,7 @@ export interface AppResponseFields { moderation_s3_image_access_role_arn?: string; - revoke_tokens_issued_before?: Date; + revoke_tokens_issued_before?: number; video_primary_use_case?: string; @@ -2089,25 +2089,25 @@ export interface AppResponseFields { } export interface AppealAcceptedEvent { - created_at: Date; + created_at: number; custom: Record; type: string; - received_at?: Date; + received_at?: number; appeal?: AppealItemResponse; } export interface AppealCreatedEvent { - created_at: Date; + created_at: number; custom: Record; type: string; - received_at?: Date; + received_at?: number; appeal?: AppealItemResponse; } @@ -2121,7 +2121,7 @@ export interface AppealItemResponse { /** * When the flag was created */ - created_at: Date; + created_at: number; /** * ID of the entity @@ -2143,7 +2143,7 @@ export interface AppealItemResponse { /** * When the flag was last updated */ - updated_at: Date; + updated_at: number; /** * Text severity level assigned by the AI provider @@ -2218,13 +2218,13 @@ export interface AppealItemResponse { } export interface AppealRejectedEvent { - created_at: Date; + created_at: number; custom: Record; type: string; - received_at?: Date; + received_at?: number; appeal?: AppealItemResponse; } @@ -2278,11 +2278,11 @@ export interface AppealResponse { } export interface AsyncBulkImageModerationEvent { - created_at: Date; + created_at: number; - finished_at: Date; + finished_at: number; - started_at: Date; + started_at: number; task_id: string; @@ -2292,15 +2292,15 @@ export interface AsyncBulkImageModerationEvent { type: string; - received_at?: Date; + received_at?: number; } export interface AsyncExportChannelsEvent { - created_at: Date; + created_at: number; - finished_at: Date; + finished_at: number; - started_at: Date; + started_at: number; task_id: string; @@ -2310,17 +2310,17 @@ export interface AsyncExportChannelsEvent { type: string; - received_at?: Date; + received_at?: number; } export interface AsyncExportErrorEvent { - created_at: Date; + created_at: number; error: string; - finished_at: Date; + finished_at: number; - started_at: Date; + started_at: number; task_id: string; @@ -2328,15 +2328,15 @@ export interface AsyncExportErrorEvent { type: string; - received_at?: Date; + received_at?: number; } export interface AsyncExportModerationLogsEvent { - created_at: Date; + created_at: number; - finished_at: Date; + finished_at: number; - started_at: Date; + started_at: number; task_id: string; @@ -2346,15 +2346,15 @@ export interface AsyncExportModerationLogsEvent { type: string; - received_at?: Date; + received_at?: number; } export interface AsyncExportReviewQueueEvent { - created_at: Date; + created_at: number; - finished_at: Date; + finished_at: number; - started_at: Date; + started_at: number; task_id: string; @@ -2364,15 +2364,15 @@ export interface AsyncExportReviewQueueEvent { type: string; - received_at?: Date; + received_at?: number; } export interface AsyncExportUsersEvent { - created_at: Date; + created_at: number; - finished_at: Date; + finished_at: number; - started_at: Date; + started_at: number; task_id: string; @@ -2382,7 +2382,7 @@ export interface AsyncExportUsersEvent { type: string; - received_at?: Date; + received_at?: number; } export interface AsyncModerationCallbackConfig { @@ -2670,7 +2670,7 @@ export interface BanInfoResponse { /** * When the ban was created */ - created_at: Date; + created_at: number; /** * The channel this ban applies to. Empty if this is an app-wide (global) ban rather than a per-channel ban. @@ -2680,7 +2680,7 @@ export interface BanInfoResponse { /** * When the ban expires */ - expires?: Date; + expires?: number; /** * Reason for the ban @@ -2762,9 +2762,9 @@ export interface BanRequest { } export interface BanResponse { - created_at: Date; + created_at: number; - expires?: Date; + expires?: number; reason?: string; @@ -2929,7 +2929,7 @@ export interface BlockListResponse { /** * Date/time of creation */ - created_at?: Date; + created_at?: number; id?: string; @@ -2940,7 +2940,7 @@ export interface BlockListResponse { /** * Date/time of the last update */ - updated_at?: Date; + updated_at?: number; } export interface BlockListRule { @@ -3001,7 +3001,7 @@ export interface BlockUsersResponse { /** * Timestamp when the user was blocked */ - created_at: Date; + created_at: number; /** * Duration of the request in milliseconds @@ -3012,7 +3012,7 @@ export interface BlockUsersResponse { export interface BlockedUserEvent { call_cid: string; - created_at: Date; + created_at: number; /** * User response object @@ -3036,7 +3036,7 @@ export interface BlockedUserResponse { */ blocked_user_id: string; - created_at: Date; + created_at: number; /** * ID of the user who blocked another user @@ -3101,7 +3101,7 @@ export interface BookmarkAddedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; bookmark: BookmarkResponse; @@ -3112,7 +3112,7 @@ export interface BookmarkAddedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -3121,7 +3121,7 @@ export interface BookmarkDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; bookmark: BookmarkResponse; @@ -3132,7 +3132,7 @@ export interface BookmarkDeletedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -3141,7 +3141,7 @@ export interface BookmarkFolderDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; bookmark_folder: BookmarkFolderResponse; @@ -3152,7 +3152,7 @@ export interface BookmarkFolderDeletedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -3161,7 +3161,7 @@ export interface BookmarkFolderResponse { /** * When the folder was created */ - created_at: Date; + created_at: number; /** * Unique identifier for the folder @@ -3176,7 +3176,7 @@ export interface BookmarkFolderResponse { /** * When the folder was last updated */ - updated_at: Date; + updated_at: number; /** * User response object @@ -3193,7 +3193,7 @@ export interface BookmarkFolderUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; bookmark_folder: BookmarkFolderResponse; @@ -3204,7 +3204,7 @@ export interface BookmarkFolderUpdatedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -3213,7 +3213,7 @@ export interface BookmarkResponse { /** * When the bookmark was created */ - created_at: Date; + created_at: number; /** * ID of the bookmarked object @@ -3228,7 +3228,7 @@ export interface BookmarkResponse { /** * When the bookmark was last updated */ - updated_at: Date; + updated_at: number; activity: ActivityResponse; @@ -3253,7 +3253,7 @@ export interface BookmarkUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; bookmark: BookmarkResponse; @@ -3264,7 +3264,7 @@ export interface BookmarkUpdatedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -3552,7 +3552,7 @@ export interface BypassResponse { export interface CallAcceptedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Represents a call @@ -3587,7 +3587,7 @@ export interface CallActionOptions { } export interface CallClosedCaption { - end_time: Date; + end_time: number; id: string; @@ -3595,7 +3595,7 @@ export interface CallClosedCaption { speaker_id: string; - start_time: Date; + start_time: number; text: string; @@ -3612,7 +3612,7 @@ export interface CallClosedCaption { export interface CallClosedCaptionsFailedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The type of event: "call.closed_captions_failed" in this case @@ -3623,7 +3623,7 @@ export interface CallClosedCaptionsFailedEvent { export interface CallClosedCaptionsStartedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The type of event: "call.closed_captions_started" in this case @@ -3634,7 +3634,7 @@ export interface CallClosedCaptionsStartedEvent { export interface CallClosedCaptionsStoppedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The type of event: "call.transcription_stopped" in this case @@ -3645,7 +3645,7 @@ export interface CallClosedCaptionsStoppedEvent { export interface CallCreatedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * the members added to this call @@ -3672,7 +3672,7 @@ export interface CallCustomPropertyParameters { export interface CallDTMFEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The DTMF digit (0-9, *, #, A-D) @@ -3692,7 +3692,7 @@ export interface CallDTMFEvent { /** * When the digit press ended and was detected */ - timestamp: Date; + timestamp: number; /** * User response object @@ -3708,7 +3708,7 @@ export interface CallDTMFEvent { export interface CallDeletedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Represents a call @@ -3732,7 +3732,7 @@ export interface CallDurationReportResponse { export interface CallEndedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Represents a call @@ -3763,7 +3763,7 @@ export interface CallEndedEvent { export interface CallFrameRecordingFailedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -3784,9 +3784,9 @@ export interface CallFrameRecordingFrameReadyEvent { /** * The time the frame was captured */ - captured_at: Date; + captured_at: number; - created_at: Date; + created_at: number; egress_id: string; @@ -3819,7 +3819,7 @@ export interface CallFrameRecordingFrameReadyEvent { export interface CallFrameRecordingStartedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -3837,7 +3837,7 @@ export interface CallFrameRecordingStartedEvent { export interface CallFrameRecordingStoppedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -3855,7 +3855,7 @@ export interface CallFrameRecordingStoppedEvent { export interface CallHLSBroadcastingFailedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The type of event: "call.hls_broadcasting_failed" in this case @@ -3866,7 +3866,7 @@ export interface CallHLSBroadcastingFailedEvent { export interface CallHLSBroadcastingStartedEvent { call_cid: string; - created_at: Date; + created_at: number; hls_playlist_url: string; @@ -3884,7 +3884,7 @@ export interface CallHLSBroadcastingStartedEvent { export interface CallHLSBroadcastingStoppedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The type of event: "call.hls_broadcasting_stopped" in this case @@ -3916,7 +3916,7 @@ export interface CallLevelEventPayload { export interface CallLiveStartedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Represents a call @@ -3932,7 +3932,7 @@ export interface CallLiveStartedEvent { export interface CallMemberAddedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * the members added to this call @@ -3953,7 +3953,7 @@ export interface CallMemberAddedEvent { export interface CallMemberRemovedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * the list of member IDs removed from the call @@ -3974,7 +3974,7 @@ export interface CallMemberRemovedEvent { export interface CallMemberUpdatedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The list of members that were updated @@ -3995,7 +3995,7 @@ export interface CallMemberUpdatedEvent { export interface CallMemberUpdatedPermissionEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The list of members that were updated @@ -4021,7 +4021,7 @@ export interface CallMemberUpdatedPermissionEvent { export interface CallMissedEvent { call_cid: string; - created_at: Date; + created_at: number; notify_user: boolean; @@ -4054,7 +4054,7 @@ export interface CallMissedEvent { export interface CallModerationBlurEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The user ID whose video stream is being blurred @@ -4075,7 +4075,7 @@ export interface CallModerationBlurEvent { export interface CallModerationWarningEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The warning message @@ -4101,7 +4101,7 @@ export interface CallModerationWarningEvent { export interface CallNotificationEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Call session ID @@ -4138,7 +4138,7 @@ export interface CallParticipantCountReportResponse { } export interface CallParticipantResponse { - joined_at: Date; + joined_at: number; role: string; @@ -4153,7 +4153,7 @@ export interface CallParticipantResponse { export interface CallParticipantTimeline { severity: string; - timestamp: Date; + timestamp: number; type: string; @@ -4163,7 +4163,7 @@ export interface CallParticipantTimeline { export interface CallReactionEvent { call_cid: string; - created_at: Date; + created_at: number; reaction: VideoReactionResponse; @@ -4174,7 +4174,7 @@ export interface CallReactionEvent { } export interface CallRecording { - end_time: Date; + end_time: number; filename: string; @@ -4182,7 +4182,7 @@ export interface CallRecording { session_id: string; - start_time: Date; + start_time: number; url: string; } @@ -4190,7 +4190,7 @@ export interface CallRecording { export interface CallRecordingFailedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -4209,7 +4209,7 @@ export interface CallRecordingFailedEvent { export interface CallRecordingReadyEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -4233,7 +4233,7 @@ export interface CallRecordingReadyEvent { export interface CallRecordingStartedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -4252,7 +4252,7 @@ export interface CallRecordingStartedEvent { export interface CallRecordingStoppedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -4271,7 +4271,7 @@ export interface CallRecordingStoppedEvent { export interface CallRejectedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Represents a call @@ -4297,9 +4297,9 @@ export interface CallRejectedEvent { export interface CallReportResponse { score: number; - ended_at?: Date; + ended_at?: number; - started_at?: Date; + started_at?: number; } export interface CallRequest { @@ -4338,7 +4338,7 @@ export interface CallResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; current_session_id: string; @@ -4361,7 +4361,7 @@ export interface CallResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; blocked_user_ids: Array; @@ -4389,7 +4389,7 @@ export interface CallResponse { /** * Date/time when the call ended */ - ended_at?: Date; + ended_at?: number; join_ahead_time_seconds?: number; @@ -4401,7 +4401,7 @@ export interface CallResponse { /** * Date/time when the call will start */ - starts_at?: Date; + starts_at?: number; team?: string; @@ -4413,7 +4413,7 @@ export interface CallResponse { export interface CallRingEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Call session ID @@ -4452,7 +4452,7 @@ export interface CallRtmpBroadcastFailedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Name of the given RTMP broadcast @@ -4474,7 +4474,7 @@ export interface CallRtmpBroadcastStartedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Name of the given RTMP broadcast @@ -4496,7 +4496,7 @@ export interface CallRtmpBroadcastStoppedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Name of the given RTMP broadcast @@ -4520,7 +4520,7 @@ export interface CallRuleActionSequence { export interface CallSessionEndedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Call session ID @@ -4543,7 +4543,7 @@ export interface CallSessionParticipantCountsUpdatedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Call session ID @@ -4561,7 +4561,7 @@ export interface CallSessionParticipantCountsUpdatedEvent { export interface CallSessionParticipantJoinedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Call session ID @@ -4579,7 +4579,7 @@ export interface CallSessionParticipantJoinedEvent { export interface CallSessionParticipantLeftEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The duration participant was in the session in seconds @@ -4611,29 +4611,29 @@ export interface CallSessionResponse { participants: Array; - accepted_by: Record; + accepted_by: Record; - missed_by: Record; + missed_by: Record; participants_count_by_role: Record; - rejected_by: Record; + rejected_by: Record; - ended_at?: Date; + ended_at?: number; - live_ended_at?: Date; + live_ended_at?: number; - live_started_at?: Date; + live_started_at?: number; - started_at?: Date; + started_at?: number; - timer_ends_at?: Date; + timer_ends_at?: number; } export interface CallSessionStartedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Call session ID @@ -4853,7 +4853,7 @@ export interface CallStatsParticipant { sessions: Array; - latest_activity_at?: Date; + latest_activity_at?: number; name?: string; @@ -4911,7 +4911,7 @@ export interface CallStatsParticipantSession { distance_to_sfu_kilometers?: number; - ended_at?: Date; + ended_at?: number; freezes_duration_ms?: number; @@ -4929,7 +4929,7 @@ export interface CallStatsParticipantSession { sdk_version?: string; - started_at?: Date; + started_at?: number; unified_session_id?: string; @@ -4941,7 +4941,7 @@ export interface CallStatsParticipantSession { export interface CallStatsReportReadyEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Call session ID @@ -4975,9 +4975,9 @@ export interface CallStatsReportSummaryResponse { call_status: string; - first_stats_time: Date; + first_stats_time: number; - created_at?: Date; + created_at?: number; min_user_rating?: number; @@ -4991,23 +4991,23 @@ export interface CallStatsSessionResponse { call_type: string; - generated_at: Date; + generated_at: number; counts: CallStatsParticipantCounts; - call_ended_at?: Date; + call_ended_at?: number; - call_started_at?: Date; + call_started_at?: number; } export interface CallTranscription { - end_time: Date; + end_time: number; filename: string; session_id: string; - start_time: Date; + start_time: number; url: string; } @@ -5015,7 +5015,7 @@ export interface CallTranscription { export interface CallTranscriptionFailedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -5033,7 +5033,7 @@ export interface CallTranscriptionFailedEvent { export interface CallTranscriptionReadyEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -5051,7 +5051,7 @@ export interface CallTranscriptionReadyEvent { export interface CallTranscriptionStartedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -5064,7 +5064,7 @@ export interface CallTranscriptionStartedEvent { export interface CallTranscriptionStoppedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -5077,7 +5077,7 @@ export interface CallTranscriptionStoppedEvent { export interface CallType { app: number; - created_at: Date; + created_at: number; id: number; @@ -5085,7 +5085,7 @@ export interface CallType { recording_external_storage: string; - updated_at: Date; + updated_at: number; notification_settings?: NotificationSettings; @@ -5096,7 +5096,7 @@ export interface CallTypeResponse { /** * the time the call type was created */ - created_at: Date; + created_at: number; /** * the name of the call type @@ -5106,7 +5106,7 @@ export interface CallTypeResponse { /** * the time the call type was last updated */ - updated_at: Date; + updated_at: number; /** * the permissions granted to each role @@ -5130,7 +5130,7 @@ export interface CallTypeRuleParameters { export interface CallUpdatedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Represents a call @@ -5151,7 +5151,7 @@ export interface CallUpdatedEvent { export interface CallUserFeedbackSubmittedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The rating given by the user (1-5) @@ -5191,7 +5191,7 @@ export interface CallUserFeedbackSubmittedEvent { export interface CallUserMutedEvent { call_cid: string; - created_at: Date; + created_at: number; from_user_id: string; @@ -5242,13 +5242,13 @@ export interface CampaignChannelTemplate { } export interface CampaignCompletedEvent { - created_at: Date; + created_at: number; custom: Record; type: string; - received_at?: Date; + received_at?: number; campaign?: CampaignResponse; } @@ -5268,7 +5268,7 @@ export interface CampaignMessageTemplate { export interface CampaignResponse { create_channels: boolean; - created_at: Date; + created_at: number; description: string; @@ -5290,7 +5290,7 @@ export interface CampaignResponse { status: string; - updated_at: Date; + updated_at: number; segment_ids: Array; @@ -5302,9 +5302,9 @@ export interface CampaignResponse { stats: CampaignStatsResponse; - scheduled_for?: Date; + scheduled_for?: number; - stop_at?: Date; + stop_at?: number; channel_template?: CampaignChannelTemplate; @@ -5317,13 +5317,13 @@ export interface CampaignResponse { } export interface CampaignStartedEvent { - created_at: Date; + created_at: number; custom: Record; type: string; - received_at?: Date; + received_at?: number; campaign?: CampaignResponse; } @@ -5333,11 +5333,11 @@ export interface CampaignStatsResponse { stats_channels_created: number; - stats_completed_at: Date; + stats_completed_at: number; stats_messages_sent: number; - stats_started_at: Date; + stats_started_at: number; stats_users_read: number; @@ -5385,11 +5385,11 @@ export interface ChangeFeedVisibilityResponse { } export interface ChannelBatchCompletedEvent { - batch_created_at: Date; + batch_created_at: number; - created_at: Date; + created_at: number; - finished_at: Date; + finished_at: number; operation: string; @@ -5405,7 +5405,7 @@ export interface ChannelBatchCompletedEvent { type: string; - received_at?: Date; + received_at?: number; } export interface ChannelBatchMemberRequest { @@ -5415,11 +5415,11 @@ export interface ChannelBatchMemberRequest { } export interface ChannelBatchStartedEvent { - batch_created_at: Date; + batch_created_at: number; - created_at: Date; + created_at: number; - finished_at: Date; + finished_at: number; operation: string; @@ -5435,7 +5435,7 @@ export interface ChannelBatchStartedEvent { type: string; - received_at?: Date; + received_at?: number; } export interface ChannelBatchUpdateRequest { @@ -5507,7 +5507,7 @@ export interface ChannelConfig { count_messages: boolean; - created_at: Date; + created_at: number; custom_events: boolean; @@ -5545,7 +5545,7 @@ export interface ChannelConfig { typing_events: boolean; - updated_at: Date; + updated_at: number; uploads: boolean; @@ -5660,7 +5660,7 @@ export interface ChannelConfigWithInfo { count_messages: boolean; - created_at: Date; + created_at: number; custom_events: boolean; @@ -5698,7 +5698,7 @@ export interface ChannelConfigWithInfo { typing_events: boolean; - updated_at: Date; + updated_at: number; uploads: boolean; @@ -5758,7 +5758,7 @@ export interface ChannelCreatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -5794,7 +5794,7 @@ export interface ChannelCreatedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -5829,7 +5829,7 @@ export interface ChannelDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -5865,7 +5865,7 @@ export interface ChannelDeletedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -5905,7 +5905,7 @@ export interface ChannelFrozenEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -5929,7 +5929,7 @@ export interface ChannelFrozenEvent { */ cid?: string; - received_at?: Date; + received_at?: number; } export interface ChannelGetOrCreateRequest { @@ -5968,7 +5968,7 @@ export interface ChannelHiddenEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -6004,7 +6004,7 @@ export interface ChannelHiddenEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -6134,7 +6134,7 @@ export interface ChannelMemberResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; notifications_muted: boolean; @@ -6146,38 +6146,38 @@ export interface ChannelMemberResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; custom: Record; - archived_at?: Date; + archived_at?: number; /** * Expiration date of the ban */ - ban_expires?: Date; + ban_expires?: number; /** * Whether the member's ban also applies to channels the channel's creator will create in the future (an active future channel ban by the creator targets this member) */ ban_from_future_channels?: boolean; - deleted_at?: Date; + deleted_at?: number; /** * Expiration date of the future channel ban; absent when the future channel ban is permanent */ - future_channel_ban_expires?: Date; + future_channel_ban_expires?: number; /** * Date when invite was accepted */ - invite_accepted_at?: Date; + invite_accepted_at?: number; /** * Date when invite was rejected */ - invite_rejected_at?: Date; + invite_rejected_at?: number; /** * Whether member was invited or not @@ -6189,7 +6189,7 @@ export interface ChannelMemberResponse { */ is_moderator?: boolean; - pinned_at?: Date; + pinned_at?: number; /** * Permission level of the member in the channel (DEPRECATED: use channel_role instead). One of: member, moderator, admin, owner @@ -6235,7 +6235,7 @@ export interface ChannelMetadata { custom: Record; - last_message_at?: Date; + last_message_at?: number; member_count?: number; @@ -6250,17 +6250,17 @@ export interface ChannelMute { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * Date/time of mute expiration */ - expires?: Date; + expires?: number; /** * Represents channel in chat @@ -6277,7 +6277,7 @@ export interface ChannelMutedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -6286,7 +6286,7 @@ export interface ChannelMutedEvent { */ type: string; - received_at?: Date; + received_at?: number; /** * The mute objects @@ -6349,7 +6349,7 @@ export type ChannelOwnCapability = export interface ChannelPushPreferencesResponse { chat_level?: string; - disabled_until?: Date; + disabled_until?: number; chat_preferences?: ChatPreferencesResponse; } @@ -6363,7 +6363,7 @@ export interface ChannelResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; disabled: boolean; @@ -6385,7 +6385,7 @@ export interface ChannelResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * Custom data for this object @@ -6415,7 +6415,7 @@ export interface ChannelResponse { /** * Date/time of deletion */ - deleted_at?: Date; + deleted_at?: number; /** * Whether this channel is hidden by current user or not @@ -6425,12 +6425,12 @@ export interface ChannelResponse { /** * Date since when the message history is accessible */ - hide_messages_before?: Date; + hide_messages_before?: number; /** * Date of the last message sent */ - last_message_at?: Date; + last_message_at?: number; /** * Number of members in the channel @@ -6445,7 +6445,7 @@ export interface ChannelResponse { /** * Date of mute expiration */ - mute_expires_at?: Date; + mute_expires_at?: number; /** * Whether this channel is muted or not @@ -6460,7 +6460,7 @@ export interface ChannelResponse { /** * Date of the latest truncation of the channel */ - truncated_at?: Date; + truncated_at?: number; /** * List of filter tags associated with the channel @@ -6503,7 +6503,7 @@ export interface ChannelStateResponse { hidden?: boolean; - hide_messages_before?: Date; + hide_messages_before?: number; watcher_count?: number; @@ -6553,7 +6553,7 @@ export interface ChannelStateResponseFields { /** * Messages before this date are hidden from the user */ - hide_messages_before?: Date; + hide_messages_before?: number; /** * Number of channel watchers @@ -6596,7 +6596,7 @@ export interface ChannelTruncatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -6634,7 +6634,7 @@ export interface ChannelTruncatedEvent { message_id?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -6660,7 +6660,7 @@ export interface ChannelTypeConfig { count_messages: boolean; - created_at: Date; + created_at: number; custom_events: boolean; @@ -6698,7 +6698,7 @@ export interface ChannelTypeConfig { typing_events: boolean; - updated_at: Date; + updated_at: number; uploads: boolean; @@ -6738,7 +6738,7 @@ export interface ChannelUnFrozenEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -6762,14 +6762,14 @@ export interface ChannelUnFrozenEvent { */ cid?: string; - received_at?: Date; + received_at?: number; } export interface ChannelUnmutedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -6778,7 +6778,7 @@ export interface ChannelUnmutedEvent { */ type: string; - received_at?: Date; + received_at?: number; /** * The mute objects @@ -6794,7 +6794,7 @@ export interface ChannelUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -6832,7 +6832,7 @@ export interface ChannelUpdatedEvent { message_id?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -6853,7 +6853,7 @@ export interface ChannelVisibleEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -6889,7 +6889,7 @@ export interface ChannelVisibleEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -6936,7 +6936,7 @@ export interface ChatDraftPayloadResponse { export interface ChatDraftResponse { channel_cid: string; - created_at: Date; + created_at: number; message: ChatDraftPayloadResponse; @@ -6950,7 +6950,7 @@ export interface ChatDraftResponse { export interface ChatMessageResponse { cid: string; - created_at: Date; + created_at: number; deleted_reply_count: number; @@ -6974,7 +6974,7 @@ export interface ChatMessageResponse { type: string; - updated_at: Date; + updated_at: number; attachments: Array; @@ -6999,19 +6999,19 @@ export interface ChatMessageResponse { command?: string; - deleted_at?: Date; + deleted_at?: number; deleted_for_me?: boolean; - message_text_updated_at?: Date; + message_text_updated_at?: number; mml?: string; parent_id?: string; - pin_expires?: Date; + pin_expires?: number; - pinned_at?: Date; + pinned_at?: number; poll_id?: string; @@ -7124,9 +7124,9 @@ export interface ChatPreferencesResponse { export interface ChatReactionGroupResponse { count: number; - first_reaction_at: Date; + first_reaction_at: number; - last_reaction_at: Date; + last_reaction_at: number; sum_scores: number; @@ -7134,7 +7134,7 @@ export interface ChatReactionGroupResponse { } export interface ChatReactionGroupUserResponse { - created_at: Date; + created_at: number; user_id: string; @@ -7145,7 +7145,7 @@ export interface ChatReactionGroupUserResponse { } export interface ChatReactionResponse { - created_at: Date; + created_at: number; message_id: string; @@ -7153,7 +7153,7 @@ export interface ChatReactionResponse { type: string; - updated_at: Date; + updated_at: number; user_id: string; @@ -7168,15 +7168,15 @@ export interface ChatReactionResponse { export interface ChatReminderResponseData { channel_cid: string; - created_at: Date; + created_at: number; message_id: string; - updated_at: Date; + updated_at: number; user_id: string; - remind_at?: Date; + remind_at?: number; message?: ChatMessageResponse; @@ -7189,7 +7189,7 @@ export interface ChatReminderResponseData { export interface ChatSharedLocationResponseData { channel_cid: string; - created_at: Date; + created_at: number; created_by_device_id: string; @@ -7199,11 +7199,11 @@ export interface ChatSharedLocationResponseData { message_id: string; - updated_at: Date; + updated_at: number; user_id: string; - end_at?: Date; + end_at?: number; message?: ChatMessageResponse; } @@ -7641,7 +7641,7 @@ export interface ClientOSDataResponse { export interface ClosedCaptionEvent { call_cid: string; - created_at: Date; + created_at: number; /** * CallClosedCaption represents a closed caption of a call. @@ -7723,12 +7723,12 @@ export interface CollectionResponse { /** * When the collection was created */ - created_at?: Date; + created_at?: number; /** * When the collection was last updated */ - updated_at?: Date; + updated_at?: number; /** * ID of the user who owns this collection @@ -7765,19 +7765,19 @@ export interface Command { /** * Date/time of creation */ - created_at?: Date; + created_at?: number; /** * Date/time of the last update */ - updated_at?: Date; + updated_at?: number; } export interface CommentAddedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -7794,7 +7794,7 @@ export interface CommentAddedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -7803,7 +7803,7 @@ export interface CommentDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -7818,7 +7818,7 @@ export interface CommentDeletedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -7827,7 +7827,7 @@ export interface CommentReactionAddedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -7846,7 +7846,7 @@ export interface CommentReactionAddedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -7855,7 +7855,7 @@ export interface CommentReactionDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -7872,14 +7872,14 @@ export interface CommentReactionDeletedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; } export interface CommentReactionUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -7898,7 +7898,7 @@ export interface CommentReactionUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -7914,7 +7914,7 @@ export interface CommentResponse { /** * When the comment was created */ - created_at: Date; + created_at: number; /** * Number of downvotes for this comment @@ -7960,7 +7960,7 @@ export interface CommentResponse { /** * When the comment was last updated */ - updated_at: Date; + updated_at: number; /** * Number of upvotes for this comment @@ -7990,12 +7990,12 @@ export interface CommentResponse { /** * When the comment was deleted */ - deleted_at?: Date; + deleted_at?: number; /** * When the comment was last edited */ - edited_at?: Date; + edited_at?: number; /** * ID of parent comment for nested replies @@ -8036,7 +8036,7 @@ export interface CommentRestoredEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -8051,7 +8051,7 @@ export interface CommentRestoredEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -8060,7 +8060,7 @@ export interface CommentUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -8075,7 +8075,7 @@ export interface CommentUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -8184,7 +8184,7 @@ export interface ConfigResponse { /** * When the configuration was created */ - created_at: Date; + created_at: number; /** * Unique identifier for the moderation configuration @@ -8199,7 +8199,7 @@ export interface ConfigResponse { /** * When the configuration was last updated */ - updated_at: Date; + updated_at: number; supported_video_call_harm_types: Array; @@ -8280,7 +8280,7 @@ export interface CoordinatesResponse { export interface CountByMinuteResponse { count: number; - start_ts: Date; + start_ts: number; } export interface Coverage { @@ -8366,7 +8366,7 @@ export interface CreateCallTypeResponse { /** * the time the call type was created */ - created_at: Date; + created_at: number; duration: string; @@ -8378,7 +8378,7 @@ export interface CreateCallTypeResponse { /** * the time the call type was last updated */ - updated_at: Date; + updated_at: number; /** * the permissions granted to each role @@ -8639,7 +8639,7 @@ export interface CreateChannelTypeResponse { count_messages: boolean; - created_at: Date; + created_at: number; custom_events: boolean; @@ -8679,7 +8679,7 @@ export interface CreateChannelTypeResponse { typing_events: boolean; - updated_at: Date; + updated_at: number; uploads: boolean; @@ -9025,7 +9025,7 @@ export interface CreateImportV2TaskRequest { export interface CreateImportV2TaskResponse { app_pk: number; - created_at: Date; + created_at: number; /** * Duration of the request in milliseconds @@ -9038,7 +9038,7 @@ export interface CreateImportV2TaskResponse { state: number; - updated_at: Date; + updated_at: number; settings: ImportV2TaskSettings; } @@ -9503,19 +9503,19 @@ export interface CustomCheckResponse { } export interface CustomEvent { - created_at: Date; + created_at: number; custom: Record; type: string; - received_at?: Date; + received_at?: number; } export interface CustomVideoEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Custom data for this object @@ -10345,7 +10345,7 @@ export interface DeviceResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Device ID @@ -10452,7 +10452,7 @@ export interface DraftPayloadResponse { export interface DraftResponse { channel_cid: string; - created_at: Date; + created_at: number; /** * Contains the draft message content @@ -10525,7 +10525,7 @@ export interface EgressHLSResponse { export interface EgressRTMPResponse { name: string; - started_at: Date; + started_at: number; stream_key?: string; @@ -10651,12 +10651,12 @@ export interface EnrichedCollectionResponse { /** * When the collection was created */ - created_at?: Date; + created_at?: number; /** * When the collection was last updated */ - updated_at?: Date; + updated_at?: number; /** * ID of the user who owns this collection @@ -10807,7 +10807,7 @@ export interface EntityCreatorResponse { banned: boolean; - created_at: Date; + created_at: number; /** * Number of major actions performed on the user @@ -10831,7 +10831,7 @@ export interface EntityCreatorResponse { shadow_banned: boolean; - updated_at: Date; + updated_at: number; blocked_user_ids: Array; @@ -10841,21 +10841,21 @@ export interface EntityCreatorResponse { avg_response_time?: number; - ban_expires?: Date; + ban_expires?: number; bypass_moderation?: boolean; - deactivated_at?: Date; + deactivated_at?: number; - deleted_at?: Date; + deleted_at?: number; image?: string; - last_active?: Date; + last_active?: number; name?: string; - revoke_tokens_issued_before?: Date; + revoke_tokens_issued_before?: number; devices?: Array; @@ -11130,7 +11130,7 @@ export interface FeedCreatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11149,14 +11149,14 @@ export interface FeedCreatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; } export interface FeedDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11169,7 +11169,7 @@ export interface FeedDeletedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -11179,7 +11179,7 @@ export interface FeedGroup { app_pk: number; - created_at: Date; + created_at: number; default_follower_role: string; @@ -11187,7 +11187,7 @@ export interface FeedGroup { group_id: string; - updated_at: Date; + updated_at: number; activity_processors: Array; @@ -11195,9 +11195,9 @@ export interface FeedGroup { custom: Record; - deleted_at?: Date; + deleted_at?: number; - last_feed_get_at?: Date; + last_feed_get_at?: number; activity_filter?: ActivityFilterConfig; @@ -11216,7 +11216,7 @@ export interface FeedGroupChangedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11229,7 +11229,7 @@ export interface FeedGroupChangedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; feed_group?: FeedGroup; @@ -11240,7 +11240,7 @@ export interface FeedGroupDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11258,14 +11258,14 @@ export interface FeedGroupDeletedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; } export interface FeedGroupResponse { /** * When the feed group was created */ - created_at: Date; + created_at: number; /** * Identifier within the group @@ -11275,7 +11275,7 @@ export interface FeedGroupResponse { /** * When the feed group was last updated */ - updated_at: Date; + updated_at: number; /** * Role new followers of feeds in this group are given. Either a built-in (feed_follower, feed_member_viewer) or any role your app has defined. Empty means feed_follower. Applied when the follow is accepted, so a follow that starts pending picks it up on approval @@ -11289,7 +11289,7 @@ export interface FeedGroupResponse { default_visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private'; - deleted_at?: Date; + deleted_at?: number; /** * Configuration for activity processors @@ -11327,7 +11327,7 @@ export interface FeedGroupRestoredEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11345,7 +11345,7 @@ export interface FeedGroupRestoredEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; } export interface FeedGroupScope { @@ -11380,7 +11380,7 @@ export interface FeedMemberAddedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11395,7 +11395,7 @@ export interface FeedMemberAddedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -11404,7 +11404,7 @@ export interface FeedMemberRemovedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11419,7 +11419,7 @@ export interface FeedMemberRemovedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -11455,7 +11455,7 @@ export interface FeedMemberResponse { /** * When the membership was created */ - created_at: Date; + created_at: number; /** * Role of the member in the feed @@ -11471,7 +11471,7 @@ export interface FeedMemberResponse { /** * When the membership was last updated */ - updated_at: Date; + updated_at: number; /** * User response object @@ -11481,12 +11481,12 @@ export interface FeedMemberResponse { /** * When the invite was accepted */ - invite_accepted_at?: Date; + invite_accepted_at?: number; /** * When the invite was rejected */ - invite_rejected_at?: Date; + invite_rejected_at?: number; /** * Custom data for the membership @@ -11500,7 +11500,7 @@ export interface FeedMemberUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11515,7 +11515,7 @@ export interface FeedMemberUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -11630,7 +11630,7 @@ export interface FeedResponse { /** * When the feed was created */ - created_at: Date; + created_at: number; /** * Description of the feed @@ -11680,7 +11680,7 @@ export interface FeedResponse { /** * When the feed was last updated */ - updated_at: Date; + updated_at: number; /** * User response object @@ -11690,7 +11690,7 @@ export interface FeedResponse { /** * When the feed was deleted */ - deleted_at?: Date; + deleted_at?: number; /** * Visibility setting for the feed @@ -11734,7 +11734,7 @@ export interface FeedSuggestionResponse { /** * When the feed was created */ - created_at: Date; + created_at: number; /** * Description of the feed @@ -11784,7 +11784,7 @@ export interface FeedSuggestionResponse { /** * When the feed was last updated */ - updated_at: Date; + updated_at: number; /** * User response object @@ -11794,7 +11794,7 @@ export interface FeedSuggestionResponse { /** * When the feed was deleted */ - deleted_at?: Date; + deleted_at?: number; reason?: string; @@ -11839,7 +11839,7 @@ export interface FeedSuggestionResponse { } export interface FeedUpdatedEvent { - created_at: Date; + created_at: number; fid: string; @@ -11854,7 +11854,7 @@ export interface FeedUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -11868,7 +11868,7 @@ export interface FeedViewResponse { /** * When the feed view was last used */ - last_used_at?: Date; + last_used_at?: number; /** * Configured activity selectors @@ -11904,13 +11904,13 @@ export interface FeedsActivityLocation { } export interface FeedsBookmarkResponse { - created_at: Date; + created_at: number; object_id: string; object_type: string; - updated_at: Date; + updated_at: number; /** * User response object @@ -11923,7 +11923,7 @@ export interface FeedsBookmarkResponse { } export interface FeedsEnrichedCollectionResponse { - created_at: Date; + created_at: number; id: string; @@ -11931,7 +11931,7 @@ export interface FeedsEnrichedCollectionResponse { status: string; - updated_at: Date; + updated_at: number; user_id: string; @@ -11941,7 +11941,7 @@ export interface FeedsEnrichedCollectionResponse { export interface FeedsFeedResponse { activity_count: number; - created_at: Date; + created_at: number; description: string; @@ -11961,14 +11961,14 @@ export interface FeedsFeedResponse { pin_count: number; - updated_at: Date; + updated_at: number; /** * User response object */ created_by: UserResponse; - deleted_at?: Date; + deleted_at?: number; visibility?: string; @@ -12119,19 +12119,19 @@ export interface FeedsPreferencesResponse { export interface FeedsReactionGroupResponse { count: number; - first_reaction_at: Date; + first_reaction_at: number; - last_reaction_at: Date; + last_reaction_at: number; } export interface FeedsReactionResponse { activity_id: string; - created_at: Date; + created_at: number; type: string; - updated_at: Date; + updated_at: number; /** * User response object @@ -12146,7 +12146,7 @@ export interface FeedsReactionResponse { export interface FeedsShareResponse { activity_id: string; - created_at: Date; + created_at: number; /** * User response object @@ -12159,7 +12159,7 @@ export interface FeedsV3ActivityResponse { comment_count: number; - created_at: Date; + created_at: number; hidden: boolean; @@ -12179,7 +12179,7 @@ export interface FeedsV3ActivityResponse { type: string; - updated_at: Date; + updated_at: number; visibility: string; @@ -12214,11 +12214,11 @@ export interface FeedsV3ActivityResponse { */ user: UserResponse; - deleted_at?: Date; + deleted_at?: number; - edited_at?: Date; + edited_at?: number; - expires_at?: Date; + expires_at?: number; friend_reaction_count?: number; @@ -12264,7 +12264,7 @@ export interface FeedsV3CommentResponse { confidence_score: number; - created_at: Date; + created_at: number; downvote_count: number; @@ -12282,7 +12282,7 @@ export interface FeedsV3CommentResponse { status: string; - updated_at: Date; + updated_at: number; upvote_count: number; @@ -12297,9 +12297,9 @@ export interface FeedsV3CommentResponse { controversy_score?: number; - deleted_at?: Date; + deleted_at?: number; - edited_at?: Date; + edited_at?: number; parent_id?: string; @@ -12443,7 +12443,7 @@ export interface FlagDetailsResponse { } export interface FlagFeedbackResponse { - created_at: Date; + created_at: number; message_id: string; @@ -12506,19 +12506,19 @@ export interface FlagRequest { } export interface FlagResponse { - created_at: Date; + created_at: number; created_by_automod: boolean; - updated_at: Date; + updated_at: number; - approved_at?: Date; + approved_at?: number; reason?: string; - rejected_at?: Date; + rejected_at?: number; - reviewed_at?: Date; + reviewed_at?: number; reviewed_by?: string; @@ -12545,13 +12545,13 @@ export interface FlagResponse { } export interface FlagUpdatedEvent { - created_at: Date; + created_at: number; custom: Record; type: string; - received_at?: Date; + received_at?: number; /** * User response object @@ -12660,7 +12660,7 @@ export interface FollowCreatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -12675,14 +12675,14 @@ export interface FollowCreatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; } export interface FollowDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -12697,7 +12697,7 @@ export interface FollowDeletedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; } export interface FollowRequest { @@ -12764,7 +12764,7 @@ export interface FollowResponse { /** * When the follow relationship was created */ - created_at: Date; + created_at: number; /** * Role of the follower (source user) in the follow relationship, as stored. A reserved name, or a role your app no longer defines, is reported as stored but evaluated as 'feed_follower'. @@ -12786,7 +12786,7 @@ export interface FollowResponse { /** * When the follow relationship was last updated */ - updated_at: Date; + updated_at: number; source_feed: FeedResponse; @@ -12795,12 +12795,12 @@ export interface FollowResponse { /** * When the follow request was accepted */ - request_accepted_at?: Date; + request_accepted_at?: number; /** * When the follow request was rejected */ - request_rejected_at?: Date; + request_rejected_at?: number; /** * Custom data for the follow relationship @@ -12812,7 +12812,7 @@ export interface FollowUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -12827,7 +12827,7 @@ export interface FollowUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; } export interface FrameRecordSettings { @@ -12879,7 +12879,7 @@ export interface FriendReactionsOptions { export interface FullUserResponse { banned: boolean; - created_at: Date; + created_at: number; id: string; @@ -12901,7 +12901,7 @@ export interface FullUserResponse { unread_threads: number; - updated_at: Date; + updated_at: number; blocked_user_ids: Array; @@ -12917,21 +12917,21 @@ export interface FullUserResponse { avg_response_time?: number; - ban_expires?: Date; + ban_expires?: number; bypass_moderation?: boolean; - deactivated_at?: Date; + deactivated_at?: number; - deleted_at?: Date; + deleted_at?: number; image?: string; - last_active?: Date; + last_active?: number; name?: string; - revoke_tokens_issued_before?: Date; + revoke_tokens_issued_before?: number; latest_hidden_channels?: Array; @@ -12941,9 +12941,9 @@ export interface FullUserResponse { } export interface FutureChannelBanResponse { - created_at: Date; + created_at: number; - expires?: Date; + expires?: number; reason?: string; @@ -12997,12 +12997,12 @@ export interface GetActiveCallsStatusResponse { /** * End time of the status period */ - end_time: Date; + end_time: number; /** * Start time of the status period */ - start_time: Date; + start_time: number; metrics?: ActiveCallsMetrics; @@ -13061,7 +13061,7 @@ export interface GetCallParticipantSessionMetricsResponse { is_subscriber?: boolean; - joined_at?: Date; + joined_at?: number; publisher_type?: string; @@ -13132,13 +13132,13 @@ export interface GetCallSessionParticipantStatsDetailsResponse { } export interface GetCallTypeResponse { - created_at: Date; + created_at: number; duration: string; name: string; - updated_at: Date; + updated_at: number; grants: Record>; @@ -13169,7 +13169,7 @@ export interface GetChannelTypeResponse { count_messages: boolean; - created_at: Date; + created_at: number; custom_events: boolean; @@ -13212,7 +13212,7 @@ export interface GetChannelTypeResponse { typing_events: boolean; - updated_at: Date; + updated_at: number; uploads: boolean; @@ -13259,9 +13259,9 @@ export interface GetCommandResponse { set: string; - created_at?: Date; + created_at?: number; - updated_at?: Date; + updated_at?: number; } export interface GetCommentRepliesResponse { @@ -13385,7 +13385,7 @@ export interface GetExternalStorageGCSResponse { } export interface GetExternalStorageResponse { - created_at: Date; + created_at: number; /** * Duration of the request in milliseconds @@ -13394,7 +13394,7 @@ export interface GetExternalStorageResponse { type: string; - updated_at: Date; + updated_at: number; aws_s3?: GetExternalStorageAWSS3Response; @@ -13521,7 +13521,7 @@ export interface GetImportResponse { export interface GetImportV2TaskResponse { app_pk: number; - created_at: Date; + created_at: number; /** * Duration of the request in milliseconds @@ -13534,7 +13534,7 @@ export interface GetImportV2TaskResponse { state: number; - updated_at: Date; + updated_at: number; settings: ImportV2TaskSettings; @@ -14050,7 +14050,7 @@ export interface GetSetupSessionResponse { } export interface GetTaskResponse { - created_at: Date; + created_at: number; duration: string; @@ -14064,7 +14064,7 @@ export interface GetTaskResponse { */ task_id: string; - updated_at: Date; + updated_at: number; error?: ErrorResult; @@ -14413,7 +14413,7 @@ export interface ImportBlockListResponse { } export interface ImportTask { - created_at: Date; + created_at: number; id: string; @@ -14423,7 +14423,7 @@ export interface ImportTask { state: string; - updated_at: Date; + updated_at: number; history: Array; @@ -14431,7 +14431,7 @@ export interface ImportTask { } export interface ImportTaskHistory { - created_at: Date; + created_at: number; next_state: string; @@ -14441,7 +14441,7 @@ export interface ImportTaskHistory { export interface ImportV2TaskItem { app_pk: number; - created_at: Date; + created_at: number; id: string; @@ -14449,7 +14449,7 @@ export interface ImportV2TaskItem { state: number; - updated_at: Date; + updated_at: number; settings: ImportV2TaskSettings; @@ -14544,7 +14544,7 @@ export interface IngressAudioEncodingResponse { export interface IngressErrorEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Human-readable error message @@ -14623,7 +14623,7 @@ export interface IngressSourceResponse { export interface IngressStartedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Unique identifier for this stream @@ -14664,7 +14664,7 @@ export interface IngressStartedEvent { export interface IngressStoppedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Unique identifier for the stream @@ -14874,7 +14874,7 @@ export interface KickUserResponse { export interface KickedUserEvent { call_cid: string; - created_at: Date; + created_at: number; /** * User response object @@ -14945,7 +14945,7 @@ export interface LabelResultResponse { /** * Timestamp */ - created_at: Date; + created_at: number; /** * High-level harm category @@ -15490,11 +15490,11 @@ export interface MarkReadResponseEvent { cid: string; - created_at: Date; + created_at: number; type: string; - channel_last_message_at?: Date; + channel_last_message_at?: number; last_read_message_id?: string; @@ -15560,7 +15560,7 @@ export interface MatchedContent { /** * `content_published_at` from the contributing `/analyze` request, or server receive time when that field was omitted. */ - published_at: Date; + published_at: number; /** * Content type that contributed this entry: `image` or `text`. @@ -15591,20 +15591,20 @@ export interface MatchedContent { } export interface MaxStreakChangedEvent { - created_at: Date; + created_at: number; custom: Record; type: string; - received_at?: Date; + received_at?: number; } export interface MemberAddedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -15645,7 +15645,7 @@ export interface MemberAddedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -15661,7 +15661,7 @@ export interface MemberRemovedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -15702,7 +15702,7 @@ export interface MemberRemovedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -15729,12 +15729,12 @@ export interface MemberResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; user_id: string; @@ -15751,7 +15751,7 @@ export interface MemberResponse { /** * Date/time of deletion */ - deleted_at?: Date; + deleted_at?: number; role?: string; } @@ -15760,7 +15760,7 @@ export interface MemberUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -15801,7 +15801,7 @@ export interface MemberUpdatedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -15851,7 +15851,7 @@ export interface MembershipLevelResponse { /** * When the membership level was created */ - created_at: Date; + created_at: number; /** * Unique identifier for the membership level @@ -15871,7 +15871,7 @@ export interface MembershipLevelResponse { /** * When the membership level was last updated */ - updated_at: Date; + updated_at: number; /** * Activity tags this membership level gives access to @@ -15939,7 +15939,7 @@ export interface MessageDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Whether the message was hard deleted @@ -15990,7 +15990,7 @@ export interface MessageDeletedEvent { */ deleted_for_me?: boolean; - received_at?: Date; + received_at?: number; /** * The team ID @@ -16003,19 +16003,19 @@ export interface MessageDeletedEvent { } export interface MessageFlagResponse { - created_at: Date; + created_at: number; created_by_automod: boolean; - updated_at: Date; + updated_at: number; - approved_at?: Date; + approved_at?: number; reason?: string; - rejected_at?: Date; + rejected_at?: number; - reviewed_at?: Date; + reviewed_at?: number; custom?: Record; @@ -16048,7 +16048,7 @@ export interface MessageFlaggedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; message_id: string; @@ -16092,7 +16092,7 @@ export interface MessageFlaggedEvent { */ reason?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -16126,7 +16126,7 @@ export interface MessageHistoryEntryResponse { message_id: string; - message_updated_at: Date; + message_updated_at: number; message_updated_by_id: string; @@ -16146,7 +16146,7 @@ export interface MessageModerationResult { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * ID of the message @@ -16156,7 +16156,7 @@ export interface MessageModerationResult { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * Whether user has bad karma @@ -16195,7 +16195,7 @@ export interface MessageNewEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; message_id: string; @@ -16246,7 +16246,7 @@ export interface MessageNewEvent { */ parent_author?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -16346,7 +16346,7 @@ export interface MessageReadEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -16385,7 +16385,7 @@ export interface MessageReadEvent { */ last_read_message_id?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -16515,7 +16515,7 @@ export interface MessageResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; deleted_reply_count: number; @@ -16572,7 +16572,7 @@ export interface MessageResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * Array of message attachments @@ -16624,11 +16624,11 @@ export interface MessageResponse { /** * Date/time of deletion */ - deleted_at?: Date; + deleted_at?: number; deleted_for_me?: boolean; - message_text_updated_at?: Date; + message_text_updated_at?: number; /** * Should be empty if `text` is provided. Can only be set when using server-side API @@ -16643,12 +16643,12 @@ export interface MessageResponse { /** * Date when pinned message expires */ - pin_expires?: Date; + pin_expires?: number; /** * Date when message got pinned */ - pinned_at?: Date; + pinned_at?: number; /** * Identifier of the poll to include in the message @@ -16730,7 +16730,7 @@ export interface MessageUnblockedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; message_id: string; @@ -16751,7 +16751,7 @@ export interface MessageUnblockedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -16760,7 +16760,7 @@ export interface MessageUndeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; message_id: string; @@ -16801,7 +16801,7 @@ export interface MessageUndeletedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -16821,7 +16821,7 @@ export interface MessageUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; message_id: string; @@ -16862,7 +16862,7 @@ export interface MessageUpdatedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -16885,7 +16885,7 @@ export interface MessageWithChannelResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; deleted_reply_count: number; @@ -16942,7 +16942,7 @@ export interface MessageWithChannelResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * Array of message attachments @@ -16999,11 +16999,11 @@ export interface MessageWithChannelResponse { /** * Date/time of deletion */ - deleted_at?: Date; + deleted_at?: number; deleted_for_me?: boolean; - message_text_updated_at?: Date; + message_text_updated_at?: number; /** * Should be empty if `text` is provided. Can only be set when using server-side API @@ -17018,12 +17018,12 @@ export interface MessageWithChannelResponse { /** * Date when pinned message expires */ - pin_expires?: Date; + pin_expires?: number; /** * Date when message got pinned */ - pinned_at?: Date; + pinned_at?: number; /** * Identifier of the poll to include in the message @@ -17185,7 +17185,7 @@ export interface ModerationActionConfigResponse { } export interface ModerationAnalysisFailedEvent { - created_at: Date; + created_at: number; type: string; @@ -17209,7 +17209,7 @@ export interface ModerationAnalysisFailedEvent { */ entity_type?: string; - received_at?: Date; + received_at?: number; /** * Echo of the request's `content_ids`, keyed by text/image label. On keyframe and caption streams every request repeats the same entity_type/entity_id/entity_creator_id, so this is what identifies the specific submission that went unscreened. @@ -17233,7 +17233,7 @@ export interface ModerationCallResponse { cid: string; - created_at: Date; + created_at: number; current_session_id: string; @@ -17247,7 +17247,7 @@ export interface ModerationCallResponse { type: string; - updated_at: Date; + updated_at: number; blocked_user_ids: Array; @@ -17255,13 +17255,13 @@ export interface ModerationCallResponse { channel_cid?: string; - ended_at?: Date; + ended_at?: number; join_ahead_time_seconds?: number; routing_number?: string; - starts_at?: Date; + starts_at?: number; team?: string; @@ -17272,7 +17272,7 @@ export interface ModerationCallResponse { } export interface ModerationCheckCompletedEvent { - created_at: Date; + created_at: number; /** * The ID of entity which was moderated @@ -17298,7 +17298,7 @@ export interface ModerationCheckCompletedEvent { type: string; - received_at?: Date; + received_at?: number; } export interface ModerationConfig { @@ -17347,7 +17347,7 @@ export interface ModerationCustomActionEvent { */ action_id: string; - created_at: Date; + created_at: number; custom: Record; @@ -17355,7 +17355,7 @@ export interface ModerationCustomActionEvent { type: string; - received_at?: Date; + received_at?: number; /** * Additional options passed to the custom action @@ -17403,7 +17403,7 @@ export interface ModerationDashboardPreferences { } export interface ModerationFlagResponse { - created_at: Date; + created_at: number; entity_id: string; @@ -17411,13 +17411,13 @@ export interface ModerationFlagResponse { type: string; - updated_at: Date; + updated_at: number; user_id: string; result: Array>; - content_published_at?: Date; + content_published_at?: number; entity_creator_id?: string; @@ -17448,7 +17448,7 @@ export interface ModerationFlaggedEvent { */ content_type: string; - created_at: Date; + created_at: number; /** * The ID of the flagged content @@ -17459,11 +17459,11 @@ export interface ModerationFlaggedEvent { type: string; - received_at?: Date; + received_at?: number; } export interface ModerationImageAnalysisCompleteEvent { - created_at: Date; + created_at: number; type: string; @@ -17487,7 +17487,7 @@ export interface ModerationImageAnalysisCompleteEvent { */ entity_type?: string; - received_at?: Date; + received_at?: number; /** * Review queue row ID for deep-linking into the dashboard. @@ -17511,7 +17511,7 @@ export interface ModerationImageAnalysisCompleteEvent { } export interface ModerationMarkReviewedEvent { - created_at: Date; + created_at: number; custom: Record; @@ -17519,7 +17519,7 @@ export interface ModerationMarkReviewedEvent { type: string; - received_at?: Date; + received_at?: number; /** * Represents any chat message @@ -17629,7 +17629,7 @@ export interface ModerationPayloadResponse { } export interface ModerationQueueResponse { - created_at: Date; + created_at: number; created_by: string; @@ -17643,7 +17643,7 @@ export interface ModerationQueueResponse { type: string; - updated_at: Date; + updated_at: number; sort: Array>; @@ -17671,7 +17671,7 @@ export interface ModerationRuleInfo { } export interface ModerationRuleV2Response { - created_at: Date; + created_at: number; description: string; @@ -17685,7 +17685,7 @@ export interface ModerationRuleV2Response { team: string; - updated_at: Date; + updated_at: number; config_keys: Array; @@ -17703,7 +17703,7 @@ export interface ModerationRuleV2Response { } export interface ModerationRulesTriggeredEvent { - created_at: Date; + created_at: number; /** * The ID of the entity that triggered the rule @@ -17731,7 +17731,7 @@ export interface ModerationRulesTriggeredEvent { type: string; - received_at?: Date; + received_at?: number; /** * The review queue item ID if applicable @@ -17750,7 +17750,7 @@ export interface ModerationRulesTriggeredEvent { } export interface ModerationTextAnalysisCompleteEvent { - created_at: Date; + created_at: number; type: string; @@ -17774,7 +17774,7 @@ export interface ModerationTextAnalysisCompleteEvent { */ entity_type?: string; - received_at?: Date; + received_at?: number; /** * Review queue row ID for deep-linking into the dashboard. @@ -17956,7 +17956,7 @@ export interface NotificationFeedUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The ID of the feed @@ -17972,7 +17972,7 @@ export interface NotificationFeedUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; /** * Aggregated activities for notification feeds @@ -17988,7 +17988,7 @@ export interface NotificationMarkUnreadEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -18027,14 +18027,14 @@ export interface NotificationMarkUnreadEvent { /** * The time when the channel/thread was marked as unread */ - last_read_at?: Date; + last_read_at?: number; /** * The ID of the last read message */ last_read_message_id?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -18156,12 +18156,12 @@ export interface NotificationStatusResponse { /** * When notifications were last read */ - last_read_at?: Date; + last_read_at?: number; /** * When notifications were last seen */ - last_seen_at?: Date; + last_seen_at?: number; /** * Deprecated: use is_read on each activity/group instead. IDs of activities that have been read. Capped at ~101 entries for aggregated feeds. @@ -18219,7 +18219,7 @@ export interface NotificationThreadMessageNewEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; message_id: string; @@ -18271,7 +18271,7 @@ export interface NotificationThreadMessageNewEvent { parent_author?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -18406,7 +18406,7 @@ export type OwnCapability = (typeof OwnCapability)[keyof typeof OwnCapability]; export interface OwnUserResponse { banned: boolean; - created_at: Date; + created_at: number; id: string; @@ -18426,7 +18426,7 @@ export interface OwnUserResponse { unread_threads: number; - updated_at: Date; + updated_at: number; channel_mutes: Array; @@ -18440,17 +18440,17 @@ export interface OwnUserResponse { avg_response_time?: number; - deactivated_at?: Date; + deactivated_at?: number; - deleted_at?: Date; + deleted_at?: number; image?: string; - last_active?: Date; + last_active?: number; name?: string; - revoke_tokens_issued_before?: Date; + revoke_tokens_issued_before?: number; blocked_user_ids?: Array; @@ -18510,7 +18510,7 @@ export interface ParticipantCountByMinuteResponse { min: number; - start_ts: Date; + start_ts: number; } export interface ParticipantCountOverTimeResponse { @@ -18576,11 +18576,11 @@ export interface ParticipantSeriesSubscriptionTrackMetrics { export interface ParticipantSeriesTimeframe { max_points: number; - since: Date; + since: number; step_seconds: number; - until: Date; + until: number; } export interface ParticipantSeriesTrackMetrics { @@ -18624,16 +18624,16 @@ export interface ParticipantSessionDetails { duration_in_seconds?: number; - joined_at?: Date; + joined_at?: number; - left_at?: Date; + left_at?: number; } export interface PendingMessageEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The method used for the pending message @@ -18647,7 +18647,7 @@ export interface PendingMessageEvent { */ type: string; - received_at?: Date; + received_at?: number; /** * Represents channel in chat @@ -18716,7 +18716,7 @@ export interface PerformanceAnalysisResponse { warnings: Array; - last_analyzed?: Date; + last_analyzed?: number; scan_type?: string; } @@ -18813,7 +18813,7 @@ export interface PermissionRequest { export interface PermissionRequestEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The list of permissions requested by the user @@ -18849,7 +18849,7 @@ export interface PinActivityResponse { /** * When the activity was pinned */ - created_at: Date; + created_at: number; duration: string; @@ -18896,7 +18896,7 @@ export interface PlatformDataResponse { export interface Policy { action: number; - created_at: Date; + created_at: number; name: string; @@ -18904,7 +18904,7 @@ export interface Policy { priority: number; - updated_at: Date; + updated_at: number; resources: Array; @@ -18951,7 +18951,7 @@ export interface PolicyTestLabelDrift { } export interface PolicyTestResult { - created_at: Date; + created_at: number; id: number; @@ -18995,7 +18995,7 @@ export interface PolicyTestRow { export interface PolicyTestRun { config_key: string; - created_at: Date; + created_at: number; id: string; @@ -19011,13 +19011,13 @@ export interface PolicyTestRun { triggered_by: string; - completed_at?: Date; + completed_at?: number; - config_updated_at?: Date; + config_updated_at?: number; error_message?: string; - started_at?: Date; + started_at?: number; metrics?: PolicyTestRunMetrics; } @@ -19056,7 +19056,7 @@ export interface PolicyTestSeedSpec { export interface PolicyTestSet { config_key: string; - created_at: Date; + created_at: number; created_by: string; @@ -19068,7 +19068,7 @@ export interface PolicyTestSet { row_count: number; - updated_at: Date; + updated_at: number; team?: string; @@ -19161,7 +19161,7 @@ export interface PollResponseData { answers_count: number; - created_at: Date; + created_at: number; created_by_id: string; @@ -19173,7 +19173,7 @@ export interface PollResponseData { name: string; - updated_at: Date; + updated_at: number; vote_count: number; @@ -19217,7 +19217,7 @@ export interface PollVoteResponse { } export interface PollVoteResponseData { - created_at: Date; + created_at: number; id: string; @@ -19225,7 +19225,7 @@ export interface PollVoteResponseData { poll_id: string; - updated_at: Date; + updated_at: number; answer_text?: string; @@ -19282,13 +19282,13 @@ export interface PoorTail { } export interface PredefinedFilterResponse { - created_at: Date; + created_at: number; name: string; operation: string; - updated_at: Date; + updated_at: number; filter: Record; @@ -19308,7 +19308,7 @@ export interface PredefinedFilterStatsResponse { max_latency_ms: number; - last_seen?: Date; + last_seen?: number; } export interface PrivacySettingsResponse { @@ -19444,7 +19444,7 @@ export interface PushNotificationFields { export interface PushNotificationSettingsResponse { disabled?: boolean; - disabled_until?: Date; + disabled_until?: number; } export interface PushPreferenceInput { @@ -19502,7 +19502,7 @@ export interface PushPreferencesResponse { chat_level?: string; - disabled_until?: Date; + disabled_until?: number; feeds_level?: string; @@ -19512,13 +19512,13 @@ export interface PushPreferencesResponse { } export interface PushProvider { - created_at: Date; + created_at: number; name: string; type: string; - updated_at: Date; + updated_at: number; apn_auth_key?: string; @@ -19540,7 +19540,7 @@ export interface PushProvider { description?: string; - disabled_at?: Date; + disabled_at?: number; disabled_reason?: string; @@ -19620,13 +19620,13 @@ export interface PushProviderRequest { } export interface PushProviderResponse { - created_at: Date; + created_at: number; name: string; type: string; - updated_at: Date; + updated_at: number; apn_auth_key?: string; @@ -19652,7 +19652,7 @@ export interface PushProviderResponse { description?: string; - disabled_at?: Date; + disabled_at?: number; disabled_reason?: string; @@ -19678,7 +19678,7 @@ export interface PushProviderResponse { } export interface PushTemplate { - created_at: Date; + created_at: number; enable_push: boolean; @@ -19694,7 +19694,7 @@ export interface PushTemplate { | 'feeds.follow.created' | 'feeds.notification_feed.updated'; - updated_at: Date; + updated_at: number; template?: string; } @@ -19703,7 +19703,7 @@ export interface PushTemplateResponse { /** * Time when the template was created */ - created_at: Date; + created_at: number; /** * Whether push notification is enabled for this event @@ -19723,7 +19723,7 @@ export interface PushTemplateResponse { /** * Time when the template was last updated */ - updated_at: Date; + updated_at: number; /** * The push notification template @@ -19931,13 +19931,13 @@ export interface QueryBannedUsersPayload { */ filter_conditions: Record; - created_at_after?: Date; + created_at_after?: number; - created_at_after_or_equal?: Date; + created_at_after_or_equal?: number; - created_at_before?: Date; + created_at_before?: number; - created_at_before_or_equal?: Date; + created_at_before_or_equal?: number; /** * Whether to exclude expired bans or not @@ -20165,9 +20165,9 @@ export interface QueryCallSessionParticipantStatsResponse { counts: CallStatsParticipantCounts; - call_ended_at?: Date; + call_ended_at?: number; - call_started_at?: Date; + call_started_at?: number; next?: string; @@ -20242,17 +20242,17 @@ export interface QueryCallStatsMapResponse { counts: CallStatsParticipantCounts; - call_ended_at?: Date; + call_ended_at?: number; - call_started_at?: Date; + call_started_at?: number; data_source?: string; - end_time?: Date; + end_time?: number; - generated_at?: Date; + generated_at?: number; - start_time?: Date; + start_time?: number; publishers?: CallStatsMapPublishers; @@ -20635,7 +20635,7 @@ export interface QueryFeedModerationTemplate { /** * When the template was created */ - created_at: Date; + created_at: number; /** * Name of the moderation template @@ -20645,7 +20645,7 @@ export interface QueryFeedModerationTemplate { /** * When the template was last updated */ - updated_at: Date; + updated_at: number; /** * Configuration for a feeds moderation template @@ -20770,13 +20770,13 @@ export interface QueryFollowsResponse { } export interface QueryFutureChannelBansPayload { - created_at_after?: Date; + created_at_after?: number; - created_at_after_or_equal?: Date; + created_at_after_or_equal?: number; - created_at_before?: Date; + created_at_before?: number; - created_at_before_or_equal?: Date; + created_at_before_or_equal?: number; /** * Whether to exclude expired bans or not @@ -20869,13 +20869,13 @@ export interface QueryLabelResultsResponse { export interface QueryMembersPayload { type: string; - created_at_after?: Date; + created_at_after?: number; - created_at_after_or_equal?: Date; + created_at_after_or_equal?: number; - created_at_before?: Date; + created_at_before?: number; - created_at_before_or_equal?: Date; + created_at_before_or_equal?: number; id?: string; @@ -21900,15 +21900,15 @@ export interface RawRecordingSettingsResponse { export interface Reaction { activity_id: string; - created_at: Date; + created_at: number; kind: string; - updated_at: Date; + updated_at: number; user_id: string; - deleted_at?: Date; + deleted_at?: number; id?: string; @@ -21937,7 +21937,7 @@ export interface ReactionDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -21978,7 +21978,7 @@ export interface ReactionDeletedEvent { message_id?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -22011,12 +22011,12 @@ export interface ReactionGroupResponse { /** * FirstReactionAt is the time of the first reaction of this type. This is the same also if all reaction of this type are deleted, because if someone will react again with the same type, will be preserved the sorting. */ - first_reaction_at: Date; + first_reaction_at: number; /** * LastReactionAt is the time of the last reaction of this type. */ - last_reaction_at: Date; + last_reaction_at: number; /** * SumScores is the sum of all scores of reactions of this type. Medium allows you to clap articles more than once and shows the sum of all claps from all users. For example, you can send `clap` x5 using `score: 5`. @@ -22033,7 +22033,7 @@ export interface ReactionGroupUserResponse { /** * The time when the user reacted. */ - created_at: Date; + created_at: number; /** * The ID of the user who reacted. @@ -22050,7 +22050,7 @@ export interface ReactionNewEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -22091,7 +22091,7 @@ export interface ReactionNewEvent { message_id?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -22150,7 +22150,7 @@ export interface ReactionResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Message ID @@ -22170,7 +22170,7 @@ export interface ReactionResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * User ID @@ -22192,7 +22192,7 @@ export interface ReactionUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; message_id: string; @@ -22238,7 +22238,7 @@ export interface ReactionUpdatedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -22323,7 +22323,7 @@ export interface ReadReceiptsResponse { } export interface ReadStateResponse { - last_read: Date; + last_read: number; unread_messages: number; @@ -22332,7 +22332,7 @@ export interface ReadStateResponse { */ user: UserResponse; - last_delivered_at?: Date; + last_delivered_at?: number; last_delivered_message_id?: string; @@ -22439,7 +22439,7 @@ export interface ReminderCreatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The ID of the message for which the reminder was created @@ -22465,7 +22465,7 @@ export interface ReminderCreatedEvent { */ parent_id?: string; - received_at?: Date; + received_at?: number; } export interface ReminderDeletedEvent { @@ -22477,7 +22477,7 @@ export interface ReminderDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The ID of the message for which the reminder was created @@ -22503,7 +22503,7 @@ export interface ReminderDeletedEvent { */ parent_id?: string; - received_at?: Date; + received_at?: number; } export interface ReminderNotificationEvent { @@ -22515,7 +22515,7 @@ export interface ReminderNotificationEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The ID of the message for which the reminder was created @@ -22538,21 +22538,21 @@ export interface ReminderNotificationEvent { parent_id?: string; - received_at?: Date; + received_at?: number; } export interface ReminderResponseData { channel_cid: string; - created_at: Date; + created_at: number; message_id: string; - updated_at: Date; + updated_at: number; user_id: string; - remind_at?: Date; + remind_at?: number; /** * Represents channel in chat @@ -22579,7 +22579,7 @@ export interface ReminderUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The ID of the message for which the reminder was created @@ -22605,7 +22605,7 @@ export interface ReminderUpdatedEvent { */ parent_id?: string; - received_at?: Date; + received_at?: number; } export interface RemoveUserGroupMembersRequest { @@ -22843,7 +22843,7 @@ export interface RestoreUsersRequest { export interface RetentionPolicy { app_pk: number; - enabled_at: Date; + enabled_at: number; policy: string; @@ -22861,13 +22861,13 @@ export interface RetentionRunResponse { } export interface ReviewQueueItemNewEvent { - created_at: Date; + created_at: number; custom: Record; type: string; - received_at?: Date; + received_at?: number; /** * The flags associated with this review queue item @@ -22888,7 +22888,7 @@ export interface ReviewQueueItemResponse { /** * When the item was created */ - created_at: Date; + created_at: number; /** * ID of the entity being reviewed @@ -22937,7 +22937,7 @@ export interface ReviewQueueItemResponse { /** * When the item was last updated */ - updated_at: Date; + updated_at: number; /** * Moderation actions taken @@ -22962,7 +22962,7 @@ export interface ReviewQueueItemResponse { /** * When the review was completed */ - completed_at?: Date; + completed_at?: number; /** * Highest per-label confidence (0-1) any provider reported across the item's flags; absent when no flag carried one @@ -22979,7 +22979,7 @@ export interface ReviewQueueItemResponse { /** * When the item was escalated */ - escalated_at?: Date; + escalated_at?: number; /** * ID of the moderator who escalated the item @@ -22989,7 +22989,7 @@ export interface ReviewQueueItemResponse { /** * When the item was reviewed */ - reviewed_at?: Date; + reviewed_at?: number; /** * Teams associated with this item @@ -23030,13 +23030,13 @@ export interface ReviewQueueItemResponse { } export interface ReviewQueueItemUpdatedEvent { - created_at: Date; + created_at: number; custom: Record; type: string; - received_at?: Date; + received_at?: number; /** * The flags associated with this review queue item @@ -23053,7 +23053,7 @@ export interface RevisionHistoryResponse { actor_type: string; - created_at: Date; + created_at: number; object_id: string; @@ -23124,7 +23124,7 @@ export interface Role { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Whether this is a custom role or built-in @@ -23139,7 +23139,7 @@ export interface Role { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * List of scopes where this role is currently present. `.app` means that role is present in app-level grants @@ -23579,7 +23579,7 @@ export interface SIPInboundRoutingRuleResponse { /** * Creation timestamp */ - created_at: Date; + created_at: number; duration: string; @@ -23596,7 +23596,7 @@ export interface SIPInboundRoutingRuleResponse { /** * Last update timestamp */ - updated_at: Date; + updated_at: number; /** * List of called numbers @@ -23687,7 +23687,7 @@ export interface SIPTrunkResponse { /** * Creation timestamp */ - created_at: Date; + created_at: number; /** * Unique identifier for the SIP trunk @@ -23707,7 +23707,7 @@ export interface SIPTrunkResponse { /** * Last update timestamp */ - updated_at: Date; + updated_at: number; /** * The URI for the SIP trunk @@ -23840,7 +23840,7 @@ export interface SearchResult { export interface SearchResultMessage { cid: string; - created_at: Date; + created_at: number; deleted_reply_count: number; @@ -23864,7 +23864,7 @@ export interface SearchResultMessage { type: string; - updated_at: Date; + updated_at: number; attachments: Array; @@ -23889,19 +23889,19 @@ export interface SearchResultMessage { command?: string; - deleted_at?: Date; + deleted_at?: number; deleted_for_me?: boolean; - message_text_updated_at?: Date; + message_text_updated_at?: number; mml?: string; parent_id?: string; - pin_expires?: Date; + pin_expires?: number; - pinned_at?: Date; + pinned_at?: number; poll_id?: string; @@ -23998,7 +23998,7 @@ export interface Segment { all_users: boolean; - created_at: Date; + created_at: number; id: string; @@ -24008,9 +24008,9 @@ export interface Segment { type: string; - updated_at: Date; + updated_at: number; - deleted_at?: Date; + deleted_at?: number; description?: string; @@ -24024,9 +24024,9 @@ export interface SegmentResponse { all_users: boolean; - created_at: Date; + created_at: number; - deleted_at: Date; + deleted_at: number; description: string; @@ -24038,7 +24038,7 @@ export interface SegmentResponse { type: string; - updated_at: Date; + updated_at: number; filter: Record; } @@ -24046,7 +24046,7 @@ export interface SegmentResponse { export interface SegmentTargetResponse { app_pk: number; - created_at: Date; + created_at: number; segment_id: string; @@ -24236,7 +24236,7 @@ export interface SessionWarningResponse { warning: string; - time?: Date; + time?: number; } export interface SetRetentionPolicyRequest { @@ -24255,17 +24255,17 @@ export interface SetRetentionPolicyResponse { } export interface SetupSession { - created_at: Date; + created_at: number; current_step: string; status: string; - updated_at: Date; + updated_at: number; setup_data: Record; - completed_at?: Date; + completed_at?: number; } export interface ShadowBlockActionRequestPayload { @@ -24284,7 +24284,7 @@ export interface ShareResponse { /** * When the share occurred */ - created_at: Date; + created_at: number; /** * User response object @@ -24311,7 +24311,7 @@ export interface SharedLocationResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Device ID that created the live location @@ -24338,7 +24338,7 @@ export interface SharedLocationResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * User ID @@ -24348,7 +24348,7 @@ export interface SharedLocationResponse { /** * Time when the live location expires */ - end_at?: Date; + end_at?: number; /** * Represents channel in chat @@ -24364,7 +24364,7 @@ export interface SharedLocationResponse { export interface SharedLocationResponseData { channel_cid: string; - created_at: Date; + created_at: number; created_by_device_id: string; @@ -24374,11 +24374,11 @@ export interface SharedLocationResponseData { message_id: string; - updated_at: Date; + updated_at: number; user_id: string; - end_at?: Date; + end_at?: number; /** * Represents channel in chat @@ -24813,7 +24813,7 @@ export interface StoriesFeedUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The ID of the feed @@ -24829,7 +24829,7 @@ export interface StoriesFeedUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; /** * Individual activities for stories feeds @@ -25222,18 +25222,18 @@ export interface ThreadParticipant { /** * Date/time of creation */ - created_at: Date; + created_at: number; - last_read_at: Date; + last_read_at: number; custom: Record; - last_thread_message_at?: Date; + last_thread_message_at?: number; /** * Left Thread At is the time when the user left the thread */ - left_thread_at?: Date; + left_thread_at?: number; /** * Thead ID is unique string identifier of the thread @@ -25265,7 +25265,7 @@ export interface ThreadResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Created By User ID @@ -25295,7 +25295,7 @@ export interface ThreadResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * Custom data for this object @@ -25305,12 +25305,12 @@ export interface ThreadResponse { /** * Deleted At */ - deleted_at?: Date; + deleted_at?: number; /** * Last Message At */ - last_message_at?: Date; + last_message_at?: number; /** * Thread Participants @@ -25347,7 +25347,7 @@ export interface ThreadStateResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Created By User ID @@ -25377,7 +25377,7 @@ export interface ThreadStateResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; latest_replies: Array; @@ -25389,12 +25389,12 @@ export interface ThreadStateResponse { /** * Deleted At */ - deleted_at?: Date; + deleted_at?: number; /** * Last Message At */ - last_message_at?: Date; + last_message_at?: number; read?: Array; @@ -25422,7 +25422,7 @@ export interface ThreadStateResponse { } export interface ThreadUpdatedEvent { - created_at: Date; + created_at: number; custom: Record; @@ -25434,7 +25434,7 @@ export interface ThreadUpdatedEvent { cid?: string; - received_at?: Date; + received_at?: number; thread?: ThreadResponse; } @@ -25444,7 +25444,7 @@ export interface ThreadedCommentResponse { confidence_score: number; - created_at: Date; + created_at: number; downvote_count: number; @@ -25466,7 +25466,7 @@ export interface ThreadedCommentResponse { status: 'active' | 'deleted' | 'removed' | 'hidden' | 'shadow_blocked'; - updated_at: Date; + updated_at: number; upvote_count: number; @@ -25481,9 +25481,9 @@ export interface ThreadedCommentResponse { controversy_score?: number; - deleted_at?: Date; + deleted_at?: number; - edited_at?: Date; + edited_at?: number; parent_id?: string; @@ -26057,7 +26057,7 @@ export interface UnblockUsersResponse { export interface UnblockedUserEvent { call_cid: string; - created_at: Date; + created_at: number; /** * User response object @@ -26231,7 +26231,7 @@ export interface UnreadCountsBatchResponse { export interface UnreadCountsChannel { channel_id: string; - last_read: Date; + last_read: number; unread_count: number; } @@ -26259,7 +26259,7 @@ export interface UnreadCountsResponse { } export interface UnreadCountsThread { - last_read: Date; + last_read: number; last_read_message_id: string; @@ -26785,7 +26785,7 @@ export interface UpdateCallTypeResponse { /** * the time the call type was created */ - created_at: Date; + created_at: number; duration: string; @@ -26797,7 +26797,7 @@ export interface UpdateCallTypeResponse { /** * the time the call type was last updated */ - updated_at: Date; + updated_at: number; /** * the permissions granted to each role @@ -27071,7 +27071,7 @@ export interface UpdateChannelTypeResponse { count_messages: boolean; - created_at: Date; + created_at: number; custom_events: boolean; @@ -27111,7 +27111,7 @@ export interface UpdateChannelTypeResponse { typing_events: boolean; - updated_at: Date; + updated_at: number; uploads: boolean; @@ -28162,7 +28162,7 @@ export interface UpdateUsersResponse { export interface UpdatedCallPermissionsEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The capabilities of the current user @@ -28560,7 +28560,7 @@ export interface UpsertModerationTemplateResponse { /** * When the template was created */ - created_at: Date; + created_at: number; duration: string; @@ -28572,7 +28572,7 @@ export interface UpsertModerationTemplateResponse { /** * When the template was last updated */ - updated_at: Date; + updated_at: number; /** * Configuration for a feeds moderation template @@ -28719,7 +28719,7 @@ export interface UserBannedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -28752,14 +28752,14 @@ export interface UserBannedEvent { /** * The expiration date of the ban */ - expiration?: Date; + expiration?: number; /** * The reason for the ban */ reason?: string; - received_at?: Date; + received_at?: number; /** * ID of the review queue item (flagged message) that triggered the ban, if the ban was applied from the moderation review queue @@ -28803,7 +28803,7 @@ export interface UserDeactivatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -28814,7 +28814,7 @@ export interface UserDeactivatedEvent { */ type: string; - received_at?: Date; + received_at?: number; created_by?: UserResponseCommonFields; } @@ -28823,7 +28823,7 @@ export interface UserDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The type of deletion that was used for the user's conversations. One of: hard, soft, pruning, (empty string) @@ -28864,7 +28864,7 @@ export interface UserDeletedEvent { */ type: string; - received_at?: Date; + received_at?: number; } export interface UserFeedbackReport { @@ -28901,7 +28901,7 @@ export interface UserFlaggedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The reason for the flag @@ -28920,7 +28920,7 @@ export interface UserFlaggedEvent { */ type: string; - received_at?: Date; + received_at?: number; /** * Custom data @@ -28933,13 +28933,13 @@ export interface UserFlaggedEvent { export interface UserGroup { app_pk: number; - created_at: Date; + created_at: number; id: string; name: string; - updated_at: Date; + updated_at: number; created_by?: string; @@ -28954,7 +28954,7 @@ export interface UserGroupCreatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -28963,7 +28963,7 @@ export interface UserGroupCreatedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; @@ -28974,7 +28974,7 @@ export interface UserGroupDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -28983,7 +28983,7 @@ export interface UserGroupDeletedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; @@ -28993,7 +28993,7 @@ export interface UserGroupDeletedEvent { export interface UserGroupMember { app_pk: number; - created_at: Date; + created_at: number; group_id: string; @@ -29006,7 +29006,7 @@ export interface UserGroupMemberAddedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The user IDs that were added @@ -29020,7 +29020,7 @@ export interface UserGroupMemberAddedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; @@ -29031,7 +29031,7 @@ export interface UserGroupMemberRemovedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The user IDs that were removed @@ -29045,7 +29045,7 @@ export interface UserGroupMemberRemovedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; @@ -29053,13 +29053,13 @@ export interface UserGroupMemberRemovedEvent { } export interface UserGroupResponse { - created_at: Date; + created_at: number; id: string; name: string; - updated_at: Date; + updated_at: number; created_by?: string; @@ -29074,7 +29074,7 @@ export interface UserGroupUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -29083,7 +29083,7 @@ export interface UserGroupUpdatedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; @@ -29122,7 +29122,7 @@ export interface UserMessagesDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -29157,7 +29157,7 @@ export interface UserMessagesDeletedEvent { */ hard_delete?: boolean; - received_at?: Date; + received_at?: number; /** * The team of the channel where the target user's messages were deleted @@ -29168,11 +29168,11 @@ export interface UserMessagesDeletedEvent { } export interface UserMuteResponse { - created_at: Date; + created_at: number; - updated_at: Date; + updated_at: number; - expires?: Date; + expires?: number; /** * User response object @@ -29189,7 +29189,7 @@ export interface UserMutedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -29200,7 +29200,7 @@ export interface UserMutedEvent { */ type: string; - received_at?: Date; + received_at?: number; /** * The target users that were muted @@ -29228,7 +29228,7 @@ export interface UserReactivatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -29239,7 +29239,7 @@ export interface UserReactivatedEvent { */ type: string; - received_at?: Date; + received_at?: number; created_by?: UserResponseCommonFields; } @@ -29296,7 +29296,7 @@ export interface UserResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Unique user identifier @@ -29328,7 +29328,7 @@ export interface UserResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; blocked_user_ids: Array; @@ -29347,26 +29347,26 @@ export interface UserResponse { /** * Date when ban expires */ - ban_expires?: Date; + ban_expires?: number; bypass_moderation?: boolean; /** * Date of deactivation */ - deactivated_at?: Date; + deactivated_at?: number; /** * Date/time of deletion */ - deleted_at?: Date; + deleted_at?: number; image?: string; /** * Date of last activity */ - last_active?: Date; + last_active?: number; /** * Optional name of user @@ -29376,7 +29376,7 @@ export interface UserResponse { /** * Revocation date for tokens */ - revoke_tokens_issued_before?: Date; + revoke_tokens_issued_before?: number; /** * List of devices user is using @@ -29393,7 +29393,7 @@ export interface UserResponse { export interface UserResponseCommonFields { banned: boolean; - created_at: Date; + created_at: number; id: string; @@ -29403,7 +29403,7 @@ export interface UserResponseCommonFields { role: string; - updated_at: Date; + updated_at: number; blocked_user_ids: Array; @@ -29413,17 +29413,17 @@ export interface UserResponseCommonFields { avg_response_time?: number; - deactivated_at?: Date; + deactivated_at?: number; - deleted_at?: Date; + deleted_at?: number; image?: string; - last_active?: Date; + last_active?: number; name?: string; - revoke_tokens_issued_before?: Date; + revoke_tokens_issued_before?: number; teams_role?: Record; } @@ -29431,7 +29431,7 @@ export interface UserResponseCommonFields { export interface UserResponsePrivacyFields { banned: boolean; - created_at: Date; + created_at: number; id: string; @@ -29441,7 +29441,7 @@ export interface UserResponsePrivacyFields { role: string; - updated_at: Date; + updated_at: number; blocked_user_ids: Array; @@ -29451,19 +29451,19 @@ export interface UserResponsePrivacyFields { avg_response_time?: number; - deactivated_at?: Date; + deactivated_at?: number; - deleted_at?: Date; + deleted_at?: number; image?: string; invisible?: boolean; - last_active?: Date; + last_active?: number; name?: string; - revoke_tokens_issued_before?: Date; + revoke_tokens_issued_before?: number; privacy_settings?: PrivacySettingsResponse; @@ -29484,7 +29484,7 @@ export interface UserUnbannedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -29514,7 +29514,7 @@ export interface UserUnbannedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * Whether the target user was shadow unbanned @@ -29535,7 +29535,7 @@ export interface UserUnmutedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -29546,7 +29546,7 @@ export interface UserUnmutedEvent { */ type: string; - received_at?: Date; + received_at?: number; /** * The target users that were unmuted @@ -29560,7 +29560,7 @@ export interface UserUnreadReminderEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The channels with unread messages @@ -29576,14 +29576,14 @@ export interface UserUnreadReminderEvent { */ type: string; - received_at?: Date; + received_at?: number; } export interface UserUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -29594,7 +29594,7 @@ export interface UserUpdatedEvent { */ type: string; - received_at?: Date; + received_at?: number; } export interface ValidateExternalStorageResponse { @@ -29965,7 +29965,7 @@ export interface WHIPIngress { } export interface WSEvent { - created_at: Date; + created_at: number; type: string; @@ -29975,7 +29975,7 @@ export interface WSEvent { channel_id?: string; - channel_last_message_at?: Date; + channel_last_message_at?: number; channel_type?: string; From 8775455eadac27806c5776e3ce40595ea2be50af Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Fri, 18 Sep 2026 09:34:31 -0500 Subject: [PATCH 03/13] chore: enable type checks for test, fix tests --- __tests__/agent.test.ts | 4 ++-- __tests__/date-transform.test.ts | 31 +++++++++++++++++-------------- __tests__/devices-push.test.ts | 4 ++-- __tests__/messages.test.ts | 2 -- __tests__/rate-limit.test.ts | 7 +++++-- tsconfig.test.json | 8 ++++++++ vite.config.mts | 5 +++++ 7 files changed, 39 insertions(+), 22 deletions(-) create mode 100644 tsconfig.test.json diff --git a/__tests__/agent.test.ts b/__tests__/agent.test.ts index d725f1f..7ce8ede 100644 --- a/__tests__/agent.test.ts +++ b/__tests__/agent.test.ts @@ -67,7 +67,7 @@ describe.skip('AI agent integration', () => { const [, agent] = await createTestStreamAndRealtimeClients(); let errorEvent: any = null; - agent.on('realtime.event', ({ event }) => { + agent.on('realtime.event', ({ event }: { event: any }) => { if (event.type === 'error') { errorEvent = event; } @@ -147,7 +147,7 @@ describe.skip('AI agent integration', () => { required: ['lat', 'lng', 'location'], }, }, - async ({ lat, lng }) => { + async ({ lat, lng }: { lat: number; lng: number }) => { const result = await fetch( `https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${lng}¤t=temperature_2m,wind_speed_10m`, ); diff --git a/__tests__/date-transform.test.ts b/__tests__/date-transform.test.ts index 526f46a..1925ccb 100644 --- a/__tests__/date-transform.test.ts +++ b/__tests__/date-transform.test.ts @@ -4,7 +4,12 @@ import { createTestClient } from './create-test-client'; import { StreamClient } from '../src/StreamClient'; import { UserRequest } from '../src/gen/models'; -describe('Date conversion', () => { +// The generator is run with response_dates_as_number=true, so every date the +// server sends arrives as the unix-nanosecond number the API puts on the wire. +// Convert to milliseconds to compare against a JS Date. +const toMillis = (nanos: number) => Math.floor(nanos / 1_000_000); + +describe('dates on responses', () => { let client: StreamClient; const user = { id: 'stream-node-test-user', @@ -36,18 +41,18 @@ describe('Date conversion', () => { const createdAt = response.call.created_at; - expect(createdAt instanceof Date).toBe(true); - expect(now - createdAt.getTime()).toBeLessThan(oneMin); + expect(typeof createdAt).toBe('number'); + expect(now - toMillis(createdAt)).toBeLessThan(oneMin); - expect(response.call.starts_at instanceof Date).toBe(true); - expect(startsAt.getTime()).toEqual(response.call.starts_at?.getTime()); + expect(typeof response.call.starts_at).toBe('number'); + expect(startsAt.getTime()).toEqual(toMillis(response.call.starts_at!)); expect(response.call.ended_at).toBeNull(); expect(response.members.length).toBeGreaterThan(0); response.members.forEach((m) => { - expect(m.created_at instanceof Date).toBe(true); + expect(typeof m.created_at).toBe('number'); }); const queryResult = await client.video.queryCalls({ @@ -75,28 +80,26 @@ describe('Date conversion', () => { const createdAt = response.channel!.created_at; - expect(createdAt instanceof Date).toBe(true); - expect(now - createdAt.getTime()).toBeLessThan(oneMin); + expect(typeof createdAt).toBe('number'); + expect(now - toMillis(createdAt)).toBeLessThan(oneMin); expect(response.channel!.deleted_at).toBeUndefined(); expect(response.members.length).toBeGreaterThan(0); response.members.forEach((m) => { - expect(m.created_at instanceof Date).toBe(true); + expect(typeof m.created_at).toBe('number'); }); const queryResult = await client.chat.queryChannels({ filter_conditions: { - created_at: { $lte: createdAt.toISOString() }, + created_at: { $lte: new Date(toMillis(createdAt)).toISOString() }, }, limit: 10, }); queryResult.channels.forEach((c) => { - expect(c.channel!.created_at.getTime()).toBeLessThanOrEqual( - createdAt.getTime(), - ); + expect(c.channel!.created_at).toBeLessThanOrEqual(createdAt); }); await channel.delete(); @@ -113,7 +116,7 @@ describe('Date conversion', () => { const response = await client.upsertUsers([newUser]); - expect(response.users[newUser.id].created_at instanceof Date).toBe(true); + expect(typeof response.users[newUser.id].created_at).toBe('number'); expect( typeof response.users[newUser.id].custom.created_at === 'string', diff --git a/__tests__/devices-push.test.ts b/__tests__/devices-push.test.ts index c043821..6232256 100644 --- a/__tests__/devices-push.test.ts +++ b/__tests__/devices-push.test.ts @@ -2,7 +2,7 @@ import { beforeAll, describe, expect, it } from 'vitest'; import { randomUUID } from 'crypto'; import { createTestClient } from './create-test-client'; import { StreamClient } from '../src/StreamClient'; -import { CreateDeviceRequest, PushProvider } from '../src/gen/models'; +import { CreateDeviceRequest, PushProviderRequest } from '../src/gen/models'; describe('devices and push', () => { let client: StreamClient; @@ -16,7 +16,7 @@ describe('devices and push', () => { push_provider_name: 'firebase', user_id: user.id, }; - const pushProvider: PushProvider = { + const pushProvider: PushProviderRequest = { name: 'test-push-provider', type: 'xiaomi', xiaomi_app_secret: '', diff --git a/__tests__/messages.test.ts b/__tests__/messages.test.ts index 2fe689f..5d4bd54 100644 --- a/__tests__/messages.test.ts +++ b/__tests__/messages.test.ts @@ -57,7 +57,6 @@ describe('messages API', () => { }); it('thread replies', async () => { - const now = new Date(); const response = await channel.sendMessage({ message: { text: 'Hello from Stream Node SDK', @@ -77,7 +76,6 @@ describe('messages API', () => { const getResponse = await client.chat.getReplies({ parent_id: response.message.id, - created_at_after: now, }); expect( diff --git a/__tests__/rate-limit.test.ts b/__tests__/rate-limit.test.ts index 935f18a..546a9ce 100644 --- a/__tests__/rate-limit.test.ts +++ b/__tests__/rate-limit.test.ts @@ -1,6 +1,7 @@ import { beforeAll, describe, expect, it } from 'vitest'; import { createTestClient } from './create-test-client'; import { StreamClient } from '../src/StreamClient'; +import { StreamError } from '../src/types'; describe('rate limit', () => { let client: StreamClient; @@ -61,12 +62,14 @@ describe('rate limit', () => { try { await call.startTranscription(); throw new Error(`Method didn't throw`); - } catch (error) { + } catch (err) { + const error = err as StreamError; + expect(error.code).toBeDefined(); expect(error.metadata).toBeDefined(); expect(error.metadata.responseCode).toBe(404); - const rateLimit = error.metadata.rateLimit; + const rateLimit = error.metadata.rateLimit!; expect(rateLimit.rateLimit).toBeDefined(); } diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 0000000..e7732a7 --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "noEmit": true, + "types": ["node", "vitest/globals"] + }, + "include": ["./src", "index.ts", "./__tests__"] +} diff --git a/vite.config.mts b/vite.config.mts index cf56164..e2ac5b0 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -41,6 +41,11 @@ export default defineConfig({ }, testTimeout: 60000, include: ["__tests__/**/*.test.ts"], + typecheck: { + enabled: true, + tsconfig: "./tsconfig.test.json", + include: ["__tests__/**/*.test.ts"], + }, includeSource: ["src/**/*.ts"], retry: 3, }, From 84badb2183a052a6263d9cfaa4cb8b689aecf6d1 Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Fri, 18 Sep 2026 09:51:19 -0500 Subject: [PATCH 04/13] feat: add same helpers as stream-chat-js --- __tests__/date-transform.test.ts | 14 ++---- index.ts | 10 ++++ src/utils/time.ts | 84 ++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 9 deletions(-) create mode 100644 src/utils/time.ts diff --git a/__tests__/date-transform.test.ts b/__tests__/date-transform.test.ts index 1925ccb..727a5dd 100644 --- a/__tests__/date-transform.test.ts +++ b/__tests__/date-transform.test.ts @@ -3,11 +3,7 @@ import { randomUUID } from 'crypto'; import { createTestClient } from './create-test-client'; import { StreamClient } from '../src/StreamClient'; import { UserRequest } from '../src/gen/models'; - -// The generator is run with response_dates_as_number=true, so every date the -// server sends arrives as the unix-nanosecond number the API puts on the wire. -// Convert to milliseconds to compare against a JS Date. -const toMillis = (nanos: number) => Math.floor(nanos / 1_000_000); +import { nsToDate, nsToMs } from '../src/utils/time'; describe('dates on responses', () => { let client: StreamClient; @@ -42,10 +38,10 @@ describe('dates on responses', () => { const createdAt = response.call.created_at; expect(typeof createdAt).toBe('number'); - expect(now - toMillis(createdAt)).toBeLessThan(oneMin); + expect(now - nsToMs(createdAt)).toBeLessThan(oneMin); expect(typeof response.call.starts_at).toBe('number'); - expect(startsAt.getTime()).toEqual(toMillis(response.call.starts_at!)); + expect(startsAt.getTime()).toEqual(nsToMs(response.call.starts_at!)); expect(response.call.ended_at).toBeNull(); @@ -81,7 +77,7 @@ describe('dates on responses', () => { const createdAt = response.channel!.created_at; expect(typeof createdAt).toBe('number'); - expect(now - toMillis(createdAt)).toBeLessThan(oneMin); + expect(now - nsToMs(createdAt)).toBeLessThan(oneMin); expect(response.channel!.deleted_at).toBeUndefined(); @@ -93,7 +89,7 @@ describe('dates on responses', () => { const queryResult = await client.chat.queryChannels({ filter_conditions: { - created_at: { $lte: new Date(toMillis(createdAt)).toISOString() }, + created_at: { $lte: nsToDate(createdAt).toISOString() }, }, limit: 10, }); diff --git a/index.ts b/index.ts index 71c9a50..da6b658 100644 --- a/index.ts +++ b/index.ts @@ -10,3 +10,13 @@ export { InvalidWebhookError, InvalidWebhookErrorMessages, } from './src/utils/webhook'; +export { + convertTimestampToDate, + dateToNs, + msToNs, + nowNs, + NS_PER_MS, + nsToDate, + nsToMs, + nsToRfc3339, +} from './src/utils/time'; diff --git a/src/utils/time.ts b/src/utils/time.ts new file mode 100644 index 0000000..99d0e9e --- /dev/null +++ b/src/utils/time.ts @@ -0,0 +1,84 @@ +/** + * Unit conversions between the API's timestamps and JavaScript's. + * + * **The invariant this module exists to hold:** a timestamp is a unix-**nanosecond** `number` — + * that is what the API puts on the wire and what every server-sent date field on a generated + * response or event type carries. A duration, interval or delay stays in **milliseconds**, because + * that is what `setTimeout` and `ApiConfig.timeout` speak. + * + * Two consequences make the helpers below mandatory rather than convenient: + * + * - **Every `Date`-based path is out of range.** `Date` tops out around 8.64e15 ms while a current + * nanosecond timestamp is ~1.79e18, so a bare wire number read as milliseconds lands on an + * invalid instance: `new Date(ns).toISOString()` throws `RangeError`, and a date library handed + * the same number formats it as the literal string `'Invalid Date'`. Neither is a type error. + * - **A unit mix-up between two `number`s is the silent one.** Comparing a wire timestamp against + * `Date.now()`, or adding a millisecond duration to one, produces a plausible-looking number and + * no complaint at all. + * + * Outgoing **request** date fields are unaffected: they are still typed `Date`, because + * `JSON.stringify` emits RFC3339 for a `Date` and that is the format the request spec declares. + * Use {@link nsToDate} when handing a server-sent timestamp back to the API. + * + * Precision note: nanosecond epoch values exceed `Number.MAX_SAFE_INTEGER` (~9.01e15), so they are + * quantised to roughly 256 ns steps. Ordering is unaffected; exact equality against a value that + * has round-tripped through JSON is not guaranteed. + */ + +/** Nanoseconds per millisecond — the only magic number in this module. */ +export const NS_PER_MS = 1e6; + +/** A wire timestamp as epoch milliseconds, for arithmetic against `Date.now()` or a `Date`. */ +export const nsToMs = (ns: number): number => Math.floor(ns / NS_PER_MS); + +/** Epoch milliseconds as a wire timestamp. */ +export const msToNs = (ms: number): number => ms * NS_PER_MS; + +/** + * The local clock as a wire-comparable timestamp, for building API-shaped objects. + * + * Millisecond resolution, so two calls within the same millisecond produce equal timestamps. + * Callers that order by timestamp must tie-break on something else. + */ +export const nowNs = (): number => msToNs(Date.now()); + +/** A wire timestamp as a `Date`, for request payloads and date libraries. */ +export const nsToDate = (ns: number): Date => new Date(nsToMs(ns)); + +/** + * A wire timestamp as a nanosecond-precision RFC3339 string, for an outgoing request date field. + * {@link nsToDate} is lossy here — `Date` holds only milliseconds. + */ +export const nsToRfc3339 = (ns: number): string => { + const ms = nsToMs(ns); + const subMs = String(ns - ms * NS_PER_MS).padStart(6, '0'); + return new Date(ms).toISOString().replace(/\.(\d{3})Z$/, `.$1${subMs}Z`); +}; + +/** A `Date` as a wire timestamp. */ +export const dateToNs = (date: Date): number => msToNs(date.getTime()); + +/** + * A server-sent timestamp as a `Date`, or `undefined` when there is none. + * + * The guarded companion to {@link nsToDate}, for the boundary where a wire timestamp becomes + * something a date library or a caller consumes. Use {@link nsToDate} when the value is known to + * be present; use this when it comes straight off a response, an event or persisted state. + * + * The guard is the whole point, and it covers two cases that are silent rather than loud: + * + * - **Absent.** Many timestamps are optional in practice even where the generated type marks them + * required. `nsToDate(undefined as never)` yields an `Invalid Date`, and `.toISOString()` on one + * throws `RangeError: Invalid time value`. + * - **Not finite.** A malformed payload or a hand-built fixture can produce `NaN`, which reaches + * the same `RangeError` by a different route. + * + * Returning `undefined` rather than throwing lets a caller fall back to whatever it already does + * for a missing timestamp. + */ +export const convertTimestampToDate = ( + timestamp?: number | null, +): Date | undefined => { + if (timestamp == null || !Number.isFinite(timestamp)) return undefined; + return nsToDate(timestamp); +}; From 7ec8b00affa6b42ca933bbde5faf8be40d86777f Mon Sep 17 00:00:00 2001 From: Oliver Lazoroski Date: Wed, 23 Sep 2026 13:27:33 +0200 Subject: [PATCH 05/13] chore: use TimestampNS for date properties --- src/gen/models/index.ts | 1528 +++++++++++++-------------- src/gen/models/timestamp-guard.d.ts | 24 + 2 files changed, 777 insertions(+), 775 deletions(-) create mode 100644 src/gen/models/timestamp-guard.d.ts diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index 36477a3..8e2083f 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -1,3 +1,28 @@ +declare const timestampNsBrand: unique symbol; + +/** + * A unix-nanosecond timestamp, exactly as the server sends it. + * + * NOT milliseconds. `new Date(t)` is out of range and yields an Invalid Date, whose + * `.toISOString()` then throws; `models/timestamp-guard.d.ts` turns that into a + * compile error. Comparing or sorting two timestamps is fine -- same unit, plain + * numbers. Everything else should go through this SDK's time helpers: + * + * nsToDate(t) a Date + * convertTimestampToDate(t) a Date, or undefined when the value is absent or NaN + * nsToMs(t) epoch ms, for arithmetic against Date.now() + * nsToRfc3339(t) an RFC3339 string keeping sub-millisecond precision + * dateToNs(d), msToNs(ms) back to a wire timestamp + * nowNs() the local clock, wire-comparable + * + * A request date field is typed `Date`, not this -- pass `nsToDate(t)` when handing a + * server-sent timestamp back to the API, or `nsToRfc3339(t)` where precision matters. + * + * Values above `Number.MAX_SAFE_INTEGER` are quantised to ~256ns, so ordering holds + * but exact equality after a JSON round-trip does not. + */ +export type TimestampNS = number & { readonly [timestampNsBrand]: true }; + export interface AIAudioConfigRequest { profile?: string; rules?: Array; @@ -186,7 +211,7 @@ export interface ActionLogResponse { /** * Timestamp when the action was taken */ - created_at: number; + created_at: TimestampNS; /** * Unique identifier of the action log */ @@ -276,7 +301,7 @@ export interface ActivityAddedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; activity: ActivityResponse; custom: Record; @@ -285,7 +310,7 @@ export interface ActivityAddedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -293,7 +318,7 @@ export interface ActivityDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; activity: ActivityResponse; custom: Record; @@ -302,7 +327,7 @@ export interface ActivityDeletedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -310,14 +335,14 @@ export interface ActivityFeedbackEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; activity_feedback: ActivityFeedbackEventPayload; custom: Record; /** * The type of event: "feeds.activity.feedback" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -333,11 +358,11 @@ export interface ActivityFeedbackEventPayload { /** * When the feedback was created */ - created_at: number; + created_at: TimestampNS; /** * When the feedback was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * The feedback value (true/false) */ @@ -387,7 +412,7 @@ export interface ActivityMarkEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; custom: Record; /** @@ -403,7 +428,7 @@ export interface ActivityMarkEvent { * Whether all activities were marked as seen */ mark_all_seen?: boolean; - received_at?: number; + received_at?: TimestampNS; /** * The IDs of activities marked as read */ @@ -434,7 +459,7 @@ export interface ActivityPinResponse { /** * When the pin was created */ - created_at: number; + created_at: TimestampNS; /** * ID of the feed where activity is pinned */ @@ -442,7 +467,7 @@ export interface ActivityPinResponse { /** * When the pin was last updated */ - updated_at: number; + updated_at: TimestampNS; activity: ActivityResponse; /** * User response object @@ -454,7 +479,7 @@ export interface ActivityPinnedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * The ID of the feed */ @@ -466,7 +491,7 @@ export interface ActivityPinnedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -504,7 +529,7 @@ export interface ActivityReactionAddedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; activity: ActivityResponse; custom: Record; @@ -514,7 +539,7 @@ export interface ActivityReactionAddedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -522,7 +547,7 @@ export interface ActivityReactionDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; activity: ActivityResponse; custom: Record; @@ -532,7 +557,7 @@ export interface ActivityReactionDeletedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -540,7 +565,7 @@ export interface ActivityReactionUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; activity: ActivityResponse; custom: Record; @@ -550,7 +575,7 @@ export interface ActivityReactionUpdatedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -558,7 +583,7 @@ export interface ActivityRemovedFromFeedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; activity: ActivityResponse; custom: Record; @@ -567,7 +592,7 @@ export interface ActivityRemovedFromFeedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -680,7 +705,7 @@ export interface ActivityResponse { /** * When the activity was created */ - created_at: number; + created_at: TimestampNS; /** * If this activity is hidden by this user (using activity feedback) */ @@ -720,7 +745,7 @@ export interface ActivityResponse { /** * When the activity was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * Visibility setting for the activity. One of: public, private, tag */ @@ -784,15 +809,15 @@ export interface ActivityResponse { /** * When the activity was deleted */ - deleted_at?: number; + deleted_at?: TimestampNS; /** * When the activity was last edited */ - edited_at?: number; + edited_at?: TimestampNS; /** * When the activity will expire */ - expires_at?: number; + expires_at?: TimestampNS; /** * Total count of reactions from friends on this activity */ @@ -845,7 +870,7 @@ export interface ActivityRestoredEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; activity: ActivityResponse; custom: Record; @@ -854,7 +879,7 @@ export interface ActivityRestoredEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -909,7 +934,7 @@ export interface ActivitySelectorConfigResponse { /** * Time threshold for activity selection (timestamp) */ - cutoff_time?: number; + cutoff_time?: TimestampNS; /** * Flexible relative time window for activity selection (e.g., '1h', '3d', '1y') */ @@ -937,7 +962,7 @@ export interface ActivityUnpinnedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * The ID of the feed */ @@ -949,7 +974,7 @@ export interface ActivityUnpinnedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -957,7 +982,7 @@ export interface ActivityUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; activity: ActivityResponse; custom: Record; @@ -966,7 +991,7 @@ export interface ActivityUpdatedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -1391,7 +1416,7 @@ export interface AggregatedActivityResponse { /** * When the aggregation was created */ - created_at: number; + created_at: TimestampNS; /** * Grouping identifier */ @@ -1403,7 +1428,7 @@ export interface AggregatedActivityResponse { /** * When the aggregation was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * Number of unique users in this aggregation */ @@ -1568,7 +1593,6 @@ export interface AppResponseFields { allow_multi_user_devices: boolean; async_url_enrich_enabled: boolean; auto_translation_enabled: boolean; - before_message_send_hook_system_messages: boolean; campaign_enabled: boolean; cdn_expiration_seconds: number; @@ -1623,7 +1647,7 @@ export interface AppResponseFields { chat_primary_use_case?: string; moderation_onboarding_complete?: boolean; moderation_s3_image_access_role_arn?: string; - revoke_tokens_issued_before?: number; + revoke_tokens_issued_before?: TimestampNS; video_primary_use_case?: string; allowed_flag_reasons?: Array; geofences?: Array; @@ -1634,18 +1658,18 @@ export interface AppResponseFields { } export interface AppealAcceptedEvent { - created_at: number; + created_at: TimestampNS; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; appeal?: AppealItemResponse; } export interface AppealCreatedEvent { - created_at: number; + created_at: TimestampNS; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; appeal?: AppealItemResponse; } @@ -1657,7 +1681,7 @@ export interface AppealItemResponse { /** * When the flag was created */ - created_at: number; + created_at: TimestampNS; /** * ID of the entity */ @@ -1674,7 +1698,7 @@ export interface AppealItemResponse { /** * When the flag was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * Text severity level assigned by the AI provider */ @@ -1741,10 +1765,10 @@ export interface AppealItemResponse { } export interface AppealRejectedEvent { - created_at: number; + created_at: TimestampNS; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; appeal?: AppealItemResponse; } @@ -1761,7 +1785,6 @@ export interface AppealRequest { * Type of entity being appealed (e.g., message, user) */ entity_type: string; - /** * CID of the channel ban being appealed. Only used when entity_type is stream:user; omit to appeal the global ban. */ @@ -1790,69 +1813,69 @@ export interface AppealResponse { } export interface AsyncBulkImageModerationEvent { - created_at: number; - finished_at: number; - started_at: number; + created_at: TimestampNS; + finished_at: TimestampNS; + started_at: TimestampNS; task_id: string; url: string; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; } export interface AsyncExportChannelsEvent { - created_at: number; - finished_at: number; - started_at: number; + created_at: TimestampNS; + finished_at: TimestampNS; + started_at: TimestampNS; task_id: string; url: string; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; } export interface AsyncExportErrorEvent { - created_at: number; + created_at: TimestampNS; error: string; - finished_at: number; - started_at: number; + finished_at: TimestampNS; + started_at: TimestampNS; task_id: string; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; } export interface AsyncExportModerationLogsEvent { - created_at: number; - finished_at: number; - started_at: number; + created_at: TimestampNS; + finished_at: TimestampNS; + started_at: TimestampNS; task_id: string; url: string; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; } export interface AsyncExportReviewQueueEvent { - created_at: number; - finished_at: number; - started_at: number; + created_at: TimestampNS; + finished_at: TimestampNS; + started_at: TimestampNS; task_id: string; url: string; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; } export interface AsyncExportUsersEvent { - created_at: number; - finished_at: number; - started_at: number; + created_at: TimestampNS; + finished_at: TimestampNS; + started_at: TimestampNS; task_id: string; url: string; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; } export interface AsyncModerationCallbackConfig { @@ -2057,7 +2080,7 @@ export interface BanInfoResponse { /** * When the ban was created */ - created_at: number; + created_at: TimestampNS; /** * The channel this ban applies to. Empty if this is an app-wide (global) ban rather than a per-channel ban. */ @@ -2065,7 +2088,7 @@ export interface BanInfoResponse { /** * When the ban expires */ - expires?: number; + expires?: TimestampNS; /** * Reason for the ban */ @@ -2130,8 +2153,8 @@ export interface BanRequest { } export interface BanResponse { - created_at: number; - expires?: number; + created_at: TimestampNS; + expires?: TimestampNS; reason?: string; shadow?: boolean; /** @@ -2259,14 +2282,14 @@ export interface BlockListResponse { /** * Date/time of creation */ - created_at?: number; + created_at?: TimestampNS; id?: string; owner_user_id?: string; team?: string; /** * Date/time of the last update */ - updated_at?: number; + updated_at?: TimestampNS; } export interface BlockListRule { @@ -2321,7 +2344,7 @@ export interface BlockUsersResponse { /** * Timestamp when the user was blocked */ - created_at: number; + created_at: TimestampNS; /** * Duration of the request in milliseconds */ @@ -2330,7 +2353,7 @@ export interface BlockUsersResponse { export interface BlockedUserEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * User response object */ @@ -2350,7 +2373,7 @@ export interface BlockedUserResponse { * ID of the user who got blocked */ blocked_user_id: string; - created_at: number; + created_at: TimestampNS; /** * ID of the user who blocked another user */ @@ -2407,14 +2430,14 @@ export interface BookmarkAddedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; bookmark: BookmarkResponse; custom: Record; /** * The type of event: "feeds.bookmark.added" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -2422,14 +2445,14 @@ export interface BookmarkDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; bookmark: BookmarkResponse; custom: Record; /** * The type of event: "feeds.bookmark.deleted" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -2437,14 +2460,14 @@ export interface BookmarkFolderDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; bookmark_folder: BookmarkFolderResponse; custom: Record; /** * The type of event: "feeds.bookmark_folder.deleted" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -2452,7 +2475,7 @@ export interface BookmarkFolderResponse { /** * When the folder was created */ - created_at: number; + created_at: TimestampNS; /** * Unique identifier for the folder */ @@ -2464,7 +2487,7 @@ export interface BookmarkFolderResponse { /** * When the folder was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * User response object */ @@ -2479,14 +2502,14 @@ export interface BookmarkFolderUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; bookmark_folder: BookmarkFolderResponse; custom: Record; /** * The type of event: "feeds.bookmark_folder.updated" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -2494,7 +2517,7 @@ export interface BookmarkResponse { /** * When the bookmark was created */ - created_at: number; + created_at: TimestampNS; /** * ID of the bookmarked object */ @@ -2506,7 +2529,7 @@ export interface BookmarkResponse { /** * When the bookmark was last updated */ - updated_at: number; + updated_at: TimestampNS; activity: ActivityResponse; /** * User response object @@ -2525,14 +2548,14 @@ export interface BookmarkUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; bookmark: BookmarkResponse; custom: Record; /** * The type of event: "feeds.bookmark.updated" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -2755,7 +2778,7 @@ export interface BypassResponse { export interface CallAcceptedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Represents a call */ @@ -2781,11 +2804,11 @@ export interface CallActionOptions { } export interface CallClosedCaption { - end_time: number; + end_time: TimestampNS; id: string; language: string; speaker_id: string; - start_time: number; + start_time: TimestampNS; text: string; translated: boolean; /** @@ -2797,7 +2820,7 @@ export interface CallClosedCaption { export interface CallClosedCaptionsFailedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * The type of event: "call.closed_captions_failed" in this case */ @@ -2806,7 +2829,7 @@ export interface CallClosedCaptionsFailedEvent { export interface CallClosedCaptionsStartedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * The type of event: "call.closed_captions_started" in this case */ @@ -2815,7 +2838,7 @@ export interface CallClosedCaptionsStartedEvent { export interface CallClosedCaptionsStoppedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * The type of event: "call.transcription_stopped" in this case */ @@ -2824,7 +2847,7 @@ export interface CallClosedCaptionsStoppedEvent { export interface CallCreatedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * the members added to this call */ @@ -2846,7 +2869,7 @@ export interface CallCustomPropertyParameters { export interface CallDTMFEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * The DTMF digit (0-9, *, #, A-D) */ @@ -2862,7 +2885,7 @@ export interface CallDTMFEvent { /** * When the digit press ended and was detected */ - timestamp: number; + timestamp: TimestampNS; /** * User response object */ @@ -2875,7 +2898,7 @@ export interface CallDTMFEvent { export interface CallDeletedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Represents a call */ @@ -2896,7 +2919,7 @@ export interface CallDurationReportResponse { export interface CallEndedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Represents a call */ @@ -2921,7 +2944,7 @@ export interface CallEndedEvent { export interface CallFrameRecordingFailedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; egress_id: string; /** * Represents a call @@ -2938,8 +2961,8 @@ export interface CallFrameRecordingFrameReadyEvent { /** * The time the frame was captured */ - captured_at: number; - created_at: number; + captured_at: TimestampNS; + created_at: TimestampNS; egress_id: string; /** * Call session ID @@ -2965,7 +2988,7 @@ export interface CallFrameRecordingFrameReadyEvent { export interface CallFrameRecordingStartedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; egress_id: string; /** * Represents a call @@ -2979,7 +3002,7 @@ export interface CallFrameRecordingStartedEvent { export interface CallFrameRecordingStoppedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; egress_id: string; /** * Represents a call @@ -2993,7 +3016,7 @@ export interface CallFrameRecordingStoppedEvent { export interface CallHLSBroadcastingFailedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * The type of event: "call.hls_broadcasting_failed" in this case */ @@ -3002,7 +3025,7 @@ export interface CallHLSBroadcastingFailedEvent { export interface CallHLSBroadcastingStartedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; hls_playlist_url: string; /** * Represents a call @@ -3016,7 +3039,7 @@ export interface CallHLSBroadcastingStartedEvent { export interface CallHLSBroadcastingStoppedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * The type of event: "call.hls_broadcasting_stopped" in this case */ @@ -3041,7 +3064,7 @@ export interface CallLevelEventPayload { export interface CallLiveStartedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Represents a call */ @@ -3054,7 +3077,7 @@ export interface CallLiveStartedEvent { export interface CallMemberAddedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * the members added to this call */ @@ -3071,7 +3094,7 @@ export interface CallMemberAddedEvent { export interface CallMemberRemovedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * the list of member IDs removed from the call */ @@ -3088,7 +3111,7 @@ export interface CallMemberRemovedEvent { export interface CallMemberUpdatedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * The list of members that were updated */ @@ -3105,7 +3128,7 @@ export interface CallMemberUpdatedEvent { export interface CallMemberUpdatedPermissionEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * The list of members that were updated */ @@ -3126,7 +3149,7 @@ export interface CallMemberUpdatedPermissionEvent { export interface CallMissedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; notify_user: boolean; /** * Call session ID @@ -3152,7 +3175,7 @@ export interface CallMissedEvent { export interface CallModerationBlurEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * The user ID whose video stream is being blurred */ @@ -3169,7 +3192,7 @@ export interface CallModerationBlurEvent { export interface CallModerationWarningEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * The warning message */ @@ -3190,7 +3213,7 @@ export interface CallModerationWarningEvent { export interface CallNotificationEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Call session ID */ @@ -3222,7 +3245,7 @@ export interface CallParticipantCountReportResponse { } export interface CallParticipantResponse { - joined_at: number; + joined_at: TimestampNS; role: string; user_session_id: string; /** @@ -3233,14 +3256,14 @@ export interface CallParticipantResponse { export interface CallParticipantTimeline { severity: string; - timestamp: number; + timestamp: TimestampNS; type: string; data: Record; } export interface CallReactionEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; reaction: VideoReactionResponse; /** * The type of event: "call.reaction_new" in this case @@ -3249,17 +3272,17 @@ export interface CallReactionEvent { } export interface CallRecording { - end_time: number; + end_time: TimestampNS; filename: string; recording_type: string; session_id: string; - start_time: number; + start_time: TimestampNS; url: string; } export interface CallRecordingFailedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; egress_id: string; /** * The type of recording @@ -3273,7 +3296,7 @@ export interface CallRecordingFailedEvent { export interface CallRecordingReadyEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; egress_id: string; /** * The type of recording @@ -3291,7 +3314,7 @@ export interface CallRecordingReadyEvent { export interface CallRecordingStartedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; egress_id: string; /** * The type of recording @@ -3305,7 +3328,7 @@ export interface CallRecordingStartedEvent { export interface CallRecordingStoppedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; egress_id: string; /** * The type of recording @@ -3319,7 +3342,7 @@ export interface CallRecordingStoppedEvent { export interface CallRejectedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Represents a call */ @@ -3340,8 +3363,8 @@ export interface CallRejectedEvent { export interface CallReportResponse { score: number; - ended_at?: number; - started_at?: number; + ended_at?: TimestampNS; + started_at?: TimestampNS; } export interface CallRequest { @@ -3369,7 +3392,7 @@ export interface CallResponse { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; current_session_id: string; /** * Call ID @@ -3385,7 +3408,7 @@ export interface CallResponse { /** * Date/time of the last update */ - updated_at: number; + updated_at: TimestampNS; blocked_user_ids: Array; /** * User response object @@ -3405,7 +3428,7 @@ export interface CallResponse { /** * Date/time when the call ended */ - ended_at?: number; + ended_at?: TimestampNS; join_ahead_time_seconds?: number; /** * 10-digit routing number for SIP routing @@ -3414,7 +3437,7 @@ export interface CallResponse { /** * Date/time when the call will start */ - starts_at?: number; + starts_at?: TimestampNS; team?: string; session?: CallSessionResponse; thumbnails?: ThumbnailResponse; @@ -3422,7 +3445,7 @@ export interface CallResponse { export interface CallRingEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Call session ID */ @@ -3458,7 +3481,7 @@ export interface CallRtmpBroadcastFailedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Name of the given RTMP broadcast */ @@ -3477,7 +3500,7 @@ export interface CallRtmpBroadcastStartedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Name of the given RTMP broadcast */ @@ -3496,7 +3519,7 @@ export interface CallRtmpBroadcastStoppedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Name of the given RTMP broadcast */ @@ -3515,7 +3538,7 @@ export interface CallRuleActionSequence { export interface CallSessionEndedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Call session ID */ @@ -3533,7 +3556,7 @@ export interface CallSessionEndedEvent { export interface CallSessionParticipantCountsUpdatedEvent { anonymous_participant_count: number; call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Call session ID */ @@ -3547,7 +3570,7 @@ export interface CallSessionParticipantCountsUpdatedEvent { export interface CallSessionParticipantJoinedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Call session ID */ @@ -3561,7 +3584,7 @@ export interface CallSessionParticipantJoinedEvent { export interface CallSessionParticipantLeftEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * The duration participant was in the session in seconds */ @@ -3585,20 +3608,20 @@ export interface CallSessionResponse { anonymous_participant_count: number; id: string; participants: Array; - accepted_by: Record; - missed_by: Record; + accepted_by: Record; + missed_by: Record; participants_count_by_role: Record; - rejected_by: Record; - ended_at?: number; - live_ended_at?: number; - live_started_at?: number; - started_at?: number; - timer_ends_at?: number; + rejected_by: Record; + ended_at?: TimestampNS; + live_ended_at?: TimestampNS; + live_started_at?: TimestampNS; + started_at?: TimestampNS; + timer_ends_at?: TimestampNS; } export interface CallSessionStartedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Call session ID */ @@ -3744,7 +3767,7 @@ export interface CallStatsMapSubscribers { export interface CallStatsParticipant { user_id: string; sessions: Array; - latest_activity_at?: number; + latest_activity_at?: TimestampNS; name?: string; roles?: Array; } @@ -3777,7 +3800,7 @@ export interface CallStatsParticipantSession { current_ip?: string; current_sfu?: string; distance_to_sfu_kilometers?: number; - ended_at?: number; + ended_at?: TimestampNS; freezes_duration_ms?: number; ingress?: string; jitter_ms?: number; @@ -3786,7 +3809,7 @@ export interface CallStatsParticipantSession { publisher_type?: string; sdk?: string; sdk_version?: string; - started_at?: number; + started_at?: TimestampNS; unified_session_id?: string; webrtc_version?: string; location?: CallStatsLocation; @@ -3794,7 +3817,7 @@ export interface CallStatsParticipantSession { export interface CallStatsReportReadyEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Call session ID */ @@ -3819,8 +3842,8 @@ export interface CallStatsReportSummaryResponse { call_duration_seconds: number; call_session_id: string; call_status: string; - first_stats_time: number; - created_at?: number; + first_stats_time: TimestampNS; + created_at?: TimestampNS; min_user_rating?: number; quality_score?: number; } @@ -3829,23 +3852,23 @@ export interface CallStatsSessionResponse { call_id: string; call_session_id: string; call_type: string; - generated_at: number; + generated_at: TimestampNS; counts: CallStatsParticipantCounts; - call_ended_at?: number; - call_started_at?: number; + call_ended_at?: TimestampNS; + call_started_at?: TimestampNS; } export interface CallTranscription { - end_time: number; + end_time: TimestampNS; filename: string; session_id: string; - start_time: number; + start_time: TimestampNS; url: string; } export interface CallTranscriptionFailedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; egress_id: string; /** * The type of event: "call.transcription_failed" in this case @@ -3859,7 +3882,7 @@ export interface CallTranscriptionFailedEvent { export interface CallTranscriptionReadyEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; egress_id: string; /** * CallTranscription represents a transcription of a call. @@ -3873,7 +3896,7 @@ export interface CallTranscriptionReadyEvent { export interface CallTranscriptionStartedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; egress_id: string; /** * The type of event: "call.transcription_started" in this case @@ -3883,7 +3906,7 @@ export interface CallTranscriptionStartedEvent { export interface CallTranscriptionStoppedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; egress_id: string; /** * The type of event: "call.transcription_stopped" in this case @@ -3893,11 +3916,11 @@ export interface CallTranscriptionStoppedEvent { export interface CallType { app: number; - created_at: number; + created_at: TimestampNS; id: number; name: string; recording_external_storage: string; - updated_at: number; + updated_at: TimestampNS; notification_settings?: NotificationSettings; settings?: CallSettings; } @@ -3906,7 +3929,7 @@ export interface CallTypeResponse { /** * the time the call type was created */ - created_at: number; + created_at: TimestampNS; /** * the name of the call type */ @@ -3914,7 +3937,7 @@ export interface CallTypeResponse { /** * the time the call type was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * the permissions granted to each role */ @@ -3933,7 +3956,7 @@ export interface CallTypeRuleParameters { export interface CallUpdatedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Represents a call */ @@ -3950,7 +3973,7 @@ export interface CallUpdatedEvent { export interface CallUserFeedbackSubmittedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * The rating given by the user (1-5) */ @@ -3981,7 +4004,7 @@ export interface CallUserFeedbackSubmittedEvent { export interface CallUserMutedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; from_user_id: string; reason: string; muted_user_ids: Array; @@ -4020,10 +4043,10 @@ export interface CampaignChannelTemplate { } export interface CampaignCompletedEvent { - created_at: number; + created_at: TimestampNS; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; campaign?: CampaignResponse; } @@ -4037,7 +4060,7 @@ export interface CampaignMessageTemplate { export interface CampaignResponse { create_channels: boolean; - created_at: number; + created_at: TimestampNS; description: string; id: string; name: string; @@ -4048,14 +4071,14 @@ export interface CampaignResponse { skip_push: boolean; skip_webhook: boolean; status: string; - updated_at: number; + updated_at: TimestampNS; segment_ids: Array; segments: Array; user_ids: Array; users: Array; stats: CampaignStatsResponse; - scheduled_for?: number; - stop_at?: number; + scheduled_for?: TimestampNS; + stop_at?: TimestampNS; channel_template?: CampaignChannelTemplate; message_template?: CampaignMessageTemplate; /** @@ -4065,19 +4088,19 @@ export interface CampaignResponse { } export interface CampaignStartedEvent { - created_at: number; + created_at: TimestampNS; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; campaign?: CampaignResponse; } export interface CampaignStatsResponse { progress: number; stats_channels_created: number; - stats_completed_at: number; + stats_completed_at: TimestampNS; stats_messages_sent: number; - stats_started_at: number; + stats_started_at: TimestampNS; stats_users_read: number; stats_users_sent: number; } @@ -4117,9 +4140,9 @@ export interface ChangeFeedVisibilityResponse { } export interface ChannelBatchCompletedEvent { - batch_created_at: number; - created_at: number; - finished_at: number; + batch_created_at: TimestampNS; + created_at: TimestampNS; + finished_at: TimestampNS; operation: string; status: string; success_channels_count: number; @@ -4127,7 +4150,7 @@ export interface ChannelBatchCompletedEvent { failed_channels: Array; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; } export interface ChannelBatchMemberRequest { @@ -4136,9 +4159,9 @@ export interface ChannelBatchMemberRequest { } export interface ChannelBatchStartedEvent { - batch_created_at: number; - created_at: number; - finished_at: number; + batch_created_at: TimestampNS; + created_at: TimestampNS; + finished_at: TimestampNS; operation: string; status: string; success_channels_count: number; @@ -4146,7 +4169,7 @@ export interface ChannelBatchStartedEvent { failed_channels: Array; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; } export interface ChannelBatchUpdateRequest { @@ -4168,12 +4191,10 @@ export interface ChannelBatchUpdateRequest { * Filter to apply to the query */ filter: Record; - /** * Required with the `addMembersHideHistory` operation, and rejected with every other operation including `addMembers`. Hides each matched channel's history before this time from the members the operation adds. Members that already belong to a matched channel are never affected. Must be in RFC3339 format (e.g., "2024-01-01T10:00:00Z") and in the past. */ hide_history_before?: Date; - /** * For updateData only. Requires a root cids $eq or $in filter with at most 100 CIDs and no root $or/$and. Split larger selections into requests of at most 100 CIDs. A success_channels_count response means the database update completed; a task_id response means it was queued and must be polled, including on older API nodes. */ @@ -4192,12 +4213,10 @@ export interface ChannelBatchUpdateRequest { export interface ChannelBatchUpdateResponse { duration: string; - /** * Positive count of channels selected for a completed synchronous database update, not an affected-row count. Concurrent deletion may reduce the rows written. task_id is absent. */ success_channels_count?: number; - /** * Present for asynchronous updates. Poll this task even if synchronous was requested: an older API node may have queued the update. */ @@ -4209,7 +4228,7 @@ export interface ChannelConfig { automod_behavior: 'flag' | 'block' | 'shadow_block'; connect_events: boolean; count_messages: boolean; - created_at: number; + created_at: TimestampNS; custom_events: boolean; delivery_events: boolean; mark_messages_pending: boolean; @@ -4228,7 +4247,7 @@ export interface ChannelConfig { shared_locations: boolean; skip_last_msg_update_for_system_msgs: boolean; typing_events: boolean; - updated_at: number; + updated_at: TimestampNS; uploads: boolean; url_enrichment: boolean; user_message_reminders: boolean; @@ -4310,7 +4329,7 @@ export interface ChannelConfigWithInfo { automod_behavior: 'flag' | 'block' | 'shadow_block'; connect_events: boolean; count_messages: boolean; - created_at: number; + created_at: TimestampNS; custom_events: boolean; delivery_events: boolean; mark_messages_pending: boolean; @@ -4329,7 +4348,7 @@ export interface ChannelConfigWithInfo { shared_locations: boolean; skip_last_msg_update_for_system_msgs: boolean; typing_events: boolean; - updated_at: number; + updated_at: TimestampNS; uploads: boolean; url_enrichment: boolean; user_message_reminders: boolean; @@ -4372,7 +4391,7 @@ export interface ChannelCreatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Represents channel in chat */ @@ -4399,7 +4418,7 @@ export interface ChannelCreatedEvent { * The CID of the channel which was created */ cid?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -4425,7 +4444,7 @@ export interface ChannelDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Represents channel in chat */ @@ -4452,7 +4471,7 @@ export interface ChannelDeletedEvent { * The CID of the channel which was deleted */ cid?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -4485,7 +4504,7 @@ export interface ChannelFrozenEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; /** * The type of event: "channel.frozen" in this case @@ -4503,7 +4522,7 @@ export interface ChannelFrozenEvent { * The CID of the channel which was frozen */ cid?: string; - received_at?: number; + received_at?: TimestampNS; } export interface ChannelGetOrCreateRequest { @@ -4534,7 +4553,7 @@ export interface ChannelHiddenEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Represents channel in chat */ @@ -4561,7 +4580,7 @@ export interface ChannelHiddenEvent { * The CID of the channel which was hidden */ cid?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -4660,7 +4679,7 @@ export interface ChannelMemberResponse { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; notifications_muted: boolean; /** * Whether member is shadow banned in this channel or not @@ -4669,30 +4688,30 @@ export interface ChannelMemberResponse { /** * Date/time of the last update */ - updated_at: number; + updated_at: TimestampNS; custom: Record; - archived_at?: number; + archived_at?: TimestampNS; /** * Expiration date of the ban */ - ban_expires?: number; + ban_expires?: TimestampNS; /** * Whether the member's ban also applies to channels the channel's creator will create in the future (an active future channel ban by the creator targets this member) */ ban_from_future_channels?: boolean; - deleted_at?: number; + deleted_at?: TimestampNS; /** * Expiration date of the future channel ban; absent when the future channel ban is permanent */ - future_channel_ban_expires?: number; + future_channel_ban_expires?: TimestampNS; /** * Date when invite was accepted */ - invite_accepted_at?: number; + invite_accepted_at?: TimestampNS; /** * Date when invite was rejected */ - invite_rejected_at?: number; + invite_rejected_at?: TimestampNS; /** * Whether member was invited or not */ @@ -4701,7 +4720,7 @@ export interface ChannelMemberResponse { * Whether member is channel moderator or not */ is_moderator?: boolean; - pinned_at?: number; + pinned_at?: TimestampNS; /** * Permission level of the member in the channel (DEPRECATED: use channel_role instead). One of: member, moderator, admin, owner */ @@ -4736,7 +4755,7 @@ export interface ChannelMetadata { id: string; type: string; custom: Record; - last_message_at?: number; + last_message_at?: TimestampNS; member_count?: number; message_count?: number; push_level?: string; @@ -4747,15 +4766,15 @@ export interface ChannelMute { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Date/time of the last update */ - updated_at: number; + updated_at: TimestampNS; /** * Date/time of mute expiration */ - expires?: number; + expires?: TimestampNS; /** * Represents channel in chat */ @@ -4770,13 +4789,13 @@ export interface ChannelMutedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; /** * The type of event: "channel.muted" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; /** * The mute objects */ @@ -4835,7 +4854,7 @@ export type ChannelOwnCapability = export interface ChannelPushPreferencesResponse { chat_level?: string; - disabled_until?: number; + disabled_until?: TimestampNS; chat_preferences?: ChatPreferencesResponse; } @@ -4847,7 +4866,7 @@ export interface ChannelResponse { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; disabled: boolean; /** * Whether channel is frozen or not @@ -4864,7 +4883,7 @@ export interface ChannelResponse { /** * Date/time of the last update */ - updated_at: number; + updated_at: TimestampNS; /** * Custom data for this object */ @@ -4888,7 +4907,7 @@ export interface ChannelResponse { /** * Date/time of deletion */ - deleted_at?: number; + deleted_at?: TimestampNS; /** * Whether this channel is hidden by current user or not */ @@ -4896,11 +4915,11 @@ export interface ChannelResponse { /** * Date since when the message history is accessible */ - hide_messages_before?: number; + hide_messages_before?: TimestampNS; /** * Date of the last message sent */ - last_message_at?: number; + last_message_at?: TimestampNS; /** * Number of members in the channel */ @@ -4912,7 +4931,7 @@ export interface ChannelResponse { /** * Date of mute expiration */ - mute_expires_at?: number; + mute_expires_at?: TimestampNS; /** * Whether this channel is muted or not */ @@ -4924,7 +4943,7 @@ export interface ChannelResponse { /** * Date of the latest truncation of the channel */ - truncated_at?: number; + truncated_at?: TimestampNS; /** * List of filter tags associated with the channel */ @@ -4955,7 +4974,7 @@ export interface ChannelStateResponse { pinned_messages: Array; threads: Array; hidden?: boolean; - hide_messages_before?: number; + hide_messages_before?: TimestampNS; watcher_count?: number; active_live_locations?: Array; pending_messages?: Array; @@ -4991,7 +5010,7 @@ export interface ChannelStateResponseFields { /** * Messages before this date are hidden from the user */ - hide_messages_before?: number; + hide_messages_before?: TimestampNS; /** * Number of channel watchers */ @@ -5025,7 +5044,7 @@ export interface ChannelTruncatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Represents channel in chat */ @@ -5053,7 +5072,7 @@ export interface ChannelTruncatedEvent { */ cid?: string; message_id?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -5071,7 +5090,7 @@ export interface ChannelTypeConfig { automod_behavior: 'flag' | 'block' | 'shadow_block'; connect_events: boolean; count_messages: boolean; - created_at: number; + created_at: TimestampNS; custom_events: boolean; delivery_events: boolean; mark_messages_pending: boolean; @@ -5090,7 +5109,7 @@ export interface ChannelTypeConfig { shared_locations: boolean; skip_last_msg_update_for_system_msgs: boolean; typing_events: boolean; - updated_at: number; + updated_at: TimestampNS; uploads: boolean; url_enrichment: boolean; user_message_reminders: boolean; @@ -5115,7 +5134,7 @@ export interface ChannelUnFrozenEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; /** * The type of event: "channel.unfrozen" in this case @@ -5133,20 +5152,20 @@ export interface ChannelUnFrozenEvent { * The CID of the channel which was unfrozen */ cid?: string; - received_at?: number; + received_at?: TimestampNS; } export interface ChannelUnmutedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; /** * The type of event: "channel.unmuted" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; /** * The mute objects */ @@ -5159,7 +5178,7 @@ export interface ChannelUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Represents channel in chat */ @@ -5187,7 +5206,7 @@ export interface ChannelUpdatedEvent { */ cid?: string; message_id?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -5204,7 +5223,7 @@ export interface ChannelVisibleEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Represents channel in chat */ @@ -5231,7 +5250,7 @@ export interface ChannelVisibleEvent { * The CID of the channel which was shown */ cid?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -5262,7 +5281,7 @@ export interface ChatDraftPayloadResponse { export interface ChatDraftResponse { channel_cid: string; - created_at: number; + created_at: TimestampNS; message: ChatDraftPayloadResponse; parent_id?: string; parent_message?: ChatMessageResponse; @@ -5271,7 +5290,7 @@ export interface ChatDraftResponse { export interface ChatMessageResponse { cid: string; - created_at: number; + created_at: TimestampNS; deleted_reply_count: number; html: string; id: string; @@ -5283,7 +5302,7 @@ export interface ChatMessageResponse { silent: boolean; text: string; type: string; - updated_at: number; + updated_at: TimestampNS; attachments: Array; latest_reactions: Array; mentioned_users: Array; @@ -5297,13 +5316,13 @@ export interface ChatMessageResponse { */ user: UserResponse; command?: string; - deleted_at?: number; + deleted_at?: TimestampNS; deleted_for_me?: boolean; - message_text_updated_at?: number; + message_text_updated_at?: TimestampNS; mml?: string; parent_id?: string; - pin_expires?: number; - pinned_at?: number; + pin_expires?: TimestampNS; + pinned_at?: TimestampNS; poll_id?: string; quoted_message_id?: string; show_in_channel?: boolean; @@ -5371,14 +5390,14 @@ export interface ChatPreferencesResponse { export interface ChatReactionGroupResponse { count: number; - first_reaction_at: number; - last_reaction_at: number; + first_reaction_at: TimestampNS; + last_reaction_at: TimestampNS; sum_scores: number; latest_reactions_by: Array; } export interface ChatReactionGroupUserResponse { - created_at: number; + created_at: TimestampNS; user_id: string; /** * User response object @@ -5387,11 +5406,11 @@ export interface ChatReactionGroupUserResponse { } export interface ChatReactionResponse { - created_at: number; + created_at: TimestampNS; message_id: string; score: number; type: string; - updated_at: number; + updated_at: TimestampNS; user_id: string; custom: Record; /** @@ -5402,11 +5421,11 @@ export interface ChatReactionResponse { export interface ChatReminderResponseData { channel_cid: string; - created_at: number; + created_at: TimestampNS; message_id: string; - updated_at: number; + updated_at: TimestampNS; user_id: string; - remind_at?: number; + remind_at?: TimestampNS; message?: ChatMessageResponse; /** * User response object @@ -5416,14 +5435,14 @@ export interface ChatReminderResponseData { export interface ChatSharedLocationResponseData { channel_cid: string; - created_at: number; + created_at: TimestampNS; created_by_device_id: string; latitude: number; longitude: number; message_id: string; - updated_at: number; + updated_at: TimestampNS; user_id: string; - end_at?: number; + end_at?: TimestampNS; message?: ChatMessageResponse; } @@ -5737,7 +5756,6 @@ export interface ClientEvent { * Identifier of the SFU the client was attempting to connect to. Required on WSJoin and PeerConnectionConnect failure, and on FirstAudioFrame and FirstVideoFrame. */ sfu_id?: string; - /** * Source of the coordinator join. Optional on CoordinatorJoin events; omitted when not provided. */ @@ -5784,7 +5802,7 @@ export interface ClientOSDataResponse { export interface ClosedCaptionEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * CallClosedCaption represents a closed caption of a call. */ @@ -5850,11 +5868,11 @@ export interface CollectionResponse { /** * When the collection was created */ - created_at?: number; + created_at?: TimestampNS; /** * When the collection was last updated */ - updated_at?: number; + updated_at?: TimestampNS; /** * ID of the user who owns this collection */ @@ -5885,18 +5903,18 @@ export interface Command { /** * Date/time of creation */ - created_at?: number; + created_at?: TimestampNS; /** * Date/time of the last update */ - updated_at?: number; + updated_at?: TimestampNS; } export interface CommentAddedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; activity: ActivityResponse; comment: CommentResponse; @@ -5906,7 +5924,7 @@ export interface CommentAddedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -5914,7 +5932,7 @@ export interface CommentDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; comment: CommentResponse; custom: Record; @@ -5923,7 +5941,7 @@ export interface CommentDeletedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -5931,7 +5949,7 @@ export interface CommentReactionAddedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; activity: ActivityResponse; comment: CommentResponse; @@ -5942,7 +5960,7 @@ export interface CommentReactionAddedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -5950,7 +5968,7 @@ export interface CommentReactionDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; comment: CommentResponse; custom: Record; @@ -5960,14 +5978,14 @@ export interface CommentReactionDeletedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; } export interface CommentReactionUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; activity: ActivityResponse; comment: CommentResponse; @@ -5978,7 +5996,7 @@ export interface CommentReactionUpdatedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -5991,7 +6009,7 @@ export interface CommentResponse { /** * When the comment was created */ - created_at: number; + created_at: TimestampNS; /** * Number of downvotes for this comment */ @@ -6027,7 +6045,7 @@ export interface CommentResponse { /** * When the comment was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * Number of upvotes for this comment */ @@ -6051,11 +6069,11 @@ export interface CommentResponse { /** * When the comment was deleted */ - deleted_at?: number; + deleted_at?: TimestampNS; /** * When the comment was last edited */ - edited_at?: number; + edited_at?: TimestampNS; /** * ID of parent comment for nested replies */ @@ -6088,7 +6106,7 @@ export interface CommentRestoredEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; comment: CommentResponse; custom: Record; @@ -6097,7 +6115,7 @@ export interface CommentRestoredEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -6105,7 +6123,7 @@ export interface CommentUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; comment: CommentResponse; custom: Record; @@ -6114,7 +6132,7 @@ export interface CommentUpdatedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -6201,7 +6219,7 @@ export interface ConfigResponse { /** * When the configuration was created */ - created_at: number; + created_at: TimestampNS; /** * Unique identifier for the moderation configuration */ @@ -6213,7 +6231,7 @@ export interface ConfigResponse { /** * When the configuration was last updated */ - updated_at: number; + updated_at: TimestampNS; supported_video_call_harm_types: Array; /** * Configurable image moderation label definitions for dashboard rendering @@ -6271,7 +6289,7 @@ export interface CoordinatesResponse { export interface CountByMinuteResponse { count: number; - start_ts: number; + start_ts: TimestampNS; } export interface Coverage { @@ -6340,7 +6358,7 @@ export interface CreateCallTypeResponse { /** * the time the call type was created */ - created_at: number; + created_at: TimestampNS; duration: string; /** * the name of the call type @@ -6349,7 +6367,7 @@ export interface CreateCallTypeResponse { /** * the time the call type was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * the permissions granted to each role */ @@ -6549,7 +6567,7 @@ export interface CreateChannelTypeResponse { automod_behavior: 'flag' | 'block' | 'shadow_block'; connect_events: boolean; count_messages: boolean; - created_at: number; + created_at: TimestampNS; custom_events: boolean; delivery_events: boolean; duration: string; @@ -6569,7 +6587,7 @@ export interface CreateChannelTypeResponse { shared_locations: boolean; skip_last_msg_update_for_system_msgs: boolean; typing_events: boolean; - updated_at: number; + updated_at: TimestampNS; uploads: boolean; url_enrichment: boolean; user_message_reminders: boolean; @@ -6726,7 +6744,6 @@ export interface CreateFeedGroupRequest { */ activity_selectors?: Array; activity_filter?: ActivityFilterConfig; - activity_marks?: ActivityMarksConfig; activity_processing?: ActivityProcessingConfig; aggregation?: AggregationConfig; @@ -6847,7 +6864,7 @@ export interface CreateImportV2TaskRequest { export interface CreateImportV2TaskResponse { app_pk: number; - created_at: number; + created_at: TimestampNS; /** * Duration of the request in milliseconds */ @@ -6855,7 +6872,7 @@ export interface CreateImportV2TaskResponse { id: string; product: string; state: number; - updated_at: number; + updated_at: TimestampNS; settings: ImportV2TaskSettings; } @@ -7242,15 +7259,15 @@ export interface CustomCheckResponse { } export interface CustomEvent { - created_at: number; + created_at: TimestampNS; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; } export interface CustomVideoEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Custom data for this object */ @@ -7811,15 +7828,6 @@ export interface DeleteTranscriptionResponse { duration: string; } -export interface DeleteUserInterestsResponse { - duration: string; - - /** - * Interest tags still set on the user - */ - interests: Array; -} - export interface DeleteUserInterestsResponse { duration: string; /** @@ -7978,7 +7986,7 @@ export interface DeviceResponse { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Device ID */ @@ -8064,7 +8072,7 @@ export interface DraftPayloadResponse { export interface DraftResponse { channel_cid: string; - created_at: number; + created_at: TimestampNS; /** * Contains the draft message content */ @@ -8119,7 +8127,7 @@ export interface EgressHLSResponse { export interface EgressRTMPResponse { name: string; - started_at: number; + started_at: TimestampNS; stream_key?: string; stream_url?: string; } @@ -8206,11 +8214,11 @@ export interface EnrichedCollectionResponse { /** * When the collection was created */ - created_at?: number; + created_at?: TimestampNS; /** * When the collection was last updated */ - updated_at?: number; + updated_at?: TimestampNS; /** * ID of the user who owns this collection */ @@ -8326,7 +8334,7 @@ export interface EntityCreatorResponse { */ ban_count: number; banned: boolean; - created_at: number; + created_at: TimestampNS; /** * Number of major actions performed on the user */ @@ -8341,19 +8349,19 @@ export interface EntityCreatorResponse { online: boolean; role: string; shadow_banned: boolean; - updated_at: number; + updated_at: TimestampNS; blocked_user_ids: Array; teams: Array; custom: Record; avg_response_time?: number; - ban_expires?: number; + ban_expires?: TimestampNS; bypass_moderation?: boolean; - deactivated_at?: number; - deleted_at?: number; + deactivated_at?: TimestampNS; + deleted_at?: TimestampNS; image?: string; - last_active?: number; + last_active?: TimestampNS; name?: string; - revoke_tokens_issued_before?: number; + revoke_tokens_issued_before?: TimestampNS; devices?: Array; privacy_settings?: PrivacySettingsResponse; push_notifications?: PushNotificationSettingsResponse; @@ -8565,7 +8573,7 @@ export interface FeedCreatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; members: Array; custom: Record; @@ -8576,14 +8584,14 @@ export interface FeedCreatedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; } export interface FeedDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; custom: Record; /** @@ -8591,23 +8599,23 @@ export interface FeedDeletedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } export interface FeedGroup { aggregation_version: number; app_pk: number; - created_at: number; + created_at: TimestampNS; default_follower_role: string; default_visibility: string; group_id: string; - updated_at: number; + updated_at: TimestampNS; activity_processors: Array; activity_selectors: Array; custom: Record; - deleted_at?: number; - last_feed_get_at?: number; + deleted_at?: TimestampNS; + last_feed_get_at?: TimestampNS; activity_filter?: ActivityFilterConfig; aggregation?: AggregationConfig; notification?: NotificationConfig; @@ -8620,7 +8628,7 @@ export interface FeedGroupChangedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; custom: Record; /** @@ -8628,7 +8636,7 @@ export interface FeedGroupChangedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; feed_group?: FeedGroup; user?: UserResponseCommonFields; } @@ -8637,7 +8645,7 @@ export interface FeedGroupDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; /** * The ID of the feed group that was deleted @@ -8649,14 +8657,14 @@ export interface FeedGroupDeletedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; } export interface FeedGroupResponse { /** * When the feed group was created */ - created_at: number; + created_at: TimestampNS; /** * Identifier within the group */ @@ -8664,7 +8672,7 @@ export interface FeedGroupResponse { /** * When the feed group was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * Role new followers of feeds in this group are given. Either a built-in (feed_follower, feed_member_viewer) or any role your app has defined. Empty means feed_follower. Applied when the follow is accepted, so a follow that starts pending picks it up on approval */ @@ -8674,7 +8682,7 @@ export interface FeedGroupResponse { */ default_visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private'; - deleted_at?: number; + deleted_at?: TimestampNS; /** * Configuration for activity processors */ @@ -8684,7 +8692,6 @@ export interface FeedGroupResponse { */ activity_selectors?: Array; activity_filter?: ActivityFilterConfig; - activity_marks?: ActivityMarksConfig; activity_processing?: ActivityProcessingConfig; aggregation?: AggregationConfig; @@ -8702,7 +8709,7 @@ export interface FeedGroupRestoredEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; /** * The ID of the feed group that was restored @@ -8714,7 +8721,7 @@ export interface FeedGroupRestoredEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; } export interface FeedGroupScope { @@ -8742,7 +8749,7 @@ export interface FeedMemberAddedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; custom: Record; member: FeedMemberResponse; @@ -8751,7 +8758,7 @@ export interface FeedMemberAddedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -8759,7 +8766,7 @@ export interface FeedMemberRemovedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; member_id: string; custom: Record; @@ -8768,7 +8775,7 @@ export interface FeedMemberRemovedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -8799,7 +8806,7 @@ export interface FeedMemberResponse { /** * When the membership was created */ - created_at: number; + created_at: TimestampNS; /** * Role of the member in the feed */ @@ -8811,7 +8818,7 @@ export interface FeedMemberResponse { /** * When the membership was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * User response object */ @@ -8819,11 +8826,11 @@ export interface FeedMemberResponse { /** * When the invite was accepted */ - invite_accepted_at?: number; + invite_accepted_at?: TimestampNS; /** * When the invite was rejected */ - invite_rejected_at?: number; + invite_rejected_at?: TimestampNS; /** * Custom data for the membership */ @@ -8835,7 +8842,7 @@ export interface FeedMemberUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; custom: Record; member: FeedMemberResponse; @@ -8844,7 +8851,7 @@ export interface FeedMemberUpdatedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -8944,7 +8951,7 @@ export interface FeedResponse { /** * When the feed was created */ - created_at: number; + created_at: TimestampNS; /** * Description of the feed */ @@ -8984,7 +8991,7 @@ export interface FeedResponse { /** * When the feed was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * User response object */ @@ -8992,7 +8999,7 @@ export interface FeedResponse { /** * When the feed was deleted */ - deleted_at?: number; + deleted_at?: TimestampNS; /** * Visibility setting for the feed */ @@ -9026,7 +9033,7 @@ export interface FeedSuggestionResponse { /** * When the feed was created */ - created_at: number; + created_at: TimestampNS; /** * Description of the feed */ @@ -9066,7 +9073,7 @@ export interface FeedSuggestionResponse { /** * When the feed was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * User response object */ @@ -9074,7 +9081,7 @@ export interface FeedSuggestionResponse { /** * When the feed was deleted */ - deleted_at?: number; + deleted_at?: TimestampNS; reason?: string; recommendation_score?: number; /** @@ -9107,7 +9114,7 @@ export interface FeedSuggestionResponse { } export interface FeedUpdatedEvent { - created_at: number; + created_at: TimestampNS; fid: string; custom: Record; feed: FeedResponse; @@ -9116,7 +9123,7 @@ export interface FeedUpdatedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -9128,7 +9135,7 @@ export interface FeedViewResponse { /** * When the feed view was last used */ - last_used_at?: number; + last_used_at?: TimestampNS; /** * Configured activity selectors */ @@ -9158,10 +9165,10 @@ export interface FeedsActivityLocation { } export interface FeedsBookmarkResponse { - created_at: number; + created_at: TimestampNS; object_id: string; object_type: string; - updated_at: number; + updated_at: TimestampNS; /** * User response object */ @@ -9171,18 +9178,18 @@ export interface FeedsBookmarkResponse { } export interface FeedsEnrichedCollectionResponse { - created_at: number; + created_at: TimestampNS; id: string; name: string; status: string; - updated_at: number; + updated_at: TimestampNS; user_id: string; custom: Record; } export interface FeedsFeedResponse { activity_count: number; - created_at: number; + created_at: TimestampNS; description: string; feed: string; follower_count: number; @@ -9192,12 +9199,12 @@ export interface FeedsFeedResponse { member_count: number; name: string; pin_count: number; - updated_at: number; + updated_at: TimestampNS; /** * User response object */ created_by: UserResponse; - deleted_at?: number; + deleted_at?: TimestampNS; visibility?: string; filter_tags?: Array; custom?: Record; @@ -9302,15 +9309,15 @@ export interface FeedsPreferencesResponse { export interface FeedsReactionGroupResponse { count: number; - first_reaction_at: number; - last_reaction_at: number; + first_reaction_at: TimestampNS; + last_reaction_at: TimestampNS; } export interface FeedsReactionResponse { activity_id: string; - created_at: number; + created_at: TimestampNS; type: string; - updated_at: number; + updated_at: TimestampNS; /** * User response object */ @@ -9321,7 +9328,7 @@ export interface FeedsReactionResponse { export interface FeedsShareResponse { activity_id: string; - created_at: number; + created_at: TimestampNS; /** * User response object */ @@ -9331,7 +9338,7 @@ export interface FeedsShareResponse { export interface FeedsV3ActivityResponse { bookmark_count: number; comment_count: number; - created_at: number; + created_at: TimestampNS; hidden: boolean; id: string; popularity: number; @@ -9341,7 +9348,7 @@ export interface FeedsV3ActivityResponse { score: number; share_count: number; type: string; - updated_at: number; + updated_at: TimestampNS; visibility: string; attachments: Array; comments: Array; @@ -9360,9 +9367,9 @@ export interface FeedsV3ActivityResponse { * User response object */ user: UserResponse; - deleted_at?: number; - edited_at?: number; - expires_at?: number; + deleted_at?: TimestampNS; + edited_at?: TimestampNS; + expires_at?: TimestampNS; friend_reaction_count?: number; is_read?: boolean; is_seen?: boolean; @@ -9387,7 +9394,7 @@ export interface FeedsV3ActivityResponse { export interface FeedsV3CommentResponse { bookmark_count: number; confidence_score: number; - created_at: number; + created_at: TimestampNS; downvote_count: number; id: string; object_id: string; @@ -9396,7 +9403,7 @@ export interface FeedsV3CommentResponse { reply_count: number; score: number; status: string; - updated_at: number; + updated_at: TimestampNS; upvote_count: number; mentioned_users: Array; own_reactions: Array; @@ -9405,8 +9412,8 @@ export interface FeedsV3CommentResponse { */ user: UserResponse; controversy_score?: number; - deleted_at?: number; - edited_at?: number; + deleted_at?: TimestampNS; + edited_at?: TimestampNS; parent_id?: string; text?: string; attachments?: Array; @@ -9519,7 +9526,7 @@ export interface FlagDetailsResponse { } export interface FlagFeedbackResponse { - created_at: number; + created_at: TimestampNS; message_id: string; labels: Array; } @@ -9569,13 +9576,13 @@ export interface FlagRequest { } export interface FlagResponse { - created_at: number; + created_at: TimestampNS; created_by_automod: boolean; - updated_at: number; - approved_at?: number; + updated_at: TimestampNS; + approved_at?: TimestampNS; reason?: string; - rejected_at?: number; - reviewed_at?: number; + rejected_at?: TimestampNS; + reviewed_at?: TimestampNS; reviewed_by?: string; target_message_id?: string; custom?: Record; @@ -9595,10 +9602,10 @@ export interface FlagResponse { } export interface FlagUpdatedEvent { - created_at: number; + created_at: TimestampNS; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; /** * User response object */ @@ -9684,7 +9691,7 @@ export interface FollowCreatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; custom: Record; follow: FollowResponse; @@ -9693,14 +9700,14 @@ export interface FollowCreatedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; } export interface FollowDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; custom: Record; follow: FollowResponse; @@ -9709,7 +9716,7 @@ export interface FollowDeletedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; } export interface FollowRequest { @@ -9764,7 +9771,7 @@ export interface FollowResponse { /** * When the follow relationship was created */ - created_at: number; + created_at: TimestampNS; /** * Role of the follower (source user) in the follow relationship, as stored. A reserved name, or a role your app no longer defines, is reported as stored but evaluated as 'feed_follower'. */ @@ -9780,17 +9787,17 @@ export interface FollowResponse { /** * When the follow relationship was last updated */ - updated_at: number; + updated_at: TimestampNS; source_feed: FeedResponse; target_feed: FeedResponse; /** * When the follow request was accepted */ - request_accepted_at?: number; + request_accepted_at?: TimestampNS; /** * When the follow request was rejected */ - request_rejected_at?: number; + request_rejected_at?: TimestampNS; /** * Custom data for the follow relationship */ @@ -9801,7 +9808,7 @@ export interface FollowUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; fid: string; custom: Record; follow: FollowResponse; @@ -9810,7 +9817,7 @@ export interface FollowUpdatedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; } export interface FrameRecordSettings { @@ -9852,7 +9859,7 @@ export interface FriendReactionsOptions { export interface FullUserResponse { banned: boolean; - created_at: number; + created_at: TimestampNS; id: string; invisible: boolean; language: string; @@ -9863,7 +9870,7 @@ export interface FullUserResponse { unread_channels: number; unread_count: number; unread_threads: number; - updated_at: number; + updated_at: TimestampNS; blocked_user_ids: Array; channel_mutes: Array; devices: Array; @@ -9871,22 +9878,22 @@ export interface FullUserResponse { teams: Array; custom: Record; avg_response_time?: number; - ban_expires?: number; + ban_expires?: TimestampNS; bypass_moderation?: boolean; - deactivated_at?: number; - deleted_at?: number; + deactivated_at?: TimestampNS; + deleted_at?: TimestampNS; image?: string; - last_active?: number; + last_active?: TimestampNS; name?: string; - revoke_tokens_issued_before?: number; + revoke_tokens_issued_before?: TimestampNS; latest_hidden_channels?: Array; privacy_settings?: PrivacySettingsResponse; teams_role?: Record; } export interface FutureChannelBanResponse { - created_at: number; - expires?: number; + created_at: TimestampNS; + expires?: TimestampNS; reason?: string; shadow?: boolean; /** @@ -9931,11 +9938,11 @@ export interface GetActiveCallsStatusResponse { /** * End time of the status period */ - end_time: number; + end_time: TimestampNS; /** * Start time of the status period */ - start_time: number; + start_time: TimestampNS; metrics?: ActiveCallsMetrics; summary?: ActiveCallsSummary; } @@ -9984,7 +9991,7 @@ export interface GetCallParticipantSessionMetricsResponse { duration: string; is_publisher?: boolean; is_subscriber?: boolean; - joined_at?: number; + joined_at?: TimestampNS; publisher_type?: string; user_id?: string; user_session_id?: string; @@ -10032,10 +10039,10 @@ export interface GetCallSessionParticipantStatsDetailsResponse { } export interface GetCallTypeResponse { - created_at: number; + created_at: TimestampNS; duration: string; name: string; - updated_at: number; + updated_at: TimestampNS; grants: Record>; notification_settings: NotificationSettingsResponse; settings: CallSettingsResponse; @@ -10056,7 +10063,7 @@ export interface GetChannelTypeResponse { automod_behavior: 'flag' | 'block' | 'shadow_block'; connect_events: boolean; count_messages: boolean; - created_at: number; + created_at: TimestampNS; custom_events: boolean; delivery_events: boolean; /** @@ -10079,7 +10086,7 @@ export interface GetChannelTypeResponse { shared_locations: boolean; skip_last_msg_update_for_system_msgs: boolean; typing_events: boolean; - updated_at: number; + updated_at: TimestampNS; uploads: boolean; url_enrichment: boolean; user_message_reminders: boolean; @@ -10106,8 +10113,8 @@ export interface GetCommandResponse { duration: string; name: string; set: string; - created_at?: number; - updated_at?: number; + created_at?: TimestampNS; + updated_at?: TimestampNS; } export interface GetCommentRepliesResponse { @@ -10203,13 +10210,13 @@ export interface GetExternalStorageGCSResponse { } export interface GetExternalStorageResponse { - created_at: number; + created_at: TimestampNS; /** * Duration of the request in milliseconds */ duration: string; type: string; - updated_at: number; + updated_at: TimestampNS; aws_s3?: GetExternalStorageAWSS3Response; gcs?: GetExternalStorageGCSResponse; } @@ -10263,12 +10270,10 @@ export interface GetFeedsRateLimitsResponse { * Rate limits for Unity platform (endpoint name -> limit info) */ unity?: Record; - /** * Rate limits for Unity console platform (endpoint name -> limit info) */ unity_console?: Record; - /** * Rate limits for Unity desktop platform (endpoint name -> limit info) */ @@ -10317,7 +10322,7 @@ export interface GetImportResponse { export interface GetImportV2TaskResponse { app_pk: number; - created_at: number; + created_at: TimestampNS; /** * Duration of the request in milliseconds */ @@ -10325,7 +10330,7 @@ export interface GetImportV2TaskResponse { id: string; product: string; state: number; - updated_at: number; + updated_at: TimestampNS; settings: ImportV2TaskSettings; result?: Record; } @@ -10461,7 +10466,6 @@ export interface GetOrCreateFeedGroupRequest { */ activity_selectors?: Array; activity_filter?: ActivityFilterConfig; - activity_marks?: ActivityMarksConfig; activity_processing?: ActivityProcessingConfig; aggregation?: AggregationConfig; @@ -10643,12 +10647,10 @@ export interface GetRateLimitsResponse { * Map of endpoint rate limits for the Unity platform */ unity?: Record; - /** * Map of endpoint rate limits for the Unity console platform */ unity_console?: Record; - /** * Map of endpoint rate limits for the Unity desktop platform */ @@ -10726,7 +10728,7 @@ export interface GetSetupSessionResponse { } export interface GetTaskResponse { - created_at: number; + created_at: TimestampNS; duration: string; /** * Current status of task @@ -10736,7 +10738,7 @@ export interface GetTaskResponse { * ID of task */ task_id: string; - updated_at: number; + updated_at: TimestampNS; error?: ErrorResult; /** * Result produced by task after completion @@ -11013,29 +11015,29 @@ export interface ImportBlockListResponse { } export interface ImportTask { - created_at: number; + created_at: TimestampNS; id: string; mode: string; path: string; state: string; - updated_at: number; + updated_at: TimestampNS; history: Array; size?: number; } export interface ImportTaskHistory { - created_at: number; + created_at: TimestampNS; next_state: string; prev_state: string; } export interface ImportV2TaskItem { app_pk: number; - created_at: number; + created_at: TimestampNS; id: string; product: string; state: number; - updated_at: number; + updated_at: TimestampNS; settings: ImportV2TaskSettings; result?: Record; } @@ -11107,7 +11109,7 @@ export interface IngressAudioEncodingResponse { export interface IngressErrorEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Human-readable error message */ @@ -11168,7 +11170,7 @@ export interface IngressSourceResponse { export interface IngressStartedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Unique identifier for this stream */ @@ -11201,7 +11203,7 @@ export interface IngressStartedEvent { export interface IngressStoppedEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * Unique identifier for the stream */ @@ -11299,7 +11301,6 @@ export interface InterestTagResponse { * Lifetime number of distinct reacted-to activities tagged with this value, without decay; 0 for manually set tags */ count: number; - /** * How the tag was set: computed (from the user's reactions) or manual (through the API) */ @@ -11369,7 +11370,7 @@ export interface KickUserResponse { export interface KickedUserEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * User response object */ @@ -11425,7 +11426,7 @@ export interface LabelResultResponse { /** * Timestamp */ - created_at: number; + created_at: TimestampNS; /** * High-level harm category */ @@ -11877,9 +11878,9 @@ export interface MarkReadResponseEvent { channel_id: string; channel_type: string; cid: string; - created_at: number; + created_at: TimestampNS; type: string; - channel_last_message_at?: number; + channel_last_message_at?: TimestampNS; last_read_message_id?: string; team?: string; /** @@ -11933,7 +11934,7 @@ export interface MatchedContent { /** * `content_published_at` from the contributing `/analyze` request, or server receive time when that field was omitted. */ - published_at: number; + published_at: TimestampNS; /** * Content type that contributed this entry: `image` or `text`. */ @@ -11958,17 +11959,17 @@ export interface MatchedContent { } export interface MaxStreakChangedEvent { - created_at: number; + created_at: TimestampNS; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; } export interface MemberAddedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Represents channel in chat */ @@ -11999,7 +12000,7 @@ export interface MemberAddedEvent { * The CID of the channel to which the member was added */ cid?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -12012,7 +12013,7 @@ export interface MemberRemovedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Represents channel in chat */ @@ -12043,7 +12044,7 @@ export interface MemberRemovedEvent { * The CID of the channel from which the member was removed */ cid?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -12065,11 +12066,11 @@ export interface MemberResponse { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Date/time of the last update */ - updated_at: number; + updated_at: TimestampNS; user_id: string; /** * Custom member response data @@ -12082,7 +12083,7 @@ export interface MemberResponse { /** * Date/time of deletion */ - deleted_at?: number; + deleted_at?: TimestampNS; role?: string; } @@ -12090,7 +12091,7 @@ export interface MemberUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Represents channel in chat */ @@ -12121,7 +12122,7 @@ export interface MemberUpdatedEvent { * The CID of the channel in which the member was updated */ cid?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -12158,7 +12159,7 @@ export interface MembershipLevelResponse { /** * When the membership level was created */ - created_at: number; + created_at: TimestampNS; /** * Unique identifier for the membership level */ @@ -12174,7 +12175,7 @@ export interface MembershipLevelResponse { /** * When the membership level was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * Activity tags this membership level gives access to */ @@ -12228,7 +12229,7 @@ export interface MessageDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Whether the message was hard deleted */ @@ -12267,7 +12268,7 @@ export interface MessageDeletedEvent { * Whether the message was deleted only for the current user */ deleted_for_me?: boolean; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -12277,13 +12278,13 @@ export interface MessageDeletedEvent { } export interface MessageFlagResponse { - created_at: number; + created_at: TimestampNS; created_by_automod: boolean; - updated_at: number; - approved_at?: number; + updated_at: TimestampNS; + approved_at?: TimestampNS; reason?: string; - rejected_at?: number; - reviewed_at?: number; + rejected_at?: TimestampNS; + reviewed_at?: TimestampNS; custom?: Record; details?: FlagDetailsResponse; /** @@ -12309,7 +12310,7 @@ export interface MessageFlaggedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; message_id: string; /** * Represents any chat message @@ -12343,7 +12344,7 @@ export interface MessageFlaggedEvent { * The reason for the flag */ reason?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -12368,7 +12369,7 @@ export interface MessageFlaggedEvent { export interface MessageHistoryEntryResponse { is_deleted: boolean; message_id: string; - message_updated_at: number; + message_updated_at: TimestampNS; message_updated_by_id: string; text: string; attachments: Array; @@ -12383,7 +12384,7 @@ export interface MessageModerationResult { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * ID of the message */ @@ -12391,7 +12392,7 @@ export interface MessageModerationResult { /** * Date/time of the last update */ - updated_at: number; + updated_at: TimestampNS; /** * Whether user has bad karma */ @@ -12423,7 +12424,7 @@ export interface MessageNewEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; message_id: string; /** * The number of watchers @@ -12462,7 +12463,7 @@ export interface MessageNewEvent { * The author of the parent message */ parent_author?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -12542,7 +12543,7 @@ export interface MessageReadEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; /** * The type of event: "message.read" in this case @@ -12572,7 +12573,7 @@ export interface MessageReadEvent { * The ID of the last read message */ last_read_message_id?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -12672,7 +12673,7 @@ export interface MessageResponse { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; deleted_reply_count: number; /** * Contains HTML markup of the message. Can only be set when using server-side API @@ -12717,7 +12718,7 @@ export interface MessageResponse { /** * Date/time of the last update */ - updated_at: number; + updated_at: TimestampNS; /** * Array of message attachments */ @@ -12758,9 +12759,9 @@ export interface MessageResponse { /** * Date/time of deletion */ - deleted_at?: number; + deleted_at?: TimestampNS; deleted_for_me?: boolean; - message_text_updated_at?: number; + message_text_updated_at?: TimestampNS; /** * Should be empty if `text` is provided. Can only be set when using server-side API */ @@ -12772,11 +12773,11 @@ export interface MessageResponse { /** * Date when pinned message expires */ - pin_expires?: number; + pin_expires?: TimestampNS; /** * Date when message got pinned */ - pinned_at?: number; + pinned_at?: TimestampNS; /** * Identifier of the poll to include in the message */ @@ -12839,7 +12840,7 @@ export interface MessageUnblockedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; message_id: string; custom: Record; /** @@ -12854,7 +12855,7 @@ export interface MessageUnblockedEvent { * The CID of the channel where the message was unblocked */ cid?: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; } @@ -12862,7 +12863,7 @@ export interface MessageUndeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; message_id: string; custom: Record; /** @@ -12893,7 +12894,7 @@ export interface MessageUndeletedEvent { * The CID of the channel where the message was sent */ cid?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -12910,7 +12911,7 @@ export interface MessageUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; message_id: string; custom: Record; /** @@ -12941,7 +12942,7 @@ export interface MessageUpdatedEvent { * The CID of the channel where the message was sent */ cid?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -12959,7 +12960,7 @@ export interface MessageWithChannelResponse { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; deleted_reply_count: number; /** * Contains HTML markup of the message. Can only be set when using server-side API @@ -13004,7 +13005,7 @@ export interface MessageWithChannelResponse { /** * Date/time of the last update */ - updated_at: number; + updated_at: TimestampNS; /** * Array of message attachments */ @@ -13049,9 +13050,9 @@ export interface MessageWithChannelResponse { /** * Date/time of deletion */ - deleted_at?: number; + deleted_at?: TimestampNS; deleted_for_me?: boolean; - message_text_updated_at?: number; + message_text_updated_at?: TimestampNS; /** * Should be empty if `text` is provided. Can only be set when using server-side API */ @@ -13063,11 +13064,11 @@ export interface MessageWithChannelResponse { /** * Date when pinned message expires */ - pin_expires?: number; + pin_expires?: TimestampNS; /** * Date when message got pinned */ - pinned_at?: number; + pinned_at?: TimestampNS; /** * Identifier of the poll to include in the message */ @@ -13192,7 +13193,7 @@ export interface ModerationActionConfigResponse { } export interface ModerationAnalysisFailedEvent { - created_at: number; + created_at: TimestampNS; type: string; /** * The moderation policy key the request targeted. @@ -13210,7 +13211,7 @@ export interface ModerationAnalysisFailedEvent { * Echo of the `entity_type` on the /analyze request. */ entity_type?: string; - received_at?: number; + received_at?: TimestampNS; /** * Echo of the request's `content_ids`, keyed by text/image label. On keyframe and caption streams every request repeats the same entity_type/entity_id/entity_creator_id, so this is what identifies the specific submission that went unscreened. */ @@ -13229,21 +13230,21 @@ export interface ModerationCallResponse { backstage: boolean; captioning: boolean; cid: string; - created_at: number; + created_at: TimestampNS; current_session_id: string; id: string; recording: boolean; transcribing: boolean; translating: boolean; type: string; - updated_at: number; + updated_at: TimestampNS; blocked_user_ids: Array; custom: Record; channel_cid?: string; - ended_at?: number; + ended_at?: TimestampNS; join_ahead_time_seconds?: number; routing_number?: string; - starts_at?: number; + starts_at?: TimestampNS; team?: string; /** * User response object @@ -13252,7 +13253,7 @@ export interface ModerationCallResponse { } export interface ModerationCheckCompletedEvent { - created_at: number; + created_at: TimestampNS; /** * The ID of entity which was moderated */ @@ -13271,7 +13272,7 @@ export interface ModerationCheckCompletedEvent { review_queue_item_id: string; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; } export interface ModerationConfig { @@ -13301,11 +13302,11 @@ export interface ModerationCustomActionEvent { * The ID of the custom action that was executed */ action_id: string; - created_at: number; + created_at: TimestampNS; custom: Record; review_queue_item: ReviewQueueItemResponse; type: string; - received_at?: number; + received_at?: TimestampNS; /** * Additional options passed to the custom action */ @@ -13320,7 +13321,6 @@ export interface ModerationDashboardPreferences { async_review_queue_upsert?: boolean; block_foreign_cdn_attachments?: boolean; custom_views_enabled?: boolean; - disable_action_logs?: boolean; disable_audit_logs?: boolean; disable_flagging_reviewed_entity?: boolean; @@ -13337,14 +13337,14 @@ export interface ModerationDashboardPreferences { } export interface ModerationFlagResponse { - created_at: number; + created_at: TimestampNS; entity_id: string; entity_type: string; type: string; - updated_at: number; + updated_at: TimestampNS; user_id: string; result: Array>; - content_published_at?: number; + content_published_at?: TimestampNS; entity_creator_id?: string; reason?: string; review_queue_item_id?: string; @@ -13366,18 +13366,18 @@ export interface ModerationFlaggedEvent { * The type of content that was flagged */ content_type: string; - created_at: number; + created_at: TimestampNS; /** * The ID of the flagged content */ object_id: string; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; } export interface ModerationImageAnalysisCompleteEvent { - created_at: number; + created_at: TimestampNS; type: string; /** * The moderation policy key that was applied. @@ -13395,7 +13395,7 @@ export interface ModerationImageAnalysisCompleteEvent { * Echo of the `entity_type` on the /analyze request. */ entity_type?: string; - received_at?: number; + received_at?: TimestampNS; /** * Review queue row ID for deep-linking into the dashboard. */ @@ -13415,11 +13415,11 @@ export interface ModerationImageAnalysisCompleteEvent { } export interface ModerationMarkReviewedEvent { - created_at: number; + created_at: TimestampNS; custom: Record; item: ReviewQueueItemResponse; type: string; - received_at?: number; + received_at?: TimestampNS; /** * Represents any chat message */ @@ -13507,14 +13507,14 @@ export interface ModerationPayloadResponse { } export interface ModerationQueueResponse { - created_at: number; + created_at: TimestampNS; created_by: string; description: string; id: string; item_count: number; name: string; type: string; - updated_at: number; + updated_at: TimestampNS; sort: Array>; filters: Record; } @@ -13534,14 +13534,14 @@ export interface ModerationRuleInfo { } export interface ModerationRuleV2Response { - created_at: number; + created_at: TimestampNS; description: string; enabled: boolean; id: string; name: string; rule_type: string; team: string; - updated_at: number; + updated_at: TimestampNS; config_keys: Array; cooldown_period?: string; logic?: string; @@ -13552,7 +13552,7 @@ export interface ModerationRuleV2Response { } export interface ModerationRulesTriggeredEvent { - created_at: number; + created_at: TimestampNS; /** * The ID of the entity that triggered the rule */ @@ -13572,7 +13572,7 @@ export interface ModerationRulesTriggeredEvent { custom: Record; rule: ModerationRuleInfo; type: string; - received_at?: number; + received_at?: TimestampNS; /** * The review queue item ID if applicable */ @@ -13588,7 +13588,7 @@ export interface ModerationRulesTriggeredEvent { } export interface ModerationTextAnalysisCompleteEvent { - created_at: number; + created_at: TimestampNS; type: string; /** * The moderation policy key that was applied. @@ -13606,7 +13606,7 @@ export interface ModerationTextAnalysisCompleteEvent { * Echo of the `entity_type` on the /analyze request. */ entity_type?: string; - received_at?: number; + received_at?: TimestampNS; /** * Review queue row ID for deep-linking into the dashboard. */ @@ -13750,7 +13750,7 @@ export interface NotificationFeedUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * The ID of the feed */ @@ -13761,7 +13761,7 @@ export interface NotificationFeedUpdatedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; /** * Aggregated activities for notification feeds */ @@ -13774,7 +13774,7 @@ export interface NotificationMarkUnreadEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; /** * The type of event: "notification.mark_unread" in this case @@ -13804,12 +13804,12 @@ export interface NotificationMarkUnreadEvent { /** * The time when the channel/thread was marked as unread */ - last_read_at?: number; + last_read_at?: TimestampNS; /** * The ID of the last read message */ last_read_message_id?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -13898,11 +13898,11 @@ export interface NotificationStatusResponse { /** * When notifications were last read */ - last_read_at?: number; + last_read_at?: TimestampNS; /** * When notifications were last seen */ - last_seen_at?: number; + last_seen_at?: TimestampNS; /** * Deprecated: use is_read on each activity/group instead. IDs of activities that have been read. Capped at ~101 entries for aggregated feeds. */ @@ -13950,7 +13950,7 @@ export interface NotificationThreadMessageNewEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; message_id: string; /** * The ID of the thread @@ -13988,7 +13988,7 @@ export interface NotificationThreadMessageNewEvent { */ cid?: string; parent_author?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -14106,7 +14106,7 @@ export type OwnCapability = (typeof OwnCapability)[keyof typeof OwnCapability]; export interface OwnUserResponse { banned: boolean; - created_at: number; + created_at: TimestampNS; id: string; invisible: boolean; language: string; @@ -14116,19 +14116,19 @@ export interface OwnUserResponse { unread_channels: number; unread_count: number; unread_threads: number; - updated_at: number; + updated_at: TimestampNS; channel_mutes: Array; devices: Array; mutes: Array; teams: Array; custom: Record; avg_response_time?: number; - deactivated_at?: number; - deleted_at?: number; + deactivated_at?: TimestampNS; + deleted_at?: TimestampNS; image?: string; - last_active?: number; + last_active?: TimestampNS; name?: string; - revoke_tokens_issued_before?: number; + revoke_tokens_issued_before?: TimestampNS; blocked_user_ids?: Array; latest_hidden_channels?: Array; privacy_settings?: PrivacySettingsResponse; @@ -14168,7 +14168,7 @@ export interface ParticipantCountByMinuteResponse { last: number; max: number; min: number; - start_ts: number; + start_ts: TimestampNS; } export interface ParticipantCountOverTimeResponse { @@ -14213,9 +14213,9 @@ export interface ParticipantSeriesSubscriptionTrackMetrics { export interface ParticipantSeriesTimeframe { max_points: number; - since: number; + since: TimestampNS; step_seconds: number; - until: number; + until: TimestampNS; } export interface ParticipantSeriesTrackMetrics { @@ -14243,15 +14243,15 @@ export interface ParticipantSessionDetails { user_session_id: string; roles: Array; duration_in_seconds?: number; - joined_at?: number; - left_at?: number; + joined_at?: TimestampNS; + left_at?: TimestampNS; } export interface PendingMessageEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * The method used for the pending message */ @@ -14261,7 +14261,7 @@ export interface PendingMessageEvent { * The type of event: "message.pending" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; /** * Represents channel in chat */ @@ -14314,7 +14314,7 @@ export interface PerformanceAnalysisResponse { unindexed_fields: Array; unindexed_sort_fields: Array; warnings: Array; - last_analyzed?: number; + last_analyzed?: TimestampNS; scan_type?: string; } @@ -14394,7 +14394,7 @@ export interface PermissionRequest { export interface PermissionRequestEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * The list of permissions requested by the user */ @@ -14425,7 +14425,7 @@ export interface PinActivityResponse { /** * When the activity was pinned */ - created_at: number; + created_at: TimestampNS; duration: string; /** * Fully qualified ID of the feed the activity was pinned to @@ -14464,11 +14464,11 @@ export interface PlatformDataResponse { export interface Policy { action: number; - created_at: number; + created_at: TimestampNS; name: string; owner: boolean; priority: number; - updated_at: number; + updated_at: TimestampNS; resources: Array; roles: Array; } @@ -14507,7 +14507,7 @@ export interface PolicyTestLabelDrift { } export interface PolicyTestResult { - created_at: number; + created_at: TimestampNS; id: number; message_text: string; row_index: number; @@ -14533,7 +14533,7 @@ export interface PolicyTestRow { export interface PolicyTestRun { config_key: string; - created_at: number; + created_at: TimestampNS; id: string; rows_completed: number; rows_total: number; @@ -14541,10 +14541,10 @@ export interface PolicyTestRun { status: string; task_id: string; triggered_by: string; - completed_at?: number; - config_updated_at?: number; + completed_at?: TimestampNS; + config_updated_at?: TimestampNS; error_message?: string; - started_at?: number; + started_at?: TimestampNS; metrics?: PolicyTestRunMetrics; } @@ -14576,13 +14576,13 @@ export interface PolicyTestSeedSpec { export interface PolicyTestSet { config_key: string; - created_at: number; + created_at: TimestampNS; created_by: string; id: string; mode: string; name: string; row_count: number; - updated_at: number; + updated_at: TimestampNS; team?: string; rows?: Array; last_run?: PolicyTestRun; @@ -14655,13 +14655,13 @@ export interface PollResponseData { allow_answers: boolean; allow_user_suggested_options: boolean; answers_count: number; - created_at: number; + created_at: TimestampNS; created_by_id: string; description: string; enforce_unique_vote: boolean; id: string; name: string; - updated_at: number; + updated_at: TimestampNS; vote_count: number; /** * Voting visibility of the poll @@ -14693,11 +14693,11 @@ export interface PollVoteResponse { } export interface PollVoteResponseData { - created_at: number; + created_at: TimestampNS; id: string; option_id: string; poll_id: string; - updated_at: number; + updated_at: TimestampNS; answer_text?: string; is_answer?: boolean; user_id?: string; @@ -14739,10 +14739,10 @@ export interface PoorTail { } export interface PredefinedFilterResponse { - created_at: number; + created_at: TimestampNS; name: string; operation: string; - updated_at: number; + updated_at: TimestampNS; filter: Record; description?: string; query_id?: number; @@ -14754,7 +14754,7 @@ export interface PredefinedFilterResponse { export interface PredefinedFilterStatsResponse { calls: number; max_latency_ms: number; - last_seen?: number; + last_seen?: TimestampNS; } export interface PrivacySettingsResponse { @@ -14851,7 +14851,7 @@ export interface PushNotificationFields { export interface PushNotificationSettingsResponse { disabled?: boolean; - disabled_until?: number; + disabled_until?: TimestampNS; } export interface PushPreferenceInput { @@ -14896,17 +14896,17 @@ export interface PushPreferenceInput { export interface PushPreferencesResponse { call_level?: string; chat_level?: string; - disabled_until?: number; + disabled_until?: TimestampNS; feeds_level?: string; chat_preferences?: ChatPreferencesResponse; feeds_preferences?: FeedsPreferencesResponse; } export interface PushProvider { - created_at: number; + created_at: TimestampNS; name: string; type: string; - updated_at: number; + updated_at: TimestampNS; apn_auth_key?: string; apn_auth_type?: string; apn_development?: boolean; @@ -14917,7 +14917,7 @@ export interface PushProvider { apn_team_id?: string; apn_topic?: string; description?: string; - disabled_at?: number; + disabled_at?: TimestampNS; disabled_reason?: string; firebase_apn_template?: string; firebase_credentials?: string; @@ -14961,10 +14961,10 @@ export interface PushProviderRequest { } export interface PushProviderResponse { - created_at: number; + created_at: TimestampNS; name: string; type: string; - updated_at: number; + updated_at: TimestampNS; apn_auth_key?: string; apn_auth_type?: string; apn_development?: boolean; @@ -14977,7 +14977,7 @@ export interface PushProviderResponse { apn_team_id?: string; apn_topic?: string; description?: string; - disabled_at?: number; + disabled_at?: TimestampNS; disabled_reason?: string; firebase_apn_template?: string; firebase_credentials?: string; @@ -14992,7 +14992,7 @@ export interface PushProviderResponse { } export interface PushTemplate { - created_at: number; + created_at: TimestampNS; enable_push: boolean; event_type: | 'message.new' @@ -15005,7 +15005,7 @@ export interface PushTemplate { | 'feeds.comment.reaction.added' | 'feeds.follow.created' | 'feeds.notification_feed.updated'; - updated_at: number; + updated_at: TimestampNS; template?: string; } @@ -15013,7 +15013,7 @@ export interface PushTemplateResponse { /** * Time when the template was created */ - created_at: number; + created_at: TimestampNS; /** * Whether push notification is enabled for this event */ @@ -15029,7 +15029,7 @@ export interface PushTemplateResponse { /** * Time when the template was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * The push notification template */ @@ -15186,10 +15186,10 @@ export interface QueryBannedUsersPayload { * Filter conditions to apply to the query */ filter_conditions: Record; - created_at_after?: Date; - created_at_after_or_equal?: Date; - created_at_before?: Date; - created_at_before_or_equal?: Date; + created_at_after?: TimestampNS; + created_at_after_or_equal?: TimestampNS; + created_at_before?: TimestampNS; + created_at_before_or_equal?: TimestampNS; /** * Whether to exclude expired bans or not */ @@ -15364,8 +15364,8 @@ export interface QueryCallSessionParticipantStatsResponse { duration: string; participants: Array; counts: CallStatsParticipantCounts; - call_ended_at?: number; - call_started_at?: number; + call_ended_at?: TimestampNS; + call_started_at?: TimestampNS; next?: string; prev?: string; tmp_data_source?: string; @@ -15418,12 +15418,12 @@ export interface QueryCallStatsMapResponse { */ duration: string; counts: CallStatsParticipantCounts; - call_ended_at?: number; - call_started_at?: number; + call_ended_at?: TimestampNS; + call_started_at?: TimestampNS; data_source?: string; - end_time?: number; - generated_at?: number; - start_time?: number; + end_time?: TimestampNS; + generated_at?: TimestampNS; + start_time?: TimestampNS; publishers?: CallStatsMapPublishers; sfus?: CallStatsMapSFUs; subscribers?: CallStatsMapSubscribers; @@ -15724,7 +15724,7 @@ export interface QueryFeedModerationTemplate { /** * When the template was created */ - created_at: number; + created_at: TimestampNS; /** * Name of the moderation template */ @@ -15732,7 +15732,7 @@ export interface QueryFeedModerationTemplate { /** * When the template was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * Configuration for a feeds moderation template */ @@ -15833,10 +15833,10 @@ export interface QueryFollowsResponse { } export interface QueryFutureChannelBansPayload { - created_at_after?: Date; - created_at_after_or_equal?: Date; - created_at_before?: Date; - created_at_before_or_equal?: Date; + created_at_after?: TimestampNS; + created_at_after_or_equal?: TimestampNS; + created_at_before?: TimestampNS; + created_at_before_or_equal?: TimestampNS; /** * Whether to exclude expired bans or not */ @@ -15910,21 +15910,17 @@ export interface QueryLabelResultsResponse { export interface QueryMembersPayload { type: string; - created_at_after?: Date; - created_at_after_or_equal?: Date; - created_at_before?: Date; - created_at_before_or_equal?: Date; + created_at_after?: TimestampNS; + created_at_after_or_equal?: TimestampNS; + created_at_before?: TimestampNS; + created_at_before_or_equal?: TimestampNS; id?: string; limit?: number; offset?: number; user_id?: string; - user_id_gt?: string; - user_id_gte?: string; - user_id_lt?: string; - user_id_lte?: string; members?: Array; /** @@ -16566,13 +16562,9 @@ export interface QueryUsersPayload { * Filter conditions to apply to the query */ filter_conditions: Record; - id_gt?: string; - id_gte?: string; - id_lt?: string; - id_lte?: string; include_deactivated_users?: boolean; limit?: number; @@ -16729,11 +16721,11 @@ export interface RawRecordingSettingsResponse { export interface Reaction { activity_id: string; - created_at: number; + created_at: TimestampNS; kind: string; - updated_at: number; + updated_at: TimestampNS; user_id: string; - deleted_at?: number; + deleted_at?: TimestampNS; id?: string; parent?: string; score?: number; @@ -16751,7 +16743,7 @@ export interface ReactionDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Represents channel in chat */ @@ -16782,7 +16774,7 @@ export interface ReactionDeletedEvent { */ cid?: string; message_id?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -16808,11 +16800,11 @@ export interface ReactionGroupResponse { /** * FirstReactionAt is the time of the first reaction of this type. This is the same also if all reaction of this type are deleted, because if someone will react again with the same type, will be preserved the sorting. */ - first_reaction_at: number; + first_reaction_at: TimestampNS; /** * LastReactionAt is the time of the last reaction of this type. */ - last_reaction_at: number; + last_reaction_at: TimestampNS; /** * SumScores is the sum of all scores of reactions of this type. Medium allows you to clap articles more than once and shows the sum of all claps from all users. For example, you can send `clap` x5 using `score: 5`. */ @@ -16827,7 +16819,7 @@ export interface ReactionGroupUserResponse { /** * The time when the user reacted. */ - created_at: number; + created_at: TimestampNS; /** * The ID of the user who reacted. */ @@ -16842,7 +16834,7 @@ export interface ReactionNewEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Represents channel in chat */ @@ -16873,7 +16865,7 @@ export interface ReactionNewEvent { */ cid?: string; message_id?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -16920,7 +16912,7 @@ export interface ReactionResponse { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Message ID */ @@ -16936,7 +16928,7 @@ export interface ReactionResponse { /** * Date/time of the last update */ - updated_at: number; + updated_at: TimestampNS; /** * User ID */ @@ -16955,7 +16947,7 @@ export interface ReactionUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; message_id: string; /** * Represents channel in chat @@ -16990,7 +16982,7 @@ export interface ReactionUpdatedEvent { * The CID of the channel containing the message */ cid?: string; - received_at?: number; + received_at?: TimestampNS; /** * The team ID */ @@ -17063,13 +17055,13 @@ export interface ReadReceiptsResponse { } export interface ReadStateResponse { - last_read: number; + last_read: TimestampNS; unread_messages: number; /** * User response object */ user: UserResponse; - last_delivered_at?: number; + last_delivered_at?: TimestampNS; last_delivered_message_id?: string; last_read_message_id?: string; } @@ -17158,7 +17150,7 @@ export interface ReminderCreatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * The ID of the message for which the reminder was created */ @@ -17177,7 +17169,7 @@ export interface ReminderCreatedEvent { * The ID of the parent message, if the reminder is for a thread message */ parent_id?: string; - received_at?: number; + received_at?: TimestampNS; } export interface ReminderDeletedEvent { @@ -17188,7 +17180,7 @@ export interface ReminderDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * The ID of the message for which the reminder was created */ @@ -17207,7 +17199,7 @@ export interface ReminderDeletedEvent { * The ID of the parent message, if the reminder is for a thread message */ parent_id?: string; - received_at?: number; + received_at?: TimestampNS; } export interface ReminderNotificationEvent { @@ -17218,7 +17210,7 @@ export interface ReminderNotificationEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * The ID of the message for which the reminder was created */ @@ -17234,16 +17226,16 @@ export interface ReminderNotificationEvent { */ type: string; parent_id?: string; - received_at?: number; + received_at?: TimestampNS; } export interface ReminderResponseData { channel_cid: string; - created_at: number; + created_at: TimestampNS; message_id: string; - updated_at: number; + updated_at: TimestampNS; user_id: string; - remind_at?: number; + remind_at?: TimestampNS; /** * Represents channel in chat */ @@ -17266,7 +17258,7 @@ export interface ReminderUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * The ID of the message for which the reminder was created */ @@ -17285,7 +17277,7 @@ export interface ReminderUpdatedEvent { * The ID of the parent message, if the reminder is for a thread message */ parent_id?: string; - received_at?: number; + received_at?: TimestampNS; } export interface RemoveUserGroupMembersRequest { @@ -17489,7 +17481,7 @@ export interface RestoreUsersRequest { export interface RetentionPolicy { app_pk: number; - enabled_at: number; + enabled_at: TimestampNS; policy: string; config: PolicyConfig; } @@ -17502,10 +17494,10 @@ export interface RetentionRunResponse { } export interface ReviewQueueItemNewEvent { - created_at: number; + created_at: TimestampNS; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; /** * The flags associated with this review queue item */ @@ -17522,7 +17514,7 @@ export interface ReviewQueueItemResponse { /** * When the item was created */ - created_at: number; + created_at: TimestampNS; /** * ID of the entity being reviewed */ @@ -17560,7 +17552,7 @@ export interface ReviewQueueItemResponse { /** * When the item was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * Moderation actions taken */ @@ -17580,12 +17572,7 @@ export interface ReviewQueueItemResponse { /** * When the review was completed */ - completed_at?: number; - - /** - * Highest per-label confidence (0-1) any provider reported across the item's flags; absent when no flag carried one - */ - confidence_score?: number; + completed_at?: TimestampNS; /** * Highest per-label confidence (0-1) any provider reported across the item's flags; absent when no flag carried one */ @@ -17598,7 +17585,7 @@ export interface ReviewQueueItemResponse { /** * When the item was escalated */ - escalated_at?: number; + escalated_at?: TimestampNS; /** * ID of the moderator who escalated the item */ @@ -17606,7 +17593,7 @@ export interface ReviewQueueItemResponse { /** * When the item was reviewed */ - reviewed_at?: number; + reviewed_at?: TimestampNS; /** * Teams associated with this item */ @@ -17633,10 +17620,10 @@ export interface ReviewQueueItemResponse { } export interface ReviewQueueItemUpdatedEvent { - created_at: number; + created_at: TimestampNS; custom: Record; type: string; - received_at?: number; + received_at?: TimestampNS; /** * The flags associated with this review queue item */ @@ -17648,7 +17635,7 @@ export interface ReviewQueueItemUpdatedEvent { export interface RevisionHistoryResponse { action_type: string; actor_type: string; - created_at: number; + created_at: TimestampNS; object_id: string; object_type: string; user_id: string; @@ -17714,7 +17701,7 @@ export interface Role { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Whether this is a custom role or built-in */ @@ -17726,7 +17713,7 @@ export interface Role { /** * Date/time of the last update */ - updated_at: number; + updated_at: TimestampNS; /** * List of scopes where this role is currently present. `.app` means that role is present in app-level grants */ @@ -17786,9 +17773,7 @@ export interface RuleBuilderCondition { user_custom_property_params?: UserCustomPropertyParameters; user_flag_count_rule_params?: FlagCountRuleParameters; user_identical_content_count_params?: UserIdenticalContentCountParameters; - user_identical_image_count_params?: UserIdenticalImageCountParameters; - user_reaction_count_params?: UserReactionCountRuleParameters; user_role_params?: UserRoleParameters; user_rule_params?: UserRuleParameters; @@ -18078,7 +18063,7 @@ export interface SIPInboundRoutingRuleResponse { /** * Creation timestamp */ - created_at: number; + created_at: TimestampNS; duration: string; /** * Unique identifier of the SIP Inbound Routing Rule @@ -18091,7 +18076,7 @@ export interface SIPInboundRoutingRuleResponse { /** * Last update timestamp */ - updated_at: number; + updated_at: TimestampNS; /** * List of called numbers */ @@ -18168,7 +18153,7 @@ export interface SIPTrunkResponse { /** * Creation timestamp */ - created_at: number; + created_at: TimestampNS; /** * Unique identifier for the SIP trunk */ @@ -18184,7 +18169,7 @@ export interface SIPTrunkResponse { /** * Last update timestamp */ - updated_at: number; + updated_at: TimestampNS; /** * The URI for the SIP trunk */ @@ -18291,7 +18276,7 @@ export interface SearchResult { export interface SearchResultMessage { cid: string; - created_at: number; + created_at: TimestampNS; deleted_reply_count: number; html: string; id: string; @@ -18303,7 +18288,7 @@ export interface SearchResultMessage { silent: boolean; text: string; type: string; - updated_at: number; + updated_at: TimestampNS; attachments: Array; latest_reactions: Array; mentioned_users: Array; @@ -18317,13 +18302,13 @@ export interface SearchResultMessage { */ user: UserResponse; command?: string; - deleted_at?: number; + deleted_at?: TimestampNS; deleted_for_me?: boolean; - message_text_updated_at?: number; + message_text_updated_at?: TimestampNS; mml?: string; parent_id?: string; - pin_expires?: number; - pinned_at?: number; + pin_expires?: TimestampNS; + pinned_at?: TimestampNS; poll_id?: string; quoted_message_id?: string; show_in_channel?: boolean; @@ -18393,13 +18378,13 @@ export interface SearchWarning { export interface Segment { all_sender_channels: boolean; all_users: boolean; - created_at: number; + created_at: TimestampNS; id: string; name: string; size: number; type: string; - updated_at: number; - deleted_at?: number; + updated_at: TimestampNS; + deleted_at?: TimestampNS; description?: string; task_id?: string; filter?: Record; @@ -18408,20 +18393,20 @@ export interface Segment { export interface SegmentResponse { all_sender_channels: boolean; all_users: boolean; - created_at: number; - deleted_at: number; + created_at: TimestampNS; + deleted_at: TimestampNS; description: string; id: string; name: string; size: number; type: string; - updated_at: number; + updated_at: TimestampNS; filter: Record; } export interface SegmentTargetResponse { app_pk: number; - created_at: number; + created_at: TimestampNS; segment_id: string; target_id: string; } @@ -18572,7 +18557,7 @@ export interface SessionSettingsResponse { export interface SessionWarningResponse { code: string; warning: string; - time?: number; + time?: TimestampNS; } export interface SetRetentionPolicyRequest { @@ -18589,12 +18574,12 @@ export interface SetRetentionPolicyResponse { } export interface SetupSession { - created_at: number; + created_at: TimestampNS; current_step: string; status: string; - updated_at: number; + updated_at: TimestampNS; setup_data: Record; - completed_at?: number; + completed_at?: TimestampNS; } export interface ShadowBlockActionRequestPayload { @@ -18612,7 +18597,7 @@ export interface ShareResponse { /** * When the share occurred */ - created_at: number; + created_at: TimestampNS; /** * User response object */ @@ -18634,7 +18619,7 @@ export interface SharedLocationResponse { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Device ID that created the live location */ @@ -18655,7 +18640,7 @@ export interface SharedLocationResponse { /** * Date/time of the last update */ - updated_at: number; + updated_at: TimestampNS; /** * User ID */ @@ -18663,7 +18648,7 @@ export interface SharedLocationResponse { /** * Time when the live location expires */ - end_at?: number; + end_at?: TimestampNS; /** * Represents channel in chat */ @@ -18676,14 +18661,14 @@ export interface SharedLocationResponse { export interface SharedLocationResponseData { channel_cid: string; - created_at: number; + created_at: TimestampNS; created_by_device_id: string; latitude: number; longitude: number; message_id: string; - updated_at: number; + updated_at: TimestampNS; user_id: string; - end_at?: number; + end_at?: TimestampNS; /** * Represents channel in chat */ @@ -19075,7 +19060,7 @@ export interface StoriesFeedUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * The ID of the feed */ @@ -19086,7 +19071,7 @@ export interface StoriesFeedUpdatedEvent { */ type: string; feed_visibility?: string; - received_at?: number; + received_at?: TimestampNS; /** * Individual activities for stories feeds */ @@ -19398,14 +19383,14 @@ export interface ThreadParticipant { /** * Date/time of creation */ - created_at: number; - last_read_at: number; + created_at: TimestampNS; + last_read_at: TimestampNS; custom: Record; - last_thread_message_at?: number; + last_thread_message_at?: TimestampNS; /** * Left Thread At is the time when the user left the thread */ - left_thread_at?: number; + left_thread_at?: TimestampNS; /** * Thead ID is unique string identifier of the thread */ @@ -19432,7 +19417,7 @@ export interface ThreadResponse { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Created By User ID */ @@ -19456,7 +19441,7 @@ export interface ThreadResponse { /** * Date/time of the last update */ - updated_at: number; + updated_at: TimestampNS; /** * Custom data for this object */ @@ -19464,11 +19449,11 @@ export interface ThreadResponse { /** * Deleted At */ - deleted_at?: number; + deleted_at?: TimestampNS; /** * Last Message At */ - last_message_at?: number; + last_message_at?: TimestampNS; /** * Thread Participants */ @@ -19499,7 +19484,7 @@ export interface ThreadStateResponse { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Created By User ID */ @@ -19523,7 +19508,7 @@ export interface ThreadStateResponse { /** * Date/time of the last update */ - updated_at: number; + updated_at: TimestampNS; latest_replies: Array; /** * Custom data for this object @@ -19532,11 +19517,11 @@ export interface ThreadStateResponse { /** * Deleted At */ - deleted_at?: number; + deleted_at?: TimestampNS; /** * Last Message At */ - last_message_at?: number; + last_message_at?: TimestampNS; read?: Array; /** * Thread Participants @@ -19558,20 +19543,20 @@ export interface ThreadStateResponse { } export interface ThreadUpdatedEvent { - created_at: number; + created_at: TimestampNS; custom: Record; type: string; channel_id?: string; channel_type?: string; cid?: string; - received_at?: number; + received_at?: TimestampNS; thread?: ThreadResponse; } export interface ThreadedCommentResponse { bookmark_count: number; confidence_score: number; - created_at: number; + created_at: TimestampNS; downvote_count: number; id: string; object_id: string; @@ -19583,7 +19568,7 @@ export interface ThreadedCommentResponse { * Status of the comment. One of: active, deleted, removed, hidden */ status: 'active' | 'deleted' | 'removed' | 'hidden' | 'shadow_blocked'; - updated_at: number; + updated_at: TimestampNS; upvote_count: number; mentioned_users: Array; own_reactions: Array; @@ -19592,8 +19577,8 @@ export interface ThreadedCommentResponse { */ user: UserResponse; controversy_score?: number; - deleted_at?: number; - edited_at?: number; + deleted_at?: TimestampNS; + edited_at?: TimestampNS; parent_id?: string; text?: string; attachments?: Array; @@ -20103,7 +20088,7 @@ export interface UnblockUsersResponse { export interface UnblockedUserEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * User response object */ @@ -20256,7 +20241,7 @@ export interface UnreadCountsBatchResponse { export interface UnreadCountsChannel { channel_id: string; - last_read: number; + last_read: TimestampNS; unread_count: number; } @@ -20276,7 +20261,7 @@ export interface UnreadCountsResponse { } export interface UnreadCountsThread { - last_read: number; + last_read: TimestampNS; last_read_message_id: string; parent_message_id: string; unread_count: number; @@ -20672,7 +20657,7 @@ export interface UpdateCallTypeResponse { /** * the time the call type was created */ - created_at: number; + created_at: TimestampNS; duration: string; /** * the name of the call type @@ -20681,7 +20666,7 @@ export interface UpdateCallTypeResponse { /** * the time the call type was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * the permissions granted to each role */ @@ -20874,7 +20859,7 @@ export interface UpdateChannelTypeResponse { automod_behavior: 'flag' | 'block' | 'shadow_block'; connect_events: boolean; count_messages: boolean; - created_at: number; + created_at: TimestampNS; custom_events: boolean; delivery_events: boolean; duration: string; @@ -20894,7 +20879,7 @@ export interface UpdateChannelTypeResponse { shared_locations: boolean; skip_last_msg_update_for_system_msgs: boolean; typing_events: boolean; - updated_at: number; + updated_at: TimestampNS; uploads: boolean; url_enrichment: boolean; user_message_reminders: boolean; @@ -21142,7 +21127,6 @@ export interface UpdateFeedGroupRequest { */ activity_selectors?: Array; activity_filter?: ActivityFilterConfig; - activity_marks?: ActivityMarksConfig; activity_processing?: ActivityProcessingConfig; aggregation?: AggregationConfig; @@ -21755,7 +21739,7 @@ export interface UpdateUsersResponse { export interface UpdatedCallPermissionsEvent { call_cid: string; - created_at: number; + created_at: TimestampNS; /** * The capabilities of the current user */ @@ -22074,7 +22058,7 @@ export interface UpsertModerationTemplateResponse { /** * When the template was created */ - created_at: number; + created_at: TimestampNS; duration: string; /** * Name of the moderation template @@ -22083,7 +22067,7 @@ export interface UpsertModerationTemplateResponse { /** * When the template was last updated */ - updated_at: number; + updated_at: TimestampNS; /** * Configuration for a feeds moderation template */ @@ -22212,7 +22196,7 @@ export interface UserBannedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; user: UserResponseCommonFields; /** @@ -22236,12 +22220,12 @@ export interface UserBannedEvent { /** * The expiration date of the ban */ - expiration?: number; + expiration?: TimestampNS; /** * The reason for the ban */ reason?: string; - received_at?: number; + received_at?: TimestampNS; /** * ID of the review queue item (flagged message) that triggered the ban, if the ban was applied from the moderation review queue */ @@ -22277,14 +22261,14 @@ export interface UserDeactivatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; user: UserResponseCommonFields; /** * The type of event: "user.deactivated" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; created_by?: UserResponseCommonFields; } @@ -22292,7 +22276,7 @@ export interface UserDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * The type of deletion that was used for the user's conversations. One of: hard, soft, pruning, (empty string) */ @@ -22323,7 +22307,7 @@ export interface UserDeletedEvent { * The type of event: "user.deleted" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; } export interface UserFeedbackReport { @@ -22351,7 +22335,7 @@ export interface UserFlaggedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * The reason for the flag */ @@ -22365,7 +22349,7 @@ export interface UserFlaggedEvent { * The type of event: "user.flagged" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; /** * Custom data */ @@ -22375,10 +22359,10 @@ export interface UserFlaggedEvent { export interface UserGroup { app_pk: number; - created_at: number; + created_at: TimestampNS; id: string; name: string; - updated_at: number; + updated_at: TimestampNS; created_by?: string; description?: string; team_id?: string; @@ -22389,13 +22373,13 @@ export interface UserGroupCreatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; /** * The type of event: "user_group.created" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; user_group?: UserGroup; } @@ -22404,20 +22388,20 @@ export interface UserGroupDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; /** * The type of event: "user_group.deleted" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; user_group?: UserGroup; } export interface UserGroupMember { app_pk: number; - created_at: number; + created_at: TimestampNS; group_id: string; is_admin: boolean; user_id: string; @@ -22427,7 +22411,7 @@ export interface UserGroupMemberAddedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * The user IDs that were added */ @@ -22437,7 +22421,7 @@ export interface UserGroupMemberAddedEvent { * The type of event: "user_group.member_added" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; user_group?: UserGroup; } @@ -22446,7 +22430,7 @@ export interface UserGroupMemberRemovedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * The user IDs that were removed */ @@ -22456,16 +22440,16 @@ export interface UserGroupMemberRemovedEvent { * The type of event: "user_group.member_removed" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; user_group?: UserGroup; } export interface UserGroupResponse { - created_at: number; + created_at: TimestampNS; id: string; name: string; - updated_at: number; + updated_at: TimestampNS; created_by?: string; description?: string; team_id?: string; @@ -22476,13 +22460,13 @@ export interface UserGroupUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; /** * The type of event: "user_group.updated" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; user?: UserResponseCommonFields; user_group?: UserGroup; } @@ -22514,7 +22498,7 @@ export interface UserMessagesDeletedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; user: UserResponseCommonFields; /** @@ -22539,7 +22523,7 @@ export interface UserMessagesDeletedEvent { * Whether Messages were hard deleted */ hard_delete?: boolean; - received_at?: number; + received_at?: TimestampNS; /** * The team of the channel where the target user's messages were deleted */ @@ -22548,9 +22532,9 @@ export interface UserMessagesDeletedEvent { } export interface UserMuteResponse { - created_at: number; - updated_at: number; - expires?: number; + created_at: TimestampNS; + updated_at: TimestampNS; + expires?: TimestampNS; /** * User response object */ @@ -22565,14 +22549,14 @@ export interface UserMutedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; user: UserResponseCommonFields; /** * The type of event: "user.muted" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; /** * The target users that were muted */ @@ -22595,14 +22579,14 @@ export interface UserReactivatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; user: UserResponseCommonFields; /** * The type of event: "user.reactivated" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; created_by?: UserResponseCommonFields; } @@ -22648,7 +22632,7 @@ export interface UserResponse { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * Unique user identifier */ @@ -22673,7 +22657,7 @@ export interface UserResponse { /** * Date/time of the last update */ - updated_at: number; + updated_at: TimestampNS; blocked_user_ids: Array; /** * List of teams user is a part of @@ -22687,21 +22671,21 @@ export interface UserResponse { /** * Date when ban expires */ - ban_expires?: number; + ban_expires?: TimestampNS; bypass_moderation?: boolean; /** * Date of deactivation */ - deactivated_at?: number; + deactivated_at?: TimestampNS; /** * Date/time of deletion */ - deleted_at?: number; + deleted_at?: TimestampNS; image?: string; /** * Date of last activity */ - last_active?: number; + last_active?: TimestampNS; /** * Optional name of user */ @@ -22709,7 +22693,7 @@ export interface UserResponse { /** * Revocation date for tokens */ - revoke_tokens_issued_before?: number; + revoke_tokens_issued_before?: TimestampNS; /** * List of devices user is using */ @@ -22721,44 +22705,44 @@ export interface UserResponse { export interface UserResponseCommonFields { banned: boolean; - created_at: number; + created_at: TimestampNS; id: string; language: string; online: boolean; role: string; - updated_at: number; + updated_at: TimestampNS; blocked_user_ids: Array; teams: Array; custom: Record; avg_response_time?: number; - deactivated_at?: number; - deleted_at?: number; + deactivated_at?: TimestampNS; + deleted_at?: TimestampNS; image?: string; - last_active?: number; + last_active?: TimestampNS; name?: string; - revoke_tokens_issued_before?: number; + revoke_tokens_issued_before?: TimestampNS; teams_role?: Record; } export interface UserResponsePrivacyFields { banned: boolean; - created_at: number; + created_at: TimestampNS; id: string; language: string; online: boolean; role: string; - updated_at: number; + updated_at: TimestampNS; blocked_user_ids: Array; teams: Array; custom: Record; avg_response_time?: number; - deactivated_at?: number; - deleted_at?: number; + deactivated_at?: TimestampNS; + deleted_at?: TimestampNS; image?: string; invisible?: boolean; - last_active?: number; + last_active?: TimestampNS; name?: string; - revoke_tokens_issued_before?: number; + revoke_tokens_issued_before?: TimestampNS; privacy_settings?: PrivacySettingsResponse; teams_role?: Record; } @@ -22776,7 +22760,7 @@ export interface UserUnbannedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; user: UserResponseCommonFields; /** @@ -22797,7 +22781,7 @@ export interface UserUnbannedEvent { * The CID of the channel where the target user was unbanned */ cid?: string; - received_at?: number; + received_at?: TimestampNS; /** * Whether the target user was shadow unbanned */ @@ -22814,14 +22798,14 @@ export interface UserUnmutedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; user: UserResponseCommonFields; /** * The type of event: "user.unmuted" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; /** * The target users that were unmuted */ @@ -22833,7 +22817,7 @@ export interface UserUnreadReminderEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; /** * The channels with unread messages */ @@ -22844,21 +22828,21 @@ export interface UserUnreadReminderEvent { * The type of event: "user.unread_message_reminder" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; } export interface UserUpdatedEvent { /** * Date/time of creation */ - created_at: number; + created_at: TimestampNS; custom: Record; user: UserResponsePrivacyFields; /** * The type of event: "user.updated" in this case */ type: string; - received_at?: number; + received_at?: TimestampNS; } export interface ValidateExternalStorageResponse { @@ -23181,12 +23165,12 @@ export interface WHIPIngress { } export interface WSEvent { - created_at: number; + created_at: TimestampNS; type: string; custom: Record; automoderation?: boolean; channel_id?: string; - channel_last_message_at?: number; + channel_last_message_at?: TimestampNS; channel_type?: string; cid?: string; connection_id?: string; @@ -23226,17 +23210,11 @@ export interface WebhookFailoverConfig { gcs_bucket?: string; gcs_credentials?: string; gcs_path?: string; - s3_api_key?: string; - s3_bucket?: string; - s3_path?: string; - s3_region?: string; - s3_role_arn?: string; - s3_secret?: string; type?: string; } diff --git a/src/gen/models/timestamp-guard.d.ts b/src/gen/models/timestamp-guard.d.ts new file mode 100644 index 0000000..0b952ae --- /dev/null +++ b/src/gen/models/timestamp-guard.d.ts @@ -0,0 +1,24 @@ +import type { TimestampNS } from './index'; + +/** + * Makes `new Date(ns)` a deprecated constructor, and a compile error for a server-sent nanosecond timestamp. + * + * Any tsconfig whose `include` covers this directory picks this file up; `exclude` it to defer. + * + * The `0 extends 1 & T` guard excludes `any`. Without it this overload would capture + * every `new Date()` in the program -- `any` is assignable to the brand, and a + * merged declaration is tried before lib.es5.d.ts -- breaking each `JSON.parse` path + * and index-signature read on the next regeneration. + */ +declare global { + interface DateConstructor { + /** + * @deprecated Unix nanoseconds, not milliseconds. Use SDK's provided nsToDate(t), or nsToMs(t) for arithmetic. + */ + new ( + t: 0 extends 1 & T ? never : T, + ): { + readonly ERROR_use_SDKs_nsToDate_helper_instead: never; + }; + } +} From 1a0961852a60cef89dfe90807e07adac645dd653 Mon Sep 17 00:00:00 2001 From: Oliver Lazoroski Date: Thu, 24 Sep 2026 12:00:09 +0200 Subject: [PATCH 06/13] chore: regenerate models --- src/gen/models/index.ts | 9 ++++++++- .../models/{timestamp-guard.d.ts => timestamp-guard.ts} | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) rename src/gen/models/{timestamp-guard.d.ts => timestamp-guard.ts} (89%) diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index 8e2083f..9f4bdd3 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -4,7 +4,7 @@ declare const timestampNsBrand: unique symbol; * A unix-nanosecond timestamp, exactly as the server sends it. * * NOT milliseconds. `new Date(t)` is out of range and yields an Invalid Date, whose - * `.toISOString()` then throws; `models/timestamp-guard.d.ts` turns that into a + * `.toISOString()` then throws; `models/timestamp-guard.ts` turns that into a * compile error. Comparing or sorting two timestamps is fine -- same unit, plain * numbers. Everything else should go through this SDK's time helpers: * @@ -14,6 +14,7 @@ declare const timestampNsBrand: unique symbol; * nsToRfc3339(t) an RFC3339 string keeping sub-millisecond precision * dateToNs(d), msToNs(ms) back to a wire timestamp * nowNs() the local clock, wire-comparable + * asTimestampNS(n) brand a number already in ns (DB rows, fixtures) -- no conversion * * A request date field is typed `Date`, not this -- pass `nsToDate(t)` when handing a * server-sent timestamp back to the API, or `nsToRfc3339(t)` where precision matters. @@ -17769,6 +17770,7 @@ export interface RuleBuilderCondition { ocr_content_params?: OCRContentParameters; text_content_params?: TextContentParameters; text_rule_params?: TextRuleParameters; + user_channel_count_params?: UserChannelCountRuleParameters; user_created_within_params?: UserCreatedWithinParameters; user_custom_property_params?: UserCustomPropertyParameters; user_flag_count_rule_params?: FlagCountRuleParameters; @@ -22243,6 +22245,11 @@ export interface UserBannedEvent { created_by?: UserResponseCommonFields; } +export interface UserChannelCountRuleParameters { + threshold?: number; + time_window?: string; +} + export interface UserCreatedWithinParameters { max_age?: string; } diff --git a/src/gen/models/timestamp-guard.d.ts b/src/gen/models/timestamp-guard.ts similarity index 89% rename from src/gen/models/timestamp-guard.d.ts rename to src/gen/models/timestamp-guard.ts index 0b952ae..966c56a 100644 --- a/src/gen/models/timestamp-guard.d.ts +++ b/src/gen/models/timestamp-guard.ts @@ -22,3 +22,6 @@ declare global { }; } } + +// Keeps this a module, which `declare global` requires, independent of the import above. +export {}; From c153019087d5084357b0f0f2c2c3ae42c99ef563 Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Mon, 19 Oct 2026 08:58:45 -0500 Subject: [PATCH 07/13] chore: add feeds, video and moderation snippets to runner --- .claude/skills/docs-sync/SKILL.md | 11 +- __tests__/docs-snippets/AGENTS.md | 89 +- __tests__/docs-snippets/README.md | 29 +- __tests__/docs-snippets/docs-snippets-todo.md | 12 + __tests__/docs-snippets/global-setup.ts | 7 +- __tests__/docs-snippets/helpers/call-types.ts | 63 ++ __tests__/docs-snippets/helpers/cleanup.ts | 111 +++ __tests__/docs-snippets/helpers/feeds.ts | 141 +++ __tests__/docs-snippets/helpers/leaks.ts | 289 +++++- __tests__/docs-snippets/helpers/server.ts | 110 +++ __tests__/docs-snippets/helpers/uploads.ts | 19 + __tests__/docs-snippets/helpers/video.ts | 46 + __tests__/docs-snippets/maintenance/sweep.ts | 4 +- .../v3-latest/01-basics/01-quickstart.test.ts | 289 ++++++ .../03-feed_groups/01-feed-groups.test.ts | 445 +++++++++ .../03-feed_groups/02-feed-views.test.ts | 185 ++++ .../03-feed_groups/03-aggregation.test.ts | 184 ++++ .../03-feed_groups/04-custom_ranking.test.ts | 932 ++++++++++++++++++ .../05-activity_selectors.test.ts | 618 ++++++++++++ .../06-notification_feeds.test.ts | 831 ++++++++++++++++ .../07-activity_processors.test.ts | 259 +++++ .../03-feed_groups/08-for_you_feed.test.ts | 187 ++++ .../03-feed_groups/09-stories.test.ts | 321 ++++++ .../03-feed_groups/10-user-interests.test.ts | 78 ++ .../04-feeds-and-follows/01-feeds.test.ts | 495 ++++++++++ .../02-search-feeds.test.ts | 289 ++++++ .../03-visibility.test.ts | 127 +++ .../04-feeds-and-follows/04-follows.test.ts | 489 +++++++++ .../05-changing-feed-visibility.test.ts | 115 +++ .../05-membership-levels.test.ts | 334 +++++++ .../06-feed-members.test.ts | 205 ++++ .../05-activities/01-activities.test.ts | 438 ++++++++ .../02-querying-activities.test.ts | 343 +++++++ .../04-activity-feedback.test.ts | 175 ++++ .../05-activities/05-activity-metrics.test.ts | 323 ++++++ .../06-features/01-reactions.test.ts | 352 +++++++ .../06-features/02-bookmarks.test.ts | 313 ++++++ .../v3-latest/06-features/03-comments.test.ts | 433 ++++++++ .../06-features/04-file_uploads.test.ts | 129 +++ .../06-features/05-user-mentions.test.ts | 164 +++ .../06-features/06-url-previews.test.ts | 266 +++++ .../v3-latest/06-features/07-pins.test.ts | 143 +++ .../v3-latest/06-features/08-polls.test.ts | 492 +++++++++ .../06-features/10-moderation.test.ts | 403 ++++++++ .../06-features/11-collections.test.ts | 361 +++++++ .../12-troubleshooting/01-rate_limits.test.ts | 78 ++ .../14-best_practices/03-cutoff-date.test.ts | 88 ++ .../04-hot-feed-cache.test.ts | 122 +++ .../02-feed_group_push_configuration.test.ts | 72 ++ .../15-push/03-push_template.test.ts | 112 +++ .../01-basics/02-installation.agent.test.ts | 34 + .../node/01-basics/02-installation.test.ts | 44 + .../node/06-features/06-events.test.ts | 64 ++ .../02-file_uploads.standalone.test.ts | 5 +- .../chat/04-messages/02-file_uploads.test.ts | 18 +- .../02-app_settings.test.ts | 4 +- .../02-quick-start-chat-moderation.test.ts | 185 ++++ .../03-quick-start-feeds-moderation.test.ts | 96 ++ .../07-quick-start-call-moderation.test.ts | 249 +++++ ...08-quick-start-feeds-v3-moderation.test.ts | 222 +++++ .../04-configuration/01-policies.test.ts | 169 ++++ .../04-configuration/02-rules.test.ts | 171 ++++ .../04-configuration/04-filters.test.ts | 253 +++++ .../04-configuration/05-evaluations.test.ts | 174 ++++ .../04-configuration/05-flooding.test.ts | 88 ++ .../05-content-moderation/01-check.test.ts | 330 +++++++ .../02-flag-mute-ban.test.ts | 423 ++++++++ .../06-review-queue/01-review-queue.test.ts | 100 ++ .../06-review-queue/02-actions.test.ts | 285 ++++++ .../06-review-queue/03-appeals.test.ts | 393 ++++++++ .../06-review-queue/04-labels.test.ts | 70 ++ .../06-review-queue/05-custom-views.test.ts | 180 ++++ .../01-logs-and-analytics.test.ts | 188 ++++ .../10-multitenancy/01-multitenancy.test.ts | 397 ++++++++ .../11-guides/07-client-configuration.test.ts | 38 + .../09-rule-triggered-webhooks.test.ts | 68 ++ .../01-getting-started.test.ts | 174 ++++ .../01-webhooks.test.ts | 45 +- .../01-basics/01-get_started.agent.test.ts | 29 + .../01-basics/01-get_started.client.test.ts | 44 + .../api/01-basics/01-get_started.test.ts | 216 ++++ .../video/api/01-basics/03-calls.test.ts | 675 +++++++++++++ .../video/api/01-basics/04-ring-calls.test.ts | 220 +++++ .../api/02-call_types/02-manage-types.test.ts | 126 +++ .../api/02-call_types/03-geofencing.test.ts | 87 ++ .../api/02-call_types/03-permissions.test.ts | 129 +++ .../api/02-call_types/05-settings.test.ts | 155 +++ .../api/03-streaming/01-overview.test.ts | 137 +++ .../api/03-streaming/02-backstage.test.ts | 214 ++++ .../video/api/03-streaming/04-rtmp.test.ts | 69 ++ .../video/api/03-streaming/06-srt.test.ts | 86 ++ .../video/api/03-streaming/08-hls.test.ts | 186 ++++ .../03-streaming/09-rtmp_broadcast.test.ts | 177 ++++ .../video/api/04-quality/03-stats.test.ts | 38 + .../api/06-moderation/01-overview.test.ts | 383 +++++++ .../api/07-recording/02-composite.test.ts | 357 +++++++ .../07-recording/03-individual_track.test.ts | 168 ++++ .../video/api/07-recording/04-raw.test.ts | 144 +++ .../api/07-recording/05-audio_only.test.ts | 210 ++++ .../07-recording/06-frame_recording.test.ts | 109 ++ .../07-recording/07-manage_recordings.test.ts | 92 ++ .../video/api/07-recording/08-storage.test.ts | 307 ++++++ .../01-transcribing_calls.test.ts | 407 ++++++++ .../api/08-transcription/02-storage.test.ts | 297 ++++++ .../03-translated-captions.test.ts | 199 ++++ .../api/09-GDPR and Privacy/03-calls.test.ts | 75 ++ .../01-download-user-feedback.test.ts | 304 ++++++ .../12-analytics/03-call-attendance.test.ts | 166 ++++ .../04-participant-metrics.test.ts | 123 +++ __tests__/docs-snippets/setup.ts | 4 +- .../docs-snippets/sync/docs-sync.test.ts | 10 +- __tests__/docs-snippets/sync/parse.ts | 65 +- 112 files changed, 22490 insertions(+), 106 deletions(-) create mode 100644 __tests__/docs-snippets/helpers/call-types.ts create mode 100644 __tests__/docs-snippets/helpers/feeds.ts create mode 100644 __tests__/docs-snippets/helpers/uploads.ts create mode 100644 __tests__/docs-snippets/helpers/video.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/01-basics/01-quickstart.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/03-feed_groups/01-feed-groups.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/03-feed_groups/02-feed-views.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/03-feed_groups/03-aggregation.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/03-feed_groups/04-custom_ranking.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/03-feed_groups/05-activity_selectors.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/03-feed_groups/06-notification_feeds.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/03-feed_groups/07-activity_processors.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/03-feed_groups/08-for_you_feed.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/03-feed_groups/09-stories.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/03-feed_groups/10-user-interests.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/04-feeds-and-follows/01-feeds.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/04-feeds-and-follows/02-search-feeds.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/04-feeds-and-follows/03-visibility.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/04-feeds-and-follows/04-follows.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/04-feeds-and-follows/05-changing-feed-visibility.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/04-feeds-and-follows/05-membership-levels.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/04-feeds-and-follows/06-feed-members.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/05-activities/01-activities.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/05-activities/02-querying-activities.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/05-activities/04-activity-feedback.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/05-activities/05-activity-metrics.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/06-features/01-reactions.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/06-features/02-bookmarks.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/06-features/03-comments.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/06-features/04-file_uploads.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/06-features/05-user-mentions.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/06-features/06-url-previews.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/06-features/07-pins.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/06-features/08-polls.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/06-features/10-moderation.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/06-features/11-collections.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/12-troubleshooting/01-rate_limits.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/14-best_practices/03-cutoff-date.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/14-best_practices/04-hot-feed-cache.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/15-push/02-feed_group_push_configuration.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/15-push/03-push_template.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/node/01-basics/02-installation.agent.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/node/01-basics/02-installation.test.ts create mode 100644 __tests__/docs-snippets/pages/activity-feeds/v3-latest/node/06-features/06-events.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/02-quick-start/02-quick-start-chat-moderation.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/02-quick-start/03-quick-start-feeds-moderation.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/02-quick-start/07-quick-start-call-moderation.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/02-quick-start/08-quick-start-feeds-v3-moderation.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/04-configuration/01-policies.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/04-configuration/02-rules.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/04-configuration/04-filters.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/04-configuration/05-evaluations.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/04-configuration/05-flooding.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/05-content-moderation/01-check.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/05-content-moderation/02-flag-mute-ban.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/06-review-queue/01-review-queue.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/06-review-queue/02-actions.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/06-review-queue/03-appeals.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/06-review-queue/04-labels.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/06-review-queue/05-custom-views.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/09-logs-and-analytics/01-logs-and-analytics.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/10-multitenancy/01-multitenancy.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/11-guides/07-client-configuration.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/11-guides/09-rule-triggered-webhooks.test.ts create mode 100644 __tests__/docs-snippets/pages/moderation/node/01-getting-started/01-getting-started.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/01-basics/01-get_started.agent.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/01-basics/01-get_started.client.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/01-basics/01-get_started.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/01-basics/03-calls.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/01-basics/04-ring-calls.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/02-call_types/02-manage-types.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/02-call_types/03-geofencing.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/02-call_types/03-permissions.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/02-call_types/05-settings.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/03-streaming/01-overview.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/03-streaming/02-backstage.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/03-streaming/04-rtmp.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/03-streaming/06-srt.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/03-streaming/08-hls.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/03-streaming/09-rtmp_broadcast.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/04-quality/03-stats.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/06-moderation/01-overview.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/07-recording/02-composite.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/07-recording/03-individual_track.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/07-recording/04-raw.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/07-recording/05-audio_only.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/07-recording/06-frame_recording.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/07-recording/07-manage_recordings.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/07-recording/08-storage.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/08-transcription/01-transcribing_calls.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/08-transcription/02-storage.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/08-transcription/03-translated-captions.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/09-GDPR and Privacy/03-calls.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/12-analytics/01-download-user-feedback.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/12-analytics/03-call-attendance.test.ts create mode 100644 __tests__/docs-snippets/pages/video/api/12-analytics/04-participant-metrics.test.ts diff --git a/.claude/skills/docs-sync/SKILL.md b/.claude/skills/docs-sync/SKILL.md index a167613..32b8d59 100644 --- a/.claude/skills/docs-sync/SKILL.md +++ b/.claude/skills/docs-sync/SKILL.md @@ -6,7 +6,7 @@ argument-hint: "[path to the getstream.io checkout or its content/docs folder]" # Docs sync -The tests in `__tests__/docs-snippets/` run the server-side `Node.js` snippets of the Stream docs (the chat Node sidebar and the platform sidebar) against a real Stream app with the `@stream-io/node-sdk` server client. Each docs fence has exactly one marked region in a test, and `yarn test:docs:sync` checks that they still agree. This skill makes them agree again after either side changed. +The tests in `__tests__/docs-snippets/` run the server-side `Node.js` snippets of the Stream docs (the chat, activity feeds v3 and moderation Node sidebars, the video API sidebar and the platform sidebar: `SIDEBAR_FILES` in `sync/parse.ts`) against a real Stream app with the `@stream-io/node-sdk` server client. Each docs fence has exactly one marked region in a test, and `yarn test:docs:sync` checks that they still agree. This skill makes them agree again after either side changed. **Docs have preference.** When a region and its fence differ, the docs version is the source of truth: update the test to match it. Change the docs only when the docs snippet doesn't work (type error against the node SDK, runtime error that isn't caused by test setup, wrong request or response shape), and then write the fix back from the test. @@ -49,9 +49,9 @@ Before the sync check, make sure every server-side snippet on the tested pages h ### Scope -- Pages: every page of the `[chat][node].json` and `[platform][default].json` sidebars (`$DOCS_DIR/_sidebars/`) under `chat/` or `platform/`, the same list as `findSidebarPages` in `sync/parse.ts`. +- Pages: every page of the tested sidebars (`SIDEBAR_FILES` in `sync/parse.ts`, `$DOCS_DIR/_sidebars/`) under `PAGE_PREFIXES`, the same list as `findSidebarPages`. - Fences: every JS fence (`js`, `javascript`, `ts`, `typescript`) labelled `JavaScript` or unlabelled, together with its tab group: the other fences in the same `` block, or the fence alone when it isn't in one. -- Out of scope: `React` and `React Native` fences, `Node.js` fences inside a `` block, and comment-only fences. +- Out of scope: `React` and `React Native` fences, `Node.js` fences inside a `` block, fences listed in `EXCLUDED_FENCES` (`sync/parse.ts`), and comment-only fences. List them with a throwaway script in the scratchpad (page, heading, line, the labels in the group, the code). Then classify each group by its tabs first and the prose second: @@ -89,7 +89,7 @@ It runs without network and reports four kinds of failure. Collect them all, gro | Failure | Meaning | | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `snippets without a test region` | A `Node.js` fence on a tested sidebar page (chat Node, platform) has no region: a new snippet, a new page, or a fence whose key changed (see the next row). | +| `snippets without a test region` | A `Node.js` fence on a tested sidebar page (`SIDEBAR_FILES`) has no region: a new snippet, a new page, or a fence whose key changed (see the next row). | | mislabelled JS fences | A JS fence is unlabelled or has a label other than `JavaScript`, `React`, `React Native` or `Node.js`. | | `no such fence` | A region's key (`docs`, `heading`, `tab`, `index`) matches no fence: the fence was removed, moved, or its heading was renamed. The failure lists the page's fence keys. | | ` differs from :` | The region's code and the fence's code differ. | @@ -127,13 +127,14 @@ When a fix lands that resolves an entry in `docs-snippets-todo.md` (the docs fix ### New fence without a region -Write a test for it in the page's test file (create the file if the page is new). The path mirrors the docs path relative to `content/docs/`, without `/_default`: `chat/_default/04-messages/01-send_message.md` → `__tests__/docs-snippets/pages/chat/04-messages/01-send_message.test.ts`. Follow `__tests__/docs-snippets/AGENTS.md` (isolation with `uniqueId`, `Cleanup`, one `it` per snippet, basic `expect`s after each region). In short: +Write a test for it in the page's test file (create the file if the page is new). The path mirrors the docs path relative to `content/docs/`, without `/_default`: `chat/_default/04-messages/01-send_message.md` → `__tests__/docs-snippets/pages/chat/04-messages/01-send_message.test.ts`, `activity-feeds/v3-latest/_default/05-activities/01-activities.md` → `__tests__/docs-snippets/pages/activity-feeds/v3-latest/05-activities/01-activities.test.ts`. Follow `__tests__/docs-snippets/AGENTS.md` (isolation with `uniqueId`, `Cleanup`, one `it` per snippet, basic `expect`s after each region). In short: - Run the snippet with `const client = getServerClient()` (`helpers/clients.ts`), named `client` as in the docs. Users the snippet acts for (`user_id`, `created_by_id`) must exist first, with `uniqueId` ids. - Everything between the markers is the docs code; setup goes before, assertions after. Fragments get the minimal surrounding code to compile and run. - Comment-only fences need no region. - A fence that isn't code (e.g. a bare data shape) is a docs bug: rewrite it as code that runs (e.g. reading and logging the fields), and report it. Never remove a `Node.js` fence just because it is a fragment or can't be tested: wrap it, or put it in `it.skip`. - A snippet the test app can't run goes in `it.skip('BLOCKED: ', ...)` so it is still typechecked; report the exact API error. +- **Another SDK's code in a `Node.js` fence** (e.g. Feeds v2 `getstream` client code: `client.flagUser`, `client.user(id).flag`, `ctx.alice.feed(...)`): it isn't `@stream-io/node-sdk` code and isn't ours to update. Don't rewrite or relabel it: add the fence to `EXCLUDED_FENCES` in `sync/parse.ts` with a reason, and report it. - **Client-side code in a `Node.js` fence** (needs a connected user or a WebSocket, or a method the node SDK doesn't have: `connectUser`, `channel.watch()`, `client.on(...)`): never test different code from what the fence shows. If the node SDK can do the same thing, make the smallest docs fix that turns the fence into that call (`channel.watch()` → `channel.getOrCreate()`, `user_id` instead of `connectUser`). If it can't (events, WebSocket, local client state), the fence is mislabelled: label it `JavaScript`. Use `it.skip('BLOCKED: client-side code: ...')` only while that decision is open. Report it either way. To check what a server-side endpoint accepts, read the SDK source (`src/StreamClient.ts`, `src/StreamChatClient.ts`, `src/StreamChannel.ts`, `src/gen/`) or the OpenAPI spec (`chat-serverside-api.json` in https://github.com/GetStream/protocol/tree/main/openapi/v2). - **Push and webhooks**: don't test that notifications or webhook events arrive; assert the response or read the setting back (`getApp()`, `listPushProviders()`, ...). Never touch or use the test app's own push provider (see "Test app" in `AGENTS.md`): only use providers the test creates with `uniqueId` names. Snippets that need real credentials run in `describe.skipIf(!hasFirebaseCredentials)` (`helpers/push.ts`); the README's "Push credentials" section has the details. - **App-level side effects** (app settings, built-in channel types, grants, webhook URLs, push config, ...): read the original value first and restore it with `cleanup.add(...)`, or the file fails with `DRIFT`. diff --git a/__tests__/docs-snippets/AGENTS.md b/__tests__/docs-snippets/AGENTS.md index 2b977c0..4cc1b1e 100644 --- a/__tests__/docs-snippets/AGENTS.md +++ b/__tests__/docs-snippets/AGENTS.md @@ -11,16 +11,16 @@ New entries are added only after the user approves them (agents propose them in - `@stream-io/node-sdk` is aliased to the repo's `index.ts` (`resolve.alias` in `vitest.config.mts`, `paths` in `tsconfig.json`), so a docs fence that starts with `import ... from "@stream-io/node-sdk"` can be a region at module level: declare the values it uses (e.g. `apiKey`) above it. - The docs call the server client `client`: use `const client = getServerClient()` (`helpers/clients.ts`, 30s timeout) and the same variable names as the docs (`client`, `channel`, ...). `createUserToken(userId)` signs user tokens. - Snippets act on behalf of users with `user_id` / `created_by_id`: those users must exist (`client.upsertUsers`) and have `uniqueId` ids. -- **Isolation**: the id or name of everything a test creates comes from `uniqueId('name')`: users, channels, channel types, roles, commands, blocklists, segments, campaigns (name), user groups, moderation config keys, predefined filters, push providers. Polls are matched by their creator, so create them as a `uniqueId` user. Never use fixed ids like `"john"` or `"general"`. +- **Isolation**: the id or name of everything a test creates comes from `uniqueId('name')`: users, channels, channel types, roles, commands, blocklists, segments, campaigns (name), user groups, moderation config keys, rule names, feed moderation template names, evaluation set names and custom view (queue) names, external storage names, feeds membership level ids, feeds collection names / ids, predefined filters, push providers, call types, calls, feed groups, feeds, feed views. Polls are matched by their creator, so create them as a `uniqueId` user. Never use fixed ids like `"john"` or `"general"`. - **Cleanup**: register everything you create on a `Cleanup` instance and call `cleanup.run()` in `afterAll`. App-level settings changed by a test must be restored with `cleanup.add(...)`. - Tests in one file may share data created in `beforeAll`. Nothing may leak across files. - `cleanup.run()` attempts every step and then throws if anything failed, so leftovers show up as a failed `afterAll` instead of piling up in the app. Server-side hard channel deletion is a background task: `Cleanup` waits for it (`waitForTask`) and retries deleting channel types until their channels are gone. -- **Leak check** (`setup.ts`, runs automatically after each file's own `afterAll`): looks up everything minted by `uniqueId` in that file (users, channels, channel types, commands, roles, custom permissions, blocklists, segments, campaigns, user groups, moderation configs, predefined filters, push providers, polls). Anything still there fails the file with a `LEAK` error listing it, and is then removed. Per-user data (reminders, devices, drafts, ...) goes away with the user. It also snapshots app settings (incl. push and webhook config), pre-existing channel types and retention policies before the file and fails with `DRIFT` if anything changed and wasn't restored. -- **End-of-run sweep** (`global-setup.ts`, after every `yarn test:docs`): a file that throws while loading runs no hooks, so its cleanup and leak check never run. The sweep removes every `docs-test` resource created since the run started (channels are found by listing every channel created since then) and fails the run with a `LEAK` list. It also puts back the retention policies the run started with and fails with `DRIFT` if it had to. Don't run two `yarn test:docs` at once: the sweep would remove the other run's resources. +- **Leak check** (`setup.ts`, runs automatically after each file's own `afterAll`): looks up everything minted by `uniqueId` in that file (users, channels, channel types, commands, roles, custom permissions, blocklists, segments, campaigns, user groups, moderation configs, rules, feed moderation templates, evaluation sets and custom views, external storages, membership levels, feeds collections, predefined filters, push providers, polls, call types, calls, feed groups, feeds, feed views). Anything still there fails the file with a `LEAK` error listing it, and is then removed. Per-user data (reminders, devices, drafts, ...) goes away with the user; activities, comments and reactions with their feed. It also snapshots app settings (incl. push and webhook config), pre-existing channel types and retention policies before the file and fails with `DRIFT` if anything changed and wasn't restored. +- **End-of-run sweep** (`global-setup.ts`, after every `yarn test:docs`): a file that throws while loading runs no hooks, so its cleanup and leak check never run. The sweep removes every `docs-test` resource created since the run started (channels, calls and feeds are found by listing every one created since then) and fails the run with a `LEAK` list. It also puts back the retention policies the run started with and fails with `DRIFT` if it had to. Don't run two `yarn test:docs` at once: the sweep would remove the other run's resources. - Anything created under a non-`uniqueId` name can't be found by the leak check or the sweep. Don't do that. - **Eventual consistency**: channel type changes (`createChannelType` / `updateChannelType`) take ~30s to reach every API node. Call `await waitForChannelTypePropagation()` (from `helpers/wait.ts`) right after creating or updating a channel type. Timeouts are 90s per test and 180s per hook to leave room for this. Use `retry(fn, { retryIf })` for other eventually-consistent reads (e.g. search). Background tasks: `waitForTask(client, taskId)`, and `waitForBatchTask` for channel batch updates (their top-level status completes too early). - **App settings**: pages are run one at a time, so tests may change app settings and built-in channel types, but must restore them (`cleanup.add`). The check after each file fails with `DRIFT` otherwise. -- `updateChannelType(client, name, patch)` (`helpers/channel-types.ts`) fills in the fields the request requires; `grantMessagingMembers` (`helpers/grants.ts`) adds `messaging` member grants and registers the restore. `helpers/server.ts` has repeated lookups: `sendServerMessage`, `getServerUser` / `getServerMember` / `getServerChannel` (throw unless exactly one result matches), `deletePollsCreatedBy`, `waitForAppSetting` and `waitForTeamIdSupport` (multi-tenancy toggles). +- `helpers/call-types.ts`: `createCallType(client, cleanup)` creates a `uniqueId` call type, waits until it reads back, and registers it on `cleanup.callTypes`; `trackCallTypeCreates(client, cleanup)` does the same for fences that create the type themselves (spy, call before the region); `retryOnCallTypeMissing(fn)` retries calls into a new type (successful `getCallType` reads don't prove every node knows it: `getOrCreate` can still fail with code 16 "call type does not exist", wrap it in a spy inside regions). A call type with calls can't be deleted (code 4 "multiple calls of that type exist"): `Cleanup` hard-deletes `cleanup.calls` (waiting for the delete task) before `cleanup.callTypes`. `updateChannelType(client, name, patch)` (`helpers/channel-types.ts`) fills in the fields the request requires; `grantMessagingMembers` (`helpers/grants.ts`) adds `messaging` member grants and registers the restore. `helpers/server.ts` has repeated lookups: `sendServerMessage`, `getServerUser` / `getServerMember` / `getServerChannel` (throw unless exactly one result matches), `deletePollsCreatedBy`, `waitForAppSetting`, `waitForTeamIdSupport` (multi-tenancy toggles) `waitForReviewItem` (review queue item of an entity once its flags are there), `deleteFeedModerationTemplate` (the generated `v2DeleteTemplate()` can't send the name) and `saveAndRestoreEventHooks(client, cleanup)` (saves `event_hooks`, registers the restore, returns `{ original, restore }`; `waitForEventHooks`, `withoutTimestamps`). `helpers/feeds.ts`: `retryOnFeedGroupMissing`, `addActivityOnce`, `copyFeedGroup(client, cleanup, builtInId)` (a `uniqueId` group with a built-in group's settings, on `cleanup.feedGroups`), `notificationTypes` / `waitForNotificationTypes` (a user's built-in `notification` feed). `helpers/uploads.ts`: upload fixtures (`JPEG_BASE64` / `jpeg`, `MINIMAL_PDF`) and `ignoreMissingFile` (swallows the 404 of deleting a gone upload). - One `it` per docs snippet (or per closely related group of snippets in the same tab group). - Add basic `expect`s after each snippet to prove it did what the docs claim. @@ -46,6 +46,7 @@ New entries are added only after the user approves them (agents propose them in - `StreamFeedsClient`'s deprecated wrappers (`addReaction`, `followBatch`, `followUnbatch`) call `super.`, so a spy on the new method (`addActivityReaction`) doesn't see calls made through the wrapper: spy on the wrapper itself. - `client.feeds.feed(group, id)` returns a `StreamFeed` that calls the same `client.feeds` instance, so `vi.spyOn(client.feeds, 'updateFeedMembers')` also sees calls made through the feed object. +- A fence where one mid-fence call can't run on the test app (e.g. "there is no active session") can still run in a normal `it`: spy on that generated method (`client.video.*`; `StreamCall` methods go through it) with a `mockImplementation` that records the error and returns `undefined as never`, assert the error and the other calls. Bind the original before `vi.spyOn` (binding after it binds the spy and recurses). - To check state between calls inside a region (e.g. after each of several `hide()` calls), spy on the generated method (`client.chat.hideChannel`) with a `mockImplementation` that awaits the bound original, records a probe query, and returns the response. The region stays as is, and `mock.calls[i][0]` is typed (no cast). - To tell an API behavior from a snippet bug, write a throwaway probe test under `pages/` that logs the results of request variants (e.g. with and without a flag). It still runs the leak check, so name and register what it creates; delete the file before finishing. @@ -57,6 +58,7 @@ New entries are added only after the user approves them (agents propose them in - A snippet that assigns a result it never reads (`const update = await channel.update(...)`) fails `unused-imports/no-unused-vars`: assert on that variable after the region instead of disabling the rule. - A docs placeholder that has to fit a string-literal union (e.g. `push_provider: "apn or firebase or huawei or xiaomi"`) can stay in the docs: COPY-map it to a variable with a valid literal type (`const pushProvider = 'firebase'`). +- A COPY value can be a backtick literal (``id=`my-story` ``) to match a fence's template literal. Don't name a COPY variable after an identifier the fence also uses as an object (`john` with `john.id`): use `johnId` and declare `const john = { id: johnId }`. - COPY replaces the identifier everywhere in the region that isn't a property access or object key, including comments and strings (`sender="..."` also rewrote `{{sender.id}}`). Pick COPY names that appear nowhere else in the fence (`campaignSender`). - `DOCS_SYNC_WRITE` keeps line breaks that the test's prettier added because of longer COPY names, and docs prettier doesn't rejoin them. Check `git diff` after writing and rejoin untouched lines by hand (the sync check ignores wrapping). - To read the result of a call the region doesn't keep, spy on the method and `await` its `mock.results[0].value` (a promise for async methods), e.g. `client.updateLiveLocation`. @@ -85,7 +87,8 @@ New entries are added only after the user approves them (agents propose them in - A fence that builds a request object in a separate `const` and passes it later fails TS2322 when a field is a string-literal union (`callback.mode: "CALLBACK_MODE_REST"` widens to `string`). The plain-JS fix is to move the object inline into the call. - `updateChannelType` returns `commands` as names (`string[]`), while `getChannelType` / `listChannelTypes` return `Command` objects: compare by `.name`. `commands: ["all"]` expands to every built-in command (giphy, ban, unban, mute, unmute). - A `vi.spyOn(client, 'updateApp').mockImplementation(...)` must take `request?: UpdateAppRequest` (optional), or it fails TS2345. -- A correct fence that the SDK types reject can't be parked with `it.skip`: skipped bodies are still typechecked, so `yarn types:docs` fails for everyone. Stop and add it to the TODO's API spec / generator issues. The generator drops `nullable` everywhere (no `| null` in `src/gen/models`), e.g. `grants: null` on `updateChannelType` fails TS2322. +- A fence calling a method the node SDK doesn't have (left out of the spec, TS2339) also fails eslint's `no-unsafe-*` rules, which would break `yarn lint` in CI: put it in `it.skip('BLOCKED: SDK issue: ...')` and type the missing method with a narrow local cast on the client (`getServerClient() as StreamClient & { moderation: { method: (req: {...}) => Promise<{...}> } }`), with a comment, and list it in the TODO. The region stays as the docs have it. +- A correct fence that the SDK types reject can't be parked with `it.skip`: skipped bodies are still typechecked. Keep the region anyway (in a running `it` if it works at runtime, else `it.skip('BLOCKED: SDK issue: ...')`) so coverage passes, and add it to the TODO's API spec / generator issues: `yarn types:docs` reports it until the SDK is fixed, and the TODO lists every such known error. The generator drops `nullable` everywhere (no `| null` in `src/gen/models`), e.g. `grants: null` on `updateChannelType` fails TS2322. - `verifyAndParseWebhook` fences: build `req = { rawBody, headers: { 'x-signature': sig } }` before the region, where `sig` is the HMAC-SHA256 hex of the uncompressed JSON keyed with `STREAM_SECRET` and `rawBody` is the JSON or `zlib.gzipSync(json)` (the signature always covers the decompressed bytes). - Optional response fields (`GetTaskResponse.result`, `MessageResponse.i18n`) aren't narrowed by a status check: a fence reading `response.result.url` fails TS18048, and the docs fix is `?.`. - `getApp().app.enforce_unique_usernames` is typed `string` but `updateApp` expects `'no' | 'app' | 'team'`: cast the saved value when restoring it. `"team"` is accepted with multi-tenancy off. @@ -100,6 +103,7 @@ New entries are added only after the user approves them (agents propose them in - A fence that reuses the same placeholder ids for a call that needs a different resource (e.g. `deleteChannels({ cids: [cid1, cid2], skip_truncate: true })` after hard-deleting `cid1`/`cid2`, "distinct channels only") is a docs bug: give that call its own ids (`distinctCid1`, `distinctCid2`). Don't swap request fields in a spy to make it pass. +- A `Node.js` fence with another SDK's code (Feeds v2 `getstream` client code, e.g. on the moderation Feeds v2 quick start) isn't ours to update: list it in `EXCLUDED_FENCES` (`sync/parse.ts`) with a reason instead of rewriting or relabelling it. - Undefined app-supplied values in a fence (`userId`, `channelId`, ...) aren't docs bugs: define them in the test just before the region and leave the docs as they are. - A docs fix is the code change only: don't add explanatory comments to the fence (e.g. why `user_id` is needed). Put the reason in the report. @@ -128,9 +132,34 @@ New entries are added only after the user approves them (agents propose them in - SQS / SNS hooks with placeholder keys are accepted; `checkSQS` / `checkSNS` with fake keys resolve with `status: "error"` and an AWS "InvalidClientTokenId" message instead of rejecting (spy on the method to assert the result). Failover configs are validated on save: placeholder GCS credentials fail with code 4, and `type: "s3"` is not enabled on the test app (code 4). Probe with one `updateApp` call before writing setup. - `waitForChannelTypePropagation()` waits only for what changed since its last call (`getServerClient()` records channel type creates and updates): a new type ≥10s after creation plus 10 agreeing lookups, an update of a docs-test type 10s, an update of a built-in or pre-existing type 30s (the DRIFT check reads those back). Measured 2026-10-13: updates are enforced everywhere within ~3s, but `getChannelType` / `listChannelTypes` reads can return the old value for over a minute, so read a type back with a retry (`waitForChannelType`-style) or assert the update response. A test with two waits on a built-in type needs an explicit timeout above the 90s default. - An app setting that changes API behavior (e.g. `enforce_unique_usernames`) can break later tests in the same file: restore it at the end of the test that changes it, and keep the `cleanup.add` restore as a fallback. -- The leak check doesn't track video calls: create them with `uniqueId` ids and `cleanup.add(() => client.video.call(type, id).delete({ hard: true }))`, ignoring "not found". -- Feeds v3 works on the test app (feed groups `user`, `timeline`, `notification`, ...), but the leak check and the end-of-run sweep don't track feeds: create them with `uniqueId` ids (`client.feeds.feed(group, id).getOrCreate({ user_id })`) and `cleanup.add(() => feed.delete({ hard_delete: true }))` (ignore "not found" when a snippet may already have deleted it). After a soft `deleteFeedUserData`, `getActivity` on the user's activity rejects with `metadata.responseCode: 404`. -- Feed groups are app-wide and eventually consistent: create them with a `uniqueId` id and `cleanup.add(() => client.feeds.deleteFeedGroup({ id, hard_delete: true }))`. Calls into a new group can fail with code 16 "Feed group with ID ... not found" for a while: spy on the call with a `mockImplementation` that retries the bound original on "not found". +- Video calls: create them with `uniqueId` ids and push the cid to `cleanup.calls` (hard deleted, "not found" ignored). Call types: `cleanup.callTypes` (see `helpers/call-types.ts`). +- Feeds v3 works on the test app (feed groups `user`, `timeline`, `notification`, ...): create feeds with `uniqueId` ids (`client.feeds.feed(group, id).getOrCreate({ user_id })`) and push the fid (`group:id`) to `cleanup.feeds` (hard deleted, "not found" / "can't be found" ignored, so a snippet may delete it first). After a soft `deleteFeedUserData`, `getActivity` on the user's activity rejects with `metadata.responseCode: 404`. +- Feed groups are app-wide and eventually consistent: create them with a `uniqueId` id (hyphens are accepted) and push it to `cleanup.feedGroups` (deleted after `cleanup.feeds`). Calls into a new group can fail with code 16 "Feed group with ID ... not found" for a while (usually 1–2s): `retryOnFeedGroupMissing(client, ['getOrCreateFeed', 'follow', ...])` (`helpers/feeds.ts`) spies on the generated methods and retries them (`StreamFeed` methods go through `client.feeds`). `addActivity` into a new group can answer "not found" after storing the activity, so a blind retry adds it twice: in setup use `addActivityOnce(client, request)` (explicit id, retries only while `getActivity` doesn't find it). `updateFeedGroup` changes take a few seconds to reach reads: wait for several reads in a row to agree. An `updateFeedGroup` fence that leaves fields out clears them, including `aggregation` and `push_notification.push_types`. Feed group `ranking.type` accepts only `expression` and `interest` (code 4); recency is the default when `ranking` is omitted. `updateFeedGroup({ id })` with no other fields clears `custom` (updates replace every field). `deleteFeedGroup` without `hard_delete` soft-deletes (listed only with `include_soft_deleted: true`). +- Feed views are app-wide and eventually consistent: `uniqueId` ids and `cleanup.add(() => client.feeds.deleteFeedView({ id }))` (ignore "not found"). `getFeedView` and `getOrCreate({ view })` answer code 16 "... not found" for 1–3s after a create (`retryOnFeedGroupMissing` / `isFeedGroupMissing` match it), `listFeedViews` lags ~4s, `ranking.type: "recency"` is rejected, `updateFeedView({ id })` replaces every field. To read a spy that `retryOnFeedGroupMissing` installed, call `vi.spyOn(client.feeds, 'method')` again (returns the existing mock); `vi.mocked(client.feeds.method)` fails `unbound-method`. +- `updateApp({ max_aggregated_activities_length })` returns 200 but `getApp` keeps 0 and the limit isn't applied (2026-10-16); values over 100 are rejected (code 4). +- Feed ranking: ranked results settle within ~1–3s; make test popularity the reverse of recency so a passing order proves the ranking. Popularity = reactions (one per type per user: use several types) + shares × 3. Ranking expressions are validated on create (unknown variables such as `externals`, fields without defaults, non-map arguments to map functions, `min_popularity` < 1 for the popular selector). `preference_score` is 0 until the user gives `activityFeedback`. A group created without `activity_selectors` defaults to `current_feed`. Map key order in responses (`ranking.functions`) isn't stable: sort before comparing. A duplicate `createFeedGroup` id (or a built-in id like `timeline`) fails with "already exists": a docs bug. +- Popularity = reactions + comments ×2 + bookmarks ×3 + shares ×3: `addCommentsBatch` from one user is the cheapest way to a high popularity (35 comments = 70). A proximity selector group needs a `near` / `within_bounds` filter on read (code 4 for a user without a location); give activities `location: { lat, lng }`. To prove a `feed_groups` scope exclude, give the excluded `uniqueId` group a popular activity and show it before and gone after the update. In `beforeAll` (before a `beforeEach` spy exists), wrap calls into a new group in `retry(..., { retryIf: isFeedGroupMissing })`. +- `DOCS_SYNC_WRITE` re-indents template-literal content by the region's indentation: indent it 4 extra spaces in the test. +- A file-wide `beforeEach(() => retryOnFeedGroupMissing(...))` covers flaky first reads of new groups; inside a region read results by calling `vi.spyOn` again plus `mockClear()`. +- Activity processors (`text_interest_tags`): topics aren't in the `addActivity` response; they appear on `getActivity` after ~2–10s. On a new group, about 1 activity in 4 never gets topics (likely a node with a stale group config): wait for several `getFeedGroup` reads in a row before posting, `retry(getActivity)`, and fall back to posting the same text again. The built-in `user` group has no `activity_processors`. `allowed_tags` read back sorted. +- Feeds `getOrCreate({ data })` on an existing feed ignores `data` (`created: false`): a fence that creates the same feed twice with different data is a docs bug (give the second its own id). Server-side `createFeedsBatch` requires `created_by_id` on every feed (code 4). After a hard delete task completes the same fid can be re-created (`created: true`, empty); before that `getOrCreate` answers code 16 "has been deleted". `deleteFeedsBatch` on deleted feeds fails with code 16 "can't be found". +- Fixed ids built inside a template literal (`` `feed_${index}` ``) can't be COPY-mapped: a pass-through spy that only prefixes the id field with a `uniqueId` keeps the region as written and isolated. +- `queryFeeds` full-text filters (`$q` on name, description, `created_by.name`) match single words and find new feeds within ~1s: put a run-unique word into names to scope an undefined search variable exactly; for fixed docs literals (`"Sports"`), add a public matching feed and a private one and assert inclusion / exclusion. `queryFeeds` takes no `user_id`. +- `changeFeedVisibility` (`StreamFeed.changeFeedVisibility`, no `user_id`) is async: a second change right after the first can fail with code 4 "a visibility change is already in progress for this feed" (retry in a spy), and until it applies follows behave like the old visibility. Tag-visibility activities come back `preview: true` for viewers without the tag and `false` for the owner. +- Follows: a fence that follows the same source/target pair twice is a docs bug (code 4 "... already exists in accepted state"): give the later call its own target. `StreamFeed` (`client.feeds.feed(...)`) has no `follow` / `unfollow`: a fence calling `feed.follow("group:id", {...})` is client JS SDK code (label it `JavaScript`). `UpdateFollowRequest` uses `follower_role` (unknown fields like `role` are dropped by the generated method). +- Feeds membership levels are app-wide: `uniqueId` ids on `cleanup.membershipLevels` (deleted after `cleanup.feeds`, retried while code 17 "... currently in use by feed members"). `updateMembershipLevel` returns 500 (code -1, empty message) for any level that was ever assigned to a member, also after the member is removed (2026-10-16): show an update works on a never-assigned level. Feed member roles aren't validated; `queryFeedMembers` without a filter returns accepted members only. A fence that accepts and then rejects the same invite is a docs bug ("feed member is not in pending state"). +- Feed auto-creation on `addActivity` / `upsertActivities` needs an existing user whose id equals the feed id, in any group (otherwise code 113 "Missing feed ... can't be created: user not found"): for fixed docs fids create a `uniqueId` user per feed id and use `group:`. Server-side `deleteActivity` takes no `user_id` (TS2353); `deleteActivities` takes `ids` (not `id`). Soft-deleting an already soft-deleted activity in `deleteActivities` succeeds. +- `queryActivities`: `hidden: { $eq: true }` matches nothing, use `hidden: true` (2026-10-16). For regions with app-wide filters (`{}`, `activity_type: "post"`), first `retry` a setup query scoped by `id` / `user_id` until the test's activity is indexed, then assert it's included (first for `created_at` desc). A moderation-removed activity (for `include_moderated_activities`): a `uniqueId` blocklist + config with a `remove` rule, `feed.update({ custom: { moderation_policy: key } })`, then `retry` `addActivity({ force_moderation: true })` until `activity.moderation.action === 'remove'` (~5s). +- `updateApp({ activity_metrics_config })` merges into the stored config, so `{}` changes nothing (docs say it resets). Restore an absent original with a raw `client.apiClient.sendRequest('PATCH', '/api/v2/app', undefined, undefined, { activity_metrics_config: null })` (the type has no `| null`) and `waitForAppSetting(client, 'activity_metrics_config', undefined)`. Activity `metrics` sync every ~5 minutes, so assert `trackActivityMetrics` results (`allowed`, `error`) instead; use up a limit with one large `delta` to hit the rate-limited branch. Server-side `addCommentReaction` / `queryCommentReactions` take `id` (not `comment_id`). +- Feeds bookmarks are identified by (user, activity, folder): to target a folderless bookmark in `updateBookmark` / `deleteBookmark`, leave out `folder_id`. Deleting a folder deletes its bookmarks; folder update / delete need no `user_id`. A cheap setup folder: `addBookmark({ activity_id, user_id, new_folder: { name } })`. A `next` cursor reused on a query with a different filter doesn't error but silently skips results: a docs bug. +- Server-side `updateComment` needs `user_id` (code 4 "either user or user_id must be provided when using server side auth"), although the types mark it optional: a Node.js fence without it is a docs bug. `restrict_replies: "people_i_follow"` rejects a non-follower's `addComment` with code 5. +- A COPY value can be an unquoted expression (`fixturesDir=import.meta.dirname`), so a fence that builds paths from `import.meta.dirname` can read fixtures from a tmpdir. A Node.js fence using `__dirname` together with `import` and top-level await can't run (it's an ES module): the docs fix is `import.meta.dirname`. +- Feeds URL enrichment: `https://example.com/...` has no OG data (`getOG` code 4 "could not find any opengraph data"), so COPY-map the docs URL (or whole text) to `https://getstream.io`; with `async_url_enrich_enabled` (on for the test app) attachments reach `getActivity` / `getComment` within ~1s. `getActivity` takes `{ id, comment_limit }` and returns the latest comments in `activity.comments` (no `latest_replies`); fences ported from client code (`getActivity(id, { with_recent_replies })`, `getOrCreateFeed(group, id, req)`) are docs bugs. `AddActivityRequest.expires_at` is an ISO `string`. Expired pins are left out of `queryPinnedActivities` without `include_expired_activities: true`. +- Feeds polls: a vote needs the poll in an activity first (`addActivity({ poll_id, ... })` by the poll's creator), then `client.feeds.castPollVote({ activity_id, poll_id, user_id, vote })`. `updatePollPartial` with `unset` nested inside `set` returns 200 and stores `unset` as a custom property (nothing unset): a docs bug; `unset` goes at the top level. +- Feeds collections are app-level and don't go away with their user or feed: `uniqueId` names and ids, refs (`name:id`) on `cleanup.collections`. `createCollections` on an existing ref fails with code 4 "One or more collections already exist"; `deleteCollections` on a missing ref succeeds. `StreamFeed` has no `addActivity`: a fence calling `feed.addActivity(...)` is client code, the node fix is `client.feeds.addActivity({ feeds: [fid], ..., user_id })`. An `updateFeedGroup` response omits `enable_push: false` (`push_notification` reads `{}`). +- Stories: `addActivity` accepts an `expires_at` in the past (an expired activity at once). Expired activities drop out of feed reads but `queryActivities` with an `expires_at` filter still finds them. +- To make an unread notification: `getOrCreate` the target's `notification` feed, then `addActivity` from another `uniqueId` user with `feeds: ['notification:']`; `notification_status.unread` counts it at once, and `markActivity({ mark_all_read: true, user_id })` resets it. +- Undeclared assignments in a fence (`client = new StreamClient(...)` twice) fail TS2304: the docs fix is `const client` plus a new name for the second (`clientWithTimeout`), not `let` (`no-useless-assignment`). - `notification` feeds aren't created automatically: `create_notification_activity` silently returns `notification_created: false` unless the target user's `notification` feed exists, so create it in setup. Deleting a feed that doesn't exist fails with "Feed ...: can't be found": match both "not found" and "can't be found" when cleanup ignores missing feeds. - Feed visibilities (`updateFeedVisibility`) are app-wide and not in the DRIFT snapshot. Save `getFeedVisibility({ name }).feed_visibility.grants`, restore only the roles the snippet changed (an update only touches the roles it names), and `retry` until the whole grants object equals the original. - App-level resources that the leak and drift checks don't track (e.g. retention policies): save the original list in `beforeAll`, and `cleanup.add` a restore that puts the originals back and deletes anything the file added. Check that the app is back to its original state after the run. @@ -223,6 +252,50 @@ New entries are added only after the user approves them (agents propose them in - Firebase calls validate the credentials on every request: `upsertPushProvider` and `updateApp({ firebase_config })` fail with code 4 "firebase credentials are invalid" without a real service account, even when only a template changes, so the whole test goes in `describe.skipIf(!hasFirebaseCredentials)`. On this push v3 app `getApp().app.push_notifications` legacy Firebase config is just `{ enabled: false }` and credentials are never returned: cleanup can only restore templates and the enabled flag. - Export tasks (`exportChannels`, `exportUsers`, `feeds.exportFeedUserData`; also `feeds.deleteFeedUserData`) finish within seconds: `waitForTask` is enough, and `result.url` downloads with plain `fetch` (no auth), so assert the export's contents (v2: one JSON object per line). - `client.moderation.flag`: a repeat flag by the same user on the same entity raises `flags_count`, but the review item's `flags` keep only the first one (later `reason` / `custom` are dropped). A fence that flags one placeholder id several times from one user with different reasons is a docs bug: give each call its own entity id. Check flags by `retry`ing `client.moderation.queryReviewQueue({ filter: { entity_id } })` until it returns one item (about a second), then assert `items[0].flags[i]`. +- Moderation configs: use `uniqueId` keys (a channel-level chat policy is `chat:messaging:`) and `cleanup.add(() => client.moderation.deleteConfig({ key }))`. COPY-map app-wide keys (`"feeds"`, `"chat:messaging"`) and blocklist names (`profanity_en` doesn't exist on the test app, only `profanity` and `url_detection_v1`) to test-owned ones. +- Right after `createBlockList`, `upsertConfig` referencing it can fail with code 4 "Blocklist not found" for ~5s: retry on that message (in a spy when it happens inside a region). A new policy can take a moment to apply: before asserting a block, `retry` a setup `check` / message until it is blocked. +- `ai_text_config` rule labels are validated (code 4 "invalid ai_text config rule label: X"). Accepted (2026-10-16): SPAM, SEXUAL_HARASSMENT, INSULT, HATRED, THREAT, MORAL_HARASSMENT, TROLLING, SCAM, SELF_HARM, DOXXING, PII, PLATFORM_BYPASS, BODY_SHAMING; `HARASSMENT`, `TOXIC`, `HATE_SPEECH`, `VIOLENCE` are rejected. +- Feeds `addActivity` with `force_moderation` returns `moderation: { action, original_text, blocklist_matched, blocklists_matched }` (no `status` / `recommended_action`). A banned user's `addActivity` fails with code 17 "... Your account is currently banned." +- Call moderation rules (`upsertModerationRule` with `rule_type: "call"`): `keyframe_rule_params` and `closed_caption_rule_params` require `time_window` (15s, 30s, 1m, 5m, 30m, 1h, 24h, 7d, 30d), and `keyframe_rule_params.min_confidence` must be 0.0–1.0. Rules have no client-chosen `id` (TS2353; the API assigns a UUID): give them `uniqueId` names and delete them by the id from the upsert response (spy on `upsertModerationRule`). +- `moderation.check` image checks return `status: "partial"` plus a `task_id` (async analysis) while a call rule with a keyframe condition exists on the app, `"complete"` otherwise: accept both. +- `CheckRequest.content_published_at` is a `Date`: a fence passing `new Date().toISOString()` fails TS2322, and the docs fix is `new Date()`. +- `upsertModerationRule` requires `rule_type` (user, content, call, flood); its `config_keys` aren't validated (a nonexistent `chat:messaging:` is accepted), and condition harm labels (`text_content_params.harm_labels`) aren't validated either, unlike `ai_text_config` labels. `getModerationRule` on a missing id rejects with code -1 and an empty message: prove a delete with `queryModerationRules({ filter: { id } })` returning `[]`. +- To prove a moderation config applies without a channel: `client.moderation.check({ entity_type: 'stream:chat:v1:message', entity_id: uniqueId(...), entity_creator_id, config_key, moderation_payload: { texts: [...] } })` against the test-owned key, asserting `recommended_action` (`retry` the first check). `deleteBlockList` succeeds while a config still references the blocklist. +- Moderation evaluation sets (`createPolicyTestSet`) get server-assigned ids and unique-per-app names (code 4 "... already exists"): use `uniqueId` names (the leak check matches them) and delete them by id. Runs finish within about a second: `retry` `getPolicyTestRun` until `status` is terminal. Seeded sets sample app-wide moderated content whatever `config_key` is passed. +- Team moderation: `upsertConfig({ team })` needs multi-tenancy on (code 4 "Team moderation configuration is not supported in single tenant mode"); `getConfig` / `deleteConfig` need the `team` too (without it: code 16). Team blocklists (`createBlockList({ team })`, works with multi-tenancy off) need `team` on get / update / delete, and `listBlockLists({ team })` is off on the test app (code 4 "Multi-tenant blocklist is not enabled for this app"). The leak check can't see either: register deletes with the team inside the multi-tenancy `describe`. Review queue `teams` filters match items whose entity creator is in the team. +- `queryModerationConfigs({ limit })` returns no `next` even when more configs exist: don't rely on its pagination cursor. +- `flood_config` works on `moderation.check`: N identical checks from one user (threshold N) give `keep` ×(N-1), then `flag`. +- `customCheck` responses have `item.flags: []`; the flags reach the review queue item about a second later (`waitForReviewItem(client, entityId, { flags })`). +- Server-side `client.queryBannedUsers` takes `{ payload: { filter_conditions, sort, limit, exclude_expired_bans } }`: top-level fields are a type error and never sent. `exclude_expired_bans` can be proven with a `timeout: 1` (minute) ban and a `retry` until it has expired (give that test ~150s). +- Ban and mute `expires` is exactly `created_at` + timeout, and the API clock can be a few ms ahead of the local one: compare `expires - created_at`, not against `Date.now()`. +- `client.moderation.bypass` takes `{ target_user_id, enabled }` (read back as `bypass_moderation` on the user). Block users with `client.blockUsers({ blocked_user_id, user_id })` and check `getBlockedUsers({ user_id })`. +- Moderation custom views (`createQueue`) have server-assigned ids and are capped at 10 per app: give them `uniqueId` names and delete them by id (an already deleted view fails with code 16; `deleteQueue` returns `queue: null`). `listQueues({ user_id })` re-creates a deleted user, so call it before the users are deleted. For a `queryReviewQueue({ filter: { reviewed: false } })` snippet, add a negative control: flag a newer item, `submitAction({ action_type: 'mark_reviewed', item_id, user_id })` it and assert it is absent. +- `submitAction` ban with `item_id`: the channel comes from the flagged message and only `ban: { channel_ban_only: true }` makes it a channel ban; unknown ban fields (e.g. `channel_cids`) are silently ignored and give an app-wide ban. Check bans with `queryBannedUsers` (`bans[i].channel?.cid`). To prove `ban_from_future_channels`, create a new channel by the original channel's creator with the target as member and check `members[].banned` from `getOrCreate({ state: true })`. `getReviewQueueItem(...).item.latest_moderator_action` reads back every `submitAction` (`custom:` for custom actions). Use a fresh `uniqueId` creator per flagged item when tests ban users. +- Appeals: content can only be appealed after a moderator action (e.g. `delete_message`) or a policy block, not on an unreviewed flag (code 4 "... flagged but not yet reviewed by a moderator"); ban appeals need an active ban (app-wide and channel bans are appealed separately, with `channel_cid`). For blocked content to `unblock`, use a channel-level blocklist policy plus `force_moderation: true` (`submitAction` `block` is rejected: "invalid action type: block"). Accepting via `unban` / `unblock` reads back `status: 'accepted'` with the `decision_reason`. +- `queryModerationLogs` rejects unknown filter fields (code 4 "unrecognized field"): allowed are id, type, created_at, date_range, target_user_id, entity_id, reporter_id, reporter_type, moderation_category, ai_providers, review_queue_item_id, reason, resource_type, label, config_key. +- To probe an endpoint the node SDK doesn't have: `client.moderation.apiClient.sendRequest(method, path, undefined, query, body)`. +- `upsertConfig` replaces the whole config: every engine config the request leaves out is reset to null. A fence that upserts an existing key with a partial config wipes the rest of the policy. `rule_builder_config` (only `async`, `rules`) is neither stored nor returned; moderation rules apply through their `config_keys` without an enable step. +- A fence using `require(...)` gets `any` and fails eslint (`no-require-imports`, `no-unsafe-*`): the docs fix is the equivalent ESM `import`. +- Video: `call.create` / `getOrCreate` on an existing call ignores `data.members` and `data.custom` (`created: false`, call unchanged): a fence that creates the same call twice with different data is a docs bug, so give the second create its own call id. In `GetOrCreateCallResponse.members` a member added without `role` has `role` undefined (`queryMembers` after `updateCallMembers` returns `'user'`). +- A client fence with empty credentials (`const apiKey = "";`) can be a module-level region with `COPY: streamApiKey=""` mapped to `process.env.STREAM_API_KEY`. The SDK's default timeout (3000) can be asserted with `vi.spyOn(AbortSignal, 'timeout')`. +- Video `queryCalls`: a `next` / `prev` request must repeat the original `sort` (without it: code 4 "cannot specify sort and next/prev at the same time", a misleading message). Sorting by `starts_at` returns an empty next page when the values are null. `filter_conditions: { backstage: { $eq: false } }` only matches calls that went live: create a `livestream` call and `goLive()` it (`default` has backstage off: "backstage is not enabled for call types default"). +- `StreamCall.queryMembers` takes the request directly (no `payload` wrapper, unlike `queryUsers` / `queryBannedUsers`). `StreamCall` has no `settings`: read them with `call.get()`. `UpdateCallRequest` has `settings_override` at the top level (no `data`). +- Video call type grants for an unknown role fail with code 4 `cannot use unknown role "x" in permission grants`; a just-created role can be unknown briefly (retry on "unknown role"). `updateCallType({ grants: {} })` leaves the grants unchanged. The node SDK exports `OwnCapability` (docs' `VideoOwnCapability` is a docs bug). Built-in call types: `audio_room`, `default`, `development`, `livestream`. +- Video `goLive({ start_hls, start_recording, start_closed_caption, start_transcription, ... })` on a call with no participants succeeds (storage names aren't validated) but starts nothing (`recording` / `transcribing` / `captioning` false, `egress.hls` null): assert `backstage`, not the processes. `updateCallType({ grants: { : [...] } })` replaces that role's list; a new call type has no `host` grants. +- `StreamCall.createSRTCredentials(userId)` is local and needs `call.data` from an awaited `get()` / `getOrCreate()` ("Object is not initialized"). Parse the address with `new URL(address)`: the last `streamid` segment is the user's JWT and `passphrase` its signature (don't compare with a fresh token: `iat` can differ). +- Video egress (`startHLSBroadcasting`, `startRTMPBroadcasts`, recording, ...) on a call nobody joined fails with code 4 "cannot broadcast inactive call", and the stop calls then fail too ("call egress is not running" code 4; "no active rtmp broadcasts ..." code 4 / 16): those fences are ⛔ BLOCKED with the exact error. A fresh call's `egress` is `{ broadcasting: false, hls: null, rtmps: [] }`. +- **Video call sessions without WebRTC**: `joinCallAsUser(call, userId)` (`helpers/video.ts`) joins over REST (`POST /video/call/{type}/{id}/join` with a user token) and starts a session. After it, `startRecording` / `startTranscription` / `startClosedCaptions` / `startHLSBroadcasting` / `startFrameRecording` and their stops work (2026-10-16), so egress fences aren't BLOCKED: join a `uniqueId` member first. `postAsVideoUser(userId, path, body)` calls other client-side video endpoints (e.g. `feedback`: needs a joined session, `sdk_version` ≥ 2 chars; server-side `collectUserFeedback` fails with "user_id is missing"). Feedback goes away with the call or user. `getActiveCallsStatus` is limited to 6 requests per minute (`retryOnRateLimit` spy). +- Video egress state lags behind the start: `recording` turns true ~6–9s after `startRecording`, `transcribing` / `captioning` after a few seconds; `egress._recording.status` / `frame_recording.status` are `starting` at once. Read state with `retry` (inside a spy on the start method if the fence stops right after). Register a `cleanup.add` stop (ignoring errors) for every egress a test starts. `startRTMPBroadcasts` to a placeholder target answers 201 but `egress.rtmps` stays `[]`; transcription to a placeholder S3 storage is accepted but `transcribing` never turns true. Only the creator (or a host) can REST-join a `livestream` call in backstage (a member gets code 17 JoinBackstage). +- To test `deleteRecording`: record a composite for ~10s on a joined call, `retry` until `listRecordings` returns it (~15s after the stop), and COPY-map `session_id` / `filename`. +- A custom role granted in a call type can't be deleted until that type is gone (code 4 "... present in permission grants of scopes [video:]"), and `cleanup.callTypes` runs after `cleanup.add` steps: delete the type inside the role's cleanup step. To stack a retry on a shared spy helper, wrap `spy.getMockImplementation()` (spying the same method again recurses). +- Video participant stats (`queryCallParticipantSessions`, `getCallParticipantSessionMetrics`, `queryCallStats` reports) need real SFU participants: a REST join leaves `call.session.participants` empty, and the endpoints answer code 16 "... not found" / "no stats available" indefinitely. Run single-call fences against a joined session with a spy that records the 404 (the request is still validated first: time window ≤ 30 min, `limit` ≤ 100, cursor, session id); `it.skip('BLOCKED: ...')` loops that page through results. +- Video `call.delete()` (soft) makes the call unreachable: a later hard delete fails with code 16 "Can't find call with id ..." (`cleanup.calls` ignores it) and the leak check can't list it, so a soft-deleted call stays on the app. `call.blockUser` / `kickUser` / `muteUsers` / `updateUserPermissions` work on a call with a REST-joined member. +- Video recording (`startRecording`) on a call nobody joined fails with code 4 "there is no active session"; stops fail with "call egress is not running" (composite) or `recording "call_raw_recorder:" is not running` (individual / raw). `StreamCall.startRecording` / `stopRecording` take `{ recording_type, ...request }`, not a positional string. `recording` settings (call `settings_override` or call type) with `mode` `available` / `auto-on` and `audio_only` false need `quality` (code 4 "recording quality is required when audio_only is false and recording is enabled"), even when the call already has one. +- External storages are app-wide (max 10 per app; the built-in `stream-s3` is always listed): `uniqueId` names, `cleanup.add(() => deleteExternalStorageIfExists(client, name))` (`helpers/server.ts`: a delete right after the create can fail with code 4 "... does not exist" while the storage is still listed). Placeholder S3 / ABS credentials are accepted on create and only fail `checkExternalStorage` (code 4 "InvalidAccessKeyId ..."); GCS credentials are validated on create (code 4 "invalid gcs credentials"). `startFrameRecording` / `startTranscription` on a call nobody joined fail with code 4 "there is no active session"; `deleteRecording` of an unknown file fails with code 16 "recording doesn't exist". +- The node SDK has no `Video...Enum` objects (TS2304): the docs fix is the string literal (`"1080p"`, `"spotlight"`). `updateCallType` takes `{ name, ...request }`, not positional args. +- COPY on a name the fence declares (`const callId = "my-call"`) drops that declaration on write-back: COPY a different name and keep `const callId = myCallId;` in the region. +- `moderation.ban` `timeout` is in minutes (prove it with `expires - created_at`). `ai_image_config.ocr_rules` take text harm labels (SPAM, INSULT, HATRED, SEXUAL_HARASSMENT, THREAT), not image labels (code 4 "invalid ai_image ocr rule label: X"). Blocklist words are at most 40 characters: don't build them from a `uniqueId`. `getApp().app.event_hooks` order isn't stable: match hooks by a field, not by index. +- A bare expression statement in a fence (`client.moderation;`) fails `no-unused-expressions`: the docs fix is to assign it. `${e}` on an unknown catch value fails `restrict-template-expressions`: the docs fix is `${String(e)}`. ### Server-side vs client-side diff --git a/__tests__/docs-snippets/README.md b/__tests__/docs-snippets/README.md index 6ce1c11..1764592 100644 --- a/__tests__/docs-snippets/README.md +++ b/__tests__/docs-snippets/README.md @@ -1,9 +1,15 @@ # Docs snippet tests -Typed tests that run the server-side Node.js snippets of the chat docs (the pages of the Node sidebar, -`getstream.io/content/docs/_sidebars/[chat][node].json`) and of the platform docs (the pages of -`getstream.io/content/docs/_sidebars/[platform][default].json`) against a real Stream app. -Only fences labelled `Node.js` are in scope (docs fences must always have a label): they are fixed when they are +Typed tests that run the server-side Node.js snippets of the Stream docs against a real Stream app: the pages of +these sidebars in `getstream.io/content/docs/_sidebars/` (`SIDEBAR_FILES` in `sync/parse.ts`): + +- chat: `[chat][node].json` +- activity feeds (v3): `[activity-feeds][node][v3].json` +- moderation: `[moderation][node].json` +- video: `[video][api].json` (the server-side API docs) +- platform: `[platform][default].json` + +Only fences labelled `Node.js` are in scope (a fence label, or the `label` of the enclosing `` on the video pages) (docs fences must always have a label): they are fixed when they are wrong. `JavaScript`, `React` and `React Native` fences (client-side code) and `Node.js` fences inside a `` block (reference implementations without the SDK) are out of scope and are neither tested nor changed. @@ -38,6 +44,9 @@ check that notifications or webhook events arrive. ``` pages/chat//.test.ts # chat Node.js snippets, run with the server client +pages/activity-feeds/v3-latest//.test.ts # feeds v3 Node.js snippets +pages/moderation//.test.ts # moderation Node.js snippets +pages/video/api//.test.ts # video API Node.js snippets pages/platform//.test.ts # platform Node.js snippets helpers/ # server client, unique ids, cleanup registry, server-side helpers, # waits, leak check, app snapshot, push credentials @@ -52,7 +61,9 @@ AGENTS.md # test conventions and API quirks, r The path mirrors the docs path (relative to `content/docs`) without `/_default`, e.g. `chat/_default/04-messages/01-send_message.md` maps to `pages/chat/04-messages/01-send_message.test.ts`, -`chat/node/01-quick_start/...` to `pages/chat/node/01-quick_start/...` and +`chat/node/01-quick_start/...` to `pages/chat/node/01-quick_start/...`, +`activity-feeds/v3-latest/_default/05-activities/01-activities.md` to `pages/activity-feeds/v3-latest/05-activities/01-activities.test.ts`, +`video/api/01-basics/03-calls.md` to `pages/video/api/01-basics/03-calls.test.ts` and `platform/02-identity-and-access/02-users.md` to `pages/platform/02-identity-and-access/02-users.test.ts`. ## Conventions @@ -74,14 +85,14 @@ await channel.getOrCreate({ data: { created_by_id: creatorId } }); ``` - **Fence key**: - - `docs` is the page path relative to `getstream.io/content/docs/` (`chat/...` or `platform/...`). + - `docs` is the page path relative to `getstream.io/content/docs/` (`chat/...`, `activity-feeds/...`, `moderation/...`, `video/...` or `platform/...`). - `heading` is the text of the nearest heading above the fence. - - `tab` is the fence `label` (or `unlabelled`). + - `tab` is the fence `label`, else the `label` of the enclosing `` (or `unlabelled`). - `index` is 1-based among fences with the same heading text and tab (default 1). - **COPY**: `name="literal"` pairs, applied to the region before comparing (identifier `name` becomes the docs literal). Don't use COPY variables as object keys or shorthand properties. - **Comparison**: both sides are formatted with the same prettier options, so quote style and line wrapping don't matter, but any code or comment change does. -- **Coverage** (checked first): every `Node.js` fence (`js`/`javascript`/`ts`/`typescript`) on the pages of the chat Node sidebar and the platform sidebar (`content/docs/_sidebars/[chat][node].json`, `[platform][default].json`), whether or not the page has tests yet, must have a region (inside `it.skip` if it can't run). `JavaScript` / `React` / `React Native` fences and comment-only fences are ignored. +- **Coverage** (checked first): every `Node.js` fence (`js`/`javascript`/`ts`/`typescript`) on the pages of the tested sidebars (see the top of this file; `$fragment` entries are resolved from `_sidebars/fragments/`), whether or not the page has tests yet, must have a region (inside `it.skip` if it can't run). `JavaScript` / `React` / `React Native` fences and comment-only fences are ignored. - **Labels**: every JS fence on those pages must be labelled `JavaScript`, `React`, `React Native` or `Node.js`; unlabelled or otherwise labelled JS fences fail. -- **Excluded pages**: `EXCLUDED_PAGES` in `sync/parse.ts` lists sidebar pages that are deliberately not validated, with a reason. Both checks skip them. +- **Excluded pages and fences**: `EXCLUDED_PAGES` in `sync/parse.ts` lists sidebar pages that are deliberately not validated, with a reason. Both checks skip them. `EXCLUDED_FENCES` does the same for single `Node.js` fences (keyed by fence id) that hold another SDK's code, e.g. Feeds v2 `getstream` client code on the moderation Feeds v2 quick start: not ours to test or update. - **`DOCS_SYNC_WRITE= yarn test:docs:sync`** writes the regions of that page into the docs fences (docs prettier style). Use it to apply a fix to the docs. `DOCS_SYNC_WRITE=1` writes all pages. - **`DOCS_DIR`** points at another docs checkout (default: `../getstream.io/content/docs` next to this repo). The check is skipped if the directory doesn't exist. diff --git a/__tests__/docs-snippets/docs-snippets-todo.md b/__tests__/docs-snippets/docs-snippets-todo.md index e20a45c..bcf60d2 100644 --- a/__tests__/docs-snippets/docs-snippets-todo.md +++ b/__tests__/docs-snippets/docs-snippets-todo.md @@ -8,6 +8,18 @@ Open issues found while testing the docs snippets, in two lists: [API spec / gen - **05-features/06-campaign_api** (API spec): `updateCampaign` and `stopCampaign` are typed as returning `CampaignResponse`, but the API returns `{ campaign: CampaignResponse, ... }` (like `StartCampaignResponse`), so `response.campaign` is a TS2339 error and `response.name` etc. are undefined at runtime. The response schemas of `PUT /campaigns/{id}` and `POST /campaigns/{id}/stop`. Reported: [Slack thread](https://getstream.slack.com/archives/C07AL9Q0T2T/p1791403182844109). - **04-messages/08-unread_reminders** (API spec, to check): `CreateChannelTypeRequest` has no `reminders` field, while `UpdateChannelTypeRequest` has it, so a channel type can't be created with reminders on in one call from typed code. Check whether the spec (`CreateChannelType`) lacks it or the API doesn't accept it. Reported: [Slack thread](https://getstream.slack.com/archives/C07AL9Q0T2T/p1791403182844109). - **platform/02-identity-and-access/01-authentication** (node SDK generator): `UpdateAppRequest.revoke_tokens_issued_before` is typed `Date` without `| null`, so the docs' `updateApp({ revoke_tokens_issued_before: null })` ("Undoing the revoke", Node.js #2) fails TS2322 and `yarn types:docs` reports it. Same root cause as the `grants: null` entry above (the generator drops `nullable`); check that the spec marks the field nullable. Not run against the API (see Blockers detail). `UpdateUserPartialRequest.set` is `Record`, so the user-level `set: { revoke_tokens_issued_before: null }` typechecks. Reported (as the generator `nullable` issue): [Slack thread](https://getstream.slack.com/archives/C07AL9Q0T2T/p1791403182844109). +- **moderation/02-quick-start/08-quick-start-feeds-v3-moderation** (API spec, to check): `AWSRekognitionRule.min_confidence` is required in the generated types (TS2741 without it), while the API accepts an `ai_image_config` rule without it (stored as `0`) and the docs treat it as optional ("Default is 50" on the call moderation page). The Node.js fence now passes `min_confidence: 50` explicitly; check whether the spec should mark it optional (and what the default really is). +- **moderation/02-quick-start/03-quick-start-feeds-moderation** (API spec): `DELETE /api/v2/moderation/feeds_moderation_template` (`v2DeleteTemplate`) has no request in the spec, so the generated method takes no arguments and sends no body. The API requires `name` in the DELETE body (code 4 `V2DeleteTemplate failed with error: "name is a required field"`; `?name=` doesn't work either), as in chat's `DeleteModerationTemplateRequest` (`Name` is `validate:"required"`). The docs' `v2DeleteTemplate({ name: "mod_tmpl_1" })`("Delete Template") fails TS2554, so a template can't be deleted from typed node SDK code (tests use`deleteFeedModerationTemplate`in`helpers/server.ts`). Other SDKs (Go `V2DeleteTemplateRequest{Name}`, Python) take a name. +- **moderation/04-configuration/05-evaluations** (API spec): `GET /api/v2/moderation/policy_tests/sets` (`listPolicyTestSets`) declares no query params, so the generated method takes no arguments and the docs' `listPolicyTestSets({ limit: 50 })` ("List evaluation sets") fails TS2554 (`yarn types:docs` reports it). The API reads `limit` / `offset` from the query string (chat `lib/moderation/controller/policytest.go`, `ListPolicyTestSets`, whose `OpenAPIInfo` has no Request); a raw `GET ?limit=1` returns one set. The Python and Go tabs pass `limit`. +- **moderation/05-content-moderation/01-check** (API spec): `POST /api/v2/moderation/analyze` (`client.moderation.analyze`) only accepts `multipart/form-data` with a JSON `payload` part (Blob, `application/json`; optional `image: