@cometchat/calls-sdk-javascript 4.0.4 → 4.0.5

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.
@@ -1,6 +1,39 @@
1
1
  import { CallAppSettings } from "../models";
2
2
  import { IGenerateTokenAPIResult, IVerifyTokenAPIResult } from "./helper";
3
3
  export declare class APIHandler {
4
+ private static appSettings;
5
+ /**
6
+ * Sets the app settings for the APIHandler class.
7
+ * @param appSettings - The CallAppSettings object containing the app settings.
8
+ */
9
+ static setAppSettings(appSettings: CallAppSettings): void;
10
+ /**
11
+ * Generates a call token for the given session ID and app settings.
12
+ * @param authToken - The authentication token.
13
+ * @param sessionID - The session ID for which the token is to be generated.
14
+ * @param appSettings - The CallAppSettings object containing the app settings.
15
+ * @returns A Promise that resolves to an IGenerateTokenAPIResult object.
16
+ */
4
17
  static generateToken(authToken: string, sessionID: string, appSettings: CallAppSettings): Promise<IGenerateTokenAPIResult>;
18
+ /**
19
+ * Verifies the given call token for the given app settings.
20
+ * @param callToken - The call token to be verified.
21
+ * @param appSettings - The CallAppSettings object containing the app settings.
22
+ * @returns A Promise that resolves to an IVerifyTokenAPIResult object.
23
+ */
5
24
  static verifyToken(callToken: string, appSettings: CallAppSettings): Promise<IVerifyTokenAPIResult>;
25
+ /**
26
+ * Gets the call log list for the given filter parameters and authentication token.
27
+ * @param params - The object containing the filter parameters.
28
+ * @param authToken - The authentication token.
29
+ * @returns A Promise that resolves to an array of call log objects.
30
+ */
31
+ static getCallLogList(params: object, authToken: string): Promise<any>;
32
+ /**
33
+ * Gets the call details for the given session ID and authentication token.
34
+ * @param sessionID - The session ID for which the call details are to be fetched.
35
+ * @param authToken - The authentication token.
36
+ * @returns A Promise that resolves to a call details object.
37
+ */
38
+ static getCallDetails(sessionID: string, authToken: string): Promise<any>;
6
39
  }
@@ -1,5 +1,6 @@
1
1
  export declare const apiEndpoints: {
2
2
  CALL_TOKENS: string;
3
+ CALL_LIST: string;
3
4
  };
4
5
  export declare const APP_ID_SPACE = "__APP_ID__";
5
6
  export declare const REGION_SPACE = "__REGION__";
@@ -60,4 +60,10 @@ export interface IVerifyTokenAPIResult {
60
60
  }
61
61
  export declare const postAPI: (postReqObj: IPOSTReqObj) => Promise<IGenerateTokenAPIResult>;
62
62
  export declare const getAPI: (getReqObj: IGETReqObj) => Promise<IVerifyTokenAPIResult>;
63
+ /**
64
+ * Encodes the given data object into a query string.
65
+ * @param data - The data object to be encoded.
66
+ * @returns The encoded query string.
67
+ */
68
+ export declare function encodeQueryData(data: any): string;
63
69
  export {};
@@ -15,6 +15,7 @@ export declare const CallConstants: {
15
15
  readonly CALL_ID: "id";
16
16
  readonly CALL_SESSION_ID: "sessionid";
17
17
  readonly CALL_RECEIVER: "receiver";
18
+ readonly CALL_INITIATOR: "initiator";
18
19
  readonly CALL_SENDER: "sender";
19
20
  readonly CALL_RECEIVER_TYPE: "receiverType";
20
21
  readonly CALL_STATUS: "status";
@@ -69,6 +70,7 @@ export declare const CallConstants: {
69
70
  readonly STOP_RECORDING: "stopRecording";
70
71
  readonly RECORDING_TOGGLED: "onRecordingToggled";
71
72
  readonly USER_MUTED: "onUserMuted";
73
+ readonly ON_USER_UNMUTED: "onUserUnMuted";
72
74
  readonly SCREEN_SHARE_STARTED: "SCREEN_SHARE_STARTED";
73
75
  readonly SCREEN_SHARE_STOPPED: "SCREEN_SHARE_ENDED";
74
76
  readonly SWITCH_TO_VIDEO_CALL: "switchedToVideo";
package/pack/index.d.ts CHANGED
@@ -1 +1,5 @@
1
1
  export { CometChatCalls } from "./models/CometChatCalls";
2
+ export { CallLog } from "./models/CallLog";
3
+ export { CallLogRequestBuilder } from "./models/CometChatCallLogs";
4
+ export { CallUser } from "./models/CallUser";
5
+ export { CallGroup } from "./models/CallGroup";