@trii/types 2.10.656 → 2.10.658

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.
Files changed (90) hide show
  1. package/dist/Collections/Api.d.ts +41 -0
  2. package/dist/Collections/Api.js +2 -0
  3. package/dist/Collections/Commission.d.ts +52 -0
  4. package/dist/Collections/Commission.js +10 -0
  5. package/dist/Collections/Common.d.ts +78 -0
  6. package/dist/Collections/Common.js +39 -0
  7. package/dist/Collections/Dashboard.d.ts +27 -0
  8. package/dist/Collections/Dashboard.js +2 -0
  9. package/dist/Collections/Debt.d.ts +97 -0
  10. package/dist/Collections/Debt.js +12 -0
  11. package/dist/Collections/Interest.d.ts +38 -0
  12. package/dist/Collections/Interest.js +25 -0
  13. package/dist/Collections/Payment.d.ts +87 -0
  14. package/dist/Collections/Payment.js +21 -0
  15. package/dist/Collections/PaymentPlan.d.ts +87 -0
  16. package/dist/Collections/PaymentPlan.js +21 -0
  17. package/dist/Collections/PaymentPlanConfiguration.d.ts +100 -0
  18. package/dist/Collections/PaymentPlanConfiguration.js +34 -0
  19. package/dist/Collections/Portfolio.d.ts +52 -0
  20. package/dist/Collections/Portfolio.js +12 -0
  21. package/dist/Collections/Promise.d.ts +49 -0
  22. package/dist/Collections/Promise.js +25 -0
  23. package/dist/Collections/index.d.ts +11 -0
  24. package/dist/Collections/index.js +27 -0
  25. package/dist/Common/Channels/Channel.d.ts +6 -1
  26. package/dist/Common/Channels/Channel.js +6 -1
  27. package/dist/Common/Channels/WhatsApp.d.ts +22 -0
  28. package/dist/Common/Channels/WhatsApp.js +7 -1
  29. package/dist/Common/Messages/Message.d.ts +9 -0
  30. package/dist/Common/Messages/Message.js +6 -1
  31. package/dist/Conversations/Conversation.d.ts +15 -0
  32. package/dist/Conversations/Conversation.js +8 -1
  33. package/dist/Reports/ScheduledReport.d.ts +146 -0
  34. package/dist/Reports/ScheduledReport.js +37 -1
  35. package/dist/Sales/Api.d.ts +40 -0
  36. package/dist/Sales/Api.js +2 -0
  37. package/dist/Sales/Common.d.ts +72 -0
  38. package/dist/Sales/Common.js +31 -0
  39. package/dist/Sales/Dashboard.d.ts +25 -0
  40. package/dist/Sales/Dashboard.js +2 -0
  41. package/dist/Sales/Lead.d.ts +99 -0
  42. package/dist/Sales/Lead.js +8 -0
  43. package/dist/Sales/index.d.ts +4 -0
  44. package/dist/Sales/index.js +20 -0
  45. package/dist/Spaces/spaces.d.ts +1 -0
  46. package/dist/Tickets/AI.d.ts +400 -0
  47. package/dist/Tickets/AI.js +113 -0
  48. package/dist/Tickets/AdvancedApi.d.ts +486 -0
  49. package/dist/Tickets/AdvancedApi.js +108 -0
  50. package/dist/Tickets/Api.d.ts +62 -0
  51. package/dist/Tickets/Api.js +8 -0
  52. package/dist/Tickets/Approval.d.ts +139 -0
  53. package/dist/Tickets/Approval.js +30 -0
  54. package/dist/Tickets/Automation.d.ts +237 -0
  55. package/dist/Tickets/Automation.js +74 -0
  56. package/dist/Tickets/Category.d.ts +25 -0
  57. package/dist/Tickets/Category.js +2 -0
  58. package/dist/Tickets/Common.d.ts +90 -0
  59. package/dist/Tickets/Common.js +38 -0
  60. package/dist/Tickets/Conversation.d.ts +68 -0
  61. package/dist/Tickets/Conversation.js +30 -0
  62. package/dist/Tickets/Dashboard.d.ts +408 -0
  63. package/dist/Tickets/Dashboard.js +206 -0
  64. package/dist/Tickets/Fields.d.ts +133 -0
  65. package/dist/Tickets/Fields.js +44 -0
  66. package/dist/Tickets/Layouts.d.ts +63 -0
  67. package/dist/Tickets/Layouts.js +22 -0
  68. package/dist/Tickets/Routing.d.ts +290 -0
  69. package/dist/Tickets/Routing.js +87 -0
  70. package/dist/Tickets/Satisfaction.d.ts +31 -0
  71. package/dist/Tickets/Satisfaction.js +9 -0
  72. package/dist/Tickets/Security.d.ts +302 -0
  73. package/dist/Tickets/Security.js +107 -0
  74. package/dist/Tickets/SelfService.d.ts +255 -0
  75. package/dist/Tickets/SelfService.js +56 -0
  76. package/dist/Tickets/Sla.d.ts +253 -0
  77. package/dist/Tickets/Sla.js +73 -0
  78. package/dist/Tickets/Task.d.ts +122 -0
  79. package/dist/Tickets/Task.js +17 -0
  80. package/dist/Tickets/Ticket.d.ts +133 -0
  81. package/dist/Tickets/Ticket.js +2 -0
  82. package/dist/Tickets/Views.d.ts +77 -0
  83. package/dist/Tickets/Views.js +23 -0
  84. package/dist/Tickets/Workflow.d.ts +109 -0
  85. package/dist/Tickets/Workflow.js +44 -0
  86. package/dist/Tickets/index.d.ts +20 -1
  87. package/dist/Tickets/index.js +20 -1
  88. package/dist/index.d.ts +2 -0
  89. package/dist/index.js +3 -1
  90. package/package.json +1 -1
@@ -0,0 +1,100 @@
1
+ import { ICollectionAuditedEntity, ICollectionMoney } from './Common';
2
+ export declare enum PaymentPlanType {
3
+ NORMAL = "NORMAL",
4
+ BALLOON = "BALLOON"
5
+ }
6
+ export declare enum PaymentPlanConfigurationStatus {
7
+ DRAFT = "DRAFT",
8
+ ACTIVE = "ACTIVE",
9
+ ARCHIVED = "ARCHIVED"
10
+ }
11
+ export declare enum PaymentPlanFrequency {
12
+ WEEKLY = "WEEKLY",
13
+ BIWEEKLY = "BIWEEKLY",
14
+ MONTHLY = "MONTHLY",
15
+ CUSTOM = "CUSTOM"
16
+ }
17
+ export declare enum PaymentDueDateAdjustment {
18
+ NONE = "NONE",
19
+ NEXT_BUSINESS_DAY = "NEXT_BUSINESS_DAY",
20
+ PREVIOUS_BUSINESS_DAY = "PREVIOUS_BUSINESS_DAY"
21
+ }
22
+ export declare enum DecimalRoundingMode {
23
+ HALF_UP = "HALF_UP",
24
+ HALF_EVEN = "HALF_EVEN",
25
+ UP = "UP",
26
+ DOWN = "DOWN"
27
+ }
28
+ export interface IPaymentPlanFormulaTestCase {
29
+ name: string;
30
+ variables: {
31
+ [variableName: string]: string;
32
+ };
33
+ expectedResult: string;
34
+ }
35
+ export interface IPaymentPlanFormula {
36
+ /** Expression in the backend-supported formula DSL. Never executable JavaScript. */
37
+ expression: string;
38
+ variableNames: string[];
39
+ allowedFunctionNames?: string[];
40
+ roundingMode: DecimalRoundingMode;
41
+ testCases?: IPaymentPlanFormulaTestCase[];
42
+ }
43
+ export interface IPaymentPlanFeeTier {
44
+ id: string;
45
+ fromDays: number;
46
+ toDays: number;
47
+ honorariumPercentage: string;
48
+ honorariumCoefficient: string;
49
+ collectionCommissionPercentage: string;
50
+ expenseCommissionPercentage: string;
51
+ }
52
+ export interface IPaymentPlanConfigurationSnapshot {
53
+ configurationId: string;
54
+ configurationVersion: number;
55
+ name: string;
56
+ type: PaymentPlanType;
57
+ minimumInstallments: number;
58
+ maximumInstallments: number;
59
+ frequency: PaymentPlanFrequency;
60
+ dueDateAdjustment: PaymentDueDateAdjustment;
61
+ businessCalendarId?: string;
62
+ updateInterestPercentage?: string;
63
+ refinancingInterestPercentage?: string;
64
+ otherCharges?: ICollectionMoney;
65
+ vatPercentage?: string;
66
+ vatCoefficient?: string;
67
+ feeTiers: IPaymentPlanFeeTier[];
68
+ firstPaymentFormula: IPaymentPlanFormula;
69
+ installmentFormula: IPaymentPlanFormula;
70
+ balloonPaymentFormula?: IPaymentPlanFormula;
71
+ }
72
+ export interface IPaymentPlanConfiguration extends ICollectionAuditedEntity {
73
+ portfolioId: string;
74
+ name: string;
75
+ description?: string;
76
+ type: PaymentPlanType;
77
+ status: PaymentPlanConfigurationStatus;
78
+ version: number;
79
+ previousVersionId?: string;
80
+ minimumInstallments: number;
81
+ maximumInstallments: number;
82
+ frequency: PaymentPlanFrequency;
83
+ dueDateAdjustment: PaymentDueDateAdjustment;
84
+ businessCalendarId?: string;
85
+ updateInterestPercentage?: string;
86
+ refinancingInterestPercentage?: string;
87
+ otherCharges?: ICollectionMoney;
88
+ vatPercentage?: string;
89
+ vatCoefficient?: string;
90
+ /** Ranges may contain gaps but must never overlap. */
91
+ feeTiers: IPaymentPlanFeeTier[];
92
+ firstPaymentFormula: IPaymentPlanFormula;
93
+ installmentFormula: IPaymentPlanFormula;
94
+ /** Required when type is BALLOON. */
95
+ balloonPaymentFormula?: IPaymentPlanFormula;
96
+ activatedAt?: Date;
97
+ activatedBy?: string;
98
+ archivedAt?: Date;
99
+ archivedBy?: string;
100
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DecimalRoundingMode = exports.PaymentDueDateAdjustment = exports.PaymentPlanFrequency = exports.PaymentPlanConfigurationStatus = exports.PaymentPlanType = void 0;
4
+ var PaymentPlanType;
5
+ (function (PaymentPlanType) {
6
+ PaymentPlanType["NORMAL"] = "NORMAL";
7
+ PaymentPlanType["BALLOON"] = "BALLOON";
8
+ })(PaymentPlanType || (exports.PaymentPlanType = PaymentPlanType = {}));
9
+ var PaymentPlanConfigurationStatus;
10
+ (function (PaymentPlanConfigurationStatus) {
11
+ PaymentPlanConfigurationStatus["DRAFT"] = "DRAFT";
12
+ PaymentPlanConfigurationStatus["ACTIVE"] = "ACTIVE";
13
+ PaymentPlanConfigurationStatus["ARCHIVED"] = "ARCHIVED";
14
+ })(PaymentPlanConfigurationStatus || (exports.PaymentPlanConfigurationStatus = PaymentPlanConfigurationStatus = {}));
15
+ var PaymentPlanFrequency;
16
+ (function (PaymentPlanFrequency) {
17
+ PaymentPlanFrequency["WEEKLY"] = "WEEKLY";
18
+ PaymentPlanFrequency["BIWEEKLY"] = "BIWEEKLY";
19
+ PaymentPlanFrequency["MONTHLY"] = "MONTHLY";
20
+ PaymentPlanFrequency["CUSTOM"] = "CUSTOM";
21
+ })(PaymentPlanFrequency || (exports.PaymentPlanFrequency = PaymentPlanFrequency = {}));
22
+ var PaymentDueDateAdjustment;
23
+ (function (PaymentDueDateAdjustment) {
24
+ PaymentDueDateAdjustment["NONE"] = "NONE";
25
+ PaymentDueDateAdjustment["NEXT_BUSINESS_DAY"] = "NEXT_BUSINESS_DAY";
26
+ PaymentDueDateAdjustment["PREVIOUS_BUSINESS_DAY"] = "PREVIOUS_BUSINESS_DAY";
27
+ })(PaymentDueDateAdjustment || (exports.PaymentDueDateAdjustment = PaymentDueDateAdjustment = {}));
28
+ var DecimalRoundingMode;
29
+ (function (DecimalRoundingMode) {
30
+ DecimalRoundingMode["HALF_UP"] = "HALF_UP";
31
+ DecimalRoundingMode["HALF_EVEN"] = "HALF_EVEN";
32
+ DecimalRoundingMode["UP"] = "UP";
33
+ DecimalRoundingMode["DOWN"] = "DOWN";
34
+ })(DecimalRoundingMode || (exports.DecimalRoundingMode = DecimalRoundingMode = {}));
@@ -0,0 +1,52 @@
1
+ import { ICollectionAuditedEntity } from './Common';
2
+ export interface ICreditor extends ICollectionAuditedEntity {
3
+ name: string;
4
+ legalName?: string;
5
+ taxId?: string;
6
+ externalReferences?: {
7
+ system: string;
8
+ externalId: string;
9
+ }[];
10
+ enabled: boolean;
11
+ }
12
+ export interface IDebtPortfolio extends ICollectionAuditedEntity {
13
+ creditorId: string;
14
+ name: string;
15
+ description?: string;
16
+ currency: string;
17
+ decimalPlaces: number;
18
+ enabled: boolean;
19
+ defaultAssignedGroupId?: string;
20
+ interestConfigurationId?: string;
21
+ paymentPlanFailurePolicyId?: string;
22
+ promiseMonitoringPolicyId?: string;
23
+ commissionRuleSetId?: string;
24
+ }
25
+ export declare enum DebtBatchStatus {
26
+ PENDING = "PENDING",
27
+ PROCESSING = "PROCESSING",
28
+ COMPLETED = "COMPLETED",
29
+ COMPLETED_WITH_ERRORS = "COMPLETED_WITH_ERRORS",
30
+ FAILED = "FAILED",
31
+ CANCELLED = "CANCELLED"
32
+ }
33
+ export interface IDebtBatchError {
34
+ rowNumber?: number;
35
+ externalRowId?: string;
36
+ fieldName?: string;
37
+ code: string;
38
+ message: string;
39
+ }
40
+ export interface IDebtBatch extends ICollectionAuditedEntity {
41
+ portfolioId: string;
42
+ name: string;
43
+ referencePeriod?: string;
44
+ status: DebtBatchStatus;
45
+ sourceFileAttachmentId?: string;
46
+ totalRows: number;
47
+ acceptedRows: number;
48
+ rejectedRows: number;
49
+ errors?: IDebtBatchError[];
50
+ processingStartedAt?: Date;
51
+ processingCompletedAt?: Date;
52
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DebtBatchStatus = void 0;
4
+ var DebtBatchStatus;
5
+ (function (DebtBatchStatus) {
6
+ DebtBatchStatus["PENDING"] = "PENDING";
7
+ DebtBatchStatus["PROCESSING"] = "PROCESSING";
8
+ DebtBatchStatus["COMPLETED"] = "COMPLETED";
9
+ DebtBatchStatus["COMPLETED_WITH_ERRORS"] = "COMPLETED_WITH_ERRORS";
10
+ DebtBatchStatus["FAILED"] = "FAILED";
11
+ DebtBatchStatus["CANCELLED"] = "CANCELLED";
12
+ })(DebtBatchStatus || (exports.DebtBatchStatus = DebtBatchStatus = {}));
@@ -0,0 +1,49 @@
1
+ import { ICollectionAuditedEntity, ICollectionMoney } from './Common';
2
+ export declare enum PaymentPromiseStatus {
3
+ PENDING = "PENDING",
4
+ PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED",
5
+ FULFILLED = "FULFILLED",
6
+ OVERDUE = "OVERDUE",
7
+ BROKEN = "BROKEN",
8
+ CANCELLED = "CANCELLED"
9
+ }
10
+ export interface IPaymentPromise extends ICollectionAuditedEntity {
11
+ portfolioId: string;
12
+ contactId: string;
13
+ debtIds: string[];
14
+ paymentPlanId?: string;
15
+ installmentId?: string;
16
+ promisedAmount: ICollectionMoney;
17
+ receivedAmount: ICollectionMoney;
18
+ promisedFor: Date;
19
+ status: PaymentPromiseStatus;
20
+ agentId: string;
21
+ paymentIds: string[];
22
+ fulfilledAt?: Date;
23
+ brokenAt?: Date;
24
+ cancellationReason?: string;
25
+ }
26
+ export declare enum PromiseAlertSeverity {
27
+ INFO = "INFO",
28
+ WARNING = "WARNING",
29
+ CRITICAL = "CRITICAL"
30
+ }
31
+ export declare enum PromiseAlertRecipientType {
32
+ AGENT = "AGENT",
33
+ ASSIGNED_GROUP = "ASSIGNED_GROUP",
34
+ SUPERVISOR = "SUPERVISOR",
35
+ ROLE = "ROLE"
36
+ }
37
+ export interface IPromiseAlertRule {
38
+ id: string;
39
+ offsetMinutes: number;
40
+ severity: PromiseAlertSeverity;
41
+ recipientTypes: PromiseAlertRecipientType[];
42
+ roleIds?: string[];
43
+ notificationChannels: string[];
44
+ }
45
+ export interface IPromiseMonitoringPolicy extends ICollectionAuditedEntity {
46
+ name: string;
47
+ enabled: boolean;
48
+ rules: IPromiseAlertRule[];
49
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PromiseAlertRecipientType = exports.PromiseAlertSeverity = exports.PaymentPromiseStatus = void 0;
4
+ var PaymentPromiseStatus;
5
+ (function (PaymentPromiseStatus) {
6
+ PaymentPromiseStatus["PENDING"] = "PENDING";
7
+ PaymentPromiseStatus["PARTIALLY_FULFILLED"] = "PARTIALLY_FULFILLED";
8
+ PaymentPromiseStatus["FULFILLED"] = "FULFILLED";
9
+ PaymentPromiseStatus["OVERDUE"] = "OVERDUE";
10
+ PaymentPromiseStatus["BROKEN"] = "BROKEN";
11
+ PaymentPromiseStatus["CANCELLED"] = "CANCELLED";
12
+ })(PaymentPromiseStatus || (exports.PaymentPromiseStatus = PaymentPromiseStatus = {}));
13
+ var PromiseAlertSeverity;
14
+ (function (PromiseAlertSeverity) {
15
+ PromiseAlertSeverity["INFO"] = "INFO";
16
+ PromiseAlertSeverity["WARNING"] = "WARNING";
17
+ PromiseAlertSeverity["CRITICAL"] = "CRITICAL";
18
+ })(PromiseAlertSeverity || (exports.PromiseAlertSeverity = PromiseAlertSeverity = {}));
19
+ var PromiseAlertRecipientType;
20
+ (function (PromiseAlertRecipientType) {
21
+ PromiseAlertRecipientType["AGENT"] = "AGENT";
22
+ PromiseAlertRecipientType["ASSIGNED_GROUP"] = "ASSIGNED_GROUP";
23
+ PromiseAlertRecipientType["SUPERVISOR"] = "SUPERVISOR";
24
+ PromiseAlertRecipientType["ROLE"] = "ROLE";
25
+ })(PromiseAlertRecipientType || (exports.PromiseAlertRecipientType = PromiseAlertRecipientType = {}));
@@ -0,0 +1,11 @@
1
+ export * from './Common';
2
+ export * from './Debt';
3
+ export * from './Api';
4
+ export * from './Portfolio';
5
+ export * from './Interest';
6
+ export * from './PaymentPlan';
7
+ export * from './PaymentPlanConfiguration';
8
+ export * from './Payment';
9
+ export * from './Promise';
10
+ export * from './Commission';
11
+ export * from './Dashboard';
@@ -0,0 +1,27 @@
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("./Common"), exports);
18
+ __exportStar(require("./Debt"), exports);
19
+ __exportStar(require("./Api"), exports);
20
+ __exportStar(require("./Portfolio"), exports);
21
+ __exportStar(require("./Interest"), exports);
22
+ __exportStar(require("./PaymentPlan"), exports);
23
+ __exportStar(require("./PaymentPlanConfiguration"), exports);
24
+ __exportStar(require("./Payment"), exports);
25
+ __exportStar(require("./Promise"), exports);
26
+ __exportStar(require("./Commission"), exports);
27
+ __exportStar(require("./Dashboard"), exports);
@@ -79,6 +79,11 @@ interface IChannel {
79
79
  statusCode: channelStatus | channelStatus.UNKNOWN;
80
80
  statusDetails: string | '';
81
81
  statusUpdateAt?: Date | null;
82
+ messagingAvailability: MessagingAvailability;
83
+ }
84
+ declare enum MessagingAvailability {
85
+ AVAILABLE = 0,
86
+ BLOCKED = 1
82
87
  }
83
88
  declare enum channelStatus {
84
89
  UNKNOWN = 0,
@@ -91,4 +96,4 @@ declare enum channelStatus {
91
96
  SUSPENDED = 7,
92
97
  CONFIGURATION_PENDING = 9
93
98
  }
94
- export { IChannel, IChannelInfo, channelStatus };
99
+ export { IChannel, IChannelInfo, channelStatus, MessagingAvailability };
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.channelStatus = void 0;
3
+ exports.MessagingAvailability = exports.channelStatus = void 0;
4
+ var MessagingAvailability;
5
+ (function (MessagingAvailability) {
6
+ MessagingAvailability[MessagingAvailability["AVAILABLE"] = 0] = "AVAILABLE";
7
+ MessagingAvailability[MessagingAvailability["BLOCKED"] = 1] = "BLOCKED";
8
+ })(MessagingAvailability || (exports.MessagingAvailability = MessagingAvailability = {}));
4
9
  var channelStatus;
5
10
  (function (channelStatus) {
6
11
  channelStatus[channelStatus["UNKNOWN"] = 0] = "UNKNOWN";
@@ -1,4 +1,9 @@
1
1
  import { ISchedule } from "../Schedules/Schedules";
2
+ export declare enum CloudApiBanState {
3
+ DISABLE = 1,
4
+ REINSTATE = 2,
5
+ SCHEDULE_FOR_DISABLE = 3
6
+ }
2
7
  export declare enum WhatsAppConectionType {
3
8
  APIQR = 1,
4
9
  CLOUDAPI = 7
@@ -49,6 +54,23 @@ export interface WhatsAppConfig {
49
54
  * cloudAPI + Business App
50
55
  */
51
56
  cloudApiIsOnBizApp: boolean;
57
+ /** nivel de limite de mensajeria del numero, ej: TIER_50, TIER_2K, TIER_10K, TIER_UNLIMITED */
58
+ cloudApiMessagingTier?: string;
59
+ /** maximo de numeros de telefono permitidos para el WABA */
60
+ cloudApiMaxPhoneNumbersPerWaba?: number;
61
+ /** maximo de numeros de telefono permitidos para todo el portfolio empresarial */
62
+ cloudApiMaxPhoneNumbersPerBusiness?: number;
63
+ /** estado de veto de la cuenta de WhatsApp Business: DISABLE, REINSTATE, SCHEDULE_FOR_DISABLE */
64
+ cloudApiBanState?: string;
65
+ cloudApiBanDate?: Date;
66
+ /** restricciones activas sobre la cuenta */
67
+ cloudApiRestrictions: CloudApiRestriction[];
68
+ }
69
+ export interface CloudApiRestriction {
70
+ /** ej: RESTRICTED_BIZ_INITIATED_MESSAGING, RESTRICTED_CUSTOMER_INITIATED_MESSAGING, RESTRICTED_ADD_PHONE_NUMBER_ACTION */
71
+ restrictionType: string;
72
+ expiration?: Date;
73
+ remediation?: string;
52
74
  }
53
75
  export interface CloudApiInfo {
54
76
  verifiedName: string;
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WhatsAppConectionType = void 0;
3
+ exports.WhatsAppConectionType = exports.CloudApiBanState = void 0;
4
+ var CloudApiBanState;
5
+ (function (CloudApiBanState) {
6
+ CloudApiBanState[CloudApiBanState["DISABLE"] = 1] = "DISABLE";
7
+ CloudApiBanState[CloudApiBanState["REINSTATE"] = 2] = "REINSTATE";
8
+ CloudApiBanState[CloudApiBanState["SCHEDULE_FOR_DISABLE"] = 3] = "SCHEDULE_FOR_DISABLE";
9
+ })(CloudApiBanState || (exports.CloudApiBanState = CloudApiBanState = {}));
4
10
  var WhatsAppConectionType;
5
11
  (function (WhatsAppConectionType) {
6
12
  // NULL = 0,
@@ -20,6 +20,10 @@ export declare enum MessageDirection {
20
20
  IN = 1,
21
21
  OUT = 2
22
22
  }
23
+ export declare enum MessageVisibility {
24
+ PUBLIC = "PUBLIC",
25
+ INTERNAL = "INTERNAL"
26
+ }
23
27
  export declare enum MessageAck {
24
28
  ACK_SCHEDULED = -3,
25
29
  ACK_QUEUE = -2,
@@ -248,6 +252,9 @@ export interface MessageInfoVar {
248
252
  conversationDetails?: string;
249
253
  }
250
254
  export interface MessageTicket {
255
+ ticketId: string;
256
+ ticketNumber?: number;
257
+ ticketTitle?: string;
251
258
  }
252
259
  export interface MessageForm {
253
260
  url: string;
@@ -365,6 +372,8 @@ export interface IMessage {
365
372
  to: string;
366
373
  remoteContactData?: MessageContactData;
367
374
  direction: MessageDirection;
375
+ /** Authorization must use visibility instead of inferring it from MessageType. */
376
+ visibility: MessageVisibility;
368
377
  ack: MessageAck;
369
378
  ackLogs: ackLog[];
370
379
  forwarded: boolean;
@@ -1,11 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MessageFormStatus = exports.MessageButtonType = exports.MessageCdrCallStatus = exports.MessageHeaderType = exports.MessageType = exports.MessageAck = exports.MessageDirection = void 0;
3
+ exports.MessageFormStatus = exports.MessageButtonType = exports.MessageCdrCallStatus = exports.MessageHeaderType = exports.MessageType = exports.MessageAck = exports.MessageVisibility = exports.MessageDirection = void 0;
4
4
  var MessageDirection;
5
5
  (function (MessageDirection) {
6
6
  MessageDirection[MessageDirection["IN"] = 1] = "IN";
7
7
  MessageDirection[MessageDirection["OUT"] = 2] = "OUT";
8
8
  })(MessageDirection || (exports.MessageDirection = MessageDirection = {}));
9
+ var MessageVisibility;
10
+ (function (MessageVisibility) {
11
+ MessageVisibility["PUBLIC"] = "PUBLIC";
12
+ MessageVisibility["INTERNAL"] = "INTERNAL";
13
+ })(MessageVisibility || (exports.MessageVisibility = MessageVisibility = {}));
9
14
  var MessageAck;
10
15
  (function (MessageAck) {
11
16
  MessageAck[MessageAck["ACK_SCHEDULED"] = -3] = "ACK_SCHEDULED";
@@ -40,6 +40,8 @@ export interface IConversation {
40
40
  botStatus: ConversationBotStatus;
41
41
  botVars: ConversationBotVar[];
42
42
  metadata: IConversationMetadata;
43
+ /** Domain objects discussed or served by this conversation. */
44
+ contextReferences?: IConversationContextReference[];
43
45
  finalizedAt: Date;
44
46
  finalizedBy?: string;
45
47
  finalizedOnWebChat: Date;
@@ -49,6 +51,19 @@ export interface IConversation {
49
51
  createdAt: Date;
50
52
  updatedAt: Date;
51
53
  }
54
+ export declare enum ConversationContextType {
55
+ TICKET = "TICKET",
56
+ CONVERSATION = "CONVERSATION",
57
+ LEAD = "LEAD",
58
+ DEBT = "DEBT"
59
+ }
60
+ export interface IConversationContextReference {
61
+ entityType: ConversationContextType;
62
+ entityId: string;
63
+ role?: string;
64
+ linkedAt: Date;
65
+ linkedBy?: string;
66
+ }
52
67
  export interface IWhatsAppGroupInfo {
53
68
  whatsappGroupId: string;
54
69
  groupInviteCode: string;
@@ -1,6 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AssignMethod = exports.ConversationSatus = exports.ConversationDirection = exports.ConversationAssigned = exports.ChatType = exports.ConversationBotVar = exports.ConversationBotStatus = void 0;
3
+ exports.AssignMethod = exports.ConversationSatus = exports.ConversationDirection = exports.ConversationAssigned = exports.ChatType = exports.ConversationBotVar = exports.ConversationBotStatus = exports.ConversationContextType = void 0;
4
+ var ConversationContextType;
5
+ (function (ConversationContextType) {
6
+ ConversationContextType["TICKET"] = "TICKET";
7
+ ConversationContextType["CONVERSATION"] = "CONVERSATION";
8
+ ConversationContextType["LEAD"] = "LEAD";
9
+ ConversationContextType["DEBT"] = "DEBT";
10
+ })(ConversationContextType || (exports.ConversationContextType = ConversationContextType = {}));
4
11
  var ConversationBotStatus;
5
12
  (function (ConversationBotStatus) {
6
13
  ConversationBotStatus[ConversationBotStatus["NONE"] = 0] = "NONE";
@@ -14,6 +14,148 @@ export declare enum TimeRange {
14
14
  LAST_60_DAYS = 60,
15
15
  CUSTOM = 0
16
16
  }
17
+ export declare enum ScheduledReportStatus {
18
+ ACTIVE = "ACTIVE",
19
+ PAUSED = "PAUSED",
20
+ FINISHED = "FINISHED",
21
+ FAILED = "FAILED",
22
+ DELETED = "DELETED"
23
+ }
24
+ export declare enum ScheduledReportFormat {
25
+ XLSX = "XLSX",
26
+ CSV = "CSV",
27
+ JSONL = "JSONL",
28
+ PDF = "PDF"
29
+ }
30
+ export declare enum ScheduledReportDeliveryType {
31
+ EMAIL = "EMAIL",
32
+ DOWNLOAD_CENTER = "DOWNLOAD_CENTER",
33
+ WEBHOOK = "WEBHOOK"
34
+ }
35
+ export declare enum ScheduledReportExecutionStatus {
36
+ QUEUED = "QUEUED",
37
+ RUNNING = "RUNNING",
38
+ SUCCESS = "SUCCESS",
39
+ FAILED = "FAILED",
40
+ CANCELLED = "CANCELLED"
41
+ }
42
+ export declare enum ScheduledReportProcessorStatus {
43
+ ACCEPTED = "ACCEPTED",
44
+ SKIPPED = "SKIPPED",
45
+ COMPLETED = "COMPLETED",
46
+ FAILED = "FAILED"
47
+ }
48
+ export interface ScheduledReportRecipient {
49
+ email: string;
50
+ name?: string;
51
+ userId?: string;
52
+ }
53
+ export interface ScheduledReportDelivery {
54
+ type: ScheduledReportDeliveryType;
55
+ recipients?: ScheduledReportRecipient[];
56
+ webhookUrl?: string;
57
+ subjectTemplate?: string;
58
+ messageTemplate?: string;
59
+ attachFile?: boolean;
60
+ }
61
+ export interface ScheduledReportRuntimeOptions {
62
+ format: ScheduledReportFormat;
63
+ timezone: string;
64
+ includeDetail?: boolean;
65
+ businessHoursOnly?: boolean;
66
+ fieldNameKeys?: string[];
67
+ includeTimeline?: boolean;
68
+ includeSlaHistory?: boolean;
69
+ retentionDays?: number;
70
+ maxRows?: number;
71
+ }
72
+ export interface ScheduledReportProcessorContext {
73
+ scheduledReportId: string;
74
+ executionId: string;
75
+ reportModule: string;
76
+ reportName: string;
77
+ timeRange: TimeRange;
78
+ filter: string;
79
+ options: ScheduledReportRuntimeOptions;
80
+ requestedAt: Date;
81
+ requestedBy?: string;
82
+ }
83
+ export interface ScheduledReportProcessorResult {
84
+ status: ScheduledReportProcessorStatus;
85
+ fileName?: string;
86
+ downloadUrl?: string;
87
+ rowCount?: number;
88
+ warningCount?: number;
89
+ warnings?: string[];
90
+ error?: string;
91
+ summary?: string;
92
+ }
93
+ export interface ScheduledReportExecution {
94
+ id: string;
95
+ scheduledReportId: string;
96
+ status: ScheduledReportExecutionStatus;
97
+ startedAt: Date;
98
+ finishedAt?: Date | null;
99
+ fileName?: string;
100
+ downloadUrl?: string;
101
+ rowCount?: number;
102
+ warningCount?: number;
103
+ error?: string | null;
104
+ triggeredBy: 'SCHEDULE' | 'MANUAL' | 'RETRY';
105
+ }
106
+ export interface ScheduledReportQuery {
107
+ reportModule?: string;
108
+ reportName?: string;
109
+ status?: ScheduledReportStatus;
110
+ search?: string;
111
+ createdBy?: string;
112
+ limit?: number;
113
+ cursor?: string;
114
+ }
115
+ export interface ScheduledReportPage {
116
+ items: ScheduledReport[];
117
+ nextCursor?: string;
118
+ hasMore: boolean;
119
+ }
120
+ export interface CreateScheduledReportDto {
121
+ title: string;
122
+ description?: string;
123
+ reportModule: string;
124
+ reportName: string;
125
+ timeRange: TimeRange;
126
+ filter: string;
127
+ startAt: Date;
128
+ endsAt?: Date | null;
129
+ neverEnds?: boolean;
130
+ sendType: ReportSendType;
131
+ sendOnMonday?: boolean;
132
+ sendOnTuesday?: boolean;
133
+ sendOnWednesday?: boolean;
134
+ sendOnThursday?: boolean;
135
+ sendOnFriday?: boolean;
136
+ sendOnSaturday?: boolean;
137
+ sendOnSunday?: boolean;
138
+ dayOfMonth?: number;
139
+ dayOfWeek?: number;
140
+ sendTo?: string;
141
+ delivery?: ScheduledReportDelivery;
142
+ options?: ScheduledReportRuntimeOptions;
143
+ summary?: string;
144
+ }
145
+ export interface UpdateScheduledReportDto extends Partial<CreateScheduledReportDto> {
146
+ status?: ScheduledReportStatus;
147
+ }
148
+ export interface ScheduledReportApi {
149
+ query(request: ScheduledReportQuery): Promise<ScheduledReportPage>;
150
+ get(id: string): Promise<ScheduledReport>;
151
+ create(payload: CreateScheduledReportDto): Promise<ScheduledReport>;
152
+ update(id: string, payload: UpdateScheduledReportDto): Promise<ScheduledReport>;
153
+ delete(id: string): Promise<void>;
154
+ runNow(id: string): Promise<ScheduledReportExecution>;
155
+ pause(id: string): Promise<ScheduledReport>;
156
+ resume(id: string): Promise<ScheduledReport>;
157
+ executions(id: string, limit?: number): Promise<ScheduledReportExecution[]>;
158
+ }
17
159
  export interface ScheduledReport {
18
160
  id: string;
19
161
  title: string;
@@ -50,6 +192,10 @@ export interface ScheduledReport {
50
192
  finished: boolean;
51
193
  summary: string;
52
194
  nextSend: Date;
195
+ status?: ScheduledReportStatus;
196
+ delivery?: ScheduledReportDelivery;
197
+ options?: ScheduledReportRuntimeOptions;
198
+ lastExecution?: ScheduledReportExecution | null;
53
199
  createdBy: string;
54
200
  createdAt: Date;
55
201
  updatedAt: Date | null;