@trii/types 2.10.730 → 2.10.732
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/Common/index.js +7 -17
- package/dist/Contacts/CommunicationEndpoint.d.ts +8 -8
- package/dist/Conversations/Classifications/ClassificationTaxonomy.d.ts +67 -0
- package/dist/Conversations/Classifications/ClassificationTaxonomy.js +5 -0
- package/dist/Conversations/Classifications/ConversationClassificationEvaluation.d.ts +67 -0
- package/dist/Conversations/Classifications/ConversationClassificationEvents.d.ts +29 -0
- package/dist/Conversations/Classifications/ConversationClassificationEvents.js +8 -0
- package/dist/Conversations/Classifications/index.d.ts +3 -0
- package/dist/Conversations/Classifications/index.js +19 -0
- package/dist/Conversations/Conversation.d.ts +27 -12
- package/dist/Conversations/InboxMongo.d.ts +12 -12
- package/dist/Conversations/Routing.d.ts +10 -10
- package/dist/Conversations/index.d.ts +1 -0
- package/dist/Conversations/index.js +8 -17
- package/dist/Events/DomainEventTypes.d.ts +23 -23
- package/dist/index.js +7 -17
- package/dist/src/Automations/Capabilities/Capability.d.ts +81 -0
- package/dist/src/Automations/Capabilities/Capability.js +23 -0
- package/dist/src/Automations/Capabilities/index.d.ts +1 -0
- package/dist/src/Automations/Capabilities/index.js +17 -0
- package/dist/src/Automations/Common.d.ts +94 -0
- package/dist/src/Automations/Common.js +40 -0
- package/dist/src/Automations/Events/Event.d.ts +69 -0
- package/dist/src/Automations/Events/Event.js +14 -0
- package/dist/src/Automations/Events/index.d.ts +1 -0
- package/dist/src/Automations/Events/index.js +17 -0
- package/dist/src/Automations/Executions/Execution.d.ts +254 -0
- package/dist/src/Automations/Executions/Execution.js +62 -0
- package/dist/src/Automations/Executions/Testing.d.ts +166 -0
- package/dist/src/Automations/Executions/Testing.js +54 -0
- package/dist/src/Automations/Executions/index.d.ts +2 -0
- package/dist/src/Automations/Executions/index.js +18 -0
- package/dist/src/Automations/Flows/Canvas.d.ts +103 -0
- package/dist/src/Automations/Flows/Canvas.js +38 -0
- package/dist/src/Automations/Flows/Flow.d.ts +147 -0
- package/dist/src/Automations/Flows/Flow.js +58 -0
- package/dist/src/Automations/Flows/Requests.d.ts +71 -0
- package/dist/src/Automations/Flows/Requests.js +2 -0
- package/dist/src/Automations/Flows/Validation.d.ts +28 -0
- package/dist/src/Automations/Flows/Validation.js +9 -0
- package/dist/src/Automations/Flows/index.d.ts +4 -0
- package/dist/src/Automations/Flows/index.js +20 -0
- package/dist/src/Automations/Nodes/Node.d.ts +113 -0
- package/dist/src/Automations/Nodes/Node.js +27 -0
- package/dist/src/Automations/Nodes/index.d.ts +1 -0
- package/dist/src/Automations/Nodes/index.js +17 -0
- package/dist/src/Automations/index.d.ts +6 -0
- package/dist/src/Automations/index.js +22 -0
- package/dist/src/Chats/Chat.d.ts +61 -0
- package/dist/src/Chats/Chat.js +28 -0
- package/dist/src/Common/Channels/Channel.d.ts +28 -1
- package/dist/src/Contacts/contacts.d.ts +2 -2
- package/dist/src/Conversations/Assignment.d.ts +81 -0
- package/dist/src/Conversations/Assignment.js +4 -0
- package/dist/src/Conversations/Conversation.d.ts +331 -48
- package/dist/src/Conversations/Conversation.js +14 -34
- package/dist/src/Conversations/DashBoard/dashboard.d.ts +2 -2
- package/dist/src/Conversations/Flows/Workflows/Workflow.d.ts +280 -123
- package/dist/src/Conversations/Flows/Workflows/Workflow.js +85 -35
- package/dist/src/Conversations/Groups/Group.d.ts +2 -8
- package/dist/src/Conversations/Groups/Group.js +0 -6
- package/dist/src/Conversations/InboxMongo.d.ts +154 -0
- package/dist/src/Conversations/InboxMongo.js +128 -0
- package/dist/src/Conversations/InboxProjection.d.ts +162 -0
- package/dist/src/Conversations/InboxProjection.js +2 -0
- package/dist/src/Conversations/Label.d.ts +1 -1
- package/dist/src/Conversations/Outbox.d.ts +24 -0
- package/dist/src/Conversations/Outbox.js +4 -0
- package/dist/src/Conversations/Queue.d.ts +107 -0
- package/dist/src/Conversations/Queue.js +4 -0
- package/dist/src/Conversations/Routing.d.ts +164 -0
- package/dist/src/Conversations/Routing.js +2 -0
- package/dist/src/Conversations/Sla.d.ts +227 -0
- package/dist/src/Conversations/Sla.js +6 -0
- package/dist/src/Conversations/Transfer.d.ts +73 -0
- package/dist/src/Conversations/Transfer.js +2 -0
- package/dist/src/Conversations/WebHook.d.ts +1 -1
- package/dist/src/Conversations/index.d.ts +9 -1
- package/dist/src/Conversations/index.js +9 -1
- package/dist/src/Forms/API.d.ts +53 -0
- package/dist/src/Forms/API.js +2 -0
- package/dist/src/Forms/SubmittedForm.d.ts +56 -0
- package/dist/src/Forms/SubmittedForm.js +9 -0
- package/dist/src/Forms/index.d.ts +2 -0
- package/dist/src/Forms/index.js +18 -0
- package/dist/src/Presence/AgentPause.d.ts +24 -0
- package/dist/src/Presence/AgentPause.js +19 -0
- package/dist/src/Presence/QueueParticipation.d.ts +17 -0
- package/dist/src/Presence/QueueParticipation.js +2 -0
- package/dist/src/Presence/QueueRoutingState.d.ts +27 -0
- package/dist/src/Presence/QueueRoutingState.js +9 -0
- package/dist/src/Presence/index.d.ts +3 -0
- package/dist/src/Presence/index.js +19 -0
- package/dist/src/Tickets/Category.d.ts +18 -0
- package/dist/src/Tickets/Dashboard.d.ts +78 -0
- package/dist/src/Tickets/Dashboard.js +13 -1
- package/dist/src/Tickets/Fields.d.ts +1 -0
- package/dist/src/Tickets/Layouts.d.ts +3 -1
- package/dist/src/Tickets/Workflow.d.ts +20 -0
- package/dist/src/Users/UserTrii.d.ts +10 -0
- package/dist/src/Users/UserTrii.js +8 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +4 -1
- package/package.json +5 -2
- package/dist/Conversations/DashBoard/dashboardForms.d.ts +0 -44
- package/dist/Conversations/DashBoard/dashboardForms.js +0 -24
- package/dist/Conversations/InboxCounters.d.ts +0 -18
- package/dist/src/Conversations/DashBoard/dashboardForms.d.ts +0 -44
- package/dist/src/Conversations/DashBoard/dashboardForms.js +0 -24
- /package/dist/Conversations/{InboxCounters.js → Classifications/ConversationClassificationEvaluation.js} +0 -0
|
@@ -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;
|
package/dist/index.js
CHANGED
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.Automations = exports.Forms = exports.APIResponses = exports.Shop = exports.AI = exports.APIKeys = exports.Events = 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
27
|
exports.Accounts = __importStar(require("./Accounts/index"));
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { AutomationError, AutomationJsonObject, AutomationJsonSchema, AutomationSourceApplication } from '../Common';
|
|
2
|
+
export declare enum AutomationCapabilityKind {
|
|
3
|
+
TRIGGER = "trigger",
|
|
4
|
+
ACTION = "action",
|
|
5
|
+
CONDITION = "condition"
|
|
6
|
+
}
|
|
7
|
+
export declare enum AutomationCapabilityEffectClass {
|
|
8
|
+
NONE = "none",
|
|
9
|
+
READ = "read",
|
|
10
|
+
WRITE = "write",
|
|
11
|
+
COMMUNICATION = "communication",
|
|
12
|
+
BULK = "bulk"
|
|
13
|
+
}
|
|
14
|
+
export declare enum AutomationCapabilityIdempotency {
|
|
15
|
+
NONE = "none",
|
|
16
|
+
SUPPORTED = "supported",
|
|
17
|
+
REQUIRED = "required"
|
|
18
|
+
}
|
|
19
|
+
/** Capacidades operativas que el runtime puede aplicar de forma confiable. */
|
|
20
|
+
export interface AutomationCapabilityExecutionSupport {
|
|
21
|
+
effectClass: AutomationCapabilityEffectClass;
|
|
22
|
+
supportsSimulation: boolean;
|
|
23
|
+
supportsTestTargets: boolean;
|
|
24
|
+
supportsUntilNode: boolean;
|
|
25
|
+
supportsFromNode: boolean;
|
|
26
|
+
supportsNodeOnly: boolean;
|
|
27
|
+
supportsCancellation: boolean;
|
|
28
|
+
idempotency: AutomationCapabilityIdempotency;
|
|
29
|
+
defaultTimeoutMs?: number | null;
|
|
30
|
+
maxAttempts?: number | null;
|
|
31
|
+
maxTestItems?: number | null;
|
|
32
|
+
inputSchema?: AutomationJsonSchema | null;
|
|
33
|
+
outputSchema?: AutomationJsonSchema | null;
|
|
34
|
+
simulationOutputSchema?: AutomationJsonSchema | null;
|
|
35
|
+
sensitivePaths?: string[] | null;
|
|
36
|
+
requiredPermissions?: string[] | null;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Capacidad publicada por una aplicación de negocio para que Automation pueda
|
|
40
|
+
* descubrirla y representarla sin incorporar reglas de ese dominio.
|
|
41
|
+
*/
|
|
42
|
+
export interface AutomationCapability {
|
|
43
|
+
code: string;
|
|
44
|
+
sourceApplication: AutomationSourceApplication;
|
|
45
|
+
kind: AutomationCapabilityKind;
|
|
46
|
+
name: string;
|
|
47
|
+
description?: string | null;
|
|
48
|
+
inputSchema?: AutomationJsonSchema | null;
|
|
49
|
+
outputSchema?: AutomationJsonSchema | null;
|
|
50
|
+
requiredPermissions: string[];
|
|
51
|
+
enabled: boolean;
|
|
52
|
+
version: number;
|
|
53
|
+
/** Metadata opcional para definitions anteriores a la política de ejecución. */
|
|
54
|
+
executionSupport?: AutomationCapabilityExecutionSupport | null;
|
|
55
|
+
}
|
|
56
|
+
export interface AutomationCapabilityQuery {
|
|
57
|
+
sourceApplications?: AutomationSourceApplication[];
|
|
58
|
+
kinds?: AutomationCapabilityKind[];
|
|
59
|
+
enabledOnly?: boolean;
|
|
60
|
+
version?: number;
|
|
61
|
+
}
|
|
62
|
+
export interface AutomationCapabilityReference {
|
|
63
|
+
code: string;
|
|
64
|
+
version: number;
|
|
65
|
+
sourceApplication: AutomationSourceApplication;
|
|
66
|
+
}
|
|
67
|
+
export interface AutomationCapabilityInvocation {
|
|
68
|
+
invocationId: string;
|
|
69
|
+
executionId: string;
|
|
70
|
+
nodeId: string;
|
|
71
|
+
capability: AutomationCapabilityReference;
|
|
72
|
+
input: AutomationJsonObject;
|
|
73
|
+
context: AutomationJsonObject;
|
|
74
|
+
}
|
|
75
|
+
export interface AutomationCapabilityResult {
|
|
76
|
+
invocationId: string;
|
|
77
|
+
success: boolean;
|
|
78
|
+
output?: AutomationJsonObject | null;
|
|
79
|
+
error?: AutomationError | null;
|
|
80
|
+
completedAt: string;
|
|
81
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AutomationCapabilityIdempotency = exports.AutomationCapabilityEffectClass = 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 = {}));
|
|
10
|
+
var AutomationCapabilityEffectClass;
|
|
11
|
+
(function (AutomationCapabilityEffectClass) {
|
|
12
|
+
AutomationCapabilityEffectClass["NONE"] = "none";
|
|
13
|
+
AutomationCapabilityEffectClass["READ"] = "read";
|
|
14
|
+
AutomationCapabilityEffectClass["WRITE"] = "write";
|
|
15
|
+
AutomationCapabilityEffectClass["COMMUNICATION"] = "communication";
|
|
16
|
+
AutomationCapabilityEffectClass["BULK"] = "bulk";
|
|
17
|
+
})(AutomationCapabilityEffectClass || (exports.AutomationCapabilityEffectClass = AutomationCapabilityEffectClass = {}));
|
|
18
|
+
var AutomationCapabilityIdempotency;
|
|
19
|
+
(function (AutomationCapabilityIdempotency) {
|
|
20
|
+
AutomationCapabilityIdempotency["NONE"] = "none";
|
|
21
|
+
AutomationCapabilityIdempotency["SUPPORTED"] = "supported";
|
|
22
|
+
AutomationCapabilityIdempotency["REQUIRED"] = "required";
|
|
23
|
+
})(AutomationCapabilityIdempotency || (exports.AutomationCapabilityIdempotency = AutomationCapabilityIdempotency = {}));
|
|
@@ -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,94 @@
|
|
|
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
|
+
/** Automations y sus capacidades Core. */
|
|
9
|
+
AUTOMATIONS = "automations",
|
|
10
|
+
/** Gestión de conversaciones y mensajería conversacional. */
|
|
11
|
+
CONVERSATIONS = "conversations",
|
|
12
|
+
/** Gestión de contactos y organizaciones. */
|
|
13
|
+
CONTACTS = "contacts",
|
|
14
|
+
/** Gestión de tickets y soporte. */
|
|
15
|
+
TICKETS = "tickets",
|
|
16
|
+
/** Campañas y operaciones de marketing. */
|
|
17
|
+
MARKETING = "marketing",
|
|
18
|
+
/** Procesos y oportunidades comerciales. */
|
|
19
|
+
SALES = "sales",
|
|
20
|
+
/** Telefonía y llamadas. */
|
|
21
|
+
CALLS = "calls",
|
|
22
|
+
/** Comunicaciones salientes como email y SMS. */
|
|
23
|
+
COMMUNICATIONS = "communications",
|
|
24
|
+
/** Formularios y captura estructurada de datos. */
|
|
25
|
+
FORMS = "forms",
|
|
26
|
+
/** Conectores e integraciones externas. */
|
|
27
|
+
INTEGRATIONS = "integrations",
|
|
28
|
+
/** Acceso y transformación de datos. */
|
|
29
|
+
DATA = "data",
|
|
30
|
+
/** Agentes, modelos y herramientas de inteligencia artificial. */
|
|
31
|
+
AI = "ai",
|
|
32
|
+
/** Bases de conocimiento, documentos y búsqueda semántica. */
|
|
33
|
+
KNOWLEDGE = "knowledge",
|
|
34
|
+
/** Propietario externo o no clasificado; no debe usarse como fallback. */
|
|
35
|
+
GENERIC = "generic"
|
|
36
|
+
}
|
|
37
|
+
export type AutomationJsonValue = string | number | boolean | null | AutomationJsonObject | AutomationJsonValue[];
|
|
38
|
+
/** Objeto JSON transportable entre aplicaciones y Automation. */
|
|
39
|
+
export interface AutomationJsonObject {
|
|
40
|
+
[key: string]: AutomationJsonValue;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Schema JSON deliberadamente abierto. Cada aplicación es propietaria de la
|
|
44
|
+
* validación del schema que publica en su catálogo de capacidades.
|
|
45
|
+
*/
|
|
46
|
+
export interface AutomationJsonSchema extends AutomationJsonObject {
|
|
47
|
+
type?: string;
|
|
48
|
+
title?: string;
|
|
49
|
+
description?: string;
|
|
50
|
+
required?: string[];
|
|
51
|
+
properties?: {
|
|
52
|
+
[key: string]: AutomationJsonSchema;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export interface AutomationPageRequest {
|
|
56
|
+
skip: number;
|
|
57
|
+
limit: number;
|
|
58
|
+
}
|
|
59
|
+
export interface AutomationPagedResult<T> {
|
|
60
|
+
items: T[];
|
|
61
|
+
total: number;
|
|
62
|
+
skip: number;
|
|
63
|
+
limit: number;
|
|
64
|
+
}
|
|
65
|
+
export interface AutomationError {
|
|
66
|
+
code: string;
|
|
67
|
+
message: string;
|
|
68
|
+
details?: AutomationJsonObject | null;
|
|
69
|
+
}
|
|
70
|
+
/** Referencia estable con la identidad visible al iniciar una ejecución. */
|
|
71
|
+
export interface AutomationCustomerReference {
|
|
72
|
+
id: string;
|
|
73
|
+
displayNameSnapshot?: string | null;
|
|
74
|
+
}
|
|
75
|
+
/** Referencia transversal a una entidad perteneciente a una aplicación. */
|
|
76
|
+
export interface AutomationResourceReference {
|
|
77
|
+
/** Aplicación propietaria de la entidad. */
|
|
78
|
+
sourceApplication: AutomationSourceApplication;
|
|
79
|
+
/** Tipo estable dentro de la aplicación, por ejemplo ticket o campaign. */
|
|
80
|
+
resourceType: string;
|
|
81
|
+
/** Identificador en la aplicación propietaria. */
|
|
82
|
+
id: string;
|
|
83
|
+
/** Nombre informativo capturado al crear la referencia. */
|
|
84
|
+
displayNameSnapshot?: string | null;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Contexto CRM opcional asociado a un evento o ejecución.
|
|
88
|
+
* Permite representar escenarios B2C, B2B o un contacto perteneciente a una
|
|
89
|
+
* empresa sin depender de los contratos internos del módulo Contacts.
|
|
90
|
+
*/
|
|
91
|
+
export interface AutomationCustomer {
|
|
92
|
+
contact?: AutomationCustomerReference | null;
|
|
93
|
+
business?: AutomationCustomerReference | null;
|
|
94
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
/** Automations y sus capacidades Core. */
|
|
13
|
+
AutomationSourceApplication["AUTOMATIONS"] = "automations";
|
|
14
|
+
/** Gestión de conversaciones y mensajería conversacional. */
|
|
15
|
+
AutomationSourceApplication["CONVERSATIONS"] = "conversations";
|
|
16
|
+
/** Gestión de contactos y organizaciones. */
|
|
17
|
+
AutomationSourceApplication["CONTACTS"] = "contacts";
|
|
18
|
+
/** Gestión de tickets y soporte. */
|
|
19
|
+
AutomationSourceApplication["TICKETS"] = "tickets";
|
|
20
|
+
/** Campañas y operaciones de marketing. */
|
|
21
|
+
AutomationSourceApplication["MARKETING"] = "marketing";
|
|
22
|
+
/** Procesos y oportunidades comerciales. */
|
|
23
|
+
AutomationSourceApplication["SALES"] = "sales";
|
|
24
|
+
/** Telefonía y llamadas. */
|
|
25
|
+
AutomationSourceApplication["CALLS"] = "calls";
|
|
26
|
+
/** Comunicaciones salientes como email y SMS. */
|
|
27
|
+
AutomationSourceApplication["COMMUNICATIONS"] = "communications";
|
|
28
|
+
/** Formularios y captura estructurada de datos. */
|
|
29
|
+
AutomationSourceApplication["FORMS"] = "forms";
|
|
30
|
+
/** Conectores e integraciones externas. */
|
|
31
|
+
AutomationSourceApplication["INTEGRATIONS"] = "integrations";
|
|
32
|
+
/** Acceso y transformación de datos. */
|
|
33
|
+
AutomationSourceApplication["DATA"] = "data";
|
|
34
|
+
/** Agentes, modelos y herramientas de inteligencia artificial. */
|
|
35
|
+
AutomationSourceApplication["AI"] = "ai";
|
|
36
|
+
/** Bases de conocimiento, documentos y búsqueda semántica. */
|
|
37
|
+
AutomationSourceApplication["KNOWLEDGE"] = "knowledge";
|
|
38
|
+
/** Propietario externo o no clasificado; no debe usarse como fallback. */
|
|
39
|
+
AutomationSourceApplication["GENERIC"] = "generic";
|
|
40
|
+
})(AutomationSourceApplication || (exports.AutomationSourceApplication = AutomationSourceApplication = {}));
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { AutomationCustomer, AutomationJsonObject, AutomationJsonSchema, AutomationResourceReference, AutomationSourceApplication } from '../Common';
|
|
2
|
+
export interface AutomationEventDefinition {
|
|
3
|
+
eventType: string;
|
|
4
|
+
version: number;
|
|
5
|
+
sourceApplication: AutomationSourceApplication;
|
|
6
|
+
name: string;
|
|
7
|
+
description?: string | null;
|
|
8
|
+
payloadSchema: AutomationJsonSchema;
|
|
9
|
+
/** Schema de la vista del envelope cuyos paths pueden utilizarse en filtros. */
|
|
10
|
+
filterSchema?: AutomationJsonSchema | null;
|
|
11
|
+
requiredPermissions: string[];
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface AutomationEventEnvelope {
|
|
15
|
+
id: string;
|
|
16
|
+
spaceId: string;
|
|
17
|
+
sourceApplication: AutomationSourceApplication;
|
|
18
|
+
eventType: string;
|
|
19
|
+
eventVersion: number;
|
|
20
|
+
occurredAt: string;
|
|
21
|
+
receivedAt: string;
|
|
22
|
+
customer?: AutomationCustomer | null;
|
|
23
|
+
/** Entidad principal sobre la que ocurrió el evento. */
|
|
24
|
+
subject?: AutomationResourceReference | null;
|
|
25
|
+
correlationId?: string | null;
|
|
26
|
+
causationId?: string | null;
|
|
27
|
+
idempotencyKey?: string | null;
|
|
28
|
+
payload: AutomationJsonObject;
|
|
29
|
+
metadata?: AutomationJsonObject | null;
|
|
30
|
+
}
|
|
31
|
+
export declare enum AutomationEntryPointExclusionCode {
|
|
32
|
+
ENTRY_POINT_DISABLED = "entryPointDisabled",
|
|
33
|
+
SOURCE_APPLICATION_MISMATCH = "sourceApplicationMismatch",
|
|
34
|
+
EVENT_TYPE_MISMATCH = "eventTypeMismatch",
|
|
35
|
+
FILTERS_NOT_MATCHED = "filtersNotMatched",
|
|
36
|
+
FLOW_NOT_ACTIVE = "flowNotActive",
|
|
37
|
+
VERSION_NOT_PUBLISHED = "versionNotPublished",
|
|
38
|
+
LOWER_PRIORITY = "lowerPriority",
|
|
39
|
+
EXECUTION_MODE_RESTRICTED = "executionModeRestricted"
|
|
40
|
+
}
|
|
41
|
+
/** Motivo estructurado por el que un Entry Point no fue seleccionado. */
|
|
42
|
+
export interface AutomationEntryPointExclusion {
|
|
43
|
+
/** Código estable para lógica, métricas y observabilidad. */
|
|
44
|
+
code: AutomationEntryPointExclusionCode;
|
|
45
|
+
/** Explicación humana opcional; no debe utilizarse para lógica. */
|
|
46
|
+
message?: string | null;
|
|
47
|
+
/** Datos diagnósticos específicos del código. */
|
|
48
|
+
details?: AutomationJsonObject | null;
|
|
49
|
+
}
|
|
50
|
+
export interface ResolveFlowEntryPointsRequest {
|
|
51
|
+
event: AutomationEventEnvelope;
|
|
52
|
+
}
|
|
53
|
+
export interface ResolvedFlowEntryPoint {
|
|
54
|
+
/** Definición estable del Flow. */
|
|
55
|
+
flowId: string;
|
|
56
|
+
/** Versión publicada candidata a recibir el evento. */
|
|
57
|
+
flowVersionId: string;
|
|
58
|
+
/** Entry Point evaluado. */
|
|
59
|
+
entryPointId: string;
|
|
60
|
+
/** Prioridad utilizada para resolver candidatos. */
|
|
61
|
+
priority: number;
|
|
62
|
+
/** Indica si el candidato debe iniciar una ejecución. */
|
|
63
|
+
selected: boolean;
|
|
64
|
+
/** Motivo de exclusión; ausente cuando selected es true. */
|
|
65
|
+
exclusion?: AutomationEntryPointExclusion | null;
|
|
66
|
+
}
|
|
67
|
+
export interface ResolveFlowEntryPointsResult {
|
|
68
|
+
matches: ResolvedFlowEntryPoint[];
|
|
69
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AutomationEntryPointExclusionCode = void 0;
|
|
4
|
+
var AutomationEntryPointExclusionCode;
|
|
5
|
+
(function (AutomationEntryPointExclusionCode) {
|
|
6
|
+
AutomationEntryPointExclusionCode["ENTRY_POINT_DISABLED"] = "entryPointDisabled";
|
|
7
|
+
AutomationEntryPointExclusionCode["SOURCE_APPLICATION_MISMATCH"] = "sourceApplicationMismatch";
|
|
8
|
+
AutomationEntryPointExclusionCode["EVENT_TYPE_MISMATCH"] = "eventTypeMismatch";
|
|
9
|
+
AutomationEntryPointExclusionCode["FILTERS_NOT_MATCHED"] = "filtersNotMatched";
|
|
10
|
+
AutomationEntryPointExclusionCode["FLOW_NOT_ACTIVE"] = "flowNotActive";
|
|
11
|
+
AutomationEntryPointExclusionCode["VERSION_NOT_PUBLISHED"] = "versionNotPublished";
|
|
12
|
+
AutomationEntryPointExclusionCode["LOWER_PRIORITY"] = "lowerPriority";
|
|
13
|
+
AutomationEntryPointExclusionCode["EXECUTION_MODE_RESTRICTED"] = "executionModeRestricted";
|
|
14
|
+
})(AutomationEntryPointExclusionCode || (exports.AutomationEntryPointExclusionCode = AutomationEntryPointExclusionCode = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Event';
|
|
@@ -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("./Event"), exports);
|