@cometchat/calls-sdk-react-native 4.0.9 → 4.1.1

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.
Files changed (47) hide show
  1. package/android/src/main/java/com/CometChatCalls/CallNotificationService.java +93 -0
  2. package/android/src/main/java/com/CometChatCalls/CallNotificationServiceModule.java +48 -0
  3. package/android/src/main/java/com/CometChatCalls/CometChatCallsPackage.java +13 -3
  4. package/android/src/main/java/com/CometChatCalls/PictureInPictureModule.java +133 -0
  5. package/android/src/main/res/drawable-mdpi/callingcomponent_icons_headphones_pluged.png +0 -0
  6. package/dist/CometChatErrorConstants.d.ts +124 -124
  7. package/dist/Constants.d.ts +724 -724
  8. package/dist/Helper copy.d.ts +1 -1
  9. package/dist/Helper.d.ts +7 -7
  10. package/dist/api/APIHandler.d.ts +42 -42
  11. package/dist/api/endpoints.d.ts +7 -7
  12. package/dist/api/helper.d.ts +69 -69
  13. package/dist/api/index.d.ts +2 -2
  14. package/dist/constants/CallConstants.d.ts +136 -136
  15. package/dist/constants/index.d.ts +1 -1
  16. package/dist/defaultCallsettings.d.ts +2 -2
  17. package/dist/index.d.ts +9 -9
  18. package/dist/index.js +80 -80
  19. package/dist/models/CallAppSettings.d.ts +42 -42
  20. package/dist/models/CallGroup.d.ts +14 -14
  21. package/dist/models/CallLog.d.ts +276 -276
  22. package/dist/models/CallLogFilterParams.d.ts +97 -97
  23. package/dist/models/CallSettings.d.ts +316 -316
  24. package/dist/models/CallUser.d.ts +14 -14
  25. package/dist/models/CometChatCallLogs.d.ts +193 -193
  26. package/dist/models/CometChatCalls.d.ts +110 -110
  27. package/dist/models/CometChatCallsComponent.d.ts +13 -13
  28. package/dist/models/CometChatCallsComponentCore.d.ts +18 -18
  29. package/dist/models/CometChatCallsException.d.ts +7 -7
  30. package/dist/models/CometChatPresenterComponent.d.ts +13 -13
  31. package/dist/models/ErrorModel.d.ts +11 -11
  32. package/dist/models/Listner.d.ts +64 -64
  33. package/dist/models/ListnerHandler.d.ts +10 -10
  34. package/dist/models/MessageComponent.d.ts +7 -7
  35. package/dist/models/Participant.d.ts +184 -184
  36. package/dist/models/PresenterSettings.d.ts +194 -194
  37. package/dist/models/RTCUser.d.ts +18 -18
  38. package/dist/models/Recording.d.ts +86 -86
  39. package/dist/models/index.d.ts +9 -9
  40. package/dist/types/ICallAppSettings.d.ts +6 -6
  41. package/dist/types/ICallSettings.d.ts +60 -60
  42. package/dist/types/RTCUser.d.ts +6 -6
  43. package/dist/types/callEvents.d.ts +53 -53
  44. package/dist/types/common.d.ts +18 -18
  45. package/dist/types/index.d.ts +2 -2
  46. package/ios/AudioMode.m +15 -0
  47. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
- import { ErrorModel } from "./ErrorModel";
2
- export declare class CometChatCallsException {
3
- code: ErrorModel["code"];
4
- message?: ErrorModel["message"];
5
- details?: ErrorModel["details"];
6
- constructor(errorModel: ErrorModel);
7
- }
1
+ import { ErrorModel } from "./ErrorModel";
2
+ export declare class CometChatCallsException {
3
+ code: ErrorModel["code"];
4
+ message?: ErrorModel["message"];
5
+ details?: ErrorModel["details"];
6
+ constructor(errorModel: ErrorModel);
7
+ }
@@ -1,13 +1,13 @@
1
- import React from 'react';
2
- import { PresenterSettings } from './PresenterSettings';
3
- type MyState = {
4
- errored: boolean;
5
- };
6
- export declare class CometChatPresenterComponent extends React.Component<{
7
- presenterSettings: PresenterSettings;
8
- callToken: string;
9
- }, MyState> {
10
- constructor(props: any);
11
- render(): JSX.Element;
12
- }
13
- export {};
1
+ import React from 'react';
2
+ import { PresenterSettings } from './PresenterSettings';
3
+ type MyState = {
4
+ errored: boolean;
5
+ };
6
+ export declare class CometChatPresenterComponent extends React.Component<{
7
+ presenterSettings: PresenterSettings;
8
+ callToken: string;
9
+ }, MyState> {
10
+ constructor(props: any);
11
+ render(): JSX.Element;
12
+ }
13
+ export {};
@@ -1,11 +1,11 @@
1
- /**
2
- *
3
- *
4
- * @export
5
- * @interface ErrorModel
6
- */
7
- export interface ErrorModel {
8
- code: string | number;
9
- message?: string;
10
- details?: object | string;
11
- }
1
+ /**
2
+ *
3
+ *
4
+ * @export
5
+ * @interface ErrorModel
6
+ */
7
+ export interface ErrorModel {
8
+ code: string | number;
9
+ message?: string;
10
+ details?: object | string;
11
+ }
@@ -1,64 +1,64 @@
1
- import { ICallEventsData } from '../types/callEvents';
2
- import { CometChatCallsException } from './CometChatCallsException';
3
- interface IOngoingCallListener {
4
- onUserJoined: (user: Partial<ICallEventsData['onUserJoined']>) => void;
5
- onUserLeft: (user: Partial<ICallEventsData['onUserLeft']>) => void;
6
- onUserListUpdated: (userList: Partial<ICallEventsData['onUserListUpdated']>) => void;
7
- onMediaDeviceListUpdated: (devices: Partial<ICallEventsData['onMediaDeviceListUpdated']>) => void;
8
- onRecordingStarted: (data: Partial<ICallEventsData['onRecordingStarted']>) => void;
9
- onRecordingStopped: (data: Partial<ICallEventsData['onRecordingStopped']>) => void;
10
- onUserMuted: (test: Partial<ICallEventsData["onUserMuted"]>) => void;
11
- onCallSwitchedToVideo: (data: Partial<ICallEventsData['onCallSwitchedToVideo']>) => void;
12
- onCallEnded: () => void;
13
- onCallEndButtonPressed: () => void;
14
- onAudioModesUpdated: (any: any) => void;
15
- onError: (error: CometChatCallsException) => void;
16
- }
17
- export declare class OngoingCallListener {
18
- /**
19
- * This event is triggered when a user joins the call.
20
- */
21
- onUserJoined?: IOngoingCallListener["onUserJoined"];
22
- /**
23
- * This event is triggered when a user leaves the call.
24
- */
25
- onUserLeft?: IOngoingCallListener["onUserLeft"];
26
- /**
27
- * This event is triggered when the participant list of the call changes.
28
- */
29
- onUserListUpdated?: IOngoingCallListener["onUserListUpdated"];
30
- /**
31
- * This event is triggered when an audio mode is updated.
32
- */
33
- onAudioModesUpdated?: IOngoingCallListener["onAudioModesUpdated"];
34
- /**
35
- * This event is triggered when the call is ended.
36
- */
37
- onCallEnded?: IOngoingCallListener["onCallEnded"];
38
- /**
39
- * This event is triggered when end call button is pressed.
40
- */
41
- onCallEndButtonPressed?: IOngoingCallListener["onCallEndButtonPressed"];
42
- /**
43
- * This event is triggered when an error occurs.
44
- */
45
- onError?: IOngoingCallListener["onError"];
46
- /**
47
- * This event is triggered when someone starts recording the call.
48
- */
49
- onRecordingStarted?: IOngoingCallListener["onRecordingStarted"];
50
- /**
51
- * This event is triggered when someone stops recording the call.
52
- */
53
- onRecordingStopped?: IOngoingCallListener["onRecordingStopped"];
54
- /**
55
- * This event is triggered when a user is muted.
56
- */
57
- onUserMuted?: IOngoingCallListener["onUserMuted"];
58
- /**
59
- * This event is triggered when an audio call is switched to a video call.
60
- */
61
- onCallSwitchedToVideo?: IOngoingCallListener["onCallSwitchedToVideo"];
62
- constructor(eventObj: Partial<IOngoingCallListener>);
63
- }
64
- export {};
1
+ import { ICallEventsData } from '../types/callEvents';
2
+ import { CometChatCallsException } from './CometChatCallsException';
3
+ interface IOngoingCallListener {
4
+ onUserJoined: (user: Partial<ICallEventsData['onUserJoined']>) => void;
5
+ onUserLeft: (user: Partial<ICallEventsData['onUserLeft']>) => void;
6
+ onUserListUpdated: (userList: Partial<ICallEventsData['onUserListUpdated']>) => void;
7
+ onMediaDeviceListUpdated: (devices: Partial<ICallEventsData['onMediaDeviceListUpdated']>) => void;
8
+ onRecordingStarted: (data: Partial<ICallEventsData['onRecordingStarted']>) => void;
9
+ onRecordingStopped: (data: Partial<ICallEventsData['onRecordingStopped']>) => void;
10
+ onUserMuted: (test: Partial<ICallEventsData["onUserMuted"]>) => void;
11
+ onCallSwitchedToVideo: (data: Partial<ICallEventsData['onCallSwitchedToVideo']>) => void;
12
+ onCallEnded: () => void;
13
+ onCallEndButtonPressed: () => void;
14
+ onAudioModesUpdated: (any: any) => void;
15
+ onError: (error: CometChatCallsException) => void;
16
+ }
17
+ export declare class OngoingCallListener {
18
+ /**
19
+ * This event is triggered when a user joins the call.
20
+ */
21
+ onUserJoined?: IOngoingCallListener["onUserJoined"];
22
+ /**
23
+ * This event is triggered when a user leaves the call.
24
+ */
25
+ onUserLeft?: IOngoingCallListener["onUserLeft"];
26
+ /**
27
+ * This event is triggered when the participant list of the call changes.
28
+ */
29
+ onUserListUpdated?: IOngoingCallListener["onUserListUpdated"];
30
+ /**
31
+ * This event is triggered when an audio mode is updated.
32
+ */
33
+ onAudioModesUpdated?: IOngoingCallListener["onAudioModesUpdated"];
34
+ /**
35
+ * This event is triggered when the call is ended.
36
+ */
37
+ onCallEnded?: IOngoingCallListener["onCallEnded"];
38
+ /**
39
+ * This event is triggered when end call button is pressed.
40
+ */
41
+ onCallEndButtonPressed?: IOngoingCallListener["onCallEndButtonPressed"];
42
+ /**
43
+ * This event is triggered when an error occurs.
44
+ */
45
+ onError?: IOngoingCallListener["onError"];
46
+ /**
47
+ * This event is triggered when someone starts recording the call.
48
+ */
49
+ onRecordingStarted?: IOngoingCallListener["onRecordingStarted"];
50
+ /**
51
+ * This event is triggered when someone stops recording the call.
52
+ */
53
+ onRecordingStopped?: IOngoingCallListener["onRecordingStopped"];
54
+ /**
55
+ * This event is triggered when a user is muted.
56
+ */
57
+ onUserMuted?: IOngoingCallListener["onUserMuted"];
58
+ /**
59
+ * This event is triggered when an audio call is switched to a video call.
60
+ */
61
+ onCallSwitchedToVideo?: IOngoingCallListener["onCallSwitchedToVideo"];
62
+ constructor(eventObj: Partial<IOngoingCallListener>);
63
+ }
64
+ export {};
@@ -1,10 +1,10 @@
1
- import { OngoingCallListener } from './Listner';
2
- interface IMultiOngoingCallListener extends OngoingCallListener {
3
- _name: string;
4
- }
5
- export declare class ListenerHandlers {
6
- static callHandlers?: IMultiOngoingCallListener[];
7
- static addCallEventListener(name: string, callListener: OngoingCallListener): void;
8
- static removeCallEventListener(handler: string): void;
9
- }
10
- export {};
1
+ import { OngoingCallListener } from './Listner';
2
+ interface IMultiOngoingCallListener extends OngoingCallListener {
3
+ _name: string;
4
+ }
5
+ export declare class ListenerHandlers {
6
+ static callHandlers?: IMultiOngoingCallListener[];
7
+ static addCallEventListener(name: string, callListener: OngoingCallListener): void;
8
+ static removeCallEventListener(handler: string): void;
9
+ }
10
+ export {};
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- export declare class MessageComponent extends React.Component<{
3
- message: string;
4
- }> {
5
- constructor(props: any);
6
- render(): JSX.Element;
7
- }
1
+ import React from 'react';
2
+ export declare class MessageComponent extends React.Component<{
3
+ message: string;
4
+ }> {
5
+ constructor(props: any);
6
+ render(): JSX.Element;
7
+ }
@@ -1,184 +1,184 @@
1
- /**
2
- * Represents a participant in a call.
3
- */
4
- export declare class Participant {
5
- /**
6
- * The unique identifier of the participant.
7
- */
8
- private uid;
9
- /**
10
- * The name of the participant.
11
- */
12
- private name;
13
- /**
14
- * The avatar of the participant.
15
- */
16
- private avatar;
17
- /**
18
- * The total audio minutes of the participant.
19
- */
20
- private totalAudioMinutes;
21
- /**
22
- * The total video minutes of the participant.
23
- */
24
- private totalVideoMinutes;
25
- /**
26
- * The total duration in minutes of the participant.
27
- */
28
- private totalDurationInMinutes;
29
- /**
30
- * The device ID of the participant.
31
- */
32
- private deviceID;
33
- /**
34
- * Whether the participant has joined the call or not.
35
- */
36
- private hasJoined;
37
- /**
38
- * The timestamp when the participant joined the call.
39
- */
40
- private joinedAt;
41
- /**
42
- * The timestamp when the participant left the call.
43
- */
44
- private leftAt;
45
- /**
46
- * The media ID of the participant.
47
- */
48
- private mid;
49
- /**
50
- * The state of the participant.
51
- */
52
- private state;
53
- /**
54
- * Creates a new instance of Participant.
55
- * @param object - The object containing the participant data.
56
- */
57
- constructor(object: any);
58
- /**
59
- * Gets the unique identifier of the participant.
60
- * @returns The unique identifier of the participant.
61
- */
62
- getUid(): string;
63
- /**
64
- * Sets the unique identifier of the participant.
65
- * @param value - The unique identifier of the participant.
66
- */
67
- setUid(value: string): void;
68
- /**
69
- * Gets the name of the participant.
70
- * @returns The name of the participant.
71
- */
72
- getName(): string;
73
- /**
74
- * Sets the name of the participant.
75
- * @param value - The name of the participant.
76
- */
77
- setName(value: string): void;
78
- /**
79
- * Gets the avatar of the participant.
80
- * @returns The avatar of the participant.
81
- */
82
- getAvatar(): string;
83
- /**
84
- * Sets the avatar of the participant.
85
- * @param value - The avatar of the participant.
86
- */
87
- setAvatar(value: string): void;
88
- /**
89
- * Gets the total audio minutes of the participant.
90
- * @returns The total audio minutes of the participant.
91
- */
92
- getTotalAudioMinutes(): number;
93
- /**
94
- * Sets the total audio minutes of the participant.
95
- * @param value - The total audio minutes of the participant.
96
- */
97
- setTotalAudioMinutes(value: number): void;
98
- /**
99
- * Gets the total video minutes of the participant.
100
- * @returns The total video minutes of the participant.
101
- */
102
- getTotalVideoMinutes(): number;
103
- /**
104
- * Sets the total video minutes of the participant.
105
- * @param value - The total video minutes of the participant.
106
- */
107
- setTotalVideoMinutes(value: number): void;
108
- /**
109
- * Gets the total duration in minutes of the participant.
110
- * @returns The total duration in minutes of the participant.
111
- */
112
- getTotalDurationInMinutes(): number;
113
- /**
114
- * Sets the total duration in minutes of the participant.
115
- * @param value - The total duration in minutes of the participant.
116
- */
117
- setTotalDurationInMinutes(value: number): void;
118
- /**
119
- * Gets the device ID of the participant.
120
- * @returns The device ID of the participant.
121
- */
122
- getDeviceID(): string;
123
- /**
124
- * Sets the device ID of the participant.
125
- * @param value - The device ID of the participant.
126
- */
127
- setDeviceID(value: string): void;
128
- /**
129
- * Gets whether the participant has joined the call or not.
130
- * @returns Whether the participant has joined the call or not.
131
- */
132
- getHasJoined(): boolean;
133
- /**
134
- * Sets whether the participant has joined the call or not.
135
- * @param value - Whether the participant has joined the call or not.
136
- */
137
- setHasJoined(value: boolean): void;
138
- /**
139
- * Gets the timestamp when the participant joined the call.
140
- * @returns The timestamp when the participant joined the call.
141
- */
142
- getJoinedAt(): number;
143
- /**
144
- * Sets the timestamp when the participant joined the call.
145
- * @param value - The timestamp when the participant joined the call.
146
- */
147
- setJoinedAt(value: number): void;
148
- /**
149
- * Gets the timestamp when the participant left the call.
150
- * @returns The timestamp when the participant left the call.
151
- */
152
- getLeftAt(): number;
153
- /**
154
- * Sets the timestamp when the participant left the call.
155
- * @param value - The timestamp when the participant left the call.
156
- */
157
- setLeftAt(value: number): void;
158
- /**
159
- * Gets the media ID of the participant.
160
- * @returns The media ID of the participant.
161
- */
162
- getMid(): string;
163
- /**
164
- * Sets the media ID of the participant.
165
- * @param value - The media ID of the participant.
166
- */
167
- setMid(value: string): void;
168
- /**
169
- * Gets the state of the participant.
170
- * @returns The state of the participant.
171
- */
172
- getState(): string;
173
- /**
174
- * Sets the state of the participant.
175
- * @param value - The state of the participant.
176
- */
177
- setState(value: string): void;
178
- /**
179
- * Creates a new instance of Participant from a JSON object.
180
- * @param object - The JSON object containing the participant data.
181
- * @returns A new instance of Participant.
182
- */
183
- static getParticipantFromJson(object: any): Participant;
184
- }
1
+ /**
2
+ * Represents a participant in a call.
3
+ */
4
+ export declare class Participant {
5
+ /**
6
+ * The unique identifier of the participant.
7
+ */
8
+ private uid;
9
+ /**
10
+ * The name of the participant.
11
+ */
12
+ private name;
13
+ /**
14
+ * The avatar of the participant.
15
+ */
16
+ private avatar;
17
+ /**
18
+ * The total audio minutes of the participant.
19
+ */
20
+ private totalAudioMinutes;
21
+ /**
22
+ * The total video minutes of the participant.
23
+ */
24
+ private totalVideoMinutes;
25
+ /**
26
+ * The total duration in minutes of the participant.
27
+ */
28
+ private totalDurationInMinutes;
29
+ /**
30
+ * The device ID of the participant.
31
+ */
32
+ private deviceID;
33
+ /**
34
+ * Whether the participant has joined the call or not.
35
+ */
36
+ private hasJoined;
37
+ /**
38
+ * The timestamp when the participant joined the call.
39
+ */
40
+ private joinedAt;
41
+ /**
42
+ * The timestamp when the participant left the call.
43
+ */
44
+ private leftAt;
45
+ /**
46
+ * The media ID of the participant.
47
+ */
48
+ private mid;
49
+ /**
50
+ * The state of the participant.
51
+ */
52
+ private state;
53
+ /**
54
+ * Creates a new instance of Participant.
55
+ * @param object - The object containing the participant data.
56
+ */
57
+ constructor(object: any);
58
+ /**
59
+ * Gets the unique identifier of the participant.
60
+ * @returns The unique identifier of the participant.
61
+ */
62
+ getUid(): string;
63
+ /**
64
+ * Sets the unique identifier of the participant.
65
+ * @param value - The unique identifier of the participant.
66
+ */
67
+ setUid(value: string): void;
68
+ /**
69
+ * Gets the name of the participant.
70
+ * @returns The name of the participant.
71
+ */
72
+ getName(): string;
73
+ /**
74
+ * Sets the name of the participant.
75
+ * @param value - The name of the participant.
76
+ */
77
+ setName(value: string): void;
78
+ /**
79
+ * Gets the avatar of the participant.
80
+ * @returns The avatar of the participant.
81
+ */
82
+ getAvatar(): string;
83
+ /**
84
+ * Sets the avatar of the participant.
85
+ * @param value - The avatar of the participant.
86
+ */
87
+ setAvatar(value: string): void;
88
+ /**
89
+ * Gets the total audio minutes of the participant.
90
+ * @returns The total audio minutes of the participant.
91
+ */
92
+ getTotalAudioMinutes(): number;
93
+ /**
94
+ * Sets the total audio minutes of the participant.
95
+ * @param value - The total audio minutes of the participant.
96
+ */
97
+ setTotalAudioMinutes(value: number): void;
98
+ /**
99
+ * Gets the total video minutes of the participant.
100
+ * @returns The total video minutes of the participant.
101
+ */
102
+ getTotalVideoMinutes(): number;
103
+ /**
104
+ * Sets the total video minutes of the participant.
105
+ * @param value - The total video minutes of the participant.
106
+ */
107
+ setTotalVideoMinutes(value: number): void;
108
+ /**
109
+ * Gets the total duration in minutes of the participant.
110
+ * @returns The total duration in minutes of the participant.
111
+ */
112
+ getTotalDurationInMinutes(): number;
113
+ /**
114
+ * Sets the total duration in minutes of the participant.
115
+ * @param value - The total duration in minutes of the participant.
116
+ */
117
+ setTotalDurationInMinutes(value: number): void;
118
+ /**
119
+ * Gets the device ID of the participant.
120
+ * @returns The device ID of the participant.
121
+ */
122
+ getDeviceID(): string;
123
+ /**
124
+ * Sets the device ID of the participant.
125
+ * @param value - The device ID of the participant.
126
+ */
127
+ setDeviceID(value: string): void;
128
+ /**
129
+ * Gets whether the participant has joined the call or not.
130
+ * @returns Whether the participant has joined the call or not.
131
+ */
132
+ getHasJoined(): boolean;
133
+ /**
134
+ * Sets whether the participant has joined the call or not.
135
+ * @param value - Whether the participant has joined the call or not.
136
+ */
137
+ setHasJoined(value: boolean): void;
138
+ /**
139
+ * Gets the timestamp when the participant joined the call.
140
+ * @returns The timestamp when the participant joined the call.
141
+ */
142
+ getJoinedAt(): number;
143
+ /**
144
+ * Sets the timestamp when the participant joined the call.
145
+ * @param value - The timestamp when the participant joined the call.
146
+ */
147
+ setJoinedAt(value: number): void;
148
+ /**
149
+ * Gets the timestamp when the participant left the call.
150
+ * @returns The timestamp when the participant left the call.
151
+ */
152
+ getLeftAt(): number;
153
+ /**
154
+ * Sets the timestamp when the participant left the call.
155
+ * @param value - The timestamp when the participant left the call.
156
+ */
157
+ setLeftAt(value: number): void;
158
+ /**
159
+ * Gets the media ID of the participant.
160
+ * @returns The media ID of the participant.
161
+ */
162
+ getMid(): string;
163
+ /**
164
+ * Sets the media ID of the participant.
165
+ * @param value - The media ID of the participant.
166
+ */
167
+ setMid(value: string): void;
168
+ /**
169
+ * Gets the state of the participant.
170
+ * @returns The state of the participant.
171
+ */
172
+ getState(): string;
173
+ /**
174
+ * Sets the state of the participant.
175
+ * @param value - The state of the participant.
176
+ */
177
+ setState(value: string): void;
178
+ /**
179
+ * Creates a new instance of Participant from a JSON object.
180
+ * @param object - The JSON object containing the participant data.
181
+ * @returns A new instance of Participant.
182
+ */
183
+ static getParticipantFromJson(object: any): Participant;
184
+ }