@trii/types 2.10.681 → 2.10.683
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/Capabilities/Capability.d.ts +28 -0
- package/dist/Automations/Capabilities/Capability.js +9 -0
- package/dist/Automations/Capabilities/index.d.ts +1 -0
- package/dist/Automations/Capabilities/index.js +17 -0
- package/dist/Automations/Common.d.ts +32 -0
- package/dist/Automations/Common.js +18 -0
- package/dist/Automations/Executions/Execution.d.ts +22 -0
- package/dist/Automations/Executions/Execution.js +2 -0
- package/dist/Automations/Executions/index.d.ts +1 -0
- package/dist/Automations/Executions/index.js +17 -0
- package/dist/Automations/Flows/Flow.d.ts +100 -0
- package/dist/Automations/Flows/Flow.js +32 -0
- package/dist/Automations/Flows/index.d.ts +1 -0
- package/dist/Automations/Flows/index.js +17 -0
- package/dist/Automations/index.d.ts +4 -0
- package/dist/Automations/index.js +20 -0
- package/dist/Conversations/Sla.d.ts +86 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AutomationJsonSchema, AutomationSourceApplication } from '../Common';
|
|
2
|
+
export declare enum AutomationCapabilityKind {
|
|
3
|
+
TRIGGER = "trigger",
|
|
4
|
+
ACTION = "action",
|
|
5
|
+
CONDITION = "condition"
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Capacidad publicada por una aplicación de negocio para que Automation pueda
|
|
9
|
+
* descubrirla y representarla sin incorporar reglas de ese dominio.
|
|
10
|
+
*/
|
|
11
|
+
export interface AutomationCapability {
|
|
12
|
+
code: string;
|
|
13
|
+
sourceApplication: AutomationSourceApplication;
|
|
14
|
+
kind: AutomationCapabilityKind;
|
|
15
|
+
name: string;
|
|
16
|
+
description?: string | null;
|
|
17
|
+
inputSchema?: AutomationJsonSchema | null;
|
|
18
|
+
outputSchema?: AutomationJsonSchema | null;
|
|
19
|
+
requiredPermissions: string[];
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
version: number;
|
|
22
|
+
}
|
|
23
|
+
export interface AutomationCapabilityQuery {
|
|
24
|
+
sourceApplications?: AutomationSourceApplication[];
|
|
25
|
+
kinds?: AutomationCapabilityKind[];
|
|
26
|
+
enabledOnly?: boolean;
|
|
27
|
+
version?: number;
|
|
28
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AutomationCapabilityKind = void 0;
|
|
4
|
+
var AutomationCapabilityKind;
|
|
5
|
+
(function (AutomationCapabilityKind) {
|
|
6
|
+
AutomationCapabilityKind["TRIGGER"] = "trigger";
|
|
7
|
+
AutomationCapabilityKind["ACTION"] = "action";
|
|
8
|
+
AutomationCapabilityKind["CONDITION"] = "condition";
|
|
9
|
+
})(AutomationCapabilityKind || (exports.AutomationCapabilityKind = AutomationCapabilityKind = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Capability';
|
|
@@ -0,0 +1,17 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Capability"), exports);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aplicación propietaria del evento o capacidad consumida por Automation.
|
|
3
|
+
*
|
|
4
|
+
* Los valores forman parte del contrato HTTP/event-driven y no deben
|
|
5
|
+
* traducirse ni depender del nombre visible de la aplicación.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum AutomationSourceApplication {
|
|
8
|
+
CONVERSATIONS = "conversations",
|
|
9
|
+
TICKETS = "tickets",
|
|
10
|
+
MARKETING = "marketing",
|
|
11
|
+
SALES = "sales",
|
|
12
|
+
CALLS = "calls",
|
|
13
|
+
GENERIC = "generic"
|
|
14
|
+
}
|
|
15
|
+
export type AutomationJsonValue = string | number | boolean | null | AutomationJsonObject | AutomationJsonValue[];
|
|
16
|
+
/** Objeto JSON transportable entre aplicaciones y Automation. */
|
|
17
|
+
export interface AutomationJsonObject {
|
|
18
|
+
[key: string]: AutomationJsonValue;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Schema JSON deliberadamente abierto. Cada aplicación es propietaria de la
|
|
22
|
+
* validación del schema que publica en su catálogo de capacidades.
|
|
23
|
+
*/
|
|
24
|
+
export interface AutomationJsonSchema extends AutomationJsonObject {
|
|
25
|
+
type?: string;
|
|
26
|
+
title?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
required?: string[];
|
|
29
|
+
properties?: {
|
|
30
|
+
[key: string]: AutomationJsonSchema;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AutomationSourceApplication = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Aplicación propietaria del evento o capacidad consumida por Automation.
|
|
6
|
+
*
|
|
7
|
+
* Los valores forman parte del contrato HTTP/event-driven y no deben
|
|
8
|
+
* traducirse ni depender del nombre visible de la aplicación.
|
|
9
|
+
*/
|
|
10
|
+
var AutomationSourceApplication;
|
|
11
|
+
(function (AutomationSourceApplication) {
|
|
12
|
+
AutomationSourceApplication["CONVERSATIONS"] = "conversations";
|
|
13
|
+
AutomationSourceApplication["TICKETS"] = "tickets";
|
|
14
|
+
AutomationSourceApplication["MARKETING"] = "marketing";
|
|
15
|
+
AutomationSourceApplication["SALES"] = "sales";
|
|
16
|
+
AutomationSourceApplication["CALLS"] = "calls";
|
|
17
|
+
AutomationSourceApplication["GENERIC"] = "generic";
|
|
18
|
+
})(AutomationSourceApplication || (exports.AutomationSourceApplication = AutomationSourceApplication = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AutomationJsonObject, AutomationSourceApplication } from '../Common';
|
|
2
|
+
/**
|
|
3
|
+
* Referencia genérica al evento que inició una ejecución.
|
|
4
|
+
*
|
|
5
|
+
* Este contrato convive inicialmente con
|
|
6
|
+
* Conversations.Flows.Workflows.FlowExecutionTrigger.
|
|
7
|
+
*/
|
|
8
|
+
export interface AutomationExecutionTrigger {
|
|
9
|
+
entryPointId: string;
|
|
10
|
+
sourceApplication: AutomationSourceApplication;
|
|
11
|
+
eventType: string;
|
|
12
|
+
referenceId?: string | null;
|
|
13
|
+
occurredAt?: string | null;
|
|
14
|
+
payload?: AutomationJsonObject | null;
|
|
15
|
+
}
|
|
16
|
+
/** Identidad completa que debe persistir una ejecución transversal. */
|
|
17
|
+
export interface AutomationFlowExecutionReference {
|
|
18
|
+
flowId: string;
|
|
19
|
+
flowVersionId: string;
|
|
20
|
+
entryPointId: string;
|
|
21
|
+
executionId: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Execution';
|
|
@@ -0,0 +1,17 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Execution"), exports);
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { IFlowVariable, IReactFlowEdge, IReactFlowNode } from '../../Conversations/Flows/Flow';
|
|
2
|
+
import { AutomationJsonObject, AutomationSourceApplication } from '../Common';
|
|
3
|
+
export declare enum AutomationFlowKind {
|
|
4
|
+
CONVERSATIONAL = "conversational",
|
|
5
|
+
VOICE = "voice",
|
|
6
|
+
CAMPAIGN = "campaign",
|
|
7
|
+
SALES = "sales",
|
|
8
|
+
GENERIC = "generic"
|
|
9
|
+
}
|
|
10
|
+
export declare enum AutomationFlowStatus {
|
|
11
|
+
DRAFT = "draft",
|
|
12
|
+
ACTIVE = "active",
|
|
13
|
+
DISABLED = "disabled",
|
|
14
|
+
ARCHIVED = "archived"
|
|
15
|
+
}
|
|
16
|
+
export declare enum AutomationFlowVersionStatus {
|
|
17
|
+
DRAFT = "draft",
|
|
18
|
+
TESTING = "testing",
|
|
19
|
+
PUBLISHED = "published",
|
|
20
|
+
DEPRECATED = "deprecated"
|
|
21
|
+
}
|
|
22
|
+
export declare enum FlowEntryPointExecutionMode {
|
|
23
|
+
/** Un evento inicia como máximo una ejecución de esta versión del Flow. */
|
|
24
|
+
SINGLE = "single",
|
|
25
|
+
/** El solapamiento fue habilitado explícitamente. */
|
|
26
|
+
MULTIPLE = "multiple"
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Identidad estable del Flow. El contenido ejecutable vive en FlowVersion.
|
|
30
|
+
*/
|
|
31
|
+
export interface AutomationFlowDefinition {
|
|
32
|
+
id: string;
|
|
33
|
+
spaceId: string;
|
|
34
|
+
name: string;
|
|
35
|
+
description?: string | null;
|
|
36
|
+
kind: AutomationFlowKind;
|
|
37
|
+
status: AutomationFlowStatus;
|
|
38
|
+
ownerId?: string | null;
|
|
39
|
+
tags: string[];
|
|
40
|
+
draftVersionId?: string | null;
|
|
41
|
+
activeVersionId?: string | null;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
createdBy: string;
|
|
44
|
+
updatedAt?: string | null;
|
|
45
|
+
updatedBy?: string | null;
|
|
46
|
+
deletedAt?: string | null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Snapshot del canvas.
|
|
50
|
+
*
|
|
51
|
+
* IFlowVariable/IReactFlowNode/IReactFlowEdge se reutilizan desde el contrato
|
|
52
|
+
* legado durante la transición. No deben incorporarse nuevas dependencias de
|
|
53
|
+
* Conversations en los contratos de dominio de Automation.
|
|
54
|
+
*/
|
|
55
|
+
export interface AutomationFlowCanvas {
|
|
56
|
+
variables: IFlowVariable[];
|
|
57
|
+
nodes: IReactFlowNode[];
|
|
58
|
+
edges: IReactFlowEdge[];
|
|
59
|
+
viewport: {
|
|
60
|
+
x: number;
|
|
61
|
+
y: number;
|
|
62
|
+
zoom: number;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Snapshot versionado e inmutable una vez publicado.
|
|
67
|
+
*/
|
|
68
|
+
export interface AutomationFlowVersion {
|
|
69
|
+
id: string;
|
|
70
|
+
flowId: string;
|
|
71
|
+
version: number;
|
|
72
|
+
schemaVersion: number;
|
|
73
|
+
status: AutomationFlowVersionStatus;
|
|
74
|
+
canvas: AutomationFlowCanvas;
|
|
75
|
+
entryPoints: FlowEntryPoint[];
|
|
76
|
+
createdAt: string;
|
|
77
|
+
createdBy: string;
|
|
78
|
+
publishedAt?: string | null;
|
|
79
|
+
publishedBy?: string | null;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Evento de entrada que puede iniciar una versión concreta de un Flow.
|
|
83
|
+
*
|
|
84
|
+
* La configuración autoritativa vive en esta entidad. El nodo trigger es su
|
|
85
|
+
* representación en el canvas y se vincula mediante triggerNodeId.
|
|
86
|
+
*/
|
|
87
|
+
export interface FlowEntryPoint {
|
|
88
|
+
id: string;
|
|
89
|
+
flowId: string;
|
|
90
|
+
flowVersionId: string;
|
|
91
|
+
name: string;
|
|
92
|
+
sourceApplication: AutomationSourceApplication;
|
|
93
|
+
eventType: string;
|
|
94
|
+
filters: AutomationJsonObject;
|
|
95
|
+
enabled: boolean;
|
|
96
|
+
triggerNodeId: string;
|
|
97
|
+
priority: number;
|
|
98
|
+
executionMode: FlowEntryPointExecutionMode;
|
|
99
|
+
metadata?: AutomationJsonObject | null;
|
|
100
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlowEntryPointExecutionMode = exports.AutomationFlowVersionStatus = exports.AutomationFlowStatus = exports.AutomationFlowKind = void 0;
|
|
4
|
+
var AutomationFlowKind;
|
|
5
|
+
(function (AutomationFlowKind) {
|
|
6
|
+
AutomationFlowKind["CONVERSATIONAL"] = "conversational";
|
|
7
|
+
AutomationFlowKind["VOICE"] = "voice";
|
|
8
|
+
AutomationFlowKind["CAMPAIGN"] = "campaign";
|
|
9
|
+
AutomationFlowKind["SALES"] = "sales";
|
|
10
|
+
AutomationFlowKind["GENERIC"] = "generic";
|
|
11
|
+
})(AutomationFlowKind || (exports.AutomationFlowKind = AutomationFlowKind = {}));
|
|
12
|
+
var AutomationFlowStatus;
|
|
13
|
+
(function (AutomationFlowStatus) {
|
|
14
|
+
AutomationFlowStatus["DRAFT"] = "draft";
|
|
15
|
+
AutomationFlowStatus["ACTIVE"] = "active";
|
|
16
|
+
AutomationFlowStatus["DISABLED"] = "disabled";
|
|
17
|
+
AutomationFlowStatus["ARCHIVED"] = "archived";
|
|
18
|
+
})(AutomationFlowStatus || (exports.AutomationFlowStatus = AutomationFlowStatus = {}));
|
|
19
|
+
var AutomationFlowVersionStatus;
|
|
20
|
+
(function (AutomationFlowVersionStatus) {
|
|
21
|
+
AutomationFlowVersionStatus["DRAFT"] = "draft";
|
|
22
|
+
AutomationFlowVersionStatus["TESTING"] = "testing";
|
|
23
|
+
AutomationFlowVersionStatus["PUBLISHED"] = "published";
|
|
24
|
+
AutomationFlowVersionStatus["DEPRECATED"] = "deprecated";
|
|
25
|
+
})(AutomationFlowVersionStatus || (exports.AutomationFlowVersionStatus = AutomationFlowVersionStatus = {}));
|
|
26
|
+
var FlowEntryPointExecutionMode;
|
|
27
|
+
(function (FlowEntryPointExecutionMode) {
|
|
28
|
+
/** Un evento inicia como máximo una ejecución de esta versión del Flow. */
|
|
29
|
+
FlowEntryPointExecutionMode["SINGLE"] = "single";
|
|
30
|
+
/** El solapamiento fue habilitado explícitamente. */
|
|
31
|
+
FlowEntryPointExecutionMode["MULTIPLE"] = "multiple";
|
|
32
|
+
})(FlowEntryPointExecutionMode || (exports.FlowEntryPointExecutionMode = FlowEntryPointExecutionMode = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Flow';
|
|
@@ -0,0 +1,17 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Flow"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Common"), exports);
|
|
18
|
+
__exportStar(require("./Flows"), exports);
|
|
19
|
+
__exportStar(require("./Capabilities"), exports);
|
|
20
|
+
__exportStar(require("./Executions"), exports);
|
|
@@ -25,11 +25,57 @@ export interface ConversationSlaTarget {
|
|
|
25
25
|
durationSeconds: number;
|
|
26
26
|
warningThresholds: ConversationSlaWarningThreshold[];
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Threshold received by the SLA policy write API.
|
|
30
|
+
*
|
|
31
|
+
* Existing thresholds keep their id. New thresholds may omit it so the
|
|
32
|
+
* backend can assign the canonical identifier returned in
|
|
33
|
+
* ConversationSlaPolicy.
|
|
34
|
+
*/
|
|
35
|
+
export interface ConversationSlaWarningThresholdInput {
|
|
36
|
+
id?: ID;
|
|
37
|
+
percentage: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Target received by the SLA policy write API.
|
|
41
|
+
* durationSeconds is stored as seconds regardless of the unit used by the UI.
|
|
42
|
+
*/
|
|
43
|
+
export interface ConversationSlaTargetInput {
|
|
44
|
+
metric: ConversationSlaMetric;
|
|
45
|
+
durationSeconds: number;
|
|
46
|
+
warningThresholds: ConversationSlaWarningThresholdInput[];
|
|
47
|
+
}
|
|
28
48
|
export type ConversationSlaResumeBehavior = 'continue' | 'restart' | 'recalculate';
|
|
29
49
|
export type ConversationSlaReopenBehavior = 'preserve' | 'restart' | 'recalculate' | 'do_not_start';
|
|
30
50
|
export interface ConversationSlaClockBehavior {
|
|
51
|
+
/**
|
|
52
|
+
* Conversation statuses that pause every running SLA cycle.
|
|
53
|
+
*
|
|
54
|
+
* Entering one of these statuses pauses the clock. Leaving all of them
|
|
55
|
+
* resumes it according to onResume. An empty array means that conversation
|
|
56
|
+
* status changes never pause the SLA clock.
|
|
57
|
+
*/
|
|
31
58
|
pauseOnStatuses: ConversationStatus[];
|
|
59
|
+
/**
|
|
60
|
+
* Behavior applied when the conversation leaves the last status included
|
|
61
|
+
* in pauseOnStatuses.
|
|
62
|
+
*
|
|
63
|
+
* continue: keeps the current cycle and its consumed/remaining time.
|
|
64
|
+
* restart: resets the current cycle from the resume timestamp.
|
|
65
|
+
* recalculate: keeps the applied policy snapshot and recalculates the
|
|
66
|
+
* schedule-derived warnings/deadline. It does not select another policy
|
|
67
|
+
* version.
|
|
68
|
+
*/
|
|
32
69
|
onResume: ConversationSlaResumeBehavior;
|
|
70
|
+
/**
|
|
71
|
+
* Behavior applied when a resolved/finalized conversation is reopened.
|
|
72
|
+
* Reopening is independent from resuming a status-paused clock.
|
|
73
|
+
*
|
|
74
|
+
* preserve: preserves the previous cycle state.
|
|
75
|
+
* restart: starts a new cycle from the reopen timestamp.
|
|
76
|
+
* recalculate: recalculates the cycle using the applied policy snapshot.
|
|
77
|
+
* do_not_start: does not start an SLA cycle because of the reopen action.
|
|
78
|
+
*/
|
|
33
79
|
onReopen: ConversationSlaReopenBehavior;
|
|
34
80
|
}
|
|
35
81
|
/**
|
|
@@ -51,6 +97,46 @@ export interface ConversationSlaPolicy {
|
|
|
51
97
|
updatedAt: Date;
|
|
52
98
|
updatedByUserId?: ID;
|
|
53
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Editable definition sent by clients.
|
|
102
|
+
*
|
|
103
|
+
* It intentionally excludes policy id/version and audit fields controlled by
|
|
104
|
+
* the backend. targets is full-replacement: omitted metrics are disabled in
|
|
105
|
+
* the newly published policy version.
|
|
106
|
+
*/
|
|
107
|
+
export interface ConversationSlaPolicyDefinitionInput {
|
|
108
|
+
name: string;
|
|
109
|
+
description?: string;
|
|
110
|
+
enabled: boolean;
|
|
111
|
+
timeCalculation: ConversationSlaTimeCalculation;
|
|
112
|
+
targets: ConversationSlaTargetInput[];
|
|
113
|
+
clockBehavior: ConversationSlaClockBehavior;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Creates the first immutable version of an SLA policy.
|
|
117
|
+
*
|
|
118
|
+
* commandId provides idempotency for retries. The authenticated backend
|
|
119
|
+
* context supplies createdByUserId and the audit timestamps.
|
|
120
|
+
*/
|
|
121
|
+
export interface CreateConversationSlaPolicyRequest {
|
|
122
|
+
commandId: ID;
|
|
123
|
+
spaceId: ID;
|
|
124
|
+
definition: ConversationSlaPolicyDefinitionInput;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Publishes a new immutable version of an existing SLA policy.
|
|
128
|
+
*
|
|
129
|
+
* expectedVersion implements optimistic concurrency. The backend rejects the
|
|
130
|
+
* request when another version was published after the client loaded it.
|
|
131
|
+
* version, updatedAt and updatedByUserId are always assigned by the backend.
|
|
132
|
+
*/
|
|
133
|
+
export interface PublishConversationSlaPolicyVersionRequest {
|
|
134
|
+
commandId: ID;
|
|
135
|
+
spaceId: ID;
|
|
136
|
+
policyId: ID;
|
|
137
|
+
expectedVersion: number;
|
|
138
|
+
definition: ConversationSlaPolicyDefinitionInput;
|
|
139
|
+
}
|
|
54
140
|
export type ConversationSlaClockAction = 'start' | 'evaluate' | 'pause' | 'resume' | 'complete' | 'recalculate' | 'cancel';
|
|
55
141
|
export type ConversationSlaClockReason = 'conversation_created' | 'conversation_enqueued' | 'customer_message' | 'agent_response' | 'assignment_changed' | 'status_changed' | 'queue_transfer' | 'conversation_reopened' | 'deadline_due' | 'policy_override';
|
|
56
142
|
/**
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
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;
|
|
36
|
+
exports.Automations = 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
37
|
exports.Accounts = __importStar(require("./Accounts/index"));
|
|
38
38
|
exports.AuditLogs = __importStar(require("./AuditLogs/index"));
|
|
39
39
|
exports.Common = __importStar(require("./Common/index"));
|
|
@@ -56,3 +56,4 @@ exports.AI = __importStar(require("./AI/index"));
|
|
|
56
56
|
exports.Shop = __importStar(require("./Shop/index"));
|
|
57
57
|
exports.APIResponses = __importStar(require("./ApiResponses/index"));
|
|
58
58
|
exports.Forms = __importStar(require("./Forms/index"));
|
|
59
|
+
exports.Automations = __importStar(require("./Automations/index"));
|