@botozap/sdk 0.20.1 → 0.23.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/CHANGELOG.md +60 -0
- package/README.md +60 -3
- package/dist/index.cjs +298 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +574 -5
- package/dist/index.d.ts +574 -5
- package/dist/index.js +298 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
/** Status de uma mensagem no envio. A API pode evoluir os valores. */
|
|
2
|
+
/**
|
|
3
|
+
* Status da mensagem enviada. Mensagem de voz ouvida continua `read` (o
|
|
4
|
+
* momento fica em `Message.played_at` e no evento `whatsapp.message.played`).
|
|
5
|
+
*/
|
|
2
6
|
type MessageStatus = "sent" | "delivered" | "read" | "failed" | string;
|
|
7
|
+
/**
|
|
8
|
+
* Mensagem citada (resposta citando). `message_id` é o UUID interno da citada,
|
|
9
|
+
* `null` quando ela não está no histórico do BotoZap; `external_id` é o id do
|
|
10
|
+
* canal (wamid no WhatsApp, mid no Instagram).
|
|
11
|
+
*/
|
|
12
|
+
interface MessageReplyTo {
|
|
13
|
+
message_id: string | null;
|
|
14
|
+
external_id: string;
|
|
15
|
+
}
|
|
16
|
+
/** Citação pedida no envio: `message_id` aceita o UUID interno ou o wamid/mid da mensagem citada. */
|
|
17
|
+
interface ReplyToParam {
|
|
18
|
+
message_id: string;
|
|
19
|
+
}
|
|
3
20
|
/** Canal de uma mensagem/Conta de canal. Valores novos podem surgir. */
|
|
4
21
|
type MessageChannel = "whatsapp" | "instagram" | (string & {});
|
|
5
22
|
/**
|
|
@@ -39,6 +56,11 @@ interface SendResult {
|
|
|
39
56
|
type?: "reaction" | "interactive" | "text" | "image" | "video" | "audio" | "document" | (string & {});
|
|
40
57
|
/** Só em reação: alvo e ação (`react`/`unreact`). */
|
|
41
58
|
reaction?: SendReactionResult;
|
|
59
|
+
/** Só quando o envio citou outra mensagem (`reply_to`). */
|
|
60
|
+
reply_to?: {
|
|
61
|
+
message_id: string;
|
|
62
|
+
external_id: string;
|
|
63
|
+
};
|
|
42
64
|
}
|
|
43
65
|
/** Eco de `POST /v1/messages` com `type: "reaction"`. */
|
|
44
66
|
interface SendReactionResult {
|
|
@@ -198,6 +220,15 @@ interface Message {
|
|
|
198
220
|
created_at?: string;
|
|
199
221
|
/** Data real da mensagem no canal; `null` quando desconhecida. Chave de `sort=event_at`. */
|
|
200
222
|
event_at?: string | null;
|
|
223
|
+
/** Mensagem citada por esta (resposta citando); `null` quando não cita. */
|
|
224
|
+
reply_to?: MessageReplyTo | null;
|
|
225
|
+
/**
|
|
226
|
+
* Mensagem de voz enviada (`voice: true`): quando o contato ouviu pela
|
|
227
|
+
* primeira vez. O status continua `read`.
|
|
228
|
+
*/
|
|
229
|
+
played_at?: string | null;
|
|
230
|
+
/** Áudio recebido: transcrição que a IA já fez; `null` quando não há. */
|
|
231
|
+
transcription?: string | null;
|
|
201
232
|
[key: string]: unknown;
|
|
202
233
|
}
|
|
203
234
|
interface Broadcast {
|
|
@@ -465,7 +496,11 @@ interface BotoZapEvent {
|
|
|
465
496
|
* `content.edited`) em `data.message`; `instagram.message.revoked` traz
|
|
466
497
|
* `data.message.revoked_at`, sem o conteúdo apagado.
|
|
467
498
|
* `instagram.message_rule.failed` registra uma falha de automação e pode
|
|
468
|
-
* ter `message_id: null` (referral sem mensagem).
|
|
499
|
+
* ter `message_id: null` (referral sem mensagem). Status de envio do
|
|
500
|
+
* WhatsApp: `whatsapp.message.sent`, `.delivered`, `.read`, `.failed` e
|
|
501
|
+
* `.played` (o contato ouviu uma mensagem de voz enviada com `voice: true`;
|
|
502
|
+
* a mensagem fica com status `read` e `played_at` preenchido). Valores novos
|
|
503
|
+
* podem surgir.
|
|
469
504
|
*/
|
|
470
505
|
type: string;
|
|
471
506
|
/**
|
|
@@ -666,7 +701,7 @@ type AiProviderInfo = {
|
|
|
666
701
|
declare const AI_PURPOSES: readonly ["default", "agent_turn", "agent_operator", "router", "followup", "proposal", "transcription", "embedding", "guard", "evaluator", "classification", "compaction", "case_chat", "learning_judge", "learning_distiller", "vision", "commercial_proposal"];
|
|
667
702
|
type AiPurpose = (typeof AI_PURPOSES)[number];
|
|
668
703
|
/** Purposes bound in Providers; agent_turn/agent_operator/router come from the agent version or router. */
|
|
669
|
-
declare const AI_CONFIGURABLE_PURPOSES: ("
|
|
704
|
+
declare const AI_CONFIGURABLE_PURPOSES: ("transcription" | "default" | "followup" | "proposal" | "embedding" | "guard" | "evaluator" | "classification" | "compaction" | "case_chat" | "learning_judge" | "learning_distiller" | "vision" | "commercial_proposal")[];
|
|
670
705
|
type AiConfigurablePurpose = Exclude<AiPurpose, "agent_turn" | "agent_operator" | "router">;
|
|
671
706
|
type AiScope = {
|
|
672
707
|
customer_id: string;
|
|
@@ -720,7 +755,9 @@ type AiWindow = {
|
|
|
720
755
|
end: string;
|
|
721
756
|
weekdays: number[];
|
|
722
757
|
};
|
|
723
|
-
type AiToolId = "contacts.read" | "contacts.update" | "conversations.read" | "conversations.note" | "crm.opportunities.read" | "crm.opportunities.write" | "crm.demands.read" | "crm.demands.write" | "crm.stages.read" | "crm.stages.write" | "agenda.availability" | "agenda.propose" | "agenda.appointments.read" | "agenda.appointments.reschedule" | "agenda.appointments.cancel" | "knowledge.search" | "memory.read" | "memory.propose" | "skills.read" | "followups.enroll" | "followups.pause" | "followups.cancel" | "cases.open" | "cases.update" | "followups.schedule" | "followups.list" | "handoff" | "alerts.create" | "contacts.search" | "contacts.get" | "contacts.propose_update" | "conversations.list" | "conversations.get" | "conversations.history" | "conversations.assign" | "team.members.read" | "inbox.queue.read" | "tags.read" | "tags.manage" | "saved_replies.read" | "saved_replies.render" | "automations.read" | "automations.runs.read" | "radar.read" | "radar.propose_reactivation" | "catalog.products.search" | "privacy.consent.read" | "knowledge.sources.read" | "proposals.read" | "cases.read" | "crm.search" | "agenda.schedule.read" | "agenda.appointments.confirm" | "cases.note" | "cases.close"
|
|
758
|
+
type AiToolId = "contacts.read" | "contacts.update" | "conversations.read" | "conversations.note" | "crm.opportunities.read" | "crm.opportunities.write" | "crm.demands.read" | "crm.demands.write" | "crm.stages.read" | "crm.stages.write" | "agenda.availability" | "agenda.propose" | "agenda.appointments.read" | "agenda.appointments.reschedule" | "agenda.appointments.cancel" | "knowledge.search" | "memory.read" | "memory.propose" | "skills.read" | "followups.enroll" | "followups.pause" | "followups.cancel" | "cases.open" | "cases.update" | "followups.schedule" | "followups.list" | "handoff" | "alerts.create" | "contacts.search" | "contacts.get" | "contacts.propose_update" | "conversations.list" | "conversations.get" | "conversations.history" | "conversations.assign" | "team.members.read" | "inbox.queue.read" | "tags.read" | "tags.manage" | "saved_replies.read" | "saved_replies.render" | "automations.read" | "automations.runs.read" | "radar.read" | "radar.propose_reactivation" | "catalog.products.search" | "privacy.consent.read" | "knowledge.sources.read" | "proposals.read" | "cases.read" | "crm.search" | "agenda.schedule.read" | "agenda.appointments.confirm" | "cases.note" | "cases.close"
|
|
759
|
+
/** Opções para o contato tocar (botões ou lista), anexadas à resposta final do turno. Só o agente; o operador é recusado. */
|
|
760
|
+
| "conversations.reply_options";
|
|
724
761
|
/**
|
|
725
762
|
* Configuração do agente na ENTRADA (`ai.agents.create` e `saveDraft`): o
|
|
726
763
|
* provedor só pode ser `openai` ou `anthropic`. A leitura devolve
|
|
@@ -2083,6 +2120,39 @@ type AiCapabilityUsage = {
|
|
|
2083
2120
|
enabled: boolean;
|
|
2084
2121
|
};
|
|
2085
2122
|
};
|
|
2123
|
+
/** Situação de um item do diagnóstico; `unknown` = não pôde ser lido (nunca vira `ok`). */
|
|
2124
|
+
type AiDiagnosticStatus = "ok" | "warning" | "blocked" | "unknown";
|
|
2125
|
+
/** Item do diagnóstico do agente (`GET /ai/agents/:id/diagnostic`). */
|
|
2126
|
+
type AiDiagnosticCheck = {
|
|
2127
|
+
/** Ex.: `configuration`, `eligibility`, `knowledge_tool`, `knowledge_sources`, `audio`, `vision`, `self_tester`, `operation`, `publication`. */
|
|
2128
|
+
id: string;
|
|
2129
|
+
title: string;
|
|
2130
|
+
status: AiDiagnosticStatus;
|
|
2131
|
+
detail: string;
|
|
2132
|
+
/** Item que impede publicar quando não está `ok`. */
|
|
2133
|
+
blocking: boolean;
|
|
2134
|
+
/** Onde a pessoa corrige no painel: caminho (`/ia/provedores`) ou âncora (`#grupo-…`) da configuração do agente. */
|
|
2135
|
+
action: {
|
|
2136
|
+
href: string;
|
|
2137
|
+
label: string;
|
|
2138
|
+
} | null;
|
|
2139
|
+
};
|
|
2140
|
+
/** Diagnóstico do agente, o mesmo do painel. */
|
|
2141
|
+
type AiAgentDiagnostic = {
|
|
2142
|
+
agent_id: string;
|
|
2143
|
+
version_id: string | null;
|
|
2144
|
+
version_number: number | null;
|
|
2145
|
+
version_status: string | null;
|
|
2146
|
+
/** `false` quando algum item com `blocking: true` não está `ok`: a publicação seria recusada com `diagnostic_blocked`. */
|
|
2147
|
+
ready: boolean;
|
|
2148
|
+
checks: AiDiagnosticCheck[];
|
|
2149
|
+
/** Última prova de geração registrada; esta leitura nunca dispara uma prova. */
|
|
2150
|
+
generation_proof: {
|
|
2151
|
+
status: "never" | "ok" | "failed" | "unknown" | "running" | "stale";
|
|
2152
|
+
at: string | null;
|
|
2153
|
+
detail: string;
|
|
2154
|
+
};
|
|
2155
|
+
};
|
|
2086
2156
|
/** Each source reports its own status: an error is never shown as zero. */
|
|
2087
2157
|
type AiEvolutionSource<T> = {
|
|
2088
2158
|
status: "ok";
|
|
@@ -2283,6 +2353,14 @@ declare class AiAgentsResource {
|
|
|
2283
2353
|
id: string;
|
|
2284
2354
|
days?: number;
|
|
2285
2355
|
}): Promise<AiCapabilityUsage>;
|
|
2356
|
+
/**
|
|
2357
|
+
* Diagnóstico do agente, o mesmo do painel (rascunho, ou a versão publicada
|
|
2358
|
+
* sem rascunho). Só lê: não faz prova de geração nem chama o provedor.
|
|
2359
|
+
* `ready: false` é a regra que recusa a publicação com `diagnostic_blocked`.
|
|
2360
|
+
*/
|
|
2361
|
+
diagnostic(input: AiScope & {
|
|
2362
|
+
id: string;
|
|
2363
|
+
}): Promise<AiAgentDiagnostic>;
|
|
2286
2364
|
}
|
|
2287
2365
|
declare class AiCredentialsResource {
|
|
2288
2366
|
private readonly client;
|
|
@@ -3467,10 +3545,96 @@ interface JourneyEnrollment {
|
|
|
3467
3545
|
interface JourneyQuery extends Pick<CursorParams, "limit" | "after"> {
|
|
3468
3546
|
customer_id?: string;
|
|
3469
3547
|
}
|
|
3548
|
+
/** Segmento de negócio em que o modelo pronto aparece na galeria. */
|
|
3549
|
+
type JourneyCatalogSegment = "geral" | "salao" | "clinica" | "loja" | "oficina" | "servicos" | (string & {});
|
|
3550
|
+
/**
|
|
3551
|
+
* Gatilho do modelo pronto, como a galeria do painel o descreve (as chaves
|
|
3552
|
+
* vêm em camelCase, do jeito que a API devolve).
|
|
3553
|
+
*/
|
|
3554
|
+
type JourneyCatalogTrigger = {
|
|
3555
|
+
kind: "contact_date";
|
|
3556
|
+
dateFieldKey: string;
|
|
3557
|
+
dateFieldLabel: string;
|
|
3558
|
+
offsetDays: number;
|
|
3559
|
+
yearly: boolean;
|
|
3560
|
+
} | {
|
|
3561
|
+
kind: "stage_entered";
|
|
3562
|
+
stageKey: string;
|
|
3563
|
+
waitDays: number;
|
|
3564
|
+
} | {
|
|
3565
|
+
kind: "appointment";
|
|
3566
|
+
offsetHours: number;
|
|
3567
|
+
};
|
|
3568
|
+
/** Modelo pronto de Régua (`GET /v1/journeys/catalog`), o mesmo da galeria de Automações. */
|
|
3569
|
+
interface JourneyCatalogItem {
|
|
3570
|
+
/** Chave do modelo, usada em `journeys.enableModel`. */
|
|
3571
|
+
key: string;
|
|
3572
|
+
name: string;
|
|
3573
|
+
description: string;
|
|
3574
|
+
segments: JourneyCatalogSegment[];
|
|
3575
|
+
trigger: JourneyCatalogTrigger;
|
|
3576
|
+
category: "UTILITY" | "MARKETING";
|
|
3577
|
+
/** Nome do template que o modelo cria no número. */
|
|
3578
|
+
template_name: string;
|
|
3579
|
+
template_language: string;
|
|
3580
|
+
/** Texto do template, com variáveis `{{1}}`, `{{2}}`… */
|
|
3581
|
+
body: string;
|
|
3582
|
+
/** De onde vem cada variável (`"1"` → `contact.name`, por exemplo). */
|
|
3583
|
+
variable_map: Record<string, string>;
|
|
3584
|
+
/** Exemplo de cada variável enviado à Meta na análise do template. */
|
|
3585
|
+
examples: Record<string, string>;
|
|
3586
|
+
}
|
|
3587
|
+
/** Corpo de `journeys.enableModel`. */
|
|
3588
|
+
interface EnableJourneyModelParams {
|
|
3589
|
+
/** Cliente (negócio) que recebe a Régua. */
|
|
3590
|
+
customer_id: string;
|
|
3591
|
+
/**
|
|
3592
|
+
* Conexão (WABA) do número que envia. Com mais de um número no Cliente,
|
|
3593
|
+
* informe esta ou `phone_number_id`; sem nenhuma das duas a API responde
|
|
3594
|
+
* 422 `validation_error`.
|
|
3595
|
+
*/
|
|
3596
|
+
waba_connection_id?: string;
|
|
3597
|
+
/** `phone_number_id` da Meta do número que envia (alternativa a `waba_connection_id`). */
|
|
3598
|
+
phone_number_id?: string;
|
|
3599
|
+
}
|
|
3600
|
+
/** Resposta de `journeys.enableModel`: 201 quando cria a Régua, 200 quando ela já existia. */
|
|
3601
|
+
interface JourneyModelEnableResult {
|
|
3602
|
+
journey_id: string;
|
|
3603
|
+
/** `false` quando o modelo já tinha uma Régua não arquivada no Cliente (nada mudou). */
|
|
3604
|
+
created: boolean;
|
|
3605
|
+
/** O template do modelo foi enviado à Meta nesta chamada. */
|
|
3606
|
+
template_submitted: boolean;
|
|
3607
|
+
/** O template recusado foi reenviado à Meta e a Régua voltou a esperar a aprovação. */
|
|
3608
|
+
resubmitted: boolean;
|
|
3609
|
+
/** `true` com o template já aprovado; senão a Régua fica pausada (`pending_template`) e liga sozinha na aprovação. */
|
|
3610
|
+
active: boolean;
|
|
3611
|
+
}
|
|
3470
3612
|
declare class Journeys {
|
|
3471
3613
|
private readonly client;
|
|
3472
3614
|
constructor(client: BotoZap);
|
|
3473
3615
|
list(params?: JourneyQuery): Promise<CursorList<Journey>>;
|
|
3616
|
+
/**
|
|
3617
|
+
* Lista os modelos prontos de Régua, os mesmos da galeria de Automações do
|
|
3618
|
+
* painel, com gatilho, texto do template, `variable_map` e os `examples` que
|
|
3619
|
+
* vão à Meta. Scope `journeys:read`.
|
|
3620
|
+
*/
|
|
3621
|
+
catalog(): Promise<JourneyCatalogItem[]>;
|
|
3622
|
+
/**
|
|
3623
|
+
* Liga um modelo pronto no Cliente, como "Usar modelo" no painel: cria o
|
|
3624
|
+
* template do modelo no número e o envia à aprovação da Meta (reaproveita o
|
|
3625
|
+
* template se já existe), cria o campo de data do modelo e a Régua. Com o
|
|
3626
|
+
* template aprovado a Régua já nasce ativa e pode enviar mensagens
|
|
3627
|
+
* automáticas; senão fica pausada (`pending_template`) e liga sozinha na
|
|
3628
|
+
* aprovação. Se o modelo já tem Régua no Cliente, responde `created: false`
|
|
3629
|
+
* sem mudar nada, exceto quando ela está pausada com `template_rejected`: aí
|
|
3630
|
+
* reenvia o template (`resubmitted: true`).
|
|
3631
|
+
*
|
|
3632
|
+
* Scope `journeys:write`; exige plano com automações (403 `plan_restricted`).
|
|
3633
|
+
* Recusas: `not_found` (modelo, Cliente ou número), `validation_error` (422,
|
|
3634
|
+
* falta `customer_id` ou o número com mais de um no Cliente), `not_connected`
|
|
3635
|
+
* (409), `meta_error` (422 recusa da Meta; 502 Meta indisponível).
|
|
3636
|
+
*/
|
|
3637
|
+
enableModel(key: string, params: EnableJourneyModelParams): Promise<JourneyModelEnableResult>;
|
|
3474
3638
|
get(id: string, params?: {
|
|
3475
3639
|
customer_id?: string;
|
|
3476
3640
|
}): Promise<Journey>;
|
|
@@ -3798,6 +3962,13 @@ interface SendTextParams {
|
|
|
3798
3962
|
* 24h). No WhatsApp a API recusa com 422 `channel_not_supported`.
|
|
3799
3963
|
*/
|
|
3800
3964
|
quick_replies?: QuickReply[];
|
|
3965
|
+
/**
|
|
3966
|
+
* Responde citando uma mensagem da mesma conversa: `{ message_id }` com o
|
|
3967
|
+
* UUID interno ou o wamid/mid da citada. Fora da conversa: 422
|
|
3968
|
+
* `reply_target_not_found`; reação, apagada ou envio que não saiu: 422
|
|
3969
|
+
* `reply_target_unavailable`.
|
|
3970
|
+
*/
|
|
3971
|
+
reply_to?: ReplyToParam;
|
|
3801
3972
|
}
|
|
3802
3973
|
interface SendTemplateParams {
|
|
3803
3974
|
to: string;
|
|
@@ -3812,6 +3983,13 @@ interface SendTemplateParams {
|
|
|
3812
3983
|
* (botão do pedido de consentimento ou Palavra de volta).
|
|
3813
3984
|
*/
|
|
3814
3985
|
consent_basis?: string;
|
|
3986
|
+
/**
|
|
3987
|
+
* Responde citando uma mensagem da mesma conversa: `{ message_id }` com o
|
|
3988
|
+
* UUID interno ou o wamid/mid da citada. Fora da conversa: 422
|
|
3989
|
+
* `reply_target_not_found`; reação, apagada ou envio que não saiu: 422
|
|
3990
|
+
* `reply_target_unavailable`.
|
|
3991
|
+
*/
|
|
3992
|
+
reply_to?: ReplyToParam;
|
|
3815
3993
|
}
|
|
3816
3994
|
interface SendImageParams {
|
|
3817
3995
|
to: string;
|
|
@@ -3819,12 +3997,33 @@ interface SendImageParams {
|
|
|
3819
3997
|
link: string;
|
|
3820
3998
|
caption?: string;
|
|
3821
3999
|
from?: string;
|
|
4000
|
+
/**
|
|
4001
|
+
* Responde citando uma mensagem da mesma conversa: `{ message_id }` com o
|
|
4002
|
+
* UUID interno ou o wamid/mid da citada. Fora da conversa: 422
|
|
4003
|
+
* `reply_target_not_found`; reação, apagada ou envio que não saiu: 422
|
|
4004
|
+
* `reply_target_unavailable`.
|
|
4005
|
+
*/
|
|
4006
|
+
reply_to?: ReplyToParam;
|
|
3822
4007
|
}
|
|
3823
4008
|
interface SendAudioParams {
|
|
3824
4009
|
to: string;
|
|
3825
4010
|
type: "audio";
|
|
3826
4011
|
link: string;
|
|
3827
4012
|
from?: string;
|
|
4013
|
+
/**
|
|
4014
|
+
* Mensagem de voz do WhatsApp (ícone de microfone, "ouvida" volta em
|
|
4015
|
+
* `whatsapp.message.played`). O arquivo precisa ser .ogg com codec Opus
|
|
4016
|
+
* (mono); link com outro tipo responde 422 `invalid_voice`. No Instagram,
|
|
4017
|
+
* 422 `unsupported_voice`.
|
|
4018
|
+
*/
|
|
4019
|
+
voice?: boolean;
|
|
4020
|
+
/**
|
|
4021
|
+
* Responde citando uma mensagem da mesma conversa: `{ message_id }` com o
|
|
4022
|
+
* UUID interno ou o wamid/mid da citada. Fora da conversa: 422
|
|
4023
|
+
* `reply_target_not_found`; reação, apagada ou envio que não saiu: 422
|
|
4024
|
+
* `reply_target_unavailable`.
|
|
4025
|
+
*/
|
|
4026
|
+
reply_to?: ReplyToParam;
|
|
3828
4027
|
}
|
|
3829
4028
|
interface SendVideoParams {
|
|
3830
4029
|
to: string;
|
|
@@ -3832,6 +4031,13 @@ interface SendVideoParams {
|
|
|
3832
4031
|
link: string;
|
|
3833
4032
|
caption?: string;
|
|
3834
4033
|
from?: string;
|
|
4034
|
+
/**
|
|
4035
|
+
* Responde citando uma mensagem da mesma conversa: `{ message_id }` com o
|
|
4036
|
+
* UUID interno ou o wamid/mid da citada. Fora da conversa: 422
|
|
4037
|
+
* `reply_target_not_found`; reação, apagada ou envio que não saiu: 422
|
|
4038
|
+
* `reply_target_unavailable`.
|
|
4039
|
+
*/
|
|
4040
|
+
reply_to?: ReplyToParam;
|
|
3835
4041
|
}
|
|
3836
4042
|
interface SendDocumentParams {
|
|
3837
4043
|
to: string;
|
|
@@ -3840,6 +4046,13 @@ interface SendDocumentParams {
|
|
|
3840
4046
|
caption?: string;
|
|
3841
4047
|
filename?: string;
|
|
3842
4048
|
from?: string;
|
|
4049
|
+
/**
|
|
4050
|
+
* Responde citando uma mensagem da mesma conversa: `{ message_id }` com o
|
|
4051
|
+
* UUID interno ou o wamid/mid da citada. Fora da conversa: 422
|
|
4052
|
+
* `reply_target_not_found`; reação, apagada ou envio que não saiu: 422
|
|
4053
|
+
* `reply_target_unavailable`.
|
|
4054
|
+
*/
|
|
4055
|
+
reply_to?: ReplyToParam;
|
|
3843
4056
|
}
|
|
3844
4057
|
/**
|
|
3845
4058
|
* Mídia por URL pública. `to` aceita telefone/BSUID (WhatsApp) ou IGSID
|
|
@@ -3965,6 +4178,13 @@ interface SendInteractiveParams {
|
|
|
3965
4178
|
from?: string;
|
|
3966
4179
|
/** Instagram: exceção human_agent, sujeita à flag e janela da API. */
|
|
3967
4180
|
tag?: "human_agent";
|
|
4181
|
+
/**
|
|
4182
|
+
* Responde citando uma mensagem da mesma conversa: `{ message_id }` com o
|
|
4183
|
+
* UUID interno ou o wamid/mid da citada. Fora da conversa: 422
|
|
4184
|
+
* `reply_target_not_found`; reação, apagada ou envio que não saiu: 422
|
|
4185
|
+
* `reply_target_unavailable`.
|
|
4186
|
+
*/
|
|
4187
|
+
reply_to?: ReplyToParam;
|
|
3968
4188
|
}
|
|
3969
4189
|
interface SendLocationParams {
|
|
3970
4190
|
to: string;
|
|
@@ -3973,6 +4193,13 @@ interface SendLocationParams {
|
|
|
3973
4193
|
name?: string;
|
|
3974
4194
|
address?: string;
|
|
3975
4195
|
from?: string;
|
|
4196
|
+
/**
|
|
4197
|
+
* Responde citando uma mensagem da mesma conversa: `{ message_id }` com o
|
|
4198
|
+
* UUID interno ou o wamid/mid da citada. Fora da conversa: 422
|
|
4199
|
+
* `reply_target_not_found`; reação, apagada ou envio que não saiu: 422
|
|
4200
|
+
* `reply_target_unavailable`.
|
|
4201
|
+
*/
|
|
4202
|
+
reply_to?: ReplyToParam;
|
|
3976
4203
|
}
|
|
3977
4204
|
interface SendReactionParams {
|
|
3978
4205
|
to: string;
|
|
@@ -4448,6 +4675,11 @@ interface ReplyConversationParams {
|
|
|
4448
4675
|
text: string;
|
|
4449
4676
|
/** Opções de resposta (só em Conversas do Instagram; ver `messages.send`). */
|
|
4450
4677
|
quick_replies?: QuickReply[];
|
|
4678
|
+
/**
|
|
4679
|
+
* Responde citando uma mensagem desta conversa: `{ message_id }` com o UUID
|
|
4680
|
+
* interno ou o wamid/mid da citada (ver `messages.send`).
|
|
4681
|
+
*/
|
|
4682
|
+
reply_to?: ReplyToParam;
|
|
4451
4683
|
}
|
|
4452
4684
|
/** Corpo opcional de `conversations.requestConsent`. */
|
|
4453
4685
|
interface RequestConsentParams {
|
|
@@ -4456,6 +4688,24 @@ interface RequestConsentParams {
|
|
|
4456
4688
|
/** Texto do pedido (até 1024 caracteres). Padrão: o texto padrão do BotoZap. */
|
|
4457
4689
|
body?: string;
|
|
4458
4690
|
}
|
|
4691
|
+
/** Resposta de `conversations.typing` (200). */
|
|
4692
|
+
interface ConversationTypingResult {
|
|
4693
|
+
conversation_id: string;
|
|
4694
|
+
/** Canal da Conversa. */
|
|
4695
|
+
channel: MessageChannel;
|
|
4696
|
+
typing: true;
|
|
4697
|
+
/**
|
|
4698
|
+
* `true` quando a chamada repetiu outra de menos de 20 s: a Meta não foi
|
|
4699
|
+
* chamada de novo e o indicador que já estava valendo continua.
|
|
4700
|
+
*/
|
|
4701
|
+
repeated: boolean;
|
|
4702
|
+
}
|
|
4703
|
+
/** Resposta de `conversations.markRead` (200). */
|
|
4704
|
+
interface ConversationReadResult {
|
|
4705
|
+
conversation_id: string;
|
|
4706
|
+
/** Momento da leitura gravado (ISO 8601). */
|
|
4707
|
+
last_read_at: string;
|
|
4708
|
+
}
|
|
4459
4709
|
/** Conversas (read + status) e atribuições a membros. */
|
|
4460
4710
|
declare class Conversations {
|
|
4461
4711
|
private readonly client;
|
|
@@ -4492,6 +4742,33 @@ declare class Conversations {
|
|
|
4492
4742
|
* conferir o histórico da conversa.
|
|
4493
4743
|
*/
|
|
4494
4744
|
requestConsent(id: string, params?: RequestConsentParams): Promise<ConsentRequestResult>;
|
|
4745
|
+
/**
|
|
4746
|
+
* Mostra "digitando…" ao contato enquanto a integração prepara a resposta,
|
|
4747
|
+
* como o Painel quando o atendente digita. O sinal vai na última mensagem
|
|
4748
|
+
* recebida do contato, que fica como lida (tiques azuis no WhatsApp, "visto"
|
|
4749
|
+
* no Instagram); a Meta tira o indicador quando a resposta sai ou em ~25 s.
|
|
4750
|
+
* Repetir em menos de 20 s não chama a Meta de novo (`repeated: true`); para
|
|
4751
|
+
* uma resposta demorada, chame de novo a cada 20 s. Sem corpo. Scope
|
|
4752
|
+
* `messages:send`; não aceita chave sandbox.
|
|
4753
|
+
*
|
|
4754
|
+
* Recusas: `no_inbound_message` (409, a conversa não tem mensagem recebida:
|
|
4755
|
+
* template e primeira mensagem não têm "digitando…"), `outside_window`
|
|
4756
|
+
* (WhatsApp) ou `window_closed` (Instagram) com a janela de 24h fechada (422),
|
|
4757
|
+
* `not_connected` (409), `meta_error` (422 na recusa da Meta, 502 se ela
|
|
4758
|
+
* falhar; a resposta em si pode ser enviada normalmente) e `not_found` (404).
|
|
4759
|
+
*/
|
|
4760
|
+
typing(id: string): Promise<ConversationTypingResult>;
|
|
4761
|
+
/**
|
|
4762
|
+
* Marca a conversa como lida, como abrir a conversa no Painel: grava
|
|
4763
|
+
* `last_read_at` (a conversa deixa de aparecer como não lida) e, logo depois
|
|
4764
|
+
* da resposta, a última mensagem recebida fica como lida para o contato
|
|
4765
|
+
* (tiques azuis no WhatsApp, "visto" no Instagram). A mesma mensagem não é
|
|
4766
|
+
* marcada duas vezes na Meta: repetir só atualiza `last_read_at`. O aviso ao
|
|
4767
|
+
* contato é de melhor esforço (canal desconectado ou recusa da Meta não mudam
|
|
4768
|
+
* a resposta). Sem corpo. Scope `conversations:write`; aceita chave sandbox
|
|
4769
|
+
* (grava a leitura sem avisar a Meta).
|
|
4770
|
+
*/
|
|
4771
|
+
markRead(id: string): Promise<ConversationReadResult>;
|
|
4495
4772
|
/**
|
|
4496
4773
|
* Exclui a conversa, com efeito imediato e sem volta: mensagens, notas,
|
|
4497
4774
|
* atribuições, vínculos com oportunidades e demandas e o que a IA guardou
|
|
@@ -4590,9 +4867,226 @@ interface UpdatePhoneNumberParams {
|
|
|
4590
4867
|
*/
|
|
4591
4868
|
label: string | null;
|
|
4592
4869
|
}
|
|
4870
|
+
/**
|
|
4871
|
+
* Categoria do negócio no perfil do WhatsApp (`vertical`, enum da Meta).
|
|
4872
|
+
* Valor fora do enum documentado vem como `null` na leitura.
|
|
4873
|
+
*/
|
|
4874
|
+
type WhatsAppBusinessVertical = "AUTO" | "ALCOHOL" | "BEAUTY" | "RESTAURANT" | "ONLINE_GAMBLING" | "PHYSICAL_GAMBLING" | "EDU" | "ENTERTAIN" | "EVENT_PLAN" | "FINANCE" | "GOVT" | "HOTEL" | "NONPROFIT" | "OTC_DRUGS" | "GROCERY" | "HEALTH" | "PROF_SERVICES" | "RETAIL" | "APPAREL" | "TRAVEL" | "OTHER";
|
|
4875
|
+
/** Perfil do WhatsApp do número, lido na Meta a cada chamada (`GET …/profile`). */
|
|
4876
|
+
interface WhatsAppBusinessProfile {
|
|
4877
|
+
/** "Sobre" (1 a 139 caracteres). */
|
|
4878
|
+
about: string | null;
|
|
4879
|
+
address: string | null;
|
|
4880
|
+
description: string | null;
|
|
4881
|
+
email: string | null;
|
|
4882
|
+
websites: string[];
|
|
4883
|
+
vertical: WhatsAppBusinessVertical | null;
|
|
4884
|
+
/** URL temporária da foto no CDN da Meta. */
|
|
4885
|
+
profile_picture_url: string | null;
|
|
4886
|
+
/**
|
|
4887
|
+
* `false` em coexistência (número também no app WhatsApp Business do
|
|
4888
|
+
* celular): a Meta não aceita mudar o perfil pela API; edite pelo app.
|
|
4889
|
+
*/
|
|
4890
|
+
editable: boolean;
|
|
4891
|
+
}
|
|
4892
|
+
/**
|
|
4893
|
+
* Corpo de `phoneNumbers.updateProfile`. Campo omitido mantém; string vazia
|
|
4894
|
+
* limpa (menos `about`, que precisa de 1 a 139 caracteres). Ao menos um campo.
|
|
4895
|
+
*/
|
|
4896
|
+
interface UpdateWhatsAppProfileParams {
|
|
4897
|
+
/** "Sobre": 1 a 139 caracteres. */
|
|
4898
|
+
about?: string;
|
|
4899
|
+
/** Até 256 caracteres. */
|
|
4900
|
+
address?: string;
|
|
4901
|
+
/** Até 512 caracteres. */
|
|
4902
|
+
description?: string;
|
|
4903
|
+
/** E-mail válido, até 128 caracteres. */
|
|
4904
|
+
email?: string;
|
|
4905
|
+
/** Até 2 sites, cada um com `http://` ou `https://` e até 256 caracteres. */
|
|
4906
|
+
websites?: string[];
|
|
4907
|
+
vertical?: WhatsAppBusinessVertical;
|
|
4908
|
+
}
|
|
4909
|
+
/** Foto do perfil para `phoneNumbers.uploadProfilePhoto` (JPG ou PNG, até 4 MB). */
|
|
4910
|
+
interface UploadProfilePhotoParams {
|
|
4911
|
+
/** Conteúdo da foto. */
|
|
4912
|
+
file: Blob;
|
|
4913
|
+
/** Nome do arquivo enviado no multipart (padrão: `foto.jpg` ou `foto.png`). */
|
|
4914
|
+
file_name?: string;
|
|
4915
|
+
/** Tipo da foto quando o `Blob` não traz (`image/jpeg` ou `image/png`). */
|
|
4916
|
+
mime_type?: "image/jpeg" | "image/png";
|
|
4917
|
+
}
|
|
4918
|
+
/** Comando que o contato vê ao digitar `/` na conversa. */
|
|
4919
|
+
interface ConversationalCommand {
|
|
4920
|
+
/** Uma palavra, sem espaço nem emoji, até 32 caracteres (a `/` inicial é tirada). */
|
|
4921
|
+
command_name: string;
|
|
4922
|
+
/** O que o comando faz: até 256 caracteres, sem emoji. */
|
|
4923
|
+
command_description: string;
|
|
4924
|
+
}
|
|
4925
|
+
/** Perguntas prontas (ice breakers) e comandos do número, lidos na Meta. */
|
|
4926
|
+
interface ConversationalAutomation {
|
|
4927
|
+
/** Até 4 perguntas de até 80 caracteres, sem emoji. */
|
|
4928
|
+
prompts: string[];
|
|
4929
|
+
/** Até 30 comandos. */
|
|
4930
|
+
commands: ConversationalCommand[];
|
|
4931
|
+
}
|
|
4932
|
+
/**
|
|
4933
|
+
* Corpo de `phoneNumbers.updateConversationalAutomation`. Campo omitido mantém
|
|
4934
|
+
* o que está na Meta; lista vazia remove. Ao menos um dos dois.
|
|
4935
|
+
*/
|
|
4936
|
+
interface UpdateConversationalAutomationParams {
|
|
4937
|
+
prompts?: string[];
|
|
4938
|
+
commands?: ConversationalCommand[];
|
|
4939
|
+
}
|
|
4940
|
+
/** Formato da imagem do QR code. */
|
|
4941
|
+
type QrImageFormat = "PNG" | "SVG";
|
|
4942
|
+
/** QR code com mensagem pronta e link curto do número. */
|
|
4943
|
+
interface WhatsAppQrCode {
|
|
4944
|
+
/** Código da Meta (ex.: `4O4YGZEG3RIVE1`). */
|
|
4945
|
+
code: string;
|
|
4946
|
+
/** Mensagem que já vem escrita ao abrir a conversa (até 140 caracteres). */
|
|
4947
|
+
prefilled_message: string;
|
|
4948
|
+
/** Link curto `https://wa.me/message/…`. */
|
|
4949
|
+
deep_link_url: string;
|
|
4950
|
+
/** URL temporária da imagem no CDN da Meta (em `get` e `create`): baixe na hora. */
|
|
4951
|
+
qr_image_url?: string;
|
|
4952
|
+
}
|
|
4953
|
+
/** Corpo de `phoneNumbers.qrCodes.create`. */
|
|
4954
|
+
interface CreateQrCodeParams {
|
|
4955
|
+
/** Até 140 caracteres. */
|
|
4956
|
+
prefilled_message: string;
|
|
4957
|
+
/** `PNG` (padrão) ou `SVG`. */
|
|
4958
|
+
image_format?: QrImageFormat;
|
|
4959
|
+
}
|
|
4960
|
+
/** Contato bloqueado no número. */
|
|
4961
|
+
interface BlockedUser {
|
|
4962
|
+
wa_id: string;
|
|
4963
|
+
/** Contato da Conta com esse `wa_id`, quando há. */
|
|
4964
|
+
contact_id: string | null;
|
|
4965
|
+
name: string | null;
|
|
4966
|
+
}
|
|
4967
|
+
/** Corpo de `phoneNumbers.blockedUsers.block`: exatamente um dos dois. */
|
|
4968
|
+
type BlockUserParams = {
|
|
4969
|
+
contact_id: string;
|
|
4970
|
+
user?: never;
|
|
4971
|
+
} | {
|
|
4972
|
+
user: string;
|
|
4973
|
+
contact_id?: never;
|
|
4974
|
+
};
|
|
4975
|
+
/** Resposta de `phoneNumbers.blockedUsers.block`. */
|
|
4976
|
+
interface BlockUserResult {
|
|
4977
|
+
blocked: true;
|
|
4978
|
+
wa_id: string | null;
|
|
4979
|
+
contact_id: string | null;
|
|
4980
|
+
}
|
|
4981
|
+
/** Resposta de `phoneNumbers.blockedUsers.unblock`. */
|
|
4982
|
+
interface UnblockUserResult {
|
|
4983
|
+
blocked: false;
|
|
4984
|
+
wa_id: string | null;
|
|
4985
|
+
}
|
|
4986
|
+
/**
|
|
4987
|
+
* Estado da importação das conversas antigas do app WhatsApp Business
|
|
4988
|
+
* (coexistência). `awaiting_choice`: esperando a escolha; `queued`: janela
|
|
4989
|
+
* fixada, o pedido à Meta ainda não saiu; os demais são o desfecho do pedido
|
|
4990
|
+
* (`skipped` quando a escolha foi 0 dias).
|
|
4991
|
+
*/
|
|
4992
|
+
type HistoryImportStatus = "awaiting_choice" | "queued" | "requested" | "declined" | "failed" | "expired" | "unconfirmed" | "skipped";
|
|
4993
|
+
/** Janela de conversas antigas a importar, em dias (0 = não importar). */
|
|
4994
|
+
type HistoryImportWindowDays = 0 | 30 | 180;
|
|
4995
|
+
/** Importação das conversas antigas do número (`GET|PUT …/history-import`). */
|
|
4996
|
+
interface HistoryImport {
|
|
4997
|
+
/** UUID interno do número. */
|
|
4998
|
+
phone_id: string;
|
|
4999
|
+
status: HistoryImportStatus;
|
|
5000
|
+
/** Janela fixada; `null` enquanto ninguém escolheu. */
|
|
5001
|
+
window_days: HistoryImportWindowDays | null;
|
|
5002
|
+
/** `customer` (escolhida por alguém) ou `default` (aplicada sozinha); `null` sem janela. */
|
|
5003
|
+
window_source: "customer" | "default" | null;
|
|
5004
|
+
window_set_at: string | null;
|
|
5005
|
+
/** A escolha ainda é aceita (`status` = `awaiting_choice` e dentro do prazo). */
|
|
5006
|
+
can_choose: boolean;
|
|
5007
|
+
/** Janela aplicada se ninguém escolher (hoje, 30). */
|
|
5008
|
+
default_window_days: HistoryImportWindowDays;
|
|
5009
|
+
/** Quando a janela padrão é aplicada sem escolha (20 h depois da conexão). */
|
|
5010
|
+
default_at: string;
|
|
5011
|
+
/** Fim do prazo da Meta para pedir o histórico (24 h depois da conexão). */
|
|
5012
|
+
deadline_at: string;
|
|
5013
|
+
/** Quando o número foi conectado. */
|
|
5014
|
+
onboarded_at: string;
|
|
5015
|
+
}
|
|
5016
|
+
/** Corpo de `phoneNumbers.setHistoryImport`. */
|
|
5017
|
+
interface SetHistoryImportParams {
|
|
5018
|
+
/** 0 (não importar), 30 ou 180 dias. */
|
|
5019
|
+
window_days: HistoryImportWindowDays;
|
|
5020
|
+
}
|
|
5021
|
+
/**
|
|
5022
|
+
* QR codes com mensagem pronta e link curto do número
|
|
5023
|
+
* (`/v1/phone_numbers/{id}/qr-codes`). `{id}` aceita o UUID interno ou o
|
|
5024
|
+
* `phone_number_id` da Meta. Lido e gravado direto na Meta.
|
|
5025
|
+
*/
|
|
5026
|
+
declare class PhoneNumberQrCodes {
|
|
5027
|
+
private readonly client;
|
|
5028
|
+
constructor(client: BotoZap);
|
|
5029
|
+
/** Lista os QR codes do número (sem a imagem; use `get`). Scope `numbers:read`. */
|
|
5030
|
+
list(id: string): Promise<WhatsAppQrCode[]>;
|
|
5031
|
+
/**
|
|
5032
|
+
* Cria um QR code com mensagem pronta (até 140 caracteres) e devolve
|
|
5033
|
+
* `qr_image_url` (201). NÃO é idempotente: em 504 `meta_unconfirmed`, liste
|
|
5034
|
+
* antes de criar de novo para não duplicar. Scope `numbers:write`.
|
|
5035
|
+
*/
|
|
5036
|
+
create(id: string, params: CreateQrCodeParams): Promise<WhatsAppQrCode>;
|
|
5037
|
+
/**
|
|
5038
|
+
* Um QR code com `qr_image_url` no formato pedido (`PNG` padrão, ou `SVG`).
|
|
5039
|
+
* A URL é temporária, do CDN da Meta: baixe na hora. Scope `numbers:read`.
|
|
5040
|
+
*/
|
|
5041
|
+
get(id: string, code: string, params?: {
|
|
5042
|
+
image_format?: QrImageFormat;
|
|
5043
|
+
}): Promise<WhatsAppQrCode>;
|
|
5044
|
+
/** Troca a mensagem pronta; código, link e imagem continuam os mesmos. Scope `numbers:write`. */
|
|
5045
|
+
update(id: string, code: string, params: {
|
|
5046
|
+
prefilled_message: string;
|
|
5047
|
+
}): Promise<WhatsAppQrCode>;
|
|
5048
|
+
/**
|
|
5049
|
+
* Apaga o QR code na Meta, SEM VOLTA: quem escanear o código impresso ou
|
|
5050
|
+
* abrir o link passa a ver "expirado". Responde 204. No acesso por OAuth, só
|
|
5051
|
+
* Administrador. Scope `numbers:write`.
|
|
5052
|
+
*/
|
|
5053
|
+
delete(id: string, code: string): Promise<void>;
|
|
5054
|
+
}
|
|
5055
|
+
/** Contatos bloqueados no número (`/v1/phone_numbers/{id}/blocked-users`), direto na Meta. */
|
|
5056
|
+
declare class PhoneNumberBlockedUsers {
|
|
5057
|
+
private readonly client;
|
|
5058
|
+
constructor(client: BotoZap);
|
|
5059
|
+
/**
|
|
5060
|
+
* Bloqueados do número, 100 por página. A próxima página vem em
|
|
5061
|
+
* `paging.cursors.after` (passe em `after`); `null` quando acabou. Quando o
|
|
5062
|
+
* `wa_id` é de um contato da Conta, vêm `contact_id` e `name`. Scope
|
|
5063
|
+
* `numbers:read`.
|
|
5064
|
+
*/
|
|
5065
|
+
list(id: string, params?: {
|
|
5066
|
+
after?: string;
|
|
5067
|
+
}): Promise<CursorList<BlockedUser>>;
|
|
5068
|
+
/**
|
|
5069
|
+
* Bloqueia um contato no número, por `contact_id` (contato da Conta neste
|
|
5070
|
+
* número) ou `user` (telefone com DDI). Contato bloqueado não manda mensagem
|
|
5071
|
+
* nem liga, e o número não envia nada para ele. Regra da Meta: só quem
|
|
5072
|
+
* escreveu nas últimas 24 h (senão 422 `block_window_closed`). Outros:
|
|
5073
|
+
* `cannot_block_self`, `blocklist_full` (409), `contact_other_number`,
|
|
5074
|
+
* `channel_not_supported` (contato do Instagram). Scope `numbers:write`.
|
|
5075
|
+
*/
|
|
5076
|
+
block(id: string, params: BlockUserParams): Promise<BlockUserResult>;
|
|
5077
|
+
/**
|
|
5078
|
+
* Desbloqueia pelo `wa_id` da lista (ou telefone com DDI). Para bloquear de
|
|
5079
|
+
* novo, o contato precisa ter escrito nas últimas 24 h. Scope `numbers:write`.
|
|
5080
|
+
*/
|
|
5081
|
+
unblock(id: string, user: string): Promise<UnblockUserResult>;
|
|
5082
|
+
}
|
|
4593
5083
|
/** Números conectados de cada cliente. */
|
|
4594
5084
|
declare class PhoneNumbers {
|
|
4595
5085
|
private readonly client;
|
|
5086
|
+
/** QR codes com mensagem pronta e link curto `wa.me/message`. */
|
|
5087
|
+
readonly qrCodes: PhoneNumberQrCodes;
|
|
5088
|
+
/** Contatos bloqueados no número. */
|
|
5089
|
+
readonly blockedUsers: PhoneNumberBlockedUsers;
|
|
4596
5090
|
constructor(client: BotoZap);
|
|
4597
5091
|
/** Lista os números da conta (paginação por offset/página). */
|
|
4598
5092
|
list(params?: ListPhoneNumbersParams): Promise<OffsetList<PhoneNumber>>;
|
|
@@ -4606,6 +5100,60 @@ declare class PhoneNumbers {
|
|
|
4606
5100
|
update(id: string, params: UpdatePhoneNumberParams): Promise<PhoneNumber>;
|
|
4607
5101
|
/** Remove um número. Responde 204 (sem corpo). */
|
|
4608
5102
|
delete(id: string): Promise<void>;
|
|
5103
|
+
/**
|
|
5104
|
+
* Perfil do WhatsApp do número, lido na Meta: Sobre, descrição, endereço,
|
|
5105
|
+
* e-mail, sites, categoria e foto. `editable: false` em coexistência.
|
|
5106
|
+
* Recusas comuns às configurações do número: `sandbox_not_supported`,
|
|
5107
|
+
* `connection_inactive`, `reconnect_required` (409), `meta_rate_limited`
|
|
5108
|
+
* (429), `meta_permission_denied` (403), `meta_unavailable` (504) e
|
|
5109
|
+
* `meta_error` (502). Scope `numbers:read`.
|
|
5110
|
+
*/
|
|
5111
|
+
getProfile(id: string): Promise<WhatsAppBusinessProfile>;
|
|
5112
|
+
/**
|
|
5113
|
+
* Muda campos do perfil na Meta e devolve o perfil relido. É o contato
|
|
5114
|
+
* público do negócio: mude só a pedido de quem opera. Coexistência responde
|
|
5115
|
+
* 409 `coexistence_not_supported`. Pelo acesso OAuth (apps conectados), a
|
|
5116
|
+
* API responde 403: só painel e chave de API mudam o perfil. Em 502
|
|
5117
|
+
* `saved_unread` a Meta recebeu e a releitura falhou: confira com
|
|
5118
|
+
* `getProfile` antes de repetir. Scope `numbers:write`.
|
|
5119
|
+
*/
|
|
5120
|
+
updateProfile(id: string, params: UpdateWhatsAppProfileParams): Promise<WhatsAppBusinessProfile>;
|
|
5121
|
+
/**
|
|
5122
|
+
* Troca a foto do perfil (`multipart/form-data`, campo `file`; JPG ou PNG
|
|
5123
|
+
* até 4 MB) e devolve o perfil relido. Mesmas regras de `updateProfile`
|
|
5124
|
+
* (coexistência 409, OAuth 403). Recusas da foto: `invalid_picture` (422),
|
|
5125
|
+
* `too_large` (413), `missing_file` (422). Scope `numbers:write`.
|
|
5126
|
+
*/
|
|
5127
|
+
uploadProfilePhoto(id: string, params: UploadProfilePhotoParams): Promise<WhatsAppBusinessProfile>;
|
|
5128
|
+
/**
|
|
5129
|
+
* Perguntas prontas (`prompts`, ice breakers) e comandos (`commands`) do
|
|
5130
|
+
* número, lidos na Meta. Scope `numbers:read`.
|
|
5131
|
+
*/
|
|
5132
|
+
getConversationalAutomation(id: string): Promise<ConversationalAutomation>;
|
|
5133
|
+
/**
|
|
5134
|
+
* Grava perguntas prontas e/ou comandos na Meta e devolve o que ficou. Campo
|
|
5135
|
+
* omitido mantém; lista vazia remove. Gravar conteúdo exige plano com
|
|
5136
|
+
* automações (403 `plan_restricted`); só remover é livre. Tocar numa
|
|
5137
|
+
* pergunta ou mandar um comando chega como mensagem de texto comum. Scope
|
|
5138
|
+
* `numbers:write`.
|
|
5139
|
+
*/
|
|
5140
|
+
updateConversationalAutomation(id: string, params: UpdateConversationalAutomationParams): Promise<ConversationalAutomation>;
|
|
5141
|
+
/** Remove todas as perguntas prontas e comandos do número (livre em qualquer plano). Scope `numbers:write`. */
|
|
5142
|
+
clearConversationalAutomation(id: string): Promise<ConversationalAutomation>;
|
|
5143
|
+
/**
|
|
5144
|
+
* Quanto das conversas antigas do app WhatsApp Business o número importa
|
|
5145
|
+
* (coexistência): estado, janela escolhida e até quando dá para escolher.
|
|
5146
|
+
* Número sem importação (não está em coexistência, ou foi conectado antes
|
|
5147
|
+
* deste recurso) responde 404 `history_import_not_available`. Scope `numbers:read`.
|
|
5148
|
+
*/
|
|
5149
|
+
getHistoryImport(id: string): Promise<HistoryImport>;
|
|
5150
|
+
/**
|
|
5151
|
+
* Escolhe quanto importar: `window_days` 0 (nada), 30 ou 180. Vale uma vez
|
|
5152
|
+
* por conexão, enquanto `can_choose`; repetir a mesma escolha devolve 200,
|
|
5153
|
+
* outra escolha depois responde 409 `history_import_locked`. Sem escolha,
|
|
5154
|
+
* o último mês vale 20 h depois da conexão. Scope `numbers:write`.
|
|
5155
|
+
*/
|
|
5156
|
+
setHistoryImport(id: string, params: SetHistoryImportParams): Promise<HistoryImport>;
|
|
4609
5157
|
/** Saúde do número (qualidade, limite, status na Meta). */
|
|
4610
5158
|
health(id: string): Promise<Record<string, unknown>>;
|
|
4611
5159
|
}
|
|
@@ -5500,6 +6048,8 @@ interface ListWebhookDeliveriesParams extends CursorParams {
|
|
|
5500
6048
|
status?: WebhookDeliveryStatus | (string & {});
|
|
5501
6049
|
/** Tipo do evento (ex.: "webhook.test", "messages"). */
|
|
5502
6050
|
event_type?: string;
|
|
6051
|
+
/** Canal da entrega (`channel_account_id`); `"none"` = sem canal (teste, eventos da WABA). */
|
|
6052
|
+
channel_account_id?: string;
|
|
5503
6053
|
}
|
|
5504
6054
|
/** Histórico de entregas de webhook (somente leitura, paginação por cursor). */
|
|
5505
6055
|
declare class WebhookDeliveries {
|
|
@@ -5674,8 +6224,27 @@ declare class BotoZapError extends Error {
|
|
|
5674
6224
|
* `plan_required` (402, comprar slot no Free ou teste), `slot_limit` (402, já há
|
|
5675
6225
|
* 2 slots com fatura em aberto), `billing_customer_required` (402, conta sem
|
|
5676
6226
|
* cadastro de cobrança), `slot_in_use` (409, cancelar slot ocupado).
|
|
6227
|
+
* "Digitando…" (`conversations.typing`): `no_inbound_message` (409, a conversa
|
|
6228
|
+
* não tem mensagem recebida do contato), `meta_error` (422/502, recusa ou falha
|
|
6229
|
+
* da Meta; a resposta pode ser enviada normalmente). Configurações do número
|
|
6230
|
+
* (`phoneNumbers.getProfile` e afins): `sandbox_not_supported`,
|
|
6231
|
+
* `connection_inactive` e `reconnect_required` (409), `coexistence_not_supported`
|
|
6232
|
+
* (409, mudar o perfil de número em coexistência), `meta_rate_limited` (429),
|
|
6233
|
+
* `meta_permission_denied` (403), `meta_invalid_parameter` (422),
|
|
6234
|
+
* `meta_unavailable` (504, leitura), `meta_unconfirmed` (504, escrita sem
|
|
6235
|
+
* confirmação: confira antes de repetir), `saved_unread` (502, gravado na Meta
|
|
6236
|
+
* e não relido), `invalid_picture` (422); bloqueio: `block_window_closed` (422,
|
|
6237
|
+
* só quem escreveu nas últimas 24 h), `cannot_block_self` (422),
|
|
6238
|
+
* `blocklist_full` (409), `contact_other_number` (422). Resposta citando
|
|
6239
|
+
* (`reply_to`): `reply_target_not_found` (422, a citada não está nesta
|
|
6240
|
+
* conversa), `reply_target_unavailable` (422, reação, apagada ou envio que não
|
|
6241
|
+
* saiu). Mensagem de voz (`voice: true`): `invalid_voice` (422, link que não é
|
|
6242
|
+
* .ogg/Opus), `unsupported_voice` (422, Instagram). Conversas antigas
|
|
6243
|
+
* (`phoneNumbers.getHistoryImport`/`setHistoryImport`):
|
|
6244
|
+
* `history_import_not_available` (404, número sem importação),
|
|
6245
|
+
* `history_import_locked` (409, a escolha já foi feita ou o prazo acabou).
|
|
5677
6246
|
*/
|
|
5678
|
-
type BotoZapErrorCode = "invalid_request" | "unsupported_type" | "invalid_reaction" | "missing_reaction_target" | "reaction_target_not_found" | "reaction_target_invalid" | "reaction_target_expired" | "free_form_limit_reached" | "quota_exceeded" | "plan_restricted" | "free_number_cap" | "free_cap" | "feature_unavailable" | "provider_not_enabled" | "consent_opted_out" | "consent_revoked" | "outside_window" | "window_closed" | "channel_not_supported" | "not_connected" | "ip_not_allowed" | "admin_required" | "gone" | "business_payment_required" | "plan_required" | "slot_limit" | "slot_in_use" | "billing_customer_required" | (string & {});
|
|
6247
|
+
type BotoZapErrorCode = "invalid_request" | "unsupported_type" | "invalid_reaction" | "missing_reaction_target" | "reaction_target_not_found" | "reaction_target_invalid" | "reaction_target_expired" | "free_form_limit_reached" | "quota_exceeded" | "plan_restricted" | "free_number_cap" | "free_cap" | "feature_unavailable" | "provider_not_enabled" | "consent_opted_out" | "consent_revoked" | "outside_window" | "window_closed" | "channel_not_supported" | "not_connected" | "ip_not_allowed" | "admin_required" | "gone" | "business_payment_required" | "plan_required" | "slot_limit" | "slot_in_use" | "billing_customer_required" | "no_inbound_message" | "meta_error" | "sandbox_not_supported" | "connection_inactive" | "reconnect_required" | "coexistence_not_supported" | "meta_rate_limited" | "meta_permission_denied" | "meta_invalid_parameter" | "meta_unavailable" | "meta_unconfirmed" | "saved_unread" | "invalid_picture" | "block_window_closed" | "cannot_block_self" | "blocklist_full" | "contact_other_number" | "reply_target_not_found" | "reply_target_unavailable" | "invalid_voice" | "unsupported_voice" | "history_import_not_available" | "history_import_locked" | (string & {});
|
|
5679
6248
|
/** Códigos que indicam limite ou restrição do plano contratado. */
|
|
5680
6249
|
declare const PLAN_ERROR_CODES: readonly ["plan_restricted", "free_form_limit_reached", "free_number_cap", "free_cap"];
|
|
5681
6250
|
/** True quando o erro é recusa por plano (upgrade resolve; retry não). */
|
|
@@ -5726,4 +6295,4 @@ declare function isConsentRevoked(error: unknown): error is BotoZapError;
|
|
|
5726
6295
|
*/
|
|
5727
6296
|
declare function isNotConnected(error: unknown): error is BotoZapError;
|
|
5728
6297
|
|
|
5729
|
-
export { AI_CONFIGURABLE_PURPOSES, AI_CREDENTIAL_PROVIDERS, AI_OPERATIONS, AI_PURPOSES, type AccountExport, type AddRecipientsError, type AddRecipientsResult, AgendaConfiguration, AgendaExceptions, type AgendaRecord, Ai, type AiAgent, type AiAgentConfig, type AiAgentConfigRead, type AiAgentCoverage, type AiAgentInput, type AiAgentVersion, AiAgentsResource, type AiAlert, type AiAlertBulkFilters, type AiAlertListItem, AiAlertsResource, type AiArtifactUploadInput, type AiAudioPricing, type AiBinding, type AiBindingTarget, type AiBindingTargetRead, type AiBudget, type AiBudgetInput, type AiCapabilitySignal, type AiCapabilityUsage, type AiCapabilityUsageList, type AiCase, type AiCaseChat, type AiCaseEvent, type AiCaseKind, type AiCaseReply, type AiCaseReplyInput, type AiCaseSource, AiCasesResource, type AiCatalogItems, type AiCatalogModel, type AiCatalogProduct, type AiCatalogSyncInput, type AiCatalogSyncResult, type AiChannelGate, type AiCommercialDecision, type AiCommercialEffect, type AiCommercialJob, type AiCommercialProposal, AiCommercialProposalsResource, type AiCommercialRequest, type AiCommercialSettings, type AiConfigurablePurpose, type AiContactAuthorization, type AiConversationCheckpoint, type AiCredential, AiCredentialsResource, type AiDraftResult, type AiEligibilityOverview, AiEligibilityResource, type AiEligibilitySettings, type AiEnabledProvider, type AiEnrollment, type AiEvolution, AiEvolutionResource, type AiEvolutionSource, type AiExecution, type AiExecutionCitations, type AiExecutionSecurity, AiExecutionsResource, type AiField, type AiFlow, type AiFlowGraph, type AiFlowInput, type AiFlowSettings, type AiFlowVersion, type AiFollowupEffect, type AiFollowupEvent, AiFollowupFlowsResource, type AiFollowupPromise, type AiFollowupPromiseDetail, type AiFollowupPromiseStatus, type AiFollowupQueueFilters, type AiFollowupQueuePage, type AiFollowupQueueRow, AiFollowupsResource, type AiGateMode, type AiInference, type AiInferenceOrigin, type AiInferenceOutcome, type AiInferenceSummary, AiInferencesResource, type AiKnowledgeChunk, type AiKnowledgeCitation, type AiKnowledgeConversation, type AiKnowledgeHit, type AiKnowledgeImport, type AiKnowledgePreview, AiKnowledgeResource, type AiKnowledgeSearchDiagnostics, type AiKnowledgeSource, type AiMemory, type AiMemoryEntry, type AiMemoryEntryEvent, AiMemoryResource, type AiModelCatalogSnapshot, type AiModelCatalogSync, type AiNoticeCheck, type AiNoticeEffect, type AiNoticeField, type AiNoticeJob, type AiNoticeSettings, AiNoticesResource, type AiOperation, type AiOperatorMetrics, AiOperatorResource, type AiPage, type AiPlatformSkill, type AiPlatformSkillComposition, type AiPreparedUpload, type AiProposal, AiProposalsResource, type AiProvider, type AiProviderInfo, type AiProviderModel, AiProvidersResource, type AiPurpose, type AiRate, type AiRateInput, type AiRecord, type AiRevision, type AiRouter, type AiRouterConfig, type AiRouterTest, AiRoutersResource, type AiScope, type AiSkill, type AiSkillInput, type AiSkillNearMiss, type AiSkillVersion, AiSkillsResource, type AiSourceKind, type AiStyleAdjustment, type AiStyleAdjustmentId, AiStyleAdjustmentsResource, type AiToolId, type AiTurnPromise, type AiUploadReceiptCallback, AiUploadsResource, AiUsageResource, type AiUsageSummary, type AiUsageTokens, type AiWindow, type ApiLog, type Appointment, type AppointmentAvailability, type AppointmentExceptionInput, type AppointmentFields, type AppointmentHistory, type AppointmentQuery, type AppointmentScheduleInput, type AppointmentServiceInput, type AppointmentStatus, Appointments, type Assignment, type AvailabilityQuery, type Billing, type BillingGuarantee, type BillingPlan, BotoZap, BotoZapError, type BotoZapErrorCode, type BotoZapEvent, type BotoZapOptions, type Broadcast, type BroadcastRecipient, type BroadcastRecipientInput, type BusinessSlot, Calendar, type CalendarConnection, type CalendarJob, type CalendarSelection, type ChannelAccount, type ChannelAccountRef, ChannelAccounts, type CommentAiDeliveryStatus, type CommentRule, type CommentRuleCounters, type CommentRuleMetrics, type CommentRuleMetricsParams, type CommentRuleStatus, type ConnectionBilling, type ConnectionBillingOutcome, type ConnectionBillingRefusal, type Consent, type ConsentChannel, type ConsentOrigin, type ConsentPurpose, type ConsentRequestResult, type ConsentState, type Contact, type ContactConsents, type ContactField, ContactFields, type ContactStage, ContactStages, type ContactWarning, type Conversation, type ConversationEntryPoint, type ConversationNote, type ConversationReferral, type ConversationReminder, type CreateAppointment, type CreateAssignmentParams, type CreateBroadcastParams, type CreateBusinessSlotOptions, type CreateCommentRuleParams, type CreateContactParams, type CreateCustomerParams, type CreateDemand, type CreateExportParams, type CreateMessageRuleParams, type CreateOpportunity, type CreateSetupLinkParams, type CreateTemplateParams, type CreateWebhookParams, type CrmActivity, type CrmConversation, type CrmFields, type CrmMetadata, type CrmQuery, type CrmRecord, CrmResource, type CursorList, type CursorPaging, type CursorParams, type Customer, type CustomerBusinessSlot, type DeleteCommentRuleResult, type DeleteMessageRuleResult, type Demand, type DemandFields, type EventList, type EventPaging, type ExportDownload, type ExportFormat, type ExportScope, type ExportStatus, type FixedRuleMessage, Inbox, type InboxMutation, type InboxMutationResult, type InboxState, type InboxTools, type InitialConsent, type InstagramCommentAi, type InstagramCommentAiAutomation, type InstagramCommentAiRepliedEvent, type InstagramCommentAiRun, type InstagramConnection, type InstagramGenericElement, type InstagramIceBreaker, type InstagramInteractiveButton, type InstagramInteractiveButtonPayload, type InstagramInteractiveGenericPayload, type InstagramInteractivePayload, type InstagramPersistentMenuItem, type InstagramTokenStatus, type InteractiveButtonPayload, type InteractiveCtaUrlPayload, type InteractiveHeader, type InteractiveListPayload, type InteractivePayload, type Journey, type JourneyConfig, type JourneyEnrollment, type JourneyQuery, type JourneyRun, type JourneyStep, Journeys, type ListApiLogsParams, type ListBroadcastsParams, type ListChannelAccountsParams, type ListContactsParams, type ListConversationsParams, type ListEventsParams, type ListMessagesParams, type ListPhoneNumbersParams, type ListRecipientsParams, type ListTeamEventsParams, type ListTemplatesParams, type ListWebhookDeliveriesParams, type Me, type MediaAsset, type MediaUploadResult, type Message, type MessageChannel, type MessageContent, type MessageEdit, type MessageRule, type MessageRuleAction, type MessageRuleQrParams, type MessageRuleTrigger, type MessageSort, type MessageSource, type MessageStatus, type MessengerProfile, type MessengerProfileConfig, type MetaCostCategory, type MetaCostDay, type MetaCostEstimate, type MetaCostGroup, type MetaCostReport, type MetaCostSource, type MetaCostSync, type MetaCostUnavailableReason, type MetaCostsParams, type OffsetList, type OffsetMeta, type OffsetParams, type Opportunity, type OpportunityFields, PLAN_ERROR_CODES, type PhoneNumber, type QuickReply, Radar, type RadarEntry, type RadarPage, type RadarQuery, type RecordConsentParams, type ReplyConversationParams, type RequestConsentParams, type RequestOptions, SavedReplies, type SavedReply, type SavedReplyInput, type SavedReplyQuery, type ScheduleBroadcastParams, type SendAudioParams, type SendDocumentParams, type SendFailureDetails, type SendImageParams, type SendInteractiveParams, type SendLocationParams, type SendMediaParams, type SendOptions, type SendReactionParams, type SendReactionResult, type SendResult, type SendTemplateParams, type SendTextParams, type SendVideoParams, type SetupLink, type StageColor, type StageRule, type StageRuleInput, type TeamEvent, type TeamEventActor, type TeamEventTarget, type Template, type TemplatePayload, type UpdateAppointment, type UpdateBroadcastParams, type UpdateCommentAiParams, type UpdateCommentRuleParams, type UpdateContactParams, type UpdateCustomerParams, type UpdateMessageRuleParams, type UpdateMessengerProfileParams, type UpdatePhoneNumberParams, type UpdateSetupLinkParams, type UpdateTemplateParams, type UpdateWebhookParams, type UploadMediaParams, type User, WEBHOOK_CATEGORIES, type Webhook, type WebhookAuthorizationHeaders, type WebhookCategory, type WebhookChannelHealth, type WebhookChannelHealthStatus, type WebhookDelivery, type WebhookDeliveryStatus, isBusinessPaymentRequired, isConsentOptedOut, isConsentRevoked, isFreeCap, isFreeNumberCap, isNotConnected, isPlanError };
|
|
6298
|
+
export { AI_CONFIGURABLE_PURPOSES, AI_CREDENTIAL_PROVIDERS, AI_OPERATIONS, AI_PURPOSES, type AccountExport, type AddRecipientsError, type AddRecipientsResult, AgendaConfiguration, AgendaExceptions, type AgendaRecord, Ai, type AiAgent, type AiAgentConfig, type AiAgentConfigRead, type AiAgentCoverage, type AiAgentDiagnostic, type AiAgentInput, type AiAgentVersion, AiAgentsResource, type AiAlert, type AiAlertBulkFilters, type AiAlertListItem, AiAlertsResource, type AiArtifactUploadInput, type AiAudioPricing, type AiBinding, type AiBindingTarget, type AiBindingTargetRead, type AiBudget, type AiBudgetInput, type AiCapabilitySignal, type AiCapabilityUsage, type AiCapabilityUsageList, type AiCase, type AiCaseChat, type AiCaseEvent, type AiCaseKind, type AiCaseReply, type AiCaseReplyInput, type AiCaseSource, AiCasesResource, type AiCatalogItems, type AiCatalogModel, type AiCatalogProduct, type AiCatalogSyncInput, type AiCatalogSyncResult, type AiChannelGate, type AiCommercialDecision, type AiCommercialEffect, type AiCommercialJob, type AiCommercialProposal, AiCommercialProposalsResource, type AiCommercialRequest, type AiCommercialSettings, type AiConfigurablePurpose, type AiContactAuthorization, type AiConversationCheckpoint, type AiCredential, AiCredentialsResource, type AiDiagnosticCheck, type AiDiagnosticStatus, type AiDraftResult, type AiEligibilityOverview, AiEligibilityResource, type AiEligibilitySettings, type AiEnabledProvider, type AiEnrollment, type AiEvolution, AiEvolutionResource, type AiEvolutionSource, type AiExecution, type AiExecutionCitations, type AiExecutionSecurity, AiExecutionsResource, type AiField, type AiFlow, type AiFlowGraph, type AiFlowInput, type AiFlowSettings, type AiFlowVersion, type AiFollowupEffect, type AiFollowupEvent, AiFollowupFlowsResource, type AiFollowupPromise, type AiFollowupPromiseDetail, type AiFollowupPromiseStatus, type AiFollowupQueueFilters, type AiFollowupQueuePage, type AiFollowupQueueRow, AiFollowupsResource, type AiGateMode, type AiInference, type AiInferenceOrigin, type AiInferenceOutcome, type AiInferenceSummary, AiInferencesResource, type AiKnowledgeChunk, type AiKnowledgeCitation, type AiKnowledgeConversation, type AiKnowledgeHit, type AiKnowledgeImport, type AiKnowledgePreview, AiKnowledgeResource, type AiKnowledgeSearchDiagnostics, type AiKnowledgeSource, type AiMemory, type AiMemoryEntry, type AiMemoryEntryEvent, AiMemoryResource, type AiModelCatalogSnapshot, type AiModelCatalogSync, type AiNoticeCheck, type AiNoticeEffect, type AiNoticeField, type AiNoticeJob, type AiNoticeSettings, AiNoticesResource, type AiOperation, type AiOperatorMetrics, AiOperatorResource, type AiPage, type AiPlatformSkill, type AiPlatformSkillComposition, type AiPreparedUpload, type AiProposal, AiProposalsResource, type AiProvider, type AiProviderInfo, type AiProviderModel, AiProvidersResource, type AiPurpose, type AiRate, type AiRateInput, type AiRecord, type AiRevision, type AiRouter, type AiRouterConfig, type AiRouterTest, AiRoutersResource, type AiScope, type AiSkill, type AiSkillInput, type AiSkillNearMiss, type AiSkillVersion, AiSkillsResource, type AiSourceKind, type AiStyleAdjustment, type AiStyleAdjustmentId, AiStyleAdjustmentsResource, type AiToolId, type AiTurnPromise, type AiUploadReceiptCallback, AiUploadsResource, AiUsageResource, type AiUsageSummary, type AiUsageTokens, type AiWindow, type ApiLog, type Appointment, type AppointmentAvailability, type AppointmentExceptionInput, type AppointmentFields, type AppointmentHistory, type AppointmentQuery, type AppointmentScheduleInput, type AppointmentServiceInput, type AppointmentStatus, Appointments, type Assignment, type AvailabilityQuery, type Billing, type BillingGuarantee, type BillingPlan, type BlockUserParams, type BlockUserResult, type BlockedUser, BotoZap, BotoZapError, type BotoZapErrorCode, type BotoZapEvent, type BotoZapOptions, type Broadcast, type BroadcastRecipient, type BroadcastRecipientInput, type BusinessSlot, Calendar, type CalendarConnection, type CalendarJob, type CalendarSelection, type ChannelAccount, type ChannelAccountRef, ChannelAccounts, type CommentAiDeliveryStatus, type CommentRule, type CommentRuleCounters, type CommentRuleMetrics, type CommentRuleMetricsParams, type CommentRuleStatus, type ConnectionBilling, type ConnectionBillingOutcome, type ConnectionBillingRefusal, type Consent, type ConsentChannel, type ConsentOrigin, type ConsentPurpose, type ConsentRequestResult, type ConsentState, type Contact, type ContactConsents, type ContactField, ContactFields, type ContactStage, ContactStages, type ContactWarning, type Conversation, type ConversationEntryPoint, type ConversationNote, type ConversationReadResult, type ConversationReferral, type ConversationReminder, type ConversationTypingResult, type ConversationalAutomation, type ConversationalCommand, type CreateAppointment, type CreateAssignmentParams, type CreateBroadcastParams, type CreateBusinessSlotOptions, type CreateCommentRuleParams, type CreateContactParams, type CreateCustomerParams, type CreateDemand, type CreateExportParams, type CreateMessageRuleParams, type CreateOpportunity, type CreateQrCodeParams, type CreateSetupLinkParams, type CreateTemplateParams, type CreateWebhookParams, type CrmActivity, type CrmConversation, type CrmFields, type CrmMetadata, type CrmQuery, type CrmRecord, CrmResource, type CursorList, type CursorPaging, type CursorParams, type Customer, type CustomerBusinessSlot, type DeleteCommentRuleResult, type DeleteMessageRuleResult, type Demand, type DemandFields, type EnableJourneyModelParams, type EventList, type EventPaging, type ExportDownload, type ExportFormat, type ExportScope, type ExportStatus, type FixedRuleMessage, type HistoryImport, type HistoryImportStatus, type HistoryImportWindowDays, Inbox, type InboxMutation, type InboxMutationResult, type InboxState, type InboxTools, type InitialConsent, type InstagramCommentAi, type InstagramCommentAiAutomation, type InstagramCommentAiRepliedEvent, type InstagramCommentAiRun, type InstagramConnection, type InstagramGenericElement, type InstagramIceBreaker, type InstagramInteractiveButton, type InstagramInteractiveButtonPayload, type InstagramInteractiveGenericPayload, type InstagramInteractivePayload, type InstagramPersistentMenuItem, type InstagramTokenStatus, type InteractiveButtonPayload, type InteractiveCtaUrlPayload, type InteractiveHeader, type InteractiveListPayload, type InteractivePayload, type Journey, type JourneyCatalogItem, type JourneyCatalogSegment, type JourneyCatalogTrigger, type JourneyConfig, type JourneyEnrollment, type JourneyModelEnableResult, type JourneyQuery, type JourneyRun, type JourneyStep, Journeys, type ListApiLogsParams, type ListBroadcastsParams, type ListChannelAccountsParams, type ListContactsParams, type ListConversationsParams, type ListEventsParams, type ListMessagesParams, type ListPhoneNumbersParams, type ListRecipientsParams, type ListTeamEventsParams, type ListTemplatesParams, type ListWebhookDeliveriesParams, type Me, type MediaAsset, type MediaUploadResult, type Message, type MessageChannel, type MessageContent, type MessageEdit, type MessageReplyTo, type MessageRule, type MessageRuleAction, type MessageRuleQrParams, type MessageRuleTrigger, type MessageSort, type MessageSource, type MessageStatus, type MessengerProfile, type MessengerProfileConfig, type MetaCostCategory, type MetaCostDay, type MetaCostEstimate, type MetaCostGroup, type MetaCostReport, type MetaCostSource, type MetaCostSync, type MetaCostUnavailableReason, type MetaCostsParams, type OffsetList, type OffsetMeta, type OffsetParams, type Opportunity, type OpportunityFields, PLAN_ERROR_CODES, type PhoneNumber, PhoneNumberBlockedUsers, PhoneNumberQrCodes, type QrImageFormat, type QuickReply, Radar, type RadarEntry, type RadarPage, type RadarQuery, type RecordConsentParams, type ReplyConversationParams, type ReplyToParam, type RequestConsentParams, type RequestOptions, SavedReplies, type SavedReply, type SavedReplyInput, type SavedReplyQuery, type ScheduleBroadcastParams, type SendAudioParams, type SendDocumentParams, type SendFailureDetails, type SendImageParams, type SendInteractiveParams, type SendLocationParams, type SendMediaParams, type SendOptions, type SendReactionParams, type SendReactionResult, type SendResult, type SendTemplateParams, type SendTextParams, type SendVideoParams, type SetHistoryImportParams, type SetupLink, type StageColor, type StageRule, type StageRuleInput, type TeamEvent, type TeamEventActor, type TeamEventTarget, type Template, type TemplatePayload, type UnblockUserResult, type UpdateAppointment, type UpdateBroadcastParams, type UpdateCommentAiParams, type UpdateCommentRuleParams, type UpdateContactParams, type UpdateConversationalAutomationParams, type UpdateCustomerParams, type UpdateMessageRuleParams, type UpdateMessengerProfileParams, type UpdatePhoneNumberParams, type UpdateSetupLinkParams, type UpdateTemplateParams, type UpdateWebhookParams, type UpdateWhatsAppProfileParams, type UploadMediaParams, type UploadProfilePhotoParams, type User, WEBHOOK_CATEGORIES, type Webhook, type WebhookAuthorizationHeaders, type WebhookCategory, type WebhookChannelHealth, type WebhookChannelHealthStatus, type WebhookDelivery, type WebhookDeliveryStatus, type WhatsAppBusinessProfile, type WhatsAppBusinessVertical, type WhatsAppQrCode, isBusinessPaymentRequired, isConsentOptedOut, isConsentRevoked, isFreeCap, isFreeNumberCap, isNotConnected, isPlanError };
|