@cometchat/calls-sdk-react-native 5.0.3-beta.1 → 5.0.4
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.
|
@@ -82,6 +82,8 @@ import java.util.Set;
|
|
|
82
82
|
for (AudioDeviceInfo info: deviceInfos) {
|
|
83
83
|
switch (info.getType()) {
|
|
84
84
|
case AudioDeviceInfo.TYPE_BLUETOOTH_SCO:
|
|
85
|
+
case AudioDeviceInfo.TYPE_BLE_HEADSET:
|
|
86
|
+
case AudioDeviceInfo.TYPE_BLE_SPEAKER:
|
|
85
87
|
devices.add(AudioModeModule.DEVICE_BLUETOOTH);
|
|
86
88
|
break;
|
|
87
89
|
case AudioDeviceInfo.TYPE_BUILTIN_EARPIECE:
|
|
@@ -184,7 +186,8 @@ import java.util.Set;
|
|
|
184
186
|
case AudioModeModule.DEVICE_BLUETOOTH:
|
|
185
187
|
return new int[] {
|
|
186
188
|
AudioDeviceInfo.TYPE_BLUETOOTH_SCO,
|
|
187
|
-
AudioDeviceInfo.TYPE_BLE_HEADSET
|
|
189
|
+
AudioDeviceInfo.TYPE_BLE_HEADSET,
|
|
190
|
+
AudioDeviceInfo.TYPE_BLE_SPEAKER
|
|
188
191
|
};
|
|
189
192
|
case AudioModeModule.DEVICE_HEADPHONES:
|
|
190
193
|
return new int[] {
|
|
@@ -312,4 +315,4 @@ import java.util.Set;
|
|
|
312
315
|
|
|
313
316
|
return true;
|
|
314
317
|
}
|
|
315
|
-
}
|
|
318
|
+
}
|
package/dist/index.d.mts
CHANGED
|
@@ -127,6 +127,8 @@ declare const EVENT_LISTENER_METHODS: {
|
|
|
127
127
|
readonly onVideoResumed: "onVideoResumed";
|
|
128
128
|
readonly onRecordingStarted: "onRecordingStarted";
|
|
129
129
|
readonly onRecordingStopped: "onRecordingStopped";
|
|
130
|
+
readonly onStreamingStarted: "onStreamingStarted";
|
|
131
|
+
readonly onStreamingStopped: "onStreamingStopped";
|
|
130
132
|
readonly onScreenShareStarted: "onScreenShareStarted";
|
|
131
133
|
readonly onScreenShareStopped: "onScreenShareStopped";
|
|
132
134
|
};
|
|
@@ -143,6 +145,8 @@ declare const EVENT_LISTENER_METHODS: {
|
|
|
143
145
|
readonly onParticipantStoppedScreenShare: "onParticipantStoppedScreenShare";
|
|
144
146
|
readonly onParticipantStartedRecording: "onParticipantStartedRecording";
|
|
145
147
|
readonly onParticipantStoppedRecording: "onParticipantStoppedRecording";
|
|
148
|
+
readonly onParticipantStartedStreaming: "onParticipantStartedStreaming";
|
|
149
|
+
readonly onParticipantStoppedStreaming: "onParticipantStoppedStreaming";
|
|
146
150
|
readonly onDominantSpeakerChanged: "onDominantSpeakerChanged";
|
|
147
151
|
readonly onParticipantListChanged: "onParticipantListChanged";
|
|
148
152
|
};
|
|
@@ -178,6 +182,8 @@ declare const EVENT_LISTENER_METHODS_WEB: {
|
|
|
178
182
|
readonly onVideoResumed: "onVideoResumed";
|
|
179
183
|
readonly onRecordingStarted: "onRecordingStarted";
|
|
180
184
|
readonly onRecordingStopped: "onRecordingStopped";
|
|
185
|
+
readonly onStreamingStarted: "onStreamingStarted";
|
|
186
|
+
readonly onStreamingStopped: "onStreamingStopped";
|
|
181
187
|
readonly onScreenShareStarted: "onScreenShareStarted";
|
|
182
188
|
readonly onScreenShareStopped: "onScreenShareStopped";
|
|
183
189
|
};
|
|
@@ -205,6 +211,8 @@ declare const EVENT_LISTENER_METHODS_WEB: {
|
|
|
205
211
|
readonly onParticipantStoppedScreenShare: "onParticipantStoppedScreenShare";
|
|
206
212
|
readonly onParticipantStartedRecording: "onParticipantStartedRecording";
|
|
207
213
|
readonly onParticipantStoppedRecording: "onParticipantStoppedRecording";
|
|
214
|
+
readonly onParticipantStartedStreaming: "onParticipantStartedStreaming";
|
|
215
|
+
readonly onParticipantStoppedStreaming: "onParticipantStoppedStreaming";
|
|
208
216
|
readonly onDominantSpeakerChanged: "onDominantSpeakerChanged";
|
|
209
217
|
readonly onParticipantListChanged: "onParticipantListChanged";
|
|
210
218
|
};
|
|
@@ -237,6 +245,8 @@ declare const EVENT_LISTENER_METHODS_MOBILE: {
|
|
|
237
245
|
readonly onVideoResumed: "onVideoResumed";
|
|
238
246
|
readonly onRecordingStarted: "onRecordingStarted";
|
|
239
247
|
readonly onRecordingStopped: "onRecordingStopped";
|
|
248
|
+
readonly onStreamingStarted: "onStreamingStarted";
|
|
249
|
+
readonly onStreamingStopped: "onStreamingStopped";
|
|
240
250
|
readonly onScreenShareStarted: "onScreenShareStarted";
|
|
241
251
|
readonly onScreenShareStopped: "onScreenShareStopped";
|
|
242
252
|
};
|
|
@@ -284,6 +294,8 @@ declare const EVENT_LISTENER_METHODS_MOBILE: {
|
|
|
284
294
|
readonly onParticipantStoppedScreenShare: "onParticipantStoppedScreenShare";
|
|
285
295
|
readonly onParticipantStartedRecording: "onParticipantStartedRecording";
|
|
286
296
|
readonly onParticipantStoppedRecording: "onParticipantStoppedRecording";
|
|
297
|
+
readonly onParticipantStartedStreaming: "onParticipantStartedStreaming";
|
|
298
|
+
readonly onParticipantStoppedStreaming: "onParticipantStoppedStreaming";
|
|
287
299
|
readonly onDominantSpeakerChanged: "onDominantSpeakerChanged";
|
|
288
300
|
readonly onParticipantListChanged: "onParticipantListChanged";
|
|
289
301
|
};
|
|
@@ -466,6 +478,7 @@ type ConferenceState = {
|
|
|
466
478
|
initiator?: any;
|
|
467
479
|
};
|
|
468
480
|
isRecording: boolean;
|
|
481
|
+
isStreaming: boolean;
|
|
469
482
|
};
|
|
470
483
|
type Actions$4 = {
|
|
471
484
|
reset: () => void;
|
|
@@ -474,7 +487,6 @@ type Actions$4 = {
|
|
|
474
487
|
lowerHand: (participantId: string) => void;
|
|
475
488
|
leaveConference: () => Promise<void>;
|
|
476
489
|
endConference: () => Promise<void>;
|
|
477
|
-
stopRecording: () => Promise<void>;
|
|
478
490
|
};
|
|
479
491
|
declare const useConferenceStore: zustand0.UseBoundStore<Omit<zustand0.StoreApi<ConferenceState & Actions$4>, "subscribe"> & {
|
|
480
492
|
subscribe: {
|
|
@@ -490,9 +502,12 @@ declare function raisedHandLocal(): void;
|
|
|
490
502
|
declare function lowerHandLocal(): void;
|
|
491
503
|
declare function toggleRaiseHand(): void;
|
|
492
504
|
declare const useIsRecording: () => boolean;
|
|
505
|
+
declare const useIsStreaming: () => boolean;
|
|
493
506
|
declare function startRecording(): Promise<void>;
|
|
494
507
|
declare function stopRecording(): Promise<void>;
|
|
495
508
|
declare function toggleRecording(): Promise<void>;
|
|
509
|
+
declare function startStreaming(streamUrl: string, streamKey: string): Promise<void>;
|
|
510
|
+
declare function stopStreaming(): Promise<void>;
|
|
496
511
|
declare const getIsConferenceJoined: () => boolean;
|
|
497
512
|
//#endregion
|
|
498
513
|
//#region calls-sdk-core/store/config.d.ts
|
|
@@ -538,6 +553,20 @@ type ConfigStateMobile = {
|
|
|
538
553
|
* @default true
|
|
539
554
|
*/
|
|
540
555
|
enableSpotlightSwap: boolean;
|
|
556
|
+
/**
|
|
557
|
+
* iOS only (React Native). When enabled, the call automatically enters the
|
|
558
|
+
* system Picture-in-Picture window when the app moves to the background,
|
|
559
|
+
* showing the active speaker's video (or the active screen share), and
|
|
560
|
+
* returns to the app automatically when it is foregrounded.
|
|
561
|
+
*
|
|
562
|
+
* Requires iOS 15+ and the "Audio, AirPlay, and Picture in Picture"
|
|
563
|
+
* background mode capability in the host app. Ignored on Android and on
|
|
564
|
+
* older iOS versions. Not related to `enablePictureInPictureLayout()`,
|
|
565
|
+
* which shrinks the in-app call UI to a tile.
|
|
566
|
+
*
|
|
567
|
+
* @default false
|
|
568
|
+
*/
|
|
569
|
+
enableIOSPictureInPicture: boolean;
|
|
541
570
|
};
|
|
542
571
|
/**
|
|
543
572
|
* Configuration that only applies on the web platform.
|
|
@@ -637,6 +666,29 @@ type ConfigStateBoth = {
|
|
|
637
666
|
* @default true
|
|
638
667
|
*/
|
|
639
668
|
hideRecordingButton: boolean;
|
|
669
|
+
/**
|
|
670
|
+
* Hides the streaming button from the call controls, preventing the user
|
|
671
|
+
* from manually starting or stopping a live stream from within the SDK UI.
|
|
672
|
+
*
|
|
673
|
+
* @default true
|
|
674
|
+
*/
|
|
675
|
+
hideStreamingButton: boolean;
|
|
676
|
+
/**
|
|
677
|
+
* The RTMP URL to stream to when the user starts a live stream from the
|
|
678
|
+
* call controls. When set, pressing the start-streaming button skips the
|
|
679
|
+
* confirmation dialog (which normally asks for a URL and key) and starts
|
|
680
|
+
* streaming to this URL immediately.
|
|
681
|
+
*
|
|
682
|
+
* @default undefined — the user is asked for a URL when starting a stream
|
|
683
|
+
*/
|
|
684
|
+
streamUrl?: string;
|
|
685
|
+
/**
|
|
686
|
+
* The stream key sent along with `streamUrl` when a live stream is
|
|
687
|
+
* started. Ignored when `streamUrl` is not set.
|
|
688
|
+
*
|
|
689
|
+
* @default undefined
|
|
690
|
+
*/
|
|
691
|
+
streamKey?: string;
|
|
640
692
|
/**
|
|
641
693
|
* Hides the entire bottom control bar (mic, camera, leave, and every other
|
|
642
694
|
* call control). Useful when the host app provides its own controls.
|
|
@@ -723,6 +775,13 @@ type ConfigStateBoth = {
|
|
|
723
775
|
* @default false
|
|
724
776
|
*/
|
|
725
777
|
hideRecordingStatusIndicator: boolean;
|
|
778
|
+
/**
|
|
779
|
+
* Hides the "streaming live" badge shown while the session is being
|
|
780
|
+
* streamed. The stream itself is unaffected.
|
|
781
|
+
*
|
|
782
|
+
* @default false
|
|
783
|
+
*/
|
|
784
|
+
hideStreamingStatusIndicator: boolean;
|
|
726
785
|
/**
|
|
727
786
|
* Hides the button that switches between the front and rear cameras.
|
|
728
787
|
* Mainly relevant on mobile devices with more than one camera.
|
|
@@ -1058,6 +1117,7 @@ declare const getMainParticipantFromState: (state: {
|
|
|
1058
1117
|
dominantSpeakers: string[];
|
|
1059
1118
|
localParticipant: HumanParticipant;
|
|
1060
1119
|
}) => Participant$2;
|
|
1120
|
+
declare const getParticipantMediaType: (participant?: Participant$2) => "video" | "screenshare";
|
|
1061
1121
|
//#endregion
|
|
1062
1122
|
//#region calls-sdk-core/store/toast.d.ts
|
|
1063
1123
|
interface ToastAction {
|
|
@@ -1155,6 +1215,7 @@ declare const useMainParticipant: () => Participant$2;
|
|
|
1155
1215
|
declare const getMainParticipant: () => Participant$2;
|
|
1156
1216
|
declare const useIsReconnecting: () => boolean;
|
|
1157
1217
|
declare const useHideRecordingButton: () => boolean;
|
|
1218
|
+
declare const useHideStreamingButton: () => boolean;
|
|
1158
1219
|
declare const useHideVirtualBackgroundButton: () => boolean;
|
|
1159
1220
|
declare const useLayout: () => Layout;
|
|
1160
1221
|
declare const useEnableParticipantContextMenu: () => boolean;
|
|
@@ -1176,9 +1237,15 @@ declare const switchCamera: () => void;
|
|
|
1176
1237
|
//#region calls-sdk-core/utils/session-methods-core.d.ts
|
|
1177
1238
|
declare class SessionMethodsCore {
|
|
1178
1239
|
/**
|
|
1179
|
-
* Mutes the local user's audio during the call.
|
|
1240
|
+
* Mutes or unmutes the local user's audio during the call.
|
|
1241
|
+
*
|
|
1242
|
+
* The boolean parameter exists for backward compatibility with the v4 SDK,
|
|
1243
|
+
* where `muteAudio(false)` was the way to unmute. New code should prefer
|
|
1244
|
+
* {@link SessionMethodsCore.unmuteAudio} for clarity.
|
|
1245
|
+
*
|
|
1246
|
+
* @param muteAudio - `true` (default) mutes the local audio track, `false` unmutes it.
|
|
1180
1247
|
*/
|
|
1181
|
-
static muteAudio(): void;
|
|
1248
|
+
static muteAudio(muteAudio?: boolean): void;
|
|
1182
1249
|
/**
|
|
1183
1250
|
* Unmutes the local user's audio during the call.
|
|
1184
1251
|
*/
|
|
@@ -1189,9 +1256,15 @@ declare class SessionMethodsCore {
|
|
|
1189
1256
|
*/
|
|
1190
1257
|
static toggleAudio(): void;
|
|
1191
1258
|
/**
|
|
1192
|
-
* Pauses the local user's video stream.
|
|
1259
|
+
* Pauses or resumes the local user's video stream.
|
|
1260
|
+
*
|
|
1261
|
+
* The boolean parameter exists for backward compatibility with the v4 SDK,
|
|
1262
|
+
* where `pauseVideo(false)` was the way to resume. New code should prefer
|
|
1263
|
+
* {@link SessionMethodsCore.resumeVideo} for clarity.
|
|
1264
|
+
*
|
|
1265
|
+
* @param pauseVideo - `true` (default) pauses the local video track, `false` resumes it.
|
|
1193
1266
|
*/
|
|
1194
|
-
static pauseVideo(): void;
|
|
1267
|
+
static pauseVideo(pauseVideo?: boolean): void;
|
|
1195
1268
|
/**
|
|
1196
1269
|
* Resumes the local user's video stream.
|
|
1197
1270
|
*/
|
|
@@ -1232,6 +1305,16 @@ declare class SessionMethodsCore {
|
|
|
1232
1305
|
* @param layout - The type of layout to set (tile, sidebar or spotlight).
|
|
1233
1306
|
*/
|
|
1234
1307
|
static setLayout(layout: Layout): void;
|
|
1308
|
+
/**
|
|
1309
|
+
* Starts streaming the call to the given RTMP destination.
|
|
1310
|
+
* @param streamUrl - The RTMP ingest URL (e.g., "rtmp://a.rtmp.youtube.com/live2").
|
|
1311
|
+
* @param streamKey - The stream key for the destination (e.g., "xxxx-xxxx-xxxx-xxxx-xxxx").
|
|
1312
|
+
*/
|
|
1313
|
+
static startStreaming(streamUrl: string, streamKey: string): void;
|
|
1314
|
+
/**
|
|
1315
|
+
* Stops the ongoing call streaming.
|
|
1316
|
+
*/
|
|
1317
|
+
static stopStreaming(): void;
|
|
1235
1318
|
/**
|
|
1236
1319
|
* Starts recording the call.
|
|
1237
1320
|
*/
|
|
@@ -1323,6 +1406,7 @@ type AudioMode = {
|
|
|
1323
1406
|
type: AudioModeType;
|
|
1324
1407
|
selected: boolean;
|
|
1325
1408
|
uid?: string;
|
|
1409
|
+
name?: string;
|
|
1326
1410
|
};
|
|
1327
1411
|
type CameraFacingInternal = ValueOf<typeof CAMERA_FACING_INTERNAL>;
|
|
1328
1412
|
type CameraFacing = ValueOf<typeof CAMERA_FACING>;
|
|
@@ -1565,6 +1649,16 @@ declare namespace controlPanel {
|
|
|
1565
1649
|
let cancel_1: string;
|
|
1566
1650
|
export { cancel_1 as cancel };
|
|
1567
1651
|
}
|
|
1652
|
+
namespace streaming {
|
|
1653
|
+
export let startStreaming: string;
|
|
1654
|
+
export let stopStreaming: string;
|
|
1655
|
+
export let startStreamingConfirmation: string;
|
|
1656
|
+
export let stopStreamingConfirmation: string;
|
|
1657
|
+
export let streamUrlPlaceholder: string;
|
|
1658
|
+
export let streamKeyPlaceholder: string;
|
|
1659
|
+
let cancel_2: string;
|
|
1660
|
+
export { cancel_2 as cancel };
|
|
1661
|
+
}
|
|
1568
1662
|
let raiseHand: string;
|
|
1569
1663
|
let lowerHand: string;
|
|
1570
1664
|
let startScreenSharing: string;
|
|
@@ -1606,19 +1700,39 @@ declare namespace virtualBackground {
|
|
|
1606
1700
|
export let addBackground: string;
|
|
1607
1701
|
export let noCameraFeed: string;
|
|
1608
1702
|
export namespace buttons_2 {
|
|
1609
|
-
let
|
|
1610
|
-
export {
|
|
1703
|
+
let cancel_3: string;
|
|
1704
|
+
export { cancel_3 as cancel };
|
|
1611
1705
|
let done_1: string;
|
|
1612
1706
|
export { done_1 as done };
|
|
1613
1707
|
}
|
|
1614
1708
|
export { buttons_2 as buttons };
|
|
1615
1709
|
}
|
|
1710
|
+
declare namespace indicators {
|
|
1711
|
+
export namespace recording_1 {
|
|
1712
|
+
let label: string;
|
|
1713
|
+
let tooltip: string;
|
|
1714
|
+
}
|
|
1715
|
+
export { recording_1 as recording };
|
|
1716
|
+
export namespace streaming_1 {
|
|
1717
|
+
let label_1: string;
|
|
1718
|
+
export { label_1 as label };
|
|
1719
|
+
let tooltip_1: string;
|
|
1720
|
+
export { tooltip_1 as tooltip };
|
|
1721
|
+
}
|
|
1722
|
+
export { streaming_1 as streaming };
|
|
1723
|
+
}
|
|
1724
|
+
declare namespace notifications {
|
|
1725
|
+
let recordingStarted: string;
|
|
1726
|
+
let recordingStopped: string;
|
|
1727
|
+
let streamingStarted: string;
|
|
1728
|
+
let streamingStopped: string;
|
|
1729
|
+
}
|
|
1616
1730
|
declare namespace general {
|
|
1617
1731
|
let error: string;
|
|
1618
1732
|
}
|
|
1619
1733
|
declare let other: {};
|
|
1620
1734
|
declare namespace __json_default_export {
|
|
1621
|
-
export { header, controlPanel, idealTimeout, participantList, virtualBackground, general, other };
|
|
1735
|
+
export { header, controlPanel, idealTimeout, participantList, virtualBackground, indicators, notifications, general, other };
|
|
1622
1736
|
}
|
|
1623
1737
|
//#endregion
|
|
1624
1738
|
//#region calls-sdk-core/i18n/state.d.ts
|
|
@@ -1651,6 +1765,11 @@ declare const useTranslationStore: zustand0.UseBoundStore<Omit<zustand0.StoreApi
|
|
|
1651
1765
|
}>;
|
|
1652
1766
|
//#endregion
|
|
1653
1767
|
//#region calls-sdk-core/i18n/hook.d.ts
|
|
1768
|
+
/**
|
|
1769
|
+
* Non-hook variant of `t` for code that runs outside React (stores,
|
|
1770
|
+
* event subscribers). Reads the translation store imperatively.
|
|
1771
|
+
*/
|
|
1772
|
+
declare function translate(key: Paths<TranslationResource>): string;
|
|
1654
1773
|
declare const useTranslation: () => {
|
|
1655
1774
|
t: (key: Paths<TranslationResource>) => string;
|
|
1656
1775
|
currentLocale: "en-US" | Omit<string, "en-US">;
|
|
@@ -1721,6 +1840,15 @@ declare const useTranslation: () => {
|
|
|
1721
1840
|
stopRecordingConfirmation: string;
|
|
1722
1841
|
cancel: string;
|
|
1723
1842
|
};
|
|
1843
|
+
streaming: {
|
|
1844
|
+
startStreaming: string;
|
|
1845
|
+
stopStreaming: string;
|
|
1846
|
+
startStreamingConfirmation: string;
|
|
1847
|
+
stopStreamingConfirmation: string;
|
|
1848
|
+
streamUrlPlaceholder: string;
|
|
1849
|
+
streamKeyPlaceholder: string;
|
|
1850
|
+
cancel: string;
|
|
1851
|
+
};
|
|
1724
1852
|
raiseHand: string;
|
|
1725
1853
|
lowerHand: string;
|
|
1726
1854
|
startScreenSharing: string;
|
|
@@ -1759,6 +1887,22 @@ declare const useTranslation: () => {
|
|
|
1759
1887
|
done: string;
|
|
1760
1888
|
};
|
|
1761
1889
|
};
|
|
1890
|
+
indicators: {
|
|
1891
|
+
recording: {
|
|
1892
|
+
label: string;
|
|
1893
|
+
tooltip: string;
|
|
1894
|
+
};
|
|
1895
|
+
streaming: {
|
|
1896
|
+
label: string;
|
|
1897
|
+
tooltip: string;
|
|
1898
|
+
};
|
|
1899
|
+
};
|
|
1900
|
+
notifications: {
|
|
1901
|
+
recordingStarted: string;
|
|
1902
|
+
recordingStopped: string;
|
|
1903
|
+
streamingStarted: string;
|
|
1904
|
+
streamingStopped: string;
|
|
1905
|
+
};
|
|
1762
1906
|
general: {
|
|
1763
1907
|
error: string;
|
|
1764
1908
|
};
|
|
@@ -1775,9 +1919,42 @@ declare const CallAppSettingsSchema: v.ObjectSchema<{
|
|
|
1775
1919
|
readonly adminHost: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1776
1920
|
readonly clientHost: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1777
1921
|
readonly host: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1922
|
+
/**
|
|
1923
|
+
* Caller opt-out for SDK-identification telemetry. When `true`, the Calls SDK never
|
|
1924
|
+
* self-reports to `/user_sessions` (checked at the send chokepoint, so it covers both
|
|
1925
|
+
* the init session-restore path and every login-success path). Defaults to sending.
|
|
1926
|
+
*/
|
|
1927
|
+
readonly disableSdkIdentification: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1778
1928
|
}, undefined>;
|
|
1779
1929
|
type CallAppSettings = v.InferOutput<typeof CallAppSettingsSchema>;
|
|
1780
1930
|
//#endregion
|
|
1931
|
+
//#region src/settings.d.ts
|
|
1932
|
+
interface CometChatSettings {
|
|
1933
|
+
appId: string;
|
|
1934
|
+
region: string;
|
|
1935
|
+
credentials?: {
|
|
1936
|
+
authKey?: string;
|
|
1937
|
+
};
|
|
1938
|
+
callsSDK?: {
|
|
1939
|
+
adminHost?: string | null;
|
|
1940
|
+
clientHost?: string | null;
|
|
1941
|
+
host?: string | null;
|
|
1942
|
+
disableSdkIdentification?: boolean | null;
|
|
1943
|
+
};
|
|
1944
|
+
chatSDK?: Record<string, unknown>;
|
|
1945
|
+
uiKit?: Record<string, unknown>;
|
|
1946
|
+
}
|
|
1947
|
+
/**
|
|
1948
|
+
* Maps a `cometchat-settings.json` object onto the Calls SDK's own `CallAppSettings`
|
|
1949
|
+
* shape. Kept parallel to how the Chat SDK's `initFromSettings` maps the same file onto
|
|
1950
|
+
* its internal `AppSettings`: `appId`/`region` at the root, `authKey` under
|
|
1951
|
+
* `credentials`, and host overrides under the SDK-specific (`callsSDK`) section.
|
|
1952
|
+
*
|
|
1953
|
+
* The result is passed to the same valibot schema `init` uses, so validation stays
|
|
1954
|
+
* identical across both entry points.
|
|
1955
|
+
*/
|
|
1956
|
+
declare function callAppSettingsFromSettings(settings: CometChatSettings): CallAppSettings;
|
|
1957
|
+
//#endregion
|
|
1781
1958
|
//#region src/native-communication/native-to-js.native.d.ts
|
|
1782
1959
|
declare function setupNativeEventListeners(): void;
|
|
1783
1960
|
//#endregion
|
|
@@ -3411,10 +3588,22 @@ declare class CallLog {
|
|
|
3411
3588
|
* The time the call was initiated at.
|
|
3412
3589
|
*/
|
|
3413
3590
|
private initiatedAt;
|
|
3591
|
+
/**
|
|
3592
|
+
* The time the call started at. Sent by the calls host in place of
|
|
3593
|
+
* `initiatedAt`; read {@link getStartedAt} and fall back to
|
|
3594
|
+
* {@link getInitiatedAt} when only one of the two is present.
|
|
3595
|
+
*/
|
|
3596
|
+
private startedAt;
|
|
3414
3597
|
/**
|
|
3415
3598
|
* The call category of the call log.
|
|
3416
3599
|
*/
|
|
3417
3600
|
private callCategory;
|
|
3601
|
+
/**
|
|
3602
|
+
* The mode of the call log. Sent by the calls host in place of
|
|
3603
|
+
* `callCategory`; read {@link getMode} and fall back to
|
|
3604
|
+
* {@link getCallCategory} when only one of the two is present.
|
|
3605
|
+
*/
|
|
3606
|
+
private mode;
|
|
3418
3607
|
/**
|
|
3419
3608
|
* @type {CallUser}
|
|
3420
3609
|
* The initiator of the call log.
|
|
@@ -3528,6 +3717,26 @@ declare class CallLog {
|
|
|
3528
3717
|
* @param value - The time the call was initiated at.
|
|
3529
3718
|
*/
|
|
3530
3719
|
setInitiatedAt(value: number): void;
|
|
3720
|
+
/**
|
|
3721
|
+
* Gets the time the call started at.
|
|
3722
|
+
* @returns The time the call started at.
|
|
3723
|
+
*/
|
|
3724
|
+
getStartedAt(): number;
|
|
3725
|
+
/**
|
|
3726
|
+
* Sets the time the call started at.
|
|
3727
|
+
* @param value - The time the call started at.
|
|
3728
|
+
*/
|
|
3729
|
+
setStartedAt(value: number): void;
|
|
3730
|
+
/**
|
|
3731
|
+
* Gets the mode of the call log.
|
|
3732
|
+
* @returns The mode of the call log.
|
|
3733
|
+
*/
|
|
3734
|
+
getMode(): string;
|
|
3735
|
+
/**
|
|
3736
|
+
* Sets the mode of the call log.
|
|
3737
|
+
* @param value - The mode to set.
|
|
3738
|
+
*/
|
|
3739
|
+
setMode(value: string): void;
|
|
3531
3740
|
/**
|
|
3532
3741
|
* Gets the call category of the call log.
|
|
3533
3742
|
* @returns The call category of the call log.
|
|
@@ -3756,6 +3965,16 @@ declare class CallLogRequest {
|
|
|
3756
3965
|
* @returns A promise that resolves to an array of CallLog objects, or an empty array if there are no previous pages, or rejects with a CometChatCallsException if there was an error..
|
|
3757
3966
|
*/
|
|
3758
3967
|
fetchPrevious(): Promise<CallLog[] | []>;
|
|
3968
|
+
/**
|
|
3969
|
+
* Gets the page the cursor currently sits on.
|
|
3970
|
+
* @returns The current page, or `0` before the first successful fetch.
|
|
3971
|
+
*/
|
|
3972
|
+
getCurrentPage(): number;
|
|
3973
|
+
/**
|
|
3974
|
+
* Gets the number of pages the server reported.
|
|
3975
|
+
* @returns The total page count, or `0` before the first successful fetch.
|
|
3976
|
+
*/
|
|
3977
|
+
getTotalPages(): number;
|
|
3759
3978
|
/**
|
|
3760
3979
|
* Makes an API call to fetch call logs.
|
|
3761
3980
|
* @param isFetchNext Whether to fetch the next page of call logs.
|
|
@@ -4369,6 +4588,8 @@ declare class CometChatCalls extends SessionMethodsCore {
|
|
|
4369
4588
|
static CallSettingsBuilder: typeof CallSettingsBuilder;
|
|
4370
4589
|
static CallAppSettingsBuilder: typeof CallAppSettingsBuilder;
|
|
4371
4590
|
static Component: typeof AppReactNativeSDK;
|
|
4591
|
+
static CallLogRequestBuilder: typeof CallLogRequestBuilder;
|
|
4592
|
+
static CallLog: typeof CallLog;
|
|
4372
4593
|
/**
|
|
4373
4594
|
* Initializes the CometChat Calls SDK with the provided app settings.
|
|
4374
4595
|
* Must be called before any other SDK methods.
|
|
@@ -4386,6 +4607,34 @@ declare class CometChatCalls extends SessionMethodsCore {
|
|
|
4386
4607
|
readonly success: true;
|
|
4387
4608
|
readonly error: null;
|
|
4388
4609
|
}>;
|
|
4610
|
+
/**
|
|
4611
|
+
* Shared tail of {@link init} / {@link initFromSettings}. Both entry points validate
|
|
4612
|
+
* and map their own inputs, then hand the validated {@link CallAppSettings} here so
|
|
4613
|
+
* the post-validation work — persisting the telemetry integration source (BEFORE any
|
|
4614
|
+
* report) and firing SDK-identification once on a restored session — lives in exactly
|
|
4615
|
+
* one place and cannot drift between the two paths. The ONLY per-entry-point
|
|
4616
|
+
* difference is `integrationSource`.
|
|
4617
|
+
*/
|
|
4618
|
+
private static finalizeInit;
|
|
4619
|
+
/**
|
|
4620
|
+
* Initializes the CometChat Calls SDK from a `cometchat-settings.json` object.
|
|
4621
|
+
* Parallels the Chat SDK's `initFromSettings` (file-based init for skills-driven
|
|
4622
|
+
* integrations): it maps the shared settings shape onto the Calls SDK's own
|
|
4623
|
+
* `CallAppSettings` and then performs exactly the same work as {@link init}.
|
|
4624
|
+
* @param settings - Parsed `cometchat-settings.json` object.
|
|
4625
|
+
* @returns An object indicating success or failure with error details.
|
|
4626
|
+
*/
|
|
4627
|
+
static initFromSettings(settings: CometChatSettings): Promise<{
|
|
4628
|
+
readonly success: false;
|
|
4629
|
+
readonly error: {
|
|
4630
|
+
readonly name: "VALIDATION_ERROR";
|
|
4631
|
+
readonly message: `Invalid app settings: ${string}`;
|
|
4632
|
+
readonly timestamp: number;
|
|
4633
|
+
};
|
|
4634
|
+
} | {
|
|
4635
|
+
readonly success: true;
|
|
4636
|
+
readonly error: null;
|
|
4637
|
+
}>;
|
|
4389
4638
|
/**
|
|
4390
4639
|
* Logs in a user with their UID and an optional auth key.
|
|
4391
4640
|
* If no auth key is provided, the one from app settings is used.
|
|
@@ -4446,11 +4695,17 @@ declare class CometChatCalls extends SessionMethodsCore {
|
|
|
4446
4695
|
token: string;
|
|
4447
4696
|
}>;
|
|
4448
4697
|
private static getBaseURL;
|
|
4698
|
+
/**
|
|
4699
|
+
* SDK-identification telemetry chokepoint. Fire-and-forget, deduped, non-fatal.
|
|
4700
|
+
* Called from login success AND init()-session-restore. Sends `/user_sessions`
|
|
4701
|
+
* ONLY when the Chat SDK is absent (it otherwise handles this telemetry itself).
|
|
4702
|
+
* Never awaited on the happy path; never throws.
|
|
4703
|
+
*/
|
|
4704
|
+
private static reportSdkIdentification;
|
|
4449
4705
|
private static loginWithUID;
|
|
4450
4706
|
private static authenticateWithToken;
|
|
4451
4707
|
private static logoutInternal;
|
|
4452
4708
|
private static callGenerateTokenAPI;
|
|
4453
|
-
private static callVerifyTokenAPI;
|
|
4454
4709
|
private static getStorageKey;
|
|
4455
4710
|
private static saveUser;
|
|
4456
4711
|
private static getSavedUser;
|