@botozap/sdk 0.15.0 → 0.16.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 +10 -0
- package/README.md +26 -0
- package/dist/index.cjs +20 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +81 -1
- package/dist/index.d.ts +81 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -142,6 +142,10 @@ interface MessageContent {
|
|
|
142
142
|
body?: string;
|
|
143
143
|
/** Presente quando o contato editou a mensagem: o conteúdo já é o editado. */
|
|
144
144
|
edited?: MessageEdit;
|
|
145
|
+
/** Private Reply gerada pela IA de comentários do Instagram. */
|
|
146
|
+
source?: string;
|
|
147
|
+
ai_execution_id?: string;
|
|
148
|
+
comment_id?: string;
|
|
145
149
|
[key: string]: unknown;
|
|
146
150
|
}
|
|
147
151
|
interface Message {
|
|
@@ -362,6 +366,28 @@ interface BotoZapEvent {
|
|
|
362
366
|
created_at: string;
|
|
363
367
|
data: Record<string, unknown>;
|
|
364
368
|
}
|
|
369
|
+
/** Automação confirmada no evento instagram.comment.replied. */
|
|
370
|
+
interface InstagramCommentAiAutomation {
|
|
371
|
+
kind: "instagram_comment_ai";
|
|
372
|
+
execution_id: string;
|
|
373
|
+
comment_id: string;
|
|
374
|
+
}
|
|
375
|
+
type InstagramCommentAiRepliedEvent = BotoZapEvent & {
|
|
376
|
+
type: "instagram.comment.replied";
|
|
377
|
+
data: {
|
|
378
|
+
channel: "instagram";
|
|
379
|
+
channel_account: ChannelAccountRef;
|
|
380
|
+
external_id: string;
|
|
381
|
+
comment: {
|
|
382
|
+
id: string;
|
|
383
|
+
reply_id: string;
|
|
384
|
+
text: string;
|
|
385
|
+
timestamp: string;
|
|
386
|
+
};
|
|
387
|
+
automation: InstagramCommentAiAutomation;
|
|
388
|
+
[key: string]: unknown;
|
|
389
|
+
};
|
|
390
|
+
};
|
|
365
391
|
/** Paginação crescente do stream; `cursor` é seguro para o próximo `after`. */
|
|
366
392
|
interface EventPaging {
|
|
367
393
|
cursor: string;
|
|
@@ -662,7 +688,10 @@ type AiExecution = {
|
|
|
662
688
|
}[];
|
|
663
689
|
usage?: AiUsageTokens | null;
|
|
664
690
|
measurement_status: "measured" | "partial" | "unavailable";
|
|
691
|
+
/** Comentários do Instagram usam comment_ai_*; source continua live. */
|
|
665
692
|
finish_reason: string | null;
|
|
693
|
+
/** Apenas em execuções de comentários; null quando falta preço ou medição. */
|
|
694
|
+
estimated_cost_usd?: number | null;
|
|
666
695
|
error_code: string | null;
|
|
667
696
|
created_at: string;
|
|
668
697
|
completed_at: string | null;
|
|
@@ -4305,6 +4334,47 @@ interface InstagramConnection {
|
|
|
4305
4334
|
interface MessageRuleQrParams {
|
|
4306
4335
|
format?: "png" | "svg";
|
|
4307
4336
|
}
|
|
4337
|
+
/** Configuração e prontidão da IA de comentários; desligada por padrão. */
|
|
4338
|
+
interface InstagramCommentAi {
|
|
4339
|
+
enabled: boolean;
|
|
4340
|
+
agent_id: string | null;
|
|
4341
|
+
/** Inteiro 1–200; padrão 50. */
|
|
4342
|
+
daily_limit: number;
|
|
4343
|
+
status: "inactive" | "active" | "testing" | "paused" | (string & {});
|
|
4344
|
+
/** Respostas públicas confirmadas no dia. */
|
|
4345
|
+
answered_today: number;
|
|
4346
|
+
/** Tentativas admitidas, inclusive incertas; podem superar answered_today. */
|
|
4347
|
+
reserved_today: number;
|
|
4348
|
+
timezone: "America/Sao_Paulo" | (string & {});
|
|
4349
|
+
gate_mode: "pre_go_live" | "allowlist" | "open" | (string & {});
|
|
4350
|
+
readiness: string[];
|
|
4351
|
+
}
|
|
4352
|
+
/** PATCH parcial; envie ao menos um campo. Ausente preserva; null limpa o agente. */
|
|
4353
|
+
interface UpdateCommentAiParams {
|
|
4354
|
+
enabled?: boolean;
|
|
4355
|
+
agent_id?: string | null;
|
|
4356
|
+
/** Inteiro de 1 a 200. */
|
|
4357
|
+
daily_limit?: number;
|
|
4358
|
+
}
|
|
4359
|
+
type CommentAiDeliveryStatus = "pending" | "sending" | "sent" | "failed" | "unknown" | "skipped" | (string & {});
|
|
4360
|
+
/** Histórico público da decisão e dos envios, sem claims ou credenciais. */
|
|
4361
|
+
interface InstagramCommentAiRun {
|
|
4362
|
+
id: string;
|
|
4363
|
+
comment_id: string;
|
|
4364
|
+
comment_text: string | null;
|
|
4365
|
+
author_username: string | null;
|
|
4366
|
+
media_id: string | null;
|
|
4367
|
+
execution_id: string | null;
|
|
4368
|
+
status: "processing" | "ready" | "completed" | "skipped" | "failed" | "unknown" | (string & {});
|
|
4369
|
+
action: "public" | "private" | "ignore" | (string & {}) | null;
|
|
4370
|
+
reason: string | null;
|
|
4371
|
+
reason_message: string;
|
|
4372
|
+
reply_text: string | null;
|
|
4373
|
+
dm_status: CommentAiDeliveryStatus;
|
|
4374
|
+
reply_status: CommentAiDeliveryStatus;
|
|
4375
|
+
created_at: string;
|
|
4376
|
+
completed_at: string | null;
|
|
4377
|
+
}
|
|
4308
4378
|
/** Estado de uma Regra de comentário. `paused_plan`: ativa, mas pausada pelo plano. */
|
|
4309
4379
|
type CommentRuleStatus = "active" | "inactive" | "paused_plan" | (string & {});
|
|
4310
4380
|
/**
|
|
@@ -4548,6 +4618,16 @@ declare class ChannelAccounts {
|
|
|
4548
4618
|
resubscribeConnection(id: string): Promise<InstagramConnection>;
|
|
4549
4619
|
/** Desconecta a conta. numbers:write; por chave de API (OAuth: somente painel). */
|
|
4550
4620
|
disconnect(id: string): Promise<InstagramConnection>;
|
|
4621
|
+
/** Configuração, uso diário e prontidão. agents:read; sem sandbox. */
|
|
4622
|
+
getCommentAi(channelAccountId: string): Promise<InstagramCommentAi>;
|
|
4623
|
+
/**
|
|
4624
|
+
* PATCH parcial. Ativar pode publicar respostas e enviar DMs automáticas.
|
|
4625
|
+
* agents:write e capacidade ai (desligar somente é livre); sem sandbox.
|
|
4626
|
+
* Chave de API; no OAuth a configuração é exclusiva do painel.
|
|
4627
|
+
*/
|
|
4628
|
+
updateCommentAi(channelAccountId: string, params: UpdateCommentAiParams): Promise<InstagramCommentAi>;
|
|
4629
|
+
/** Histórico, mais recente primeiro, com paginação offset. agents:read; sem sandbox. */
|
|
4630
|
+
listCommentAiRuns(channelAccountId: string, params?: OffsetParams): Promise<OffsetList<InstagramCommentAiRun>>;
|
|
4551
4631
|
/** QR do ref_link, PNG por padrão; 404 sem link. message-rules:read. */
|
|
4552
4632
|
getMessageRuleQr(id: string, ruleId: string, params?: MessageRuleQrParams): Promise<ArrayBuffer>;
|
|
4553
4633
|
/** Lista as Regras de comentário de uma Conta do Instagram (UUID). comment-rules:read. */
|
|
@@ -4951,4 +5031,4 @@ declare const PLAN_ERROR_CODES: readonly ["plan_restricted", "free_form_limit_re
|
|
|
4951
5031
|
/** True quando o erro é recusa por plano (upgrade resolve; retry não). */
|
|
4952
5032
|
declare function isPlanError(error: unknown): error is BotoZapError;
|
|
4953
5033
|
|
|
4954
|
-
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 ChannelAccount, type ChannelAccountRef, ChannelAccounts, type CommentRule, type CommentRuleCounters, type CommentRuleMetrics, type CommentRuleMetricsParams, type CommentRuleStatus, 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 CreateCommentRuleParams, type CreateContactParams, type CreateCustomerParams, type CreateDemand, type CreateMessageRuleParams, type CreateOpportunity, type CreateSetupLinkParams, type CreateTemplateParams, type CreateWebhookParams, type CrmActivity, type CrmConversation, type CrmFields, type CrmMetadata, type CrmQuery, type CrmRecord, CrmResource, type CursorList, type CursorPaging, type CursorParams, type Customer, type DeleteCommentRuleResult, type DeleteMessageRuleResult, type Demand, type DemandFields, type EventList, type EventPaging, type FixedRuleMessage, Inbox, type InboxMutation, type InboxMutationResult, type InboxState, type InboxTools, type InstagramConnection, type InstagramGenericElement, type InstagramIceBreaker, type InstagramInteractiveButton, type InstagramInteractiveButtonPayload, type InstagramInteractiveGenericPayload, type InstagramInteractivePayload, type InstagramPersistentMenuItem, type InstagramTokenStatus, type InteractiveButtonPayload, type InteractiveCtaUrlPayload, type InteractiveHeader, type InteractiveListPayload, type InteractivePayload, type Journey, type JourneyConfig, type JourneyEnrollment, type JourneyQuery, type JourneyRun, type JourneyStep, Journeys, type ListApiLogsParams, type ListBroadcastsParams, type ListChannelAccountsParams, type ListContactsParams, type ListConversationsParams, type ListEventsParams, type ListMessagesParams, type ListPhoneNumbersParams, type ListRecipientsParams, type ListTemplatesParams, type ListWebhookDeliveriesParams, type Me, type MediaAsset, type MediaUploadResult, type Message, type MessageChannel, type MessageContent, type MessageEdit, type MessageRule, type MessageRuleAction, type MessageRuleQrParams, type MessageRuleTrigger, type MessageSort, type MessageSource, type MessageStatus, type MessengerProfile, type MessengerProfileConfig, type MetaCostCategory, type MetaCostDay, type MetaCostEstimate, type MetaCostGroup, type MetaCostReport, type MetaCostSource, type MetaCostSync, type MetaCostUnavailableReason, type MetaCostsParams, type OffsetList, type OffsetMeta, type OffsetParams, type Opportunity, type OpportunityFields, PLAN_ERROR_CODES, type PhoneNumber, type QuickReply, Radar, type RadarEntry, type RadarPage, type RadarQuery, type 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 UpdateCommentRuleParams, type UpdateContactParams, type UpdateCustomerParams, type UpdateMessageRuleParams, type UpdateMessengerProfileParams, type UpdatePhoneNumberParams, type UpdateSetupLinkParams, type UpdateWebhookParams, type UploadMediaParams, type User, WEBHOOK_CATEGORIES, type Webhook, type WebhookAuthorizationHeaders, type WebhookCategory, type WebhookChannelHealth, type WebhookChannelHealthStatus, type WebhookDelivery, type WebhookDeliveryStatus, isPlanError };
|
|
5034
|
+
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 ChannelAccount, type ChannelAccountRef, ChannelAccounts, type CommentAiDeliveryStatus, type CommentRule, type CommentRuleCounters, type CommentRuleMetrics, type CommentRuleMetricsParams, type CommentRuleStatus, 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 CreateCommentRuleParams, type CreateContactParams, type CreateCustomerParams, type CreateDemand, type CreateMessageRuleParams, type CreateOpportunity, type CreateSetupLinkParams, type CreateTemplateParams, type CreateWebhookParams, type CrmActivity, type CrmConversation, type CrmFields, type CrmMetadata, type CrmQuery, type CrmRecord, CrmResource, type CursorList, type CursorPaging, type CursorParams, type Customer, type DeleteCommentRuleResult, type DeleteMessageRuleResult, type Demand, type DemandFields, type EventList, type EventPaging, type FixedRuleMessage, Inbox, type InboxMutation, type InboxMutationResult, type InboxState, type InboxTools, type InstagramCommentAi, type InstagramCommentAiAutomation, type InstagramCommentAiRepliedEvent, type InstagramCommentAiRun, type InstagramConnection, type InstagramGenericElement, type InstagramIceBreaker, type InstagramInteractiveButton, type InstagramInteractiveButtonPayload, type InstagramInteractiveGenericPayload, type InstagramInteractivePayload, type InstagramPersistentMenuItem, type InstagramTokenStatus, type InteractiveButtonPayload, type InteractiveCtaUrlPayload, type InteractiveHeader, type InteractiveListPayload, type InteractivePayload, type Journey, type JourneyConfig, type JourneyEnrollment, type JourneyQuery, type JourneyRun, type JourneyStep, Journeys, type ListApiLogsParams, type ListBroadcastsParams, type ListChannelAccountsParams, type ListContactsParams, type ListConversationsParams, type ListEventsParams, type ListMessagesParams, type ListPhoneNumbersParams, type ListRecipientsParams, type ListTemplatesParams, type ListWebhookDeliveriesParams, type Me, type MediaAsset, type MediaUploadResult, type Message, type MessageChannel, type MessageContent, type MessageEdit, type MessageRule, type MessageRuleAction, type MessageRuleQrParams, type MessageRuleTrigger, type MessageSort, type MessageSource, type MessageStatus, type MessengerProfile, type MessengerProfileConfig, type MetaCostCategory, type MetaCostDay, type MetaCostEstimate, type MetaCostGroup, type MetaCostReport, type MetaCostSource, type MetaCostSync, type MetaCostUnavailableReason, type MetaCostsParams, type OffsetList, type OffsetMeta, type OffsetParams, type Opportunity, type OpportunityFields, PLAN_ERROR_CODES, type PhoneNumber, type QuickReply, Radar, type RadarEntry, type RadarPage, type RadarQuery, type 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 UpdateCommentAiParams, type UpdateCommentRuleParams, type UpdateContactParams, type UpdateCustomerParams, type UpdateMessageRuleParams, type UpdateMessengerProfileParams, type UpdatePhoneNumberParams, type UpdateSetupLinkParams, type UpdateWebhookParams, type UploadMediaParams, type User, WEBHOOK_CATEGORIES, type Webhook, type WebhookAuthorizationHeaders, type WebhookCategory, type WebhookChannelHealth, type WebhookChannelHealthStatus, type WebhookDelivery, type WebhookDeliveryStatus, isPlanError };
|
package/dist/index.d.ts
CHANGED
|
@@ -142,6 +142,10 @@ interface MessageContent {
|
|
|
142
142
|
body?: string;
|
|
143
143
|
/** Presente quando o contato editou a mensagem: o conteúdo já é o editado. */
|
|
144
144
|
edited?: MessageEdit;
|
|
145
|
+
/** Private Reply gerada pela IA de comentários do Instagram. */
|
|
146
|
+
source?: string;
|
|
147
|
+
ai_execution_id?: string;
|
|
148
|
+
comment_id?: string;
|
|
145
149
|
[key: string]: unknown;
|
|
146
150
|
}
|
|
147
151
|
interface Message {
|
|
@@ -362,6 +366,28 @@ interface BotoZapEvent {
|
|
|
362
366
|
created_at: string;
|
|
363
367
|
data: Record<string, unknown>;
|
|
364
368
|
}
|
|
369
|
+
/** Automação confirmada no evento instagram.comment.replied. */
|
|
370
|
+
interface InstagramCommentAiAutomation {
|
|
371
|
+
kind: "instagram_comment_ai";
|
|
372
|
+
execution_id: string;
|
|
373
|
+
comment_id: string;
|
|
374
|
+
}
|
|
375
|
+
type InstagramCommentAiRepliedEvent = BotoZapEvent & {
|
|
376
|
+
type: "instagram.comment.replied";
|
|
377
|
+
data: {
|
|
378
|
+
channel: "instagram";
|
|
379
|
+
channel_account: ChannelAccountRef;
|
|
380
|
+
external_id: string;
|
|
381
|
+
comment: {
|
|
382
|
+
id: string;
|
|
383
|
+
reply_id: string;
|
|
384
|
+
text: string;
|
|
385
|
+
timestamp: string;
|
|
386
|
+
};
|
|
387
|
+
automation: InstagramCommentAiAutomation;
|
|
388
|
+
[key: string]: unknown;
|
|
389
|
+
};
|
|
390
|
+
};
|
|
365
391
|
/** Paginação crescente do stream; `cursor` é seguro para o próximo `after`. */
|
|
366
392
|
interface EventPaging {
|
|
367
393
|
cursor: string;
|
|
@@ -662,7 +688,10 @@ type AiExecution = {
|
|
|
662
688
|
}[];
|
|
663
689
|
usage?: AiUsageTokens | null;
|
|
664
690
|
measurement_status: "measured" | "partial" | "unavailable";
|
|
691
|
+
/** Comentários do Instagram usam comment_ai_*; source continua live. */
|
|
665
692
|
finish_reason: string | null;
|
|
693
|
+
/** Apenas em execuções de comentários; null quando falta preço ou medição. */
|
|
694
|
+
estimated_cost_usd?: number | null;
|
|
666
695
|
error_code: string | null;
|
|
667
696
|
created_at: string;
|
|
668
697
|
completed_at: string | null;
|
|
@@ -4305,6 +4334,47 @@ interface InstagramConnection {
|
|
|
4305
4334
|
interface MessageRuleQrParams {
|
|
4306
4335
|
format?: "png" | "svg";
|
|
4307
4336
|
}
|
|
4337
|
+
/** Configuração e prontidão da IA de comentários; desligada por padrão. */
|
|
4338
|
+
interface InstagramCommentAi {
|
|
4339
|
+
enabled: boolean;
|
|
4340
|
+
agent_id: string | null;
|
|
4341
|
+
/** Inteiro 1–200; padrão 50. */
|
|
4342
|
+
daily_limit: number;
|
|
4343
|
+
status: "inactive" | "active" | "testing" | "paused" | (string & {});
|
|
4344
|
+
/** Respostas públicas confirmadas no dia. */
|
|
4345
|
+
answered_today: number;
|
|
4346
|
+
/** Tentativas admitidas, inclusive incertas; podem superar answered_today. */
|
|
4347
|
+
reserved_today: number;
|
|
4348
|
+
timezone: "America/Sao_Paulo" | (string & {});
|
|
4349
|
+
gate_mode: "pre_go_live" | "allowlist" | "open" | (string & {});
|
|
4350
|
+
readiness: string[];
|
|
4351
|
+
}
|
|
4352
|
+
/** PATCH parcial; envie ao menos um campo. Ausente preserva; null limpa o agente. */
|
|
4353
|
+
interface UpdateCommentAiParams {
|
|
4354
|
+
enabled?: boolean;
|
|
4355
|
+
agent_id?: string | null;
|
|
4356
|
+
/** Inteiro de 1 a 200. */
|
|
4357
|
+
daily_limit?: number;
|
|
4358
|
+
}
|
|
4359
|
+
type CommentAiDeliveryStatus = "pending" | "sending" | "sent" | "failed" | "unknown" | "skipped" | (string & {});
|
|
4360
|
+
/** Histórico público da decisão e dos envios, sem claims ou credenciais. */
|
|
4361
|
+
interface InstagramCommentAiRun {
|
|
4362
|
+
id: string;
|
|
4363
|
+
comment_id: string;
|
|
4364
|
+
comment_text: string | null;
|
|
4365
|
+
author_username: string | null;
|
|
4366
|
+
media_id: string | null;
|
|
4367
|
+
execution_id: string | null;
|
|
4368
|
+
status: "processing" | "ready" | "completed" | "skipped" | "failed" | "unknown" | (string & {});
|
|
4369
|
+
action: "public" | "private" | "ignore" | (string & {}) | null;
|
|
4370
|
+
reason: string | null;
|
|
4371
|
+
reason_message: string;
|
|
4372
|
+
reply_text: string | null;
|
|
4373
|
+
dm_status: CommentAiDeliveryStatus;
|
|
4374
|
+
reply_status: CommentAiDeliveryStatus;
|
|
4375
|
+
created_at: string;
|
|
4376
|
+
completed_at: string | null;
|
|
4377
|
+
}
|
|
4308
4378
|
/** Estado de uma Regra de comentário. `paused_plan`: ativa, mas pausada pelo plano. */
|
|
4309
4379
|
type CommentRuleStatus = "active" | "inactive" | "paused_plan" | (string & {});
|
|
4310
4380
|
/**
|
|
@@ -4548,6 +4618,16 @@ declare class ChannelAccounts {
|
|
|
4548
4618
|
resubscribeConnection(id: string): Promise<InstagramConnection>;
|
|
4549
4619
|
/** Desconecta a conta. numbers:write; por chave de API (OAuth: somente painel). */
|
|
4550
4620
|
disconnect(id: string): Promise<InstagramConnection>;
|
|
4621
|
+
/** Configuração, uso diário e prontidão. agents:read; sem sandbox. */
|
|
4622
|
+
getCommentAi(channelAccountId: string): Promise<InstagramCommentAi>;
|
|
4623
|
+
/**
|
|
4624
|
+
* PATCH parcial. Ativar pode publicar respostas e enviar DMs automáticas.
|
|
4625
|
+
* agents:write e capacidade ai (desligar somente é livre); sem sandbox.
|
|
4626
|
+
* Chave de API; no OAuth a configuração é exclusiva do painel.
|
|
4627
|
+
*/
|
|
4628
|
+
updateCommentAi(channelAccountId: string, params: UpdateCommentAiParams): Promise<InstagramCommentAi>;
|
|
4629
|
+
/** Histórico, mais recente primeiro, com paginação offset. agents:read; sem sandbox. */
|
|
4630
|
+
listCommentAiRuns(channelAccountId: string, params?: OffsetParams): Promise<OffsetList<InstagramCommentAiRun>>;
|
|
4551
4631
|
/** QR do ref_link, PNG por padrão; 404 sem link. message-rules:read. */
|
|
4552
4632
|
getMessageRuleQr(id: string, ruleId: string, params?: MessageRuleQrParams): Promise<ArrayBuffer>;
|
|
4553
4633
|
/** Lista as Regras de comentário de uma Conta do Instagram (UUID). comment-rules:read. */
|
|
@@ -4951,4 +5031,4 @@ declare const PLAN_ERROR_CODES: readonly ["plan_restricted", "free_form_limit_re
|
|
|
4951
5031
|
/** True quando o erro é recusa por plano (upgrade resolve; retry não). */
|
|
4952
5032
|
declare function isPlanError(error: unknown): error is BotoZapError;
|
|
4953
5033
|
|
|
4954
|
-
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 ChannelAccount, type ChannelAccountRef, ChannelAccounts, type CommentRule, type CommentRuleCounters, type CommentRuleMetrics, type CommentRuleMetricsParams, type CommentRuleStatus, 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 CreateCommentRuleParams, type CreateContactParams, type CreateCustomerParams, type CreateDemand, type CreateMessageRuleParams, type CreateOpportunity, type CreateSetupLinkParams, type CreateTemplateParams, type CreateWebhookParams, type CrmActivity, type CrmConversation, type CrmFields, type CrmMetadata, type CrmQuery, type CrmRecord, CrmResource, type CursorList, type CursorPaging, type CursorParams, type Customer, type DeleteCommentRuleResult, type DeleteMessageRuleResult, type Demand, type DemandFields, type EventList, type EventPaging, type FixedRuleMessage, Inbox, type InboxMutation, type InboxMutationResult, type InboxState, type InboxTools, type InstagramConnection, type InstagramGenericElement, type InstagramIceBreaker, type InstagramInteractiveButton, type InstagramInteractiveButtonPayload, type InstagramInteractiveGenericPayload, type InstagramInteractivePayload, type InstagramPersistentMenuItem, type InstagramTokenStatus, type InteractiveButtonPayload, type InteractiveCtaUrlPayload, type InteractiveHeader, type InteractiveListPayload, type InteractivePayload, type Journey, type JourneyConfig, type JourneyEnrollment, type JourneyQuery, type JourneyRun, type JourneyStep, Journeys, type ListApiLogsParams, type ListBroadcastsParams, type ListChannelAccountsParams, type ListContactsParams, type ListConversationsParams, type ListEventsParams, type ListMessagesParams, type ListPhoneNumbersParams, type ListRecipientsParams, type ListTemplatesParams, type ListWebhookDeliveriesParams, type Me, type MediaAsset, type MediaUploadResult, type Message, type MessageChannel, type MessageContent, type MessageEdit, type MessageRule, type MessageRuleAction, type MessageRuleQrParams, type MessageRuleTrigger, type MessageSort, type MessageSource, type MessageStatus, type MessengerProfile, type MessengerProfileConfig, type MetaCostCategory, type MetaCostDay, type MetaCostEstimate, type MetaCostGroup, type MetaCostReport, type MetaCostSource, type MetaCostSync, type MetaCostUnavailableReason, type MetaCostsParams, type OffsetList, type OffsetMeta, type OffsetParams, type Opportunity, type OpportunityFields, PLAN_ERROR_CODES, type PhoneNumber, type QuickReply, Radar, type RadarEntry, type RadarPage, type RadarQuery, type 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 UpdateCommentRuleParams, type UpdateContactParams, type UpdateCustomerParams, type UpdateMessageRuleParams, type UpdateMessengerProfileParams, type UpdatePhoneNumberParams, type UpdateSetupLinkParams, type UpdateWebhookParams, type UploadMediaParams, type User, WEBHOOK_CATEGORIES, type Webhook, type WebhookAuthorizationHeaders, type WebhookCategory, type WebhookChannelHealth, type WebhookChannelHealthStatus, type WebhookDelivery, type WebhookDeliveryStatus, isPlanError };
|
|
5034
|
+
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 ChannelAccount, type ChannelAccountRef, ChannelAccounts, type CommentAiDeliveryStatus, type CommentRule, type CommentRuleCounters, type CommentRuleMetrics, type CommentRuleMetricsParams, type CommentRuleStatus, 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 CreateCommentRuleParams, type CreateContactParams, type CreateCustomerParams, type CreateDemand, type CreateMessageRuleParams, type CreateOpportunity, type CreateSetupLinkParams, type CreateTemplateParams, type CreateWebhookParams, type CrmActivity, type CrmConversation, type CrmFields, type CrmMetadata, type CrmQuery, type CrmRecord, CrmResource, type CursorList, type CursorPaging, type CursorParams, type Customer, type DeleteCommentRuleResult, type DeleteMessageRuleResult, type Demand, type DemandFields, type EventList, type EventPaging, type FixedRuleMessage, Inbox, type InboxMutation, type InboxMutationResult, type InboxState, type InboxTools, type InstagramCommentAi, type InstagramCommentAiAutomation, type InstagramCommentAiRepliedEvent, type InstagramCommentAiRun, type InstagramConnection, type InstagramGenericElement, type InstagramIceBreaker, type InstagramInteractiveButton, type InstagramInteractiveButtonPayload, type InstagramInteractiveGenericPayload, type InstagramInteractivePayload, type InstagramPersistentMenuItem, type InstagramTokenStatus, type InteractiveButtonPayload, type InteractiveCtaUrlPayload, type InteractiveHeader, type InteractiveListPayload, type InteractivePayload, type Journey, type JourneyConfig, type JourneyEnrollment, type JourneyQuery, type JourneyRun, type JourneyStep, Journeys, type ListApiLogsParams, type ListBroadcastsParams, type ListChannelAccountsParams, type ListContactsParams, type ListConversationsParams, type ListEventsParams, type ListMessagesParams, type ListPhoneNumbersParams, type ListRecipientsParams, type ListTemplatesParams, type ListWebhookDeliveriesParams, type Me, type MediaAsset, type MediaUploadResult, type Message, type MessageChannel, type MessageContent, type MessageEdit, type MessageRule, type MessageRuleAction, type MessageRuleQrParams, type MessageRuleTrigger, type MessageSort, type MessageSource, type MessageStatus, type MessengerProfile, type MessengerProfileConfig, type MetaCostCategory, type MetaCostDay, type MetaCostEstimate, type MetaCostGroup, type MetaCostReport, type MetaCostSource, type MetaCostSync, type MetaCostUnavailableReason, type MetaCostsParams, type OffsetList, type OffsetMeta, type OffsetParams, type Opportunity, type OpportunityFields, PLAN_ERROR_CODES, type PhoneNumber, type QuickReply, Radar, type RadarEntry, type RadarPage, type RadarQuery, type 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 UpdateCommentAiParams, type UpdateCommentRuleParams, type UpdateContactParams, type UpdateCustomerParams, type UpdateMessageRuleParams, type UpdateMessengerProfileParams, type UpdatePhoneNumberParams, type UpdateSetupLinkParams, type UpdateWebhookParams, type UploadMediaParams, type User, WEBHOOK_CATEGORIES, type Webhook, type WebhookAuthorizationHeaders, type WebhookCategory, type WebhookChannelHealth, type WebhookChannelHealthStatus, type WebhookDelivery, type WebhookDeliveryStatus, isPlanError };
|
package/dist/index.js
CHANGED
|
@@ -5724,6 +5724,26 @@ var ChannelAccounts = class {
|
|
|
5724
5724
|
disconnect(id) {
|
|
5725
5725
|
return this.client.requestItem("DELETE", `/channel_accounts/${enc7(id)}/connection`);
|
|
5726
5726
|
}
|
|
5727
|
+
/** Configuração, uso diário e prontidão. agents:read; sem sandbox. */
|
|
5728
|
+
getCommentAi(channelAccountId) {
|
|
5729
|
+
return this.client.requestItem("GET", `/channel_accounts/${enc7(channelAccountId)}/comment-ai`);
|
|
5730
|
+
}
|
|
5731
|
+
/**
|
|
5732
|
+
* PATCH parcial. Ativar pode publicar respostas e enviar DMs automáticas.
|
|
5733
|
+
* agents:write e capacidade ai (desligar somente é livre); sem sandbox.
|
|
5734
|
+
* Chave de API; no OAuth a configuração é exclusiva do painel.
|
|
5735
|
+
*/
|
|
5736
|
+
updateCommentAi(channelAccountId, params) {
|
|
5737
|
+
return this.client.requestItem("PATCH", `/channel_accounts/${enc7(channelAccountId)}/comment-ai`, { body: params });
|
|
5738
|
+
}
|
|
5739
|
+
/** Histórico, mais recente primeiro, com paginação offset. agents:read; sem sandbox. */
|
|
5740
|
+
listCommentAiRuns(channelAccountId, params = {}) {
|
|
5741
|
+
return this.client.requestOffsetList(
|
|
5742
|
+
"GET",
|
|
5743
|
+
`/channel_accounts/${enc7(channelAccountId)}/comment-ai/runs`,
|
|
5744
|
+
{ query: { page: params.page, per_page: params.per_page } }
|
|
5745
|
+
);
|
|
5746
|
+
}
|
|
5727
5747
|
/** QR do ref_link, PNG por padrão; 404 sem link. message-rules:read. */
|
|
5728
5748
|
getMessageRuleQr(id, ruleId, params = {}) {
|
|
5729
5749
|
return this.client.requestBinary("GET", `${messageRulesPath(id, ruleId)}/qr`, { query: { format: params.format } });
|