@trii/types 2.10.678 → 2.10.680
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/AI/MapPolygon.d.ts +22 -0
- package/dist/AI/MapPolygon.js +2 -0
- package/dist/Conversations/Conversation.d.ts +8 -8
- package/dist/Conversations/Flows/Nodes/NodeAIChatBot.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeAIChatBot.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeApi.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeApi.js +183 -0
- package/dist/Conversations/Flows/Nodes/NodeBotIA.d.ts +15 -0
- package/dist/Conversations/Flows/Nodes/NodeBotIA.js +6 -0
- package/dist/Conversations/Flows/Nodes/NodeChatBotIA.d.ts +15 -0
- package/dist/Conversations/Flows/Nodes/NodeChatBotIA.js +6 -0
- package/dist/Conversations/Flows/Nodes/NodeConditional.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeConditional.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeContactSearch.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeContactSearch.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeContactUpdate.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeContactUpdate.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeConversationAssignTo.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeConversationAssignTo.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeConversationFinalize.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeConversationFinalize.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeConversationUpdate.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeConversationUpdate.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeFillForm.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeFillForm.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeFillTicket.d.ts +1 -0
- package/dist/Conversations/Flows/Nodes/NodeFillTicket.js +9 -0
- package/dist/Conversations/Flows/Nodes/NodeGoogleCalendar.d.ts +20 -0
- package/dist/Conversations/Flows/Nodes/NodeGoogleCalendar.js +2 -0
- package/dist/Conversations/Flows/Nodes/NodeGoogleMaps copy.d.ts +12 -0
- package/dist/Conversations/Flows/Nodes/NodeGoogleMaps copy.js +6 -0
- package/dist/Conversations/Flows/Nodes/NodeGoogleMaps.d.ts +15 -0
- package/dist/Conversations/Flows/Nodes/NodeGoogleMaps.js +2 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgReply.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgReply.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgSend.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgSend.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgText.d.ts +1 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgText.js +27 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgWaitResponse.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeMsgWaitResponse.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeRedirect.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeRedirect.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeSendEmail.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeSendEmail.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeSqlQuery.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeSqlQuery.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeStart.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeStart.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeTimeScheduleControl.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeTimeScheduleControl.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeTimeTimer.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeTimeTimer.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeTimeWaitUntil.d.ts +0 -0
- package/dist/Conversations/Flows/Nodes/NodeTimeWaitUntil.js +0 -0
- package/dist/Conversations/Flows/Nodes/NodeToolCalculator.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolCalculator.js +37 -0
- package/dist/Conversations/Flows/Nodes/NodeToolContacts.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolContacts.js +59 -0
- package/dist/Conversations/Flows/Nodes/NodeToolFunction.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolFunction.js +45 -0
- package/dist/Conversations/Flows/Nodes/NodeToolGoogleCalendar.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolGoogleCalendar.js +87 -0
- package/dist/Conversations/Flows/Nodes/NodeToolGoogleMaps.d.ts +1 -0
- package/dist/Conversations/Flows/Nodes/NodeToolGoogleMaps.js +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolKnowledge.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolKnowledge.js +52 -0
- package/dist/Conversations/Flows/Nodes/NodeToolMapsCheckPolygon.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolMapsCheckPolygon.js +59 -0
- package/dist/Conversations/Flows/Nodes/NodeToolMcpClient.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolMcpClient.js +45 -0
- package/dist/Conversations/Flows/Nodes/NodeToolShoppingCart.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolShoppingCart.js +81 -0
- package/dist/Conversations/Flows/Nodes/index.d.ts +24 -0
- package/dist/Conversations/Flows/Nodes/index.js +40 -0
- package/dist/Conversations/InboxMongo.d.ts +12 -12
- package/dist/Conversations/Routing.d.ts +14 -13
- package/dist/Conversations/Sla.d.ts +141 -0
- package/dist/Conversations/Sla.js +6 -0
- package/dist/Conversations/index.d.ts +1 -0
- package/dist/Conversations/index.js +1 -0
- package/dist/Presence/ChannelRoutingState.d.ts +17 -0
- package/dist/Presence/ChannelRoutingState.js +9 -0
- package/dist/Spaces/spaces.d.ts +2 -2
- package/dist/Tickets/AccessLevel.d.ts +5 -0
- package/dist/Tickets/AccessLevel.js +9 -0
- package/dist/index.d.ts +22 -22
- package/dist/index.js +58 -58
- 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 +9 -0
- package/dist/src/Contacts/contacts.d.ts +2 -2
- package/dist/src/Conversations/Assignment.d.ts +81 -0
- package/dist/src/Conversations/Assignment.js +4 -0
- package/dist/src/Conversations/Conversation.d.ts +234 -52
- 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 +66 -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/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 +8 -1
- package/dist/src/Conversations/index.js +8 -1
- 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/Tickets/Category.d.ts +18 -0
- package/dist/src/Tickets/Dashboard.d.ts +60 -0
- package/dist/src/Tickets/Fields.d.ts +1 -0
- package/dist/src/Tickets/Layouts.d.ts +3 -1
- 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 +2 -0
- package/dist/src/index.js +3 -1
- package/package.json +1 -1
- package/dist/src/Conversations/DashBoard/dashboardForms.d.ts +0 -44
- package/dist/src/Conversations/DashBoard/dashboardForms.js +0 -24
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { ISchedule } from '../Common/Schedules/Schedules';
|
|
2
|
+
import type { ConversationEventType, ConversationStatus, ID } from './Conversation';
|
|
3
|
+
import type { OutboxEvent } from './Outbox';
|
|
4
|
+
export declare const CONVERSATION_SLA_POLICIES_COLLECTION = "conversation_sla_policies";
|
|
5
|
+
export declare const CONVERSATION_SLA_CYCLES_COLLECTION = "conversation_sla_cycles";
|
|
6
|
+
export declare const CONVERSATION_SLA_EVENTS_COLLECTION = "conversation_sla_events";
|
|
7
|
+
export type ConversationSlaMetric = 'first_response' | 'next_response' | 'assignment' | 'acceptance' | 'resolution';
|
|
8
|
+
/**
|
|
9
|
+
* continuous counts natural elapsed time, including nights and holidays.
|
|
10
|
+
* schedule counts only ranges allowed by the referenced customer ISchedule.
|
|
11
|
+
*/
|
|
12
|
+
export type ConversationSlaTimeCalculation = {
|
|
13
|
+
mode: 'continuous';
|
|
14
|
+
scheduleId?: never;
|
|
15
|
+
} | {
|
|
16
|
+
mode: 'schedule';
|
|
17
|
+
scheduleId: Exclude<ISchedule['id'], null>;
|
|
18
|
+
};
|
|
19
|
+
export interface ConversationSlaWarningThreshold {
|
|
20
|
+
id: ID;
|
|
21
|
+
percentage: number;
|
|
22
|
+
}
|
|
23
|
+
export interface ConversationSlaTarget {
|
|
24
|
+
metric: ConversationSlaMetric;
|
|
25
|
+
durationSeconds: number;
|
|
26
|
+
warningThresholds: ConversationSlaWarningThreshold[];
|
|
27
|
+
}
|
|
28
|
+
export type ConversationSlaResumeBehavior = 'continue' | 'restart' | 'recalculate';
|
|
29
|
+
export type ConversationSlaReopenBehavior = 'preserve' | 'restart' | 'recalculate' | 'do_not_start';
|
|
30
|
+
export interface ConversationSlaClockBehavior {
|
|
31
|
+
pauseOnStatuses: ConversationStatus[];
|
|
32
|
+
onResume: ConversationSlaResumeBehavior;
|
|
33
|
+
onReopen: ConversationSlaReopenBehavior;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Immutable, versioned policy referenced by ConversationQueue.sla.
|
|
37
|
+
* Editing a published policy creates a new version.
|
|
38
|
+
*/
|
|
39
|
+
export interface ConversationSlaPolicy {
|
|
40
|
+
id: ID;
|
|
41
|
+
spaceId: ID;
|
|
42
|
+
name: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
version: number;
|
|
46
|
+
timeCalculation: ConversationSlaTimeCalculation;
|
|
47
|
+
targets: ConversationSlaTarget[];
|
|
48
|
+
clockBehavior: ConversationSlaClockBehavior;
|
|
49
|
+
createdAt: Date;
|
|
50
|
+
createdByUserId?: ID;
|
|
51
|
+
updatedAt: Date;
|
|
52
|
+
updatedByUserId?: ID;
|
|
53
|
+
}
|
|
54
|
+
export type ConversationSlaClockAction = 'start' | 'evaluate' | 'pause' | 'resume' | 'complete' | 'recalculate' | 'cancel';
|
|
55
|
+
export type ConversationSlaClockReason = 'conversation_created' | 'conversation_enqueued' | 'customer_message' | 'agent_response' | 'assignment_changed' | 'status_changed' | 'queue_transfer' | 'conversation_reopened' | 'deadline_due' | 'policy_override';
|
|
56
|
+
/**
|
|
57
|
+
* Idempotent input for the conversation-sla-worker.
|
|
58
|
+
* policyId/policyVersion identify the immutable policy snapshot to apply.
|
|
59
|
+
*/
|
|
60
|
+
export interface SlaClockCommand {
|
|
61
|
+
commandId: ID;
|
|
62
|
+
sourceEventId: ID;
|
|
63
|
+
spaceId: ID;
|
|
64
|
+
conversationId: ID;
|
|
65
|
+
expectedConversationVersion: number;
|
|
66
|
+
action: ConversationSlaClockAction;
|
|
67
|
+
reason: ConversationSlaClockReason;
|
|
68
|
+
metric?: ConversationSlaMetric;
|
|
69
|
+
policyId: ID;
|
|
70
|
+
policyVersion: number;
|
|
71
|
+
queueId?: ID;
|
|
72
|
+
occurredAt: Date;
|
|
73
|
+
requestedAt: Date;
|
|
74
|
+
}
|
|
75
|
+
export type ConversationSlaCycleStatus = 'running' | 'paused' | 'met' | 'breached' | 'cancelled';
|
|
76
|
+
export interface ConversationSlaPausePeriod {
|
|
77
|
+
startedAt: Date;
|
|
78
|
+
endedAt?: Date;
|
|
79
|
+
reason: ConversationSlaClockReason;
|
|
80
|
+
sourceEventId: ID;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Durable metric cycle. The target and time calculation are copied from the
|
|
84
|
+
* selected policy version so later policy edits cannot alter active history.
|
|
85
|
+
*/
|
|
86
|
+
export interface ConversationSlaCycle {
|
|
87
|
+
id: ID;
|
|
88
|
+
spaceId: ID;
|
|
89
|
+
conversationId: ID;
|
|
90
|
+
metric: ConversationSlaMetric;
|
|
91
|
+
sequence: number;
|
|
92
|
+
status: ConversationSlaCycleStatus;
|
|
93
|
+
policyId: ID;
|
|
94
|
+
policyVersion: number;
|
|
95
|
+
timeCalculation: ConversationSlaTimeCalculation;
|
|
96
|
+
target: ConversationSlaTarget;
|
|
97
|
+
startedAt: Date;
|
|
98
|
+
deadlineAt?: Date;
|
|
99
|
+
nextWarningAt?: Date;
|
|
100
|
+
pausedAt?: Date;
|
|
101
|
+
completedAt?: Date;
|
|
102
|
+
breachedAt?: Date;
|
|
103
|
+
cancelledAt?: Date;
|
|
104
|
+
elapsedSeconds: number;
|
|
105
|
+
pausedSeconds: number;
|
|
106
|
+
pausePeriods: ConversationSlaPausePeriod[];
|
|
107
|
+
startedByEventId: ID;
|
|
108
|
+
completedByEventId?: ID;
|
|
109
|
+
version: number;
|
|
110
|
+
updatedAt: Date;
|
|
111
|
+
}
|
|
112
|
+
export type ConversationSlaEventType = Extract<ConversationEventType, 'sla_started' | 'sla_paused' | 'sla_resumed' | 'sla_warning' | 'sla_breached' | 'sla_met' | 'sla_overridden'>;
|
|
113
|
+
/**
|
|
114
|
+
* Immutable SLA event. Corrections are represented by a later event.
|
|
115
|
+
*/
|
|
116
|
+
export interface ConversationSlaEvent {
|
|
117
|
+
eventId: ID;
|
|
118
|
+
sourceEventId: ID;
|
|
119
|
+
type: ConversationSlaEventType;
|
|
120
|
+
schemaVersion: 1;
|
|
121
|
+
spaceId: ID;
|
|
122
|
+
conversationId: ID;
|
|
123
|
+
conversationVersion: number;
|
|
124
|
+
cycleId: ID;
|
|
125
|
+
metric: ConversationSlaMetric;
|
|
126
|
+
policyId: ID;
|
|
127
|
+
policyVersion: number;
|
|
128
|
+
status: ConversationSlaCycleStatus;
|
|
129
|
+
deadlineAt?: Date;
|
|
130
|
+
warningThresholdId?: ID;
|
|
131
|
+
reason: ConversationSlaClockReason;
|
|
132
|
+
correlationId: ID;
|
|
133
|
+
causationId: ID;
|
|
134
|
+
occurredAt: Date;
|
|
135
|
+
recordedAt: Date;
|
|
136
|
+
}
|
|
137
|
+
export type ConversationSlaOutboxEvent = OutboxEvent<ConversationSlaEvent> & {
|
|
138
|
+
aggregateType: 'conversation';
|
|
139
|
+
eventType: `conversation.${ConversationSlaEventType}`;
|
|
140
|
+
schemaVersion: 1;
|
|
141
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONVERSATION_SLA_EVENTS_COLLECTION = exports.CONVERSATION_SLA_CYCLES_COLLECTION = exports.CONVERSATION_SLA_POLICIES_COLLECTION = void 0;
|
|
4
|
+
exports.CONVERSATION_SLA_POLICIES_COLLECTION = 'conversation_sla_policies';
|
|
5
|
+
exports.CONVERSATION_SLA_CYCLES_COLLECTION = 'conversation_sla_cycles';
|
|
6
|
+
exports.CONVERSATION_SLA_EVENTS_COLLECTION = 'conversation_sla_events';
|
|
@@ -56,4 +56,5 @@ __exportStar(require("./DashBoard/dashboardMessages"), exports);
|
|
|
56
56
|
__exportStar(require("./Survey"), exports);
|
|
57
57
|
__exportStar(require("./Queue"), exports);
|
|
58
58
|
__exportStar(require("./Routing"), exports);
|
|
59
|
+
__exportStar(require("./Sla"), exports);
|
|
59
60
|
__exportStar(require("./Transfer"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ChannelType } from "../Common/Channels/ChannelType";
|
|
2
|
+
export interface ChannelRoutingState {
|
|
3
|
+
spaceId: string;
|
|
4
|
+
userId: string;
|
|
5
|
+
channelType: ChannelType;
|
|
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
|
+
}
|
|
@@ -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 = {}));
|
package/dist/Spaces/spaces.d.ts
CHANGED
|
@@ -50,13 +50,13 @@ export declare const RegionInfo: {
|
|
|
50
50
|
Value: number;
|
|
51
51
|
DisplayName: string;
|
|
52
52
|
RegionalDisplayName: string;
|
|
53
|
-
}
|
|
53
|
+
};
|
|
54
54
|
getInfo_from_Value: (Value: number) => {
|
|
55
55
|
Name: string;
|
|
56
56
|
Value: number;
|
|
57
57
|
DisplayName: string;
|
|
58
58
|
RegionalDisplayName: string;
|
|
59
|
-
}
|
|
59
|
+
};
|
|
60
60
|
};
|
|
61
61
|
export interface ISpace {
|
|
62
62
|
id: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TicketAccessLevel = void 0;
|
|
4
|
+
var TicketAccessLevel;
|
|
5
|
+
(function (TicketAccessLevel) {
|
|
6
|
+
TicketAccessLevel["ALL"] = "ALL";
|
|
7
|
+
TicketAccessLevel["GROUP"] = "GROUP";
|
|
8
|
+
TicketAccessLevel["AGENT"] = "AGENT";
|
|
9
|
+
})(TicketAccessLevel || (exports.TicketAccessLevel = TicketAccessLevel = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export * as Accounts from './Accounts/index';
|
|
2
|
-
export * as AuditLogs from './AuditLogs/index';
|
|
3
|
-
export * as Common from './Common/index';
|
|
4
|
-
export * as Contacts from './Contacts/index';
|
|
5
|
-
export * as Calendar from './Calendar/index';
|
|
6
|
-
export * as Conversations from './Conversations/index';
|
|
7
|
-
export * as Calls from './Calls/index';
|
|
8
|
-
export * as Security from './Security/index';
|
|
9
|
-
export * as Reports from './Reports/index';
|
|
10
|
-
export * as Spaces from './Spaces/index';
|
|
11
|
-
export * as Tickets from './Tickets/index';
|
|
12
|
-
export * as Sales from './Sales/index';
|
|
13
|
-
export * as Collections from './Collections/index';
|
|
14
|
-
export * as Users from './Users/index';
|
|
15
|
-
export * as Presence from './Presence/index';
|
|
16
|
-
export * as ApiResponses from './ApiResponses/index';
|
|
17
|
-
export * as EventsQueue from './Common/EventsQueue/index';
|
|
18
|
-
export * as APIKeys from './PublicAPI/apiKey';
|
|
19
|
-
export * as AI from './AI/index';
|
|
20
|
-
export * as Shop from './Shop/index';
|
|
21
|
-
export * as APIResponses from './ApiResponses/index';
|
|
22
|
-
export * as Forms from './Forms/index';
|
|
1
|
+
export * as Accounts from './Accounts/index';
|
|
2
|
+
export * as AuditLogs from './AuditLogs/index';
|
|
3
|
+
export * as Common from './Common/index';
|
|
4
|
+
export * as Contacts from './Contacts/index';
|
|
5
|
+
export * as Calendar from './Calendar/index';
|
|
6
|
+
export * as Conversations from './Conversations/index';
|
|
7
|
+
export * as Calls from './Calls/index';
|
|
8
|
+
export * as Security from './Security/index';
|
|
9
|
+
export * as Reports from './Reports/index';
|
|
10
|
+
export * as Spaces from './Spaces/index';
|
|
11
|
+
export * as Tickets from './Tickets/index';
|
|
12
|
+
export * as Sales from './Sales/index';
|
|
13
|
+
export * as Collections from './Collections/index';
|
|
14
|
+
export * as Users from './Users/index';
|
|
15
|
+
export * as Presence from './Presence/index';
|
|
16
|
+
export * as ApiResponses from './ApiResponses/index';
|
|
17
|
+
export * as EventsQueue from './Common/EventsQueue/index';
|
|
18
|
+
export * as APIKeys from './PublicAPI/apiKey';
|
|
19
|
+
export * as AI from './AI/index';
|
|
20
|
+
export * as Shop from './Shop/index';
|
|
21
|
+
export * as APIResponses from './ApiResponses/index';
|
|
22
|
+
export * as Forms from './Forms/index';
|
package/dist/index.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
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
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.Forms = exports.APIResponses = exports.Shop = exports.AI = exports.APIKeys = 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;
|
|
37
|
-
exports.Accounts = __importStar(require("./Accounts/index"));
|
|
38
|
-
exports.AuditLogs = __importStar(require("./AuditLogs/index"));
|
|
39
|
-
exports.Common = __importStar(require("./Common/index"));
|
|
40
|
-
exports.Contacts = __importStar(require("./Contacts/index"));
|
|
41
|
-
exports.Calendar = __importStar(require("./Calendar/index"));
|
|
42
|
-
exports.Conversations = __importStar(require("./Conversations/index"));
|
|
43
|
-
exports.Calls = __importStar(require("./Calls/index"));
|
|
44
|
-
exports.Security = __importStar(require("./Security/index"));
|
|
45
|
-
exports.Reports = __importStar(require("./Reports/index"));
|
|
46
|
-
exports.Spaces = __importStar(require("./Spaces/index"));
|
|
47
|
-
exports.Tickets = __importStar(require("./Tickets/index"));
|
|
48
|
-
exports.Sales = __importStar(require("./Sales/index"));
|
|
49
|
-
exports.Collections = __importStar(require("./Collections/index"));
|
|
50
|
-
exports.Users = __importStar(require("./Users/index"));
|
|
51
|
-
exports.Presence = __importStar(require("./Presence/index"));
|
|
52
|
-
exports.ApiResponses = __importStar(require("./ApiResponses/index"));
|
|
53
|
-
exports.EventsQueue = __importStar(require("./Common/EventsQueue/index"));
|
|
54
|
-
exports.APIKeys = __importStar(require("./PublicAPI/apiKey"));
|
|
55
|
-
exports.AI = __importStar(require("./AI/index"));
|
|
56
|
-
exports.Shop = __importStar(require("./Shop/index"));
|
|
57
|
-
exports.APIResponses = __importStar(require("./ApiResponses/index"));
|
|
58
|
-
exports.Forms = __importStar(require("./Forms/index"));
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
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
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Forms = exports.APIResponses = exports.Shop = exports.AI = exports.APIKeys = 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;
|
|
37
|
+
exports.Accounts = __importStar(require("./Accounts/index"));
|
|
38
|
+
exports.AuditLogs = __importStar(require("./AuditLogs/index"));
|
|
39
|
+
exports.Common = __importStar(require("./Common/index"));
|
|
40
|
+
exports.Contacts = __importStar(require("./Contacts/index"));
|
|
41
|
+
exports.Calendar = __importStar(require("./Calendar/index"));
|
|
42
|
+
exports.Conversations = __importStar(require("./Conversations/index"));
|
|
43
|
+
exports.Calls = __importStar(require("./Calls/index"));
|
|
44
|
+
exports.Security = __importStar(require("./Security/index"));
|
|
45
|
+
exports.Reports = __importStar(require("./Reports/index"));
|
|
46
|
+
exports.Spaces = __importStar(require("./Spaces/index"));
|
|
47
|
+
exports.Tickets = __importStar(require("./Tickets/index"));
|
|
48
|
+
exports.Sales = __importStar(require("./Sales/index"));
|
|
49
|
+
exports.Collections = __importStar(require("./Collections/index"));
|
|
50
|
+
exports.Users = __importStar(require("./Users/index"));
|
|
51
|
+
exports.Presence = __importStar(require("./Presence/index"));
|
|
52
|
+
exports.ApiResponses = __importStar(require("./ApiResponses/index"));
|
|
53
|
+
exports.EventsQueue = __importStar(require("./Common/EventsQueue/index"));
|
|
54
|
+
exports.APIKeys = __importStar(require("./PublicAPI/apiKey"));
|
|
55
|
+
exports.AI = __importStar(require("./AI/index"));
|
|
56
|
+
exports.Shop = __importStar(require("./Shop/index"));
|
|
57
|
+
exports.APIResponses = __importStar(require("./ApiResponses/index"));
|
|
58
|
+
exports.Forms = __importStar(require("./Forms/index"));
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { UserInfo } from "../Users/UserTrii";
|
|
2
|
+
export interface Chat {
|
|
3
|
+
id: string;
|
|
4
|
+
spaceId: string;
|
|
5
|
+
type: ChatType;
|
|
6
|
+
ownerId: string;
|
|
7
|
+
chatName: string;
|
|
8
|
+
chatImage: string;
|
|
9
|
+
chatMembers: IChatMemeber[];
|
|
10
|
+
chatMembersCount: number;
|
|
11
|
+
remoteAddress: string;
|
|
12
|
+
remoteAddressId: string;
|
|
13
|
+
lastMessage: string;
|
|
14
|
+
lastMessageId?: string;
|
|
15
|
+
newMessagesCount: number;
|
|
16
|
+
newMessagesUnread: boolean;
|
|
17
|
+
pinned: boolean;
|
|
18
|
+
status: ConversationSatus;
|
|
19
|
+
archived: boolean;
|
|
20
|
+
/** Domain objects discussed or served by this conversation. */
|
|
21
|
+
contextReferences?: ContextReference[];
|
|
22
|
+
finalizedAt: Date;
|
|
23
|
+
finalizedBy?: string;
|
|
24
|
+
createdAt: Date;
|
|
25
|
+
updatedAt: Date;
|
|
26
|
+
}
|
|
27
|
+
export interface ContextReference {
|
|
28
|
+
entityType: ContextType;
|
|
29
|
+
entityId: string;
|
|
30
|
+
role?: string;
|
|
31
|
+
linkedAt: Date;
|
|
32
|
+
linkedBy?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare enum ContextType {
|
|
35
|
+
TICKET = "TICKET",
|
|
36
|
+
CONVERSATION = "CONVERSATION",
|
|
37
|
+
LEAD = "LEAD",
|
|
38
|
+
DEBT = "DEBT"
|
|
39
|
+
}
|
|
40
|
+
export declare enum ChatType {
|
|
41
|
+
/**messages between two users */
|
|
42
|
+
DIRECT = 1,
|
|
43
|
+
/**messages between multiple users */
|
|
44
|
+
GROUP = 2,
|
|
45
|
+
/**Messages to discuss a conversation */
|
|
46
|
+
DISCUSS_CONVERSATION = 11,
|
|
47
|
+
/**Messages to discuss a ticket */
|
|
48
|
+
DISCUSS_TICKET = 12
|
|
49
|
+
}
|
|
50
|
+
export interface IChatMemeber {
|
|
51
|
+
joinTimeStamp: Date;
|
|
52
|
+
isAdmin: boolean;
|
|
53
|
+
userId: string;
|
|
54
|
+
user: UserInfo;
|
|
55
|
+
}
|
|
56
|
+
export declare enum ConversationSatus {
|
|
57
|
+
NEW = 1,
|
|
58
|
+
ACTIVE = 2,
|
|
59
|
+
FINALIZED = 3,
|
|
60
|
+
ARCHIVED = 4
|
|
61
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConversationSatus = exports.ChatType = exports.ContextType = void 0;
|
|
4
|
+
var ContextType;
|
|
5
|
+
(function (ContextType) {
|
|
6
|
+
ContextType["TICKET"] = "TICKET";
|
|
7
|
+
ContextType["CONVERSATION"] = "CONVERSATION";
|
|
8
|
+
ContextType["LEAD"] = "LEAD";
|
|
9
|
+
ContextType["DEBT"] = "DEBT";
|
|
10
|
+
})(ContextType || (exports.ContextType = ContextType = {}));
|
|
11
|
+
var ChatType;
|
|
12
|
+
(function (ChatType) {
|
|
13
|
+
/**messages between two users */
|
|
14
|
+
ChatType[ChatType["DIRECT"] = 1] = "DIRECT";
|
|
15
|
+
/**messages between multiple users */
|
|
16
|
+
ChatType[ChatType["GROUP"] = 2] = "GROUP";
|
|
17
|
+
/**Messages to discuss a conversation */
|
|
18
|
+
ChatType[ChatType["DISCUSS_CONVERSATION"] = 11] = "DISCUSS_CONVERSATION";
|
|
19
|
+
/**Messages to discuss a ticket */
|
|
20
|
+
ChatType[ChatType["DISCUSS_TICKET"] = 12] = "DISCUSS_TICKET";
|
|
21
|
+
})(ChatType || (exports.ChatType = ChatType = {}));
|
|
22
|
+
var ConversationSatus;
|
|
23
|
+
(function (ConversationSatus) {
|
|
24
|
+
ConversationSatus[ConversationSatus["NEW"] = 1] = "NEW";
|
|
25
|
+
ConversationSatus[ConversationSatus["ACTIVE"] = 2] = "ACTIVE";
|
|
26
|
+
ConversationSatus[ConversationSatus["FINALIZED"] = 3] = "FINALIZED";
|
|
27
|
+
ConversationSatus[ConversationSatus["ARCHIVED"] = 4] = "ARCHIVED";
|
|
28
|
+
})(ConversationSatus || (exports.ConversationSatus = ConversationSatus = {}));
|
|
@@ -44,8 +44,17 @@ interface IChannel {
|
|
|
44
44
|
description?: string | null;
|
|
45
45
|
type?: ChannelType | null;
|
|
46
46
|
permissions?: Permission[] | null;
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Legacy channel assignment configuration. Use QueueRoutingConfig.
|
|
49
|
+
*/
|
|
47
50
|
assignTo?: ConversationAssigned;
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated Legacy channel assignment configuration. Use QueueRoutingConfig.
|
|
53
|
+
*/
|
|
48
54
|
assignMethod: AssignMethod;
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated Ownership is produced by the routing decision.
|
|
57
|
+
*/
|
|
49
58
|
assignToOwner?: boolean;
|
|
50
59
|
/**
|
|
51
60
|
* habilita la creacion de conversaciones para este canal, si esta en false, los mensajes entrantes no generaran conversaciones
|
|
@@ -14,7 +14,7 @@ export interface IBusiness {
|
|
|
14
14
|
counters?: ICounters;
|
|
15
15
|
name: string;
|
|
16
16
|
imageUrl: string;
|
|
17
|
-
|
|
17
|
+
ownerUserId?: 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
|
+
ownerUserId?: string;
|
|
58
58
|
businessId?: string;
|
|
59
59
|
businessName?: string;
|
|
60
60
|
phones: IContactAddress[];
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ID } from './Conversation';
|
|
2
|
+
export declare const CONVERSATION_ASSIGNMENT_EVENTS_COLLECTION = "conversation_assignment_events";
|
|
3
|
+
export type ConversationAssignmentEventType = 'enqueued' | 'routing_started' | 'offered' | 'assigned' | 'accepted' | 'transferred' | 'released' | 'timed_out' | 'requeued';
|
|
4
|
+
export type ConversationAssignmentReason = 'conversation_created' | 'routing_selected' | 'manual_assignment' | 'manual_transfer' | 'flow_routing' | 'offer_timeout' | 'assignment_timeout' | 'agent_accepted' | 'agent_released' | 'supervisor_released' | 'capacity_rebalance' | 'sla_escalation' | 'system_recovery';
|
|
5
|
+
export type AssignmentOwnerReference = {
|
|
6
|
+
type: 'none';
|
|
7
|
+
id?: never;
|
|
8
|
+
} | {
|
|
9
|
+
type: 'user' | 'bot' | 'flow';
|
|
10
|
+
id: ID;
|
|
11
|
+
};
|
|
12
|
+
export type AssignmentStateReference = {
|
|
13
|
+
status: 'unrouted';
|
|
14
|
+
assignmentId?: never;
|
|
15
|
+
queueId?: never;
|
|
16
|
+
owner: {
|
|
17
|
+
type: 'none';
|
|
18
|
+
id?: never;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'bot' | 'flow';
|
|
21
|
+
id: ID;
|
|
22
|
+
};
|
|
23
|
+
} | {
|
|
24
|
+
status: 'queued' | 'routing';
|
|
25
|
+
assignmentId: ID;
|
|
26
|
+
queueId: ID;
|
|
27
|
+
owner: {
|
|
28
|
+
type: 'none';
|
|
29
|
+
id?: never;
|
|
30
|
+
};
|
|
31
|
+
} | {
|
|
32
|
+
status: 'offered' | 'assigned' | 'accepted';
|
|
33
|
+
assignmentId: ID;
|
|
34
|
+
queueId: ID;
|
|
35
|
+
owner: {
|
|
36
|
+
type: 'user';
|
|
37
|
+
id: ID;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export type AssignmentActorReference = {
|
|
41
|
+
type: 'system';
|
|
42
|
+
id?: never;
|
|
43
|
+
} | {
|
|
44
|
+
type: 'user' | 'bot' | 'flow';
|
|
45
|
+
id: ID;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Immutable domain event stored in conversation_assignment_events.
|
|
49
|
+
*
|
|
50
|
+
* Events must only be inserted. Corrections are represented by a new event.
|
|
51
|
+
*/
|
|
52
|
+
export interface ConversationAssignmentEvent {
|
|
53
|
+
id: ID;
|
|
54
|
+
spaceId: ID;
|
|
55
|
+
conversationId: ID;
|
|
56
|
+
/**
|
|
57
|
+
* Monotonic order within a conversation.
|
|
58
|
+
*/
|
|
59
|
+
sequence: number;
|
|
60
|
+
eventType: ConversationAssignmentEventType;
|
|
61
|
+
reason: ConversationAssignmentReason;
|
|
62
|
+
/**
|
|
63
|
+
* Undefined only when no previous assignment state existed.
|
|
64
|
+
*/
|
|
65
|
+
previous?: AssignmentStateReference;
|
|
66
|
+
current: AssignmentStateReference;
|
|
67
|
+
actor: AssignmentActorReference;
|
|
68
|
+
routingDecisionId?: ID;
|
|
69
|
+
/**
|
|
70
|
+
* Version of conversations after applying the transition.
|
|
71
|
+
*/
|
|
72
|
+
conversationVersion: number;
|
|
73
|
+
correlationId?: ID;
|
|
74
|
+
causationId?: ID;
|
|
75
|
+
idempotencyKey: string;
|
|
76
|
+
/**
|
|
77
|
+
* Domain time and persistence time, respectively.
|
|
78
|
+
*/
|
|
79
|
+
occurredAt: Date;
|
|
80
|
+
recordedAt: Date;
|
|
81
|
+
}
|