@funnelchat-hq/sdk 0.2.2 → 0.3.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.
- package/README.md +187 -89
- package/dist/index.cjs +114 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10183 -7118
- package/dist/index.d.ts +10183 -7118
- package/dist/index.js +114 -35
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -302,6 +302,8 @@ var SEND_ERROR_CODES = {
|
|
|
302
302
|
not_sent: 422,
|
|
303
303
|
/** 422: the contact cannot be reached on WhatsApp (forms). */
|
|
304
304
|
recipient_unreachable: 422,
|
|
305
|
+
/** 422: the contact is blocked on that number (forms). Unblock it in the panel to write to them again. */
|
|
306
|
+
contact_blocked: 422,
|
|
305
307
|
/** 422: a template variable points to a field that does not exist (`placeholders`, `count`). */
|
|
306
308
|
template_unresolved_placeholder: 422,
|
|
307
309
|
/** 404: the template is not one this account can send. */
|
|
@@ -358,6 +360,32 @@ var NUMBER_ERROR_CODES = {
|
|
|
358
360
|
/** 403: the connect page was opened with an API key or a session. The page is for your customer, without credentials. */
|
|
359
361
|
credentials_not_allowed: 403
|
|
360
362
|
};
|
|
363
|
+
var GROUP_ACTION_ERROR_CODES = {
|
|
364
|
+
/** 404: `device_id` is not a number of the key's workspace. */
|
|
365
|
+
device_not_found: 404,
|
|
366
|
+
/** 404: the group is not one of the key's workspace (`group` is the `uid`, `…@g.us`). */
|
|
367
|
+
group_not_found: 404,
|
|
368
|
+
/** 404: `groups.retrieveAction` of an action that does not exist or is of another workspace. */
|
|
369
|
+
action_not_found: 404,
|
|
370
|
+
/** 422: the `uid` is a community or a channel, not a group. */
|
|
371
|
+
unsupported_group_type: 422,
|
|
372
|
+
/** 422: the number is not connected. */
|
|
373
|
+
device_not_connected: 422,
|
|
374
|
+
/** 422: a QR number that is not admin of the group. */
|
|
375
|
+
device_not_group_admin: 422,
|
|
376
|
+
/** 422: an official group that belongs to another number. */
|
|
377
|
+
device_not_group_number: 422,
|
|
378
|
+
/** 422: the number cannot do it (`provider` and maybe `requires` in the body). */
|
|
379
|
+
provider_unsupported: 422,
|
|
380
|
+
/** 422: an official number outside the 24-hour window of the group. */
|
|
381
|
+
window_closed: 422,
|
|
382
|
+
/** 422: Meta restricted the official number. */
|
|
383
|
+
number_restricted: 422,
|
|
384
|
+
/** 422: that `type` cannot be sent to this group by this number. */
|
|
385
|
+
unsupported_type: 422,
|
|
386
|
+
/** 429: the number has 50 group actions open. Wait for some to finish; not worth retrying. */
|
|
387
|
+
too_many_pending_actions: 429
|
|
388
|
+
};
|
|
361
389
|
var IDEMPOTENCY_ERROR_CODES = {
|
|
362
390
|
/** 422: the key was already used with another body. Use a new key for a new resource. */
|
|
363
391
|
idempotency_key_mismatch: 422,
|
|
@@ -380,7 +408,13 @@ var QUOTA_CODES = /* @__PURE__ */ new Set([
|
|
|
380
408
|
function isNumberQuotaError(code) {
|
|
381
409
|
return code !== void 0 && QUOTA_CODES.has(code);
|
|
382
410
|
}
|
|
383
|
-
var NOT_RETRYABLE_CODES = /* @__PURE__ */ new Set([
|
|
411
|
+
var NOT_RETRYABLE_CODES = /* @__PURE__ */ new Set([
|
|
412
|
+
"mac_lockout_24h",
|
|
413
|
+
"mac_limit_reached",
|
|
414
|
+
"too_many_open_links",
|
|
415
|
+
"too_many_pending_actions",
|
|
416
|
+
"meta_connect_disabled"
|
|
417
|
+
]);
|
|
384
418
|
|
|
385
419
|
// src/generated/routes.ts
|
|
386
420
|
var routes = [
|
|
@@ -433,10 +467,10 @@ var routes = [
|
|
|
433
467
|
{ "method": "GET", "path": "/api/v1/campaigns/{campaign}/pipelines/{pipeline}", "operationId": "campaign.showPipeline", "domain": "communities", "permission": "communities:read", "tag": "Grupos de una campa\xF1a y operaciones", "summary": "Ver un pipeline", "pending": false },
|
|
434
468
|
{ "method": "GET", "path": "/api/v1/campaigns/{campaign}/webhooks", "operationId": "campaignWebhook.index", "domain": "communities", "permission": "communities:read", "tag": "Webhooks de campa\xF1a (legado)", "summary": "Listar los webhooks de una campa\xF1a", "pending": false },
|
|
435
469
|
{ "method": "GET", "path": "/api/v1/campaigns/{campaign}/webhooks/logs", "operationId": "campaignWebhook.logs", "domain": "communities", "permission": "communities:read", "tag": "Webhooks de campa\xF1a (legado)", "summary": "Listar las entregas de los webhooks de una campa\xF1a", "pending": false },
|
|
436
|
-
{ "method": "GET", "path": "/api/v1/connect-links", "operationId": "
|
|
437
|
-
{ "method": "POST", "path": "/api/v1/connect-links", "operationId": "
|
|
438
|
-
{ "method": "DELETE", "path": "/api/v1/connect-links/{link}", "operationId": "
|
|
439
|
-
{ "method": "GET", "path": "/api/v1/connect-links/{link}", "operationId": "
|
|
470
|
+
{ "method": "GET", "path": "/api/v1/connect-links", "operationId": "connectLink.index", "domain": "accounts", "permission": "accounts:read", "tag": "ConnectLink", "summary": "Listar los links de alta", "pending": false },
|
|
471
|
+
{ "method": "POST", "path": "/api/v1/connect-links", "operationId": "connectLink.store", "domain": "accounts", "permission": "accounts:operate", "tag": "ConnectLink", "summary": "Crear un link de alta", "pending": false },
|
|
472
|
+
{ "method": "DELETE", "path": "/api/v1/connect-links/{link}", "operationId": "connectLink.destroy", "domain": "accounts", "permission": "accounts:operate", "tag": "ConnectLink", "summary": "Revocar un link de alta", "pending": false },
|
|
473
|
+
{ "method": "GET", "path": "/api/v1/connect-links/{link}", "operationId": "connectLink.show", "domain": "accounts", "permission": "accounts:read", "tag": "ConnectLink", "summary": "Ver un link de alta", "pending": false },
|
|
440
474
|
{ "method": "PUT", "path": "/api/v1/contact-flows/{contactFlowId}/cancel", "operationId": "flow.cancelContactFlow", "domain": "conversations", "permission": "conversations:write", "tag": "Flow", "summary": "Cancelar un flujo en curso", "pending": false },
|
|
441
475
|
{ "method": "GET", "path": "/api/v1/contact-flows/{contactId}", "operationId": "flow.contactFlowHistory", "domain": "conversations", "permission": "conversations:read", "tag": "Flow", "summary": "Listar los flujos en curso de un contacto", "pending": false },
|
|
442
476
|
{ "method": "GET", "path": "/api/v1/contacts", "operationId": "contact.index", "domain": "conversations", "permission": "conversations:read", "tag": "Contact", "summary": "Listar contactos", "pending": false },
|
|
@@ -449,20 +483,20 @@ var routes = [
|
|
|
449
483
|
{ "method": "GET", "path": "/api/v1/contacts/{contact}/lead-score", "operationId": "contactLeadScore.show", "domain": "conversations", "permission": "conversations:read", "tag": "ContactLeadScore", "summary": "Ver el lead score de un contacto", "pending": false },
|
|
450
484
|
{ "method": "POST", "path": "/api/v1/contacts/{contact}/lead-score/adjustments", "operationId": "leadScoreSettings.adjust", "domain": "conversations", "permission": "conversations:write", "tag": "LeadScoreSettings", "summary": "Ajustar el lead score de un contacto", "pending": false },
|
|
451
485
|
{ "method": "POST", "path": "/api/v1/contacts/{contact}/message", "operationId": "conversation.sendMessage", "domain": "conversations", "permission": "conversations:send", "tag": "Conversation", "summary": "Enviar un mensaje a un contacto", "pending": true },
|
|
452
|
-
{ "method": "POST", "path": "/api/v1/contacts/{contact}/message/contact-card", "operationId": "contactCard.store", "domain": "conversations", "permission": "conversations:send", "tag": "ContactCard", "summary": "Enviar una tarjeta de contacto", "pending":
|
|
453
|
-
{ "method": "POST", "path": "/api/v1/contacts/{contact}/message/
|
|
454
|
-
{ "method": "
|
|
455
|
-
{ "method": "POST", "path": "/api/v1/contacts/{contact}/message/
|
|
456
|
-
{ "method": "GET", "path": "/api/v1/contacts/{contact}/messages/{message}", "operationId": "pendingMessage.show", "domain": "conversations", "permission": "conversations:read", "tag": "Message", "summary": "Read a message by id", "pending": true },
|
|
457
|
-
{ "method": "POST", "path": "/api/v1/contacts/{contact}/messages/{message}/forward", "operationId": "forwardMessage.store", "domain": "conversations", "permission": "conversations:send", "tag": "ForwardMessage", "summary": "Reenviar un mensaje", "pending": true },
|
|
486
|
+
{ "method": "POST", "path": "/api/v1/contacts/{contact}/message/contact-card", "operationId": "contactCard.store", "domain": "conversations", "permission": "conversations:send", "tag": "ContactCard", "summary": "Enviar una tarjeta de contacto", "pending": false },
|
|
487
|
+
{ "method": "POST", "path": "/api/v1/contacts/{contact}/message/form", "operationId": "whatsappFormSend.store", "domain": "conversations", "permission": "conversations:send", "tag": "WhatsappFormSend", "summary": "Enviar un formulario", "pending": true },
|
|
488
|
+
{ "method": "GET", "path": "/api/v1/contacts/{contact}/messages/{message}", "operationId": "message.showMessage", "domain": "conversations", "permission": "conversations:read", "tag": "ShowMessage", "summary": "Ver un mensaje", "pending": false },
|
|
489
|
+
{ "method": "POST", "path": "/api/v1/contacts/{contact}/messages/{message}/forward", "operationId": "forwardMessage.store", "domain": "conversations", "permission": "conversations:send", "tag": "ForwardMessage", "summary": "Reenviar un mensaje", "pending": false },
|
|
458
490
|
{ "method": "DELETE", "path": "/api/v1/contacts/{contact}/messages/{message}/reaction", "operationId": "messageReaction.destroy", "domain": "conversations", "permission": "conversations:send", "tag": "MessageReaction", "summary": "Quitar una reacci\xF3n", "pending": false },
|
|
459
491
|
{ "method": "PUT", "path": "/api/v1/contacts/{contact}/messages/{message}/reaction", "operationId": "messageReaction.update", "domain": "conversations", "permission": "conversations:send", "tag": "MessageReaction", "summary": "Reaccionar a un mensaje", "pending": false },
|
|
492
|
+
{ "method": "POST", "path": "/api/v1/contacts/{contact}/messages/{message}/read", "operationId": "message.markMessageRead", "domain": "conversations", "permission": "conversations:send", "tag": "MarkMessageRead", "summary": "POST /contacts/{contact}/messages/{message}/read", "pending": false },
|
|
460
493
|
{ "method": "GET", "path": "/api/v1/contacts/{contact}/meta-window", "operationId": "contact.metaWindow", "domain": "conversations", "permission": "conversations:read", "tag": "Contact", "summary": "Ver la ventana de 24 horas de un contacto", "pending": false },
|
|
461
494
|
{ "method": "GET", "path": "/api/v1/contacts/{contact}/notes", "operationId": "contactNote.index", "domain": "conversations", "permission": "conversations:read", "tag": "ContactNote", "summary": "Listar las notas de un contacto", "pending": false },
|
|
462
495
|
{ "method": "POST", "path": "/api/v1/contacts/{contact}/notes", "operationId": "contactNote.store", "domain": "conversations", "permission": "conversations:write", "tag": "ContactNote", "summary": "Agregar una nota a un contacto", "pending": false },
|
|
463
496
|
{ "method": "DELETE", "path": "/api/v1/contacts/{contact}/notes/{note}", "operationId": "contactNote.destroy", "domain": "conversations", "permission": "conversations:write", "tag": "ContactNote", "summary": "Eliminar una nota", "pending": false },
|
|
464
497
|
{ "method": "POST", "path": "/api/v1/contacts/{contact}/pause", "operationId": "contactAutomation.pause", "domain": "conversations", "permission": "conversations:write", "tag": "ContactAutomation", "summary": "Pausar un contacto", "pending": false },
|
|
465
498
|
{ "method": "GET", "path": "/api/v1/contacts/{contact}/tags", "operationId": "contact.tags", "domain": "conversations", "permission": "conversations:read", "tag": "Contact", "summary": "Listar las etiquetas de un contacto", "pending": false },
|
|
499
|
+
{ "method": "POST", "path": "/api/v1/contacts/{contact}/typing", "operationId": "message.typingIndicator", "domain": "conversations", "permission": "conversations:send", "tag": "TypingIndicator", "summary": "POST /contacts/{contact}/typing", "pending": false },
|
|
466
500
|
{ "method": "PUT", "path": "/api/v1/contacts/{contact}/update", "operationId": "conversation.update", "domain": "conversations", "permission": "conversations:write", "tag": "Conversation", "summary": "Actualizar la conversaci\xF3n de un contacto", "pending": false },
|
|
467
501
|
{ "method": "GET", "path": "/api/v1/contacts/{contactId}/messages", "operationId": "conversation.getLatestMessages", "domain": "conversations", "permission": "conversations:read", "tag": "Conversation", "summary": "Listar los mensajes de un contacto", "pending": false },
|
|
468
502
|
{ "method": "POST", "path": "/api/v1/contacts/attach-custom-field", "operationId": "contact.attachCustomField", "domain": "conversations", "permission": "conversations:write", "tag": "Contact", "summary": "Asignar un campo personalizado a contactos", "pending": false },
|
|
@@ -486,11 +520,11 @@ var routes = [
|
|
|
486
520
|
{ "method": "GET", "path": "/api/v1/custom-fields/{customField}", "operationId": "customField.show", "domain": "conversations", "permission": "conversations:read", "tag": "CustomField", "summary": "Ver un campo personalizado", "pending": false },
|
|
487
521
|
{ "method": "PUT", "path": "/api/v1/custom-fields/{customField}", "operationId": "customField.update", "domain": "conversations", "permission": "conversations:write", "tag": "CustomField", "summary": "Actualizar un campo personalizado", "pending": false },
|
|
488
522
|
{ "method": "POST", "path": "/api/v1/custom-fields/delete", "operationId": "customField.destroy", "domain": "conversations", "permission": "conversations:write", "tag": "CustomField", "summary": "Eliminar campos personalizados", "pending": false },
|
|
489
|
-
{ "method": "GET", "path": "/api/v1/devices", "operationId": "device.index", "domain": "accounts", "permission": "accounts:read", "tag": "Device", "summary": "Listar n\xFAmeros", "pending":
|
|
490
|
-
{ "method": "POST", "path": "/api/v1/devices", "operationId": "
|
|
523
|
+
{ "method": "GET", "path": "/api/v1/devices", "operationId": "device.index", "domain": "accounts", "permission": "accounts:read", "tag": "Device", "summary": "Listar n\xFAmeros", "pending": false },
|
|
524
|
+
{ "method": "POST", "path": "/api/v1/devices", "operationId": "deviceProvisioning.store", "domain": "accounts", "permission": "accounts:operate", "tag": "DeviceProvisioning", "summary": "Crear un n\xFAmero por QR", "pending": false },
|
|
491
525
|
{ "method": "DELETE", "path": "/api/v1/devices/{device}", "operationId": "device.destroy", "domain": "accounts", "permission": "accounts:operate", "tag": "Device", "summary": "Eliminar un n\xFAmero", "pending": false },
|
|
492
526
|
{ "method": "GET", "path": "/api/v1/devices/{device}", "operationId": "device.show", "domain": "accounts", "permission": "accounts:read", "tag": "Device", "summary": "Ver un n\xFAmero", "pending": false },
|
|
493
|
-
{ "method": "PUT", "path": "/api/v1/devices/{device}", "operationId": "device.update", "domain": "accounts", "permission": "accounts:write", "tag": "Device", "summary": "Actualizar un n\xFAmero", "pending":
|
|
527
|
+
{ "method": "PUT", "path": "/api/v1/devices/{device}", "operationId": "device.update", "domain": "accounts", "permission": "accounts:write", "tag": "Device", "summary": "Actualizar un n\xFAmero", "pending": false },
|
|
494
528
|
{ "method": "GET", "path": "/api/v1/devices/{device}/ad-groups", "operationId": "group.adGroups", "domain": "communities", "permission": "communities:read", "tag": "Grupos", "summary": "Listar los grupos de anuncios de un n\xFAmero", "pending": false },
|
|
495
529
|
{ "method": "POST", "path": "/api/v1/devices/{device}/capi/dataset", "operationId": "capiConnection.dataset", "domain": "accounts", "permission": "accounts:write", "tag": "CapiConnection", "summary": "Configurar el dataset de Conversions API", "pending": false },
|
|
496
530
|
{ "method": "GET", "path": "/api/v1/devices/{device}/capi/test", "operationId": "capiConnection.test", "domain": "accounts", "permission": "accounts:read", "tag": "CapiConnection", "summary": "Probar la conexi\xF3n con Conversions API", "pending": false },
|
|
@@ -514,7 +548,7 @@ var routes = [
|
|
|
514
548
|
{ "method": "DELETE", "path": "/api/v1/devices/{device}/message-queue/all", "operationId": "device.clearQueue", "domain": "accounts", "permission": "accounts:operate", "tag": "Device", "summary": "Vaciar la cola de mensajes", "pending": false },
|
|
515
549
|
{ "method": "GET", "path": "/api/v1/devices/{device}/message-queue/count", "operationId": "device.getQueueCount", "domain": "accounts", "permission": "accounts:read", "tag": "Device", "summary": "Contar los mensajes en la cola", "pending": false },
|
|
516
550
|
{ "method": "GET", "path": "/api/v1/devices/{device}/open-conversations", "operationId": "device.openConversations", "domain": "accounts", "permission": "accounts:read", "tag": "Device", "summary": "Ver qu\xE9 tel\xE9fonos tienen conversaci\xF3n abierta", "pending": false },
|
|
517
|
-
{ "method": "GET", "path": "/api/v1/devices/{device}/qr", "operationId": "
|
|
551
|
+
{ "method": "GET", "path": "/api/v1/devices/{device}/qr", "operationId": "deviceProvisioning.qr", "domain": "accounts", "permission": "accounts:operate", "tag": "DeviceProvisioning", "summary": "Pedir el QR de un n\xFAmero", "pending": true },
|
|
518
552
|
{ "method": "PUT", "path": "/api/v1/devices/{device}/reset", "operationId": "device.reset", "domain": "accounts", "permission": "accounts:operate", "tag": "Device", "summary": "Reiniciar la sesi\xF3n de un n\xFAmero", "pending": false },
|
|
519
553
|
{ "method": "GET", "path": "/api/v1/devices/{device}/status", "operationId": "device.status", "domain": "accounts", "permission": "accounts:read", "tag": "Device", "summary": "Ver el estado de conexi\xF3n", "pending": false },
|
|
520
554
|
{ "method": "DELETE", "path": "/api/v1/devices/{device}/templates/{template}", "operationId": "messageTemplate.delete", "domain": "conversations", "permission": "conversations:write", "tag": "MessageTemplate", "summary": "Eliminar una plantilla de un n\xFAmero", "pending": false },
|
|
@@ -556,12 +590,28 @@ var routes = [
|
|
|
556
590
|
{ "method": "GET", "path": "/api/v1/forms/families/{familyId}/versions", "operationId": "pendingForms.versions", "domain": "conversations", "permission": "conversations:read", "tag": "WhatsappForm", "summary": "The versions of a form", "pending": true },
|
|
557
591
|
{ "method": "GET", "path": "/api/v1/forms/templates", "operationId": "pendingForms.templates", "domain": "conversations", "permission": "conversations:read", "tag": "WhatsappForm", "summary": "Templates to start a form", "pending": true },
|
|
558
592
|
{ "method": "GET", "path": "/api/v1/groups", "operationId": "group.index", "domain": "communities", "permission": "communities:read", "tag": "Grupos", "summary": "Listar grupos", "pending": false },
|
|
593
|
+
{ "method": "POST", "path": "/api/v1/groups", "operationId": "apiGroupAction.create", "domain": "communities", "permission": "communities:operate", "tag": "Acciones de grupo", "summary": "Crea un grupo", "pending": false },
|
|
559
594
|
{ "method": "GET", "path": "/api/v1/groups/{group}", "operationId": "group.show", "domain": "communities", "permission": "communities:read", "tag": "Grupos", "summary": "Ver un grupo", "pending": false },
|
|
560
595
|
{ "method": "GET", "path": "/api/v1/groups/{group}/actions", "operationId": "group.actions", "domain": "communities", "permission": "communities:read", "tag": "Grupos", "summary": "Listar las acciones de sesi\xF3n sobre un grupo", "pending": false },
|
|
596
|
+
{ "method": "POST", "path": "/api/v1/groups/{group}/admins", "operationId": "apiGroupAction.promoteAdmins", "domain": "communities", "permission": "communities:operate", "tag": "Acciones de grupo", "summary": "Promueve tel\xE9fonos a administrador", "pending": false },
|
|
597
|
+
{ "method": "POST", "path": "/api/v1/groups/{group}/admins/remove", "operationId": "apiGroupAction.demoteAdmins", "domain": "communities", "permission": "communities:operate", "tag": "Acciones de grupo", "summary": "Quita el rol de administrador a tel\xE9fonos", "pending": false },
|
|
598
|
+
{ "method": "PUT", "path": "/api/v1/groups/{group}/description", "operationId": "apiGroupAction.updateDescription", "domain": "communities", "permission": "communities:operate", "tag": "Acciones de grupo", "summary": "Cambia la descripci\xF3n del grupo", "pending": false },
|
|
599
|
+
{ "method": "GET", "path": "/api/v1/groups/{group}/invite-link/live", "operationId": "apiGroupAction.inviteLink", "domain": "communities", "permission": "communities:read", "tag": "Acciones de grupo", "summary": "Link de invitaci\xF3n vigente del grupo", "pending": false },
|
|
600
|
+
{ "method": "POST", "path": "/api/v1/groups/{group}/invite-link/renew", "operationId": "apiGroupAction.renewInviteLink", "domain": "communities", "permission": "communities:operate", "tag": "Acciones de grupo", "summary": "Renueva el link de invitaci\xF3n del grupo", "pending": false },
|
|
601
|
+
{ "method": "GET", "path": "/api/v1/groups/{group}/join-requests", "operationId": "apiGroupAction.joinRequests", "domain": "communities", "permission": "communities:read", "tag": "Acciones de grupo", "summary": "Solicitudes pendientes para unirse al grupo", "pending": false },
|
|
602
|
+
{ "method": "POST", "path": "/api/v1/groups/{group}/join-requests/approve", "operationId": "apiGroupAction.approveJoinRequests", "domain": "communities", "permission": "communities:operate", "tag": "Acciones de grupo", "summary": "Aprueba solicitudes para unirse al grupo", "pending": false },
|
|
603
|
+
{ "method": "POST", "path": "/api/v1/groups/{group}/join-requests/reject", "operationId": "apiGroupAction.rejectJoinRequests", "domain": "communities", "permission": "communities:operate", "tag": "Acciones de grupo", "summary": "Rechaza solicitudes para unirse al grupo", "pending": false },
|
|
561
604
|
{ "method": "GET", "path": "/api/v1/groups/{group}/messages", "operationId": "group.messages", "domain": "communities", "permission": "communities:read", "tag": "Grupos", "summary": "Listar los mensajes enviados a un grupo", "pending": false },
|
|
605
|
+
{ "method": "POST", "path": "/api/v1/groups/{group}/messages", "operationId": "apiGroupAction.sendMessage", "domain": "communities", "permission": "communities:send", "tag": "Acciones de grupo", "summary": "Mandar un mensaje a un grupo", "pending": false },
|
|
606
|
+
{ "method": "PUT", "path": "/api/v1/groups/{group}/name", "operationId": "apiGroupAction.updateName", "domain": "communities", "permission": "communities:operate", "tag": "Acciones de grupo", "summary": "Cambia el nombre del grupo", "pending": false },
|
|
562
607
|
{ "method": "GET", "path": "/api/v1/groups/{group}/participant-events", "operationId": "group.participantEvents", "domain": "communities", "permission": "communities:read", "tag": "Participantes", "summary": "Listar entradas y salidas de un grupo", "pending": false },
|
|
608
|
+
{ "method": "POST", "path": "/api/v1/groups/{group}/participants", "operationId": "apiGroupAction.addParticipants", "domain": "communities", "permission": "communities:operate", "tag": "Acciones de grupo", "summary": "Suma participantes al grupo", "pending": false },
|
|
609
|
+
{ "method": "POST", "path": "/api/v1/groups/{group}/participants/remove", "operationId": "apiGroupAction.removeParticipants", "domain": "communities", "permission": "communities:operate", "tag": "Acciones de grupo", "summary": "Saca participantes del grupo", "pending": false },
|
|
610
|
+
{ "method": "PUT", "path": "/api/v1/groups/{group}/photo", "operationId": "apiGroupAction.updatePhoto", "domain": "communities", "permission": "communities:operate", "tag": "Acciones de grupo", "summary": "Cambia la foto del grupo", "pending": false },
|
|
563
611
|
{ "method": "GET", "path": "/api/v1/groups/{group}/scheduled-messages", "operationId": "group.scheduledMessages", "domain": "communities", "permission": "communities:read", "tag": "Grupos", "summary": "Listar los env\xEDos programados que incluyen un grupo", "pending": false },
|
|
612
|
+
{ "method": "PUT", "path": "/api/v1/groups/{group}/settings", "operationId": "apiGroupAction.updateSettings", "domain": "communities", "permission": "communities:operate", "tag": "Acciones de grupo", "summary": "Cambia si los miembros pueden escribir", "pending": false },
|
|
564
613
|
{ "method": "GET", "path": "/api/v1/groups/{groupUid}/metadata", "operationId": "groupMetadata.show", "domain": "communities", "permission": "communities:read", "tag": "Grupos", "summary": "Ver los datos actuales de un grupo en WhatsApp", "pending": false },
|
|
614
|
+
{ "method": "GET", "path": "/api/v1/groups/actions/{action}", "operationId": "apiGroupAction.show", "domain": "communities", "permission": "communities:read", "tag": "Acciones de grupo", "summary": "Ver c\xF3mo sali\xF3 una acci\xF3n de grupo", "pending": true },
|
|
565
615
|
{ "method": "GET", "path": "/api/v1/groups/participants", "operationId": "group.participants", "domain": "communities", "permission": "communities:read", "tag": "Participantes", "summary": "Listar los participantes de un grupo", "pending": false },
|
|
566
616
|
{ "method": "GET", "path": "/api/v1/kanban-settings", "operationId": "kanbanSetting.index", "domain": "conversations", "permission": "conversations:read", "tag": "KanbanSetting", "summary": "Listar tableros", "pending": false },
|
|
567
617
|
{ "method": "POST", "path": "/api/v1/kanban-settings", "operationId": "kanbanSetting.store", "domain": "conversations", "permission": "conversations:write", "tag": "KanbanSetting", "summary": "Crear un tablero", "pending": false },
|
|
@@ -586,6 +636,8 @@ var routes = [
|
|
|
586
636
|
{ "method": "GET", "path": "/api/v1/mac/contacts/history", "operationId": "mac.contactsHistory", "domain": "conversations", "permission": "conversations:read", "tag": "Mac", "summary": "Ver el historial de MACs", "pending": false },
|
|
587
637
|
{ "method": "GET", "path": "/api/v1/mac/status", "operationId": "mac.status", "domain": "conversations", "permission": "conversations:read", "tag": "Mac", "summary": "Ver el consumo de MACs", "pending": false },
|
|
588
638
|
{ "method": "GET", "path": "/api/v1/me", "operationId": null, "domain": "accounts", "permission": "accounts:read", "tag": "Account", "summary": "Ver mi cuenta", "pending": false },
|
|
639
|
+
{ "method": "GET", "path": "/api/v1/me/whatsapp-business-accounts", "operationId": "whatsAppBusinessAccount.index", "domain": "accounts", "permission": "accounts:read", "tag": "WhatsAppBusinessAccount", "summary": "Cuentas de WhatsApp Business (WABA) de la cuenta", "pending": false },
|
|
640
|
+
{ "method": "GET", "path": "/api/v1/me/whatsapp-business-accounts/{wabaId}", "operationId": "whatsAppBusinessAccount.show", "domain": "accounts", "permission": "accounts:read", "tag": "WhatsAppBusinessAccount", "summary": "Una cuenta de WhatsApp Business (WABA) de la cuenta", "pending": false },
|
|
589
641
|
{ "method": "GET", "path": "/api/v1/me/whatsapp-costs", "operationId": "whatsappCost.index", "domain": "accounts", "permission": "accounts:read", "tag": "WhatsappCost", "summary": "Ver los costos de WhatsApp", "pending": false },
|
|
590
642
|
{ "method": "POST", "path": "/api/v1/message/send-message", "operationId": "message.sendMessage", "domain": "conversations", "permission": "conversations:send", "tag": "Message", "summary": "Enviar un mensaje", "pending": true },
|
|
591
643
|
{ "method": "GET", "path": "/api/v1/payments/products/{platform}", "operationId": "paymentProduct.index", "domain": "conversations", "permission": "conversations:read", "tag": "PaymentProduct", "summary": "Listar los productos de una plataforma de pagos", "pending": false },
|
|
@@ -620,10 +672,11 @@ var routes = [
|
|
|
620
672
|
{ "method": "PUT", "path": "/api/v1/tags/{tag}", "operationId": "tag.update", "domain": "conversations", "permission": "conversations:write", "tag": "Tag", "summary": "Actualizar una etiqueta", "pending": false },
|
|
621
673
|
{ "method": "GET", "path": "/api/v1/tags/{tag}/contacts", "operationId": "tag.contacts", "domain": "conversations", "permission": "conversations:read", "tag": "Tag", "summary": "Listar los contactos con una etiqueta", "pending": false },
|
|
622
674
|
{ "method": "POST", "path": "/api/v1/tags/delete", "operationId": "tag.destroy", "domain": "conversations", "permission": "conversations:write", "tag": "Tag", "summary": "Eliminar etiquetas", "pending": false },
|
|
623
|
-
{ "method": "GET", "path": "/api/v1/templates", "operationId": "messageTemplate.templates", "domain": "conversations", "permission": "conversations:read", "tag": "MessageTemplate", "summary": "Listar plantillas", "pending":
|
|
675
|
+
{ "method": "GET", "path": "/api/v1/templates", "operationId": "messageTemplate.templates", "domain": "conversations", "permission": "conversations:read", "tag": "MessageTemplate", "summary": "Listar plantillas", "pending": true },
|
|
624
676
|
{ "method": "POST", "path": "/api/v1/templates", "operationId": "messageTemplate.store", "domain": "conversations", "permission": "conversations:write", "tag": "MessageTemplate", "summary": "Crear una plantilla", "pending": false },
|
|
625
677
|
{ "method": "GET", "path": "/api/v1/templates/{template}", "operationId": "messageTemplate.template", "domain": "conversations", "permission": "conversations:read", "tag": "MessageTemplate", "summary": "Ver una plantilla", "pending": false },
|
|
626
678
|
{ "method": "PUT", "path": "/api/v1/templates/{template}", "operationId": "messageTemplate.update", "domain": "conversations", "permission": "conversations:write", "tag": "MessageTemplate", "summary": "Actualizar una plantilla", "pending": false },
|
|
679
|
+
{ "method": "GET", "path": "/api/v1/templates/{template}/metrics", "operationId": "message.templateMetrics", "domain": "conversations", "permission": "conversations:read", "tag": "TemplateMetrics", "summary": "GET /templates/{template}/metrics", "pending": false },
|
|
627
680
|
{ "method": "GET", "path": "/api/v1/templates/{template}/quick-reply-buttons", "operationId": "messageTemplate.quickReplyButtons", "domain": "conversations", "permission": "conversations:read", "tag": "MessageTemplate", "summary": "Ver los botones de respuesta r\xE1pida de una plantilla", "pending": false },
|
|
628
681
|
{ "method": "GET", "path": "/api/v1/tickets", "operationId": "ticket.index", "domain": "conversations", "permission": "conversations:read", "tag": "Ticket", "summary": "Listar tickets", "pending": false },
|
|
629
682
|
{ "method": "POST", "path": "/api/v1/tickets", "operationId": "ticket.store", "domain": "conversations", "permission": "conversations:write", "tag": "Ticket", "summary": "Crear un ticket", "pending": false },
|
|
@@ -632,14 +685,14 @@ var routes = [
|
|
|
632
685
|
{ "method": "POST", "path": "/api/v1/tickets/{id}/close", "operationId": "ticket.closeTicket", "domain": "conversations", "permission": "conversations:write", "tag": "Ticket", "summary": "Cerrar un ticket", "pending": false },
|
|
633
686
|
{ "method": "POST", "path": "/api/v1/tickets/{id}/reopen", "operationId": "ticket.reOpenTicket", "domain": "conversations", "permission": "conversations:write", "tag": "Ticket", "summary": "Reabrir un ticket", "pending": false },
|
|
634
687
|
{ "method": "POST", "path": "/api/v1/tickets/assign", "operationId": "ticket.assignTicketToUser", "domain": "conversations", "permission": "conversations:write", "tag": "Ticket", "summary": "Asignar tickets", "pending": false },
|
|
635
|
-
{ "method": "GET", "path": "/api/v1/webhooks", "operationId": "
|
|
636
|
-
{ "method": "POST", "path": "/api/v1/webhooks", "operationId": "
|
|
637
|
-
{ "method": "DELETE", "path": "/api/v1/webhooks/{id}", "operationId": "
|
|
638
|
-
{ "method": "GET", "path": "/api/v1/webhooks/{id}", "operationId": "
|
|
639
|
-
{ "method": "PUT", "path": "/api/v1/webhooks/{id}", "operationId": "
|
|
640
|
-
{ "method": "GET", "path": "/api/v1/webhooks/{id}/deliveries", "operationId": "
|
|
688
|
+
{ "method": "GET", "path": "/api/v1/webhooks", "operationId": "webhookSubscription.index", "domain": "accounts", "permission": "webhooks:read", "tag": "WebhookSubscription", "summary": "Listar webhooks", "pending": false },
|
|
689
|
+
{ "method": "POST", "path": "/api/v1/webhooks", "operationId": "webhookSubscription.store", "domain": "accounts", "permission": "webhooks:write", "tag": "WebhookSubscription", "summary": "Crear un webhook", "pending": false },
|
|
690
|
+
{ "method": "DELETE", "path": "/api/v1/webhooks/{id}", "operationId": "webhookSubscription.destroy", "domain": "accounts", "permission": "webhooks:write", "tag": "WebhookSubscription", "summary": "Eliminar un webhook", "pending": false },
|
|
691
|
+
{ "method": "GET", "path": "/api/v1/webhooks/{id}", "operationId": "webhookSubscription.show", "domain": "accounts", "permission": "webhooks:read", "tag": "WebhookSubscription", "summary": "Ver un webhook", "pending": false },
|
|
692
|
+
{ "method": "PUT", "path": "/api/v1/webhooks/{id}", "operationId": "webhookSubscription.update", "domain": "accounts", "permission": "webhooks:write", "tag": "WebhookSubscription", "summary": "Actualizar un webhook", "pending": true },
|
|
693
|
+
{ "method": "GET", "path": "/api/v1/webhooks/{id}/deliveries", "operationId": "webhookSubscriptionDelivery.index", "domain": "accounts", "permission": "webhooks:read", "tag": "WebhookSubscriptionDelivery", "summary": "Listar entregas de un webhook", "pending": false },
|
|
641
694
|
{ "method": "POST", "path": "/api/v1/webhooks/{id}/rotate-secret", "operationId": "pendingWebhookSubscription.rotateSecret", "domain": "accounts", "permission": "webhooks:write", "tag": "Webhooks", "summary": "Generate a new secret", "pending": true },
|
|
642
|
-
{ "method": "POST", "path": "/api/v1/webhooks/{id}/test", "operationId": "
|
|
695
|
+
{ "method": "POST", "path": "/api/v1/webhooks/{id}/test", "operationId": "webhookSubscriptionTest.test", "domain": "accounts", "permission": "webhooks:write", "tag": "WebhookSubscriptionTest", "summary": "Enviar un evento de prueba", "pending": false },
|
|
643
696
|
{ "method": "GET", "path": "/api/v1/webhooks/endpoints", "operationId": "webhookEndpoint.index", "domain": "accounts", "permission": "accounts:read", "tag": "WebhookEndpoint", "summary": "Listar webhooks", "pending": false },
|
|
644
697
|
{ "method": "POST", "path": "/api/v1/webhooks/endpoints", "operationId": "webhookEndpoint.store", "domain": "accounts", "permission": "accounts:write", "tag": "WebhookEndpoint", "summary": "Crear un webhook", "pending": false },
|
|
645
698
|
{ "method": "DELETE", "path": "/api/v1/webhooks/endpoints/{id}", "operationId": "webhookEndpoint.destroy", "domain": "accounts", "permission": "accounts:write", "tag": "WebhookEndpoint", "summary": "Eliminar un webhook", "pending": false },
|
|
@@ -1067,7 +1120,7 @@ var Forms = class extends Resource {
|
|
|
1067
1120
|
|
|
1068
1121
|
// src/resources/groups.ts
|
|
1069
1122
|
var Groups = class extends Resource {
|
|
1070
|
-
/** `GET /api/v1/groups`, paginated. */
|
|
1123
|
+
/** `GET /api/v1/groups`, paginated. Each group's `uid` (`…@g.us`) is what {@link Groups.sendMessage} takes. */
|
|
1071
1124
|
list(query, options) {
|
|
1072
1125
|
return this.client.paginate("/api/v1/groups", { ...options, query });
|
|
1073
1126
|
}
|
|
@@ -1103,6 +1156,28 @@ var Groups = class extends Resource {
|
|
|
1103
1156
|
listActions(group, query, options) {
|
|
1104
1157
|
return this.client.paginate("/api/v1/groups/{group}/actions", { ...options, path: { group }, query });
|
|
1105
1158
|
}
|
|
1159
|
+
/**
|
|
1160
|
+
* `POST /api/v1/groups/{group}/messages`: sends a text (`type: 'text'`) or one file (`image`,
|
|
1161
|
+
* `video`, `audio` or `document`, by its `https` `media_url`) to the group, from `device_id`. It
|
|
1162
|
+
* answers `202` with `{ action_id, status: 'queued' }` and goes out in the background: the result
|
|
1163
|
+
* arrives by `group_action.completed` (or `group_action.failed`), with the same `action_id` in
|
|
1164
|
+
* `action.uuid`, or with {@link Groups.retrieveAction}; `result.message.uid` is the id of the message in
|
|
1165
|
+
* WhatsApp.
|
|
1166
|
+
*
|
|
1167
|
+
* `group` is the `uid` of the group (`…@g.us`). A QR number must be admin of the group; an official
|
|
1168
|
+
* number, the one the group belongs to. Rejections: `GROUP_ACTION_ERROR_CODES`. Like every send, it
|
|
1169
|
+
* is never retried automatically.
|
|
1170
|
+
*/
|
|
1171
|
+
sendMessage(group, body, options) {
|
|
1172
|
+
return this.client.request("POST", "/api/v1/groups/{group}/messages", { ...options, path: { group }, body });
|
|
1173
|
+
}
|
|
1174
|
+
/**
|
|
1175
|
+
* `GET /api/v1/groups/actions/{action}`: where a group action, such as a message sent with
|
|
1176
|
+
* {@link Groups.sendMessage}, is (`queued`, `running`, `completed` or `failed`) and its `result`.
|
|
1177
|
+
*/
|
|
1178
|
+
retrieveAction(action, options) {
|
|
1179
|
+
return this.client.request("GET", "/api/v1/groups/actions/{action}", { ...options, path: { action } });
|
|
1180
|
+
}
|
|
1106
1181
|
};
|
|
1107
1182
|
|
|
1108
1183
|
// src/resources/messages.ts
|
|
@@ -1383,7 +1458,7 @@ var Webhooks = class extends Resource {
|
|
|
1383
1458
|
};
|
|
1384
1459
|
|
|
1385
1460
|
// src/version.ts
|
|
1386
|
-
var VERSION = "0.
|
|
1461
|
+
var VERSION = "0.3.1";
|
|
1387
1462
|
|
|
1388
1463
|
// src/client.ts
|
|
1389
1464
|
var BASE_URLS = {
|
|
@@ -1587,28 +1662,32 @@ var webhookEvents = [
|
|
|
1587
1662
|
{ "type": "billing.payment_failed", "domains": ["accounts"], "status": "live", "pending": true, "description": "A charge of the subscription could not be processed (Stripe subscriptions only)." },
|
|
1588
1663
|
{ "type": "billing.plan_blocked", "domains": ["accounts"], "status": "planned", "pending": true, "description": "The plan was blocked by an unprocessed charge. Planned: not emitted yet." },
|
|
1589
1664
|
{ "type": "billing.upcoming_charge", "domains": ["accounts"], "status": "live", "pending": true, "description": "The next charge of the subscription is coming up (Stripe subscriptions only)." },
|
|
1590
|
-
{ "type": "broadcast.finished", "domains": ["conversations"], "status": "live", "pending": false, "description": "Una campa\xF1a lleg\xF3 a su estado final (enviada, fallida o con fallos parciales), con sus conteos.\n\n`status` es `success`, `failed` o `partially_failed`. `reason` dice por qu\xE9 termin\xF3: `completed` (se enviaron todas las p\xE1ginas), `cancelled` (se cerr\xF3 una campa\xF1a pausada), `template_rejected` (Meta rechaz\xF3 la plantilla, o su categor\xEDa cambi\xF3, mientras la campa\xF1a esperaba), `approval_expired` (la plantilla no se aprob\xF3 a tiempo), `mac_lockout` (la cuenta alcanz\xF3 su l\xEDmite de contactos activos), `no_recipients` (la audiencia qued\xF3 vac\xEDa) o `error` (el env\xEDo no pudo despacharse). `totals` son los conteos del env\xEDo: `processed` (destinatarios procesados), `failed` y `skipped_unreachable` (destinatarios que el canal no puede alcanzar); valen 0 si la campa\xF1a termin\xF3 antes de enviar. Se emite una sola vez por campa\xF1a." },
|
|
1591
|
-
{ "type": "broadcast.paused", "domains": ["conversations"], "status": "live", "pending": false, "description": "Una campa\xF1a se paus\xF3 sola, por ejemplo porque baj\xF3 la calidad del n\xFAmero.\n\n`reason` es `quality_degraded` (la calidad del n\xFAmero baj\xF3 respecto de la del inicio, o lleg\xF3 a RED)
|
|
1665
|
+
{ "type": "broadcast.finished", "domains": ["conversations"], "status": "live", "pending": false, "description": "Una campa\xF1a lleg\xF3 a su estado final (enviada, fallida o con fallos parciales), con sus conteos.\n\n`status` es `success`, `failed` o `partially_failed`. `reason` dice por qu\xE9 termin\xF3: `completed` (se enviaron todas las p\xE1ginas), `cancelled` (se cerr\xF3 una campa\xF1a pausada), `template_rejected` (Meta rechaz\xF3 la plantilla, o su categor\xEDa cambi\xF3, mientras la campa\xF1a esperaba; tambi\xE9n cuando Meta la paus\xF3 durante el env\xEDo y se detuvo la campa\xF1a), `approval_expired` (la plantilla no se aprob\xF3 a tiempo), `mac_lockout` (la cuenta alcanz\xF3 su l\xEDmite de contactos activos), `mac_check_unavailable` (la campa\xF1a la inici\xF3 una API key y el l\xEDmite de contactos activos no se pudo verificar, as\xED que no se envi\xF3 nada), `no_recipients` (la audiencia qued\xF3 vac\xEDa) o `error` (el env\xEDo no pudo despacharse). `totals` son los conteos del env\xEDo: `processed` (destinatarios procesados), `failed` y `skipped_unreachable` (destinatarios que el canal no puede alcanzar); valen 0 si la campa\xF1a termin\xF3 antes de enviar. Se emite una sola vez por campa\xF1a." },
|
|
1666
|
+
{ "type": "broadcast.paused", "domains": ["conversations"], "status": "live", "pending": false, "description": "Una campa\xF1a se paus\xF3 sola, por ejemplo porque baj\xF3 la calidad del n\xFAmero.\n\n`reason` es `quality_degraded` (la calidad del n\xFAmero baj\xF3 respecto de la del inicio, o lleg\xF3 a RED), `quality_unreadable` (no se pudo leer la calidad en tres controles seguidos), `template_unavailable` (Meta dej\xF3 la plantilla en `PAUSED`, `DISABLED` o `REJECTED` antes de una tanda) o `rejection_rate` (en los env\xEDos recientes del n\xFAmero, por defecto las \xFAltimas 24 horas, Meta rechaz\xF3 una proporci\xF3n igual o mayor al umbral configurable: el c\xF3digo 131049, por defecto 5 %; el c\xF3digo 131026, por defecto 5 %; o los c\xF3digos que indican una restricci\xF3n de la cuenta o del n\xFAmero, por defecto 15 %, con la lista configurable y por defecto 131049, 131048, 131031 y 368). Con `rejection_rate` llega adem\xE1s `rejection`: `codes` (los que llegaron a su umbral: `131049`, `131026` o `failed`), `rates` (el porcentaje de cada uno), `attempts` (los env\xEDos medidos) y `window_hours`. `quality` y `quality_baseline` son la calidad de Meta le\xEDda en el control y la del inicio del env\xEDo (`GREEN`, `YELLOW`, `RED`), o `null` si no se pudo leer. `template` es `{name, status}` con el nombre de la plantilla y su estado en Meta cuando `reason` es `template_unavailable`, y `null` en las dem\xE1s pausas (por calidad o por rechazos). Con `rejection_rate` el n\xFAmero adem\xE1s queda frenado 7 d\xEDas (configurable): mientras dure no se pueden crear, ejecutar ni reanudar campa\xF1as desde ese n\xFAmero, ni mandar plantillas a contactos que no le escribieron en las \xFAltimas 24 horas, y solo soporte lo levanta antes. S\xF3lo las campa\xF1as con env\xEDo inteligente se pausan solas. Reanudar la campa\xF1a y que se pause otra vez emite otro evento." },
|
|
1592
1667
|
{ "type": "campaign.no_groups_available", "domains": ["communities"], "status": "live", "pending": true, "description": "A campaign has no groups to send the people who come through its link to." },
|
|
1593
1668
|
{ "type": "campaign.status_changed", "domains": ["communities"], "status": "live", "pending": false, "description": "Una campa\xF1a se activ\xF3 o se paus\xF3." },
|
|
1594
1669
|
{ "type": "contact.created", "domains": ["conversations"], "status": "live", "pending": false, "description": "Se cre\xF3 un contacto nuevo en la cuenta.\n\nSe env\xEDa un evento por cada contacto nuevo, sea cual sea el canal: un mensaje entrante, la creaci\xF3n manual, una importaci\xF3n o la API. No se env\xEDa cuando el contacto ya exist\xEDa y s\xF3lo se actualiza, ni para los contactos que la plataforma crea para sus propias notificaciones. En importaciones grandes el l\xEDmite de volumen de la cuenta puede descartar parte de los eventos." },
|
|
1595
1670
|
{ "type": "contact.stage_changed", "domains": ["conversations"], "status": "live", "pending": false, "description": "Un contacto cambi\xF3 de etapa en un tablero.\n\nSe env\xEDa un evento por cada contacto que cambia de etapa en un tablero por etapas. `kind` es entry (entra al tablero, `from_stage` es null), move (pasa de una etapa a otra), exit (sale del tablero, `to_stage` es null) o stage_deleted (se reubica porque su etapa se borr\xF3; el nombre de la etapa borrada es null). No se env\xEDa si el contacto se coloca en la etapa en la que ya estaba." },
|
|
1596
1671
|
{ "type": "contact.tag_added", "domains": ["conversations"], "status": "live", "pending": false, "description": "Un contacto recibi\xF3 una etiqueta.\n\nSe env\xEDa un evento por cada contacto y etiqueta agregados, tambi\xE9n en operaciones en bloque; no se env\xEDa si el contacto ya ten\xEDa la etiqueta. `source` indica el origen: manual, flow, bulk, import, sync, walink o ai. En operaciones en bloque grandes el l\xEDmite de volumen de la cuenta puede descartar parte de los eventos." },
|
|
1597
|
-
{ "type": "contact.tag_removed", "domains": ["conversations"], "status": "live", "pending": false, "description": "Un contacto perdi\xF3 una etiqueta.\n\nSe env\xEDa un evento por cada contacto y etiqueta quitados, tambi\xE9n en operaciones en bloque; no se env\xEDa si el contacto no ten\xEDa la etiqueta. No se env\xEDa al borrar la etiqueta, al borrar o fusionar contactos ni al desvincular etiquetas de un tablero. `source` indica el origen: manual, flow o
|
|
1672
|
+
{ "type": "contact.tag_removed", "domains": ["conversations"], "status": "live", "pending": false, "description": "Un contacto perdi\xF3 una etiqueta.\n\nSe env\xEDa un evento por cada contacto y etiqueta quitados, tambi\xE9n en operaciones en bloque; no se env\xEDa si el contacto no ten\xEDa la etiqueta. No se env\xEDa al borrar la etiqueta, al borrar o fusionar contactos ni al desvincular etiquetas de un tablero. `source` indica el origen: manual, flow, bulk o ai. En operaciones en bloque grandes el l\xEDmite de volumen de la cuenta puede descartar parte de los eventos." },
|
|
1598
1673
|
{ "type": "conversation.assigned", "domains": ["conversations"], "status": "live", "pending": false, "description": "Una conversaci\xF3n qued\xF3 asignada a una persona del equipo o a un agente de IA.\n\nSe env\xEDa cuando una conversaci\xF3n queda asignada a una persona del equipo (`assignee.type` = `human`) o a un agente de IA (`assignee.type` = `ai`), por cualquier camino. `assignee` trae el tipo y el nombre, nunca un identificador. No se env\xEDa al desasignar, ni cuando se vuelve a enviar el mismo asignado." },
|
|
1599
1674
|
{ "type": "conversation.closed", "domains": ["conversations"], "status": "live", "pending": false, "description": "Una conversaci\xF3n pas\xF3 a cerrada.\n\nSe env\xEDa cuando una conversaci\xF3n pasa de abierta a cerrada. No se env\xEDa si la conversaci\xF3n ya estaba cerrada ni cuando se reabre." },
|
|
1600
1675
|
{ "type": "daily_report.generated", "domains": ["communities"], "status": "live", "pending": true, "description": "The daily report of the account was generated (clicks, joins and leaves)." },
|
|
1601
1676
|
{ "type": "device.connected", "domains": ["accounts"], "status": "live", "pending": true, "description": "One of the numbers of the account got connected: by scanning the QR code, by finishing the sign-up of a WhatsApp Cloud number, or through a connect link." },
|
|
1602
|
-
{ "type": "device.deleted", "domains": ["accounts"], "status": "
|
|
1677
|
+
{ "type": "device.deleted", "domains": ["accounts"], "status": "live", "pending": true, "description": "A number of the account was deleted (from the panel, the API, or because a connect link expired without connecting it): its slot of the plan is free again." },
|
|
1603
1678
|
{ "type": "device.disconnected", "domains": ["accounts"], "status": "live", "pending": true, "description": "One of the numbers of the account disconnected and can no longer send or receive: a QR session that closed or was protected from a shadow ban, an official number that failed its re-registration, or one disconnected from the panel." },
|
|
1604
|
-
{ "type": "device.
|
|
1679
|
+
{ "type": "device.display_name_reviewed", "domains": ["accounts"], "status": "live", "pending": true, "description": "Meta approved or rejected the display name of an official number." },
|
|
1680
|
+
{ "type": "device.health_changed", "domains": ["accounts"], "status": "live", "pending": true, "description": "The health of an official number changed (what Meta lets it do). Emitted only when the overall state changes." },
|
|
1681
|
+
{ "type": "device.messaging_limit_changed", "domains": ["accounts"], "status": "live", "pending": true, "description": "The messaging limit Meta gives an official number changed: how many different people it can start a conversation with per day (`TIER_250`, `TIER_1K`, `TIER_2K`, `TIER_10K`, `TIER_100K` or `TIER_UNLIMITED`). Meta sets it per business: one notice per number of the account that changed." },
|
|
1682
|
+
{ "type": "device.quality_changed", "domains": ["accounts"], "status": "live", "pending": true, "description": "The quality Meta gives an official number changed (`GREEN`, `YELLOW` or `RED`, as Meta sends them). If it drops, slow down the sends of that number before Meta limits it. Once per change; not when Meta has no quality data." },
|
|
1605
1683
|
{ "type": "flow.completed", "domains": ["conversations"], "status": "live", "pending": false, "description": "Un contacto termin\xF3 un flujo de automatizaci\xF3n.\n\nSe env\xEDa una sola vez por cada ejecuci\xF3n de un flujo, cuando termina con \xE9xito. No se env\xEDa si la ejecuci\xF3n se cort\xF3, se cancel\xF3, qued\xF3 bloqueada o fall\xF3. `contact` es `null` si la ejecuci\xF3n no tiene un contacto asociado. Un flujo muy usado puede generar muchos eventos seguidos." },
|
|
1606
1684
|
{ "type": "flow.failed", "domains": ["conversations"], "status": "live", "pending": false, "description": "La ejecuci\xF3n de un flujo para un contacto termin\xF3 por un error.\n\nSe env\xEDa una sola vez por cada ejecuci\xF3n de un flujo que termina por un error, no porque lleg\xF3 al final. `reason` indica el motivo y toma uno de estos valores: `node_missing` (el paso a ejecutar ya no existe), `unknown_node_type` (el paso es de un tipo no reconocido), `missing_subflow` (el flujo que deb\xEDa ejecutarse dentro de otro ya no existe), `malformed_node` (el paso tiene una configuraci\xF3n da\xF1ada), `loop_detected` (la ejecuci\xF3n dio vueltas sin esperar nada) y `execution_error` (un error inesperado detuvo la ejecuci\xF3n). No se env\xEDa si la ejecuci\xF3n se cancel\xF3, qued\xF3 bloqueada o se cort\xF3 porque se edit\xF3 el flujo o se unieron contactos. `contact` es `null` si la ejecuci\xF3n no tiene un contacto asociado." },
|
|
1685
|
+
{ "type": "group_action.completed", "domains": ["communities"], "status": "live", "pending": true, "description": "A group action asked through the API finished, such as a message to a group. `action.uuid` is the `action_id` it returned; sending, `result.message.uid` is the id of the message in WhatsApp." },
|
|
1607
1686
|
{ "type": "group_action.failed", "domains": ["communities"], "status": "live", "pending": true, "description": "An action on a group of a campaign failed." },
|
|
1608
1687
|
{ "type": "group_join_request.created", "domains": ["communities"], "status": "live", "pending": true, "description": "Someone asked to join a group that requires approval." },
|
|
1609
1688
|
{ "type": "group_join_request.revoked", "domains": ["communities"], "status": "live", "pending": true, "description": "Someone withdrew their request to join a group." },
|
|
1610
|
-
{ "type": "group_participant.joined", "domains": ["communities"], "status": "live", "pending":
|
|
1611
|
-
{ "type": "group_participant.left", "domains": ["communities"], "status": "live", "pending":
|
|
1689
|
+
{ "type": "group_participant.joined", "domains": ["communities"], "status": "live", "pending": true, "description": "A person joined one of the account's groups." },
|
|
1690
|
+
{ "type": "group_participant.left", "domains": ["communities"], "status": "live", "pending": true, "description": "A person left one of the account's groups." },
|
|
1612
1691
|
{ "type": "group.blocked", "domains": ["communities"], "status": "live", "pending": false, "description": "Un grupo qued\xF3 inoperable: sin administrador conectado, con el link de invitaci\xF3n inv\xE1lido o suspendido por WhatsApp." },
|
|
1613
1692
|
{ "type": "group.created", "domains": ["communities"], "status": "live", "pending": false, "description": "Se cre\xF3 o se import\xF3 un grupo dentro de una campa\xF1a de la cuenta." },
|
|
1614
1693
|
{ "type": "group.full", "domains": ["communities"], "status": "live", "pending": true, "description": "A group went from not full to full." },
|
|
@@ -1620,9 +1699,9 @@ var webhookEvents = [
|
|
|
1620
1699
|
{ "type": "mac.expiring", "domains": ["accounts"], "status": "live", "pending": true, "description": "Some monthly active contacts expire in the next 7 days." },
|
|
1621
1700
|
{ "type": "mac.usage_100", "domains": ["accounts"], "status": "live", "pending": true, "description": "The account used up its monthly active contacts of the cycle; a 24-hour grace period starts." },
|
|
1622
1701
|
{ "type": "mac.usage_80", "domains": ["accounts"], "status": "live", "pending": true, "description": "The account reached 80% of its monthly active contacts of the cycle." },
|
|
1623
|
-
{ "type": "message.received", "domains": ["conversations"], "status": "live", "pending":
|
|
1702
|
+
{ "type": "message.received", "domains": ["conversations"], "status": "live", "pending": true, "description": "A contact wrote to one of the WhatsApp numbers of the account." },
|
|
1624
1703
|
{ "type": "message.status_changed", "domains": ["conversations"], "status": "live", "pending": true, "description": "The delivery status of a message you sent with the API changed. One notice per transition, never one that goes back; `queued` is not reported. It must be asked for explicitly in `events`." },
|
|
1625
|
-
{ "type": "pipeline.finished", "domains": ["communities"], "status": "live", "pending": false, "description": "Termin\xF3 un pipeline de operaciones sobre grupos, con su resultado agregado." },
|
|
1704
|
+
{ "type": "pipeline.finished", "domains": ["communities"], "status": "live", "pending": false, "description": "Termin\xF3 un pipeline de operaciones sobre grupos, con su resultado agregado y la clave de idempotencia del pedido que lo origin\xF3, cuando la hay." },
|
|
1626
1705
|
{ "type": "poll.voted", "domains": ["communities"], "status": "live", "pending": false, "description": "Un participante vot\xF3 en una encuesta enviada a un grupo, o cambi\xF3 su voto." },
|
|
1627
1706
|
{ "type": "scheduled_message.finished", "domains": ["communities"], "status": "live", "pending": false, "description": "Un env\xEDo programado termin\xF3, con su resultado agregado." },
|
|
1628
1707
|
{ "type": "scheduled_message.group_delivery_failed", "domains": ["communities"], "status": "live", "pending": false, "description": "Un env\xEDo programado fall\xF3 en un grupo concreto, con el motivo desagregado." },
|
|
@@ -1637,6 +1716,6 @@ var webhookEvents = [
|
|
|
1637
1716
|
{ "type": "whatsapp_form.completed", "domains": ["conversations"], "status": "live", "pending": true, "description": "A contact completed a form you sent them." }
|
|
1638
1717
|
];
|
|
1639
1718
|
|
|
1640
|
-
export { ACCESS_ERROR_CODES, APIConnectionError, APIConnectionTimeoutError, APIError, APIPromise, APIUserAbortError, AuthenticationError, BASE_URLS, BadRequestError, ConflictError, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT_MS, DEFAULT_TOLERANCE_SECONDS, Funnelchat, FunnelchatError, IDEMPOTENCY_ERROR_CODES, InternalServerError, NUMBER_ERROR_CODES, NotFoundError, Page, PagePromise, PermissionDeniedError, REQUEST_ID_HEADER, RateLimitError, SEND_ERROR_CODES, SIGNATURE_HEADER, UnprocessableEntityError, UnsupportedMediaTypeError, VERSION, WebhookVerificationError, constructEvent, Funnelchat as default, isNumberQuotaError, isSendRuleError, routes, verify, webhookEvents };
|
|
1719
|
+
export { ACCESS_ERROR_CODES, APIConnectionError, APIConnectionTimeoutError, APIError, APIPromise, APIUserAbortError, AuthenticationError, BASE_URLS, BadRequestError, ConflictError, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT_MS, DEFAULT_TOLERANCE_SECONDS, Funnelchat, FunnelchatError, GROUP_ACTION_ERROR_CODES, IDEMPOTENCY_ERROR_CODES, InternalServerError, NUMBER_ERROR_CODES, NotFoundError, Page, PagePromise, PermissionDeniedError, REQUEST_ID_HEADER, RateLimitError, SEND_ERROR_CODES, SIGNATURE_HEADER, UnprocessableEntityError, UnsupportedMediaTypeError, VERSION, WebhookVerificationError, constructEvent, Funnelchat as default, isNumberQuotaError, isSendRuleError, routes, verify, webhookEvents };
|
|
1641
1720
|
//# sourceMappingURL=index.js.map
|
|
1642
1721
|
//# sourceMappingURL=index.js.map
|