@trii/types 2.11.5 → 2.11.6
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 +9 -9
- package/dist/Conversations/Classifications/ConversationClassificationEvents.d.ts +2 -2
- package/dist/Conversations/Conversation.d.ts +8 -8
- package/dist/Conversations/Routing.d.ts +10 -10
- package/dist/Events/DomainEventTypes.d.ts +23 -23
- package/dist/Tickets/Approval.d.ts +15 -3
- package/dist/Tickets/Approval.js +14 -5
- package/dist/Tickets/Roles.d.ts +21 -2
- package/dist/Tickets/Task.d.ts +20 -0
- package/dist/Tickets/Ticket.d.ts +11 -3
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AutomationCustomer, AutomationJsonObject, AutomationJsonSchema, AutomationResourceReference, AutomationSourceApplication } from '../Common';
|
|
2
2
|
export declare const AUTOMATION_MESSAGE_SCHEMAS: {
|
|
3
|
-
readonly DOMAIN_EVENT_V1:
|
|
4
|
-
readonly START_REQUEST_V1:
|
|
5
|
-
readonly EXECUTION_WORK_ITEM_V1:
|
|
3
|
+
readonly DOMAIN_EVENT_V1: "automations.domain-event/v1";
|
|
4
|
+
readonly START_REQUEST_V1: "automations.start-request/v1";
|
|
5
|
+
readonly EXECUTION_WORK_ITEM_V1: "automations.execution.work-item/v1";
|
|
6
6
|
};
|
|
7
7
|
export interface AutomationEventDefinition {
|
|
8
8
|
eventType: string;
|
|
@@ -9,25 +9,25 @@ export declare enum CommunicationEndpointKind {
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const providerIdentityNamespaces: {
|
|
11
11
|
readonly meta: {
|
|
12
|
-
readonly instagramUser:
|
|
13
|
-
readonly messengerUser:
|
|
14
|
-
readonly whatsappUser:
|
|
12
|
+
readonly instagramUser: "instagram_user";
|
|
13
|
+
readonly messengerUser: "messenger_user";
|
|
14
|
+
readonly whatsappUser: "whatsapp_user";
|
|
15
15
|
};
|
|
16
16
|
readonly telegram: {
|
|
17
|
-
readonly user:
|
|
18
|
-
readonly chat:
|
|
17
|
+
readonly user: "user";
|
|
18
|
+
readonly chat: "chat";
|
|
19
19
|
};
|
|
20
20
|
readonly trii: {
|
|
21
|
-
readonly webchatVisitor:
|
|
21
|
+
readonly webchatVisitor: "webchat_visitor";
|
|
22
22
|
};
|
|
23
23
|
readonly mercadolibre: {
|
|
24
|
-
readonly buyer:
|
|
24
|
+
readonly buyer: "buyer";
|
|
25
25
|
};
|
|
26
26
|
readonly google: {
|
|
27
|
-
readonly businessMessagesUser:
|
|
27
|
+
readonly businessMessagesUser: "business_messages_user";
|
|
28
28
|
};
|
|
29
29
|
readonly openMessaging: {
|
|
30
|
-
readonly user:
|
|
30
|
+
readonly user: "open_messaging_user";
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
export type KnownIdentityProvider = keyof typeof providerIdentityNamespaces;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ConversationClassificationEvaluationStatus } from './ConversationClassificationEvaluation';
|
|
2
2
|
export declare const CONVERSATION_CLASSIFICATION_EVENT_TYPES: {
|
|
3
|
-
readonly CONVERSATION_RESOLVED_FOR_EVALUATION:
|
|
4
|
-
readonly EVALUATION_FINISHED:
|
|
3
|
+
readonly CONVERSATION_RESOLVED_FOR_EVALUATION: "conversation.resolved-for-classification";
|
|
4
|
+
readonly EVALUATION_FINISHED: "conversation.classification-evaluation-finished";
|
|
5
5
|
};
|
|
6
6
|
export declare const CONVERSATION_CLASSIFICATION_EVENT_SCHEMA_VERSION: 1;
|
|
7
7
|
/**
|
|
@@ -396,7 +396,7 @@ export type ConversationAssignmentSnapshot = {
|
|
|
396
396
|
offerExpiresAt?: never;
|
|
397
397
|
assignedAt?: never;
|
|
398
398
|
acceptedAt?: never;
|
|
399
|
-
} |
|
|
399
|
+
} | QueuedConversationAssignmentBase & {
|
|
400
400
|
status: 'queued' | 'routing';
|
|
401
401
|
initialChannelOwnerUserId?: ID;
|
|
402
402
|
owner: NoConversationOwner;
|
|
@@ -404,7 +404,7 @@ export type ConversationAssignmentSnapshot = {
|
|
|
404
404
|
offerExpiresAt?: never;
|
|
405
405
|
assignedAt?: never;
|
|
406
406
|
acceptedAt?: never;
|
|
407
|
-
}
|
|
407
|
+
} | QueuedConversationAssignmentBase & {
|
|
408
408
|
status: 'offered';
|
|
409
409
|
owner: UserConversationOwner;
|
|
410
410
|
offeredAt: Date;
|
|
@@ -412,14 +412,14 @@ export type ConversationAssignmentSnapshot = {
|
|
|
412
412
|
offerExpiresAt: Date;
|
|
413
413
|
assignedAt?: never;
|
|
414
414
|
acceptedAt?: never;
|
|
415
|
-
}
|
|
415
|
+
} | QueuedConversationAssignmentBase & {
|
|
416
416
|
status: 'assigned';
|
|
417
417
|
owner: UserConversationOwner;
|
|
418
418
|
offeredAt?: null;
|
|
419
419
|
offerExpiresAt?: null;
|
|
420
420
|
assignedAt: Date;
|
|
421
421
|
acceptedAt?: never;
|
|
422
|
-
}
|
|
422
|
+
} | QueuedConversationAssignmentBase & {
|
|
423
423
|
status: 'accepted';
|
|
424
424
|
owner: UserConversationOwner;
|
|
425
425
|
/** Present after accepting an offer; absent/null when taking work directly. */
|
|
@@ -427,7 +427,7 @@ export type ConversationAssignmentSnapshot = {
|
|
|
427
427
|
offerExpiresAt?: null;
|
|
428
428
|
assignedAt: Date;
|
|
429
429
|
acceptedAt: Date;
|
|
430
|
-
}
|
|
430
|
+
};
|
|
431
431
|
export type ActorType = 'user' | 'contact' | 'bot' | 'flow' | 'system';
|
|
432
432
|
export type ParticipantRole = 'owner' | 'collaborator' | 'follower' | 'mentioned' | 'supervisor' | 'bot' | 'flow' | 'historical';
|
|
433
433
|
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';
|
|
@@ -461,15 +461,15 @@ interface ConversationSubscriptionBase {
|
|
|
461
461
|
* A subscription is persistent product intent. Assignment or participation
|
|
462
462
|
* visibility must not create it unless an explicit auto-follow policy applies.
|
|
463
463
|
*/
|
|
464
|
-
export type ConversationSubscription =
|
|
464
|
+
export type ConversationSubscription = ConversationSubscriptionBase & {
|
|
465
465
|
status: 'following';
|
|
466
466
|
followedAt: Date;
|
|
467
467
|
unfollowedAt?: never;
|
|
468
|
-
}
|
|
468
|
+
} | ConversationSubscriptionBase & {
|
|
469
469
|
status: 'unfollowed';
|
|
470
470
|
followedAt: Date;
|
|
471
471
|
unfollowedAt: Date;
|
|
472
|
-
}
|
|
472
|
+
};
|
|
473
473
|
export interface PutConversationSubscriptionRequest {
|
|
474
474
|
expectedVersion?: number;
|
|
475
475
|
notifications: ConversationSubscriptionNotifications;
|
|
@@ -21,27 +21,27 @@ export interface PartyOwnerAssigneeResolver {
|
|
|
21
21
|
mode: 'prefer' | 'required';
|
|
22
22
|
}
|
|
23
23
|
export type QueueOwnerAssigneeResolver = PartyOwnerAssigneeResolver;
|
|
24
|
-
export type QueueRoutingPolicy =
|
|
24
|
+
export type QueueRoutingPolicy = QueueRoutingPolicyBase & {
|
|
25
25
|
distributionMode: 'shared';
|
|
26
26
|
strategy?: never;
|
|
27
27
|
ownerResolver?: never;
|
|
28
|
-
}
|
|
28
|
+
} | QueueRoutingPolicyBase & {
|
|
29
29
|
distributionMode: 'manual_pull';
|
|
30
30
|
strategy?: never;
|
|
31
31
|
ownerResolver?: never;
|
|
32
|
-
}
|
|
32
|
+
} | QueueRoutingPolicyBase & {
|
|
33
33
|
distributionMode: 'exclusive';
|
|
34
34
|
strategy: QueueRoutingStrategy;
|
|
35
|
-
ownerResolver?: undefined |
|
|
35
|
+
ownerResolver?: undefined | PartyOwnerAssigneeResolver & {
|
|
36
36
|
mode: 'prefer';
|
|
37
|
-
}
|
|
38
|
-
}
|
|
37
|
+
};
|
|
38
|
+
} | QueueRoutingPolicyBase & {
|
|
39
39
|
distributionMode: 'exclusive';
|
|
40
40
|
strategy?: never;
|
|
41
41
|
ownerResolver: PartyOwnerAssigneeResolver & {
|
|
42
42
|
mode: 'required';
|
|
43
43
|
};
|
|
44
|
-
}
|
|
44
|
+
};
|
|
45
45
|
export type QueueRoutingConfig = QueueRoutingPolicy & {
|
|
46
46
|
queueId: string;
|
|
47
47
|
spaceId: string;
|
|
@@ -128,15 +128,15 @@ export type PartyOwnerAssigneeEvaluation = {
|
|
|
128
128
|
}>;
|
|
129
129
|
outcome: 'selected';
|
|
130
130
|
nextStep?: never;
|
|
131
|
-
} |
|
|
131
|
+
} | FailedPartyOwnerEvaluation & {
|
|
132
132
|
type: 'party_owner';
|
|
133
133
|
mode: 'prefer';
|
|
134
134
|
nextStep: 'strategy';
|
|
135
|
-
}
|
|
135
|
+
} | FailedPartyOwnerEvaluation & {
|
|
136
136
|
type: 'party_owner';
|
|
137
137
|
mode: 'required';
|
|
138
138
|
nextStep: 'fallback';
|
|
139
|
-
}
|
|
139
|
+
};
|
|
140
140
|
export interface RoutingDecision {
|
|
141
141
|
decisionId: string;
|
|
142
142
|
spaceId: string;
|
|
@@ -9,39 +9,39 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const DOMAIN_EVENT_TYPES: {
|
|
11
11
|
readonly AUTOMATIONS: {
|
|
12
|
-
readonly MANUAL:
|
|
13
|
-
readonly SCHEDULE_TICK:
|
|
12
|
+
readonly MANUAL: "automations.manual";
|
|
13
|
+
readonly SCHEDULE_TICK: "automations.schedule.tick";
|
|
14
14
|
};
|
|
15
15
|
readonly CONTACTS: {
|
|
16
|
-
readonly CONTACT_CREATED:
|
|
17
|
-
readonly BUSINESS_CREATED:
|
|
18
|
-
readonly PROPERTY_CHANGED:
|
|
19
|
-
readonly TAG_ADDED:
|
|
20
|
-
readonly TAG_REMOVED:
|
|
21
|
-
readonly PROPERTY_DATE_REACHED:
|
|
16
|
+
readonly CONTACT_CREATED: "contacts.contact.created";
|
|
17
|
+
readonly BUSINESS_CREATED: "contacts.business.created";
|
|
18
|
+
readonly PROPERTY_CHANGED: "contacts.property.changed";
|
|
19
|
+
readonly TAG_ADDED: "contacts.tag.added";
|
|
20
|
+
readonly TAG_REMOVED: "contacts.tag.removed";
|
|
21
|
+
readonly PROPERTY_DATE_REACHED: "contacts.property.date_reached";
|
|
22
22
|
};
|
|
23
23
|
readonly CONVERSATIONS: {
|
|
24
|
-
readonly CONVERSATION_CREATED:
|
|
25
|
-
readonly CONVERSATION_CLOSED:
|
|
26
|
-
readonly MESSAGE_RECEIVED:
|
|
27
|
-
readonly AGENT_INTERVENED:
|
|
24
|
+
readonly CONVERSATION_CREATED: "conversations.conversation.created";
|
|
25
|
+
readonly CONVERSATION_CLOSED: "conversations.conversation.closed";
|
|
26
|
+
readonly MESSAGE_RECEIVED: "conversations.message.received";
|
|
27
|
+
readonly AGENT_INTERVENED: "conversations.agent.intervened";
|
|
28
28
|
};
|
|
29
29
|
readonly TICKETS: {
|
|
30
|
-
readonly CREATED:
|
|
31
|
-
readonly STATUS_CHANGED:
|
|
32
|
-
readonly PRIORITY_CHANGED:
|
|
33
|
-
readonly ASSIGNED:
|
|
34
|
-
readonly CUSTOMER_REPLIED:
|
|
35
|
-
readonly SLA_WARNING:
|
|
36
|
-
readonly SLA_BREACHED:
|
|
37
|
-
readonly CLOSED:
|
|
38
|
-
readonly REOPENED:
|
|
30
|
+
readonly CREATED: "tickets.created";
|
|
31
|
+
readonly STATUS_CHANGED: "tickets.status_changed";
|
|
32
|
+
readonly PRIORITY_CHANGED: "tickets.priority_changed";
|
|
33
|
+
readonly ASSIGNED: "tickets.assigned";
|
|
34
|
+
readonly CUSTOMER_REPLIED: "tickets.customer_replied";
|
|
35
|
+
readonly SLA_WARNING: "tickets.sla_warning";
|
|
36
|
+
readonly SLA_BREACHED: "tickets.sla_breached";
|
|
37
|
+
readonly CLOSED: "tickets.closed";
|
|
38
|
+
readonly REOPENED: "tickets.reopened";
|
|
39
39
|
};
|
|
40
40
|
readonly FORMS: {
|
|
41
|
-
readonly SUBMITTED:
|
|
41
|
+
readonly SUBMITTED: "forms.submitted";
|
|
42
42
|
};
|
|
43
43
|
readonly INTEGRATIONS: {
|
|
44
|
-
readonly WEBHOOK_RECEIVED:
|
|
44
|
+
readonly WEBHOOK_RECEIVED: "integrations.webhook.received";
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
type Values<T> = T extends unknown ? T[keyof T] : never;
|
|
@@ -9,12 +9,20 @@ export declare enum TicketApprovalDecisionType {
|
|
|
9
9
|
APPROVE = "APPROVE",
|
|
10
10
|
REJECT = "REJECT"
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* What a process gates: CLOSE = a move into a final status (`isFinal`; before 2.11.6 a
|
|
14
|
+
* transition into a CLOSED-stage status); RESOLVE = a /resolve request, only on processes
|
|
15
|
+
* started before closes were gated.
|
|
16
|
+
*/
|
|
13
17
|
export declare enum TicketApprovalAction {
|
|
14
18
|
RESOLVE = "RESOLVE",
|
|
15
19
|
CLOSE = "CLOSE"
|
|
16
20
|
}
|
|
17
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* What the replay of the approved action did; the *_FAILED values leave the process APPROVED.
|
|
23
|
+
* Only processes started before 2.11.6 replay anything: since then the ticket moves when the
|
|
24
|
+
* approval is requested, so their outcome stays absent.
|
|
25
|
+
*/
|
|
18
26
|
export declare enum TicketApprovalOutcome {
|
|
19
27
|
RESOLVED = "RESOLVED",
|
|
20
28
|
RESOLVE_FAILED = "RESOLVE_FAILED",
|
|
@@ -133,7 +141,11 @@ export interface IDecideTicketApprovalDto {
|
|
|
133
141
|
decision: TicketApprovalDecisionType;
|
|
134
142
|
comment?: string;
|
|
135
143
|
}
|
|
136
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* @deprecated Since 2.11.6 a move that needs an approval answers 200 with the moved ticket
|
|
146
|
+
* (`approvalStatus: PENDING`). Was the 202 body of POST /tickets/{id}/transition when a close
|
|
147
|
+
* needed an approval first and the ticket stayed in place.
|
|
148
|
+
*/
|
|
137
149
|
export interface ITicketApprovalRequiredResponse {
|
|
138
150
|
approvalRequired: true;
|
|
139
151
|
approval: ITicketApprovalProcess;
|
package/dist/Tickets/Approval.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Approvals (S18 model): a definition is bound to categories and lists the users who may approve.
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
3
|
+
// Moving a ticket of one of those categories into a final status (`isFinal`) moves it right away
|
|
4
|
+
// and starts a process that ends with ONE decision by any listed approver except the ticket's
|
|
5
|
+
// current assignee and the requester. A rejection moves the ticket back to the status it had
|
|
6
|
+
// before that move. No steps, queues, mode or quorum.
|
|
6
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
8
|
exports.TicketApprovalErrorDetailCode = exports.TicketApprovalErrorCode = exports.TicketApprovalViewerBlockedReason = exports.TicketApprovalOutcome = exports.TicketApprovalAction = exports.TicketApprovalDecisionType = exports.TicketApprovalStatus = void 0;
|
|
8
9
|
/** Status of an approval process. */
|
|
@@ -18,13 +19,21 @@ var TicketApprovalDecisionType;
|
|
|
18
19
|
TicketApprovalDecisionType["APPROVE"] = "APPROVE";
|
|
19
20
|
TicketApprovalDecisionType["REJECT"] = "REJECT";
|
|
20
21
|
})(TicketApprovalDecisionType || (exports.TicketApprovalDecisionType = TicketApprovalDecisionType = {}));
|
|
21
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* What a process gates: CLOSE = a move into a final status (`isFinal`; before 2.11.6 a
|
|
24
|
+
* transition into a CLOSED-stage status); RESOLVE = a /resolve request, only on processes
|
|
25
|
+
* started before closes were gated.
|
|
26
|
+
*/
|
|
22
27
|
var TicketApprovalAction;
|
|
23
28
|
(function (TicketApprovalAction) {
|
|
24
29
|
TicketApprovalAction["RESOLVE"] = "RESOLVE";
|
|
25
30
|
TicketApprovalAction["CLOSE"] = "CLOSE";
|
|
26
31
|
})(TicketApprovalAction || (exports.TicketApprovalAction = TicketApprovalAction = {}));
|
|
27
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* What the replay of the approved action did; the *_FAILED values leave the process APPROVED.
|
|
34
|
+
* Only processes started before 2.11.6 replay anything: since then the ticket moves when the
|
|
35
|
+
* approval is requested, so their outcome stays absent.
|
|
36
|
+
*/
|
|
28
37
|
var TicketApprovalOutcome;
|
|
29
38
|
(function (TicketApprovalOutcome) {
|
|
30
39
|
TicketApprovalOutcome["RESOLVED"] = "RESOLVED";
|
package/dist/Tickets/Roles.d.ts
CHANGED
|
@@ -11,9 +11,13 @@ export type TicketPermission = "tickets.assign_others" | "tickets.delete" | "tic
|
|
|
11
11
|
/**
|
|
12
12
|
* Which tickets a role lets its holder see, narrowest to widest:
|
|
13
13
|
* `own` (assigned to the user, plus QUEUED tickets of the queues of the user's
|
|
14
|
-
* groups)
|
|
14
|
+
* groups), `supervised` (what `own` sees plus every ticket of the role's
|
|
15
|
+
* `supervisedGroupIds`: assigned to one of those groups, assigned to a live
|
|
16
|
+
* member of one of them, or QUEUED in a queue they work; whoever holds the
|
|
17
|
+
* ticket) and `all` (every ticket of the space). A user with several roles gets
|
|
18
|
+
* the widest scope.
|
|
15
19
|
*/
|
|
16
|
-
export type TicketVisibilityScope = "own" | "all";
|
|
20
|
+
export type TicketVisibilityScope = "own" | "supervised" | "all";
|
|
17
21
|
/** Who holds a role assignment: a user or a ticket group. */
|
|
18
22
|
export type TicketRoleSubjectType = "user" | "group";
|
|
19
23
|
/** Number of users and groups holding a role. */
|
|
@@ -27,6 +31,11 @@ export interface ITicketRole {
|
|
|
27
31
|
name: string;
|
|
28
32
|
description: string | null;
|
|
29
33
|
visibilityScope: TicketVisibilityScope;
|
|
34
|
+
/**
|
|
35
|
+
* Groups whose tickets a `supervised` role sees (at least one; the holder need
|
|
36
|
+
* not belong to them). `[]` for any other scope. Always present.
|
|
37
|
+
*/
|
|
38
|
+
supervisedGroupIds: string[];
|
|
30
39
|
permissions: TicketPermission[];
|
|
31
40
|
isDefault: boolean;
|
|
32
41
|
/** The seeded "Administrador" role: renamable, never reduced nor deleted. */
|
|
@@ -59,6 +68,12 @@ export interface ICreateTicketRoleDto {
|
|
|
59
68
|
name: string;
|
|
60
69
|
description?: string | null;
|
|
61
70
|
visibilityScope: TicketVisibilityScope;
|
|
71
|
+
/**
|
|
72
|
+
* Required with scope `supervised`: at least one live ticket group of the space
|
|
73
|
+
* (else 422 on this field). Ignored and stored as `[]` with any other scope. On
|
|
74
|
+
* PATCH, omitted keeps the stored groups.
|
|
75
|
+
*/
|
|
76
|
+
supervisedGroupIds?: string[];
|
|
62
77
|
permissions: TicketPermission[];
|
|
63
78
|
isDefault?: boolean;
|
|
64
79
|
}
|
|
@@ -80,6 +95,10 @@ export interface ITicketActorAccess {
|
|
|
80
95
|
/** Effective roles: assigned directly or through a group, else the default role. */
|
|
81
96
|
roleIds: string[];
|
|
82
97
|
scope: TicketVisibilityScope;
|
|
98
|
+
/** Union of the groups of the user's `supervised` roles; `[]` unless `scope` is `supervised`. */
|
|
99
|
+
supervisedGroupIds: string[];
|
|
100
|
+
/** Live members of `supervisedGroupIds`: the tickets assigned to them are visible. */
|
|
101
|
+
supervisedMemberIds: string[];
|
|
83
102
|
permissions: TicketPermission[];
|
|
84
103
|
/** Holds the system "Administrador" role. */
|
|
85
104
|
isAdministrador: boolean;
|
package/dist/Tickets/Task.d.ts
CHANGED
|
@@ -142,3 +142,23 @@ export interface TicketTaskListResult {
|
|
|
142
142
|
tasks: ITicketTask[];
|
|
143
143
|
dependencies: ITicketTaskDependency[];
|
|
144
144
|
}
|
|
145
|
+
/** The ticket a task belongs to, reduced to what a task list needs to link and label it. */
|
|
146
|
+
export interface IMyTaskTicketSummary {
|
|
147
|
+
id: string;
|
|
148
|
+
number: number;
|
|
149
|
+
title: string;
|
|
150
|
+
}
|
|
151
|
+
/** Item of GET /tasks/mine: a task assigned to the requesting user, with its ticket. */
|
|
152
|
+
export interface IMyTaskListItem extends ITicketTask {
|
|
153
|
+
ticket: IMyTaskTicketSummary;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Response of GET /tasks/mine (?limit=1..100, default 50): the requesting user's open tasks on
|
|
157
|
+
* tickets they can see, due soonest first (no due date last), then newest.
|
|
158
|
+
* `total` and `overdue` count every such task, NOT capped by `limit`.
|
|
159
|
+
*/
|
|
160
|
+
export interface IMyTaskListResult {
|
|
161
|
+
tasks: IMyTaskListItem[];
|
|
162
|
+
total: number;
|
|
163
|
+
overdue: number;
|
|
164
|
+
}
|
package/dist/Tickets/Ticket.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ITicketAttachment, ITicketContactProjection, ITicketExternalReference,
|
|
|
3
3
|
import { ITicketFormSubmissionReference, TicketActivityType } from "./Workflow";
|
|
4
4
|
import { ITicketSlaState } from "./Sla";
|
|
5
5
|
import { ITicketSecurityState } from "./Security";
|
|
6
|
-
import { ITicketApprovalSummary } from "./Approval";
|
|
6
|
+
import { ITicketApprovalSummary, TicketApprovalStatus } from "./Approval";
|
|
7
7
|
import { ITicketAssignedTaskSummary, ITicketTaskSummary } from "./Task";
|
|
8
8
|
import { ITicketConversationReference, TicketMessageActorType } from "./Conversation";
|
|
9
9
|
import { ITicketRoutingState } from "./Routing";
|
|
@@ -97,8 +97,16 @@ export interface ITicket {
|
|
|
97
97
|
/** What happened last on the ticket; null when nothing was recorded yet. */
|
|
98
98
|
lastActivity?: ITicketLastActivity | null;
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
101
|
-
*
|
|
100
|
+
* State of the ticket's latest approval: PENDING while a move into a final status waits for a
|
|
101
|
+
* decision (the ticket is already in that status), then APPROVED or REJECTED. Null when the
|
|
102
|
+
* ticket never needed an approval.
|
|
103
|
+
*/
|
|
104
|
+
approvalStatus?: TicketApprovalStatus | null;
|
|
105
|
+
/** When `approvalStatus` was last set (request time for PENDING, decision time otherwise). */
|
|
106
|
+
approvalStatusAt?: Date | null;
|
|
107
|
+
/**
|
|
108
|
+
* @deprecated Since 2.11.6 the API sends `approvalStatus` / `approvalStatusAt` instead
|
|
109
|
+
* (REJECTED replaces this mark).
|
|
102
110
|
*/
|
|
103
111
|
approvalRejectedAt?: Date;
|
|
104
112
|
createdAt: Date;
|