@rodrigobeber/patoai-dtos 4.8.2 → 4.8.4
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/alert/alert-type.enum.d.ts +19 -0
- package/dist/alert/alert-type.enum.js +47 -0
- package/dist/alert/index.d.ts +1 -0
- package/dist/alert/index.js +17 -0
- package/dist/email/index.d.ts +1 -0
- package/dist/email/index.js +17 -0
- package/dist/email/send-email.dto.d.ts +7 -0
- package/dist/email/send-email.dto.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/support/support-crew-config.dto.d.ts +13 -0
- package/dist/webchat/crew/index.d.ts +1 -0
- package/dist/webchat/crew/index.js +1 -0
- package/dist/webchat/crew/webchat-crew-alerts.dto.d.ts +20 -0
- package/dist/webchat/crew/webchat-crew-alerts.dto.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum AlertTypeEnum {
|
|
2
|
+
WHATSAPP_HEALTH = "whatsapp_health",
|
|
3
|
+
SUBSCRIPTION = "subscription",
|
|
4
|
+
LOW_CREDITS = "low_credits",
|
|
5
|
+
SCHEDULE_UPCOMING = "schedule_upcoming",
|
|
6
|
+
SCHEDULE_CREATED = "schedule_created",
|
|
7
|
+
SCHEDULE_CANCELED = "schedule_canceled",
|
|
8
|
+
DAILY_DIGEST = "daily_digest",
|
|
9
|
+
HANDOFF = "handoff",
|
|
10
|
+
FOLLOWUP_FAILURE = "followup_failure"
|
|
11
|
+
}
|
|
12
|
+
/** Alertas que PODEM ser entregues por WhatsApp (os demais = só e-mail). */
|
|
13
|
+
export declare const WHATSAPP_ELIGIBLE_ALERTS: readonly AlertTypeEnum[];
|
|
14
|
+
/** Trio crítico: WhatsApp vem LIGADO por padrão ao habilitar o alerta. */
|
|
15
|
+
export declare const WHATSAPP_DEFAULT_ON_ALERTS: readonly AlertTypeEnum[];
|
|
16
|
+
/** Alertas que só existem/avaliam quando a crew tem agenda ativa. */
|
|
17
|
+
export declare const AGENDA_REQUIRED_ALERTS: readonly AlertTypeEnum[];
|
|
18
|
+
/** Nome do template UTILITY na Meta por tipo de alerta (só os WhatsApp-elegíveis). */
|
|
19
|
+
export declare const ALERT_TEMPLATE: Partial<Record<AlertTypeEnum, string>>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ALERT_TEMPLATE = exports.AGENDA_REQUIRED_ALERTS = exports.WHATSAPP_DEFAULT_ON_ALERTS = exports.WHATSAPP_ELIGIBLE_ALERTS = exports.AlertTypeEnum = void 0;
|
|
4
|
+
var AlertTypeEnum;
|
|
5
|
+
(function (AlertTypeEnum) {
|
|
6
|
+
AlertTypeEnum["WHATSAPP_HEALTH"] = "whatsapp_health";
|
|
7
|
+
AlertTypeEnum["SUBSCRIPTION"] = "subscription";
|
|
8
|
+
AlertTypeEnum["LOW_CREDITS"] = "low_credits";
|
|
9
|
+
AlertTypeEnum["SCHEDULE_UPCOMING"] = "schedule_upcoming";
|
|
10
|
+
AlertTypeEnum["SCHEDULE_CREATED"] = "schedule_created";
|
|
11
|
+
AlertTypeEnum["SCHEDULE_CANCELED"] = "schedule_canceled";
|
|
12
|
+
AlertTypeEnum["DAILY_DIGEST"] = "daily_digest";
|
|
13
|
+
AlertTypeEnum["HANDOFF"] = "handoff";
|
|
14
|
+
AlertTypeEnum["FOLLOWUP_FAILURE"] = "followup_failure";
|
|
15
|
+
})(AlertTypeEnum || (exports.AlertTypeEnum = AlertTypeEnum = {}));
|
|
16
|
+
/** Alertas que PODEM ser entregues por WhatsApp (os demais = só e-mail). */
|
|
17
|
+
exports.WHATSAPP_ELIGIBLE_ALERTS = [
|
|
18
|
+
AlertTypeEnum.WHATSAPP_HEALTH,
|
|
19
|
+
AlertTypeEnum.SUBSCRIPTION,
|
|
20
|
+
AlertTypeEnum.LOW_CREDITS,
|
|
21
|
+
AlertTypeEnum.SCHEDULE_UPCOMING,
|
|
22
|
+
AlertTypeEnum.SCHEDULE_CREATED,
|
|
23
|
+
AlertTypeEnum.SCHEDULE_CANCELED,
|
|
24
|
+
AlertTypeEnum.DAILY_DIGEST
|
|
25
|
+
];
|
|
26
|
+
/** Trio crítico: WhatsApp vem LIGADO por padrão ao habilitar o alerta. */
|
|
27
|
+
exports.WHATSAPP_DEFAULT_ON_ALERTS = [
|
|
28
|
+
AlertTypeEnum.WHATSAPP_HEALTH,
|
|
29
|
+
AlertTypeEnum.SUBSCRIPTION,
|
|
30
|
+
AlertTypeEnum.LOW_CREDITS
|
|
31
|
+
];
|
|
32
|
+
/** Alertas que só existem/avaliam quando a crew tem agenda ativa. */
|
|
33
|
+
exports.AGENDA_REQUIRED_ALERTS = [
|
|
34
|
+
AlertTypeEnum.SCHEDULE_UPCOMING,
|
|
35
|
+
AlertTypeEnum.SCHEDULE_CREATED,
|
|
36
|
+
AlertTypeEnum.SCHEDULE_CANCELED
|
|
37
|
+
];
|
|
38
|
+
/** Nome do template UTILITY na Meta por tipo de alerta (só os WhatsApp-elegíveis). */
|
|
39
|
+
exports.ALERT_TEMPLATE = {
|
|
40
|
+
[AlertTypeEnum.WHATSAPP_HEALTH]: "alert_whatsapp_health",
|
|
41
|
+
[AlertTypeEnum.SUBSCRIPTION]: "alert_subscription",
|
|
42
|
+
[AlertTypeEnum.LOW_CREDITS]: "alert_low_credits",
|
|
43
|
+
[AlertTypeEnum.SCHEDULE_UPCOMING]: "alert_schedule_upcoming",
|
|
44
|
+
[AlertTypeEnum.SCHEDULE_CREATED]: "alert_schedule_created",
|
|
45
|
+
[AlertTypeEnum.SCHEDULE_CANCELED]: "alert_schedule_canceled",
|
|
46
|
+
[AlertTypeEnum.DAILY_DIGEST]: "alert_daily_digest"
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './alert-type.enum';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./alert-type.enum"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './send-email.dto';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./send-email.dto"), exports);
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -15,8 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ai"), exports);
|
|
18
|
+
__exportStar(require("./alert"), exports);
|
|
18
19
|
__exportStar(require("./auth"), exports);
|
|
19
20
|
__exportStar(require("./agenda"), exports);
|
|
21
|
+
__exportStar(require("./email"), exports);
|
|
20
22
|
__exportStar(require("./billing"), exports);
|
|
21
23
|
__exportStar(require("./automation"), exports);
|
|
22
24
|
__exportStar(require("./chat"), exports);
|
|
@@ -65,6 +65,18 @@ export interface SupportAgendaDto {
|
|
|
65
65
|
hours?: SupportAgendaHoursDto[];
|
|
66
66
|
professionals?: SupportAgendaProfessionalDto[];
|
|
67
67
|
}
|
|
68
|
+
export interface SupportAlertRouteSummaryDto {
|
|
69
|
+
type: string;
|
|
70
|
+
label: string;
|
|
71
|
+
channels: string[];
|
|
72
|
+
}
|
|
73
|
+
export interface SupportAlertsDto {
|
|
74
|
+
active: boolean;
|
|
75
|
+
recipientCount: number;
|
|
76
|
+
whatsappCount: number;
|
|
77
|
+
whatsappOptin: boolean;
|
|
78
|
+
enabledAlerts: SupportAlertRouteSummaryDto[];
|
|
79
|
+
}
|
|
68
80
|
export interface SupportCrewConfigDto {
|
|
69
81
|
crew?: WebChatCrewDto;
|
|
70
82
|
crewHours?: WebChatCrewHoursResponseDto[];
|
|
@@ -82,6 +94,7 @@ export interface SupportCrewConfigDto {
|
|
|
82
94
|
agentBehavior?: SupportAgentBehaviorDto;
|
|
83
95
|
agenda?: SupportAgendaDto;
|
|
84
96
|
tools?: WebChatToolDto[];
|
|
97
|
+
alerts?: SupportAlertsDto;
|
|
85
98
|
advancedVisible: boolean;
|
|
86
99
|
omittedSections: string[];
|
|
87
100
|
}
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./webchat-channel.dto"), exports);
|
|
18
18
|
__exportStar(require("./webchat-crew.dto"), exports);
|
|
19
|
+
__exportStar(require("./webchat-crew-alerts.dto"), exports);
|
|
19
20
|
__exportStar(require("./webchat-crew-hours.dto"), exports);
|
|
20
21
|
__exportStar(require("./webchat-id-crew.dto"), exports);
|
|
21
22
|
__exportStar(require("./webchat-membership.dto"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AlertTypeEnum } from "../../alert";
|
|
2
|
+
export interface AlertRouteDto {
|
|
3
|
+
type: AlertTypeEnum;
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
email: boolean;
|
|
6
|
+
whatsapp: boolean;
|
|
7
|
+
emailOverride: string[];
|
|
8
|
+
whatsappOverride: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface WebChatCrewAlertsDto {
|
|
11
|
+
active: boolean;
|
|
12
|
+
recipients: string[];
|
|
13
|
+
whatsappTo: string[];
|
|
14
|
+
whatsappOptin: boolean;
|
|
15
|
+
lowCreditsThreshold: number;
|
|
16
|
+
scheduleBeforeHours1: number | null;
|
|
17
|
+
scheduleBeforeHours2: number | null;
|
|
18
|
+
digestHour: number;
|
|
19
|
+
routes: AlertRouteDto[];
|
|
20
|
+
}
|