@trii/types 2.10.764 → 2.10.766

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.
Files changed (111) hide show
  1. package/dist/Automations/Events/Event.d.ts +3 -3
  2. package/dist/Common/Messages/Message.d.ts +1 -0
  3. package/dist/Common/index.js +7 -17
  4. package/dist/Contacts/CommunicationEndpoint.d.ts +8 -8
  5. package/dist/Conversations/Classifications/ConversationClassificationEvents.d.ts +2 -2
  6. package/dist/Conversations/Conversation.d.ts +11 -11
  7. package/dist/Conversations/InboxMongo.d.ts +12 -12
  8. package/dist/Conversations/InboxQueries.d.ts +73 -3
  9. package/dist/Conversations/Routing.d.ts +10 -10
  10. package/dist/Conversations/index.js +7 -17
  11. package/dist/Events/DomainEventTypes.d.ts +23 -23
  12. package/dist/Spaces/spaces.d.ts +2 -2
  13. package/dist/Tickets/Automation.d.ts +2 -0
  14. package/dist/Tickets/Automation.js +2 -0
  15. package/dist/Tickets/Routing.d.ts +9 -0
  16. package/dist/Tickets/Workflow.d.ts +3 -1
  17. package/dist/Tickets/Workflow.js +2 -0
  18. package/dist/index.js +7 -17
  19. package/dist/src/Automations/Capabilities/Capability.d.ts +81 -0
  20. package/dist/src/Automations/Capabilities/Capability.js +23 -0
  21. package/dist/src/Automations/Capabilities/index.d.ts +1 -0
  22. package/dist/src/Automations/Capabilities/index.js +17 -0
  23. package/dist/src/Automations/Common.d.ts +94 -0
  24. package/dist/src/Automations/Common.js +40 -0
  25. package/dist/src/Automations/Events/Event.d.ts +69 -0
  26. package/dist/src/Automations/Events/Event.js +14 -0
  27. package/dist/src/Automations/Events/index.d.ts +1 -0
  28. package/dist/src/Automations/Events/index.js +17 -0
  29. package/dist/src/Automations/Executions/Execution.d.ts +254 -0
  30. package/dist/src/Automations/Executions/Execution.js +62 -0
  31. package/dist/src/Automations/Executions/Testing.d.ts +166 -0
  32. package/dist/src/Automations/Executions/Testing.js +54 -0
  33. package/dist/src/Automations/Executions/index.d.ts +2 -0
  34. package/dist/src/Automations/Executions/index.js +18 -0
  35. package/dist/src/Automations/Flows/Canvas.d.ts +103 -0
  36. package/dist/src/Automations/Flows/Canvas.js +38 -0
  37. package/dist/src/Automations/Flows/Flow.d.ts +147 -0
  38. package/dist/src/Automations/Flows/Flow.js +58 -0
  39. package/dist/src/Automations/Flows/Requests.d.ts +71 -0
  40. package/dist/src/Automations/Flows/Validation.d.ts +28 -0
  41. package/dist/src/Automations/Flows/Validation.js +9 -0
  42. package/dist/src/Automations/Flows/index.d.ts +4 -0
  43. package/dist/src/Automations/Flows/index.js +20 -0
  44. package/dist/src/Automations/Nodes/Node.d.ts +113 -0
  45. package/dist/src/Automations/Nodes/Node.js +27 -0
  46. package/dist/src/Automations/Nodes/index.d.ts +1 -0
  47. package/dist/src/Automations/Nodes/index.js +17 -0
  48. package/dist/src/Automations/index.d.ts +6 -0
  49. package/dist/src/Automations/index.js +22 -0
  50. package/dist/src/Chats/Chat.d.ts +61 -0
  51. package/dist/src/Chats/Chat.js +28 -0
  52. package/dist/src/Common/Channels/Channel.d.ts +28 -1
  53. package/dist/src/Contacts/contacts.d.ts +2 -2
  54. package/dist/src/Conversations/Assignment.d.ts +81 -0
  55. package/dist/src/Conversations/Assignment.js +4 -0
  56. package/dist/src/Conversations/Conversation.d.ts +331 -48
  57. package/dist/src/Conversations/Conversation.js +14 -34
  58. package/dist/src/Conversations/DashBoard/dashboard.d.ts +2 -2
  59. package/dist/src/Conversations/Flows/Workflows/Workflow.d.ts +280 -123
  60. package/dist/src/Conversations/Flows/Workflows/Workflow.js +85 -35
  61. package/dist/src/Conversations/Groups/Group.d.ts +2 -8
  62. package/dist/src/Conversations/Groups/Group.js +0 -6
  63. package/dist/src/Conversations/InboxMongo.d.ts +154 -0
  64. package/dist/src/Conversations/InboxMongo.js +128 -0
  65. package/dist/src/Conversations/InboxProjection.d.ts +162 -0
  66. package/dist/src/Conversations/InboxProjection.js +2 -0
  67. package/dist/src/Conversations/Label.d.ts +1 -1
  68. package/dist/src/Conversations/Outbox.d.ts +24 -0
  69. package/dist/src/Conversations/Outbox.js +4 -0
  70. package/dist/src/Conversations/Queue.d.ts +107 -0
  71. package/dist/src/Conversations/Queue.js +4 -0
  72. package/dist/src/Conversations/Routing.d.ts +164 -0
  73. package/dist/src/Conversations/Routing.js +2 -0
  74. package/dist/src/Conversations/Sla.d.ts +227 -0
  75. package/dist/src/Conversations/Sla.js +6 -0
  76. package/dist/src/Conversations/Transfer.d.ts +73 -0
  77. package/dist/src/Conversations/Transfer.js +2 -0
  78. package/dist/src/Conversations/WebHook.d.ts +1 -1
  79. package/dist/src/Conversations/index.d.ts +9 -1
  80. package/dist/src/Conversations/index.js +9 -1
  81. package/dist/src/Forms/API.d.ts +53 -0
  82. package/dist/src/Forms/API.js +2 -0
  83. package/dist/src/Forms/SubmittedForm.d.ts +56 -0
  84. package/dist/src/Forms/SubmittedForm.js +9 -0
  85. package/dist/src/Forms/index.d.ts +2 -0
  86. package/dist/src/Forms/index.js +18 -0
  87. package/dist/src/Presence/AgentPause.d.ts +24 -0
  88. package/dist/src/Presence/AgentPause.js +19 -0
  89. package/dist/src/Presence/QueueParticipation.d.ts +17 -0
  90. package/dist/src/Presence/QueueParticipation.js +2 -0
  91. package/dist/src/Presence/QueueRoutingState.d.ts +27 -0
  92. package/dist/src/Presence/QueueRoutingState.js +9 -0
  93. package/dist/src/Presence/index.d.ts +3 -0
  94. package/dist/src/Presence/index.js +19 -0
  95. package/dist/src/Tickets/Category.d.ts +18 -0
  96. package/dist/src/Tickets/Dashboard.d.ts +78 -0
  97. package/dist/src/Tickets/Dashboard.js +13 -1
  98. package/dist/src/Tickets/Fields.d.ts +1 -0
  99. package/dist/src/Tickets/Layouts.d.ts +3 -1
  100. package/dist/src/Tickets/Workflow.d.ts +20 -0
  101. package/dist/src/Users/UserTrii.d.ts +10 -0
  102. package/dist/src/Users/UserTrii.js +8 -1
  103. package/dist/src/index.d.ts +3 -0
  104. package/dist/src/index.js +4 -1
  105. package/package.json +5 -2
  106. package/dist/Conversations/DashBoard/dashboardForms.d.ts +0 -44
  107. package/dist/Conversations/DashBoard/dashboardForms.js +0 -24
  108. package/dist/Conversations/InboxCounters.d.ts +0 -18
  109. package/dist/src/Conversations/DashBoard/dashboardForms.d.ts +0 -44
  110. package/dist/src/Conversations/DashBoard/dashboardForms.js +0 -24
  111. /package/dist/{Conversations/InboxCounters.js → src/Automations/Flows/Requests.js} +0 -0
@@ -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);
@@ -0,0 +1,254 @@
1
+ import { AutomationCustomer, AutomationError, AutomationJsonObject, AutomationPageRequest, AutomationResourceReference, AutomationSourceApplication } from '../Common';
2
+ import { AutomationCapabilityEffectClass } from '../Capabilities';
3
+ export declare enum AutomationExecutionStatus {
4
+ QUEUED = "queued",
5
+ RUNNING = "running",
6
+ WAITING = "waiting",
7
+ SUCCEEDED = "succeeded",
8
+ FAILED = "failed",
9
+ CANCELLED = "cancelled",
10
+ TIMED_OUT = "timedOut"
11
+ }
12
+ export declare enum AutomationExecutionStepStatus {
13
+ PENDING = "pending",
14
+ RUNNING = "running",
15
+ WAITING = "waiting",
16
+ SUCCEEDED = "succeeded",
17
+ FAILED = "failed",
18
+ SKIPPED = "skipped",
19
+ CANCELLED = "cancelled"
20
+ }
21
+ export declare enum AutomationExecutionPurpose {
22
+ PRODUCTION = "production",
23
+ TEST = "test"
24
+ }
25
+ export declare enum AutomationExecutionEffectMode {
26
+ SIMULATE = "simulate",
27
+ TEST_TARGETS = "testTargets",
28
+ REAL = "real"
29
+ }
30
+ export declare enum AutomationExecutionScopeKind {
31
+ FULL = "full",
32
+ UNTIL_NODE = "untilNode",
33
+ FROM_NODE = "fromNode",
34
+ NODE_ONLY = "nodeOnly"
35
+ }
36
+ export declare enum AutomationExecutionSourceKind {
37
+ MANUAL = "manual",
38
+ FIXTURE = "fixture",
39
+ CAPTURED_EVENT = "capturedEvent",
40
+ EXECUTION = "execution",
41
+ STEP_OUTPUT = "stepOutput"
42
+ }
43
+ export declare enum AutomationExecutionLineageOperation {
44
+ NEW = "new",
45
+ REPLAY = "replay",
46
+ RETRY = "retry"
47
+ }
48
+ export declare enum AutomationExecutionEffectDecision {
49
+ EXECUTED = "executed",
50
+ SIMULATED = "simulated",
51
+ REDIRECTED = "redirected",
52
+ BLOCKED = "blocked"
53
+ }
54
+ export interface AutomationExecutionScope {
55
+ kind: AutomationExecutionScopeKind;
56
+ startNodeId?: string | null;
57
+ stopNodeId?: string | null;
58
+ }
59
+ /** Referencia inmutable a la definición exacta utilizada por una ejecución. */
60
+ export interface AutomationFlowSnapshotReference {
61
+ flowId: string;
62
+ flowVersionId?: string | null;
63
+ snapshotId?: string | null;
64
+ revision: number;
65
+ contentHash: string;
66
+ }
67
+ export interface AutomationExecutionSource {
68
+ kind: AutomationExecutionSourceKind;
69
+ fixtureId?: string | null;
70
+ capturedEventId?: string | null;
71
+ executionId?: string | null;
72
+ stepId?: string | null;
73
+ }
74
+ export interface AutomationExecutionLineage {
75
+ operation: AutomationExecutionLineageOperation;
76
+ sourceExecutionId?: string | null;
77
+ sourceStepId?: string | null;
78
+ rootExecutionId?: string | null;
79
+ }
80
+ /** Resumen seguro; la política interna completa nunca se expone al caller. */
81
+ export interface AutomationExecutionPolicySummary {
82
+ maxDurationMs?: number | null;
83
+ maxSteps?: number | null;
84
+ maxIterations?: number | null;
85
+ maxItems?: number | null;
86
+ maxCost?: number | null;
87
+ currency?: string | null;
88
+ simulatedClockAt?: string | null;
89
+ requiresConfirmation: boolean;
90
+ }
91
+ export interface AutomationExecutionEffectRecord {
92
+ id: string;
93
+ nodeId: string;
94
+ effectClass: AutomationCapabilityEffectClass;
95
+ action: string;
96
+ decision: AutomationExecutionEffectDecision;
97
+ originalTarget?: AutomationResourceReference | null;
98
+ effectiveTarget?: AutomationResourceReference | null;
99
+ preview?: AutomationJsonObject | null;
100
+ providerReference?: string | null;
101
+ idempotencyKey?: string | null;
102
+ warnings?: string[] | null;
103
+ }
104
+ /**
105
+ * Referencia genérica al evento que inició una ejecución.
106
+ */
107
+ export interface AutomationExecutionTrigger {
108
+ /** Entry Point que aceptó el evento. */
109
+ entryPointId: string;
110
+ /** Aplicación propietaria del evento. */
111
+ sourceApplication: AutomationSourceApplication;
112
+ /** Código estable del tipo de evento. */
113
+ eventType: string;
114
+ /** Entidad principal relacionada con el evento. */
115
+ reference?: AutomationResourceReference | null;
116
+ /** Instante informado por el productor. */
117
+ occurredAt?: string | null;
118
+ /** Snapshot opcional del payload disparador. */
119
+ payload?: AutomationJsonObject | null;
120
+ }
121
+ /** Identidad completa que debe persistir una ejecución transversal. */
122
+ export interface AutomationFlowExecutionReference {
123
+ flowId: string;
124
+ flowVersionId: string;
125
+ entryPointId: string;
126
+ executionId: string;
127
+ }
128
+ /** Contexto que un caller puede aportar al iniciar una ejecución. */
129
+ export interface AutomationExecutionContextInput {
130
+ /** Valores iniciales de variables declaradas por la versión del Flow. */
131
+ variables: AutomationJsonObject;
132
+ /** Extensiones agrupadas por módulo propietario. */
133
+ extensions: AutomationJsonObject;
134
+ }
135
+ /** Datos confiables establecidos exclusivamente por Automations. */
136
+ export interface AutomationExecutionSystemContext {
137
+ /** Locale BCP 47, por ejemplo es-AR. */
138
+ locale?: string | null;
139
+ /** Zona horaria IANA utilizada por fechas y agendas. */
140
+ timeZone?: string | null;
141
+ /** Usuario, servicio o recurso que originó la ejecución. */
142
+ actor?: AutomationResourceReference | null;
143
+ }
144
+ /** Contexto persistido y utilizado durante una ejecución. */
145
+ export interface AutomationExecutionContext extends AutomationExecutionContextInput {
146
+ /** Datos confiables agregados por el runtime. */
147
+ system: AutomationExecutionSystemContext;
148
+ }
149
+ export interface AutomationExecution {
150
+ id: string;
151
+ spaceId: string;
152
+ flowId: string;
153
+ flowVersionId: string;
154
+ flowVersion: number;
155
+ entryPointId: string;
156
+ status: AutomationExecutionStatus;
157
+ customer?: AutomationCustomer | null;
158
+ trigger: AutomationExecutionTrigger;
159
+ input: AutomationJsonObject;
160
+ /** Scope tipado y extensible utilizado durante la ejecución. */
161
+ context: AutomationExecutionContext;
162
+ output?: AutomationJsonObject | null;
163
+ error?: AutomationError | null;
164
+ createdAt: string;
165
+ startedAt?: string | null;
166
+ completedAt?: string | null;
167
+ cancelledAt?: string | null;
168
+ cancelledBy?: string | null;
169
+ correlationId?: string | null;
170
+ parentExecutionId?: string | null;
171
+ usage: AutomationExecutionUsage;
172
+ /** Ausente únicamente en ejecuciones creadas con contratos anteriores. */
173
+ purpose?: AutomationExecutionPurpose | null;
174
+ requestedEffectMode?: AutomationExecutionEffectMode | null;
175
+ effectiveEffectMode?: AutomationExecutionEffectMode | null;
176
+ scope?: AutomationExecutionScope | null;
177
+ source?: AutomationExecutionSource | null;
178
+ snapshot?: AutomationFlowSnapshotReference | null;
179
+ lineage?: AutomationExecutionLineage | null;
180
+ startedBy?: AutomationResourceReference | null;
181
+ policySummary?: AutomationExecutionPolicySummary | null;
182
+ testCaseId?: string | null;
183
+ testCaseRevision?: number | null;
184
+ }
185
+ export interface AutomationExecutionStep {
186
+ id: string;
187
+ executionId: string;
188
+ nodeId: string;
189
+ nodeDefinitionCode: string;
190
+ nodeDefinitionVersion: number;
191
+ sequence: number;
192
+ attempt: number;
193
+ status: AutomationExecutionStepStatus;
194
+ input?: AutomationJsonObject | null;
195
+ output?: AutomationJsonObject | null;
196
+ error?: AutomationError | null;
197
+ startedAt?: string | null;
198
+ completedAt?: string | null;
199
+ usage: AutomationExecutionUsage;
200
+ waitingReason?: string | null;
201
+ skippedReason?: string | null;
202
+ itemIndex?: number | null;
203
+ iteration?: number | null;
204
+ parentStepId?: string | null;
205
+ takenEdgeIds?: string[] | null;
206
+ effects?: AutomationExecutionEffectRecord[] | null;
207
+ }
208
+ export interface AutomationExecutionUsage {
209
+ inputTokens: number;
210
+ outputTokens: number;
211
+ totalTokens: number;
212
+ totalCost: number;
213
+ currency: string;
214
+ durationMs: number;
215
+ }
216
+ export interface AutomationExecutionQuery extends AutomationPageRequest {
217
+ flowId?: string | null;
218
+ flowVersionId?: string | null;
219
+ entryPointId?: string | null;
220
+ contactId?: string | null;
221
+ businessId?: string | null;
222
+ customerSearch?: string | null;
223
+ statuses?: AutomationExecutionStatus[] | null;
224
+ createdFrom?: string | null;
225
+ createdTo?: string | null;
226
+ correlationId?: string | null;
227
+ purposes?: AutomationExecutionPurpose[] | null;
228
+ effectModes?: AutomationExecutionEffectMode[] | null;
229
+ testCaseId?: string | null;
230
+ }
231
+ export interface StartAutomationExecutionRequest {
232
+ flowId: string;
233
+ flowVersionId: string;
234
+ entryPointId: string;
235
+ customer?: AutomationCustomer | null;
236
+ trigger: AutomationExecutionTrigger;
237
+ input: AutomationJsonObject;
238
+ /** Variables iniciales y extensiones aportadas por el caller. */
239
+ context: AutomationExecutionContextInput;
240
+ idempotencyKey?: string | null;
241
+ correlationId?: string | null;
242
+ parentExecutionId?: string | null;
243
+ }
244
+ export interface CancelAutomationExecutionRequest {
245
+ reason?: string | null;
246
+ }
247
+ export interface RetryAutomationExecutionRequest {
248
+ fromStepId?: string | null;
249
+ inputOverrides?: AutomationJsonObject | null;
250
+ }
251
+ export interface AutomationExecutionDetails {
252
+ execution: AutomationExecution;
253
+ steps: AutomationExecutionStep[];
254
+ }