@trii/types 2.10.726 → 2.10.728
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/Automations/Events/Event.d.ts +3 -3
- package/dist/Contacts/CommunicationEndpoint.d.ts +8 -8
- package/dist/Conversations/Conversation.d.ts +8 -8
- package/dist/Conversations/InboxMongo.d.ts +12 -12
- package/dist/Conversations/Routing.d.ts +10 -10
- package/dist/Events/DomainEventTypes.d.ts +23 -23
- package/dist/Tickets/AdvancedApi.d.ts +55 -0
- package/dist/Tickets/AdvancedApi.js +17 -1
- package/dist/Tickets/Security.d.ts +55 -0
- package/dist/src/Automations/Capabilities/Capability.d.ts +81 -0
- package/dist/src/Automations/Capabilities/Capability.js +23 -0
- package/dist/src/Automations/Capabilities/index.d.ts +1 -0
- package/dist/src/Automations/Capabilities/index.js +17 -0
- package/dist/src/Automations/Common.d.ts +94 -0
- package/dist/src/Automations/Common.js +40 -0
- package/dist/src/Automations/Events/Event.d.ts +96 -0
- package/dist/src/Automations/Events/Event.js +19 -0
- package/dist/src/Automations/Events/index.d.ts +1 -0
- package/dist/src/Automations/Events/index.js +17 -0
- package/dist/src/Automations/Executions/Execution.d.ts +298 -0
- package/dist/src/Automations/Executions/Execution.js +76 -0
- package/dist/src/Automations/Executions/Testing.d.ts +166 -0
- package/dist/src/Automations/Executions/Testing.js +54 -0
- package/dist/src/Automations/Executions/index.d.ts +2 -0
- package/dist/src/Automations/Executions/index.js +18 -0
- package/dist/src/Automations/Flows/Canvas.d.ts +109 -0
- package/dist/src/Automations/Flows/Canvas.js +43 -0
- package/dist/src/Automations/Flows/Flow.d.ts +154 -0
- package/dist/src/Automations/Flows/Flow.js +58 -0
- package/dist/src/Automations/Flows/Requests.d.ts +71 -0
- package/dist/src/Automations/Flows/Validation.d.ts +28 -0
- package/dist/src/Automations/Flows/Validation.js +9 -0
- package/dist/src/Automations/Flows/index.d.ts +4 -0
- package/dist/src/Automations/Flows/index.js +20 -0
- package/dist/src/Automations/Nodes/Node.d.ts +116 -0
- package/dist/src/Automations/Nodes/Node.js +27 -0
- package/dist/src/Automations/Nodes/index.d.ts +1 -0
- package/dist/src/Automations/Nodes/index.js +17 -0
- package/dist/src/Automations/Triggers/Trigger.d.ts +112 -0
- package/dist/src/Automations/Triggers/Trigger.js +66 -0
- package/dist/src/Automations/Triggers/index.d.ts +1 -0
- package/dist/src/Automations/Triggers/index.js +17 -0
- package/dist/src/Automations/index.d.ts +7 -0
- package/dist/src/Automations/index.js +23 -0
- package/dist/src/Chats/Chat.d.ts +61 -0
- package/dist/src/Chats/Chat.js +28 -0
- package/dist/src/Common/Channels/Channel.d.ts +28 -1
- package/dist/src/Common/Channels/Email.d.ts +1 -0
- package/dist/src/Common/Channels/Facebook.d.ts +1 -0
- package/dist/src/Common/Channels/Form.d.ts +1 -0
- package/dist/src/Common/Channels/GoogleBusiness.d.ts +1 -0
- package/dist/src/Common/Channels/Instagram.d.ts +1 -0
- package/dist/src/Common/Channels/MercadoLibre.d.ts +1 -0
- package/dist/src/Common/Channels/WebChat.d.ts +1 -0
- package/dist/src/Contacts/CommunicationEndpoint.d.ts +107 -0
- package/dist/src/Contacts/CommunicationEndpoint.js +39 -0
- package/dist/src/Contacts/CommunicationMethod.d.ts +9 -0
- package/dist/src/Contacts/CommunicationMethod.js +2 -0
- package/dist/src/Contacts/contacts.d.ts +2 -2
- package/dist/src/Contacts/index.d.ts +2 -0
- package/dist/src/Contacts/index.js +2 -0
- package/dist/src/Conversations/Assignment.d.ts +181 -0
- package/dist/src/Conversations/Assignment.js +4 -0
- package/dist/src/Conversations/Conversation.d.ts +410 -48
- package/dist/src/Conversations/Conversation.js +14 -34
- package/dist/src/Conversations/DashBoard/dashboard.d.ts +2 -2
- package/dist/src/Conversations/Flows/Workflows/Workflow.d.ts +280 -123
- package/dist/src/Conversations/Flows/Workflows/Workflow.js +85 -35
- package/dist/src/Conversations/Groups/Group.d.ts +2 -8
- package/dist/src/Conversations/Groups/Group.js +0 -6
- package/dist/src/Conversations/InboxMongo.d.ts +154 -0
- package/dist/src/Conversations/InboxMongo.js +128 -0
- package/dist/src/Conversations/InboxProjection.d.ts +162 -0
- package/dist/src/Conversations/InboxProjection.js +2 -0
- package/dist/src/Conversations/Label.d.ts +1 -1
- package/dist/src/Conversations/Outbox.d.ts +24 -0
- package/dist/src/Conversations/Outbox.js +4 -0
- package/dist/src/Conversations/Queue.d.ts +107 -0
- package/dist/src/Conversations/Queue.js +4 -0
- package/dist/src/Conversations/Routing.d.ts +164 -0
- package/dist/src/Conversations/Routing.js +2 -0
- package/dist/src/Conversations/Sla.d.ts +227 -0
- package/dist/src/Conversations/Sla.js +6 -0
- package/dist/src/Conversations/Transfer.d.ts +73 -0
- package/dist/src/Conversations/Transfer.js +2 -0
- package/dist/src/Conversations/WebHook.d.ts +1 -1
- package/dist/src/Conversations/index.d.ts +9 -1
- package/dist/src/Conversations/index.js +9 -1
- package/dist/src/Events/DomainEventTypes.d.ts +51 -0
- package/dist/src/Events/DomainEventTypes.js +49 -0
- package/dist/src/Events/index.d.ts +1 -0
- package/dist/src/Events/index.js +17 -0
- package/dist/src/Forms/API.d.ts +53 -0
- package/dist/src/Forms/API.js +2 -0
- package/dist/src/Forms/SubmittedForm.d.ts +56 -0
- package/dist/src/Forms/SubmittedForm.js +9 -0
- package/dist/src/Forms/index.d.ts +2 -0
- package/dist/src/Forms/index.js +18 -0
- package/dist/src/Presence/AgentPause.d.ts +24 -0
- package/dist/src/Presence/AgentPause.js +19 -0
- package/dist/src/Presence/QueueParticipation.d.ts +17 -0
- package/dist/src/Presence/QueueParticipation.js +2 -0
- package/dist/src/Presence/QueueRoutingState.d.ts +27 -0
- package/dist/src/Presence/QueueRoutingState.js +9 -0
- package/dist/src/Presence/index.d.ts +3 -0
- package/dist/src/Presence/index.js +19 -0
- package/dist/src/PublicAPI/apiKey.d.ts +92 -3
- package/dist/src/PublicAPI/apiKey.js +27 -0
- package/dist/src/Tickets/AI.d.ts +50 -2
- package/dist/src/Tickets/AdvancedApi.d.ts +142 -2
- package/dist/src/Tickets/AdvancedApi.js +28 -1
- package/dist/src/Tickets/Approval.d.ts +20 -4
- package/dist/src/Tickets/Automation.d.ts +46 -2
- package/dist/src/Tickets/Category.d.ts +18 -0
- package/dist/src/Tickets/Dashboard.d.ts +78 -0
- package/dist/src/Tickets/Dashboard.js +13 -1
- package/dist/src/Tickets/Fields.d.ts +4 -0
- package/dist/src/Tickets/Layouts.d.ts +3 -1
- package/dist/src/Tickets/Routing.d.ts +105 -3
- package/dist/src/Tickets/Routing.js +7 -1
- package/dist/src/Tickets/Security.d.ts +271 -4
- package/dist/src/Tickets/Security.js +10 -1
- package/dist/src/Tickets/SelfService.d.ts +190 -0
- package/dist/src/Tickets/Sla.d.ts +140 -0
- package/dist/src/Tickets/Workflow.d.ts +20 -0
- package/dist/src/Users/UserTrii.d.ts +10 -0
- package/dist/src/Users/UserTrii.js +8 -1
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +5 -1
- package/package.json +12 -12
- package/dist/Conversations/DashBoard/dashboardForms.d.ts +0 -44
- package/dist/Conversations/DashBoard/dashboardForms.js +0 -24
- package/dist/Conversations/InboxCounters.d.ts +0 -18
- package/dist/src/Conversations/DashBoard/dashboardForms.d.ts +0 -44
- package/dist/src/Conversations/DashBoard/dashboardForms.js +0 -24
- /package/dist/{Conversations/InboxCounters.js → src/Automations/Flows/Requests.js} +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { FormItemType } from "../Common/Channels/Form";
|
|
2
|
+
import { FormAnswerV2, FormTag } from "./SubmittedForm";
|
|
3
|
+
export interface RequestInfo {
|
|
4
|
+
formId: string;
|
|
5
|
+
timeStart: Date | null;
|
|
6
|
+
timeEnd: Date | null;
|
|
7
|
+
skip: number | null;
|
|
8
|
+
limit: number | null;
|
|
9
|
+
}
|
|
10
|
+
export interface SummaryInfo {
|
|
11
|
+
formId: string;
|
|
12
|
+
timeStart: Date | null;
|
|
13
|
+
timeEnd: Date | null;
|
|
14
|
+
completedForms: number;
|
|
15
|
+
records: QuestionSummary[];
|
|
16
|
+
}
|
|
17
|
+
export interface QuestionSummary {
|
|
18
|
+
questionId: string;
|
|
19
|
+
question: string;
|
|
20
|
+
type: FormItemType;
|
|
21
|
+
fieldType: string;
|
|
22
|
+
count: number;
|
|
23
|
+
responses: ResponseSummary[];
|
|
24
|
+
}
|
|
25
|
+
export interface ResponseSummary {
|
|
26
|
+
count: number;
|
|
27
|
+
responseTitle: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SubmittedFormsInfo {
|
|
30
|
+
formId: string;
|
|
31
|
+
timeStart: Date | null;
|
|
32
|
+
timeEnd: Date | null;
|
|
33
|
+
completedForms: number;
|
|
34
|
+
records: SubmittedFormRecord[];
|
|
35
|
+
}
|
|
36
|
+
export interface SubmittedFormRecord {
|
|
37
|
+
id: string;
|
|
38
|
+
tags: FormTag[];
|
|
39
|
+
responses: SubmittedFormResponse[];
|
|
40
|
+
expireAt: Date | null;
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
completedAt: Date | null;
|
|
43
|
+
contractVersion: number;
|
|
44
|
+
formRevision: number;
|
|
45
|
+
}
|
|
46
|
+
export interface SubmittedFormResponse {
|
|
47
|
+
type: FormItemType;
|
|
48
|
+
fieldType: string;
|
|
49
|
+
questionId: string;
|
|
50
|
+
question: string;
|
|
51
|
+
response: unknown | null;
|
|
52
|
+
answer?: FormAnswerV2 | null;
|
|
53
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { FormItemType } from "../Common/Channels/Form";
|
|
2
|
+
export interface SubmittedForm {
|
|
3
|
+
id: string;
|
|
4
|
+
shardKey: string;
|
|
5
|
+
spaceId: string;
|
|
6
|
+
formId: string;
|
|
7
|
+
contractVersion: number;
|
|
8
|
+
formRevision: number;
|
|
9
|
+
schemaHash: string | null;
|
|
10
|
+
tags: FormTag[];
|
|
11
|
+
/** Compatibilidad con formularios V1. */
|
|
12
|
+
responses?: FormResponse[] | null;
|
|
13
|
+
answers: FormAnswerV2[];
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
expireAt: Date | null;
|
|
16
|
+
completedAt: Date | null;
|
|
17
|
+
}
|
|
18
|
+
export interface FormTag {
|
|
19
|
+
name: string;
|
|
20
|
+
value: string;
|
|
21
|
+
}
|
|
22
|
+
export declare enum FormStatus {
|
|
23
|
+
pending = 0,
|
|
24
|
+
completed = 1,
|
|
25
|
+
expired = 2
|
|
26
|
+
}
|
|
27
|
+
export interface FormResponse {
|
|
28
|
+
questionId: string;
|
|
29
|
+
type: FormItemType;
|
|
30
|
+
response: unknown;
|
|
31
|
+
}
|
|
32
|
+
export interface FormAnswerV2 {
|
|
33
|
+
fieldId: string;
|
|
34
|
+
fieldType: string;
|
|
35
|
+
/** Snapshot útil para exportaciones históricas. */
|
|
36
|
+
fieldLabel: string | null;
|
|
37
|
+
textValue: string | null;
|
|
38
|
+
numericValue: number | null;
|
|
39
|
+
/** Formatos canónicos: yyyy-MM-dd y HH:mm:ss. */
|
|
40
|
+
dateValue: string | null;
|
|
41
|
+
timeValue: string | null;
|
|
42
|
+
selectedOptions: FormSelectedOption[] | null;
|
|
43
|
+
files: FormSubmittedFile[] | null;
|
|
44
|
+
}
|
|
45
|
+
export interface FormSelectedOption {
|
|
46
|
+
id: string;
|
|
47
|
+
/** Snapshot histórico de la etiqueta. */
|
|
48
|
+
label: string | null;
|
|
49
|
+
}
|
|
50
|
+
export interface FormSubmittedFile {
|
|
51
|
+
storageId: string;
|
|
52
|
+
fileName: string;
|
|
53
|
+
contentType: string | null;
|
|
54
|
+
sizeBytes: number;
|
|
55
|
+
url: string | null;
|
|
56
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormStatus = void 0;
|
|
4
|
+
var FormStatus;
|
|
5
|
+
(function (FormStatus) {
|
|
6
|
+
FormStatus[FormStatus["pending"] = 0] = "pending";
|
|
7
|
+
FormStatus[FormStatus["completed"] = 1] = "completed";
|
|
8
|
+
FormStatus[FormStatus["expired"] = 2] = "expired";
|
|
9
|
+
})(FormStatus || (exports.FormStatus = FormStatus = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./API"), exports);
|
|
18
|
+
__exportStar(require("./SubmittedForm"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface AgentPause {
|
|
2
|
+
id: string;
|
|
3
|
+
spaceId: string;
|
|
4
|
+
userId: string;
|
|
5
|
+
reason: PauseReason;
|
|
6
|
+
startedAt: Date;
|
|
7
|
+
startedByUserId?: string;
|
|
8
|
+
startedBy: PauseActorType;
|
|
9
|
+
endedAt?: Date;
|
|
10
|
+
}
|
|
11
|
+
export declare enum PauseReason {
|
|
12
|
+
LUNCH = 0,
|
|
13
|
+
RESTROOM = 1,
|
|
14
|
+
BREAK = 2,
|
|
15
|
+
MEETING = 3,
|
|
16
|
+
TRAINING = 4,
|
|
17
|
+
ADMINISTRATIVE_WORK = 5,
|
|
18
|
+
OTHER = 6
|
|
19
|
+
}
|
|
20
|
+
export declare enum PauseActorType {
|
|
21
|
+
AGENT = 0,
|
|
22
|
+
SUPERVISOR = 1,
|
|
23
|
+
SYSTEM = 2
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PauseActorType = exports.PauseReason = void 0;
|
|
4
|
+
var PauseReason;
|
|
5
|
+
(function (PauseReason) {
|
|
6
|
+
PauseReason[PauseReason["LUNCH"] = 0] = "LUNCH";
|
|
7
|
+
PauseReason[PauseReason["RESTROOM"] = 1] = "RESTROOM";
|
|
8
|
+
PauseReason[PauseReason["BREAK"] = 2] = "BREAK";
|
|
9
|
+
PauseReason[PauseReason["MEETING"] = 3] = "MEETING";
|
|
10
|
+
PauseReason[PauseReason["TRAINING"] = 4] = "TRAINING";
|
|
11
|
+
PauseReason[PauseReason["ADMINISTRATIVE_WORK"] = 5] = "ADMINISTRATIVE_WORK";
|
|
12
|
+
PauseReason[PauseReason["OTHER"] = 6] = "OTHER";
|
|
13
|
+
})(PauseReason || (exports.PauseReason = PauseReason = {}));
|
|
14
|
+
var PauseActorType;
|
|
15
|
+
(function (PauseActorType) {
|
|
16
|
+
PauseActorType[PauseActorType["AGENT"] = 0] = "AGENT";
|
|
17
|
+
PauseActorType[PauseActorType["SUPERVISOR"] = 1] = "SUPERVISOR";
|
|
18
|
+
PauseActorType[PauseActorType["SYSTEM"] = 2] = "SYSTEM";
|
|
19
|
+
})(PauseActorType || (exports.PauseActorType = PauseActorType = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ConversationQueueInfo } from "../Conversations/Queue";
|
|
2
|
+
export interface QueueParticipation {
|
|
3
|
+
spaceId: string;
|
|
4
|
+
userId: string;
|
|
5
|
+
queueId: string;
|
|
6
|
+
authorized: boolean;
|
|
7
|
+
active: boolean;
|
|
8
|
+
updatedAt: Date;
|
|
9
|
+
updatedByUserId?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface QueueParticipationDto {
|
|
12
|
+
queueId: string;
|
|
13
|
+
authorized: boolean;
|
|
14
|
+
active: boolean;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
queue?: ConversationQueueInfo | null;
|
|
17
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ConversationQueueInfo } from "../Conversations/Queue";
|
|
2
|
+
export interface QueueRoutingState {
|
|
3
|
+
spaceId: string;
|
|
4
|
+
userId: string;
|
|
5
|
+
queueId: string;
|
|
6
|
+
isEligible: boolean;
|
|
7
|
+
presenceStatus: RoutingPresenceStatus;
|
|
8
|
+
activeJobCount: number;
|
|
9
|
+
maxCapacity?: number;
|
|
10
|
+
notRespondingDetectedAt?: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
}
|
|
13
|
+
export declare enum RoutingPresenceStatus {
|
|
14
|
+
IDLE = 0,
|
|
15
|
+
INTERACTING = 1,
|
|
16
|
+
BUSY = 2
|
|
17
|
+
}
|
|
18
|
+
export interface RoutingStateDto {
|
|
19
|
+
queueId: string;
|
|
20
|
+
queue?: ConversationQueueInfo | null;
|
|
21
|
+
isEligible: boolean;
|
|
22
|
+
presenceStatus?: RoutingPresenceStatus;
|
|
23
|
+
activeJobCount: number;
|
|
24
|
+
maxCapacity?: number | null;
|
|
25
|
+
notRespondingDetectedAt?: Date;
|
|
26
|
+
updatedAt?: Date;
|
|
27
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RoutingPresenceStatus = void 0;
|
|
4
|
+
var RoutingPresenceStatus;
|
|
5
|
+
(function (RoutingPresenceStatus) {
|
|
6
|
+
RoutingPresenceStatus[RoutingPresenceStatus["IDLE"] = 0] = "IDLE";
|
|
7
|
+
RoutingPresenceStatus[RoutingPresenceStatus["INTERACTING"] = 1] = "INTERACTING";
|
|
8
|
+
RoutingPresenceStatus[RoutingPresenceStatus["BUSY"] = 2] = "BUSY";
|
|
9
|
+
})(RoutingPresenceStatus || (exports.RoutingPresenceStatus = RoutingPresenceStatus = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./AgentPause"), exports);
|
|
18
|
+
__exportStar(require("./QueueParticipation"), exports);
|
|
19
|
+
__exportStar(require("./QueueRoutingState"), exports);
|
|
@@ -1,12 +1,101 @@
|
|
|
1
|
+
export interface CreateApiKeyResponseDto {
|
|
2
|
+
apiKey: ApiKey;
|
|
3
|
+
/**
|
|
4
|
+
* Credential returned only once, immediately after creation.
|
|
5
|
+
* It cannot be retrieved again later.
|
|
6
|
+
*/
|
|
7
|
+
credential: string;
|
|
8
|
+
}
|
|
1
9
|
export interface ApiKey {
|
|
2
10
|
id: string;
|
|
3
11
|
spaceId: string;
|
|
4
12
|
name: string;
|
|
13
|
+
status: ApiKeyStatus;
|
|
5
14
|
privileges: ApiPrivilege;
|
|
6
|
-
|
|
15
|
+
security?: ApiKeySecurityPolicy;
|
|
16
|
+
/**
|
|
17
|
+
* Prefix used to identify the API key without exposing the secret.
|
|
18
|
+
*/
|
|
19
|
+
keyPrefix: string;
|
|
20
|
+
createdBy: string;
|
|
7
21
|
createdAt: Date;
|
|
22
|
+
updatedBy?: string;
|
|
23
|
+
updatedAt?: Date;
|
|
24
|
+
lastUsedAt?: Date;
|
|
25
|
+
lastUsedIp?: string;
|
|
8
26
|
}
|
|
27
|
+
export type ApiKeyStatus = "active" | "disabled" | "revoked";
|
|
9
28
|
export interface ApiPrivilege {
|
|
10
|
-
|
|
11
|
-
|
|
29
|
+
/** @deprecated Replaced by scopes. */
|
|
30
|
+
Messages?: boolean;
|
|
31
|
+
/** @deprecated Replaced by scopes. */
|
|
32
|
+
Contacts?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Permissions granted to the API key.
|
|
35
|
+
*
|
|
36
|
+
* Examples:
|
|
37
|
+
* - contacts.read
|
|
38
|
+
* - contacts.write
|
|
39
|
+
* - messages.read
|
|
40
|
+
* - messages.send
|
|
41
|
+
*/
|
|
42
|
+
scopes: ApiScope[];
|
|
43
|
+
/**
|
|
44
|
+
* Optional restrictions applied to this API key.
|
|
45
|
+
*
|
|
46
|
+
* Restrictions limit which resources can be accessed,
|
|
47
|
+
* independently of the granted scopes.
|
|
48
|
+
*/
|
|
49
|
+
restrictions?: ApiResourceRestrictions;
|
|
50
|
+
}
|
|
51
|
+
export interface ApiKeySecurityPolicy {
|
|
52
|
+
/**
|
|
53
|
+
* Allowed IPv4/IPv6 addresses or CIDR ranges.
|
|
54
|
+
*/
|
|
55
|
+
allowedIpAddresses?: string[];
|
|
56
|
+
/**
|
|
57
|
+
* Optional expiration date.
|
|
58
|
+
*/
|
|
59
|
+
expiresAt?: Date;
|
|
60
|
+
}
|
|
61
|
+
export type ApiScope = (typeof API_SCOPES)[keyof typeof API_SCOPES];
|
|
62
|
+
export declare const API_SCOPES: {
|
|
63
|
+
readonly CONTACTS_READ: "contacts.read";
|
|
64
|
+
readonly CONTACTS_WRITE: "contacts.write";
|
|
65
|
+
readonly COMPANIES_READ: "companies.read";
|
|
66
|
+
readonly COMPANIES_WRITE: "companies.write";
|
|
67
|
+
readonly CONVERSATIONS_READ: "conversations.read";
|
|
68
|
+
readonly CONVERSATIONS_WRITE: "conversations.write";
|
|
69
|
+
readonly MESSAGES_READ: "messages.read";
|
|
70
|
+
readonly MESSAGES_SEND: "messages.send";
|
|
71
|
+
readonly TICKETS_READ: "tickets.read";
|
|
72
|
+
readonly TICKETS_WRITE: "tickets.write";
|
|
73
|
+
readonly TASKS_READ: "tasks.read";
|
|
74
|
+
readonly TASKS_WRITE: "tasks.write";
|
|
75
|
+
readonly CALENDAR_READ: "calendar.read";
|
|
76
|
+
readonly CALENDAR_WRITE: "calendar.write";
|
|
77
|
+
readonly FILES_READ: "files.read";
|
|
78
|
+
readonly FILES_WRITE: "files.write";
|
|
79
|
+
readonly CALLS_READ: "calls.read";
|
|
80
|
+
readonly CALLS_MAKE: "calls.make";
|
|
81
|
+
readonly WEBHOOKS_READ: "webhooks.read";
|
|
82
|
+
readonly WEBHOOKS_WRITE: "webhooks.write";
|
|
83
|
+
readonly USERS_READ: "users.read";
|
|
84
|
+
readonly FLOWS_READ: "flows.read";
|
|
85
|
+
readonly FLOWS_EXECUTE: "flows.execute";
|
|
86
|
+
readonly REPORTS_READ: "reports.read";
|
|
87
|
+
};
|
|
88
|
+
export interface ApiResourceRestrictions {
|
|
89
|
+
/**
|
|
90
|
+
* Restrict access to specific communication channels.
|
|
91
|
+
*/
|
|
92
|
+
channelIds?: string[];
|
|
93
|
+
/**
|
|
94
|
+
* Restrict access to specific teams/groups.
|
|
95
|
+
*/
|
|
96
|
+
teamIds?: string[];
|
|
97
|
+
/**
|
|
98
|
+
* Restrict access to specific users/agents.
|
|
99
|
+
*/
|
|
100
|
+
userIds?: string[];
|
|
12
101
|
}
|
|
@@ -1,2 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_SCOPES = void 0;
|
|
4
|
+
exports.API_SCOPES = {
|
|
5
|
+
CONTACTS_READ: "contacts.read",
|
|
6
|
+
CONTACTS_WRITE: "contacts.write",
|
|
7
|
+
COMPANIES_READ: "companies.read",
|
|
8
|
+
COMPANIES_WRITE: "companies.write",
|
|
9
|
+
CONVERSATIONS_READ: "conversations.read",
|
|
10
|
+
CONVERSATIONS_WRITE: "conversations.write",
|
|
11
|
+
MESSAGES_READ: "messages.read",
|
|
12
|
+
MESSAGES_SEND: "messages.send",
|
|
13
|
+
TICKETS_READ: "tickets.read",
|
|
14
|
+
TICKETS_WRITE: "tickets.write",
|
|
15
|
+
TASKS_READ: "tasks.read",
|
|
16
|
+
TASKS_WRITE: "tasks.write",
|
|
17
|
+
CALENDAR_READ: "calendar.read",
|
|
18
|
+
CALENDAR_WRITE: "calendar.write",
|
|
19
|
+
FILES_READ: "files.read",
|
|
20
|
+
FILES_WRITE: "files.write",
|
|
21
|
+
CALLS_READ: "calls.read",
|
|
22
|
+
CALLS_MAKE: "calls.make",
|
|
23
|
+
WEBHOOKS_READ: "webhooks.read",
|
|
24
|
+
WEBHOOKS_WRITE: "webhooks.write",
|
|
25
|
+
USERS_READ: "users.read",
|
|
26
|
+
FLOWS_READ: "flows.read",
|
|
27
|
+
FLOWS_EXECUTE: "flows.execute",
|
|
28
|
+
REPORTS_READ: "reports.read",
|
|
29
|
+
};
|
package/dist/src/Tickets/AI.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ITicketProperty, TicketPropertyValue } from "./Common";
|
|
1
|
+
import { ITicketAuditedEntity, ITicketProperty, TicketPropertyValue } from "./Common";
|
|
2
2
|
import { TicketMetricCode } from "./Dashboard";
|
|
3
3
|
import { TicketSecurityOperation } from "./Security";
|
|
4
4
|
/** Identifies the native AI experiences that Tickets can request from the central AI module. */
|
|
@@ -105,6 +105,7 @@ export declare enum TicketAIContextScope {
|
|
|
105
105
|
}
|
|
106
106
|
/** Configuration exposed by Tickets so UI and Flow know which AI experiences are available and permitted. */
|
|
107
107
|
export interface ITicketAICapabilityDefinition {
|
|
108
|
+
spaceId: string;
|
|
108
109
|
code: TicketAICapability;
|
|
109
110
|
name: string;
|
|
110
111
|
description: string;
|
|
@@ -117,9 +118,24 @@ export interface ITicketAICapabilityDefinition {
|
|
|
117
118
|
promptTemplateId?: string;
|
|
118
119
|
minimumConfidence?: number;
|
|
119
120
|
requireHumanApproval: boolean;
|
|
121
|
+
createdAt?: Date;
|
|
122
|
+
createdBy?: string;
|
|
123
|
+
updatedAt?: Date;
|
|
124
|
+
updatedBy?: string;
|
|
125
|
+
}
|
|
126
|
+
export interface IUpdateTicketAICapabilityDto {
|
|
127
|
+
enabled: boolean;
|
|
128
|
+
allowedRoleIds?: string[];
|
|
129
|
+
requiredOperations?: TicketSecurityOperation[];
|
|
130
|
+
contextScopes: TicketAIContextScope[];
|
|
131
|
+
providerId?: string;
|
|
132
|
+
modelId?: string;
|
|
133
|
+
promptTemplateId?: string;
|
|
134
|
+
minimumConfidence?: number;
|
|
135
|
+
requireHumanApproval: boolean;
|
|
120
136
|
}
|
|
121
137
|
/** Per-tenant policy enforced before any ticket context is sent to a model. */
|
|
122
|
-
export interface ITicketAIPolicy {
|
|
138
|
+
export interface ITicketAIPolicy extends ITicketAuditedEntity {
|
|
123
139
|
id: string;
|
|
124
140
|
spaceId: string;
|
|
125
141
|
name: string;
|
|
@@ -141,6 +157,38 @@ export interface ITicketAIPolicy {
|
|
|
141
157
|
updatedAt?: Date;
|
|
142
158
|
updatedBy?: string;
|
|
143
159
|
}
|
|
160
|
+
export interface ICreateTicketAIPolicyDto {
|
|
161
|
+
name: string;
|
|
162
|
+
enabled?: boolean;
|
|
163
|
+
allowedCapabilities: TicketAICapability[];
|
|
164
|
+
allowedContextScopes: TicketAIContextScope[];
|
|
165
|
+
excludedFieldNameKeys?: string[];
|
|
166
|
+
allowPii: boolean;
|
|
167
|
+
allowSensitivePii: boolean;
|
|
168
|
+
redactBeforeInference: boolean;
|
|
169
|
+
retainInputs: boolean;
|
|
170
|
+
retainOutputs: boolean;
|
|
171
|
+
retentionDays?: number;
|
|
172
|
+
maximumTokensPerRequest?: number;
|
|
173
|
+
maximumCostPerRequest?: number;
|
|
174
|
+
requireSourceCitations?: boolean;
|
|
175
|
+
}
|
|
176
|
+
export interface IUpdateTicketAIPolicyDto {
|
|
177
|
+
name?: string;
|
|
178
|
+
enabled?: boolean;
|
|
179
|
+
allowedCapabilities?: TicketAICapability[];
|
|
180
|
+
allowedContextScopes?: TicketAIContextScope[];
|
|
181
|
+
excludedFieldNameKeys?: string[];
|
|
182
|
+
allowPii?: boolean;
|
|
183
|
+
allowSensitivePii?: boolean;
|
|
184
|
+
redactBeforeInference?: boolean;
|
|
185
|
+
retainInputs?: boolean;
|
|
186
|
+
retainOutputs?: boolean;
|
|
187
|
+
retentionDays?: number;
|
|
188
|
+
maximumTokensPerRequest?: number;
|
|
189
|
+
maximumCostPerRequest?: number;
|
|
190
|
+
requireSourceCitations?: boolean;
|
|
191
|
+
}
|
|
144
192
|
/** Request issued by an agent-facing UI for summaries, replies, rewrites or recommendations. */
|
|
145
193
|
export interface ICreateTicketAIAssistanceDto {
|
|
146
194
|
ticketId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageVisibility } from "../Common/Messages/Message";
|
|
2
|
-
import { ITicketAttachment, ITicketProperty, TicketPriority, TicketPropertyValue } from "./Common";
|
|
2
|
+
import { ITicketAttachment, ITicketAuditedEntity, ITicketProperty, TicketPriority, TicketPropertyValue } from "./Common";
|
|
3
3
|
import { ITicketFilter, ITicketCursorRequest, ITicketCursorResponse } from "./Api";
|
|
4
4
|
import { ITicketTimelineEntry } from "./Conversation";
|
|
5
5
|
import { ISlaMetricCycle } from "./Sla";
|
|
@@ -97,6 +97,72 @@ export interface IDeleteTicketAttachmentDto {
|
|
|
97
97
|
reason?: string;
|
|
98
98
|
}
|
|
99
99
|
export type TicketAttachmentPage = ITicketCursorResponse<ITicketAttachment>;
|
|
100
|
+
export declare enum TicketAttachmentTypeMode {
|
|
101
|
+
RECOMMENDED = "RECOMMENDED",
|
|
102
|
+
ALL = "ALL",
|
|
103
|
+
CUSTOM = "CUSTOM"
|
|
104
|
+
}
|
|
105
|
+
export declare enum TicketAttachmentDownloadMode {
|
|
106
|
+
AUTHENTICATED = "AUTHENTICATED",
|
|
107
|
+
TEMPORARY_LINK = "TEMPORARY_LINK"
|
|
108
|
+
}
|
|
109
|
+
export declare enum TicketSuspiciousFileAction {
|
|
110
|
+
BLOCK = "BLOCK",
|
|
111
|
+
QUARANTINE = "QUARANTINE"
|
|
112
|
+
}
|
|
113
|
+
/** An allowed file type: the declared extension paired with the MIME type it must carry. */
|
|
114
|
+
export interface ITicketAttachmentFileType {
|
|
115
|
+
extension: string;
|
|
116
|
+
mimeType: string;
|
|
117
|
+
}
|
|
118
|
+
/** Editable half of the attachment policy: what the PUT replaces and the space persists. */
|
|
119
|
+
export interface ITicketAttachmentPolicyValues {
|
|
120
|
+
agentUploadEnabled: boolean;
|
|
121
|
+
customerUploadEnabled: boolean;
|
|
122
|
+
typeMode: TicketAttachmentTypeMode;
|
|
123
|
+
/** Only read in CUSTOM mode; the other modes resolve their list elsewhere. */
|
|
124
|
+
allowedTypes: ITicketAttachmentFileType[];
|
|
125
|
+
maxFileSizeBytes: number;
|
|
126
|
+
maxFilesPerTicket: number;
|
|
127
|
+
/** null means no per-ticket total cap; nullable rather than optional because "no cap" is a choice. */
|
|
128
|
+
maxTotalSizeBytes: number | null;
|
|
129
|
+
downloadMode: TicketAttachmentDownloadMode;
|
|
130
|
+
/** Only applies to TEMPORARY_LINK downloads. */
|
|
131
|
+
temporaryLinkExpirationHours: number;
|
|
132
|
+
}
|
|
133
|
+
/** Ceilings a space cannot exceed; imposed by the upload path, not by storage. */
|
|
134
|
+
export interface ITicketAttachmentPolicyLimits {
|
|
135
|
+
maxFileSizeBytes: number;
|
|
136
|
+
maxFilesPerTicket: number;
|
|
137
|
+
maxTotalSizeBytes: number;
|
|
138
|
+
temporaryLinkExpirationHours: number;
|
|
139
|
+
}
|
|
140
|
+
/** File security applied by the platform; reported by the read model, not configurable per space. */
|
|
141
|
+
export interface ITicketAttachmentSecurityInfo {
|
|
142
|
+
checksumEnabled: boolean;
|
|
143
|
+
malwareScanEnabled: boolean;
|
|
144
|
+
suspiciousFileAction: TicketSuspiciousFileAction;
|
|
145
|
+
}
|
|
146
|
+
/** Space-level attachment policy; read model returns effective values plus what the platform imposes. */
|
|
147
|
+
export interface ITicketAttachmentPolicy extends ITicketAttachmentPolicyValues {
|
|
148
|
+
spaceId: string;
|
|
149
|
+
/** Executables the system always rejects; shown to the administrator, never editable. */
|
|
150
|
+
blockedExtensions: string[];
|
|
151
|
+
limits: ITicketAttachmentPolicyLimits;
|
|
152
|
+
security: ITicketAttachmentSecurityInfo;
|
|
153
|
+
/** Factory values, and the list that resolves the RECOMMENDED mode. */
|
|
154
|
+
recommended: ITicketAttachmentPolicyValues;
|
|
155
|
+
/** 0 means the space never saved and runs on the recommended values. */
|
|
156
|
+
version: number;
|
|
157
|
+
createdAt?: Date;
|
|
158
|
+
createdBy?: string;
|
|
159
|
+
updatedAt?: Date;
|
|
160
|
+
updatedBy?: string;
|
|
161
|
+
}
|
|
162
|
+
/** Replaces the whole attachment policy; expectedVersion guards against concurrent edits. */
|
|
163
|
+
export interface IUpdateTicketAttachmentPolicyDto extends ITicketAttachmentPolicyValues {
|
|
164
|
+
expectedVersion: number;
|
|
165
|
+
}
|
|
100
166
|
export declare enum TicketRelationType {
|
|
101
167
|
PARENT = "PARENT",
|
|
102
168
|
CHILD = "CHILD",
|
|
@@ -166,6 +232,66 @@ export interface ISplitTicketResult {
|
|
|
166
232
|
createdTicketId: string;
|
|
167
233
|
relationId: string;
|
|
168
234
|
}
|
|
235
|
+
export declare enum TicketPeriodPreset {
|
|
236
|
+
LAST_24_HOURS = "LAST_24_HOURS",
|
|
237
|
+
LAST_7_DAYS = "LAST_7_DAYS",
|
|
238
|
+
LAST_30_DAYS = "LAST_30_DAYS"
|
|
239
|
+
}
|
|
240
|
+
export declare enum TicketMergeConfirmationLevel {
|
|
241
|
+
CONFIRM = "CONFIRM",
|
|
242
|
+
SUPERVISOR = "SUPERVISOR"
|
|
243
|
+
}
|
|
244
|
+
/** Ticket fields compared by duplicate detection, expressed with the fieldNameKey convention. */
|
|
245
|
+
export type TicketDuplicateMatchField = "title" | "description" | "contactId" | "categoryId";
|
|
246
|
+
/** Space-level configuration for ticket relations and duplicate detection; read model returns effective values. */
|
|
247
|
+
export interface ITicketRelationSettings {
|
|
248
|
+
spaceId: string;
|
|
249
|
+
relationsEnabled: boolean;
|
|
250
|
+
suggestDuplicates: boolean;
|
|
251
|
+
matchFields: string[];
|
|
252
|
+
searchPeriod: TicketPeriodPreset;
|
|
253
|
+
excludedStatusIds: string[];
|
|
254
|
+
minimumScore: number;
|
|
255
|
+
copyMessages: boolean;
|
|
256
|
+
copyAttachments: boolean;
|
|
257
|
+
closeSourceTickets: boolean;
|
|
258
|
+
mergeConfirmation: TicketMergeConfirmationLevel;
|
|
259
|
+
warningMessage?: string;
|
|
260
|
+
version: number;
|
|
261
|
+
createdAt?: Date;
|
|
262
|
+
createdBy?: string;
|
|
263
|
+
updatedAt?: Date;
|
|
264
|
+
updatedBy?: string;
|
|
265
|
+
}
|
|
266
|
+
/** Replaces the whole relation settings record; omitted optional values are cleared. */
|
|
267
|
+
export interface IUpdateTicketRelationSettingsDto {
|
|
268
|
+
expectedVersion: number;
|
|
269
|
+
relationsEnabled: boolean;
|
|
270
|
+
suggestDuplicates: boolean;
|
|
271
|
+
matchFields: TicketDuplicateMatchField[];
|
|
272
|
+
searchPeriod: TicketPeriodPreset;
|
|
273
|
+
excludedStatusIds: string[];
|
|
274
|
+
minimumScore: number;
|
|
275
|
+
copyMessages: boolean;
|
|
276
|
+
copyAttachments: boolean;
|
|
277
|
+
closeSourceTickets: boolean;
|
|
278
|
+
mergeConfirmation: TicketMergeConfirmationLevel;
|
|
279
|
+
warningMessage?: string;
|
|
280
|
+
}
|
|
281
|
+
/** Updates only the provided relation settings; omitted fields keep their stored value. */
|
|
282
|
+
export interface IPatchTicketRelationSettingsDto {
|
|
283
|
+
relationsEnabled?: boolean;
|
|
284
|
+
suggestDuplicates?: boolean;
|
|
285
|
+
matchFields?: TicketDuplicateMatchField[];
|
|
286
|
+
searchPeriod?: TicketPeriodPreset;
|
|
287
|
+
excludedStatusIds?: string[];
|
|
288
|
+
minimumScore?: number;
|
|
289
|
+
copyMessages?: boolean;
|
|
290
|
+
copyAttachments?: boolean;
|
|
291
|
+
closeSourceTickets?: boolean;
|
|
292
|
+
mergeConfirmation?: TicketMergeConfirmationLevel;
|
|
293
|
+
warningMessage?: string | null;
|
|
294
|
+
}
|
|
169
295
|
export declare enum TicketFollowerRole {
|
|
170
296
|
FOLLOWER = "FOLLOWER",
|
|
171
297
|
COLLABORATOR = "COLLABORATOR",
|
|
@@ -247,7 +373,7 @@ export type ITicketMacroAction = {
|
|
|
247
373
|
type: TicketMacroActionType.ENQUEUE;
|
|
248
374
|
queueId: string;
|
|
249
375
|
};
|
|
250
|
-
export interface ITicketMacro {
|
|
376
|
+
export interface ITicketMacro extends ITicketAuditedEntity {
|
|
251
377
|
id: string;
|
|
252
378
|
spaceId: string;
|
|
253
379
|
name: string;
|
|
@@ -269,6 +395,20 @@ export interface IApplyTicketMacroDto {
|
|
|
269
395
|
};
|
|
270
396
|
idempotencyKey: string;
|
|
271
397
|
}
|
|
398
|
+
export interface ICreateTicketMacroDto {
|
|
399
|
+
name: string;
|
|
400
|
+
description?: string;
|
|
401
|
+
actions: ITicketMacroAction[];
|
|
402
|
+
allowedRoleIds?: string[];
|
|
403
|
+
enabled?: boolean;
|
|
404
|
+
}
|
|
405
|
+
export interface IUpdateTicketMacroDto {
|
|
406
|
+
name?: string;
|
|
407
|
+
description?: string;
|
|
408
|
+
actions?: ITicketMacroAction[];
|
|
409
|
+
allowedRoleIds?: string[];
|
|
410
|
+
enabled?: boolean;
|
|
411
|
+
}
|
|
272
412
|
export declare enum TicketBulkOperationType {
|
|
273
413
|
UPDATE = "UPDATE",
|
|
274
414
|
ASSIGN = "ASSIGN",
|