@blurose/baileys 1.1.18 → 1.1.19
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.
- package/WAProto/index.d.ts +4267 -1793
- package/WAProto/index.js +30397 -24012
- package/lib/Utils/a2ui.d.ts +68 -54
- package/lib/Utils/a2ui.d.ts.map +1 -1
- package/lib/Utils/a2ui.js +158 -42
- package/lib/Utils/a2ui.js.map +1 -1
- package/lib/Utils/history.d.ts +2 -2
- package/package.json +1 -1
package/lib/Utils/a2ui.d.ts
CHANGED
|
@@ -1,60 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Do not remove this watermark.
|
|
3
|
+
*
|
|
4
|
+
* Runtime:
|
|
5
|
+
* - Baileys: @whiskeysockets/baileys (latest)
|
|
6
|
+
*
|
|
7
|
+
* Created by FgsiDev
|
|
8
|
+
* Contributors: Nixel, ~ nebulous, itsliaaa
|
|
9
|
+
*
|
|
10
|
+
* WhatsApp: https://chat.whatsapp.com/CozQeroCVV36SfbtxKfuiM
|
|
11
|
+
* Channel: https://whatsapp.com/channel/0029VapkSr45q08hPPPVqy26
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) 2026 Fgsi
|
|
14
|
+
*
|
|
15
|
+
* Permission is granted to use and modify this library
|
|
16
|
+
* for personal or commercial projects.
|
|
17
|
+
*
|
|
18
|
+
* Reuploading, reselling, relicensing, or redistributing
|
|
19
|
+
* this library as a standalone product is prohibited.
|
|
20
|
+
*
|
|
21
|
+
* Do not claim this project as your own original work.
|
|
22
|
+
*/
|
|
23
|
+
declare class A2UI {
|
|
24
|
+
#private;
|
|
13
25
|
constructor({ catalogId, version }?: {
|
|
14
26
|
catalogId?: string | undefined;
|
|
15
27
|
version?: string | undefined;
|
|
16
28
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}):
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}):
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
id?: string;
|
|
52
|
-
}): string;
|
|
53
|
-
root(children: string[]): this;
|
|
54
|
-
build({ uuid, surfaceId, type, wrapped }?: A2UIBuildOptions): {
|
|
55
|
-
uuid: string;
|
|
56
|
-
data: string;
|
|
57
|
-
type: string;
|
|
58
|
-
};
|
|
29
|
+
text(text: any, { id, variant }?: {
|
|
30
|
+
variant?: string | undefined;
|
|
31
|
+
}): any;
|
|
32
|
+
image(url: any, { id, variant, fit }?: {
|
|
33
|
+
fit?: string | undefined;
|
|
34
|
+
}): any;
|
|
35
|
+
video(url: any, { id }?: {}): any;
|
|
36
|
+
checkbox(label: any, { id, value }?: {
|
|
37
|
+
value?: boolean | undefined;
|
|
38
|
+
}): any;
|
|
39
|
+
textField(label: any, { id, variant }?: {
|
|
40
|
+
variant?: string | undefined;
|
|
41
|
+
}): any;
|
|
42
|
+
button(childId: any, { id, variant, action }?: {
|
|
43
|
+
variant?: string | undefined;
|
|
44
|
+
}): any;
|
|
45
|
+
card(childId: any, { id }?: {}): any;
|
|
46
|
+
column(children?: never[], { id, justify, align }?: {}): any;
|
|
47
|
+
row(children?: never[], { id }?: {}): any;
|
|
48
|
+
divider({ id }?: {}): any;
|
|
49
|
+
choicePicker(label: any, options: any, { id, variant, value, displayStyle, filterable }?: {
|
|
50
|
+
variant?: string | undefined;
|
|
51
|
+
displayStyle?: string | undefined;
|
|
52
|
+
filterable?: boolean | undefined;
|
|
53
|
+
}): any;
|
|
54
|
+
root(children: any): this;
|
|
55
|
+
listCard({ title, items, fallbackText, uuid }?: {
|
|
56
|
+
uuid?: `${string}-${string}-${string}-${string}-${string}` | undefined;
|
|
57
|
+
}): this;
|
|
58
|
+
build({ uuid, surfaceId, type, wrapped }?: {
|
|
59
|
+
uuid?: `${string}-${string}-${string}-${string}-${string}` | undefined;
|
|
60
|
+
type?: string | undefined;
|
|
61
|
+
wrapped?: boolean | undefined;
|
|
62
|
+
}): any;
|
|
59
63
|
}
|
|
64
|
+
declare function sendA2UIWidget(client: any, jid: any, { a2ui, bodyText, footer, buttons, contextInfo, expiration, quoted, type, wrapped, singleScreen }?: {
|
|
65
|
+
bodyText?: string | undefined;
|
|
66
|
+
footer?: string | undefined;
|
|
67
|
+
buttons?: never[] | undefined;
|
|
68
|
+
contextInfo?: {} | undefined;
|
|
69
|
+
type?: string | undefined;
|
|
70
|
+
wrapped?: boolean | undefined;
|
|
71
|
+
singleScreen?: boolean | undefined;
|
|
72
|
+
}): Promise<any>;
|
|
73
|
+
export { A2UI, sendA2UIWidget };
|
|
60
74
|
//# sourceMappingURL=a2ui.d.ts.map
|
package/lib/Utils/a2ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a2ui.d.ts","sourceRoot":"","sources":["../../src/Utils/a2ui.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"a2ui.d.ts","sourceRoot":"","sources":["../../src/Utils/a2ui.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAOH,cAAM,IAAI;;gBACI,EAAE,SAA6E,EAAE,OAAgB,EAAE;;;KAAK;IAgBpH,IAAI,CAAC,IAAI,KAAA,EAAE,EAAE,EAAE,EAAE,OAAgB,EAAE;;KAAK;IAGxC,KAAK,CAA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/Utils/a2ui.js
CHANGED
|
@@ -1,72 +1,132 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* Do not remove this watermark.
|
|
4
|
+
*
|
|
5
|
+
* Runtime:
|
|
6
|
+
* - Baileys: @whiskeysockets/baileys (latest)
|
|
7
|
+
*
|
|
8
|
+
* Created by FgsiDev
|
|
9
|
+
* Contributors: Nixel, ~ nebulous, itsliaaa
|
|
10
|
+
*
|
|
11
|
+
* WhatsApp: https://chat.whatsapp.com/CozQeroCVV36SfbtxKfuiM
|
|
12
|
+
* Channel: https://whatsapp.com/channel/0029VapkSr45q08hPPPVqy26
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) 2026 Fgsi
|
|
15
|
+
*
|
|
16
|
+
* Permission is granted to use and modify this library
|
|
17
|
+
* for personal or commercial projects.
|
|
18
|
+
*
|
|
19
|
+
* Reuploading, reselling, relicensing, or redistributing
|
|
20
|
+
* this library as a standalone product is prohibited.
|
|
21
|
+
*
|
|
22
|
+
* Do not claim this project as your own original work.
|
|
23
|
+
*/
|
|
24
|
+
"use strict";
|
|
25
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
26
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
27
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
28
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
29
|
+
};
|
|
30
|
+
var _A2UI_instances, _A2UI_nextId, _A2UI_reg;
|
|
31
|
+
import crypto from "crypto";
|
|
32
|
+
import { generateWAMessageFromContent } from "baileys";
|
|
33
|
+
class A2UI {
|
|
34
|
+
constructor({ catalogId = "https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json", version = "v0.9" } = {}) {
|
|
35
|
+
_A2UI_instances.add(this);
|
|
4
36
|
this._version = version;
|
|
5
37
|
this._catalogId = catalogId;
|
|
6
38
|
this._components = new Map();
|
|
7
39
|
this._counter = 0;
|
|
8
40
|
this._rootChildren = [];
|
|
9
41
|
}
|
|
10
|
-
|
|
11
|
-
return
|
|
42
|
+
text(text, { id, variant = "body" } = {}) {
|
|
43
|
+
return __classPrivateFieldGet(this, _A2UI_instances, "m", _A2UI_reg).call(this, id, "Text", { text, variant });
|
|
12
44
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (this._components.has(id)) {
|
|
16
|
-
throw new Error(`Component id "${id}" already used`);
|
|
17
|
-
}
|
|
18
|
-
this._components.set(id, { id, component, ...extra });
|
|
19
|
-
return id;
|
|
20
|
-
}
|
|
21
|
-
text(text, { id, variant = 'body' } = {}) {
|
|
22
|
-
return this._reg(id, 'Text', { text, variant });
|
|
23
|
-
}
|
|
24
|
-
image(url, { id, variant, fit = 'cover' } = {}) {
|
|
25
|
-
return this._reg(id, 'Image', { url, ...(variant ? { variant } : {}), fit });
|
|
45
|
+
image(url, { id, variant, fit = "cover" } = {}) {
|
|
46
|
+
return __classPrivateFieldGet(this, _A2UI_instances, "m", _A2UI_reg).call(this, id, "Image", { url, ...(variant ? { variant } : {}), fit });
|
|
26
47
|
}
|
|
27
48
|
video(url, { id } = {}) {
|
|
28
|
-
return this.
|
|
49
|
+
return __classPrivateFieldGet(this, _A2UI_instances, "m", _A2UI_reg).call(this, id, "Video", { url });
|
|
29
50
|
}
|
|
30
51
|
checkbox(label, { id, value = false } = {}) {
|
|
31
|
-
return this.
|
|
52
|
+
return __classPrivateFieldGet(this, _A2UI_instances, "m", _A2UI_reg).call(this, id, "CheckBox", { label, value });
|
|
32
53
|
}
|
|
33
|
-
textField(label, { id, variant =
|
|
34
|
-
return this.
|
|
54
|
+
textField(label, { id, variant = "text" } = {}) {
|
|
55
|
+
return __classPrivateFieldGet(this, _A2UI_instances, "m", _A2UI_reg).call(this, id, "TextField", { label, variant });
|
|
35
56
|
}
|
|
36
|
-
button(childId, { id, variant =
|
|
37
|
-
if (!childId)
|
|
38
|
-
throw new TypeError(
|
|
39
|
-
}
|
|
40
|
-
return this._reg(id, 'Button', { child: childId, variant, ...(action ? { action } : {}) });
|
|
57
|
+
button(childId, { id, variant = "primary", action } = {}) {
|
|
58
|
+
if (!childId)
|
|
59
|
+
throw new TypeError("button(childId) requires the id of a child component (e.g. from .text())");
|
|
60
|
+
return __classPrivateFieldGet(this, _A2UI_instances, "m", _A2UI_reg).call(this, id, "Button", { child: childId, variant, ...(action ? { action } : {}) });
|
|
41
61
|
}
|
|
42
62
|
card(childId, { id } = {}) {
|
|
43
|
-
return this.
|
|
63
|
+
return __classPrivateFieldGet(this, _A2UI_instances, "m", _A2UI_reg).call(this, id, "Card", { child: childId });
|
|
44
64
|
}
|
|
45
|
-
column(children = [], { id } = {}) {
|
|
46
|
-
if (!children.length)
|
|
47
|
-
throw new TypeError(
|
|
48
|
-
}
|
|
49
|
-
return this._reg(id, 'Column', { children });
|
|
65
|
+
column(children = [], { id, justify, align } = {}) {
|
|
66
|
+
if (!children.length)
|
|
67
|
+
throw new TypeError("column(children) requires at least one child id");
|
|
68
|
+
return __classPrivateFieldGet(this, _A2UI_instances, "m", _A2UI_reg).call(this, id, "Column", { children, ...(justify ? { justify } : {}), ...(align ? { align } : {}) });
|
|
50
69
|
}
|
|
51
70
|
row(children = [], { id } = {}) {
|
|
52
|
-
if (!children.length)
|
|
53
|
-
throw new TypeError(
|
|
71
|
+
if (!children.length)
|
|
72
|
+
throw new TypeError("row(children) requires at least one child id");
|
|
73
|
+
return __classPrivateFieldGet(this, _A2UI_instances, "m", _A2UI_reg).call(this, id, "Row", { children });
|
|
74
|
+
}
|
|
75
|
+
divider({ id } = {}) {
|
|
76
|
+
return __classPrivateFieldGet(this, _A2UI_instances, "m", _A2UI_reg).call(this, id, "Divider", {});
|
|
77
|
+
}
|
|
78
|
+
choicePicker(label, options, { id, variant = "mutuallyExclusive", value, displayStyle = "checkbox", filterable = false } = {}) {
|
|
79
|
+
if (!Array.isArray(options) || !options.length) {
|
|
80
|
+
throw new TypeError("choicePicker(label, options) requires a non-empty options array of {label, value}");
|
|
54
81
|
}
|
|
55
|
-
return this.
|
|
82
|
+
return __classPrivateFieldGet(this, _A2UI_instances, "m", _A2UI_reg).call(this, id, "ChoicePicker", {
|
|
83
|
+
label,
|
|
84
|
+
variant,
|
|
85
|
+
...(value !== undefined ? { value } : {}),
|
|
86
|
+
options,
|
|
87
|
+
displayStyle,
|
|
88
|
+
filterable,
|
|
89
|
+
});
|
|
56
90
|
}
|
|
57
91
|
root(children) {
|
|
58
92
|
if (!Array.isArray(children) || !children.length) {
|
|
59
|
-
throw new TypeError(
|
|
93
|
+
throw new TypeError("root(children) requires a non-empty array of top-level component ids");
|
|
60
94
|
}
|
|
61
95
|
this._rootChildren = children;
|
|
62
96
|
return this;
|
|
63
97
|
}
|
|
64
|
-
|
|
65
|
-
if (!
|
|
66
|
-
throw new
|
|
98
|
+
listCard({ title, items, fallbackText, uuid = crypto.randomUUID() } = {}) {
|
|
99
|
+
if (!title)
|
|
100
|
+
throw new TypeError("listCard requires a title");
|
|
101
|
+
if (!Array.isArray(items) || !items.length) {
|
|
102
|
+
throw new TypeError("listCard requires a non-empty items array");
|
|
67
103
|
}
|
|
68
|
-
|
|
69
|
-
|
|
104
|
+
this._listCardPayload = {
|
|
105
|
+
uuid,
|
|
106
|
+
data: JSON.stringify({
|
|
107
|
+
type: "list_card",
|
|
108
|
+
title,
|
|
109
|
+
fallback_text: fallbackText ?? "",
|
|
110
|
+
items: items.map((it) => ({
|
|
111
|
+
asset_id: it.assetId ?? crypto.randomUUID().replace(/-/g, "").slice(0, 17),
|
|
112
|
+
asset_type: it.assetType ?? "PRODUCT_ITEM",
|
|
113
|
+
title: it.title,
|
|
114
|
+
trailing_label: it.price ?? it.trailingLabel ?? "",
|
|
115
|
+
trailing_emphasis: it.emphasis ?? "strong",
|
|
116
|
+
})),
|
|
117
|
+
}),
|
|
118
|
+
type: "im_a2ui",
|
|
119
|
+
fallback: fallbackText ?? "",
|
|
120
|
+
};
|
|
121
|
+
return this;
|
|
122
|
+
}
|
|
123
|
+
build({ uuid = crypto.randomUUID(), surfaceId, type = "im_a2ui", wrapped = true } = {}) {
|
|
124
|
+
if (this._listCardPayload)
|
|
125
|
+
return this._listCardPayload;
|
|
126
|
+
if (!this._rootChildren.length)
|
|
127
|
+
throw new Error("Call root([...ids]) before build()");
|
|
128
|
+
const root = { id: "root", component: "Column", children: this._rootChildren };
|
|
129
|
+
const components = [root, ...this._components.values()];
|
|
70
130
|
const data = wrapped
|
|
71
131
|
? {
|
|
72
132
|
version: this._version,
|
|
@@ -84,4 +144,60 @@ export class A2UI {
|
|
|
84
144
|
};
|
|
85
145
|
}
|
|
86
146
|
}
|
|
147
|
+
_A2UI_instances = new WeakSet(), _A2UI_nextId = function _A2UI_nextId(prefix) {
|
|
148
|
+
return `${prefix}_${(this._counter++).toString(36)}`;
|
|
149
|
+
}, _A2UI_reg = function _A2UI_reg(id, component, extra = {}) {
|
|
150
|
+
id ?? (id = __classPrivateFieldGet(this, _A2UI_instances, "m", _A2UI_nextId).call(this, component.toLowerCase()));
|
|
151
|
+
if (this._components.has(id))
|
|
152
|
+
throw new Error(`Component id "${id}" already used`);
|
|
153
|
+
this._components.set(id, { id, component, ...extra });
|
|
154
|
+
return id;
|
|
155
|
+
};
|
|
156
|
+
async function sendA2UIWidget(client, jid, { a2ui, bodyText = "", footer = "", buttons = [], contextInfo = {}, expiration, quoted, type = "im_a2ui", wrapped = true, singleScreen = false } = {}) {
|
|
157
|
+
if (!client)
|
|
158
|
+
throw new Error("Socket is required");
|
|
159
|
+
if (!(a2ui instanceof A2UI))
|
|
160
|
+
throw new TypeError("a2ui must be an A2UI instance");
|
|
161
|
+
const nativeFlowMessage = buttons && buttons.length
|
|
162
|
+
? {
|
|
163
|
+
buttons: buttons.map((b) => ({
|
|
164
|
+
name: b.name ?? "cta_url",
|
|
165
|
+
buttonParamsJson: typeof b.params === "string" ? b.params : JSON.stringify(b.params ?? {}),
|
|
166
|
+
})),
|
|
167
|
+
messageParamsJson: "{}",
|
|
168
|
+
messageVersion: 1
|
|
169
|
+
}
|
|
170
|
+
: { messageParamsJson: "" };
|
|
171
|
+
const interactiveMessage = singleScreen
|
|
172
|
+
? {
|
|
173
|
+
nativeFlowMessage,
|
|
174
|
+
bloksWidget: a2ui.build({ type, wrapped }),
|
|
175
|
+
...(expiration || Object.keys(contextInfo).length ? { contextInfo: { ...(expiration ? { expiration } : {}), ...contextInfo } } : {})
|
|
176
|
+
}
|
|
177
|
+
: {
|
|
178
|
+
...(footer !== undefined ? { header: { hasMediaAttachment: false } } : {}),
|
|
179
|
+
...(bodyText !== undefined ? { body: { text: bodyText } } : {}),
|
|
180
|
+
...(footer !== undefined ? { footer: { text: footer } } : {}),
|
|
181
|
+
nativeFlowMessage,
|
|
182
|
+
bloksWidget: a2ui.build({ type, wrapped }),
|
|
183
|
+
...(expiration || Object.keys(contextInfo).length ? { contextInfo: { ...(expiration ? { expiration } : {}), ...contextInfo } } : {})
|
|
184
|
+
};
|
|
185
|
+
const msg = generateWAMessageFromContent(jid, {
|
|
186
|
+
messageContextInfo: { messageSecret: crypto.randomBytes(32) },
|
|
187
|
+
interactiveMessage
|
|
188
|
+
}, { quoted });
|
|
189
|
+
await client.relayMessage(msg.key.remoteJid, msg.message, {
|
|
190
|
+
messageId: msg.key.id,
|
|
191
|
+
additionalNodes: [{
|
|
192
|
+
tag: "biz",
|
|
193
|
+
attrs: { actual_actors: "2", host_storage: "2", privacy_mode_ts: String(Math.floor(Date.now() / 1e3)) },
|
|
194
|
+
content: [
|
|
195
|
+
{ tag: "interactive", attrs: { type: "native_flow", v: "1" }, content: [{ tag: "native_flow", attrs: { v: "9", name: "mixed" } }] },
|
|
196
|
+
{ tag: "quality_control", attrs: { decision_id: crypto.randomUUID().replace(/-/g, ""), source_type: "third_party" }, content: [{ tag: "decision_source", attrs: { value: "df" } }] }
|
|
197
|
+
]
|
|
198
|
+
}]
|
|
199
|
+
});
|
|
200
|
+
return msg;
|
|
201
|
+
}
|
|
202
|
+
export { A2UI, sendA2UIWidget };
|
|
87
203
|
//# sourceMappingURL=a2ui.js.map
|
package/lib/Utils/a2ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a2ui.js","sourceRoot":"","sources":["../../src/Utils/a2ui.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"a2ui.js","sourceRoot":"","sources":["../../src/Utils/a2ui.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,YAAY,CAAC;;;;;;;AAEb,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,IAAI;IACR,YAAY,EAAE,SAAS,GAAG,iEAAiE,EAAE,OAAO,GAAG,MAAM,EAAE,GAAG,EAAE;;QAClH,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,IAAI,GAAG,EAAE,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;QAClB,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;IAC1B,CAAC;IAUD,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,GAAG,MAAM,EAAE,GAAG,EAAE;QACtC,OAAO,uBAAA,IAAI,kCAAK,MAAT,IAAI,EAAM,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAClD,CAAC;IACD,KAAK,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,EAAE,GAAG,EAAE;QAC5C,OAAO,uBAAA,IAAI,kC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EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE;oBACnI,EAAE,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE;iBACrL;aACF,CAAC;KACH,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC;AAED,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC"}
|
package/lib/Utils/history.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const processHistoryMessage: (item: proto.IHistorySync, logger?:
|
|
|
8
8
|
messages: WAMessage[];
|
|
9
9
|
lidPnMappings: LIDMapping[];
|
|
10
10
|
pastParticipants: proto.IPastParticipants[] | null | undefined;
|
|
11
|
-
syncType: proto.HistorySync.HistorySyncType
|
|
11
|
+
syncType: proto.HistorySync.HistorySyncType;
|
|
12
12
|
progress: number | null | undefined;
|
|
13
13
|
};
|
|
14
14
|
export declare const downloadAndProcessHistorySyncNotification: (msg: proto.Message.IHistorySyncNotification, options: RequestInit, logger?: ILogger) => Promise<{
|
|
@@ -17,7 +17,7 @@ export declare const downloadAndProcessHistorySyncNotification: (msg: proto.Mess
|
|
|
17
17
|
messages: WAMessage[];
|
|
18
18
|
lidPnMappings: LIDMapping[];
|
|
19
19
|
pastParticipants: proto.IPastParticipants[] | null | undefined;
|
|
20
|
-
syncType: proto.HistorySync.HistorySyncType
|
|
20
|
+
syncType: proto.HistorySync.HistorySyncType;
|
|
21
21
|
progress: number | null | undefined;
|
|
22
22
|
}>;
|
|
23
23
|
export declare const getHistoryMsg: (message: proto.IMessage) => proto.Message.IHistorySyncNotification;
|