diff --git a/__tests__/call.test.ts b/__tests__/call.test.ts index c2cdd9a..05e4fac 100644 --- a/__tests__/call.test.ts +++ b/__tests__/call.test.ts @@ -228,7 +228,7 @@ describe('call API', () => { expect(response.call.backstage).toBe(true); }); - describe('transcriptions', () => { + describe.skip('transcriptions', () => { it('start transcribing', async () => { // somewhat dummy test, we should do a proper test in the future where we join a call and start recording await expect(() => call.startTranscription()).rejects.toThrowError( diff --git a/src/gen/common/CommonApi.ts b/src/gen/common/CommonApi.ts index ca42a53..d7885e1 100644 --- a/src/gen/common/CommonApi.ts +++ b/src/gen/common/CommonApi.ts @@ -110,21 +110,18 @@ export class CommonApi extends BaseApi { sqs_key: request?.sqs_key, sqs_secret: request?.sqs_secret, sqs_url: request?.sqs_url, - video_provider: request?.video_provider, webhook_url: request?.webhook_url, allowed_flag_reasons: request?.allowed_flag_reasons, image_moderation_block_labels: request?.image_moderation_block_labels, image_moderation_labels: request?.image_moderation_labels, user_search_disallowed_roles: request?.user_search_disallowed_roles, webhook_events: request?.webhook_events, - agora_options: request?.agora_options, apn_config: request?.apn_config, async_moderation_config: request?.async_moderation_config, datadog_info: request?.datadog_info, file_upload_config: request?.file_upload_config, firebase_config: request?.firebase_config, grants: request?.grants, - hms_options: request?.hms_options, huawei_config: request?.huawei_config, image_upload_config: request?.image_upload_config, push_config: request?.push_config, diff --git a/src/gen/model-decoders/index.ts b/src/gen/model-decoders/index.ts index fd029c4..4c1a14e 100644 --- a/src/gen/model-decoders/index.ts +++ b/src/gen/model-decoders/index.ts @@ -533,9 +533,7 @@ decoders.CreateRoleResponse = (input?: Record) => { decoders.CustomCheckResponse = (input?: Record) => { const typeMappings: TypeMapping = { - scored_at: { type: 'DatetimeType', isSingle: true }, - - reviewed_at: { type: 'DatetimeType', isSingle: true }, + item: { type: 'ReviewQueueItemResponse', isSingle: true }, }; return decode(typeMappings, input); }; diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index caa52b8..f8099dc 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -18,6 +18,14 @@ export interface AITextConfig { async?: boolean; } +export interface AIVideoConfig { + enabled: boolean; + + rules: AWSRekognitionRule[]; + + async?: boolean; +} + export interface APIError { code: number; @@ -166,6 +174,12 @@ export interface AggregatedStats { turn?: TURNAggregatedStats; } +export interface AnyEvent { + created_at: Date; + + type: string; +} + export interface AppResponseFields { async_url_enrich_enabled: boolean; @@ -215,8 +229,6 @@ export interface AppResponseFields { suspended_explanation: string; - video_provider: string; - webhook_url: string; user_search_disallowed_roles: string[]; @@ -247,11 +259,7 @@ export interface AppResponseFields { image_moderation_labels?: string[]; - agora_options?: Config; - datadog_info?: DataDogInfo; - - hms_options?: Config; } export interface AsyncModerationCallbackConfig { @@ -578,6 +586,18 @@ export interface BlockUsersResponse { duration: string; } +export interface BlockedUserEvent { + call_cid: string; + + created_at: Date; + + user: UserResponse; + + type: string; + + blocked_by_user?: UserResponse; +} + export interface BlockedUserResponse { blocked_user_id: string; @@ -616,6 +636,12 @@ export interface BodyguardSeverityRule { severity: 'low' | 'medium' | 'high' | 'critical'; } +export interface Bound { + inclusive: boolean; + + value: number; +} + export interface BroadcastSettings { enabled: boolean; @@ -640,6 +666,96 @@ export interface BroadcastSettingsResponse { rtmp: RTMPSettingsResponse; } +export interface CallAcceptedEvent { + call_cid: string; + + created_at: Date; + + call: CallResponse; + + user: UserResponse; + + type: string; +} + +export interface CallClosedCaption { + end_time: Date; + + speaker_id: string; + + start_time: Date; + + text: string; + + user: UserResponse; +} + +export interface CallClosedCaptionsFailedEvent { + call_cid: string; + + created_at: Date; + + type: string; +} + +export interface CallClosedCaptionsStartedEvent { + call_cid: string; + + created_at: Date; + + type: string; +} + +export interface CallClosedCaptionsStoppedEvent { + call_cid: string; + + created_at: Date; + + type: string; +} + +export interface CallCreatedEvent { + call_cid: string; + + created_at: Date; + + members: MemberResponse[]; + + call: CallResponse; + + type: string; +} + +export interface CallDeletedEvent { + call_cid: string; + + created_at: Date; + + call: CallResponse; + + type: string; +} + +export interface CallDurationReport { + histogram: ReportByHistogramBucket[]; +} + +export interface CallDurationReportResponse { + daily: DailyAggregateCallDurationReportResponse[]; +} + +export interface CallEndedEvent { + call_cid: string; + + created_at: Date; + + call: CallResponse; + + type: string; + + user?: UserResponse; +} + export interface CallEvent { description: string; @@ -662,10 +778,138 @@ export interface CallEvent { issue_tags?: string[]; } +export interface CallHLSBroadcastingFailedEvent { + call_cid: string; + + created_at: Date; + + type: string; +} + +export interface CallHLSBroadcastingStartedEvent { + call_cid: string; + + created_at: Date; + + hls_playlist_url: string; + + type: string; +} + +export interface CallHLSBroadcastingStoppedEvent { + call_cid: string; + + created_at: Date; + + type: string; +} + export interface CallIngressResponse { rtmp: RTMPIngress; } +export interface CallLiveStartedEvent { + call_cid: string; + + created_at: Date; + + call: CallResponse; + + type: string; +} + +export interface CallMemberAddedEvent { + call_cid: string; + + created_at: Date; + + members: MemberResponse[]; + + call: CallResponse; + + type: string; +} + +export interface CallMemberRemovedEvent { + call_cid: string; + + created_at: Date; + + members: string[]; + + call: CallResponse; + + type: string; +} + +export interface CallMemberUpdatedEvent { + call_cid: string; + + created_at: Date; + + members: MemberResponse[]; + + call: CallResponse; + + type: string; +} + +export interface CallMemberUpdatedPermissionEvent { + call_cid: string; + + created_at: Date; + + members: MemberResponse[]; + + call: CallResponse; + + capabilities_by_role: Record; + + type: string; +} + +export interface CallMissedEvent { + call_cid: string; + + created_at: Date; + + notify_user: boolean; + + session_id: string; + + members: MemberResponse[]; + + call: CallResponse; + + user: UserResponse; + + type: string; +} + +export interface CallNotificationEvent { + call_cid: string; + + created_at: Date; + + session_id: string; + + members: MemberResponse[]; + + call: CallResponse; + + user: UserResponse; + + type: string; +} + +export interface CallParticipantCountReport { + histogram: ReportByHistogramBucket[]; +} + +export interface CallParticipantCountReportResponse { + daily: DailyAggregateCallParticipantCountReportResponse[]; +} + export interface CallParticipantResponse { joined_at: Date; @@ -676,6 +920,16 @@ export interface CallParticipantResponse { user: UserResponse; } +export interface CallReactionEvent { + call_cid: string; + + created_at: Date; + + reaction: ReactionResponse; + + type: string; +} + export interface CallRecording { end_time: Date; @@ -686,6 +940,54 @@ export interface CallRecording { url: string; } +export interface CallRecordingFailedEvent { + call_cid: string; + + created_at: Date; + + type: string; +} + +export interface CallRecordingReadyEvent { + call_cid: string; + + created_at: Date; + + call_recording: CallRecording; + + type: string; +} + +export interface CallRecordingStartedEvent { + call_cid: string; + + created_at: Date; + + type: string; +} + +export interface CallRecordingStoppedEvent { + call_cid: string; + + created_at: Date; + + type: string; +} + +export interface CallRejectedEvent { + call_cid: string; + + created_at: Date; + + call: CallResponse; + + user: UserResponse; + + type: string; + + reason?: string; +} + export interface CallRequest { created_by_id?: string; @@ -701,53 +1003,139 @@ export interface CallRequest { custom?: Record; - settings_override?: CallSettingsRequest; + settings_override?: CallSettingsRequest; +} + +export interface CallResponse { + backstage: boolean; + + captioning: boolean; + + cid: string; + + created_at: Date; + + current_session_id: string; + + id: string; + + recording: boolean; + + transcribing: boolean; + + type: string; + + updated_at: Date; + + blocked_user_ids: string[]; + + created_by: UserResponse; + + custom: Record; + + egress: EgressResponse; + + ingress: CallIngressResponse; + + settings: CallSettingsResponse; + + ended_at?: Date; + + join_ahead_time_seconds?: number; + + starts_at?: Date; + + team?: string; + + session?: CallSessionResponse; + + thumbnails?: ThumbnailResponse; +} + +export interface CallRingEvent { + call_cid: string; + + created_at: Date; + + session_id: string; + + video: boolean; + + members: MemberResponse[]; + + call: CallResponse; + + user: UserResponse; + + type: string; +} + +export interface CallRtmpBroadcastFailedEvent { + call_cid: string; + + created_at: Date; + + name: string; + + type: string; } -export interface CallResponse { - backstage: boolean; +export interface CallRtmpBroadcastStartedEvent { + call_cid: string; - captioning: boolean; + created_at: Date; - cid: string; + name: string; + + type: string; +} + +export interface CallRtmpBroadcastStoppedEvent { + call_cid: string; created_at: Date; - current_session_id: string; + name: string; - id: string; + type: string; +} - recording: boolean; +export interface CallSessionEndedEvent { + call_cid: string; - transcribing: boolean; + created_at: Date; - type: string; + session_id: string; - updated_at: Date; + call: CallResponse; - blocked_user_ids: string[]; + type: string; +} - created_by: UserResponse; +export interface CallSessionParticipantJoinedEvent { + call_cid: string; - custom: Record; + created_at: Date; - egress: EgressResponse; + session_id: string; - ingress: CallIngressResponse; + participant: CallParticipantResponse; - settings: CallSettingsResponse; + type: string; +} - ended_at?: Date; +export interface CallSessionParticipantLeftEvent { + call_cid: string; - join_ahead_time_seconds?: number; + created_at: Date; - starts_at?: Date; + duration_seconds: number; - team?: string; + session_id: string; - session?: CallSessionResponse; + participant: CallParticipantResponse; - thumbnails?: ThumbnailResponse; + type: string; } export interface CallSessionResponse { @@ -776,6 +1164,18 @@ export interface CallSessionResponse { timer_ends_at?: Date; } +export interface CallSessionStartedEvent { + call_cid: string; + + created_at: Date; + + session_id: string; + + call: CallResponse; + + type: string; +} + export interface CallSettings { audio?: AudioSettings; @@ -869,6 +1269,8 @@ export interface CallStatsReportSummaryResponse { created_at?: Date; + min_user_rating?: number; + quality_score?: number; } @@ -886,6 +1288,40 @@ export interface CallTranscription { url: string; } +export interface CallTranscriptionFailedEvent { + call_cid: string; + + created_at: Date; + + type: string; +} + +export interface CallTranscriptionReadyEvent { + call_cid: string; + + created_at: Date; + + call_transcription: CallTranscription; + + type: string; +} + +export interface CallTranscriptionStartedEvent { + call_cid: string; + + created_at: Date; + + type: string; +} + +export interface CallTranscriptionStoppedEvent { + call_cid: string; + + created_at: Date; + + type: string; +} + export interface CallType { app_pk: number; @@ -920,6 +1356,38 @@ export interface CallTypeResponse { external_storage?: string; } +export interface CallUpdatedEvent { + call_cid: string; + + created_at: Date; + + call: CallResponse; + + capabilities_by_role: Record; + + type: string; +} + +export interface CallUserMutedEvent { + call_cid: string; + + created_at: Date; + + from_user_id: string; + + muted_user_ids: string[]; + + type: string; +} + +export interface CallsPerDayReport { + count: number; +} + +export interface CallsPerDayReportResponse { + daily: DailyAggregateCallsPerDayReportResponse[]; +} + export interface CampaignChannelTemplate { type: string; @@ -927,9 +1395,21 @@ export interface CampaignChannelTemplate { id?: string; + team?: string; + members?: string[]; } +export interface CampaignCompletedEvent { + created_at: Date; + + type: string; + + received_at?: Date; + + campaign?: CampaignResponse; +} + export interface CampaignMessageTemplate { poll_id: string; @@ -982,6 +1462,16 @@ export interface CampaignResponse { sender?: UserResponse; } +export interface CampaignStartedEvent { + created_at: Date; + + type: string; + + received_at?: Date; + + campaign?: CampaignResponse; +} + export interface CampaignStatsResponse { progress: number; @@ -1172,6 +1662,30 @@ export interface ChannelConfigWithInfo { grants?: Record; } +export interface ChannelCreatedEvent { + created_at: Date; + + type: string; +} + +export interface ChannelDeletedEvent { + channel_id: string; + + channel_member_count: number; + + channel_type: string; + + cid: string; + + created_at: Date; + + type: string; + + team?: string; + + channel?: ChannelResponse; +} + export interface ChannelExport { cid?: string; @@ -1184,6 +1698,18 @@ export interface ChannelExport { type?: string; } +export interface ChannelFrozenEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + type: string; +} + export interface ChannelGetOrCreateRequest { hide_for_creator?: boolean; @@ -1200,6 +1726,26 @@ export interface ChannelGetOrCreateRequest { watchers?: PaginationParams; } +export interface ChannelHiddenEvent { + channel_id: string; + + channel_member_count: number; + + channel_type: string; + + cid: string; + + clear_history: boolean; + + created_at: Date; + + type: string; + + channel?: ChannelResponse; + + user?: User; +} + export interface ChannelInput { auto_translation_enabled?: boolean; @@ -1306,6 +1852,12 @@ export interface ChannelMemberResponse { user?: UserResponse; } +export interface ChannelMessages { + messages: Message[]; + + channel?: ChannelResponse; +} + export interface ChannelMute { created_at: Date; @@ -1318,18 +1870,22 @@ export interface ChannelMute { user?: UserResponse; } +export interface ChannelMutedEvent { + created_at: Date; + + type: string; +} + export const ChannelOwnCapability = { BAN_CHANNEL_MEMBERS: 'ban-channel-members', CAST_POLL_VOTE: 'cast-poll-vote', CONNECT_EVENTS: 'connect-events', CREATE_ATTACHMENT: 'create-attachment', - CREATE_CALL: 'create-call', DELETE_ANY_MESSAGE: 'delete-any-message', DELETE_CHANNEL: 'delete-channel', DELETE_OWN_MESSAGE: 'delete-own-message', FLAG_MESSAGE: 'flag-message', FREEZE_CHANNEL: 'freeze-channel', - JOIN_CALL: 'join-call', JOIN_CHANNEL: 'join-channel', LEAVE_CHANNEL: 'leave-channel', MUTE_CHANNEL: 'mute-channel', @@ -1469,6 +2025,22 @@ export interface ChannelStateResponseFields { membership?: ChannelMember; } +export interface ChannelTruncatedEvent { + channel_id: string; + + channel_member_count: number; + + channel_type: string; + + cid: string; + + created_at: Date; + + type: string; + + channel?: ChannelResponse; +} + export interface ChannelTypeConfig { automod: 'disabled' | 'simple' | 'AI'; @@ -1532,7 +2104,61 @@ export interface ChannelTypeConfig { blocklists?: BlockListOptions[]; - automod_thresholds?: Thresholds; + automod_thresholds?: Thresholds; +} + +export interface ChannelUnFrozenEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + type: string; +} + +export interface ChannelUnmutedEvent { + created_at: Date; + + type: string; +} + +export interface ChannelUpdatedEvent { + channel_id: string; + + channel_member_count: number; + + channel_type: string; + + cid: string; + + created_at: Date; + + type: string; + + team?: string; + + channel?: ChannelResponse; + + message?: Message; + + user?: User; +} + +export interface ChannelVisibleEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + type: string; + + user?: User; } export interface CheckExternalStorageResponse { @@ -1645,6 +2271,16 @@ export interface CheckSQSResponse { data?: Record; } +export interface ClosedCaptionEvent { + call_cid: string; + + created_at: Date; + + closed_caption: CallClosedCaption; + + type: string; +} + export interface CollectUserFeedbackRequest { rating: number; @@ -1679,16 +2315,6 @@ export interface Command { export interface CommitMessageRequest {} -export interface Config { - app_certificate: string; - - app_id: string; - - default_role?: 'attendee' | 'publisher' | 'subscriber' | 'admin'; - - role_map?: Record; -} - export interface ConfigOverrides { commands: string[]; @@ -1720,12 +2346,16 @@ export interface ConfigResponse { key: string; + team: string; + updated_at: Date; ai_image_config?: AIImageConfig; ai_text_config?: AITextConfig; + ai_video_config?: AIVideoConfig; + automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig; automod_semantic_filters_config?: AutomodSemanticFiltersConfig; @@ -2065,18 +2695,24 @@ export interface CustomActionRequest { options?: Record; } -export interface CustomCheckRequest { - entity_creator_id: string; +export interface CustomCheckFlag { + type: string; + + reason?: string; + + labels?: string[]; + custom?: Record; +} + +export interface CustomCheckRequest { entity_id: string; entity_type: string; - name?: string; - - reason?: string; + flags: CustomCheckFlag[]; - recommended_action?: string; + entity_creator_id?: string; user_id?: string; @@ -2090,17 +2726,57 @@ export interface CustomCheckResponse { id: string; - recommended_action: string; + status: string; + + item?: ReviewQueueItemResponse; +} - scored_at: Date; +export interface CustomVideoEvent { + call_cid: string; - status: string; + created_at: Date; - report: any[]; + custom: Record; - moderator_action?: string; + user: UserResponse; - reviewed_at?: Date; + type: string; +} + +export interface DailyAggregateCallDurationReportResponse { + date: string; + + report: CallDurationReport; +} + +export interface DailyAggregateCallParticipantCountReportResponse { + date: string; + + report: CallParticipantCountReport; +} + +export interface DailyAggregateCallsPerDayReportResponse { + date: string; + + report: CallsPerDayReport; +} + +export interface DailyAggregateQualityScoreReportResponse { + date: string; + + report: QualityScoreReport; +} + +export interface DailyAggregateSDKUsageReportResponse { + date: string; + + report: SDKUsageReport; +} + +export interface DailyAggregateUserFeedbackReportResponse { + date: string; + + report: UserFeedbackReport; } export interface Data { @@ -2368,13 +3044,13 @@ export interface EnrichedActivity { actor?: Data; - latest_reactions?: Record>; + latest_reactions?: Record; object?: Data; origin?: Data; - own_reactions?: Record>; + own_reactions?: Record; reaction_counts?: Record; @@ -2400,9 +3076,9 @@ export interface EnrichedReaction { data?: Record; - latest_children?: Record>; + latest_children?: Record; - own_children?: Record>; + own_children?: Record; updated_at?: Time; @@ -2659,6 +3335,36 @@ 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 Flag2 { created_at: Date; @@ -2769,6 +3475,20 @@ export interface FlagResponse { item_id: string; } +export interface FlagUpdatedEvent { + created_at: Date; + + type: string; + + received_at?: Date; + + created_by?: UserResponse; + + message?: MessageResponse; + + user?: UserResponse; +} + export interface FullUserResponse { banned: boolean; @@ -2922,6 +3642,8 @@ export interface GetCallStatsResponse { sfus: SFULocationResponse[]; + average_connection_time?: number; + aggregated?: AggregatedStats; call_timeline?: CallTimeline; @@ -3250,6 +3972,8 @@ export interface GetUserModerationReportResponse { export interface GoLiveRequest { recording_storage_name?: string; + start_closed_caption?: boolean; + start_hls?: boolean; start_recording?: boolean; @@ -3617,6 +4341,40 @@ export interface MediaPubSubHint { video_subscribed: boolean; } +export interface MemberAddedEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + type: string; + + team?: string; + + member?: ChannelMember; + + user?: User; +} + +export interface MemberRemovedEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + type: string; + + member?: ChannelMember; + + user?: User; +} + export interface MemberRequest { user_id: string; @@ -3641,6 +4399,24 @@ export interface MemberResponse { role?: string; } +export interface MemberUpdatedEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + type: string; + + team?: string; + + member?: ChannelMember; + + user?: User; +} + export interface MembersResponse { duration: string; @@ -3755,6 +4531,28 @@ export interface MessageChangeSet { text: boolean; } +export interface MessageDeletedEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + hard_delete: boolean; + + type: string; + + team?: string; + + thread_participants?: User[]; + + message?: Message; + + user?: User; +} + export interface MessageFlagResponse { created_at: Date; @@ -3785,6 +4583,22 @@ export interface MessageFlagResponse { user?: UserResponse; } +export interface MessageFlaggedEvent { + cid: string; + + created_at: Date; + + type: string; + + thread_participants?: User[]; + + flag?: Flag; + + message?: Message; + + user?: User; +} + export interface MessageHistoryEntryResponse { is_deleted: boolean; @@ -3825,6 +4639,28 @@ export interface MessageModerationResult { moderation_thresholds?: Thresholds; } +export interface MessageNewEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + watcher_count: number; + + type: string; + + team?: string; + + thread_participants?: User[]; + + message?: Message; + + user?: User; +} + export interface MessagePaginationParams {} export interface MessageReadEvent { @@ -3946,27 +4782,81 @@ export interface MessageResponse { show_in_channel?: boolean; - thread_participants?: UserResponse[]; + thread_participants?: UserResponse[]; + + i18n?: Record; + + image_labels?: Record; + + moderation?: ModerationV2Response; + + pinned_by?: UserResponse; + + poll?: PollResponseData; + + quoted_message?: MessageResponse; + + reaction_groups?: Record; +} + +export interface MessageUnblockedEvent { + cid: string; + + created_at: Date; + + type: string; + + thread_participants?: User[]; + + message?: Message; + + user?: User; +} + +export interface MessageUndeletedEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + type: string; + + team?: string; + + thread_participants?: User[]; + + message?: Message; + + user?: User; +} + +export interface MessageUpdate { + old_text?: string; + + change_set?: MessageChangeSet; +} - i18n?: Record; +export interface MessageUpdatedEvent { + channel_id: string; - image_labels?: Record; + channel_type: string; - moderation?: ModerationV2Response; + cid: string; - pinned_by?: UserResponse; + created_at: Date; - poll?: PollResponseData; + type: string; - quoted_message?: MessageResponse; + team?: string; - reaction_groups?: Record; -} + thread_participants?: User[]; -export interface MessageUpdate { - old_text?: string; + message?: Message; - change_set?: MessageChangeSet; + user?: User; } export interface MessageWithChannelResponse { @@ -4063,6 +4953,56 @@ export interface ModerationActionConfig { custom: Record; } +export interface ModerationCustomActionEvent { + created_at: Date; + + type: string; + + item?: ReviewQueueItem; + + message?: Message; + + user?: User; +} + +export interface ModerationEvent { + created_at: Date; + + type: string; + + received_at?: Date; + + flags?: Flag2Response[]; + + action?: ActionLogResponse; + + review_queue_item?: ReviewQueueItemResponse; +} + +export interface ModerationFlaggedEvent { + created_at: Date; + + type: string; + + item?: string; + + object_id?: string; + + user?: User; +} + +export interface ModerationMarkReviewedEvent { + created_at: Date; + + type: string; + + item?: ReviewQueueItem; + + message?: Message; + + user?: User; +} + export interface ModerationPayload { images?: string[]; @@ -4191,10 +5131,58 @@ export interface MuteUsersResponse { duration: string; } +export interface NetworkMetricsReportResponse { + average_connection_time?: number; + + average_jitter?: number; + + average_latency?: number; + + average_time_to_reconnect?: number; +} + export interface NoiseCancellationSettings { mode: 'available' | 'disabled' | 'auto-on'; } +export interface NotificationMarkUnreadEvent { + channel_id: string; + + channel_member_count: number; + + channel_type: string; + + cid: string; + + created_at: Date; + + first_unread_message_id: string; + + last_read_at: Date; + + total_unread_count: number; + + unread_channels: number; + + unread_count: number; + + unread_messages: number; + + unread_threads: number; + + type: string; + + last_read_message_id?: string; + + team?: string; + + thread_id?: string; + + channel?: ChannelResponse; + + user?: User; +} + export interface NotificationSettings { enabled: boolean; @@ -4383,6 +5371,12 @@ export interface PendingMessageResponse { user?: UserResponse; } +export interface PerSDKUsageReport { + total: number; + + by_version: Record; +} + export interface Permission { action: string; @@ -4405,6 +5399,18 @@ export interface Permission { condition?: Record; } +export interface PermissionRequestEvent { + call_cid: string; + + created_at: Date; + + permissions: string[]; + + user: UserResponse; + + type: string; +} + export interface PinRequest { session_id: string; @@ -4478,7 +5484,7 @@ export interface Poll { custom: Record; - latest_votes_by_option: Record>; + latest_votes_by_option: Record; vote_counts_by_option: Record; @@ -4566,7 +5572,7 @@ export interface PollResponseData { custom: Record; - latest_votes_by_option: Record>; + latest_votes_by_option: Record; vote_counts_by_option: Record; @@ -4811,6 +5817,40 @@ export interface PushProviderResponse { xiaomi_package_name?: string; } +export interface QualityScoreReport { + histogram: ReportByHistogramBucket[]; +} + +export interface QualityScoreReportResponse { + daily: DailyAggregateQualityScoreReportResponse[]; +} + +export interface QueryAggregateCallStatsRequest { + from?: string; + + to?: string; + + report_types?: string[]; +} + +export interface QueryAggregateCallStatsResponse { + duration: string; + + call_duration_report?: CallDurationReportResponse; + + call_participant_count_report?: CallParticipantCountReportResponse; + + calls_per_day_report?: CallsPerDayReportResponse; + + network_metrics_report?: NetworkMetricsReportResponse; + + quality_score_report?: QualityScoreReportResponse; + + sdk_usage_report?: SDKUsageReportResponse; + + user_feedback_report?: UserFeedbackReportResponse; +} + export interface QueryBannedUsersPayload { filter_conditions: Record; @@ -5172,7 +6212,7 @@ export interface QueryReviewQueueResponse { items: ReviewQueueItemResponse[]; - action_config: Record>; + action_config: Record; stats: Record; @@ -5399,6 +6439,28 @@ export interface Reaction { user?: User; } +export interface ReactionDeletedEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + type: string; + + team?: string; + + thread_participants?: User[]; + + message?: Message; + + reaction?: Reaction; + + user?: User; +} + export interface ReactionGroupResponse { count: number; @@ -5409,6 +6471,28 @@ export interface ReactionGroupResponse { sum_scores: number; } +export interface ReactionNewEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + type: string; + + team?: string; + + thread_participants?: User[]; + + message?: Message; + + reaction?: Reaction; + + user?: User; +} + export interface ReactionRemovalResponse { duration: string; @@ -5451,6 +6535,26 @@ export interface ReactionResponse { user: UserResponse; } +export interface ReactionUpdatedEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + message: Message; + + reaction: Reaction; + + type: string; + + team?: string; + + user?: User; +} + export interface ReactivateUserRequest { created_by_id?: string; @@ -5539,6 +6643,20 @@ export interface RecordSettingsResponse { layout: LayoutSettingsResponse; } +export interface ReportByHistogramBucket { + category: string; + + count: number; + + mean: number; + + sum: number; + + lower_bound?: Bound; + + upper_bound?: Bound; +} + export interface Response { duration: string; } @@ -5550,6 +6668,8 @@ export interface RestoreUsersRequest { } export interface ReviewQueueItem { + bounce_count: number; + content_changed: boolean; created_at: Date; @@ -5695,6 +6815,14 @@ export interface S3Request { s3_secret?: string; } +export interface SDKUsageReport { + per_sdk_usage: Record; +} + +export interface SDKUsageReportResponse { + daily: DailyAggregateSDKUsageReportResponse[]; +} + export interface SFULocationResponse { datacenter: string; @@ -5999,7 +7127,13 @@ export interface StartCampaignResponse { campaign?: CampaignResponse; } -export interface StartClosedCaptionsRequest {} +export interface StartClosedCaptionsRequest { + enable_transcription?: boolean; + + external_storage?: string; + + language?: string; +} export interface StartClosedCaptionsResponse { duration: string; @@ -6030,6 +7164,10 @@ export interface StartRecordingResponse { } export interface StartTranscriptionRequest { + enable_closed_captions?: boolean; + + language?: string; + transcription_external_storage?: string; } @@ -6045,7 +7183,9 @@ export interface StopAllRTMPBroadcastsResponse { export interface StopCampaignRequest {} -export interface StopClosedCaptionsRequest {} +export interface StopClosedCaptionsRequest { + stop_transcription?: boolean; +} export interface StopClosedCaptionsResponse { duration: string; @@ -6058,11 +7198,13 @@ export interface StopHLSBroadcastingResponse { } export interface StopLiveRequest { + continue_closed_caption?: boolean; + continue_hls?: boolean; continue_recording?: boolean; - continue_rtmp_broadcast?: boolean; + continue_rtmp_broadcasts?: boolean; continue_transcription?: boolean; } @@ -6085,7 +7227,9 @@ export interface StopRecordingResponse { duration: string; } -export interface StopTranscriptionRequest {} +export interface StopTranscriptionRequest { + stop_closed_captions?: boolean; +} export interface StopTranscriptionResponse { duration: string; @@ -6251,6 +7395,22 @@ export interface ThreadStateResponse { parent_message?: MessageResponse; } +export interface ThreadUpdatedEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + type: string; + + thread?: ThreadResponse; + + user?: User; +} + export interface Thresholds { explicit?: LabelThresholds; @@ -6286,9 +7446,42 @@ export interface TimeStats { export interface TranscriptionSettings { closed_caption_mode: 'available' | 'disabled' | 'auto-on'; + language: + | 'auto' + | 'en' + | 'fr' + | 'es' + | 'de' + | 'it' + | 'nl' + | 'pt' + | 'pl' + | 'ca' + | 'cs' + | 'da' + | 'el' + | 'fi' + | 'id' + | 'ja' + | 'ru' + | 'sv' + | 'ta' + | 'th' + | 'tr' + | 'hu' + | 'ro' + | 'zh' + | 'ar' + | 'tl' + | 'he' + | 'hi' + | 'hr' + | 'ko' + | 'ms' + | 'no' + | 'uk'; + mode: 'available' | 'disabled' | 'auto-on'; - - languages: string[]; } export interface TranscriptionSettingsRequest { @@ -6296,15 +7489,81 @@ export interface TranscriptionSettingsRequest { closed_caption_mode?: 'available' | 'disabled' | 'auto-on'; - languages?: string[]; + language?: + | 'auto' + | 'en' + | 'fr' + | 'es' + | 'de' + | 'it' + | 'nl' + | 'pt' + | 'pl' + | 'ca' + | 'cs' + | 'da' + | 'el' + | 'fi' + | 'id' + | 'ja' + | 'ru' + | 'sv' + | 'ta' + | 'th' + | 'tr' + | 'hu' + | 'ro' + | 'zh' + | 'ar' + | 'tl' + | 'he' + | 'hi' + | 'hr' + | 'ko' + | 'ms' + | 'no' + | 'uk'; } export interface TranscriptionSettingsResponse { closed_caption_mode: 'available' | 'disabled' | 'auto-on'; - mode: 'available' | 'disabled' | 'auto-on'; + language: + | 'auto' + | 'en' + | 'fr' + | 'es' + | 'de' + | 'it' + | 'nl' + | 'pt' + | 'pl' + | 'ca' + | 'cs' + | 'da' + | 'el' + | 'fi' + | 'id' + | 'ja' + | 'ru' + | 'sv' + | 'ta' + | 'th' + | 'tr' + | 'hu' + | 'ro' + | 'zh' + | 'ar' + | 'tl' + | 'he' + | 'hi' + | 'hr' + | 'ko' + | 'ms' + | 'no' + | 'uk'; - languages: string[]; + mode: 'available' | 'disabled' | 'auto-on'; } export interface TranslateMessageRequest { @@ -6431,6 +7690,16 @@ export interface UnblockUsersResponse { duration: string; } +export interface UnblockedUserEvent { + call_cid: string; + + created_at: Date; + + user: UserResponse; + + type: string; +} + export interface UnmuteChannelRequest { expiration?: number; @@ -6566,8 +7835,6 @@ export interface UpdateAppRequest { sqs_url?: string; - video_provider?: 'agora' | 'hms'; - webhook_url?: string; allowed_flag_reasons?: string[]; @@ -6580,8 +7847,6 @@ export interface UpdateAppRequest { webhook_events?: string[]; - agora_options?: Config; - apn_config?: APNConfig; async_moderation_config?: AsyncModerationConfiguration; @@ -6594,8 +7859,6 @@ export interface UpdateAppRequest { grants?: Record; - hms_options?: Config; - huawei_config?: HuaweiConfig; image_upload_config?: FileUploadConfig; @@ -7043,15 +8306,33 @@ export interface UpdateUsersResponse { users: Record; } +export interface UpdatedCallPermissionsEvent { + call_cid: string; + + created_at: Date; + + own_capabilities: OwnCapability[]; + + user: UserResponse; + + type: string; +} + export interface UpsertConfigRequest { key: string; async?: boolean; + team?: string; + + user_id?: string; + ai_image_config?: AIImageConfig; ai_text_config?: AITextConfig; + ai_video_config?: AIVideoConfig; + automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig; automod_semantic_filters_config?: AutomodSemanticFiltersConfig; @@ -7066,6 +8347,8 @@ export interface UpsertConfigRequest { google_vision_config?: GoogleVisionConfig; + user?: UserRequest; + velocity_filter_config?: VelocityFilterConfig; } @@ -7141,6 +8424,30 @@ export interface User { push_notifications?: PushNotificationSettings; } +export interface UserBannedEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + shadow: boolean; + + created_by: User; + + type: string; + + expiration?: Date; + + reason?: string; + + team?: string; + + user?: User; +} + export interface UserBlock { blocked_by_user_id: string; @@ -7155,6 +8462,90 @@ export interface UserCustomEventRequest { custom?: Record; } +export interface UserDeactivatedEvent { + created_at: Date; + + created_by: User; + + type: string; + + user?: User; +} + +export interface UserDeletedEvent { + created_at: Date; + + delete_conversation_channels: boolean; + + hard_delete: boolean; + + mark_messages_deleted: boolean; + + type: string; + + user?: User; +} + +export interface UserEventPayload { + banned: boolean; + + created_at: Date; + + id: string; + + language: string; + + online: boolean; + + role: string; + + updated_at: Date; + + blocked_user_ids: string[]; + + teams: string[]; + + custom: Record; + + deactivated_at?: Date; + + deleted_at?: Date; + + image?: string; + + invisible?: boolean; + + last_active?: Date; + + name?: string; + + revoke_tokens_issued_before?: Date; + + privacy_settings?: PrivacySettingsResponse; +} + +export interface UserFeedbackReport { + unreported_count: number; + + count_by_rating: Record; +} + +export interface UserFeedbackReportResponse { + daily: DailyAggregateUserFeedbackReportResponse[]; +} + +export interface UserFlaggedEvent { + created_at: Date; + + type: string; + + target_user?: string; + + target_users?: string[]; + + user?: User; +} + export interface UserInfoResponse { id: string; @@ -7191,6 +8582,26 @@ export interface UserMuteResponse { user?: UserResponse; } +export interface UserMutedEvent { + created_at: Date; + + type: string; + + target_user?: string; + + target_users?: string[]; + + user?: User; +} + +export interface UserReactivatedEvent { + created_at: Date; + + type: string; + + user?: User; +} + export interface UserRequest { id: string; @@ -7286,6 +8697,8 @@ export interface UserSessionStats { total_pixels_out: number; + average_connection_time?: number; + browser?: string; browser_version?: string; @@ -7373,6 +8786,56 @@ export interface UserStats { rating?: number; } +export interface UserUnbannedEvent { + channel_id: string; + + channel_type: string; + + cid: string; + + created_at: Date; + + shadow: boolean; + + type: string; + + team?: string; + + user?: User; +} + +export interface UserUnmutedEvent { + created_at: Date; + + type: string; + + target_user?: string; + + target_users?: string[]; + + user?: User; +} + +export interface UserUnreadReminderEvent { + created_at: Date; + + channels: Record; + + type: string; + + user?: User; +} + +export interface UserUpdatedEvent { + created_at: Date; + + user: UserEventPayload; + + type: string; + + received_at?: Date; +} + export interface VelocityFilterConfig { cascading_actions: boolean; @@ -7521,6 +8984,10 @@ export interface WSEvent { user?: UserResponse; } +export interface WebhookEvent { + type: string; +} + export interface WrappedUnreadCountsResponse { duration: string; diff --git a/src/gen/moderation/ModerationApi.ts b/src/gen/moderation/ModerationApi.ts index 616c56b..a81fe90 100644 --- a/src/gen/moderation/ModerationApi.ts +++ b/src/gen/moderation/ModerationApi.ts @@ -100,8 +100,11 @@ export class ModerationApi extends BaseApi { const body = { key: request?.key, async: request?.async, + team: request?.team, + user_id: request?.user_id, ai_image_config: request?.ai_image_config, ai_text_config: request?.ai_text_config, + ai_video_config: request?.ai_video_config, automod_platform_circumvention_config: request?.automod_platform_circumvention_config, automod_semantic_filters_config: request?.automod_semantic_filters_config, @@ -110,6 +113,7 @@ export class ModerationApi extends BaseApi { block_list_config: request?.block_list_config, bodyguard_config: request?.bodyguard_config, google_vision_config: request?.google_vision_config, + user: request?.user, velocity_filter_config: request?.velocity_filter_config, }; @@ -124,14 +128,18 @@ export class ModerationApi extends BaseApi { deleteConfig = async (request: { key: string; + team?: string; }): Promise> => { + const queryParams = { + team: request?.team, + }; const pathParams = { key: request?.key, }; const response = await this.sendRequest< StreamResponse - >('DELETE', '/api/v2/moderation/config/{key}', pathParams, undefined); + >('DELETE', '/api/v2/moderation/config/{key}', pathParams, queryParams); decoders.DeleteModerationConfigResponse?.(response.body); @@ -140,7 +148,11 @@ export class ModerationApi extends BaseApi { getConfig = async (request: { key: string; + team?: string; }): Promise> => { + const queryParams = { + team: request?.team, + }; const pathParams = { key: request?.key, }; @@ -149,7 +161,7 @@ export class ModerationApi extends BaseApi { 'GET', '/api/v2/moderation/config/{key}', pathParams, - undefined, + queryParams, ); decoders.GetConfigResponse?.(response.body); @@ -183,12 +195,10 @@ export class ModerationApi extends BaseApi { request: CustomCheckRequest, ): Promise> => { const body = { - entity_creator_id: request?.entity_creator_id, entity_id: request?.entity_id, entity_type: request?.entity_type, - name: request?.name, - reason: request?.reason, - recommended_action: request?.recommended_action, + flags: request?.flags, + entity_creator_id: request?.entity_creator_id, user_id: request?.user_id, moderation_payload: request?.moderation_payload, user: request?.user, diff --git a/src/gen/video/CallApi.ts b/src/gen/video/CallApi.ts index 6a05d68..0dca434 100644 --- a/src/gen/video/CallApi.ts +++ b/src/gen/video/CallApi.ts @@ -24,6 +24,7 @@ import { PinResponse, SendCallEventRequest, SendCallEventResponse, + StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartHLSBroadcastingResponse, StartRTMPBroadcastsRequest, @@ -33,6 +34,7 @@ import { StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, + StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopHLSBroadcastingResponse, StopLiveRequest, @@ -40,6 +42,7 @@ import { StopRTMPBroadcastsRequest, StopRTMPBroadcastsResponse, StopRecordingResponse, + StopTranscriptionRequest, StopTranscriptionResponse, UnblockUserRequest, UnblockUserResponse, @@ -202,10 +205,14 @@ export class CallApi { return this.videoApi.startHLSBroadcasting({ id: this.id, type: this.type }); }; - startClosedCaptions = (): Promise< - StreamResponse - > => { - return this.videoApi.startClosedCaptions({ id: this.id, type: this.type }); + startClosedCaptions = ( + request?: StartClosedCaptionsRequest, + ): Promise> => { + return this.videoApi.startClosedCaptions({ + id: this.id, + type: this.type, + ...request, + }); }; startRecording = ( @@ -244,10 +251,14 @@ export class CallApi { return this.videoApi.stopHLSBroadcasting({ id: this.id, type: this.type }); }; - stopClosedCaptions = (): Promise< - StreamResponse - > => { - return this.videoApi.stopClosedCaptions({ id: this.id, type: this.type }); + stopClosedCaptions = ( + request?: StopClosedCaptionsRequest, + ): Promise> => { + return this.videoApi.stopClosedCaptions({ + id: this.id, + type: this.type, + ...request, + }); }; stopLive = ( @@ -260,10 +271,14 @@ export class CallApi { return this.videoApi.stopRecording({ id: this.id, type: this.type }); }; - stopTranscription = (): Promise< - StreamResponse - > => { - return this.videoApi.stopTranscription({ id: this.id, type: this.type }); + stopTranscription = ( + request?: StopTranscriptionRequest, + ): Promise> => { + return this.videoApi.stopTranscription({ + id: this.id, + type: this.type, + ...request, + }); }; listTranscriptions = (): Promise< diff --git a/src/gen/video/VideoApi.ts b/src/gen/video/VideoApi.ts index 2e5b05c..414db3a 100644 --- a/src/gen/video/VideoApi.ts +++ b/src/gen/video/VideoApi.ts @@ -27,6 +27,8 @@ import { MuteUsersResponse, PinRequest, PinResponse, + QueryAggregateCallStatsRequest, + QueryAggregateCallStatsResponse, QueryCallMembersRequest, QueryCallMembersResponse, QueryCallStatsRequest, @@ -36,6 +38,7 @@ import { Response, SendCallEventRequest, SendCallEventResponse, + StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartHLSBroadcastingResponse, StartRTMPBroadcastsRequest, @@ -45,6 +48,7 @@ import { StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, + StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopHLSBroadcastingResponse, StopLiveRequest, @@ -52,6 +56,7 @@ import { StopRTMPBroadcastsRequest, StopRTMPBroadcastsResponse, StopRecordingResponse, + StopTranscriptionRequest, StopTranscriptionResponse, UnblockUserRequest, UnblockUserResponse, @@ -313,6 +318,7 @@ export class VideoApi extends BaseApi { }; const body = { recording_storage_name: request?.recording_storage_name, + start_closed_caption: request?.start_closed_caption, start_hls: request?.start_hls, start_recording: request?.start_recording, start_rtmp_broadcasts: request?.start_rtmp_broadcasts, @@ -561,14 +567,18 @@ export class VideoApi extends BaseApi { return { ...response.body, metadata: response.metadata }; }; - startClosedCaptions = async (request: { - type: string; - id: string; - }): Promise> => { + startClosedCaptions = async ( + request: StartClosedCaptionsRequest & { type: string; id: string }, + ): Promise> => { const pathParams = { type: request?.type, id: request?.id, }; + const body = { + enable_transcription: request?.enable_transcription, + external_storage: request?.external_storage, + language: request?.language, + }; const response = await this.sendRequest< StreamResponse @@ -577,6 +587,7 @@ export class VideoApi extends BaseApi { '/api/v2/video/call/{type}/{id}/start_closed_captions', pathParams, undefined, + body, ); decoders.StartClosedCaptionsResponse?.(response.body); @@ -618,6 +629,8 @@ export class VideoApi extends BaseApi { id: request?.id, }; const body = { + enable_closed_captions: request?.enable_closed_captions, + language: request?.language, transcription_external_storage: request?.transcription_external_storage, }; @@ -684,14 +697,16 @@ export class VideoApi extends BaseApi { return { ...response.body, metadata: response.metadata }; }; - stopClosedCaptions = async (request: { - type: string; - id: string; - }): Promise> => { + stopClosedCaptions = async ( + request: StopClosedCaptionsRequest & { type: string; id: string }, + ): Promise> => { const pathParams = { type: request?.type, id: request?.id, }; + const body = { + stop_transcription: request?.stop_transcription, + }; const response = await this.sendRequest< StreamResponse @@ -700,6 +715,7 @@ export class VideoApi extends BaseApi { '/api/v2/video/call/{type}/{id}/stop_closed_captions', pathParams, undefined, + body, ); decoders.StopClosedCaptionsResponse?.(response.body); @@ -715,9 +731,10 @@ export class VideoApi extends BaseApi { id: request?.id, }; const body = { + continue_closed_caption: request?.continue_closed_caption, continue_hls: request?.continue_hls, continue_recording: request?.continue_recording, - continue_rtmp_broadcast: request?.continue_rtmp_broadcast, + continue_rtmp_broadcasts: request?.continue_rtmp_broadcasts, continue_transcription: request?.continue_transcription, }; @@ -757,14 +774,16 @@ export class VideoApi extends BaseApi { return { ...response.body, metadata: response.metadata }; }; - stopTranscription = async (request: { - type: string; - id: string; - }): Promise> => { + stopTranscription = async ( + request: StopTranscriptionRequest & { type: string; id: string }, + ): Promise> => { const pathParams = { type: request?.type, id: request?.id, }; + const body = { + stop_closed_captions: request?.stop_closed_captions, + }; const response = await this.sendRequest< StreamResponse @@ -773,6 +792,7 @@ export class VideoApi extends BaseApi { '/api/v2/video/call/{type}/{id}/stop_transcription', pathParams, undefined, + body, ); decoders.StopTranscriptionResponse?.(response.body); @@ -1059,4 +1079,22 @@ export class VideoApi extends BaseApi { return { ...response.body, metadata: response.metadata }; }; + + queryAggregateCallStats = async ( + request?: QueryAggregateCallStatsRequest, + ): Promise> => { + const body = { + from: request?.from, + to: request?.to, + report_types: request?.report_types, + }; + + const response = await this.sendRequest< + StreamResponse + >('POST', '/api/v2/video/stats', undefined, undefined, body); + + decoders.QueryAggregateCallStatsResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + }; }