@trii/types 2.10.748 → 2.10.750
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/Common/Channels/Email.d.ts +0 -25
- package/dist/Common/Channels/Email.js +1 -14
- package/dist/Common/index.js +17 -7
- package/dist/Contacts/CommunicationEndpoint.d.ts +8 -8
- package/dist/Conversations/Classifications/ConversationClassificationEvents.d.ts +2 -2
- package/dist/Conversations/Conversation.d.ts +8 -8
- package/dist/Conversations/DashBoard/dashboardForms.d.ts +44 -0
- package/dist/Conversations/DashBoard/dashboardForms.js +24 -0
- package/dist/Conversations/InboxCounters.d.ts +18 -0
- package/dist/Conversations/InboxMongo.d.ts +12 -12
- package/dist/Conversations/Routing.d.ts +10 -10
- package/dist/Conversations/index.js +17 -7
- package/dist/Events/DomainEventTypes.d.ts +23 -23
- package/dist/Tickets/Conversation.d.ts +87 -1
- package/dist/Tickets/Conversation.js +14 -1
- package/dist/Tickets/Ticket.d.ts +14 -0
- package/dist/index.js +17 -7
- package/dist/src/Common/Channels/Channel.d.ts +1 -28
- package/dist/src/Contacts/contacts.d.ts +2 -2
- package/dist/src/Conversations/Conversation.d.ts +48 -331
- package/dist/src/Conversations/Conversation.js +34 -14
- package/dist/src/Conversations/DashBoard/dashboard.d.ts +2 -2
- package/dist/src/Conversations/DashBoard/dashboardForms.d.ts +44 -0
- package/dist/src/Conversations/DashBoard/dashboardForms.js +24 -0
- package/dist/src/Conversations/Flows/Workflows/Workflow.d.ts +123 -280
- package/dist/src/Conversations/Flows/Workflows/Workflow.js +35 -85
- package/dist/src/Conversations/Groups/Group.d.ts +8 -2
- package/dist/src/Conversations/Groups/Group.js +6 -0
- package/dist/src/Conversations/Label.d.ts +1 -1
- package/dist/src/Conversations/WebHook.d.ts +1 -1
- package/dist/src/Conversations/index.d.ts +1 -9
- package/dist/src/Conversations/index.js +1 -9
- package/dist/src/Tickets/Category.d.ts +0 -18
- package/dist/src/Tickets/Dashboard.d.ts +0 -78
- package/dist/src/Tickets/Dashboard.js +1 -13
- package/dist/src/Tickets/Fields.d.ts +0 -1
- package/dist/src/Tickets/Layouts.d.ts +1 -3
- package/dist/src/Tickets/Workflow.d.ts +0 -20
- package/dist/src/Users/UserTrii.d.ts +0 -10
- package/dist/src/Users/UserTrii.js +1 -8
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.js +1 -4
- package/package.json +2 -5
- package/dist/src/Automations/Capabilities/Capability.d.ts +0 -81
- package/dist/src/Automations/Capabilities/Capability.js +0 -23
- package/dist/src/Automations/Capabilities/index.d.ts +0 -1
- package/dist/src/Automations/Capabilities/index.js +0 -17
- package/dist/src/Automations/Common.d.ts +0 -94
- package/dist/src/Automations/Common.js +0 -40
- package/dist/src/Automations/Events/Event.d.ts +0 -69
- package/dist/src/Automations/Events/Event.js +0 -14
- package/dist/src/Automations/Events/index.d.ts +0 -1
- package/dist/src/Automations/Events/index.js +0 -17
- package/dist/src/Automations/Executions/Execution.d.ts +0 -254
- package/dist/src/Automations/Executions/Execution.js +0 -62
- package/dist/src/Automations/Executions/Testing.d.ts +0 -166
- package/dist/src/Automations/Executions/Testing.js +0 -54
- package/dist/src/Automations/Executions/index.d.ts +0 -2
- package/dist/src/Automations/Executions/index.js +0 -18
- package/dist/src/Automations/Flows/Canvas.d.ts +0 -103
- package/dist/src/Automations/Flows/Canvas.js +0 -38
- package/dist/src/Automations/Flows/Flow.d.ts +0 -147
- package/dist/src/Automations/Flows/Flow.js +0 -58
- package/dist/src/Automations/Flows/Requests.d.ts +0 -71
- package/dist/src/Automations/Flows/Validation.d.ts +0 -28
- package/dist/src/Automations/Flows/Validation.js +0 -9
- package/dist/src/Automations/Flows/index.d.ts +0 -4
- package/dist/src/Automations/Flows/index.js +0 -20
- package/dist/src/Automations/Nodes/Node.d.ts +0 -113
- package/dist/src/Automations/Nodes/Node.js +0 -27
- package/dist/src/Automations/Nodes/index.d.ts +0 -1
- package/dist/src/Automations/Nodes/index.js +0 -17
- package/dist/src/Automations/index.d.ts +0 -6
- package/dist/src/Automations/index.js +0 -22
- package/dist/src/Chats/Chat.d.ts +0 -61
- package/dist/src/Chats/Chat.js +0 -28
- package/dist/src/Conversations/Assignment.d.ts +0 -81
- package/dist/src/Conversations/Assignment.js +0 -4
- package/dist/src/Conversations/InboxMongo.d.ts +0 -154
- package/dist/src/Conversations/InboxMongo.js +0 -128
- package/dist/src/Conversations/InboxProjection.d.ts +0 -162
- package/dist/src/Conversations/InboxProjection.js +0 -2
- package/dist/src/Conversations/Outbox.d.ts +0 -24
- package/dist/src/Conversations/Outbox.js +0 -4
- package/dist/src/Conversations/Queue.d.ts +0 -107
- package/dist/src/Conversations/Queue.js +0 -4
- package/dist/src/Conversations/Routing.d.ts +0 -164
- package/dist/src/Conversations/Routing.js +0 -2
- package/dist/src/Conversations/Sla.d.ts +0 -227
- package/dist/src/Conversations/Sla.js +0 -6
- package/dist/src/Conversations/Transfer.d.ts +0 -73
- package/dist/src/Conversations/Transfer.js +0 -2
- package/dist/src/Forms/API.d.ts +0 -53
- package/dist/src/Forms/API.js +0 -2
- package/dist/src/Forms/SubmittedForm.d.ts +0 -56
- package/dist/src/Forms/SubmittedForm.js +0 -9
- package/dist/src/Forms/index.d.ts +0 -2
- package/dist/src/Forms/index.js +0 -18
- package/dist/src/Presence/AgentPause.d.ts +0 -24
- package/dist/src/Presence/AgentPause.js +0 -19
- package/dist/src/Presence/QueueParticipation.d.ts +0 -17
- package/dist/src/Presence/QueueParticipation.js +0 -2
- package/dist/src/Presence/QueueRoutingState.d.ts +0 -27
- package/dist/src/Presence/QueueRoutingState.js +0 -9
- package/dist/src/Presence/index.d.ts +0 -3
- package/dist/src/Presence/index.js +0 -19
- /package/dist/{src/Automations/Flows/Requests.js → Conversations/InboxCounters.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TicketTimelineEntryType = exports.TicketMessageEventType = exports.TicketMessageActorType = exports.TicketConversationRole = void 0;
|
|
3
|
+
exports.TicketTimelineEntryType = exports.TicketMessageSnapshotSource = exports.TicketMessageEventType = exports.TicketMessageActorType = exports.TicketConversationRole = void 0;
|
|
4
4
|
var TicketConversationRole;
|
|
5
5
|
(function (TicketConversationRole) {
|
|
6
6
|
TicketConversationRole["PRIMARY"] = "PRIMARY";
|
|
@@ -23,6 +23,19 @@ var TicketMessageEventType;
|
|
|
23
23
|
TicketMessageEventType["DELETED"] = "DELETED";
|
|
24
24
|
TicketMessageEventType["DELIVERY_STATUS_CHANGED"] = "DELIVERY_STATUS_CHANGED";
|
|
25
25
|
})(TicketMessageEventType || (exports.TicketMessageEventType = TicketMessageEventType = {}));
|
|
26
|
+
/**
|
|
27
|
+
* Where a cited message's frozen content came from.
|
|
28
|
+
*
|
|
29
|
+
* There is deliberately no CLIENT value: the content is always resolved
|
|
30
|
+
* server-to-server, never supplied by whoever creates the ticket.
|
|
31
|
+
*/
|
|
32
|
+
var TicketMessageSnapshotSource;
|
|
33
|
+
(function (TicketMessageSnapshotSource) {
|
|
34
|
+
/** Row written before server-side resolution existed; `snapshot` is null. */
|
|
35
|
+
TicketMessageSnapshotSource["PENDING"] = "PENDING";
|
|
36
|
+
/** Resolved by the backend against the messages service. */
|
|
37
|
+
TicketMessageSnapshotSource["SERVICE"] = "SERVICE";
|
|
38
|
+
})(TicketMessageSnapshotSource || (exports.TicketMessageSnapshotSource = TicketMessageSnapshotSource = {}));
|
|
26
39
|
var TicketTimelineEntryType;
|
|
27
40
|
(function (TicketTimelineEntryType) {
|
|
28
41
|
TicketTimelineEntryType["ACTIVITY"] = "ACTIVITY";
|
package/dist/Tickets/Ticket.d.ts
CHANGED
|
@@ -88,6 +88,20 @@ export interface ICreateTicketDto {
|
|
|
88
88
|
channelId?: string;
|
|
89
89
|
primaryConversationId?: string;
|
|
90
90
|
sourceMessageId?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Ids of the chat messages the agent cited as the reason for opening the ticket.
|
|
93
|
+
* Ids only: the backend resolves each message's content itself from the messages
|
|
94
|
+
* service and freezes it as an `ITicketMessageSnapshot`. Clients never supply
|
|
95
|
+
* message content.
|
|
96
|
+
*
|
|
97
|
+
* Requires `primaryConversationId`, which is the conversation every cited message
|
|
98
|
+
* must belong to; the backend rejects the whole create otherwise.
|
|
99
|
+
*
|
|
100
|
+
* Distinct from `sourceMessageId`, which names the single message that TRIGGERED
|
|
101
|
+
* the ticket. These are the several messages cited as evidence, and the two can
|
|
102
|
+
* be used together.
|
|
103
|
+
*/
|
|
104
|
+
messageReferences?: string[];
|
|
91
105
|
}
|
|
92
106
|
export interface IUpdateTicketDto {
|
|
93
107
|
expectedVersion: number;
|
package/dist/index.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.Automations = exports.Forms = exports.APIResponses = exports.Shop = exports.AI = exports.APIKeys = exports.Events = exports.EventsQueue = exports.ApiResponses = exports.Presence = exports.Users = exports.Collections = exports.Sales = exports.Tickets = exports.Spaces = exports.Reports = exports.Security = exports.Calls = exports.Conversations = exports.Calendar = exports.Contacts = exports.Common = exports.AuditLogs = exports.Accounts = void 0;
|
|
27
37
|
exports.Accounts = __importStar(require("./Accounts/index"));
|
|
@@ -37,16 +37,6 @@ interface IChannelInfo {
|
|
|
37
37
|
*/
|
|
38
38
|
status?: string;
|
|
39
39
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Fallback routing used only when no published Flow entry point matches the
|
|
42
|
-
* channel, or when the selected Flow cannot produce a valid disposition.
|
|
43
|
-
*
|
|
44
|
-
* Flow-to-channel bindings remain authoritative in FlowEntryPoint.
|
|
45
|
-
*/
|
|
46
|
-
interface ChannelConversationRoutingConfig {
|
|
47
|
-
/** Stable id of a ConversationQueue in the same space as the channel. */
|
|
48
|
-
defaultQueueId: string;
|
|
49
|
-
}
|
|
50
40
|
interface IChannel {
|
|
51
41
|
id?: string | null;
|
|
52
42
|
spaceId?: string | null;
|
|
@@ -54,30 +44,13 @@ interface IChannel {
|
|
|
54
44
|
description?: string | null;
|
|
55
45
|
type?: ChannelType | null;
|
|
56
46
|
permissions?: Permission[] | null;
|
|
57
|
-
/**
|
|
58
|
-
* @deprecated Legacy channel assignment configuration. Use
|
|
59
|
-
* ChannelConversationRoutingConfig; Flow bindings live in FlowEntryPoint.
|
|
60
|
-
*/
|
|
61
47
|
assignTo?: ConversationAssigned;
|
|
62
|
-
/**
|
|
63
|
-
* @deprecated Legacy channel assignment configuration. Use
|
|
64
|
-
* ChannelConversationRoutingConfig; QueueRoutingPolicy controls agent
|
|
65
|
-
* distribution only after a Queue has been selected.
|
|
66
|
-
*/
|
|
67
48
|
assignMethod: AssignMethod;
|
|
68
|
-
/**
|
|
69
|
-
* @deprecated Ownership is produced by the routing decision.
|
|
70
|
-
*/
|
|
71
49
|
assignToOwner?: boolean;
|
|
72
50
|
/**
|
|
73
51
|
* habilita la creacion de conversaciones para este canal, si esta en false, los mensajes entrantes no generaran conversaciones
|
|
74
52
|
*/
|
|
75
53
|
conversationsEnabled: boolean | false;
|
|
76
|
-
/**
|
|
77
|
-
* Default Queue for newly-created conversations that are not handled by a
|
|
78
|
-
* Flow. Store only the Queue id;
|
|
79
|
-
*/
|
|
80
|
-
conversationRouting?: ChannelConversationRoutingConfig | null;
|
|
81
54
|
/**
|
|
82
55
|
* Gets or sets a value indicating whether webhook notifications are enabled.
|
|
83
56
|
* Redirects incoming messages to the specified webhook URL when set to true.
|
|
@@ -123,4 +96,4 @@ declare enum channelStatus {
|
|
|
123
96
|
SUSPENDED = 7,
|
|
124
97
|
CONFIGURATION_PENDING = 9
|
|
125
98
|
}
|
|
126
|
-
export { IChannel, IChannelInfo,
|
|
99
|
+
export { IChannel, IChannelInfo, channelStatus, MessagingAvailability };
|
|
@@ -14,7 +14,7 @@ export interface IBusiness {
|
|
|
14
14
|
counters?: ICounters;
|
|
15
15
|
name: string;
|
|
16
16
|
imageUrl: string;
|
|
17
|
-
|
|
17
|
+
owner?: string;
|
|
18
18
|
membersId: string[];
|
|
19
19
|
members: IContactInfo[];
|
|
20
20
|
phones: IContactAddress[];
|
|
@@ -54,7 +54,7 @@ export interface IContact {
|
|
|
54
54
|
lastName: string;
|
|
55
55
|
imageUrl: string;
|
|
56
56
|
birthDate?: Date | null;
|
|
57
|
-
|
|
57
|
+
owner?: string;
|
|
58
58
|
businessId?: string;
|
|
59
59
|
businessName?: string;
|
|
60
60
|
phones: IContactAddress[];
|
|
@@ -4,16 +4,16 @@ import { GroupInfo } from "./Groups/Group";
|
|
|
4
4
|
import { Channels } from "../Common/index";
|
|
5
5
|
import { IContactAddress, IContactInfo } from "../Contacts/contacts";
|
|
6
6
|
import { IEnding } from "./Ending";
|
|
7
|
-
import { ChatType } from "../Chats/Chat";
|
|
8
7
|
export interface IConversation {
|
|
9
8
|
id: string;
|
|
9
|
+
/**only for Front-End */
|
|
10
|
+
idLocal?: number;
|
|
10
11
|
spaceId: string;
|
|
11
|
-
version: number;
|
|
12
|
-
/** @deprecated Use assignment.owner. */
|
|
13
12
|
type: ChatType;
|
|
14
|
-
|
|
13
|
+
ownerId: string;
|
|
15
14
|
chatName: string;
|
|
16
15
|
chatImage: string;
|
|
16
|
+
chatMembers: IChatMemeber[];
|
|
17
17
|
chatMembersCount: number;
|
|
18
18
|
whatsappGroupInfo?: IWhatsAppGroupInfo;
|
|
19
19
|
contactInfo?: IContactInfo;
|
|
@@ -21,55 +21,48 @@ export interface IConversation {
|
|
|
21
21
|
remoteAddress: string;
|
|
22
22
|
remoteAddressId: string;
|
|
23
23
|
channelInfo: Channels.IChannelInfo;
|
|
24
|
-
status: ConversationStatus;
|
|
25
|
-
priority: 'low' | 'normal' | 'high' | 'urgent';
|
|
26
|
-
assignment: ConversationAssignmentSnapshot;
|
|
27
|
-
/** @deprecated Use owner and assignment.*/
|
|
28
|
-
assignedTo?: ConversationAssigned;
|
|
29
|
-
sla: {
|
|
30
|
-
status: 'none' | 'running' | 'warning' | 'breached' | 'met';
|
|
31
|
-
deadlineAt?: Date;
|
|
32
|
-
policyId?: string;
|
|
33
|
-
version: number;
|
|
34
|
-
};
|
|
35
24
|
lastMessage: string;
|
|
36
25
|
lastMessageId?: string;
|
|
37
26
|
newMessagesCount: number;
|
|
38
27
|
newMessagesUnread: boolean;
|
|
39
|
-
lastActivityAt: Date;
|
|
40
|
-
lastCustomerActivityAt?: Date;
|
|
41
|
-
lastAgentActivityAt?: Date;
|
|
42
28
|
labels: ILabel[];
|
|
43
29
|
pinned: boolean;
|
|
44
|
-
/** @deprecated A transfer is represented by an event and the resulting current state. */
|
|
45
30
|
transferBy?: string;
|
|
46
|
-
/** @deprecated A transfer is represented by an event and the resulting current state. */
|
|
47
31
|
transferTo?: ConversationAssigned;
|
|
48
32
|
expired: boolean;
|
|
49
|
-
/** @deprecated Expiration does not own a separate assignment snapshot.*/
|
|
50
33
|
expiredAssignedTo: ConversationAssigned;
|
|
34
|
+
status: ConversationSatus;
|
|
35
|
+
assignedTo?: ConversationAssigned;
|
|
51
36
|
participants: UserInfo[];
|
|
52
37
|
archived: boolean;
|
|
53
|
-
spam: boolean;
|
|
54
38
|
externalMessagingWindowEndAt?: Date;
|
|
55
39
|
workflowId?: string;
|
|
56
40
|
botStatus: ConversationBotStatus;
|
|
57
41
|
botVars: ConversationBotVar[];
|
|
58
42
|
metadata: IConversationMetadata;
|
|
59
43
|
/** Domain objects discussed or served by this conversation. */
|
|
44
|
+
contextReferences?: IConversationContextReference[];
|
|
45
|
+
finalizedAt: Date;
|
|
46
|
+
finalizedBy?: string;
|
|
60
47
|
finalizedOnWebChat: Date;
|
|
61
48
|
ending?: IEnding;
|
|
62
49
|
qualityEvaluation?: IInteractionQualityEvaluation;
|
|
63
50
|
reOpenAt?: Date;
|
|
64
|
-
reOpenByUserId?: string;
|
|
65
|
-
reOpenPolicyId?: string;
|
|
66
51
|
createdAt: Date;
|
|
67
52
|
updatedAt: Date;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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;
|
|
73
66
|
}
|
|
74
67
|
export interface IWhatsAppGroupInfo {
|
|
75
68
|
whatsappGroupId: string;
|
|
@@ -129,14 +122,29 @@ export declare enum ConversationBotStatus {
|
|
|
129
122
|
FINALIZED = 4,
|
|
130
123
|
CANCELED = 5
|
|
131
124
|
}
|
|
132
|
-
export
|
|
125
|
+
export declare class ConversationBotVar {
|
|
133
126
|
title: string;
|
|
134
127
|
value: string;
|
|
135
128
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
129
|
+
export declare enum ChatType {
|
|
130
|
+
/**Conversation with a external channel/contact */
|
|
131
|
+
EXTERNAL = 0,
|
|
132
|
+
/**messages between two users */
|
|
133
|
+
DIRECT = 1,
|
|
134
|
+
/**messages between multiple users */
|
|
135
|
+
GROUP = 2,
|
|
136
|
+
/**Messages to discuss a conversation */
|
|
137
|
+
DISCUSS_CONVERSATION = 11,
|
|
138
|
+
/**Messages to discuss a ticket */
|
|
139
|
+
DISCUSS_TICKET = 12
|
|
140
|
+
}
|
|
141
|
+
export interface IChatMemeber {
|
|
142
|
+
joinTimeStamp: Date;
|
|
143
|
+
isAdmin: boolean;
|
|
144
|
+
userId: string;
|
|
145
|
+
user: UserInfo;
|
|
146
|
+
}
|
|
147
|
+
export declare class ConversationAssigned {
|
|
140
148
|
groupInfo?: GroupInfo;
|
|
141
149
|
userInfo?: UserInfo;
|
|
142
150
|
userIds?: string[];
|
|
@@ -145,306 +153,15 @@ export declare enum ConversationDirection {
|
|
|
145
153
|
INBOUND = 1,
|
|
146
154
|
OUTBOUND = 2
|
|
147
155
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
156
|
+
export declare enum ConversationSatus {
|
|
157
|
+
NEW = 1,
|
|
158
|
+
ACTIVE = 2,
|
|
159
|
+
FINALIZED = 3,
|
|
160
|
+
ARCHIVED = 4
|
|
161
|
+
}
|
|
151
162
|
export declare enum AssignMethod {
|
|
152
163
|
ALL = 0,
|
|
153
164
|
ROUND_ROBIN = 1,
|
|
154
165
|
RANDOM = 2,
|
|
155
166
|
LEAST_BUSY = 3
|
|
156
167
|
}
|
|
157
|
-
export declare enum ConversationStatus {
|
|
158
|
-
NEW = 1,
|
|
159
|
-
OPEN = 2,
|
|
160
|
-
ACTIVE = 2,// Alias for OPEN
|
|
161
|
-
RESOLVED = 3,
|
|
162
|
-
FINALIZED = 3,// Alias for RESOLVED
|
|
163
|
-
WAITING = 10
|
|
164
|
-
}
|
|
165
|
-
export type InboxViewId = 'pending' | 'following' | 'sla_warning' | 'sla_breached' | 'team_sla_breached' | 'resolved';
|
|
166
|
-
export type OwnerType = 'user' | 'bot' | 'flow' | 'none';
|
|
167
|
-
export interface NoConversationOwner {
|
|
168
|
-
type: 'none';
|
|
169
|
-
id?: never;
|
|
170
|
-
displayName?: never;
|
|
171
|
-
avatarUrl?: never;
|
|
172
|
-
}
|
|
173
|
-
export interface UserConversationOwner {
|
|
174
|
-
type: 'user';
|
|
175
|
-
id: ID;
|
|
176
|
-
displayName?: string;
|
|
177
|
-
avatarUrl?: string;
|
|
178
|
-
}
|
|
179
|
-
export interface BotConversationOwner {
|
|
180
|
-
type: 'bot';
|
|
181
|
-
id: ID;
|
|
182
|
-
displayName?: string;
|
|
183
|
-
avatarUrl?: string;
|
|
184
|
-
}
|
|
185
|
-
export interface FlowConversationOwner {
|
|
186
|
-
type: 'flow';
|
|
187
|
-
id: ID;
|
|
188
|
-
displayName?: string;
|
|
189
|
-
avatarUrl?: string;
|
|
190
|
-
}
|
|
191
|
-
export type ConversationOwner = NoConversationOwner | UserConversationOwner | BotConversationOwner | FlowConversationOwner;
|
|
192
|
-
export type ConversationAssignmentStatus = 'unrouted' | 'queued' | 'routing' | 'offered' | 'assigned' | 'accepted';
|
|
193
|
-
export type ConversationAssignmentSource = 'routing' | 'manual' | 'transfer' | 'requeue';
|
|
194
|
-
interface QueuedConversationAssignmentBase {
|
|
195
|
-
assignmentId: ID;
|
|
196
|
-
queueId: ID;
|
|
197
|
-
source: ConversationAssignmentSource;
|
|
198
|
-
queuedAt: Date;
|
|
199
|
-
lastRoutingDecisionId?: ID;
|
|
200
|
-
}
|
|
201
|
-
export type ConversationAssignmentSnapshot = {
|
|
202
|
-
status: 'unrouted';
|
|
203
|
-
assignmentId?: never;
|
|
204
|
-
queueId?: never;
|
|
205
|
-
owner: NoConversationOwner | BotConversationOwner | FlowConversationOwner;
|
|
206
|
-
source?: never;
|
|
207
|
-
queuedAt?: never;
|
|
208
|
-
lastRoutingDecisionId?: never;
|
|
209
|
-
offeredAt?: never;
|
|
210
|
-
offerExpiresAt?: never;
|
|
211
|
-
assignedAt?: never;
|
|
212
|
-
acceptedAt?: never;
|
|
213
|
-
} | (QueuedConversationAssignmentBase & {
|
|
214
|
-
status: 'queued' | 'routing';
|
|
215
|
-
owner: NoConversationOwner;
|
|
216
|
-
offeredAt?: never;
|
|
217
|
-
offerExpiresAt?: never;
|
|
218
|
-
assignedAt?: never;
|
|
219
|
-
acceptedAt?: never;
|
|
220
|
-
}) | (QueuedConversationAssignmentBase & {
|
|
221
|
-
status: 'offered';
|
|
222
|
-
owner: UserConversationOwner;
|
|
223
|
-
offeredAt: Date;
|
|
224
|
-
offerExpiresAt?: Date;
|
|
225
|
-
assignedAt?: never;
|
|
226
|
-
acceptedAt?: never;
|
|
227
|
-
}) | (QueuedConversationAssignmentBase & {
|
|
228
|
-
status: 'assigned';
|
|
229
|
-
owner: UserConversationOwner;
|
|
230
|
-
offeredAt?: Date;
|
|
231
|
-
offerExpiresAt?: Date;
|
|
232
|
-
assignedAt: Date;
|
|
233
|
-
acceptedAt?: never;
|
|
234
|
-
}) | (QueuedConversationAssignmentBase & {
|
|
235
|
-
status: 'accepted';
|
|
236
|
-
owner: UserConversationOwner;
|
|
237
|
-
offeredAt?: Date;
|
|
238
|
-
offerExpiresAt?: Date;
|
|
239
|
-
assignedAt: Date;
|
|
240
|
-
acceptedAt: Date;
|
|
241
|
-
});
|
|
242
|
-
export type ActorType = 'user' | 'contact' | 'bot' | 'flow' | 'system';
|
|
243
|
-
export type ParticipantRole = 'owner' | 'collaborator' | 'follower' | 'mentioned' | 'supervisor' | 'bot' | 'flow' | 'historical';
|
|
244
|
-
export type ConversationEventType = 'conversation_created' | 'queued' | 'assigned' | 'accepted' | 'transferred' | 'consult_requested' | 'collaborator_added' | 'participant_added' | 'participant_removed' | 'participation_abandoned' | 'follow_started' | 'follow_stopped' | 'message_sent' | 'message_received' | 'internal_note_added' | 'bot_started' | 'bot_finished' | 'flow_started' | 'flow_finished' | 'status_changed' | 'resolved' | 'reopened' | 'sla_warning' | 'sla_breached' | 'sla_started' | 'sla_paused' | 'sla_resumed' | 'sla_met' | 'sla_overridden';
|
|
245
|
-
export type ID = string;
|
|
246
|
-
export type ConversationSubscriptionSource = 'manual' | 'assigned' | 'participated' | 'mentioned' | 'supervisor' | 'rule';
|
|
247
|
-
export type ConversationSubscriptionNotificationEvent = 'customer_message' | 'internal_mention' | 'assignment_change' | 'acceptance' | 'resolution' | 'reopen';
|
|
248
|
-
export type ConversationSubscriptionNotifications = {
|
|
249
|
-
mode: 'all' | 'muted';
|
|
250
|
-
events?: never;
|
|
251
|
-
} | {
|
|
252
|
-
mode: 'custom';
|
|
253
|
-
events: [
|
|
254
|
-
ConversationSubscriptionNotificationEvent,
|
|
255
|
-
...ConversationSubscriptionNotificationEvent[]
|
|
256
|
-
];
|
|
257
|
-
};
|
|
258
|
-
interface ConversationSubscriptionBase {
|
|
259
|
-
id: ID;
|
|
260
|
-
spaceId: string;
|
|
261
|
-
conversationId: ID;
|
|
262
|
-
userId: ID;
|
|
263
|
-
source: ConversationSubscriptionSource;
|
|
264
|
-
notifications: ConversationSubscriptionNotifications;
|
|
265
|
-
createdAt: Date;
|
|
266
|
-
updatedAt: Date;
|
|
267
|
-
version: number;
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Current following state for one user/conversation pair.
|
|
271
|
-
*
|
|
272
|
-
* A subscription is persistent product intent. Assignment or participation
|
|
273
|
-
* visibility must not create it unless an explicit auto-follow policy applies.
|
|
274
|
-
*/
|
|
275
|
-
export type ConversationSubscription = (ConversationSubscriptionBase & {
|
|
276
|
-
status: 'following';
|
|
277
|
-
followedAt: Date;
|
|
278
|
-
unfollowedAt?: never;
|
|
279
|
-
}) | (ConversationSubscriptionBase & {
|
|
280
|
-
status: 'unfollowed';
|
|
281
|
-
followedAt: Date;
|
|
282
|
-
unfollowedAt: Date;
|
|
283
|
-
});
|
|
284
|
-
export type InboxVisibilityReason = 'manual_follow' | 'assigned_to_user' | 'shared_queue_member' | 'queue_claimable' | 'active_participant' | 'sla_warning_owner' | 'sla_breached_owner' | 'supervised_queue_sla' | 'supervisor_escalation' | 'resolved_visible';
|
|
285
|
-
export interface ConversationInboxSnapshot {
|
|
286
|
-
interactionKind: 'private' | 'wall_post' | 'comment' | 'mention';
|
|
287
|
-
channelType: string;
|
|
288
|
-
contact: {
|
|
289
|
-
id?: ID;
|
|
290
|
-
displayName: string;
|
|
291
|
-
initials?: string;
|
|
292
|
-
};
|
|
293
|
-
status: ConversationStatus;
|
|
294
|
-
owner: ConversationOwner;
|
|
295
|
-
queueId?: ID;
|
|
296
|
-
preview?: string;
|
|
297
|
-
unreadCount: number;
|
|
298
|
-
priority: 'low' | 'normal' | 'high' | 'urgent';
|
|
299
|
-
sla: {
|
|
300
|
-
status: 'none' | 'running' | 'warning' | 'breached' | 'met';
|
|
301
|
-
deadlineAt?: Date;
|
|
302
|
-
};
|
|
303
|
-
lastActivityAt: Date;
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* Membership of one materialized conversation in one logical inbox view.
|
|
307
|
-
*
|
|
308
|
-
* visibilityReasons has set semantics: values must be unique and non-empty.
|
|
309
|
-
* Removing one reason preserves the view while at least one reason remains.
|
|
310
|
-
*/
|
|
311
|
-
export interface UserInboxItemView {
|
|
312
|
-
viewId: InboxViewId;
|
|
313
|
-
visibilityReasons: [
|
|
314
|
-
InboxVisibilityReason,
|
|
315
|
-
...InboxVisibilityReason[]
|
|
316
|
-
];
|
|
317
|
-
requiresAction: boolean;
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Materialized read model. There is exactly one document for each
|
|
321
|
-
* spaceId + userId + conversationId tuple.
|
|
322
|
-
*
|
|
323
|
-
* views must contain unique viewId values. Delete the document when the last
|
|
324
|
-
* view is removed.
|
|
325
|
-
*/
|
|
326
|
-
export interface UserInboxItemDocument {
|
|
327
|
-
id: ID;
|
|
328
|
-
spaceId: ID;
|
|
329
|
-
userId: ID;
|
|
330
|
-
conversationId: ID;
|
|
331
|
-
views: UserInboxItemView[];
|
|
332
|
-
snapshot: ConversationInboxSnapshot;
|
|
333
|
-
pinned: boolean;
|
|
334
|
-
priorityScore: number;
|
|
335
|
-
sortAt: Date;
|
|
336
|
-
conversationVersion: number;
|
|
337
|
-
subscriptionVersion?: number;
|
|
338
|
-
projectionVersion: number;
|
|
339
|
-
lastSourceEventId: ID;
|
|
340
|
-
projectedAt: Date;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Materialized counters for exactly one user/view pair.
|
|
344
|
-
*
|
|
345
|
-
* total and requiresAction count conversations, never visibility reasons.
|
|
346
|
-
* unread counts conversations whose snapshot.unreadCount is greater than zero,
|
|
347
|
-
* not the number of unread messages.
|
|
348
|
-
*/
|
|
349
|
-
export interface UserInboxCounterDocument {
|
|
350
|
-
id: ID;
|
|
351
|
-
spaceId: ID;
|
|
352
|
-
userId: ID;
|
|
353
|
-
viewId: InboxViewId;
|
|
354
|
-
total: number;
|
|
355
|
-
requiresAction: number;
|
|
356
|
-
unread: number;
|
|
357
|
-
projectionVersion: number;
|
|
358
|
-
updatedAt: Date;
|
|
359
|
-
}
|
|
360
|
-
export interface CursorPage<T> {
|
|
361
|
-
items: T[];
|
|
362
|
-
nextCursor?: string;
|
|
363
|
-
hasMore: boolean;
|
|
364
|
-
generatedAt: Date;
|
|
365
|
-
}
|
|
366
|
-
export interface ConversationCapabilitiesDto {
|
|
367
|
-
canView: boolean;
|
|
368
|
-
canReply: boolean;
|
|
369
|
-
canFollow: boolean;
|
|
370
|
-
canAbandon: boolean;
|
|
371
|
-
canClaim: boolean;
|
|
372
|
-
canAccept: boolean;
|
|
373
|
-
canRelease: boolean;
|
|
374
|
-
canTransfer: boolean;
|
|
375
|
-
canResolve: boolean;
|
|
376
|
-
canReopen: boolean;
|
|
377
|
-
canChangePriority: boolean;
|
|
378
|
-
canManageLabels: boolean;
|
|
379
|
-
canManageSla: boolean;
|
|
380
|
-
canViewAssignmentHistory: boolean;
|
|
381
|
-
canViewRoutingDecisions: boolean;
|
|
382
|
-
}
|
|
383
|
-
export interface InboxViewSummaryDto {
|
|
384
|
-
id: InboxViewId | 'supervised_target';
|
|
385
|
-
label: string;
|
|
386
|
-
scope: 'personal' | 'supervision' | 'history';
|
|
387
|
-
order: number;
|
|
388
|
-
total: number;
|
|
389
|
-
requiresAction: number;
|
|
390
|
-
unread: number;
|
|
391
|
-
enabled: boolean;
|
|
392
|
-
targetRequired: boolean;
|
|
393
|
-
capabilities: string[];
|
|
394
|
-
}
|
|
395
|
-
export interface InboxViewsResponse {
|
|
396
|
-
views: InboxViewSummaryDto[];
|
|
397
|
-
countersGeneratedAt: Date;
|
|
398
|
-
projectionLagMs?: number;
|
|
399
|
-
}
|
|
400
|
-
export interface InboxFilterDto {
|
|
401
|
-
text?: string;
|
|
402
|
-
queueIds?: ID[];
|
|
403
|
-
ownerUserIds?: ID[];
|
|
404
|
-
channelTypes?: string[];
|
|
405
|
-
statuses?: ConversationStatus[];
|
|
406
|
-
priorities?: Array<'low' | 'normal' | 'high' | 'urgent'>;
|
|
407
|
-
slaStatuses?: Array<'none' | 'running' | 'warning' | 'breached' | 'met'>;
|
|
408
|
-
labelIds?: ID[];
|
|
409
|
-
unread?: boolean;
|
|
410
|
-
requiresAction?: boolean;
|
|
411
|
-
pinned?: boolean;
|
|
412
|
-
lastActivity?: {
|
|
413
|
-
from?: Date;
|
|
414
|
-
to?: Date;
|
|
415
|
-
};
|
|
416
|
-
sort: {
|
|
417
|
-
type: 'activity';
|
|
418
|
-
} | {
|
|
419
|
-
type: 'priority';
|
|
420
|
-
};
|
|
421
|
-
}
|
|
422
|
-
export type InboxConversationItemDto = Pick<UserInboxItemDocument, 'conversationId' | 'views' | 'snapshot' | 'pinned' | 'priorityScore' | 'sortAt'> & {
|
|
423
|
-
capabilities: Pick<ConversationCapabilitiesDto, 'canView' | 'canReply' | 'canClaim' | 'canTransfer'>;
|
|
424
|
-
};
|
|
425
|
-
export interface InboxConversationPage extends CursorPage<InboxConversationItemDto> {
|
|
426
|
-
appliedFilter: InboxFilterDto;
|
|
427
|
-
facets?: unknown;
|
|
428
|
-
}
|
|
429
|
-
/**
|
|
430
|
-
* DTO API - GET /inbox/views/{viewId}/filter-options.
|
|
431
|
-
*/
|
|
432
|
-
export interface InboxFacetOptionDto {
|
|
433
|
-
id: string;
|
|
434
|
-
label: string;
|
|
435
|
-
count: number;
|
|
436
|
-
}
|
|
437
|
-
export interface InboxFacetsDto {
|
|
438
|
-
queues: InboxFacetOptionDto[];
|
|
439
|
-
owners: InboxFacetOptionDto[];
|
|
440
|
-
channels: InboxFacetOptionDto[];
|
|
441
|
-
statuses: InboxFacetOptionDto[];
|
|
442
|
-
priorities: InboxFacetOptionDto[];
|
|
443
|
-
slaStatuses: InboxFacetOptionDto[];
|
|
444
|
-
labels: InboxFacetOptionDto[];
|
|
445
|
-
}
|
|
446
|
-
export interface InboxFilterOptionsResponse {
|
|
447
|
-
facets: InboxFacetsDto;
|
|
448
|
-
generatedAt: Date;
|
|
449
|
-
}
|
|
450
|
-
export {};
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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";
|
|
@@ -9,14 +16,37 @@ var ConversationBotStatus;
|
|
|
9
16
|
ConversationBotStatus[ConversationBotStatus["FINALIZED"] = 4] = "FINALIZED";
|
|
10
17
|
ConversationBotStatus[ConversationBotStatus["CANCELED"] = 5] = "CANCELED";
|
|
11
18
|
})(ConversationBotStatus || (exports.ConversationBotStatus = ConversationBotStatus = {}));
|
|
19
|
+
class ConversationBotVar {
|
|
20
|
+
}
|
|
21
|
+
exports.ConversationBotVar = ConversationBotVar;
|
|
22
|
+
var ChatType;
|
|
23
|
+
(function (ChatType) {
|
|
24
|
+
/**Conversation with a external channel/contact */
|
|
25
|
+
ChatType[ChatType["EXTERNAL"] = 0] = "EXTERNAL";
|
|
26
|
+
/**messages between two users */
|
|
27
|
+
ChatType[ChatType["DIRECT"] = 1] = "DIRECT";
|
|
28
|
+
/**messages between multiple users */
|
|
29
|
+
ChatType[ChatType["GROUP"] = 2] = "GROUP";
|
|
30
|
+
/**Messages to discuss a conversation */
|
|
31
|
+
ChatType[ChatType["DISCUSS_CONVERSATION"] = 11] = "DISCUSS_CONVERSATION";
|
|
32
|
+
/**Messages to discuss a ticket */
|
|
33
|
+
ChatType[ChatType["DISCUSS_TICKET"] = 12] = "DISCUSS_TICKET";
|
|
34
|
+
})(ChatType || (exports.ChatType = ChatType = {}));
|
|
35
|
+
class ConversationAssigned {
|
|
36
|
+
}
|
|
37
|
+
exports.ConversationAssigned = ConversationAssigned;
|
|
12
38
|
var ConversationDirection;
|
|
13
39
|
(function (ConversationDirection) {
|
|
14
40
|
ConversationDirection[ConversationDirection["INBOUND"] = 1] = "INBOUND";
|
|
15
41
|
ConversationDirection[ConversationDirection["OUTBOUND"] = 2] = "OUTBOUND";
|
|
16
42
|
})(ConversationDirection || (exports.ConversationDirection = ConversationDirection = {}));
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
43
|
+
var ConversationSatus;
|
|
44
|
+
(function (ConversationSatus) {
|
|
45
|
+
ConversationSatus[ConversationSatus["NEW"] = 1] = "NEW";
|
|
46
|
+
ConversationSatus[ConversationSatus["ACTIVE"] = 2] = "ACTIVE";
|
|
47
|
+
ConversationSatus[ConversationSatus["FINALIZED"] = 3] = "FINALIZED";
|
|
48
|
+
ConversationSatus[ConversationSatus["ARCHIVED"] = 4] = "ARCHIVED";
|
|
49
|
+
})(ConversationSatus || (exports.ConversationSatus = ConversationSatus = {}));
|
|
20
50
|
var AssignMethod;
|
|
21
51
|
(function (AssignMethod) {
|
|
22
52
|
AssignMethod[AssignMethod["ALL"] = 0] = "ALL";
|
|
@@ -24,13 +54,3 @@ var AssignMethod;
|
|
|
24
54
|
AssignMethod[AssignMethod["RANDOM"] = 2] = "RANDOM";
|
|
25
55
|
AssignMethod[AssignMethod["LEAST_BUSY"] = 3] = "LEAST_BUSY";
|
|
26
56
|
})(AssignMethod || (exports.AssignMethod = AssignMethod = {}));
|
|
27
|
-
var ConversationStatus;
|
|
28
|
-
(function (ConversationStatus) {
|
|
29
|
-
ConversationStatus[ConversationStatus["NEW"] = 1] = "NEW";
|
|
30
|
-
ConversationStatus[ConversationStatus["OPEN"] = 2] = "OPEN";
|
|
31
|
-
ConversationStatus[ConversationStatus["ACTIVE"] = 2] = "ACTIVE";
|
|
32
|
-
ConversationStatus[ConversationStatus["RESOLVED"] = 3] = "RESOLVED";
|
|
33
|
-
ConversationStatus[ConversationStatus["FINALIZED"] = 3] = "FINALIZED";
|
|
34
|
-
ConversationStatus[ConversationStatus["WAITING"] = 10] = "WAITING";
|
|
35
|
-
// ARCHIVED = 4,
|
|
36
|
-
})(ConversationStatus || (exports.ConversationStatus = ConversationStatus = {}));
|
|
@@ -17,8 +17,8 @@ export interface BodyDashboard {
|
|
|
17
17
|
memberId: string | null;
|
|
18
18
|
groupId: string;
|
|
19
19
|
ending?: string | null;
|
|
20
|
-
/**
|
|
21
|
-
|
|
20
|
+
/** For filter conversations with IConversation.assignedTo.userInfo.id */
|
|
21
|
+
assignedToUserId?: string | null;
|
|
22
22
|
}
|
|
23
23
|
export declare enum GeneralDashboardType {
|
|
24
24
|
UNASSIGNED = 0,
|