@rodrigobeber/patoai-dtos 4.7.35 → 4.7.38
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/billing/billing-event.dto.d.ts +19 -0
- package/dist/crew/crew.dto.d.ts +0 -1
- package/dist/webchat/agent/agent-limits.dto.d.ts +36 -0
- package/dist/webchat/agent/agent-limits.dto.js +14 -0
- package/dist/webchat/agent/index.d.ts +1 -0
- package/dist/webchat/agent/index.js +1 -0
- package/dist/webchat/agent/webchat-create-prompt.dto.d.ts +0 -1
- package/dist/webchat/agent/webchat-prompt.dto.d.ts +0 -1
- package/dist/wizard/wizard.dto.d.ts +16 -0
- package/package.json +1 -1
|
@@ -105,3 +105,22 @@ export interface AdminCrewBillingInfoDto {
|
|
|
105
105
|
export interface AdminBillingBatchResponseDto {
|
|
106
106
|
items: AdminCrewBillingInfoDto[];
|
|
107
107
|
}
|
|
108
|
+
export interface TestBalanceDto {
|
|
109
|
+
idCrew: number;
|
|
110
|
+
nrTestResponses: number;
|
|
111
|
+
freeGrant: number;
|
|
112
|
+
packSize: number;
|
|
113
|
+
packPriceCredits: number;
|
|
114
|
+
}
|
|
115
|
+
export interface ConsumeTestResponseDto {
|
|
116
|
+
idCrew: number;
|
|
117
|
+
turnKey: string;
|
|
118
|
+
}
|
|
119
|
+
export interface PurchaseTestPackRequestDto {
|
|
120
|
+
idCrew: number;
|
|
121
|
+
}
|
|
122
|
+
export interface PurchaseTestPackResultDto {
|
|
123
|
+
ok: boolean;
|
|
124
|
+
nrTestResponses: number;
|
|
125
|
+
reason?: 'no_credits';
|
|
126
|
+
}
|
package/dist/crew/crew.dto.d.ts
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Limites de tamanho do agente, por crew. Fonte: tabela prompt.crew_limit (sem UI; a PLATAFORMA/DEV
|
|
3
|
+
* ajusta no banco). O frontend consome via GET /crews/:idCrew/prompt-budget para:
|
|
4
|
+
* - mostrar o medidor de uso por RUN (worst-case: maior run entre tipo x estagio, SO os prompts);
|
|
5
|
+
* - validar os 4 campos de contexto (about/role/audience/behavior) com o limite proprio de cada um.
|
|
6
|
+
* Conta DEV (account.role='dev') extrapola tudo (bypass no backend e no frontend).
|
|
7
|
+
*/
|
|
8
|
+
export interface AgentLimitsDto {
|
|
9
|
+
context: {
|
|
10
|
+
about: number;
|
|
11
|
+
role: number;
|
|
12
|
+
audience: number;
|
|
13
|
+
behavior: number;
|
|
14
|
+
};
|
|
15
|
+
run: {
|
|
16
|
+
/** Teto de caracteres por run (prompt.crew_limit.nr_prompt_max_chars). */
|
|
17
|
+
limit: number;
|
|
18
|
+
/** Pior caso atual: soma dos prompts no maior run (tipo x estagio). So prompts, sem contexto/base. */
|
|
19
|
+
used: number;
|
|
20
|
+
/** max(0, limit - used). */
|
|
21
|
+
remaining: number;
|
|
22
|
+
/** Nome do estagio do pior run (null se a crew nao tem CRM). */
|
|
23
|
+
worstStageName: string | null;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Defaults dos limites (espelham os DEFAULT da tabela prompt.crew_limit). Fonte unica usada como
|
|
28
|
+
* fallback no backend (crew sem linha) e pelo Wizard (agente ainda sem crew/linha de limite).
|
|
29
|
+
*/
|
|
30
|
+
export declare const AGENT_LIMIT_DEFAULTS: {
|
|
31
|
+
readonly promptMaxChars: 40000;
|
|
32
|
+
readonly about: 1000;
|
|
33
|
+
readonly role: 1000;
|
|
34
|
+
readonly audience: 1000;
|
|
35
|
+
readonly behavior: 3000;
|
|
36
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AGENT_LIMIT_DEFAULTS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Defaults dos limites (espelham os DEFAULT da tabela prompt.crew_limit). Fonte unica usada como
|
|
6
|
+
* fallback no backend (crew sem linha) e pelo Wizard (agente ainda sem crew/linha de limite).
|
|
7
|
+
*/
|
|
8
|
+
exports.AGENT_LIMIT_DEFAULTS = {
|
|
9
|
+
promptMaxChars: 40000,
|
|
10
|
+
about: 1000,
|
|
11
|
+
role: 1000,
|
|
12
|
+
audience: 1000,
|
|
13
|
+
behavior: 3000,
|
|
14
|
+
};
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./webchat-prompt.dto"), exports);
|
|
18
|
+
__exportStar(require("./agent-limits.dto"), exports);
|
|
18
19
|
__exportStar(require("./webchat-update-prompt.dto"), exports);
|
|
19
20
|
__exportStar(require("./webchat-create-prompt.dto"), exports);
|
|
20
21
|
__exportStar(require("./webchat-context.dto"), exports);
|
|
@@ -6,6 +6,20 @@ export interface WizardChatRequestDto {
|
|
|
6
6
|
sessionId: string;
|
|
7
7
|
message: string;
|
|
8
8
|
}
|
|
9
|
+
/** Resumo parcial do que o chat já coletou — alimenta o "resumo ao vivo" da criação do agente.
|
|
10
|
+
* Todos opcionais/nullable: preenchidos incrementalmente conforme a conversa avança. */
|
|
11
|
+
export interface WizardCollectedDto {
|
|
12
|
+
/** Nome da empresa. */
|
|
13
|
+
companyName?: string | null;
|
|
14
|
+
/** Nome desejado para o agente. */
|
|
15
|
+
agentName?: string | null;
|
|
16
|
+
/** O que a empresa vende/oferta (produto/serviço principal), em poucas palavras. */
|
|
17
|
+
sells?: string | null;
|
|
18
|
+
/** Tipo/perfil de cliente (público-alvo), resumido. */
|
|
19
|
+
clientType?: string | null;
|
|
20
|
+
/** Objetivo da conversa / CTA (vender, agendar, qualificar, atender...). */
|
|
21
|
+
objective?: string | null;
|
|
22
|
+
}
|
|
9
23
|
export interface WizardChatResponseDto {
|
|
10
24
|
reply: string;
|
|
11
25
|
done: boolean;
|
|
@@ -14,6 +28,8 @@ export interface WizardChatResponseDto {
|
|
|
14
28
|
/** URLs que o usuário ofereceu como fonte do negócio (site/catálogo/docs), extraídas da
|
|
15
29
|
* mensagem pela IA do chat — o frontend as anexa como material. */
|
|
16
30
|
sourceUrls?: string[];
|
|
31
|
+
/** Resumo parcial do negócio para o "resumo ao vivo" da criação (atualizado a cada turno). */
|
|
32
|
+
collected?: WizardCollectedDto;
|
|
17
33
|
}
|
|
18
34
|
export interface WizardGenerateRequestDto {
|
|
19
35
|
sessionId: string;
|