@trii/types 2.10.775 → 2.10.777
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/Conversations/ConversationPendingTransfer.d.ts +3 -1
- package/dist/Conversations/ConversationTransferRouting.d.ts +77 -0
- package/dist/Conversations/ConversationTransferRouting.js +2 -0
- package/dist/Conversations/index.d.ts +1 -0
- package/dist/Conversations/index.js +1 -0
- package/dist/Users/Signature.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { TransferConversationReason, TransferConversationTarget } from './Transfer';
|
|
2
2
|
/** Single current handoff, not history. Keep assignment unchanged until acceptance.
|
|
3
3
|
* Accept atomically with matching transferId, sourceAssignmentId and Conversation.version.
|
|
4
|
-
* First valid acceptance wins.
|
|
4
|
+
* First valid acceptance wins. Cancel/terminal expiry clears the state without moving source.
|
|
5
|
+
* An automatic offer rejection may requeue this attempt; explicit user rejection ends it.
|
|
5
6
|
* Resolve authorized target audience at query time, checking expiration even before cleanup.
|
|
6
7
|
*/
|
|
7
8
|
export interface ConversationPendingTransfer {
|
|
8
9
|
transferId: string;
|
|
9
10
|
sourceAssignmentId: string;
|
|
11
|
+
/** Effective destination; queue routing may change the selected agent or fallback queue. */
|
|
10
12
|
target: TransferConversationTarget;
|
|
11
13
|
/** Null for automated requests; full actor is recorded in events. */
|
|
12
14
|
requestedByUserId?: string | null;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { IConversation } from './Conversation';
|
|
2
|
+
import type { ConversationAssignmentEvent } from './Assignment';
|
|
3
|
+
export type ConversationTransferRoutingStatus = 'waiting' | 'offered' | 'shared';
|
|
4
|
+
/** Server-side state, never the effective assignment. Missing state identifies a legacy transfer.
|
|
5
|
+
* Match transferId before using it. An offered state requires offerId and offerExpiresAt;
|
|
6
|
+
* clear offer fields when waiting/shared, and clear the state on terminal outcomes.
|
|
7
|
+
*/
|
|
8
|
+
export interface ConversationTransferRoutingState {
|
|
9
|
+
transferId: string;
|
|
10
|
+
status: ConversationTransferRoutingStatus;
|
|
11
|
+
/** Queue-selected offers can retry; an explicit user destination cannot. */
|
|
12
|
+
automatic: boolean;
|
|
13
|
+
queuedAt: Date;
|
|
14
|
+
excludedUsers: string[];
|
|
15
|
+
offerId?: string | null;
|
|
16
|
+
offerExpiresAt?: Date | null;
|
|
17
|
+
/** Supervisor fallback; membership is still checked at acceptance. */
|
|
18
|
+
supervisorOffer?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** Persistence-only fields, deliberately separate from the public IConversation DTO.
|
|
21
|
+
* Notice is serialized JSON for compatibility with existing documents.
|
|
22
|
+
* Event and notice are saved atomically with the transition and cleared after delivery.
|
|
23
|
+
*/
|
|
24
|
+
export interface ConversationTransferPersistence {
|
|
25
|
+
transferRouting?: ConversationTransferRoutingState | null;
|
|
26
|
+
transferRoutingNotice?: string | null;
|
|
27
|
+
transferRoutingEvent?: ConversationAssignmentEvent | null;
|
|
28
|
+
}
|
|
29
|
+
/** HTTP take-options wire response: dates are ISO-8601 UTC strings, not hydrated Date objects.
|
|
30
|
+
* Missing optional flags mean false. The API rechecks authorization when executing an action.
|
|
31
|
+
* conversationId used for client request correlation is not part of this response.
|
|
32
|
+
*/
|
|
33
|
+
export interface ConversationTakeOptions {
|
|
34
|
+
canTake: boolean;
|
|
35
|
+
canReassign: boolean;
|
|
36
|
+
canAcceptTransfer?: boolean;
|
|
37
|
+
canCancelTransfer?: boolean;
|
|
38
|
+
transferId?: string | null;
|
|
39
|
+
queueName?: string | null;
|
|
40
|
+
ownerName?: string | null;
|
|
41
|
+
sourceQueueName?: string | null;
|
|
42
|
+
targetUserName?: string | null;
|
|
43
|
+
requestedAt?: string | null;
|
|
44
|
+
/** Total attempt deadline; not the individual offer deadline. */
|
|
45
|
+
expiresAt?: string | null;
|
|
46
|
+
transferStatus?: ConversationTransferRoutingStatus | null;
|
|
47
|
+
offerExpiresAt?: string | null;
|
|
48
|
+
version?: number | null;
|
|
49
|
+
}
|
|
50
|
+
export type ConversationAssignmentChangeStatus = 'pending' | 'accepted' | 'declined' | 'cancelled' | 'already_applied' | 'version_conflict' | 'rejected';
|
|
51
|
+
/** Pending-transfer HTTP command result, separate from legacy TransferConversationResult.
|
|
52
|
+
* The conversation, when present, is hydrated by the consumer's normal conversation mapper.
|
|
53
|
+
*/
|
|
54
|
+
export interface ConversationAssignmentChangeResult {
|
|
55
|
+
status: ConversationAssignmentChangeStatus;
|
|
56
|
+
commandId: string;
|
|
57
|
+
/** Extensible domain rejection code. */
|
|
58
|
+
code?: string | null;
|
|
59
|
+
transferId?: string | null;
|
|
60
|
+
conversation?: IConversation | null;
|
|
61
|
+
conversationVersion?: number | null;
|
|
62
|
+
}
|
|
63
|
+
export type ConversationTransferNotificationResult = 'accepted' | 'closed' | 'transfer_expired' | 'target_queue_unavailable';
|
|
64
|
+
/** Data in conversation_changed, not a complete conversation.
|
|
65
|
+
* Hints do not grant access: validate incoming offers through take-options.
|
|
66
|
+
* Deduplicate by transferOfferId (legacy fallback: newTransferId); terminal notices
|
|
67
|
+
* use resolvedTransferId + transferResult and are shown to transferRequesterId.
|
|
68
|
+
*/
|
|
69
|
+
export interface ConversationChangedNotification {
|
|
70
|
+
conversationId: string;
|
|
71
|
+
version: number;
|
|
72
|
+
newTransferId?: string | null;
|
|
73
|
+
transferOfferId?: string | null;
|
|
74
|
+
transferResult?: ConversationTransferNotificationResult | null;
|
|
75
|
+
transferRequesterId?: string | null;
|
|
76
|
+
resolvedTransferId?: string | null;
|
|
77
|
+
}
|
|
@@ -29,6 +29,8 @@ export interface ISignatureContact {
|
|
|
29
29
|
image: string;
|
|
30
30
|
}
|
|
31
31
|
export interface ISignatureEditorStyle {
|
|
32
|
+
/** Omitted on existing signatures: use color icons. */
|
|
33
|
+
socialIconStyle?: 'minimal' | 'color';
|
|
32
34
|
/** Explicit email surface; omitted values preserve legacy white signatures. */
|
|
33
35
|
backgroundColor?: string;
|
|
34
36
|
textColor?: string;
|