From 06d457c3a313bf5365ff5b3b65e4db8227a89549 Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Mon, 1 Sep 2025 14:16:33 +0200 Subject: [PATCH] Update to api spec v191.7.0 --- src/gen/chat/ChatApi.ts | 4 +- src/gen/common/CommonApi.ts | 4 +- src/gen/feeds/FeedsApi.ts | 9 + src/gen/model-decoders/decoders.ts | 74 ++-- src/gen/models/index.ts | 565 ++++++++++++++++++++-------- src/gen/moderation/ModerationApi.ts | 100 ++++- src/gen/video/CallApi.ts | 18 +- src/gen/video/VideoApi.ts | 47 ++- 8 files changed, 612 insertions(+), 209 deletions(-) diff --git a/src/gen/chat/ChatApi.ts b/src/gen/chat/ChatApi.ts index 7fcfe60..cd9cdca 100644 --- a/src/gen/chat/ChatApi.ts +++ b/src/gen/chat/ChatApi.ts @@ -67,10 +67,10 @@ import { QueryReactionsResponse, QueryRemindersRequest, QueryRemindersResponse, - QuerySegmentsRequest, - QuerySegmentsResponse, QuerySegmentTargetsRequest, QuerySegmentTargetsResponse, + QuerySegmentsRequest, + QuerySegmentsResponse, QueryThreadsRequest, QueryThreadsResponse, ReminderResponseData, diff --git a/src/gen/common/CommonApi.ts b/src/gen/common/CommonApi.ts index e0d532c..15ecb35 100644 --- a/src/gen/common/CommonApi.ts +++ b/src/gen/common/CommonApi.ts @@ -37,8 +37,8 @@ import { FileUploadRequest, FileUploadResponse, GetApplicationResponse, - GetBlockedUsersResponse, GetBlockListResponse, + GetBlockedUsersResponse, GetCustomPermissionResponse, GetImportResponse, GetOGResponse, @@ -56,9 +56,9 @@ import { PollOptionResponse, PollResponse, PollVotesResponse, + QueryPollVotesRequest, QueryPollsRequest, QueryPollsResponse, - QueryPollVotesRequest, QueryUsersPayload, QueryUsersResponse, ReactivateUserRequest, diff --git a/src/gen/feeds/FeedsApi.ts b/src/gen/feeds/FeedsApi.ts index 49aaa53..62dd4ca 100644 --- a/src/gen/feeds/FeedsApi.ts +++ b/src/gen/feeds/FeedsApi.ts @@ -424,6 +424,7 @@ export class FeedsApi { const body = { type: request?.type, create_notification_activity: request?.create_notification_activity, + skip_push: request?.skip_push, user_id: request?.user_id, custom: request?.custom, user: request?.user, @@ -746,6 +747,7 @@ export class FeedsApi { object_type: request?.object_type, create_notification_activity: request?.create_notification_activity, parent_id: request?.parent_id, + skip_push: request?.skip_push, user_id: request?.user_id, attachments: request?.attachments, mentioned_user_ids: request?.mentioned_user_ids, @@ -863,6 +865,7 @@ export class FeedsApi { }; const body = { comment: request?.comment, + skip_push: request?.skip_push, custom: request?.custom, }; @@ -891,6 +894,7 @@ export class FeedsApi { const body = { type: request?.type, create_notification_activity: request?.create_notification_activity, + skip_push: request?.skip_push, user_id: request?.user_id, custom: request?.custom, user: request?.user, @@ -1020,6 +1024,7 @@ export class FeedsApi { aggregation: request?.aggregation, custom: request?.custom, notification: request?.notification, + push_notification: request?.push_notification, ranking: request?.ranking, }; @@ -1437,6 +1442,7 @@ export class FeedsApi { aggregation: request?.aggregation, custom: request?.custom, notification: request?.notification, + push_notification: request?.push_notification, ranking: request?.ranking, }; @@ -1468,6 +1474,7 @@ export class FeedsApi { aggregation: request?.aggregation, custom: request?.custom, notification: request?.notification, + push_notification: request?.push_notification, ranking: request?.ranking, }; @@ -1674,6 +1681,7 @@ export class FeedsApi { create_notification_activity: request?.create_notification_activity, follower_role: request?.follower_role, push_preference: request?.push_preference, + skip_push: request?.skip_push, custom: request?.custom, }; @@ -1701,6 +1709,7 @@ export class FeedsApi { target: request?.target, create_notification_activity: request?.create_notification_activity, push_preference: request?.push_preference, + skip_push: request?.skip_push, custom: request?.custom, }; diff --git a/src/gen/model-decoders/decoders.ts b/src/gen/model-decoders/decoders.ts index 26d95ec..c6467c7 100644 --- a/src/gen/model-decoders/decoders.ts +++ b/src/gen/model-decoders/decoders.ts @@ -1239,29 +1239,6 @@ decoders.ChannelMember = (input?: Record) => { return decode(typeMappings, input); }; -decoders.ChannelMemberResponse = (input?: Record) => { - const typeMappings: TypeMapping = { - created_at: { type: 'DatetimeType', isSingle: true }, - - updated_at: { type: 'DatetimeType', isSingle: true }, - - archived_at: { type: 'DatetimeType', isSingle: true }, - - ban_expires: { type: 'DatetimeType', isSingle: true }, - - deleted_at: { type: 'DatetimeType', isSingle: true }, - - invite_accepted_at: { type: 'DatetimeType', isSingle: true }, - - invite_rejected_at: { type: 'DatetimeType', isSingle: true }, - - pinned_at: { type: 'DatetimeType', isSingle: true }, - - user: { type: 'UserResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - decoders.ChannelMute = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, @@ -1476,6 +1453,8 @@ decoders.CommentAddedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, + activity: { type: 'ActivityResponse', isSingle: true }, + comment: { type: 'CommentResponse', isSingle: true }, received_at: { type: 'DatetimeType', isSingle: true }, @@ -1502,6 +1481,8 @@ decoders.CommentReactionAddedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, + activity: { type: 'ActivityResponse', isSingle: true }, + comment: { type: 'CommentResponse', isSingle: true }, reaction: { type: 'FeedsReactionResponse', isSingle: true }, @@ -1530,6 +1511,8 @@ decoders.CommentReactionUpdatedEvent = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, + activity: { type: 'ActivityResponse', isSingle: true }, + comment: { type: 'CommentResponse', isSingle: true }, reaction: { type: 'FeedsReactionResponse', isSingle: true }, @@ -2277,6 +2260,13 @@ decoders.GetMessageResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.GetModerationRuleResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + rule: { type: 'ModerationRuleV2Response', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.GetOrCreateCallResponse = (input?: Record) => { const typeMappings: TypeMapping = { members: { type: 'MemberResponse', isSingle: false }, @@ -2592,6 +2582,8 @@ decoders.Message = (input?: Record) => { thread_participants: { type: 'User', isSingle: false }, + member: { type: 'ChannelMember', isSingle: true }, + pinned_by: { type: 'User', isSingle: true }, poll: { type: 'Poll', isSingle: true }, @@ -2871,6 +2863,10 @@ decoders.ModerationCustomActionEvent = (input?: Record) => { decoders.ModerationFlagResponse = (input?: Record) => { const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + + updated_at: { type: 'DatetimeType', isSingle: true }, + review_queue_item: { type: 'ReviewQueueItemResponse', isSingle: true }, user: { type: 'UserResponse', isSingle: true }, @@ -2898,6 +2894,15 @@ decoders.ModerationMarkReviewedEvent = (input?: Record) => { return decode(typeMappings, input); }; +decoders.ModerationRuleV2Response = (input?: Record) => { + const typeMappings: TypeMapping = { + created_at: { type: 'DatetimeType', isSingle: true }, + + updated_at: { type: 'DatetimeType', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.MuteChannelResponse = (input?: Record) => { const typeMappings: TypeMapping = { channel_mutes: { type: 'ChannelMute', isSingle: false }, @@ -3376,6 +3381,13 @@ decoders.QueryModerationLogsResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.QueryModerationRulesResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + rules: { type: 'ModerationRuleV2Response', isSingle: false }, + }; + return decode(typeMappings, input); +}; + decoders.QueryPollsResponse = (input?: Record) => { const typeMappings: TypeMapping = { polls: { type: 'PollResponseData', isSingle: false }, @@ -4066,8 +4078,6 @@ decoders.UpdateCallTypeResponse = (input?: Record) => { decoders.UpdateChannelPartialResponse = (input?: Record) => { const typeMappings: TypeMapping = { - members: { type: 'ChannelMemberResponse', isSingle: false }, - channel: { type: 'ChannelResponse', isSingle: true }, }; return decode(typeMappings, input); @@ -4144,13 +4154,6 @@ decoders.UpdateFollowResponse = (input?: Record) => { return decode(typeMappings, input); }; -decoders.UpdateMemberPartialResponse = (input?: Record) => { - const typeMappings: TypeMapping = { - channel_member: { type: 'ChannelMemberResponse', isSingle: true }, - }; - return decode(typeMappings, input); -}; - decoders.UpdateMembershipLevelResponse = (input?: Record) => { const typeMappings: TypeMapping = { membership_level: { type: 'MembershipLevelResponse', isSingle: true }, @@ -4216,6 +4219,13 @@ decoders.UpsertConfigResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.UpsertModerationRuleResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + rule: { type: 'ModerationRuleV2Response', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.UpsertModerationTemplateResponse = (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 4f0243c..fd07a98 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -1,31 +1,31 @@ export interface AIImageConfig { - enabled: boolean; + async?: boolean; - ocr_rules: OCRRule[]; + enabled?: boolean; - rules: AWSRekognitionRule[]; + ocr_rules?: OCRRule[]; - async?: boolean; + rules?: AWSRekognitionRule[]; } export interface AITextConfig { - enabled: boolean; + async?: boolean; - profile: string; + enabled?: boolean; - rules: BodyguardRule[]; + profile?: string; - severity_rules: BodyguardSeverityRule[]; + rules?: BodyguardRule[]; - async?: boolean; + severity_rules?: BodyguardSeverityRule[]; } export interface AIVideoConfig { - enabled: boolean; + async?: boolean; - rules: AWSRekognitionRule[]; + enabled?: boolean; - async?: boolean; + rules?: AWSRekognitionRule[]; } export interface APIError { @@ -203,19 +203,19 @@ export interface ActionLogResponse { } export interface ActionSequence { - action: string; + action?: string; - blur: boolean; + blur?: boolean; - cooldown_period: number; + cooldown_period?: number; - threshold: number; + threshold?: number; - time_window: number; + time_window?: number; - warning: boolean; + warning?: boolean; - warning_text: string; + warning_text?: string; } export interface ActiveCallsBitrateStats { @@ -707,6 +707,8 @@ export interface AddCommentReactionRequest { create_notification_activity?: boolean; + skip_push?: boolean; + user_id?: string; custom?: Record; @@ -733,6 +735,8 @@ export interface AddCommentRequest { parent_id?: string; + skip_push?: boolean; + user_id?: string; attachments?: Attachment[]; @@ -771,6 +775,8 @@ export interface AddReactionRequest { create_notification_activity?: boolean; + skip_push?: boolean; + user_id?: string; custom?: Record; @@ -1119,11 +1125,11 @@ export interface AutomodDetails { } export interface AutomodPlatformCircumventionConfig { - enabled: boolean; + async?: boolean; - rules: AutomodRule[]; + enabled?: boolean; - async?: boolean; + rules?: AutomodRule[]; } export interface AutomodRule { @@ -1141,11 +1147,11 @@ export interface AutomodRule { } export interface AutomodSemanticFiltersConfig { - enabled: boolean; + async?: boolean; - rules: AutomodSemanticFiltersRule[]; + enabled?: boolean; - async?: boolean; + rules?: AutomodSemanticFiltersRule[]; } export interface AutomodSemanticFiltersRule { @@ -1157,11 +1163,11 @@ export interface AutomodSemanticFiltersRule { } export interface AutomodToxicityConfig { - enabled: boolean; + async?: boolean; - rules: AutomodRule[]; + enabled?: boolean; - async?: boolean; + rules?: AutomodRule[]; } export interface AzureRequest { @@ -1223,13 +1229,13 @@ export interface BanActionRequest { } export interface BanOptions { - duration: number; + duration?: number; - ip_ban: boolean; + ip_ban?: boolean; - reason: string; + reason?: string; - shadow_ban: boolean; + shadow_ban?: boolean; } export interface BanRequest { @@ -1269,15 +1275,15 @@ export interface BanResponse { } export interface BlockContentOptions { - reason: string; + reason?: string; } export interface BlockListConfig { - enabled: boolean; + async?: boolean; - rules: BlockListRule[]; + enabled?: boolean; - async?: boolean; + rules?: BlockListRule[]; } export interface BlockListOptions { @@ -1312,9 +1318,9 @@ export interface BlockListRule { | 'bounce_flag' | 'bounce_remove'; - name: string; + name?: string; - team: string; + team?: string; } export interface BlockUserRequest { @@ -1367,8 +1373,14 @@ export interface BlockedUserResponse { user: UserResponse; } +export interface BodyguardImageAnalysisConfig { + rules?: BodyguardRule[]; +} + export interface BodyguardRule { - action: + label: string; + + action?: | 'flag' | 'shadow' | 'remove' @@ -1376,9 +1388,7 @@ export interface BodyguardRule { | 'bounce_flag' | 'bounce_remove'; - label: string; - - severity_rules: BodyguardSeverityRule[]; + severity_rules?: BodyguardSeverityRule[]; } export interface BodyguardSeverityRule { @@ -1614,13 +1624,21 @@ export interface CallAcceptedEvent { export interface CallClosedCaption { end_time: Date; + id: string; + + language: string; + speaker_id: string; start_time: Date; text: string; + translated: boolean; + user: UserResponse; + + service?: string; } export interface CallClosedCaptionsFailedEvent { @@ -2754,6 +2772,8 @@ export interface Channel { member_count?: number; + message_count?: number; + message_count_updated_at?: Date; team?: string; @@ -3064,43 +3084,7 @@ export interface ChannelMember { } export interface ChannelMemberResponse { - banned: boolean; - channel_role: string; - - 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; - - user?: UserResponse; } export interface ChannelMessages { @@ -3500,20 +3484,22 @@ export interface CheckPushResponse { } export interface CheckRequest { - config_key: string; - entity_creator_id: string; entity_id: string; entity_type: string; + config_key?: string; + config_team?: string; test_mode?: boolean; user_id?: string; + config?: ModerationConfig; + moderation_payload?: ModerationPayload; options?: Record; @@ -3624,6 +3610,8 @@ export interface CommentAddedEvent { fid: string; + activity: ActivityResponse; + comment: CommentResponse; custom: Record; @@ -3660,6 +3648,8 @@ export interface CommentReactionAddedEvent { fid: string; + activity: ActivityResponse; + comment: CommentResponse; custom: Record; @@ -3698,6 +3688,8 @@ export interface CommentReactionUpdatedEvent { fid: string; + activity: ActivityResponse; + comment: CommentResponse; custom: Record; @@ -3846,17 +3838,15 @@ export interface ConfigResponse { llm_config?: LLMConfig; - rule_builder_config?: RuleBuilderConfig; - velocity_filter_config?: VelocityFilterConfig; video_call_rule_config?: VideoCallRuleConfig; } export interface ContentCountRuleParameters { - threshold: number; + threshold?: number; - time_window: string; + time_window?: string; } export interface CountByMinuteResponse { @@ -4115,6 +4105,8 @@ export interface CreateFeedGroupRequest { notification?: NotificationConfig; + push_notification?: PushNotificationConfig; + ranking?: RankingConfig; } @@ -4548,6 +4540,10 @@ export interface DeleteModerationConfigResponse { duration: string; } +export interface DeleteModerationRuleResponse { + duration: string; +} + export interface DeleteModerationTemplateResponse { duration: string; } @@ -4951,6 +4947,8 @@ export interface EventHook { id?: string; + product?: string; + sns_auth_type?: string; sns_key?: string; @@ -5165,6 +5163,8 @@ export interface FeedGroup { notification?: NotificationConfig; + push_notification?: PushNotificationConfig; + ranking?: RankingConfig; stories?: StoriesConfig; @@ -5223,6 +5223,8 @@ export interface FeedGroupResponse { notification?: NotificationConfig; + push_notification?: PushNotificationConfig; + ranking?: RankingConfig; stories?: StoriesConfig; @@ -5453,6 +5455,26 @@ export interface FeedViewResponse { ranking?: RankingConfig; } +export interface FeedsEventPreferences { + comments?: string; + + mentions?: string; + + new_followers?: string; + + reactions?: string; +} + +export interface FeedsEventPreferencesInput { + comments?: 'all' | 'none'; + + mentions?: 'all' | 'none'; + + new_followers?: 'all' | 'none'; + + reactions?: 'all' | 'none'; +} + export interface FeedsModerationTemplateConfig { config_key: string; @@ -5540,35 +5562,39 @@ export interface FirebaseConfigFields { export interface Flag { created_at: Date; - created_by_automod: boolean; + entity_id: string; + + entity_type: string; updated_at: Date; - approved_at?: Date; + result: Array>; - reason?: string; + entity_creator_id?: string; - rejected_at?: Date; + is_streamed_content?: boolean; - reviewed_at?: Date; + moderation_payload_hash?: string; - reviewed_by?: string; + reason?: string; - target_message_id?: string; + review_queue_item_id?: string; - custom?: Record; + type?: string; - details?: FlagDetails; + labels?: string[]; - target_message?: Message; + custom?: Record; - target_user?: User; + moderation_payload?: ModerationPayload; + + review_queue_item?: ReviewQueueItem; user?: User; } export interface FlagContentOptions { - reason: string; + reason?: string; } export interface FlagDetails { @@ -5638,7 +5664,7 @@ export interface FlagUpdatedEvent { } export interface FlagUserOptions { - reason: string; + reason?: string; } export interface FollowBatchRequest { @@ -5698,6 +5724,8 @@ export interface FollowRequest { push_preference?: 'all' | 'none'; + skip_push?: boolean; + custom?: Record; } @@ -6123,6 +6151,12 @@ export interface GetMessageResponse { pending_message_metadata?: Record; } +export interface GetModerationRuleResponse { + duration: string; + + rule?: ModerationRuleV2Response; +} + export interface GetOGResponse { duration: string; @@ -6213,6 +6247,8 @@ export interface GetOrCreateFeedGroupRequest { notification?: NotificationConfig; + push_notification?: PushNotificationConfig; + ranking?: RankingConfig; } @@ -6447,9 +6483,9 @@ export interface HLSSettingsResponse { } export interface HarmConfig { - severity: number; + severity?: number; - action_sequences: ActionSequence[]; + action_sequences?: ActionSequence[]; } export interface HideChannelRequest { @@ -6497,9 +6533,9 @@ export interface ImageData { } export interface ImageRuleParameters { - threshold: number; + threshold?: number; - time_window: string; + time_window?: string; harm_labels?: string[]; } @@ -6705,17 +6741,23 @@ export interface KickedUserEvent { } export interface LLMConfig { - enabled: boolean; - - rules: LLMRule[]; + app_context?: string; async?: boolean; + enabled?: boolean; + + rules?: LLMRule[]; + severity_descriptions?: Record; } export interface LLMRule { - action: + description: string; + + label: string; + + action?: | 'flag' | 'shadow' | 'remove' @@ -6724,11 +6766,7 @@ export interface LLMRule { | 'bounce_remove' | 'keep'; - description: string; - - label: string; - - severity_rules: BodyguardSeverityRule[]; + severity_rules?: BodyguardSeverityRule[]; } export interface Label { @@ -7136,6 +7174,8 @@ export interface Message { image_labels?: Record; + member?: ChannelMember; + moderation?: ModerationV2Response; pinned_by?: User; @@ -7192,6 +7232,8 @@ export interface MessageDeletedEvent { type: string; + deleted_for_me?: boolean; + team?: string; thread_participants?: User[]; @@ -7474,6 +7516,8 @@ export interface MessageResponse { image_labels?: Record; + member?: ChannelMemberResponse; + moderation?: ModerationV2Response; pinned_by?: UserResponse; @@ -7628,6 +7672,8 @@ export interface MessageWithChannelResponse { image_labels?: Record; + member?: ChannelMemberResponse; + moderation?: ModerationV2Response; pinned_by?: UserResponse; @@ -7675,6 +7721,42 @@ export interface ModerationCheckCompletedEvent { received_at?: Date; } +export interface ModerationConfig { + async?: boolean; + + created_at?: Date; + + key?: string; + + team?: string; + + updated_at?: Date; + + ai_image_config?: AIImageConfig; + + ai_image_lite_config?: BodyguardImageAnalysisConfig; + + ai_text_config?: AITextConfig; + + ai_video_config?: AIVideoConfig; + + automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig; + + automod_semantic_filters_config?: AutomodSemanticFiltersConfig; + + automod_toxicity_config?: AutomodToxicityConfig; + + block_list_config?: BlockListConfig; + + google_vision_config?: GoogleVisionConfig; + + llm_config?: LLMConfig; + + velocity_filter_config?: VelocityFilterConfig; + + video_call_rule_config?: VideoCallRuleConfig; +} + export interface ModerationCustomActionEvent { created_at: Date; @@ -7694,7 +7776,7 @@ export interface ModerationDashboardPreferences { } export interface ModerationFlagResponse { - created_at: string; + created_at: Date; entity_id: string; @@ -7702,7 +7784,7 @@ export interface ModerationFlagResponse { type: string; - updated_at: string; + updated_at: Date; user_id: string; @@ -7769,6 +7851,36 @@ export interface ModerationResponse { toxic: number; } +export interface ModerationRuleV2Response { + created_at: Date; + + description: string; + + enabled: boolean; + + id: string; + + name: string; + + rule_type: string; + + team: string; + + updated_at: Date; + + config_keys: string[]; + + action: RuleBuilderAction; + + cooldown_period?: string; + + logic?: string; + + conditions?: RuleBuilderCondition[]; + + groups?: RuleBuilderConditionGroup[]; +} + export interface ModerationV2Response { action: string; @@ -7988,6 +8100,7 @@ export const OwnCapability = { 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', @@ -8564,6 +8677,12 @@ export interface PushConfig { offline_only?: boolean; } +export interface PushNotificationConfig { + enabled?: boolean; + + activity_types?: 'follow' | 'comment' | 'reaction' | 'comment_reaction'; +} + export interface PushNotificationFields { offline_only: boolean; @@ -8595,9 +8714,13 @@ export interface PushPreferenceInput { disabled_until?: Date; + feeds_level?: 'all' | 'none' | 'default'; + remove_disable?: boolean; user_id?: string; + + feeds_events?: FeedsEventPreferencesInput; } export interface PushPreferences { @@ -8606,6 +8729,10 @@ export interface PushPreferences { chat_level?: string; disabled_until?: Date; + + feeds_level?: string; + + feeds_events?: FeedsEventPreferences; } export interface PushProvider { @@ -8731,7 +8858,13 @@ export interface PushTemplate { | 'message.new' | 'message.updated' | 'reaction.new' - | 'notification.reminder_due'; + | 'notification.reminder_due' + | 'feeds.activity.added' + | 'feeds.comment.added' + | 'feeds.activity.reaction.added' + | 'feeds.comment.reaction.added' + | 'feeds.follow.created' + | 'feeds.notification_feed.updated'; updated_at: Date; @@ -9348,6 +9481,34 @@ export interface QueryModerationLogsResponse { prev?: string; } +export interface QueryModerationRulesRequest { + limit?: number; + + next?: string; + + prev?: string; + + user_id?: string; + + sort?: SortParamRequest[]; + + filter?: Record; + + user?: UserRequest; +} + +export interface QueryModerationRulesResponse { + duration: string; + + rules: ModerationRuleV2Response[]; + + default_llm_labels: Record; + + next?: string; + + prev?: string; +} + export interface QueryPollVotesRequest { limit?: number; @@ -10281,7 +10442,7 @@ export interface Role { } export interface RuleBuilderAction { - type: string; + type?: string; ban_options?: BanOptions; @@ -10293,10 +10454,10 @@ export interface RuleBuilderAction { } export interface RuleBuilderCondition { - type: string; - confidence?: number; + type?: string; + content_count_rule_params?: ContentCountRuleParameters; image_content_params?: ImageContentParameters; @@ -10309,6 +10470,8 @@ export interface RuleBuilderCondition { user_created_within_params?: UserCreatedWithinParameters; + user_custom_property_params?: UserCustomPropertyParameters; + user_rule_params?: UserRuleParameters; video_content_params?: VideoContentParameters; @@ -10317,30 +10480,26 @@ export interface RuleBuilderCondition { } export interface RuleBuilderConditionGroup { - logic: string; + logic?: string; - conditions: RuleBuilderCondition[]; + conditions?: RuleBuilderCondition[]; } export interface RuleBuilderConfig { - rules: RuleBuilderRule[]; - async?: boolean; + + rules?: RuleBuilderRule[]; } export interface RuleBuilderRule { - enabled: boolean; - - id: string; - - name: string; - rule_type: string; action: RuleBuilderAction; cooldown_period?: string; + id?: string; + logic?: string; conditions?: RuleBuilderCondition[]; @@ -10525,6 +10684,8 @@ export interface SearchResultMessage { image_labels?: Record; + member?: ChannelMemberResponse; + moderation?: ModerationV2Response; pinned_by?: UserResponse; @@ -10622,6 +10783,30 @@ export interface SendCallEventResponse { duration: string; } +export interface SendClosedCaptionRequest { + speaker_id: string; + + text: string; + + end_time?: Date; + + language?: string; + + service?: string; + + start_time?: Date; + + translated?: boolean; + + user_id?: string; + + user?: UserRequest; +} + +export interface SendClosedCaptionResponse { + duration: string; +} + export interface SendEventRequest { event: EventRequest; } @@ -11106,20 +11291,24 @@ export interface TextContentParameters { blocklist_match?: string[]; harm_labels?: string[]; + + llm_harm_labels?: Record; } export interface TextRuleParameters { - threshold: number; - - time_window: string; - contains_url?: boolean; severity?: string; + threshold?: number; + + time_window?: string; + blocklist_match?: string[]; harm_labels?: string[]; + + llm_harm_labels?: Record; } export interface ThreadParticipant { @@ -11145,6 +11334,8 @@ export interface ThreadParticipant { } export interface ThreadResponse { + active_participant_count: number; + channel_cid: string; created_at: Date; @@ -11153,20 +11344,18 @@ export interface ThreadResponse { parent_message_id: string; + participant_count: number; + title: string; updated_at: Date; custom: Record; - active_participant_count?: number; - deleted_at?: Date; last_message_at?: Date; - participant_count?: number; - reply_count?: number; thread_participants?: ThreadParticipant[]; @@ -11179,6 +11368,8 @@ export interface ThreadResponse { } export interface ThreadStateResponse { + active_participant_count: number; + channel_cid: string; created_at: Date; @@ -11187,6 +11378,8 @@ export interface ThreadStateResponse { parent_message_id: string; + participant_count: number; + title: string; updated_at: Date; @@ -11195,14 +11388,10 @@ export interface ThreadStateResponse { custom: Record; - active_participant_count?: number; - deleted_at?: Date; last_message_at?: Date; - participant_count?: number; - reply_count?: number; read?: ReadStateResponse[]; @@ -12167,6 +12356,8 @@ export interface UpdateCommandResponse { export interface UpdateCommentRequest { comment?: string; + skip_push?: boolean; + custom?: Record; } @@ -12213,6 +12404,8 @@ export interface UpdateFeedGroupRequest { notification?: NotificationConfig; + push_notification?: PushNotificationConfig; + ranking?: RankingConfig; } @@ -12283,6 +12476,8 @@ export interface UpdateFollowRequest { push_preference?: 'all' | 'none'; + skip_push?: boolean; + custom?: Record; } @@ -12552,6 +12747,36 @@ export interface UpsertConfigResponse { config?: ConfigResponse; } +export interface UpsertModerationRuleRequest { + name: string; + + rule_type: string; + + action: RuleBuilderAction; + + cooldown_period?: string; + + description?: string; + + enabled?: boolean; + + logic?: string; + + team?: string; + + conditions?: RuleBuilderCondition[]; + + config_keys?: string[]; + + groups?: RuleBuilderConditionGroup[]; +} + +export interface UpsertModerationRuleResponse { + duration: string; + + rule?: ModerationRuleV2Response; +} + export interface UpsertModerationTemplateRequest { name: string; @@ -12600,7 +12825,13 @@ export interface UpsertPushTemplateRequest { | 'message.new' | 'message.updated' | 'reaction.new' - | 'notification.reminder_due'; + | 'notification.reminder_due' + | 'feeds.activity.added' + | 'feeds.comment.added' + | 'feeds.activity.reaction.added' + | 'feeds.comment.reaction.added' + | 'feeds.follow.created' + | 'feeds.notification_feed.updated'; push_provider_type: 'firebase' | 'apn'; @@ -12691,6 +12922,12 @@ export interface UserCustomEventRequest { custom?: Record; } +export interface UserCustomPropertyParameters { + operator?: string; + + property_key?: string; +} + export interface UserDeactivatedEvent { created_at: Date; @@ -12760,8 +12997,6 @@ export interface UserFlaggedEvent { export interface UserMessagesDeletedEvent { created_at: Date; - soft_delete: boolean; - custom: Record; user: UserResponseCommonFields; @@ -12772,6 +13007,8 @@ export interface UserMessagesDeletedEvent { channel_member_count?: number; + channel_message_count?: number; + channel_type?: string; cid?: string; @@ -13044,53 +13281,53 @@ export interface UserUpdatedEvent { } export interface VelocityFilterConfig { - advanced_filters: boolean; + advanced_filters?: boolean; - cascading_actions: boolean; + async?: boolean; - cids_per_user: number; + cascading_actions?: boolean; - enabled: boolean; + cids_per_user?: number; - first_message_only: boolean; + enabled?: boolean; - rules: VelocityFilterConfigRule[]; + first_message_only?: boolean; - async?: boolean; + rules?: VelocityFilterConfigRule[]; } export interface VelocityFilterConfigRule { action: 'flag' | 'shadow' | 'remove' | 'ban'; - ban_duration: number; + ban_duration?: number; - cascading_action: 'flag' | 'shadow' | 'remove' | 'ban'; + cascading_action?: 'flag' | 'shadow' | 'remove' | 'ban'; - cascading_threshold: number; + cascading_threshold?: number; - check_message_context: boolean; + check_message_context?: boolean; - fast_spam_threshold: number; + fast_spam_threshold?: number; - fast_spam_ttl: number; + fast_spam_ttl?: number; - ip_ban: boolean; + ip_ban?: boolean; - probation_period: number; + probation_period?: number; - shadow_ban: boolean; + shadow_ban?: boolean; - slow_spam_threshold: number; + slow_spam_ban_duration?: number; - slow_spam_ttl: number; + slow_spam_threshold?: number; - url_only: boolean; + slow_spam_ttl?: number; - slow_spam_ban_duration?: number; + url_only?: boolean; } export interface VideoCallRuleConfig { - rules: Record; + rules?: Record; } export interface VideoContentParameters { @@ -13116,9 +13353,9 @@ export interface VideoReactionsResponse { } export interface VideoRuleParameters { - threshold: number; + threshold?: number; - time_window: string; + time_window?: string; harm_labels?: string[]; } diff --git a/src/gen/moderation/ModerationApi.ts b/src/gen/moderation/ModerationApi.ts index 2738881..ef9ae24 100644 --- a/src/gen/moderation/ModerationApi.ts +++ b/src/gen/moderation/ModerationApi.ts @@ -9,10 +9,12 @@ import { CustomCheckRequest, CustomCheckResponse, DeleteModerationConfigResponse, + DeleteModerationRuleResponse, DeleteModerationTemplateResponse, FlagRequest, FlagResponse, GetConfigResponse, + GetModerationRuleResponse, GetReviewQueueItemResponse, MuteRequest, MuteResponse, @@ -23,6 +25,8 @@ import { QueryModerationFlagsResponse, QueryModerationLogsRequest, QueryModerationLogsResponse, + QueryModerationRulesRequest, + QueryModerationRulesResponse, QueryReviewQueueRequest, QueryReviewQueueResponse, SubmitActionRequest, @@ -33,6 +37,8 @@ import { UnmuteResponse, UpsertConfigRequest, UpsertConfigResponse, + UpsertModerationRuleRequest, + UpsertModerationRuleResponse, UpsertModerationTemplateRequest, UpsertModerationTemplateResponse, } from '../models'; @@ -95,13 +101,14 @@ export class ModerationApi { async check(request: CheckRequest): Promise> { const body = { - config_key: request?.config_key, entity_creator_id: request?.entity_creator_id, entity_id: request?.entity_id, entity_type: request?.entity_type, + config_key: request?.config_key, config_team: request?.config_team, test_mode: request?.test_mode, user_id: request?.user_id, + config: request?.config, moderation_payload: request?.moderation_payload, options: request?.options, user: request?.user, @@ -405,6 +412,97 @@ export class ModerationApi { return { ...response.body, metadata: response.metadata }; } + async upsertModerationRule( + request: UpsertModerationRuleRequest, + ): Promise> { + 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, + conditions: request?.conditions, + config_keys: request?.config_keys, + groups: request?.groups, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'POST', + '/api/v2/moderation/moderation_rule', + undefined, + undefined, + body, + 'application/json', + ); + + decoders.UpsertModerationRuleResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + + async deleteModerationRule(): Promise< + StreamResponse + > { + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'DELETE', + '/api/v2/moderation/moderation_rule/{id}', + undefined, + undefined, + ); + + decoders.DeleteModerationRuleResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + + async getModerationRule(): Promise< + StreamResponse + > { + const response = await this.apiClient.sendRequest< + StreamResponse + >('GET', '/api/v2/moderation/moderation_rule/{id}', undefined, undefined); + + decoders.GetModerationRuleResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + + async queryModerationRules( + request?: QueryModerationRulesRequest, + ): Promise> { + const body = { + limit: request?.limit, + next: request?.next, + prev: request?.prev, + user_id: request?.user_id, + sort: request?.sort, + filter: request?.filter, + user: request?.user, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'POST', + '/api/v2/moderation/moderation_rules', + undefined, + undefined, + body, + 'application/json', + ); + + decoders.QueryModerationRulesResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + async mute(request: MuteRequest): Promise> { const body = { target_ids: request?.target_ids, diff --git a/src/gen/video/CallApi.ts b/src/gen/video/CallApi.ts index 45a4a8f..abc44b6 100644 --- a/src/gen/video/CallApi.ts +++ b/src/gen/video/CallApi.ts @@ -27,15 +27,17 @@ import { QueryCallParticipantsResponse, SendCallEventRequest, SendCallEventResponse, + SendClosedCaptionRequest, + SendClosedCaptionResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartFrameRecordingRequest, StartFrameRecordingResponse, StartHLSBroadcastingResponse, - StartRecordingRequest, - StartRecordingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, + StartRecordingRequest, + StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, @@ -45,9 +47,9 @@ import { StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, - StopRecordingResponse, StopRTMPBroadcastsRequest, StopRTMPBroadcastsResponse, + StopRecordingResponse, StopTranscriptionRequest, StopTranscriptionResponse, UnblockUserRequest, @@ -108,6 +110,16 @@ export class CallApi { }); } + sendClosedCaption( + request: SendClosedCaptionRequest, + ): Promise> { + return this.videoApi.sendClosedCaption({ + id: this.id, + type: this.type, + ...request, + }); + } + delete( request?: DeleteCallRequest, ): Promise> { diff --git a/src/gen/video/VideoApi.ts b/src/gen/video/VideoApi.ts index 898b46a..f33346b 100644 --- a/src/gen/video/VideoApi.ts +++ b/src/gen/video/VideoApi.ts @@ -35,24 +35,26 @@ import { QueryCallMembersResponse, QueryCallParticipantsRequest, QueryCallParticipantsResponse, - QueryCallsRequest, - QueryCallsResponse, QueryCallStatsRequest, QueryCallStatsResponse, + QueryCallsRequest, + QueryCallsResponse, QueryUserFeedbackRequest, QueryUserFeedbackResponse, Response, SendCallEventRequest, SendCallEventResponse, + SendClosedCaptionRequest, + SendClosedCaptionResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartFrameRecordingRequest, StartFrameRecordingResponse, StartHLSBroadcastingResponse, - StartRecordingRequest, - StartRecordingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, + StartRecordingRequest, + StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, @@ -62,9 +64,9 @@ import { StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, - StopRecordingResponse, StopRTMPBroadcastsRequest, StopRTMPBroadcastsResponse, + StopRecordingResponse, StopTranscriptionRequest, StopTranscriptionResponse, UnblockUserRequest, @@ -298,6 +300,41 @@ export class VideoApi { return { ...response.body, metadata: response.metadata }; } + async sendClosedCaption( + request: SendClosedCaptionRequest & { type: string; id: string }, + ): Promise> { + const pathParams = { + type: request?.type, + id: request?.id, + }; + const body = { + speaker_id: request?.speaker_id, + text: request?.text, + end_time: request?.end_time, + language: request?.language, + service: request?.service, + start_time: request?.start_time, + translated: request?.translated, + user_id: request?.user_id, + user: request?.user, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'POST', + '/api/v2/video/call/{type}/{id}/closed_captions', + pathParams, + undefined, + body, + 'application/json', + ); + + decoders.SendClosedCaptionResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + async deleteCall( request: DeleteCallRequest & { type: string; id: string }, ): Promise> {