@softtynet/zca-js 2.3.4 → 2.3.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.
Files changed (123) hide show
  1. package/README.md +47 -11
  2. package/dist/apis/call/addUserGroupCall.d.ts +11 -0
  3. package/dist/apis/call/addUserGroupCall.js +48 -0
  4. package/dist/apis/call/answerAckVoiceCall.d.ts +5 -0
  5. package/dist/apis/call/answerAckVoiceCall.js +38 -0
  6. package/dist/apis/call/answerGroupCall.d.ts +10 -0
  7. package/dist/apis/call/answerGroupCall.js +45 -0
  8. package/dist/apis/call/answerVoiceCall.d.ts +11 -0
  9. package/dist/apis/call/answerVoiceCall.js +50 -0
  10. package/dist/apis/call/broadcastGroupCallState.d.ts +10 -0
  11. package/dist/apis/call/broadcastGroupCallState.js +45 -0
  12. package/dist/apis/call/cancelGroupCall.d.ts +10 -0
  13. package/dist/apis/call/cancelGroupCall.js +45 -0
  14. package/dist/apis/call/cancelVoiceCall.d.ts +1 -1
  15. package/dist/apis/call/cancelVoiceCall.js +5 -1
  16. package/dist/apis/call/createController.d.ts +7 -0
  17. package/dist/apis/call/createController.js +9 -0
  18. package/dist/apis/call/createRtcSession.d.ts +8 -0
  19. package/dist/apis/call/createRtcSession.js +10 -0
  20. package/dist/apis/call/endGroupCall.d.ts +10 -0
  21. package/dist/apis/call/endGroupCall.js +45 -0
  22. package/dist/apis/call/finishGroupCall.d.ts +12 -0
  23. package/dist/apis/call/finishGroupCall.js +47 -0
  24. package/dist/apis/call/getGroupCallState.d.ts +3 -0
  25. package/dist/apis/call/getGroupCallState.js +38 -0
  26. package/dist/apis/call/holdVoiceCall.d.ts +5 -0
  27. package/dist/apis/call/holdVoiceCall.js +34 -0
  28. package/dist/apis/call/joinGroupCall.d.ts +11 -0
  29. package/dist/apis/call/joinGroupCall.js +46 -0
  30. package/dist/apis/call/logEndVoiceCall.d.ts +8 -0
  31. package/dist/apis/call/logEndVoiceCall.js +46 -0
  32. package/dist/apis/call/notifyGroupCall.d.ts +9 -0
  33. package/dist/apis/call/notifyGroupCall.js +44 -0
  34. package/dist/apis/call/pingGroupCall.d.ts +10 -0
  35. package/dist/apis/call/pingGroupCall.js +45 -0
  36. package/dist/apis/call/requestAudioToVideoCall.d.ts +5 -0
  37. package/dist/apis/call/requestAudioToVideoCall.js +37 -0
  38. package/dist/apis/call/requestGroupCall.d.ts +9 -0
  39. package/dist/apis/call/requestGroupCall.js +46 -0
  40. package/dist/apis/call/requestShareScreenCall.d.ts +5 -0
  41. package/dist/apis/call/requestShareScreenCall.js +37 -0
  42. package/dist/apis/call/requestVoiceCall.d.ts +10 -0
  43. package/dist/apis/call/requestVoiceCall.js +47 -0
  44. package/dist/apis/call/ringRingGroupCall.d.ts +10 -0
  45. package/dist/apis/call/ringRingGroupCall.js +45 -0
  46. package/dist/apis/call/ringRingVoiceCall.d.ts +5 -0
  47. package/dist/apis/call/ringRingVoiceCall.js +38 -0
  48. package/dist/apis/call/sendRequestGroupCall.d.ts +11 -0
  49. package/dist/apis/call/sendRequestGroupCall.js +48 -0
  50. package/dist/apis/call/sendRequestVoiceCall.d.ts +11 -0
  51. package/dist/apis/call/sendRequestVoiceCall.js +51 -0
  52. package/dist/apis/call/sendVoiceCall.d.ts +8 -1
  53. package/dist/apis/call/sendVoiceCall.js +10 -8
  54. package/dist/apis/call/shareScreenGroupCall.d.ts +10 -0
  55. package/dist/apis/call/shareScreenGroupCall.js +45 -0
  56. package/dist/apis/call/unholdVoiceCall.d.ts +5 -0
  57. package/dist/apis/call/unholdVoiceCall.js +34 -0
  58. package/dist/apis/call/updateCallMediaState.d.ts +7 -0
  59. package/dist/apis/call/updateCallMediaState.js +61 -0
  60. package/dist/apis.d.ts +81 -0
  61. package/dist/apis.js +135 -0
  62. package/dist/call-engine/ZRTPPacketCodec.d.ts +262 -0
  63. package/dist/call-engine/ZRTPPacketCodec.js +506 -0
  64. package/dist/call-engine/ZaloCallController.d.ts +134 -0
  65. package/dist/call-engine/ZaloCallController.js +638 -0
  66. package/dist/call-engine/ZaloCallTransport.d.ts +83 -0
  67. package/dist/call-engine/ZaloCallTransport.js +233 -0
  68. package/dist/call-engine/ZaloRtcSession.d.ts +609 -0
  69. package/dist/call-engine/ZaloRtcSession.js +2931 -0
  70. package/dist/call-engine/ZaloSrtpSession.d.ts +80 -0
  71. package/dist/call-engine/ZaloSrtpSession.js +278 -0
  72. package/dist/call-engine/index.d.ts +18 -0
  73. package/dist/call-engine/index.js +24 -0
  74. package/dist/cjs/apis/call/addUserGroupCall.cjs +53 -0
  75. package/dist/cjs/apis/call/answerAckVoiceCall.cjs +43 -0
  76. package/dist/cjs/apis/call/answerGroupCall.cjs +50 -0
  77. package/dist/cjs/apis/call/answerVoiceCall.cjs +55 -0
  78. package/dist/cjs/apis/call/broadcastGroupCallState.cjs +50 -0
  79. package/dist/cjs/apis/call/cancelGroupCall.cjs +50 -0
  80. package/dist/cjs/apis/call/cancelVoiceCall.cjs +5 -1
  81. package/dist/cjs/apis/call/createController.cjs +14 -0
  82. package/dist/cjs/apis/call/createRtcSession.cjs +15 -0
  83. package/dist/cjs/apis/call/endGroupCall.cjs +50 -0
  84. package/dist/cjs/apis/call/finishGroupCall.cjs +52 -0
  85. package/dist/cjs/apis/call/getGroupCallState.cjs +43 -0
  86. package/dist/cjs/apis/call/holdVoiceCall.cjs +39 -0
  87. package/dist/cjs/apis/call/joinGroupCall.cjs +51 -0
  88. package/dist/cjs/apis/call/logEndVoiceCall.cjs +51 -0
  89. package/dist/cjs/apis/call/notifyGroupCall.cjs +49 -0
  90. package/dist/cjs/apis/call/pingGroupCall.cjs +50 -0
  91. package/dist/cjs/apis/call/requestAudioToVideoCall.cjs +42 -0
  92. package/dist/cjs/apis/call/requestGroupCall.cjs +51 -0
  93. package/dist/cjs/apis/call/requestShareScreenCall.cjs +42 -0
  94. package/dist/cjs/apis/call/requestVoiceCall.cjs +52 -0
  95. package/dist/cjs/apis/call/ringRingGroupCall.cjs +50 -0
  96. package/dist/cjs/apis/call/ringRingVoiceCall.cjs +43 -0
  97. package/dist/cjs/apis/call/sendRequestGroupCall.cjs +53 -0
  98. package/dist/cjs/apis/call/sendRequestVoiceCall.cjs +56 -0
  99. package/dist/cjs/apis/call/sendVoiceCall.cjs +10 -8
  100. package/dist/cjs/apis/call/shareScreenGroupCall.cjs +50 -0
  101. package/dist/cjs/apis/call/unholdVoiceCall.cjs +39 -0
  102. package/dist/cjs/apis/call/updateCallMediaState.cjs +66 -0
  103. package/dist/cjs/apis.cjs +135 -0
  104. package/dist/cjs/call-engine/ZRTPPacketCodec.cjs +525 -0
  105. package/dist/cjs/call-engine/ZaloCallController.cjs +643 -0
  106. package/dist/cjs/call-engine/ZaloCallTransport.cjs +239 -0
  107. package/dist/cjs/call-engine/ZaloRtcSession.cjs +2937 -0
  108. package/dist/cjs/call-engine/ZaloSrtpSession.cjs +287 -0
  109. package/dist/cjs/constants/protocol.cjs +1 -1
  110. package/dist/cjs/index.cjs +61 -11
  111. package/dist/cjs/models/CallEvent.cjs +95 -1
  112. package/dist/cjs/realtime/handlers/control.handler.cjs +17 -3
  113. package/dist/cjs/realtime/listener.cjs +19 -0
  114. package/dist/constants/protocol.d.ts +1 -1
  115. package/dist/constants/protocol.js +1 -1
  116. package/dist/index.d.ts +32 -4
  117. package/dist/index.js +2 -0
  118. package/dist/models/CallEvent.d.ts +15 -0
  119. package/dist/models/CallEvent.js +95 -1
  120. package/dist/realtime/handlers/control.handler.js +17 -3
  121. package/dist/realtime/listener.d.ts +5 -0
  122. package/dist/realtime/listener.js +19 -0
  123. package/package.json +2 -1
@@ -0,0 +1,48 @@
1
+ import { ZaloApiError } from "../../Errors/ZaloApiError.js";
2
+ import { apiFactory } from "../../utils.js";
3
+ import { CallType } from "./sendVoiceCall.js";
4
+ export const sendRequestGroupCallFactory = apiFactory()((api, _ctx, utils) => {
5
+ const voiceCallService = api.zpwServiceMap.voice_call?.[0];
6
+ /**
7
+ * Gửi tín hiệu mời tham gia / đổ chuông cuộc gọi nhóm (`/api/voicecall/group/request`, command `12434`).
8
+ *
9
+ * @param groupId ID của nhóm
10
+ * @param options Thông tin `callId`, `session`, `partners`, `callType` và `data`
11
+ * @throws {ZaloApiError}
12
+ */
13
+ return async function sendRequestGroupCall(groupId, options) {
14
+ if (!groupId)
15
+ throw new ZaloApiError("Missing groupId");
16
+ if (!options?.callId)
17
+ throw new ZaloApiError("Missing callId");
18
+ if (!options?.session)
19
+ throw new ZaloApiError("Missing session");
20
+ if (!voiceCallService)
21
+ throw new ZaloApiError("Missing voice_call service URL in zpwServiceMap");
22
+ const dataStr = options.data === undefined
23
+ ? "{}"
24
+ : typeof options.data === "string"
25
+ ? options.data
26
+ : JSON.stringify(options.data);
27
+ const params = {
28
+ calleeId: options.calleeId ?? "",
29
+ callId: options.callId,
30
+ callType: options.callType ?? CallType.GroupAudio,
31
+ data: dataStr,
32
+ session: options.session,
33
+ partners: (options.partners ?? []).map(String),
34
+ groupId: String(groupId),
35
+ };
36
+ const encryptedParams = utils.encodeAES(JSON.stringify(params));
37
+ if (!encryptedParams)
38
+ throw new ZaloApiError("Failed to encrypt sendRequestGroupCall params");
39
+ const url = utils.makeURL(`${voiceCallService}/api/voicecall/group/request`, {
40
+ zpw_type: 24,
41
+ params: encryptedParams,
42
+ });
43
+ const response = await utils.request(url, {
44
+ method: "GET",
45
+ });
46
+ return utils.resolve(response);
47
+ };
48
+ });
@@ -0,0 +1,11 @@
1
+ export type SendRequestVoiceCallOptions = {
2
+ callId: number;
3
+ session: string;
4
+ rtpAddress: string;
5
+ rtcpAddress: string;
6
+ codec?: string;
7
+ extendData?: string | Record<string, unknown>;
8
+ subCommand?: number;
9
+ };
10
+ export type SendRequestVoiceCallResponse = Record<string, unknown>;
11
+ export declare const sendRequestVoiceCallFactory: (ctx: import("../../context.js").ContextBase, api: import("../../apis.js").API) => (calleeId: string, options: SendRequestVoiceCallOptions) => Promise<SendRequestVoiceCallResponse>;
@@ -0,0 +1,51 @@
1
+ import { ZaloApiError } from "../../Errors/ZaloApiError.js";
2
+ import { apiFactory } from "../../utils.js";
3
+ export const sendRequestVoiceCallFactory = apiFactory()((api, ctx, utils) => {
4
+ const voiceCallService = api.zpwServiceMap.voice_call?.[0];
5
+ /**
6
+ * Gửi tín hiệu đổ chuông kèm thông tin kết nối RTP/RTCP & `extendData` (`/api/voicecall/request`, command `11301`, signal `416`).
7
+ *
8
+ * @param calleeId User ID của người nhận cuộc gọi
9
+ * @param options Thông tin `callId`, `session`, `rtpAddress`, `rtcpAddress`, `codec` và `extendData`
10
+ * @throws {ZaloApiError}
11
+ */
12
+ return async function sendRequestVoiceCall(calleeId, options) {
13
+ if (!calleeId)
14
+ throw new ZaloApiError("Missing calleeId");
15
+ if (!options?.callId)
16
+ throw new ZaloApiError("Missing callId");
17
+ if (!options?.session)
18
+ throw new ZaloApiError("Missing session");
19
+ if (!voiceCallService)
20
+ throw new ZaloApiError("Missing voice_call service URL in zpwServiceMap");
21
+ const extendDataStr = options.extendData === undefined
22
+ ? undefined
23
+ : typeof options.extendData === "string"
24
+ ? options.extendData
25
+ : JSON.stringify(options.extendData);
26
+ const params = {
27
+ calleeId: String(calleeId),
28
+ rtcpAddress: options.rtcpAddress ?? "",
29
+ rtpAddress: options.rtpAddress ?? "",
30
+ codec: options.codec ?? "[]",
31
+ session: options.session,
32
+ callId: options.callId,
33
+ imei: ctx.imei,
34
+ };
35
+ if (extendDataStr) {
36
+ params.extendData = extendDataStr;
37
+ params.subCommand = options.subCommand ?? 3;
38
+ }
39
+ const encryptedParams = utils.encodeAES(JSON.stringify(params));
40
+ if (!encryptedParams)
41
+ throw new ZaloApiError("Failed to encrypt sendRequestVoiceCall params");
42
+ const url = utils.makeURL(`${voiceCallService}/api/voicecall/request`, {
43
+ zpw_type: 24,
44
+ params: encryptedParams,
45
+ });
46
+ const response = await utils.request(url, {
47
+ method: "GET",
48
+ });
49
+ return utils.resolve(response);
50
+ };
51
+ });
@@ -1,6 +1,8 @@
1
1
  export declare enum CallType {
2
2
  Audio = 1,
3
- Video = 3
3
+ Video = 3,
4
+ GroupAudio = 5,
5
+ GroupVideo = 6
4
6
  }
5
7
  export type SendVoiceCallOptions = {
6
8
  callType?: CallType;
@@ -18,6 +20,9 @@ export type RequestCallServerEntry = {
18
20
  };
19
21
  export type RequestCallServerInfo = {
20
22
  sessId: string;
23
+ fromId?: number;
24
+ toId?: number;
25
+ protocol?: number;
21
26
  rtpServer?: string;
22
27
  rtcpServer?: string;
23
28
  rtpIP?: string;
@@ -26,6 +31,8 @@ export type RequestCallServerInfo = {
26
31
  rtcpIPv6?: string;
27
32
  servers?: RequestCallServerEntry[];
28
33
  zrtpKey?: string;
34
+ zrtc_config?: Record<string, unknown> | string;
35
+ settings?: Record<string, unknown>;
29
36
  expiredTime?: number;
30
37
  codec?: string;
31
38
  [key: string]: unknown;
@@ -1,9 +1,12 @@
1
1
  import { ZaloApiError } from "../../Errors/ZaloApiError.js";
2
+ import { DEFAULT_ZALO_AUDIO_CODEC, buildZrtcExtendData } from "../../call-engine/ZRTPPacketCodec.js";
2
3
  import { apiFactory, resolveResponse } from "../../utils.js";
3
4
  export var CallType;
4
5
  (function (CallType) {
5
6
  CallType[CallType["Audio"] = 1] = "Audio";
6
7
  CallType[CallType["Video"] = 3] = "Video";
8
+ CallType[CallType["GroupAudio"] = 5] = "GroupAudio";
9
+ CallType[CallType["GroupVideo"] = 6] = "GroupVideo";
7
10
  })(CallType || (CallType = {}));
8
11
  function parseServerEndpoint(addr) {
9
12
  if (!addr)
@@ -32,7 +35,7 @@ export const sendVoiceCallFactory = apiFactory()((api, ctx, utils) => {
32
35
  throw new ZaloApiError("Missing voice_call service URL in zpwServiceMap");
33
36
  const callType = options.callType ?? CallType.Audio;
34
37
  const callId = options.callId ?? Math.floor(Math.random() * 2_000_000_000);
35
- const codec = options.codec ?? "[]";
38
+ const codec = options.codec ?? DEFAULT_ZALO_AUDIO_CODEC;
36
39
  const normalizedCalleeId = String(calleeId);
37
40
  // Step 1: Allocate call session & RTP/RTCP relay endpoints (/api/voicecall/requestcall, command 11300)
38
41
  const step1Params = {
@@ -61,16 +64,15 @@ export const sendVoiceCallFactory = apiFactory()((api, ctx, utils) => {
61
64
  const rtp = parseServerEndpoint(resolvedRtpServer);
62
65
  const rtcp = parseServerEndpoint(resolvedRtcpServer);
63
66
  const sessId = serverInfo?.sessId ?? `${normalizedCalleeId}_${callId}_401`;
64
- const resolvedCodec = serverInfo?.codec ?? codec;
67
+ const resolvedCodec = serverInfo?.codec && serverInfo.codec !== "[]" ? serverInfo.codec : codec;
65
68
  // Step 2: Send ringing signaling request (/api/voicecall/request, command 11301)
66
69
  const isVideo = callType === CallType.Video;
67
70
  const extendData = JSON.stringify({
68
- callType: isVideo ? 1 : 0,
69
- video: {
70
- codec: isVideo ? [{ name: "h264", payload: 97 }] : [],
71
- },
72
- newZrtc: 1,
73
- platform: 5,
71
+ ...buildZrtcExtendData({
72
+ rtpAddress: rtp.host,
73
+ rtcpAddress: rtcp.host,
74
+ isVideo,
75
+ }),
74
76
  rtcpDiff: 0,
75
77
  rtcp: [{ ip: rtcp.ip, port: rtcp.port }],
76
78
  rtp: [{ ip: rtp.ip, port: rtp.port }],
@@ -0,0 +1,10 @@
1
+ export type ShareScreenGroupCallOptions = {
2
+ userId?: string;
3
+ hostCall: string;
4
+ status?: number;
5
+ audioState?: number;
6
+ videoState?: number;
7
+ data?: string | Record<string, unknown>;
8
+ };
9
+ export type ShareScreenGroupCallResponse = Record<string, unknown>;
10
+ export declare const shareScreenGroupCallFactory: (ctx: import("../../context.js").ContextBase, api: import("../../apis.js").API) => (callId: number, options: ShareScreenGroupCallOptions) => Promise<ShareScreenGroupCallResponse>;
@@ -0,0 +1,45 @@
1
+ import { ZaloApiError } from "../../Errors/ZaloApiError.js";
2
+ import { apiFactory } from "../../utils.js";
3
+ export const shareScreenGroupCallFactory = apiFactory()((api, ctx, utils) => {
4
+ const voiceCallService = api.zpwServiceMap.voice_call?.[0];
5
+ /**
6
+ * Bật/tắt chia sẻ màn hình trong cuộc gọi nhóm (`/api/voicecall/group/sharescreen`, command `12044`).
7
+ *
8
+ * @param callId ID của cuộc gọi nhóm
9
+ * @param options Thông tin `hostCall`, `userId`, `status`, `audioState`, `videoState` và `data`
10
+ * @throws {ZaloApiError}
11
+ */
12
+ return async function shareScreenGroupCall(callId, options) {
13
+ if (!callId)
14
+ throw new ZaloApiError("Missing callId");
15
+ if (!options?.hostCall)
16
+ throw new ZaloApiError("Missing hostCall");
17
+ if (!voiceCallService)
18
+ throw new ZaloApiError("Missing voice_call service URL in zpwServiceMap");
19
+ const dataStr = options.data === undefined
20
+ ? "{}"
21
+ : typeof options.data === "string"
22
+ ? options.data
23
+ : JSON.stringify(options.data);
24
+ const params = {
25
+ userId: String(options.userId ?? ctx.uid),
26
+ callId,
27
+ hostCall: String(options.hostCall),
28
+ status: options.status ?? 1,
29
+ audiostate: options.audioState ?? 1,
30
+ videostate: options.videoState ?? 1,
31
+ data: dataStr,
32
+ };
33
+ const encryptedParams = utils.encodeAES(JSON.stringify(params));
34
+ if (!encryptedParams)
35
+ throw new ZaloApiError("Failed to encrypt shareScreenGroupCall params");
36
+ const url = utils.makeURL(`${voiceCallService}/api/voicecall/group/sharescreen`, {
37
+ zpw_type: 24,
38
+ params: encryptedParams,
39
+ });
40
+ const response = await utils.request(url, {
41
+ method: "GET",
42
+ });
43
+ return utils.resolve(response);
44
+ };
45
+ });
@@ -0,0 +1,5 @@
1
+ export type UnholdVoiceCallOptions = {
2
+ isResponse?: boolean;
3
+ };
4
+ export type UnholdVoiceCallResponse = Record<string, unknown>;
5
+ export declare const unholdVoiceCallFactory: (ctx: import("../../context.js").ContextBase, api: import("../../apis.js").API) => (toId: string, options?: UnholdVoiceCallOptions) => Promise<UnholdVoiceCallResponse>;
@@ -0,0 +1,34 @@
1
+ import { ZaloApiError } from "../../Errors/ZaloApiError.js";
2
+ import { apiFactory } from "../../utils.js";
3
+ export const unholdVoiceCallFactory = apiFactory()((api, _ctx, utils) => {
4
+ const voiceCallService = api.zpwServiceMap.voice_call?.[0];
5
+ /**
6
+ * Gửi yêu cầu tiếp tục cuộc gọi đang tạm giữ (`/api/voicecall/unholdreq`, command `11309`, signal `413`)
7
+ * hoặc phản hồi tiếp tục cuộc gọi (`/api/voicecall/unholdresp`, command `11310`, signal `414`).
8
+ *
9
+ * @param toId User ID của đối phương trong cuộc gọi
10
+ * @param options Đặt `isResponse = true` nếu là gói phản hồi (`unholdresp`)
11
+ * @throws {ZaloApiError}
12
+ */
13
+ return async function unholdVoiceCall(toId, options = {}) {
14
+ if (!toId)
15
+ throw new ZaloApiError("Missing toId");
16
+ if (!voiceCallService)
17
+ throw new ZaloApiError("Missing voice_call service URL in zpwServiceMap");
18
+ const params = {
19
+ toId: String(toId),
20
+ };
21
+ const encryptedParams = utils.encodeAES(JSON.stringify(params));
22
+ if (!encryptedParams)
23
+ throw new ZaloApiError("Failed to encrypt unholdVoiceCall params");
24
+ const endpoint = options.isResponse ? "unholdresp" : "unholdreq";
25
+ const url = utils.makeURL(`${voiceCallService}/api/voicecall/${endpoint}`, {
26
+ zpw_type: 24,
27
+ params: encryptedParams,
28
+ });
29
+ const response = await utils.request(url, {
30
+ method: "GET",
31
+ });
32
+ return utils.resolve(response);
33
+ };
34
+ });
@@ -0,0 +1,7 @@
1
+ export type UpdateCallMediaStateOptions = {
2
+ isOnCam?: boolean | number;
3
+ isOnMic?: boolean | number;
4
+ data?: string | Record<string, unknown>;
5
+ };
6
+ export type UpdateCallMediaStateResponse = Record<string, unknown>;
7
+ export declare const updateCallMediaStateFactory: (ctx: import("../../context.js").ContextBase, api: import("../../apis.js").API) => (calleeId: string, callId: number, options: UpdateCallMediaStateOptions) => Promise<UpdateCallMediaStateResponse>;
@@ -0,0 +1,61 @@
1
+ import { ZaloApiError } from "../../Errors/ZaloApiError.js";
2
+ import { apiFactory } from "../../utils.js";
3
+ export const updateCallMediaStateFactory = apiFactory()((api, _ctx, utils) => {
4
+ const voiceCallService = api.zpwServiceMap.voice_call?.[0];
5
+ /**
6
+ * Đồng bộ trạng thái bật/tắt Camera và Microphone trong cuộc gọi 1-1 (`/api/voicecall/conf`, command `12006`).
7
+ * Khớp chính xác với `ZMessageSerializer::sendOnOffMicCam` (`0x100026cdc`):
8
+ * - Khi bật/tắt Camera (`UiOnOffCameraEvent`): `isOnCam = 1 | 0`, `isOnMic = -1`, `data = ""`
9
+ * - Khi bật/tắt Mic (`UiMuteEvent`): `isOnCam = -1`, `isOnMic = 1 | 0`, `data = ""`
10
+ *
11
+ * @param calleeId User ID của đối phương
12
+ * @param callId ID của cuộc gọi
13
+ * @param options Trạng thái `isOnCam`, `isOnMic` và `data` bổ sung
14
+ * @throws {ZaloApiError}
15
+ */
16
+ return async function updateCallMediaState(calleeId, callId, options) {
17
+ if (!calleeId)
18
+ throw new ZaloApiError("Missing calleeId");
19
+ if (!callId)
20
+ throw new ZaloApiError("Missing callId");
21
+ if (!voiceCallService)
22
+ throw new ZaloApiError("Missing voice_call service URL in zpwServiceMap");
23
+ const dataStr = options.data === undefined
24
+ ? ""
25
+ : typeof options.data === "string"
26
+ ? options.data
27
+ : JSON.stringify(options.data);
28
+ const isOnCamVal = options.isOnCam === undefined
29
+ ? -1
30
+ : typeof options.isOnCam === "boolean"
31
+ ? options.isOnCam
32
+ ? 1
33
+ : 0
34
+ : Number(options.isOnCam);
35
+ const isOnMicVal = options.isOnMic === undefined
36
+ ? -1
37
+ : typeof options.isOnMic === "boolean"
38
+ ? options.isOnMic
39
+ ? 1
40
+ : 0
41
+ : Number(options.isOnMic);
42
+ const params = {
43
+ calleeId: String(calleeId),
44
+ callId,
45
+ isOnCam: isOnCamVal,
46
+ isOnMic: isOnMicVal,
47
+ data: dataStr,
48
+ };
49
+ const encryptedParams = utils.encodeAES(JSON.stringify(params));
50
+ if (!encryptedParams)
51
+ throw new ZaloApiError("Failed to encrypt updateCallMediaState params");
52
+ const url = utils.makeURL(`${voiceCallService}/api/voicecall/conf`, {
53
+ zpw_type: 24,
54
+ params: encryptedParams,
55
+ });
56
+ const response = await utils.request(url, {
57
+ method: "GET",
58
+ });
59
+ return utils.resolve(response);
60
+ };
61
+ });
package/dist/apis.d.ts CHANGED
@@ -6,10 +6,16 @@ import { addPollOptionsFactory } from "./apis/board/addPollOptions.js";
6
6
  import { addQuickMessageFactory } from "./apis/business/addQuickMessage.js";
7
7
  import { addReactionFactory } from "./apis/chat/addReaction.js";
8
8
  import { addUnreadMarkFactory } from "./apis/chat/addUnreadMark.js";
9
+ import { addUserGroupCallFactory } from "./apis/call/addUserGroupCall.js";
9
10
  import { addUserToGroupFactory } from "./apis/group/addUserToGroup.js";
10
11
  import { analyseGroupFactory } from "./apis/group/analyseGroup.js";
12
+ import { answerAckVoiceCallFactory } from "./apis/call/answerAckVoiceCall.js";
13
+ import { answerGroupCallFactory } from "./apis/call/answerGroupCall.js";
14
+ import { answerVoiceCallFactory } from "./apis/call/answerVoiceCall.js";
11
15
  import { blockUserFactory } from "./apis/friend/blockUser.js";
12
16
  import { blockViewFeedFactory } from "./apis/friend/blockViewFeed.js";
17
+ import { broadcastGroupCallStateFactory } from "./apis/call/broadcastGroupCallState.js";
18
+ import { cancelGroupCallFactory } from "./apis/call/cancelGroupCall.js";
13
19
  import { cancelPullMobileFactory } from "./apis/sync/cancelPullMobile.js";
14
20
  import { cancelVoiceCallFactory } from "./apis/call/cancelVoiceCall.js";
15
21
  import { changeAccountAvatarFactory } from "./apis/profile/changeAccountAvatar.js";
@@ -22,11 +28,13 @@ import { clearUnreadFriendRequestsFactory } from "./apis/friend/clearUnreadFrien
22
28
  import { createAutoReplyFactory } from "./apis/business/createAutoReply.js";
23
29
  import { createBankAccountFactory } from "./apis/business/createBankAccount.js";
24
30
  import { createCatalogFactory } from "./apis/business/createCatalog.js";
31
+ import { createControllerFactory } from "./apis/call/createController.js";
25
32
  import { createGroupFactory } from "./apis/group/createGroup.js";
26
33
  import { createNoteFactory } from "./apis/board/createNote.js";
27
34
  import { createPollFactory } from "./apis/board/createPoll.js";
28
35
  import { createProductCatalogFactory } from "./apis/business/createProductCatalog.js";
29
36
  import { createReminderFactory } from "./apis/board/createReminder.js";
37
+ import { createRtcSessionFactory } from "./apis/call/createRtcSession.js";
30
38
  import { decryptGidsFactory } from "./apis/auth/decryptGids.js";
31
39
  import { deleteAutoReplyFactory } from "./apis/business/deleteAutoReply.js";
32
40
  import { deleteAvatarFactory } from "./apis/profile/deleteAvatar.js";
@@ -43,11 +51,13 @@ import { editNoteFactory } from "./apis/board/editNote.js";
43
51
  import { editReminderFactory } from "./apis/board/editReminder.js";
44
52
  import { enableGroupLinkFactory } from "./apis/group/enableGroupLink.js";
45
53
  import { encryptGidsFactory } from "./apis/auth/encryptGids.js";
54
+ import { endGroupCallFactory } from "./apis/call/endGroupCall.js";
46
55
  import { endVoiceCallFactory } from "./apis/call/endVoiceCall.js";
47
56
  import { exportSessionFactory } from "./apis/auth/exportSession.js";
48
57
  import { fetchAccountInfoFactory } from "./apis/profile/fetchAccountInfo.js";
49
58
  import { findUserFactory } from "./apis/friend/findUser.js";
50
59
  import { findUserByUsernameFactory } from "./apis/friend/findUserByUsername.js";
60
+ import { finishGroupCallFactory } from "./apis/call/finishGroupCall.js";
51
61
  import { forwardMessageFactory } from "./apis/chat/forwardMessage.js";
52
62
  import { getAliasListFactory } from "./apis/friend/getAliasList.js";
53
63
  import { getAliasListV2Factory } from "./apis/friend/getAliasListV2.js";
@@ -85,6 +95,7 @@ import { getFriendsActivePCWebFactory } from "./apis/friend/getFriendsActivePCWe
85
95
  import { getFriendsEmojiStatusFactory } from "./apis/friend/getFriendsEmojiStatus.js";
86
96
  import { getFullAvatarFactory } from "./apis/profile/getFullAvatar.js";
87
97
  import { getGroupBlockedMemberFactory } from "./apis/group/getGroupBlockedMember.js";
98
+ import { getGroupCallStateFactory } from "./apis/call/getGroupCallState.js";
88
99
  import { getGroupChatHistoryFactory } from "./apis/group/getGroupChatHistory.js";
89
100
  import { getGroupCloudMessageJumpFactory } from "./apis/group/getGroupCloudMessageJump.js";
90
101
  import { getGroupCloudMessagePathFactory } from "./apis/group/getGroupCloudMessagePath.js";
@@ -149,15 +160,20 @@ import { getUnreadMarkFactory } from "./apis/chat/getUnreadMark.js";
149
160
  import { getUsageMyCloudFactory } from "./apis/zcloud/getUsageMyCloud.js";
150
161
  import { getUsageZCloudFactory } from "./apis/zcloud/getUsageZCloud.js";
151
162
  import { getUserInfoFactory } from "./apis/profile/getUserInfo.js";
163
+ import { holdVoiceCallFactory } from "./apis/call/holdVoiceCall.js";
152
164
  import { inviteUserToGroupsFactory } from "./apis/group/inviteUserToGroups.js";
165
+ import { joinGroupCallFactory } from "./apis/call/joinGroupCall.js";
153
166
  import { joinGroupInviteBoxFactory } from "./apis/group/joinGroupInviteBox.js";
154
167
  import { joinGroupLinkFactory } from "./apis/group/joinGroupLink.js";
155
168
  import { keepAliveFactory } from "./apis/auth/keepAlive.js";
156
169
  import { lastOnlineFactory } from "./apis/friend/lastOnline.js";
157
170
  import { leaveGroupFactory } from "./apis/group/leaveGroup.js";
158
171
  import { lockPollFactory } from "./apis/board/lockPoll.js";
172
+ import { logEndVoiceCallFactory } from "./apis/call/logEndVoiceCall.js";
159
173
  import { lostFocusFactory } from "./apis/auth/lostFocus.js";
174
+ import { notifyGroupCallFactory } from "./apis/call/notifyGroupCall.js";
160
175
  import { parseLinkFactory } from "./apis/chat/parseLink.js";
176
+ import { pingGroupCallFactory } from "./apis/call/pingGroupCall.js";
161
177
  import { preloadConversationsFactory } from "./apis/chat/preloadConversations.js";
162
178
  import { pullMobileFactory } from "./apis/sync/pullMobile.js";
163
179
  import { readContactTabFactory } from "./apis/friend/readContactTab.js";
@@ -173,10 +189,16 @@ import { removeQuickMessageFactory } from "./apis/business/removeQuickMessage.js
173
189
  import { removeReminderFactory } from "./apis/board/removeReminder.js";
174
190
  import { removeUnreadMarkFactory } from "./apis/chat/removeUnreadMark.js";
175
191
  import { removeUserFromGroupFactory } from "./apis/group/removeUserFromGroup.js";
192
+ import { requestAudioToVideoCallFactory } from "./apis/call/requestAudioToVideoCall.js";
193
+ import { requestGroupCallFactory } from "./apis/call/requestGroupCall.js";
194
+ import { requestShareScreenCallFactory } from "./apis/call/requestShareScreenCall.js";
176
195
  import { requestSyncFromPhoneFactory } from "./apis/sync/requestSyncFromPhone.js";
196
+ import { requestVoiceCallFactory } from "./apis/call/requestVoiceCall.js";
177
197
  import { resetHiddenConversPinFactory } from "./apis/chat/resetHiddenConversPin.js";
178
198
  import { reuseAvatarFactory } from "./apis/profile/reuseAvatar.js";
179
199
  import { reviewPendingMemberRequestFactory } from "./apis/group/reviewPendingMemberRequest.js";
200
+ import { ringRingGroupCallFactory } from "./apis/call/ringRingGroupCall.js";
201
+ import { ringRingVoiceCallFactory } from "./apis/call/ringRingVoiceCall.js";
180
202
  import { scanURLFactory } from "./apis/auth/scanURL.js";
181
203
  import { searchStickerFactory } from "./apis/sticker/searchSticker.js";
182
204
  import { sendBankCardFactory } from "./apis/chat/sendBankCard.js";
@@ -186,6 +208,8 @@ import { sendFriendRequestFactory } from "./apis/friend/sendFriendRequest.js";
186
208
  import { sendLinkFactory } from "./apis/chat/sendLink.js";
187
209
  import { sendMessageFactory } from "./apis/chat/sendMessage.js";
188
210
  import { sendReportFactory } from "./apis/chat/sendReport.js";
211
+ import { sendRequestGroupCallFactory } from "./apis/call/sendRequestGroupCall.js";
212
+ import { sendRequestVoiceCallFactory } from "./apis/call/sendRequestVoiceCall.js";
189
213
  import { sendSeenEventFactory } from "./apis/chat/sendSeenEvent.js";
190
214
  import { sendStickerFactory } from "./apis/chat/sendSticker.js";
191
215
  import { sendTypingEventFactory } from "./apis/chat/sendTypingEvent.js";
@@ -196,15 +220,18 @@ import { setHiddenConversationsFactory } from "./apis/chat/setHiddenConversation
196
220
  import { setMuteFactory } from "./apis/chat/setMute.js";
197
221
  import { setPinnedConversationsFactory } from "./apis/chat/setPinnedConversations.js";
198
222
  import { sharePollFactory } from "./apis/board/sharePoll.js";
223
+ import { shareScreenGroupCallFactory } from "./apis/call/shareScreenGroupCall.js";
199
224
  import { unblockUserFactory } from "./apis/friend/unblockUser.js";
200
225
  import { undoFactory } from "./apis/chat/undo.js";
201
226
  import { undoFriendRequestFactory } from "./apis/friend/undoFriendRequest.js";
202
227
  import { undoMultiMessageFactory } from "./apis/chat/undoMultiMessage.js";
228
+ import { unholdVoiceCallFactory } from "./apis/call/unholdVoiceCall.js";
203
229
  import { updateActiveStatusFactory } from "./apis/auth/updateActiveStatus.js";
204
230
  import { updateArchivedChatListFactory } from "./apis/chat/updateArchivedChatList.js";
205
231
  import { updateAutoDeleteChatFactory } from "./apis/chat/updateAutoDeleteChat.js";
206
232
  import { updateAutoReplyFactory } from "./apis/business/updateAutoReply.js";
207
233
  import { updateBankAccountFactory } from "./apis/business/updateBankAccount.js";
234
+ import { updateCallMediaStateFactory } from "./apis/call/updateCallMediaState.js";
208
235
  import { updateCatalogFactory } from "./apis/business/updateCatalog.js";
209
236
  import { updateGroupSettingsFactory } from "./apis/group/updateGroupSettings.js";
210
237
  import { updateHiddenConversPinFactory } from "./apis/chat/updateHiddenConversPin.js";
@@ -289,9 +316,36 @@ export type BusinessDomainAPI = {
289
316
  readonly uploadProductPhoto: ReturnType<typeof uploadProductPhotoFactory>;
290
317
  };
291
318
  export type CallDomainAPI = {
319
+ readonly addUserGroupCall: ReturnType<typeof addUserGroupCallFactory>;
320
+ readonly answerAckVoiceCall: ReturnType<typeof answerAckVoiceCallFactory>;
321
+ readonly answerGroupCall: ReturnType<typeof answerGroupCallFactory>;
322
+ readonly answerVoiceCall: ReturnType<typeof answerVoiceCallFactory>;
323
+ readonly broadcastGroupCallState: ReturnType<typeof broadcastGroupCallStateFactory>;
324
+ readonly cancelGroupCall: ReturnType<typeof cancelGroupCallFactory>;
292
325
  readonly cancelVoiceCall: ReturnType<typeof cancelVoiceCallFactory>;
326
+ readonly createController: ReturnType<typeof createControllerFactory>;
327
+ readonly createRtcSession: ReturnType<typeof createRtcSessionFactory>;
328
+ readonly endGroupCall: ReturnType<typeof endGroupCallFactory>;
293
329
  readonly endVoiceCall: ReturnType<typeof endVoiceCallFactory>;
330
+ readonly finishGroupCall: ReturnType<typeof finishGroupCallFactory>;
331
+ readonly getGroupCallState: ReturnType<typeof getGroupCallStateFactory>;
332
+ readonly holdVoiceCall: ReturnType<typeof holdVoiceCallFactory>;
333
+ readonly joinGroupCall: ReturnType<typeof joinGroupCallFactory>;
334
+ readonly logEndVoiceCall: ReturnType<typeof logEndVoiceCallFactory>;
335
+ readonly notifyGroupCall: ReturnType<typeof notifyGroupCallFactory>;
336
+ readonly pingGroupCall: ReturnType<typeof pingGroupCallFactory>;
337
+ readonly requestAudioToVideoCall: ReturnType<typeof requestAudioToVideoCallFactory>;
338
+ readonly requestGroupCall: ReturnType<typeof requestGroupCallFactory>;
339
+ readonly requestShareScreenCall: ReturnType<typeof requestShareScreenCallFactory>;
340
+ readonly requestVoiceCall: ReturnType<typeof requestVoiceCallFactory>;
341
+ readonly ringRingGroupCall: ReturnType<typeof ringRingGroupCallFactory>;
342
+ readonly ringRingVoiceCall: ReturnType<typeof ringRingVoiceCallFactory>;
343
+ readonly sendRequestGroupCall: ReturnType<typeof sendRequestGroupCallFactory>;
344
+ readonly sendRequestVoiceCall: ReturnType<typeof sendRequestVoiceCallFactory>;
294
345
  readonly sendVoiceCall: ReturnType<typeof sendVoiceCallFactory>;
346
+ readonly shareScreenGroupCall: ReturnType<typeof shareScreenGroupCallFactory>;
347
+ readonly unholdVoiceCall: ReturnType<typeof unholdVoiceCallFactory>;
348
+ readonly updateCallMediaState: ReturnType<typeof updateCallMediaStateFactory>;
295
349
  };
296
350
  export type ChatDomainAPI = {
297
351
  readonly addReaction: ReturnType<typeof addReactionFactory>;
@@ -502,10 +556,16 @@ export declare class API {
502
556
  get addQuickMessage(): ReturnType<typeof addQuickMessageFactory>;
503
557
  get addReaction(): ReturnType<typeof addReactionFactory>;
504
558
  get addUnreadMark(): ReturnType<typeof addUnreadMarkFactory>;
559
+ get addUserGroupCall(): ReturnType<typeof addUserGroupCallFactory>;
505
560
  get addUserToGroup(): ReturnType<typeof addUserToGroupFactory>;
506
561
  get analyseGroup(): ReturnType<typeof analyseGroupFactory>;
562
+ get answerAckVoiceCall(): ReturnType<typeof answerAckVoiceCallFactory>;
563
+ get answerGroupCall(): ReturnType<typeof answerGroupCallFactory>;
564
+ get answerVoiceCall(): ReturnType<typeof answerVoiceCallFactory>;
507
565
  get blockUser(): ReturnType<typeof blockUserFactory>;
508
566
  get blockViewFeed(): ReturnType<typeof blockViewFeedFactory>;
567
+ get broadcastGroupCallState(): ReturnType<typeof broadcastGroupCallStateFactory>;
568
+ get cancelGroupCall(): ReturnType<typeof cancelGroupCallFactory>;
509
569
  get cancelPullMobile(): ReturnType<typeof cancelPullMobileFactory>;
510
570
  get cancelVoiceCall(): ReturnType<typeof cancelVoiceCallFactory>;
511
571
  get changeAccountAvatar(): ReturnType<typeof changeAccountAvatarFactory>;
@@ -518,11 +578,13 @@ export declare class API {
518
578
  get createAutoReply(): ReturnType<typeof createAutoReplyFactory>;
519
579
  get createBankAccount(): ReturnType<typeof createBankAccountFactory>;
520
580
  get createCatalog(): ReturnType<typeof createCatalogFactory>;
581
+ get createController(): ReturnType<typeof createControllerFactory>;
521
582
  get createGroup(): ReturnType<typeof createGroupFactory>;
522
583
  get createNote(): ReturnType<typeof createNoteFactory>;
523
584
  get createPoll(): ReturnType<typeof createPollFactory>;
524
585
  get createProductCatalog(): ReturnType<typeof createProductCatalogFactory>;
525
586
  get createReminder(): ReturnType<typeof createReminderFactory>;
587
+ get createRtcSession(): ReturnType<typeof createRtcSessionFactory>;
526
588
  get decryptGids(): ReturnType<typeof decryptGidsFactory>;
527
589
  get deleteAutoReply(): ReturnType<typeof deleteAutoReplyFactory>;
528
590
  get deleteAvatar(): ReturnType<typeof deleteAvatarFactory>;
@@ -539,11 +601,13 @@ export declare class API {
539
601
  get editReminder(): ReturnType<typeof editReminderFactory>;
540
602
  get enableGroupLink(): ReturnType<typeof enableGroupLinkFactory>;
541
603
  get encryptGids(): ReturnType<typeof encryptGidsFactory>;
604
+ get endGroupCall(): ReturnType<typeof endGroupCallFactory>;
542
605
  get endVoiceCall(): ReturnType<typeof endVoiceCallFactory>;
543
606
  get exportSession(): ReturnType<typeof exportSessionFactory>;
544
607
  get fetchAccountInfo(): ReturnType<typeof fetchAccountInfoFactory>;
545
608
  get findUser(): ReturnType<typeof findUserFactory>;
546
609
  get findUserByUsername(): ReturnType<typeof findUserByUsernameFactory>;
610
+ get finishGroupCall(): ReturnType<typeof finishGroupCallFactory>;
547
611
  get forwardMessage(): ReturnType<typeof forwardMessageFactory>;
548
612
  get getAliasList(): ReturnType<typeof getAliasListFactory>;
549
613
  get getAliasListV2(): ReturnType<typeof getAliasListV2Factory>;
@@ -581,6 +645,7 @@ export declare class API {
581
645
  get getFriendsEmojiStatus(): ReturnType<typeof getFriendsEmojiStatusFactory>;
582
646
  get getFullAvatar(): ReturnType<typeof getFullAvatarFactory>;
583
647
  get getGroupBlockedMember(): ReturnType<typeof getGroupBlockedMemberFactory>;
648
+ get getGroupCallState(): ReturnType<typeof getGroupCallStateFactory>;
584
649
  get getGroupChatHistory(): ReturnType<typeof getGroupChatHistoryFactory>;
585
650
  get getGroupCloudMessageJump(): ReturnType<typeof getGroupCloudMessageJumpFactory>;
586
651
  get getGroupCloudMessagePath(): ReturnType<typeof getGroupCloudMessagePathFactory>;
@@ -645,15 +710,20 @@ export declare class API {
645
710
  get getUsageMyCloud(): ReturnType<typeof getUsageMyCloudFactory>;
646
711
  get getUsageZCloud(): ReturnType<typeof getUsageZCloudFactory>;
647
712
  get getUserInfo(): ReturnType<typeof getUserInfoFactory>;
713
+ get holdVoiceCall(): ReturnType<typeof holdVoiceCallFactory>;
648
714
  get inviteUserToGroups(): ReturnType<typeof inviteUserToGroupsFactory>;
715
+ get joinGroupCall(): ReturnType<typeof joinGroupCallFactory>;
649
716
  get joinGroupInviteBox(): ReturnType<typeof joinGroupInviteBoxFactory>;
650
717
  get joinGroupLink(): ReturnType<typeof joinGroupLinkFactory>;
651
718
  get keepAlive(): ReturnType<typeof keepAliveFactory>;
652
719
  get lastOnline(): ReturnType<typeof lastOnlineFactory>;
653
720
  get leaveGroup(): ReturnType<typeof leaveGroupFactory>;
654
721
  get lockPoll(): ReturnType<typeof lockPollFactory>;
722
+ get logEndVoiceCall(): ReturnType<typeof logEndVoiceCallFactory>;
655
723
  get lostFocus(): ReturnType<typeof lostFocusFactory>;
724
+ get notifyGroupCall(): ReturnType<typeof notifyGroupCallFactory>;
656
725
  get parseLink(): ReturnType<typeof parseLinkFactory>;
726
+ get pingGroupCall(): ReturnType<typeof pingGroupCallFactory>;
657
727
  get preloadConversations(): ReturnType<typeof preloadConversationsFactory>;
658
728
  get pullMobile(): ReturnType<typeof pullMobileFactory>;
659
729
  get readContactTab(): ReturnType<typeof readContactTabFactory>;
@@ -669,10 +739,16 @@ export declare class API {
669
739
  get removeReminder(): ReturnType<typeof removeReminderFactory>;
670
740
  get removeUnreadMark(): ReturnType<typeof removeUnreadMarkFactory>;
671
741
  get removeUserFromGroup(): ReturnType<typeof removeUserFromGroupFactory>;
742
+ get requestAudioToVideoCall(): ReturnType<typeof requestAudioToVideoCallFactory>;
743
+ get requestGroupCall(): ReturnType<typeof requestGroupCallFactory>;
744
+ get requestShareScreenCall(): ReturnType<typeof requestShareScreenCallFactory>;
672
745
  get requestSyncFromPhone(): ReturnType<typeof requestSyncFromPhoneFactory>;
746
+ get requestVoiceCall(): ReturnType<typeof requestVoiceCallFactory>;
673
747
  get resetHiddenConversPin(): ReturnType<typeof resetHiddenConversPinFactory>;
674
748
  get reuseAvatar(): ReturnType<typeof reuseAvatarFactory>;
675
749
  get reviewPendingMemberRequest(): ReturnType<typeof reviewPendingMemberRequestFactory>;
750
+ get ringRingGroupCall(): ReturnType<typeof ringRingGroupCallFactory>;
751
+ get ringRingVoiceCall(): ReturnType<typeof ringRingVoiceCallFactory>;
676
752
  get scanURL(): ReturnType<typeof scanURLFactory>;
677
753
  get searchSticker(): ReturnType<typeof searchStickerFactory>;
678
754
  get sendBankCard(): ReturnType<typeof sendBankCardFactory>;
@@ -682,6 +758,8 @@ export declare class API {
682
758
  get sendLink(): ReturnType<typeof sendLinkFactory>;
683
759
  get sendMessage(): ReturnType<typeof sendMessageFactory>;
684
760
  get sendReport(): ReturnType<typeof sendReportFactory>;
761
+ get sendRequestGroupCall(): ReturnType<typeof sendRequestGroupCallFactory>;
762
+ get sendRequestVoiceCall(): ReturnType<typeof sendRequestVoiceCallFactory>;
685
763
  get sendSeenEvent(): ReturnType<typeof sendSeenEventFactory>;
686
764
  get sendSticker(): ReturnType<typeof sendStickerFactory>;
687
765
  get sendTypingEvent(): ReturnType<typeof sendTypingEventFactory>;
@@ -692,15 +770,18 @@ export declare class API {
692
770
  get setMute(): ReturnType<typeof setMuteFactory>;
693
771
  get setPinnedConversations(): ReturnType<typeof setPinnedConversationsFactory>;
694
772
  get sharePoll(): ReturnType<typeof sharePollFactory>;
773
+ get shareScreenGroupCall(): ReturnType<typeof shareScreenGroupCallFactory>;
695
774
  get unblockUser(): ReturnType<typeof unblockUserFactory>;
696
775
  get undo(): ReturnType<typeof undoFactory>;
697
776
  get undoFriendRequest(): ReturnType<typeof undoFriendRequestFactory>;
698
777
  get undoMultiMessage(): ReturnType<typeof undoMultiMessageFactory>;
778
+ get unholdVoiceCall(): ReturnType<typeof unholdVoiceCallFactory>;
699
779
  get updateActiveStatus(): ReturnType<typeof updateActiveStatusFactory>;
700
780
  get updateArchivedChatList(): ReturnType<typeof updateArchivedChatListFactory>;
701
781
  get updateAutoDeleteChat(): ReturnType<typeof updateAutoDeleteChatFactory>;
702
782
  get updateAutoReply(): ReturnType<typeof updateAutoReplyFactory>;
703
783
  get updateBankAccount(): ReturnType<typeof updateBankAccountFactory>;
784
+ get updateCallMediaState(): ReturnType<typeof updateCallMediaStateFactory>;
704
785
  get updateCatalog(): ReturnType<typeof updateCatalogFactory>;
705
786
  get updateGroupSettings(): ReturnType<typeof updateGroupSettingsFactory>;
706
787
  get updateHiddenConversPin(): ReturnType<typeof updateHiddenConversPinFactory>;