@rodrigobeber/patoai-dtos 4.8.2 → 4.8.3

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.
@@ -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);
@@ -0,0 +1,7 @@
1
+ export interface SendEmailDto {
2
+ to: string;
3
+ subject: string;
4
+ html?: string;
5
+ text?: string;
6
+ brandLogo?: boolean;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  export * from './ai';
2
+ export * from './alert';
2
3
  export * from './auth';
3
4
  export * from './agenda';
5
+ export * from './email';
4
6
  export * from './billing';
5
7
  export * from './automation';
6
8
  export * from './chat';
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);
@@ -1,5 +1,6 @@
1
1
  export * from './webchat-channel.dto';
2
2
  export * from './webchat-crew.dto';
3
+ export * from './webchat-crew-alerts.dto';
3
4
  export * from './webchat-crew-hours.dto';
4
5
  export * from './webchat-id-crew.dto';
5
6
  export * from './webchat-membership.dto';
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rodrigobeber/patoai-dtos",
3
- "version": "4.8.2",
3
+ "version": "4.8.3",
4
4
  "description": "Data Transfer Objects for PatoAI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",