@rodrigobeber/patoai-dtos 4.7.51 → 4.7.53

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.
@@ -10,4 +10,6 @@ export interface GenderTokens {
10
10
  pelo: string;
11
11
  peloCap: string;
12
12
  }
13
+ export type AgentGender = 'm' | 'f';
14
+ export declare function inferAgentGender(name?: string | null): AgentGender;
13
15
  export declare function buildGenderTokens(gender: string): GenderTokens;
@@ -1,6 +1,36 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inferAgentGender = inferAgentGender;
3
4
  exports.buildGenderTokens = buildGenderTokens;
5
+ // Femininos comuns que NAO terminam em 'a' (a regra do sufixo 'a' nao pegaria).
6
+ const FEMININE_EXCEPTIONS = new Set([
7
+ 'bel', 'isabel', 'mabel', 'raquel', 'rachel', 'beatriz', 'ester', 'esther',
8
+ 'miriam', 'carmen', 'alice', 'adele', 'dulce', 'ines', 'inez', 'agnes',
9
+ 'mercedes', 'lourdes', 'ruth', 'judith', 'liz', 'jasmin', 'yasmin',
10
+ 'karen', 'caren', 'kelen', 'sol', 'flor',
11
+ ]);
12
+ // Masculinos comuns que TERMINAM em 'a' (a regra do sufixo 'a' erraria).
13
+ const MASCULINE_EXCEPTIONS = new Set([
14
+ 'luca', 'noa', 'juca', 'joca', 'nica', 'gilca',
15
+ ]);
16
+ // Fallback heuristico nome->genero gramatical (pt-BR), usado quando o genero nao
17
+ // veio declarado (ex.: provisionamento do agente). A IA do wizard e a fonte primaria;
18
+ // isto so cobre o caso em que o campo veio ausente/invalido. Default 'm'.
19
+ function inferAgentGender(name) {
20
+ const first = (name || '')
21
+ .trim()
22
+ .split(/\s+/)[0]
23
+ .toLowerCase()
24
+ .normalize('NFD')
25
+ .replace(/[̀-ͯ]/g, '');
26
+ if (!first)
27
+ return 'm';
28
+ if (MASCULINE_EXCEPTIONS.has(first))
29
+ return 'm';
30
+ if (FEMININE_EXCEPTIONS.has(first))
31
+ return 'f';
32
+ return first.endsWith('a') ? 'f' : 'm';
33
+ }
4
34
  function buildGenderTokens(gender) {
5
35
  const f = gender === 'f';
6
36
  const cap = (s) => s.charAt(0).toUpperCase() + s.slice(1);
@@ -1,4 +1,5 @@
1
1
  import type { SdrSubType, WizardStageNamesDto, WizardEscalationRuleDto, WizardFollowUpConfigDto } from '../wizard/wizard.dto';
2
+ import type { AgentGender } from './gender-tokens';
2
3
  export type ProvisionAgentType = 'sdr' | 'support';
3
4
  /**
4
5
  * Sugestoes de configuracao da plataforma geradas pela IA do wizard (settingsHints).
@@ -17,6 +18,8 @@ export interface ProvisionSettingsDto {
17
18
  export interface ProvisionCrewDto {
18
19
  companyName: string;
19
20
  agentName: string;
21
+ /** Genero gramatical do agente ('m'/'f'). Ausente/invalido -> inferido do agentName no provisionamento. */
22
+ gender?: AgentGender;
20
23
  agentType: ProvisionAgentType;
21
24
  about: string;
22
25
  role: string;
@@ -9,6 +9,7 @@ import { WebChatFollowUpDto } from "../webchat/follow-up/webchat-followup.dto";
9
9
  import { WebChatHandoffDto } from "../webchat/handoff/webchat-handoff.dto";
10
10
  import { WebChatHoursResponseDto } from "../webchat/organization/webchat-hours.dto";
11
11
  import { WebChatTriggerDto } from "../webchat/automation/webchat-trigger.dto";
12
+ import { WebChatReminderDto } from "../webchat/reminder/webchat-reminder.dto";
12
13
  export interface SupportCrewConfigRequestDto {
13
14
  idCrew: number;
14
15
  idAccount: number;
@@ -25,6 +26,44 @@ export interface SupportAttendeeNameTitleDto {
25
26
  attendeeName: boolean;
26
27
  attendeeNameMask: string | null;
27
28
  }
29
+ export interface SupportAgentBehaviorDto {
30
+ debounce: number;
31
+ typingSpeed: number;
32
+ }
33
+ export interface SupportAgendaAccountDto {
34
+ email: string;
35
+ host: string | null;
36
+ connected: boolean;
37
+ active: boolean;
38
+ }
39
+ export interface SupportAgendaHoursDto {
40
+ weekday: number;
41
+ startTime: string;
42
+ endTime: string;
43
+ }
44
+ export interface SupportAgendaProfessionalDto {
45
+ name: string;
46
+ active: boolean;
47
+ }
48
+ export interface SupportAgendaDto {
49
+ type: string;
50
+ active: boolean;
51
+ title: string | null;
52
+ kind: string | null;
53
+ fixedLocation: string | null;
54
+ duration: number | null;
55
+ offset: number | null;
56
+ generalRules: string | null;
57
+ informAvailabilityRules: string | null;
58
+ checklistRules: string | null;
59
+ summaryRule: string | null;
60
+ descriptionRule: string | null;
61
+ availability: string | null;
62
+ turns: string | null;
63
+ accounts?: SupportAgendaAccountDto[];
64
+ hours?: SupportAgendaHoursDto[];
65
+ professionals?: SupportAgendaProfessionalDto[];
66
+ }
28
67
  export interface SupportCrewConfigDto {
29
68
  crew?: WebChatCrewDto;
30
69
  crewHours?: WebChatCrewHoursResponseDto[];
@@ -38,6 +77,9 @@ export interface SupportCrewConfigDto {
38
77
  crmIntegration?: WebChatCrewCrmDto;
39
78
  members?: MemberWithAccountDto[];
40
79
  attendeeNameTitle?: SupportAttendeeNameTitleDto;
80
+ reminders?: WebChatReminderDto[];
81
+ agentBehavior?: SupportAgentBehaviorDto;
82
+ agenda?: SupportAgendaDto;
41
83
  advancedVisible: boolean;
42
84
  omittedSections: string[];
43
85
  }
@@ -1,3 +1,4 @@
1
+ import type { AgentGender } from '../crew/gender-tokens';
1
2
  export interface WizardStartResponseDto {
2
3
  sessionId: string;
3
4
  greeting: string;
@@ -69,6 +70,8 @@ export interface WizardStructuredInputDto {
69
70
  export interface WizardGenerateResponseDto {
70
71
  companyName: string;
71
72
  agentName: string;
73
+ /** Genero gramatical do agentName ('m'/'f'), base do artigo/pronome do nome no prompt. */
74
+ gender?: AgentGender;
72
75
  agentType: 'sdr' | 'support';
73
76
  about: string;
74
77
  role: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rodrigobeber/patoai-dtos",
3
- "version": "4.7.51",
3
+ "version": "4.7.53",
4
4
  "description": "Data Transfer Objects for PatoAI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",