@open-wa/schema 5.4.0 → 5.5.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 (74) hide show
  1. package/dist/calling-media--BLrFrPc.cjs +113 -0
  2. package/dist/calling-media--BLrFrPc.cjs.map +1 -0
  3. package/dist/calling-media-BNTYvogE.mjs +60 -0
  4. package/dist/calling-media-BNTYvogE.mjs.map +1 -0
  5. package/dist/calling-media-CeGgSzhw.d.cts +48 -0
  6. package/dist/calling-media-CeGgSzhw.d.cts.map +1 -0
  7. package/dist/calling-media-CeGgSzhw.d.mts +48 -0
  8. package/dist/calling-media-CeGgSzhw.d.mts.map +1 -0
  9. package/dist/calling-media.cjs +8 -0
  10. package/dist/calling-media.d.cts +2 -0
  11. package/dist/calling-media.d.mts +2 -0
  12. package/dist/calling-media.mjs +2 -0
  13. package/dist/generated/index.cjs +94 -3
  14. package/dist/generated/index.cjs.map +1 -1
  15. package/dist/generated/index.d.cts +2328 -133
  16. package/dist/generated/index.d.cts.map +1 -1
  17. package/dist/generated/index.d.mts +2328 -133
  18. package/dist/generated/index.d.mts.map +1 -1
  19. package/dist/generated/index.mjs +94 -3
  20. package/dist/generated/index.mjs.map +1 -1
  21. package/dist/{index-C9Ad0lEr.d.cts → index-BWvNXopK.d.cts} +2375 -41
  22. package/dist/index-BWvNXopK.d.cts.map +1 -0
  23. package/dist/{index-D0QN2PaW.d.mts → index-Co8HQxm8.d.mts} +2375 -41
  24. package/dist/index-Co8HQxm8.d.mts.map +1 -0
  25. package/dist/index.cjs +191 -20
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +3 -2
  28. package/dist/index.d.mts +3 -2
  29. package/dist/index.mjs +105 -21
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/methods/index.cjs +34 -1
  32. package/dist/methods/index.d.cts +2 -2
  33. package/dist/methods/index.d.mts +2 -2
  34. package/dist/methods/index.mjs +2 -2
  35. package/dist/{methods-BhLsQNtL.mjs → methods-BH7nDC3z.mjs} +816 -51
  36. package/dist/methods-BH7nDC3z.mjs.map +1 -0
  37. package/dist/{methods-BGmdzjd3.cjs → methods-DpDzgsbe.cjs} +1284 -63
  38. package/dist/methods-DpDzgsbe.cjs.map +1 -0
  39. package/package.json +15 -4
  40. package/src/calling-media.ts +64 -0
  41. package/src/calling-wire.ts +17 -0
  42. package/src/calling.ts +61 -0
  43. package/src/common-types.ts +16 -0
  44. package/src/effect-projection.ts +67 -0
  45. package/src/events/calls.ts +12 -0
  46. package/src/events/groups.ts +30 -6
  47. package/src/events/index.ts +4 -0
  48. package/src/events/messaging.ts +7 -7
  49. package/src/events/polls.ts +11 -0
  50. package/src/events/registry.ts +2 -1
  51. package/src/events/whatsapp-events.ts +13 -0
  52. package/src/generated/AliasMap.ts +30 -1
  53. package/src/generated/BaseClient.ts +153 -8
  54. package/src/generated/BaseNamespacedClient.ts +36 -1
  55. package/src/generated/openapi.json +22999 -12765
  56. package/src/generated/types.ts +87 -0
  57. package/src/index.ts +10 -0
  58. package/src/license.ts +10 -0
  59. package/src/media-options.ts +46 -0
  60. package/src/methods/calls.ts +23 -0
  61. package/src/methods/contacts.ts +10 -1
  62. package/src/methods/groups.ts +9 -3
  63. package/src/methods/index.ts +2 -0
  64. package/src/methods/messaging.ts +159 -45
  65. package/src/methods/session.ts +10 -0
  66. package/src/methods/whatsapp-events.ts +35 -0
  67. package/src/polls.ts +37 -0
  68. package/src/session-refresh.ts +15 -0
  69. package/src/whatsapp-event-registry.ts +17 -0
  70. package/src/whatsapp-events.ts +91 -0
  71. package/dist/index-C9Ad0lEr.d.cts.map +0 -1
  72. package/dist/index-D0QN2PaW.d.mts.map +0 -1
  73. package/dist/methods-BGmdzjd3.cjs.map +0 -1
  74. package/dist/methods-BhLsQNtL.mjs.map +0 -1
@@ -0,0 +1,113 @@
1
+ //#region src/calling-wire.ts
2
+ /** Neutral OpenWA audio framing. Format is negotiated in start/ready JSON. */
3
+ const AUDIO_WIRE_VERSION = 1;
4
+ const AUDIO_FRAME_HEADER_BYTES = 20;
5
+ function encodeAudioPacket(audio, sequence, timestampMs) {
6
+ const packet = new Uint8Array(20 + audio.length);
7
+ const view = new DataView(packet.buffer);
8
+ view.setUint32(0, 1331118385);
9
+ view.setUint32(4, sequence);
10
+ view.setFloat64(8, timestampMs);
11
+ view.setUint32(16, audio.length);
12
+ packet.set(audio, 20);
13
+ return packet;
14
+ }
15
+ function decodeAudioPacket(packet) {
16
+ if (packet.length < 20) throw new Error("Audio packet is missing its header.");
17
+ const view = new DataView(packet.buffer, packet.byteOffset, packet.byteLength);
18
+ const timestampMs = view.getFloat64(8);
19
+ if (view.getUint32(0) !== 1331118385 || view.getUint32(16) !== packet.length - 20 || !Number.isFinite(timestampMs)) throw new Error("Invalid OpenWA audio packet.");
20
+ return {
21
+ audio: packet.subarray(20),
22
+ sequence: view.getUint32(4),
23
+ timestampMs
24
+ };
25
+ }
26
+ //#endregion
27
+ //#region src/calling-media.ts
28
+ /** Device defaults are serializable so embedded and remote clients share the same API. */
29
+ const DEFAULT_MIC = "default:microphone";
30
+ const DEFAULT_SPEAKER = "default:speaker";
31
+ const DEFAULT_CAM = "default:camera";
32
+ /** Keep the cause carried by Effect queue failures, whose own message can be empty. */
33
+ function describeCallMediaFailure(error) {
34
+ let current = error;
35
+ const seen = /* @__PURE__ */ new Set();
36
+ while (current && typeof current === "object" && !seen.has(current)) {
37
+ seen.add(current);
38
+ if ("_tag" in current && current._tag === "TaskTimeoutError" && "timeoutMs" in current) return `Call audio processing exceeded ${current.timeoutMs} ms.`;
39
+ if ("_tag" in current && current._tag === "QueueOverloadedError") return "Call audio processing exceeded its bounded receive queue.";
40
+ if ("cause" in current && current.cause !== void 0) {
41
+ current = current.cause;
42
+ continue;
43
+ }
44
+ if ("message" in current && typeof current.message === "string" && current.message.trim()) return current.message;
45
+ break;
46
+ }
47
+ return typeof current === "string" && current.trim() ? current : "Call media failed without reporting a cause.";
48
+ }
49
+ function normalizeCallMedia(microphone, speaker, camera) {
50
+ if (microphone && typeof microphone === "object" && !("kind" in microphone) && !("getReader" in microphone) && !("arrayBuffer" in microphone)) return microphone;
51
+ return {
52
+ microphone,
53
+ speaker,
54
+ camera
55
+ };
56
+ }
57
+ //#endregion
58
+ Object.defineProperty(exports, "AUDIO_FRAME_HEADER_BYTES", {
59
+ enumerable: true,
60
+ get: function() {
61
+ return AUDIO_FRAME_HEADER_BYTES;
62
+ }
63
+ });
64
+ Object.defineProperty(exports, "AUDIO_WIRE_VERSION", {
65
+ enumerable: true,
66
+ get: function() {
67
+ return AUDIO_WIRE_VERSION;
68
+ }
69
+ });
70
+ Object.defineProperty(exports, "DEFAULT_CAM", {
71
+ enumerable: true,
72
+ get: function() {
73
+ return DEFAULT_CAM;
74
+ }
75
+ });
76
+ Object.defineProperty(exports, "DEFAULT_MIC", {
77
+ enumerable: true,
78
+ get: function() {
79
+ return DEFAULT_MIC;
80
+ }
81
+ });
82
+ Object.defineProperty(exports, "DEFAULT_SPEAKER", {
83
+ enumerable: true,
84
+ get: function() {
85
+ return DEFAULT_SPEAKER;
86
+ }
87
+ });
88
+ Object.defineProperty(exports, "decodeAudioPacket", {
89
+ enumerable: true,
90
+ get: function() {
91
+ return decodeAudioPacket;
92
+ }
93
+ });
94
+ Object.defineProperty(exports, "describeCallMediaFailure", {
95
+ enumerable: true,
96
+ get: function() {
97
+ return describeCallMediaFailure;
98
+ }
99
+ });
100
+ Object.defineProperty(exports, "encodeAudioPacket", {
101
+ enumerable: true,
102
+ get: function() {
103
+ return encodeAudioPacket;
104
+ }
105
+ });
106
+ Object.defineProperty(exports, "normalizeCallMedia", {
107
+ enumerable: true,
108
+ get: function() {
109
+ return normalizeCallMedia;
110
+ }
111
+ });
112
+
113
+ //# sourceMappingURL=calling-media--BLrFrPc.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calling-media--BLrFrPc.cjs","names":[],"sources":["../src/calling-wire.ts","../src/calling-media.ts"],"sourcesContent":["/** Neutral OpenWA audio framing. Format is negotiated in start/ready JSON. */\nexport const AUDIO_WIRE_VERSION = 1;\nexport const AUDIO_FRAME_HEADER_BYTES = 20;\nexport function encodeAudioPacket(audio: Uint8Array, sequence: number, timestampMs: number): Uint8Array {\n const packet = new Uint8Array(AUDIO_FRAME_HEADER_BYTES + audio.length);\n const view = new DataView(packet.buffer);\n view.setUint32(0, 0x4f574131); // OWA1\n view.setUint32(4, sequence); view.setFloat64(8, timestampMs); view.setUint32(16, audio.length);\n packet.set(audio, AUDIO_FRAME_HEADER_BYTES); return packet;\n}\nexport function decodeAudioPacket(packet: Uint8Array): { audio: Uint8Array; sequence: number; timestampMs: number } {\n if (packet.length < AUDIO_FRAME_HEADER_BYTES) throw new Error('Audio packet is missing its header.');\n const view = new DataView(packet.buffer, packet.byteOffset, packet.byteLength);\n const timestampMs = view.getFloat64(8);\n if (view.getUint32(0) !== 0x4f574131 || view.getUint32(16) !== packet.length - AUDIO_FRAME_HEADER_BYTES || !Number.isFinite(timestampMs)) throw new Error('Invalid OpenWA audio packet.');\n return { audio: packet.subarray(AUDIO_FRAME_HEADER_BYTES), sequence: view.getUint32(4), timestampMs };\n}\n","export { decodeAudioPacket } from './calling-wire';\n/** Device defaults are serializable so embedded and remote clients share the same API. */\nexport const DEFAULT_MIC = 'default:microphone' as const;\nexport const DEFAULT_SPEAKER = 'default:speaker' as const;\nexport const DEFAULT_CAM = 'default:camera' as const;\n\nexport interface RawAudioFormat {\n encoding: 'pcm16le' | 'float32le';\n sampleRate: number;\n channels: 1 | 2;\n}\n\nexport interface MediaDescriptor {\n kind: 'file' | 'url' | 'device' | 'remote';\n path?: string;\n url?: string;\n deviceId?: string;\n raw?: RawAudioFormat;\n headers?: Record<string, string>;\n overwrite?: boolean;\n loop?: boolean;\n /** Internal helper admission; applications use ordinary files/devices/streams. */\n remoteId?: string;\n}\n\nexport type AudioInput = string | MediaDescriptor | ReadableStream<Uint8Array> | Blob | null;\nexport type AudioOutput = string | MediaDescriptor | WritableStream<Uint8Array> | null;\nexport type VideoInput = string | MediaDescriptor | null;\nexport interface CallMediaOptions {\n microphone?: AudioInput;\n speaker?: AudioOutput;\n camera?: VideoInput;\n onMediaFailure?: 'end' | 'keep-open';\n}\nexport interface CallingOptions {\n defaults?: CallMediaOptions;\n preparationTimeoutMs?: number;\n}\n\n/** Keep the cause carried by Effect queue failures, whose own message can be empty. */\nexport function describeCallMediaFailure(error: unknown): string {\n let current = error;\n const seen = new Set<unknown>();\n while (current && typeof current === 'object' && !seen.has(current)) {\n seen.add(current);\n if ('_tag' in current && current._tag === 'TaskTimeoutError' && 'timeoutMs' in current) return `Call audio processing exceeded ${current.timeoutMs} ms.`;\n if ('_tag' in current && current._tag === 'QueueOverloadedError') return 'Call audio processing exceeded its bounded receive queue.';\n if ('cause' in current && current.cause !== undefined) { current = current.cause; continue; }\n if ('message' in current && typeof current.message === 'string' && current.message.trim()) return current.message;\n break;\n }\n return typeof current === 'string' && current.trim() ? current : 'Call media failed without reporting a cause.';\n}\n\nexport function normalizeCallMedia(\n microphone?: AudioInput | CallMediaOptions,\n speaker?: AudioOutput,\n camera?: VideoInput,\n): CallMediaOptions {\n if (microphone && typeof microphone === 'object' && !('kind' in microphone) && !('getReader' in microphone) && !('arrayBuffer' in microphone)) {\n return microphone as CallMediaOptions;\n }\n return { microphone: microphone as AudioInput | undefined, speaker, camera };\n}\n"],"mappings":";;AACA,MAAa,qBAAqB;AAClC,MAAa,2BAA2B;AACxC,SAAgB,kBAAkB,OAAmB,UAAkB,aAAiC;CACtG,MAAM,SAAS,IAAI,WAAA,KAAsC,MAAM,MAAM;CACrE,MAAM,OAAO,IAAI,SAAS,OAAO,MAAM;CACvC,KAAK,UAAU,GAAG,UAAU;CAC5B,KAAK,UAAU,GAAG,QAAQ;CAAG,KAAK,WAAW,GAAG,WAAW;CAAG,KAAK,UAAU,IAAI,MAAM,MAAM;CAC7F,OAAO,IAAI,OAAA,EAA+B;CAAG,OAAO;AACtD;AACA,SAAgB,kBAAkB,QAAkF;CAClH,IAAI,OAAO,SAAA,IAAmC,MAAM,IAAI,MAAM,qCAAqC;CACnG,MAAM,OAAO,IAAI,SAAS,OAAO,QAAQ,OAAO,YAAY,OAAO,UAAU;CAC7E,MAAM,cAAc,KAAK,WAAW,CAAC;CACrC,IAAI,KAAK,UAAU,CAAC,MAAM,cAAc,KAAK,UAAU,EAAE,MAAM,OAAO,SAAA,MAAqC,CAAC,OAAO,SAAS,WAAW,GAAG,MAAM,IAAI,MAAM,8BAA8B;CACxL,OAAO;EAAE,OAAO,OAAO,SAAA,EAAiC;EAAG,UAAU,KAAK,UAAU,CAAC;EAAG;CAAY;AACtG;;;;ACdA,MAAa,cAAc;AAC3B,MAAa,kBAAkB;AAC/B,MAAa,cAAc;;AAoC3B,SAAgB,yBAAyB,OAAwB;CAC/D,IAAI,UAAU;CACd,MAAM,uBAAO,IAAI,IAAa;CAC9B,OAAO,WAAW,OAAO,YAAY,YAAY,CAAC,KAAK,IAAI,OAAO,GAAG;EACnE,KAAK,IAAI,OAAO;EAChB,IAAI,UAAU,WAAW,QAAQ,SAAS,sBAAsB,eAAe,SAAS,OAAO,kCAAkC,QAAQ,UAAU;EACnJ,IAAI,UAAU,WAAW,QAAQ,SAAS,wBAAwB,OAAO;EACzE,IAAI,WAAW,WAAW,QAAQ,UAAU,KAAA,GAAW;GAAE,UAAU,QAAQ;GAAO;EAAU;EAC5F,IAAI,aAAa,WAAW,OAAO,QAAQ,YAAY,YAAY,QAAQ,QAAQ,KAAK,GAAG,OAAO,QAAQ;EAC1G;CACF;CACA,OAAO,OAAO,YAAY,YAAY,QAAQ,KAAK,IAAI,UAAU;AACnE;AAEA,SAAgB,mBACd,YACA,SACA,QACkB;CAClB,IAAI,cAAc,OAAO,eAAe,YAAY,EAAE,UAAU,eAAe,EAAE,eAAe,eAAe,EAAE,iBAAiB,aAChI,OAAO;CAET,OAAO;EAAc;EAAsC;EAAS;CAAO;AAC7E"}
@@ -0,0 +1,60 @@
1
+ //#region src/calling-wire.ts
2
+ /** Neutral OpenWA audio framing. Format is negotiated in start/ready JSON. */
3
+ const AUDIO_WIRE_VERSION = 1;
4
+ const AUDIO_FRAME_HEADER_BYTES = 20;
5
+ function encodeAudioPacket(audio, sequence, timestampMs) {
6
+ const packet = new Uint8Array(20 + audio.length);
7
+ const view = new DataView(packet.buffer);
8
+ view.setUint32(0, 1331118385);
9
+ view.setUint32(4, sequence);
10
+ view.setFloat64(8, timestampMs);
11
+ view.setUint32(16, audio.length);
12
+ packet.set(audio, 20);
13
+ return packet;
14
+ }
15
+ function decodeAudioPacket(packet) {
16
+ if (packet.length < 20) throw new Error("Audio packet is missing its header.");
17
+ const view = new DataView(packet.buffer, packet.byteOffset, packet.byteLength);
18
+ const timestampMs = view.getFloat64(8);
19
+ if (view.getUint32(0) !== 1331118385 || view.getUint32(16) !== packet.length - 20 || !Number.isFinite(timestampMs)) throw new Error("Invalid OpenWA audio packet.");
20
+ return {
21
+ audio: packet.subarray(20),
22
+ sequence: view.getUint32(4),
23
+ timestampMs
24
+ };
25
+ }
26
+ //#endregion
27
+ //#region src/calling-media.ts
28
+ /** Device defaults are serializable so embedded and remote clients share the same API. */
29
+ const DEFAULT_MIC = "default:microphone";
30
+ const DEFAULT_SPEAKER = "default:speaker";
31
+ const DEFAULT_CAM = "default:camera";
32
+ /** Keep the cause carried by Effect queue failures, whose own message can be empty. */
33
+ function describeCallMediaFailure(error) {
34
+ let current = error;
35
+ const seen = /* @__PURE__ */ new Set();
36
+ while (current && typeof current === "object" && !seen.has(current)) {
37
+ seen.add(current);
38
+ if ("_tag" in current && current._tag === "TaskTimeoutError" && "timeoutMs" in current) return `Call audio processing exceeded ${current.timeoutMs} ms.`;
39
+ if ("_tag" in current && current._tag === "QueueOverloadedError") return "Call audio processing exceeded its bounded receive queue.";
40
+ if ("cause" in current && current.cause !== void 0) {
41
+ current = current.cause;
42
+ continue;
43
+ }
44
+ if ("message" in current && typeof current.message === "string" && current.message.trim()) return current.message;
45
+ break;
46
+ }
47
+ return typeof current === "string" && current.trim() ? current : "Call media failed without reporting a cause.";
48
+ }
49
+ function normalizeCallMedia(microphone, speaker, camera) {
50
+ if (microphone && typeof microphone === "object" && !("kind" in microphone) && !("getReader" in microphone) && !("arrayBuffer" in microphone)) return microphone;
51
+ return {
52
+ microphone,
53
+ speaker,
54
+ camera
55
+ };
56
+ }
57
+ //#endregion
58
+ export { normalizeCallMedia as a, decodeAudioPacket as c, describeCallMediaFailure as i, encodeAudioPacket as l, DEFAULT_MIC as n, AUDIO_FRAME_HEADER_BYTES as o, DEFAULT_SPEAKER as r, AUDIO_WIRE_VERSION as s, DEFAULT_CAM as t };
59
+
60
+ //# sourceMappingURL=calling-media-BNTYvogE.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calling-media-BNTYvogE.mjs","names":[],"sources":["../src/calling-wire.ts","../src/calling-media.ts"],"sourcesContent":["/** Neutral OpenWA audio framing. Format is negotiated in start/ready JSON. */\nexport const AUDIO_WIRE_VERSION = 1;\nexport const AUDIO_FRAME_HEADER_BYTES = 20;\nexport function encodeAudioPacket(audio: Uint8Array, sequence: number, timestampMs: number): Uint8Array {\n const packet = new Uint8Array(AUDIO_FRAME_HEADER_BYTES + audio.length);\n const view = new DataView(packet.buffer);\n view.setUint32(0, 0x4f574131); // OWA1\n view.setUint32(4, sequence); view.setFloat64(8, timestampMs); view.setUint32(16, audio.length);\n packet.set(audio, AUDIO_FRAME_HEADER_BYTES); return packet;\n}\nexport function decodeAudioPacket(packet: Uint8Array): { audio: Uint8Array; sequence: number; timestampMs: number } {\n if (packet.length < AUDIO_FRAME_HEADER_BYTES) throw new Error('Audio packet is missing its header.');\n const view = new DataView(packet.buffer, packet.byteOffset, packet.byteLength);\n const timestampMs = view.getFloat64(8);\n if (view.getUint32(0) !== 0x4f574131 || view.getUint32(16) !== packet.length - AUDIO_FRAME_HEADER_BYTES || !Number.isFinite(timestampMs)) throw new Error('Invalid OpenWA audio packet.');\n return { audio: packet.subarray(AUDIO_FRAME_HEADER_BYTES), sequence: view.getUint32(4), timestampMs };\n}\n","export { decodeAudioPacket } from './calling-wire';\n/** Device defaults are serializable so embedded and remote clients share the same API. */\nexport const DEFAULT_MIC = 'default:microphone' as const;\nexport const DEFAULT_SPEAKER = 'default:speaker' as const;\nexport const DEFAULT_CAM = 'default:camera' as const;\n\nexport interface RawAudioFormat {\n encoding: 'pcm16le' | 'float32le';\n sampleRate: number;\n channels: 1 | 2;\n}\n\nexport interface MediaDescriptor {\n kind: 'file' | 'url' | 'device' | 'remote';\n path?: string;\n url?: string;\n deviceId?: string;\n raw?: RawAudioFormat;\n headers?: Record<string, string>;\n overwrite?: boolean;\n loop?: boolean;\n /** Internal helper admission; applications use ordinary files/devices/streams. */\n remoteId?: string;\n}\n\nexport type AudioInput = string | MediaDescriptor | ReadableStream<Uint8Array> | Blob | null;\nexport type AudioOutput = string | MediaDescriptor | WritableStream<Uint8Array> | null;\nexport type VideoInput = string | MediaDescriptor | null;\nexport interface CallMediaOptions {\n microphone?: AudioInput;\n speaker?: AudioOutput;\n camera?: VideoInput;\n onMediaFailure?: 'end' | 'keep-open';\n}\nexport interface CallingOptions {\n defaults?: CallMediaOptions;\n preparationTimeoutMs?: number;\n}\n\n/** Keep the cause carried by Effect queue failures, whose own message can be empty. */\nexport function describeCallMediaFailure(error: unknown): string {\n let current = error;\n const seen = new Set<unknown>();\n while (current && typeof current === 'object' && !seen.has(current)) {\n seen.add(current);\n if ('_tag' in current && current._tag === 'TaskTimeoutError' && 'timeoutMs' in current) return `Call audio processing exceeded ${current.timeoutMs} ms.`;\n if ('_tag' in current && current._tag === 'QueueOverloadedError') return 'Call audio processing exceeded its bounded receive queue.';\n if ('cause' in current && current.cause !== undefined) { current = current.cause; continue; }\n if ('message' in current && typeof current.message === 'string' && current.message.trim()) return current.message;\n break;\n }\n return typeof current === 'string' && current.trim() ? current : 'Call media failed without reporting a cause.';\n}\n\nexport function normalizeCallMedia(\n microphone?: AudioInput | CallMediaOptions,\n speaker?: AudioOutput,\n camera?: VideoInput,\n): CallMediaOptions {\n if (microphone && typeof microphone === 'object' && !('kind' in microphone) && !('getReader' in microphone) && !('arrayBuffer' in microphone)) {\n return microphone as CallMediaOptions;\n }\n return { microphone: microphone as AudioInput | undefined, speaker, camera };\n}\n"],"mappings":";;AACA,MAAa,qBAAqB;AAClC,MAAa,2BAA2B;AACxC,SAAgB,kBAAkB,OAAmB,UAAkB,aAAiC;CACtG,MAAM,SAAS,IAAI,WAAA,KAAsC,MAAM,MAAM;CACrE,MAAM,OAAO,IAAI,SAAS,OAAO,MAAM;CACvC,KAAK,UAAU,GAAG,UAAU;CAC5B,KAAK,UAAU,GAAG,QAAQ;CAAG,KAAK,WAAW,GAAG,WAAW;CAAG,KAAK,UAAU,IAAI,MAAM,MAAM;CAC7F,OAAO,IAAI,OAAA,EAA+B;CAAG,OAAO;AACtD;AACA,SAAgB,kBAAkB,QAAkF;CAClH,IAAI,OAAO,SAAA,IAAmC,MAAM,IAAI,MAAM,qCAAqC;CACnG,MAAM,OAAO,IAAI,SAAS,OAAO,QAAQ,OAAO,YAAY,OAAO,UAAU;CAC7E,MAAM,cAAc,KAAK,WAAW,CAAC;CACrC,IAAI,KAAK,UAAU,CAAC,MAAM,cAAc,KAAK,UAAU,EAAE,MAAM,OAAO,SAAA,MAAqC,CAAC,OAAO,SAAS,WAAW,GAAG,MAAM,IAAI,MAAM,8BAA8B;CACxL,OAAO;EAAE,OAAO,OAAO,SAAA,EAAiC;EAAG,UAAU,KAAK,UAAU,CAAC;EAAG;CAAY;AACtG;;;;ACdA,MAAa,cAAc;AAC3B,MAAa,kBAAkB;AAC/B,MAAa,cAAc;;AAoC3B,SAAgB,yBAAyB,OAAwB;CAC/D,IAAI,UAAU;CACd,MAAM,uBAAO,IAAI,IAAa;CAC9B,OAAO,WAAW,OAAO,YAAY,YAAY,CAAC,KAAK,IAAI,OAAO,GAAG;EACnE,KAAK,IAAI,OAAO;EAChB,IAAI,UAAU,WAAW,QAAQ,SAAS,sBAAsB,eAAe,SAAS,OAAO,kCAAkC,QAAQ,UAAU;EACnJ,IAAI,UAAU,WAAW,QAAQ,SAAS,wBAAwB,OAAO;EACzE,IAAI,WAAW,WAAW,QAAQ,UAAU,KAAA,GAAW;GAAE,UAAU,QAAQ;GAAO;EAAU;EAC5F,IAAI,aAAa,WAAW,OAAO,QAAQ,YAAY,YAAY,QAAQ,QAAQ,KAAK,GAAG,OAAO,QAAQ;EAC1G;CACF;CACA,OAAO,OAAO,YAAY,YAAY,QAAQ,KAAK,IAAI,UAAU;AACnE;AAEA,SAAgB,mBACd,YACA,SACA,QACkB;CAClB,IAAI,cAAc,OAAO,eAAe,YAAY,EAAE,UAAU,eAAe,EAAE,eAAe,eAAe,EAAE,iBAAiB,aAChI,OAAO;CAET,OAAO;EAAc;EAAsC;EAAS;CAAO;AAC7E"}
@@ -0,0 +1,48 @@
1
+ //#region src/calling-wire.d.ts
2
+ declare const AUDIO_WIRE_VERSION = 1;
3
+ declare const AUDIO_FRAME_HEADER_BYTES = 20;
4
+ declare function encodeAudioPacket(audio: Uint8Array, sequence: number, timestampMs: number): Uint8Array;
5
+ declare function decodeAudioPacket(packet: Uint8Array): {
6
+ audio: Uint8Array;
7
+ sequence: number;
8
+ timestampMs: number;
9
+ };
10
+ //#endregion
11
+ //#region src/calling-media.d.ts
12
+ declare const DEFAULT_MIC: 'default:microphone';
13
+ declare const DEFAULT_SPEAKER: 'default:speaker';
14
+ declare const DEFAULT_CAM: 'default:camera';
15
+ interface RawAudioFormat {
16
+ encoding: 'pcm16le' | 'float32le';
17
+ sampleRate: number;
18
+ channels: 1 | 2;
19
+ }
20
+ interface MediaDescriptor {
21
+ kind: 'file' | 'url' | 'device' | 'remote';
22
+ path?: string;
23
+ url?: string;
24
+ deviceId?: string;
25
+ raw?: RawAudioFormat;
26
+ headers?: Record<string, string>;
27
+ overwrite?: boolean;
28
+ loop?: boolean;
29
+ remoteId?: string;
30
+ }
31
+ type AudioInput = string | MediaDescriptor | ReadableStream<Uint8Array> | Blob | null;
32
+ type AudioOutput = string | MediaDescriptor | WritableStream<Uint8Array> | null;
33
+ type VideoInput = string | MediaDescriptor | null;
34
+ interface CallMediaOptions {
35
+ microphone?: AudioInput;
36
+ speaker?: AudioOutput;
37
+ camera?: VideoInput;
38
+ onMediaFailure?: 'end' | 'keep-open';
39
+ }
40
+ interface CallingOptions {
41
+ defaults?: CallMediaOptions;
42
+ preparationTimeoutMs?: number;
43
+ }
44
+ declare function describeCallMediaFailure(error: unknown): string;
45
+ declare function normalizeCallMedia(microphone?: AudioInput | CallMediaOptions, speaker?: AudioOutput, camera?: VideoInput): CallMediaOptions;
46
+ //#endregion
47
+ export { DEFAULT_CAM as a, MediaDescriptor as c, describeCallMediaFailure as d, normalizeCallMedia as f, encodeAudioPacket as g, decodeAudioPacket as h, CallingOptions as i, RawAudioFormat as l, AUDIO_WIRE_VERSION as m, AudioOutput as n, DEFAULT_MIC as o, AUDIO_FRAME_HEADER_BYTES as p, CallMediaOptions as r, DEFAULT_SPEAKER as s, AudioInput as t, VideoInput as u };
48
+ //# sourceMappingURL=calling-media-CeGgSzhw.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calling-media-CeGgSzhw.d.cts","names":[],"sources":["../src/calling-wire.ts","../src/calling-media.ts"],"mappings":";cACa;cACA;iBACG,kBAAkB,OAAO,YAAY,kBAAkB,sBAAsB;iBAO7E,kBAAkB,QAAQ;EAAe,OAAO;EAAY;EAAkB;;;;cCRjF;cACA;cACA;UAEI;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA,MAAM;EACN,UAAU;EACV;EACA;EAEA;;KAGU,sBAAsB,kBAAkB,eAAe,cAAc;KACrE,uBAAuB,kBAAkB,eAAe;KACxD,sBAAsB;UACjB;EACf,aAAa;EACb,UAAU;EACV,SAAS;EACT;;UAEe;EACf,WAAW;EACX;;iBAIc,yBAAyB;iBAczB,mBACd,aAAa,aAAa,kBAC1B,UAAU,aACV,SAAS,aACR"}
@@ -0,0 +1,48 @@
1
+ //#region src/calling-wire.d.ts
2
+ declare const AUDIO_WIRE_VERSION = 1;
3
+ declare const AUDIO_FRAME_HEADER_BYTES = 20;
4
+ declare function encodeAudioPacket(audio: Uint8Array, sequence: number, timestampMs: number): Uint8Array;
5
+ declare function decodeAudioPacket(packet: Uint8Array): {
6
+ audio: Uint8Array;
7
+ sequence: number;
8
+ timestampMs: number;
9
+ };
10
+ //#endregion
11
+ //#region src/calling-media.d.ts
12
+ declare const DEFAULT_MIC: 'default:microphone';
13
+ declare const DEFAULT_SPEAKER: 'default:speaker';
14
+ declare const DEFAULT_CAM: 'default:camera';
15
+ interface RawAudioFormat {
16
+ encoding: 'pcm16le' | 'float32le';
17
+ sampleRate: number;
18
+ channels: 1 | 2;
19
+ }
20
+ interface MediaDescriptor {
21
+ kind: 'file' | 'url' | 'device' | 'remote';
22
+ path?: string;
23
+ url?: string;
24
+ deviceId?: string;
25
+ raw?: RawAudioFormat;
26
+ headers?: Record<string, string>;
27
+ overwrite?: boolean;
28
+ loop?: boolean;
29
+ remoteId?: string;
30
+ }
31
+ type AudioInput = string | MediaDescriptor | ReadableStream<Uint8Array> | Blob | null;
32
+ type AudioOutput = string | MediaDescriptor | WritableStream<Uint8Array> | null;
33
+ type VideoInput = string | MediaDescriptor | null;
34
+ interface CallMediaOptions {
35
+ microphone?: AudioInput;
36
+ speaker?: AudioOutput;
37
+ camera?: VideoInput;
38
+ onMediaFailure?: 'end' | 'keep-open';
39
+ }
40
+ interface CallingOptions {
41
+ defaults?: CallMediaOptions;
42
+ preparationTimeoutMs?: number;
43
+ }
44
+ declare function describeCallMediaFailure(error: unknown): string;
45
+ declare function normalizeCallMedia(microphone?: AudioInput | CallMediaOptions, speaker?: AudioOutput, camera?: VideoInput): CallMediaOptions;
46
+ //#endregion
47
+ export { DEFAULT_CAM as a, MediaDescriptor as c, describeCallMediaFailure as d, normalizeCallMedia as f, encodeAudioPacket as g, decodeAudioPacket as h, CallingOptions as i, RawAudioFormat as l, AUDIO_WIRE_VERSION as m, AudioOutput as n, DEFAULT_MIC as o, AUDIO_FRAME_HEADER_BYTES as p, CallMediaOptions as r, DEFAULT_SPEAKER as s, AudioInput as t, VideoInput as u };
48
+ //# sourceMappingURL=calling-media-CeGgSzhw.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calling-media-CeGgSzhw.d.mts","names":[],"sources":["../src/calling-wire.ts","../src/calling-media.ts"],"mappings":";cACa;cACA;iBACG,kBAAkB,OAAO,YAAY,kBAAkB,sBAAsB;iBAO7E,kBAAkB,QAAQ;EAAe,OAAO;EAAY;EAAkB;;;;cCRjF;cACA;cACA;UAEI;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA,MAAM;EACN,UAAU;EACV;EACA;EAEA;;KAGU,sBAAsB,kBAAkB,eAAe,cAAc;KACrE,uBAAuB,kBAAkB,eAAe;KACxD,sBAAsB;UACjB;EACf,aAAa;EACb,UAAU;EACV,SAAS;EACT;;UAEe;EACf,WAAW;EACX;;iBAIc,yBAAyB;iBAczB,mBACd,aAAa,aAAa,kBAC1B,UAAU,aACV,SAAS,aACR"}
@@ -0,0 +1,8 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_calling_media = require("./calling-media--BLrFrPc.cjs");
3
+ exports.DEFAULT_CAM = require_calling_media.DEFAULT_CAM;
4
+ exports.DEFAULT_MIC = require_calling_media.DEFAULT_MIC;
5
+ exports.DEFAULT_SPEAKER = require_calling_media.DEFAULT_SPEAKER;
6
+ exports.decodeAudioPacket = require_calling_media.decodeAudioPacket;
7
+ exports.describeCallMediaFailure = require_calling_media.describeCallMediaFailure;
8
+ exports.normalizeCallMedia = require_calling_media.normalizeCallMedia;
@@ -0,0 +1,2 @@
1
+ import { a as DEFAULT_CAM, c as MediaDescriptor, d as describeCallMediaFailure, f as normalizeCallMedia, h as decodeAudioPacket, i as CallingOptions, l as RawAudioFormat, n as AudioOutput, o as DEFAULT_MIC, r as CallMediaOptions, s as DEFAULT_SPEAKER, t as AudioInput, u as VideoInput } from "./calling-media-CeGgSzhw.cjs";
2
+ export { AudioInput, AudioOutput, CallMediaOptions, CallingOptions, DEFAULT_CAM, DEFAULT_MIC, DEFAULT_SPEAKER, MediaDescriptor, RawAudioFormat, VideoInput, decodeAudioPacket, describeCallMediaFailure, normalizeCallMedia };
@@ -0,0 +1,2 @@
1
+ import { a as DEFAULT_CAM, c as MediaDescriptor, d as describeCallMediaFailure, f as normalizeCallMedia, h as decodeAudioPacket, i as CallingOptions, l as RawAudioFormat, n as AudioOutput, o as DEFAULT_MIC, r as CallMediaOptions, s as DEFAULT_SPEAKER, t as AudioInput, u as VideoInput } from "./calling-media-CeGgSzhw.mjs";
2
+ export { AudioInput, AudioOutput, CallMediaOptions, CallingOptions, DEFAULT_CAM, DEFAULT_MIC, DEFAULT_SPEAKER, MediaDescriptor, RawAudioFormat, VideoInput, decodeAudioPacket, describeCallMediaFailure, normalizeCallMedia };
@@ -0,0 +1,2 @@
1
+ import { a as normalizeCallMedia, c as decodeAudioPacket, i as describeCallMediaFailure, n as DEFAULT_MIC, r as DEFAULT_SPEAKER, t as DEFAULT_CAM } from "./calling-media-BNTYvogE.mjs";
2
+ export { DEFAULT_CAM, DEFAULT_MIC, DEFAULT_SPEAKER, decodeAudioPacket, describeCallMediaFailure, normalizeCallMedia };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_methods = require("../methods-BGmdzjd3.cjs");
2
+ const require_methods = require("../methods-DpDzgsbe.cjs");
3
3
  const require_implementor = require("../implementor.cjs");
4
4
  //#region src/generated/AliasMap.ts
5
5
  /**
@@ -7,6 +7,8 @@ const require_implementor = require("../implementor.cjs");
7
7
  * Do not edit this file manually.
8
8
  */
9
9
  const clientMethodAliasMap = {
10
+ "messages.sendSticker": "sendSticker",
11
+ "messages.sendAlbum": "sendAlbum",
10
12
  "messages.sendText": "sendText",
11
13
  "messages.sendTextWithMentions": "sendTextWithMentions",
12
14
  "messages.sendReplyWithMentions": "sendReplyWithMentions",
@@ -29,6 +31,10 @@ const clientMethodAliasMap = {
29
31
  "sendList": "sendListMessage",
30
32
  "messages.sendList": "sendListMessage",
31
33
  "messages.sendPoll": "sendPoll",
34
+ "messages.voteOnPoll": "voteOnPoll",
35
+ "messages.getPollResults": "getPollResults",
36
+ "messages.pin": "pinMessage",
37
+ "messages.unpin": "unpinMessage",
32
38
  "messages.sendBanner": "sendBanner",
33
39
  "sendYoutubeLink": "sendYouTubeLink",
34
40
  "messages.sendYouTubeLink": "sendYouTubeLink",
@@ -44,6 +50,7 @@ const clientMethodAliasMap = {
44
50
  "getMessage": "getMessageById",
45
51
  "messages.get": "getMessageById",
46
52
  "messages.getById": "getMessageById",
53
+ "messages.getAlbum": "getAlbumMessages",
47
54
  "listMessages": "getAllMessages",
48
55
  "messages.getAll": "getAllMessages",
49
56
  "messages.all": "getAllMessages",
@@ -58,6 +65,7 @@ const clientMethodAliasMap = {
58
65
  "messages.getGptArray": "getMessagesForLLM",
59
66
  "messages.star": "starMessage",
60
67
  "messages.unstar": "unstarMessage",
68
+ "messages.edit": "editMessage",
61
69
  "messages.react": "react",
62
70
  "messages.sendSeen": "sendSeen",
63
71
  "loadOlderMessages": "loadEarlierMessages",
@@ -89,6 +97,8 @@ const clientMethodAliasMap = {
89
97
  "chats.markAsUnread": "markAsUnread",
90
98
  "chats.setEphemeral": "setChatEphemeral",
91
99
  "chats.isOnline": "isChatOnline",
100
+ "contacts.requestPhoneNumber": "requestPhoneNumber",
101
+ "contacts.sharePhoneNumber": "sharePhoneNumber",
92
102
  "listContacts": "getAllContacts",
93
103
  "contacts.getAll": "getAllContacts",
94
104
  "contacts.all": "getAllContacts",
@@ -190,6 +200,7 @@ const clientMethodAliasMap = {
190
200
  "session.getIsPlugged": "isPlugged",
191
201
  "session.getFeatures": "getFeatures",
192
202
  "session.getLicenseType": "getLicenseType",
203
+ "session.getLicenseFeatures": "getLicenseFeatures",
193
204
  "getGeneratedUserAgent": "getUserAgent",
194
205
  "session.getUserAgent": "getUserAgent",
195
206
  "session.getGeneratedUserAgent": "getUserAgent",
@@ -215,7 +226,25 @@ const clientMethodAliasMap = {
215
226
  "media.decrypt": "decryptMedia",
216
227
  "media.download": "downloadMedia",
217
228
  "messages.sendInteractive": "sendInteractive",
218
- "messages.sendRaw": "sendRawMessage"
229
+ "messages.sendRaw": "sendRawMessage",
230
+ "calls.getCallCapabilities": "getCallCapabilities",
231
+ "calls.getActiveCall": "getActiveCall",
232
+ "calls.acceptCall": "acceptCall",
233
+ "calls.startCall": "startCall",
234
+ "calls.rejectCall": "rejectCall",
235
+ "calls.endCall": "endCall",
236
+ "calls.muteCall": "muteCall",
237
+ "calls.clearCallAudio": "clearCallAudio",
238
+ "calls.setCallMedia": "setCallMedia",
239
+ "calls.observeCallAudio": "observeCallAudio",
240
+ "calls.stopCallAudioObserver": "stopCallAudioObserver",
241
+ "events.sendEvent": "sendEvent",
242
+ "events.getEvent": "getEvent",
243
+ "events.get": "getEvents",
244
+ "events.getEventResponses": "getEventResponses",
245
+ "events.editEvent": "editEvent",
246
+ "events.cancelEvent": "cancelEvent",
247
+ "events.respondToEvent": "respondToEvent"
219
248
  };
220
249
  //#endregion
221
250
  //#region src/generated/BaseClient.ts
@@ -225,6 +254,8 @@ const clientMethodAliasMap = {
225
254
  */
226
255
  var BaseClient = class {
227
256
  constructor() {
257
+ this.sendSticker = require_implementor.implementMethod(require_methods.sendSticker);
258
+ this.sendAlbum = require_implementor.implementMethod(require_methods.sendAlbum);
228
259
  this.sendText = require_implementor.implementMethod(require_methods.sendText);
229
260
  this.sendTextWithMentions = require_implementor.implementMethod(require_methods.sendTextWithMentions);
230
261
  this.sendReplyWithMentions = require_implementor.implementMethod(require_methods.sendReplyWithMentions);
@@ -242,6 +273,10 @@ var BaseClient = class {
242
273
  this.sendAdvancedButtons = require_implementor.implementMethod(require_methods.sendAdvancedButtons);
243
274
  this.sendListMessage = require_implementor.implementMethod(require_methods.sendListMessage);
244
275
  this.sendPoll = require_implementor.implementMethod(require_methods.sendPoll);
276
+ this.voteOnPoll = require_implementor.implementMethod(require_methods.voteOnPoll);
277
+ this.getPollResults = require_implementor.implementMethod(require_methods.getPollResults);
278
+ this.pinMessage = require_implementor.implementMethod(require_methods.pinMessage);
279
+ this.unpinMessage = require_implementor.implementMethod(require_methods.unpinMessage);
245
280
  this.sendBanner = require_implementor.implementMethod(require_methods.sendBanner);
246
281
  this.sendYouTubeLink = require_implementor.implementMethod(require_methods.sendYouTubeLink);
247
282
  this.sendLinkWithAutoPreview = require_implementor.implementMethod(require_methods.sendLinkWithAutoPreview);
@@ -249,6 +284,7 @@ var BaseClient = class {
249
284
  this.forwardMessages = require_implementor.implementMethod(require_methods.forwardMessages);
250
285
  this.deleteMessage = require_implementor.implementMethod(require_methods.deleteMessage);
251
286
  this.getMessageById = require_implementor.implementMethod(require_methods.getMessageById);
287
+ this.getAlbumMessages = require_implementor.implementMethod(require_methods.getAlbumMessages);
252
288
  this.getAllMessages = require_implementor.implementMethod(require_methods.getAllMessages);
253
289
  this.getMyLastMessage = require_implementor.implementMethod(require_methods.getMyLastMessage);
254
290
  this.getStarredMessages = require_implementor.implementMethod(require_methods.getStarredMessages);
@@ -258,6 +294,7 @@ var BaseClient = class {
258
294
  this.getMessagesForLLM = require_implementor.implementMethod(require_methods.getMessagesForLLM);
259
295
  this.starMessage = require_implementor.implementMethod(require_methods.starMessage);
260
296
  this.unstarMessage = require_implementor.implementMethod(require_methods.unstarMessage);
297
+ this.editMessage = require_implementor.implementMethod(require_methods.editMessage);
261
298
  this.react = require_implementor.implementMethod(require_methods.react);
262
299
  this.sendSeen = require_implementor.implementMethod(require_methods.sendSeen);
263
300
  this.loadEarlierMessages = require_implementor.implementMethod(require_methods.loadEarlierMessages);
@@ -278,6 +315,8 @@ var BaseClient = class {
278
315
  this.markAsUnread = require_implementor.implementMethod(require_methods.markAsUnread);
279
316
  this.setChatEphemeral = require_implementor.implementMethod(require_methods.setChatEphemeral);
280
317
  this.isChatOnline = require_implementor.implementMethod(require_methods.isChatOnline);
318
+ this.requestPhoneNumber = require_implementor.implementMethod(require_methods.requestPhoneNumber);
319
+ this.sharePhoneNumber = require_implementor.implementMethod(require_methods.sharePhoneNumber);
281
320
  this.getAllContacts = require_implementor.implementMethod(require_methods.getAllContacts);
282
321
  this.getContact = require_implementor.implementMethod(require_methods.getContact);
283
322
  this.getCommonGroups = require_implementor.implementMethod(require_methods.getCommonGroups);
@@ -338,6 +377,7 @@ var BaseClient = class {
338
377
  this.isPlugged = require_implementor.implementMethod(require_methods.isPlugged);
339
378
  this.getFeatures = require_implementor.implementMethod(require_methods.getFeatures);
340
379
  this.getLicenseType = require_implementor.implementMethod(require_methods.getLicenseType);
380
+ this.getLicenseFeatures = require_implementor.implementMethod(require_methods.getLicenseFeatures);
341
381
  this.getUserAgent = require_implementor.implementMethod(require_methods.getUserAgent);
342
382
  this.getProcessStats = require_implementor.implementMethod(require_methods.getProcessStats);
343
383
  this.getLoadedMessageCount = require_implementor.implementMethod(require_methods.getLoadedMessageCount);
@@ -350,6 +390,24 @@ var BaseClient = class {
350
390
  this.downloadMedia = require_implementor.implementMethod(require_methods.downloadMedia);
351
391
  this.sendInteractive = require_implementor.implementMethod(require_methods.sendInteractive);
352
392
  this.sendRawMessage = require_implementor.implementMethod(require_methods.sendRawMessage);
393
+ this.getCallCapabilities = require_implementor.implementMethod(require_methods.getCallCapabilities);
394
+ this.getActiveCall = require_implementor.implementMethod(require_methods.getActiveCall);
395
+ this.acceptCall = require_implementor.implementMethod(require_methods.acceptCall);
396
+ this.startCall = require_implementor.implementMethod(require_methods.startCall);
397
+ this.rejectCall = require_implementor.implementMethod(require_methods.rejectCall);
398
+ this.endCall = require_implementor.implementMethod(require_methods.endCall);
399
+ this.muteCall = require_implementor.implementMethod(require_methods.muteCall);
400
+ this.clearCallAudio = require_implementor.implementMethod(require_methods.clearCallAudio);
401
+ this.setCallMedia = require_implementor.implementMethod(require_methods.setCallMedia);
402
+ this.observeCallAudio = require_implementor.implementMethod(require_methods.observeCallAudio);
403
+ this.stopCallAudioObserver = require_implementor.implementMethod(require_methods.stopCallAudioObserver);
404
+ this.sendEvent = require_implementor.implementMethod(require_methods.sendEvent);
405
+ this.getEvent = require_implementor.implementMethod(require_methods.getEvent);
406
+ this.getEvents = require_implementor.implementMethod(require_methods.getEvents);
407
+ this.getEventResponses = require_implementor.implementMethod(require_methods.getEventResponses);
408
+ this.editEvent = require_implementor.implementMethod(require_methods.editEvent);
409
+ this.cancelEvent = require_implementor.implementMethod(require_methods.cancelEvent);
410
+ this.respondToEvent = require_implementor.implementMethod(require_methods.respondToEvent);
353
411
  this.sendVoiceNote = this.sendPtt;
354
412
  this.sendContacts = this.sendMultipleContacts;
355
413
  this.sendList = this.sendListMessage;
@@ -408,6 +466,19 @@ var BaseNamespacedClient = class extends BaseClient {
408
466
  getProfile: this.getBusinessProfile,
409
467
  getProfilesProducts: this.getBusinessProducts
410
468
  };
469
+ this.calls = {
470
+ acceptCall: this.acceptCall,
471
+ clearCallAudio: this.clearCallAudio,
472
+ endCall: this.endCall,
473
+ getActiveCall: this.getActiveCall,
474
+ getCallCapabilities: this.getCallCapabilities,
475
+ muteCall: this.muteCall,
476
+ observeCallAudio: this.observeCallAudio,
477
+ rejectCall: this.rejectCall,
478
+ setCallMedia: this.setCallMedia,
479
+ startCall: this.startCall,
480
+ stopCallAudioObserver: this.stopCallAudioObserver
481
+ };
411
482
  this.chatIds = {
412
483
  all: this.getAllChatIds,
413
484
  getAll: this.getAllChatIds,
@@ -459,8 +530,19 @@ var BaseNamespacedClient = class extends BaseClient {
459
530
  getProfilePicture: this.getProfilePicture,
460
531
  getReadReceipts: this.checkReadReceipts,
461
532
  list: this.getAllContacts,
533
+ requestPhoneNumber: this.requestPhoneNumber,
534
+ sharePhoneNumber: this.sharePhoneNumber,
462
535
  unblock: this.unblockContact
463
536
  };
537
+ this.events = {
538
+ cancelEvent: this.cancelEvent,
539
+ editEvent: this.editEvent,
540
+ get: this.getEvents,
541
+ getEvent: this.getEvent,
542
+ getEventResponses: this.getEventResponses,
543
+ respondToEvent: this.respondToEvent,
544
+ sendEvent: this.sendEvent
545
+ };
464
546
  this.groups = {
465
547
  addParticipant: this.addParticipant,
466
548
  all: this.getAllGroups,
@@ -507,22 +589,27 @@ var BaseNamespacedClient = class extends BaseClient {
507
589
  this.messages = {
508
590
  all: this.getAllMessages,
509
591
  delete: this.deleteMessage,
592
+ edit: this.editMessage,
510
593
  forward: this.forwardMessages,
511
594
  get: this.getMessageById,
595
+ getAlbum: this.getAlbumMessages,
512
596
  getAll: this.getAllMessages,
513
597
  getById: this.getMessageById,
514
598
  getForLLM: this.getMessagesForLLM,
515
599
  getGptArray: this.getMessagesForLLM,
516
600
  getInfo: this.getMessageInfo,
517
601
  getMyLast: this.getMyLastMessage,
602
+ getPollResults: this.getPollResults,
518
603
  getStarred: this.getStarredMessages,
519
604
  getUnsent: this.getUnsentMessages,
520
605
  getVCards: this.getVCards,
521
606
  list: this.getAllMessages,
522
607
  loadEarlier: this.loadEarlierMessages,
523
608
  loadOlder: this.loadEarlierMessages,
609
+ pin: this.pinMessage,
524
610
  react: this.react,
525
611
  sendAdvancedButtons: this.sendAdvancedButtons,
612
+ sendAlbum: this.sendAlbum,
526
613
  sendAudio: this.sendAudio,
527
614
  sendBanner: this.sendBanner,
528
615
  sendButtons: this.sendButtons,
@@ -544,6 +631,7 @@ var BaseNamespacedClient = class extends BaseClient {
544
631
  sendRaw: this.sendRawMessage,
545
632
  sendReplyWithMentions: this.sendReplyWithMentions,
546
633
  sendSeen: this.sendSeen,
634
+ sendSticker: this.sendSticker,
547
635
  sendText: this.sendText,
548
636
  sendTextWithMentions: this.sendTextWithMentions,
549
637
  sendVCard: this.sendVCard,
@@ -553,7 +641,9 @@ var BaseNamespacedClient = class extends BaseClient {
553
641
  sendYoutubeLink: this.sendYouTubeLink,
554
642
  sendYouTubeLink: this.sendYouTubeLink,
555
643
  star: this.starMessage,
556
- unstar: this.unstarMessage
644
+ unpin: this.unpinMessage,
645
+ unstar: this.unstarMessage,
646
+ voteOnPoll: this.voteOnPoll
557
647
  };
558
648
  this.mystatus = { getStatus: this.getStatus };
559
649
  this.session = {
@@ -564,6 +654,7 @@ var BaseNamespacedClient = class extends BaseClient {
564
654
  getGeneratedUserAgent: this.getUserAgent,
565
655
  getHostNumber: this.getHostNumber,
566
656
  getIsPlugged: this.isPlugged,
657
+ getLicenseFeatures: this.getLicenseFeatures,
567
658
  getLicenseType: this.getLicenseType,
568
659
  getLoadedMessageCount: this.getLoadedMessageCount,
569
660
  getMe: this.getMe,