From 918eca7fa4261f34dbad803434d8d142fcb2806f Mon Sep 17 00:00:00 2001 From: Jimmy Pettersson Date: Fri, 27 Feb 2026 15:16:58 +0100 Subject: [PATCH] chore: [FEEDS-1244] regenerate SDK --- src/gen/chat/ChatApi.ts | 45 +- src/gen/common/CommonApi.ts | 199 ++++++++ src/gen/feeds/FeedsApi.ts | 28 +- src/gen/model-decoders/decoders.ts | 175 ++++++- src/gen/models/index.ts | 712 ++++++++++++++++++++++++---- src/gen/moderation/ModerationApi.ts | 3 +- 6 files changed, 1064 insertions(+), 98 deletions(-) diff --git a/src/gen/chat/ChatApi.ts b/src/gen/chat/ChatApi.ts index 0c2f1b2..3a16529 100644 --- a/src/gen/chat/ChatApi.ts +++ b/src/gen/chat/ChatApi.ts @@ -70,6 +70,8 @@ import { QuerySegmentTargetsResponse, QuerySegmentsRequest, QuerySegmentsResponse, + QueryTeamUsageStatsRequest, + QueryTeamUsageStatsResponse, QueryThreadsRequest, QueryThreadsResponse, ReminderResponseData, @@ -91,6 +93,8 @@ import { TranslateMessageRequest, TruncateChannelRequest, TruncateChannelResponse, + UndeleteMessageRequest, + UndeleteMessageResponse, UnmuteChannelRequest, UnmuteResponse, UnreadCountsBatchRequest, @@ -203,7 +207,7 @@ export class ChatApi { return { ...response.body, metadata: response.metadata }; } - async scheduleCampaign( + async stopCampaign( request: StopCampaignRequest & { id: string }, ): Promise> { const pathParams = { @@ -1609,19 +1613,17 @@ export class ChatApi { } async undeleteMessage( - request: UpdateMessageRequest & { id: string }, - ): Promise> { + request: UndeleteMessageRequest & { id: string }, + ): Promise> { const pathParams = { id: request?.id, }; const body = { - message: request?.message, - skip_enrich_url: request?.skip_enrich_url, - skip_push: request?.skip_push, + undeleted_by: request?.undeleted_by, }; const response = await this.apiClient.sendRequest< - StreamResponse + StreamResponse >( 'POST', '/api/v2/chat/messages/{id}/undelete', @@ -1631,7 +1633,7 @@ export class ChatApi { 'application/json', ); - decoders.UpdateMessageResponse?.(response.body); + decoders.UndeleteMessageResponse?.(response.body); return { ...response.body, metadata: response.metadata }; } @@ -2094,6 +2096,33 @@ export class ChatApi { return { ...response.body, metadata: response.metadata }; } + async queryTeamUsageStats( + request?: QueryTeamUsageStatsRequest, + ): Promise> { + const body = { + end_date: request?.end_date, + limit: request?.limit, + month: request?.month, + next: request?.next, + start_date: request?.start_date, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'POST', + '/api/v2/chat/stats/team_usage', + undefined, + undefined, + body, + 'application/json', + ); + + decoders.QueryTeamUsageStatsResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + async queryThreads( request?: QueryThreadsRequest, ): Promise> { diff --git a/src/gen/common/CommonApi.ts b/src/gen/common/CommonApi.ts index 2c2aafa..92c7091 100644 --- a/src/gen/common/CommonApi.ts +++ b/src/gen/common/CommonApi.ts @@ -1,5 +1,7 @@ import { ApiClient, StreamResponse } from '../../gen-imports'; import { + AddUserGroupMembersRequest, + AddUserGroupMembersResponse, BlockUsersRequest, BlockUsersResponse, CheckExternalStorageResponse, @@ -26,6 +28,8 @@ import { CreatePollRequest, CreateRoleRequest, CreateRoleResponse, + CreateUserGroupRequest, + CreateUserGroupResponse, DeactivateUserRequest, DeactivateUserResponse, DeactivateUsersRequest, @@ -49,6 +53,7 @@ import { GetPushTemplatesResponse, GetRateLimitsResponse, GetTaskResponse, + GetUserGroupResponse, ImageUploadRequest, ImageUploadResponse, ListBlockListResponse, @@ -59,6 +64,7 @@ import { ListPermissionsResponse, ListPushProvidersResponse, ListRolesResponse, + ListUserGroupsResponse, PollOptionResponse, PollResponse, PollVotesResponse, @@ -71,8 +77,10 @@ import { ReactivateUserResponse, ReactivateUsersRequest, ReactivateUsersResponse, + RemoveUserGroupMembersResponse, Response, RestoreUsersRequest, + SearchUserGroupsResponse, SharedLocationResponse, SharedLocationsResponse, UnblockUsersRequest, @@ -86,6 +94,8 @@ import { UpdatePollOptionRequest, UpdatePollPartialRequest, UpdatePollRequest, + UpdateUserGroupRequest, + UpdateUserGroupResponse, UpdateUsersPartialRequest, UpdateUsersRequest, UpdateUsersResponse, @@ -131,6 +141,7 @@ export class CommonApi { max_aggregated_activities_length: request?.max_aggregated_activities_length, migrate_permissions_to_v2: request?.migrate_permissions_to_v2, + moderation_analytics_enabled: request?.moderation_analytics_enabled, moderation_enabled: request?.moderation_enabled, moderation_webhook_url: request?.moderation_webhook_url, multi_tenant_enabled: request?.multi_tenant_enabled, @@ -623,6 +634,7 @@ export class CommonApi { const body = { mode: request?.mode, path: request?.path, + merge_custom: request?.merge_custom, }; const response = await this.apiClient.sendRequest< @@ -1371,6 +1383,193 @@ export class CommonApi { return { ...response.body, metadata: response.metadata }; } + async listUserGroups(request?: { + limit?: number; + id_gt?: string; + created_at_gt?: string; + team_id?: string; + }): Promise> { + const queryParams = { + limit: request?.limit, + id_gt: request?.id_gt, + created_at_gt: request?.created_at_gt, + team_id: request?.team_id, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >('GET', '/api/v2/usergroups', undefined, queryParams); + + decoders.ListUserGroupsResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + + async createUserGroup( + request: CreateUserGroupRequest, + ): Promise> { + const body = { + name: request?.name, + description: request?.description, + id: request?.id, + team_id: request?.team_id, + member_ids: request?.member_ids, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'POST', + '/api/v2/usergroups', + undefined, + undefined, + body, + 'application/json', + ); + + decoders.CreateUserGroupResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + + async searchUserGroups(request: { + query: string; + limit?: number; + name_gt?: string; + id_gt?: string; + team_id?: string; + }): Promise> { + const queryParams = { + query: request?.query, + limit: request?.limit, + name_gt: request?.name_gt, + id_gt: request?.id_gt, + team_id: request?.team_id, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >('GET', '/api/v2/usergroups/search', undefined, queryParams); + + decoders.SearchUserGroupsResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + + async deleteUserGroup(request: { + id: string; + team_id?: string; + }): Promise> { + const queryParams = { + team_id: request?.team_id, + }; + const pathParams = { + id: request?.id, + }; + + const response = await this.apiClient.sendRequest>( + 'DELETE', + '/api/v2/usergroups/{id}', + pathParams, + queryParams, + ); + + decoders.Response?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + + async getUserGroup(request: { + id: string; + team_id?: string; + }): Promise> { + const queryParams = { + team_id: request?.team_id, + }; + const pathParams = { + id: request?.id, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >('GET', '/api/v2/usergroups/{id}', pathParams, queryParams); + + decoders.GetUserGroupResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + + async updateUserGroup( + request: UpdateUserGroupRequest & { id: string }, + ): Promise> { + const pathParams = { + id: request?.id, + }; + const body = { + description: request?.description, + name: request?.name, + team_id: request?.team_id, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'PUT', + '/api/v2/usergroups/{id}', + pathParams, + undefined, + body, + 'application/json', + ); + + decoders.UpdateUserGroupResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + + async removeUserGroupMembers(request: { + id: string; + }): Promise> { + const pathParams = { + id: request?.id, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >('DELETE', '/api/v2/usergroups/{id}/members', pathParams, undefined); + + decoders.RemoveUserGroupMembersResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + + async addUserGroupMembers( + request: AddUserGroupMembersRequest & { id: string }, + ): Promise> { + const pathParams = { + id: request?.id, + }; + const body = { + member_ids: request?.member_ids, + team_id: request?.team_id, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'POST', + '/api/v2/usergroups/{id}/members', + pathParams, + undefined, + body, + 'application/json', + ); + + decoders.AddUserGroupMembersResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + async queryUsers(request?: { payload?: QueryUsersPayload; }): Promise> { diff --git a/src/gen/feeds/FeedsApi.ts b/src/gen/feeds/FeedsApi.ts index f908e27..a0b4db2 100644 --- a/src/gen/feeds/FeedsApi.ts +++ b/src/gen/feeds/FeedsApi.ts @@ -105,6 +105,7 @@ import { Response, RestoreActivityRequest, RestoreActivityResponse, + RestoreFeedGroupResponse, SingleFollowResponse, UnfollowBatchRequest, UnfollowBatchResponse, @@ -828,13 +829,13 @@ export class FeedsApi { return { ...response.body, metadata: response.metadata }; } - async readCollections(request: { - collection_refs: string[]; + async readCollections(request?: { user_id?: string; + collection_refs?: string[]; }): Promise> { const queryParams = { - collection_refs: request?.collection_refs, user_id: request?.user_id, + collection_refs: request?.collection_refs, }; const response = await this.apiClient.sendRequest< @@ -1670,6 +1671,27 @@ export class FeedsApi { return { ...response.body, metadata: response.metadata }; } + async restoreFeedGroup(request: { + feed_group_id: string; + }): Promise> { + const pathParams = { + feed_group_id: request?.feed_group_id, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'POST', + '/api/v2/feeds/feed_groups/{feed_group_id}/restore', + pathParams, + undefined, + ); + + decoders.RestoreFeedGroupResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + async deleteFeedGroup(request: { id: string; hard_delete?: boolean; diff --git a/src/gen/model-decoders/decoders.ts b/src/gen/model-decoders/decoders.ts index feafd71..d83b8a8 100644 --- a/src/gen/model-decoders/decoders.ts +++ b/src/gen/model-decoders/decoders.ts @@ -324,6 +324,13 @@ decoders.AddReactionResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.AddUserGroupMembersResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + user_group: { type: 'UserGroupResponse', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.AggregatedActivityResponse = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, @@ -1080,6 +1087,8 @@ decoders.CallStatsParticipantSession = (input?: Record) => { decoders.CallStatsReportReadyEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, + + participants_overview: { type: 'CallStatsParticipant', isSingle: false }, }; return decode(typeMappings, input); }; @@ -1830,6 +1839,13 @@ decoders.CreateSIPTrunkResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.CreateUserGroupResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + user_group: { type: 'UserGroupResponse', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.CustomCheckResponse = (input?: Record) => { const typeMappings: TypeMapping = { item: { type: 'ReviewQueueItemResponse', isSingle: true }, @@ -2086,6 +2102,15 @@ decoders.FeedGroupResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.FeedGroupRestoredEvent = (input?: Record) => { + const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.FeedMemberAddedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, @@ -2653,6 +2678,13 @@ decoders.GetThreadResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.GetUserGroupResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + user_group: { type: 'UserGroupResponse', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.GoLiveResponse = (input?: Record) => { const typeMappings: TypeMapping = { call: { type: 'CallResponse', isSingle: true }, @@ -2827,9 +2859,31 @@ decoders.ListTranscriptionsResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.ListUserGroupsResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + user_groups: { type: 'UserGroupResponse', isSingle: false }, + }; + return decode(typeMappings, input); +}; + decoders.MarkReadResponse = (input?: Record) => { const typeMappings: TypeMapping = { - event: { type: 'MessageReadEvent', isSingle: true }, + event: { type: 'MarkReadResponseEvent', isSingle: true }, + }; + return decode(typeMappings, input); +}; + +decoders.MarkReadResponseEvent = (input?: Record) => { + const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + + channel_last_message_at: { type: 'DatetimeType', isSingle: true }, + + channel: { type: 'ChannelResponse', isSingle: true }, + + thread: { type: 'ThreadResponse', isSingle: true }, + + user: { type: 'UserResponseCommonFields', isSingle: true }, }; return decode(typeMappings, input); }; @@ -3016,7 +3070,7 @@ decoders.MessageReadEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, - channel_last_message_at: { type: 'DatetimeType', isSingle: true }, + received_at: { type: 'DatetimeType', isSingle: true }, channel: { type: 'ChannelResponse', isSingle: true }, @@ -3225,6 +3279,15 @@ decoders.ModerationRuleV2Response = (input?: Record) => { return decode(typeMappings, input); }; +decoders.ModerationRulesTriggeredEvent = (input?: Record) => { + const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.MuteChannelResponse = (input?: Record) => { const typeMappings: TypeMapping = { channel_mutes: { type: 'ChannelMute', isSingle: false }, @@ -4012,6 +4075,13 @@ decoders.ReminderUpdatedEvent = (input?: Record) => { return decode(typeMappings, input); }; +decoders.RemoveUserGroupMembersResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + user_group: { type: 'UserGroupResponse', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.ResolveSipInboundResponse = (input?: Record) => { const typeMappings: TypeMapping = { sip_routing_rule: { type: 'SIPInboundRoutingRuleResponse', isSingle: true }, @@ -4028,6 +4098,13 @@ decoders.RestoreActivityResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.RestoreFeedGroupResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + feed_group: { type: 'FeedGroupResponse', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.ReviewQueueItemNewEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, @@ -4174,6 +4251,13 @@ decoders.SearchResultMessage = (input?: Record) => { return decode(typeMappings, input); }; +decoders.SearchUserGroupsResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + user_groups: { type: 'UserGroupResponse', isSingle: false }, + }; + return decode(typeMappings, input); +}; + decoders.Segment = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, @@ -4424,6 +4508,13 @@ decoders.UnblockedUserEvent = (input?: Record) => { return decode(typeMappings, input); }; +decoders.UndeleteMessageResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + message: { type: 'MessageResponse', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.UnfollowBatchResponse = (input?: Record) => { const typeMappings: TypeMapping = { follows: { type: 'FollowResponse', isSingle: false }, @@ -4692,6 +4783,13 @@ decoders.UpdateThreadPartialResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.UpdateUserGroupResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + user_group: { type: 'UserGroupResponse', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.UpdateUsersResponse = (input?: Record) => { const typeMappings: TypeMapping = { users: { type: 'FullUserResponse', isSingle: false }, @@ -4818,6 +4916,79 @@ decoders.UserFlaggedEvent = (input?: Record) => { return decode(typeMappings, input); }; +decoders.UserGroupCreatedEvent = (input?: Record) => { + const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, + + user: { type: 'UserResponseCommonFields', isSingle: true }, + }; + return decode(typeMappings, input); +}; + +decoders.UserGroupDeletedEvent = (input?: Record) => { + const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, + + user: { type: 'UserResponseCommonFields', isSingle: true }, + }; + return decode(typeMappings, input); +}; + +decoders.UserGroupMember = (input?: Record) => { + const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + }; + return decode(typeMappings, input); +}; + +decoders.UserGroupMemberAddedEvent = (input?: Record) => { + const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, + + user: { type: 'UserResponseCommonFields', isSingle: true }, + }; + return decode(typeMappings, input); +}; + +decoders.UserGroupMemberRemovedEvent = (input?: Record) => { + const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, + + user: { type: 'UserResponseCommonFields', isSingle: true }, + }; + return decode(typeMappings, input); +}; + +decoders.UserGroupResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + + updated_at: { type: 'DatetimeType', isSingle: true }, + + members: { type: 'UserGroupMember', isSingle: false }, + }; + return decode(typeMappings, input); +}; + +decoders.UserGroupUpdatedEvent = (input?: Record) => { + const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + + received_at: { type: 'DatetimeType', isSingle: true }, + + user: { type: 'UserResponseCommonFields', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.UserMessagesDeletedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index 57702cb..77f9286 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -130,6 +130,8 @@ export interface AWSRekognitionRule { label: string; min_confidence: number; + + subclassifications?: Record; } export interface AcceptFeedMemberInviteRequest { @@ -547,7 +549,7 @@ export interface ActivityResponse { reaction_count: number; - restrict_replies: string; + restrict_replies: 'everyone' | 'people_i_follow' | 'nobody'; score: number; @@ -595,6 +597,10 @@ export interface ActivityResponse { friend_reaction_count?: number; + is_read?: boolean; + + is_seen?: boolean; + is_watched?: boolean; moderation_action?: string; @@ -662,7 +668,14 @@ export interface ActivitySelectorConfig { } export interface ActivitySelectorConfigResponse { - type: string; + type: + | 'popular' + | 'proximity' + | 'following' + | 'current_feed' + | 'query' + | 'interest' + | 'follow_suggestion'; cutoff_time?: Date; @@ -899,6 +912,18 @@ export interface AddReactionResponse { notification_created?: boolean; } +export interface AddUserGroupMembersRequest { + member_ids: string[]; + + team_id?: string; +} + +export interface AddUserGroupMembersResponse { + duration: string; + + user_group?: UserGroupResponse; +} + export interface AggregatedActivityResponse { activity_count: number; @@ -916,6 +941,10 @@ export interface AggregatedActivityResponse { activities: ActivityResponse[]; + is_read?: boolean; + + is_seen?: boolean; + is_watched?: boolean; } @@ -950,12 +979,16 @@ export interface AppResponseFields { max_aggregated_activities_length: number; + moderation_audio_call_moderation_enabled: boolean; + moderation_enabled: boolean; moderation_llm_configurability_enabled: boolean; moderation_multitenant_blocklist_enabled: boolean; + moderation_video_call_moderation_enabled: boolean; + moderation_webhook_url: string; multi_tenant_enabled: boolean; @@ -1762,6 +1795,22 @@ export interface CallAcceptedEvent { type: string; } +export interface CallActionOptions { + duration?: number; + + flag_reason?: string; + + kick_reason?: string; + + mute_audio?: boolean; + + mute_video?: boolean; + + reason?: string; + + warning_text?: string; +} + export interface CallClosedCaption { end_time: Date; @@ -1818,6 +1867,12 @@ export interface CallCreatedEvent { type: string; } +export interface CallCustomPropertyParameters { + operator?: string; + + property_key?: string; +} + export interface CallDTMFEvent { call_cid: string; @@ -2324,6 +2379,14 @@ export interface CallRtmpBroadcastStoppedEvent { type: string; } +export interface CallRuleActionSequence { + violation_number?: number; + + actions?: string[]; + + call_options?: CallActionOptions; +} + export interface CallSessionEndedEvent { call_cid: string; @@ -2668,6 +2731,10 @@ export interface CallStatsReportReadyEvent { session_id: string; type: string; + + is_trimmed?: boolean; + + participants_overview?: CallStatsParticipant[]; } export interface CallStatsReportSummaryResponse { @@ -2778,6 +2845,10 @@ export interface CallTypeResponse { external_storage?: string; } +export interface CallTypeRuleParameters { + call_type?: string; +} + export interface CallUpdatedEvent { call_cid: string; @@ -2826,6 +2897,12 @@ export interface CallUserMutedEvent { type: string; } +export interface CallViolationCountParameters { + threshold?: number; + + time_window?: string; +} + export interface CallsPerDayReport { count: number; } @@ -3943,6 +4020,14 @@ export interface ClosedCaptionEvent { type: string; } +export interface ClosedCaptionRuleParameters { + threshold?: number; + + harm_labels?: string[]; + + llm_harm_labels?: Record; +} + export interface CollectUserFeedbackRequest { rating: number; @@ -4118,7 +4203,7 @@ export interface CommentResponse { score: number; - status: string; + status: 'active' | 'deleted' | 'removed' | 'hidden' | 'shadow_blocked'; updated_at: Date; @@ -4220,6 +4305,8 @@ export interface ConfigResponse { ai_image_config?: AIImageConfig; + ai_image_subclassifications?: Record; + ai_text_config?: AITextConfig; ai_video_config?: AIVideoConfig; @@ -4596,6 +4683,8 @@ export interface CreateImportRequest { mode: 'insert' | 'upsert'; path: string; + + merge_custom?: boolean; } export interface CreateImportResponse { @@ -4732,6 +4821,24 @@ export interface CreateSIPTrunkResponse { sip_trunk?: SIPTrunkResponse; } +export interface CreateUserGroupRequest { + name: string; + + description?: string; + + id?: string; + + team_id?: string; + + member_ids?: string[]; +} + +export interface CreateUserGroupResponse { + duration: string; + + user_group?: UserGroupResponse; +} + export interface CustomActionRequestPayload { id?: string; @@ -4844,6 +4951,12 @@ export interface DailyMetricStatsResponse { daily: DailyMetricResponse[]; } +export interface DailyValue { + date: string; + + value: number; +} + export interface Data { id: string; } @@ -4925,6 +5038,10 @@ export interface DeleteActivityReactionResponse { } export interface DeleteActivityRequestPayload { + entity_id?: string; + + entity_type?: string; + hard_delete?: boolean; reason?: string; @@ -5001,6 +5118,10 @@ export interface DeleteCommentReactionResponse { } export interface DeleteCommentRequestPayload { + entity_id?: string; + + entity_type?: string; + hard_delete?: boolean; reason?: string; @@ -5059,6 +5180,10 @@ export interface DeleteImportV2TaskResponse { } export interface DeleteMessageRequestPayload { + entity_id?: string; + + entity_type?: string; + hard_delete?: boolean; reason?: string; @@ -5083,6 +5208,10 @@ export interface DeleteModerationTemplateResponse { } export interface DeleteReactionRequestPayload { + entity_id?: string; + + entity_type?: string; + hard_delete?: boolean; reason?: string; @@ -5125,6 +5254,10 @@ export interface DeleteUserRequestPayload { delete_feeds_content?: boolean; + entity_id?: string; + + entity_type?: string; + hard_delete?: boolean; mark_messages_deleted?: boolean; @@ -5749,7 +5882,12 @@ export interface FeedGroupResponse { updated_at: Date; - default_visibility?: string; + default_visibility?: + | 'public' + | 'visible' + | 'followers' + | 'members' + | 'private'; deleted_at?: Date; @@ -5770,6 +5908,22 @@ export interface FeedGroupResponse { stories?: StoriesConfig; } +export interface FeedGroupRestoredEvent { + created_at: Date; + + fid: string; + + group_id: string; + + custom: Record; + + type: string; + + feed_visibility?: string; + + received_at?: Date; +} + export interface FeedInput { description?: string; @@ -5965,7 +6119,7 @@ export interface FeedResponse { deleted_at?: Date; - visibility?: string; + visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private'; filter_tags?: string[]; @@ -6013,7 +6167,7 @@ export interface FeedSuggestionResponse { recommendation_score?: number; - visibility?: string; + visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private'; filter_tags?: string[]; @@ -6743,6 +6897,8 @@ export interface GetCommandResponse { export interface GetCommentRepliesResponse { duration: string; + sort: string; + comments: ThreadedCommentResponse[]; next?: string; @@ -6759,6 +6915,8 @@ export interface GetCommentResponse { export interface GetCommentsResponse { duration: string; + sort: string; + comments: ThreadedCommentResponse[]; next?: string; @@ -7125,6 +7283,12 @@ export interface GetThreadResponse { thread: ThreadStateResponse; } +export interface GetUserGroupResponse { + duration: string; + + user_group?: UserGroupResponse; +} + export interface GoLiveRequest { recording_storage_name?: string; @@ -7342,6 +7506,8 @@ export interface ImportV2TaskItem { } export interface ImportV2TaskSettings { + merge_custom?: boolean; + mode?: string; path?: string; @@ -7361,6 +7527,8 @@ export interface ImportV2TaskSettingsS3 { export interface IndividualRecordSettings { mode: 'available' | 'disabled' | 'auto-on'; + + output_types?: string[]; } export interface IndividualRecordingResponse { @@ -7369,10 +7537,14 @@ export interface IndividualRecordingResponse { export interface IndividualRecordingSettingsRequest { mode: 'available' | 'disabled' | 'auto-on'; + + output_types?: string[]; } export interface IndividualRecordingSettingsResponse { mode: 'available' | 'disabled' | 'auto-on'; + + output_types?: string[]; } export interface IngressAudioEncodingOptions { @@ -7557,6 +7729,14 @@ export interface JoinCallAPIMetrics { latency?: ActiveCallsLatencyStats; } +export interface KeyframeRuleParameters { + min_confidence?: number; + + threshold?: number; + + harm_labels?: string[]; +} + export interface KickUserRequest { user_id: string; @@ -7812,6 +7992,12 @@ export interface ListTranscriptionsResponse { transcriptions: CallTranscription[]; } +export interface ListUserGroupsResponse { + duration: string; + + user_groups: UserGroupResponse[]; +} + export interface LocationResponse { continent_code: string; @@ -7865,7 +8051,31 @@ export interface MarkReadRequest { export interface MarkReadResponse { duration: string; - event?: MessageReadEvent; + event?: MarkReadResponseEvent; +} + +export interface MarkReadResponseEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + type: string; + + channel_last_message_at?: Date; + + last_read_message_id?: string; + + team?: string; + + channel?: ChannelResponse; + + thread?: ThreadResponse; + + user?: UserResponseCommonFields; } export interface MarkReviewedRequestPayload { @@ -8285,24 +8495,32 @@ export interface MessagePaginationParams { } export interface MessageReadEvent { - channel_id: string; + created_at: Date; - channel_type: string; + custom: Record; - cid: string; + type: string; - created_at: Date; + channel_id?: string; - type: string; + channel_member_count?: number; - channel_last_message_at?: Date; + channel_message_count?: number; + + channel_type?: string; + + cid?: string; last_read_message_id?: string; + received_at?: Date; + team?: string; channel?: ChannelResponse; + channel_custom?: Record; + thread?: ThreadResponse; user?: UserResponseCommonFields; @@ -8315,6 +8533,8 @@ export interface MessageRequest { mentioned_channel?: boolean; + mentioned_here?: boolean; + mml?: string; parent_id?: string; @@ -8341,6 +8561,8 @@ export interface MessageRequest { attachments?: Attachment[]; + mentioned_roles?: string[]; + mentioned_users?: string[]; restricted_visibility?: string[]; @@ -8365,6 +8587,8 @@ export interface MessageResponse { mentioned_channel: boolean; + mentioned_here: boolean; + pinned: boolean; reply_count: number; @@ -8419,6 +8643,8 @@ export interface MessageResponse { show_in_channel?: boolean; + mentioned_roles?: string[]; + thread_participants?: UserResponse[]; draft?: DraftResponse; @@ -8545,6 +8771,8 @@ export interface MessageWithChannelResponse { mentioned_channel: boolean; + mentioned_here: boolean; + pinned: boolean; reply_count: number; @@ -8601,6 +8829,8 @@ export interface MessageWithChannelResponse { show_in_channel?: boolean; + mentioned_roles?: string[]; + thread_participants?: UserResponse[]; draft?: DraftResponse; @@ -8634,6 +8864,12 @@ export interface MetricDescriptor { unit?: string; } +export interface MetricStats { + total: number; + + daily?: DailyValue[]; +} + export interface MetricThreshold { level: string; @@ -8854,6 +9090,16 @@ export interface ModerationResponse { toxic: number; } +export interface ModerationRuleInfo { + description: string; + + id: string; + + name: string; + + type: string; +} + export interface ModerationRuleV2Response { created_at: Date; @@ -8873,15 +9119,41 @@ export interface ModerationRuleV2Response { config_keys: string[]; - action: RuleBuilderAction; - cooldown_period?: string; logic?: string; + action_sequences?: CallRuleActionSequence[]; + conditions?: RuleBuilderCondition[]; groups?: RuleBuilderConditionGroup[]; + + action?: RuleBuilderAction; +} + +export interface ModerationRulesTriggeredEvent { + created_at: Date; + + entity_id: string; + + entity_type: string; + + user_id: string; + + triggered_actions: string[]; + + custom: Record; + + rule: ModerationRuleInfo; + + type: string; + + received_at?: Date; + + review_queue_item_id?: string; + + violation_number?: number; } export interface ModerationV2Response { @@ -8895,6 +9167,8 @@ export interface ModerationV2Response { semantic_filter_matched?: string; + blocklists_matched?: string[]; + image_harms?: string[]; text_harms?: string[]; @@ -10885,6 +11159,10 @@ export interface QueryModerationRulesRequest { export interface QueryModerationRulesResponse { duration: string; + closed_caption_labels: string[]; + + keyframe_labels: string[]; + rules: ModerationRuleV2Response[]; default_llm_labels: Record; @@ -11086,6 +11364,26 @@ export interface QuerySegmentsResponse { prev?: string; } +export interface QueryTeamUsageStatsRequest { + end_date?: string; + + limit?: number; + + month?: string; + + next?: string; + + start_date?: string; +} + +export interface QueryTeamUsageStatsResponse { + duration: string; + + teams: TeamUsageStats[]; + + next?: string; +} + export interface QueryThreadsRequest { limit?: number; @@ -11480,6 +11778,10 @@ export interface ReadCollectionsResponse { duration: string; collections: CollectionResponse[]; + + next?: string; + + prev?: string; } export interface ReadReceiptsResponse { @@ -11668,6 +11970,12 @@ export interface ReminderUpdatedEvent { reminder?: ReminderResponseData; } +export interface RemoveUserGroupMembersResponse { + duration: string; + + user_group?: UserGroupResponse; +} + export interface RepliesMeta { depth_truncated: boolean; @@ -11746,6 +12054,14 @@ export interface RestoreActivityResponse { activity: ActivityResponse; } +export interface RestoreFeedGroupRequest {} + +export interface RestoreFeedGroupResponse { + duration: string; + + feed_group: FeedGroupResponse; +} + export interface RestoreUsersRequest { user_ids: string[]; } @@ -11899,7 +12215,7 @@ export interface Role { } export interface RuleBuilderAction { - type: + type?: | 'ban_user' | 'flag_user' | 'flag_content' @@ -11907,10 +12223,21 @@ export interface RuleBuilderAction { | 'shadow_content' | 'bounce_flag_content' | 'bounce_content' - | 'bounce_remove_content'; + | 'bounce_remove_content' + | 'mute_video' + | 'mute_audio' + | 'blur' + | 'call_blur' + | 'end_call' + | 'kick_user' + | 'warning' + | 'call_warning' + | 'webhook_only'; ban_options?: BanOptions; + call_options?: CallActionOptions; + flag_user_options?: FlagUserOptions; } @@ -11919,6 +12246,14 @@ export interface RuleBuilderCondition { type?: string; + call_custom_property_params?: CallCustomPropertyParameters; + + call_type_rule_params?: CallTypeRuleParameters; + + call_violation_count_params?: CallViolationCountParameters; + + closed_caption_rule_params?: ClosedCaptionRuleParameters; + content_count_rule_params?: ContentCountRuleParameters; content_flag_count_rule_params?: FlagCountRuleParameters; @@ -11927,6 +12262,8 @@ export interface RuleBuilderCondition { image_rule_params?: ImageRuleParameters; + keyframe_rule_params?: KeyframeRuleParameters; + text_content_params?: TextContentParameters; text_rule_params?: TextRuleParameters; @@ -11963,17 +12300,19 @@ export interface RuleBuilderConfig { export interface RuleBuilderRule { rule_type: string; - action: RuleBuilderAction; - cooldown_period?: string; id?: string; logic?: string; + action_sequences?: CallRuleActionSequence[]; + conditions?: RuleBuilderCondition[]; groups?: RuleBuilderConditionGroup[]; + + action?: RuleBuilderAction; } export interface S3Request { @@ -12261,6 +12600,8 @@ export interface SearchResultMessage { mentioned_channel: boolean; + mentioned_here: boolean; + pinned: boolean; reply_count: number; @@ -12315,6 +12656,8 @@ export interface SearchResultMessage { show_in_channel?: boolean; + mentioned_roles?: string[]; + thread_participants?: UserResponse[]; channel?: ChannelResponse; @@ -12342,6 +12685,12 @@ export interface SearchResultMessage { shared_location?: SharedLocationResponseData; } +export interface SearchUserGroupsResponse { + duration: string; + + user_groups: UserGroupResponse[]; +} + export interface SearchWarning { warning_code: number; @@ -13002,6 +13351,42 @@ export interface TargetResolution { width: number; } +export interface TeamUsageStats { + team: string; + + concurrent_connections: MetricStats; + + concurrent_users: MetricStats; + + image_moderations_daily: MetricStats; + + messages_daily: MetricStats; + + messages_last_24_hours: MetricStats; + + messages_last_30_days: MetricStats; + + messages_month_to_date: MetricStats; + + messages_total: MetricStats; + + translations_daily: MetricStats; + + users_daily: MetricStats; + + users_engaged_last_30_days: MetricStats; + + users_engaged_month_to_date: MetricStats; + + users_last_24_hours: MetricStats; + + users_last_30_days: MetricStats; + + users_month_to_date: MetricStats; + + users_total: MetricStats; +} + export interface TextContentParameters { contains_url?: boolean; @@ -13167,7 +13552,7 @@ export interface ThreadedCommentResponse { score: number; - status: string; + status: 'active' | 'deleted' | 'removed' | 'hidden' | 'shadow_blocked'; updated_at: Date; @@ -13528,6 +13913,16 @@ export interface UnblockedUserEvent { type: string; } +export interface UndeleteMessageRequest { + undeleted_by: string; +} + +export interface UndeleteMessageResponse { + duration: string; + + message: MessageResponse; +} + export interface UnfollowBatchRequest { follows: FollowPair[]; @@ -13765,6 +14160,8 @@ export interface UpdateAppRequest { migrate_permissions_to_v2?: boolean; + moderation_analytics_enabled?: boolean; + moderation_enabled?: boolean; moderation_webhook_url?: string; @@ -14561,6 +14958,20 @@ export interface UpdateThreadPartialResponse { thread: ThreadResponse; } +export interface UpdateUserGroupRequest { + description?: string; + + name?: string; + + team_id?: string; +} + +export interface UpdateUserGroupResponse { + duration: string; + + user_group?: UserGroupResponse; +} + export interface UpdateUserPartialRequest { id: string; @@ -14718,8 +15129,6 @@ export interface UpsertModerationRuleRequest { rule_type: string; - action: RuleBuilderAction; - cooldown_period?: string; description?: string; @@ -14730,11 +15139,15 @@ export interface UpsertModerationRuleRequest { team?: string; + action_sequences?: CallRuleActionSequence[]; + conditions?: RuleBuilderCondition[]; config_keys?: string[]; groups?: RuleBuilderConditionGroup[]; + + action?: RuleBuilderAction; } export interface UpsertModerationRuleResponse { @@ -14958,6 +15371,130 @@ export interface UserFlaggedEvent { target_user?: UserResponseCommonFields; } +export interface UserGroup { + app_pk: number; + + created_at: Date; + + id: string; + + name: string; + + updated_at: Date; + + created_by?: string; + + description?: string; + + team_id?: string; + + members?: UserGroupMember[]; +} + +export interface UserGroupCreatedEvent { + created_at: Date; + + custom: Record; + + type: string; + + received_at?: Date; + + user?: UserResponseCommonFields; + + user_group?: UserGroup; +} + +export interface UserGroupDeletedEvent { + created_at: Date; + + custom: Record; + + type: string; + + received_at?: Date; + + user?: UserResponseCommonFields; + + user_group?: UserGroup; +} + +export interface UserGroupMember { + app_pk: number; + + created_at: Date; + + group_id: string; + + is_admin: boolean; + + user_id: string; +} + +export interface UserGroupMemberAddedEvent { + created_at: Date; + + members: string[]; + + custom: Record; + + type: string; + + received_at?: Date; + + user?: UserResponseCommonFields; + + user_group?: UserGroup; +} + +export interface UserGroupMemberRemovedEvent { + created_at: Date; + + members: string[]; + + custom: Record; + + type: string; + + received_at?: Date; + + user?: UserResponseCommonFields; + + user_group?: UserGroup; +} + +export interface UserGroupResponse { + created_at: Date; + + id: string; + + name: string; + + updated_at: Date; + + created_by?: string; + + description?: string; + + team_id?: string; + + members?: UserGroupMember[]; +} + +export interface UserGroupUpdatedEvent { + created_at: Date; + + custom: Record; + + type: string; + + received_at?: Date; + + user?: UserResponseCommonFields; + + user_group?: UserGroup; +} + export interface UserIdenticalContentCountParameters { threshold?: number; @@ -15406,67 +15943,7 @@ export interface VoteData { option_id?: string; } -export interface WHIPIngress { - address: string; -} - -export interface WSEvent { - created_at: Date; - - type: string; - - custom: Record; - - automoderation?: boolean; - - channel_id?: string; - - channel_last_message_at?: Date; - - channel_type?: string; - - cid?: string; - - connection_id?: string; - - parent_id?: string; - - reason?: string; - - team?: string; - - thread_id?: string; - - user_id?: string; - - watcher_count?: number; - - automoderation_scores?: ModerationResponse; - - channel?: ChannelResponse; - - created_by?: UserResponse; - - me?: OwnUserResponse; - - member?: ChannelMemberResponse; - - message?: MessageResponse; - - message_update?: MessageUpdate; - - poll?: PollResponseData; - - poll_vote?: PollVoteResponseData; - - reaction?: ReactionResponse; - - thread?: ThreadResponse; - - user?: UserResponse; -} - -export type WebhookEvent = +export type WHEvent = | ({ type: '*' } & CustomEvent) | ({ type: 'appeal.accepted' } & AppealAcceptedEvent) | ({ type: 'appeal.created' } & AppealCreatedEvent) @@ -15594,6 +16071,7 @@ export type WebhookEvent = | ({ type: 'feeds.feed.updated' } & FeedUpdatedEvent) | ({ type: 'feeds.feed_group.changed' } & FeedGroupChangedEvent) | ({ type: 'feeds.feed_group.deleted' } & FeedGroupDeletedEvent) + | ({ type: 'feeds.feed_group.restored' } & FeedGroupRestoredEvent) | ({ type: 'feeds.feed_member.added' } & FeedMemberAddedEvent) | ({ type: 'feeds.feed_member.removed' } & FeedMemberRemovedEvent) | ({ type: 'feeds.feed_member.updated' } & FeedMemberUpdatedEvent) @@ -15621,6 +16099,7 @@ export type WebhookEvent = | ({ type: 'moderation.flagged' } & ModerationFlaggedEvent) | ({ type: 'moderation.mark_reviewed' } & ModerationMarkReviewedEvent) | ({ type: 'moderation_check.completed' } & ModerationCheckCompletedEvent) + | ({ type: 'moderation_rule.triggered' } & ModerationRulesTriggeredEvent) | ({ type: 'notification.mark_unread' } & NotificationMarkUnreadEvent) | ({ type: 'notification.reminder_due' } & ReminderNotificationEvent) | ({ @@ -15645,7 +16124,72 @@ export type WebhookEvent = | ({ type: 'user.unbanned' } & UserUnbannedEvent) | ({ type: 'user.unmuted' } & UserUnmutedEvent) | ({ type: 'user.unread_message_reminder' } & UserUnreadReminderEvent) - | ({ type: 'user.updated' } & UserUpdatedEvent); + | ({ type: 'user.updated' } & UserUpdatedEvent) + | ({ type: 'user_group.created' } & UserGroupCreatedEvent) + | ({ type: 'user_group.deleted' } & UserGroupDeletedEvent) + | ({ type: 'user_group.member_added' } & UserGroupMemberAddedEvent) + | ({ type: 'user_group.member_removed' } & UserGroupMemberRemovedEvent) + | ({ type: 'user_group.updated' } & UserGroupUpdatedEvent); + +export interface WHIPIngress { + address: string; +} + +export interface WSEvent { + created_at: Date; + + type: string; + + custom: Record; + + automoderation?: boolean; + + channel_id?: string; + + channel_last_message_at?: Date; + + channel_type?: string; + + cid?: string; + + connection_id?: string; + + parent_id?: string; + + reason?: string; + + team?: string; + + thread_id?: string; + + user_id?: string; + + watcher_count?: number; + + automoderation_scores?: ModerationResponse; + + channel?: ChannelResponse; + + created_by?: UserResponse; + + me?: OwnUserResponse; + + member?: ChannelMemberResponse; + + message?: MessageResponse; + + message_update?: MessageUpdate; + + poll?: PollResponseData; + + poll_vote?: PollVoteResponseData; + + reaction?: ReactionResponse; + + thread?: ThreadResponse; + + user?: UserResponse; +} export interface WrappedUnreadCountsResponse { duration: string; diff --git a/src/gen/moderation/ModerationApi.ts b/src/gen/moderation/ModerationApi.ts index 5263ccd..8ac2136 100644 --- a/src/gen/moderation/ModerationApi.ts +++ b/src/gen/moderation/ModerationApi.ts @@ -496,15 +496,16 @@ export class ModerationApi { const body = { name: request?.name, rule_type: request?.rule_type, - action: request?.action, cooldown_period: request?.cooldown_period, description: request?.description, enabled: request?.enabled, logic: request?.logic, team: request?.team, + action_sequences: request?.action_sequences, conditions: request?.conditions, config_keys: request?.config_keys, groups: request?.groups, + action: request?.action, }; const response = await this.apiClient.sendRequest<