@trii/types 2.10.656 → 2.10.657

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 (88) 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/Sales/Api.d.ts +40 -0
  34. package/dist/Sales/Api.js +2 -0
  35. package/dist/Sales/Common.d.ts +72 -0
  36. package/dist/Sales/Common.js +31 -0
  37. package/dist/Sales/Dashboard.d.ts +25 -0
  38. package/dist/Sales/Dashboard.js +2 -0
  39. package/dist/Sales/Lead.d.ts +99 -0
  40. package/dist/Sales/Lead.js +8 -0
  41. package/dist/Sales/index.d.ts +4 -0
  42. package/dist/Sales/index.js +20 -0
  43. package/dist/Spaces/spaces.d.ts +1 -0
  44. package/dist/Tickets/AI.d.ts +400 -0
  45. package/dist/Tickets/AI.js +113 -0
  46. package/dist/Tickets/AdvancedApi.d.ts +486 -0
  47. package/dist/Tickets/AdvancedApi.js +108 -0
  48. package/dist/Tickets/Api.d.ts +62 -0
  49. package/dist/Tickets/Api.js +8 -0
  50. package/dist/Tickets/Approval.d.ts +139 -0
  51. package/dist/Tickets/Approval.js +30 -0
  52. package/dist/Tickets/Automation.d.ts +237 -0
  53. package/dist/Tickets/Automation.js +74 -0
  54. package/dist/Tickets/Category.d.ts +25 -0
  55. package/dist/Tickets/Category.js +2 -0
  56. package/dist/Tickets/Common.d.ts +90 -0
  57. package/dist/Tickets/Common.js +38 -0
  58. package/dist/Tickets/Conversation.d.ts +68 -0
  59. package/dist/Tickets/Conversation.js +30 -0
  60. package/dist/Tickets/Dashboard.d.ts +408 -0
  61. package/dist/Tickets/Dashboard.js +206 -0
  62. package/dist/Tickets/Fields.d.ts +133 -0
  63. package/dist/Tickets/Fields.js +44 -0
  64. package/dist/Tickets/Layouts.d.ts +63 -0
  65. package/dist/Tickets/Layouts.js +22 -0
  66. package/dist/Tickets/Routing.d.ts +290 -0
  67. package/dist/Tickets/Routing.js +87 -0
  68. package/dist/Tickets/Satisfaction.d.ts +31 -0
  69. package/dist/Tickets/Satisfaction.js +9 -0
  70. package/dist/Tickets/Security.d.ts +302 -0
  71. package/dist/Tickets/Security.js +107 -0
  72. package/dist/Tickets/SelfService.d.ts +255 -0
  73. package/dist/Tickets/SelfService.js +56 -0
  74. package/dist/Tickets/Sla.d.ts +253 -0
  75. package/dist/Tickets/Sla.js +73 -0
  76. package/dist/Tickets/Task.d.ts +122 -0
  77. package/dist/Tickets/Task.js +17 -0
  78. package/dist/Tickets/Ticket.d.ts +133 -0
  79. package/dist/Tickets/Ticket.js +2 -0
  80. package/dist/Tickets/Views.d.ts +77 -0
  81. package/dist/Tickets/Views.js +23 -0
  82. package/dist/Tickets/Workflow.d.ts +109 -0
  83. package/dist/Tickets/Workflow.js +44 -0
  84. package/dist/Tickets/index.d.ts +20 -1
  85. package/dist/Tickets/index.js +20 -1
  86. package/dist/index.d.ts +2 -0
  87. package/dist/index.js +3 -1
  88. package/package.json +1 -1
@@ -0,0 +1,139 @@
1
+ import { ITicketAuditedEntity } from './Common';
2
+ export declare enum TicketApprovalMode {
3
+ SEQUENTIAL = "SEQUENTIAL",
4
+ PARALLEL = "PARALLEL"
5
+ }
6
+ export declare enum TicketApprovalStatus {
7
+ PENDING = "PENDING",
8
+ IN_PROGRESS = "IN_PROGRESS",
9
+ APPROVED = "APPROVED",
10
+ REJECTED = "REJECTED",
11
+ CANCELLED = "CANCELLED",
12
+ EXPIRED = "EXPIRED"
13
+ }
14
+ export declare enum TicketApprovalDecisionType {
15
+ APPROVE = "APPROVE",
16
+ REJECT = "REJECT",
17
+ ABSTAIN = "ABSTAIN"
18
+ }
19
+ export declare enum TicketApprovalQuorumType {
20
+ ALL = "ALL",
21
+ ANY = "ANY",
22
+ COUNT = "COUNT",
23
+ PERCENTAGE = "PERCENTAGE"
24
+ }
25
+ export interface ITicketApprovalQuorum {
26
+ type: TicketApprovalQuorumType;
27
+ requiredCount?: number;
28
+ requiredPercentage?: number;
29
+ rejectOnAnyRejection?: boolean;
30
+ }
31
+ export type ITicketApprover = {
32
+ type: 'USER';
33
+ userId: string;
34
+ } | {
35
+ type: 'GROUP';
36
+ groupId: string;
37
+ } | {
38
+ type: 'ROLE';
39
+ roleId: string;
40
+ };
41
+ export interface ITicketApprovalStepDefinition {
42
+ id: string;
43
+ name: string;
44
+ order: number;
45
+ approvers: ITicketApprover[];
46
+ quorum: ITicketApprovalQuorum;
47
+ expiresAfterMinutes?: number;
48
+ allowDelegation: boolean;
49
+ escalationPolicyId?: string;
50
+ }
51
+ export interface ITicketApprovalProcessDefinition extends ITicketAuditedEntity {
52
+ name: string;
53
+ description?: string;
54
+ categoryIds?: string[];
55
+ mode: TicketApprovalMode;
56
+ steps: ITicketApprovalStepDefinition[];
57
+ enabled: boolean;
58
+ }
59
+ export interface ITicketApprovalStep extends ITicketApprovalStepDefinition {
60
+ status: TicketApprovalStatus;
61
+ startedAt?: Date;
62
+ expiresAt?: Date;
63
+ completedAt?: Date;
64
+ }
65
+ export interface ITicketApprovalProcess {
66
+ id: string;
67
+ spaceId: string;
68
+ ticketId: string;
69
+ definitionId?: string;
70
+ definitionVersion?: number;
71
+ name: string;
72
+ mode: TicketApprovalMode;
73
+ status: TicketApprovalStatus;
74
+ steps: ITicketApprovalStep[];
75
+ currentStepId?: string;
76
+ requestedAt: Date;
77
+ requestedBy: string;
78
+ completedAt?: Date;
79
+ cancelledAt?: Date;
80
+ }
81
+ export interface ITicketApprovalDecision {
82
+ id: string;
83
+ spaceId: string;
84
+ ticketId: string;
85
+ processId: string;
86
+ stepId: string;
87
+ approverId: string;
88
+ decision: TicketApprovalDecisionType;
89
+ comment?: string;
90
+ attachmentIds?: string[];
91
+ decidedAt: Date;
92
+ delegatedFromUserId?: string;
93
+ }
94
+ export interface ITicketApprovalDelegation {
95
+ id: string;
96
+ spaceId: string;
97
+ ticketId: string;
98
+ processId: string;
99
+ stepId: string;
100
+ fromUserId: string;
101
+ toUserId: string;
102
+ reason?: string;
103
+ delegatedAt: Date;
104
+ expiresAt?: Date;
105
+ revokedAt?: Date;
106
+ }
107
+ export interface ITicketApprovalSummary {
108
+ pending: number;
109
+ approved: number;
110
+ rejected: number;
111
+ expired: number;
112
+ currentProcessId?: string;
113
+ }
114
+ export interface IStartTicketApprovalDto {
115
+ expectedVersion: number;
116
+ definitionId: string;
117
+ comment?: string;
118
+ }
119
+ export interface IDecideTicketApprovalDto {
120
+ expectedVersion: number;
121
+ processId: string;
122
+ stepId: string;
123
+ decision: TicketApprovalDecisionType;
124
+ comment?: string;
125
+ attachmentIds?: string[];
126
+ }
127
+ export interface IDelegateTicketApprovalDto {
128
+ expectedVersion: number;
129
+ processId: string;
130
+ stepId: string;
131
+ toUserId: string;
132
+ reason?: string;
133
+ expiresAt?: Date;
134
+ }
135
+ export interface ICancelTicketApprovalDto {
136
+ expectedVersion: number;
137
+ processId: string;
138
+ reason: string;
139
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TicketApprovalQuorumType = exports.TicketApprovalDecisionType = exports.TicketApprovalStatus = exports.TicketApprovalMode = void 0;
4
+ var TicketApprovalMode;
5
+ (function (TicketApprovalMode) {
6
+ TicketApprovalMode["SEQUENTIAL"] = "SEQUENTIAL";
7
+ TicketApprovalMode["PARALLEL"] = "PARALLEL";
8
+ })(TicketApprovalMode || (exports.TicketApprovalMode = TicketApprovalMode = {}));
9
+ var TicketApprovalStatus;
10
+ (function (TicketApprovalStatus) {
11
+ TicketApprovalStatus["PENDING"] = "PENDING";
12
+ TicketApprovalStatus["IN_PROGRESS"] = "IN_PROGRESS";
13
+ TicketApprovalStatus["APPROVED"] = "APPROVED";
14
+ TicketApprovalStatus["REJECTED"] = "REJECTED";
15
+ TicketApprovalStatus["CANCELLED"] = "CANCELLED";
16
+ TicketApprovalStatus["EXPIRED"] = "EXPIRED";
17
+ })(TicketApprovalStatus || (exports.TicketApprovalStatus = TicketApprovalStatus = {}));
18
+ var TicketApprovalDecisionType;
19
+ (function (TicketApprovalDecisionType) {
20
+ TicketApprovalDecisionType["APPROVE"] = "APPROVE";
21
+ TicketApprovalDecisionType["REJECT"] = "REJECT";
22
+ TicketApprovalDecisionType["ABSTAIN"] = "ABSTAIN";
23
+ })(TicketApprovalDecisionType || (exports.TicketApprovalDecisionType = TicketApprovalDecisionType = {}));
24
+ var TicketApprovalQuorumType;
25
+ (function (TicketApprovalQuorumType) {
26
+ TicketApprovalQuorumType["ALL"] = "ALL";
27
+ TicketApprovalQuorumType["ANY"] = "ANY";
28
+ TicketApprovalQuorumType["COUNT"] = "COUNT";
29
+ TicketApprovalQuorumType["PERCENTAGE"] = "PERCENTAGE";
30
+ })(TicketApprovalQuorumType || (exports.TicketApprovalQuorumType = TicketApprovalQuorumType = {}));
@@ -0,0 +1,237 @@
1
+ import { TicketPropertyValue } from "./Common";
2
+ import { TicketSecurityOperation } from "./Security";
3
+ /** Events published by Tickets that may start or resume a Flow execution. */
4
+ export declare enum TicketAutomationTrigger {
5
+ TICKET_CREATED = "TICKET_CREATED",
6
+ TICKET_UPDATED = "TICKET_UPDATED",
7
+ STATUS_CHANGED = "STATUS_CHANGED",
8
+ PRIORITY_CHANGED = "PRIORITY_CHANGED",
9
+ ASSIGNMENT_CHANGED = "ASSIGNMENT_CHANGED",
10
+ CATEGORY_CHANGED = "CATEGORY_CHANGED",
11
+ PUBLIC_MESSAGE_RECEIVED = "PUBLIC_MESSAGE_RECEIVED",
12
+ PUBLIC_REPLY_SENT = "PUBLIC_REPLY_SENT",
13
+ INTERNAL_NOTE_ADDED = "INTERNAL_NOTE_ADDED",
14
+ SLA_WARNING = "SLA_WARNING",
15
+ SLA_BREACHED = "SLA_BREACHED",
16
+ TICKET_OVERDUE = "TICKET_OVERDUE",
17
+ APPROVAL_REQUESTED = "APPROVAL_REQUESTED",
18
+ APPROVAL_COMPLETED = "APPROVAL_COMPLETED",
19
+ APPROVAL_REJECTED = "APPROVAL_REJECTED",
20
+ TASK_CREATED = "TASK_CREATED",
21
+ TASK_COMPLETED = "TASK_COMPLETED",
22
+ TASK_OVERDUE = "TASK_OVERDUE",
23
+ SATISFACTION_RECEIVED = "SATISFACTION_RECEIVED",
24
+ TICKET_REOPENED = "TICKET_REOPENED",
25
+ TICKET_RESOLVED = "TICKET_RESOLVED",
26
+ SCHEDULED = "SCHEDULED",
27
+ MANUAL = "MANUAL"
28
+ }
29
+ /** Safe commands exposed by Tickets as Flow action nodes; every command uses normal domain validation. */
30
+ export declare enum TicketAutomationAction {
31
+ UPDATE_FIELDS = "UPDATE_FIELDS",
32
+ CHANGE_STATUS = "CHANGE_STATUS",
33
+ SET_PRIORITY = "SET_PRIORITY",
34
+ ASSIGN_AGENT = "ASSIGN_AGENT",
35
+ ASSIGN_GROUP = "ASSIGN_GROUP",
36
+ ENQUEUE = "ENQUEUE",
37
+ ADD_TAG = "ADD_TAG",
38
+ REMOVE_TAG = "REMOVE_TAG",
39
+ ADD_INTERNAL_NOTE = "ADD_INTERNAL_NOTE",
40
+ SEND_PUBLIC_REPLY = "SEND_PUBLIC_REPLY",
41
+ SEND_NOTIFICATION = "SEND_NOTIFICATION",
42
+ START_APPROVAL = "START_APPROVAL",
43
+ APPLY_TASK_TEMPLATE = "APPLY_TASK_TEMPLATE",
44
+ LINK_TICKET = "LINK_TICKET",
45
+ CREATE_CHILD_TICKET = "CREATE_CHILD_TICKET",
46
+ MERGE_TICKETS = "MERGE_TICKETS",
47
+ PAUSE_SLA = "PAUSE_SLA",
48
+ RESUME_SLA = "RESUME_SLA",
49
+ CALL_WEBHOOK = "CALL_WEBHOOK"
50
+ }
51
+ export declare enum TicketAutomationCapabilityKind {
52
+ TRIGGER = "TRIGGER",
53
+ ACTION = "ACTION",
54
+ CONDITION = "CONDITION"
55
+ }
56
+ export declare enum TicketAutomationEventStatus {
57
+ PENDING = "PENDING",
58
+ PUBLISHED = "PUBLISHED",
59
+ FAILED = "FAILED",
60
+ DEAD_LETTER = "DEAD_LETTER"
61
+ }
62
+ export declare enum TicketAutomationActionStatus {
63
+ ACCEPTED = "ACCEPTED",
64
+ COMPLETED = "COMPLETED",
65
+ SKIPPED = "SKIPPED",
66
+ CONFLICT = "CONFLICT",
67
+ FAILED = "FAILED"
68
+ }
69
+ /** Causal metadata propagated across Tickets and Flow to deduplicate work and detect recursive loops. */
70
+ export interface ITicketAutomationEnvelope {
71
+ eventId: string;
72
+ correlationId: string;
73
+ causationId?: string;
74
+ flowId?: string;
75
+ flowVersion?: number;
76
+ executionId?: string;
77
+ actionId?: string;
78
+ depth: number;
79
+ occurredAt: Date;
80
+ }
81
+ /** Snapshot and delta delivered to Flow when a ticket trigger fires. */
82
+ export interface ITicketAutomationContext {
83
+ ticketId: string;
84
+ spaceId: string;
85
+ eventType: TicketAutomationTrigger;
86
+ ticketVersion: number;
87
+ changedFields?: string[];
88
+ previousValues?: {
89
+ [key: string]: TicketPropertyValue;
90
+ };
91
+ currentValues?: {
92
+ [key: string]: TicketPropertyValue;
93
+ };
94
+ conversationId?: string;
95
+ messageId?: string;
96
+ slaMetricCycleId?: string;
97
+ approvalProcessId?: string;
98
+ taskId?: string;
99
+ actorId?: string;
100
+ }
101
+ /** Transactional-outbox record. Tickets persists this with the mutation before publishing it to Flow. */
102
+ export interface ITicketAutomationEvent {
103
+ id: string;
104
+ spaceId: string;
105
+ ticketId: string;
106
+ envelope: ITicketAutomationEnvelope;
107
+ context: ITicketAutomationContext;
108
+ status: TicketAutomationEventStatus;
109
+ attempts: number;
110
+ createdAt: Date;
111
+ publishedAt?: Date;
112
+ nextAttemptAt?: Date;
113
+ lastError?: string;
114
+ }
115
+ /** Minimal JSON-schema-compatible description used by the visual Flow editor to render node inputs. */
116
+ export interface ITicketAutomationSchema {
117
+ type: "object";
118
+ title?: string;
119
+ description?: string;
120
+ required?: string[];
121
+ properties: {
122
+ [key: string]: ITicketAutomationSchemaProperty;
123
+ };
124
+ }
125
+ export interface ITicketAutomationSchemaProperty {
126
+ type: "string" | "number" | "integer" | "boolean" | "array" | "object";
127
+ title?: string;
128
+ description?: string;
129
+ format?: string;
130
+ enum?: TicketPropertyValue[];
131
+ default?: TicketPropertyValue;
132
+ items?: ITicketAutomationSchemaProperty;
133
+ }
134
+ /** Capability catalog entry consumed by Flow so ticket nodes are not hard-coded in its editor. */
135
+ export interface ITicketAutomationCapability {
136
+ code: string;
137
+ kind: TicketAutomationCapabilityKind;
138
+ name: string;
139
+ description?: string;
140
+ trigger?: TicketAutomationTrigger;
141
+ action?: TicketAutomationAction;
142
+ inputSchema?: ITicketAutomationSchema;
143
+ outputSchema?: ITicketAutomationSchema;
144
+ requiredOperations?: TicketSecurityOperation[];
145
+ enabled: boolean;
146
+ version: number;
147
+ }
148
+ /** Query used by Flow to discover available ticket triggers, actions and conditions for a tenant. */
149
+ export interface ITicketAutomationCapabilityQuery {
150
+ kinds?: TicketAutomationCapabilityKind[];
151
+ enabledOnly?: boolean;
152
+ version?: number;
153
+ }
154
+ /** Idempotent command sent by a Flow action node to the Tickets API. */
155
+ export interface IExecuteTicketAutomationActionDto {
156
+ ticketId: string;
157
+ expectedVersion?: number;
158
+ action: TicketAutomationAction;
159
+ parameters: {
160
+ [key: string]: TicketPropertyValue;
161
+ };
162
+ envelope: ITicketAutomationEnvelope;
163
+ idempotencyKey: string;
164
+ }
165
+ /** Result stored by Flow; repeated idempotency keys must return the original result. */
166
+ export interface ITicketAutomationActionResult {
167
+ ticketId: string;
168
+ action: TicketAutomationAction;
169
+ status: TicketAutomationActionStatus;
170
+ previousVersion?: number;
171
+ currentVersion?: number;
172
+ output?: {
173
+ [key: string]: TicketPropertyValue;
174
+ };
175
+ eventIds?: string[];
176
+ errorCode?: string;
177
+ errorMessage?: string;
178
+ retryable?: boolean;
179
+ completedAt: Date;
180
+ }
181
+ /** Audit record proving which flow/node caused a ticket mutation, independently from Flow logs. */
182
+ export interface ITicketAutomationActionExecution {
183
+ id: string;
184
+ spaceId: string;
185
+ ticketId: string;
186
+ flowId: string;
187
+ flowVersion?: number;
188
+ executionId: string;
189
+ nodeId?: string;
190
+ actionId: string;
191
+ action: TicketAutomationAction;
192
+ idempotencyKey: string;
193
+ status: TicketAutomationActionStatus;
194
+ startedAt: Date;
195
+ completedAt?: Date;
196
+ result?: ITicketAutomationActionResult;
197
+ }
198
+ /** Tenant safety limits enforced by Tickets before accepting Flow-originated actions. */
199
+ export interface ITicketAutomationLimits {
200
+ spaceId: string;
201
+ maximumCausalDepth: number;
202
+ maximumActionsPerExecution: number;
203
+ maximumActionsPerTicketPerMinute: number;
204
+ maximumEventsPerTicketPerMinute: number;
205
+ ignoreSameFlowCausedEvents: boolean;
206
+ deadLetterAfterAttempts: number;
207
+ }
208
+ /** Loop-check request evaluated before dispatching an event or executing an action. */
209
+ export interface ITicketAutomationGuardRequest {
210
+ ticketId: string;
211
+ envelope: ITicketAutomationEnvelope;
212
+ action?: TicketAutomationAction;
213
+ }
214
+ export interface ITicketAutomationGuardDecision {
215
+ allowed: boolean;
216
+ reasonCode?: string;
217
+ reason?: string;
218
+ currentDepth: number;
219
+ actionsUsed?: number;
220
+ actionsRemaining?: number;
221
+ }
222
+ /** Registers the Flow binding that determines which ticket event starts which flow version. */
223
+ export interface ITicketFlowBinding {
224
+ id: string;
225
+ spaceId: string;
226
+ name: string;
227
+ trigger: TicketAutomationTrigger;
228
+ flowId: string;
229
+ flowVersion?: number;
230
+ categoryIds?: string[];
231
+ enabled: boolean;
232
+ ignoreEventsCausedBySameFlow: boolean;
233
+ createdAt: Date;
234
+ createdBy: string;
235
+ updatedAt?: Date;
236
+ updatedBy?: string;
237
+ }
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TicketAutomationActionStatus = exports.TicketAutomationEventStatus = exports.TicketAutomationCapabilityKind = exports.TicketAutomationAction = exports.TicketAutomationTrigger = void 0;
4
+ /** Events published by Tickets that may start or resume a Flow execution. */
5
+ var TicketAutomationTrigger;
6
+ (function (TicketAutomationTrigger) {
7
+ TicketAutomationTrigger["TICKET_CREATED"] = "TICKET_CREATED";
8
+ TicketAutomationTrigger["TICKET_UPDATED"] = "TICKET_UPDATED";
9
+ TicketAutomationTrigger["STATUS_CHANGED"] = "STATUS_CHANGED";
10
+ TicketAutomationTrigger["PRIORITY_CHANGED"] = "PRIORITY_CHANGED";
11
+ TicketAutomationTrigger["ASSIGNMENT_CHANGED"] = "ASSIGNMENT_CHANGED";
12
+ TicketAutomationTrigger["CATEGORY_CHANGED"] = "CATEGORY_CHANGED";
13
+ TicketAutomationTrigger["PUBLIC_MESSAGE_RECEIVED"] = "PUBLIC_MESSAGE_RECEIVED";
14
+ TicketAutomationTrigger["PUBLIC_REPLY_SENT"] = "PUBLIC_REPLY_SENT";
15
+ TicketAutomationTrigger["INTERNAL_NOTE_ADDED"] = "INTERNAL_NOTE_ADDED";
16
+ TicketAutomationTrigger["SLA_WARNING"] = "SLA_WARNING";
17
+ TicketAutomationTrigger["SLA_BREACHED"] = "SLA_BREACHED";
18
+ TicketAutomationTrigger["TICKET_OVERDUE"] = "TICKET_OVERDUE";
19
+ TicketAutomationTrigger["APPROVAL_REQUESTED"] = "APPROVAL_REQUESTED";
20
+ TicketAutomationTrigger["APPROVAL_COMPLETED"] = "APPROVAL_COMPLETED";
21
+ TicketAutomationTrigger["APPROVAL_REJECTED"] = "APPROVAL_REJECTED";
22
+ TicketAutomationTrigger["TASK_CREATED"] = "TASK_CREATED";
23
+ TicketAutomationTrigger["TASK_COMPLETED"] = "TASK_COMPLETED";
24
+ TicketAutomationTrigger["TASK_OVERDUE"] = "TASK_OVERDUE";
25
+ TicketAutomationTrigger["SATISFACTION_RECEIVED"] = "SATISFACTION_RECEIVED";
26
+ TicketAutomationTrigger["TICKET_REOPENED"] = "TICKET_REOPENED";
27
+ TicketAutomationTrigger["TICKET_RESOLVED"] = "TICKET_RESOLVED";
28
+ TicketAutomationTrigger["SCHEDULED"] = "SCHEDULED";
29
+ TicketAutomationTrigger["MANUAL"] = "MANUAL";
30
+ })(TicketAutomationTrigger || (exports.TicketAutomationTrigger = TicketAutomationTrigger = {}));
31
+ /** Safe commands exposed by Tickets as Flow action nodes; every command uses normal domain validation. */
32
+ var TicketAutomationAction;
33
+ (function (TicketAutomationAction) {
34
+ TicketAutomationAction["UPDATE_FIELDS"] = "UPDATE_FIELDS";
35
+ TicketAutomationAction["CHANGE_STATUS"] = "CHANGE_STATUS";
36
+ TicketAutomationAction["SET_PRIORITY"] = "SET_PRIORITY";
37
+ TicketAutomationAction["ASSIGN_AGENT"] = "ASSIGN_AGENT";
38
+ TicketAutomationAction["ASSIGN_GROUP"] = "ASSIGN_GROUP";
39
+ TicketAutomationAction["ENQUEUE"] = "ENQUEUE";
40
+ TicketAutomationAction["ADD_TAG"] = "ADD_TAG";
41
+ TicketAutomationAction["REMOVE_TAG"] = "REMOVE_TAG";
42
+ TicketAutomationAction["ADD_INTERNAL_NOTE"] = "ADD_INTERNAL_NOTE";
43
+ TicketAutomationAction["SEND_PUBLIC_REPLY"] = "SEND_PUBLIC_REPLY";
44
+ TicketAutomationAction["SEND_NOTIFICATION"] = "SEND_NOTIFICATION";
45
+ TicketAutomationAction["START_APPROVAL"] = "START_APPROVAL";
46
+ TicketAutomationAction["APPLY_TASK_TEMPLATE"] = "APPLY_TASK_TEMPLATE";
47
+ TicketAutomationAction["LINK_TICKET"] = "LINK_TICKET";
48
+ TicketAutomationAction["CREATE_CHILD_TICKET"] = "CREATE_CHILD_TICKET";
49
+ TicketAutomationAction["MERGE_TICKETS"] = "MERGE_TICKETS";
50
+ TicketAutomationAction["PAUSE_SLA"] = "PAUSE_SLA";
51
+ TicketAutomationAction["RESUME_SLA"] = "RESUME_SLA";
52
+ TicketAutomationAction["CALL_WEBHOOK"] = "CALL_WEBHOOK";
53
+ })(TicketAutomationAction || (exports.TicketAutomationAction = TicketAutomationAction = {}));
54
+ var TicketAutomationCapabilityKind;
55
+ (function (TicketAutomationCapabilityKind) {
56
+ TicketAutomationCapabilityKind["TRIGGER"] = "TRIGGER";
57
+ TicketAutomationCapabilityKind["ACTION"] = "ACTION";
58
+ TicketAutomationCapabilityKind["CONDITION"] = "CONDITION";
59
+ })(TicketAutomationCapabilityKind || (exports.TicketAutomationCapabilityKind = TicketAutomationCapabilityKind = {}));
60
+ var TicketAutomationEventStatus;
61
+ (function (TicketAutomationEventStatus) {
62
+ TicketAutomationEventStatus["PENDING"] = "PENDING";
63
+ TicketAutomationEventStatus["PUBLISHED"] = "PUBLISHED";
64
+ TicketAutomationEventStatus["FAILED"] = "FAILED";
65
+ TicketAutomationEventStatus["DEAD_LETTER"] = "DEAD_LETTER";
66
+ })(TicketAutomationEventStatus || (exports.TicketAutomationEventStatus = TicketAutomationEventStatus = {}));
67
+ var TicketAutomationActionStatus;
68
+ (function (TicketAutomationActionStatus) {
69
+ TicketAutomationActionStatus["ACCEPTED"] = "ACCEPTED";
70
+ TicketAutomationActionStatus["COMPLETED"] = "COMPLETED";
71
+ TicketAutomationActionStatus["SKIPPED"] = "SKIPPED";
72
+ TicketAutomationActionStatus["CONFLICT"] = "CONFLICT";
73
+ TicketAutomationActionStatus["FAILED"] = "FAILED";
74
+ })(TicketAutomationActionStatus || (exports.TicketAutomationActionStatus = TicketAutomationActionStatus = {}));
@@ -0,0 +1,25 @@
1
+ import { ITicketAuditedEntity, TicketPriority } from './Common';
2
+ import { ITicketFormRequirement } from './Workflow';
3
+ export interface ITicketCategory extends ITicketAuditedEntity {
4
+ name: string;
5
+ description?: string;
6
+ parentCategoryId?: string;
7
+ order: number;
8
+ enabled: boolean;
9
+ defaultPriority?: TicketPriority;
10
+ defaultAssignedGroupId?: string;
11
+ defaultSlaPolicyId?: string;
12
+ securityPolicyId?: string;
13
+ formRequirements?: ITicketFormRequirement[];
14
+ fieldDefinitionIds?: string[];
15
+ layoutIds?: string[];
16
+ }
17
+ export interface ITicketResolutionType extends ITicketAuditedEntity {
18
+ name: string;
19
+ description?: string;
20
+ enabled: boolean;
21
+ order: number;
22
+ formRequirements?: ITicketFormRequirement[];
23
+ fieldDefinitionIds?: string[];
24
+ layoutIds?: string[];
25
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,90 @@
1
+ import { IContactInfo } from "../Contacts/contacts";
2
+ export declare enum TicketStage {
3
+ NEW = "NEW",
4
+ ACTIVE = "ACTIVE",
5
+ RESOLVED = "RESOLVED",
6
+ CLOSED = "CLOSED",
7
+ CANCELLED = "CANCELLED"
8
+ }
9
+ export declare enum TicketPriority {
10
+ LOW = "LOW",
11
+ MEDIUM = "MEDIUM",
12
+ HIGH = "HIGH",
13
+ URGENT = "URGENT"
14
+ }
15
+ export declare enum TicketOrigin {
16
+ MANUAL = "MANUAL",
17
+ API = "API",
18
+ IMPORT = "IMPORT",
19
+ AUTOMATION = "AUTOMATION",
20
+ CONVERSATION = "CONVERSATION",
21
+ WEB_FORM = "WEB_FORM",
22
+ SOCIAL_MEDIA = "SOCIAL_MEDIA",
23
+ EMAIL = "EMAIL",
24
+ PHONE = "PHONE",
25
+ OTHER = "OTHER"
26
+ }
27
+ export declare enum TicketAccessLevel {
28
+ ALL = "ALL",
29
+ GROUP = "GROUP",
30
+ AGENT = "AGENT",
31
+ OWN = "OWN"
32
+ }
33
+ export type TicketPropertyPrimitive = string | number | boolean | Date | null;
34
+ export type TicketPropertyValue = TicketPropertyPrimitive | TicketPropertyValue[] | {
35
+ [key: string]: TicketPropertyValue;
36
+ };
37
+ export interface ITicketProperty {
38
+ nameKey: string;
39
+ value: TicketPropertyValue;
40
+ }
41
+ export interface ITicketTagInfo {
42
+ id: string;
43
+ name: string;
44
+ color?: string;
45
+ }
46
+ export interface ITicketExternalReference {
47
+ system: string;
48
+ externalId: string;
49
+ externalUrl?: string;
50
+ lastSyncedAt?: Date;
51
+ }
52
+ export interface ITicketAttachment {
53
+ id: string;
54
+ spaceId: string;
55
+ ticketId: string;
56
+ fileName: string;
57
+ mimeType: string;
58
+ sizeBytes: number;
59
+ storageKey: string;
60
+ downloadUrl?: string;
61
+ checksum?: string;
62
+ createdAt: Date;
63
+ createdBy: string;
64
+ deletedAt?: Date;
65
+ deletedBy?: string;
66
+ }
67
+ export interface ITicketAuditedEntity {
68
+ id: string;
69
+ spaceId: string;
70
+ createdAt: Date;
71
+ createdBy: string;
72
+ updatedAt?: Date;
73
+ updatedBy?: string;
74
+ deletedAt?: Date;
75
+ deletedBy?: string;
76
+ }
77
+ export type ITicketContactProjection = IContactInfo;
78
+ export interface ITicketDateRange {
79
+ from: Date;
80
+ to: Date;
81
+ }
82
+ export interface ITicketMetricPoint {
83
+ date: Date;
84
+ value: number;
85
+ }
86
+ export interface ITicketMetricGroup {
87
+ key: string;
88
+ label: string;
89
+ value: number;
90
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TicketAccessLevel = exports.TicketOrigin = exports.TicketPriority = exports.TicketStage = void 0;
4
+ var TicketStage;
5
+ (function (TicketStage) {
6
+ TicketStage["NEW"] = "NEW";
7
+ TicketStage["ACTIVE"] = "ACTIVE";
8
+ TicketStage["RESOLVED"] = "RESOLVED";
9
+ TicketStage["CLOSED"] = "CLOSED";
10
+ TicketStage["CANCELLED"] = "CANCELLED";
11
+ })(TicketStage || (exports.TicketStage = TicketStage = {}));
12
+ var TicketPriority;
13
+ (function (TicketPriority) {
14
+ TicketPriority["LOW"] = "LOW";
15
+ TicketPriority["MEDIUM"] = "MEDIUM";
16
+ TicketPriority["HIGH"] = "HIGH";
17
+ TicketPriority["URGENT"] = "URGENT";
18
+ })(TicketPriority || (exports.TicketPriority = TicketPriority = {}));
19
+ var TicketOrigin;
20
+ (function (TicketOrigin) {
21
+ TicketOrigin["MANUAL"] = "MANUAL";
22
+ TicketOrigin["API"] = "API";
23
+ TicketOrigin["IMPORT"] = "IMPORT";
24
+ TicketOrigin["AUTOMATION"] = "AUTOMATION";
25
+ TicketOrigin["CONVERSATION"] = "CONVERSATION";
26
+ TicketOrigin["WEB_FORM"] = "WEB_FORM";
27
+ TicketOrigin["SOCIAL_MEDIA"] = "SOCIAL_MEDIA";
28
+ TicketOrigin["EMAIL"] = "EMAIL";
29
+ TicketOrigin["PHONE"] = "PHONE";
30
+ TicketOrigin["OTHER"] = "OTHER";
31
+ })(TicketOrigin || (exports.TicketOrigin = TicketOrigin = {}));
32
+ var TicketAccessLevel;
33
+ (function (TicketAccessLevel) {
34
+ TicketAccessLevel["ALL"] = "ALL";
35
+ TicketAccessLevel["GROUP"] = "GROUP";
36
+ TicketAccessLevel["AGENT"] = "AGENT";
37
+ TicketAccessLevel["OWN"] = "OWN";
38
+ })(TicketAccessLevel || (exports.TicketAccessLevel = TicketAccessLevel = {}));