@trii/types 2.10.729 → 2.10.730
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 +8 -8
- 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/Events/DomainEventTypes.d.ts +23 -23
- package/dist/Tickets/Common.d.ts +62 -0
- package/dist/Tickets/CustomerNotification.d.ts +192 -0
- package/dist/Tickets/CustomerNotification.js +54 -0
- package/dist/Tickets/Notes.d.ts +13 -0
- package/dist/Tickets/Notes.js +10 -0
- package/dist/Tickets/QuickResponse.d.ts +64 -0
- package/dist/Tickets/QuickResponse.js +41 -0
- package/dist/Tickets/Task.d.ts +11 -0
- package/dist/Tickets/Ticket.d.ts +2 -0
- package/dist/Tickets/index.d.ts +3 -0
- package/dist/Tickets/index.js +3 -0
- package/dist/src/Common/Channels/Channel.d.ts +1 -28
- package/dist/src/Common/Channels/Email.d.ts +0 -1
- package/dist/src/Common/Channels/Facebook.d.ts +0 -1
- package/dist/src/Common/Channels/Form.d.ts +0 -1
- package/dist/src/Common/Channels/GoogleBusiness.d.ts +0 -1
- package/dist/src/Common/Channels/Instagram.d.ts +0 -1
- package/dist/src/Common/Channels/MercadoLibre.d.ts +0 -1
- package/dist/src/Common/Channels/WebChat.d.ts +0 -1
- package/dist/src/Contacts/contacts.d.ts +2 -2
- package/dist/src/Contacts/index.d.ts +0 -2
- package/dist/src/Contacts/index.js +0 -2
- package/dist/src/Conversations/Conversation.d.ts +48 -410
- 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/PublicAPI/apiKey.d.ts +3 -92
- package/dist/src/PublicAPI/apiKey.js +0 -27
- package/dist/src/Tickets/AI.d.ts +2 -50
- package/dist/src/Tickets/AdvancedApi.d.ts +2 -142
- package/dist/src/Tickets/AdvancedApi.js +1 -28
- package/dist/src/Tickets/Approval.d.ts +4 -20
- package/dist/src/Tickets/Automation.d.ts +2 -46
- 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 -4
- package/dist/src/Tickets/Layouts.d.ts +1 -3
- package/dist/src/Tickets/Routing.d.ts +3 -105
- package/dist/src/Tickets/Routing.js +1 -7
- package/dist/src/Tickets/Security.d.ts +4 -271
- package/dist/src/Tickets/Security.js +1 -10
- package/dist/src/Tickets/SelfService.d.ts +0 -190
- package/dist/src/Tickets/Sla.d.ts +0 -140
- 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 -4
- package/dist/src/index.js +1 -5
- package/package.json +12 -12
- 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 -96
- package/dist/src/Automations/Events/Event.js +0 -19
- 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 -298
- package/dist/src/Automations/Executions/Execution.js +0 -76
- 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 -109
- package/dist/src/Automations/Flows/Canvas.js +0 -43
- package/dist/src/Automations/Flows/Flow.d.ts +0 -154
- 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 -116
- 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/Triggers/Trigger.d.ts +0 -112
- package/dist/src/Automations/Triggers/Trigger.js +0 -66
- package/dist/src/Automations/Triggers/index.d.ts +0 -1
- package/dist/src/Automations/Triggers/index.js +0 -17
- package/dist/src/Automations/index.d.ts +0 -7
- package/dist/src/Automations/index.js +0 -23
- package/dist/src/Chats/Chat.d.ts +0 -61
- package/dist/src/Chats/Chat.js +0 -28
- package/dist/src/Contacts/CommunicationEndpoint.d.ts +0 -107
- package/dist/src/Contacts/CommunicationEndpoint.js +0 -39
- package/dist/src/Contacts/CommunicationMethod.d.ts +0 -9
- package/dist/src/Contacts/CommunicationMethod.js +0 -2
- package/dist/src/Conversations/Assignment.d.ts +0 -181
- 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/Events/DomainEventTypes.d.ts +0 -51
- package/dist/src/Events/DomainEventTypes.js +0 -49
- package/dist/src/Events/index.d.ts +0 -1
- package/dist/src/Events/index.js +0 -17
- 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
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import type { ChannelType } from "../Common/Channels/ChannelType";
|
|
2
|
+
import type { ITicketAuditedEntity } from "./Common";
|
|
3
|
+
import type { TicketNotificationEvent } from "./SelfService";
|
|
4
|
+
/**
|
|
5
|
+
* Ticket-relative recipient roles for CUSTOMER notifications only.
|
|
6
|
+
* Intentionally excludes any agent/internal-group role — this is the
|
|
7
|
+
* enforcement point that keeps internal recipients out of customer-facing
|
|
8
|
+
* notifications.
|
|
9
|
+
*/
|
|
10
|
+
export declare enum CustomerNotificationRecipientRole {
|
|
11
|
+
REQUESTER = "REQUESTER",
|
|
12
|
+
PARTICIPANT_CONTACTS = "PARTICIPANT_CONTACTS",
|
|
13
|
+
ACTION_ASSIGNEE = "ACTION_ASSIGNEE",
|
|
14
|
+
EXTERNAL_APPROVER = "EXTERNAL_APPROVER",
|
|
15
|
+
/** Members of the organization that have access to the ticket. */
|
|
16
|
+
ORGANIZATION_MEMBERS = "ORGANIZATION_MEMBERS",
|
|
17
|
+
/** Other external recipients defined by the domain/integration. */
|
|
18
|
+
OTHER_EXTERNAL_CONTACTS = "OTHER_EXTERNAL_CONTACTS"
|
|
19
|
+
}
|
|
20
|
+
/** Per event+channel+locale template selection. `templateId` points at a template SET id; `(channel, locale)` selects the VARIANT inside that set. */
|
|
21
|
+
export interface ICustomerNotificationTemplateBinding {
|
|
22
|
+
channel: ChannelType;
|
|
23
|
+
locale: string;
|
|
24
|
+
templateId: string;
|
|
25
|
+
}
|
|
26
|
+
/** Granular flags describing what the CUSTOMER may do for this event. Mandatory events MUST keep `canDisable: false`. */
|
|
27
|
+
export interface ICustomerNotificationEventCustomerPersonalization {
|
|
28
|
+
/** Customer may turn this event off entirely. */
|
|
29
|
+
canDisable: boolean;
|
|
30
|
+
/** Customer may pick which channels this event notifies them on. */
|
|
31
|
+
canChooseChannels: boolean;
|
|
32
|
+
/** Customer may mute this event for a single ticket. */
|
|
33
|
+
canMutePerTicket: boolean;
|
|
34
|
+
/** Customer may restore this event to the inherited/general values. */
|
|
35
|
+
canRestoreDefaults: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** One configured `TicketNotificationEvent` inside a policy. */
|
|
38
|
+
export interface ICustomerNotificationEventConfig {
|
|
39
|
+
event: TicketNotificationEvent;
|
|
40
|
+
enabled: boolean;
|
|
41
|
+
/** Mandatory events cannot be disabled or muted. */
|
|
42
|
+
mandatory: boolean;
|
|
43
|
+
customerPersonalization: ICustomerNotificationEventCustomerPersonalization;
|
|
44
|
+
recipients: CustomerNotificationRecipientRole[];
|
|
45
|
+
channels: ChannelType[];
|
|
46
|
+
/**
|
|
47
|
+
* Admin-chosen fallback channel used ONLY when the contact lacks the data
|
|
48
|
+
* required for the primary channel — per-event, explicit, NOT an automatic
|
|
49
|
+
* global fallback. `null` = no alternative; the resolver surfaces a WARNING
|
|
50
|
+
* instead of substituting silently.
|
|
51
|
+
*/
|
|
52
|
+
alternativeChannel: ChannelType | null;
|
|
53
|
+
templates: ICustomerNotificationTemplateBinding[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Space-general (`portalId: null`) or per-portal (`portalId: string`)
|
|
57
|
+
* customer notification policy. Persisted as a single row with `events` as a
|
|
58
|
+
* JSONB array.
|
|
59
|
+
*/
|
|
60
|
+
export interface ITicketCustomerNotificationPolicy extends ITicketAuditedEntity {
|
|
61
|
+
portalId: string | null;
|
|
62
|
+
enabled: boolean;
|
|
63
|
+
/** Policy display name. */
|
|
64
|
+
name?: string;
|
|
65
|
+
/** Policy display description. */
|
|
66
|
+
description?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Policy-level master switch. When `false`, the resolver ignores the
|
|
69
|
+
* contact's `ITicketCustomerNotificationPreference` ENTIRELY for this
|
|
70
|
+
* policy — the general/portal policy's own decisions always apply,
|
|
71
|
+
* ticket-mute is never honored, and no event resolves with
|
|
72
|
+
* `origin: 'individual'`/`'muted'`. `true` (the column default) preserves
|
|
73
|
+
* default behavior.
|
|
74
|
+
*/
|
|
75
|
+
respectIndividualPreferences: boolean;
|
|
76
|
+
defaultLocale: string;
|
|
77
|
+
fallbackLocale: string;
|
|
78
|
+
senderName?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Opaque reference to a conversations-service email `IChannel.id`. Stored
|
|
81
|
+
* only; never resolved or validated against the conversations service.
|
|
82
|
+
* Kept as the EMAIL-only fallback for backward-compat — prefer
|
|
83
|
+
* `senderIdentityByChannel[EMAIL]` going forward.
|
|
84
|
+
*/
|
|
85
|
+
senderIdentityId?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Per-channel opaque sender-identity id override — a channel id (same
|
|
88
|
+
* `IChannel.id` reference as `senderIdentityId`) keyed by `ChannelType`.
|
|
89
|
+
*/
|
|
90
|
+
senderIdentityByChannel?: Partial<Record<ChannelType, string>>;
|
|
91
|
+
replyToAddress?: string;
|
|
92
|
+
events: ICustomerNotificationEventConfig[];
|
|
93
|
+
}
|
|
94
|
+
/** HTML/TEXT content type. Numeric values mirror Marketing's shape by design. */
|
|
95
|
+
export declare enum TemplateContentType {
|
|
96
|
+
HTML = 1,
|
|
97
|
+
TEXT = 2
|
|
98
|
+
}
|
|
99
|
+
/** Per-variant lifecycle status. `DISABLED` keeps the variant persisted while making the `DISABLED_TEMPLATE` warning fire for any event still referencing it. */
|
|
100
|
+
export declare enum TemplateVariantStatus {
|
|
101
|
+
ENABLED = "ENABLED",
|
|
102
|
+
DISABLED = "DISABLED"
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* One channel+locale variant of a template set's content. `name` is an
|
|
106
|
+
* INTERNAL, admin-only label — never rendered to the customer. `signature` is
|
|
107
|
+
* per-variant free text.
|
|
108
|
+
*/
|
|
109
|
+
export interface ICustomerNotificationTemplateVariant {
|
|
110
|
+
channel: ChannelType;
|
|
111
|
+
locale: string;
|
|
112
|
+
/** Internal name, never shown to the customer. */
|
|
113
|
+
name: string;
|
|
114
|
+
subject?: string;
|
|
115
|
+
content: string;
|
|
116
|
+
signature?: string;
|
|
117
|
+
/** Variable keys (from the vetted catalog) referenced by this variant's content. */
|
|
118
|
+
allowedVariables: string[];
|
|
119
|
+
contentType: TemplateContentType;
|
|
120
|
+
status: TemplateVariantStatus;
|
|
121
|
+
version: number;
|
|
122
|
+
}
|
|
123
|
+
/** One template SET per `TicketNotificationEvent`, holding every channel+locale VARIANT for that event. */
|
|
124
|
+
export interface ITicketCustomerNotificationTemplateSet extends ITicketAuditedEntity {
|
|
125
|
+
event: TicketNotificationEvent;
|
|
126
|
+
name: string;
|
|
127
|
+
variants: ICustomerNotificationTemplateVariant[];
|
|
128
|
+
}
|
|
129
|
+
export type ResolvedEventOrigin = "general" | "portal" | "individual" | "mandatory" | "muted";
|
|
130
|
+
/**
|
|
131
|
+
* Channel-agnostic warning codes the resolver can determine structurally.
|
|
132
|
+
* A strict subset of any richer client-side diagnostic code set.
|
|
133
|
+
*/
|
|
134
|
+
export type ResolvedWarningCode = "EVENT_ACTIVE_WITHOUT_CHANNEL" | "EVENT_ACTIVE_WITHOUT_TEMPLATE" | "EVENT_ACTIVE_WITHOUT_RECIPIENTS" | "LANGUAGE_WITHOUT_TEMPLATE_OR_FALLBACK" | "INCOMPATIBLE_RECIPIENTS" | "MANDATORY_EVENT_ALLOWS_MUTE" | "PORTAL_DISABLED" | "DISABLED_TEMPLATE" | "INTERNAL_INFO_EXPOSING_VARIABLES" | "CUSTOMER_INVISIBLE_TEMPLATE_FIELDS";
|
|
135
|
+
export interface IResolvedCustomerNotificationWarning {
|
|
136
|
+
code: ResolvedWarningCode;
|
|
137
|
+
/** Omitted for policy-level codes (currently only `PORTAL_DISABLED`). */
|
|
138
|
+
event?: TicketNotificationEvent;
|
|
139
|
+
}
|
|
140
|
+
export interface IResolvedCustomerNotificationEventConfig {
|
|
141
|
+
event: TicketNotificationEvent;
|
|
142
|
+
enabled: boolean;
|
|
143
|
+
mandatory: boolean;
|
|
144
|
+
customerPersonalization: ICustomerNotificationEventCustomerPersonalization;
|
|
145
|
+
origin: ResolvedEventOrigin;
|
|
146
|
+
recipients: CustomerNotificationRecipientRole[];
|
|
147
|
+
/** Channels actually used after `alternativeChannel` substitution (if any). */
|
|
148
|
+
channels: ChannelType[];
|
|
149
|
+
/** Channels requested by the policy/preference, before substitution. */
|
|
150
|
+
requestedChannels: ChannelType[];
|
|
151
|
+
senderIdentityByChannel: Partial<Record<ChannelType, string>>;
|
|
152
|
+
/** The admin-configured substitute channel (verbatim from the stored event). `null` = none. */
|
|
153
|
+
alternativeChannel: ChannelType | null;
|
|
154
|
+
alternativeChannelApplied: boolean;
|
|
155
|
+
warning?: string;
|
|
156
|
+
templates: ICustomerNotificationTemplateBinding[];
|
|
157
|
+
resolvedTemplate?: ICustomerNotificationTemplateBinding;
|
|
158
|
+
}
|
|
159
|
+
export interface IResolvedCustomerNotificationConfig {
|
|
160
|
+
spaceId: string;
|
|
161
|
+
portalId: string | null;
|
|
162
|
+
policyOrigin: "portal" | "general";
|
|
163
|
+
defaultLocale: string;
|
|
164
|
+
fallbackLocale: string;
|
|
165
|
+
senderName?: string;
|
|
166
|
+
senderIdentityId?: string;
|
|
167
|
+
senderIdentityByChannel?: Partial<Record<ChannelType, string>>;
|
|
168
|
+
replyToAddress?: string;
|
|
169
|
+
/** Whole-ticket mute flag (from the preference's muted ticket ids). */
|
|
170
|
+
muted: boolean;
|
|
171
|
+
events: IResolvedCustomerNotificationEventConfig[];
|
|
172
|
+
warnings: IResolvedCustomerNotificationWarning[];
|
|
173
|
+
}
|
|
174
|
+
type AuditedEntityKeys = keyof ITicketAuditedEntity;
|
|
175
|
+
export type CreateCustomerNotificationPolicyDto = Omit<ITicketCustomerNotificationPolicy, AuditedEntityKeys | "enabled" | "respectIndividualPreferences"> & Partial<Pick<ITicketCustomerNotificationPolicy, "enabled" | "respectIndividualPreferences">>;
|
|
176
|
+
/**
|
|
177
|
+
* The clearable optionals are nullable: `null` explicitly CLEARS the stored
|
|
178
|
+
* value on a PATCH while an omitted key leaves it untouched. Do NOT narrow
|
|
179
|
+
* these back to `string | undefined` — that would make it impossible to erase
|
|
180
|
+
* an already-saved sender/reply-to/name.
|
|
181
|
+
*/
|
|
182
|
+
export type UpdateCustomerNotificationPolicyDto = Partial<Omit<CreateCustomerNotificationPolicyDto, "name" | "description" | "senderName" | "senderIdentityId" | "senderIdentityByChannel" | "replyToAddress">> & {
|
|
183
|
+
name?: string | null;
|
|
184
|
+
description?: string | null;
|
|
185
|
+
senderName?: string | null;
|
|
186
|
+
senderIdentityId?: string | null;
|
|
187
|
+
senderIdentityByChannel?: Partial<Record<ChannelType, string>> | null;
|
|
188
|
+
replyToAddress?: string | null;
|
|
189
|
+
};
|
|
190
|
+
export type CreateCustomerNotificationTemplateSetDto = Omit<ITicketCustomerNotificationTemplateSet, AuditedEntityKeys>;
|
|
191
|
+
export type UpdateCustomerNotificationTemplateSetDto = Partial<CreateCustomerNotificationTemplateSetDto>;
|
|
192
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// Customer notification settings — policy, content templates and the resolved
|
|
4
|
+
// effective-config contract.
|
|
5
|
+
//
|
|
6
|
+
// A policy is admin-configurable customer notification settings, either
|
|
7
|
+
// space-general (`portalId: null`) or per-portal (`portalId: string`). It
|
|
8
|
+
// combines with the pre-existing `ITicketCustomerNotificationPreference`
|
|
9
|
+
// (the INDIVIDUAL contact-level exception overlay, see SelfService) at
|
|
10
|
+
// resolution time; the resolved shape is `IResolvedCustomerNotificationConfig`
|
|
11
|
+
// below.
|
|
12
|
+
//
|
|
13
|
+
// `TemplateContentType` intentionally mirrors Marketing's HTML/TEXT shape
|
|
14
|
+
// (same numeric values) WITHOUT reusing Marketing's type — Tickets and
|
|
15
|
+
// Marketing are separate bounded contexts and must not share a runtime
|
|
16
|
+
// contract for this concern.
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.TemplateVariantStatus = exports.TemplateContentType = exports.CustomerNotificationRecipientRole = void 0;
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
// Policy
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
/**
|
|
24
|
+
* Ticket-relative recipient roles for CUSTOMER notifications only.
|
|
25
|
+
* Intentionally excludes any agent/internal-group role — this is the
|
|
26
|
+
* enforcement point that keeps internal recipients out of customer-facing
|
|
27
|
+
* notifications.
|
|
28
|
+
*/
|
|
29
|
+
var CustomerNotificationRecipientRole;
|
|
30
|
+
(function (CustomerNotificationRecipientRole) {
|
|
31
|
+
CustomerNotificationRecipientRole["REQUESTER"] = "REQUESTER";
|
|
32
|
+
CustomerNotificationRecipientRole["PARTICIPANT_CONTACTS"] = "PARTICIPANT_CONTACTS";
|
|
33
|
+
CustomerNotificationRecipientRole["ACTION_ASSIGNEE"] = "ACTION_ASSIGNEE";
|
|
34
|
+
CustomerNotificationRecipientRole["EXTERNAL_APPROVER"] = "EXTERNAL_APPROVER";
|
|
35
|
+
/** Members of the organization that have access to the ticket. */
|
|
36
|
+
CustomerNotificationRecipientRole["ORGANIZATION_MEMBERS"] = "ORGANIZATION_MEMBERS";
|
|
37
|
+
/** Other external recipients defined by the domain/integration. */
|
|
38
|
+
CustomerNotificationRecipientRole["OTHER_EXTERNAL_CONTACTS"] = "OTHER_EXTERNAL_CONTACTS";
|
|
39
|
+
})(CustomerNotificationRecipientRole || (exports.CustomerNotificationRecipientRole = CustomerNotificationRecipientRole = {}));
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
// Content templates
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
/** HTML/TEXT content type. Numeric values mirror Marketing's shape by design. */
|
|
44
|
+
var TemplateContentType;
|
|
45
|
+
(function (TemplateContentType) {
|
|
46
|
+
TemplateContentType[TemplateContentType["HTML"] = 1] = "HTML";
|
|
47
|
+
TemplateContentType[TemplateContentType["TEXT"] = 2] = "TEXT";
|
|
48
|
+
})(TemplateContentType || (exports.TemplateContentType = TemplateContentType = {}));
|
|
49
|
+
/** Per-variant lifecycle status. `DISABLED` keeps the variant persisted while making the `DISABLED_TEMPLATE` warning fire for any event still referencing it. */
|
|
50
|
+
var TemplateVariantStatus;
|
|
51
|
+
(function (TemplateVariantStatus) {
|
|
52
|
+
TemplateVariantStatus["ENABLED"] = "ENABLED";
|
|
53
|
+
TemplateVariantStatus["DISABLED"] = "DISABLED";
|
|
54
|
+
})(TemplateVariantStatus || (exports.TemplateVariantStatus = TemplateVariantStatus = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ITicketAuditedEntity } from "./Common";
|
|
2
|
+
export interface ITicketNote extends ITicketAuditedEntity {
|
|
3
|
+
ticketId: string;
|
|
4
|
+
text: string;
|
|
5
|
+
version: number;
|
|
6
|
+
}
|
|
7
|
+
export interface CreateTicketNoteDto {
|
|
8
|
+
text: string;
|
|
9
|
+
}
|
|
10
|
+
export interface UpdateTicketNoteDto {
|
|
11
|
+
expectedVersion: number;
|
|
12
|
+
text: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// Ticket internal notes.
|
|
4
|
+
//
|
|
5
|
+
// Free-text internal annotations attached to a ticket, distinct from public
|
|
6
|
+
// replies and from the conversation timeline. Optimistic concurrency via
|
|
7
|
+
// version + expectedVersion on update, same pattern as the rest of the
|
|
8
|
+
// module.
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ITicketAuditedEntity } from "./Common";
|
|
2
|
+
/** Whether the response is meant for a customer-visible reply, an internal note, or both. */
|
|
3
|
+
export declare enum QuickResponseContentType {
|
|
4
|
+
PUBLIC = "PUBLIC",
|
|
5
|
+
INTERNAL = "INTERNAL",
|
|
6
|
+
BOTH = "BOTH"
|
|
7
|
+
}
|
|
8
|
+
/** Per-response lifecycle status. `DISABLED` keeps the response persisted and assigned to its category. */
|
|
9
|
+
export declare enum QuickResponseStatus {
|
|
10
|
+
ENABLED = "ENABLED",
|
|
11
|
+
DISABLED = "DISABLED"
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Fixed, closed list of supported content languages. Extending this list is a
|
|
15
|
+
* deliberate, versioned change — a caller cannot introduce an arbitrary
|
|
16
|
+
* locale.
|
|
17
|
+
*/
|
|
18
|
+
export declare enum LanguageCode {
|
|
19
|
+
ES = "ES",
|
|
20
|
+
EN = "EN",
|
|
21
|
+
PT = "PT"
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Own category taxonomy for quick responses. A response count is intentionally
|
|
25
|
+
* NOT part of this interface: it is DERIVED (COUNT of active responses in the
|
|
26
|
+
* category) and never persisted.
|
|
27
|
+
*/
|
|
28
|
+
export interface ITicketQuickResponseCategory extends ITicketAuditedEntity {
|
|
29
|
+
name: string;
|
|
30
|
+
displayOrder: number;
|
|
31
|
+
enabled: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* One prepared text. `applicableCategoryIds`/`applicableSubcategoryIds` point
|
|
35
|
+
* at real `ITicketCategory` rows. `roleIds`/`groupIds`/`userIds` express
|
|
36
|
+
* VISIBILITY only (discoverability), never extra ticket permissions. Empty
|
|
37
|
+
* visibility arrays mean "everyone".
|
|
38
|
+
*/
|
|
39
|
+
export interface ITicketQuickResponse extends ITicketAuditedEntity {
|
|
40
|
+
title: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
categoryId: string;
|
|
43
|
+
content: string;
|
|
44
|
+
contentType: QuickResponseContentType;
|
|
45
|
+
language: LanguageCode;
|
|
46
|
+
/** Catalog variable keys referenced by `content` (e.g. `ticketNumber`, `customerName`). */
|
|
47
|
+
variablesUsed: string[];
|
|
48
|
+
applicableCategoryIds: string[];
|
|
49
|
+
applicableSubcategoryIds: string[];
|
|
50
|
+
applicableRequestTypeIds: string[];
|
|
51
|
+
applicablePortalIds: string[];
|
|
52
|
+
/** Agent-group scope dimension (mirrors `groupIds`/`roleIds`/`userIds`). */
|
|
53
|
+
applicableGroupIds: string[];
|
|
54
|
+
roleIds: string[];
|
|
55
|
+
groupIds: string[];
|
|
56
|
+
userIds: string[];
|
|
57
|
+
status: QuickResponseStatus;
|
|
58
|
+
}
|
|
59
|
+
type AuditKeys = keyof ITicketAuditedEntity;
|
|
60
|
+
export type CreateTicketQuickResponseCategoryDto = Omit<ITicketQuickResponseCategory, AuditKeys>;
|
|
61
|
+
export type UpdateTicketQuickResponseCategoryDto = Partial<CreateTicketQuickResponseCategoryDto>;
|
|
62
|
+
export type CreateTicketQuickResponseDto = Omit<ITicketQuickResponse, AuditKeys>;
|
|
63
|
+
export type UpdateTicketQuickResponseDto = Partial<CreateTicketQuickResponseDto>;
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// Ticket quick responses ("Respuestas rápidas").
|
|
4
|
+
//
|
|
5
|
+
// A Tickets-owned library of prepared texts that agents insert manually into a
|
|
6
|
+
// public reply or an internal note. Fully independent from Conversaciones'
|
|
7
|
+
// `IQuickResponse` — there is no cross-reference to Conversaciones in the
|
|
8
|
+
// persisted schema.
|
|
9
|
+
//
|
|
10
|
+
// Category storage is a DEDICATED taxonomy (`ITicketQuickResponseCategory`),
|
|
11
|
+
// NOT a reuse of `ITicketCategory`. `applicableCategoryIds` /
|
|
12
|
+
// `applicableSubcategoryIds` are the only place this feature relates to
|
|
13
|
+
// `ITicketCategory` (subcategories are child `ticket_categories` rows via
|
|
14
|
+
// `parentId`, not a separate entity).
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.LanguageCode = exports.QuickResponseStatus = exports.QuickResponseContentType = void 0;
|
|
18
|
+
/** Whether the response is meant for a customer-visible reply, an internal note, or both. */
|
|
19
|
+
var QuickResponseContentType;
|
|
20
|
+
(function (QuickResponseContentType) {
|
|
21
|
+
QuickResponseContentType["PUBLIC"] = "PUBLIC";
|
|
22
|
+
QuickResponseContentType["INTERNAL"] = "INTERNAL";
|
|
23
|
+
QuickResponseContentType["BOTH"] = "BOTH";
|
|
24
|
+
})(QuickResponseContentType || (exports.QuickResponseContentType = QuickResponseContentType = {}));
|
|
25
|
+
/** Per-response lifecycle status. `DISABLED` keeps the response persisted and assigned to its category. */
|
|
26
|
+
var QuickResponseStatus;
|
|
27
|
+
(function (QuickResponseStatus) {
|
|
28
|
+
QuickResponseStatus["ENABLED"] = "ENABLED";
|
|
29
|
+
QuickResponseStatus["DISABLED"] = "DISABLED";
|
|
30
|
+
})(QuickResponseStatus || (exports.QuickResponseStatus = QuickResponseStatus = {}));
|
|
31
|
+
/**
|
|
32
|
+
* Fixed, closed list of supported content languages. Extending this list is a
|
|
33
|
+
* deliberate, versioned change — a caller cannot introduce an arbitrary
|
|
34
|
+
* locale.
|
|
35
|
+
*/
|
|
36
|
+
var LanguageCode;
|
|
37
|
+
(function (LanguageCode) {
|
|
38
|
+
LanguageCode["ES"] = "ES";
|
|
39
|
+
LanguageCode["EN"] = "EN";
|
|
40
|
+
LanguageCode["PT"] = "PT";
|
|
41
|
+
})(LanguageCode || (exports.LanguageCode = LanguageCode = {}));
|
package/dist/Tickets/Task.d.ts
CHANGED
|
@@ -120,3 +120,14 @@ export interface IApplyTicketTaskTemplateDto {
|
|
|
120
120
|
expectedTicketVersion: number;
|
|
121
121
|
templateId: string;
|
|
122
122
|
}
|
|
123
|
+
export interface CreateTaskDependencyDto {
|
|
124
|
+
successorTaskId: string;
|
|
125
|
+
type: TicketTaskDependencyType;
|
|
126
|
+
}
|
|
127
|
+
export interface DeleteTicketTaskOptions {
|
|
128
|
+
expectedTaskVersion?: number;
|
|
129
|
+
}
|
|
130
|
+
export interface TicketTaskListResult {
|
|
131
|
+
tasks: ITicketTask[];
|
|
132
|
+
dependencies: ITicketTaskDependency[];
|
|
133
|
+
}
|
package/dist/Tickets/Ticket.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export interface ITicket {
|
|
|
39
39
|
externalReferences: ITicketExternalReference[];
|
|
40
40
|
version: number;
|
|
41
41
|
categoryId: string;
|
|
42
|
+
requestTypeId?: string;
|
|
42
43
|
channelType?: ChannelType;
|
|
43
44
|
channelId?: string;
|
|
44
45
|
primaryConversationId?: string;
|
|
@@ -82,6 +83,7 @@ export interface ICreateTicketDto {
|
|
|
82
83
|
source?: string;
|
|
83
84
|
idempotencyKey?: string;
|
|
84
85
|
categoryId: string;
|
|
86
|
+
requestTypeId?: string;
|
|
85
87
|
channelType?: ChannelType;
|
|
86
88
|
channelId?: string;
|
|
87
89
|
primaryConversationId?: string;
|
package/dist/Tickets/index.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export * from './Conversation';
|
|
|
10
10
|
export * from './Routing';
|
|
11
11
|
export * from './Approval';
|
|
12
12
|
export * from './Task';
|
|
13
|
+
export * from './Notes';
|
|
14
|
+
export * from './QuickResponse';
|
|
15
|
+
export * from './CustomerNotification';
|
|
13
16
|
export * from './SelfService';
|
|
14
17
|
export * from './Security';
|
|
15
18
|
export * from './AdvancedApi';
|
package/dist/Tickets/index.js
CHANGED
|
@@ -26,6 +26,9 @@ __exportStar(require("./Conversation"), exports);
|
|
|
26
26
|
__exportStar(require("./Routing"), exports);
|
|
27
27
|
__exportStar(require("./Approval"), exports);
|
|
28
28
|
__exportStar(require("./Task"), exports);
|
|
29
|
+
__exportStar(require("./Notes"), exports);
|
|
30
|
+
__exportStar(require("./QuickResponse"), exports);
|
|
31
|
+
__exportStar(require("./CustomerNotification"), exports);
|
|
29
32
|
__exportStar(require("./SelfService"), exports);
|
|
30
33
|
__exportStar(require("./Security"), exports);
|
|
31
34
|
__exportStar(require("./AdvancedApi"), exports);
|
|
@@ -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 };
|
|
@@ -30,7 +30,6 @@ export declare class EmailConfig {
|
|
|
30
30
|
reassign?: boolean;
|
|
31
31
|
reassignTime?: number;
|
|
32
32
|
reassignGroupId?: string;
|
|
33
|
-
reOpenTime?: number;
|
|
34
33
|
connectedEmailDoamin: string;
|
|
35
34
|
inboundConnectedEmail: string;
|
|
36
35
|
inboundConnectedEmailStatus: EmailConfigOutboundStatus;
|
|
@@ -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[];
|
|
@@ -23,5 +23,3 @@ __exportStar(require("./Import"), exports);
|
|
|
23
23
|
__exportStar(require("./Relationship"), exports);
|
|
24
24
|
__exportStar(require("./options"), exports);
|
|
25
25
|
__exportStar(require("./DuplicateContact"), exports);
|
|
26
|
-
__exportStar(require("./CommunicationEndpoint"), exports);
|
|
27
|
-
__exportStar(require("./CommunicationMethod"), exports);
|