@cometchat/calls-sdk-javascript 4.0.10 → 4.0.11

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 (36) hide show
  1. package/pack/index.js +1 -1
  2. package/pack/index.js.LICENSE.txt +1 -0
  3. package/pack/src/Helper.d.ts +5 -5
  4. package/pack/src/api/APIHandler.d.ts +39 -39
  5. package/pack/src/api/endpoints.d.ts +7 -7
  6. package/pack/src/api/helper.d.ts +69 -69
  7. package/pack/src/api/index.d.ts +2 -2
  8. package/pack/src/constants/CallConstants.d.ts +217 -217
  9. package/pack/src/constants/index.d.ts +1 -1
  10. package/pack/src/defaultCallsettings.d.ts +2 -2
  11. package/pack/src/index.d.ts +7 -7
  12. package/pack/src/models/CallGroup.d.ts +14 -14
  13. package/pack/src/models/CallLog.d.ts +276 -276
  14. package/pack/src/models/CallSettings.d.ts +382 -382
  15. package/pack/src/models/CallUser.d.ts +14 -14
  16. package/pack/src/models/CallsAppSettings.d.ts +41 -41
  17. package/pack/src/models/CometChatCallLogs.d.ts +189 -189
  18. package/pack/src/models/CometChatCalls.d.ts +180 -180
  19. package/pack/src/models/CometChatCallsException.d.ts +8 -8
  20. package/pack/src/models/ErrorModel.d.ts +12 -12
  21. package/pack/src/models/Listener.d.ts +86 -86
  22. package/pack/src/models/ListnerHandler.d.ts +10 -10
  23. package/pack/src/models/Participant.d.ts +184 -184
  24. package/pack/src/models/PresenterSettings.d.ts +265 -265
  25. package/pack/src/models/RTCUser.d.ts +18 -18
  26. package/pack/src/models/Recording.d.ts +86 -86
  27. package/pack/src/models/index.d.ts +10 -10
  28. package/pack/src/types/ICallSettings.d.ts +61 -61
  29. package/pack/src/types/ICallsAppSettings.d.ts +6 -6
  30. package/pack/src/types/RTCUser.d.ts +6 -6
  31. package/pack/src/types/callEvents.d.ts +88 -88
  32. package/pack/src/types/common.d.ts +14 -14
  33. package/pack/src/types/index.d.ts +2 -2
  34. package/pack/src/util/parseJwt.d.ts +1 -1
  35. package/pack/src/util/verifyCallSettings.d.ts +4 -4
  36. package/package.json +2 -2
@@ -1,86 +1,86 @@
1
- /**
2
- * Represents a recording object.
3
- */
4
- export declare class Recording {
5
- /**
6
- * The recording ID.
7
- */
8
- private rid;
9
- /**
10
- * The URL of the recording.
11
- */
12
- private recording_url;
13
- /**
14
- * The start time of the recording.
15
- */
16
- private startTime;
17
- /**
18
- * The end time of the recording.
19
- */
20
- private endTime;
21
- /**
22
- * The duration of the recording.
23
- */
24
- private duration;
25
- /**
26
- * Creates a new instance of the Recording class.
27
- * @param data - The data to initialize the recording object.
28
- */
29
- constructor(data: any);
30
- /**
31
- * Gets the recording ID.
32
- * @returns The recording ID.
33
- */
34
- getRid(): string;
35
- /**
36
- * Sets the recording ID.
37
- * @param value - The recording ID to set.
38
- */
39
- setRid(value: string): void;
40
- /**
41
- * Gets the recording URL.
42
- * @returns The recording URL.
43
- */
44
- getRecordingURL(): string;
45
- /**
46
- * Sets the recording URL.
47
- * @param value - The recording URL to set.
48
- */
49
- setRecordingURL(value: string): void;
50
- /**
51
- * Gets the start time of the recording.
52
- * @returns The start time of the recording.
53
- */
54
- getStartTime(): number;
55
- /**
56
- * Sets the start time of the recording.
57
- * @param value - The start time of the recording to set.
58
- */
59
- setStartTime(value: number): void;
60
- /**
61
- * Gets the end time of the recording.
62
- * @returns The end time of the recording.
63
- */
64
- getEndTime(): number;
65
- /**
66
- * Sets the end time of the recording.
67
- * @param value - The end time of the recording to set.
68
- */
69
- setEndTime(value: number): void;
70
- /**
71
- * Gets the duration of the recording.
72
- * @returns The duration of the recording.
73
- */
74
- getDuration(): number;
75
- /**
76
- * Sets the duration of the recording.
77
- * @param value - The duration of the recording to set.
78
- */
79
- setDuration(value: number): void;
80
- /**
81
- * Creates a new Recording object from the given JSON data.
82
- * @param data - The JSON data to create the Recording object from.
83
- * @returns A new Recording object.
84
- */
85
- static getRecordingFromJson(data: any): Recording;
86
- }
1
+ /**
2
+ * Represents a recording object.
3
+ */
4
+ export declare class Recording {
5
+ /**
6
+ * The recording ID.
7
+ */
8
+ private rid;
9
+ /**
10
+ * The URL of the recording.
11
+ */
12
+ private recording_url;
13
+ /**
14
+ * The start time of the recording.
15
+ */
16
+ private startTime;
17
+ /**
18
+ * The end time of the recording.
19
+ */
20
+ private endTime;
21
+ /**
22
+ * The duration of the recording.
23
+ */
24
+ private duration;
25
+ /**
26
+ * Creates a new instance of the Recording class.
27
+ * @param data - The data to initialize the recording object.
28
+ */
29
+ constructor(data: any);
30
+ /**
31
+ * Gets the recording ID.
32
+ * @returns The recording ID.
33
+ */
34
+ getRid(): string;
35
+ /**
36
+ * Sets the recording ID.
37
+ * @param value - The recording ID to set.
38
+ */
39
+ setRid(value: string): void;
40
+ /**
41
+ * Gets the recording URL.
42
+ * @returns The recording URL.
43
+ */
44
+ getRecordingURL(): string;
45
+ /**
46
+ * Sets the recording URL.
47
+ * @param value - The recording URL to set.
48
+ */
49
+ setRecordingURL(value: string): void;
50
+ /**
51
+ * Gets the start time of the recording.
52
+ * @returns The start time of the recording.
53
+ */
54
+ getStartTime(): number;
55
+ /**
56
+ * Sets the start time of the recording.
57
+ * @param value - The start time of the recording to set.
58
+ */
59
+ setStartTime(value: number): void;
60
+ /**
61
+ * Gets the end time of the recording.
62
+ * @returns The end time of the recording.
63
+ */
64
+ getEndTime(): number;
65
+ /**
66
+ * Sets the end time of the recording.
67
+ * @param value - The end time of the recording to set.
68
+ */
69
+ setEndTime(value: number): void;
70
+ /**
71
+ * Gets the duration of the recording.
72
+ * @returns The duration of the recording.
73
+ */
74
+ getDuration(): number;
75
+ /**
76
+ * Sets the duration of the recording.
77
+ * @param value - The duration of the recording to set.
78
+ */
79
+ setDuration(value: number): void;
80
+ /**
81
+ * Creates a new Recording object from the given JSON data.
82
+ * @param data - The JSON data to create the Recording object from.
83
+ * @returns A new Recording object.
84
+ */
85
+ static getRecordingFromJson(data: any): Recording;
86
+ }
@@ -1,10 +1,10 @@
1
- import { ListenerHandlers } from "./ListnerHandler";
2
- export declare const addCallEventListener: typeof ListenerHandlers.addCallEventListener;
3
- export declare const removeCallEventListener: typeof ListenerHandlers.removeCallEventListener;
4
- export * from "./CallSettings";
5
- export * from "./CallsAppSettings";
6
- export * from "./CometChatCalls";
7
- export * from "./ErrorModel";
8
- export * from "./RTCUser";
9
- export * from "./CometChatCallsException";
10
- export * from "./CometChatCallLogs";
1
+ import { ListenerHandlers } from "./ListnerHandler";
2
+ export declare const addCallEventListener: typeof ListenerHandlers.addCallEventListener;
3
+ export declare const removeCallEventListener: typeof ListenerHandlers.removeCallEventListener;
4
+ export * from "./CallSettings";
5
+ export * from "./CallsAppSettings";
6
+ export * from "./CometChatCalls";
7
+ export * from "./ErrorModel";
8
+ export * from "./RTCUser";
9
+ export * from "./CometChatCallsException";
10
+ export * from "./CometChatCallLogs";
@@ -1,61 +1,61 @@
1
- import { CallConstants } from "../constants";
2
- import { TColor, TPosition } from "./common";
3
- export interface ICallsettings {
4
- screenShareMode?: "default" | "presenter";
5
- ShowEndCallButton?: boolean;
6
- ShowRecordingButton?: boolean;
7
- StartRecordingOnCallStart?: boolean;
8
- ShowMuteAudioButton?: boolean;
9
- ShowPauseVideoButton?: boolean;
10
- ShowScreenShareButton?: boolean;
11
- ShowSwitchToVideoCallButton?: boolean;
12
- defaultLayout?: boolean;
13
- isAudioCall?: boolean;
14
- isAudioOnly?: boolean;
15
- user: {
16
- name: string;
17
- avatar?: string;
18
- uid: string;
19
- jwt?: string;
20
- };
21
- mode?: typeof CallConstants.MODE[keyof typeof CallConstants.MODE];
22
- StartAudioMuted?: boolean;
23
- StartVideoMuted?: boolean;
24
- ShowSwitchModeButton?: boolean;
25
- ShowVirtualBackgroundSetting?: boolean;
26
- VirtualBackground?: {
27
- AllowBackgroundBlur?: boolean;
28
- AllowUserImages?: boolean;
29
- ShowDefaultImages?: boolean;
30
- SetImages?: string[];
31
- EnforceBackgroundBlur?: 0 | 1 | 2;
32
- EnforceBackgroundImage?: string;
33
- };
34
- AvatarMode?: "circle";
35
- MainVideoContainerSetting?: {
36
- videoFit?: "contain" | "cover";
37
- zoomButton?: {
38
- visible?: boolean;
39
- visibility?: boolean;
40
- position?: TPosition;
41
- };
42
- nameLabel?: {
43
- visible?: boolean;
44
- visibility?: boolean;
45
- position?: TPosition;
46
- color?: TColor;
47
- };
48
- network?: {
49
- visible?: boolean;
50
- visibility?: boolean;
51
- position?: TPosition;
52
- };
53
- };
54
- customCSS?: string;
55
- analyticsSettings?: {
56
- ANALYTICS_HOST?: string;
57
- ANALYTICS_VERSION?: string;
58
- ANALYTICS_PING_DISABLED?: boolean;
59
- ANALYTICS_USE_SSL?: boolean;
60
- };
61
- }
1
+ import { CallConstants } from "../constants";
2
+ import { TColor, TPosition } from "./common";
3
+ export interface ICallsettings {
4
+ screenShareMode?: "default" | "presenter";
5
+ ShowEndCallButton?: boolean;
6
+ ShowRecordingButton?: boolean;
7
+ StartRecordingOnCallStart?: boolean;
8
+ ShowMuteAudioButton?: boolean;
9
+ ShowPauseVideoButton?: boolean;
10
+ ShowScreenShareButton?: boolean;
11
+ ShowSwitchToVideoCallButton?: boolean;
12
+ defaultLayout?: boolean;
13
+ isAudioCall?: boolean;
14
+ isAudioOnly?: boolean;
15
+ user: {
16
+ name: string;
17
+ avatar?: string;
18
+ uid: string;
19
+ jwt?: string;
20
+ };
21
+ mode?: typeof CallConstants.MODE[keyof typeof CallConstants.MODE];
22
+ StartAudioMuted?: boolean;
23
+ StartVideoMuted?: boolean;
24
+ ShowSwitchModeButton?: boolean;
25
+ ShowVirtualBackgroundSetting?: boolean;
26
+ VirtualBackground?: {
27
+ AllowBackgroundBlur?: boolean;
28
+ AllowUserImages?: boolean;
29
+ ShowDefaultImages?: boolean;
30
+ SetImages?: string[];
31
+ EnforceBackgroundBlur?: 0 | 1 | 2;
32
+ EnforceBackgroundImage?: string;
33
+ };
34
+ AvatarMode?: "circle";
35
+ MainVideoContainerSetting?: {
36
+ videoFit?: "contain" | "cover";
37
+ zoomButton?: {
38
+ visible?: boolean;
39
+ visibility?: boolean;
40
+ position?: TPosition;
41
+ };
42
+ nameLabel?: {
43
+ visible?: boolean;
44
+ visibility?: boolean;
45
+ position?: TPosition;
46
+ color?: TColor;
47
+ };
48
+ network?: {
49
+ visible?: boolean;
50
+ visibility?: boolean;
51
+ position?: TPosition;
52
+ };
53
+ };
54
+ customCSS?: string;
55
+ analyticsSettings?: {
56
+ ANALYTICS_HOST?: string;
57
+ ANALYTICS_VERSION?: string;
58
+ ANALYTICS_PING_DISABLED?: boolean;
59
+ ANALYTICS_USE_SSL?: boolean;
60
+ };
61
+ }
@@ -1,6 +1,6 @@
1
- import { Host, Region } from "./common";
2
- export interface ICallsAppSettings {
3
- appId: string;
4
- region: Region;
5
- host?: Host;
6
- }
1
+ import { Host, Region } from "./common";
2
+ export interface ICallsAppSettings {
3
+ appId: string;
4
+ region: Region;
5
+ host?: Host;
6
+ }
@@ -1,6 +1,6 @@
1
- export interface IRTCUser {
2
- name: string;
3
- avatar: string;
4
- joinnedAt: string;
5
- uid: string;
6
- }
1
+ export interface IRTCUser {
2
+ name: string;
3
+ avatar: string;
4
+ joinnedAt: string;
5
+ uid: string;
6
+ }
@@ -1,88 +1,88 @@
1
- import { AnyProperties } from "./common";
2
- export type CallingEventsInternal = "initialDeviceList" | "onDeviceChange" | "onUserJoined" | "onUserLeft" | "onUserListChanged" | "SCREEN_SHARE_STARTED" | "SCREEN_SHARE_ENDED" | "SCREEN_SHARE_ENDED" | "hangup" | "onCallSwitchedToVideo" | "onRecordingToggled" | "onCallEndButtonPressed" | "onUserMuted" | "onUserUnMuted";
3
- interface IAVDevice {
4
- deviceId: string;
5
- kind: string;
6
- label: string;
7
- groupId: string;
8
- }
9
- interface IUserWithExtraData {
10
- name: string;
11
- avatar: string;
12
- status: string;
13
- isVideoMuted: string;
14
- isAudioMuted: string;
15
- showVideo: string;
16
- isLocalUser: string;
17
- audioTrack: string;
18
- id: string;
19
- uid: string;
20
- joinedAt: string;
21
- videoTrack: string;
22
- stats: string;
23
- }
24
- interface User extends AnyProperties {
25
- name: string;
26
- avatar: string;
27
- uid: string;
28
- }
29
- export interface ICallEventsData {
30
- onUserJoined: User;
31
- onUserLeft: User;
32
- onUserUnMuted: User;
33
- onUserMuted: {
34
- muted: {
35
- name: string;
36
- avatar?: string;
37
- isVideoMuted: boolean;
38
- isAudioMuted: boolean;
39
- uid: string;
40
- joinedAt: string;
41
- };
42
- mutedBy: {
43
- name: string;
44
- avatar?: string;
45
- isAudioMuted: boolean;
46
- isVideoMuted: boolean;
47
- uid: string;
48
- joinedAt: string;
49
- };
50
- };
51
- onUserListUpdated: Array<User>;
52
- onScreenShareStarted: {};
53
- onScreenShareStopped: {};
54
- onRecordingStarted: {
55
- recordingStarted: true;
56
- user: Partial<IUserWithExtraData>;
57
- };
58
- onRecordingStopped: {
59
- recordingStarted: false;
60
- user: Partial<IUserWithExtraData>;
61
- };
62
- onMediaDeviceListUpdated: {
63
- videoInputDevices: IAVDevice[];
64
- audioInputDevices: IAVDevice[];
65
- audioOutputDevices: IAVDevice[];
66
- };
67
- onCallEnded: {};
68
- onCallSwitchedToVideo: {
69
- sessionId: string;
70
- initiator: {
71
- name: string;
72
- avatar?: string;
73
- isVideoMuted: boolean;
74
- isAudioMuted: boolean;
75
- uid: string;
76
- joinedAt: string;
77
- };
78
- responder: {
79
- name: string;
80
- avatar?: string;
81
- isVideoMuted: boolean;
82
- isAudioMuted: boolean;
83
- uid: string;
84
- joinedAt: string;
85
- };
86
- };
87
- }
88
- export {};
1
+ import { AnyProperties } from "./common";
2
+ export type CallingEventsInternal = "initialDeviceList" | "onDeviceChange" | "onUserJoined" | "onUserLeft" | "onUserListChanged" | "SCREEN_SHARE_STARTED" | "SCREEN_SHARE_ENDED" | "SCREEN_SHARE_ENDED" | "hangup" | "onCallSwitchedToVideo" | "onRecordingToggled" | "onCallEndButtonPressed" | "onUserMuted" | "onUserUnMuted";
3
+ interface IAVDevice {
4
+ deviceId: string;
5
+ kind: string;
6
+ label: string;
7
+ groupId: string;
8
+ }
9
+ interface IUserWithExtraData {
10
+ name: string;
11
+ avatar: string;
12
+ status: string;
13
+ isVideoMuted: string;
14
+ isAudioMuted: string;
15
+ showVideo: string;
16
+ isLocalUser: string;
17
+ audioTrack: string;
18
+ id: string;
19
+ uid: string;
20
+ joinedAt: string;
21
+ videoTrack: string;
22
+ stats: string;
23
+ }
24
+ interface User extends AnyProperties {
25
+ name: string;
26
+ avatar: string;
27
+ uid: string;
28
+ }
29
+ export interface ICallEventsData {
30
+ onUserJoined: User;
31
+ onUserLeft: User;
32
+ onUserUnMuted: User;
33
+ onUserMuted: {
34
+ muted: {
35
+ name: string;
36
+ avatar?: string;
37
+ isVideoMuted: boolean;
38
+ isAudioMuted: boolean;
39
+ uid: string;
40
+ joinedAt: string;
41
+ };
42
+ mutedBy: {
43
+ name: string;
44
+ avatar?: string;
45
+ isAudioMuted: boolean;
46
+ isVideoMuted: boolean;
47
+ uid: string;
48
+ joinedAt: string;
49
+ };
50
+ };
51
+ onUserListUpdated: Array<User>;
52
+ onScreenShareStarted: {};
53
+ onScreenShareStopped: {};
54
+ onRecordingStarted: {
55
+ recordingStarted: true;
56
+ user: Partial<IUserWithExtraData>;
57
+ };
58
+ onRecordingStopped: {
59
+ recordingStarted: false;
60
+ user: Partial<IUserWithExtraData>;
61
+ };
62
+ onMediaDeviceListUpdated: {
63
+ videoInputDevices: IAVDevice[];
64
+ audioInputDevices: IAVDevice[];
65
+ audioOutputDevices: IAVDevice[];
66
+ };
67
+ onCallEnded: {};
68
+ onCallSwitchedToVideo: {
69
+ sessionId: string;
70
+ initiator: {
71
+ name: string;
72
+ avatar?: string;
73
+ isVideoMuted: boolean;
74
+ isAudioMuted: boolean;
75
+ uid: string;
76
+ joinedAt: string;
77
+ };
78
+ responder: {
79
+ name: string;
80
+ avatar?: string;
81
+ isVideoMuted: boolean;
82
+ isAudioMuted: boolean;
83
+ uid: string;
84
+ joinedAt: string;
85
+ };
86
+ };
87
+ }
88
+ export {};
@@ -1,14 +1,14 @@
1
- export type TPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
2
- export type TRGB = `rgb(${number}, ${number}, ${number})`;
3
- export type TRGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
4
- export type THEX = `#${string}`;
5
- type _TColor = TRGB | TRGBA | THEX;
6
- export type TColor = _TColor | Omit<string, _TColor>;
7
- type _TRegion = "eu" | "us" | "in";
8
- export type Region = _TRegion | Omit<string, _TRegion>;
9
- type _TDomain = `${string}.call-${_TRegion}.cometchat.io/v3.0/`;
10
- export type Host = _TDomain | Omit<string, _TDomain>;
11
- export interface AnyProperties {
12
- [prop: string]: any;
13
- }
14
- export {};
1
+ export type TPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
2
+ export type TRGB = `rgb(${number}, ${number}, ${number})`;
3
+ export type TRGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
4
+ export type THEX = `#${string}`;
5
+ type _TColor = TRGB | TRGBA | THEX;
6
+ export type TColor = _TColor | Omit<string, _TColor>;
7
+ type _TRegion = "eu" | "us" | "in";
8
+ export type Region = _TRegion | Omit<string, _TRegion>;
9
+ type _TDomain = `${string}.call-${_TRegion}.cometchat.io/v3.0/`;
10
+ export type Host = _TDomain | Omit<string, _TDomain>;
11
+ export interface AnyProperties {
12
+ [prop: string]: any;
13
+ }
14
+ export {};
@@ -1,2 +1,2 @@
1
- export * from "./ICallsAppSettings";
2
- export * from "./ICallSettings";
1
+ export * from "./ICallsAppSettings";
2
+ export * from "./ICallSettings";
@@ -1 +1 @@
1
- export declare function parseJwt(token: string): any;
1
+ export declare function parseJwt(token: string): any;
@@ -1,4 +1,4 @@
1
- import { CallSettings } from "../models";
2
- import { PresenterSettings } from "../models/PresenterSettings";
3
- export declare const verifyCallSettings: (callSettings: CallSettings) => void;
4
- export declare const verifyPresenterSettings: (presenterSettings: PresenterSettings) => void;
1
+ import { CallSettings } from "../models";
2
+ import { PresenterSettings } from "../models/PresenterSettings";
3
+ export declare const verifyCallSettings: (callSettings: CallSettings) => void;
4
+ export declare const verifyPresenterSettings: (presenterSettings: PresenterSettings) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cometchat/calls-sdk-javascript",
3
- "version": "4.0.10",
3
+ "version": "4.0.11",
4
4
  "description": "Cometchat's Javascript SDK for In-app Calling.",
5
5
  "main": "pack/index.js",
6
6
  "module": "pack/index.js",
@@ -9,7 +9,7 @@
9
9
  "pack/"
10
10
  ],
11
11
  "scripts": {
12
- "build": "webpack"
12
+ "build": "rm -rf pack && webpack"
13
13
  },
14
14
  "keywords": [
15
15
  "cometchat",