diff --git a/getstream/chat/rest_client.py b/getstream/chat/rest_client.py index 16f1fc4..921a64a 100644 --- a/getstream/chat/rest_client.py +++ b/getstream/chat/rest_client.py @@ -28,7 +28,7 @@ def query_channels( offset: Optional[int] = None, state: Optional[bool] = None, user_id: Optional[str] = None, - sort: Optional[List[Optional[SortParam]]] = None, + sort: Optional[List[Optional[SortParamRequest]]] = None, filter_conditions: Optional[Dict[str, object]] = None, user: Optional[UserRequest] = None, ) -> StreamResponse[QueryChannelsResponse]: @@ -203,7 +203,7 @@ def send_event( def delete_file( self, type: str, id: str, url: Optional[str] = None - ) -> StreamResponse[FileDeleteResponse]: + ) -> StreamResponse[Response]: query_params = build_query_param(url=url) path_params = { "type": type, @@ -212,7 +212,7 @@ def delete_file( return self.delete( "/api/v2/chat/channels/{type}/{id}/file", - FileDeleteResponse, + Response, query_params=query_params, path_params=path_params, ) @@ -260,7 +260,7 @@ def hide_channel( def delete_image( self, type: str, id: str, url: Optional[str] = None - ) -> StreamResponse[FileDeleteResponse]: + ) -> StreamResponse[Response]: query_params = build_query_param(url=url) path_params = { "type": type, @@ -269,7 +269,7 @@ def delete_image( return self.delete( "/api/v2/chat/channels/{type}/{id}/image", - FileDeleteResponse, + Response, query_params=query_params, path_params=path_params, ) @@ -492,6 +492,8 @@ def create_channel_type( mark_messages_pending: Optional[bool] = None, message_retention: Optional[str] = None, mutes: Optional[bool] = None, + partition_size: Optional[int] = None, + partition_ttl: Optional[str] = None, polls: Optional[bool] = None, push_notifications: Optional[bool] = None, reactions: Optional[bool] = None, @@ -518,6 +520,8 @@ def create_channel_type( mark_messages_pending=mark_messages_pending, message_retention=message_retention, mutes=mutes, + partition_size=partition_size, + partition_ttl=partition_ttl, polls=polls, push_notifications=push_notifications, reactions=reactions, @@ -546,13 +550,15 @@ def delete_channel_type(self, name: str) -> StreamResponse[Response]: "/api/v2/chat/channeltypes/{name}", Response, path_params=path_params ) - def get_channel_type(self, name: str) -> StreamResponse[Response]: + def get_channel_type(self, name: str) -> StreamResponse[GetChannelTypeResponse]: path_params = { "name": name, } return self.get( - "/api/v2/chat/channeltypes/{name}", Response, path_params=path_params + "/api/v2/chat/channeltypes/{name}", + GetChannelTypeResponse, + path_params=path_params, ) def update_channel_type( @@ -567,6 +573,8 @@ def update_channel_type( custom_events: Optional[bool] = None, mark_messages_pending: Optional[bool] = None, mutes: Optional[bool] = None, + partition_size: Optional[int] = None, + partition_ttl: Optional[str] = None, polls: Optional[bool] = None, push_notifications: Optional[bool] = None, quotes: Optional[bool] = None, @@ -598,6 +606,8 @@ def update_channel_type( custom_events=custom_events, mark_messages_pending=mark_messages_pending, mutes=mutes, + partition_size=partition_size, + partition_ttl=partition_ttl, polls=polls, push_notifications=push_notifications, quotes=quotes, @@ -727,7 +737,7 @@ def query_message_history( limit: Optional[int] = None, next: Optional[str] = None, prev: Optional[str] = None, - sort: Optional[List[Optional[SortParam]]] = None, + sort: Optional[List[Optional[SortParamRequest]]] = None, ) -> StreamResponse[QueryMessageHistoryResponse]: json = build_body_dict( filter=filter, limit=limit, next=next, prev=prev, sort=sort @@ -903,7 +913,7 @@ def query_reactions( next: Optional[str] = None, prev: Optional[str] = None, user_id: Optional[str] = None, - sort: Optional[List[Optional[SortParam]]] = None, + sort: Optional[List[Optional[SortParamRequest]]] = None, filter: Optional[Dict[str, object]] = None, user: Optional[UserRequest] = None, ) -> StreamResponse[QueryReactionsResponse]: @@ -1010,7 +1020,7 @@ def get_replies( created_at_before: Optional[datetime] = None, id_around: Optional[str] = None, created_at_around: Optional[datetime] = None, - sort: Optional[List[Optional[SortParam]]] = None, + sort: Optional[List[Optional[SortParamRequest]]] = None, ) -> StreamResponse[GetRepliesResponse]: query_params = build_query_param( limit=limit, @@ -1125,7 +1135,7 @@ def update_poll( max_votes_allowed: Optional[int] = None, user_id: Optional[str] = None, voting_visibility: Optional[str] = None, - options: Optional[List[Optional[PollOption]]] = None, + options: Optional[List[Optional[PollOptionRequest]]] = None, custom: Optional[Dict[str, object]] = None, user: Optional[UserRequest] = None, ) -> StreamResponse[PollResponse]: @@ -1153,7 +1163,7 @@ def query_polls( limit: Optional[int] = None, next: Optional[str] = None, prev: Optional[str] = None, - sort: Optional[List[Optional[SortParam]]] = None, + sort: Optional[List[Optional[SortParamRequest]]] = None, filter: Optional[Dict[str, object]] = None, ) -> StreamResponse[QueryPollsResponse]: query_params = build_query_param(user_id=user_id) @@ -1303,7 +1313,7 @@ def query_poll_votes( limit: Optional[int] = None, next: Optional[str] = None, prev: Optional[str] = None, - sort: Optional[List[Optional[SortParam]]] = None, + sort: Optional[List[Optional[SortParamRequest]]] = None, filter: Optional[Dict[str, object]] = None, ) -> StreamResponse[PollVotesResponse]: query_params = build_query_param(user_id=user_id) diff --git a/getstream/common/rest_client.py b/getstream/common/rest_client.py index 3a048cf..aca203e 100644 --- a/getstream/common/rest_client.py +++ b/getstream/common/rest_client.py @@ -34,8 +34,12 @@ def update_app( disable_auth_checks: Optional[bool] = None, disable_permissions_checks: Optional[bool] = None, enforce_unique_usernames: Optional[str] = None, + feeds_moderation_enabled: Optional[bool] = None, + feeds_v2_region: Optional[str] = None, image_moderation_enabled: Optional[bool] = None, migrate_permissions_to_v2: Optional[bool] = None, + moderation_enabled: Optional[bool] = None, + moderation_webhook_url: Optional[str] = None, multi_tenant_enabled: Optional[bool] = None, permission_version: Optional[str] = None, reminders_interval: Optional[int] = None, @@ -49,6 +53,7 @@ def update_app( sqs_url: Optional[str] = None, video_provider: Optional[str] = None, webhook_url: Optional[str] = None, + allowed_flag_reasons: Optional[List[str]] = None, image_moderation_block_labels: Optional[List[str]] = None, image_moderation_labels: Optional[List[str]] = None, user_search_disallowed_roles: Optional[List[str]] = None, @@ -76,8 +81,12 @@ def update_app( disable_auth_checks=disable_auth_checks, disable_permissions_checks=disable_permissions_checks, enforce_unique_usernames=enforce_unique_usernames, + feeds_moderation_enabled=feeds_moderation_enabled, + feeds_v2_region=feeds_v2_region, image_moderation_enabled=image_moderation_enabled, migrate_permissions_to_v2=migrate_permissions_to_v2, + moderation_enabled=moderation_enabled, + moderation_webhook_url=moderation_webhook_url, multi_tenant_enabled=multi_tenant_enabled, permission_version=permission_version, reminders_interval=reminders_interval, @@ -91,6 +100,7 @@ def update_app( sqs_url=sqs_url, video_provider=video_provider, webhook_url=webhook_url, + allowed_flag_reasons=allowed_flag_reasons, image_moderation_block_labels=image_moderation_block_labels, image_moderation_labels=image_moderation_labels, user_search_disallowed_roles=user_search_disallowed_roles, @@ -353,96 +363,6 @@ def get_import(self, id: str) -> StreamResponse[GetImportResponse]: "/api/v2/imports/{id}", GetImportResponse, path_params=path_params ) - def unban( - self, - target_user_id: str, - channel_cid: Optional[str] = None, - created_by: Optional[str] = None, - ) -> StreamResponse[Response]: - query_params = build_query_param( - target_user_id=target_user_id, - channel_cid=channel_cid, - created_by=created_by, - ) - - return self.delete( - "/api/v2/moderation/ban", Response, query_params=query_params - ) - - def ban( - self, - target_user_id: str, - banned_by_id: Optional[str] = None, - channel_cid: Optional[str] = None, - ip_ban: Optional[bool] = None, - reason: Optional[str] = None, - shadow: Optional[bool] = None, - timeout: Optional[int] = None, - user_id: Optional[str] = None, - banned_by: Optional[UserRequest] = None, - user: Optional[UserRequest] = None, - ) -> StreamResponse[Response]: - json = build_body_dict( - target_user_id=target_user_id, - banned_by_id=banned_by_id, - channel_cid=channel_cid, - ip_ban=ip_ban, - reason=reason, - shadow=shadow, - timeout=timeout, - user_id=user_id, - banned_by=banned_by, - user=user, - ) - - return self.post("/api/v2/moderation/ban", Response, json=json) - - def flag( - self, - reason: Optional[str] = None, - target_message_id: Optional[str] = None, - target_user_id: Optional[str] = None, - user_id: Optional[str] = None, - custom: Optional[Dict[str, object]] = None, - user: Optional[UserRequest] = None, - ) -> StreamResponse[FlagResponse]: - json = build_body_dict( - reason=reason, - target_message_id=target_message_id, - target_user_id=target_user_id, - user_id=user_id, - custom=custom, - user=user, - ) - - return self.post("/api/v2/moderation/flag", FlagResponse, json=json) - - def mute_user( - self, - timeout: int, - user_id: Optional[str] = None, - target_ids: Optional[List[str]] = None, - user: Optional[UserRequest] = None, - ) -> StreamResponse[MuteUserResponse]: - json = build_body_dict( - timeout=timeout, user_id=user_id, target_ids=target_ids, user=user - ) - - return self.post("/api/v2/moderation/mute", MuteUserResponse, json=json) - - def unmute_user( - self, - timeout: int, - user_id: Optional[str] = None, - target_ids: Optional[List[str]] = None, - user: Optional[UserRequest] = None, - ) -> StreamResponse[UnmuteResponse]: - json = build_body_dict( - timeout=timeout, user_id=user_id, target_ids=target_ids, user=user - ) - - return self.post("/api/v2/moderation/unmute", UnmuteResponse, json=json) - def get_og(self, url: str) -> StreamResponse[GetOGResponse]: query_params = build_query_param(url=url) diff --git a/getstream/models/__init__.py b/getstream/models/__init__.py index 59d34a1..e6851c5 100644 --- a/getstream/models/__init__.py +++ b/getstream/models/__init__.py @@ -16,6 +16,9 @@ class APIError(DataClassJsonMixin): more_info: str = dc_field(metadata=dc_config(field_name="more_info")) status_code: int = dc_field(metadata=dc_config(field_name="StatusCode")) details: "List[int]" = dc_field(metadata=dc_config(field_name="details")) + unrecoverable: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="unrecoverable") + ) exception_fields: "Optional[Dict[str, str]]" = dc_field( default=None, metadata=dc_config(field_name="exception_fields") ) @@ -87,6 +90,22 @@ class APNS(DataClassJsonMixin): title: str = dc_field(metadata=dc_config(field_name="title")) +@dataclass +class AWSRekognitionConfig(DataClassJsonMixin): + enabled: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="enabled") + ) + rules: "Optional[List[AWSRekognitionRule]]" = dc_field( + default=None, metadata=dc_config(field_name="rules") + ) + + +@dataclass +class AWSRekognitionRule(DataClassJsonMixin): + action: str = dc_field(metadata=dc_config(field_name="action")) + label: str = dc_field(metadata=dc_config(field_name="label")) + + @dataclass class Action(DataClassJsonMixin): name: str = dc_field(metadata=dc_config(field_name="name")) @@ -100,6 +119,73 @@ class Action(DataClassJsonMixin): ) +@dataclass +class ActionLog(DataClassJsonMixin): + created_at: datetime = dc_field( + metadata=dc_config( + field_name="created_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + id: str = dc_field(metadata=dc_config(field_name="id")) + reason: str = dc_field(metadata=dc_config(field_name="reason")) + review_queue_item_id: str = dc_field( + metadata=dc_config(field_name="review_queue_item_id") + ) + target_user_id: str = dc_field(metadata=dc_config(field_name="target_user_id")) + type: str = dc_field(metadata=dc_config(field_name="type")) + custom: Dict[str, object] = dc_field(metadata=dc_config(field_name="custom")) + review_queue_item: "Optional[ReviewQueueItem]" = dc_field( + default=None, metadata=dc_config(field_name="review_queue_item") + ) + target_user: "Optional[UserObject]" = dc_field( + default=None, metadata=dc_config(field_name="target_user") + ) + user: "Optional[UserObject]" = dc_field( + default=None, metadata=dc_config(field_name="user") + ) + + +@dataclass +class ActionLogResponse(DataClassJsonMixin): + created_at: datetime = dc_field( + metadata=dc_config( + field_name="created_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + id: str = dc_field(metadata=dc_config(field_name="id")) + reason: str = dc_field(metadata=dc_config(field_name="reason")) + type: str = dc_field(metadata=dc_config(field_name="type")) + custom: Dict[str, object] = dc_field(metadata=dc_config(field_name="custom")) + review_queue_item: "Optional[ReviewQueueItem]" = dc_field( + default=None, metadata=dc_config(field_name="review_queue_item") + ) + target_user: "Optional[UserResponse]" = dc_field( + default=None, metadata=dc_config(field_name="target_user") + ) + user: "Optional[UserResponse]" = dc_field( + default=None, metadata=dc_config(field_name="user") + ) + + +@dataclass +class AggregatedStats(DataClassJsonMixin): + countrywise_aggregate_stats: "Optional[Dict[str, Optional[CountrywiseAggregateStats]]]" = dc_field( + default=None, metadata=dc_config(field_name="countrywise_aggregate_stats") + ) + publisher_aggregate_stats: "Optional[PublisherAggregateStats]" = dc_field( + default=None, metadata=dc_config(field_name="publisher_aggregate_stats") + ) + turn: "Optional[TURNAggregatedStats]" = dc_field( + default=None, metadata=dc_config(field_name="turn") + ) + + @dataclass class AppResponseFields(DataClassJsonMixin): async_url_enrich_enabled: bool = dc_field( @@ -127,6 +213,12 @@ class AppResponseFields(DataClassJsonMixin): image_moderation_enabled: bool = dc_field( metadata=dc_config(field_name="image_moderation_enabled") ) + moderation_enabled: bool = dc_field( + metadata=dc_config(field_name="moderation_enabled") + ) + moderation_webhook_url: str = dc_field( + metadata=dc_config(field_name="moderation_webhook_url") + ) multi_tenant_enabled: bool = dc_field( metadata=dc_config(field_name="multi_tenant_enabled") ) @@ -135,7 +227,6 @@ class AppResponseFields(DataClassJsonMixin): permission_version: str = dc_field( metadata=dc_config(field_name="permission_version") ) - polls_enabled: bool = dc_field(metadata=dc_config(field_name="polls_enabled")) reminders_interval: int = dc_field( metadata=dc_config(field_name="reminders_interval") ) @@ -232,13 +323,13 @@ class Attachment(DataClassJsonMixin): asset_url: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="asset_url") ) - auth_or_icon: Optional[str] = dc_field( + author_icon: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="author_icon") ) - auth_or_link: Optional[str] = dc_field( + author_link: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="author_link") ) - auth_or_name: Optional[str] = dc_field( + author_name: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="author_name") ) color: Optional[str] = dc_field( @@ -370,6 +461,50 @@ class AutomodDetails(DataClassJsonMixin): ) +@dataclass +class AutomodPlatformCircumventionConfig(DataClassJsonMixin): + enabled: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="enabled") + ) + rules: "Optional[List[AutomodRule]]" = dc_field( + default=None, metadata=dc_config(field_name="rules") + ) + + +@dataclass +class AutomodRule(DataClassJsonMixin): + action: str = dc_field(metadata=dc_config(field_name="action")) + label: str = dc_field(metadata=dc_config(field_name="label")) + threshold: float = dc_field(metadata=dc_config(field_name="threshold")) + + +@dataclass +class AutomodSemanticFiltersConfig(DataClassJsonMixin): + enabled: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="enabled") + ) + rules: "Optional[List[AutomodSemanticFiltersRule]]" = dc_field( + default=None, metadata=dc_config(field_name="rules") + ) + + +@dataclass +class AutomodSemanticFiltersRule(DataClassJsonMixin): + action: str = dc_field(metadata=dc_config(field_name="action")) + name: str = dc_field(metadata=dc_config(field_name="name")) + threshold: float = dc_field(metadata=dc_config(field_name="threshold")) + + +@dataclass +class AutomodToxicityConfig(DataClassJsonMixin): + enabled: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="enabled") + ) + rules: "Optional[List[AutomodRule]]" = dc_field( + default=None, metadata=dc_config(field_name="rules") + ) + + @dataclass class AzureRequest(DataClassJsonMixin): abs_account_name: str = dc_field(metadata=dc_config(field_name="abs_account_name")) @@ -406,6 +541,56 @@ class BackstageSettingsResponse(DataClassJsonMixin): ) +@dataclass +class Ban(DataClassJsonMixin): + created_at: datetime = dc_field( + metadata=dc_config( + field_name="created_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + shadow: bool = dc_field(metadata=dc_config(field_name="shadow")) + expires: Optional[datetime] = dc_field( + default=None, + metadata=dc_config( + field_name="expires", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ), + ) + reason: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="reason") + ) + channel: "Optional[Channel]" = dc_field( + default=None, metadata=dc_config(field_name="channel") + ) + created_by: "Optional[UserObject]" = dc_field( + default=None, metadata=dc_config(field_name="created_by") + ) + target: "Optional[UserObject]" = dc_field( + default=None, metadata=dc_config(field_name="target") + ) + + +@dataclass +class BanActionRequest(DataClassJsonMixin): + channel_ban_only: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="channel_ban_only") + ) + reason: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="reason") + ) + shadow: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="shadow") + ) + timeout: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="timeout") + ) + + @dataclass class BanRequest(DataClassJsonMixin): target_user_id: str = dc_field(metadata=dc_config(field_name="target_user_id")) @@ -427,15 +612,9 @@ class BanRequest(DataClassJsonMixin): timeout: Optional[int] = dc_field( default=None, metadata=dc_config(field_name="timeout") ) - user_id: Optional[str] = dc_field( - default=None, metadata=dc_config(field_name="user_id") - ) banned_by: "Optional[UserRequest]" = dc_field( default=None, metadata=dc_config(field_name="banned_by") ) - user: "Optional[UserRequest]" = dc_field( - default=None, metadata=dc_config(field_name="user") - ) @dataclass @@ -463,19 +642,35 @@ class BanResponse(DataClassJsonMixin): shadow: Optional[bool] = dc_field( default=None, metadata=dc_config(field_name="shadow") ) - banned_by: "Optional[UserObject]" = dc_field( + banned_by: "Optional[UserResponse]" = dc_field( default=None, metadata=dc_config(field_name="banned_by") ) channel: "Optional[ChannelResponse]" = dc_field( default=None, metadata=dc_config(field_name="channel") ) - user: "Optional[UserObject]" = dc_field( + user: "Optional[UserResponse]" = dc_field( default=None, metadata=dc_config(field_name="user") ) @dataclass -class BlockList(DataClassJsonMixin): +class BlockListConfig(DataClassJsonMixin): + enabled: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="enabled") + ) + rules: "Optional[List[BlockListRule]]" = dc_field( + default=None, metadata=dc_config(field_name="rules") + ) + + +@dataclass +class BlockListOptions(DataClassJsonMixin): + behavior: str = dc_field(metadata=dc_config(field_name="behavior")) + blocklist: str = dc_field(metadata=dc_config(field_name="blocklist")) + + +@dataclass +class BlockListResponse(DataClassJsonMixin): name: str = dc_field(metadata=dc_config(field_name="name")) type: str = dc_field(metadata=dc_config(field_name="type")) words: List[str] = dc_field(metadata=dc_config(field_name="words")) @@ -500,9 +695,9 @@ class BlockList(DataClassJsonMixin): @dataclass -class BlockListOptions(DataClassJsonMixin): - behavior: str = dc_field(metadata=dc_config(field_name="behavior")) - blocklist: str = dc_field(metadata=dc_config(field_name="blocklist")) +class BlockListRule(DataClassJsonMixin): + action: str = dc_field(metadata=dc_config(field_name="action")) + name: str = dc_field(metadata=dc_config(field_name="name")) @dataclass @@ -561,10 +756,43 @@ class BlockedUserResponse(DataClassJsonMixin): user: "UserResponse" = dc_field(metadata=dc_config(field_name="user")) +@dataclass +class BodyguardConfig(DataClassJsonMixin): + enabled: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="enabled") + ) + profile: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="profile") + ) + rules: "Optional[List[BodyguardRule]]" = dc_field( + default=None, metadata=dc_config(field_name="rules") + ) + severity_rules: "Optional[List[BodyguardSeverityRule]]" = dc_field( + default=None, metadata=dc_config(field_name="severity_rules") + ) + + +@dataclass +class BodyguardRule(DataClassJsonMixin): + action: str = dc_field(metadata=dc_config(field_name="action")) + label: str = dc_field(metadata=dc_config(field_name="label")) + + +@dataclass +class BodyguardSeverityRule(DataClassJsonMixin): + action: str = dc_field(metadata=dc_config(field_name="action")) + severity: str = dc_field(metadata=dc_config(field_name="severity")) + + @dataclass class BroadcastSettings(DataClassJsonMixin): enabled: bool = dc_field(metadata=dc_config(field_name="enabled")) - hls: "HLSSettings" = dc_field(metadata=dc_config(field_name="hls")) + hls: "Optional[HLSSettings]" = dc_field( + default=None, metadata=dc_config(field_name="hls") + ) + rtmp: "Optional[RTMPSettings]" = dc_field( + default=None, metadata=dc_config(field_name="rtmp") + ) @dataclass @@ -575,12 +803,16 @@ class BroadcastSettingsRequest(DataClassJsonMixin): hls: "Optional[HLSSettingsRequest]" = dc_field( default=None, metadata=dc_config(field_name="hls") ) + rtmp: "Optional[RTMPSettingsRequest]" = dc_field( + default=None, metadata=dc_config(field_name="rtmp") + ) @dataclass class BroadcastSettingsResponse(DataClassJsonMixin): enabled: bool = dc_field(metadata=dc_config(field_name="enabled")) hls: "HLSSettingsResponse" = dc_field(metadata=dc_config(field_name="hls")) + rtmp: "RTMPSettingsResponse" = dc_field(metadata=dc_config(field_name="rtmp")) @dataclass @@ -590,6 +822,12 @@ class CallEvent(DataClassJsonMixin): severity: int = dc_field(metadata=dc_config(field_name="severity")) timestamp: int = dc_field(metadata=dc_config(field_name="timestamp")) type: str = dc_field(metadata=dc_config(field_name="type")) + component: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="component") + ) + additional: Optional[Dict[str, object]] = dc_field( + default=None, metadata=dc_config(field_name="additional") + ) @dataclass @@ -649,6 +887,9 @@ class CallRequest(DataClassJsonMixin): ), ) team: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="team")) + video: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="video") + ) members: "Optional[List[MemberRequest]]" = dc_field( default=None, metadata=dc_config(field_name="members") ) @@ -732,6 +973,9 @@ class CallResponse(DataClassJsonMixin): @dataclass class CallSessionResponse(DataClassJsonMixin): + anonymous_participant_count: int = dc_field( + metadata=dc_config(field_name="anonymous_participant_count") + ) id: str = dc_field(metadata=dc_config(field_name="id")) participants: "List[CallParticipantResponse]" = dc_field( metadata=dc_config(field_name="participants") @@ -1244,6 +1488,12 @@ class ChannelConfigWithInfo(DataClassJsonMixin): blocklist_behavior: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="blocklist_behavior") ) + partition_size: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="partition_size") + ) + partition_ttl: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="partition_ttl") + ) allowed_flag_reasons: Optional[List[str]] = dc_field( default=None, metadata=dc_config(field_name="allowed_flag_reasons") ) @@ -1338,7 +1588,7 @@ class ChannelInput(DataClassJsonMixin): config_overrides: "Optional[ChannelConfig]" = dc_field( default=None, metadata=dc_config(field_name="config_overrides") ) - created_by: "Optional[UserObject]" = dc_field( + created_by: "Optional[UserRequest]" = dc_field( default=None, metadata=dc_config(field_name="created_by") ) custom: Optional[Dict[str, object]] = dc_field( @@ -1424,7 +1674,9 @@ class ChannelMember(DataClassJsonMixin): @dataclass -class ChannelMute(DataClassJsonMixin): +class ChannelMemberResponse(DataClassJsonMixin): + banned: bool = dc_field(metadata=dc_config(field_name="banned")) + channel_role: str = dc_field(metadata=dc_config(field_name="channel_role")) created_at: datetime = dc_field( metadata=dc_config( field_name="created_at", @@ -1433,6 +1685,10 @@ class ChannelMute(DataClassJsonMixin): mm_field=fields.DateTime(format="iso"), ) ) + notifications_muted: bool = dc_field( + metadata=dc_config(field_name="notifications_muted") + ) + shadow_banned: bool = dc_field(metadata=dc_config(field_name="shadow_banned")) updated_at: datetime = dc_field( metadata=dc_config( field_name="updated_at", @@ -1441,26 +1697,62 @@ class ChannelMute(DataClassJsonMixin): mm_field=fields.DateTime(format="iso"), ) ) - expires: Optional[datetime] = dc_field( + ban_expires: Optional[datetime] = dc_field( default=None, metadata=dc_config( - field_name="expires", + field_name="ban_expires", encoder=encode_datetime, decoder=datetime_from_unix_ns, mm_field=fields.DateTime(format="iso"), ), ) - channel: "Optional[ChannelResponse]" = dc_field( - default=None, metadata=dc_config(field_name="channel") + deleted_at: Optional[datetime] = dc_field( + default=None, + metadata=dc_config( + field_name="deleted_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ), ) - user: "Optional[UserObject]" = dc_field( + invite_accepted_at: Optional[datetime] = dc_field( + default=None, + metadata=dc_config( + field_name="invite_accepted_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ), + ) + invite_rejected_at: Optional[datetime] = dc_field( + default=None, + metadata=dc_config( + field_name="invite_rejected_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ), + ) + invited: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="invited") + ) + is_moderator: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="is_moderator") + ) + role: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="role")) + status: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="status") + ) + user_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="user_id") + ) + user: "Optional[UserResponse]" = dc_field( default=None, metadata=dc_config(field_name="user") ) @dataclass -class ChannelResponse(DataClassJsonMixin): - cid: str = dc_field(metadata=dc_config(field_name="cid")) +class ChannelMute(DataClassJsonMixin): created_at: datetime = dc_field( metadata=dc_config( field_name="created_at", @@ -1469,10 +1761,6 @@ class ChannelResponse(DataClassJsonMixin): mm_field=fields.DateTime(format="iso"), ) ) - disabled: bool = dc_field(metadata=dc_config(field_name="disabled")) - frozen: bool = dc_field(metadata=dc_config(field_name="frozen")) - id: str = dc_field(metadata=dc_config(field_name="id")) - type: str = dc_field(metadata=dc_config(field_name="type")) updated_at: datetime = dc_field( metadata=dc_config( field_name="updated_at", @@ -1481,9 +1769,49 @@ class ChannelResponse(DataClassJsonMixin): mm_field=fields.DateTime(format="iso"), ) ) - custom: Dict[str, object] = dc_field(metadata=dc_config(field_name="custom")) - auto_translation_enabled: Optional[bool] = dc_field( - default=None, metadata=dc_config(field_name="auto_translation_enabled") + expires: Optional[datetime] = dc_field( + default=None, + metadata=dc_config( + field_name="expires", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ), + ) + channel: "Optional[ChannelResponse]" = dc_field( + default=None, metadata=dc_config(field_name="channel") + ) + user: "Optional[UserObject]" = dc_field( + default=None, metadata=dc_config(field_name="user") + ) + + +@dataclass +class ChannelResponse(DataClassJsonMixin): + cid: str = dc_field(metadata=dc_config(field_name="cid")) + created_at: datetime = dc_field( + metadata=dc_config( + field_name="created_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + disabled: bool = dc_field(metadata=dc_config(field_name="disabled")) + frozen: bool = dc_field(metadata=dc_config(field_name="frozen")) + id: str = dc_field(metadata=dc_config(field_name="id")) + type: str = dc_field(metadata=dc_config(field_name="type")) + updated_at: datetime = dc_field( + metadata=dc_config( + field_name="updated_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + custom: Dict[str, object] = dc_field(metadata=dc_config(field_name="custom")) + auto_translation_enabled: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="auto_translation_enabled") ) auto_translation_language: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="auto_translation_language") @@ -1715,6 +2043,12 @@ class ChannelTypeConfig(DataClassJsonMixin): blocklist_behavior: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="blocklist_behavior") ) + partition_size: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="partition_size") + ) + partition_ttl: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="partition_ttl") + ) allowed_flag_reasons: Optional[List[str]] = dc_field( default=None, metadata=dc_config(field_name="allowed_flag_reasons") ) @@ -1786,6 +2120,43 @@ class CheckPushResponse(DataClassJsonMixin): ) +@dataclass +class CheckRequest(DataClassJsonMixin): + config_key: str = dc_field(metadata=dc_config(field_name="config_key")) + entity_creator_id: str = dc_field( + metadata=dc_config(field_name="entity_creator_id") + ) + entity_id: str = dc_field(metadata=dc_config(field_name="entity_id")) + entity_type: str = dc_field(metadata=dc_config(field_name="entity_type")) + user_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="user_id") + ) + moderation_payload: "Optional[ModerationPayload]" = dc_field( + default=None, metadata=dc_config(field_name="moderation_payload") + ) + options: Optional[Dict[str, object]] = dc_field( + default=None, metadata=dc_config(field_name="options") + ) + user: "Optional[UserRequest]" = dc_field( + default=None, metadata=dc_config(field_name="user") + ) + + +@dataclass +class CheckResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + recommended_action: str = dc_field( + metadata=dc_config(field_name="recommended_action") + ) + status: str = dc_field(metadata=dc_config(field_name="status")) + task_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="task_id") + ) + item: "Optional[ReviewQueueItem]" = dc_field( + default=None, metadata=dc_config(field_name="item") + ) + + @dataclass class CheckSNSRequest(DataClassJsonMixin): sns_key: Optional[str] = dc_field( @@ -1898,12 +2269,84 @@ class Config(DataClassJsonMixin): ) +@dataclass +class ConfigResponse(DataClassJsonMixin): + _async: bool = dc_field(metadata=dc_config(field_name="async")) + created_at: datetime = dc_field( + metadata=dc_config( + field_name="created_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + key: str = dc_field(metadata=dc_config(field_name="key")) + updated_at: datetime = dc_field( + metadata=dc_config( + field_name="updated_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + automod_platform_circumvention_config: "Optional[AutomodPlatformCircumventionConfig]" = dc_field( + default=None, + metadata=dc_config(field_name="automod_platform_circumvention_config"), + ) + automod_semantic_filters_config: "Optional[AutomodSemanticFiltersConfig]" = ( + dc_field( + default=None, + metadata=dc_config(field_name="automod_semantic_filters_config"), + ) + ) + automod_toxicity_config: "Optional[AutomodToxicityConfig]" = dc_field( + default=None, metadata=dc_config(field_name="automod_toxicity_config") + ) + aws_rek_og_nition_config: "Optional[AWSRekognitionConfig]" = dc_field( + default=None, metadata=dc_config(field_name="aws_rekognition_config") + ) + block_list_config: "Optional[BlockListConfig]" = dc_field( + default=None, metadata=dc_config(field_name="block_list_config") + ) + bodyguard_config: "Optional[BodyguardConfig]" = dc_field( + default=None, metadata=dc_config(field_name="bodyguard_config") + ) + go_og_le_vision_config: "Optional[GoogleVisionConfig]" = dc_field( + default=None, metadata=dc_config(field_name="google_vision_config") + ) + + @dataclass class Coordinates(DataClassJsonMixin): latitude: float = dc_field(metadata=dc_config(field_name="latitude")) longitude: float = dc_field(metadata=dc_config(field_name="longitude")) +@dataclass +class Count(DataClassJsonMixin): + app_roximate: bool = dc_field(metadata=dc_config(field_name="approximate")) + value: int = dc_field(metadata=dc_config(field_name="value")) + + +@dataclass +class CountrywiseAggregateStats(DataClassJsonMixin): + participant_count: "Optional[Count]" = dc_field( + default=None, metadata=dc_config(field_name="participant_count") + ) + publisher_jitter: "Optional[TimeStats]" = dc_field( + default=None, metadata=dc_config(field_name="publisher_jitter") + ) + publisher_latency: "Optional[TimeStats]" = dc_field( + default=None, metadata=dc_config(field_name="publisher_latency") + ) + subscriber_jitter: "Optional[TimeStats]" = dc_field( + default=None, metadata=dc_config(field_name="subscriber_jitter") + ) + subscriber_latency: "Optional[TimeStats]" = dc_field( + default=None, metadata=dc_config(field_name="subscriber_latency") + ) + + @dataclass class CreateBlockListRequest(DataClassJsonMixin): name: str = dc_field(metadata=dc_config(field_name="name")) @@ -1989,6 +2432,12 @@ class CreateChannelTypeRequest(DataClassJsonMixin): mutes: Optional[bool] = dc_field( default=None, metadata=dc_config(field_name="mutes") ) + partition_size: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="partition_size") + ) + partition_ttl: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="partition_ttl") + ) polls: Optional[bool] = dc_field( default=None, metadata=dc_config(field_name="polls") ) @@ -2085,6 +2534,12 @@ class CreateChannelTypeResponse(DataClassJsonMixin): blocklist_behavior: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="blocklist_behavior") ) + partition_size: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="partition_size") + ) + partition_ttl: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="partition_ttl") + ) allowed_flag_reasons: Optional[List[str]] = dc_field( default=None, metadata=dc_config(field_name="allowed_flag_reasons") ) @@ -2259,6 +2714,75 @@ class CreateRoleResponse(DataClassJsonMixin): role: "Role" = dc_field(metadata=dc_config(field_name="role")) +@dataclass +class CustomActionRequest(DataClassJsonMixin): + id: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="id")) + options: Optional[Dict[str, object]] = dc_field( + default=None, metadata=dc_config(field_name="options") + ) + + +@dataclass +class CustomCheckRequest(DataClassJsonMixin): + entity_creator_id: str = dc_field( + metadata=dc_config(field_name="entity_creator_id") + ) + entity_id: str = dc_field(metadata=dc_config(field_name="entity_id")) + entity_type: str = dc_field(metadata=dc_config(field_name="entity_type")) + name: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="name")) + reason: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="reason") + ) + recommended_action: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="recommended_action") + ) + user_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="user_id") + ) + moderation_payload: "Optional[ModerationPayload]" = dc_field( + default=None, metadata=dc_config(field_name="moderation_payload") + ) + user: "Optional[UserRequest]" = dc_field( + default=None, metadata=dc_config(field_name="user") + ) + + +@dataclass +class CustomCheckResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + id: str = dc_field(metadata=dc_config(field_name="id")) + recommended_action: str = dc_field( + metadata=dc_config(field_name="recommended_action") + ) + scored_at: datetime = dc_field( + metadata=dc_config( + field_name="scored_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + status: str = dc_field(metadata=dc_config(field_name="status")) + report: list = dc_field(metadata=dc_config(field_name="report")) + moderator_action: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="moderator_action") + ) + reviewed_at: Optional[datetime] = dc_field( + default=None, + metadata=dc_config( + field_name="reviewed_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ), + ) + + +@dataclass +class Data(DataClassJsonMixin): + id: str = dc_field(metadata=dc_config(field_name="id")) + + @dataclass class DataDogInfo(DataClassJsonMixin): api_key: Optional[str] = dc_field( @@ -2283,7 +2807,7 @@ class DeactivateUserRequest(DataClassJsonMixin): @dataclass class DeactivateUserResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) - user: "Optional[UserObject]" = dc_field( + user: "Optional[UserResponse]" = dc_field( default=None, metadata=dc_config(field_name="user") ) @@ -2308,6 +2832,11 @@ class DeactivateUsersResponse(DataClassJsonMixin): task_id: str = dc_field(metadata=dc_config(field_name="task_id")) +@dataclass +class DeleteActivityRequest(DataClassJsonMixin): + pass + + @dataclass class DeleteCallRequest(DataClassJsonMixin): hard: Optional[bool] = dc_field(default=None, metadata=dc_config(field_name="hard")) @@ -2344,13 +2873,13 @@ class DeleteChannelsResponse(DataClassJsonMixin): task_id: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="task_id") ) - result: "Optional[Dict[str, Optional[DeleteChannelsResult]]]" = dc_field( + result: "Optional[Dict[str, Optional[DeleteChannelsResultResponse]]]" = dc_field( default=None, metadata=dc_config(field_name="result") ) @dataclass -class DeleteChannelsResult(DataClassJsonMixin): +class DeleteChannelsResultResponse(DataClassJsonMixin): status: str = dc_field(metadata=dc_config(field_name="status")) error: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="error") @@ -2368,12 +2897,31 @@ class DeleteExternalStorageResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) +@dataclass +class DeleteMessageRequest(DataClassJsonMixin): + hard_delete: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="hard_delete") + ) + + @dataclass class DeleteMessageResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) message: "MessageResponse" = dc_field(metadata=dc_config(field_name="message")) +@dataclass +class DeleteModerationTemplateResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + + +@dataclass +class DeleteReactionRequest(DataClassJsonMixin): + hard_delete: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="hard_delete") + ) + + @dataclass class DeleteRecordingResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) @@ -2384,6 +2932,19 @@ class DeleteTranscriptionResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) +@dataclass +class DeleteUserRequest(DataClassJsonMixin): + delete_conversation_channels: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="delete_conversation_channels") + ) + hard_delete: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="hard_delete") + ) + mark_messages_deleted: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="mark_messages_deleted") + ) + + @dataclass class DeleteUsersRequest(DataClassJsonMixin): user_ids: List[str] = dc_field(metadata=dc_config(field_name="user_ids")) @@ -2467,8 +3028,20 @@ class EgressHLSResponse(DataClassJsonMixin): @dataclass class EgressRTMPResponse(DataClassJsonMixin): name: str = dc_field(metadata=dc_config(field_name="name")) - stream_key: str = dc_field(metadata=dc_config(field_name="stream_key")) - url: str = dc_field(metadata=dc_config(field_name="url")) + started_at: datetime = dc_field( + metadata=dc_config( + field_name="started_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + stream_key: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="stream_key") + ) + stream_url: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="stream_url") + ) @dataclass @@ -2492,6 +3065,77 @@ class EndCallResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) +@dataclass +class EnrichedActivity(DataClassJsonMixin): + foreign_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="foreign_id") + ) + id: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="id")) + score: Optional[float] = dc_field( + default=None, metadata=dc_config(field_name="score") + ) + verb: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="verb")) + to: Optional[List[str]] = dc_field( + default=None, metadata=dc_config(field_name="to") + ) + actor: "Optional[Data]" = dc_field( + default=None, metadata=dc_config(field_name="actor") + ) + latest_reactions: "Optional[Dict[str, List[Optional[EnrichedReaction]]]]" = ( + dc_field(default=None, metadata=dc_config(field_name="latest_reactions")) + ) + object: "Optional[Data]" = dc_field( + default=None, metadata=dc_config(field_name="object") + ) + origin: "Optional[Data]" = dc_field( + default=None, metadata=dc_config(field_name="origin") + ) + own_reactions: "Optional[Dict[str, List[Optional[EnrichedReaction]]]]" = dc_field( + default=None, metadata=dc_config(field_name="own_reactions") + ) + reaction_counts: "Optional[Dict[str, int]]" = dc_field( + default=None, metadata=dc_config(field_name="reaction_counts") + ) + target: "Optional[Data]" = dc_field( + default=None, metadata=dc_config(field_name="target") + ) + + +@dataclass +class EnrichedReaction(DataClassJsonMixin): + activity_id: str = dc_field(metadata=dc_config(field_name="activity_id")) + kind: str = dc_field(metadata=dc_config(field_name="kind")) + user_id: str = dc_field(metadata=dc_config(field_name="user_id")) + id: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="id")) + parent: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="parent") + ) + target_feeds: Optional[List[str]] = dc_field( + default=None, metadata=dc_config(field_name="target_feeds") + ) + children_counts: "Optional[Dict[str, int]]" = dc_field( + default=None, metadata=dc_config(field_name="children_counts") + ) + created_at: "Optional[Time]" = dc_field( + default=None, metadata=dc_config(field_name="created_at") + ) + data: Optional[Dict[str, object]] = dc_field( + default=None, metadata=dc_config(field_name="data") + ) + latest_children: "Optional[Dict[str, List[Optional[EnrichedReaction]]]]" = dc_field( + default=None, metadata=dc_config(field_name="latest_children") + ) + own_children: "Optional[Dict[str, List[Optional[EnrichedReaction]]]]" = dc_field( + default=None, metadata=dc_config(field_name="own_children") + ) + updated_at: "Optional[Time]" = dc_field( + default=None, metadata=dc_config(field_name="updated_at") + ) + user: "Optional[Data]" = dc_field( + default=None, metadata=dc_config(field_name="user") + ) + + @dataclass class ErrorResult(DataClassJsonMixin): type: str = dc_field(metadata=dc_config(field_name="type")) @@ -2578,7 +3222,7 @@ class ExportUserResponse(DataClassJsonMixin): reactions: "Optional[List[Optional[Reaction]]]" = dc_field( default=None, metadata=dc_config(field_name="reactions") ) - user: "Optional[UserObject]" = dc_field( + user: "Optional[UserResponse]" = dc_field( default=None, metadata=dc_config(field_name="user") ) @@ -2602,6 +3246,12 @@ class ExternalStorageResponse(DataClassJsonMixin): type: str = dc_field(metadata=dc_config(field_name="type")) +@dataclass +class FeedsModerationTemplateConfig(DataClassJsonMixin): + config_key: str = dc_field(metadata=dc_config(field_name="config_key")) + data_types: "Dict[str, str]" = dc_field(metadata=dc_config(field_name="data_types")) + + @dataclass class Field(DataClassJsonMixin): short: bool = dc_field(metadata=dc_config(field_name="short")) @@ -2609,11 +3259,6 @@ class Field(DataClassJsonMixin): value: str = dc_field(metadata=dc_config(field_name="value")) -@dataclass -class FileDeleteResponse(DataClassJsonMixin): - duration: str = dc_field(metadata=dc_config(field_name="duration")) - - @dataclass class FileUploadConfig(DataClassJsonMixin): size_limit: int = dc_field(metadata=dc_config(field_name="size_limit")) @@ -2687,7 +3332,7 @@ class FirebaseConfigFields(DataClassJsonMixin): @dataclass -class Flag(DataClassJsonMixin): +class Flag2(DataClassJsonMixin): created_at: datetime = dc_field( metadata=dc_config( field_name="created_at", @@ -2696,9 +3341,8 @@ class Flag(DataClassJsonMixin): mm_field=fields.DateTime(format="iso"), ) ) - created_by_automod: bool = dc_field( - metadata=dc_config(field_name="created_by_automod") - ) + entity_id: str = dc_field(metadata=dc_config(field_name="entity_id")) + entity_type: str = dc_field(metadata=dc_config(field_name="entity_type")) updated_at: datetime = dc_field( metadata=dc_config( field_name="updated_at", @@ -2707,53 +3351,30 @@ class Flag(DataClassJsonMixin): mm_field=fields.DateTime(format="iso"), ) ) - app_roved_at: Optional[datetime] = dc_field( - default=None, - metadata=dc_config( - field_name="approved_at", - encoder=encode_datetime, - decoder=datetime_from_unix_ns, - mm_field=fields.DateTime(format="iso"), - ), + result: "List[Dict[str, object]]" = dc_field( + metadata=dc_config(field_name="result") ) - reason: Optional[str] = dc_field( - default=None, metadata=dc_config(field_name="reason") + entity_creator_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="entity_creator_id") ) - rejected_at: Optional[datetime] = dc_field( - default=None, - metadata=dc_config( - field_name="rejected_at", - encoder=encode_datetime, - decoder=datetime_from_unix_ns, - mm_field=fields.DateTime(format="iso"), - ), + moderation_payload_hash: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="moderation_payload_hash") ) - reviewed_at: Optional[datetime] = dc_field( - default=None, - metadata=dc_config( - field_name="reviewed_at", - encoder=encode_datetime, - decoder=datetime_from_unix_ns, - mm_field=fields.DateTime(format="iso"), - ), + reason: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="reason") ) - reviewed_by: Optional[str] = dc_field( - default=None, metadata=dc_config(field_name="reviewed_by") + review_queue_item_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="review_queue_item_id") ) - target_message_id: Optional[str] = dc_field( - default=None, metadata=dc_config(field_name="target_message_id") + type: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="type")) + labels: Optional[List[str]] = dc_field( + default=None, metadata=dc_config(field_name="labels") ) custom: Optional[Dict[str, object]] = dc_field( default=None, metadata=dc_config(field_name="custom") ) - details: "Optional[FlagDetails]" = dc_field( - default=None, metadata=dc_config(field_name="details") - ) - target_message: "Optional[Message]" = dc_field( - default=None, metadata=dc_config(field_name="target_message") - ) - target_user: "Optional[UserObject]" = dc_field( - default=None, metadata=dc_config(field_name="target_user") + moderation_payload: "Optional[ModerationPayload]" = dc_field( + default=None, metadata=dc_config(field_name="moderation_payload") ) user: "Optional[UserObject]" = dc_field( default=None, metadata=dc_config(field_name="user") @@ -2801,14 +3422,11 @@ class FlagMessageDetails(DataClassJsonMixin): @dataclass class FlagRequest(DataClassJsonMixin): - reason: Optional[str] = dc_field( - default=None, metadata=dc_config(field_name="reason") - ) - target_message_id: Optional[str] = dc_field( - default=None, metadata=dc_config(field_name="target_message_id") - ) - target_user_id: Optional[str] = dc_field( - default=None, metadata=dc_config(field_name="target_user_id") + entity_id: str = dc_field(metadata=dc_config(field_name="entity_id")) + entity_type: str = dc_field(metadata=dc_config(field_name="entity_type")) + reason: str = dc_field(metadata=dc_config(field_name="reason")) + entity_creator_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="entity_creator_id") ) user_id: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="user_id") @@ -2816,6 +3434,9 @@ class FlagRequest(DataClassJsonMixin): custom: Optional[Dict[str, object]] = dc_field( default=None, metadata=dc_config(field_name="custom") ) + moderation_payload: "Optional[ModerationPayload]" = dc_field( + default=None, metadata=dc_config(field_name="moderation_payload") + ) user: "Optional[UserRequest]" = dc_field( default=None, metadata=dc_config(field_name="user") ) @@ -2824,9 +3445,7 @@ class FlagRequest(DataClassJsonMixin): @dataclass class FlagResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) - flag: "Optional[Flag]" = dc_field( - default=None, metadata=dc_config(field_name="flag") - ) + item_id: str = dc_field(metadata=dc_config(field_name="item_id")) @dataclass @@ -2868,7 +3487,9 @@ class FullUserResponse(DataClassJsonMixin): devices: "List[Optional[Device]]" = dc_field( metadata=dc_config(field_name="devices") ) - mutes: "List[Optional[UserMute]]" = dc_field(metadata=dc_config(field_name="mutes")) + mutes: "List[Optional[UserMuteResponse]]" = dc_field( + metadata=dc_config(field_name="mutes") + ) teams: List[str] = dc_field(metadata=dc_config(field_name="teams")) custom: Dict[str, object] = dc_field(metadata=dc_config(field_name="custom")) deactivated_at: Optional[datetime] = dc_field( @@ -2914,10 +3535,10 @@ class FullUserResponse(DataClassJsonMixin): latest_hidden_channels: Optional[List[str]] = dc_field( default=None, metadata=dc_config(field_name="latest_hidden_channels") ) - privacy_settings: "Optional[PrivacySettings]" = dc_field( + privacy_settings: "Optional[PrivacySettingsResponse]" = dc_field( default=None, metadata=dc_config(field_name="privacy_settings") ) - push_notifications: "Optional[PushNotificationSettings]" = dc_field( + push_notifications: "Optional[PushNotificationSettingsResponse]" = dc_field( default=None, metadata=dc_config(field_name="push_notifications") ) @@ -2976,7 +3597,7 @@ class GetApplicationResponse(DataClassJsonMixin): @dataclass class GetBlockListResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) - blocklist: "Optional[BlockList]" = dc_field( + blocklist: "Optional[BlockListResponse]" = dc_field( default=None, metadata=dc_config(field_name="blocklist") ) @@ -3022,13 +3643,16 @@ class GetCallStatsResponse(DataClassJsonMixin): metadata=dc_config(field_name="participant_report") ) sfus: "List[SFULocationResponse]" = dc_field(metadata=dc_config(field_name="sfus")) + aggregated: "Optional[AggregatedStats]" = dc_field( + default=None, metadata=dc_config(field_name="aggregated") + ) call_timeline: "Optional[CallTimeline]" = dc_field( default=None, metadata=dc_config(field_name="call_timeline") ) - jitter: "Optional[Stats]" = dc_field( + jitter: "Optional[TimeStats]" = dc_field( default=None, metadata=dc_config(field_name="jitter") ) - latency: "Optional[Stats]" = dc_field( + latency: "Optional[TimeStats]" = dc_field( default=None, metadata=dc_config(field_name="latency") ) @@ -3065,6 +3689,80 @@ class GetCallTypeResponse(DataClassJsonMixin): ) +@dataclass +class GetChannelTypeResponse(DataClassJsonMixin): + automod: str = dc_field(metadata=dc_config(field_name="automod")) + automod_behavior: str = dc_field(metadata=dc_config(field_name="automod_behavior")) + connect_events: bool = dc_field(metadata=dc_config(field_name="connect_events")) + created_at: datetime = dc_field( + metadata=dc_config( + field_name="created_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + custom_events: bool = dc_field(metadata=dc_config(field_name="custom_events")) + duration: str = dc_field(metadata=dc_config(field_name="duration")) + mark_messages_pending: bool = dc_field( + metadata=dc_config(field_name="mark_messages_pending") + ) + max_message_length: int = dc_field( + metadata=dc_config(field_name="max_message_length") + ) + mutes: bool = dc_field(metadata=dc_config(field_name="mutes")) + name: str = dc_field(metadata=dc_config(field_name="name")) + polls: bool = dc_field(metadata=dc_config(field_name="polls")) + push_notifications: bool = dc_field( + metadata=dc_config(field_name="push_notifications") + ) + quotes: bool = dc_field(metadata=dc_config(field_name="quotes")) + reactions: bool = dc_field(metadata=dc_config(field_name="reactions")) + read_events: bool = dc_field(metadata=dc_config(field_name="read_events")) + reminders: bool = dc_field(metadata=dc_config(field_name="reminders")) + replies: bool = dc_field(metadata=dc_config(field_name="replies")) + search: bool = dc_field(metadata=dc_config(field_name="search")) + typing_events: bool = dc_field(metadata=dc_config(field_name="typing_events")) + updated_at: datetime = dc_field( + metadata=dc_config( + field_name="updated_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + uploads: bool = dc_field(metadata=dc_config(field_name="uploads")) + url_enrichment: bool = dc_field(metadata=dc_config(field_name="url_enrichment")) + commands: "List[Optional[Command]]" = dc_field( + metadata=dc_config(field_name="commands") + ) + permissions: "List[PolicyRequest]" = dc_field( + metadata=dc_config(field_name="permissions") + ) + grants: "Dict[str, List[str]]" = dc_field(metadata=dc_config(field_name="grants")) + blocklist: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="blocklist") + ) + blocklist_behavior: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="blocklist_behavior") + ) + partition_size: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="partition_size") + ) + partition_ttl: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="partition_ttl") + ) + allowed_flag_reasons: Optional[List[str]] = dc_field( + default=None, metadata=dc_config(field_name="allowed_flag_reasons") + ) + blocklists: "Optional[List[BlockListOptions]]" = dc_field( + default=None, metadata=dc_config(field_name="blocklists") + ) + automod_thresholds: "Optional[Thresholds]" = dc_field( + default=None, metadata=dc_config(field_name="automod_thresholds") + ) + + @dataclass class GetCommandResponse(DataClassJsonMixin): args: str = dc_field(metadata=dc_config(field_name="args")) @@ -3092,6 +3790,14 @@ class GetCommandResponse(DataClassJsonMixin): ) +@dataclass +class GetConfigResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + config: "Optional[ConfigResponse]" = dc_field( + default=None, metadata=dc_config(field_name="config") + ) + + @dataclass class GetCustomPermissionResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) @@ -3167,13 +3873,13 @@ class GetOGResponse(DataClassJsonMixin): asset_url: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="asset_url") ) - auth_or_icon: Optional[str] = dc_field( + author_icon: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="author_icon") ) - auth_or_link: Optional[str] = dc_field( + author_link: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="author_link") ) - auth_or_name: Optional[str] = dc_field( + author_name: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="author_name") ) color: Optional[str] = dc_field( @@ -3234,6 +3940,9 @@ class GetOrCreateCallRequest(DataClassJsonMixin): default=None, metadata=dc_config(field_name="notify") ) ring: Optional[bool] = dc_field(default=None, metadata=dc_config(field_name="ring")) + video: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="video") + ) data: "Optional[CallRequest]" = dc_field( default=None, metadata=dc_config(field_name="data") ) @@ -3283,6 +3992,17 @@ class GetRepliesResponse(DataClassJsonMixin): ) +@dataclass +class GetReviewQueueItemResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + history: "List[ReviewQueueItem]" = dc_field( + metadata=dc_config(field_name="history") + ) + item: "Optional[ReviewQueueItem]" = dc_field( + default=None, metadata=dc_config(field_name="item") + ) + + @dataclass class GetTaskResponse(DataClassJsonMixin): created_at: datetime = dc_field( @@ -3318,6 +4038,18 @@ class GetThreadResponse(DataClassJsonMixin): thread: "ThreadStateResponse" = dc_field(metadata=dc_config(field_name="thread")) +@dataclass +class GetUserModerationReportResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + user_blocks: "List[Optional[UserBlock]]" = dc_field( + metadata=dc_config(field_name="user_blocks") + ) + user_mutes: "List[Optional[UserMute]]" = dc_field( + metadata=dc_config(field_name="user_mutes") + ) + user: "UserResponse" = dc_field(metadata=dc_config(field_name="user")) + + @dataclass class GoLiveRequest(DataClassJsonMixin): recording_storage_name: Optional[str] = dc_field( @@ -3329,6 +4061,9 @@ class GoLiveRequest(DataClassJsonMixin): start_recording: Optional[bool] = dc_field( default=None, metadata=dc_config(field_name="start_recording") ) + start_rtmp_broadcasts: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="start_rtmp_broadcasts") + ) start_transcription: Optional[bool] = dc_field( default=None, metadata=dc_config(field_name="start_transcription") ) @@ -3343,6 +4078,13 @@ class GoLiveResponse(DataClassJsonMixin): call: "CallResponse" = dc_field(metadata=dc_config(field_name="call")) +@dataclass +class GoogleVisionConfig(DataClassJsonMixin): + enabled: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="enabled") + ) + + @dataclass class HLSSettings(DataClassJsonMixin): auto_on: bool = dc_field(metadata=dc_config(field_name="auto_on")) @@ -3621,7 +4363,7 @@ class LimitsSettingsResponse(DataClassJsonMixin): @dataclass class ListBlockListResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) - blocklists: "List[Optional[BlockList]]" = dc_field( + blocklists: "List[Optional[BlockListResponse]]" = dc_field( metadata=dc_config(field_name="blocklists") ) @@ -4001,7 +4743,7 @@ class MessageChangeSet(DataClassJsonMixin): @dataclass -class MessageFlag(DataClassJsonMixin): +class MessageFlagResponse(DataClassJsonMixin): created_at: datetime = dc_field( metadata=dc_config( field_name="created_at", @@ -4021,7 +4763,7 @@ class MessageFlag(DataClassJsonMixin): mm_field=fields.DateTime(format="iso"), ) ) - app_roved_at: Optional[datetime] = dc_field( + approved_at: Optional[datetime] = dc_field( default=None, metadata=dc_config( field_name="approved_at", @@ -4066,16 +4808,16 @@ class MessageFlag(DataClassJsonMixin): moderation_result: "Optional[MessageModerationResult]" = dc_field( default=None, metadata=dc_config(field_name="moderation_result") ) - reviewed_by: "Optional[UserObject]" = dc_field( + reviewed_by: "Optional[UserResponse]" = dc_field( default=None, metadata=dc_config(field_name="reviewed_by") ) - user: "Optional[UserObject]" = dc_field( + user: "Optional[UserResponse]" = dc_field( default=None, metadata=dc_config(field_name="user") ) @dataclass -class MessageHistoryEntry(DataClassJsonMixin): +class MessageHistoryEntryResponse(DataClassJsonMixin): message_id: str = dc_field(metadata=dc_config(field_name="message_id")) message_updated_at: datetime = dc_field( metadata=dc_config( @@ -4157,7 +4899,7 @@ class MessageReadEvent(DataClassJsonMixin): default=None, metadata=dc_config(field_name="last_read_message_id") ) team: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="team")) - thread: "Optional[Thread]" = dc_field( + thread: "Optional[ThreadResponse]" = dc_field( default=None, metadata=dc_config(field_name="thread") ) user: "Optional[UserObject]" = dc_field( @@ -4486,6 +5228,41 @@ class MessageWithChannelResponse(DataClassJsonMixin): ) +@dataclass +class ModerationActionConfig(DataClassJsonMixin): + action: str = dc_field(metadata=dc_config(field_name="action")) + description: str = dc_field(metadata=dc_config(field_name="description")) + entity_type: str = dc_field(metadata=dc_config(field_name="entity_type")) + icon: str = dc_field(metadata=dc_config(field_name="icon")) + order: int = dc_field(metadata=dc_config(field_name="order")) + custom: Dict[str, object] = dc_field(metadata=dc_config(field_name="custom")) + + +@dataclass +class ModerationPayload(DataClassJsonMixin): + created_at: Optional[datetime] = dc_field( + default=None, + metadata=dc_config( + field_name="created_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ), + ) + images: Optional[List[str]] = dc_field( + default=None, metadata=dc_config(field_name="images") + ) + texts: Optional[List[str]] = dc_field( + default=None, metadata=dc_config(field_name="texts") + ) + videos: Optional[List[str]] = dc_field( + default=None, metadata=dc_config(field_name="videos") + ) + custom: Optional[Dict[str, object]] = dc_field( + default=None, metadata=dc_config(field_name="custom") + ) + + @dataclass class ModerationResponse(DataClassJsonMixin): action: str = dc_field(metadata=dc_config(field_name="action")) @@ -4494,6 +5271,38 @@ class ModerationResponse(DataClassJsonMixin): toxic: float = dc_field(metadata=dc_config(field_name="toxic")) +@dataclass +class ModerationUsageStats(DataClassJsonMixin): + bucket: str = dc_field(metadata=dc_config(field_name="bucket")) + metric: str = dc_field(metadata=dc_config(field_name="metric")) + updated_at: datetime = dc_field( + metadata=dc_config( + field_name="updated_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + value: int = dc_field(metadata=dc_config(field_name="value")) + + +@dataclass +class ModeratorStats(DataClassJsonMixin): + id: str = dc_field(metadata=dc_config(field_name="id")) + items_reviewed: int = dc_field(metadata=dc_config(field_name="items_reviewed")) + action_counts: "Dict[str, int]" = dc_field( + metadata=dc_config(field_name="action_counts") + ) + + +@dataclass +class ModeratorStatsResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + moderator_stats: "List[Optional[ModeratorStats]]" = dc_field( + metadata=dc_config(field_name="moderator_stats") + ) + + @dataclass class MuteChannelRequest(DataClassJsonMixin): expiration: Optional[int] = dc_field( @@ -4525,21 +5334,21 @@ class MuteChannelResponse(DataClassJsonMixin): @dataclass -class MuteUserRequest(DataClassJsonMixin): - timeout: int = dc_field(metadata=dc_config(field_name="timeout")) +class MuteRequest(DataClassJsonMixin): + target_ids: List[str] = dc_field(metadata=dc_config(field_name="target_ids")) + timeout: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="timeout") + ) user_id: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="user_id") ) - target_ids: Optional[List[str]] = dc_field( - default=None, metadata=dc_config(field_name="target_ids") - ) user: "Optional[UserRequest]" = dc_field( default=None, metadata=dc_config(field_name="user") ) @dataclass -class MuteUserResponse(DataClassJsonMixin): +class MuteResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) mutes: "Optional[List[Optional[UserMute]]]" = dc_field( default=None, metadata=dc_config(field_name="mutes") @@ -4547,9 +5356,6 @@ class MuteUserResponse(DataClassJsonMixin): non_existing_users: Optional[List[str]] = dc_field( default=None, metadata=dc_config(field_name="non_existing_users") ) - mute: "Optional[UserMute]" = dc_field( - default=None, metadata=dc_config(field_name="mute") - ) own_user: "Optional[OwnUser]" = dc_field( default=None, metadata=dc_config(field_name="own_user") ) @@ -4925,6 +5731,15 @@ class PollOptionInput(DataClassJsonMixin): ) +@dataclass +class PollOptionRequest(DataClassJsonMixin): + id: str = dc_field(metadata=dc_config(field_name="id")) + text: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="text")) + custom: Optional[Dict[str, object]] = dc_field( + default=None, metadata=dc_config(field_name="custom") + ) + + @dataclass class PollOptionResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) @@ -4999,7 +5814,7 @@ class PollResponseData(DataClassJsonMixin): max_votes_allowed: Optional[int] = dc_field( default=None, metadata=dc_config(field_name="max_votes_allowed") ) - created_by: "Optional[UserObject]" = dc_field( + created_by: "Optional[UserResponse]" = dc_field( default=None, metadata=dc_config(field_name="created_by") ) @@ -5077,7 +5892,7 @@ class PollVoteResponseData(DataClassJsonMixin): user_id: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="user_id") ) - user: "Optional[UserObject]" = dc_field( + user: "Optional[UserResponse]" = dc_field( default=None, metadata=dc_config(field_name="user") ) @@ -5102,6 +5917,16 @@ class PrivacySettings(DataClassJsonMixin): ) +@dataclass +class PrivacySettingsResponse(DataClassJsonMixin): + read_receipts: "Optional[ReadReceiptsResponse]" = dc_field( + default=None, metadata=dc_config(field_name="read_receipts") + ) + typing_indicators: "Optional[TypingIndicatorsResponse]" = dc_field( + default=None, metadata=dc_config(field_name="typing_indicators") + ) + + @dataclass class PublishedTrackInfo(DataClassJsonMixin): codec_mime_type: Optional[str] = dc_field( @@ -5115,6 +5940,16 @@ class PublishedTrackInfo(DataClassJsonMixin): ) +@dataclass +class PublisherAggregateStats(DataClassJsonMixin): + by_track_type: "Optional[Dict[str, Count]]" = dc_field( + default=None, metadata=dc_config(field_name="by_track_type") + ) + total: "Optional[Count]" = dc_field( + default=None, metadata=dc_config(field_name="total") + ) + + @dataclass class PushConfig(DataClassJsonMixin): version: str = dc_field(metadata=dc_config(field_name="version")) @@ -5164,6 +5999,22 @@ class PushNotificationSettingsInput(DataClassJsonMixin): ) +@dataclass +class PushNotificationSettingsResponse(DataClassJsonMixin): + disabled: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="disabled") + ) + disabled_until: Optional[datetime] = dc_field( + default=None, + metadata=dc_config( + field_name="disabled_until", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ), + ) + + @dataclass class PushProvider(DataClassJsonMixin): created_at: datetime = dc_field( @@ -5375,7 +6226,7 @@ class QueryBannedUsersRequest(DataClassJsonMixin): user_id: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="user_id") ) - sort: "Optional[List[Optional[SortParam]]]" = dc_field( + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( default=None, metadata=dc_config(field_name="sort") ) user: "Optional[UserRequest]" = dc_field( @@ -5400,7 +6251,7 @@ class QueryCallMembersRequest(DataClassJsonMixin): ) next: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="next")) prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) - sort: "Optional[List[Optional[SortParam]]]" = dc_field( + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( default=None, metadata=dc_config(field_name="sort") ) filter_conditions: Optional[Dict[str, object]] = dc_field( @@ -5423,7 +6274,7 @@ class QueryCallStatsRequest(DataClassJsonMixin): ) next: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="next")) prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) - sort: "Optional[List[Optional[SortParam]]]" = dc_field( + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( default=None, metadata=dc_config(field_name="sort") ) filter_conditions: Optional[Dict[str, object]] = dc_field( @@ -5448,7 +6299,7 @@ class QueryCallsRequest(DataClassJsonMixin): ) next: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="next")) prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) - sort: "Optional[List[Optional[SortParam]]]" = dc_field( + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( default=None, metadata=dc_config(field_name="sort") ) filter_conditions: Optional[Dict[str, object]] = dc_field( @@ -5486,7 +6337,7 @@ class QueryChannelsRequest(DataClassJsonMixin): user_id: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="user_id") ) - sort: "Optional[List[Optional[SortParam]]]" = dc_field( + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( default=None, metadata=dc_config(field_name="sort") ) filter_conditions: Optional[Dict[str, object]] = dc_field( @@ -5505,6 +6356,38 @@ class QueryChannelsResponse(DataClassJsonMixin): ) +@dataclass +class QueryFeedModerationTemplate(DataClassJsonMixin): + created_at: datetime = dc_field( + metadata=dc_config( + field_name="created_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + name: str = dc_field(metadata=dc_config(field_name="name")) + updated_at: datetime = dc_field( + metadata=dc_config( + field_name="updated_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + config: "Optional[FeedsModerationTemplateConfig]" = dc_field( + default=None, metadata=dc_config(field_name="config") + ) + + +@dataclass +class QueryFeedModerationTemplatesResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + templates: "List[QueryFeedModerationTemplate]" = dc_field( + metadata=dc_config(field_name="templates") + ) + + @dataclass class QueryMembersRequest(DataClassJsonMixin): type: str = dc_field(metadata=dc_config(field_name="type")) @@ -5524,7 +6407,7 @@ class QueryMembersRequest(DataClassJsonMixin): members: "Optional[List[Optional[ChannelMember]]]" = dc_field( default=None, metadata=dc_config(field_name="members") ) - sort: "Optional[List[Optional[SortParam]]]" = dc_field( + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( default=None, metadata=dc_config(field_name="sort") ) user: "Optional[UserRequest]" = dc_field( @@ -5560,7 +6443,7 @@ class QueryMessageFlagsRequest(DataClassJsonMixin): @dataclass class QueryMessageFlagsResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) - flags: "List[Optional[MessageFlag]]" = dc_field( + flags: "List[Optional[MessageFlagResponse]]" = dc_field( metadata=dc_config(field_name="flags") ) @@ -5573,7 +6456,7 @@ class QueryMessageHistoryRequest(DataClassJsonMixin): ) next: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="next")) prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) - sort: "Optional[List[Optional[SortParam]]]" = dc_field( + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( default=None, metadata=dc_config(field_name="sort") ) @@ -5581,13 +6464,42 @@ class QueryMessageHistoryRequest(DataClassJsonMixin): @dataclass class QueryMessageHistoryResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) - message_history: "List[Optional[MessageHistoryEntry]]" = dc_field( + message_history: "List[Optional[MessageHistoryEntryResponse]]" = dc_field( metadata=dc_config(field_name="message_history") ) next: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="next")) prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) +@dataclass +class QueryModerationLogsRequest(DataClassJsonMixin): + limit: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="limit") + ) + next: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="next")) + prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) + user_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="user_id") + ) + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( + default=None, metadata=dc_config(field_name="sort") + ) + filter: Optional[Dict[str, object]] = dc_field( + default=None, metadata=dc_config(field_name="filter") + ) + user: "Optional[UserRequest]" = dc_field( + default=None, metadata=dc_config(field_name="user") + ) + + +@dataclass +class QueryModerationLogsResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + l_og_s: "List[ActionLogResponse]" = dc_field(metadata=dc_config(field_name="logs")) + next: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="next")) + prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) + + @dataclass class QueryPollVotesRequest(DataClassJsonMixin): limit: Optional[int] = dc_field( @@ -5595,7 +6507,7 @@ class QueryPollVotesRequest(DataClassJsonMixin): ) next: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="next")) prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) - sort: "Optional[List[Optional[SortParam]]]" = dc_field( + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( default=None, metadata=dc_config(field_name="sort") ) filter: Optional[Dict[str, object]] = dc_field( @@ -5610,7 +6522,7 @@ class QueryPollsRequest(DataClassJsonMixin): ) next: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="next")) prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) - sort: "Optional[List[Optional[SortParam]]]" = dc_field( + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( default=None, metadata=dc_config(field_name="sort") ) filter: Optional[Dict[str, object]] = dc_field( @@ -5636,7 +6548,7 @@ class QueryReactionsRequest(DataClassJsonMixin): user_id: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="user_id") ) - sort: "Optional[List[Optional[SortParam]]]" = dc_field( + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( default=None, metadata=dc_config(field_name="sort") ) filter: Optional[Dict[str, object]] = dc_field( @@ -5657,6 +6569,48 @@ class QueryReactionsResponse(DataClassJsonMixin): prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) +@dataclass +class QueryReviewQueueRequest(DataClassJsonMixin): + limit: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="limit") + ) + lock_moderator_duration: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="lock_moderator_duration") + ) + lock_moderator_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="lock_moderator_id") + ) + next: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="next")) + prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) + stats_only: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="stats_only") + ) + user_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="user_id") + ) + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( + default=None, metadata=dc_config(field_name="sort") + ) + filter: Optional[Dict[str, object]] = dc_field( + default=None, metadata=dc_config(field_name="filter") + ) + user: "Optional[UserRequest]" = dc_field( + default=None, metadata=dc_config(field_name="user") + ) + + +@dataclass +class QueryReviewQueueResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + items: "List[ReviewQueueItem]" = dc_field(metadata=dc_config(field_name="items")) + action_config: "Dict[str, List[Optional[ModerationActionConfig]]]" = dc_field( + metadata=dc_config(field_name="action_config") + ) + stats: "Dict[str, int]" = dc_field(metadata=dc_config(field_name="stats")) + next: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="next")) + prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) + + @dataclass class QueryThreadsRequest(DataClassJsonMixin): limit: Optional[int] = dc_field( @@ -5691,6 +6645,37 @@ class QueryThreadsResponse(DataClassJsonMixin): prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) +@dataclass +class QueryUsageStatsRequest(DataClassJsonMixin): + limit: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="limit") + ) + next: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="next")) + prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) + user_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="user_id") + ) + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( + default=None, metadata=dc_config(field_name="sort") + ) + filter: Optional[Dict[str, object]] = dc_field( + default=None, metadata=dc_config(field_name="filter") + ) + user: "Optional[UserRequest]" = dc_field( + default=None, metadata=dc_config(field_name="user") + ) + + +@dataclass +class QueryUsageStatsResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + items: "List[Optional[ModerationUsageStats]]" = dc_field( + metadata=dc_config(field_name="items") + ) + next: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="next")) + prev: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="prev")) + + @dataclass class QueryUsersPayload(DataClassJsonMixin): filter_conditions: Dict[str, object] = dc_field( @@ -5711,7 +6696,7 @@ class QueryUsersPayload(DataClassJsonMixin): user_id: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="user_id") ) - sort: "Optional[List[Optional[SortParam]]]" = dc_field( + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( default=None, metadata=dc_config(field_name="sort") ) user: "Optional[UserRequest]" = dc_field( @@ -5725,11 +6710,78 @@ class QueryUsersResponse(DataClassJsonMixin): users: "List[FullUserResponse]" = dc_field(metadata=dc_config(field_name="users")) +@dataclass +class QueueStatsResponse(DataClassJsonMixin): + avg_time_to_action: int = dc_field( + metadata=dc_config(field_name="avg_time_to_action") + ) + duration: str = dc_field(metadata=dc_config(field_name="duration")) + time_to_action_buckets: "Dict[str, int]" = dc_field( + metadata=dc_config(field_name="time_to_action_buckets") + ) + + +@dataclass +class RTMPBroadcastRequest(DataClassJsonMixin): + name: str = dc_field(metadata=dc_config(field_name="name")) + stream_url: str = dc_field(metadata=dc_config(field_name="stream_url")) + quality: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="quality") + ) + stream_key: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="stream_key") + ) + layout: "Optional[LayoutSettingsRequest]" = dc_field( + default=None, metadata=dc_config(field_name="layout") + ) + + @dataclass class RTMPIngress(DataClassJsonMixin): address: str = dc_field(metadata=dc_config(field_name="address")) +@dataclass +class RTMPLocation(DataClassJsonMixin): + name: str = dc_field(metadata=dc_config(field_name="name")) + stream_key: str = dc_field(metadata=dc_config(field_name="stream_key")) + stream_url: str = dc_field(metadata=dc_config(field_name="stream_url")) + + +@dataclass +class RTMPSettings(DataClassJsonMixin): + enabled: bool = dc_field(metadata=dc_config(field_name="enabled")) + quality_name: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="quality_name") + ) + layout: "Optional[LayoutSettings]" = dc_field( + default=None, metadata=dc_config(field_name="layout") + ) + location: "Optional[RTMPLocation]" = dc_field( + default=None, metadata=dc_config(field_name="location") + ) + + +@dataclass +class RTMPSettingsRequest(DataClassJsonMixin): + enabled: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="enabled") + ) + quality: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="quality") + ) + layout: "Optional[LayoutSettingsRequest]" = dc_field( + default=None, metadata=dc_config(field_name="layout") + ) + + +@dataclass +class RTMPSettingsResponse(DataClassJsonMixin): + enabled: bool = dc_field(metadata=dc_config(field_name="enabled")) + quality: str = dc_field(metadata=dc_config(field_name="quality")) + layout: "LayoutSettingsResponse" = dc_field(metadata=dc_config(field_name="layout")) + + @dataclass class Reaction(DataClassJsonMixin): created_at: datetime = dc_field( @@ -5868,7 +6920,7 @@ class ReactivateUserRequest(DataClassJsonMixin): @dataclass class ReactivateUserResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) - user: "Optional[UserObject]" = dc_field( + user: "Optional[UserResponse]" = dc_field( default=None, metadata=dc_config(field_name="user") ) @@ -5919,6 +6971,11 @@ class ReadReceipts(DataClassJsonMixin): ) +@dataclass +class ReadReceiptsResponse(DataClassJsonMixin): + enabled: bool = dc_field(metadata=dc_config(field_name="enabled")) + + @dataclass class ReadStateResponse(DataClassJsonMixin): last_read: datetime = dc_field( @@ -5973,11 +7030,78 @@ class Response(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) +@dataclass +class RestoreActionRequest(DataClassJsonMixin): + pass + + @dataclass class RestoreUsersRequest(DataClassJsonMixin): user_ids: List[str] = dc_field(metadata=dc_config(field_name="user_ids")) +@dataclass +class ReviewQueueItem(DataClassJsonMixin): + content_changed: bool = dc_field(metadata=dc_config(field_name="content_changed")) + created_at: datetime = dc_field( + metadata=dc_config( + field_name="created_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + entity_id: str = dc_field(metadata=dc_config(field_name="entity_id")) + entity_type: str = dc_field(metadata=dc_config(field_name="entity_type")) + has_image: bool = dc_field(metadata=dc_config(field_name="has_image")) + has_text: bool = dc_field(metadata=dc_config(field_name="has_text")) + has_video: bool = dc_field(metadata=dc_config(field_name="has_video")) + id: str = dc_field(metadata=dc_config(field_name="id")) + moderation_payload_hash: str = dc_field( + metadata=dc_config(field_name="moderation_payload_hash") + ) + recommended_action: str = dc_field( + metadata=dc_config(field_name="recommended_action") + ) + reviewed_by: str = dc_field(metadata=dc_config(field_name="reviewed_by")) + severity: int = dc_field(metadata=dc_config(field_name="severity")) + status: str = dc_field(metadata=dc_config(field_name="status")) + updated_at: datetime = dc_field( + metadata=dc_config( + field_name="updated_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + actions: "List[Optional[ActionLog]]" = dc_field( + metadata=dc_config(field_name="actions") + ) + bans: "List[Optional[Ban]]" = dc_field(metadata=dc_config(field_name="bans")) + flags: "List[Optional[Flag2]]" = dc_field(metadata=dc_config(field_name="flags")) + languages: List[str] = dc_field(metadata=dc_config(field_name="languages")) + completed_at: "NullTime" = dc_field(metadata=dc_config(field_name="completed_at")) + reviewed_at: "NullTime" = dc_field(metadata=dc_config(field_name="reviewed_at")) + assigned_to: "Optional[UserObject]" = dc_field( + default=None, metadata=dc_config(field_name="assigned_to") + ) + entity_creator: "Optional[UserObject]" = dc_field( + default=None, metadata=dc_config(field_name="entity_creator") + ) + feeds_v2_activity: "Optional[EnrichedActivity]" = dc_field( + default=None, metadata=dc_config(field_name="feeds_v2_activity") + ) + feeds_v2_reaction: "Optional[Reaction]" = dc_field( + default=None, metadata=dc_config(field_name="feeds_v2_reaction") + ) + message: "Optional[Message]" = dc_field( + default=None, metadata=dc_config(field_name="message") + ) + moderation_payload: "Optional[ModerationPayload]" = dc_field( + default=None, metadata=dc_config(field_name="moderation_payload") + ) + + @dataclass class RingSettings(DataClassJsonMixin): auto_cancel_timeout_ms: int = dc_field( @@ -6109,7 +7233,7 @@ class SearchRequest(DataClassJsonMixin): query: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="query") ) - sort: "Optional[List[Optional[SortParam]]]" = dc_field( + sort: "Optional[List[Optional[SortParamRequest]]]" = dc_field( default=None, metadata=dc_config(field_name="sort") ) message_filter_conditions: Optional[Dict[str, object]] = dc_field( @@ -6387,6 +7511,16 @@ class SortParam(DataClassJsonMixin): ) +@dataclass +class SortParamRequest(DataClassJsonMixin): + direction: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="direction") + ) + field: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="field") + ) + + @dataclass class StartHLSBroadcastingRequest(DataClassJsonMixin): pass @@ -6398,6 +7532,18 @@ class StartHLSBroadcastingResponse(DataClassJsonMixin): playlist_url: str = dc_field(metadata=dc_config(field_name="playlist_url")) +@dataclass +class StartRTMPBroadcastsRequest(DataClassJsonMixin): + broadcasts: "List[RTMPBroadcastRequest]" = dc_field( + metadata=dc_config(field_name="broadcasts") + ) + + +@dataclass +class StartRTMPBroadcastsResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + + @dataclass class StartRecordingRequest(DataClassJsonMixin): recording_external_storage: Optional[str] = dc_field( @@ -6423,9 +7569,13 @@ class StartTranscriptionResponse(DataClassJsonMixin): @dataclass -class Stats(DataClassJsonMixin): - average_seconds: float = dc_field(metadata=dc_config(field_name="average_seconds")) - max_seconds: float = dc_field(metadata=dc_config(field_name="max_seconds")) +class StopAllRTMPBroadcastsRequest(DataClassJsonMixin): + pass + + +@dataclass +class StopAllRTMPBroadcastsResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) @dataclass @@ -6449,6 +7599,16 @@ class StopLiveResponse(DataClassJsonMixin): call: "CallResponse" = dc_field(metadata=dc_config(field_name="call")) +@dataclass +class StopRTMPBroadcastsRequest(DataClassJsonMixin): + pass + + +@dataclass +class StopRTMPBroadcastsResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + + @dataclass class StopRecordingRequest(DataClassJsonMixin): pass @@ -6460,13 +7620,51 @@ class StopRecordingResponse(DataClassJsonMixin): @dataclass -class StopTranscriptionRequest(DataClassJsonMixin): - pass +class StopTranscriptionRequest(DataClassJsonMixin): + pass + + +@dataclass +class StopTranscriptionResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + + +@dataclass +class SubmitActionRequest(DataClassJsonMixin): + action_type: str = dc_field(metadata=dc_config(field_name="action_type")) + item_id: str = dc_field(metadata=dc_config(field_name="item_id")) + user_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="user_id") + ) + ban: "Optional[BanActionRequest]" = dc_field( + default=None, metadata=dc_config(field_name="ban") + ) + custom: "Optional[CustomActionRequest]" = dc_field( + default=None, metadata=dc_config(field_name="custom") + ) + delete_message: "Optional[DeleteMessageRequest]" = dc_field( + default=None, metadata=dc_config(field_name="delete_message") + ) + delete_reaction: "Optional[DeleteReactionRequest]" = dc_field( + default=None, metadata=dc_config(field_name="delete_reaction") + ) + delete_user: "Optional[DeleteUserRequest]" = dc_field( + default=None, metadata=dc_config(field_name="delete_user") + ) + unban: "Optional[UnbanActionRequest]" = dc_field( + default=None, metadata=dc_config(field_name="unban") + ) + user: "Optional[UserRequest]" = dc_field( + default=None, metadata=dc_config(field_name="user") + ) @dataclass -class StopTranscriptionResponse(DataClassJsonMixin): +class SubmitActionResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) + item: "Optional[ReviewQueueItem]" = dc_field( + default=None, metadata=dc_config(field_name="item") + ) @dataclass @@ -6479,6 +7677,16 @@ class Subsession(DataClassJsonMixin): ) +@dataclass +class TURNAggregatedStats(DataClassJsonMixin): + tcp: "Optional[Count]" = dc_field( + default=None, metadata=dc_config(field_name="tcp") + ) + total: "Optional[Count]" = dc_field( + default=None, metadata=dc_config(field_name="total") + ) + + @dataclass class TargetResolution(DataClassJsonMixin): bitrate: int = dc_field(metadata=dc_config(field_name="bitrate")) @@ -6486,68 +7694,6 @@ class TargetResolution(DataClassJsonMixin): width: int = dc_field(metadata=dc_config(field_name="width")) -@dataclass -class Thread(DataClassJsonMixin): - channel_cid: str = dc_field(metadata=dc_config(field_name="channel_cid")) - created_at: datetime = dc_field( - metadata=dc_config( - field_name="created_at", - encoder=encode_datetime, - decoder=datetime_from_unix_ns, - mm_field=fields.DateTime(format="iso"), - ) - ) - parent_message_id: str = dc_field( - metadata=dc_config(field_name="parent_message_id") - ) - title: str = dc_field(metadata=dc_config(field_name="title")) - updated_at: datetime = dc_field( - metadata=dc_config( - field_name="updated_at", - encoder=encode_datetime, - decoder=datetime_from_unix_ns, - mm_field=fields.DateTime(format="iso"), - ) - ) - custom: Dict[str, object] = dc_field(metadata=dc_config(field_name="custom")) - deleted_at: Optional[datetime] = dc_field( - default=None, - metadata=dc_config( - field_name="deleted_at", - encoder=encode_datetime, - decoder=datetime_from_unix_ns, - mm_field=fields.DateTime(format="iso"), - ), - ) - last_message_at: Optional[datetime] = dc_field( - default=None, - metadata=dc_config( - field_name="last_message_at", - encoder=encode_datetime, - decoder=datetime_from_unix_ns, - mm_field=fields.DateTime(format="iso"), - ), - ) - participant_count: Optional[int] = dc_field( - default=None, metadata=dc_config(field_name="participant_count") - ) - reply_count: Optional[int] = dc_field( - default=None, metadata=dc_config(field_name="reply_count") - ) - thread_participants: "Optional[List[Optional[ThreadParticipant]]]" = dc_field( - default=None, metadata=dc_config(field_name="thread_participants") - ) - channel: "Optional[Channel]" = dc_field( - default=None, metadata=dc_config(field_name="channel") - ) - created_by: "Optional[UserObject]" = dc_field( - default=None, metadata=dc_config(field_name="created_by") - ) - parent_message: "Optional[Message]" = dc_field( - default=None, metadata=dc_config(field_name="parent_message") - ) - - @dataclass class ThreadParticipant(DataClassJsonMixin): app_pk: int = dc_field(metadata=dc_config(field_name="app_pk")) @@ -6625,6 +7771,9 @@ class ThreadResponse(DataClassJsonMixin): ) ) custom: Dict[str, object] = dc_field(metadata=dc_config(field_name="custom")) + active_participant_count: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="active_participant_count") + ) deleted_at: Optional[datetime] = dc_field( default=None, metadata=dc_config( @@ -6690,6 +7839,9 @@ class ThreadState(DataClassJsonMixin): metadata=dc_config(field_name="latest_replies") ) custom: Dict[str, object] = dc_field(metadata=dc_config(field_name="custom")) + active_participant_count: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="active_participant_count") + ) deleted_at: Optional[datetime] = dc_field( default=None, metadata=dc_config( @@ -6761,6 +7913,9 @@ class ThreadStateResponse(DataClassJsonMixin): metadata=dc_config(field_name="latest_replies") ) custom: Dict[str, object] = dc_field(metadata=dc_config(field_name="custom")) + active_participant_count: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="active_participant_count") + ) deleted_at: Optional[datetime] = dc_field( default=None, metadata=dc_config( @@ -6794,7 +7949,7 @@ class ThreadStateResponse(DataClassJsonMixin): channel: "Optional[ChannelResponse]" = dc_field( default=None, metadata=dc_config(field_name="channel") ) - created_by: "Optional[UserObject]" = dc_field( + created_by: "Optional[UserResponse]" = dc_field( default=None, metadata=dc_config(field_name="created_by") ) parent_message: "Optional[Message]" = dc_field( @@ -6837,6 +7992,17 @@ class ThumbnailsSettingsResponse(DataClassJsonMixin): enabled: bool = dc_field(metadata=dc_config(field_name="enabled")) +@dataclass +class Time(DataClassJsonMixin): + pass + + +@dataclass +class TimeStats(DataClassJsonMixin): + average_seconds: float = dc_field(metadata=dc_config(field_name="average_seconds")) + max_seconds: float = dc_field(metadata=dc_config(field_name="max_seconds")) + + @dataclass class TranscriptionSettings(DataClassJsonMixin): closed_caption_mode: str = dc_field( @@ -6917,6 +8083,36 @@ class TypingIndicators(DataClassJsonMixin): ) +@dataclass +class TypingIndicatorsResponse(DataClassJsonMixin): + enabled: bool = dc_field(metadata=dc_config(field_name="enabled")) + + +@dataclass +class UnbanActionRequest(DataClassJsonMixin): + pass + + +@dataclass +class UnbanRequest(DataClassJsonMixin): + unbanned_by_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="unbanned_by_id") + ) + unbanned_by: "Optional[UserRequest]" = dc_field( + default=None, metadata=dc_config(field_name="unbanned_by") + ) + + +@dataclass +class UnbanResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + + +@dataclass +class UnblockActionRequest(DataClassJsonMixin): + pass + + @dataclass class UnblockUserRequest(DataClassJsonMixin): user_id: str = dc_field(metadata=dc_config(field_name="user_id")) @@ -6960,27 +8156,24 @@ class UnmuteChannelRequest(DataClassJsonMixin): @dataclass -class UnmuteResponse(DataClassJsonMixin): - duration: str = dc_field(metadata=dc_config(field_name="duration")) - non_existing_users: Optional[List[str]] = dc_field( - default=None, metadata=dc_config(field_name="non_existing_users") - ) - - -@dataclass -class UnmuteUserRequest(DataClassJsonMixin): - timeout: int = dc_field(metadata=dc_config(field_name="timeout")) +class UnmuteRequest(DataClassJsonMixin): + target_ids: List[str] = dc_field(metadata=dc_config(field_name="target_ids")) user_id: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="user_id") ) - target_ids: Optional[List[str]] = dc_field( - default=None, metadata=dc_config(field_name="target_ids") - ) user: "Optional[UserRequest]" = dc_field( default=None, metadata=dc_config(field_name="user") ) +@dataclass +class UnmuteResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + non_existing_users: Optional[List[str]] = dc_field( + default=None, metadata=dc_config(field_name="non_existing_users") + ) + + @dataclass class UnpinRequest(DataClassJsonMixin): session_id: str = dc_field(metadata=dc_config(field_name="session_id")) @@ -7093,12 +8286,24 @@ class UpdateAppRequest(DataClassJsonMixin): enforce_unique_usernames: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="enforce_unique_usernames") ) + feeds_moderation_enabled: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="feeds_moderation_enabled") + ) + feeds_v2_region: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="feeds_v2_region") + ) image_moderation_enabled: Optional[bool] = dc_field( default=None, metadata=dc_config(field_name="image_moderation_enabled") ) migrate_permissions_to_v2: Optional[bool] = dc_field( default=None, metadata=dc_config(field_name="migrate_permissions_to_v2") ) + moderation_enabled: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="moderation_enabled") + ) + moderation_webhook_url: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="moderation_webhook_url") + ) multi_tenant_enabled: Optional[bool] = dc_field( default=None, metadata=dc_config(field_name="multi_tenant_enabled") ) @@ -7144,6 +8349,9 @@ class UpdateAppRequest(DataClassJsonMixin): webhook_url: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="webhook_url") ) + allowed_flag_reasons: Optional[List[str]] = dc_field( + default=None, metadata=dc_config(field_name="allowed_flag_reasons") + ) image_moderation_block_labels: Optional[List[str]] = dc_field( default=None, metadata=dc_config(field_name="image_moderation_block_labels") ) @@ -7313,7 +8521,7 @@ class UpdateChannelPartialRequest(DataClassJsonMixin): @dataclass class UpdateChannelPartialResponse(DataClassJsonMixin): duration: str = dc_field(metadata=dc_config(field_name="duration")) - members: "List[Optional[ChannelMember]]" = dc_field( + members: "List[Optional[ChannelMemberResponse]]" = dc_field( metadata=dc_config(field_name="members") ) channel: "Optional[ChannelResponse]" = dc_field( @@ -7409,6 +8617,12 @@ class UpdateChannelTypeRequest(DataClassJsonMixin): mutes: Optional[bool] = dc_field( default=None, metadata=dc_config(field_name="mutes") ) + partition_size: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="partition_size") + ) + partition_ttl: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="partition_ttl") + ) polls: Optional[bool] = dc_field( default=None, metadata=dc_config(field_name="polls") ) @@ -7517,6 +8731,12 @@ class UpdateChannelTypeResponse(DataClassJsonMixin): blocklist_behavior: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="blocklist_behavior") ) + partition_size: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="partition_size") + ) + partition_ttl: Optional[int] = dc_field( + default=None, metadata=dc_config(field_name="partition_ttl") + ) allowed_flag_reasons: Optional[List[str]] = dc_field( default=None, metadata=dc_config(field_name="allowed_flag_reasons") ) @@ -7674,7 +8894,7 @@ class UpdatePollRequest(DataClassJsonMixin): voting_visibility: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="voting_visibility") ) - options: "Optional[List[Optional[PollOption]]]" = dc_field( + options: "Optional[List[Optional[PollOptionRequest]]]" = dc_field( default=None, metadata=dc_config(field_name="options") ) custom: Optional[Dict[str, object]] = dc_field( @@ -7757,6 +8977,80 @@ class UpdateUsersResponse(DataClassJsonMixin): ) +@dataclass +class UpsertConfigRequest(DataClassJsonMixin): + key: str = dc_field(metadata=dc_config(field_name="key")) + _async: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="async") + ) + automod_platform_circumvention_config: "Optional[AutomodPlatformCircumventionConfig]" = dc_field( + default=None, + metadata=dc_config(field_name="automod_platform_circumvention_config"), + ) + automod_semantic_filters_config: "Optional[AutomodSemanticFiltersConfig]" = ( + dc_field( + default=None, + metadata=dc_config(field_name="automod_semantic_filters_config"), + ) + ) + automod_toxicity_config: "Optional[AutomodToxicityConfig]" = dc_field( + default=None, metadata=dc_config(field_name="automod_toxicity_config") + ) + aws_rek_og_nition_config: "Optional[AWSRekognitionConfig]" = dc_field( + default=None, metadata=dc_config(field_name="aws_rekognition_config") + ) + block_list_config: "Optional[BlockListConfig]" = dc_field( + default=None, metadata=dc_config(field_name="block_list_config") + ) + bodyguard_config: "Optional[BodyguardConfig]" = dc_field( + default=None, metadata=dc_config(field_name="bodyguard_config") + ) + go_og_le_vision_config: "Optional[GoogleVisionConfig]" = dc_field( + default=None, metadata=dc_config(field_name="google_vision_config") + ) + + +@dataclass +class UpsertConfigResponse(DataClassJsonMixin): + duration: str = dc_field(metadata=dc_config(field_name="duration")) + config: "Optional[ConfigResponse]" = dc_field( + default=None, metadata=dc_config(field_name="config") + ) + + +@dataclass +class UpsertModerationTemplateRequest(DataClassJsonMixin): + name: str = dc_field(metadata=dc_config(field_name="name")) + config: "FeedsModerationTemplateConfig" = dc_field( + metadata=dc_config(field_name="config") + ) + + +@dataclass +class UpsertModerationTemplateResponse(DataClassJsonMixin): + created_at: datetime = dc_field( + metadata=dc_config( + field_name="created_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + duration: str = dc_field(metadata=dc_config(field_name="duration")) + name: str = dc_field(metadata=dc_config(field_name="name")) + updated_at: datetime = dc_field( + metadata=dc_config( + field_name="updated_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + config: "Optional[FeedsModerationTemplateConfig]" = dc_field( + default=None, metadata=dc_config(field_name="config") + ) + + @dataclass class UpsertPushProviderRequest(DataClassJsonMixin): push_provider: "Optional[PushProvider]" = dc_field( @@ -7772,6 +9066,22 @@ class UpsertPushProviderResponse(DataClassJsonMixin): ) +@dataclass +class UserBlock(DataClassJsonMixin): + blocked_by_user_id: str = dc_field( + metadata=dc_config(field_name="blocked_by_user_id") + ) + blocked_user_id: str = dc_field(metadata=dc_config(field_name="blocked_user_id")) + created_at: datetime = dc_field( + metadata=dc_config( + field_name="created_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + + @dataclass class UserCustomEventRequest(DataClassJsonMixin): type: str = dc_field(metadata=dc_config(field_name="type")) @@ -7823,6 +9133,41 @@ class UserMute(DataClassJsonMixin): ) +@dataclass +class UserMuteResponse(DataClassJsonMixin): + created_at: datetime = dc_field( + metadata=dc_config( + field_name="created_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + updated_at: datetime = dc_field( + metadata=dc_config( + field_name="updated_at", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ) + ) + expires: Optional[datetime] = dc_field( + default=None, + metadata=dc_config( + field_name="expires", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ), + ) + target: "Optional[UserResponse]" = dc_field( + default=None, metadata=dc_config(field_name="target") + ) + user: "Optional[UserResponse]" = dc_field( + default=None, metadata=dc_config(field_name="user") + ) + + @dataclass class UserObject(DataClassJsonMixin): banned: bool = dc_field(metadata=dc_config(field_name="banned")) @@ -7971,6 +9316,15 @@ class UserResponse(DataClassJsonMixin): ) teams: List[str] = dc_field(metadata=dc_config(field_name="teams")) custom: Dict[str, object] = dc_field(metadata=dc_config(field_name="custom")) + ban_expires: Optional[datetime] = dc_field( + default=None, + metadata=dc_config( + field_name="ban_expires", + encoder=encode_datetime, + decoder=datetime_from_unix_ns, + mm_field=fields.DateTime(format="iso"), + ), + ) deactivated_at: Optional[datetime] = dc_field( default=None, metadata=dc_config( @@ -8011,7 +9365,10 @@ class UserResponse(DataClassJsonMixin): mm_field=fields.DateTime(format="iso"), ), ) - push_notifications: "Optional[PushNotificationSettings]" = dc_field( + privacy_settings: "Optional[PrivacySettingsResponse]" = dc_field( + default=None, metadata=dc_config(field_name="privacy_settings") + ) + push_notifications: "Optional[PushNotificationSettingsResponse]" = dc_field( default=None, metadata=dc_config(field_name="push_notifications") ) @@ -8110,6 +9467,9 @@ class UserSessionStats(DataClassJsonMixin): field_name="subscriber_video_quality_throttled_duration_seconds" ), ) + truncated: Optional[bool] = dc_field( + default=None, metadata=dc_config(field_name="truncated") + ) webrtc_version: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="webrtc_version") ) @@ -8122,10 +9482,10 @@ class UserSessionStats(DataClassJsonMixin): geolocation: "Optional[GeolocationResult]" = dc_field( default=None, metadata=dc_config(field_name="geolocation") ) - jitter: "Optional[Stats]" = dc_field( + jitter: "Optional[TimeStats]" = dc_field( default=None, metadata=dc_config(field_name="jitter") ) - latency: "Optional[Stats]" = dc_field( + latency: "Optional[TimeStats]" = dc_field( default=None, metadata=dc_config(field_name="latency") ) max_publishing_video_quality: "Optional[VideoQuality]" = dc_field( @@ -8140,10 +9500,10 @@ class UserSessionStats(DataClassJsonMixin): publisher_audio_mos: "Optional[MOSStats]" = dc_field( default=None, metadata=dc_config(field_name="publisher_audio_mos") ) - publisher_jitter: "Optional[Stats]" = dc_field( + publisher_jitter: "Optional[TimeStats]" = dc_field( default=None, metadata=dc_config(field_name="publisher_jitter") ) - publisher_latency: "Optional[Stats]" = dc_field( + publisher_latency: "Optional[TimeStats]" = dc_field( default=None, metadata=dc_config(field_name="publisher_latency") ) publisher_video_quality_limitation_duration_seconds: "Optional[Dict[str, float]]" = dc_field( @@ -8155,10 +9515,10 @@ class UserSessionStats(DataClassJsonMixin): subscriber_audio_mos: "Optional[MOSStats]" = dc_field( default=None, metadata=dc_config(field_name="subscriber_audio_mos") ) - subscriber_jitter: "Optional[Stats]" = dc_field( + subscriber_jitter: "Optional[TimeStats]" = dc_field( default=None, metadata=dc_config(field_name="subscriber_jitter") ) - subscriber_latency: "Optional[Stats]" = dc_field( + subscriber_latency: "Optional[TimeStats]" = dc_field( default=None, metadata=dc_config(field_name="subscriber_latency") ) timeline: "Optional[CallTimeline]" = dc_field( @@ -8288,6 +9648,9 @@ class WSEvent(DataClassJsonMixin): default=None, metadata=dc_config(field_name="reason") ) team: Optional[str] = dc_field(default=None, metadata=dc_config(field_name="team")) + thread_id: Optional[str] = dc_field( + default=None, metadata=dc_config(field_name="thread_id") + ) user_id: Optional[str] = dc_field( default=None, metadata=dc_config(field_name="user_id") ) @@ -8324,7 +9687,7 @@ class WSEvent(DataClassJsonMixin): reaction: "Optional[Reaction]" = dc_field( default=None, metadata=dc_config(field_name="reaction") ) - thread: "Optional[Thread]" = dc_field( + thread: "Optional[ThreadResponse]" = dc_field( default=None, metadata=dc_config(field_name="thread") ) user: "Optional[UserObject]" = dc_field( diff --git a/getstream/video/call.py b/getstream/video/call.py index 7dd5977..57af7f3 100644 --- a/getstream/video/call.py +++ b/getstream/video/call.py @@ -20,6 +20,7 @@ def get( members_limit: Optional[int] = None, ring: Optional[bool] = None, notify: Optional[bool] = None, + video: Optional[bool] = None, ) -> StreamResponse[GetCallResponse]: response = self.client.get_call( type=self.call_type, @@ -27,6 +28,7 @@ def get( members_limit=members_limit, ring=ring, notify=notify, + video=video, ) self._sync_from_response(response.data) return response @@ -52,6 +54,7 @@ def get_or_create( members_limit: Optional[int] = None, notify: Optional[bool] = None, ring: Optional[bool] = None, + video: Optional[bool] = None, data: Optional[CallRequest] = None, ) -> StreamResponse[GetOrCreateCallResponse]: response = self.client.get_or_create_call( @@ -60,6 +63,7 @@ def get_or_create( members_limit=members_limit, notify=notify, ring=ring, + video=video, data=data, ) self._sync_from_response(response.data) @@ -118,6 +122,7 @@ def go_live( recording_storage_name: Optional[str] = None, start_hls: Optional[bool] = None, start_recording: Optional[bool] = None, + start_rtmp_broadcasts: Optional[bool] = None, start_transcription: Optional[bool] = None, transcription_storage_name: Optional[str] = None, ) -> StreamResponse[GoLiveResponse]: @@ -127,6 +132,7 @@ def go_live( recording_storage_name=recording_storage_name, start_hls=start_hls, start_recording=start_recording, + start_rtmp_broadcasts=start_rtmp_broadcasts, start_transcription=start_transcription, transcription_storage_name=transcription_storage_name, ) @@ -190,6 +196,32 @@ def list_recordings(self) -> StreamResponse[ListRecordingsResponse]: self._sync_from_response(response.data) return response + def start_rtmp_broadcasts( + self, broadcasts: List[RTMPBroadcastRequest] + ) -> StreamResponse[StartRTMPBroadcastsResponse]: + response = self.client.start_rtmp_broadcasts( + type=self.call_type, id=self.id, broadcasts=broadcasts + ) + self._sync_from_response(response.data) + return response + + def stop_all_rtmp_broadcasts(self) -> StreamResponse[StopAllRTMPBroadcastsResponse]: + response = self.client.stop_all_rtmp_broadcasts(type=self.call_type, id=self.id) + self._sync_from_response(response.data) + return response + + def stop_rtmp_broadcast( + self, + name: str, + ) -> StreamResponse[StopRTMPBroadcastsResponse]: + response = self.client.stop_rtmp_broadcast( + type=self.call_type, + id=self.id, + name=name, + ) + self._sync_from_response(response.data) + return response + def start_hls_broadcasting(self) -> StreamResponse[StartHLSBroadcastingResponse]: response = self.client.start_hls_broadcasting(type=self.call_type, id=self.id) self._sync_from_response(response.data) diff --git a/getstream/video/rest_client.py b/getstream/video/rest_client.py index b64a1d5..8e227ac 100644 --- a/getstream/video/rest_client.py +++ b/getstream/video/rest_client.py @@ -27,7 +27,7 @@ def query_call_members( limit: Optional[int] = None, next: Optional[str] = None, prev: Optional[str] = None, - sort: Optional[List[Optional[SortParam]]] = None, + sort: Optional[List[Optional[SortParamRequest]]] = None, filter_conditions: Optional[Dict[str, object]] = None, ) -> StreamResponse[QueryCallMembersResponse]: json = build_body_dict( @@ -49,7 +49,7 @@ def query_call_stats( limit: Optional[int] = None, next: Optional[str] = None, prev: Optional[str] = None, - sort: Optional[List[Optional[SortParam]]] = None, + sort: Optional[List[Optional[SortParamRequest]]] = None, filter_conditions: Optional[Dict[str, object]] = None, ) -> StreamResponse[QueryCallStatsResponse]: json = build_body_dict( @@ -69,9 +69,10 @@ def get_call( members_limit: Optional[int] = None, ring: Optional[bool] = None, notify: Optional[bool] = None, + video: Optional[bool] = None, ) -> StreamResponse[GetCallResponse]: query_params = build_query_param( - members_limit=members_limit, ring=ring, notify=notify + members_limit=members_limit, ring=ring, notify=notify, video=video ) path_params = { "type": type, @@ -115,6 +116,7 @@ def get_or_create_call( members_limit: Optional[int] = None, notify: Optional[bool] = None, ring: Optional[bool] = None, + video: Optional[bool] = None, data: Optional[CallRequest] = None, ) -> StreamResponse[GetOrCreateCallResponse]: path_params = { @@ -122,7 +124,11 @@ def get_or_create_call( "id": id, } json = build_body_dict( - members_limit=members_limit, notify=notify, ring=ring, data=data + members_limit=members_limit, + notify=notify, + ring=ring, + video=video, + data=data, ) return self.post( @@ -225,6 +231,7 @@ def go_live( recording_storage_name: Optional[str] = None, start_hls: Optional[bool] = None, start_recording: Optional[bool] = None, + start_rtmp_broadcasts: Optional[bool] = None, start_transcription: Optional[bool] = None, transcription_storage_name: Optional[str] = None, ) -> StreamResponse[GoLiveResponse]: @@ -236,6 +243,7 @@ def go_live( recording_storage_name=recording_storage_name, start_hls=start_hls, start_recording=start_recording, + start_rtmp_broadcasts=start_rtmp_broadcasts, start_transcription=start_transcription, transcription_storage_name=transcription_storage_name, ) @@ -346,6 +354,56 @@ def list_recordings( path_params=path_params, ) + def start_rtmp_broadcasts( + self, type: str, id: str, broadcasts: List[RTMPBroadcastRequest] + ) -> StreamResponse[StartRTMPBroadcastsResponse]: + path_params = { + "type": type, + "id": id, + } + json = build_body_dict(broadcasts=broadcasts) + + return self.post( + "/api/v2/video/call/{type}/{id}/rtmp_broadcasts", + StartRTMPBroadcastsResponse, + path_params=path_params, + json=json, + ) + + def stop_all_rtmp_broadcasts( + self, type: str, id: str + ) -> StreamResponse[StopAllRTMPBroadcastsResponse]: + path_params = { + "type": type, + "id": id, + } + + return self.post( + "/api/v2/video/call/{type}/{id}/rtmp_broadcasts/stop", + StopAllRTMPBroadcastsResponse, + path_params=path_params, + ) + + def stop_rtmp_broadcast( + self, + type: str, + id: str, + name: str, + ) -> StreamResponse[StopRTMPBroadcastsResponse]: + path_params = { + "type": type, + "id": id, + "name": name, + } + json = build_body_dict() + + return self.post( + "/api/v2/video/call/{type}/{id}/rtmp_broadcasts/{name}/stop", + StopRTMPBroadcastsResponse, + path_params=path_params, + json=json, + ) + def start_hls_broadcasting( self, type: str, id: str ) -> StreamResponse[StartHLSBroadcastingResponse]: @@ -571,7 +629,7 @@ def query_calls( limit: Optional[int] = None, next: Optional[str] = None, prev: Optional[str] = None, - sort: Optional[List[Optional[SortParam]]] = None, + sort: Optional[List[Optional[SortParamRequest]]] = None, filter_conditions: Optional[Dict[str, object]] = None, ) -> StreamResponse[QueryCallsResponse]: json = build_body_dict( diff --git a/tests/fixtures/get_call_response.json b/tests/fixtures/get_call_response.json index 831efc5..b62171e 100644 --- a/tests/fixtures/get_call_response.json +++ b/tests/fixtures/get_call_response.json @@ -141,6 +141,7 @@ "ended_at": null, "participants": [], "participants_count_by_role": {}, + "anonymous_participant_count": 0, "rejected_by": { "123456": 1724326459013491368 },