@open-wa/schema 5.1.0 → 5.3.0
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/dist/generated/index.cjs +1 -1
- package/dist/generated/index.cjs.map +1 -1
- package/dist/generated/index.d.cts +7491 -1331
- package/dist/generated/index.d.cts.map +1 -1
- package/dist/generated/index.d.mts +7491 -1331
- package/dist/generated/index.d.mts.map +1 -1
- package/dist/generated/index.mjs +1 -1
- package/dist/generated/index.mjs.map +1 -1
- package/dist/index-C9Ad0lEr.d.cts +4729 -0
- package/dist/index-C9Ad0lEr.d.cts.map +1 -0
- package/dist/index-D0QN2PaW.d.mts +4729 -0
- package/dist/index-D0QN2PaW.d.mts.map +1 -0
- package/dist/index.cjs +59 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +31 -2
- package/dist/index.mjs.map +1 -1
- package/dist/methods/index.cjs +2 -1
- package/dist/methods/index.d.cts +2 -2
- package/dist/methods/index.d.mts +2 -2
- package/dist/methods/index.mjs +2 -2
- package/dist/{methods-DO0JONvB.cjs → methods-BGmdzjd3.cjs} +433 -76
- package/dist/methods-BGmdzjd3.cjs.map +1 -0
- package/dist/{methods-BSv5O3bS.mjs → methods-BhLsQNtL.mjs} +272 -77
- package/dist/methods-BhLsQNtL.mjs.map +1 -0
- package/package.json +3 -3
- package/src/common-types.ts +22 -15
- package/src/generated/BaseClient.ts +2 -2
- package/src/generated/openapi.json +24726 -3626
- package/src/index.ts +2 -0
- package/src/methods/business.ts +4 -3
- package/src/methods/chats.ts +6 -5
- package/src/methods/communities.ts +8 -6
- package/src/methods/contacts.ts +8 -6
- package/src/methods/groups.ts +11 -9
- package/src/methods/labels.ts +4 -2
- package/src/methods/media.ts +2 -2
- package/src/methods/messaging.ts +20 -12
- package/src/methods/session.ts +7 -6
- package/src/methods/status.ts +9 -7
- package/src/output-json-schema.ts +27 -0
- package/src/parameters.ts +2 -2
- package/src/return-types.ts +125 -0
- package/dist/index-DTztyYhw.d.cts +0 -2155
- package/dist/index-DTztyYhw.d.cts.map +0 -1
- package/dist/index-nVKR0RmZ.d.mts +0 -2155
- package/dist/index-nVKR0RmZ.d.mts.map +0 -1
- package/dist/methods-BSv5O3bS.mjs.map +0 -1
- package/dist/methods-DO0JONvB.cjs.map +0 -1
|
@@ -2,11 +2,17 @@ import { d as parameterRegistry, o as defineMethodV2 } from "./registry-BIddXpin
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { assertFile, getDUrl } from "@open-wa/utils";
|
|
4
4
|
//#region src/common-types.ts
|
|
5
|
-
const ContactIdSchema$1 = z.string().brand("ContactId");
|
|
6
|
-
const ChatIdSchema$1 = z.string().brand("ChatId");
|
|
7
|
-
const MessageIdSchema$1 = z.string().brand("MessageId");
|
|
8
|
-
const GroupChatIdSchema = z.string().brand("GroupChatId");
|
|
9
|
-
const GroupIdSchema$1 = z.string().brand("GroupId");
|
|
5
|
+
const ContactIdSchema$1 = z.string().brand("ContactId").describe("Opaque WhatsApp contact identifier. Preserve the exact value returned by the API.");
|
|
6
|
+
const ChatIdSchema$1 = z.string().brand("ChatId").describe("Opaque conversation identifier. Use the exact value returned by a message event or chat lookup.");
|
|
7
|
+
const MessageIdSchema$1 = z.string().brand("MessageId").describe("Message identifier returned by a send method or message event.");
|
|
8
|
+
const GroupChatIdSchema = z.string().brand("GroupChatId").describe("Opaque group conversation identifier returned by a group lookup or join method.");
|
|
9
|
+
const GroupIdSchema$1 = z.string().brand("GroupId").describe("Identifier for a WhatsApp group. Use the value returned by the API.");
|
|
10
|
+
const DataURLSchema = z.templateLiteral([
|
|
11
|
+
"data:",
|
|
12
|
+
z.string(),
|
|
13
|
+
";base64,",
|
|
14
|
+
z.string()
|
|
15
|
+
]);
|
|
10
16
|
const GroupMetadataSchema = z.object({
|
|
11
17
|
id: GroupIdSchema$1,
|
|
12
18
|
subject: z.string(),
|
|
@@ -22,7 +28,7 @@ const GroupMetadataSchema = z.object({
|
|
|
22
28
|
isAdmin: z.boolean(),
|
|
23
29
|
isSuperAdmin: z.boolean().optional()
|
|
24
30
|
}))
|
|
25
|
-
}).passthrough();
|
|
31
|
+
}).passthrough().describe("Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present.");
|
|
26
32
|
const IdSchema = z.object({
|
|
27
33
|
server: z.string(),
|
|
28
34
|
user: z.string(),
|
|
@@ -192,7 +198,7 @@ const ContactSchema = z.object({
|
|
|
192
198
|
isUser: z.boolean().optional(),
|
|
193
199
|
isWAContact: z.boolean().optional(),
|
|
194
200
|
labels: z.array(z.string()).optional(),
|
|
195
|
-
msgs: z.array(z.
|
|
201
|
+
msgs: z.array(z.unknown()).nullable().optional(),
|
|
196
202
|
profilePicThumbObj: z.object({
|
|
197
203
|
eurl: z.string().optional(),
|
|
198
204
|
id: IdSchema.optional(),
|
|
@@ -215,28 +221,218 @@ const LocationSchema = z.object({
|
|
|
215
221
|
url: z.string().optional().describe("WhatsApp location URL")
|
|
216
222
|
}).passthrough();
|
|
217
223
|
const ChatSchema = z.object({
|
|
218
|
-
id:
|
|
224
|
+
id: ChatIdSchema$1,
|
|
219
225
|
name: z.string().optional(),
|
|
220
226
|
formattedTitle: z.string().optional(),
|
|
221
227
|
isGroup: z.boolean(),
|
|
222
|
-
contact: ContactSchema,
|
|
223
|
-
groupMetadata:
|
|
224
|
-
presence: z.
|
|
228
|
+
contact: ContactSchema.nullable(),
|
|
229
|
+
groupMetadata: GroupMetadataSchema.nullable().optional(),
|
|
230
|
+
presence: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
225
231
|
t: z.number().optional(),
|
|
226
232
|
unreadCount: z.number().optional(),
|
|
227
233
|
lastReceivedKey: z.any().optional(),
|
|
228
|
-
msgs: z.array(z.
|
|
234
|
+
msgs: z.array(z.unknown()).nullable().optional(),
|
|
229
235
|
isReadOnly: z.boolean().optional(),
|
|
230
236
|
muteExpiration: z.number().optional(),
|
|
231
237
|
notSpam: z.boolean().optional(),
|
|
232
238
|
pin: z.number().optional(),
|
|
233
239
|
ack: z.any().optional()
|
|
234
|
-
}).passthrough();
|
|
240
|
+
}).passthrough().describe("Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present.");
|
|
235
241
|
const MessageSchema = MessageSchemaBase.extend({
|
|
236
242
|
sender: ContactSchema,
|
|
237
243
|
chat: ChatSchema
|
|
238
244
|
});
|
|
239
|
-
const
|
|
245
|
+
const SerializedMessageIdSchema = z.object({ _serialized: z.string() }).passthrough();
|
|
246
|
+
const MessageIdReturnSchema = z.union([MessageIdSchema$1, SerializedMessageIdSchema]).describe("A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method.");
|
|
247
|
+
//#endregion
|
|
248
|
+
//#region src/return-types.ts
|
|
249
|
+
const LabelSchema = z.object({
|
|
250
|
+
id: z.string(),
|
|
251
|
+
name: z.string(),
|
|
252
|
+
items: z.array(z.object({
|
|
253
|
+
type: z.enum([
|
|
254
|
+
"Chat",
|
|
255
|
+
"Contact",
|
|
256
|
+
"Message"
|
|
257
|
+
]),
|
|
258
|
+
id: z.string()
|
|
259
|
+
}))
|
|
260
|
+
}).passthrough();
|
|
261
|
+
const NumberCheckSchema = z.object({
|
|
262
|
+
id: z.union([IdSchema, ContactIdSchema$1]),
|
|
263
|
+
status: z.unknown().describe("HTTP-like status code, or a provider error value when lookup fails."),
|
|
264
|
+
isBusiness: z.boolean().optional(),
|
|
265
|
+
canReceiveMessage: z.boolean(),
|
|
266
|
+
numberExists: z.boolean().optional()
|
|
267
|
+
}).passthrough();
|
|
268
|
+
const CommonGroupSchema = z.object({
|
|
269
|
+
id: GroupIdSchema$1,
|
|
270
|
+
title: z.string()
|
|
271
|
+
}).passthrough();
|
|
272
|
+
const GroupCreationResultSchema = z.object({
|
|
273
|
+
gid: z.union([GroupIdSchema$1, IdSchema]),
|
|
274
|
+
status: z.number().optional(),
|
|
275
|
+
participants: z.union([z.record(z.string(), z.object({
|
|
276
|
+
code: z.number(),
|
|
277
|
+
invite_code: z.string().optional(),
|
|
278
|
+
invite_code_exp: z.string().optional()
|
|
279
|
+
})), z.array(z.record(z.string(), z.unknown()))]).optional()
|
|
280
|
+
}).passthrough();
|
|
281
|
+
const CommunityMetadataSchema = GroupMetadataSchema.extend({ subGroups: z.array(GroupMetadataSchema) });
|
|
282
|
+
const CommunityParticipantIdsSchema = z.object({
|
|
283
|
+
id: GroupChatIdSchema,
|
|
284
|
+
participants: z.array(ContactIdSchema$1),
|
|
285
|
+
subgroup: z.boolean()
|
|
286
|
+
});
|
|
287
|
+
const CommunityAdminIdsSchema = z.object({
|
|
288
|
+
id: GroupChatIdSchema,
|
|
289
|
+
admins: z.array(ContactIdSchema$1),
|
|
290
|
+
subgroup: z.boolean()
|
|
291
|
+
});
|
|
292
|
+
const CommunityParticipantsSchema = z.object({
|
|
293
|
+
id: GroupChatIdSchema,
|
|
294
|
+
participants: z.array(ContactSchema),
|
|
295
|
+
subgroup: z.boolean()
|
|
296
|
+
});
|
|
297
|
+
const CommunityAdminsSchema = z.object({
|
|
298
|
+
id: GroupChatIdSchema,
|
|
299
|
+
admins: z.array(ContactSchema),
|
|
300
|
+
subgroup: z.boolean()
|
|
301
|
+
});
|
|
302
|
+
const MessageInteractionSchema = z.object({
|
|
303
|
+
id: ContactIdSchema$1,
|
|
304
|
+
t: z.number()
|
|
305
|
+
});
|
|
306
|
+
const MessageInfoSchema = z.object({
|
|
307
|
+
id: MessageIdSchema$1,
|
|
308
|
+
deliveryRemaining: z.number(),
|
|
309
|
+
playedRemaining: z.number(),
|
|
310
|
+
readRemaining: z.number(),
|
|
311
|
+
delivery: z.array(MessageInteractionSchema),
|
|
312
|
+
read: z.array(MessageInteractionSchema),
|
|
313
|
+
played: z.array(MessageInteractionSchema)
|
|
314
|
+
}).passthrough();
|
|
315
|
+
const LLMMessageSchema = z.object({
|
|
316
|
+
role: z.enum(["user", "assistant"]),
|
|
317
|
+
content: z.string()
|
|
318
|
+
});
|
|
319
|
+
const ContactStatusSchema = z.object({
|
|
320
|
+
id: z.string(),
|
|
321
|
+
status: z.string()
|
|
322
|
+
});
|
|
323
|
+
const HostAccountSchema = z.object({ me: z.union([IdSchema, ContactIdSchema$1]) }).passthrough().describe("Host account attributes plus the current account ID. Additional WhatsApp Web attributes vary by version.");
|
|
324
|
+
const HealthCheckSchema = z.object({
|
|
325
|
+
queuedMessages: z.number().optional(),
|
|
326
|
+
state: z.string().optional(),
|
|
327
|
+
isPhoneDisconnected: z.boolean().optional(),
|
|
328
|
+
isHere: z.boolean().optional(),
|
|
329
|
+
wapiInjected: z.boolean().optional(),
|
|
330
|
+
online: z.boolean().optional(),
|
|
331
|
+
tryingToReachPhone: z.boolean().optional(),
|
|
332
|
+
retryingIn: z.number().optional(),
|
|
333
|
+
batteryLow: z.boolean().optional()
|
|
334
|
+
}).passthrough().describe("Browser health diagnostics. This is not the Easy API /health HTTP envelope.");
|
|
335
|
+
const LicenseTypeSchema = z.enum([
|
|
336
|
+
"CUSTOM",
|
|
337
|
+
"B2B_RESTRICTED_VOLUME_LICENSE",
|
|
338
|
+
"Insiders Program",
|
|
339
|
+
"Text Story License Key",
|
|
340
|
+
"Image Story License Key",
|
|
341
|
+
"Video Story License Key",
|
|
342
|
+
"Premium License Key",
|
|
343
|
+
"NONE"
|
|
344
|
+
]);
|
|
345
|
+
const ProductSchema = z.object({
|
|
346
|
+
id: z.string(),
|
|
347
|
+
currency: z.string(),
|
|
348
|
+
name: z.string().optional(),
|
|
349
|
+
description: z.string().optional(),
|
|
350
|
+
isHidden: z.boolean().optional(),
|
|
351
|
+
catalogWid: z.string().optional(),
|
|
352
|
+
url: z.string().optional(),
|
|
353
|
+
availability: z.union([z.number(), z.literal("unknown")]).optional(),
|
|
354
|
+
reviewStatus: z.enum([
|
|
355
|
+
"NO_REVIEW",
|
|
356
|
+
"PENDING",
|
|
357
|
+
"REJECTED",
|
|
358
|
+
"APPROVED",
|
|
359
|
+
"OUTDATED"
|
|
360
|
+
]).optional(),
|
|
361
|
+
imageCdnUrl: z.string().optional(),
|
|
362
|
+
imageCount: z.number().optional(),
|
|
363
|
+
additionalImageCdnUrl: z.array(z.string()).optional(),
|
|
364
|
+
priceAmount1000: z.number().optional(),
|
|
365
|
+
retailerId: z.string().optional(),
|
|
366
|
+
t: z.number().optional()
|
|
367
|
+
}).passthrough();
|
|
368
|
+
const CartItemSchema = z.object({
|
|
369
|
+
id: z.string(),
|
|
370
|
+
name: z.string(),
|
|
371
|
+
qty: z.number(),
|
|
372
|
+
thumbnailId: z.string(),
|
|
373
|
+
thumbnailUrl: z.string()
|
|
374
|
+
});
|
|
375
|
+
const OrderSchema = z.object({
|
|
376
|
+
id: z.string(),
|
|
377
|
+
createdAt: z.number(),
|
|
378
|
+
currency: z.string(),
|
|
379
|
+
products: z.array(CartItemSchema),
|
|
380
|
+
sellerJid: z.string(),
|
|
381
|
+
subtotal: z.string(),
|
|
382
|
+
total: z.string(),
|
|
383
|
+
message: MessageSchema.optional()
|
|
384
|
+
}).passthrough();
|
|
385
|
+
const BusinessProfileSchema = z.object({
|
|
386
|
+
id: ContactIdSchema$1,
|
|
387
|
+
tag: z.string().optional(),
|
|
388
|
+
description: z.string().optional(),
|
|
389
|
+
categories: z.array(z.object({
|
|
390
|
+
id: z.string(),
|
|
391
|
+
localized_display_name: z.string()
|
|
392
|
+
})).optional(),
|
|
393
|
+
profileOptions: z.object({
|
|
394
|
+
commerceExperience: z.enum([
|
|
395
|
+
"catalog",
|
|
396
|
+
"none",
|
|
397
|
+
"shop"
|
|
398
|
+
]),
|
|
399
|
+
cartEnabled: z.boolean()
|
|
400
|
+
}).optional(),
|
|
401
|
+
email: z.string().optional(),
|
|
402
|
+
website: z.array(z.string()).optional(),
|
|
403
|
+
businessHours: z.object({
|
|
404
|
+
config: z.record(z.string(), z.object({
|
|
405
|
+
mode: z.enum([
|
|
406
|
+
"specific_hours",
|
|
407
|
+
"open_24h",
|
|
408
|
+
"appointment_only"
|
|
409
|
+
]),
|
|
410
|
+
hours: z.array(z.array(z.number()))
|
|
411
|
+
})),
|
|
412
|
+
timezone: z.string()
|
|
413
|
+
}).optional(),
|
|
414
|
+
catalogStatus: z.string().optional(),
|
|
415
|
+
address: z.string().optional(),
|
|
416
|
+
fbPage: z.unknown().optional(),
|
|
417
|
+
igProfessional: z.unknown().optional(),
|
|
418
|
+
isProfileLinked: z.boolean().optional(),
|
|
419
|
+
coverPhoto: z.object({
|
|
420
|
+
id: z.string(),
|
|
421
|
+
url: z.string()
|
|
422
|
+
}).optional(),
|
|
423
|
+
latitude: z.number().optional(),
|
|
424
|
+
longitude: z.number().optional()
|
|
425
|
+
}).passthrough();
|
|
426
|
+
const FeatureFlagsSchema = z.record(z.string(), z.unknown()).describe("WhatsApp feature flags keyed by name. Values are provider-defined and must be narrowed before use.");
|
|
427
|
+
const ProcessStatsSchema = z.record(z.string(), z.unknown()).describe("Process diagnostics keyed by process ID. The provider controls each entry; no stable entry shape is guaranteed.");
|
|
428
|
+
const NumberProfileSchema = ContactSchema.partial().describe("Provisional number profile based on the public Contact fields. Fields are optional and additional provider fields are unknown. The licensed getNumberProfile payload has not been verified against this model.");
|
|
429
|
+
const StorySchema = MessageSchema.omit({
|
|
430
|
+
chat: true,
|
|
431
|
+
sender: true
|
|
432
|
+
}).extend({
|
|
433
|
+
chat: MessageSchema.shape.chat.nullable().optional(),
|
|
434
|
+
sender: ContactSchema.nullable().optional()
|
|
435
|
+
}).describe("Message-shaped status entry, based on the legacy story API. Chat and sender may be absent or null. The licensed getStories payload has not been verified against this model.");
|
|
240
436
|
//#endregion
|
|
241
437
|
//#region src/codecs.ts
|
|
242
438
|
const chatIdPattern = /^\d+(-\d+)?@(c|g)\.us$|^\d+@lid$/;
|
|
@@ -454,18 +650,17 @@ const messageIdsParam = z.union([z.array(messageIdParam), messageIdParam]).descr
|
|
|
454
650
|
keyAliases: ["messages"]
|
|
455
651
|
});
|
|
456
652
|
const mentionedJidListParam = z.array(contactIdParam).optional().describe("List of mentioned contact IDs").register(parameterRegistry, { example: ["447123456789@c.us", "441234567890@c.us"] });
|
|
457
|
-
const messageOptionsParam = z.
|
|
458
|
-
quotedMsg: "messageId",
|
|
459
|
-
mentionedJidList: ["447123456789@c.us"]
|
|
460
|
-
} });
|
|
653
|
+
const messageOptionsParam = z.unknown().optional().describe("Reserved for compatibility with legacy request shapes. The current sendText Client implementation ignores this argument; use reply() or sendTextWithMentions() for quoted replies and mentions.").register(parameterRegistry, { formatDescription: "Accepted as unknown for compatibility; currently ignored by sendText. Use reply() or sendTextWithMentions() for supported reply and mention behavior." });
|
|
461
654
|
//#endregion
|
|
462
655
|
//#region src/methods/messaging.ts
|
|
656
|
+
/** The normalized serialized message key returned by the public sendText client. */
|
|
657
|
+
const SendTextResultSchema = z.string().regex(/^(true|false)_[^\s_]+@[^\s_]+_[^\s]+$/).brand("MessageId").describe("Validated serialized message ID. This confirms the send returned an ID, not delivery or reading.");
|
|
463
658
|
/**
|
|
464
659
|
* Sends a text message to a chat
|
|
465
660
|
*/
|
|
466
661
|
const sendText = defineMethodV2("sendText", {
|
|
467
662
|
meta: {
|
|
468
|
-
description: "Sends a text message
|
|
663
|
+
description: "Sends a text message and returns a validated serialized message ID. The in-process Client throws SendTextError on failure. An unknown outcome means the message may have been sent: check the chat before retrying. Starting a chat with a new number requires an applied restricted or premium license.",
|
|
469
664
|
action: "send",
|
|
470
665
|
namespace: "messages",
|
|
471
666
|
license: "none",
|
|
@@ -482,7 +677,7 @@ const sendText = defineMethodV2("sendText", {
|
|
|
482
677
|
"content",
|
|
483
678
|
"options"
|
|
484
679
|
],
|
|
485
|
-
output:
|
|
680
|
+
output: SendTextResultSchema
|
|
486
681
|
});
|
|
487
682
|
/**
|
|
488
683
|
* Sends a text message with mentions
|
|
@@ -772,7 +967,7 @@ const sendContact = defineMethodV2("sendContact", {
|
|
|
772
967
|
contactId: contactIdParam.or(z.array(contactIdParam))
|
|
773
968
|
}),
|
|
774
969
|
parameterOrder: ["to", "contactId"],
|
|
775
|
-
output: MessageIdReturnSchema.or(z.boolean())
|
|
970
|
+
output: MessageIdReturnSchema.or(z.boolean()).or(z.void())
|
|
776
971
|
});
|
|
777
972
|
/**
|
|
778
973
|
* Sends multiple contacts
|
|
@@ -1107,7 +1302,7 @@ const getMessageById = defineMethodV2("getMessageById", {
|
|
|
1107
1302
|
},
|
|
1108
1303
|
input: z.object({ messageId: messageIdParam }),
|
|
1109
1304
|
parameterOrder: ["messageId"],
|
|
1110
|
-
output: z.
|
|
1305
|
+
output: MessageSchema.nullable().or(z.literal(false))
|
|
1111
1306
|
});
|
|
1112
1307
|
/**
|
|
1113
1308
|
* Retrieves all messages in the session
|
|
@@ -1131,7 +1326,7 @@ const getAllMessages = defineMethodV2("getAllMessages", {
|
|
|
1131
1326
|
"includeMe",
|
|
1132
1327
|
"includeNotifications"
|
|
1133
1328
|
],
|
|
1134
|
-
output: z.array(
|
|
1329
|
+
output: z.array(MessageSchema)
|
|
1135
1330
|
});
|
|
1136
1331
|
const getMyLastMessage = defineMethodV2("getMyLastMessage", {
|
|
1137
1332
|
meta: {
|
|
@@ -1144,7 +1339,7 @@ const getMyLastMessage = defineMethodV2("getMyLastMessage", {
|
|
|
1144
1339
|
},
|
|
1145
1340
|
input: z.object({ chatId: chatIdParam.optional() }),
|
|
1146
1341
|
parameterOrder: ["chatId"],
|
|
1147
|
-
output:
|
|
1342
|
+
output: MessageSchema.optional()
|
|
1148
1343
|
});
|
|
1149
1344
|
const getStarredMessages = defineMethodV2("getStarredMessages", {
|
|
1150
1345
|
meta: {
|
|
@@ -1157,7 +1352,7 @@ const getStarredMessages = defineMethodV2("getStarredMessages", {
|
|
|
1157
1352
|
},
|
|
1158
1353
|
input: z.object({ chatId: chatIdParam.optional() }),
|
|
1159
1354
|
parameterOrder: ["chatId"],
|
|
1160
|
-
output: z.array(
|
|
1355
|
+
output: z.array(MessageSchema)
|
|
1161
1356
|
});
|
|
1162
1357
|
const getUnsentMessages = defineMethodV2("getUnsentMessages", {
|
|
1163
1358
|
meta: {
|
|
@@ -1170,7 +1365,7 @@ const getUnsentMessages = defineMethodV2("getUnsentMessages", {
|
|
|
1170
1365
|
},
|
|
1171
1366
|
input: z.object({}),
|
|
1172
1367
|
parameterOrder: [],
|
|
1173
|
-
output: z.array(
|
|
1368
|
+
output: z.array(MessageSchema)
|
|
1174
1369
|
});
|
|
1175
1370
|
const getMessageInfo = defineMethodV2("getMessageInfo", {
|
|
1176
1371
|
meta: {
|
|
@@ -1183,7 +1378,7 @@ const getMessageInfo = defineMethodV2("getMessageInfo", {
|
|
|
1183
1378
|
},
|
|
1184
1379
|
input: z.object({ messageId: messageIdParam }),
|
|
1185
1380
|
parameterOrder: ["messageId"],
|
|
1186
|
-
output:
|
|
1381
|
+
output: MessageInfoSchema
|
|
1187
1382
|
});
|
|
1188
1383
|
const getVCards = defineMethodV2("getVCards", {
|
|
1189
1384
|
meta: {
|
|
@@ -1214,7 +1409,7 @@ const getMessagesForLLM = defineMethodV2("getMessagesForLLM", {
|
|
|
1214
1409
|
last: z.number().optional().default(10)
|
|
1215
1410
|
}),
|
|
1216
1411
|
parameterOrder: ["chatId", "last"],
|
|
1217
|
-
output: z.
|
|
1412
|
+
output: z.array(LLMMessageSchema)
|
|
1218
1413
|
});
|
|
1219
1414
|
const starMessage = defineMethodV2("starMessage", {
|
|
1220
1415
|
meta: {
|
|
@@ -1294,7 +1489,7 @@ const loadEarlierMessages = defineMethodV2("loadEarlierMessages", {
|
|
|
1294
1489
|
"count",
|
|
1295
1490
|
"includeMe"
|
|
1296
1491
|
],
|
|
1297
|
-
output: z.array(
|
|
1492
|
+
output: z.array(MessageSchema)
|
|
1298
1493
|
});
|
|
1299
1494
|
const sendFileFromUrl = defineMethodV2("sendFileFromUrl", {
|
|
1300
1495
|
meta: {
|
|
@@ -1325,7 +1520,7 @@ const sendFileFromUrl = defineMethodV2("sendFileFromUrl", {
|
|
|
1325
1520
|
//#region src/methods/chats.ts
|
|
1326
1521
|
const getAllChats = defineMethodV2("getAllChats", {
|
|
1327
1522
|
meta: {
|
|
1328
|
-
description: "
|
|
1523
|
+
description: "Returns serialized Chat objects from the current session, optionally limited to chats with unread messages.",
|
|
1329
1524
|
action: "read",
|
|
1330
1525
|
namespace: "chats",
|
|
1331
1526
|
license: "none",
|
|
@@ -1334,7 +1529,7 @@ const getAllChats = defineMethodV2("getAllChats", {
|
|
|
1334
1529
|
},
|
|
1335
1530
|
input: z.object({ withNewMessagesOnly: withNewMessagesOnlyParam }),
|
|
1336
1531
|
parameterOrder: ["withNewMessagesOnly"],
|
|
1337
|
-
output: z.array(
|
|
1532
|
+
output: z.array(ChatSchema)
|
|
1338
1533
|
});
|
|
1339
1534
|
const getAllChatIds = defineMethodV2("getAllChatIds", {
|
|
1340
1535
|
meta: {
|
|
@@ -1348,7 +1543,7 @@ const getAllChatIds = defineMethodV2("getAllChatIds", {
|
|
|
1348
1543
|
},
|
|
1349
1544
|
input: z.object({}),
|
|
1350
1545
|
parameterOrder: [],
|
|
1351
|
-
output: z.array(
|
|
1546
|
+
output: z.array(ChatIdSchema$1)
|
|
1352
1547
|
});
|
|
1353
1548
|
const getChat = defineMethodV2("getChat", {
|
|
1354
1549
|
meta: {
|
|
@@ -1362,7 +1557,7 @@ const getChat = defineMethodV2("getChat", {
|
|
|
1362
1557
|
},
|
|
1363
1558
|
input: z.object({ chatId: chatIdParam }),
|
|
1364
1559
|
parameterOrder: ["chatId"],
|
|
1365
|
-
output: z.
|
|
1560
|
+
output: ChatSchema.nullable().optional().or(z.literal(false))
|
|
1366
1561
|
});
|
|
1367
1562
|
const getChatWithNonContacts = defineMethodV2("getChatWithNonContacts", {
|
|
1368
1563
|
meta: {
|
|
@@ -1375,7 +1570,7 @@ const getChatWithNonContacts = defineMethodV2("getChatWithNonContacts", {
|
|
|
1375
1570
|
},
|
|
1376
1571
|
input: z.object({}),
|
|
1377
1572
|
parameterOrder: [],
|
|
1378
|
-
output: z.array(
|
|
1573
|
+
output: z.array(ContactSchema)
|
|
1379
1574
|
});
|
|
1380
1575
|
const archiveChat = defineMethodV2("archiveChat", {
|
|
1381
1576
|
meta: {
|
|
@@ -1562,7 +1757,7 @@ const getAllContacts = defineMethodV2("getAllContacts", {
|
|
|
1562
1757
|
},
|
|
1563
1758
|
input: z.object({}),
|
|
1564
1759
|
parameterOrder: [],
|
|
1565
|
-
output: z.array(
|
|
1760
|
+
output: z.array(ContactSchema)
|
|
1566
1761
|
});
|
|
1567
1762
|
const getContact = defineMethodV2("getContact", {
|
|
1568
1763
|
meta: {
|
|
@@ -1575,7 +1770,7 @@ const getContact = defineMethodV2("getContact", {
|
|
|
1575
1770
|
},
|
|
1576
1771
|
input: z.object({ contactId: contactIdParam }),
|
|
1577
1772
|
parameterOrder: ["contactId"],
|
|
1578
|
-
output:
|
|
1773
|
+
output: ContactSchema.nullable()
|
|
1579
1774
|
});
|
|
1580
1775
|
const getCommonGroups = defineMethodV2("getCommonGroups", {
|
|
1581
1776
|
meta: {
|
|
@@ -1588,7 +1783,7 @@ const getCommonGroups = defineMethodV2("getCommonGroups", {
|
|
|
1588
1783
|
},
|
|
1589
1784
|
input: z.object({ contactId: contactIdParam }),
|
|
1590
1785
|
parameterOrder: ["contactId"],
|
|
1591
|
-
output: z.
|
|
1786
|
+
output: z.array(CommonGroupSchema).or(z.literal(false))
|
|
1592
1787
|
});
|
|
1593
1788
|
const getNumberProfile = defineMethodV2("getNumberProfile", {
|
|
1594
1789
|
meta: {
|
|
@@ -1601,7 +1796,7 @@ const getNumberProfile = defineMethodV2("getNumberProfile", {
|
|
|
1601
1796
|
},
|
|
1602
1797
|
input: z.object({ contactId: contactIdParam }),
|
|
1603
1798
|
parameterOrder: ["contactId"],
|
|
1604
|
-
output:
|
|
1799
|
+
output: NumberProfileSchema
|
|
1605
1800
|
});
|
|
1606
1801
|
const getBlockedIds = defineMethodV2("getBlockedIds", {
|
|
1607
1802
|
meta: {
|
|
@@ -1614,7 +1809,7 @@ const getBlockedIds = defineMethodV2("getBlockedIds", {
|
|
|
1614
1809
|
},
|
|
1615
1810
|
input: z.object({}),
|
|
1616
1811
|
parameterOrder: [],
|
|
1617
|
-
output: z.array(z.
|
|
1812
|
+
output: z.array(ContactIdSchema$1).or(z.literal(false))
|
|
1618
1813
|
});
|
|
1619
1814
|
const blockContact = defineMethodV2("blockContact", {
|
|
1620
1815
|
meta: {
|
|
@@ -1671,7 +1866,7 @@ const checkNumberStatus = defineMethodV2("checkNumberStatus", {
|
|
|
1671
1866
|
},
|
|
1672
1867
|
input: z.object({ contactId: contactIdParam }),
|
|
1673
1868
|
parameterOrder: ["contactId"],
|
|
1674
|
-
output:
|
|
1869
|
+
output: NumberCheckSchema
|
|
1675
1870
|
});
|
|
1676
1871
|
const getProfilePicture = defineMethodV2("getProfilePicture", {
|
|
1677
1872
|
meta: {
|
|
@@ -1701,7 +1896,7 @@ const getGroupMembers = defineMethodV2("getGroupMembers", {
|
|
|
1701
1896
|
},
|
|
1702
1897
|
input: z.object({ groupId: groupIdParam }),
|
|
1703
1898
|
parameterOrder: ["groupId"],
|
|
1704
|
-
output: z.array(
|
|
1899
|
+
output: z.array(ContactSchema)
|
|
1705
1900
|
});
|
|
1706
1901
|
const getAllGroups = defineMethodV2("getAllGroups", {
|
|
1707
1902
|
meta: {
|
|
@@ -1714,7 +1909,7 @@ const getAllGroups = defineMethodV2("getAllGroups", {
|
|
|
1714
1909
|
},
|
|
1715
1910
|
input: z.object({ withNewMessagesOnly: withNewMessagesOnlyParam }),
|
|
1716
1911
|
parameterOrder: ["withNewMessagesOnly"],
|
|
1717
|
-
output: z.array(
|
|
1912
|
+
output: z.array(ChatSchema)
|
|
1718
1913
|
});
|
|
1719
1914
|
const getGroupMembersId = defineMethodV2("getGroupMembersId", {
|
|
1720
1915
|
meta: {
|
|
@@ -1731,7 +1926,7 @@ const getGroupMembersId = defineMethodV2("getGroupMembersId", {
|
|
|
1731
1926
|
},
|
|
1732
1927
|
input: z.object({ groupId: groupIdParam }),
|
|
1733
1928
|
parameterOrder: ["groupId"],
|
|
1734
|
-
output: z.array(
|
|
1929
|
+
output: z.array(ContactIdSchema$1)
|
|
1735
1930
|
});
|
|
1736
1931
|
const getGroupInfo = defineMethodV2("getGroupInfo", {
|
|
1737
1932
|
meta: {
|
|
@@ -1744,7 +1939,7 @@ const getGroupInfo = defineMethodV2("getGroupInfo", {
|
|
|
1744
1939
|
},
|
|
1745
1940
|
input: z.object({ groupId: groupIdParam }),
|
|
1746
1941
|
parameterOrder: ["groupId"],
|
|
1747
|
-
output:
|
|
1942
|
+
output: GroupMetadataSchema.nullable()
|
|
1748
1943
|
});
|
|
1749
1944
|
const getGroupAdmins = defineMethodV2("getGroupAdmins", {
|
|
1750
1945
|
meta: {
|
|
@@ -1757,7 +1952,7 @@ const getGroupAdmins = defineMethodV2("getGroupAdmins", {
|
|
|
1757
1952
|
},
|
|
1758
1953
|
input: z.object({ groupId: groupIdParam }),
|
|
1759
1954
|
parameterOrder: ["groupId"],
|
|
1760
|
-
output: z.array(
|
|
1955
|
+
output: z.array(ContactIdSchema$1)
|
|
1761
1956
|
});
|
|
1762
1957
|
const getKickedGroups = defineMethodV2("getKickedGroups", {
|
|
1763
1958
|
meta: {
|
|
@@ -1770,7 +1965,7 @@ const getKickedGroups = defineMethodV2("getKickedGroups", {
|
|
|
1770
1965
|
},
|
|
1771
1966
|
input: z.object({}),
|
|
1772
1967
|
parameterOrder: [],
|
|
1773
|
-
output: z.array(
|
|
1968
|
+
output: z.array(GroupChatIdSchema)
|
|
1774
1969
|
});
|
|
1775
1970
|
const getGroupInviteLink = defineMethodV2("getGroupInviteLink", {
|
|
1776
1971
|
meta: {
|
|
@@ -1799,7 +1994,7 @@ const createGroup = defineMethodV2("createGroup", {
|
|
|
1799
1994
|
contacts: z.array(contactIdParam).describe("Contact IDs to add")
|
|
1800
1995
|
}),
|
|
1801
1996
|
parameterOrder: ["name", "contacts"],
|
|
1802
|
-
output:
|
|
1997
|
+
output: GroupCreationResultSchema.nullable()
|
|
1803
1998
|
});
|
|
1804
1999
|
const leaveGroup = defineMethodV2("leaveGroup", {
|
|
1805
2000
|
meta: {
|
|
@@ -1812,7 +2007,7 @@ const leaveGroup = defineMethodV2("leaveGroup", {
|
|
|
1812
2007
|
},
|
|
1813
2008
|
input: z.object({ groupId: groupIdParam }),
|
|
1814
2009
|
parameterOrder: ["groupId"],
|
|
1815
|
-
output: z.
|
|
2010
|
+
output: z.void()
|
|
1816
2011
|
});
|
|
1817
2012
|
const joinGroupViaLink = defineMethodV2("joinGroupViaLink", {
|
|
1818
2013
|
meta: {
|
|
@@ -1833,10 +2028,10 @@ const joinGroupViaLink = defineMethodV2("joinGroupViaLink", {
|
|
|
1833
2028
|
}),
|
|
1834
2029
|
parameterOrder: ["link", "returnChatObj"],
|
|
1835
2030
|
output: z.union([
|
|
1836
|
-
|
|
2031
|
+
GroupChatIdSchema,
|
|
1837
2032
|
z.boolean(),
|
|
1838
2033
|
z.number(),
|
|
1839
|
-
|
|
2034
|
+
ChatSchema
|
|
1840
2035
|
])
|
|
1841
2036
|
});
|
|
1842
2037
|
const revokeGroupInviteLink = defineMethodV2("revokeGroupInviteLink", {
|
|
@@ -2050,7 +2245,7 @@ const getAllCommunities = defineMethodV2("getAllCommunities", {
|
|
|
2050
2245
|
},
|
|
2051
2246
|
input: z.object({}),
|
|
2052
2247
|
parameterOrder: [],
|
|
2053
|
-
output: z.array(
|
|
2248
|
+
output: z.array(GroupChatIdSchema)
|
|
2054
2249
|
});
|
|
2055
2250
|
/**
|
|
2056
2251
|
* Get community info
|
|
@@ -2066,7 +2261,7 @@ const getCommunityInfo = defineMethodV2("getCommunityInfo", {
|
|
|
2066
2261
|
},
|
|
2067
2262
|
input: z.object({ communityId: communityIdParam }),
|
|
2068
2263
|
parameterOrder: ["communityId"],
|
|
2069
|
-
output:
|
|
2264
|
+
output: CommunityMetadataSchema
|
|
2070
2265
|
});
|
|
2071
2266
|
/**
|
|
2072
2267
|
* Get community participant IDs
|
|
@@ -2082,7 +2277,7 @@ const getCommunityParticipantIds = defineMethodV2("getCommunityParticipantIds",
|
|
|
2082
2277
|
},
|
|
2083
2278
|
input: z.object({ communityId: communityIdParam }),
|
|
2084
2279
|
parameterOrder: ["communityId"],
|
|
2085
|
-
output: z.
|
|
2280
|
+
output: z.array(CommunityParticipantIdsSchema)
|
|
2086
2281
|
});
|
|
2087
2282
|
/**
|
|
2088
2283
|
* Get community admin IDs
|
|
@@ -2098,7 +2293,7 @@ const getCommunityAdminIds = defineMethodV2("getCommunityAdminIds", {
|
|
|
2098
2293
|
},
|
|
2099
2294
|
input: z.object({ communityId: communityIdParam }),
|
|
2100
2295
|
parameterOrder: ["communityId"],
|
|
2101
|
-
output: z.
|
|
2296
|
+
output: z.array(CommunityAdminIdsSchema)
|
|
2102
2297
|
});
|
|
2103
2298
|
/**
|
|
2104
2299
|
* Get community participants
|
|
@@ -2114,7 +2309,7 @@ const getCommunityParticipants = defineMethodV2("getCommunityParticipants", {
|
|
|
2114
2309
|
},
|
|
2115
2310
|
input: z.object({ communityId: communityIdParam }),
|
|
2116
2311
|
parameterOrder: ["communityId"],
|
|
2117
|
-
output: z.
|
|
2312
|
+
output: z.array(CommunityParticipantsSchema)
|
|
2118
2313
|
});
|
|
2119
2314
|
/**
|
|
2120
2315
|
* Get community admins
|
|
@@ -2130,7 +2325,7 @@ const getCommunityAdmins = defineMethodV2("getCommunityAdmins", {
|
|
|
2130
2325
|
},
|
|
2131
2326
|
input: z.object({ communityId: communityIdParam }),
|
|
2132
2327
|
parameterOrder: ["communityId"],
|
|
2133
|
-
output: z.
|
|
2328
|
+
output: z.array(CommunityAdminsSchema)
|
|
2134
2329
|
});
|
|
2135
2330
|
//#endregion
|
|
2136
2331
|
//#region src/methods/status.ts
|
|
@@ -2153,7 +2348,7 @@ const postTextStatus = defineMethodV2("postTextStatus", {
|
|
|
2153
2348
|
"backgroundColor",
|
|
2154
2349
|
"font"
|
|
2155
2350
|
],
|
|
2156
|
-
output: z.
|
|
2351
|
+
output: MessageIdSchema$1.or(z.string()).or(z.boolean())
|
|
2157
2352
|
});
|
|
2158
2353
|
const postImageStatus = defineMethodV2("postImageStatus", {
|
|
2159
2354
|
meta: {
|
|
@@ -2169,7 +2364,7 @@ const postImageStatus = defineMethodV2("postImageStatus", {
|
|
|
2169
2364
|
caption: z.string().optional().describe("Status caption")
|
|
2170
2365
|
}),
|
|
2171
2366
|
parameterOrder: ["image", "caption"],
|
|
2172
|
-
output: z.
|
|
2367
|
+
output: MessageIdSchema$1.or(z.string()).or(z.boolean())
|
|
2173
2368
|
});
|
|
2174
2369
|
const postVideoStatus = defineMethodV2("postVideoStatus", {
|
|
2175
2370
|
meta: {
|
|
@@ -2185,7 +2380,7 @@ const postVideoStatus = defineMethodV2("postVideoStatus", {
|
|
|
2185
2380
|
caption: z.string().optional().describe("Status caption")
|
|
2186
2381
|
}),
|
|
2187
2382
|
parameterOrder: ["video", "caption"],
|
|
2188
|
-
output: z.
|
|
2383
|
+
output: MessageIdSchema$1.or(z.string()).or(z.boolean())
|
|
2189
2384
|
});
|
|
2190
2385
|
const getStories = defineMethodV2("getStories", {
|
|
2191
2386
|
meta: {
|
|
@@ -2202,7 +2397,7 @@ const getStories = defineMethodV2("getStories", {
|
|
|
2202
2397
|
},
|
|
2203
2398
|
input: z.object({}),
|
|
2204
2399
|
parameterOrder: [],
|
|
2205
|
-
output: z.array(
|
|
2400
|
+
output: z.array(StorySchema)
|
|
2206
2401
|
});
|
|
2207
2402
|
const getStatus = defineMethodV2("getStatus", {
|
|
2208
2403
|
meta: {
|
|
@@ -2215,7 +2410,7 @@ const getStatus = defineMethodV2("getStatus", {
|
|
|
2215
2410
|
},
|
|
2216
2411
|
input: z.object({ contactId: contactIdParam }),
|
|
2217
2412
|
parameterOrder: ["contactId"],
|
|
2218
|
-
output:
|
|
2413
|
+
output: ContactStatusSchema
|
|
2219
2414
|
});
|
|
2220
2415
|
const deleteStatus = defineMethodV2("deleteStatus", {
|
|
2221
2416
|
meta: {
|
|
@@ -2228,7 +2423,7 @@ const deleteStatus = defineMethodV2("deleteStatus", {
|
|
|
2228
2423
|
},
|
|
2229
2424
|
input: z.object({ statusesToDelete: z.union([z.string(), z.array(z.string())]).describe("Status ID(s)") }),
|
|
2230
2425
|
parameterOrder: ["statusesToDelete"],
|
|
2231
|
-
output: z.
|
|
2426
|
+
output: z.boolean()
|
|
2232
2427
|
});
|
|
2233
2428
|
const deleteAllStatus = defineMethodV2("deleteAllStatus", {
|
|
2234
2429
|
meta: {
|
|
@@ -2242,7 +2437,7 @@ const deleteAllStatus = defineMethodV2("deleteAllStatus", {
|
|
|
2242
2437
|
},
|
|
2243
2438
|
input: z.object({}),
|
|
2244
2439
|
parameterOrder: [],
|
|
2245
|
-
output: z.
|
|
2440
|
+
output: z.boolean()
|
|
2246
2441
|
});
|
|
2247
2442
|
//#endregion
|
|
2248
2443
|
//#region src/methods/labels.ts
|
|
@@ -2260,7 +2455,7 @@ const getAllLabels = defineMethodV2("getAllLabels", {
|
|
|
2260
2455
|
},
|
|
2261
2456
|
input: z.object({}),
|
|
2262
2457
|
parameterOrder: [],
|
|
2263
|
-
output: z.array(
|
|
2458
|
+
output: z.array(LabelSchema)
|
|
2264
2459
|
});
|
|
2265
2460
|
/**
|
|
2266
2461
|
* Get chats by label
|
|
@@ -2277,7 +2472,7 @@ const getChatsByLabel = defineMethodV2("getChatsByLabel", {
|
|
|
2277
2472
|
},
|
|
2278
2473
|
input: z.object({ label: z.string().describe("Label name") }),
|
|
2279
2474
|
parameterOrder: ["label"],
|
|
2280
|
-
output: z.array(
|
|
2475
|
+
output: z.array(ChatSchema)
|
|
2281
2476
|
});
|
|
2282
2477
|
/**
|
|
2283
2478
|
* Add label
|
|
@@ -2330,7 +2525,7 @@ const getBusinessProfile = defineMethodV2("getBusinessProfile", {
|
|
|
2330
2525
|
},
|
|
2331
2526
|
input: z.object({ contactId: contactIdParam }),
|
|
2332
2527
|
parameterOrder: ["contactId"],
|
|
2333
|
-
output:
|
|
2528
|
+
output: BusinessProfileSchema
|
|
2334
2529
|
});
|
|
2335
2530
|
const getBusinessProducts = defineMethodV2("getBusinessProducts", {
|
|
2336
2531
|
meta: {
|
|
@@ -2345,7 +2540,7 @@ const getBusinessProducts = defineMethodV2("getBusinessProducts", {
|
|
|
2345
2540
|
},
|
|
2346
2541
|
input: z.object({ contactId: contactIdParam }),
|
|
2347
2542
|
parameterOrder: ["contactId"],
|
|
2348
|
-
output: z.
|
|
2543
|
+
output: z.array(ProductSchema).or(z.literal(false))
|
|
2349
2544
|
});
|
|
2350
2545
|
const getOrder = defineMethodV2("getOrder", {
|
|
2351
2546
|
meta: {
|
|
@@ -2358,7 +2553,7 @@ const getOrder = defineMethodV2("getOrder", {
|
|
|
2358
2553
|
},
|
|
2359
2554
|
input: z.object({ id: z.union([messageIdParam, z.string()]).describe("Order or message ID") }),
|
|
2360
2555
|
parameterOrder: ["id"],
|
|
2361
|
-
output:
|
|
2556
|
+
output: OrderSchema
|
|
2362
2557
|
});
|
|
2363
2558
|
//#endregion
|
|
2364
2559
|
//#region src/methods/session.ts
|
|
@@ -2373,7 +2568,7 @@ const getMe = defineMethodV2("getMe", {
|
|
|
2373
2568
|
},
|
|
2374
2569
|
input: z.object({}),
|
|
2375
2570
|
parameterOrder: [],
|
|
2376
|
-
output:
|
|
2571
|
+
output: HostAccountSchema
|
|
2377
2572
|
});
|
|
2378
2573
|
const getHostNumber = defineMethodV2("getHostNumber", {
|
|
2379
2574
|
meta: {
|
|
@@ -2399,7 +2594,7 @@ const getConnectionState = defineMethodV2("getConnectionState", {
|
|
|
2399
2594
|
},
|
|
2400
2595
|
input: z.object({}),
|
|
2401
2596
|
parameterOrder: [],
|
|
2402
|
-
output: z.
|
|
2597
|
+
output: z.string()
|
|
2403
2598
|
});
|
|
2404
2599
|
const getWAVersion = defineMethodV2("getWAVersion", {
|
|
2405
2600
|
meta: {
|
|
@@ -2454,7 +2649,7 @@ const getFeatures = defineMethodV2("getFeatures", {
|
|
|
2454
2649
|
},
|
|
2455
2650
|
input: z.object({}),
|
|
2456
2651
|
parameterOrder: [],
|
|
2457
|
-
output:
|
|
2652
|
+
output: FeatureFlagsSchema
|
|
2458
2653
|
});
|
|
2459
2654
|
const getLicenseType = defineMethodV2("getLicenseType", {
|
|
2460
2655
|
meta: {
|
|
@@ -2467,7 +2662,7 @@ const getLicenseType = defineMethodV2("getLicenseType", {
|
|
|
2467
2662
|
},
|
|
2468
2663
|
input: z.object({}),
|
|
2469
2664
|
parameterOrder: [],
|
|
2470
|
-
output:
|
|
2665
|
+
output: LicenseTypeSchema.or(z.literal(false))
|
|
2471
2666
|
});
|
|
2472
2667
|
const getUserAgent = defineMethodV2("getUserAgent", {
|
|
2473
2668
|
meta: {
|
|
@@ -2495,7 +2690,7 @@ const getProcessStats = defineMethodV2("getProcessStats", {
|
|
|
2495
2690
|
},
|
|
2496
2691
|
input: z.object({}),
|
|
2497
2692
|
parameterOrder: [],
|
|
2498
|
-
output:
|
|
2693
|
+
output: ProcessStatsSchema
|
|
2499
2694
|
});
|
|
2500
2695
|
const getLoadedMessageCount = defineMethodV2("getLoadedMessageCount", {
|
|
2501
2696
|
meta: {
|
|
@@ -2545,7 +2740,7 @@ const healthCheck = defineMethodV2("healthCheck", {
|
|
|
2545
2740
|
},
|
|
2546
2741
|
input: z.object({}),
|
|
2547
2742
|
parameterOrder: [],
|
|
2548
|
-
output:
|
|
2743
|
+
output: HealthCheckSchema
|
|
2549
2744
|
});
|
|
2550
2745
|
const setMyName = defineMethodV2("setMyName", {
|
|
2551
2746
|
meta: {
|
|
@@ -2609,7 +2804,7 @@ const decryptMedia = defineMethodV2("decryptMedia", {
|
|
|
2609
2804
|
},
|
|
2610
2805
|
input: z.object({ message: MessageSchema.describe("Message object containing media") }),
|
|
2611
2806
|
parameterOrder: ["message"],
|
|
2612
|
-
output:
|
|
2807
|
+
output: DataURLSchema
|
|
2613
2808
|
});
|
|
2614
2809
|
const downloadMedia = defineMethodV2("downloadMedia", {
|
|
2615
2810
|
meta: {
|
|
@@ -2943,6 +3138,6 @@ const sendRawMessage = defineMethodV2("sendRawMessage", {
|
|
|
2943
3138
|
output: z.string()
|
|
2944
3139
|
});
|
|
2945
3140
|
//#endregion
|
|
2946
|
-
export { deleteStatus as $,
|
|
3141
|
+
export { deleteStatus as $, imageDataParam as $n, CommunityAdminIdsSchema as $r, muteChat as $t, getConnectionState as A, MessageTypes as Ai, sendMultipleContacts as An, MessageIdSchema as Ar, setGroupIcon as At, healthCheck as B, sendYouTubeLink as Bn, fileToStreamCodec as Br, getNumberProfile as Bt, NativeActionSchema as C, GroupChatIdSchema as Ci, sendFile as Cn, ContactIdSchema as Cr, leaveGroup as Ct, decryptMedia as D, MessageAck as Di, sendListMessage as Dn, HexColorSchema as Dr, revokeGroupInviteLink as Dt, defineInteractiveMessage as E, LocationSchema as Ei, sendLinkWithAutoPreview as En, GroupIdSchema as Er, removeParticipant as Et, getMe as F, sendSeen as Fn, contactIdCodec as Fr, checkReadReceipts as Ft, getBusinessProducts as G, chatIdParam as Gn, jsonStringCodec as Gr, deleteChat as Gt, setMyName as H, unstarMessage as Hn, groupIdCodec as Hr, unblockContact as Ht, getProcessStats as I, sendText as In, createFileCodec as Ir, getAllContacts as It, addLabel as J, contentParam as Jn, unixSecondsToDate as Jr, getChat as Jt, getBusinessProfile as K, communityIdParam as Kn, messageIdCodec as Kr, getAllChatIds as Kt, getSnapshot as L, sendTextWithMentions as Ln, fileToBase64Codec as Lr, getBlockedIds as Lt, getHostNumber as M, SimpleListener as Mi, sendPoll as Mn, UnixSecondsToDateSchema as Mr, setGroupToAdminsOnly as Mt, getLicenseType as N, sendPtt as Nn, base64ToDataUrlCodec as Nr, blockContact as Nt, downloadMedia as O, MessageIdReturnSchema as Oi, sendLocation as On, IsoDatetimeToDateSchema as Or, setGroupDescription as Ot, getLoadedMessageCount as P, sendReplyWithMentions as Pn, chatIdCodec as Pr, checkNumberStatus as Pt, deleteAllStatus as Q, groupIdParam as Qn, CommonGroupSchema as Qr, markAsUnread as Qt, getUserAgent as R, sendVCard as Rn, fileToBufferCodec as Rr, getCommonGroups as Rt, ListRowSchema as S, DataURLSchema as Si, sendContact as Sn, ContactIdCodecSchema as Sr, joinGroupViaLink as St, ReplyActionSchema as T, IdSchema as Ti, sendImage as Tn, GroupIdCodecSchema as Tr, rejectGroupJoinRequest as Tt, setMyStatus as U, audioDataParam as Un, hexColorCodec as Ur, archiveChat as Ut, isPlugged as V, starMessage as Vn, fileToTempPathCodec as Vr, getProfilePicture as Vt, setProfilePicture as W, captionParam as Wn, isoDatetimeToDate as Wr, clearChat as Wt, getChatsByLabel as X, fileDataParam as Xn, BusinessProfileSchema as Xr, isChatOnline as Xt, getAllLabels as Y, documentDataParam as Yn, urlToDataUrlCodec as Yr, getChatWithNonContacts as Yt, removeLabel as Z, filenameParam as Zn, CartItemSchema as Zr, markAsRead as Zt, InteractiveResponseSchema as _, ProcessStatsSchema as _i, react as _n, waitForIdParam as _r, getGroupInfo as _t, BookingContentSchema as a, FeatureFlagsSchema as ai, SendTextResultSchema as an, mentionedJidListParam as ar, getAllCommunities as at, LinkActionSchema as b, ChatSchema as bi, sendBanner as bn, ChatIdCodecSchema as br, getGroupMembersId as bt, CarouselCardSchema as c, HostAccountSchema as ci, getAllMessages as cn, messageOptionsParam as cr, getCommunityInfo as ct, FormContentSchema as d, LicenseTypeSchema as di, getMessagesForLLM as dn, skipMyMessagesParam as dr, addParticipant as dt, CommunityAdminsSchema as ei, pinChat as en, includeMeParam as er, getStatus as et, FormQuestionSchema as f, MessageInfoSchema as fi, getMyLastMessage as fn, statusTextParam as fr, approveGroupJoinRequest as ft, InteractiveHeaderSchema as g, OrderSchema as gi, loadEarlierMessages as gn, videoDataParam as gr, getGroupAdmins as gt, InteractiveContentSchema as h, NumberProfileSchema as hi, getVCards as hn, userAgentParam as hr, getAllGroups as ht, sendRawMessage as i, ContactStatusSchema as ii, unpinChat as in, longitudeParam as ir, postVideoStatus as it, getFeatures as j, SerializedMessageIdSchema as ji, sendPaymentRequest as jn, UnixMillisToDateSchema as jr, setGroupTitle as jt, getBatteryLevel as k, MessageSchema as ki, sendMessageWithThumb as kn, MessageIdCodecSchema as kr, setGroupEditToAdminsOnly as kt, CarouselContentSchema as l, LLMMessageSchema as li, getMessageById as ln, nameParam as lr, getCommunityParticipantIds as lt, InteractiveActionSchema as m, NumberCheckSchema as mi, getUnsentMessages as mn, toParam as mr, demoteParticipant as mt, SendRawMessageInputSchema as n, CommunityParticipantIdsSchema as ni, unarchiveChat as nn, latitudeParam as nr, postImageStatus as nt, ButtonsContentSchema as o, GroupCreationResultSchema as oi, deleteMessage as on, messageIdParam as or, getCommunityAdminIds as ot, FormResponseSchema as p, MessageInteractionSchema as pi, getStarredMessages as pn, stickerDataParam as pr, createGroup as pt, getOrder as q, contactIdParam as qn, unixMillisToDate as qr, getAllChats as qt, sendInteractive as r, CommunityParticipantsSchema as ri, unmuteChat as rn, locationNameParam as rr, postTextStatus as rt, CallActionSchema as s, HealthCheckSchema as si, forwardMessages as sn, messageIdsParam as sr, getCommunityAdmins as st, SendInteractiveInputSchema as t, CommunityMetadataSchema as ti, setChatEphemeral as tn, includeNotificationsParam as tr, getStories as tt, CopyActionSchema as u, LabelSchema as ui, getMessageInfo as un, onlyLocalParam as ur, getCommunityParticipants as ut, JsonObjectSchema as v, ProductSchema as vi, sendAdvancedButtons as vn, withNewMessagesOnlyParam as vr, getGroupInviteLink as vt, NativeContentSchema as w, GroupMetadataSchema as wi, sendFileFromUrl as wn, FileToDataUrlSchema as wr, promoteParticipant as wt, ListContentSchema as x, ContactSchema as xi, sendButtons as xn, ChatIdSchema as xr, getKickedGroups as xt, JsonValueSchema as y, StorySchema as yi, sendAudio as yn, Base64ToDataUrlSchema as yr, getGroupMembers as yt, getWAVersion as z, sendVideoAsGif as zn, fileToDataUrlCodec as zr, getContact as zt };
|
|
2947
3142
|
|
|
2948
|
-
//# sourceMappingURL=methods-
|
|
3143
|
+
//# sourceMappingURL=methods-BhLsQNtL.mjs.map
|