@cometchat/calls-sdk-react-native 5.0.4 → 5.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -312,6 +312,64 @@ declare const INTERNAL_EVENTS: {
312
312
  readonly SDKInitialized: "internal.SDKInitialized";
313
313
  };
314
314
  };
315
+ declare const CAPTION_LANGUAGES: readonly [{
316
+ readonly code: "en-US";
317
+ readonly label: "English (United States)";
318
+ }, {
319
+ readonly code: "de-DE";
320
+ readonly label: "German (Germany)";
321
+ }, {
322
+ readonly code: "en-GB";
323
+ readonly label: "English (United Kingdom)";
324
+ }, {
325
+ readonly code: "es-ES";
326
+ readonly label: "Spanish (Spain)";
327
+ }, {
328
+ readonly code: "fr-FR";
329
+ readonly label: "French (France)";
330
+ }, {
331
+ readonly code: "hi-IN";
332
+ readonly label: "Hindi (India)";
333
+ }, {
334
+ readonly code: "hu-HU";
335
+ readonly label: "Hungarian (Hungary)";
336
+ }, {
337
+ readonly code: "it-IT";
338
+ readonly label: "Italian (Italy)";
339
+ }, {
340
+ readonly code: "ja-JP";
341
+ readonly label: "Japanese (Japan)";
342
+ }, {
343
+ readonly code: "ko-KR";
344
+ readonly label: "Korean (South Korea)";
345
+ }, {
346
+ readonly code: "lt-LT";
347
+ readonly label: "Lithuanian (Lithuania)";
348
+ }, {
349
+ readonly code: "ms-MY";
350
+ readonly label: "Malay (Malaysia)";
351
+ }, {
352
+ readonly code: "nl-NL";
353
+ readonly label: "Dutch (Netherlands)";
354
+ }, {
355
+ readonly code: "pt-PT";
356
+ readonly label: "Portuguese (Portugal)";
357
+ }, {
358
+ readonly code: "ru-RU";
359
+ readonly label: "Russian (Russia)";
360
+ }, {
361
+ readonly code: "sv-SE";
362
+ readonly label: "Swedish (Sweden)";
363
+ }, {
364
+ readonly code: "tr-TR";
365
+ readonly label: "Turkish (Turkey)";
366
+ }, {
367
+ readonly code: "zh";
368
+ readonly label: "Chinese Mandarin (Simplified, China)";
369
+ }, {
370
+ readonly code: "zh-TW";
371
+ readonly label: "Chinese Mandarin (Traditional, Taiwan)";
372
+ }];
315
373
  //#endregion
316
374
  //#region calls-sdk-core/utils/debounce.d.ts
317
375
  declare function debounce<T extends (...args: any[]) => any>(func: T, delay: number): (...args: Parameters<T>) => void;
@@ -329,7 +387,7 @@ type VideoInputDevice = MediaDeviceInfo & {
329
387
  type Subscription = (() => void) | {
330
388
  remove: () => void;
331
389
  };
332
- type SettingsDialogTab = 'audio' | 'video';
390
+ type SettingsDialogTab = 'audio' | 'video' | 'closedCaption';
333
391
  type BaseState = {
334
392
  participantListVisible: boolean;
335
393
  moreMenuVisible: boolean;
@@ -659,6 +717,14 @@ type ConfigStateBoth = {
659
717
  * @default false
660
718
  */
661
719
  autoStartRecording: boolean;
720
+ /**
721
+ * Automatically starts live transcription as soon as the call begins,
722
+ * without the user pressing the transcription button. Transcription must
723
+ * be enabled for your app for this to take effect.
724
+ *
725
+ * @default false
726
+ */
727
+ autoStartTranscription: boolean;
662
728
  /**
663
729
  * Hides the recording button from the call controls, preventing the user
664
730
  * from manually starting or stopping recording from within the SDK UI.
@@ -789,6 +855,28 @@ type ConfigStateBoth = {
789
855
  * @default false
790
856
  */
791
857
  hideSwitchCameraButton: boolean;
858
+ /**
859
+ * Hides the closed-caption button that lets the user show or hide live
860
+ * captions on screen. Even when set to `false`, the button only appears
861
+ * while transcription is running, since captions are produced from the
862
+ * live transcript.
863
+ *
864
+ * @default true
865
+ */
866
+ hideClosedCaptionButton: boolean;
867
+ /**
868
+ * Hides the transcription button from the call controls, preventing the
869
+ * user from manually starting or stopping live transcription from within
870
+ * the SDK UI.
871
+ *
872
+ * @default true
873
+ */
874
+ hideTranscriptionButton: boolean;
875
+ /**
876
+ * The currently selected caption/transcription language code (e.g.
877
+ * `en-US`). Selected from the closed-caption settings dropdown.
878
+ */
879
+ captionLanguage: CaptionLanguageCode;
792
880
  /**
793
881
  * Enables the per-participant context menu — opened by right-clicking (web)
794
882
  * or long-pressing (mobile) a participant's tile — that exposes actions such
@@ -1201,6 +1289,109 @@ declare const pauseVideoTrack: (authority?: number) => void;
1201
1289
  declare const resumeVideoTrack: (authority?: number) => Promise<void>;
1202
1290
  declare const toggleVideoTrack: () => void;
1203
1291
  //#endregion
1292
+ //#region calls-sdk-core/store/transcription.d.ts
1293
+ /**
1294
+ * A single entry inside a transcription-result `transcript` array.
1295
+ */
1296
+ interface TranscriptSegment {
1297
+ confidence: number;
1298
+ text: string;
1299
+ }
1300
+ /**
1301
+ * The participant metadata attached to a transcription-result message.
1302
+ */
1303
+ interface TranscriptionParticipant {
1304
+ id: string;
1305
+ name: string;
1306
+ identity_name: string;
1307
+ identity_group_id: string;
1308
+ avatar_url?: string;
1309
+ }
1310
+ /**
1311
+ * Shape of the payload received in `onEndpointMessageReceived` when
1312
+ * `type === 'transcription-result'`. This is stored as the value of each
1313
+ * entry in `transcriptionsMessages`, keyed by `message_id`.
1314
+ */
1315
+ interface TranscriptionMessage {
1316
+ transcript: TranscriptSegment[];
1317
+ is_interim: boolean;
1318
+ language: string;
1319
+ message_id: string;
1320
+ event: string;
1321
+ type: 'transcription-result';
1322
+ participant: TranscriptionParticipant;
1323
+ stability: number;
1324
+ timestamp: number;
1325
+ }
1326
+ interface TranscriptionState {
1327
+ transcriptionsMessages: Map<string, TranscriptionMessage>;
1328
+ /**
1329
+ * Whether the live caption overlay should be shown. Toggled by the
1330
+ * closed-caption button in the control pane / more menu.
1331
+ */
1332
+ showLiveCaption: boolean;
1333
+ /**
1334
+ * Whether transcription is currently active for the session.
1335
+ */
1336
+ isTranscribing: boolean;
1337
+ /**
1338
+ * Whether the transcriber has joined the session.
1339
+ */
1340
+ transcriberJoined: boolean;
1341
+ /**
1342
+ * The currently selected caption/transcription language code (e.g.
1343
+ * `en-US`). Selected from the closed-caption settings dropdown.
1344
+ */
1345
+ captionLanguage: CaptionLanguageCode;
1346
+ }
1347
+ interface TranscriptionActions {
1348
+ /**
1349
+ * Insert or update a transcription message by key. Because a Map `set`
1350
+ * overwrites an existing key, this handles both "add" and "update".
1351
+ */
1352
+ setTranscriptionMessage: (key: string, value: TranscriptionMessage) => void;
1353
+ /**
1354
+ * Remove all transcription messages.
1355
+ */
1356
+ clearTranscriptionMessages: () => void;
1357
+ /**
1358
+ * Toggle the live caption overlay on/off.
1359
+ */
1360
+ toggleShowLiveCaption: () => void;
1361
+ reset: () => void;
1362
+ }
1363
+ declare const useTranscriptionStore: zustand0.UseBoundStore<Omit<zustand0.StoreApi<TranscriptionState & TranscriptionActions>, "subscribe"> & {
1364
+ subscribe: {
1365
+ (listener: (selectedState: TranscriptionState & TranscriptionActions, previousSelectedState: TranscriptionState & TranscriptionActions) => void): () => void;
1366
+ <U>(selector: (state: TranscriptionState & TranscriptionActions) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
1367
+ equalityFn?: ((a: U, b: U) => boolean) | undefined;
1368
+ fireImmediately?: boolean;
1369
+ } | undefined): () => void;
1370
+ };
1371
+ }>;
1372
+ /**
1373
+ * Returns the transcription messages as an array, ordered by their arrival
1374
+ * (Map insertion order). Re-renders only when the underlying Map reference
1375
+ * changes, i.e. when a message is added, updated, or cleared.
1376
+ */
1377
+ declare function useTranscriptionMessages(): TranscriptionMessage[];
1378
+ /**
1379
+ * Returns whether the live caption overlay is currently shown.
1380
+ */
1381
+ declare function useShowLiveCaption(): boolean;
1382
+ /**
1383
+ * Toggle the live caption overlay. Safe to call from outside React (e.g.
1384
+ * button click handlers in the control pane).
1385
+ */
1386
+ declare function toggleShowLiveCaption(): void;
1387
+ /**
1388
+ * Returns whether transcription is currently active for the session.
1389
+ */
1390
+ declare const useIsTranscribing: () => boolean;
1391
+ declare function startTranscription(): Promise<void>;
1392
+ declare function stopTranscription(): Promise<void>;
1393
+ declare function toggleTranscription(): Promise<void>;
1394
+ //#endregion
1204
1395
  //#region calls-sdk-core/store/utils/hooks.d.ts
1205
1396
  declare const useHideMuteAudioButton: () => boolean;
1206
1397
  declare const useHideToggleVideoButton: () => boolean;
@@ -1208,6 +1399,8 @@ declare const useIsConferenceJoined: () => boolean;
1208
1399
  declare const useHideScreenSharingButton: () => boolean;
1209
1400
  declare const useHideSwitchCameraButton: () => boolean;
1210
1401
  declare const useHideChatButton: () => boolean;
1402
+ declare const useHideClosedCaptionButton: () => boolean;
1403
+ declare const useHideTranscriptionButton: () => boolean;
1211
1404
  declare const useLocalParticipant: <T = HumanParticipant>(selector?: (local: HumanParticipant) => T) => T;
1212
1405
  declare const useScreenShareRunning: () => any;
1213
1406
  declare const useTrackMuted: (mediaType: MediaType, participantId?: string) => boolean;
@@ -1328,6 +1521,14 @@ declare class SessionMethodsCore {
1328
1521
  * If recording is active, it will be stopped, and vice versa.
1329
1522
  */
1330
1523
  static toggleRecording(): void;
1524
+ /**
1525
+ * Starts transcription of the call.
1526
+ */
1527
+ static startTranscription(): void;
1528
+ /**
1529
+ * Stops the ongoing call transcription.
1530
+ */
1531
+ static stopTranscription(): void;
1331
1532
  /**
1332
1533
  * Pins a participant's video to focus on them.
1333
1534
  * @param participantId - The ID of the participant to pin.
@@ -1414,9 +1615,9 @@ type SessionType = ValueOf<typeof SESSION_TYPE>;
1414
1615
  type Layout = ValueOf<typeof LAYOUT>;
1415
1616
  type MediaType = ValueOf<typeof MEDIA_TYPE>;
1416
1617
  type ValueOf<T> = T[keyof T];
1417
- type ParticipantRole = ValueOf<typeof PARTICIPANT_ROLE>;
1418
1618
  type NotificationType = 'info' | 'success' | 'warning' | 'error';
1419
1619
  type SDKPlatform = ValueOf<typeof SDK_PLATFORM>;
1620
+ type CaptionLanguageCode = (typeof CAPTION_LANGUAGES)[number]['code'] | (string & {});
1420
1621
  interface ITrackOptions {
1421
1622
  cameraDeviceId?: string | null;
1422
1623
  constraints?: {
@@ -1606,6 +1807,7 @@ declare namespace controlPanel {
1606
1807
  export namespace tabs {
1607
1808
  let audio: string;
1608
1809
  let video: string;
1810
+ let closedCaption: string;
1609
1811
  }
1610
1812
  export namespace deviceLabels {
1611
1813
  let microphone: string;
@@ -1622,6 +1824,10 @@ declare namespace controlPanel {
1622
1824
  let enableNoiseReduction: string;
1623
1825
  }
1624
1826
  export { audioSettings_1 as audioSettings };
1827
+ export namespace closedCaptionSettings {
1828
+ let language: string;
1829
+ let enableClosedCaptions: string;
1830
+ }
1625
1831
  export namespace videoSettings_1 {
1626
1832
  let mirrorMyVideo: string;
1627
1833
  let selectCameraToSeePreview: string;
@@ -1727,12 +1933,21 @@ declare namespace notifications {
1727
1933
  let streamingStarted: string;
1728
1934
  let streamingStopped: string;
1729
1935
  }
1936
+ declare namespace closedCaptions {
1937
+ let emptyState_1: string;
1938
+ export { emptyState_1 as emptyState };
1939
+ }
1940
+ declare namespace audioPlayback {
1941
+ let blockedTitle: string;
1942
+ let blockedSubtitle: string;
1943
+ let blockedButton: string;
1944
+ }
1730
1945
  declare namespace general {
1731
1946
  let error: string;
1732
1947
  }
1733
1948
  declare let other: {};
1734
1949
  declare namespace __json_default_export {
1735
- export { header, controlPanel, idealTimeout, participantList, virtualBackground, indicators, notifications, general, other };
1950
+ export { header, controlPanel, idealTimeout, participantList, virtualBackground, indicators, notifications, closedCaptions, audioPlayback, general, other };
1736
1951
  }
1737
1952
  //#endregion
1738
1953
  //#region calls-sdk-core/i18n/state.d.ts
@@ -1800,6 +2015,7 @@ declare const useTranslation: () => {
1800
2015
  tabs: {
1801
2016
  audio: string;
1802
2017
  video: string;
2018
+ closedCaption: string;
1803
2019
  };
1804
2020
  deviceLabels: {
1805
2021
  microphone: string;
@@ -1815,6 +2031,10 @@ declare const useTranslation: () => {
1815
2031
  audioSettings: {
1816
2032
  enableNoiseReduction: string;
1817
2033
  };
2034
+ closedCaptionSettings: {
2035
+ language: string;
2036
+ enableClosedCaptions: string;
2037
+ };
1818
2038
  videoSettings: {
1819
2039
  mirrorMyVideo: string;
1820
2040
  selectCameraToSeePreview: string;
@@ -1903,6 +2123,14 @@ declare const useTranslation: () => {
1903
2123
  streamingStarted: string;
1904
2124
  streamingStopped: string;
1905
2125
  };
2126
+ closedCaptions: {
2127
+ emptyState: string;
2128
+ };
2129
+ audioPlayback: {
2130
+ blockedTitle: string;
2131
+ blockedSubtitle: string;
2132
+ blockedButton: string;
2133
+ };
1906
2134
  general: {
1907
2135
  error: string;
1908
2136
  };
@@ -2786,11 +3014,15 @@ interface IOngoingCallListener {
2786
3014
  onRecordingStarted: (data: Partial<ICallEventsData['onRecordingStarted']>) => void;
2787
3015
  onRecordingStopped: (data: Partial<ICallEventsData['onRecordingStopped']>) => void;
2788
3016
  onUserMuted: (test: Partial<ICallEventsData['onUserMuted']>) => void;
3017
+ /**
3018
+ * @deprecated `switchToVideoCall` is deprecated and unsupported by the
3019
+ * underlying SDK, so this callback is never invoked.
3020
+ */
2789
3021
  onCallSwitchedToVideo: (data: Partial<ICallEventsData['onCallSwitchedToVideo']>) => void;
2790
3022
  onCallEnded: () => void;
2791
3023
  onSessionTimeout: () => void;
2792
3024
  onCallEndButtonPressed: () => void;
2793
- onAudioModesUpdated: (any: any) => void;
3025
+ onAudioModesUpdated: (audioModes: AudioMode[]) => void;
2794
3026
  onError: (error: CometChatCallsException) => void;
2795
3027
  }
2796
3028
  declare class OngoingCallListener {
@@ -2840,6 +3072,9 @@ declare class OngoingCallListener {
2840
3072
  onUserMuted?: IOngoingCallListener['onUserMuted'];
2841
3073
  /**
2842
3074
  * This event is triggered when an audio call is switched to a video call.
3075
+ *
3076
+ * @deprecated `switchToVideoCall` is deprecated and unsupported by the
3077
+ * underlying SDK, so this callback is never invoked.
2843
3078
  */
2844
3079
  onCallSwitchedToVideo?: IOngoingCallListener['onCallSwitchedToVideo'];
2845
3080
  constructor(eventObj: Partial<IOngoingCallListener>);
@@ -3559,6 +3794,133 @@ declare class Recording {
3559
3794
  static getRecordingFromJson(data: any): Recording;
3560
3795
  }
3561
3796
  //#endregion
3797
+ //#region src/v4/models/Transcription.d.ts
3798
+ /**
3799
+ * Represents a transcript artifact attached to a call log.
3800
+ *
3801
+ * Only present when the list request opted in via
3802
+ * `CallLogRequestBuilder.setHasTranscriptions(true)` — the server omits the
3803
+ * `transcriptions` array otherwise.
3804
+ *
3805
+ * A record is a *pointer* to a downloadable transcript file, not the transcript
3806
+ * text itself: fetch {@link Transcription.getTranscriptURL} separately to
3807
+ * retrieve the content.
3808
+ */
3809
+ declare class Transcription {
3810
+ /**
3811
+ * The transcript ID.
3812
+ */
3813
+ private tid;
3814
+ /**
3815
+ * The meeting ID; absent until the pipeline sends `uniqueMeetingId`.
3816
+ */
3817
+ private mid;
3818
+ /**
3819
+ * The room name of the meeting the transcript belongs to.
3820
+ */
3821
+ private roomName;
3822
+ /**
3823
+ * The start time of the transcribed meeting, in epoch seconds.
3824
+ */
3825
+ private startTime;
3826
+ /**
3827
+ * The end time of the transcribed meeting, in epoch seconds.
3828
+ */
3829
+ private endTime;
3830
+ /**
3831
+ * The transcript date.
3832
+ */
3833
+ private transcriptDate;
3834
+ /**
3835
+ * The URL of the downloadable transcript JSON.
3836
+ */
3837
+ private transcriptUrl;
3838
+ /**
3839
+ * Creates a new instance of the Transcription class.
3840
+ * @param data - The data to initialize the transcription object.
3841
+ */
3842
+ constructor(data: any);
3843
+ /**
3844
+ * Gets the transcript ID.
3845
+ * @returns The transcript ID.
3846
+ */
3847
+ getTid(): string;
3848
+ /**
3849
+ * Sets the transcript ID.
3850
+ * @param value - The transcript ID to set.
3851
+ */
3852
+ setTid(value: string): void;
3853
+ /**
3854
+ * Gets the meeting ID.
3855
+ * @returns The meeting ID.
3856
+ */
3857
+ getMid(): string;
3858
+ /**
3859
+ * Sets the meeting ID.
3860
+ * @param value - The meeting ID to set.
3861
+ */
3862
+ setMid(value: string): void;
3863
+ /**
3864
+ * Gets the room name.
3865
+ * @returns The room name.
3866
+ */
3867
+ getRoomName(): string;
3868
+ /**
3869
+ * Sets the room name.
3870
+ * @param value - The room name to set.
3871
+ */
3872
+ setRoomName(value: string): void;
3873
+ /**
3874
+ * Gets the start time of the transcribed meeting.
3875
+ * @returns The start time, in epoch seconds.
3876
+ */
3877
+ getStartTime(): number;
3878
+ /**
3879
+ * Sets the start time of the transcribed meeting.
3880
+ * @param value - The start time, in epoch seconds.
3881
+ */
3882
+ setStartTime(value: number): void;
3883
+ /**
3884
+ * Gets the end time of the transcribed meeting.
3885
+ * @returns The end time, in epoch seconds.
3886
+ */
3887
+ getEndTime(): number;
3888
+ /**
3889
+ * Sets the end time of the transcribed meeting.
3890
+ * @param value - The end time, in epoch seconds.
3891
+ */
3892
+ setEndTime(value: number): void;
3893
+ /**
3894
+ * Gets the transcript date.
3895
+ * @returns The transcript date.
3896
+ */
3897
+ getTranscriptDate(): string;
3898
+ /**
3899
+ * Sets the transcript date.
3900
+ * @param value - The transcript date to set.
3901
+ */
3902
+ setTranscriptDate(value: string): void;
3903
+ /**
3904
+ * Gets the URL of the downloadable transcript JSON.
3905
+ * @returns The transcript URL.
3906
+ */
3907
+ getTranscriptURL(): string;
3908
+ /**
3909
+ * Sets the URL of the downloadable transcript JSON.
3910
+ * @param value - The transcript URL to set.
3911
+ */
3912
+ setTranscriptURL(value: string): void;
3913
+ /**
3914
+ * Creates a new Transcription object from the given JSON data.
3915
+ *
3916
+ * Every key is passed through untouched, so newly-added server fields survive
3917
+ * without an SDK release.
3918
+ * @param data - The JSON data to create the Transcription object from.
3919
+ * @returns A new Transcription object.
3920
+ */
3921
+ static getTranscriptionFromJson(data: any): Transcription;
3922
+ }
3923
+ //#endregion
3562
3924
  //#region src/v4/models/CallLog.d.ts
3563
3925
  /**
3564
3926
  * Represents a call log.
@@ -3652,6 +4014,12 @@ declare class CallLog {
3652
4014
  * The recordings of the call log.
3653
4015
  */
3654
4016
  private recordings;
4017
+ /**
4018
+ * @type {Transcription[]}
4019
+ * The transcripts of the call log. Only populated when the request opted in
4020
+ * via `CallLogRequestBuilder.setHasTranscriptions(true)`.
4021
+ */
4022
+ private transcriptions;
3655
4023
  /**
3656
4024
  * Creates a new instance of CallLog.
3657
4025
  * @param data - The data to initialize the call log with.
@@ -3857,6 +4225,19 @@ declare class CallLog {
3857
4225
  * @param value - The recordings to set.
3858
4226
  */
3859
4227
  setRecordings(value: Recording[]): void;
4228
+ /**
4229
+ * Gets the transcripts of the call log.
4230
+ * @returns The transcripts of the call log, or an empty array when the server
4231
+ * omitted them — never `undefined`. The array is absent unless the request
4232
+ * opted in via `CallLogRequestBuilder.setHasTranscriptions(true)`, and the
4233
+ * server currently omits it even then, so callers must not have to null-check.
4234
+ */
4235
+ getTranscriptions(): Transcription[];
4236
+ /**
4237
+ * Sets the transcripts of the call log.
4238
+ * @param value - The transcripts to set.
4239
+ */
4240
+ setTranscriptions(value: Transcription[]): void;
3860
4241
  /**
3861
4242
  * Creates a new instance of CallLog from JSON data.
3862
4243
  * @param data - The JSON data to create the call log from.
@@ -3894,6 +4275,11 @@ declare class CallLogRequest {
3894
4275
  * Whether the call has a recording or not.
3895
4276
  */
3896
4277
  private hasRecording;
4278
+ /**
4279
+ * Whether to restrict the list to calls that have transcripts (and have the
4280
+ * server attach each call's `transcriptions` array).
4281
+ */
4282
+ private hasTranscriptions;
3897
4283
  /**
3898
4284
  * The category of call to filter by.
3899
4285
  */
@@ -3938,18 +4324,6 @@ declare class CallLogRequest {
3938
4324
  * The affix of the call log.
3939
4325
  */
3940
4326
  private affix;
3941
- /**
3942
- * The last affix of the call log.
3943
- */
3944
- private lastAffix;
3945
- /**
3946
- * The current method of the call log.
3947
- */
3948
- private currentMethod;
3949
- /**
3950
- * The pagination metadata of the call log.
3951
- */
3952
- private paginationMeta;
3953
4327
  /**
3954
4328
  * Creates a new CallLogRequest instance.
3955
4329
  * @param builder The builder object to use for constructing the request.
@@ -4002,6 +4376,7 @@ declare class CallLogRequestBuilder {
4002
4376
  callType: string;
4003
4377
  callStatus: string;
4004
4378
  hasRecording: boolean;
4379
+ hasTranscriptions: boolean;
4005
4380
  callCategory: string;
4006
4381
  callDirection: string;
4007
4382
  uid: string;
@@ -4031,6 +4406,14 @@ declare class CallLogRequestBuilder {
4031
4406
  * @returns The CallLogRequestBuilder object.
4032
4407
  */
4033
4408
  setHasRecording(hasRecording: boolean): this;
4409
+ /**
4410
+ * Sets whether only calls that have transcripts should be fetched. Opting in
4411
+ * also makes the server attach each call's `transcriptions` array, readable
4412
+ * via `CallLog.getTranscriptions()`.
4413
+ * @param hasTranscriptions - Whether to restrict the list to transcribed calls.
4414
+ * @returns The CallLogRequestBuilder object.
4415
+ */
4416
+ setHasTranscriptions(hasTranscriptions: boolean): this;
4034
4417
  /**
4035
4418
  * Sets the category of call to be fetched.
4036
4419
  * @param callCategory - The category of call to be fetched. Can be either 'call' or 'meet'.
@@ -4470,6 +4853,10 @@ declare class CallLogFilterParams {
4470
4853
  * Whether the call has recordings.
4471
4854
  */
4472
4855
  private hasRecording;
4856
+ /**
4857
+ * Whether the call has transcripts.
4858
+ */
4859
+ private hasTranscriptions;
4473
4860
  /**
4474
4861
  * The user ID.
4475
4862
  */
@@ -4478,10 +4865,6 @@ declare class CallLogFilterParams {
4478
4865
  * The group ID.
4479
4866
  */
4480
4867
  private guid;
4481
- /**
4482
- * Creates a new instance of the CallLogFilterParams class.
4483
- * @param data - The data to initialize the call log filter parameters object.
4484
- */
4485
4868
  /**
4486
4869
  * Sets the direction of the call.
4487
4870
  * @param value - The direction of the call.
@@ -4517,6 +4900,11 @@ declare class CallLogFilterParams {
4517
4900
  * @param value - Whether the call has recordings.
4518
4901
  */
4519
4902
  setHasRecordings(value: boolean): void;
4903
+ /**
4904
+ * Sets whether the call has transcripts.
4905
+ * @param value - Whether the call has transcripts.
4906
+ */
4907
+ setHasTranscriptions(value: boolean): void;
4520
4908
  /**
4521
4909
  * Sets the user ID.
4522
4910
  * @param value - The user ID.
@@ -4540,6 +4928,113 @@ declare class CallLogFilterParams {
4540
4928
  declare const addCallEventListener: typeof ListenerHandlers.addCallEventListener;
4541
4929
  declare const removeCallEventListener: typeof ListenerHandlers.removeCallEventListener;
4542
4930
  //#endregion
4931
+ //#region src/transcripts/types.d.ts
4932
+ /**
4933
+ * A single meeting transcript record, as returned by the paginated
4934
+ * transcript-retrieval API.
4935
+ *
4936
+ * Every field is optional: the server strips empty keys before responding, so a
4937
+ * sparse record is normal and must parse without error. Unknown server keys are
4938
+ * preserved untouched so newly-added fields survive without an SDK release.
4939
+ */
4940
+ interface Transcript {
4941
+ /** Transcript id. */
4942
+ tid?: string;
4943
+ /** Meeting id. */
4944
+ mid?: string;
4945
+ /** Room / session name. */
4946
+ roomName?: string;
4947
+ /** Meeting start time, epoch SECONDS. */
4948
+ startTime?: number;
4949
+ /** Meeting end time, epoch SECONDS. */
4950
+ endTime?: number;
4951
+ /** Meeting URL. */
4952
+ url?: string;
4953
+ /** Human-readable transcript date. */
4954
+ transcriptDate?: string;
4955
+ /**
4956
+ * URL to fetch the transcript content. The content itself must be fetched
4957
+ * separately.
4958
+ */
4959
+ transcriptUrl?: string;
4960
+ /** Arbitrary server-provided metadata. */
4961
+ metaData?: Record<string, unknown>;
4962
+ }
4963
+ //#endregion
4964
+ //#region src/transcripts/TranscriptRequest.d.ts
4965
+ /**
4966
+ * A paginated request for a meeting's transcripts. Created via
4967
+ * {@link TranscriptRequestBuilder.build}. Holds the pagination cursor and issues
4968
+ * one page per `fetchNext()` / `fetchPrevious()` call.
4969
+ */
4970
+ declare class TranscriptRequest {
4971
+ private readonly sessionId;
4972
+ private readonly limit;
4973
+ /** Total pages reported by the server (`null` = no response read yet). */
4974
+ private totalPages;
4975
+ /** Last page successfully fetched (`0` = none fetched yet). */
4976
+ private currentPage;
4977
+ /** Whether a fetch is currently in flight. */
4978
+ private inProgress;
4979
+ constructor(builder: TranscriptRequestBuilder);
4980
+ /**
4981
+ * Fetches the next page of transcripts. Resolves `[]` once the last page has
4982
+ * been reached (including the empty-session `total_pages: 0` case).
4983
+ * @returns A promise resolving to the page's transcripts.
4984
+ * @throws Rejects with a {@link CometChatCallsException} on error.
4985
+ */
4986
+ fetchNext(): Promise<Transcript[]>;
4987
+ /**
4988
+ * Fetches the previous page of transcripts. Resolves `[]` when there is no
4989
+ * previous page (a fresh request, or the first page) — it never requests
4990
+ * `page < 1`.
4991
+ * @returns A promise resolving to the page's transcripts, or `[]`.
4992
+ * @throws Rejects with a {@link CometChatCallsException} on error.
4993
+ */
4994
+ fetchPrevious(): Promise<Transcript[] | []>;
4995
+ private makeAPICall;
4996
+ /**
4997
+ * Advances the pagination cursor from the response `meta`. A missing / malformed
4998
+ * `meta` is treated as a single page (the fetched rows still resolve — we never
4999
+ * throw a raw `TypeError` the way the CallLog builder does).
5000
+ */
5001
+ private updatePagination;
5002
+ }
5003
+ /**
5004
+ * Builder for a {@link TranscriptRequest}.
5005
+ *
5006
+ * @example
5007
+ * const request = new CometChatCalls.TranscriptRequestBuilder()
5008
+ * .setSessionId('v1.us.2547167fe69871fd.pranav')
5009
+ * .setLimit(10)
5010
+ * .build();
5011
+ * const page = await request.fetchNext();
5012
+ */
5013
+ declare class TranscriptRequestBuilder {
5014
+ sessionId: string;
5015
+ limit: number;
5016
+ /**
5017
+ * Sets the session (meeting) id whose transcripts to fetch. Required.
5018
+ * @param sessionId - The meeting session id.
5019
+ * @returns This builder.
5020
+ */
5021
+ setSessionId(sessionId: string): this;
5022
+ /**
5023
+ * Sets the page size. Defaults to 30 and is clamped to the range 1–1000.
5024
+ * Non-finite values are ignored.
5025
+ * @param limit - The number of transcripts per page.
5026
+ * @returns This builder.
5027
+ */
5028
+ setLimit(limit: number): this;
5029
+ /**
5030
+ * Builds the {@link TranscriptRequest}.
5031
+ * @returns A ready-to-use request.
5032
+ * @throws {CometChatCallsException} `NOT_INITIALIZED` if `CometChatCalls.init()`
5033
+ * has not been called, or `SESSION_ID_REQUIRED` if no session id was set.
5034
+ */
5035
+ build(): TranscriptRequest;
5036
+ }
5037
+ //#endregion
4543
5038
  //#region src/CometChatCalls.d.ts
4544
5039
  interface User {
4545
5040
  uid: string;
@@ -4590,6 +5085,8 @@ declare class CometChatCalls extends SessionMethodsCore {
4590
5085
  static Component: typeof AppReactNativeSDK;
4591
5086
  static CallLogRequestBuilder: typeof CallLogRequestBuilder;
4592
5087
  static CallLog: typeof CallLog;
5088
+ static Transcription: typeof Transcription;
5089
+ static TranscriptRequestBuilder: typeof TranscriptRequestBuilder;
4593
5090
  /**
4594
5091
  * Initializes the CometChat Calls SDK with the provided app settings.
4595
5092
  * Must be called before any other SDK methods.
@@ -4751,4 +5248,4 @@ declare class CometChatCalls extends SessionMethodsCore {
4751
5248
  static disablePictureInPictureLayout(): void;
4752
5249
  }
4753
5250
  //#endregion
4754
- export { CometChatCalls };
5251
+ export { CometChatCalls, type Transcript };