@botozap/sdk 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -109,6 +109,8 @@ interface Assignment {
109
109
  }
110
110
  interface Webhook {
111
111
  id: string;
112
+ /** Cliente cujas entregas o endpoint recebe; `null` = todos os da Conta. */
113
+ customer_id?: string | null;
112
114
  url: string;
113
115
  events?: string[];
114
116
  active?: boolean;
@@ -122,13 +124,6 @@ interface PhoneNumber {
122
124
  id: string;
123
125
  [key: string]: unknown;
124
126
  }
125
- interface Flow {
126
- id: string;
127
- [key: string]: unknown;
128
- }
129
- interface FlowVersion {
130
- [key: string]: unknown;
131
- }
132
127
  interface User {
133
128
  id: string;
134
129
  [key: string]: unknown;
@@ -147,8 +142,17 @@ interface BotoZapEvent {
147
142
  /** Cursor monotônico e contíguo, serializado como string. */
148
143
  cursor: string;
149
144
  type: string;
150
- /** WAMID da mensagem que originou o Evento. */
151
- message_id: string;
145
+ /**
146
+ * WAMID da mensagem do WhatsApp que originou o Evento. `null` fora do
147
+ * WhatsApp (ex.: Instagram) ou em Eventos sem mensagem; use `external_id`
148
+ * para o identificador genérico do canal.
149
+ */
150
+ message_id: string | null;
151
+ /**
152
+ * Identificador da mensagem no canal de origem: o `wamid` no WhatsApp, o
153
+ * `mid` no Instagram. Pode ser `null` em Eventos sem mensagem.
154
+ */
155
+ external_id: string | null;
152
156
  /** UUID interno da Mensagem; pode ser null em status de Broadcast. */
153
157
  message_resource_id: string | null;
154
158
  occurred_at: string;
@@ -383,6 +387,14 @@ type AiAgent = {
383
387
  archived: boolean;
384
388
  published_version_id: string | null;
385
389
  updated_at: string;
390
+ /** Estado do ciclo de vida. Presente em `ai.agents.list` e `ai.agents.get`. */
391
+ lifecycle?: "draft" | "published" | "active" | "paused" | "archived";
392
+ /** `true` só quando o agente está de fato respondendo no canal. Presente em list/get. */
393
+ serving?: boolean;
394
+ /** Como o agente atende: vínculo direto ou membro de roteador ativo; `null` quando não atende. */
395
+ serving_via?: "direct" | "router" | null;
396
+ /** Conta de canal da versão publicada; `null` sem versão publicada. */
397
+ channel_account_id?: string | null;
386
398
  };
387
399
  type AiAgentVersion = {
388
400
  id: string;
@@ -2312,11 +2324,12 @@ declare class AiRoutersResource {
2312
2324
  sticky_intent?: string | null;
2313
2325
  }): Promise<AiRouterTest>;
2314
2326
  /** Ativa membro sem criar vínculo direto com canal. */
2315
- activateMember(input: AiRevision & {
2327
+ activateMember(input: AiScope & {
2316
2328
  id: string;
2317
- } & {
2318
2329
  agent_id: string;
2319
2330
  mode: "automatic" | "assisted";
2331
+ /** Revisão atual do agente membro (a API recusa `expected_revision` aqui). */
2332
+ expected_agent_revision: string;
2320
2333
  }): Promise<AiRecord>;
2321
2334
  }
2322
2335
  declare class AiCasesResource {
@@ -2922,6 +2935,8 @@ interface JourneyConfig {
2922
2935
  date_field_key?: string | null;
2923
2936
  stage_id?: string | null;
2924
2937
  demand_status?: "open" | "in_progress" | "waiting_customer" | null;
2938
+ /** Serviço da Agenda que dispara a régua quando `trigger_kind` é `appointment`. */
2939
+ appointment_service_id?: string | null;
2925
2940
  offset_days?: number;
2926
2941
  offset_hours?: number;
2927
2942
  yearly?: boolean;
@@ -2931,7 +2946,8 @@ interface JourneyConfig {
2931
2946
  send_end_hour?: number;
2932
2947
  steps: JourneyStep[];
2933
2948
  }
2934
- interface Journey extends Required<Omit<JourneyConfig, "steps">> {
2949
+ interface Journey extends Required<Omit<JourneyConfig, "steps" | "appointment_service_id">> {
2950
+ appointment_service_id?: string | null;
2935
2951
  id: string;
2936
2952
  version: number;
2937
2953
  archived_at: string | null;
@@ -3048,6 +3064,8 @@ interface ConversationNote {
3048
3064
  conversation_id: string;
3049
3065
  author_user_id: string | null;
3050
3066
  author_api_key_id: string | null;
3067
+ /** Nota registrada por um agente de IA. */
3068
+ author_agent_id?: string | null;
3051
3069
  body: string;
3052
3070
  version: number;
3053
3071
  created_at: string;
@@ -3240,7 +3258,8 @@ interface StageRuleInput {
3240
3258
  require_next_step: boolean;
3241
3259
  }
3242
3260
  interface StageRule extends Omit<StageRuleInput, "expected_version"> {
3243
- account_id: string;
3261
+ /** Presente em `stageRules` (GET); a resposta de `configureStageRule` não o inclui. */
3262
+ account_id?: string;
3244
3263
  stage_id: string;
3245
3264
  version: number;
3246
3265
  updated_at: string;
@@ -3475,11 +3494,27 @@ interface ListRecipientsParams extends CursorParams {
3475
3494
  /** Filtra por status do destinatário (ex.: "pending", "sent", "failed"). */
3476
3495
  status?: string;
3477
3496
  }
3497
+ /**
3498
+ * Um destinatário de `addRecipients`. `to_recipient` é telefone internacional
3499
+ * (E.164) ou BSUID; `components` são os parâmetros do template
3500
+ * PARA ESTE destinatário, no mesmo formato de `POST /v1/messages` (até 20
3501
+ * objetos, 16 KB serializados).
3502
+ */
3503
+ interface BroadcastRecipientInput {
3504
+ to_recipient: string;
3505
+ components?: Record<string, unknown>[];
3506
+ }
3507
+ /** Erro por item de `addRecipients`; `index` aponta a posição no array enviado. */
3508
+ interface AddRecipientsError {
3509
+ index: number;
3510
+ to_recipient?: string;
3511
+ reason: string;
3512
+ }
3478
3513
  /** Resultado de `addRecipients`: quantos entraram, quantos eram duplicados, erros. */
3479
3514
  interface AddRecipientsResult {
3480
3515
  added: number;
3481
3516
  duplicates: number;
3482
- errors: unknown[];
3517
+ errors: AddRecipientsError[];
3483
3518
  }
3484
3519
  /** Transmissões: criar, adicionar destinatários, agendar/enviar/cancelar. */
3485
3520
  declare class Broadcasts {
@@ -3492,8 +3527,13 @@ declare class Broadcasts {
3492
3527
  update(id: string, params: UpdateBroadcastParams): Promise<Broadcast>;
3493
3528
  /** Lista os destinatários de uma transmissão (paginação por cursor). */
3494
3529
  listRecipients(id: string, params?: ListRecipientsParams): Promise<CursorList<BroadcastRecipient>>;
3495
- /** Adiciona destinatários (lista de números ou contatos). */
3496
- addRecipients(id: string, recipients: unknown[]): Promise<AddRecipientsResult>;
3530
+ /**
3531
+ * Adiciona destinatários a uma transmissão em `draft` (até 1000 por chamada).
3532
+ * Cada item é um objeto `{ to_recipient, components? }` — strings soltas não
3533
+ * são aceitas. Itens inválidos não derrubam o lote: voltam em `errors`.
3534
+ * Duplicatas (no lote ou já cadastradas) contam em `duplicates`.
3535
+ */
3536
+ addRecipients(id: string, recipients: BroadcastRecipientInput[]): Promise<AddRecipientsResult>;
3497
3537
  /** Remove TODOS os destinatários. Responde 204 (sem corpo). */
3498
3538
  removeRecipients(id: string): Promise<void>;
3499
3539
  schedule(id: string, params: ScheduleBroadcastParams): Promise<Broadcast>;
@@ -3614,8 +3654,20 @@ interface CreateWebhookParams {
3614
3654
  secret?: string;
3615
3655
  /** `{ Authorization: "Bearer …" }` — persistido no Vault; ausente na resposta. */
3616
3656
  headers?: WebhookAuthorizationHeaders;
3657
+ /**
3658
+ * Limita as entregas a um Cliente (UUID) da Conta da chave. Omitido, `null`
3659
+ * ou vazio = sem filtro. UUID inválido → 422 `invalid_customer_id`; Cliente
3660
+ * de outra Conta → 404 `customer_not_found`.
3661
+ */
3662
+ customer_id?: string | null;
3617
3663
  }
3618
3664
  interface UpdateWebhookParams {
3665
+ /**
3666
+ * Rotaciona o secret de assinatura (16 a 256 caracteres, sem quebra de
3667
+ * linha). Vale a partir da próxima tentativa de entrega; a resposta não
3668
+ * devolve o valor. Formato inválido responde `422 invalid_secret`.
3669
+ */
3670
+ secret?: string;
3619
3671
  url?: string;
3620
3672
  events?: string[];
3621
3673
  active?: boolean;
@@ -3626,6 +3678,11 @@ interface UpdateWebhookParams {
3626
3678
  headers?: {
3627
3679
  Authorization?: string | null;
3628
3680
  };
3681
+ /**
3682
+ * Omitido = não mexe. UUID de um Cliente da Conta limita as entregas a ele;
3683
+ * `null` (ou string vazia) remove o filtro sem invalidar a verificação.
3684
+ */
3685
+ customer_id?: string | null;
3629
3686
  }
3630
3687
  /** Webhooks: endpoints assinados que recebem os eventos da conta. */
3631
3688
  declare class Webhooks {
@@ -3660,66 +3717,6 @@ declare class PhoneNumbers {
3660
3717
  health(id: string): Promise<Record<string, unknown>>;
3661
3718
  }
3662
3719
 
3663
- interface CreateFlowParams {
3664
- name?: string;
3665
- [key: string]: unknown;
3666
- }
3667
- /**
3668
- * Filtros de `flows.list` (paginação por offset). Flows vivem na Meta e a lista
3669
- * é por WABA — a rota GET /v1/flows EXIGE `phone_number_id` OU
3670
- * `waba_connection_id` (sem um deles responde 422 missing_target). Informe um.
3671
- */
3672
- interface ListFlowsParams extends OffsetParams {
3673
- /** phone_number_id (Meta) → resolve a conexão do número (escopado por conta). */
3674
- phone_number_id?: string;
3675
- /** Alternativa a `phone_number_id`: a conexão WABA cujos flows listar. */
3676
- waba_connection_id?: string;
3677
- }
3678
- /**
3679
- * Flows vivem na Meta, não no nosso banco — a amarração flow → conta é via
3680
- * `phone_number_id` (resolve a WABA e o token). Por isso get/delete/publish/
3681
- * setup_encryption/versions/data_endpoint EXIGEM `phone_number_id`.
3682
- */
3683
- interface FlowPhoneParams {
3684
- /** phone_number_id (Meta) do número cuja WABA hospeda o flow. */
3685
- phone_number_id: string;
3686
- }
3687
- /** Corpo de `POST /v1/flows/:id/versions` — sobe um novo flow.json. */
3688
- interface CreateFlowVersionParams {
3689
- phone_number_id: string;
3690
- /** JSON do flow (objeto ou string JSON válida). */
3691
- flow_json: unknown;
3692
- [key: string]: unknown;
3693
- }
3694
- /** Corpo de `POST /v1/flows/:id/data_endpoint` — conecta a forward URL do dev. */
3695
- interface SetFlowDataEndpointParams {
3696
- phone_number_id: string;
3697
- /** URL HTTPS do backend do dev que recebe o data_exchange. */
3698
- forward_url: string;
3699
- [key: string]: unknown;
3700
- }
3701
- /** WhatsApp Flows: criar, versionar, publicar e configurar data endpoint. */
3702
- declare class Flows {
3703
- private readonly client;
3704
- constructor(client: BotoZap);
3705
- /**
3706
- * Lista os flows de uma WABA (paginação por offset/página). Informe
3707
- * `phone_number_id` OU `waba_connection_id` — a rota exige um deles.
3708
- */
3709
- list(params?: ListFlowsParams): Promise<OffsetList<Flow>>;
3710
- get(id: string, params: FlowPhoneParams): Promise<Flow>;
3711
- create(params: CreateFlowParams): Promise<Flow>;
3712
- /** Remove um flow (só DRAFT, regra da Meta). Responde 204 (sem corpo). */
3713
- delete(id: string, params: FlowPhoneParams): Promise<void>;
3714
- publish(id: string, params: FlowPhoneParams): Promise<Flow>;
3715
- /** Lista as versões de um flow (paginação por offset/página). */
3716
- listVersions(id: string, params?: OffsetParams): Promise<OffsetList<FlowVersion>>;
3717
- createVersion(id: string, params: CreateFlowVersionParams): Promise<FlowVersion>;
3718
- setupEncryption(id: string, params: FlowPhoneParams): Promise<Record<string, unknown>>;
3719
- getDataEndpoint(id: string): Promise<Record<string, unknown>>;
3720
- setDataEndpoint(id: string, params: SetFlowDataEndpointParams): Promise<Record<string, unknown>>;
3721
- }
3722
-
3723
3720
  /** Corpo do `POST /v1/media` — espelha o contrato real da rota. */
3724
3721
  interface UploadMediaParams {
3725
3722
  /** URL http(s) de origem do arquivo. A BotoZap baixa (com guard SSRF) e sobe pra Cloud API. */
@@ -3864,7 +3861,6 @@ declare class BotoZap {
3864
3861
  readonly opportunities: CrmResource<OpportunityFields, Opportunity>;
3865
3862
  readonly demands: CrmResource<DemandFields, Demand>;
3866
3863
  readonly radar: Radar;
3867
- readonly flows: Flows;
3868
3864
  readonly media: Media;
3869
3865
  readonly events: Events;
3870
3866
  readonly users: Users;
@@ -3910,4 +3906,4 @@ declare class BotoZapError extends Error {
3910
3906
  constructor(code: string, message: string, status: number, headers?: Record<string, string>);
3911
3907
  }
3912
3908
 
3913
- export { AI_CONFIGURABLE_PURPOSES, AI_OPERATIONS, AI_PURPOSES, 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, 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 CreateFlowParams, type CreateFlowVersionParams, 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, type Flow, type FlowPhoneParams, type FlowVersion, 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 ListFlowsParams, 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 SetFlowDataEndpointParams, 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 };
3909
+ 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 };
package/dist/index.d.ts CHANGED
@@ -109,6 +109,8 @@ interface Assignment {
109
109
  }
110
110
  interface Webhook {
111
111
  id: string;
112
+ /** Cliente cujas entregas o endpoint recebe; `null` = todos os da Conta. */
113
+ customer_id?: string | null;
112
114
  url: string;
113
115
  events?: string[];
114
116
  active?: boolean;
@@ -122,13 +124,6 @@ interface PhoneNumber {
122
124
  id: string;
123
125
  [key: string]: unknown;
124
126
  }
125
- interface Flow {
126
- id: string;
127
- [key: string]: unknown;
128
- }
129
- interface FlowVersion {
130
- [key: string]: unknown;
131
- }
132
127
  interface User {
133
128
  id: string;
134
129
  [key: string]: unknown;
@@ -147,8 +142,17 @@ interface BotoZapEvent {
147
142
  /** Cursor monotônico e contíguo, serializado como string. */
148
143
  cursor: string;
149
144
  type: string;
150
- /** WAMID da mensagem que originou o Evento. */
151
- message_id: string;
145
+ /**
146
+ * WAMID da mensagem do WhatsApp que originou o Evento. `null` fora do
147
+ * WhatsApp (ex.: Instagram) ou em Eventos sem mensagem; use `external_id`
148
+ * para o identificador genérico do canal.
149
+ */
150
+ message_id: string | null;
151
+ /**
152
+ * Identificador da mensagem no canal de origem: o `wamid` no WhatsApp, o
153
+ * `mid` no Instagram. Pode ser `null` em Eventos sem mensagem.
154
+ */
155
+ external_id: string | null;
152
156
  /** UUID interno da Mensagem; pode ser null em status de Broadcast. */
153
157
  message_resource_id: string | null;
154
158
  occurred_at: string;
@@ -383,6 +387,14 @@ type AiAgent = {
383
387
  archived: boolean;
384
388
  published_version_id: string | null;
385
389
  updated_at: string;
390
+ /** Estado do ciclo de vida. Presente em `ai.agents.list` e `ai.agents.get`. */
391
+ lifecycle?: "draft" | "published" | "active" | "paused" | "archived";
392
+ /** `true` só quando o agente está de fato respondendo no canal. Presente em list/get. */
393
+ serving?: boolean;
394
+ /** Como o agente atende: vínculo direto ou membro de roteador ativo; `null` quando não atende. */
395
+ serving_via?: "direct" | "router" | null;
396
+ /** Conta de canal da versão publicada; `null` sem versão publicada. */
397
+ channel_account_id?: string | null;
386
398
  };
387
399
  type AiAgentVersion = {
388
400
  id: string;
@@ -2312,11 +2324,12 @@ declare class AiRoutersResource {
2312
2324
  sticky_intent?: string | null;
2313
2325
  }): Promise<AiRouterTest>;
2314
2326
  /** Ativa membro sem criar vínculo direto com canal. */
2315
- activateMember(input: AiRevision & {
2327
+ activateMember(input: AiScope & {
2316
2328
  id: string;
2317
- } & {
2318
2329
  agent_id: string;
2319
2330
  mode: "automatic" | "assisted";
2331
+ /** Revisão atual do agente membro (a API recusa `expected_revision` aqui). */
2332
+ expected_agent_revision: string;
2320
2333
  }): Promise<AiRecord>;
2321
2334
  }
2322
2335
  declare class AiCasesResource {
@@ -2922,6 +2935,8 @@ interface JourneyConfig {
2922
2935
  date_field_key?: string | null;
2923
2936
  stage_id?: string | null;
2924
2937
  demand_status?: "open" | "in_progress" | "waiting_customer" | null;
2938
+ /** Serviço da Agenda que dispara a régua quando `trigger_kind` é `appointment`. */
2939
+ appointment_service_id?: string | null;
2925
2940
  offset_days?: number;
2926
2941
  offset_hours?: number;
2927
2942
  yearly?: boolean;
@@ -2931,7 +2946,8 @@ interface JourneyConfig {
2931
2946
  send_end_hour?: number;
2932
2947
  steps: JourneyStep[];
2933
2948
  }
2934
- interface Journey extends Required<Omit<JourneyConfig, "steps">> {
2949
+ interface Journey extends Required<Omit<JourneyConfig, "steps" | "appointment_service_id">> {
2950
+ appointment_service_id?: string | null;
2935
2951
  id: string;
2936
2952
  version: number;
2937
2953
  archived_at: string | null;
@@ -3048,6 +3064,8 @@ interface ConversationNote {
3048
3064
  conversation_id: string;
3049
3065
  author_user_id: string | null;
3050
3066
  author_api_key_id: string | null;
3067
+ /** Nota registrada por um agente de IA. */
3068
+ author_agent_id?: string | null;
3051
3069
  body: string;
3052
3070
  version: number;
3053
3071
  created_at: string;
@@ -3240,7 +3258,8 @@ interface StageRuleInput {
3240
3258
  require_next_step: boolean;
3241
3259
  }
3242
3260
  interface StageRule extends Omit<StageRuleInput, "expected_version"> {
3243
- account_id: string;
3261
+ /** Presente em `stageRules` (GET); a resposta de `configureStageRule` não o inclui. */
3262
+ account_id?: string;
3244
3263
  stage_id: string;
3245
3264
  version: number;
3246
3265
  updated_at: string;
@@ -3475,11 +3494,27 @@ interface ListRecipientsParams extends CursorParams {
3475
3494
  /** Filtra por status do destinatário (ex.: "pending", "sent", "failed"). */
3476
3495
  status?: string;
3477
3496
  }
3497
+ /**
3498
+ * Um destinatário de `addRecipients`. `to_recipient` é telefone internacional
3499
+ * (E.164) ou BSUID; `components` são os parâmetros do template
3500
+ * PARA ESTE destinatário, no mesmo formato de `POST /v1/messages` (até 20
3501
+ * objetos, 16 KB serializados).
3502
+ */
3503
+ interface BroadcastRecipientInput {
3504
+ to_recipient: string;
3505
+ components?: Record<string, unknown>[];
3506
+ }
3507
+ /** Erro por item de `addRecipients`; `index` aponta a posição no array enviado. */
3508
+ interface AddRecipientsError {
3509
+ index: number;
3510
+ to_recipient?: string;
3511
+ reason: string;
3512
+ }
3478
3513
  /** Resultado de `addRecipients`: quantos entraram, quantos eram duplicados, erros. */
3479
3514
  interface AddRecipientsResult {
3480
3515
  added: number;
3481
3516
  duplicates: number;
3482
- errors: unknown[];
3517
+ errors: AddRecipientsError[];
3483
3518
  }
3484
3519
  /** Transmissões: criar, adicionar destinatários, agendar/enviar/cancelar. */
3485
3520
  declare class Broadcasts {
@@ -3492,8 +3527,13 @@ declare class Broadcasts {
3492
3527
  update(id: string, params: UpdateBroadcastParams): Promise<Broadcast>;
3493
3528
  /** Lista os destinatários de uma transmissão (paginação por cursor). */
3494
3529
  listRecipients(id: string, params?: ListRecipientsParams): Promise<CursorList<BroadcastRecipient>>;
3495
- /** Adiciona destinatários (lista de números ou contatos). */
3496
- addRecipients(id: string, recipients: unknown[]): Promise<AddRecipientsResult>;
3530
+ /**
3531
+ * Adiciona destinatários a uma transmissão em `draft` (até 1000 por chamada).
3532
+ * Cada item é um objeto `{ to_recipient, components? }` — strings soltas não
3533
+ * são aceitas. Itens inválidos não derrubam o lote: voltam em `errors`.
3534
+ * Duplicatas (no lote ou já cadastradas) contam em `duplicates`.
3535
+ */
3536
+ addRecipients(id: string, recipients: BroadcastRecipientInput[]): Promise<AddRecipientsResult>;
3497
3537
  /** Remove TODOS os destinatários. Responde 204 (sem corpo). */
3498
3538
  removeRecipients(id: string): Promise<void>;
3499
3539
  schedule(id: string, params: ScheduleBroadcastParams): Promise<Broadcast>;
@@ -3614,8 +3654,20 @@ interface CreateWebhookParams {
3614
3654
  secret?: string;
3615
3655
  /** `{ Authorization: "Bearer …" }` — persistido no Vault; ausente na resposta. */
3616
3656
  headers?: WebhookAuthorizationHeaders;
3657
+ /**
3658
+ * Limita as entregas a um Cliente (UUID) da Conta da chave. Omitido, `null`
3659
+ * ou vazio = sem filtro. UUID inválido → 422 `invalid_customer_id`; Cliente
3660
+ * de outra Conta → 404 `customer_not_found`.
3661
+ */
3662
+ customer_id?: string | null;
3617
3663
  }
3618
3664
  interface UpdateWebhookParams {
3665
+ /**
3666
+ * Rotaciona o secret de assinatura (16 a 256 caracteres, sem quebra de
3667
+ * linha). Vale a partir da próxima tentativa de entrega; a resposta não
3668
+ * devolve o valor. Formato inválido responde `422 invalid_secret`.
3669
+ */
3670
+ secret?: string;
3619
3671
  url?: string;
3620
3672
  events?: string[];
3621
3673
  active?: boolean;
@@ -3626,6 +3678,11 @@ interface UpdateWebhookParams {
3626
3678
  headers?: {
3627
3679
  Authorization?: string | null;
3628
3680
  };
3681
+ /**
3682
+ * Omitido = não mexe. UUID de um Cliente da Conta limita as entregas a ele;
3683
+ * `null` (ou string vazia) remove o filtro sem invalidar a verificação.
3684
+ */
3685
+ customer_id?: string | null;
3629
3686
  }
3630
3687
  /** Webhooks: endpoints assinados que recebem os eventos da conta. */
3631
3688
  declare class Webhooks {
@@ -3660,66 +3717,6 @@ declare class PhoneNumbers {
3660
3717
  health(id: string): Promise<Record<string, unknown>>;
3661
3718
  }
3662
3719
 
3663
- interface CreateFlowParams {
3664
- name?: string;
3665
- [key: string]: unknown;
3666
- }
3667
- /**
3668
- * Filtros de `flows.list` (paginação por offset). Flows vivem na Meta e a lista
3669
- * é por WABA — a rota GET /v1/flows EXIGE `phone_number_id` OU
3670
- * `waba_connection_id` (sem um deles responde 422 missing_target). Informe um.
3671
- */
3672
- interface ListFlowsParams extends OffsetParams {
3673
- /** phone_number_id (Meta) → resolve a conexão do número (escopado por conta). */
3674
- phone_number_id?: string;
3675
- /** Alternativa a `phone_number_id`: a conexão WABA cujos flows listar. */
3676
- waba_connection_id?: string;
3677
- }
3678
- /**
3679
- * Flows vivem na Meta, não no nosso banco — a amarração flow → conta é via
3680
- * `phone_number_id` (resolve a WABA e o token). Por isso get/delete/publish/
3681
- * setup_encryption/versions/data_endpoint EXIGEM `phone_number_id`.
3682
- */
3683
- interface FlowPhoneParams {
3684
- /** phone_number_id (Meta) do número cuja WABA hospeda o flow. */
3685
- phone_number_id: string;
3686
- }
3687
- /** Corpo de `POST /v1/flows/:id/versions` — sobe um novo flow.json. */
3688
- interface CreateFlowVersionParams {
3689
- phone_number_id: string;
3690
- /** JSON do flow (objeto ou string JSON válida). */
3691
- flow_json: unknown;
3692
- [key: string]: unknown;
3693
- }
3694
- /** Corpo de `POST /v1/flows/:id/data_endpoint` — conecta a forward URL do dev. */
3695
- interface SetFlowDataEndpointParams {
3696
- phone_number_id: string;
3697
- /** URL HTTPS do backend do dev que recebe o data_exchange. */
3698
- forward_url: string;
3699
- [key: string]: unknown;
3700
- }
3701
- /** WhatsApp Flows: criar, versionar, publicar e configurar data endpoint. */
3702
- declare class Flows {
3703
- private readonly client;
3704
- constructor(client: BotoZap);
3705
- /**
3706
- * Lista os flows de uma WABA (paginação por offset/página). Informe
3707
- * `phone_number_id` OU `waba_connection_id` — a rota exige um deles.
3708
- */
3709
- list(params?: ListFlowsParams): Promise<OffsetList<Flow>>;
3710
- get(id: string, params: FlowPhoneParams): Promise<Flow>;
3711
- create(params: CreateFlowParams): Promise<Flow>;
3712
- /** Remove um flow (só DRAFT, regra da Meta). Responde 204 (sem corpo). */
3713
- delete(id: string, params: FlowPhoneParams): Promise<void>;
3714
- publish(id: string, params: FlowPhoneParams): Promise<Flow>;
3715
- /** Lista as versões de um flow (paginação por offset/página). */
3716
- listVersions(id: string, params?: OffsetParams): Promise<OffsetList<FlowVersion>>;
3717
- createVersion(id: string, params: CreateFlowVersionParams): Promise<FlowVersion>;
3718
- setupEncryption(id: string, params: FlowPhoneParams): Promise<Record<string, unknown>>;
3719
- getDataEndpoint(id: string): Promise<Record<string, unknown>>;
3720
- setDataEndpoint(id: string, params: SetFlowDataEndpointParams): Promise<Record<string, unknown>>;
3721
- }
3722
-
3723
3720
  /** Corpo do `POST /v1/media` — espelha o contrato real da rota. */
3724
3721
  interface UploadMediaParams {
3725
3722
  /** URL http(s) de origem do arquivo. A BotoZap baixa (com guard SSRF) e sobe pra Cloud API. */
@@ -3864,7 +3861,6 @@ declare class BotoZap {
3864
3861
  readonly opportunities: CrmResource<OpportunityFields, Opportunity>;
3865
3862
  readonly demands: CrmResource<DemandFields, Demand>;
3866
3863
  readonly radar: Radar;
3867
- readonly flows: Flows;
3868
3864
  readonly media: Media;
3869
3865
  readonly events: Events;
3870
3866
  readonly users: Users;
@@ -3910,4 +3906,4 @@ declare class BotoZapError extends Error {
3910
3906
  constructor(code: string, message: string, status: number, headers?: Record<string, string>);
3911
3907
  }
3912
3908
 
3913
- export { AI_CONFIGURABLE_PURPOSES, AI_OPERATIONS, AI_PURPOSES, 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, 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 CreateFlowParams, type CreateFlowVersionParams, 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, type Flow, type FlowPhoneParams, type FlowVersion, 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 ListFlowsParams, 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 SetFlowDataEndpointParams, 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 };
3909
+ 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 };