From 2ef95bbd55119b325a1b7861cb99a27a0f03cd14 Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Mon, 16 Feb 2026 11:00:54 +0100 Subject: [PATCH] feat: upgrade to api spec v129.24.0 --- src/gen/chat/ChatApi.ts | 24 +- src/gen/feeds/FeedsApi.ts | 36 + src/gen/model-decoders/decoders.ts | 572 ++++---- src/gen/models/index.ts | 2096 +++++++++++++++------------ src/gen/moderation/ModerationApi.ts | 1 + src/gen/video/CallApi.ts | 55 +- src/gen/video/VideoApi.ts | 150 +- 7 files changed, 1628 insertions(+), 1306 deletions(-) diff --git a/src/gen/chat/ChatApi.ts b/src/gen/chat/ChatApi.ts index ff367b9..0c2f1b2 100644 --- a/src/gen/chat/ChatApi.ts +++ b/src/gen/chat/ChatApi.ts @@ -43,7 +43,7 @@ import { MarkUnreadRequest, MembersResponse, MessageActionRequest, - MessageResponse, + MessageActionResponse, MuteChannelRequest, MuteChannelResponse, PollVoteResponse, @@ -961,6 +961,7 @@ export class ChatApi { partition_size: request?.partition_size, partition_ttl: request?.partition_ttl, polls: request?.polls, + push_level: request?.push_level, push_notifications: request?.push_notifications, reactions: request?.reactions, read_events: request?.read_events, @@ -1051,6 +1052,7 @@ export class ChatApi { partition_size: request?.partition_size, partition_ttl: request?.partition_ttl, polls: request?.polls, + push_level: request?.push_level, push_notifications: request?.push_notifications, quotes: request?.quotes, reactions: request?.reactions, @@ -1365,6 +1367,7 @@ export class ChatApi { }; const body = { skip_enrich_url: request?.skip_enrich_url, + skip_push: request?.skip_push, user_id: request?.user_id, unset: request?.unset, set: request?.set, @@ -1389,7 +1392,7 @@ export class ChatApi { async runMessageAction( request: MessageActionRequest & { id: string }, - ): Promise> { + ): Promise> { const pathParams = { id: request?.id, }; @@ -1400,7 +1403,7 @@ export class ChatApi { }; const response = await this.apiClient.sendRequest< - StreamResponse + StreamResponse >( 'POST', '/api/v2/chat/messages/{id}/action', @@ -1410,21 +1413,21 @@ export class ChatApi { 'application/json', ); - decoders.MessageResponse?.(response.body); + decoders.MessageActionResponse?.(response.body); return { ...response.body, metadata: response.metadata }; } async commitMessage( request: CommitMessageRequest & { id: string }, - ): Promise> { + ): Promise> { const pathParams = { id: request?.id, }; const body = {}; const response = await this.apiClient.sendRequest< - StreamResponse + StreamResponse >( 'POST', '/api/v2/chat/messages/{id}/commit', @@ -1434,7 +1437,7 @@ export class ChatApi { 'application/json', ); - decoders.MessageResponse?.(response.body); + decoders.MessageActionResponse?.(response.body); return { ...response.body, metadata: response.metadata }; } @@ -1447,6 +1450,7 @@ export class ChatApi { }; const body = { skip_enrich_url: request?.skip_enrich_url, + skip_push: request?.skip_push, user_id: request?.user_id, unset: request?.unset, set: request?.set, @@ -1580,7 +1584,7 @@ export class ChatApi { async translateMessage( request: TranslateMessageRequest & { id: string }, - ): Promise> { + ): Promise> { const pathParams = { id: request?.id, }; @@ -1589,7 +1593,7 @@ export class ChatApi { }; const response = await this.apiClient.sendRequest< - StreamResponse + StreamResponse >( 'POST', '/api/v2/chat/messages/{id}/translate', @@ -1599,7 +1603,7 @@ export class ChatApi { 'application/json', ); - decoders.MessageResponse?.(response.body); + decoders.MessageActionResponse?.(response.body); return { ...response.body, metadata: response.metadata }; } diff --git a/src/gen/feeds/FeedsApi.ts b/src/gen/feeds/FeedsApi.ts index e355700..1efed04 100644 --- a/src/gen/feeds/FeedsApi.ts +++ b/src/gen/feeds/FeedsApi.ts @@ -108,6 +108,8 @@ import { UnfollowBatchResponse, UnfollowResponse, UnpinActivityResponse, + UpdateActivitiesPartialBatchRequest, + UpdateActivitiesPartialBatchResponse, UpdateActivityPartialRequest, UpdateActivityPartialResponse, UpdateActivityRequest, @@ -150,6 +152,7 @@ export class FeedsApi { const body = { type: request?.type, feeds: request?.feeds, + copy_custom_to_notification: request?.copy_custom_to_notification, create_notification_activity: request?.create_notification_activity, expires_at: request?.expires_at, id: request?.id, @@ -211,6 +214,29 @@ export class FeedsApi { return { ...response.body, metadata: response.metadata }; } + async updateActivitiesPartialBatch( + request: UpdateActivitiesPartialBatchRequest, + ): Promise> { + const body = { + changes: request?.changes, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'PATCH', + '/api/v2/feeds/activities/batch/partial', + undefined, + undefined, + body, + 'application/json', + ); + + decoders.UpdateActivitiesPartialBatchResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + async deleteActivities( request: DeleteActivitiesRequest, ): Promise> { @@ -452,6 +478,7 @@ export class FeedsApi { }; const body = { type: request?.type, + copy_custom_to_notification: request?.copy_custom_to_notification, create_notification_activity: request?.create_notification_activity, enforce_unique: request?.enforce_unique, skip_push: request?.skip_push, @@ -580,6 +607,7 @@ export class FeedsApi { id: request?.id, }; const body = { + copy_custom_to_notification: request?.copy_custom_to_notification, handle_mention_notifications: request?.handle_mention_notifications, run_activity_processors: request?.run_activity_processors, user_id: request?.user_id, @@ -611,6 +639,7 @@ export class FeedsApi { id: request?.id, }; const body = { + copy_custom_to_notification: request?.copy_custom_to_notification, expires_at: request?.expires_at, handle_mention_notifications: request?.handle_mention_notifications, poll_id: request?.poll_id, @@ -629,6 +658,7 @@ export class FeedsApi { mentioned_user_ids: request?.mentioned_user_ids, custom: request?.custom, location: request?.location, + search_data: request?.search_data, user: request?.user, }; @@ -923,6 +953,7 @@ export class FeedsApi { ): Promise> { const body = { comment: request?.comment, + copy_custom_to_notification: request?.copy_custom_to_notification, create_notification_activity: request?.create_notification_activity, id: request?.id, object_id: request?.object_id, @@ -1049,6 +1080,7 @@ export class FeedsApi { }; const body = { comment: request?.comment, + copy_custom_to_notification: request?.copy_custom_to_notification, handle_mention_notifications: request?.handle_mention_notifications, skip_enrich_url: request?.skip_enrich_url, skip_push: request?.skip_push, @@ -1083,6 +1115,7 @@ export class FeedsApi { }; const body = { type: request?.type, + copy_custom_to_notification: request?.copy_custom_to_notification, create_notification_activity: request?.create_notification_activity, enforce_unique: request?.enforce_unique, skip_push: request?.skip_push, @@ -1297,6 +1330,7 @@ export class FeedsApi { filter: request?.filter, followers_pagination: request?.followers_pagination, following_pagination: request?.following_pagination, + friend_reactions_options: request?.friend_reactions_options, interest_weights: request?.interest_weights, member_pagination: request?.member_pagination, user: request?.user, @@ -2016,6 +2050,7 @@ export class FeedsApi { const body = { source: request?.source, target: request?.target, + copy_custom_to_notification: request?.copy_custom_to_notification, create_notification_activity: request?.create_notification_activity, follower_role: request?.follower_role, push_preference: request?.push_preference, @@ -2046,6 +2081,7 @@ export class FeedsApi { const body = { source: request?.source, target: request?.target, + copy_custom_to_notification: request?.copy_custom_to_notification, create_notification_activity: request?.create_notification_activity, push_preference: request?.push_preference, skip_push: request?.skip_push, diff --git a/src/gen/model-decoders/decoders.ts b/src/gen/model-decoders/decoders.ts index 3766a07..4bc4d0f 100644 --- a/src/gen/model-decoders/decoders.ts +++ b/src/gen/model-decoders/decoders.ts @@ -109,13 +109,6 @@ decoders.ActivityMarkEvent = (input?: Record) => { return decode(typeMappings, input); }; -decoders.ActivityMarkedEvent = (input?: Record) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - decoders.ActivityPinResponse = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, @@ -218,7 +211,7 @@ decoders.ActivityResponse = (input?: Record) => { collections: { type: 'EnrichedCollectionResponse', isSingle: false }, - reaction_groups: { type: 'ReactionGroupResponse', isSingle: false }, + reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false }, user: { type: 'UserResponse', isSingle: true }, @@ -228,6 +221,8 @@ decoders.ActivityResponse = (input?: Record) => { expires_at: { type: 'DatetimeType', isSingle: true }, + friend_reactions: { type: 'FeedsReactionResponse', isSingle: false }, + current_feed: { type: 'FeedResponse', isSingle: true }, parent: { type: 'ActivityResponse', isSingle: true }, @@ -340,13 +335,6 @@ decoders.AggregatedActivityResponse = (input?: Record) => { return decode(typeMappings, input); }; -decoders.AnyEvent = (input?: Record) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - decoders.AppResponseFields = (input?: Record) => { const typeMappings: TypeMapping = { event_hooks: { type: 'EventHook', isSingle: false }, @@ -471,24 +459,22 @@ decoders.AsyncExportUsersEvent = (input?: Record) => { return decode(typeMappings, input); }; -decoders.AutomodDetails = (input?: Record) => { +decoders.AutomodDetailsResponse = (input?: Record) => { const typeMappings: TypeMapping = { result: { type: 'MessageModerationResult', isSingle: true }, }; return decode(typeMappings, input); }; -decoders.Ban = (input?: Record) => { +decoders.BanInfoResponse = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, expires: { type: 'DatetimeType', isSingle: true }, - channel: { type: 'Channel', isSingle: true }, - - created_by: { type: 'User', isSingle: true }, + created_by: { type: 'UserResponse', isSingle: true }, - target: { type: 'User', isSingle: true }, + user: { type: 'UserResponse', isSingle: true }, }; return decode(typeMappings, input); }; @@ -680,6 +666,17 @@ decoders.CallCreatedEvent = (input?: Record) => { return decode(typeMappings, input); }; +decoders.CallDTMFEvent = (input?: Record) => { + 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?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, @@ -871,8 +868,6 @@ decoders.CallParticipantTimeline = (input?: Record) => { decoders.CallReactionEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - - reaction: { type: 'ReactionResponse', isSingle: true }, }; return decode(typeMappings, input); }; @@ -1232,35 +1227,6 @@ decoders.CampaignStatsResponse = (input?: Record) => { return decode(typeMappings, input); }; -decoders.Channel = (input?: Record) => { - 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 }, - - message_count_updated_at: { type: 'DatetimeType', isSingle: true }, - - active_live_locations: { type: 'SharedLocation', isSingle: false }, - - invites: { type: 'ChannelMember', isSingle: false }, - - members: { type: 'ChannelMember', isSingle: false }, - - config: { type: 'ChannelConfig', isSingle: true }, - - created_by: { type: 'User', isSingle: true }, - - members_lookup: { type: 'ChannelMemberLookup', isSingle: false }, - - truncated_by: { type: 'User', isSingle: true }, - }; - return decode(typeMappings, input); -}; - decoders.ChannelBatchCompletedEvent = (input?: Record) => { const typeMappings: TypeMapping = { batch_created_at: { type: 'DatetimeType', isSingle: true }, @@ -1310,6 +1276,12 @@ decoders.ChannelConfigWithInfo = (input?: Record) => { decoders.ChannelCreatedEvent = (input?: Record) => { 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); }; @@ -1319,6 +1291,10 @@ decoders.ChannelDeletedEvent = (input?: Record) => { 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); }; @@ -1326,6 +1302,8 @@ decoders.ChannelDeletedEvent = (input?: Record) => { decoders.ChannelFrozenEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, }; return decode(typeMappings, input); }; @@ -1336,41 +1314,9 @@ decoders.ChannelHiddenEvent = (input?: Record) => { channel: { type: 'ChannelResponse', isSingle: true }, - user: { type: 'User', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders.ChannelMember = (input?: Record) => { - const typeMappings: TypeMapping = { - archived_at: { type: 'DatetimeType', isSingle: true }, - - ban_expires: { type: 'DatetimeType', isSingle: true }, - - created_at: { type: 'DatetimeType', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - invite_accepted_at: { type: 'DatetimeType', isSingle: true }, - - invite_rejected_at: { type: 'DatetimeType', isSingle: true }, - - pinned_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'User', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders.ChannelMemberLookup = (input?: Record) => { - const typeMappings: TypeMapping = { - archived_at: { type: 'DatetimeType', isSingle: true }, - - ban_expires: { type: 'DatetimeType', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, - pinned_at: { type: 'DatetimeType', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -1416,6 +1362,14 @@ decoders.ChannelMute = (input?: Record) => { decoders.ChannelMutedEvent = (input?: Record) => { 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); }; @@ -1533,6 +1487,12 @@ decoders.ChannelTruncatedEvent = (input?: Record) => { 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); }; @@ -1551,6 +1511,8 @@ decoders.ChannelTypeConfig = (input?: Record) => { decoders.ChannelUnFrozenEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, }; return decode(typeMappings, input); }; @@ -1558,6 +1520,14 @@ decoders.ChannelUnFrozenEvent = (input?: Record) => { decoders.ChannelUnmutedEvent = (input?: Record) => { 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); }; @@ -1568,9 +1538,11 @@ decoders.ChannelUpdatedEvent = (input?: Record) => { channel: { type: 'ChannelResponse', isSingle: true }, - message: { type: 'Message', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, + + message: { type: 'MessageResponse', isSingle: true }, - user: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -1579,7 +1551,11 @@ decoders.ChannelVisibleEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, + channel: { type: 'ChannelResponse', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, + + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -1716,7 +1692,7 @@ decoders.CommentResponse = (input?: Record) => { latest_reactions: { type: 'FeedsReactionResponse', isSingle: false }, - reaction_groups: { type: 'ReactionGroupResponse', isSingle: false }, + reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false }, }; return decode(typeMappings, input); }; @@ -1861,6 +1837,15 @@ decoders.CustomCheckResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.CustomEvent = (input?: Record) => { + const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.CustomVideoEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, @@ -1941,13 +1926,6 @@ decoders.DeleteReactionResponse = (input?: Record) => { return decode(typeMappings, input); }; -decoders.Device = (input?: Record) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - decoders.DeviceResponse = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, @@ -2236,6 +2214,15 @@ decoders.FeedViewResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.FeedsReactionGroupResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + first_reaction_at: { type: 'DatetimeType', isSingle: true }, + + last_reaction_at: { type: 'DatetimeType', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.FeedsReactionResponse = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, @@ -2247,14 +2234,14 @@ decoders.FeedsReactionResponse = (input?: Record) => { return decode(typeMappings, input); }; -decoders.FlagDetails = (input?: Record) => { +decoders.FlagDetailsResponse = (input?: Record) => { const typeMappings: TypeMapping = { - automod: { type: 'AutomodDetails', isSingle: true }, + automod: { type: 'AutomodDetailsResponse', isSingle: true }, }; return decode(typeMappings, input); }; -decoders.FlagFeedback = (input?: Record) => { +decoders.FlagFeedbackResponse = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, }; @@ -2417,6 +2404,15 @@ decoders.GetBlockedUsersResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.GetCallParticipantSessionMetricsResponse = ( + input?: Record, +) => { + const typeMappings: TypeMapping = { + joined_at: { type: 'DatetimeType', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.GetCallReportResponse = (input?: Record) => { const typeMappings: TypeMapping = { video_reactions: { type: 'VideoReactionsResponse', isSingle: false }, @@ -2608,7 +2604,7 @@ decoders.GetOrCreateFeedViewResponse = (input?: Record) => { decoders.GetPushTemplatesResponse = (input?: Record) => { const typeMappings: TypeMapping = { - templates: { type: 'PushTemplate', isSingle: false }, + templates: { type: 'PushTemplateResponse', isSingle: false }, }; return decode(typeMappings, input); }; @@ -2838,13 +2834,26 @@ decoders.MarkReadResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.MaxStreakChangedEvent = (input?: Record) => { + const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.MemberAddedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - member: { type: 'ChannelMember', isSingle: true }, + channel: { type: 'ChannelResponse', isSingle: true }, + + member: { type: 'ChannelMemberResponse', isSingle: true }, - user: { type: 'User', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, + + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -2853,9 +2862,13 @@ decoders.MemberRemovedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - member: { type: 'ChannelMember', isSingle: true }, + channel: { type: 'ChannelResponse', isSingle: true }, + + member: { type: 'ChannelMemberResponse', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -2877,9 +2890,13 @@ decoders.MemberUpdatedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - member: { type: 'ChannelMember', isSingle: true }, + channel: { type: 'ChannelResponse', isSingle: true }, + + member: { type: 'ChannelMemberResponse', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -2900,43 +2917,9 @@ decoders.MembershipLevelResponse = (input?: Record) => { return decode(typeMappings, input); }; -decoders.Message = (input?: Record) => { +decoders.MessageActionResponse = (input?: Record) => { const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - latest_reactions: { type: 'Reaction', isSingle: false }, - - mentioned_users: { type: 'User', isSingle: false }, - - own_reactions: { type: 'Reaction', isSingle: false }, - - reaction_groups: { type: 'ReactionGroupResponse', isSingle: false }, - - 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 }, - - thread_participants: { type: 'User', isSingle: false }, - - member: { type: 'ChannelMember', isSingle: true }, - - pinned_by: { type: 'User', isSingle: true }, - - poll: { type: 'Poll', isSingle: true }, - - quoted_message: { type: 'Message', isSingle: true }, - - reminder: { type: 'MessageReminder', isSingle: true }, - - shared_location: { type: 'SharedLocation', isSingle: true }, - - user: { type: 'User', isSingle: true }, + message: { type: 'MessageResponse', isSingle: true }, }; return decode(typeMappings, input); }; @@ -2945,11 +2928,11 @@ decoders.MessageDeletedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - thread_participants: { type: 'User', isSingle: false }, + message: { type: 'MessageResponse', isSingle: true }, - message: { type: 'Message', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -2966,11 +2949,11 @@ decoders.MessageFlagResponse = (input?: Record) => { reviewed_at: { type: 'DatetimeType', isSingle: true }, - details: { type: 'FlagDetails', isSingle: true }, + details: { type: 'FlagDetailsResponse', isSingle: true }, - message: { type: 'Message', isSingle: true }, + message: { type: 'MessageResponse', isSingle: true }, - moderation_feedback: { type: 'FlagFeedback', isSingle: true }, + moderation_feedback: { type: 'FlagFeedbackResponse', isSingle: true }, moderation_result: { type: 'MessageModerationResult', isSingle: true }, @@ -2985,11 +2968,13 @@ decoders.MessageFlaggedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - thread_participants: { type: 'User', isSingle: false }, + message: { type: 'MessageResponse', isSingle: true }, - message: { type: 'Message', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, + + details: { type: 'MessageModerationResult', isSingle: true }, - user: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -3014,11 +2999,15 @@ decoders.MessageNewEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - thread_participants: { type: 'User', isSingle: false }, + message: { type: 'MessageResponse', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, + + thread_participants: { type: 'UserResponseCommonFields', isSingle: false }, - message: { type: 'Message', isSingle: true }, + channel: { type: 'ChannelResponse', isSingle: true }, - user: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -3038,23 +3027,6 @@ decoders.MessageReadEvent = (input?: Record) => { return decode(typeMappings, input); }; -decoders.MessageReminder = (input?: Record) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - remind_at: { type: 'DatetimeType', isSingle: true }, - - channel: { type: 'Channel', isSingle: true }, - - message: { type: 'Message', isSingle: true }, - - user: { type: 'User', isSingle: true }, - }; - return decode(typeMappings, input); -}; - decoders.MessageResponse = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, @@ -3109,11 +3081,11 @@ decoders.MessageUnblockedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - thread_participants: { type: 'User', isSingle: false }, + message: { type: 'MessageResponse', isSingle: true }, - message: { type: 'Message', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -3122,11 +3094,9 @@ decoders.MessageUndeletedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - thread_participants: { type: 'User', isSingle: false }, - - message: { type: 'Message', isSingle: true }, + message: { type: 'MessageResponse', isSingle: true }, - user: { type: 'User', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, }; return decode(typeMappings, input); }; @@ -3135,11 +3105,11 @@ decoders.MessageUpdatedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - thread_participants: { type: 'User', isSingle: false }, + message: { type: 'MessageResponse', isSingle: true }, - message: { type: 'Message', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -3228,7 +3198,7 @@ decoders.ModerationFlaggedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, }; return decode(typeMappings, input); }; @@ -3261,16 +3231,16 @@ decoders.MuteChannelResponse = (input?: Record) => { channel_mute: { type: 'ChannelMute', isSingle: true }, - own_user: { type: 'OwnUser', isSingle: true }, + own_user: { type: 'OwnUserResponse', isSingle: true }, }; return decode(typeMappings, input); }; decoders.MuteResponse = (input?: Record) => { const typeMappings: TypeMapping = { - mutes: { type: 'UserMute', isSingle: false }, + mutes: { type: 'UserMuteResponse', isSingle: false }, - own_user: { type: 'OwnUser', isSingle: true }, + own_user: { type: 'OwnUserResponse', isSingle: true }, }; return decode(typeMappings, input); }; @@ -3299,9 +3269,11 @@ decoders.NotificationMarkUnreadEvent = (input?: Record) => { last_read_at: { type: 'DatetimeType', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, + channel: { type: 'ChannelResponse', isSingle: true }, - user: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -3315,34 +3287,24 @@ decoders.NotificationStatusResponse = (input?: Record) => { return decode(typeMappings, input); }; -decoders.OwnBatchResponse = (input?: Record) => { - const typeMappings: TypeMapping = { - data: { type: 'FeedOwnData', isSingle: false }, - }; - return decode(typeMappings, input); -}; - -decoders.OwnUser = (input?: Record) => { +decoders.NotificationThreadMessageNewEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - updated_at: { type: 'DatetimeType', isSingle: true }, - - channel_mutes: { type: 'ChannelMute', isSingle: false }, - - devices: { type: 'Device', isSingle: false }, - - mutes: { type: 'UserMute', isSingle: false }, - - deactivated_at: { type: 'DatetimeType', isSingle: true }, + channel: { type: 'ChannelResponse', isSingle: true }, - deleted_at: { type: 'DatetimeType', isSingle: true }, + message: { type: 'MessageResponse', isSingle: true }, - last_active: { type: 'DatetimeType', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, - last_engaged_at: { type: 'DatetimeType', isSingle: true }, + thread_participants: { type: 'UserResponseCommonFields', isSingle: false }, + }; + return decode(typeMappings, input); +}; - push_preferences: { type: 'PushPreferences', isSingle: true }, +decoders.OwnBatchResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + data: { type: 'FeedOwnData', isSingle: false }, }; return decode(typeMappings, input); }; @@ -3410,11 +3372,11 @@ decoders.PendingMessageEvent = (input?: Record) => { received_at: { type: 'DatetimeType', isSingle: true }, - channel: { type: 'Channel', isSingle: true }, + channel: { type: 'ChannelResponse', isSingle: true }, - message: { type: 'Message', isSingle: true }, + message: { type: 'MessageResponse', isSingle: true }, - user: { type: 'User', isSingle: true }, + user: { type: 'UserResponse', isSingle: true }, }; return decode(typeMappings, input); }; @@ -3448,21 +3410,6 @@ decoders.PinActivityResponse = (input?: Record) => { return decode(typeMappings, input); }; -decoders.Poll = (input?: Record) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - latest_answers: { type: 'PollVote', isSingle: false }, - - own_votes: { type: 'PollVote', isSingle: false }, - - created_by: { type: 'User', isSingle: true }, - }; - return decode(typeMappings, input); -}; - decoders.PollResponse = (input?: Record) => { const typeMappings: TypeMapping = { poll: { type: 'PollResponseData', isSingle: true }, @@ -3485,17 +3432,6 @@ decoders.PollResponseData = (input?: Record) => { return decode(typeMappings, input); }; -decoders.PollVote = (input?: Record) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'User', isSingle: true }, - }; - return decode(typeMappings, input); -}; - decoders.PollVoteResponse = (input?: Record) => { const typeMappings: TypeMapping = { poll: { type: 'PollResponseData', isSingle: true }, @@ -3537,13 +3473,6 @@ decoders.PushNotificationSettingsResponse = (input?: Record) => { return decode(typeMappings, input); }; -decoders.PushPreferences = (input?: Record) => { - const typeMappings: TypeMapping = { - disabled_until: { type: 'DatetimeType', isSingle: true }, - }; - return decode(typeMappings, input); -}; - decoders.PushPreferencesResponse = (input?: Record) => { const typeMappings: TypeMapping = { disabled_until: { type: 'DatetimeType', isSingle: true }, @@ -3584,6 +3513,15 @@ decoders.PushTemplate = (input?: Record) => { return decode(typeMappings, input); }; +decoders.PushTemplateResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + + updated_at: { type: 'DatetimeType', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.QueryActivitiesResponse = (input?: Record) => { const typeMappings: TypeMapping = { activities: { type: 'ActivityResponse', isSingle: false }, @@ -3716,13 +3654,6 @@ decoders.QueryCampaignsResponse = (input?: Record) => { return decode(typeMappings, input); }; -decoders.QueryChannelsResponse = (input?: Record) => { - const typeMappings: TypeMapping = { - channels: { type: 'ChannelStateResponseFields', isSingle: false }, - }; - return decode(typeMappings, input); -}; - decoders.QueryCommentReactionsResponse = (input?: Record) => { const typeMappings: TypeMapping = { reactions: { type: 'FeedsReactionResponse', isSingle: false }, @@ -3894,7 +3825,7 @@ decoders.Reaction = (input?: Record) => { updated_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, + deleted_at: { type: 'DatetimeType', isSingle: true }, }; return decode(typeMappings, input); }; @@ -3903,13 +3834,17 @@ decoders.ReactionDeletedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - thread_participants: { type: 'User', isSingle: false }, + channel: { type: 'ChannelResponse', isSingle: true }, - message: { type: 'Message', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, - reaction: { type: 'Reaction', isSingle: true }, + thread_participants: { type: 'UserResponseCommonFields', isSingle: false }, - user: { type: 'User', isSingle: true }, + message: { type: 'MessageResponse', isSingle: true }, + + reaction: { type: 'ReactionResponse', isSingle: true }, + + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -3927,13 +3862,17 @@ decoders.ReactionNewEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - thread_participants: { type: 'User', isSingle: false }, + channel: { type: 'ChannelResponse', isSingle: true }, - message: { type: 'Message', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, - reaction: { type: 'Reaction', isSingle: true }, + thread_participants: { type: 'UserResponseCommonFields', isSingle: false }, + + message: { type: 'MessageResponse', isSingle: true }, - user: { type: 'User', isSingle: true }, + reaction: { type: 'ReactionResponse', isSingle: true }, + + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -3953,11 +3892,15 @@ decoders.ReactionUpdatedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - message: { type: 'Message', isSingle: true }, + channel: { type: 'ChannelResponse', isSingle: true }, - reaction: { type: 'Reaction', isSingle: true }, + message: { type: 'MessageResponse', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, + + reaction: { type: 'ReactionResponse', isSingle: true }, - user: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -4101,7 +4044,7 @@ decoders.ReviewQueueItemResponse = (input?: Record) => { actions: { type: 'ActionLogResponse', isSingle: false }, - bans: { type: 'Ban', isSingle: false }, + bans: { type: 'BanInfoResponse', isSingle: false }, flags: { type: 'ModerationFlagResponse', isSingle: false }, @@ -4269,9 +4212,9 @@ decoders.SendReactionResponse = (input?: Record) => { return decode(typeMappings, input); }; -decoders.SharedLocation = (input?: Record) => { +decoders.SessionWarningResponse = (input?: Record) => { const typeMappings: TypeMapping = { - end_at: { type: 'DatetimeType', isSingle: true }, + time: { type: 'DatetimeType', isSingle: true }, }; return decode(typeMappings, input); }; @@ -4424,9 +4367,9 @@ decoders.ThreadUpdatedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - thread: { type: 'ThreadResponse', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, + thread: { type: 'ThreadResponse', isSingle: true }, }; return decode(typeMappings, input); }; @@ -4451,7 +4394,7 @@ decoders.ThreadedCommentResponse = (input?: Record) => { replies: { type: 'ThreadedCommentResponse', isSingle: false }, - reaction_groups: { type: 'ReactionGroupResponse', isSingle: false }, + reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false }, }; return decode(typeMappings, input); }; @@ -4525,6 +4468,15 @@ decoders.UnreadCountsThread = (input?: Record) => { return decode(typeMappings, input); }; +decoders.UpdateActivitiesPartialBatchResponse = ( + input?: Record, +) => { + const typeMappings: TypeMapping = { + activities: { type: 'ActivityResponse', isSingle: false }, + }; + return decode(typeMappings, input); +}; + decoders.UpdateActivityPartialResponse = (input?: Record) => { const typeMappings: TypeMapping = { activity: { type: 'ActivityResponse', isSingle: true }, @@ -4788,7 +4740,7 @@ decoders.UpsertModerationTemplateResponse = (input?: Record) => { decoders.UpsertPushPreferencesResponse = (input?: Record) => { const typeMappings: TypeMapping = { - user_preferences: { type: 'PushPreferences', isSingle: false }, + user_preferences: { type: 'PushPreferencesResponse', isSingle: false }, }; return decode(typeMappings, input); }; @@ -4802,16 +4754,7 @@ decoders.UpsertPushProviderResponse = (input?: Record) => { decoders.UpsertPushTemplateResponse = (input?: Record) => { const typeMappings: TypeMapping = { - template: { type: 'PushTemplate', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders.User = (input?: Record) => { - const typeMappings: TypeMapping = { - ban_expires: { type: 'DatetimeType', isSingle: true }, - - revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true }, + template: { type: 'PushTemplateResponse', isSingle: true }, }; return decode(typeMappings, input); }; @@ -4820,11 +4763,13 @@ decoders.UserBannedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - created_by: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, expiration: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, + + created_by: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -4833,9 +4778,11 @@ decoders.UserDeactivatedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - created_by: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, + created_by: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -4844,42 +4791,33 @@ decoders.UserDeletedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, - }; - return decode(typeMappings, input); -}; - -decoders.UserFlaggedEvent = (input?: Record) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, - user: { type: 'User', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, }; return decode(typeMappings, input); }; -decoders.UserMessagesDeletedEvent = (input?: Record) => { +decoders.UserFlaggedEvent = (input?: Record) => { 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.UserMute = (input?: Record) => { +decoders.UserMessagesDeletedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - updated_at: { type: 'DatetimeType', isSingle: true }, - - expires: { type: 'DatetimeType', isSingle: true }, - - target: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, - user: { type: 'User', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, }; return decode(typeMappings, input); }; @@ -4903,7 +4841,13 @@ decoders.UserMutedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', 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); }; @@ -4912,7 +4856,11 @@ decoders.UserReactivatedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, + + created_by: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -4964,7 +4912,11 @@ decoders.UserUnbannedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, + + created_by: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -4973,7 +4925,13 @@ decoders.UserUnmutedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', 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); }; @@ -4982,7 +4940,9 @@ decoders.UserUnreadReminderEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - user: { type: 'User', isSingle: true }, + user: { type: 'UserResponseCommonFields', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, }; return decode(typeMappings, input); }; diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index b1c68b2..b9107d9 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -104,6 +104,20 @@ export interface APNS { data?: Record; } +export interface APNSPayload { + body?: string; + + content_available?: number; + + mutable_content?: number; + + sound?: string; + + title?: string; + + data?: Record; +} + export interface AWSRekognitionRule { action: | 'flag' @@ -356,24 +370,6 @@ export interface ActivityMarkEvent { user?: UserResponseCommonFields; } -export interface ActivityMarkedEvent { - all_read: boolean; - - all_seen: boolean; - - created_at: Date; - - feed_id: string; - - user_id: string; - - type: string; - - marked_read?: string[]; - - marked_watched?: string[]; -} - export interface ActivityPinResponse { created_at: Date; @@ -491,6 +487,8 @@ export interface ActivityRequest { feeds: string[]; + copy_custom_to_notification?: boolean; + create_notification_activity?: boolean; expires_at?: string; @@ -583,7 +581,7 @@ export interface ActivityResponse { custom: Record; - reaction_groups: Record; + reaction_groups: Record; search_data: Record; @@ -595,6 +593,8 @@ export interface ActivityResponse { expires_at?: Date; + friend_reaction_count?: number; + is_watched?: boolean; moderation_action?: string; @@ -605,6 +605,8 @@ export interface ActivityResponse { visibility_tag?: string; + friend_reactions?: FeedsReactionResponse[]; + current_feed?: FeedResponse; location?: ActivityLocation; @@ -716,6 +718,8 @@ export interface AddActivityRequest { feeds: string[]; + copy_custom_to_notification?: boolean; + create_notification_activity?: boolean; expires_at?: string; @@ -786,6 +790,8 @@ export interface AddBookmarkResponse { export interface AddCommentReactionRequest { type: string; + copy_custom_to_notification?: boolean; + create_notification_activity?: boolean; enforce_unique?: boolean; @@ -812,6 +818,8 @@ export interface AddCommentReactionResponse { export interface AddCommentRequest { comment?: string; + copy_custom_to_notification?: boolean; + create_notification_activity?: boolean; id?: string; @@ -866,6 +874,8 @@ export interface AddFolderRequest { export interface AddReactionRequest { type: string; + copy_custom_to_notification?: boolean; + create_notification_activity?: boolean; enforce_unique?: boolean; @@ -913,12 +923,6 @@ export interface AggregationConfig { format?: string; } -export interface AnyEvent { - created_at: Date; - - type: string; -} - export interface AppResponseFields { allow_multi_user_devices: boolean; @@ -946,8 +950,6 @@ export interface AppResponseFields { max_aggregated_activities_length: number; - moderation_bulk_submit_action_enabled: boolean; - moderation_enabled: boolean; moderation_llm_configurability_enabled: boolean; @@ -1307,14 +1309,14 @@ export interface AudioSettingsResponse { noise_cancellation?: NoiseCancellationSettings; } -export interface AutomodDetails { +export interface AutomodDetailsResponse { action?: string; original_message_type?: string; image_labels?: string[]; - message_details?: FlagMessageDetails; + message_details?: FlagMessageDetailsResponse; result?: MessageModerationResult; } @@ -1393,34 +1395,34 @@ export interface BackstageSettingsResponse { join_ahead_time_seconds?: number; } -export interface Ban { - created_at: Date; +export interface BanActionRequestPayload { + channel_ban_only?: boolean; - shadow: boolean; + delete_messages?: 'soft' | 'pruning' | 'hard'; - expires?: Date; + ip_ban?: boolean; reason?: string; - channel?: Channel; + shadow?: boolean; - created_by?: User; + target_user_id?: string; - target?: User; + timeout?: number; } -export interface BanActionRequest { - channel_ban_only?: boolean; - - delete_messages?: 'soft' | 'pruning' | 'hard'; +export interface BanInfoResponse { + created_at: Date; - ip_ban?: boolean; + expires?: Date; reason?: string; shadow?: boolean; - timeout?: number; + created_by?: UserResponse; + + user?: UserResponse; } export interface BanOptions { @@ -1471,7 +1473,7 @@ export interface BanResponse { user?: UserResponse; } -export interface BlockActionRequest { +export interface BlockActionRequestPayload { reason?: string; } @@ -1816,6 +1818,24 @@ export interface CallCreatedEvent { type: string; } +export interface CallDTMFEvent { + call_cid: string; + + created_at: Date; + + digit: string; + + duration_ms: number; + + seq_number: number; + + timestamp: Date; + + user: UserResponse; + + type: string; +} + export interface CallDeletedEvent { call_cid: string; @@ -2093,7 +2113,7 @@ export interface CallReactionEvent { created_at: Date; - reaction: ReactionResponse; + reaction: VideoReactionResponse; type: string; } @@ -2751,7 +2771,7 @@ export interface CallTypeResponse { grants: Record; - notification_settings: NotificationSettings; + notification_settings: NotificationSettingsResponse; settings: CallSettingsResponse; @@ -2944,62 +2964,6 @@ export interface CastPollVoteRequest { vote?: VoteData; } -export interface Channel { - auto_translation_language: string; - - cid: string; - - created_at: Date; - - disabled: boolean; - - frozen: boolean; - - id: string; - - type: string; - - updated_at: Date; - - custom: Record; - - auto_translation_enabled?: boolean; - - cooldown?: number; - - deleted_at?: Date; - - last_campaigns?: string; - - last_message_at?: Date; - - member_count?: number; - - message_count?: number; - - message_count_updated_at?: Date; - - team?: string; - - active_live_locations?: SharedLocation[]; - - filter_tags?: string[]; - - invites?: ChannelMember[]; - - members?: ChannelMember[]; - - config?: ChannelConfig; - - config_overrides?: ConfigOverrides; - - created_by?: User; - - members_lookup?: Record; - - truncated_by?: User; -} - export interface ChannelBatchCompletedEvent { batch_created_at: Date; @@ -3111,6 +3075,8 @@ export interface ChannelConfig { partition_ttl?: string; + push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none'; + allowed_flag_reasons?: string[]; blocklists?: BlockListOptions[]; @@ -3181,6 +3147,8 @@ export interface ChannelConfigWithInfo { partition_ttl?: string; + push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none'; + allowed_flag_reasons?: string[]; blocklists?: BlockListOptions[]; @@ -3193,25 +3161,57 @@ export interface ChannelConfigWithInfo { export interface ChannelCreatedEvent { created_at: Date; + channel: ChannelResponse; + + custom: Record; + type: string; -} -export interface ChannelDeletedEvent { - channel_id: string; + channel_id?: string; - channel_member_count: number; + channel_member_count?: number; - channel_type: string; + channel_message_count?: number; - cid: string; + channel_type?: string; + + cid?: string; + + received_at?: Date; + + team?: string; + channel_custom?: Record; + + user?: UserResponseCommonFields; +} + +export interface ChannelDeletedEvent { created_at: Date; + channel: ChannelResponse; + + custom: Record; + type: string; + channel_id?: string; + + channel_member_count?: number; + + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + + received_at?: Date; + team?: string; - channel?: ChannelResponse; + channel_custom?: Record; + + user?: UserResponseCommonFields; } export interface ChannelExport { @@ -3227,15 +3227,19 @@ export interface ChannelExport { } export interface ChannelFrozenEvent { - channel_id: string; + created_at: Date; - channel_type: string; + custom: Record; - cid: string; + type: string; - created_at: Date; + channel_id?: string; - type: string; + channel_type?: string; + + cid?: string; + + received_at?: Date; } export interface ChannelGetOrCreateRequest { @@ -3255,23 +3259,33 @@ export interface ChannelGetOrCreateRequest { } export interface ChannelHiddenEvent { - channel_id: string; + clear_history: boolean; - channel_member_count: number; + created_at: Date; - channel_type: string; + channel: ChannelResponse; - cid: string; + custom: Record; - clear_history: boolean; + type: string; - created_at: Date; + channel_id?: string; - type: string; + channel_member_count?: number; - channel?: ChannelResponse; + channel_message_count?: number; - user?: User; + channel_type?: string; + + cid?: string; + + received_at?: Date; + + team?: string; + + channel_custom?: Record; + + user?: UserResponseCommonFields; } export interface ChannelInput { @@ -3313,33 +3327,47 @@ export interface ChannelInputRequest { team?: string; - invites?: ChannelMember[]; + invites?: ChannelMemberRequest[]; - members?: ChannelMember[]; + members?: ChannelMemberRequest[]; - config_overrides?: ConfigOverrides; + config_overrides?: ConfigOverridesRequest; - created_by?: User; + created_by?: UserRequest; custom?: Record; } -export interface ChannelMember { - archived_at?: Date; +export interface ChannelMemberRequest { + user_id: string; - ban_expires?: Date; + channel_role?: string; - banned?: boolean; + custom?: Record; - blocked?: boolean; + user?: UserResponse; +} - channel_role?: string; +export interface ChannelMemberResponse { + banned: boolean; - created_at?: Date; + channel_role: string; - deleted_at?: Date; + created_at: Date; - hidden?: boolean; + notifications_muted: boolean; + + shadow_banned: boolean; + + updated_at: Date; + + custom: Record; + + archived_at?: Date; + + ban_expires?: Date; + + deleted_at?: Date; invite_accepted_at?: Date; @@ -3347,123 +3375,53 @@ export interface ChannelMember { invited?: boolean; - is_global_banned?: boolean; - is_moderator?: boolean; - notifications_muted?: boolean; - pinned_at?: Date; - shadow_banned?: boolean; + role?: string; status?: string; - updated_at?: Date; - user_id?: string; deleted_messages?: string[]; - channel?: DenormalizedChannelFields; + user?: UserResponse; +} - custom?: Record; +export interface ChannelMessagesResponse { + messages: MessageResponse[]; - user?: User; + channel: ChannelResponse; } -export interface ChannelMemberLookup { - archived: boolean; - - banned: boolean; +export interface ChannelMute { + created_at: Date; - blocked: boolean; + updated_at: Date; - hidden: boolean; + expires?: Date; - pinned: boolean; - - archived_at?: Date; - - ban_expires?: Date; - - pinned_at?: Date; -} - -export interface ChannelMemberRequest { - user_id: string; - - channel_role?: string; - - custom?: Record; + channel?: ChannelResponse; user?: UserResponse; } -export interface ChannelMemberResponse { - banned: boolean; - - channel_role: string; - +export interface ChannelMutedEvent { created_at: Date; - notifications_muted: boolean; - - shadow_banned: boolean; - - updated_at: Date; - custom: Record; - archived_at?: Date; - - ban_expires?: Date; - - deleted_at?: Date; - - invite_accepted_at?: Date; - - invite_rejected_at?: Date; - - invited?: boolean; - - is_moderator?: boolean; - - pinned_at?: Date; - - role?: 'member' | 'moderator' | 'admin' | 'owner'; - - status?: string; - - user_id?: string; - - deleted_messages?: string[]; - - user?: UserResponse; -} - -export interface ChannelMessages { - messages: Message[]; - - channel?: ChannelResponse; -} - -export interface ChannelMute { - created_at: Date; - - updated_at: Date; - - expires?: Date; + type: string; - channel?: ChannelResponse; + received_at?: Date; - user?: UserResponse; -} + mutes?: ChannelMute[]; -export interface ChannelMutedEvent { - created_at: Date; + mute?: ChannelMute; - type: string; + user?: UserResponseCommonFields; } export const ChannelOwnCapability = { @@ -3510,12 +3468,6 @@ export const ChannelOwnCapability = { export type ChannelOwnCapability = (typeof ChannelOwnCapability)[keyof typeof ChannelOwnCapability]; -export interface ChannelPushPreferences { - chat_level?: string; - - disabled_until?: Date; -} - export interface ChannelPushPreferencesResponse { chat_level?: string; @@ -3647,19 +3599,35 @@ export interface ChannelStateResponseFields { } export interface ChannelTruncatedEvent { - channel_id: string; + created_at: Date; - channel_member_count: number; + channel: ChannelResponse; - channel_type: string; + custom: Record; - cid: string; + type: string; - created_at: Date; + channel_id?: string; - type: string; + channel_member_count?: number; - channel?: ChannelResponse; + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + + message_id?: string; + + received_at?: Date; + + team?: string; + + channel_custom?: Record; + + message?: MessageResponse; + + user?: UserResponseCommonFields; } export interface ChannelTypeConfig { @@ -3729,6 +3697,8 @@ export interface ChannelTypeConfig { partition_ttl?: string; + push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none'; + allowed_flag_reasons?: string[]; blocklists?: BlockListOptions[]; @@ -3737,57 +3707,95 @@ export interface ChannelTypeConfig { } export interface ChannelUnFrozenEvent { - channel_id: string; + created_at: Date; - channel_type: string; + custom: Record; - cid: string; + type: string; - created_at: Date; + channel_id?: string; - type: string; + channel_type?: string; + + cid?: string; + + received_at?: Date; } export interface ChannelUnmutedEvent { created_at: Date; + custom: Record; + type: string; -} -export interface ChannelUpdatedEvent { - channel_id: string; + received_at?: Date; - channel_member_count: number; + mutes?: ChannelMute[]; - channel_type: string; + mute?: ChannelMute; - cid: string; + user?: UserResponseCommonFields; +} +export interface ChannelUpdatedEvent { created_at: Date; + channel: ChannelResponse; + + custom: Record; + type: string; + channel_id?: string; + + channel_member_count?: number; + + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + + message_id?: string; + + received_at?: Date; + team?: string; - channel?: ChannelResponse; + channel_custom?: Record; - message?: Message; + message?: MessageResponse; - user?: User; + user?: UserResponseCommonFields; } export interface ChannelVisibleEvent { - channel_id: string; - - channel_type: string; + created_at: Date; - cid: string; + channel: ChannelResponse; - created_at: Date; + custom: Record; type: string; - user?: User; + channel_id?: string; + + channel_member_count?: number; + + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + + received_at?: Date; + + team?: string; + + channel_custom?: Record; + + user?: UserResponseCommonFields; } export interface ChatActivityStatsResponse { @@ -3818,7 +3826,7 @@ export interface CheckPushRequest { push_provider_name?: string; - push_provider_type?: 'firebase' | 'apn' | 'huawei' | 'xiaomi'; + push_provider_type?: string; skip_devices?: boolean; @@ -3892,7 +3900,7 @@ export interface CheckSNSRequest { export interface CheckSNSResponse { duration: string; - status: 'ok' | 'error'; + status: string; error?: string; @@ -3910,7 +3918,7 @@ export interface CheckSQSRequest { export interface CheckSQSResponse { duration: string; - status: 'ok' | 'error'; + status: string; error?: string; @@ -4140,7 +4148,7 @@ export interface CommentResponse { moderation?: ModerationV2Response; - reaction_groups?: Record; + reaction_groups?: Record; } export interface CommentUpdatedEvent { @@ -4167,7 +4175,7 @@ export interface CompositeRecordingResponse { status: string; } -export interface ConfigOverrides { +export interface ConfigOverridesRequest { blocklist?: string; blocklist_behavior?: 'flag' | 'block'; @@ -4237,7 +4245,7 @@ export interface ContentCountRuleParameters { time_window?: string; } -export interface Coordinates { +export interface CoordinatesResponse { latitude: number; longitude: number; @@ -4282,7 +4290,7 @@ export interface CreateCallTypeRequest { grants?: Record; - notification_settings?: NotificationSettings; + notification_settings?: NotificationSettingsRequest; settings?: CallSettingsRequest; } @@ -4298,7 +4306,7 @@ export interface CreateCallTypeResponse { grants: Record; - notification_settings: NotificationSettings; + notification_settings: NotificationSettingsResponse; settings: CallSettingsResponse; @@ -4328,7 +4336,7 @@ export interface CreateChannelTypeRequest { mark_messages_pending?: boolean; - message_retention?: 'infinite' | 'numeric'; + message_retention?: string; mutes?: boolean; @@ -4338,6 +4346,8 @@ export interface CreateChannelTypeRequest { polls?: boolean; + push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none'; + push_notifications?: boolean; reactions?: boolean; @@ -4438,6 +4448,8 @@ export interface CreateChannelTypeResponse { partition_ttl?: string; + push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none'; + allowed_flag_reasons?: string[]; blocklists?: BlockListOptions[]; @@ -4720,7 +4732,7 @@ export interface CreateSIPTrunkResponse { sip_trunk?: SIPTrunkResponse; } -export interface CustomActionRequest { +export interface CustomActionRequestPayload { id?: string; options?: Record; @@ -4747,7 +4759,7 @@ export interface CustomCheckRequest { user_id?: string; - moderation_payload?: ModerationPayload; + moderation_payload?: ModerationPayloadRequest; user?: UserRequest; } @@ -4762,6 +4774,16 @@ export interface CustomCheckResponse { item?: ReviewQueueItemResponse; } +export interface CustomEvent { + created_at: Date; + + custom: Record; + + type: string; + + received_at?: Date; +} + export interface CustomVideoEvent { call_cid: string; @@ -4902,7 +4924,7 @@ export interface DeleteActivityReactionResponse { reaction: FeedsReactionResponse; } -export interface DeleteActivityRequest { +export interface DeleteActivityRequestPayload { hard_delete?: boolean; reason?: string; @@ -4978,7 +5000,7 @@ export interface DeleteCommentReactionResponse { reaction: FeedsReactionResponse; } -export interface DeleteCommentRequest { +export interface DeleteCommentRequestPayload { hard_delete?: boolean; reason?: string; @@ -5036,7 +5058,7 @@ export interface DeleteImportV2TaskResponse { duration: string; } -export interface DeleteMessageRequest { +export interface DeleteMessageRequestPayload { hard_delete?: boolean; reason?: string; @@ -5060,7 +5082,7 @@ export interface DeleteModerationTemplateResponse { duration: string; } -export interface DeleteReactionRequest { +export interface DeleteReactionRequestPayload { hard_delete?: boolean; reason?: string; @@ -5098,7 +5120,7 @@ export interface DeleteTranscriptionResponse { duration: string; } -export interface DeleteUserRequest { +export interface DeleteUserRequestPayload { delete_conversation_channels?: boolean; delete_feeds_content?: boolean; @@ -5140,56 +5162,10 @@ export interface DeliveredMessagePayload { id?: string; } -export interface DeliveryReceipts { - enabled?: boolean; -} - export interface DeliveryReceiptsResponse { enabled?: boolean; } -export interface DenormalizedChannelFields { - created_at?: string; - - created_by_id?: string; - - disabled?: boolean; - - frozen?: boolean; - - id?: string; - - last_message_at?: string; - - member_count?: number; - - team?: string; - - type?: string; - - updated_at?: string; - - custom?: Record; -} - -export interface Device { - created_at: Date; - - id: string; - - push_provider: 'firebase' | 'apn' | 'huawei' | 'xiaomi'; - - user_id: string; - - disabled?: boolean; - - disabled_reason?: string; - - push_provider_name?: string; - - voip?: boolean; -} - export interface DeviceDataResponse { name?: string; @@ -5556,6 +5532,22 @@ export interface EventNotificationSettings { fcm: FCM; } +export interface EventNotificationSettingsRequest { + enabled?: boolean; + + apns?: APNSPayload; + + fcm?: FCMPayload; +} + +export interface EventNotificationSettingsResponse { + enabled: boolean; + + apns: APNSPayload; + + fcm: FCMPayload; +} + export interface EventRequest { type: string; @@ -5636,6 +5628,10 @@ export interface FCM { data?: Record; } +export interface FCMPayload { + data?: Record; +} + export interface FailedChannelUpdates { reason: string; @@ -6072,10 +6068,10 @@ export interface FeedVisibilityResponse { grants: Record; } -export interface FeedsModerationTemplateConfig { - config_key: string; - +export interface FeedsModerationTemplateConfigPayload { data_types: Record; + + config_key?: string; } export interface FeedsPreferences { @@ -6099,6 +6095,8 @@ export interface FeedsPreferencesResponse { comment_reaction?: string; + comment_reply?: string; + follow?: string; mention?: string; @@ -6108,8 +6106,16 @@ export interface FeedsPreferencesResponse { custom_activity_types?: Record; } -export interface FeedsReactionResponse { - activity_id: string; +export interface FeedsReactionGroupResponse { + count: number; + + first_reaction_at: Date; + + last_reaction_at: Date; +} + +export interface FeedsReactionResponse { + activity_id: string; created_at: Date; @@ -6192,57 +6198,27 @@ export interface FirebaseConfigFields { server_key?: string; } -export interface Flag { - created_at: Date; - - created_by_automod: boolean; - - updated_at: Date; - - approved_at?: Date; - - reason?: string; - - rejected_at?: Date; - - reviewed_at?: Date; - - reviewed_by?: string; - - target_message_id?: string; - - custom?: Record; - - details?: FlagDetails; - - target_message?: Message; - - target_user?: User; - - user?: User; -} - export interface FlagCountRuleParameters { threshold?: number; } -export interface FlagDetails { +export interface FlagDetailsResponse { original_text: string; - extra: Record; + automod?: AutomodDetailsResponse; - automod?: AutomodDetails; + extra?: Record; } -export interface FlagFeedback { +export interface FlagFeedbackResponse { created_at: Date; message_id: string; - labels: Label[]; + labels: LabelResponse[]; } -export interface FlagMessageDetails { +export interface FlagMessageDetailsResponse { pin_changed?: boolean; should_enrich?: boolean; @@ -6351,6 +6327,8 @@ export interface FollowRequest { target: string; + copy_custom_to_notification?: boolean; + create_notification_activity?: boolean; push_preference?: 'all' | 'none'; @@ -6428,6 +6406,14 @@ export interface FrameRecordingSettingsResponse { quality?: string; } +export interface FriendReactionsOptions { + enabled?: boolean; + + limit?: number; + + type?: 'following' | 'mutual'; +} + export interface FullUserResponse { banned: boolean; @@ -6568,6 +6554,26 @@ export interface GetBlockedUsersResponse { blocks: BlockedUserResponse[]; } +export interface GetCallParticipantSessionMetricsResponse { + duration: string; + + is_publisher?: boolean; + + is_subscriber?: boolean; + + joined_at?: Date; + + publisher_type?: string; + + user_id?: string; + + user_session_id?: string; + + published_tracks?: PublishedTrackMetrics[]; + + client?: SessionClient; +} + export interface GetCallReportResponse { duration: string; @@ -6625,7 +6631,7 @@ export interface GetCallTypeResponse { grants: Record; - notification_settings: NotificationSettings; + notification_settings: NotificationSettingsResponse; settings: CallSettingsResponse; @@ -6709,6 +6715,8 @@ export interface GetChannelTypeResponse { partition_ttl?: string; + push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none'; + allowed_flag_reasons?: string[]; blocklists?: BlockListOptions[]; @@ -6803,13 +6811,13 @@ export interface GetFeedVisibilityResponse { export interface GetFeedsRateLimitsResponse { duration: string; - android?: Record; + android?: Record; - ios?: Record; + ios?: Record; - server_side?: Record; + server_side?: Record; - web?: Record; + web?: Record; } export interface GetFollowSuggestionsResponse { @@ -6996,6 +7004,8 @@ export interface GetOrCreateFeedRequest { following_pagination?: PagerRequest; + friend_reactions_options?: FriendReactionsOptions; + interest_weights?: Record; member_pagination?: PagerRequest; @@ -7054,19 +7064,19 @@ export interface GetOrCreateFeedViewResponse { export interface GetPushTemplatesResponse { duration: string; - templates: PushTemplate[]; + templates: PushTemplateResponse[]; } export interface GetRateLimitsResponse { duration: string; - android?: Record; + android?: Record; - ios?: Record; + ios?: Record; - server_side?: Record; + server_side?: Record; - web?: Record; + web?: Record; } export interface GetReactionsResponse { @@ -7246,11 +7256,11 @@ export interface ImageRuleParameters { } export interface ImageSize { - crop?: 'top' | 'bottom' | 'left' | 'right' | 'center'; + crop?: string; height?: number; - resize?: 'clip' | 'crop' | 'scale' | 'fill'; + resize?: string; width?: number; } @@ -7332,6 +7342,10 @@ export interface ImportV2TaskItem { } export interface ImportV2TaskSettings { + mode?: string; + + path?: string; + skip_references_check?: boolean; s3?: ImportV2TaskSettingsS3; @@ -7598,7 +7612,7 @@ export interface LLMRule { severity_rules?: BodyguardSeverityRule[]; } -export interface Label { +export interface LabelResponse { name: string; harm_labels?: string[]; @@ -7648,7 +7662,7 @@ export interface LayoutSettingsResponse { options?: Record; } -export interface LimitInfo { +export interface LimitInfoResponse { limit: number; remaining: number; @@ -7798,7 +7812,7 @@ export interface ListTranscriptionsResponse { transcriptions: CallTranscription[]; } -export interface Location { +export interface LocationResponse { continent_code: string; country_iso_code: string; @@ -7854,7 +7868,7 @@ export interface MarkReadResponse { event?: MessageReadEvent; } -export interface MarkReviewedRequest { +export interface MarkReviewedRequestPayload { content_to_mark_as_reviewed_limit?: number; decision_reason?: string; @@ -7874,38 +7888,74 @@ export interface MarkUnreadRequest { user?: UserRequest; } -export interface MemberAddedEvent { - channel_id: string; +export interface MaxStreakChangedEvent { + created_at: Date; - channel_type: string; + custom: Record; - cid: string; + type: string; + + received_at?: Date; +} +export interface MemberAddedEvent { created_at: Date; + channel: ChannelResponse; + + custom: Record; + + member: ChannelMemberResponse; + type: string; + channel_id?: string; + + channel_member_count?: number; + + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + + received_at?: Date; + team?: string; - member?: ChannelMember; + channel_custom?: Record; - user?: User; + user?: UserResponseCommonFields; } export interface MemberRemovedEvent { - channel_id: string; + created_at: Date; - channel_type: string; + channel: ChannelResponse; - cid: string; + custom: Record; - created_at: Date; + member: ChannelMemberResponse; type: string; - member?: ChannelMember; + channel_id?: string; - user?: User; + channel_member_count?: number; + + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + + received_at?: Date; + + team?: string; + + channel_custom?: Record; + + user?: UserResponseCommonFields; } export interface MemberRequest { @@ -7933,21 +7983,33 @@ export interface MemberResponse { } export interface MemberUpdatedEvent { - channel_id: string; + created_at: Date; - channel_type: string; + channel: ChannelResponse; - cid: string; + custom: Record; - created_at: Date; + member: ChannelMemberResponse; type: string; + channel_id?: string; + + channel_member_count?: number; + + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + + received_at?: Date; + team?: string; - member?: ChannelMember; + channel_custom?: Record; - user?: User; + user?: UserResponseCommonFields; } export interface MembersResponse { @@ -7974,96 +8036,6 @@ export interface MembershipLevelResponse { custom?: Record; } -export interface Message { - cid: string; - - created_at: Date; - - deleted_reply_count: number; - - html: string; - - id: string; - - pinned: boolean; - - reply_count: number; - - shadowed: boolean; - - silent: boolean; - - text: string; - - type: string; - - updated_at: Date; - - attachments: Attachment[]; - - latest_reactions: Reaction[]; - - mentioned_users: User[]; - - own_reactions: Reaction[]; - - restricted_visibility: string[]; - - custom: Record; - - reaction_counts: Record; - - reaction_groups: Record; - - reaction_scores: Record; - - before_message_send_failed?: boolean; - - command?: string; - - deleted_at?: Date; - - deleted_for_me?: boolean; - - message_text_updated_at?: Date; - - mml?: string; - - parent_id?: string; - - pin_expires?: Date; - - pinned_at?: Date; - - poll_id?: string; - - quoted_message_id?: string; - - show_in_channel?: boolean; - - thread_participants?: User[]; - - i18n?: Record; - - image_labels?: Record; - - member?: ChannelMember; - - moderation?: ModerationV2Response; - - pinned_by?: User; - - poll?: Poll; - - quoted_message?: Message; - - reminder?: MessageReminder; - - shared_location?: SharedLocation; - - user?: User; -} - export interface MessageActionRequest { form_data: Record; @@ -8072,6 +8044,12 @@ export interface MessageActionRequest { user?: UserRequest; } +export interface MessageActionResponse { + duration: string; + + message?: MessageResponse; +} + export interface MessageChangeSet { attachments: boolean; @@ -8093,27 +8071,37 @@ export interface MessageChangeSet { } export interface MessageDeletedEvent { - channel_id: string; + created_at: Date; - channel_type: string; + hard_delete: boolean; - cid: string; + message_id: string; - created_at: Date; + custom: Record; - hard_delete: boolean; + message: MessageResponse; type: string; + channel_id?: string; + + channel_member_count?: number; + + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + deleted_for_me?: boolean; - team?: string; + received_at?: Date; - thread_participants?: User[]; + team?: string; - message?: Message; + channel_custom?: Record; - user?: User; + user?: UserResponseCommonFields; } export interface MessageFlagResponse { @@ -8133,11 +8121,11 @@ export interface MessageFlagResponse { custom?: Record; - details?: FlagDetails; + details?: FlagDetailsResponse; - message?: Message; + message?: MessageResponse; - moderation_feedback?: FlagFeedback; + moderation_feedback?: FlagFeedbackResponse; moderation_result?: MessageModerationResult; @@ -8147,20 +8135,42 @@ export interface MessageFlagResponse { } export interface MessageFlaggedEvent { - cid: string; - created_at: Date; - type: string; + message_id: string; - thread_participants?: User[]; + message: MessageResponse; - flag?: Flag; + type: string; - message?: Message; + channel_id?: string; - user?: User; -} + channel_member_count?: number; + + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + + reason?: string; + + received_at?: Date; + + team?: string; + + total_flags?: number; + + channel_custom?: Record; + + custom?: Record; + + details?: MessageModerationResult; + + flag?: FlagResponse; + + user?: UserResponseCommonFields; +} export interface MessageHistoryEntryResponse { is_deleted: boolean; @@ -8203,25 +8213,47 @@ export interface MessageModerationResult { } export interface MessageNewEvent { - channel_id: string; + created_at: Date; - channel_type: string; + message_id: string; - cid: string; + watcher_count: number; - created_at: Date; + custom: Record; - watcher_count: number; + message: MessageResponse; type: string; + channel_id?: string; + + channel_member_count?: number; + + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + + parent_author?: string; + + received_at?: Date; + team?: string; - thread_participants?: User[]; + total_unread_count?: number; - message?: Message; + unread_channels?: number; - user?: User; + unread_count?: number; + + thread_participants?: UserResponseCommonFields[]; + + channel?: ChannelResponse; + + channel_custom?: Record; + + user?: UserResponseCommonFields; } export interface MessageOptions { @@ -8276,33 +8308,13 @@ export interface MessageReadEvent { user?: UserResponseCommonFields; } -export interface MessageReminder { - channel_cid: string; - - created_at: Date; - - message_id: string; - - task_id: string; - - updated_at: Date; - - user_id: string; - - remind_at?: Date; - - channel?: Channel; - - message?: Message; - - user?: User; -} - export interface MessageRequest { html?: string; id?: string; + mentioned_channel?: boolean; + mml?: string; parent_id?: string; @@ -8351,6 +8363,8 @@ export interface MessageResponse { id: string; + mentioned_channel: boolean; + pinned: boolean; reply_count: number; @@ -8361,7 +8375,7 @@ export interface MessageResponse { text: string; - type: 'regular' | 'ephemeral' | 'error' | 'reply' | 'system' | 'deleted'; + type: string; updated_at: Date; @@ -8435,37 +8449,49 @@ export interface MessageStatsResponse { } export interface MessageUnblockedEvent { - cid: string; - created_at: Date; + message_id: string; + + custom: Record; + + message: MessageResponse; + type: string; - thread_participants?: User[]; + cid?: string; - message?: Message; + received_at?: Date; - user?: User; + user?: UserResponseCommonFields; } export interface MessageUndeletedEvent { - channel_id: string; + created_at: Date; - channel_type: string; + message_id: string; - cid: string; + custom: Record; - created_at: Date; + message: MessageResponse; type: string; - team?: string; + channel_id?: string; + + channel_member_count?: number; - thread_participants?: User[]; + channel_message_count?: number; - message?: Message; + channel_type?: string; - user?: User; + cid?: string; + + received_at?: Date; + + team?: string; + + channel_custom?: Record; } export interface MessageUpdate { @@ -8475,23 +8501,35 @@ export interface MessageUpdate { } export interface MessageUpdatedEvent { - channel_id: string; + created_at: Date; - channel_type: string; + message_id: string; - cid: string; + custom: Record; - created_at: Date; + message: MessageResponse; type: string; + channel_id?: string; + + channel_member_count?: number; + + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + + received_at?: Date; + team?: string; - thread_participants?: User[]; + channel_custom?: Record; - message?: Message; + message_update?: MessageUpdate; - user?: User; + user?: UserResponseCommonFields; } export interface MessageWithChannelResponse { @@ -8505,6 +8543,8 @@ export interface MessageWithChannelResponse { id: string; + mentioned_channel: boolean; + pinned: boolean; reply_count: number; @@ -8515,7 +8555,7 @@ export interface MessageWithChannelResponse { text: string; - type: 'regular' | 'ephemeral' | 'error' | 'reply' | 'system' | 'deleted'; + type: string; updated_at: Date; @@ -8606,7 +8646,11 @@ export interface MetricThreshold { window_seconds?: number; } -export interface ModerationActionConfig { +export interface MetricTimeSeries { + data_points?: number[][]; +} + +export interface ModerationActionConfigResponse { action: string; description: string; @@ -8617,7 +8661,7 @@ export interface ModerationActionConfig { order: number; - custom: Record; + custom?: Record; } export interface ModerationCheckCompletedEvent { @@ -8695,6 +8739,10 @@ export interface ModerationCustomActionEvent { } export interface ModerationDashboardPreferences { + async_review_queue_upsert?: boolean; + + disable_audit_logs?: boolean; + disable_flagging_reviewed_entity?: boolean; flag_user_on_flagged_content?: boolean; @@ -8731,7 +8779,7 @@ export interface ModerationFlagResponse { custom?: Record; - moderation_payload?: ModerationPayload; + moderation_payload?: ModerationPayloadResponse; review_queue_item?: ReviewQueueItemResponse; @@ -8739,15 +8787,17 @@ export interface ModerationFlagResponse { } export interface ModerationFlaggedEvent { + content_type: string; + created_at: Date; - type: string; + object_id: string; - item?: string; + custom: Record; - object_id?: string; + type: string; - user?: User; + received_at?: Date; } export interface ModerationMarkReviewedEvent { @@ -8774,6 +8824,26 @@ export interface ModerationPayload { custom?: Record; } +export interface ModerationPayloadRequest { + images?: string[]; + + texts?: string[]; + + videos?: string[]; + + custom?: Record; +} + +export interface ModerationPayloadResponse { + images?: string[]; + + texts?: string[]; + + videos?: string[]; + + custom?: Record; +} + export interface ModerationResponse { action: string; @@ -8847,7 +8917,7 @@ export interface MuteChannelResponse { channel_mute?: ChannelMute; - own_user?: OwnUser; + own_user?: OwnUserResponse; } export interface MuteRequest { @@ -8863,11 +8933,11 @@ export interface MuteRequest { export interface MuteResponse { duration: string; - mutes?: UserMute[]; + mutes?: UserMuteResponse[]; non_existing_users?: string[]; - own_user?: OwnUser; + own_user?: OwnUserResponse; } export interface MuteUsersRequest { @@ -8951,41 +9021,51 @@ export interface NotificationFeedUpdatedEvent { } export interface NotificationMarkUnreadEvent { - channel_id: string; - - channel_member_count: number; - - channel_type: string; - - cid: string; - created_at: Date; - first_unread_message_id: string; + custom: Record; - last_read_at: Date; + type: string; - total_unread_count: number; + channel_id?: string; - unread_channels: number; + channel_member_count?: number; - unread_count: number; + channel_message_count?: number; - unread_messages: number; + channel_type?: string; - unread_threads: number; + cid?: string; - type: string; + first_unread_message_id?: string; + + last_read_at?: Date; last_read_message_id?: string; + received_at?: Date; + team?: string; thread_id?: string; + total_unread_count?: number; + + unread_channels?: number; + + unread_count?: number; + + unread_messages?: number; + + unread_thread_messages?: number; + + unread_threads?: number; + channel?: ChannelResponse; - user?: User; + channel_custom?: Record; + + user?: UserResponseCommonFields; } export interface NotificationParentActivity { @@ -9014,6 +9094,34 @@ export interface NotificationSettings { session_started: EventNotificationSettings; } +export interface NotificationSettingsRequest { + enabled?: boolean; + + call_live_started?: EventNotificationSettingsRequest; + + call_missed?: EventNotificationSettingsRequest; + + call_notification?: EventNotificationSettingsRequest; + + call_ring?: EventNotificationSettingsRequest; + + session_started?: EventNotificationSettingsRequest; +} + +export interface NotificationSettingsResponse { + enabled: boolean; + + call_live_started: EventNotificationSettingsResponse; + + call_missed: EventNotificationSettingsResponse; + + call_notification: EventNotificationSettingsResponse; + + call_ring: EventNotificationSettingsResponse; + + session_started: EventNotificationSettingsResponse; +} + export interface NotificationStatusResponse { unread: number; @@ -9046,6 +9154,48 @@ export interface NotificationTarget { parent_activity?: NotificationParentActivity; } +export interface NotificationThreadMessageNewEvent { + created_at: Date; + + message_id: string; + + thread_id: string; + + watcher_count: number; + + channel: ChannelResponse; + + custom: Record; + + message: MessageResponse; + + type: string; + + channel_id?: string; + + channel_member_count?: number; + + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + + parent_author?: string; + + received_at?: Date; + + team?: string; + + unread_thread_messages?: number; + + unread_threads?: number; + + thread_participants?: UserResponseCommonFields[]; + + channel_custom?: Record; +} + export interface NotificationTrigger { text: string; @@ -9108,89 +9258,31 @@ export const OwnCapability = { READ_CALL: 'read-call', REMOVE_CALL_MEMBER: 'remove-call-member', SCREENSHARE: 'screenshare', - SEND_AUDIO: 'send-audio', - SEND_CLOSED_CAPTIONS_CALL: 'send-closed-captions-call', - SEND_VIDEO: 'send-video', - START_BROADCAST_CALL: 'start-broadcast-call', - START_CLOSED_CAPTIONS_CALL: 'start-closed-captions-call', - START_FRAME_RECORD_CALL: 'start-frame-record-call', - START_INDIVIDUAL_RECORD_CALL: 'start-individual-record-call', - START_RAW_RECORD_CALL: 'start-raw-record-call', - START_RECORD_CALL: 'start-record-call', - START_TRANSCRIPTION_CALL: 'start-transcription-call', - STOP_BROADCAST_CALL: 'stop-broadcast-call', - STOP_CLOSED_CAPTIONS_CALL: 'stop-closed-captions-call', - STOP_FRAME_RECORD_CALL: 'stop-frame-record-call', - STOP_INDIVIDUAL_RECORD_CALL: 'stop-individual-record-call', - STOP_RAW_RECORD_CALL: 'stop-raw-record-call', - STOP_RECORD_CALL: 'stop-record-call', - STOP_TRANSCRIPTION_CALL: 'stop-transcription-call', - UPDATE_CALL: 'update-call', - UPDATE_CALL_MEMBER: 'update-call-member', - UPDATE_CALL_PERMISSIONS: 'update-call-permissions', - UPDATE_CALL_SETTINGS: 'update-call-settings', -} as const; - -// eslint-disable-next-line @typescript-eslint/no-redeclare -export type OwnCapability = (typeof OwnCapability)[keyof typeof OwnCapability]; - -export interface OwnUser { - banned: boolean; - - created_at: Date; - - id: string; - - language: string; - - online: boolean; - - role: string; - - total_unread_count: number; - - unread_channels: number; - - unread_count: number; - - unread_threads: number; - - updated_at: Date; - - channel_mutes: ChannelMute[]; - - devices: Device[]; - - mutes: UserMute[]; - - custom: Record; - - total_unread_count_by_team: Record; - - avg_response_time?: number; - - deactivated_at?: Date; - - deleted_at?: Date; - - invisible?: boolean; - - last_active?: Date; - - last_engaged_at?: Date; - - blocked_user_ids?: string[]; - - latest_hidden_channels?: string[]; - - teams?: string[]; - - privacy_settings?: PrivacySettings; - - push_preferences?: PushPreferences; + SEND_AUDIO: 'send-audio', + SEND_CLOSED_CAPTIONS_CALL: 'send-closed-captions-call', + SEND_VIDEO: 'send-video', + START_BROADCAST_CALL: 'start-broadcast-call', + START_CLOSED_CAPTIONS_CALL: 'start-closed-captions-call', + START_FRAME_RECORD_CALL: 'start-frame-record-call', + START_INDIVIDUAL_RECORD_CALL: 'start-individual-record-call', + START_RAW_RECORD_CALL: 'start-raw-record-call', + START_RECORD_CALL: 'start-record-call', + START_TRANSCRIPTION_CALL: 'start-transcription-call', + STOP_BROADCAST_CALL: 'stop-broadcast-call', + STOP_CLOSED_CAPTIONS_CALL: 'stop-closed-captions-call', + STOP_FRAME_RECORD_CALL: 'stop-frame-record-call', + STOP_INDIVIDUAL_RECORD_CALL: 'stop-individual-record-call', + STOP_RAW_RECORD_CALL: 'stop-raw-record-call', + STOP_RECORD_CALL: 'stop-record-call', + STOP_TRANSCRIPTION_CALL: 'stop-transcription-call', + UPDATE_CALL: 'update-call', + UPDATE_CALL_MEMBER: 'update-call-member', + UPDATE_CALL_PERMISSIONS: 'update-call-permissions', + UPDATE_CALL_SETTINGS: 'update-call-settings', +} as const; - teams_role?: Record; -} +// eslint-disable-next-line @typescript-eslint/no-redeclare +export type OwnCapability = (typeof OwnCapability)[keyof typeof OwnCapability]; export interface OwnUserResponse { banned: boolean; @@ -9274,6 +9366,14 @@ export interface PaginationParams { offset?: number; } +export interface ParsedPredefinedFilterResponse { + name: string; + + filter: Record; + + sort?: SortParamRequest[]; +} + export interface ParticipantCountByMinuteResponse { first: number; @@ -9413,13 +9513,13 @@ export interface PendingMessageEvent { received_at?: Date; - channel?: Channel; + channel?: ChannelResponse; - message?: Message; + message?: MessageResponse; metadata?: Record; - user?: User; + user?: UserResponse; } export interface PendingMessageResponse { @@ -9447,7 +9547,7 @@ export interface Permission { id: string; - level: 'app' | 'channel'; + level: string; name: string; @@ -9540,58 +9640,6 @@ export interface PolicyRequest { roles: string[]; } -export interface Poll { - allow_answers: boolean; - - allow_user_suggested_options: boolean; - - answers_count: number; - - created_at: Date; - - created_by_id: string; - - description: string; - - enforce_unique_vote: boolean; - - id: string; - - name: string; - - updated_at: Date; - - vote_count: number; - - latest_answers: PollVote[]; - - options: PollOption[]; - - own_votes: PollVote[]; - - custom: Record; - - latest_votes_by_option: Record; - - vote_counts_by_option: Record; - - is_closed?: boolean; - - max_votes_allowed?: number; - - voting_visibility?: string; - - created_by?: User; -} - -export interface PollOption { - id: string; - - text: string; - - custom: Record; -} - export interface PollOptionInput { text?: string; @@ -9670,26 +9718,6 @@ export interface PollResponseData { created_by?: UserResponse; } -export interface PollVote { - created_at: Date; - - id: string; - - option_id: string; - - poll_id: string; - - updated_at: Date; - - answer_text?: string; - - is_answer?: boolean; - - user_id?: string; - - user?: User; -} - export interface PollVoteResponse { duration: string; @@ -9728,14 +9756,6 @@ export interface PollVotesResponse { prev?: string; } -export interface PrivacySettings { - delivery_receipts?: DeliveryReceipts; - - read_receipts?: ReadReceipts; - - typing_indicators?: TypingIndicators; -} - export interface PrivacySettingsResponse { delivery_receipts?: DeliveryReceiptsResponse; @@ -9754,6 +9774,22 @@ export interface PublishedTrackFlags { video: boolean; } +export interface PublishedTrackMetrics { + codec?: string; + + track_id?: string; + + track_type?: string; + + warnings?: SessionWarningResponse[]; + + bitrate?: MetricTimeSeries; + + framerate?: MetricTimeSeries; + + resolution?: ResolutionMetricsTimeSeries; +} + export interface PublisherAllMetrics { audio?: PublisherAudioMetrics; @@ -9829,7 +9865,13 @@ export interface PushPreferenceInput { channel_cid?: string; - chat_level?: 'all' | 'mentions' | 'none' | 'default'; + chat_level?: + | 'all' + | 'mentions' + | 'direct_mentions' + | 'all_mentions' + | 'none' + | 'default'; disabled_until?: Date; @@ -9842,18 +9884,6 @@ export interface PushPreferenceInput { feeds_preferences?: FeedsPreferences; } -export interface PushPreferences { - call_level?: string; - - chat_level?: string; - - disabled_until?: Date; - - feeds_level?: string; - - feeds_preferences?: FeedsPreferences; -} - export interface PushPreferencesResponse { call_level?: string; @@ -9924,6 +9954,56 @@ export interface PushProvider { push_templates?: PushTemplate[]; } +export interface PushProviderRequest { + name: string; + + apn_auth_key?: string; + + apn_auth_type?: string; + + apn_development?: boolean; + + apn_host?: string; + + apn_key_id?: string; + + apn_notification_template?: string; + + apn_p12_cert?: string; + + apn_team_id?: string; + + apn_topic?: string; + + description?: string; + + disabled_at?: Date; + + disabled_reason?: string; + + firebase_apn_template?: string; + + firebase_credentials?: string; + + firebase_data_template?: string; + + firebase_host?: string; + + firebase_notification_template?: string; + + firebase_server_key?: string; + + huawei_app_id?: string; + + huawei_app_secret?: string; + + type?: string; + + xiaomi_app_secret?: string; + + xiaomi_package_name?: string; +} + export interface PushProviderResponse { created_at: Date; @@ -10004,6 +10084,20 @@ export interface PushTemplate { template?: string; } +export interface PushTemplateResponse { + created_at: Date; + + enable_push: boolean; + + event_type: string; + + push_provider_internal_id: string; + + updated_at: Date; + + template?: string; +} + export interface QualityScoreReport { histogram: ReportByHistogramBucket[]; } @@ -10414,6 +10508,8 @@ export interface QueryChannelsResponse { duration: string; channels: ChannelStateResponseFields[]; + + predefined_filter?: ParsedPredefinedFilterResponse; } export interface QueryCommentReactionsRequest { @@ -10515,7 +10611,7 @@ export interface QueryFeedModerationTemplate { updated_at: Date; - config?: FeedsModerationTemplateConfig; + config?: FeedsModerationTemplateConfigPayload; } export interface QueryFeedModerationTemplatesResponse { @@ -10727,7 +10823,7 @@ export interface QueryModerationFlagsRequest { prev?: string; - sort?: SortParam[]; + sort?: SortParamRequest[]; filter?: Record; } @@ -10911,7 +11007,7 @@ export interface QueryReviewQueueResponse { items: ReviewQueueItemResponse[]; - action_config: Record; + action_config: Record; stats: Record; @@ -11141,43 +11237,75 @@ export interface RawRecordingSettingsResponse { } export interface Reaction { + activity_id: string; + created_at: Date; - message_id: string; + kind: string; - score: number; + updated_at: Date; - type: string; + user_id: string; - updated_at: Date; + deleted_at?: Date; - custom: Record; + id?: string; - user_id?: string; + parent?: string; + + score?: number; + + target_feeds?: string[]; + + children_counts?: Record; + + data?: Record; + + latest_children?: Record; + + moderation?: Record; + + own_children?: Record; + + target_feeds_extra_data?: Record; user?: User; } export interface ReactionDeletedEvent { - channel_id: string; - - channel_type: string; + created_at: Date; - cid: string; + channel: ChannelResponse; - created_at: Date; + custom: Record; type: string; + channel_id?: string; + + channel_member_count?: number; + + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + + message_id?: string; + + received_at?: Date; + team?: string; - thread_participants?: User[]; + thread_participants?: UserResponseCommonFields[]; - message?: Message; + channel_custom?: Record; - reaction?: Reaction; + message?: MessageResponse; - user?: User; + reaction?: ReactionResponse; + + user?: UserResponseCommonFields; } export interface ReactionGroupResponse { @@ -11191,25 +11319,39 @@ export interface ReactionGroupResponse { } export interface ReactionNewEvent { - channel_id: string; + created_at: Date; + + channel: ChannelResponse; + + custom: Record; + + type: string; + + channel_id?: string; + + channel_member_count?: number; + + channel_message_count?: number; - channel_type: string; + channel_type?: string; - cid: string; + cid?: string; - created_at: Date; + message_id?: string; - type: string; + received_at?: Date; team?: string; - thread_participants?: User[]; + thread_participants?: UserResponseCommonFields[]; - message?: Message; + channel_custom?: Record; - reaction?: Reaction; + message?: MessageResponse; - user?: User; + reaction?: ReactionResponse; + + user?: UserResponseCommonFields; } export interface ReactionRequest { @@ -11247,23 +11389,37 @@ export interface ReactionResponse { } export interface ReactionUpdatedEvent { - channel_id: string; - - channel_type: string; + created_at: Date; - cid: string; + message_id: string; - created_at: Date; + channel: ChannelResponse; - message: Message; + custom: Record; - reaction: Reaction; + message: MessageResponse; type: string; + channel_id?: string; + + channel_member_count?: number; + + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + + received_at?: Date; + team?: string; - user?: User; + channel_custom?: Record; + + reaction?: ReactionResponse; + + user?: UserResponseCommonFields; } export interface ReactivateUserRequest { @@ -11302,10 +11458,6 @@ export interface ReadCollectionsResponse { collections: CollectionResponse[]; } -export interface ReadReceipts { - enabled?: boolean; -} - export interface ReadReceiptsResponse { enabled?: boolean; } @@ -11364,7 +11516,7 @@ export interface RecordSettingsResponse { layout: LayoutSettingsResponse; } -export interface RejectAppealRequest { +export interface RejectAppealRequestPayload { decision_reason: string; } @@ -11522,12 +11674,18 @@ export interface ReportResponse { user_ratings: UserRatingReportResponse; } +export interface ResolutionMetricsTimeSeries { + height?: MetricTimeSeries; + + width?: MetricTimeSeries; +} + export interface ResolveSipInboundRequest { sip_caller_number: string; sip_trunk_number: string; - challenge: SIPChallenge; + challenge: SIPChallengeRequest; routing_number?: string; @@ -11548,7 +11706,7 @@ export interface Response { duration: string; } -export interface RestoreActionRequest { +export interface RestoreActionRequestPayload { decision_reason?: string; } @@ -11611,7 +11769,7 @@ export interface ReviewQueueItemResponse { actions: ActionLogResponse[]; - bans: Ban[]; + bans: BanInfoResponse[]; flags: ModerationFlagResponse[]; @@ -11647,7 +11805,7 @@ export interface ReviewQueueItemResponse { message?: MessageResponse; - moderation_payload?: ModerationPayload; + moderation_payload?: ModerationPayloadResponse; reaction?: Reaction; } @@ -11817,9 +11975,9 @@ export interface SFULocationResponse { id: string; - coordinates: Coordinates; + coordinates: CoordinatesResponse; - location: Location; + location: LocationResponse; count?: number; } @@ -11844,7 +12002,7 @@ export interface SIPCallerConfigsResponse { custom_data: Record; } -export interface SIPChallenge { +export interface SIPChallengeRequest { a1?: string; algorithm?: string; @@ -12077,6 +12235,8 @@ export interface SearchResultMessage { id: string; + mentioned_channel: boolean; + pinned: boolean; reply_count: number; @@ -12312,6 +12472,18 @@ export interface SendUserCustomEventRequest { event: UserCustomEventRequest; } +export interface SessionClient { + ip?: string; + + name?: string; + + network_type?: string; + + version?: string; + + location?: CallStatsLocation; +} + export interface SessionSettings { inactivity_timeout_seconds: number; } @@ -12324,7 +12496,15 @@ export interface SessionSettingsResponse { inactivity_timeout_seconds: number; } -export interface ShadowBlockActionRequest { +export interface SessionWarningResponse { + code: string; + + warning: string; + + time?: Date; +} + +export interface ShadowBlockActionRequestPayload { reason?: string; } @@ -12413,6 +12593,8 @@ export interface SingleFollowResponse { } export interface SipInboundCredentials { + api_key: string; + call_id: string; call_type: string; @@ -12426,20 +12608,12 @@ export interface SipInboundCredentials { user_custom_data: Record; } -export interface SortParam { - direction?: number; - - field?: string; - - type?: string; -} - export interface SortParamRequest { direction?: number; field?: string; - type?: '' | 'number' | 'boolean'; + type?: string; } export interface SpeechSegmentConfig { @@ -12694,6 +12868,7 @@ export interface StoriesFeedUpdatedEvent { export interface SubmitActionRequest { action_type: + | 'flag' | 'mark_reviewed' | 'delete_message' | 'delete_activity' @@ -12718,33 +12893,35 @@ export interface SubmitActionRequest { user_id?: string; - ban?: BanActionRequest; + ban?: BanActionRequestPayload; - block?: BlockActionRequest; + block?: BlockActionRequestPayload; - custom?: CustomActionRequest; + custom?: CustomActionRequestPayload; - delete_activity?: DeleteActivityRequest; + delete_activity?: DeleteActivityRequestPayload; - delete_comment?: DeleteCommentRequest; + delete_comment?: DeleteCommentRequestPayload; - delete_message?: DeleteMessageRequest; + delete_message?: DeleteMessageRequestPayload; - delete_reaction?: DeleteReactionRequest; + delete_reaction?: DeleteReactionRequestPayload; - delete_user?: DeleteUserRequest; + delete_user?: DeleteUserRequestPayload; - mark_reviewed?: MarkReviewedRequest; + flag?: FlagRequest; - reject_appeal?: RejectAppealRequest; + mark_reviewed?: MarkReviewedRequestPayload; - restore?: RestoreActionRequest; + reject_appeal?: RejectAppealRequestPayload; - shadow_block?: ShadowBlockActionRequest; + restore?: RestoreActionRequestPayload; - unban?: UnbanActionRequest; + shadow_block?: ShadowBlockActionRequestPayload; - unblock?: UnblockActionRequest; + unban?: UnbanActionRequestPayload; + + unblock?: UnblockActionRequestPayload; user?: UserRequest; } @@ -12930,19 +13107,21 @@ export interface ThreadStateResponse { } export interface ThreadUpdatedEvent { - channel_id: string; + created_at: Date; - channel_type: string; + custom: Record; - cid: string; + type: string; - created_at: Date; + channel_id?: string; - type: string; + channel_type?: string; - thread?: ThreadResponse; + cid?: string; - user?: User; + received_at?: Date; + + thread?: ThreadResponse; } export interface ThreadedCommentResponse { @@ -12998,7 +13177,7 @@ export interface ThreadedCommentResponse { moderation?: ModerationV2Response; - reaction_groups?: Record; + reaction_groups?: Record; } export interface Thresholds { @@ -13271,15 +13450,13 @@ export interface TruncateChannelResponse { message?: MessageResponse; } -export interface TypingIndicators { - enabled?: boolean; -} - export interface TypingIndicatorsResponse { enabled?: boolean; } -export interface UnbanActionRequest { +export interface UnbanActionRequestPayload { + channel_cid?: string; + decision_reason?: string; } @@ -13293,7 +13470,7 @@ export interface UnbanResponse { duration: string; } -export interface UnblockActionRequest { +export interface UnblockActionRequestPayload { decision_reason?: string; } @@ -13439,7 +13616,31 @@ export interface UnreadCountsThread { unread_count: number; } +export interface UpdateActivitiesPartialBatchRequest { + changes: UpdateActivityPartialChangeRequest[]; +} + +export interface UpdateActivitiesPartialBatchResponse { + duration: string; + + activities: ActivityResponse[]; +} + +export interface UpdateActivityPartialChangeRequest { + activity_id: string; + + copy_custom_to_notification?: boolean; + + handle_mention_notifications?: boolean; + + unset?: string[]; + + set?: Record; +} + export interface UpdateActivityPartialRequest { + copy_custom_to_notification?: boolean; + handle_mention_notifications?: boolean; run_activity_processors?: boolean; @@ -13460,6 +13661,8 @@ export interface UpdateActivityPartialResponse { } export interface UpdateActivityRequest { + copy_custom_to_notification?: boolean; + expires_at?: Date; handle_mention_notifications?: boolean; @@ -13496,6 +13699,8 @@ export interface UpdateActivityRequest { location?: ActivityLocation; + search_data?: Record; + user?: UserRequest; } @@ -13688,7 +13893,7 @@ export interface UpdateCallTypeRequest { grants?: Record; - notification_settings?: NotificationSettings; + notification_settings?: NotificationSettingsRequest; settings?: CallSettingsRequest; } @@ -13704,7 +13909,7 @@ export interface UpdateCallTypeResponse { grants: Record; - notification_settings: NotificationSettings; + notification_settings: NotificationSettingsResponse; settings: CallSettingsResponse; @@ -13806,6 +14011,8 @@ export interface UpdateChannelTypeRequest { polls?: boolean; + push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none'; + push_notifications?: boolean; quotes?: boolean; @@ -13914,6 +14121,8 @@ export interface UpdateChannelTypeResponse { partition_ttl?: string; + push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none'; + allowed_flag_reasons?: string[]; blocklists?: BlockListOptions[]; @@ -13960,6 +14169,8 @@ export interface UpdateCommandResponse { export interface UpdateCommentRequest { comment?: string; + copy_custom_to_notification?: boolean; + handle_mention_notifications?: boolean; skip_enrich_url?: boolean; @@ -14109,6 +14320,8 @@ export interface UpdateFollowRequest { target: string; + copy_custom_to_notification?: boolean; + create_notification_activity?: boolean; follower_role?: string; @@ -14171,6 +14384,8 @@ export interface UpdateMembershipLevelResponse { export interface UpdateMessagePartialRequest { skip_enrich_url?: boolean; + skip_push?: boolean; + user_id?: string; unset?: string[]; @@ -14507,7 +14722,7 @@ export interface UpsertModerationRuleResponse { export interface UpsertModerationTemplateRequest { name: string; - config: FeedsModerationTemplateConfig; + config: FeedsModerationTemplateConfigPayload; } export interface UpsertModerationTemplateResponse { @@ -14519,7 +14734,7 @@ export interface UpsertModerationTemplateResponse { updated_at: Date; - config?: FeedsModerationTemplateConfig; + config?: FeedsModerationTemplateConfigPayload; } export interface UpsertPushPreferencesRequest { @@ -14531,14 +14746,14 @@ export interface UpsertPushPreferencesResponse { user_channel_preferences: Record< string, - Record + Record >; - user_preferences: Record; + user_preferences: Record; } export interface UpsertPushProviderRequest { - push_provider?: PushProvider; + push_provider?: PushProviderRequest; } export interface UpsertPushProviderResponse { @@ -14572,55 +14787,49 @@ export interface UpsertPushTemplateRequest { export interface UpsertPushTemplateResponse { duration: string; - template?: PushTemplate; + template?: PushTemplateResponse; } export interface User { id: string; - ban_expires?: Date; - - banned?: boolean; - - invisible?: boolean; - - language?: string; + data?: Record; +} - revoke_tokens_issued_before?: Date; +export interface UserBannedEvent { + created_at: Date; - role?: string; + custom: Record; - teams?: string[]; + user: UserResponseCommonFields; - custom?: Record; + type: string; - privacy_settings?: PrivacySettings; + channel_id?: string; - teams_role?: Record; -} + channel_member_count?: number; -export interface UserBannedEvent { - channel_id: string; + channel_message_count?: number; - channel_type: string; + channel_type?: string; - cid: string; + cid?: string; - created_at: Date; + expiration?: Date; - shadow: boolean; + reason?: string; - created_by: User; + received_at?: Date; - type: string; + shadow?: boolean; - expiration?: Date; + team?: string; - reason?: string; + total_bans?: number; - team?: string; + channel_custom?: Record; - user?: User; + created_by?: UserResponseCommonFields; } export interface UserCreatedWithinParameters { @@ -14642,25 +14851,39 @@ export interface UserCustomPropertyParameters { export interface UserDeactivatedEvent { created_at: Date; - created_by: User; + custom: Record; + + user: UserResponseCommonFields; type: string; - user?: User; + received_at?: Date; + + created_by?: UserResponseCommonFields; } export interface UserDeletedEvent { created_at: Date; + delete_conversation: string; + delete_conversation_channels: boolean; + delete_messages: string; + + delete_user: string; + hard_delete: boolean; mark_messages_deleted: boolean; + custom: Record; + + user: UserResponseCommonFields; + type: string; - user?: User; + received_at?: Date; } export interface UserFeedbackReport { @@ -14696,13 +14919,19 @@ export interface UserFeedbackResponse { export interface UserFlaggedEvent { created_at: Date; + reason: string; + + total_flags: number; + + user: UserResponseCommonFields; + type: string; - target_user?: string; + received_at?: Date; - target_users?: string[]; + custom?: Record; - user?: User; + target_user?: UserResponseCommonFields; } export interface UserIdenticalContentCountParameters { @@ -14739,18 +14968,6 @@ export interface UserMessagesDeletedEvent { channel_custom?: Record; } -export interface UserMute { - created_at: Date; - - updated_at: Date; - - expires?: Date; - - target?: User; - - user?: User; -} - export interface UserMuteResponse { created_at: Date; @@ -14766,13 +14983,17 @@ export interface UserMuteResponse { export interface UserMutedEvent { created_at: Date; + custom: Record; + + user: UserResponseCommonFields; + type: string; - target_user?: string; + received_at?: Date; - target_users?: string[]; + target_users?: UserResponseCommonFields[]; - user?: User; + target_user?: UserResponseCommonFields; } export interface UserRatingReportResponse { @@ -14784,9 +15005,15 @@ export interface UserRatingReportResponse { export interface UserReactivatedEvent { created_at: Date; + custom: Record; + + user: UserResponseCommonFields; + type: string; - user?: User; + received_at?: Date; + + created_by?: UserResponseCommonFields; } export interface UserRequest { @@ -14952,43 +15179,63 @@ export interface UserRuleParameters { } export interface UserUnbannedEvent { - channel_id: string; + created_at: Date; - channel_type: string; + custom: Record; - cid: string; + user: UserResponseCommonFields; - created_at: Date; + type: string; + + channel_id?: string; - shadow: boolean; + channel_member_count?: number; - type: string; + channel_message_count?: number; + + channel_type?: string; + + cid?: string; + + received_at?: Date; + + shadow?: boolean; team?: string; - user?: User; + channel_custom?: Record; + + created_by?: UserResponseCommonFields; } export interface UserUnmutedEvent { created_at: Date; + custom: Record; + + user: UserResponseCommonFields; + type: string; - target_user?: string; + received_at?: Date; - target_users?: string[]; + target_users?: UserResponseCommonFields[]; - user?: User; + target_user?: UserResponseCommonFields; } export interface UserUnreadReminderEvent { created_at: Date; - channels: Record; + channels: Record; + + custom: Record; + + user: UserResponseCommonFields; type: string; - user?: User; + received_at?: Date; } export interface UserUpdatedEvent { @@ -15061,14 +15308,24 @@ export interface VideoContentParameters { harm_labels?: string[]; } -export interface VideoEndCallRequest {} +export interface VideoEndCallRequestPayload {} -export interface VideoKickUserRequest {} +export interface VideoKickUserRequestPayload {} export interface VideoReactionOverTimeResponse { by_minute?: CountByMinuteResponse[]; } +export interface VideoReactionResponse { + type: string; + + user: UserResponse; + + emoji_code?: string; + + custom?: Record; +} + export interface VideoReactionsResponse { reaction: string; @@ -15186,8 +15443,7 @@ export interface WSEvent { } export type WebhookEvent = - | ({ type: '*' } & AnyEvent) - | ({ type: 'activity.marked' } & ActivityMarkedEvent) + | ({ type: '*' } & CustomEvent) | ({ type: 'appeal.accepted' } & AppealAcceptedEvent) | ({ type: 'appeal.created' } & AppealCreatedEvent) | ({ type: 'appeal.rejected' } & AppealRejectedEvent) @@ -15199,6 +15455,7 @@ export type WebhookEvent = | ({ type: 'call.closed_captions_stopped' } & CallClosedCaptionsStoppedEvent) | ({ type: 'call.created' } & CallCreatedEvent) | ({ type: 'call.deleted' } & CallDeletedEvent) + | ({ type: 'call.dtmf' } & CallDTMFEvent) | ({ type: 'call.ended' } & CallEndedEvent) | ({ type: 'call.frame_recording_failed' } & CallFrameRecordingFailedEvent) | ({ type: 'call.frame_recording_ready' } & CallFrameRecordingFrameReadyEvent) @@ -15261,6 +15518,7 @@ export type WebhookEvent = | ({ type: 'channel.deleted' } & ChannelDeletedEvent) | ({ type: 'channel.frozen' } & ChannelFrozenEvent) | ({ type: 'channel.hidden' } & ChannelHiddenEvent) + | ({ type: 'channel.max_streak_changed' } & MaxStreakChangedEvent) | ({ type: 'channel.muted' } & ChannelMutedEvent) | ({ type: 'channel.truncated' } & ChannelTruncatedEvent) | ({ type: 'channel.unfrozen' } & ChannelUnFrozenEvent) @@ -15341,7 +15599,9 @@ export type WebhookEvent = | ({ type: 'moderation_check.completed' } & ModerationCheckCompletedEvent) | ({ type: 'notification.mark_unread' } & NotificationMarkUnreadEvent) | ({ type: 'notification.reminder_due' } & ReminderNotificationEvent) - | ({ type: 'notification.thread_message_new' } & MessageNewEvent) + | ({ + type: 'notification.thread_message_new'; + } & NotificationThreadMessageNewEvent) | ({ type: 'reaction.deleted' } & ReactionDeletedEvent) | ({ type: 'reaction.new' } & ReactionNewEvent) | ({ type: 'reaction.updated' } & ReactionUpdatedEvent) diff --git a/src/gen/moderation/ModerationApi.ts b/src/gen/moderation/ModerationApi.ts index b25062a..5263ccd 100644 --- a/src/gen/moderation/ModerationApi.ts +++ b/src/gen/moderation/ModerationApi.ts @@ -670,6 +670,7 @@ export class ModerationApi { delete_message: request?.delete_message, delete_reaction: request?.delete_reaction, delete_user: request?.delete_user, + flag: request?.flag, mark_reviewed: request?.mark_reviewed, reject_appeal: request?.reject_appeal, restore: request?.restore, diff --git a/src/gen/video/CallApi.ts b/src/gen/video/CallApi.ts index 288ee98..9a2b940 100644 --- a/src/gen/video/CallApi.ts +++ b/src/gen/video/CallApi.ts @@ -9,6 +9,7 @@ import { DeleteRecordingResponse, DeleteTranscriptionResponse, EndCallResponse, + GetCallParticipantSessionMetricsResponse, GetCallReportResponse, GetCallResponse, GetOrCreateCallRequest, @@ -206,6 +207,26 @@ export class CallApi { return this.videoApi.listRecordings({ id: this.id, type: this.type }); } + startRecording( + request: StartRecordingRequest & { recording_type: string }, + ): Promise> { + return this.videoApi.startRecording({ + id: this.id, + type: this.type, + ...request, + }); + } + + stopRecording( + request: StopRecordingRequest & { recording_type: string }, + ): Promise> { + return this.videoApi.stopRecording({ + id: this.id, + type: this.type, + ...request, + }); + } + getCallReport(request?: { session_id?: string; }): Promise> { @@ -249,6 +270,20 @@ export class CallApi { }); } + getCallParticipantSessionMetrics(request: { + session: string; + user: string; + user_session: string; + since?: Date; + until?: Date; + }): Promise> { + return this.videoApi.getCallParticipantSessionMetrics({ + id: this.id, + type: this.type, + ...request, + }); + } + queryCallParticipantSessions(request: { session: string; limit?: number; @@ -289,16 +324,6 @@ export class CallApi { }); } - startRecording( - request?: StartRecordingRequest, - ): Promise> { - return this.videoApi.startRecording({ - id: this.id, - type: this.type, - ...request, - }); - } - startTranscription( request?: StartTranscriptionRequest, ): Promise> { @@ -333,16 +358,6 @@ export class CallApi { return this.videoApi.stopLive({ id: this.id, type: this.type, ...request }); } - stopRecording( - request?: StopRecordingRequest, - ): Promise> { - return this.videoApi.stopRecording({ - id: this.id, - type: this.type, - ...request, - }); - } - stopTranscription( request?: StopTranscriptionRequest, ): Promise> { diff --git a/src/gen/video/VideoApi.ts b/src/gen/video/VideoApi.ts index 5f1b200..84b6a8b 100644 --- a/src/gen/video/VideoApi.ts +++ b/src/gen/video/VideoApi.ts @@ -16,6 +16,7 @@ import { DeleteTranscriptionResponse, EndCallResponse, GetActiveCallsStatusResponse, + GetCallParticipantSessionMetricsResponse, GetCallReportResponse, GetCallResponse, GetCallSessionParticipantStatsDetailsResponse, @@ -681,6 +682,68 @@ export class VideoApi { return { ...response.body, metadata: response.metadata }; } + async startRecording( + request: StartRecordingRequest & { + type: string; + id: string; + recording_type: string; + }, + ): Promise> { + const pathParams = { + type: request?.type, + id: request?.id, + recording_type: request?.recording_type, + }; + const body = { + recording_external_storage: request?.recording_external_storage, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'POST', + '/api/v2/video/call/{type}/{id}/recordings/{recording_type}/start', + pathParams, + undefined, + body, + 'application/json', + ); + + decoders.StartRecordingResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + + async stopRecording( + request: StopRecordingRequest & { + type: string; + id: string; + recording_type: string; + }, + ): Promise> { + const pathParams = { + type: request?.type, + id: request?.id, + recording_type: request?.recording_type, + }; + const body = {}; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'POST', + '/api/v2/video/call/{type}/{id}/recordings/{recording_type}/stop', + pathParams, + undefined, + body, + 'application/json', + ); + + decoders.StopRecordingResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + async getCallReport(request: { type: string; id: string; @@ -811,6 +874,41 @@ export class VideoApi { return { ...response.body, metadata: response.metadata }; } + async getCallParticipantSessionMetrics(request: { + type: string; + id: string; + session: string; + user: string; + user_session: string; + since?: Date; + until?: Date; + }): Promise> { + const queryParams = { + since: request?.since, + until: request?.until, + }; + const pathParams = { + type: request?.type, + id: request?.id, + session: request?.session, + user: request?.user, + user_session: request?.user_session, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'GET', + '/api/v2/video/call/{type}/{id}/session/{session}/participant/{user}/{user_session}/details/track', + pathParams, + queryParams, + ); + + decoders.GetCallParticipantSessionMetricsResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + async queryCallParticipantSessions(request: { type: string; id: string; @@ -926,33 +1024,6 @@ export class VideoApi { return { ...response.body, metadata: response.metadata }; } - async startRecording( - request: StartRecordingRequest & { type: string; id: string }, - ): Promise> { - const pathParams = { - type: request?.type, - id: request?.id, - }; - const body = { - recording_external_storage: request?.recording_external_storage, - }; - - const response = await this.apiClient.sendRequest< - StreamResponse - >( - 'POST', - '/api/v2/video/call/{type}/{id}/start_recording', - pathParams, - undefined, - body, - 'application/json', - ); - - decoders.StartRecordingResponse?.(response.body); - - return { ...response.body, metadata: response.metadata }; - } - async startTranscription( request: StartTranscriptionRequest & { type: string; id: string }, ): Promise> { @@ -1089,31 +1160,6 @@ export class VideoApi { return { ...response.body, metadata: response.metadata }; } - async stopRecording( - request: StopRecordingRequest & { type: string; id: string }, - ): Promise> { - const pathParams = { - type: request?.type, - id: request?.id, - }; - const body = {}; - - const response = await this.apiClient.sendRequest< - StreamResponse - >( - 'POST', - '/api/v2/video/call/{type}/{id}/stop_recording', - pathParams, - undefined, - body, - 'application/json', - ); - - decoders.StopRecordingResponse?.(response.body); - - return { ...response.body, metadata: response.metadata }; - } - async stopTranscription( request: StopTranscriptionRequest & { type: string; id: string }, ): Promise> {