diff --git a/__tests__/call.test.ts b/__tests__/call.test.ts index 96d7efb..7623d29 100644 --- a/__tests__/call.test.ts +++ b/__tests__/call.test.ts @@ -134,20 +134,6 @@ describe('call API', () => { expect(response.calls).toBeDefined(); }); - it('query call stats', async () => { - const response = await client.video.queryCallStats(); - - expect(response.reports.length).toBeGreaterThan(0); - - await expect(() => - call.getCallStats({ - session: '', - }), - ).rejects.toThrowError( - `Stream error code 16: GetCallStats failed with error: "call session not found"`, - ); - }); - it('query call stats - single call', async () => { const response = await client.video.queryCallStats({ filter_conditions: { call_cid: call.cid }, diff --git a/src/gen/chat/ChannelApi.ts b/src/gen/chat/ChannelApi.ts index c6e8e3a..763d59e 100644 --- a/src/gen/chat/ChannelApi.ts +++ b/src/gen/chat/ChannelApi.ts @@ -199,7 +199,7 @@ export class ChannelApi { }; updateMemberPartial = ( - request: UpdateMemberPartialRequest & { user_id: string }, + request?: UpdateMemberPartialRequest & { user_id?: string }, ): Promise> => { if (!this.id) { throw new Error( diff --git a/src/gen/chat/ChatApi.ts b/src/gen/chat/ChatApi.ts index ea6cab8..19d80ab 100644 --- a/src/gen/chat/ChatApi.ts +++ b/src/gen/chat/ChatApi.ts @@ -601,13 +601,15 @@ export class ChatApi extends BaseApi { updateMemberPartial = async ( request: UpdateMemberPartialRequest & { - user_id: string; type: string; id: string; + user_id?: string; }, ): Promise> => { - const pathParams = { + const queryParams = { user_id: request?.user_id, + }; + const pathParams = { type: request?.type, id: request?.id, }; @@ -620,9 +622,9 @@ export class ChatApi extends BaseApi { StreamResponse >( 'PATCH', - '/api/v2/chat/channels/{type}/{id}/member/{user_id}', + '/api/v2/chat/channels/{type}/{id}/member', pathParams, - undefined, + queryParams, body, ); @@ -2083,6 +2085,8 @@ export class ChatApi extends BaseApi { prev: request?.prev, reply_limit: request?.reply_limit, user_id: request?.user_id, + sort: request?.sort, + filter: request?.filter, user: request?.user, }; diff --git a/src/gen/model-decoders/index.ts b/src/gen/model-decoders/index.ts index d2d654d..435e8b8 100644 --- a/src/gen/model-decoders/index.ts +++ b/src/gen/model-decoders/index.ts @@ -484,6 +484,13 @@ decoders.ChannelTypeConfig = (input?: Record) => { return decode(typeMappings, input); }; +decoders.ChatActivityStatsResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + messages: { type: 'MessageStatsResponse', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.CheckResponse = (input?: Record) => { const typeMappings: TypeMapping = { item: { type: 'ReviewQueueItem', isSingle: true }, @@ -509,6 +516,13 @@ decoders.ConfigResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.CountByMinuteResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + start_ts: { type: 'DatetimeType', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.CreateBlockListResponse = (input?: Record) => { const typeMappings: TypeMapping = { blocklist: { type: 'BlockListResponse', isSingle: true }, @@ -785,6 +799,13 @@ decoders.GetBlockedUsersResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.GetCallReportResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + chat_activity: { type: 'ChatActivityStatsResponse', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.GetCallResponse = (input?: Record) => { const typeMappings: TypeMapping = { members: { type: 'MemberResponse', isSingle: false }, @@ -883,8 +904,6 @@ decoders.GetRepliesResponse = (input?: Record) => { decoders.GetReviewQueueItemResponse = (input?: Record) => { const typeMappings: TypeMapping = { - history: { type: 'ReviewQueueItemResponse', isSingle: false }, - item: { type: 'ReviewQueueItemResponse', isSingle: true }, }; return decode(typeMappings, input); @@ -1163,6 +1182,13 @@ decoders.MessageResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.MessageStatsResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + count_over_time: { type: 'CountByMinuteResponse', isSingle: false }, + }; + return decode(typeMappings, input); +}; + decoders.MessageWithChannelResponse = (input?: Record) => { const typeMappings: TypeMapping = { created_at: { type: 'DatetimeType', isSingle: true }, @@ -1272,6 +1298,20 @@ decoders.OwnUserResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.ParticipantCountByMinuteResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + start_ts: { type: 'DatetimeType', isSingle: true }, + }; + return decode(typeMappings, input); +}; + +decoders.ParticipantCountOverTimeResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + by_minute: { type: 'ParticipantCountByMinuteResponse', isSingle: false }, + }; + return decode(typeMappings, input); +}; + decoders.PendingMessageResponse = (input?: Record) => { const typeMappings: TypeMapping = { channel: { type: 'ChannelResponse', isSingle: true }, @@ -1413,6 +1453,17 @@ decoders.QueryCallMembersResponse = (input?: Record) => { return decode(typeMappings, input); }; +decoders.QueryCallParticipantsResponse = (input?: Record) => { + const typeMappings: TypeMapping = { + members: { type: 'MemberResponse', isSingle: false }, + + participants: { type: 'CallParticipantResponse', isSingle: false }, + + call: { type: 'CallResponse', isSingle: true }, + }; + return decode(typeMappings, input); +}; + decoders.QueryCallStatsResponse = (input?: Record) => { const typeMappings: TypeMapping = { reports: { type: 'CallStatsReportSummaryResponse', isSingle: false }, diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index bd82397..2bf26fd 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -1,6 +1,8 @@ export interface AIImageConfig { enabled: boolean; + ocr_rules: OCRRule[]; + rules: AWSRekognitionRule[]; async?: boolean; @@ -166,12 +168,6 @@ export interface ActionLogResponse { user?: UserResponse; } -export interface AggregatedStats { - publisher_aggregate_stats?: PublisherAggregateStats; - - turn?: TURNAggregatedStats; -} - export interface AnyEvent { created_at: Date; @@ -842,28 +838,6 @@ export interface CallEndedEvent { user?: UserResponse; } -export interface CallEvent { - description: string; - - end_timestamp: number; - - internal: boolean; - - kind: string; - - severity: number; - - timestamp: number; - - type: string; - - category?: string; - - component?: string; - - issue_tags?: string[]; -} - export interface CallFrameRecordingFailedEvent { call_cid: string; @@ -1151,6 +1125,8 @@ export interface CallReportResponse { } export interface CallRequest { + channel_cid?: string; + created_by_id?: string; starts_at?: Date; @@ -1201,6 +1177,8 @@ export interface CallResponse { settings: CallSettingsResponse; + channel_cid?: string; + ended_at?: Date; join_ahead_time_seconds?: number; @@ -1430,6 +1408,16 @@ export interface CallStateResponseFields { call: CallResponse; } +export interface CallStatsReportReadyEvent { + call_cid: string; + + created_at: Date; + + session_id: string; + + type: string; +} + export interface CallStatsReportSummaryResponse { call_cid: string; @@ -1448,10 +1436,6 @@ export interface CallStatsReportSummaryResponse { quality_score?: number; } -export interface CallTimeline { - events: CallEvent[]; -} - export interface CallTranscription { end_time: Date; @@ -1509,6 +1493,8 @@ export interface CallType { created_at: Date; + enable_live_insights: boolean; + external_storage: string; name: string; @@ -1641,6 +1627,8 @@ export interface CampaignResponse { sender_mode: string; + show_channels: boolean; + skip_push: boolean; skip_webhook: boolean; @@ -2392,6 +2380,10 @@ export interface ChannelVisibleEvent { user?: User; } +export interface ChatActivityStatsResponse { + messages?: MessageStatsResponse; +} + export interface CheckExternalStorageResponse { duration: string; @@ -2608,16 +2600,10 @@ export interface ConfigResponse { velocity_filter_config?: VelocityFilterConfig; } -export interface Coordinates { - latitude: number; - - longitude: number; -} - -export interface Count { - approximate: boolean; +export interface CountByMinuteResponse { + count: number; - value: number; + start_ts: Date; } export interface CreateBlockListRequest { @@ -2627,7 +2613,7 @@ export interface CreateBlockListRequest { team?: string; - type?: 'regex' | 'domain' | 'email' | 'word'; + type?: 'regex' | 'domain' | 'domain_allowlist' | 'email' | 'word'; } export interface CreateBlockListResponse { @@ -3562,12 +3548,6 @@ export interface ExternalStorageResponse { type: 's3' | 'gcs' | 'abs'; } -export interface FPSStats { - average_fps: number; - - tracked: number; -} - export interface FeedsModerationTemplateConfig { config_key: string; @@ -3842,28 +3822,6 @@ export interface GeofenceSettingsResponse { names: string[]; } -export interface GeolocationResult { - accuracy_radius: number; - - city: string; - - continent: string; - - continent_code: string; - - country: string; - - country_iso_code: string; - - latitude: number; - - longitude: number; - - subdivision: string; - - subdivision_iso_code: string; -} - export interface GetApplicationResponse { duration: string; @@ -3888,6 +3846,8 @@ export interface GetCallReportResponse { session_id: string; report: ReportResponse; + + chat_activity?: ChatActivityStatsResponse; } export interface GetCallResponse { @@ -3900,42 +3860,6 @@ export interface GetCallResponse { call: CallResponse; } -export interface GetCallStatsResponse { - call_duration_seconds: number; - - call_status: string; - - duration: string; - - is_truncated_report: boolean; - - max_freezes_duration_seconds: number; - - max_participants: number; - - max_total_quality_limitation_duration_seconds: number; - - publishing_participants: number; - - quality_score: number; - - sfu_count: number; - - participant_report: UserStats[]; - - sfus: SFULocationResponse[]; - - average_connection_time?: number; - - aggregated?: AggregatedStats; - - call_timeline?: CallTimeline; - - jitter?: TimeStats; - - latency?: TimeStats; -} - export interface GetCallTypeResponse { created_at: Date; @@ -4195,8 +4119,6 @@ export interface GetRepliesResponse { export interface GetReviewQueueItemResponse { duration: string; - history: ReviewQueueItemResponse[]; - item?: ReviewQueueItemResponse; } @@ -4252,6 +4174,12 @@ export interface GoogleVisionConfig { enabled?: boolean; } +export interface GroupedStatsResponse { + name: string; + + unique: number; +} + export interface HLSSettings { auto_on: boolean; @@ -4540,14 +4468,6 @@ export interface ListTranscriptionsResponse { transcriptions: CallTranscription[]; } -export interface Location { - continent_code: string; - - country_iso_code: string; - - subdivision_iso_code: string; -} - export interface MarkChannelsReadRequest { user_id?: string; @@ -4588,16 +4508,6 @@ export interface MarkUnreadRequest { user?: UserRequest; } -export interface MediaPubSubHint { - audio_published: boolean; - - audio_subscribed: boolean; - - video_published: boolean; - - video_subscribed: boolean; -} - export interface MemberAddedEvent { channel_id: string; @@ -5070,6 +4980,10 @@ export interface MessageResponse { reaction_groups?: Record; } +export interface MessageStatsResponse { + count_over_time?: CountByMinuteResponse[]; +} + export interface MessageUnblockedEvent { cid: string; @@ -5228,6 +5142,24 @@ export interface ModerationActionConfig { custom: Record; } +export interface ModerationCheckCompletedEvent { + created_at: Date; + + entity_id: string; + + entity_type: string; + + recommended_action: string; + + review_queue_item_id: string; + + custom: Record; + + type: string; + + received_at?: Date; +} + export interface ModerationCustomActionEvent { created_at: Date; @@ -5430,6 +5362,18 @@ export interface NotificationSettings { export interface NullTime {} +export interface OCRRule { + action: + | 'flag' + | 'shadow' + | 'remove' + | 'bounce' + | 'bounce_flag' + | 'bounce_remove'; + + label: string; +} + export interface OnlyUserID { id: string; } @@ -5594,10 +5538,42 @@ export interface PaginationParams { offset?: number; } +export interface ParticipantCountByMinuteResponse { + first: number; + + last: number; + + max: number; + + min: number; + + start_ts: Date; +} + +export interface ParticipantCountOverTimeResponse { + by_minute?: ParticipantCountByMinuteResponse[]; +} + export interface ParticipantReportResponse { sum: number; unique: number; + + max_concurrent?: number; + + by_browser?: GroupedStatsResponse[]; + + by_country?: GroupedStatsResponse[]; + + by_device?: GroupedStatsResponse[]; + + by_operating_system?: GroupedStatsResponse[]; + + count_over_time?: ParticipantCountOverTimeResponse; + + publishers?: PublisherStatsResponse; + + subscribers?: SubscriberStatsResponse; } export interface PendingMessageResponse { @@ -5898,18 +5874,12 @@ export interface PrivacySettingsResponse { typing_indicators?: TypingIndicatorsResponse; } -export interface PublishedTrackInfo { - codec_mime_type?: string; - - duration_seconds?: number; - - track_type?: string; -} +export interface PublisherStatsResponse { + total: number; -export interface PublisherAggregateStats { - by_track_type?: Record; + unique: number; - total?: Count; + by_track?: TrackStatsResponse[]; } export interface PushConfig { @@ -6154,6 +6124,24 @@ export interface QueryCallMembersResponse { prev?: string; } +export interface QueryCallParticipantsRequest { + filter_conditions?: Record; +} + +export interface QueryCallParticipantsResponse { + duration: string; + + total_participants: number; + + members: MemberResponse[]; + + own_capabilities: OwnCapability[]; + + participants: CallParticipantResponse[]; + + call: CallResponse; +} + export interface QueryCallStatsRequest { limit?: number; @@ -6563,6 +6551,10 @@ export interface QueryThreadsRequest { user_id?: string; + sort?: SortParamRequest[]; + + filter?: Record; + user?: UserRequest; } @@ -6941,6 +6933,8 @@ export interface ReviewQueueItem { bounce_count: number; + config_key: string; + content_changed: boolean; created_at: Date; @@ -7049,6 +7043,8 @@ export interface ReviewQueueItemResponse { completed_at?: Date; + config_key?: string; + entity_creator_id?: string; reviewed_at?: Date; @@ -7140,16 +7136,6 @@ export interface SDKUsageReportResponse { daily: DailyAggregateSDKUsageReportResponse[]; } -export interface SFULocationResponse { - datacenter: string; - - id: string; - - coordinates: Coordinates; - - location: Location; -} - export interface ScreensharingSettings { access_request_enabled: boolean; @@ -7471,7 +7457,44 @@ export interface StartClosedCaptionsRequest { external_storage?: string; - language?: string; + language?: + | 'auto' + | 'en' + | 'fr' + | 'es' + | 'de' + | 'it' + | 'nl' + | 'pt' + | 'pl' + | 'ca' + | 'cs' + | 'da' + | 'el' + | 'fi' + | 'id' + | 'ja' + | 'ru' + | 'sv' + | 'ta' + | 'th' + | 'tr' + | 'hu' + | 'ro' + | 'zh' + | 'ar' + | 'tl' + | 'he' + | 'hi' + | 'hr' + | 'ko' + | 'ms' + | 'no' + | 'uk' + | 'bg' + | 'et' + | 'sl' + | 'sk'; } export interface StartClosedCaptionsResponse { @@ -7513,7 +7536,44 @@ export interface StartRecordingResponse { export interface StartTranscriptionRequest { enable_closed_captions?: boolean; - language?: string; + language?: + | 'auto' + | 'en' + | 'fr' + | 'es' + | 'de' + | 'it' + | 'nl' + | 'pt' + | 'pl' + | 'ca' + | 'cs' + | 'da' + | 'el' + | 'fi' + | 'id' + | 'ja' + | 'ru' + | 'sv' + | 'ta' + | 'th' + | 'tr' + | 'hu' + | 'ro' + | 'zh' + | 'ar' + | 'tl' + | 'he' + | 'hi' + | 'hr' + | 'ko' + | 'ms' + | 'no' + | 'uk' + | 'bg' + | 'et' + | 'sl' + | 'sk'; transcription_external_storage?: string; } @@ -7631,20 +7691,12 @@ export interface SubmitActionResponse { item?: ReviewQueueItem; } -export interface Subsession { - ended_at: number; - - joined_at: number; - - sfu_id: string; - - pub_sub_hint?: MediaPubSubHint; -} +export interface SubscriberStatsResponse { + total: number; -export interface TURNAggregatedStats { - tcp?: Count; + total_subscribed_duration_seconds: number; - total?: Count; + unique: number; } export interface TargetResolution { @@ -7793,10 +7845,10 @@ export interface ThumbnailsSettingsResponse { export interface Time {} -export interface TimeStats { - average_seconds: number; +export interface TrackStatsResponse { + duration_seconds: number; - max_seconds: number; + track_type: string; } export interface TranscriptionSettings { @@ -7835,7 +7887,11 @@ export interface TranscriptionSettings { | 'ko' | 'ms' | 'no' - | 'uk'; + | 'uk' + | 'bg' + | 'et' + | 'sl' + | 'sk'; mode: 'available' | 'disabled' | 'auto-on'; } @@ -7878,7 +7934,11 @@ export interface TranscriptionSettingsRequest { | 'ko' | 'ms' | 'no' - | 'uk'; + | 'uk' + | 'bg' + | 'et' + | 'sl' + | 'sk'; } export interface TranscriptionSettingsResponse { @@ -7917,7 +7977,11 @@ export interface TranscriptionSettingsResponse { | 'ko' | 'ms' | 'no' - | 'uk'; + | 'uk' + | 'bg' + | 'et' + | 'sl' + | 'sk'; mode: 'available' | 'disabled' | 'auto-on'; } @@ -8902,18 +8966,6 @@ export interface UserFlaggedEvent { user?: User; } -export interface UserInfoResponse { - id: string; - - image: string; - - name: string; - - roles: string[]; - - custom: Record; -} - export interface UserMute { created_at: Date; @@ -9110,126 +9162,6 @@ export interface UserResponsePrivacyFields { teams_role?: Record; } -export interface UserSessionStats { - freeze_duration_seconds: number; - - group: string; - - max_freeze_fraction: number; - - max_freezes_duration_seconds: number; - - min_event_ts: number; - - packet_loss_fraction: number; - - publisher_packet_loss_fraction: number; - - publishing_duration_seconds: number; - - quality_score: number; - - receiving_duration_seconds: number; - - session_id: string; - - total_pixels_in: number; - - total_pixels_out: number; - - average_connection_time?: number; - - browser?: string; - - browser_version?: string; - - current_ip?: string; - - current_sfu?: string; - - device_model?: string; - - device_version?: string; - - distance_to_sfu_kilometers?: number; - - max_fir_per_second?: number; - - max_freezes_per_second?: number; - - max_nack_per_second?: number; - - max_pli_per_second?: number; - - os?: string; - - os_version?: string; - - publisher_noise_cancellation_seconds?: number; - - publisher_quality_limitation_fraction?: number; - - publishing_audio_codec?: string; - - publishing_video_codec?: string; - - receiving_audio_codec?: string; - - receiving_video_codec?: string; - - sdk?: string; - - sdk_version?: string; - - subscriber_video_quality_throttled_duration_seconds?: number; - - truncated?: boolean; - - webrtc_version?: string; - - published_tracks?: PublishedTrackInfo[]; - - subsessions?: Subsession[]; - - fps?: FPSStats; - - geolocation?: GeolocationResult; - - jitter?: TimeStats; - - latency?: TimeStats; - - max_publishing_video_quality?: VideoQuality; - - max_receiving_video_quality?: VideoQuality; - - pub_sub_hints?: MediaPubSubHint; - - publisher_jitter?: TimeStats; - - publisher_latency?: TimeStats; - - publisher_video_quality_limitation_duration_seconds?: Record; - - subscriber_jitter?: TimeStats; - - subscriber_latency?: TimeStats; - - timeline?: CallTimeline; -} - -export interface UserStats { - min_event_ts: number; - - session_stats: UserSessionStats[]; - - info: UserInfoResponse; - - feedback?: string; - - rating?: number; -} - export interface UserUnbannedEvent { channel_id: string; @@ -9328,18 +9260,6 @@ export interface VelocityFilterConfigRule { slow_spam_ban_duration?: number; } -export interface VideoDimension { - height: number; - - width: number; -} - -export interface VideoQuality { - usage_type?: string; - - resolution?: VideoDimension; -} - export interface VideoSettings { access_request_enabled: boolean; diff --git a/src/gen/video/CallApi.ts b/src/gen/video/CallApi.ts index badb928..0a7960e 100644 --- a/src/gen/video/CallApi.ts +++ b/src/gen/video/CallApi.ts @@ -12,7 +12,6 @@ import { EndCallResponse, GetCallReportResponse, GetCallResponse, - GetCallStatsResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, @@ -23,6 +22,8 @@ import { MuteUsersResponse, PinRequest, PinResponse, + QueryCallParticipantsRequest, + QueryCallParticipantsResponse, SendCallEventRequest, SendCallEventResponse, StartClosedCaptionsRequest, @@ -166,6 +167,16 @@ export class CallApi { }); }; + queryCallParticipants = ( + request?: QueryCallParticipantsRequest & { limit?: number }, + ): Promise> => { + return this.videoApi.queryCallParticipants({ + id: this.id, + type: this.type, + ...request, + }); + }; + videoPin = (request: PinRequest): Promise> => { return this.videoApi.videoPin({ id: this.id, type: this.type, ...request }); }; @@ -259,16 +270,6 @@ export class CallApi { }); }; - getCallStats = (request: { - session: string; - }): Promise> => { - return this.videoApi.getCallStats({ - id: this.id, - type: this.type, - ...request, - }); - }; - stopHLSBroadcasting = (): Promise< StreamResponse > => { diff --git a/src/gen/video/VideoApi.ts b/src/gen/video/VideoApi.ts index c12154e..1beca82 100644 --- a/src/gen/video/VideoApi.ts +++ b/src/gen/video/VideoApi.ts @@ -14,7 +14,6 @@ import { EndCallResponse, GetCallReportResponse, GetCallResponse, - GetCallStatsResponse, GetCallTypeResponse, GetEdgesResponse, GetOrCreateCallRequest, @@ -32,6 +31,8 @@ import { QueryAggregateCallStatsResponse, QueryCallMembersRequest, QueryCallMembersResponse, + QueryCallParticipantsRequest, + QueryCallParticipantsResponse, QueryCallStatsRequest, QueryCallStatsResponse, QueryCallsRequest, @@ -441,6 +442,39 @@ export class VideoApi extends BaseApi { return { ...response.body, metadata: response.metadata }; }; + queryCallParticipants = async ( + request: QueryCallParticipantsRequest & { + id: string; + type: string; + limit?: number; + }, + ): Promise> => { + const queryParams = { + limit: request?.limit, + }; + const pathParams = { + id: request?.id, + type: request?.type, + }; + const body = { + filter_conditions: request?.filter_conditions, + }; + + const response = await this.sendRequest< + StreamResponse + >( + 'POST', + '/api/v2/video/call/{type}/{id}/participants', + pathParams, + queryParams, + body, + ); + + decoders.QueryCallParticipantsResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + }; + videoPin = async ( request: PinRequest & { type: string; id: string }, ): Promise> => { @@ -720,31 +754,6 @@ export class VideoApi extends BaseApi { return { ...response.body, metadata: response.metadata }; }; - getCallStats = async (request: { - type: string; - id: string; - session: string; - }): Promise> => { - const pathParams = { - type: request?.type, - id: request?.id, - session: request?.session, - }; - - const response = await this.sendRequest< - StreamResponse - >( - 'GET', - '/api/v2/video/call/{type}/{id}/stats/{session}', - pathParams, - undefined, - ); - - decoders.GetCallStatsResponse?.(response.body); - - return { ...response.body, metadata: response.metadata }; - }; - stopHLSBroadcasting = async (request: { type: string; id: string;