@cometchat/calls-sdk-javascript 4.0.6 → 4.0.7-rc2

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 (35) hide show
  1. package/pack/index.js +2 -1
  2. package/pack/{Helper.d.ts → src/Helper.d.ts} +5 -5
  3. package/pack/{api → src/api}/APIHandler.d.ts +39 -39
  4. package/pack/{api → src/api}/endpoints.d.ts +7 -7
  5. package/pack/{api → src/api}/helper.d.ts +69 -69
  6. package/pack/{api → src/api}/index.d.ts +2 -2
  7. package/pack/{constants → src/constants}/CallConstants.d.ts +217 -217
  8. package/pack/{constants → src/constants}/index.d.ts +1 -1
  9. package/pack/{defaultCallsettings.d.ts → src/defaultCallsettings.d.ts} +2 -2
  10. package/pack/{index.d.ts → src/index.d.ts} +7 -7
  11. package/pack/{models → src/models}/CallGroup.d.ts +14 -14
  12. package/pack/{models → src/models}/CallLog.d.ts +276 -276
  13. package/pack/{models → src/models}/CallSettings.d.ts +382 -382
  14. package/pack/{models → src/models}/CallUser.d.ts +14 -14
  15. package/pack/{models → src/models}/CallsAppSettings.d.ts +41 -41
  16. package/pack/{models → src/models}/CometChatCallLogs.d.ts +189 -189
  17. package/pack/{models → src/models}/CometChatCalls.d.ts +180 -180
  18. package/pack/{models → src/models}/CometChatCallsException.d.ts +8 -8
  19. package/pack/{models → src/models}/ErrorModel.d.ts +12 -12
  20. package/pack/{models → src/models}/Listener.d.ts +86 -86
  21. package/pack/{models → src/models}/ListnerHandler.d.ts +10 -10
  22. package/pack/{models → src/models}/Participant.d.ts +184 -184
  23. package/pack/{models → src/models}/PresenterSettings.d.ts +265 -265
  24. package/pack/{models → src/models}/RTCUser.d.ts +18 -18
  25. package/pack/{models → src/models}/Recording.d.ts +86 -86
  26. package/pack/{models → src/models}/index.d.ts +10 -10
  27. package/pack/{types → src/types}/ICallSettings.d.ts +61 -61
  28. package/pack/{types → src/types}/ICallsAppSettings.d.ts +6 -6
  29. package/pack/{types → src/types}/RTCUser.d.ts +6 -6
  30. package/pack/{types → src/types}/callEvents.d.ts +88 -88
  31. package/pack/{types → src/types}/common.d.ts +14 -14
  32. package/pack/{types → src/types}/index.d.ts +2 -2
  33. package/pack/{util → src/util}/parseJwt.d.ts +1 -1
  34. package/pack/{util → src/util}/verifyCallSettings.d.ts +4 -4
  35. package/package.json +2 -2
@@ -1,14 +1,14 @@
1
- export declare class CallUser {
2
- protected uid: string;
3
- protected name: string;
4
- protected avatar: string;
5
- constructor(object: any);
6
- getUid(): string;
7
- setUid(uid: string): void;
8
- getName(): string;
9
- setName(name: string): void;
10
- getAvatar(): string;
11
- setAvatar(avatar: string): void;
12
- toString(): string;
13
- static getUserFromJson(object: any): CallUser;
14
- }
1
+ export declare class CallUser {
2
+ protected uid: string;
3
+ protected name: string;
4
+ protected avatar: string;
5
+ constructor(object: any);
6
+ getUid(): string;
7
+ setUid(uid: string): void;
8
+ getName(): string;
9
+ setName(name: string): void;
10
+ getAvatar(): string;
11
+ setAvatar(avatar: string): void;
12
+ toString(): string;
13
+ static getUserFromJson(object: any): CallUser;
14
+ }
@@ -1,41 +1,41 @@
1
- import { Host, Region } from "../types/common";
2
- export declare class CallAppSettings {
3
- private appId;
4
- private region;
5
- private host?;
6
- constructor(builder?: CallAppSettingsBuilder);
7
- setAppId(appId: string): this;
8
- setRegion(region: Region): this;
9
- setHost(host: Host): this;
10
- getAppId(): string;
11
- getRegion(): Region;
12
- getHost(): Host;
13
- }
14
- export declare class CallAppSettingsBuilder {
15
- appId: string;
16
- region: Region;
17
- host?: Host;
18
- /**
19
- * Method to set appId of the app.
20
- * @param {string} appId appId of the app
21
- * @returns
22
- */
23
- setAppId(appId: string): this;
24
- /**
25
- * Method to set region of the app.
26
- * @param {Region} region region of the app.
27
- * @returns {void}
28
- */
29
- setRegion(region: Region): this;
30
- /**
31
- * Method to set host/domain of the app.
32
- * @param {string} host host/domain of the app.
33
- * @returns {void}
34
- */
35
- setHost(host: Host): this;
36
- /**
37
- * This method will return an object of the CallsAppSettings class.
38
- * @returns {CallAppSettings} Returns the CallsAppSettings instance
39
- */
40
- build(): CallAppSettings;
41
- }
1
+ import { Host, Region } from "../types/common";
2
+ export declare class CallAppSettings {
3
+ private appId;
4
+ private region;
5
+ private host?;
6
+ constructor(builder?: CallAppSettingsBuilder);
7
+ setAppId(appId: string): this;
8
+ setRegion(region: Region): this;
9
+ setHost(host: Host): this;
10
+ getAppId(): string;
11
+ getRegion(): Region;
12
+ getHost(): Host;
13
+ }
14
+ export declare class CallAppSettingsBuilder {
15
+ appId: string;
16
+ region: Region;
17
+ host?: Host;
18
+ /**
19
+ * Method to set appId of the app.
20
+ * @param {string} appId appId of the app
21
+ * @returns
22
+ */
23
+ setAppId(appId: string): this;
24
+ /**
25
+ * Method to set region of the app.
26
+ * @param {Region} region region of the app.
27
+ * @returns {void}
28
+ */
29
+ setRegion(region: Region): this;
30
+ /**
31
+ * Method to set host/domain of the app.
32
+ * @param {string} host host/domain of the app.
33
+ * @returns {void}
34
+ */
35
+ setHost(host: Host): this;
36
+ /**
37
+ * This method will return an object of the CallsAppSettings class.
38
+ * @returns {CallAppSettings} Returns the CallsAppSettings instance
39
+ */
40
+ build(): CallAppSettings;
41
+ }
@@ -1,189 +1,189 @@
1
- import { CallLog } from "./CallLog";
2
- /**
3
- * Represents a request to fetch call logs.
4
- */
5
- declare class CallLogRequest {
6
- /**
7
- * The maximum number of call logs to fetch.
8
- */
9
- private limit;
10
- /**
11
- * The total number of pages of call logs.
12
- */
13
- private totalPages;
14
- /**
15
- * The current page of call logs.
16
- */
17
- private currentPage;
18
- /**
19
- * The type of call to filter by.
20
- */
21
- private callType;
22
- /**
23
- * The status of call to filter by.
24
- */
25
- private callStatus;
26
- /**
27
- * Whether the call has a recording or not.
28
- */
29
- private hasRecording;
30
- /**
31
- * The category of call to filter by.
32
- */
33
- private callCategory;
34
- /**
35
- * The direction of call to filter by.
36
- */
37
- private callDirection;
38
- /**
39
- * The user ID to filter by.
40
- */
41
- private uid;
42
- /**
43
- * The group ID to filter by.
44
- */
45
- private guid;
46
- /**
47
- * The authentication token to use for the API call.
48
- */
49
- private authToken;
50
- /**
51
- * Whether an API call is currently in progress.
52
- */
53
- private inProgress;
54
- /**
55
- * The timestamp of the last update.
56
- */
57
- private updatedAt;
58
- /**
59
- * Whether to only fetch updates.
60
- */
61
- private onlyUpdates;
62
- /**
63
- * The timestamp of the call log.
64
- */
65
- private timestamp?;
66
- /**
67
- * The affix of the call log.
68
- */
69
- private affix;
70
- /**
71
- * The last affix of the call log.
72
- */
73
- private lastAffix;
74
- /**
75
- * The current method of the call log.
76
- */
77
- private currentMethod;
78
- /**
79
- * The pagination metadata of the call log.
80
- */
81
- private paginationMeta;
82
- /**
83
- * Creates a new CallLogRequest instance.
84
- * @param builder The builder object to use for constructing the request.
85
- */
86
- constructor(builder: CallLogRequestBuilder);
87
- /**
88
- * Fetches the next page of call logs.
89
- * @returns A promise that resolves to an array of CallLog objects, or rejects with a CometChatCallsException if there was an error.
90
- */
91
- fetchNext(): Promise<CallLog[]>;
92
- /**
93
- * Fetches the previous page of call logs.
94
- * @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..
95
- */
96
- fetchPrevious(): Promise<CallLog[] | []>;
97
- /**
98
- * Makes an API call to fetch call logs.
99
- * @param isFetchNext Whether to fetch the next page of call logs.
100
- * @returns A promise that resolves to an array of CallLog objects, or rejects with a CometChatCallsException if there was an error.
101
- */
102
- private makeAPICall;
103
- /**
104
- * Gets the filter parameters for the API call.
105
- * @param isNext Whether to fetch the next page of call logs.
106
- * @returns The filter parameters object.
107
- */
108
- private getParams;
109
- /**
110
- * Parses the API response and returns an array of CallLog objects.
111
- * @param response The API response string.
112
- * @returns An array of CallLog objects.
113
- */
114
- private getCallLogList;
115
- }
116
- /**
117
- * A builder class for creating a request to fetch call logs.
118
- */
119
- export declare class CallLogRequestBuilder {
120
- /** @private */ limit: number;
121
- /** @private */ callType: string;
122
- /** @private */ callStatus: string;
123
- /** @private */ hasRecording: boolean;
124
- /** @private */ callCategory: string;
125
- /** @private */ callDirection: string;
126
- /** @private */ uid: string;
127
- /** @private */ guid: string;
128
- /** @private */ authToken: string;
129
- /**
130
- * Sets the limit of call logs to be fetched.
131
- * @param limit - The number of call logs to be fetched.
132
- * @returns The CallLogRequestBuilder object.
133
- */
134
- setLimit(limit: number): this;
135
- /**
136
- * Sets the type of call to be fetched.
137
- * @param callType - The type of call to be fetched. Can be either 'video' or 'audio'.
138
- * @returns The CallLogRequestBuilder object.
139
- */
140
- setCallType(callType: 'video' | 'audio'): this;
141
- /**
142
- * Sets the status of call to be fetched.
143
- * @param callStatus - The status of call to be fetched. Can be either 'ongoing', 'busy', 'rejected', 'cancelled', 'ended' or 'missed'.
144
- * @returns The CallLogRequestBuilder object.
145
- */
146
- setCallStatus(callStatus: 'ongoing' | 'busy' | 'rejected' | 'cancelled' | 'ended' | 'missed'): this;
147
- /**
148
- * Sets whether the call has recording or not.
149
- * @param hasRecording - Whether the call has recording or not.
150
- * @returns The CallLogRequestBuilder object.
151
- */
152
- setHasRecording(hasRecording: boolean): this;
153
- /**
154
- * Sets the category of call to be fetched.
155
- * @param callCategory - The category of call to be fetched. Can be either 'call' or 'meet'.
156
- * @returns The CallLogRequestBuilder object.
157
- */
158
- setCallCategory(callCategory: 'call' | 'meet'): this;
159
- /**
160
- * Sets the direction of call to be fetched.
161
- * @param callDirection - The direction of call to be fetched. Can be either 'incoming' or 'outgoing'.
162
- * @returns The CallLogRequestBuilder object.
163
- */
164
- setCallDirection(callDirection: 'incoming' | 'outgoing'): this;
165
- /**
166
- * Sets the user ID of the call logs to be fetched.
167
- * @param uid - The user ID of the call logs to be fetched.
168
- * @returns The CallLogRequestBuilder object.
169
- */
170
- setUid(uid: string): this;
171
- /**
172
- * Sets the group ID of the call logs to be fetched.
173
- * @param guid - The group ID of the call logs to be fetched.
174
- * @returns The CallLogRequestBuilder object.
175
- */
176
- setGuid(guid: string): this;
177
- /**
178
- * Sets the authorization token for the request.
179
- * @param authToken - The authorization token for the request.
180
- * @returns The CallLogRequestBuilder object.
181
- */
182
- setAuthToken(authToken: string): this;
183
- /**
184
- * Builds and returns the CallLogRequest object.
185
- * @returns The CallLogRequest object.
186
- */
187
- build(): CallLogRequest;
188
- }
189
- export {};
1
+ import { CallLog } from "./CallLog";
2
+ /**
3
+ * Represents a request to fetch call logs.
4
+ */
5
+ declare class CallLogRequest {
6
+ /**
7
+ * The maximum number of call logs to fetch.
8
+ */
9
+ private limit;
10
+ /**
11
+ * The total number of pages of call logs.
12
+ */
13
+ private totalPages;
14
+ /**
15
+ * The current page of call logs.
16
+ */
17
+ private currentPage;
18
+ /**
19
+ * The type of call to filter by.
20
+ */
21
+ private callType;
22
+ /**
23
+ * The status of call to filter by.
24
+ */
25
+ private callStatus;
26
+ /**
27
+ * Whether the call has a recording or not.
28
+ */
29
+ private hasRecording;
30
+ /**
31
+ * The category of call to filter by.
32
+ */
33
+ private callCategory;
34
+ /**
35
+ * The direction of call to filter by.
36
+ */
37
+ private callDirection;
38
+ /**
39
+ * The user ID to filter by.
40
+ */
41
+ private uid;
42
+ /**
43
+ * The group ID to filter by.
44
+ */
45
+ private guid;
46
+ /**
47
+ * The authentication token to use for the API call.
48
+ */
49
+ private authToken;
50
+ /**
51
+ * Whether an API call is currently in progress.
52
+ */
53
+ private inProgress;
54
+ /**
55
+ * The timestamp of the last update.
56
+ */
57
+ private updatedAt;
58
+ /**
59
+ * Whether to only fetch updates.
60
+ */
61
+ private onlyUpdates;
62
+ /**
63
+ * The timestamp of the call log.
64
+ */
65
+ private timestamp?;
66
+ /**
67
+ * The affix of the call log.
68
+ */
69
+ private affix;
70
+ /**
71
+ * The last affix of the call log.
72
+ */
73
+ private lastAffix;
74
+ /**
75
+ * The current method of the call log.
76
+ */
77
+ private currentMethod;
78
+ /**
79
+ * The pagination metadata of the call log.
80
+ */
81
+ private paginationMeta;
82
+ /**
83
+ * Creates a new CallLogRequest instance.
84
+ * @param builder The builder object to use for constructing the request.
85
+ */
86
+ constructor(builder: CallLogRequestBuilder);
87
+ /**
88
+ * Fetches the next page of call logs.
89
+ * @returns A promise that resolves to an array of CallLog objects, or rejects with a CometChatCallsException if there was an error.
90
+ */
91
+ fetchNext(): Promise<CallLog[]>;
92
+ /**
93
+ * Fetches the previous page of call logs.
94
+ * @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..
95
+ */
96
+ fetchPrevious(): Promise<CallLog[] | []>;
97
+ /**
98
+ * Makes an API call to fetch call logs.
99
+ * @param isFetchNext Whether to fetch the next page of call logs.
100
+ * @returns A promise that resolves to an array of CallLog objects, or rejects with a CometChatCallsException if there was an error.
101
+ */
102
+ private makeAPICall;
103
+ /**
104
+ * Gets the filter parameters for the API call.
105
+ * @param isNext Whether to fetch the next page of call logs.
106
+ * @returns The filter parameters object.
107
+ */
108
+ private getParams;
109
+ /**
110
+ * Parses the API response and returns an array of CallLog objects.
111
+ * @param response The API response string.
112
+ * @returns An array of CallLog objects.
113
+ */
114
+ private getCallLogList;
115
+ }
116
+ /**
117
+ * A builder class for creating a request to fetch call logs.
118
+ */
119
+ export declare class CallLogRequestBuilder {
120
+ /** @private */ limit: number;
121
+ /** @private */ callType: string;
122
+ /** @private */ callStatus: string;
123
+ /** @private */ hasRecording: boolean;
124
+ /** @private */ callCategory: string;
125
+ /** @private */ callDirection: string;
126
+ /** @private */ uid: string;
127
+ /** @private */ guid: string;
128
+ /** @private */ authToken: string;
129
+ /**
130
+ * Sets the limit of call logs to be fetched.
131
+ * @param limit - The number of call logs to be fetched.
132
+ * @returns The CallLogRequestBuilder object.
133
+ */
134
+ setLimit(limit: number): this;
135
+ /**
136
+ * Sets the type of call to be fetched.
137
+ * @param callType - The type of call to be fetched. Can be either 'video' or 'audio'.
138
+ * @returns The CallLogRequestBuilder object.
139
+ */
140
+ setCallType(callType: 'video' | 'audio'): this;
141
+ /**
142
+ * Sets the status of call to be fetched.
143
+ * @param callStatus - The status of call to be fetched. Can be either 'ongoing', 'busy', 'rejected', 'cancelled', 'ended' or 'missed'.
144
+ * @returns The CallLogRequestBuilder object.
145
+ */
146
+ setCallStatus(callStatus: 'ongoing' | 'busy' | 'rejected' | 'cancelled' | 'ended' | 'missed'): this;
147
+ /**
148
+ * Sets whether the call has recording or not.
149
+ * @param hasRecording - Whether the call has recording or not.
150
+ * @returns The CallLogRequestBuilder object.
151
+ */
152
+ setHasRecording(hasRecording: boolean): this;
153
+ /**
154
+ * Sets the category of call to be fetched.
155
+ * @param callCategory - The category of call to be fetched. Can be either 'call' or 'meet'.
156
+ * @returns The CallLogRequestBuilder object.
157
+ */
158
+ setCallCategory(callCategory: 'call' | 'meet'): this;
159
+ /**
160
+ * Sets the direction of call to be fetched.
161
+ * @param callDirection - The direction of call to be fetched. Can be either 'incoming' or 'outgoing'.
162
+ * @returns The CallLogRequestBuilder object.
163
+ */
164
+ setCallDirection(callDirection: 'incoming' | 'outgoing'): this;
165
+ /**
166
+ * Sets the user ID of the call logs to be fetched.
167
+ * @param uid - The user ID of the call logs to be fetched.
168
+ * @returns The CallLogRequestBuilder object.
169
+ */
170
+ setUid(uid: string): this;
171
+ /**
172
+ * Sets the group ID of the call logs to be fetched.
173
+ * @param guid - The group ID of the call logs to be fetched.
174
+ * @returns The CallLogRequestBuilder object.
175
+ */
176
+ setGuid(guid: string): this;
177
+ /**
178
+ * Sets the authorization token for the request.
179
+ * @param authToken - The authorization token for the request.
180
+ * @returns The CallLogRequestBuilder object.
181
+ */
182
+ setAuthToken(authToken: string): this;
183
+ /**
184
+ * Builds and returns the CallLogRequest object.
185
+ * @returns The CallLogRequest object.
186
+ */
187
+ build(): CallLogRequest;
188
+ }
189
+ export {};