@rodrigobeber/patoai-dtos 4.6.1 → 4.6.2

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.
@@ -5,3 +5,7 @@ export * from './webchat-broadcast-detail.dto';
5
5
  export * from './webchat-create-broadcast.dto';
6
6
  export * from './webchat-update-broadcast.dto';
7
7
  export * from './webchat-broadcast-statistics.dto';
8
+ export * from './webchat-resume-broadcast.dto';
9
+ export * from './webchat-create-from-broadcast.dto';
10
+ export * from './webchat-test-send.dto';
11
+ export * from './webchat-duplicate-broadcast.dto';
@@ -21,3 +21,7 @@ __exportStar(require("./webchat-broadcast-detail.dto"), exports);
21
21
  __exportStar(require("./webchat-create-broadcast.dto"), exports);
22
22
  __exportStar(require("./webchat-update-broadcast.dto"), exports);
23
23
  __exportStar(require("./webchat-broadcast-statistics.dto"), exports);
24
+ __exportStar(require("./webchat-resume-broadcast.dto"), exports);
25
+ __exportStar(require("./webchat-create-from-broadcast.dto"), exports);
26
+ __exportStar(require("./webchat-test-send.dto"), exports);
27
+ __exportStar(require("./webchat-duplicate-broadcast.dto"), exports);
@@ -1,4 +1,4 @@
1
- import { WebChatBroadcastStatusEnum } from './webchat-broadcast-status.enum';
1
+ import { WebChatBroadcastStatusEnum, WebChatBroadcastPauseReasonEnum } from './webchat-broadcast-status.enum';
2
2
  import { WebChatBroadcastRecipientDto } from './webchat-broadcast-recipient.dto';
3
3
  export interface WebChatBroadcastDetailDto {
4
4
  id: number;
@@ -13,9 +13,15 @@ export interface WebChatBroadcastDetailDto {
13
13
  startedAt: Date | null;
14
14
  completedAt: Date | null;
15
15
  canceledAt: Date | null;
16
+ pausedAt: Date | null;
17
+ pauseReason: WebChatBroadcastPauseReasonEnum | null;
18
+ consecutiveErrors: number;
19
+ sendWindowStart: string | null;
20
+ sendWindowEnd: string | null;
16
21
  totalRecipients: number;
17
22
  sentCount: number;
18
23
  failedCount: number;
24
+ skippedCount: number;
19
25
  canceledCount: number;
20
26
  pendingCount: number;
21
27
  recipients?: WebChatBroadcastRecipientDto[];
@@ -1,4 +1,4 @@
1
- import { WebChatBroadcastStatusEnum } from './webchat-broadcast-status.enum';
1
+ import { WebChatBroadcastStatusEnum, WebChatBroadcastPauseReasonEnum } from './webchat-broadcast-status.enum';
2
2
  export interface WebChatBroadcastListItemDto {
3
3
  id: number;
4
4
  idCrew: number;
@@ -11,10 +11,16 @@ export interface WebChatBroadcastListItemDto {
11
11
  totalRecipients: number;
12
12
  sentCount: number;
13
13
  failedCount: number;
14
+ skippedCount: number;
14
15
  canceledCount: number;
15
16
  pendingCount: number;
16
17
  createdAt: Date;
17
18
  startedAt: Date | null;
18
19
  completedAt: Date | null;
19
20
  canceledAt: Date | null;
21
+ pausedAt: Date | null;
22
+ pauseReason: WebChatBroadcastPauseReasonEnum | null;
23
+ consecutiveErrors: number;
24
+ sendWindowStart: string | null;
25
+ sendWindowEnd: string | null;
20
26
  }
@@ -6,6 +6,7 @@ export interface WebChatBroadcastRecipientDto {
6
6
  status?: WebChatBroadcastRecipientStatusEnum;
7
7
  sentAt?: Date;
8
8
  failedAt?: Date;
9
+ skippedAt?: Date;
9
10
  canceledAt?: Date;
10
11
  error?: string;
11
12
  }
@@ -1,6 +1,7 @@
1
1
  export declare enum WebChatBroadcastStatusEnum {
2
2
  NOT_STARTED = "NOT_STARTED",
3
3
  IN_PROGRESS = "IN_PROGRESS",
4
+ PAUSED = "PAUSED",
4
5
  COMPLETED = "COMPLETED",
5
6
  CANCELED = "CANCELED"
6
7
  }
@@ -8,5 +9,10 @@ export declare enum WebChatBroadcastRecipientStatusEnum {
8
9
  PENDING = "PENDING",
9
10
  SENT = "SENT",
10
11
  FAILED = "FAILED",
12
+ SKIPPED = "SKIPPED",
11
13
  CANCELED = "CANCELED"
12
14
  }
15
+ export declare enum WebChatBroadcastPauseReasonEnum {
16
+ MANUAL = "MANUAL",
17
+ AUTO = "AUTO"
18
+ }
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebChatBroadcastRecipientStatusEnum = exports.WebChatBroadcastStatusEnum = void 0;
3
+ exports.WebChatBroadcastPauseReasonEnum = exports.WebChatBroadcastRecipientStatusEnum = exports.WebChatBroadcastStatusEnum = void 0;
4
4
  var WebChatBroadcastStatusEnum;
5
5
  (function (WebChatBroadcastStatusEnum) {
6
6
  WebChatBroadcastStatusEnum["NOT_STARTED"] = "NOT_STARTED";
7
7
  WebChatBroadcastStatusEnum["IN_PROGRESS"] = "IN_PROGRESS";
8
+ WebChatBroadcastStatusEnum["PAUSED"] = "PAUSED";
8
9
  WebChatBroadcastStatusEnum["COMPLETED"] = "COMPLETED";
9
10
  WebChatBroadcastStatusEnum["CANCELED"] = "CANCELED";
10
11
  })(WebChatBroadcastStatusEnum || (exports.WebChatBroadcastStatusEnum = WebChatBroadcastStatusEnum = {}));
@@ -13,5 +14,11 @@ var WebChatBroadcastRecipientStatusEnum;
13
14
  WebChatBroadcastRecipientStatusEnum["PENDING"] = "PENDING";
14
15
  WebChatBroadcastRecipientStatusEnum["SENT"] = "SENT";
15
16
  WebChatBroadcastRecipientStatusEnum["FAILED"] = "FAILED";
17
+ WebChatBroadcastRecipientStatusEnum["SKIPPED"] = "SKIPPED";
16
18
  WebChatBroadcastRecipientStatusEnum["CANCELED"] = "CANCELED";
17
19
  })(WebChatBroadcastRecipientStatusEnum || (exports.WebChatBroadcastRecipientStatusEnum = WebChatBroadcastRecipientStatusEnum = {}));
20
+ var WebChatBroadcastPauseReasonEnum;
21
+ (function (WebChatBroadcastPauseReasonEnum) {
22
+ WebChatBroadcastPauseReasonEnum["MANUAL"] = "MANUAL";
23
+ WebChatBroadcastPauseReasonEnum["AUTO"] = "AUTO";
24
+ })(WebChatBroadcastPauseReasonEnum || (exports.WebChatBroadcastPauseReasonEnum = WebChatBroadcastPauseReasonEnum = {}));
@@ -5,5 +5,7 @@ export interface WebChatCreateBroadcastDto {
5
5
  idUnit?: number;
6
6
  template: string;
7
7
  delayMs?: number;
8
+ sendWindowStart?: string;
9
+ sendWindowEnd?: string;
8
10
  recipients: WebChatBroadcastRecipientDto[];
9
11
  }
@@ -0,0 +1,12 @@
1
+ export declare enum WebChatCreateFromRecipientsFilterEnum {
2
+ PENDING = "PENDING",
3
+ FAILED = "FAILED",
4
+ BOTH = "BOTH"
5
+ }
6
+ export interface WebChatCreateFromBroadcastDto {
7
+ name: string;
8
+ filter: WebChatCreateFromRecipientsFilterEnum;
9
+ template?: string;
10
+ sendWindowStart?: string;
11
+ sendWindowEnd?: string;
12
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebChatCreateFromRecipientsFilterEnum = void 0;
4
+ var WebChatCreateFromRecipientsFilterEnum;
5
+ (function (WebChatCreateFromRecipientsFilterEnum) {
6
+ WebChatCreateFromRecipientsFilterEnum["PENDING"] = "PENDING";
7
+ WebChatCreateFromRecipientsFilterEnum["FAILED"] = "FAILED";
8
+ WebChatCreateFromRecipientsFilterEnum["BOTH"] = "BOTH";
9
+ })(WebChatCreateFromRecipientsFilterEnum || (exports.WebChatCreateFromRecipientsFilterEnum = WebChatCreateFromRecipientsFilterEnum = {}));
@@ -0,0 +1,3 @@
1
+ export interface WebChatDuplicateBroadcastDto {
2
+ name: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export declare enum WebChatResumeActionEnum {
2
+ CONTINUE = "CONTINUE",// Just continue with pending
3
+ SKIP_FAILED = "SKIP_FAILED",// Skip consecutive failed, continue with pending
4
+ RETRY_FAILED = "RETRY_FAILED"
5
+ }
6
+ export interface WebChatResumeBroadcastDto {
7
+ action: WebChatResumeActionEnum;
8
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebChatResumeActionEnum = void 0;
4
+ var WebChatResumeActionEnum;
5
+ (function (WebChatResumeActionEnum) {
6
+ WebChatResumeActionEnum["CONTINUE"] = "CONTINUE";
7
+ WebChatResumeActionEnum["SKIP_FAILED"] = "SKIP_FAILED";
8
+ WebChatResumeActionEnum["RETRY_FAILED"] = "RETRY_FAILED"; // Retry consecutive failed + pending
9
+ })(WebChatResumeActionEnum || (exports.WebChatResumeActionEnum = WebChatResumeActionEnum = {}));
@@ -0,0 +1,11 @@
1
+ export interface WebChatTestSendDto {
2
+ idChannel: number;
3
+ template: string;
4
+ phone: string;
5
+ name?: string;
6
+ }
7
+ export interface WebChatTestSendResponseDto {
8
+ success: boolean;
9
+ message?: string;
10
+ error?: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,5 +5,7 @@ export interface WebChatUpdateBroadcastDto {
5
5
  idUnit?: number;
6
6
  template?: string;
7
7
  delayMs?: number;
8
+ sendWindowStart?: string | null;
9
+ sendWindowEnd?: string | null;
8
10
  recipients?: WebChatBroadcastRecipientDto[];
9
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rodrigobeber/patoai-dtos",
3
- "version": "4.6.1",
3
+ "version": "4.6.2",
4
4
  "description": "Data Transfer Objects for PatoAI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",