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..727a5dd 100644 --- a/__tests__/date-transform.test.ts +++ b/__tests__/date-transform.test.ts @@ -3,8 +3,9 @@ import { randomUUID } from 'crypto'; import { createTestClient } from './create-test-client'; import { StreamClient } from '../src/StreamClient'; import { UserRequest } from '../src/gen/models'; +import { nsToDate, nsToMs } from '../src/utils/time'; -describe('Date conversion', () => { +describe('dates on responses', () => { let client: StreamClient; const user = { id: 'stream-node-test-user', @@ -36,18 +37,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 - nsToMs(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(nsToMs(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 +76,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 - nsToMs(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: nsToDate(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 +112,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/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/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/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/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 c8db36d..b6124a7 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; } @@ -255,7 +253,7 @@ export interface ActionLogResponse { /** * Timestamp when the action was taken */ - created_at: Date; + created_at: number; /** * Unique identifier of the action log @@ -373,7 +371,7 @@ export interface ActivityAddedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -388,7 +386,7 @@ export interface ActivityAddedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -397,7 +395,7 @@ export interface ActivityDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -412,7 +410,7 @@ export interface ActivityDeletedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -421,7 +419,7 @@ export interface ActivityFeedbackEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; activity_feedback: ActivityFeedbackEventPayload; @@ -432,7 +430,7 @@ export interface ActivityFeedbackEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -452,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) @@ -514,7 +512,7 @@ export interface ActivityMarkEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -537,7 +535,7 @@ export interface ActivityMarkEvent { */ mark_all_seen?: boolean; - received_at?: Date; + received_at?: number; /** * The IDs of activities marked as read @@ -557,11 +555,23 @@ 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 */ - created_at: Date; + created_at: number; /** * ID of the feed where activity is pinned @@ -571,7 +581,7 @@ export interface ActivityPinResponse { /** * When the pin was last updated */ - updated_at: Date; + updated_at: number; activity: ActivityResponse; @@ -585,7 +595,7 @@ export interface ActivityPinnedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The ID of the feed @@ -603,7 +613,7 @@ export interface ActivityPinnedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -646,7 +656,7 @@ export interface ActivityReactionAddedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -663,7 +673,7 @@ export interface ActivityReactionAddedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -672,7 +682,7 @@ export interface ActivityReactionDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -689,7 +699,7 @@ export interface ActivityReactionDeletedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -698,7 +708,7 @@ export interface ActivityReactionUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -715,7 +725,7 @@ export interface ActivityReactionUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -724,7 +734,7 @@ export interface ActivityRemovedFromFeedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -739,7 +749,7 @@ export interface ActivityRemovedFromFeedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -880,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) @@ -931,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 @@ -1012,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 @@ -1094,7 +1104,7 @@ export interface ActivityRestoredEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -1109,7 +1119,7 @@ export interface ActivityRestoredEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -1175,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') @@ -1209,7 +1219,7 @@ export interface ActivityUnpinnedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The ID of the feed @@ -1227,7 +1237,7 @@ export interface ActivityUnpinnedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -1236,7 +1246,7 @@ export interface ActivityUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -1251,7 +1261,7 @@ export interface ActivityUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -1745,7 +1755,7 @@ export interface AggregatedActivityResponse { /** * When the aggregation was created */ - created_at: Date; + created_at: number; /** * Grouping identifier @@ -1760,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 @@ -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; @@ -2059,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; @@ -2077,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; } @@ -2109,7 +2121,7 @@ export interface AppealItemResponse { /** * When the flag was created */ - created_at: Date; + created_at: number; /** * ID of the entity @@ -2131,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 @@ -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; @@ -2206,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; } @@ -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. */ @@ -2261,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; @@ -2275,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; @@ -2293,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; @@ -2311,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; @@ -2329,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; @@ -2347,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; @@ -2365,7 +2382,7 @@ export interface AsyncExportUsersEvent { type: string; - received_at?: Date; + received_at?: number; } export interface AsyncModerationCallbackConfig { @@ -2653,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. @@ -2663,7 +2680,7 @@ export interface BanInfoResponse { /** * When the ban expires */ - expires?: Date; + expires?: number; /** * Reason for the ban @@ -2745,9 +2762,9 @@ export interface BanRequest { } export interface BanResponse { - created_at: Date; + created_at: number; - expires?: Date; + expires?: number; reason?: string; @@ -2912,7 +2929,7 @@ export interface BlockListResponse { /** * Date/time of creation */ - created_at?: Date; + created_at?: number; id?: string; @@ -2923,7 +2940,7 @@ export interface BlockListResponse { /** * Date/time of the last update */ - updated_at?: Date; + updated_at?: number; } export interface BlockListRule { @@ -2984,7 +3001,7 @@ export interface BlockUsersResponse { /** * Timestamp when the user was blocked */ - created_at: Date; + created_at: number; /** * Duration of the request in milliseconds @@ -2995,7 +3012,7 @@ export interface BlockUsersResponse { export interface BlockedUserEvent { call_cid: string; - created_at: Date; + created_at: number; /** * User response object @@ -3019,7 +3036,7 @@ export interface BlockedUserResponse { */ blocked_user_id: string; - created_at: Date; + created_at: number; /** * ID of the user who blocked another user @@ -3084,7 +3101,7 @@ export interface BookmarkAddedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; bookmark: BookmarkResponse; @@ -3095,7 +3112,7 @@ export interface BookmarkAddedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -3104,7 +3121,7 @@ export interface BookmarkDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; bookmark: BookmarkResponse; @@ -3115,7 +3132,7 @@ export interface BookmarkDeletedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -3124,7 +3141,7 @@ export interface BookmarkFolderDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; bookmark_folder: BookmarkFolderResponse; @@ -3135,7 +3152,7 @@ export interface BookmarkFolderDeletedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -3144,7 +3161,7 @@ export interface BookmarkFolderResponse { /** * When the folder was created */ - created_at: Date; + created_at: number; /** * Unique identifier for the folder @@ -3159,7 +3176,7 @@ export interface BookmarkFolderResponse { /** * When the folder was last updated */ - updated_at: Date; + updated_at: number; /** * User response object @@ -3176,7 +3193,7 @@ export interface BookmarkFolderUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; bookmark_folder: BookmarkFolderResponse; @@ -3187,7 +3204,7 @@ export interface BookmarkFolderUpdatedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -3196,7 +3213,7 @@ export interface BookmarkResponse { /** * When the bookmark was created */ - created_at: Date; + created_at: number; /** * ID of the bookmarked object @@ -3211,7 +3228,7 @@ export interface BookmarkResponse { /** * When the bookmark was last updated */ - updated_at: Date; + updated_at: number; activity: ActivityResponse; @@ -3236,7 +3253,7 @@ export interface BookmarkUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; bookmark: BookmarkResponse; @@ -3247,7 +3264,7 @@ export interface BookmarkUpdatedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -3535,7 +3552,7 @@ export interface BypassResponse { export interface CallAcceptedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Represents a call @@ -3570,7 +3587,7 @@ export interface CallActionOptions { } export interface CallClosedCaption { - end_time: Date; + end_time: number; id: string; @@ -3578,7 +3595,7 @@ export interface CallClosedCaption { speaker_id: string; - start_time: Date; + start_time: number; text: string; @@ -3595,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 @@ -3606,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 @@ -3617,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 @@ -3628,7 +3645,7 @@ export interface CallClosedCaptionsStoppedEvent { export interface CallCreatedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * the members added to this call @@ -3655,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) @@ -3675,7 +3692,7 @@ export interface CallDTMFEvent { /** * When the digit press ended and was detected */ - timestamp: Date; + timestamp: number; /** * User response object @@ -3691,7 +3708,7 @@ export interface CallDTMFEvent { export interface CallDeletedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Represents a call @@ -3715,7 +3732,7 @@ export interface CallDurationReportResponse { export interface CallEndedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Represents a call @@ -3746,7 +3763,7 @@ export interface CallEndedEvent { export interface CallFrameRecordingFailedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -3767,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; @@ -3802,7 +3819,7 @@ export interface CallFrameRecordingFrameReadyEvent { export interface CallFrameRecordingStartedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -3820,7 +3837,7 @@ export interface CallFrameRecordingStartedEvent { export interface CallFrameRecordingStoppedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -3838,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 @@ -3849,7 +3866,7 @@ export interface CallHLSBroadcastingFailedEvent { export interface CallHLSBroadcastingStartedEvent { call_cid: string; - created_at: Date; + created_at: number; hls_playlist_url: string; @@ -3867,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 @@ -3899,7 +3916,7 @@ export interface CallLevelEventPayload { export interface CallLiveStartedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Represents a call @@ -3915,7 +3932,7 @@ export interface CallLiveStartedEvent { export interface CallMemberAddedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * the members added to this call @@ -3936,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 @@ -3957,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 @@ -3978,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 @@ -4004,7 +4021,7 @@ export interface CallMemberUpdatedPermissionEvent { export interface CallMissedEvent { call_cid: string; - created_at: Date; + created_at: number; notify_user: boolean; @@ -4037,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 @@ -4058,7 +4075,7 @@ export interface CallModerationBlurEvent { export interface CallModerationWarningEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The warning message @@ -4084,7 +4101,7 @@ export interface CallModerationWarningEvent { export interface CallNotificationEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Call session ID @@ -4121,7 +4138,7 @@ export interface CallParticipantCountReportResponse { } export interface CallParticipantResponse { - joined_at: Date; + joined_at: number; role: string; @@ -4136,7 +4153,7 @@ export interface CallParticipantResponse { export interface CallParticipantTimeline { severity: string; - timestamp: Date; + timestamp: number; type: string; @@ -4146,7 +4163,7 @@ export interface CallParticipantTimeline { export interface CallReactionEvent { call_cid: string; - created_at: Date; + created_at: number; reaction: VideoReactionResponse; @@ -4157,7 +4174,7 @@ export interface CallReactionEvent { } export interface CallRecording { - end_time: Date; + end_time: number; filename: string; @@ -4165,7 +4182,7 @@ export interface CallRecording { session_id: string; - start_time: Date; + start_time: number; url: string; } @@ -4173,7 +4190,7 @@ export interface CallRecording { export interface CallRecordingFailedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -4192,7 +4209,7 @@ export interface CallRecordingFailedEvent { export interface CallRecordingReadyEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -4216,7 +4233,7 @@ export interface CallRecordingReadyEvent { export interface CallRecordingStartedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -4235,7 +4252,7 @@ export interface CallRecordingStartedEvent { export interface CallRecordingStoppedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -4254,7 +4271,7 @@ export interface CallRecordingStoppedEvent { export interface CallRejectedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Represents a call @@ -4280,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 { @@ -4321,7 +4338,7 @@ export interface CallResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; current_session_id: string; @@ -4344,7 +4361,7 @@ export interface CallResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; blocked_user_ids: Array; @@ -4372,7 +4389,7 @@ export interface CallResponse { /** * Date/time when the call ended */ - ended_at?: Date; + ended_at?: number; join_ahead_time_seconds?: number; @@ -4384,7 +4401,7 @@ export interface CallResponse { /** * Date/time when the call will start */ - starts_at?: Date; + starts_at?: number; team?: string; @@ -4396,7 +4413,7 @@ export interface CallResponse { export interface CallRingEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Call session ID @@ -4435,7 +4452,7 @@ export interface CallRtmpBroadcastFailedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Name of the given RTMP broadcast @@ -4457,7 +4474,7 @@ export interface CallRtmpBroadcastStartedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Name of the given RTMP broadcast @@ -4479,7 +4496,7 @@ export interface CallRtmpBroadcastStoppedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Name of the given RTMP broadcast @@ -4503,7 +4520,7 @@ export interface CallRuleActionSequence { export interface CallSessionEndedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Call session ID @@ -4526,7 +4543,7 @@ export interface CallSessionParticipantCountsUpdatedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Call session ID @@ -4544,7 +4561,7 @@ export interface CallSessionParticipantCountsUpdatedEvent { export interface CallSessionParticipantJoinedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Call session ID @@ -4562,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 @@ -4594,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 @@ -4836,7 +4853,7 @@ export interface CallStatsParticipant { sessions: Array; - latest_activity_at?: Date; + latest_activity_at?: number; name?: string; @@ -4894,7 +4911,7 @@ export interface CallStatsParticipantSession { distance_to_sfu_kilometers?: number; - ended_at?: Date; + ended_at?: number; freezes_duration_ms?: number; @@ -4912,7 +4929,7 @@ export interface CallStatsParticipantSession { sdk_version?: string; - started_at?: Date; + started_at?: number; unified_session_id?: string; @@ -4924,7 +4941,7 @@ export interface CallStatsParticipantSession { export interface CallStatsReportReadyEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Call session ID @@ -4958,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; @@ -4974,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; } @@ -4998,7 +5015,7 @@ export interface CallTranscription { export interface CallTranscriptionFailedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -5016,7 +5033,7 @@ export interface CallTranscriptionFailedEvent { export interface CallTranscriptionReadyEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -5034,7 +5051,7 @@ export interface CallTranscriptionReadyEvent { export interface CallTranscriptionStartedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -5047,7 +5064,7 @@ export interface CallTranscriptionStartedEvent { export interface CallTranscriptionStoppedEvent { call_cid: string; - created_at: Date; + created_at: number; egress_id: string; @@ -5060,7 +5077,7 @@ export interface CallTranscriptionStoppedEvent { export interface CallType { app: number; - created_at: Date; + created_at: number; id: number; @@ -5068,7 +5085,7 @@ export interface CallType { recording_external_storage: string; - updated_at: Date; + updated_at: number; notification_settings?: NotificationSettings; @@ -5079,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 @@ -5089,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 @@ -5113,7 +5130,7 @@ export interface CallTypeRuleParameters { export interface CallUpdatedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Represents a call @@ -5134,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) @@ -5174,7 +5191,7 @@ export interface CallUserFeedbackSubmittedEvent { export interface CallUserMutedEvent { call_cid: string; - created_at: Date; + created_at: number; from_user_id: string; @@ -5225,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; } @@ -5251,7 +5268,7 @@ export interface CampaignMessageTemplate { export interface CampaignResponse { create_channels: boolean; - created_at: Date; + created_at: number; description: string; @@ -5273,7 +5290,7 @@ export interface CampaignResponse { status: string; - updated_at: Date; + updated_at: number; segment_ids: Array; @@ -5285,9 +5302,9 @@ export interface CampaignResponse { stats: CampaignStatsResponse; - scheduled_for?: Date; + scheduled_for?: number; - stop_at?: Date; + stop_at?: number; channel_template?: CampaignChannelTemplate; @@ -5300,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; } @@ -5316,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; @@ -5368,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; @@ -5388,7 +5405,7 @@ export interface ChannelBatchCompletedEvent { type: string; - received_at?: Date; + received_at?: number; } export interface ChannelBatchMemberRequest { @@ -5398,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; @@ -5418,12 +5435,13 @@ export interface ChannelBatchStartedEvent { type: string; - received_at?: Date; + received_at?: number; } 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; } @@ -5474,7 +5507,7 @@ export interface ChannelConfig { count_messages: boolean; - created_at: Date; + created_at: number; custom_events: boolean; @@ -5512,7 +5545,7 @@ export interface ChannelConfig { typing_events: boolean; - updated_at: Date; + updated_at: number; uploads: boolean; @@ -5627,7 +5660,7 @@ export interface ChannelConfigWithInfo { count_messages: boolean; - created_at: Date; + created_at: number; custom_events: boolean; @@ -5665,7 +5698,7 @@ export interface ChannelConfigWithInfo { typing_events: boolean; - updated_at: Date; + updated_at: number; uploads: boolean; @@ -5725,7 +5758,7 @@ export interface ChannelCreatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -5761,7 +5794,7 @@ export interface ChannelCreatedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -5796,7 +5829,7 @@ export interface ChannelDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -5832,7 +5865,7 @@ export interface ChannelDeletedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -5872,7 +5905,7 @@ export interface ChannelFrozenEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -5896,7 +5929,7 @@ export interface ChannelFrozenEvent { */ cid?: string; - received_at?: Date; + received_at?: number; } export interface ChannelGetOrCreateRequest { @@ -5935,7 +5968,7 @@ export interface ChannelHiddenEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -5971,7 +6004,7 @@ export interface ChannelHiddenEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -6101,7 +6134,7 @@ export interface ChannelMemberResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; notifications_muted: boolean; @@ -6113,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 @@ -6156,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 @@ -6202,7 +6235,7 @@ export interface ChannelMetadata { custom: Record; - last_message_at?: Date; + last_message_at?: number; member_count?: number; @@ -6217,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 @@ -6244,7 +6277,7 @@ export interface ChannelMutedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -6253,7 +6286,7 @@ export interface ChannelMutedEvent { */ type: string; - received_at?: Date; + received_at?: number; /** * The mute objects @@ -6316,7 +6349,7 @@ export type ChannelOwnCapability = export interface ChannelPushPreferencesResponse { chat_level?: string; - disabled_until?: Date; + disabled_until?: number; chat_preferences?: ChatPreferencesResponse; } @@ -6330,7 +6363,7 @@ export interface ChannelResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; disabled: boolean; @@ -6352,7 +6385,7 @@ export interface ChannelResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * Custom data for this object @@ -6382,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 @@ -6392,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 @@ -6412,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 @@ -6427,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 @@ -6470,7 +6503,7 @@ export interface ChannelStateResponse { hidden?: boolean; - hide_messages_before?: Date; + hide_messages_before?: number; watcher_count?: number; @@ -6520,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 @@ -6563,7 +6596,7 @@ export interface ChannelTruncatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -6601,7 +6634,7 @@ export interface ChannelTruncatedEvent { message_id?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -6627,7 +6660,7 @@ export interface ChannelTypeConfig { count_messages: boolean; - created_at: Date; + created_at: number; custom_events: boolean; @@ -6665,7 +6698,7 @@ export interface ChannelTypeConfig { typing_events: boolean; - updated_at: Date; + updated_at: number; uploads: boolean; @@ -6705,7 +6738,7 @@ export interface ChannelUnFrozenEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -6729,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; @@ -6745,7 +6778,7 @@ export interface ChannelUnmutedEvent { */ type: string; - received_at?: Date; + received_at?: number; /** * The mute objects @@ -6761,7 +6794,7 @@ export interface ChannelUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -6799,7 +6832,7 @@ export interface ChannelUpdatedEvent { message_id?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -6820,7 +6853,7 @@ export interface ChannelVisibleEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -6856,7 +6889,7 @@ export interface ChannelVisibleEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -6903,7 +6936,7 @@ export interface ChatDraftPayloadResponse { export interface ChatDraftResponse { channel_cid: string; - created_at: Date; + created_at: number; message: ChatDraftPayloadResponse; @@ -6917,7 +6950,7 @@ export interface ChatDraftResponse { export interface ChatMessageResponse { cid: string; - created_at: Date; + created_at: number; deleted_reply_count: number; @@ -6941,7 +6974,7 @@ export interface ChatMessageResponse { type: string; - updated_at: Date; + updated_at: number; attachments: Array; @@ -6966,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; @@ -7091,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; @@ -7101,7 +7134,7 @@ export interface ChatReactionGroupResponse { } export interface ChatReactionGroupUserResponse { - created_at: Date; + created_at: number; user_id: string; @@ -7112,7 +7145,7 @@ export interface ChatReactionGroupUserResponse { } export interface ChatReactionResponse { - created_at: Date; + created_at: number; message_id: string; @@ -7120,7 +7153,7 @@ export interface ChatReactionResponse { type: string; - updated_at: Date; + updated_at: number; user_id: string; @@ -7135,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; @@ -7156,7 +7189,7 @@ export interface ChatReminderResponseData { export interface ChatSharedLocationResponseData { channel_cid: string; - created_at: Date; + created_at: number; created_by_device_id: string; @@ -7166,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; } @@ -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. */ @@ -7603,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. @@ -7685,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 @@ -7727,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; @@ -7756,7 +7794,7 @@ export interface CommentAddedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -7765,7 +7803,7 @@ export interface CommentDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -7780,7 +7818,7 @@ export interface CommentDeletedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -7789,7 +7827,7 @@ export interface CommentReactionAddedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -7808,7 +7846,7 @@ export interface CommentReactionAddedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -7817,7 +7855,7 @@ export interface CommentReactionDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -7834,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; @@ -7860,7 +7898,7 @@ export interface CommentReactionUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -7876,7 +7914,7 @@ export interface CommentResponse { /** * When the comment was created */ - created_at: Date; + created_at: number; /** * Number of downvotes for this comment @@ -7922,7 +7960,7 @@ export interface CommentResponse { /** * When the comment was last updated */ - updated_at: Date; + updated_at: number; /** * Number of upvotes for this comment @@ -7952,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 @@ -7998,7 +8036,7 @@ export interface CommentRestoredEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -8013,7 +8051,7 @@ export interface CommentRestoredEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -8022,7 +8060,7 @@ export interface CommentUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -8037,7 +8075,7 @@ export interface CommentUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -8146,7 +8184,7 @@ export interface ConfigResponse { /** * When the configuration was created */ - created_at: Date; + created_at: number; /** * Unique identifier for the moderation configuration @@ -8161,7 +8199,7 @@ export interface ConfigResponse { /** * When the configuration was last updated */ - updated_at: Date; + updated_at: number; supported_video_call_harm_types: Array; @@ -8242,7 +8280,7 @@ export interface CoordinatesResponse { export interface CountByMinuteResponse { count: number; - start_ts: Date; + start_ts: number; } export interface Coverage { @@ -8328,7 +8366,7 @@ export interface CreateCallTypeResponse { /** * the time the call type was created */ - created_at: Date; + created_at: number; duration: string; @@ -8340,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 @@ -8601,7 +8639,7 @@ export interface CreateChannelTypeResponse { count_messages: boolean; - created_at: Date; + created_at: number; custom_events: boolean; @@ -8641,7 +8679,7 @@ export interface CreateChannelTypeResponse { typing_events: boolean; - updated_at: Date; + updated_at: number; uploads: boolean; @@ -8841,6 +8879,8 @@ export interface CreateFeedGroupRequest { activity_filter?: ActivityFilterConfig; + activity_marks?: ActivityMarksConfig; + activity_processing?: ActivityProcessingConfig; aggregation?: AggregationConfig; @@ -8985,7 +9025,7 @@ export interface CreateImportV2TaskRequest { export interface CreateImportV2TaskResponse { app_pk: number; - created_at: Date; + created_at: number; /** * Duration of the request in milliseconds @@ -8998,7 +9038,7 @@ export interface CreateImportV2TaskResponse { state: number; - updated_at: Date; + updated_at: number; settings: ImportV2TaskSettings; } @@ -9463,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 @@ -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 @@ -10291,7 +10345,7 @@ export interface DeviceResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Device ID @@ -10398,7 +10452,7 @@ export interface DraftPayloadResponse { export interface DraftResponse { channel_cid: string; - created_at: Date; + created_at: number; /** * Contains the draft message content @@ -10471,7 +10525,7 @@ export interface EgressHLSResponse { export interface EgressRTMPResponse { name: string; - started_at: Date; + started_at: number; stream_key?: string; @@ -10597,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 @@ -10753,7 +10807,7 @@ export interface EntityCreatorResponse { banned: boolean; - created_at: Date; + created_at: number; /** * Number of major actions performed on the user @@ -10777,7 +10831,7 @@ export interface EntityCreatorResponse { shadow_banned: boolean; - updated_at: Date; + updated_at: number; blocked_user_ids: Array; @@ -10787,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; @@ -11076,7 +11130,7 @@ export interface FeedCreatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11095,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; @@ -11115,7 +11169,7 @@ export interface FeedDeletedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -11125,7 +11179,7 @@ export interface FeedGroup { app_pk: number; - created_at: Date; + created_at: number; default_follower_role: string; @@ -11133,7 +11187,7 @@ export interface FeedGroup { group_id: string; - updated_at: Date; + updated_at: number; activity_processors: Array; @@ -11141,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; @@ -11162,7 +11216,7 @@ export interface FeedGroupChangedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11175,7 +11229,7 @@ export interface FeedGroupChangedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; feed_group?: FeedGroup; @@ -11186,7 +11240,7 @@ export interface FeedGroupDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11204,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 @@ -11221,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 @@ -11235,7 +11289,7 @@ export interface FeedGroupResponse { default_visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private'; - deleted_at?: Date; + deleted_at?: number; /** * Configuration for activity processors @@ -11249,6 +11303,8 @@ export interface FeedGroupResponse { activity_filter?: ActivityFilterConfig; + activity_marks?: ActivityMarksConfig; + activity_processing?: ActivityProcessingConfig; aggregation?: AggregationConfig; @@ -11271,7 +11327,7 @@ export interface FeedGroupRestoredEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11289,7 +11345,7 @@ export interface FeedGroupRestoredEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; } export interface FeedGroupScope { @@ -11324,7 +11380,7 @@ export interface FeedMemberAddedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11339,7 +11395,7 @@ export interface FeedMemberAddedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -11348,7 +11404,7 @@ export interface FeedMemberRemovedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11363,7 +11419,7 @@ export interface FeedMemberRemovedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -11399,7 +11455,7 @@ export interface FeedMemberResponse { /** * When the membership was created */ - created_at: Date; + created_at: number; /** * Role of the member in the feed @@ -11415,7 +11471,7 @@ export interface FeedMemberResponse { /** * When the membership was last updated */ - updated_at: Date; + updated_at: number; /** * User response object @@ -11425,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 @@ -11444,7 +11500,7 @@ export interface FeedMemberUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -11459,7 +11515,7 @@ export interface FeedMemberUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -11574,7 +11630,7 @@ export interface FeedResponse { /** * When the feed was created */ - created_at: Date; + created_at: number; /** * Description of the feed @@ -11624,7 +11680,7 @@ export interface FeedResponse { /** * When the feed was last updated */ - updated_at: Date; + updated_at: number; /** * User response object @@ -11634,7 +11690,7 @@ export interface FeedResponse { /** * When the feed was deleted */ - deleted_at?: Date; + deleted_at?: number; /** * Visibility setting for the feed @@ -11678,7 +11734,7 @@ export interface FeedSuggestionResponse { /** * When the feed was created */ - created_at: Date; + created_at: number; /** * Description of the feed @@ -11728,7 +11784,7 @@ export interface FeedSuggestionResponse { /** * When the feed was last updated */ - updated_at: Date; + updated_at: number; /** * User response object @@ -11738,7 +11794,7 @@ export interface FeedSuggestionResponse { /** * When the feed was deleted */ - deleted_at?: Date; + deleted_at?: number; reason?: string; @@ -11783,7 +11839,7 @@ export interface FeedSuggestionResponse { } export interface FeedUpdatedEvent { - created_at: Date; + created_at: number; fid: string; @@ -11798,7 +11854,7 @@ export interface FeedUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -11812,7 +11868,7 @@ export interface FeedViewResponse { /** * When the feed view was last used */ - last_used_at?: Date; + last_used_at?: number; /** * Configured activity selectors @@ -11848,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 @@ -11867,7 +11923,7 @@ export interface FeedsBookmarkResponse { } export interface FeedsEnrichedCollectionResponse { - created_at: Date; + created_at: number; id: string; @@ -11875,7 +11931,7 @@ export interface FeedsEnrichedCollectionResponse { status: string; - updated_at: Date; + updated_at: number; user_id: string; @@ -11885,7 +11941,7 @@ export interface FeedsEnrichedCollectionResponse { export interface FeedsFeedResponse { activity_count: number; - created_at: Date; + created_at: number; description: string; @@ -11905,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; @@ -12063,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 @@ -12090,7 +12146,7 @@ export interface FeedsReactionResponse { export interface FeedsShareResponse { activity_id: string; - created_at: Date; + created_at: number; /** * User response object @@ -12103,7 +12159,7 @@ export interface FeedsV3ActivityResponse { comment_count: number; - created_at: Date; + created_at: number; hidden: boolean; @@ -12123,7 +12179,7 @@ export interface FeedsV3ActivityResponse { type: string; - updated_at: Date; + updated_at: number; visibility: string; @@ -12158,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; @@ -12208,7 +12264,7 @@ export interface FeedsV3CommentResponse { confidence_score: number; - created_at: Date; + created_at: number; downvote_count: number; @@ -12226,7 +12282,7 @@ export interface FeedsV3CommentResponse { status: string; - updated_at: Date; + updated_at: number; upvote_count: number; @@ -12241,9 +12297,9 @@ export interface FeedsV3CommentResponse { controversy_score?: number; - deleted_at?: Date; + deleted_at?: number; - edited_at?: Date; + edited_at?: number; parent_id?: string; @@ -12387,7 +12443,7 @@ export interface FlagDetailsResponse { } export interface FlagFeedbackResponse { - created_at: Date; + created_at: number; message_id: string; @@ -12450,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; @@ -12489,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 @@ -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; } @@ -12600,7 +12660,7 @@ export interface FollowCreatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -12615,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; @@ -12637,7 +12697,7 @@ export interface FollowDeletedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; } export interface FollowRequest { @@ -12704,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'. @@ -12726,7 +12786,7 @@ export interface FollowResponse { /** * When the follow relationship was last updated */ - updated_at: Date; + updated_at: number; source_feed: FeedResponse; @@ -12735,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 @@ -12752,7 +12812,7 @@ export interface FollowUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; fid: string; @@ -12767,7 +12827,7 @@ export interface FollowUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; } export interface FrameRecordSettings { @@ -12819,7 +12879,7 @@ export interface FriendReactionsOptions { export interface FullUserResponse { banned: boolean; - created_at: Date; + created_at: number; id: string; @@ -12841,7 +12901,7 @@ export interface FullUserResponse { unread_threads: number; - updated_at: Date; + updated_at: number; blocked_user_ids: Array; @@ -12857,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; @@ -12881,9 +12941,9 @@ export interface FullUserResponse { } export interface FutureChannelBanResponse { - created_at: Date; + created_at: number; - expires?: Date; + expires?: number; reason?: string; @@ -12937,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; @@ -13001,7 +13061,7 @@ export interface GetCallParticipantSessionMetricsResponse { is_subscriber?: boolean; - joined_at?: Date; + joined_at?: number; publisher_type?: string; @@ -13072,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>; @@ -13109,7 +13169,7 @@ export interface GetChannelTypeResponse { count_messages: boolean; - created_at: Date; + created_at: number; custom_events: boolean; @@ -13152,7 +13212,7 @@ export interface GetChannelTypeResponse { typing_events: boolean; - updated_at: Date; + updated_at: number; uploads: boolean; @@ -13199,9 +13259,9 @@ export interface GetCommandResponse { set: string; - created_at?: Date; + created_at?: number; - updated_at?: Date; + updated_at?: number; } export interface GetCommentRepliesResponse { @@ -13325,7 +13385,7 @@ export interface GetExternalStorageGCSResponse { } export interface GetExternalStorageResponse { - created_at: Date; + created_at: number; /** * Duration of the request in milliseconds @@ -13334,7 +13394,7 @@ export interface GetExternalStorageResponse { type: string; - updated_at: Date; + updated_at: number; aws_s3?: GetExternalStorageAWSS3Response; @@ -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) */ @@ -13451,7 +13521,7 @@ export interface GetImportResponse { export interface GetImportV2TaskResponse { app_pk: number; - created_at: Date; + created_at: number; /** * Duration of the request in milliseconds @@ -13464,7 +13534,7 @@ export interface GetImportV2TaskResponse { state: number; - updated_at: Date; + updated_at: number; settings: ImportV2TaskSettings; @@ -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 */ @@ -13968,7 +14050,7 @@ export interface GetSetupSessionResponse { } export interface GetTaskResponse { - created_at: Date; + created_at: number; duration: string; @@ -13982,7 +14064,7 @@ export interface GetTaskResponse { */ task_id: string; - updated_at: Date; + updated_at: number; error?: ErrorResult; @@ -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; } @@ -14331,7 +14413,7 @@ export interface ImportBlockListResponse { } export interface ImportTask { - created_at: Date; + created_at: number; id: string; @@ -14341,7 +14423,7 @@ export interface ImportTask { state: string; - updated_at: Date; + updated_at: number; history: Array; @@ -14349,7 +14431,7 @@ export interface ImportTask { } export interface ImportTaskHistory { - created_at: Date; + created_at: number; next_state: string; @@ -14359,7 +14441,7 @@ export interface ImportTaskHistory { export interface ImportV2TaskItem { app_pk: number; - created_at: Date; + created_at: number; id: string; @@ -14367,7 +14449,7 @@ export interface ImportV2TaskItem { state: number; - updated_at: Date; + updated_at: number; settings: ImportV2TaskSettings; @@ -14462,7 +14544,7 @@ export interface IngressAudioEncodingResponse { export interface IngressErrorEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Human-readable error message @@ -14541,7 +14623,7 @@ export interface IngressSourceResponse { export interface IngressStartedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Unique identifier for this stream @@ -14582,7 +14664,7 @@ export interface IngressStartedEvent { export interface IngressStoppedEvent { call_cid: string; - created_at: Date; + created_at: number; /** * Unique identifier for the stream @@ -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 { @@ -14782,7 +14874,7 @@ export interface KickUserResponse { export interface KickedUserEvent { call_cid: string; - created_at: Date; + created_at: number; /** * User response object @@ -14853,7 +14945,7 @@ export interface LabelResultResponse { /** * Timestamp */ - created_at: Date; + created_at: number; /** * High-level harm category @@ -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; @@ -15398,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; @@ -15468,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`. @@ -15499,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 @@ -15553,7 +15645,7 @@ export interface MemberAddedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -15569,7 +15661,7 @@ export interface MemberRemovedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -15610,7 +15702,7 @@ export interface MemberRemovedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -15637,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; @@ -15659,7 +15751,7 @@ export interface MemberResponse { /** * Date/time of deletion */ - deleted_at?: Date; + deleted_at?: number; role?: string; } @@ -15668,7 +15760,7 @@ export interface MemberUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -15709,7 +15801,7 @@ export interface MemberUpdatedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -15759,7 +15851,7 @@ export interface MembershipLevelResponse { /** * When the membership level was created */ - created_at: Date; + created_at: number; /** * Unique identifier for the membership level @@ -15779,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 @@ -15847,7 +15939,7 @@ export interface MessageDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Whether the message was hard deleted @@ -15898,7 +15990,7 @@ export interface MessageDeletedEvent { */ deleted_for_me?: boolean; - received_at?: Date; + received_at?: number; /** * The team ID @@ -15911,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; @@ -15956,7 +16048,7 @@ export interface MessageFlaggedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; message_id: string; @@ -16000,7 +16092,7 @@ export interface MessageFlaggedEvent { */ reason?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -16034,7 +16126,7 @@ export interface MessageHistoryEntryResponse { message_id: string; - message_updated_at: Date; + message_updated_at: number; message_updated_by_id: string; @@ -16054,7 +16146,7 @@ export interface MessageModerationResult { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * ID of the message @@ -16064,7 +16156,7 @@ export interface MessageModerationResult { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * Whether user has bad karma @@ -16103,7 +16195,7 @@ export interface MessageNewEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; message_id: string; @@ -16154,7 +16246,7 @@ export interface MessageNewEvent { */ parent_author?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -16254,7 +16346,7 @@ export interface MessageReadEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -16293,7 +16385,7 @@ export interface MessageReadEvent { */ last_read_message_id?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -16423,7 +16515,7 @@ export interface MessageResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; deleted_reply_count: number; @@ -16480,7 +16572,7 @@ export interface MessageResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * Array of message attachments @@ -16532,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 @@ -16551,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 @@ -16638,7 +16730,7 @@ export interface MessageUnblockedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; message_id: string; @@ -16659,7 +16751,7 @@ export interface MessageUnblockedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; } @@ -16668,7 +16760,7 @@ export interface MessageUndeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; message_id: string; @@ -16709,7 +16801,7 @@ export interface MessageUndeletedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -16729,7 +16821,7 @@ export interface MessageUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; message_id: string; @@ -16770,7 +16862,7 @@ export interface MessageUpdatedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -16793,7 +16885,7 @@ export interface MessageWithChannelResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; deleted_reply_count: number; @@ -16850,7 +16942,7 @@ export interface MessageWithChannelResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * Array of message attachments @@ -16907,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 @@ -16926,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 @@ -17093,7 +17185,7 @@ export interface ModerationActionConfigResponse { } export interface ModerationAnalysisFailedEvent { - created_at: Date; + created_at: number; type: string; @@ -17117,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. @@ -17141,7 +17233,7 @@ export interface ModerationCallResponse { cid: string; - created_at: Date; + created_at: number; current_session_id: string; @@ -17155,7 +17247,7 @@ export interface ModerationCallResponse { type: string; - updated_at: Date; + updated_at: number; blocked_user_ids: Array; @@ -17163,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; @@ -17180,7 +17272,7 @@ export interface ModerationCallResponse { } export interface ModerationCheckCompletedEvent { - created_at: Date; + created_at: number; /** * The ID of entity which was moderated @@ -17206,7 +17298,7 @@ export interface ModerationCheckCompletedEvent { type: string; - received_at?: Date; + received_at?: number; } export interface ModerationConfig { @@ -17255,7 +17347,7 @@ export interface ModerationCustomActionEvent { */ action_id: string; - created_at: Date; + created_at: number; custom: Record; @@ -17263,7 +17355,7 @@ export interface ModerationCustomActionEvent { type: string; - received_at?: Date; + received_at?: number; /** * Additional options passed to the custom action @@ -17283,6 +17375,8 @@ export interface ModerationDashboardPreferences { custom_views_enabled?: boolean; + disable_action_logs?: boolean; + disable_audit_logs?: boolean; disable_flagging_reviewed_entity?: boolean; @@ -17309,7 +17403,7 @@ export interface ModerationDashboardPreferences { } export interface ModerationFlagResponse { - created_at: Date; + created_at: number; entity_id: string; @@ -17317,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; @@ -17354,7 +17448,7 @@ export interface ModerationFlaggedEvent { */ content_type: string; - created_at: Date; + created_at: number; /** * The ID of the flagged content @@ -17365,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; @@ -17393,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. @@ -17417,7 +17511,7 @@ export interface ModerationImageAnalysisCompleteEvent { } export interface ModerationMarkReviewedEvent { - created_at: Date; + created_at: number; custom: Record; @@ -17425,7 +17519,7 @@ export interface ModerationMarkReviewedEvent { type: string; - received_at?: Date; + received_at?: number; /** * Represents any chat message @@ -17535,7 +17629,7 @@ export interface ModerationPayloadResponse { } export interface ModerationQueueResponse { - created_at: Date; + created_at: number; created_by: string; @@ -17549,7 +17643,7 @@ export interface ModerationQueueResponse { type: string; - updated_at: Date; + updated_at: number; sort: Array>; @@ -17577,7 +17671,7 @@ export interface ModerationRuleInfo { } export interface ModerationRuleV2Response { - created_at: Date; + created_at: number; description: string; @@ -17591,7 +17685,7 @@ export interface ModerationRuleV2Response { team: string; - updated_at: Date; + updated_at: number; config_keys: Array; @@ -17609,7 +17703,7 @@ export interface ModerationRuleV2Response { } export interface ModerationRulesTriggeredEvent { - created_at: Date; + created_at: number; /** * The ID of the entity that triggered the rule @@ -17637,7 +17731,7 @@ export interface ModerationRulesTriggeredEvent { type: string; - received_at?: Date; + received_at?: number; /** * The review queue item ID if applicable @@ -17656,7 +17750,7 @@ export interface ModerationRulesTriggeredEvent { } export interface ModerationTextAnalysisCompleteEvent { - created_at: Date; + created_at: number; type: string; @@ -17680,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. @@ -17862,7 +17956,7 @@ export interface NotificationFeedUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The ID of the feed @@ -17878,7 +17972,7 @@ export interface NotificationFeedUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; /** * Aggregated activities for notification feeds @@ -17894,7 +17988,7 @@ export interface NotificationMarkUnreadEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -17933,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 @@ -18062,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. @@ -18125,7 +18219,7 @@ export interface NotificationThreadMessageNewEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; message_id: string; @@ -18177,7 +18271,7 @@ export interface NotificationThreadMessageNewEvent { parent_author?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -18312,7 +18406,7 @@ export type OwnCapability = (typeof OwnCapability)[keyof typeof OwnCapability]; export interface OwnUserResponse { banned: boolean; - created_at: Date; + created_at: number; id: string; @@ -18332,7 +18426,7 @@ export interface OwnUserResponse { unread_threads: number; - updated_at: Date; + updated_at: number; channel_mutes: Array; @@ -18346,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; @@ -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; @@ -18408,7 +18510,7 @@ export interface ParticipantCountByMinuteResponse { min: number; - start_ts: Date; + start_ts: number; } export interface ParticipantCountOverTimeResponse { @@ -18474,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 { @@ -18522,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 @@ -18545,7 +18647,7 @@ export interface PendingMessageEvent { */ type: string; - received_at?: Date; + received_at?: number; /** * Represents channel in chat @@ -18614,7 +18716,7 @@ export interface PerformanceAnalysisResponse { warnings: Array; - last_analyzed?: Date; + last_analyzed?: number; scan_type?: string; } @@ -18711,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 @@ -18747,7 +18849,7 @@ export interface PinActivityResponse { /** * When the activity was pinned */ - created_at: Date; + created_at: number; duration: string; @@ -18794,7 +18896,7 @@ export interface PlatformDataResponse { export interface Policy { action: number; - created_at: Date; + created_at: number; name: string; @@ -18802,7 +18904,7 @@ export interface Policy { priority: number; - updated_at: Date; + updated_at: number; resources: Array; @@ -18849,7 +18951,7 @@ export interface PolicyTestLabelDrift { } export interface PolicyTestResult { - created_at: Date; + created_at: number; id: number; @@ -18893,7 +18995,7 @@ export interface PolicyTestRow { export interface PolicyTestRun { config_key: string; - created_at: Date; + created_at: number; id: string; @@ -18909,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; } @@ -18954,7 +19056,7 @@ export interface PolicyTestSeedSpec { export interface PolicyTestSet { config_key: string; - created_at: Date; + created_at: number; created_by: string; @@ -18966,7 +19068,7 @@ export interface PolicyTestSet { row_count: number; - updated_at: Date; + updated_at: number; team?: string; @@ -19059,7 +19161,7 @@ export interface PollResponseData { answers_count: number; - created_at: Date; + created_at: number; created_by_id: string; @@ -19071,7 +19173,7 @@ export interface PollResponseData { name: string; - updated_at: Date; + updated_at: number; vote_count: number; @@ -19115,7 +19217,7 @@ export interface PollVoteResponse { } export interface PollVoteResponseData { - created_at: Date; + created_at: number; id: string; @@ -19123,7 +19225,7 @@ export interface PollVoteResponseData { poll_id: string; - updated_at: Date; + updated_at: number; answer_text?: string; @@ -19180,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; @@ -19206,7 +19308,7 @@ export interface PredefinedFilterStatsResponse { max_latency_ms: number; - last_seen?: Date; + last_seen?: number; } export interface PrivacySettingsResponse { @@ -19342,7 +19444,7 @@ export interface PushNotificationFields { export interface PushNotificationSettingsResponse { disabled?: boolean; - disabled_until?: Date; + disabled_until?: number; } export interface PushPreferenceInput { @@ -19400,7 +19502,7 @@ export interface PushPreferencesResponse { chat_level?: string; - disabled_until?: Date; + disabled_until?: number; feeds_level?: string; @@ -19410,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; @@ -19438,7 +19540,7 @@ export interface PushProvider { description?: string; - disabled_at?: Date; + disabled_at?: number; disabled_reason?: string; @@ -19518,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; @@ -19550,7 +19652,7 @@ export interface PushProviderResponse { description?: string; - disabled_at?: Date; + disabled_at?: number; disabled_reason?: string; @@ -19576,7 +19678,7 @@ export interface PushProviderResponse { } export interface PushTemplate { - created_at: Date; + created_at: number; enable_push: boolean; @@ -19592,7 +19694,7 @@ export interface PushTemplate { | 'feeds.follow.created' | 'feeds.notification_feed.updated'; - updated_at: Date; + updated_at: number; template?: string; } @@ -19601,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 @@ -19621,7 +19723,7 @@ export interface PushTemplateResponse { /** * Time when the template was last updated */ - updated_at: Date; + updated_at: number; /** * The push notification template @@ -19829,6 +19931,14 @@ export interface QueryBannedUsersPayload { */ filter_conditions: Record; + created_at_after?: number; + + created_at_after_or_equal?: number; + + created_at_before?: number; + + created_at_before_or_equal?: number; + /** * Whether to exclude expired bans or not */ @@ -20055,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; @@ -20132,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; @@ -20525,7 +20635,7 @@ export interface QueryFeedModerationTemplate { /** * When the template was created */ - created_at: Date; + created_at: number; /** * Name of the moderation template @@ -20535,7 +20645,7 @@ export interface QueryFeedModerationTemplate { /** * When the template was last updated */ - updated_at: Date; + updated_at: number; /** * Configuration for a feeds moderation template @@ -20660,6 +20770,14 @@ export interface QueryFollowsResponse { } export interface QueryFutureChannelBansPayload { + created_at_after?: number; + + created_at_after_or_equal?: number; + + created_at_before?: number; + + created_at_before_or_equal?: number; + /** * Whether to exclude expired bans or not */ @@ -20751,6 +20869,14 @@ export interface QueryLabelResultsResponse { export interface QueryMembersPayload { type: string; + created_at_after?: number; + + created_at_after_or_equal?: number; + + created_at_before?: number; + + created_at_before_or_equal?: number; + 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; @@ -21758,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; @@ -21795,7 +21937,7 @@ export interface ReactionDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -21836,7 +21978,7 @@ export interface ReactionDeletedEvent { message_id?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -21869,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`. @@ -21891,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. @@ -21908,7 +22050,7 @@ export interface ReactionNewEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Represents channel in chat @@ -21949,7 +22091,7 @@ export interface ReactionNewEvent { message_id?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -22008,7 +22150,7 @@ export interface ReactionResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Message ID @@ -22028,7 +22170,7 @@ export interface ReactionResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * User ID @@ -22050,7 +22192,7 @@ export interface ReactionUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; message_id: string; @@ -22096,7 +22238,7 @@ export interface ReactionUpdatedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * The team ID @@ -22181,7 +22323,7 @@ export interface ReadReceiptsResponse { } export interface ReadStateResponse { - last_read: Date; + last_read: number; unread_messages: number; @@ -22190,7 +22332,7 @@ export interface ReadStateResponse { */ user: UserResponse; - last_delivered_at?: Date; + last_delivered_at?: number; last_delivered_message_id?: string; @@ -22297,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 @@ -22323,7 +22465,7 @@ export interface ReminderCreatedEvent { */ parent_id?: string; - received_at?: Date; + received_at?: number; } export interface ReminderDeletedEvent { @@ -22335,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 @@ -22361,7 +22503,7 @@ export interface ReminderDeletedEvent { */ parent_id?: string; - received_at?: Date; + received_at?: number; } export interface ReminderNotificationEvent { @@ -22373,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 @@ -22396,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 @@ -22437,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 @@ -22463,7 +22605,7 @@ export interface ReminderUpdatedEvent { */ parent_id?: string; - received_at?: Date; + received_at?: number; } export interface RemoveUserGroupMembersRequest { @@ -22701,7 +22843,7 @@ export interface RestoreUsersRequest { export interface RetentionPolicy { app_pk: number; - enabled_at: Date; + enabled_at: number; policy: string; @@ -22719,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 @@ -22746,7 +22888,7 @@ export interface ReviewQueueItemResponse { /** * When the item was created */ - created_at: Date; + created_at: number; /** * ID of the entity being reviewed @@ -22795,7 +22937,7 @@ export interface ReviewQueueItemResponse { /** * When the item was last updated */ - updated_at: Date; + updated_at: number; /** * Moderation actions taken @@ -22820,7 +22962,12 @@ 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 + */ + confidence_score?: number; config_key?: string; @@ -22832,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 @@ -22842,7 +22989,7 @@ export interface ReviewQueueItemResponse { /** * When the item was reviewed */ - reviewed_at?: Date; + reviewed_at?: number; /** * Teams associated with this item @@ -22883,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 @@ -22906,7 +23053,7 @@ export interface RevisionHistoryResponse { actor_type: string; - created_at: Date; + created_at: number; object_id: string; @@ -22977,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 @@ -22992,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 @@ -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; @@ -23426,7 +23579,7 @@ export interface SIPInboundRoutingRuleResponse { /** * Creation timestamp */ - created_at: Date; + created_at: number; duration: string; @@ -23443,7 +23596,7 @@ export interface SIPInboundRoutingRuleResponse { /** * Last update timestamp */ - updated_at: Date; + updated_at: number; /** * List of called numbers @@ -23534,7 +23687,7 @@ export interface SIPTrunkResponse { /** * Creation timestamp */ - created_at: Date; + created_at: number; /** * Unique identifier for the SIP trunk @@ -23554,7 +23707,7 @@ export interface SIPTrunkResponse { /** * Last update timestamp */ - updated_at: Date; + updated_at: number; /** * The URI for the SIP trunk @@ -23687,7 +23840,7 @@ export interface SearchResult { export interface SearchResultMessage { cid: string; - created_at: Date; + created_at: number; deleted_reply_count: number; @@ -23711,7 +23864,7 @@ export interface SearchResultMessage { type: string; - updated_at: Date; + updated_at: number; attachments: Array; @@ -23736,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; @@ -23845,7 +23998,7 @@ export interface Segment { all_users: boolean; - created_at: Date; + created_at: number; id: string; @@ -23855,9 +24008,9 @@ export interface Segment { type: string; - updated_at: Date; + updated_at: number; - deleted_at?: Date; + deleted_at?: number; description?: string; @@ -23871,9 +24024,9 @@ export interface SegmentResponse { all_users: boolean; - created_at: Date; + created_at: number; - deleted_at: Date; + deleted_at: number; description: string; @@ -23885,7 +24038,7 @@ export interface SegmentResponse { type: string; - updated_at: Date; + updated_at: number; filter: Record; } @@ -23893,7 +24046,7 @@ export interface SegmentResponse { export interface SegmentTargetResponse { app_pk: number; - created_at: Date; + created_at: number; segment_id: string; @@ -24083,7 +24236,7 @@ export interface SessionWarningResponse { warning: string; - time?: Date; + time?: number; } export interface SetRetentionPolicyRequest { @@ -24102,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 { @@ -24131,7 +24284,7 @@ export interface ShareResponse { /** * When the share occurred */ - created_at: Date; + created_at: number; /** * User response object @@ -24158,7 +24311,7 @@ export interface SharedLocationResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Device ID that created the live location @@ -24185,7 +24338,7 @@ export interface SharedLocationResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * User ID @@ -24195,7 +24348,7 @@ export interface SharedLocationResponse { /** * Time when the live location expires */ - end_at?: Date; + end_at?: number; /** * Represents channel in chat @@ -24211,7 +24364,7 @@ export interface SharedLocationResponse { export interface SharedLocationResponseData { channel_cid: string; - created_at: Date; + created_at: number; created_by_device_id: string; @@ -24221,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 @@ -24660,7 +24813,7 @@ export interface StoriesFeedUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The ID of the feed @@ -24676,7 +24829,7 @@ export interface StoriesFeedUpdatedEvent { feed_visibility?: string; - received_at?: Date; + received_at?: number; /** * Individual activities for stories feeds @@ -25069,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 @@ -25112,7 +25265,7 @@ export interface ThreadResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Created By User ID @@ -25142,7 +25295,7 @@ export interface ThreadResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; /** * Custom data for this object @@ -25152,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 @@ -25194,7 +25347,7 @@ export interface ThreadStateResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Created By User ID @@ -25224,7 +25377,7 @@ export interface ThreadStateResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; latest_replies: Array; @@ -25236,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; @@ -25269,7 +25422,7 @@ export interface ThreadStateResponse { } export interface ThreadUpdatedEvent { - created_at: Date; + created_at: number; custom: Record; @@ -25281,7 +25434,7 @@ export interface ThreadUpdatedEvent { cid?: string; - received_at?: Date; + received_at?: number; thread?: ThreadResponse; } @@ -25291,7 +25444,7 @@ export interface ThreadedCommentResponse { confidence_score: number; - created_at: Date; + created_at: number; downvote_count: number; @@ -25313,7 +25466,7 @@ export interface ThreadedCommentResponse { status: 'active' | 'deleted' | 'removed' | 'hidden' | 'shadow_blocked'; - updated_at: Date; + updated_at: number; upvote_count: number; @@ -25328,9 +25481,9 @@ export interface ThreadedCommentResponse { controversy_score?: number; - deleted_at?: Date; + deleted_at?: number; - edited_at?: Date; + edited_at?: number; parent_id?: string; @@ -25904,7 +26057,7 @@ export interface UnblockUsersResponse { export interface UnblockedUserEvent { call_cid: string; - created_at: Date; + created_at: number; /** * User response object @@ -26078,7 +26231,7 @@ export interface UnreadCountsBatchResponse { export interface UnreadCountsChannel { channel_id: string; - last_read: Date; + last_read: number; unread_count: number; } @@ -26106,7 +26259,7 @@ export interface UnreadCountsResponse { } export interface UnreadCountsThread { - last_read: Date; + last_read: number; last_read_message_id: string; @@ -26632,7 +26785,7 @@ export interface UpdateCallTypeResponse { /** * the time the call type was created */ - created_at: Date; + created_at: number; duration: string; @@ -26644,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 @@ -26918,7 +27071,7 @@ export interface UpdateChannelTypeResponse { count_messages: boolean; - created_at: Date; + created_at: number; custom_events: boolean; @@ -26958,7 +27111,7 @@ export interface UpdateChannelTypeResponse { typing_events: boolean; - updated_at: Date; + updated_at: number; uploads: boolean; @@ -27271,6 +27424,8 @@ export interface UpdateFeedGroupRequest { activity_filter?: ActivityFilterConfig; + activity_marks?: ActivityMarksConfig; + activity_processing?: ActivityProcessingConfig; aggregation?: AggregationConfig; @@ -28007,7 +28162,7 @@ export interface UpdateUsersResponse { export interface UpdatedCallPermissionsEvent { call_cid: string; - created_at: Date; + created_at: number; /** * The capabilities of the current user @@ -28405,7 +28560,7 @@ export interface UpsertModerationTemplateResponse { /** * When the template was created */ - created_at: Date; + created_at: number; duration: string; @@ -28417,7 +28572,7 @@ export interface UpsertModerationTemplateResponse { /** * When the template was last updated */ - updated_at: Date; + updated_at: number; /** * Configuration for a feeds moderation template @@ -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; @@ -28548,7 +28719,7 @@ export interface UserBannedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -28581,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 @@ -28632,7 +28803,7 @@ export interface UserDeactivatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -28643,7 +28814,7 @@ export interface UserDeactivatedEvent { */ type: string; - received_at?: Date; + received_at?: number; created_by?: UserResponseCommonFields; } @@ -28652,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) @@ -28693,7 +28864,7 @@ export interface UserDeletedEvent { */ type: string; - received_at?: Date; + received_at?: number; } export interface UserFeedbackReport { @@ -28730,7 +28901,7 @@ export interface UserFlaggedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The reason for the flag @@ -28749,7 +28920,7 @@ export interface UserFlaggedEvent { */ type: string; - received_at?: Date; + received_at?: number; /** * Custom data @@ -28762,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; @@ -28783,7 +28954,7 @@ export interface UserGroupCreatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -28792,7 +28963,7 @@ export interface UserGroupCreatedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; @@ -28803,7 +28974,7 @@ export interface UserGroupDeletedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -28812,7 +28983,7 @@ export interface UserGroupDeletedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; @@ -28822,7 +28993,7 @@ export interface UserGroupDeletedEvent { export interface UserGroupMember { app_pk: number; - created_at: Date; + created_at: number; group_id: string; @@ -28835,7 +29006,7 @@ export interface UserGroupMemberAddedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The user IDs that were added @@ -28849,7 +29020,7 @@ export interface UserGroupMemberAddedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; @@ -28860,7 +29031,7 @@ export interface UserGroupMemberRemovedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The user IDs that were removed @@ -28874,7 +29045,7 @@ export interface UserGroupMemberRemovedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; @@ -28882,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; @@ -28903,7 +29074,7 @@ export interface UserGroupUpdatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -28912,7 +29083,7 @@ export interface UserGroupUpdatedEvent { */ type: string; - received_at?: Date; + received_at?: number; user?: UserResponseCommonFields; @@ -28925,11 +29096,33 @@ 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 */ - created_at: Date; + created_at: number; custom: Record; @@ -28964,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 @@ -28975,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 @@ -28996,7 +29189,7 @@ export interface UserMutedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -29007,7 +29200,7 @@ export interface UserMutedEvent { */ type: string; - received_at?: Date; + received_at?: number; /** * The target users that were muted @@ -29023,11 +29216,19 @@ export interface UserRatingReportResponse { count: number; } +export interface UserReactionCountRuleParameters { + count?: string; + + threshold?: number; + + time_window?: string; +} + export interface UserReactivatedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -29038,7 +29239,7 @@ export interface UserReactivatedEvent { */ type: string; - received_at?: Date; + received_at?: number; created_by?: UserResponseCommonFields; } @@ -29095,7 +29296,7 @@ export interface UserResponse { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * Unique user identifier @@ -29127,7 +29328,7 @@ export interface UserResponse { /** * Date/time of the last update */ - updated_at: Date; + updated_at: number; blocked_user_ids: Array; @@ -29146,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 @@ -29175,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 @@ -29192,7 +29393,7 @@ export interface UserResponse { export interface UserResponseCommonFields { banned: boolean; - created_at: Date; + created_at: number; id: string; @@ -29202,7 +29403,7 @@ export interface UserResponseCommonFields { role: string; - updated_at: Date; + updated_at: number; blocked_user_ids: Array; @@ -29212,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; } @@ -29230,7 +29431,7 @@ export interface UserResponseCommonFields { export interface UserResponsePrivacyFields { banned: boolean; - created_at: Date; + created_at: number; id: string; @@ -29240,7 +29441,7 @@ export interface UserResponsePrivacyFields { role: string; - updated_at: Date; + updated_at: number; blocked_user_ids: Array; @@ -29250,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; @@ -29283,7 +29484,7 @@ export interface UserUnbannedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -29313,7 +29514,7 @@ export interface UserUnbannedEvent { */ cid?: string; - received_at?: Date; + received_at?: number; /** * Whether the target user was shadow unbanned @@ -29334,7 +29535,7 @@ export interface UserUnmutedEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; custom: Record; @@ -29345,7 +29546,7 @@ export interface UserUnmutedEvent { */ type: string; - received_at?: Date; + received_at?: number; /** * The target users that were unmuted @@ -29359,7 +29560,7 @@ export interface UserUnreadReminderEvent { /** * Date/time of creation */ - created_at: Date; + created_at: number; /** * The channels with unread messages @@ -29375,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; @@ -29393,7 +29594,7 @@ export interface UserUpdatedEvent { */ type: string; - received_at?: Date; + received_at?: number; } export interface ValidateExternalStorageResponse { @@ -29764,7 +29965,7 @@ export interface WHIPIngress { } export interface WSEvent { - created_at: Date; + created_at: number; type: string; @@ -29774,7 +29975,7 @@ export interface WSEvent { channel_id?: string; - channel_last_message_at?: Date; + channel_last_message_at?: number; channel_type?: string; @@ -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, 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); +}; 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, },