@botozap/sdk 0.7.0 → 0.9.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 +47 -0
- package/README.md +126 -0
- package/dist/index.cjs +163 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +465 -19
- package/dist/index.d.ts +465 -19
- package/dist/index.js +158 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -14,6 +14,19 @@ interface SendResult {
|
|
|
14
14
|
status: MessageStatus;
|
|
15
15
|
/** Presente apenas quando a chave é do ambiente sandbox. */
|
|
16
16
|
sandbox?: boolean;
|
|
17
|
+
/** Só em `type: "reaction"`: alvo e ação (`react`/`unreact`). */
|
|
18
|
+
type?: "reaction";
|
|
19
|
+
reaction?: SendReactionResult;
|
|
20
|
+
}
|
|
21
|
+
/** Eco de `POST /v1/messages` com `type: "reaction"`. */
|
|
22
|
+
interface SendReactionResult {
|
|
23
|
+
/** UUID interno da mensagem alvo. */
|
|
24
|
+
message_id: string;
|
|
25
|
+
/** wamid da mensagem alvo. */
|
|
26
|
+
wamid: string;
|
|
27
|
+
/** `""` quando a reação foi retirada. */
|
|
28
|
+
emoji: string;
|
|
29
|
+
action: "react" | "unreact";
|
|
17
30
|
}
|
|
18
31
|
/** Componente de template do WhatsApp (header, body, button…). */
|
|
19
32
|
interface TemplatePayload {
|
|
@@ -72,8 +85,20 @@ interface Customer {
|
|
|
72
85
|
name?: string;
|
|
73
86
|
[key: string]: unknown;
|
|
74
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Origem da mensagem: `api` (esta API), `app` (Painel ou app WhatsApp Business
|
|
90
|
+
* em coexistência), `history` (histórico importado), `broadcast` (Transmissão).
|
|
91
|
+
* Valores novos podem surgir.
|
|
92
|
+
*/
|
|
93
|
+
type MessageSource = "api" | "app" | "history" | "broadcast" | (string & {});
|
|
75
94
|
interface Message {
|
|
76
95
|
id: string;
|
|
96
|
+
/** Origem da mensagem (ver `MessageSource`). */
|
|
97
|
+
source?: MessageSource;
|
|
98
|
+
/** Chegada à BotoZap (ISO 8601); chave de `sort=created_at`. */
|
|
99
|
+
created_at?: string;
|
|
100
|
+
/** Data real da mensagem no canal; `null` quando desconhecida. Chave de `sort=event_at`. */
|
|
101
|
+
event_at?: string | null;
|
|
77
102
|
[key: string]: unknown;
|
|
78
103
|
}
|
|
79
104
|
interface Broadcast {
|
|
@@ -87,10 +112,33 @@ interface BroadcastRecipient {
|
|
|
87
112
|
interface Contact {
|
|
88
113
|
id: string;
|
|
89
114
|
wa_id?: string;
|
|
115
|
+
/** Nome do perfil no canal; a ingestão o sobrescreve a cada inbound. */
|
|
116
|
+
profile_name?: string | null;
|
|
117
|
+
/**
|
|
118
|
+
* Nome que a empresa dá ao Contato (1–200 caracteres). Só a API o grava;
|
|
119
|
+
* `null` quando não definido. Não substitui `profile_name`.
|
|
120
|
+
*/
|
|
121
|
+
display_name?: string | null;
|
|
90
122
|
/** Contact tags (stored in metadata.tags); returned by servers with #498. */
|
|
91
123
|
tags?: string[];
|
|
92
124
|
[key: string]: unknown;
|
|
93
125
|
}
|
|
126
|
+
/** Origem da Conversa: anúncio Click-to-WhatsApp, orgânica ou desconhecida (`null`). */
|
|
127
|
+
type ConversationEntryPoint = "ctwa" | "organic";
|
|
128
|
+
/**
|
|
129
|
+
* Último clique em anúncio Click-to-WhatsApp que trouxe o Contato. Só os
|
|
130
|
+
* campos de atribuição; o texto completo do anúncio fica na mensagem.
|
|
131
|
+
*/
|
|
132
|
+
interface ConversationReferral {
|
|
133
|
+
/** ID do anúncio ou post na Meta. */
|
|
134
|
+
source_id: string | null;
|
|
135
|
+
source_url: string | null;
|
|
136
|
+
headline: string | null;
|
|
137
|
+
/** Click ID do anúncio (atribuição/conversões). */
|
|
138
|
+
ctwa_clid: string | null;
|
|
139
|
+
/** Quando o BotoZap recebeu o clique (ISO 8601). */
|
|
140
|
+
received_at: string | null;
|
|
141
|
+
}
|
|
94
142
|
interface Conversation {
|
|
95
143
|
id: string;
|
|
96
144
|
/** UUID interno do Número da própria Conversa. */
|
|
@@ -101,6 +149,24 @@ interface Conversation {
|
|
|
101
149
|
phone?: string | null;
|
|
102
150
|
[key: string]: unknown;
|
|
103
151
|
};
|
|
152
|
+
/** `"ctwa"` (anúncio), `"organic"` ou `null` quando desconhecida. */
|
|
153
|
+
entry_point?: ConversationEntryPoint | null;
|
|
154
|
+
/** Último referral de anúncio; `null` se a Conversa nunca veio de anúncio. */
|
|
155
|
+
referral?: ConversationReferral | null;
|
|
156
|
+
/**
|
|
157
|
+
* Fim da janela grátis do Free Entry Point informado pela Meta no status de
|
|
158
|
+
* um envio (ISO 8601); `null` fora dela.
|
|
159
|
+
*/
|
|
160
|
+
fep_expires_at?: string | null;
|
|
161
|
+
/**
|
|
162
|
+
* ESTIMATIVA do prazo para responder e abrir a janela grátis (último clique
|
|
163
|
+
* + 24h); `null` sem clique recente. Não altera a regra da janela de 24h.
|
|
164
|
+
*/
|
|
165
|
+
fep_reply_by?: string | null;
|
|
166
|
+
/** Última mensagem da Conversa (inclui `source`); `null` sem mensagens. */
|
|
167
|
+
last_message?: (Partial<Message> & {
|
|
168
|
+
source?: MessageSource;
|
|
169
|
+
}) | null;
|
|
104
170
|
[key: string]: unknown;
|
|
105
171
|
}
|
|
106
172
|
interface Assignment {
|
|
@@ -112,7 +178,7 @@ interface Webhook {
|
|
|
112
178
|
/** Cliente cujas entregas o endpoint recebe; `null` = todos os da Conta. */
|
|
113
179
|
customer_id?: string | null;
|
|
114
180
|
url: string;
|
|
115
|
-
events?: string[];
|
|
181
|
+
events?: (WebhookCategory | (string & {}))[];
|
|
116
182
|
active?: boolean;
|
|
117
183
|
/** True quando o endpoint tem Authorization no Vault. O valor nunca é devolvido. */
|
|
118
184
|
has_authorization?: boolean;
|
|
@@ -122,6 +188,8 @@ interface Webhook {
|
|
|
122
188
|
}
|
|
123
189
|
interface PhoneNumber {
|
|
124
190
|
id: string;
|
|
191
|
+
/** Nome local do Número no BotoZap (até 100 caracteres); `null` se não definido. */
|
|
192
|
+
label?: string | null;
|
|
125
193
|
[key: string]: unknown;
|
|
126
194
|
}
|
|
127
195
|
interface User {
|
|
@@ -132,10 +200,24 @@ interface ApiLog {
|
|
|
132
200
|
id: string;
|
|
133
201
|
[key: string]: unknown;
|
|
134
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* Status de uma entrega de webhook. `limited`: recebida cortada pelo limite de
|
|
205
|
+
* repasse do plano Free; não será tentada.
|
|
206
|
+
*/
|
|
207
|
+
type WebhookDeliveryStatus = "pending" | "success" | "failed" | "exhausted" | "limited";
|
|
135
208
|
interface WebhookDelivery {
|
|
136
209
|
id: string;
|
|
210
|
+
status?: WebhookDeliveryStatus;
|
|
137
211
|
[key: string]: unknown;
|
|
138
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* Categorias aceitas em `webhooks.create({ events })`. `app_messages` é opt-in
|
|
215
|
+
* (coexistência: `whatsapp.message.echo`, `.edited`, `.revoked`) e só chega a
|
|
216
|
+
* Endpoints que a assinaram explicitamente; `events` vazio não a recebe.
|
|
217
|
+
* `account` inclui `whatsapp.phone_number.connected`.
|
|
218
|
+
*/
|
|
219
|
+
declare const WEBHOOK_CATEGORIES: readonly ["messages", "statuses", "crm", "account", "app_messages"];
|
|
220
|
+
type WebhookCategory = (typeof WEBHOOK_CATEGORIES)[number];
|
|
139
221
|
/** Evento autoritativo do stream durável da Conta e ambiente autenticados. */
|
|
140
222
|
interface BotoZapEvent {
|
|
141
223
|
id: string;
|
|
@@ -226,10 +308,20 @@ interface SetupLink {
|
|
|
226
308
|
whatsapp_setup_status: string;
|
|
227
309
|
url: string;
|
|
228
310
|
allowed_connection_types: string[];
|
|
229
|
-
|
|
311
|
+
/** Código de idioma da página; `null` = automático. */
|
|
230
312
|
language: string | null;
|
|
313
|
+
/**
|
|
314
|
+
* Destino depois de concluir; recebe `setup_link_id` e `status=completed`
|
|
315
|
+
* (a query string da URL é preservada, o token nunca é enviado).
|
|
316
|
+
*/
|
|
231
317
|
success_redirect_url: string | null;
|
|
318
|
+
/**
|
|
319
|
+
* Destino com `status=failed` (link esgotado) ou `status=cancelled` (o
|
|
320
|
+
* Cliente voltou num erro recuperável; o link segue válido), mais
|
|
321
|
+
* `setup_link_id`.
|
|
322
|
+
*/
|
|
232
323
|
failure_redirect_url: string | null;
|
|
324
|
+
/** Reservado: hoje sempre `null` (a página de conexão não aplica tema). */
|
|
233
325
|
theme_config: unknown;
|
|
234
326
|
expires_at: string | null;
|
|
235
327
|
created_at: string;
|
|
@@ -239,6 +331,18 @@ interface SetupLink {
|
|
|
239
331
|
|
|
240
332
|
/** Public /api/v1/ai contracts. Revisions are opaque strings unless the endpoint explicitly uses a number. */
|
|
241
333
|
type AiProvider = "anthropic" | "openai" | "google" | "openrouter" | "deepseek" | "xai";
|
|
334
|
+
/** Provedores que aceitam credencial NOVA hoje; os demais respondem 422 `provider_not_enabled`. */
|
|
335
|
+
declare const AI_CREDENTIAL_PROVIDERS: readonly ["openai", "anthropic"];
|
|
336
|
+
/** Item de `ai.providers.get().providers`. */
|
|
337
|
+
type AiProviderInfo = {
|
|
338
|
+
id: AiProvider;
|
|
339
|
+
label: string;
|
|
340
|
+
key_url: string | null;
|
|
341
|
+
description: string | null;
|
|
342
|
+
/** false: criar credencial desse provedor responde 422 `provider_not_enabled`. */
|
|
343
|
+
accepts_new_credentials: boolean;
|
|
344
|
+
[key: string]: unknown;
|
|
345
|
+
};
|
|
242
346
|
/** Every BYOK purpose. #498 added granular purposes; without their own binding they inherit the Customer default. */
|
|
243
347
|
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"];
|
|
244
348
|
type AiPurpose = (typeof AI_PURPOSES)[number];
|
|
@@ -1832,7 +1936,7 @@ declare class AiCredentialsResource {
|
|
|
1832
1936
|
get(input: AiScope & {
|
|
1833
1937
|
id: string;
|
|
1834
1938
|
}): Promise<AiCredential>;
|
|
1835
|
-
/** Cria credencial própria no Vault; a resposta nunca contém a chave. */
|
|
1939
|
+
/** Cria credencial própria no Vault; a resposta nunca contém a chave. Só `AI_CREDENTIAL_PROVIDERS` (openai/anthropic); os demais: 422 `provider_not_enabled`. */
|
|
1836
1940
|
create(input: AiScope & {
|
|
1837
1941
|
provider: AiProvider;
|
|
1838
1942
|
label: string;
|
|
@@ -1864,7 +1968,7 @@ declare class AiProvidersResource {
|
|
|
1864
1968
|
constructor(client: BotoZap);
|
|
1865
1969
|
/** GET /ai/providers */
|
|
1866
1970
|
get(input: AiScope): Promise<{
|
|
1867
|
-
providers:
|
|
1971
|
+
providers: AiProviderInfo[];
|
|
1868
1972
|
purposes: Record<string, string>;
|
|
1869
1973
|
credentials: AiCredential[];
|
|
1870
1974
|
bindings: AiBinding[];
|
|
@@ -3292,8 +3396,15 @@ declare class Radar {
|
|
|
3292
3396
|
configureStageRule(stageId: string, input: StageRuleInput): Promise<StageRule>;
|
|
3293
3397
|
}
|
|
3294
3398
|
|
|
3399
|
+
/**
|
|
3400
|
+
* Ordem de `messages.list`: `created_at` (padrão, chegada à BotoZap) ou
|
|
3401
|
+
* `event_at` (data real da mensagem; útil com histórico importado). O cursor é
|
|
3402
|
+
* da ordem que o gerou: reuse-o com o mesmo `sort`.
|
|
3403
|
+
*/
|
|
3404
|
+
type MessageSort = "created_at" | "event_at";
|
|
3295
3405
|
/** Filtros de `messages.list` (paginação por cursor). Ver GET /v1/messages. */
|
|
3296
3406
|
interface ListMessagesParams extends CursorParams {
|
|
3407
|
+
sort?: MessageSort;
|
|
3297
3408
|
/** id da Meta OU uuid interno do número. */
|
|
3298
3409
|
phone_number_id?: string;
|
|
3299
3410
|
/** uuid interno da conversa (o `id` de /v1/conversations). */
|
|
@@ -3349,16 +3460,128 @@ interface SendDocumentParams {
|
|
|
3349
3460
|
from?: string;
|
|
3350
3461
|
}
|
|
3351
3462
|
type SendMediaParams = SendImageParams | SendVideoParams | SendAudioParams | SendDocumentParams;
|
|
3463
|
+
/** Header de `interactive` (texto; mídia só em button e cta_url). */
|
|
3464
|
+
type InteractiveHeader = {
|
|
3465
|
+
type: "text";
|
|
3466
|
+
text: string;
|
|
3467
|
+
} | {
|
|
3468
|
+
type: "image";
|
|
3469
|
+
image: {
|
|
3470
|
+
link: string;
|
|
3471
|
+
};
|
|
3472
|
+
} | {
|
|
3473
|
+
type: "video";
|
|
3474
|
+
video: {
|
|
3475
|
+
link: string;
|
|
3476
|
+
};
|
|
3477
|
+
} | {
|
|
3478
|
+
type: "document";
|
|
3479
|
+
document: {
|
|
3480
|
+
link: string;
|
|
3481
|
+
filename?: string;
|
|
3482
|
+
};
|
|
3483
|
+
};
|
|
3484
|
+
interface InteractiveBase {
|
|
3485
|
+
header?: InteractiveHeader;
|
|
3486
|
+
body: {
|
|
3487
|
+
text: string;
|
|
3488
|
+
};
|
|
3489
|
+
footer?: {
|
|
3490
|
+
text: string;
|
|
3491
|
+
};
|
|
3492
|
+
}
|
|
3493
|
+
/** Até 3 botões de resposta (título até 20 caracteres, ids únicos). */
|
|
3494
|
+
interface InteractiveButtonPayload extends InteractiveBase {
|
|
3495
|
+
type: "button";
|
|
3496
|
+
action: {
|
|
3497
|
+
buttons: {
|
|
3498
|
+
type?: "reply";
|
|
3499
|
+
reply: {
|
|
3500
|
+
id: string;
|
|
3501
|
+
title: string;
|
|
3502
|
+
};
|
|
3503
|
+
}[];
|
|
3504
|
+
};
|
|
3505
|
+
}
|
|
3506
|
+
/** Lista: até 10 seções e 10 opções no total; `title` da seção obrigatório com mais de uma. */
|
|
3507
|
+
interface InteractiveListPayload extends InteractiveBase {
|
|
3508
|
+
type: "list";
|
|
3509
|
+
header?: {
|
|
3510
|
+
type: "text";
|
|
3511
|
+
text: string;
|
|
3512
|
+
};
|
|
3513
|
+
action: {
|
|
3514
|
+
button: string;
|
|
3515
|
+
sections: {
|
|
3516
|
+
title?: string;
|
|
3517
|
+
rows: {
|
|
3518
|
+
id: string;
|
|
3519
|
+
title: string;
|
|
3520
|
+
description?: string;
|
|
3521
|
+
}[];
|
|
3522
|
+
}[];
|
|
3523
|
+
};
|
|
3524
|
+
}
|
|
3525
|
+
/** Botão de link (URL https pública). */
|
|
3526
|
+
interface InteractiveCtaUrlPayload extends InteractiveBase {
|
|
3527
|
+
type: "cta_url";
|
|
3528
|
+
action: {
|
|
3529
|
+
name: "cta_url";
|
|
3530
|
+
parameters: {
|
|
3531
|
+
display_text: string;
|
|
3532
|
+
url: string;
|
|
3533
|
+
};
|
|
3534
|
+
};
|
|
3535
|
+
}
|
|
3536
|
+
/** Objeto `interactive` no formato da Cloud API (validado pela API). */
|
|
3537
|
+
type InteractivePayload = InteractiveButtonPayload | InteractiveListPayload | InteractiveCtaUrlPayload;
|
|
3538
|
+
interface SendInteractiveParams {
|
|
3539
|
+
to: string;
|
|
3540
|
+
interactive: InteractivePayload;
|
|
3541
|
+
from?: string;
|
|
3542
|
+
}
|
|
3543
|
+
interface SendLocationParams {
|
|
3544
|
+
to: string;
|
|
3545
|
+
latitude: number;
|
|
3546
|
+
longitude: number;
|
|
3547
|
+
name?: string;
|
|
3548
|
+
address?: string;
|
|
3549
|
+
from?: string;
|
|
3550
|
+
}
|
|
3551
|
+
interface SendReactionParams {
|
|
3552
|
+
to: string;
|
|
3553
|
+
/** UUID interno ou wamid da mensagem RECEBIDA do contato (até 30 dias). */
|
|
3554
|
+
message_id: string;
|
|
3555
|
+
/** Emoji da reação; `""` retira a reação. */
|
|
3556
|
+
emoji: string;
|
|
3557
|
+
from?: string;
|
|
3558
|
+
}
|
|
3559
|
+
interface SendOptions {
|
|
3560
|
+
/** Reuse for retries of the same send; a different payload conflicts. */
|
|
3561
|
+
idempotencyKey?: string;
|
|
3562
|
+
}
|
|
3352
3563
|
/** Endpoints de mensagem (POST /v1/messages, GET /v1/messages/:id). */
|
|
3353
3564
|
declare class Messages {
|
|
3354
3565
|
private readonly client;
|
|
3355
3566
|
constructor(client: BotoZap);
|
|
3356
3567
|
/** Envia uma mensagem de texto. */
|
|
3357
|
-
send(params: SendTextParams): Promise<SendResult>;
|
|
3568
|
+
send(params: SendTextParams, options?: SendOptions): Promise<SendResult>;
|
|
3358
3569
|
/** Envia uma mensagem usando um template aprovado. */
|
|
3359
|
-
sendTemplate(params: SendTemplateParams): Promise<SendResult>;
|
|
3570
|
+
sendTemplate(params: SendTemplateParams, options?: SendOptions): Promise<SendResult>;
|
|
3360
3571
|
/** Envia mídia por URL pública. */
|
|
3361
|
-
sendMedia(params: SendMediaParams): Promise<SendResult>;
|
|
3572
|
+
sendMedia(params: SendMediaParams, options?: SendOptions): Promise<SendResult>;
|
|
3573
|
+
/**
|
|
3574
|
+
* Envia botões de resposta, lista ou botão de link (WhatsApp; mensagem livre,
|
|
3575
|
+
* exige janela de 24h aberta).
|
|
3576
|
+
*/
|
|
3577
|
+
sendInteractive(params: SendInteractiveParams, options?: SendOptions): Promise<SendResult>;
|
|
3578
|
+
/** Envia uma localização (WhatsApp; mensagem livre). */
|
|
3579
|
+
sendLocation(params: SendLocationParams, options?: SendOptions): Promise<SendResult>;
|
|
3580
|
+
/**
|
|
3581
|
+
* Reage a uma mensagem recebida (WhatsApp). `emoji: ""` retira a reação.
|
|
3582
|
+
* O retorno traz `reaction` com o alvo e a ação.
|
|
3583
|
+
*/
|
|
3584
|
+
sendReaction(params: SendReactionParams, options?: SendOptions): Promise<SendResult>;
|
|
3362
3585
|
/** Lista as mensagens da conta (paginação por cursor). */
|
|
3363
3586
|
list(params?: ListMessagesParams): Promise<CursorList<Message>>;
|
|
3364
3587
|
/** Busca uma mensagem pelo id interno. */
|
|
@@ -3376,13 +3599,41 @@ interface UpdateCustomerParams {
|
|
|
3376
3599
|
name?: string;
|
|
3377
3600
|
external_customer_id?: string;
|
|
3378
3601
|
}
|
|
3379
|
-
/**
|
|
3602
|
+
/**
|
|
3603
|
+
* Corpo de `POST /v1/customers/:id/setup_links`.
|
|
3604
|
+
*
|
|
3605
|
+
* Redirecionamentos: acontecem na página de conexão, só em estado final do
|
|
3606
|
+
* link. Conexão concluída leva a `success_redirect_url` com
|
|
3607
|
+
* `?setup_link_id=<id>&status=completed` (confirme o número em
|
|
3608
|
+
* `phoneNumbers.list`: uma conexão concluída ainda pode ter pendência de
|
|
3609
|
+
* registro). Link esgotado sem concluir leva a `failure_redirect_url` com
|
|
3610
|
+
* `status=failed`. Num erro em que dá para tentar de novo, o Cliente pode
|
|
3611
|
+
* escolher voltar: vai para `failure_redirect_url` com `status=cancelled` e o
|
|
3612
|
+
* link continua válido. A query string que a sua URL já tiver é preservada e o
|
|
3613
|
+
* token do link nunca é enviado. Link expirado ou revogado mostra a página de
|
|
3614
|
+
* erro, sem redirecionar.
|
|
3615
|
+
*/
|
|
3380
3616
|
interface CreateSetupLinkParams {
|
|
3381
|
-
/**
|
|
3617
|
+
/**
|
|
3618
|
+
* Tipos de conexão liberados: "dedicated" e/ou "coexistence" (padrão
|
|
3619
|
+
* "dedicated"). Uma lista sem nenhum tipo válido responde
|
|
3620
|
+
* `422 invalid_connection_types`; tipos desconhecidos ao lado de válidos são
|
|
3621
|
+
* ignorados.
|
|
3622
|
+
*/
|
|
3382
3623
|
allowed_connection_types?: string[];
|
|
3383
|
-
|
|
3624
|
+
/** Código de idioma da página (ex.: "pt_BR"); "auto" ou vazio deixa automático. */
|
|
3384
3625
|
language?: string;
|
|
3626
|
+
/**
|
|
3627
|
+
* Destino depois de concluir (`status=completed`). Precisa ser `https://`,
|
|
3628
|
+
* sem usuário/senha e com até 2048 caracteres; senão a API responde
|
|
3629
|
+
* `422 invalid_redirect_url`.
|
|
3630
|
+
*/
|
|
3385
3631
|
success_redirect_url?: string;
|
|
3632
|
+
/**
|
|
3633
|
+
* Destino quando o link se esgota sem concluir (`status=failed`) ou quando o
|
|
3634
|
+
* Cliente escolhe voltar num erro recuperável (`status=cancelled`; o link
|
|
3635
|
+
* segue válido). Mesmas regras de `success_redirect_url`.
|
|
3636
|
+
*/
|
|
3386
3637
|
failure_redirect_url?: string;
|
|
3387
3638
|
}
|
|
3388
3639
|
/** Corpo de `PATCH /v1/customers/:id/setup_links/:linkId`. */
|
|
@@ -3411,7 +3662,12 @@ declare class Customers {
|
|
|
3411
3662
|
delete(id: string): Promise<void>;
|
|
3412
3663
|
/** Lista os links de setup de um cliente (paginação por offset/página). */
|
|
3413
3664
|
listSetupLinks(customerId: string, params?: OffsetParams): Promise<OffsetList<SetupLink>>;
|
|
3414
|
-
/**
|
|
3665
|
+
/**
|
|
3666
|
+
* Cria um link de setup sob um cliente (expira em 30 dias). Envie a `url`
|
|
3667
|
+
* devolvida ao Cliente; veja em {@link CreateSetupLinkParams} como funcionam
|
|
3668
|
+
* os redirecionamentos. URL de redirecionamento inválida lança
|
|
3669
|
+
* `BotoZapError` com `code: "invalid_redirect_url"` (422).
|
|
3670
|
+
*/
|
|
3415
3671
|
createSetupLink(customerId: string, params?: CreateSetupLinkParams): Promise<SetupLink>;
|
|
3416
3672
|
/** Atualiza status/expiração de um link de setup. */
|
|
3417
3673
|
updateSetupLink(customerId: string, linkId: string, params: UpdateSetupLinkParams): Promise<SetupLink>;
|
|
@@ -3570,6 +3826,11 @@ interface CreateContactParams {
|
|
|
3570
3826
|
/** wa_id canônico (BSUID "BR.1A2B…" ou dígitos E.164). */
|
|
3571
3827
|
wa_id: string;
|
|
3572
3828
|
phone_number_id?: string;
|
|
3829
|
+
/**
|
|
3830
|
+
* Nome que a empresa dá ao Contato (1–200 caracteres após aparar). `null`
|
|
3831
|
+
* ou `""` não grava nome. Independe de `profile_name`, que vem do canal.
|
|
3832
|
+
*/
|
|
3833
|
+
display_name?: string | null;
|
|
3573
3834
|
/** Até 20 tags de 1–40 caracteres; o servidor apara e remove repetidas sem diferenciar maiúsculas. Não combine com metadata.tags. */
|
|
3574
3835
|
tags?: string[];
|
|
3575
3836
|
[key: string]: unknown;
|
|
@@ -3581,6 +3842,11 @@ interface CreateContactParams {
|
|
|
3581
3842
|
*/
|
|
3582
3843
|
interface UpdateContactParams {
|
|
3583
3844
|
profile_name?: string;
|
|
3845
|
+
/**
|
|
3846
|
+
* Nome que a empresa dá ao Contato (1–200 caracteres após aparar); `null`
|
|
3847
|
+
* ou `""` limpa. A ingestão de mensagens nunca o sobrescreve.
|
|
3848
|
+
*/
|
|
3849
|
+
display_name?: string | null;
|
|
3584
3850
|
username?: string;
|
|
3585
3851
|
notes?: string | null;
|
|
3586
3852
|
stage_id?: string | null;
|
|
@@ -3642,7 +3908,7 @@ declare class Conversations {
|
|
|
3642
3908
|
* A leitura e o envio usam a mesma chave; o POST /messages revalida Conta,
|
|
3643
3909
|
* ambiente, identidade, janela, quota e billing antes de chamar a Meta.
|
|
3644
3910
|
*/
|
|
3645
|
-
reply(id: string, params: ReplyConversationParams): Promise<SendResult>;
|
|
3911
|
+
reply(id: string, params: ReplyConversationParams, options?: SendOptions): Promise<SendResult>;
|
|
3646
3912
|
update(id: string, params: Record<string, unknown>): Promise<Conversation>;
|
|
3647
3913
|
/** Lista as atribuições da conversa (paginação por offset/página). */
|
|
3648
3914
|
listAssignments(id: string, params?: OffsetParams): Promise<OffsetList<Assignment>>;
|
|
@@ -3712,6 +3978,14 @@ declare class Webhooks {
|
|
|
3712
3978
|
interface ListPhoneNumbersParams extends OffsetParams {
|
|
3713
3979
|
customer_id?: string;
|
|
3714
3980
|
}
|
|
3981
|
+
/** Corpo de `PATCH /v1/phone_numbers/:id`. */
|
|
3982
|
+
interface UpdatePhoneNumberParams {
|
|
3983
|
+
/**
|
|
3984
|
+
* Nome local do Número: até 100 caracteres após aparar, sem quebras de
|
|
3985
|
+
* linha nem caracteres de controle. `null` ou `""` limpa.
|
|
3986
|
+
*/
|
|
3987
|
+
label: string | null;
|
|
3988
|
+
}
|
|
3715
3989
|
/** Números conectados de cada cliente. */
|
|
3716
3990
|
declare class PhoneNumbers {
|
|
3717
3991
|
private readonly client;
|
|
@@ -3719,6 +3993,13 @@ declare class PhoneNumbers {
|
|
|
3719
3993
|
/** Lista os números da conta (paginação por offset/página). */
|
|
3720
3994
|
list(params?: ListPhoneNumbersParams): Promise<OffsetList<PhoneNumber>>;
|
|
3721
3995
|
get(id: string): Promise<PhoneNumber>;
|
|
3996
|
+
/**
|
|
3997
|
+
* Atualiza o nome local (`label`) do Número. É o único campo editável:
|
|
3998
|
+
* identidade e dados sincronizados da Meta (`display_phone_number`,
|
|
3999
|
+
* `verified_name`, `quality_rating`) não mudam por aqui. `{id}` aceita o
|
|
4000
|
+
* UUID interno ou o `phone_number_id` da Meta.
|
|
4001
|
+
*/
|
|
4002
|
+
update(id: string, params: UpdatePhoneNumberParams): Promise<PhoneNumber>;
|
|
3722
4003
|
/** Remove um número. Responde 204 (sem corpo). */
|
|
3723
4004
|
delete(id: string): Promise<void>;
|
|
3724
4005
|
/** Saúde do número (qualidade, limite, status na Meta). */
|
|
@@ -3789,6 +4070,122 @@ declare class Events {
|
|
|
3789
4070
|
list(params?: ListEventsParams): Promise<EventList>;
|
|
3790
4071
|
}
|
|
3791
4072
|
|
|
4073
|
+
/** Query de `GET /v1/usage/meta-costs`. */
|
|
4074
|
+
interface MetaCostsParams {
|
|
4075
|
+
/**
|
|
4076
|
+
* Recorta pelas WABAs de um Cliente da Conta; sem ele, a Conta inteira.
|
|
4077
|
+
* Cliente inexistente ou de outra Conta responde 404 `not_found`.
|
|
4078
|
+
*/
|
|
4079
|
+
customer_id?: string;
|
|
4080
|
+
/** Primeiro dia (UTC, inclusivo, `YYYY-MM-DD`). Padrão: 29 dias antes de `to`. */
|
|
4081
|
+
from?: string;
|
|
4082
|
+
/** Último dia (UTC, inclusivo, `YYYY-MM-DD`). Padrão: hoje. Máximo de 366 dias no intervalo. */
|
|
4083
|
+
to?: string;
|
|
4084
|
+
}
|
|
4085
|
+
/** De onde vem `estimated_cost`: só Meta, só estimativa ou os dois. */
|
|
4086
|
+
type MetaCostSource = "meta" | "estimate" | "mixed";
|
|
4087
|
+
/** Por que algum custo do recorte não está disponível. */
|
|
4088
|
+
type MetaCostUnavailableReason = "not_synced" | "cost_not_returned";
|
|
4089
|
+
/**
|
|
4090
|
+
* Grupo agregado numa moeda. Moedas diferentes nunca são somadas nem
|
|
4091
|
+
* convertidas: cada moeda vira um grupo próprio.
|
|
4092
|
+
*/
|
|
4093
|
+
interface MetaCostGroup {
|
|
4094
|
+
/** Moeda da WABA (ex.: "BRL"); `null` quando a Meta não informou. */
|
|
4095
|
+
currency: string | null;
|
|
4096
|
+
/** Mensagens cobráveis e grátis contadas pela Meta. */
|
|
4097
|
+
volume: number;
|
|
4098
|
+
/**
|
|
4099
|
+
* Custo APROXIMADO informado pela Meta. `null` se alguma linha do grupo
|
|
4100
|
+
* veio sem custo — ausência nunca vira 0. A fatura da Meta é a autoridade.
|
|
4101
|
+
*/
|
|
4102
|
+
cost: number | null;
|
|
4103
|
+
/**
|
|
4104
|
+
* Custo da Meta onde houver + volume × tarifa publicada onde não houver.
|
|
4105
|
+
* `null` se alguma linha não tem custo nem tarifa conhecida.
|
|
4106
|
+
*/
|
|
4107
|
+
estimated_cost: number | null;
|
|
4108
|
+
/** Origem de `estimated_cost`; `null` quando `estimated_cost` é `null`. */
|
|
4109
|
+
cost_source: MetaCostSource | null;
|
|
4110
|
+
}
|
|
4111
|
+
/** Grupo por dia (UTC) e moeda. */
|
|
4112
|
+
interface MetaCostDay extends MetaCostGroup {
|
|
4113
|
+
/** Dia UTC, `YYYY-MM-DD`. */
|
|
4114
|
+
day: string;
|
|
4115
|
+
}
|
|
4116
|
+
/** Grupo por categoria, tipo de preço e moeda. */
|
|
4117
|
+
interface MetaCostCategory extends MetaCostGroup {
|
|
4118
|
+
/** Categoria da Meta (ex.: "MARKETING", "UTILITY", "AUTHENTICATION", "SERVICE"). */
|
|
4119
|
+
pricing_category: string;
|
|
4120
|
+
/** Tipo de preço da Meta (ex.: "REGULAR", "FREE_CUSTOMER_SERVICE", "FREE_ENTRY_POINT"). */
|
|
4121
|
+
pricing_type: string;
|
|
4122
|
+
}
|
|
4123
|
+
/** Base usada em `estimated_cost`. */
|
|
4124
|
+
interface MetaCostEstimate {
|
|
4125
|
+
/**
|
|
4126
|
+
* `true` quando todo o recorte tem custo da Meta ou estimativa (nada
|
|
4127
|
+
* `null`) e todas as Conexões ativas foram sincronizadas.
|
|
4128
|
+
*/
|
|
4129
|
+
available: boolean;
|
|
4130
|
+
basis: "published_rates" | (string & {});
|
|
4131
|
+
/** Mercado das tarifas usadas (destinatário). */
|
|
4132
|
+
market: "BR" | (string & {});
|
|
4133
|
+
/** Início de vigência das tarifas publicadas (`YYYY-MM-DD`). */
|
|
4134
|
+
rates_effective_from: string;
|
|
4135
|
+
/** Data em que as tarifas foram conferidas na fonte oficial. */
|
|
4136
|
+
rates_as_of: string;
|
|
4137
|
+
source_url: string;
|
|
4138
|
+
/** O que a estimativa não considera. */
|
|
4139
|
+
excludes: Array<"volume_tiers" | "non_brazil_recipients" | (string & {})>;
|
|
4140
|
+
}
|
|
4141
|
+
/** Frescor e cobertura do sync diário da Pricing Analytics. */
|
|
4142
|
+
interface MetaCostSync {
|
|
4143
|
+
/** Conexões ativas do escopo (as que o sync diário lê). */
|
|
4144
|
+
connections: number;
|
|
4145
|
+
synced_connections: number;
|
|
4146
|
+
/** Leitura completa mais antiga entre as WABAs sincronizadas (ISO 8601). */
|
|
4147
|
+
last_synced_at: string | null;
|
|
4148
|
+
/**
|
|
4149
|
+
* Primeiro dia com leitura da Meta em TODAS as Conexões sincronizadas.
|
|
4150
|
+
* Antes dele, ausência de linha não significa custo zero.
|
|
4151
|
+
*/
|
|
4152
|
+
covered_from: string | null;
|
|
4153
|
+
}
|
|
4154
|
+
/** Resposta de `GET /v1/usage/meta-costs`. */
|
|
4155
|
+
interface MetaCostReport {
|
|
4156
|
+
/** Cliente do recorte; `null` quando a consulta cobre a Conta inteira. */
|
|
4157
|
+
customer_id: string | null;
|
|
4158
|
+
source: "meta_pricing_analytics" | (string & {});
|
|
4159
|
+
/** Sempre `true`: o custo é o aproximado que a Meta informa. */
|
|
4160
|
+
approximate: true;
|
|
4161
|
+
/** Dia inicial efetivamente consultado (`YYYY-MM-DD`). */
|
|
4162
|
+
from: string;
|
|
4163
|
+
/** Dia final efetivamente consultado (`YYYY-MM-DD`). */
|
|
4164
|
+
to: string;
|
|
4165
|
+
/** `true` quando algum custo do recorte não está disponível (ver `unavailable_reason`). */
|
|
4166
|
+
unavailable: boolean;
|
|
4167
|
+
unavailable_reason: MetaCostUnavailableReason | null;
|
|
4168
|
+
/** Um grupo por moeda. */
|
|
4169
|
+
totals: MetaCostGroup[];
|
|
4170
|
+
/** Ordenado por dia e moeda. */
|
|
4171
|
+
by_day: MetaCostDay[];
|
|
4172
|
+
/** Ordenado por volume decrescente. */
|
|
4173
|
+
by_category: MetaCostCategory[];
|
|
4174
|
+
estimate: MetaCostEstimate;
|
|
4175
|
+
sync: MetaCostSync;
|
|
4176
|
+
}
|
|
4177
|
+
/** Uso e custos da Conta. */
|
|
4178
|
+
declare class Usage {
|
|
4179
|
+
private readonly client;
|
|
4180
|
+
constructor(client: BotoZap);
|
|
4181
|
+
/**
|
|
4182
|
+
* Custo da Meta por dia, categoria e tipo, lido da Pricing Analytics
|
|
4183
|
+
* sincronizada uma vez por dia por WABA. Scope `customers:read`; o sandbox
|
|
4184
|
+
* fica de fora. Intervalo grande demais responde 422 `range_too_large`.
|
|
4185
|
+
*/
|
|
4186
|
+
metaCosts(params?: MetaCostsParams): Promise<MetaCostReport>;
|
|
4187
|
+
}
|
|
4188
|
+
|
|
3792
4189
|
/** Membros da conta (somente leitura via API). */
|
|
3793
4190
|
declare class Users {
|
|
3794
4191
|
private readonly client;
|
|
@@ -3813,8 +4210,8 @@ declare class ApiLogs {
|
|
|
3813
4210
|
interface ListWebhookDeliveriesParams extends CursorParams {
|
|
3814
4211
|
/** Alias de `endpoint_id` na rota — entregas de um endpoint específico. */
|
|
3815
4212
|
webhook_id?: string;
|
|
3816
|
-
/** delivery_status (pending|success|failed|exhausted). */
|
|
3817
|
-
status?: string;
|
|
4213
|
+
/** delivery_status (pending|success|failed|exhausted|limited). */
|
|
4214
|
+
status?: WebhookDeliveryStatus | (string & {});
|
|
3818
4215
|
/** Tipo do evento (ex.: "webhook.test", "messages"). */
|
|
3819
4216
|
event_type?: string;
|
|
3820
4217
|
}
|
|
@@ -3825,9 +4222,35 @@ declare class WebhookDeliveries {
|
|
|
3825
4222
|
list(params?: ListWebhookDeliveriesParams): Promise<CursorList<WebhookDelivery>>;
|
|
3826
4223
|
}
|
|
3827
4224
|
|
|
4225
|
+
/** Identidade e permissões efetivas da credencial autenticada. */
|
|
4226
|
+
interface Me {
|
|
4227
|
+
/** UUID da Conta derivado pela API a partir da chave autenticada. */
|
|
4228
|
+
account_id: string;
|
|
4229
|
+
/** Ambiente ao qual a chave pertence. */
|
|
4230
|
+
environment: "live" | "sandbox";
|
|
4231
|
+
/** Scopes efetivos concedidos à chave. */
|
|
4232
|
+
scopes: string[];
|
|
4233
|
+
/** Ausente em versões anteriores da API; OAuth exige todos os campos abaixo. */
|
|
4234
|
+
auth_type?: "api_key" | "oauth";
|
|
4235
|
+
user_id?: string;
|
|
4236
|
+
client_id?: string;
|
|
4237
|
+
grant_id?: string;
|
|
4238
|
+
/** Contratos de rota permitidos, por exemplo GET /v1/contacts/:id. */
|
|
4239
|
+
allowed_routes?: string[];
|
|
4240
|
+
}
|
|
4241
|
+
/** Introspecção da identidade da chave autenticada. */
|
|
4242
|
+
declare class MeResource {
|
|
4243
|
+
private readonly client;
|
|
4244
|
+
constructor(client: BotoZap);
|
|
4245
|
+
/** Retorna a Conta, o ambiente e os scopes efetivos da chave. */
|
|
4246
|
+
get(): Promise<Me>;
|
|
4247
|
+
}
|
|
4248
|
+
|
|
3828
4249
|
interface BotoZapOptions {
|
|
3829
|
-
/** Chave de API da conta
|
|
3830
|
-
apiKey
|
|
4250
|
+
/** Chave de API da conta. Use apenas uma credencial: apiKey ou accessToken. */
|
|
4251
|
+
apiKey?: string;
|
|
4252
|
+
/** Token OAuth, ou provider chamado em cada requisição para usar o token atualizado. */
|
|
4253
|
+
accessToken?: string | (() => string | Promise<string>);
|
|
3831
4254
|
/** Sobrescreve a URL base. Padrão: https://botozap.com.br/api/v1 */
|
|
3832
4255
|
baseUrl?: string;
|
|
3833
4256
|
/** Injeta um fetch (testes, runtimes sem fetch global). */
|
|
@@ -3871,10 +4294,12 @@ declare class BotoZap {
|
|
|
3871
4294
|
readonly radar: Radar;
|
|
3872
4295
|
readonly media: Media;
|
|
3873
4296
|
readonly events: Events;
|
|
4297
|
+
readonly usage: Usage;
|
|
3874
4298
|
readonly users: Users;
|
|
3875
4299
|
readonly apiLogs: ApiLogs;
|
|
3876
4300
|
readonly webhookDeliveries: WebhookDeliveries;
|
|
3877
|
-
|
|
4301
|
+
readonly me: MeResource;
|
|
4302
|
+
private readonly credential;
|
|
3878
4303
|
private readonly baseUrl;
|
|
3879
4304
|
private readonly fetchImpl;
|
|
3880
4305
|
constructor(options: BotoZapOptions);
|
|
@@ -3906,12 +4331,33 @@ declare class BotoZap {
|
|
|
3906
4331
|
* `Retry-After` / `X-RateLimit-*`. Os headers são só os da RESPOSTA; nenhum
|
|
3907
4332
|
* header de request (que carrega a apiKey) entra aqui.
|
|
3908
4333
|
*/
|
|
4334
|
+
type SendFailureDetails = {
|
|
4335
|
+
outcome?: "rejected" | "accepted" | "unknown";
|
|
4336
|
+
retry?: "backoff" | "after_correction" | "reconcile_first" | "unknown";
|
|
4337
|
+
};
|
|
3909
4338
|
declare class BotoZapError extends Error {
|
|
3910
4339
|
readonly code: string;
|
|
3911
4340
|
readonly status: number;
|
|
4341
|
+
readonly outcome?: SendFailureDetails["outcome"];
|
|
4342
|
+
readonly retry?: SendFailureDetails["retry"];
|
|
3912
4343
|
/** Headers da resposta HTTP. Ausente em erros sem resposta (status 0). */
|
|
3913
4344
|
readonly headers?: Record<string, string>;
|
|
3914
|
-
constructor(code: string, message: string, status: number, headers?: Record<string, string
|
|
4345
|
+
constructor(code: string, message: string, status: number, headers?: Record<string, string>, details?: SendFailureDetails);
|
|
3915
4346
|
}
|
|
4347
|
+
/**
|
|
4348
|
+
* Códigos de erro conhecidos da API (não exaustivo; valores novos podem surgir).
|
|
4349
|
+
* Envio (POST /v1/messages): `invalid_reaction`, `missing_reaction_target`,
|
|
4350
|
+
* `reaction_target_not_found`, `reaction_target_invalid`,
|
|
4351
|
+
* `reaction_target_expired`, `unsupported_type`, `free_form_limit_reached`
|
|
4352
|
+
* (429, limite 1:1 do Free). Plano: `plan_restricted` (403, escritas de IA,
|
|
4353
|
+
* Agenda, Calendário e Jornadas fora do plano), `free_number_cap` (402, setup
|
|
4354
|
+
* além do teto de Números do Free). IA: `provider_not_enabled` (422, credencial
|
|
4355
|
+
* nova de provedor com `accepts_new_credentials: false`).
|
|
4356
|
+
*/
|
|
4357
|
+
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" | "provider_not_enabled" | (string & {});
|
|
4358
|
+
/** Códigos que indicam limite ou restrição do plano contratado. */
|
|
4359
|
+
declare const PLAN_ERROR_CODES: readonly ["plan_restricted", "free_form_limit_reached", "free_number_cap"];
|
|
4360
|
+
/** True quando o erro é recusa por plano (upgrade resolve; retry não). */
|
|
4361
|
+
declare function isPlanError(error: unknown): error is BotoZapError;
|
|
3916
4362
|
|
|
3917
|
-
export { AI_CONFIGURABLE_PURPOSES, AI_OPERATIONS, AI_PURPOSES, type AddRecipientsError, type AddRecipientsResult, AgendaConfiguration, AgendaExceptions, type AgendaRecord, Ai, type AiAgent, type AiAgentConfig, type AiAgentCoverage, type AiAgentInput, type AiAgentVersion, AiAgentsResource, type AiAlert, type AiAlertBulkFilters, type AiAlertListItem, AiAlertsResource, type AiArtifactUploadInput, type AiAudioPricing, type AiBinding, type AiBindingTarget, 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 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 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, BotoZap, BotoZapError, type BotoZapEvent, type BotoZapOptions, type Broadcast, type BroadcastRecipient, type BroadcastRecipientInput, Calendar, type CalendarConnection, type CalendarJob, type CalendarSelection, type Contact, type ContactField, ContactFields, type ContactStage, ContactStages, type Conversation, type ConversationNote, type ConversationReminder, type CreateAppointment, type CreateAssignmentParams, type CreateBroadcastParams, type CreateContactParams, type CreateCustomerParams, type CreateDemand, 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 Demand, type DemandFields, type EventList, type EventPaging, Inbox, type InboxMutation, type InboxMutationResult, type InboxState, type InboxTools, type Journey, type JourneyConfig, type JourneyEnrollment, type JourneyQuery, type JourneyRun, type JourneyStep, Journeys, type ListApiLogsParams, type ListBroadcastsParams, type ListContactsParams, type ListConversationsParams, type ListEventsParams, type ListMessagesParams, type ListPhoneNumbersParams, type ListRecipientsParams, type ListTemplatesParams, type ListWebhookDeliveriesParams, type MediaAsset, type MediaUploadResult, type Message, type MessageStatus, type OffsetList, type OffsetMeta, type OffsetParams, type Opportunity, type OpportunityFields, type PhoneNumber, Radar, type RadarEntry, type RadarPage, type RadarQuery, type ReplyConversationParams, type RequestOptions, SavedReplies, type SavedReply, type SavedReplyInput, type SavedReplyQuery, type ScheduleBroadcastParams, type SendAudioParams, type SendDocumentParams, type SendImageParams, type SendMediaParams, type SendResult, type SendTemplateParams, type SendTextParams, type SendVideoParams, type SetupLink, type StageColor, type StageRule, type StageRuleInput, type Template, type TemplatePayload, type UpdateAppointment, type UpdateBroadcastParams, type UpdateContactParams, type UpdateCustomerParams, type UpdateSetupLinkParams, type UpdateWebhookParams, type UploadMediaParams, type User, type Webhook, type WebhookAuthorizationHeaders, type WebhookDelivery };
|
|
4363
|
+
export { AI_CONFIGURABLE_PURPOSES, AI_CREDENTIAL_PROVIDERS, AI_OPERATIONS, AI_PURPOSES, type AddRecipientsError, type AddRecipientsResult, AgendaConfiguration, AgendaExceptions, type AgendaRecord, Ai, type AiAgent, type AiAgentConfig, type AiAgentCoverage, type AiAgentInput, type AiAgentVersion, AiAgentsResource, type AiAlert, type AiAlertBulkFilters, type AiAlertListItem, AiAlertsResource, type AiArtifactUploadInput, type AiAudioPricing, type AiBinding, type AiBindingTarget, 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 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, BotoZap, BotoZapError, type BotoZapErrorCode, type BotoZapEvent, type BotoZapOptions, type Broadcast, type BroadcastRecipient, type BroadcastRecipientInput, Calendar, type CalendarConnection, type CalendarJob, type CalendarSelection, type Contact, type ContactField, ContactFields, type ContactStage, ContactStages, type Conversation, type ConversationEntryPoint, type ConversationNote, type ConversationReferral, type ConversationReminder, type CreateAppointment, type CreateAssignmentParams, type CreateBroadcastParams, type CreateContactParams, type CreateCustomerParams, type CreateDemand, 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 Demand, type DemandFields, type EventList, type EventPaging, Inbox, type InboxMutation, type InboxMutationResult, type InboxState, type InboxTools, 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 ListContactsParams, type ListConversationsParams, type ListEventsParams, type ListMessagesParams, type ListPhoneNumbersParams, type ListRecipientsParams, type ListTemplatesParams, type ListWebhookDeliveriesParams, type Me, type MediaAsset, type MediaUploadResult, type Message, type MessageSort, type MessageSource, type MessageStatus, 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, Radar, type RadarEntry, type RadarPage, type RadarQuery, type ReplyConversationParams, 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 Template, type TemplatePayload, type UpdateAppointment, type UpdateBroadcastParams, type UpdateContactParams, type UpdateCustomerParams, type UpdatePhoneNumberParams, type UpdateSetupLinkParams, type UpdateWebhookParams, type UploadMediaParams, type User, WEBHOOK_CATEGORIES, type Webhook, type WebhookAuthorizationHeaders, type WebhookCategory, type WebhookDelivery, type WebhookDeliveryStatus, isPlanError };
|