portal-aiatende-api 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +19 -0
- package/dist/index.d.ts +19 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -389,6 +389,14 @@ interface MessagingConversation {
|
|
|
389
389
|
handoffReason?: string | null;
|
|
390
390
|
handoffSetAt?: Date | string | null;
|
|
391
391
|
handoffSetByName?: string | null;
|
|
392
|
+
/**
|
|
393
|
+
* "Reiniciar atendimento" — não apaga nenhuma Message (continuam visíveis na conversa pro
|
|
394
|
+
* humano), só marca um corte no tempo: mensagens com `createdAt` <= este timestamp devem ser
|
|
395
|
+
* excluídas do contexto montado pro modelo (ver Conversation.aiHistoryResetAt no Portal e
|
|
396
|
+
* aiatendeWaQueue.ts, canal aiatendeWa). `null` = nunca reiniciado, nada é filtrado.
|
|
397
|
+
*/
|
|
398
|
+
aiHistoryResetAt?: Date | string | null;
|
|
399
|
+
aiHistoryResetByName?: string | null;
|
|
392
400
|
/**
|
|
393
401
|
* Lead da Kommo dono desse mesmo número de telefone — hoje toda a movimentação/tools da IA
|
|
394
402
|
* (agendamento, mover pipeline, etc.) opera em cima de um lead_id da Kommo; este canal não tem
|
|
@@ -478,6 +486,12 @@ interface PatchConversationPayload {
|
|
|
478
486
|
* auto-atribuir a conversa por round-robin (ver MessagingConfig.assignmentMode).
|
|
479
487
|
*/
|
|
480
488
|
handoffReason?: string;
|
|
489
|
+
/**
|
|
490
|
+
* true reinicia a "memória" da IA — não apaga nenhuma Message, só grava
|
|
491
|
+
* `aiHistoryResetAt = agora()`. Sempre "agora" (nunca um timestamp escolhido pelo chamador,
|
|
492
|
+
* evita divergência de relógio cliente/servidor).
|
|
493
|
+
*/
|
|
494
|
+
resetAiHistory?: boolean;
|
|
481
495
|
}
|
|
482
496
|
/**
|
|
483
497
|
* `actor` só é respeitado pelo Portal quando o chamador é um papel de sistema/staff (ex.: o
|
|
@@ -655,6 +669,11 @@ interface UpdateContactPayload {
|
|
|
655
669
|
* chaves sem definição são preservadas sem validação.
|
|
656
670
|
*/
|
|
657
671
|
customFields?: Record<string, unknown>;
|
|
672
|
+
/**
|
|
673
|
+
* Vínculo com o lead da Kommo — fonte única de verdade (ver Contact.kommoLeadId no Portal).
|
|
674
|
+
* `null` limpa o vínculo (ex.: self-healing após 404 da Kommo).
|
|
675
|
+
*/
|
|
676
|
+
kommoLeadId?: number | null;
|
|
658
677
|
}
|
|
659
678
|
|
|
660
679
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -389,6 +389,14 @@ interface MessagingConversation {
|
|
|
389
389
|
handoffReason?: string | null;
|
|
390
390
|
handoffSetAt?: Date | string | null;
|
|
391
391
|
handoffSetByName?: string | null;
|
|
392
|
+
/**
|
|
393
|
+
* "Reiniciar atendimento" — não apaga nenhuma Message (continuam visíveis na conversa pro
|
|
394
|
+
* humano), só marca um corte no tempo: mensagens com `createdAt` <= este timestamp devem ser
|
|
395
|
+
* excluídas do contexto montado pro modelo (ver Conversation.aiHistoryResetAt no Portal e
|
|
396
|
+
* aiatendeWaQueue.ts, canal aiatendeWa). `null` = nunca reiniciado, nada é filtrado.
|
|
397
|
+
*/
|
|
398
|
+
aiHistoryResetAt?: Date | string | null;
|
|
399
|
+
aiHistoryResetByName?: string | null;
|
|
392
400
|
/**
|
|
393
401
|
* Lead da Kommo dono desse mesmo número de telefone — hoje toda a movimentação/tools da IA
|
|
394
402
|
* (agendamento, mover pipeline, etc.) opera em cima de um lead_id da Kommo; este canal não tem
|
|
@@ -478,6 +486,12 @@ interface PatchConversationPayload {
|
|
|
478
486
|
* auto-atribuir a conversa por round-robin (ver MessagingConfig.assignmentMode).
|
|
479
487
|
*/
|
|
480
488
|
handoffReason?: string;
|
|
489
|
+
/**
|
|
490
|
+
* true reinicia a "memória" da IA — não apaga nenhuma Message, só grava
|
|
491
|
+
* `aiHistoryResetAt = agora()`. Sempre "agora" (nunca um timestamp escolhido pelo chamador,
|
|
492
|
+
* evita divergência de relógio cliente/servidor).
|
|
493
|
+
*/
|
|
494
|
+
resetAiHistory?: boolean;
|
|
481
495
|
}
|
|
482
496
|
/**
|
|
483
497
|
* `actor` só é respeitado pelo Portal quando o chamador é um papel de sistema/staff (ex.: o
|
|
@@ -655,6 +669,11 @@ interface UpdateContactPayload {
|
|
|
655
669
|
* chaves sem definição são preservadas sem validação.
|
|
656
670
|
*/
|
|
657
671
|
customFields?: Record<string, unknown>;
|
|
672
|
+
/**
|
|
673
|
+
* Vínculo com o lead da Kommo — fonte única de verdade (ver Contact.kommoLeadId no Portal).
|
|
674
|
+
* `null` limpa o vínculo (ex.: self-healing após 404 da Kommo).
|
|
675
|
+
*/
|
|
676
|
+
kommoLeadId?: number | null;
|
|
658
677
|
}
|
|
659
678
|
|
|
660
679
|
/**
|