@trii/types 2.10.706 → 2.10.708
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ID } from './Conversation';
|
|
2
2
|
export declare const CONVERSATION_ASSIGNMENT_EVENTS_COLLECTION = "conversation_assignment_events";
|
|
3
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';
|
|
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' | 'transfer_cancelled' | 'transfer_declined';
|
|
5
5
|
export type AssignmentOwnerReference = {
|
|
6
6
|
type: 'none';
|
|
7
7
|
id?: never;
|
|
@@ -83,3 +83,99 @@ export interface ConversationAssignmentEvent {
|
|
|
83
83
|
occurredAt: Date;
|
|
84
84
|
recordedAt: Date;
|
|
85
85
|
}
|
|
86
|
+
export interface AcceptConversationAssignmentCommand {
|
|
87
|
+
commandId: string;
|
|
88
|
+
spaceId: ID;
|
|
89
|
+
conversationId: ID;
|
|
90
|
+
assignmentId: ID;
|
|
91
|
+
expectedConversationVersion: number;
|
|
92
|
+
actor: AssignmentActorReference;
|
|
93
|
+
requestedAt: Date;
|
|
94
|
+
}
|
|
95
|
+
export type AcceptConversationAssignmentRejectionCode = 'conversation_not_found' | 'assignment_not_current' | 'assignment_not_offered' | 'actor_not_authorized';
|
|
96
|
+
export type AcceptConversationAssignmentResult = {
|
|
97
|
+
status: 'accepted' | 'already_applied';
|
|
98
|
+
commandId: string;
|
|
99
|
+
conversationId: ID;
|
|
100
|
+
previousVersion: number;
|
|
101
|
+
conversationVersion: number;
|
|
102
|
+
previous?: AssignmentStateReference;
|
|
103
|
+
current: AssignmentStateReference;
|
|
104
|
+
assignmentEventId: ID;
|
|
105
|
+
outboxEventId?: ID;
|
|
106
|
+
} | {
|
|
107
|
+
status: 'version_conflict';
|
|
108
|
+
commandId: string;
|
|
109
|
+
conversationId: ID;
|
|
110
|
+
expectedVersion: number;
|
|
111
|
+
currentVersion: number;
|
|
112
|
+
} | {
|
|
113
|
+
status: 'rejected';
|
|
114
|
+
commandId: string;
|
|
115
|
+
conversationId: ID;
|
|
116
|
+
code: AcceptConversationAssignmentRejectionCode;
|
|
117
|
+
};
|
|
118
|
+
export interface DeclineConversationAssignmentCommand {
|
|
119
|
+
commandId: string;
|
|
120
|
+
spaceId: ID;
|
|
121
|
+
conversationId: ID;
|
|
122
|
+
assignmentId: ID;
|
|
123
|
+
expectedConversationVersion: number;
|
|
124
|
+
actor: AssignmentActorReference;
|
|
125
|
+
requestedAt: Date;
|
|
126
|
+
}
|
|
127
|
+
export type DeclineConversationAssignmentRejectionCode = 'conversation_not_found' | 'assignment_not_current' | 'assignment_not_offered' | 'actor_not_authorized';
|
|
128
|
+
export type DeclineConversationAssignmentResult = {
|
|
129
|
+
status: 'declined' | 'already_applied';
|
|
130
|
+
commandId: string;
|
|
131
|
+
conversationId: ID;
|
|
132
|
+
previousVersion: number;
|
|
133
|
+
conversationVersion: number;
|
|
134
|
+
previous?: AssignmentStateReference;
|
|
135
|
+
current: AssignmentStateReference;
|
|
136
|
+
assignmentEventId: ID;
|
|
137
|
+
outboxEventId?: ID;
|
|
138
|
+
} | {
|
|
139
|
+
status: 'version_conflict';
|
|
140
|
+
commandId: string;
|
|
141
|
+
conversationId: ID;
|
|
142
|
+
expectedVersion: number;
|
|
143
|
+
currentVersion: number;
|
|
144
|
+
} | {
|
|
145
|
+
status: 'rejected';
|
|
146
|
+
commandId: string;
|
|
147
|
+
conversationId: ID;
|
|
148
|
+
code: DeclineConversationAssignmentRejectionCode;
|
|
149
|
+
};
|
|
150
|
+
export interface CancelConversationAssignmentCommand {
|
|
151
|
+
commandId: string;
|
|
152
|
+
spaceId: ID;
|
|
153
|
+
conversationId: ID;
|
|
154
|
+
assignmentId: ID;
|
|
155
|
+
expectedConversationVersion: number;
|
|
156
|
+
actor: AssignmentActorReference;
|
|
157
|
+
requestedAt: Date;
|
|
158
|
+
}
|
|
159
|
+
export type CancelConversationAssignmentRejectionCode = 'conversation_not_found' | 'assignment_not_current' | 'assignment_not_cancellable' | 'actor_not_authorized';
|
|
160
|
+
export type CancelConversationAssignmentResult = {
|
|
161
|
+
status: 'cancelled' | 'already_applied';
|
|
162
|
+
commandId: string;
|
|
163
|
+
conversationId: ID;
|
|
164
|
+
previousVersion: number;
|
|
165
|
+
conversationVersion: number;
|
|
166
|
+
previous?: AssignmentStateReference;
|
|
167
|
+
current: AssignmentStateReference;
|
|
168
|
+
assignmentEventId: ID;
|
|
169
|
+
outboxEventId?: ID;
|
|
170
|
+
} | {
|
|
171
|
+
status: 'version_conflict';
|
|
172
|
+
commandId: string;
|
|
173
|
+
conversationId: ID;
|
|
174
|
+
expectedVersion: number;
|
|
175
|
+
currentVersion: number;
|
|
176
|
+
} | {
|
|
177
|
+
status: 'rejected';
|
|
178
|
+
commandId: string;
|
|
179
|
+
conversationId: ID;
|
|
180
|
+
code: CancelConversationAssignmentRejectionCode;
|
|
181
|
+
};
|
|
@@ -6,6 +6,7 @@ import { IContactAddress, IContactInfo } from "../Contacts/contacts";
|
|
|
6
6
|
import { IEnding } from "./Ending";
|
|
7
7
|
import { ChatType } from "../Chats/Chat";
|
|
8
8
|
import { TransferConversationCommand, TransferConversationResult } from "./Transfer";
|
|
9
|
+
import { AcceptConversationAssignmentCommand, AcceptConversationAssignmentResult, DeclineConversationAssignmentCommand, DeclineConversationAssignmentResult, CancelConversationAssignmentCommand, CancelConversationAssignmentResult } from "./Assignment";
|
|
9
10
|
export interface IConversation {
|
|
10
11
|
id: string;
|
|
11
12
|
spaceId: string;
|
|
@@ -517,6 +518,12 @@ export interface TransferOptionsResponse {
|
|
|
517
518
|
queues: TransferQueueOptionDto[];
|
|
518
519
|
usersByQueue?: Record<ID, TransferUserOptionDto[]>;
|
|
519
520
|
}
|
|
520
|
-
export type StartTransferRequest = Pick<TransferConversationCommand, 'target' | 'expectedConversationVersion' | 'reason'>;
|
|
521
|
+
export type StartTransferRequest = Pick<TransferConversationCommand, 'commandId' | 'target' | 'expectedConversationVersion' | 'reason'>;
|
|
521
522
|
export type StartTransferResponse = TransferConversationResult;
|
|
523
|
+
export type AcceptAssignmentRequest = Pick<AcceptConversationAssignmentCommand, 'commandId' | 'expectedConversationVersion'>;
|
|
524
|
+
export type AcceptAssignmentResponse = AcceptConversationAssignmentResult;
|
|
525
|
+
export type DeclineAssignmentRequest = Pick<DeclineConversationAssignmentCommand, 'commandId' | 'expectedConversationVersion'>;
|
|
526
|
+
export type DeclineAssignmentResponse = DeclineConversationAssignmentResult;
|
|
527
|
+
export type CancelAssignmentRequest = Pick<CancelConversationAssignmentCommand, 'commandId' | 'expectedConversationVersion'>;
|
|
528
|
+
export type CancelAssignmentResponse = CancelConversationAssignmentResult;
|
|
522
529
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ITicketAuditedEntity } from
|
|
1
|
+
import { ITicketAuditedEntity } from "./Common";
|
|
2
2
|
export declare enum TicketApprovalMode {
|
|
3
3
|
SEQUENTIAL = "SEQUENTIAL",
|
|
4
4
|
PARALLEL = "PARALLEL"
|
|
@@ -29,13 +29,13 @@ export interface ITicketApprovalQuorum {
|
|
|
29
29
|
rejectOnAnyRejection?: boolean;
|
|
30
30
|
}
|
|
31
31
|
export type ITicketApprover = {
|
|
32
|
-
type:
|
|
32
|
+
type: "USER";
|
|
33
33
|
userId: string;
|
|
34
34
|
} | {
|
|
35
|
-
type:
|
|
35
|
+
type: "GROUP";
|
|
36
36
|
groupId: string;
|
|
37
37
|
} | {
|
|
38
|
-
type:
|
|
38
|
+
type: "ROLE";
|
|
39
39
|
roleId: string;
|
|
40
40
|
};
|
|
41
41
|
export interface ITicketApprovalStepDefinition {
|
|
@@ -56,6 +56,22 @@ export interface ITicketApprovalProcessDefinition extends ITicketAuditedEntity {
|
|
|
56
56
|
steps: ITicketApprovalStepDefinition[];
|
|
57
57
|
enabled: boolean;
|
|
58
58
|
}
|
|
59
|
+
export interface ICreateTicketApprovalProcessDefinitionDto {
|
|
60
|
+
name: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
categoryIds?: string[];
|
|
63
|
+
mode: TicketApprovalMode;
|
|
64
|
+
steps: ITicketApprovalStepDefinition[];
|
|
65
|
+
enabled: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface IUpdateTicketApprovalProcessDefinitionDto {
|
|
68
|
+
name?: string;
|
|
69
|
+
description?: string | null;
|
|
70
|
+
categoryIds?: string[] | null;
|
|
71
|
+
mode?: TicketApprovalMode;
|
|
72
|
+
steps?: ITicketApprovalStepDefinition[];
|
|
73
|
+
enabled?: boolean;
|
|
74
|
+
}
|
|
59
75
|
export interface ITicketApprovalStep extends ITicketApprovalStepDefinition {
|
|
60
76
|
status: TicketApprovalStatus;
|
|
61
77
|
startedAt?: Date;
|