@trii/types 2.10.727 → 2.10.728

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 (135) hide show
  1. package/dist/Automations/Events/Event.d.ts +3 -3
  2. package/dist/Contacts/CommunicationEndpoint.d.ts +8 -8
  3. package/dist/Conversations/Conversation.d.ts +8 -8
  4. package/dist/Conversations/InboxMongo.d.ts +12 -12
  5. package/dist/Conversations/Routing.d.ts +10 -10
  6. package/dist/Events/DomainEventTypes.d.ts +23 -23
  7. package/dist/Tickets/AdvancedApi.d.ts +55 -0
  8. package/dist/Tickets/AdvancedApi.js +17 -1
  9. package/dist/src/Automations/Capabilities/Capability.d.ts +81 -0
  10. package/dist/src/Automations/Capabilities/Capability.js +23 -0
  11. package/dist/src/Automations/Capabilities/index.d.ts +1 -0
  12. package/dist/src/Automations/Capabilities/index.js +17 -0
  13. package/dist/src/Automations/Common.d.ts +94 -0
  14. package/dist/src/Automations/Common.js +40 -0
  15. package/dist/src/Automations/Events/Event.d.ts +96 -0
  16. package/dist/src/Automations/Events/Event.js +19 -0
  17. package/dist/src/Automations/Events/index.d.ts +1 -0
  18. package/dist/src/Automations/Events/index.js +17 -0
  19. package/dist/src/Automations/Executions/Execution.d.ts +298 -0
  20. package/dist/src/Automations/Executions/Execution.js +76 -0
  21. package/dist/src/Automations/Executions/Testing.d.ts +166 -0
  22. package/dist/src/Automations/Executions/Testing.js +54 -0
  23. package/dist/src/Automations/Executions/index.d.ts +2 -0
  24. package/dist/src/Automations/Executions/index.js +18 -0
  25. package/dist/src/Automations/Flows/Canvas.d.ts +109 -0
  26. package/dist/src/Automations/Flows/Canvas.js +43 -0
  27. package/dist/src/Automations/Flows/Flow.d.ts +154 -0
  28. package/dist/src/Automations/Flows/Flow.js +58 -0
  29. package/dist/src/Automations/Flows/Requests.d.ts +71 -0
  30. package/dist/src/Automations/Flows/Validation.d.ts +28 -0
  31. package/dist/src/Automations/Flows/Validation.js +9 -0
  32. package/dist/src/Automations/Flows/index.d.ts +4 -0
  33. package/dist/src/Automations/Flows/index.js +20 -0
  34. package/dist/src/Automations/Nodes/Node.d.ts +116 -0
  35. package/dist/src/Automations/Nodes/Node.js +27 -0
  36. package/dist/src/Automations/Nodes/index.d.ts +1 -0
  37. package/dist/src/Automations/Nodes/index.js +17 -0
  38. package/dist/src/Automations/Triggers/Trigger.d.ts +112 -0
  39. package/dist/src/Automations/Triggers/Trigger.js +66 -0
  40. package/dist/src/Automations/Triggers/index.d.ts +1 -0
  41. package/dist/src/Automations/Triggers/index.js +17 -0
  42. package/dist/src/Automations/index.d.ts +7 -0
  43. package/dist/src/Automations/index.js +23 -0
  44. package/dist/src/Chats/Chat.d.ts +61 -0
  45. package/dist/src/Chats/Chat.js +28 -0
  46. package/dist/src/Common/Channels/Channel.d.ts +28 -1
  47. package/dist/src/Common/Channels/Email.d.ts +1 -0
  48. package/dist/src/Common/Channels/Facebook.d.ts +1 -0
  49. package/dist/src/Common/Channels/Form.d.ts +1 -0
  50. package/dist/src/Common/Channels/GoogleBusiness.d.ts +1 -0
  51. package/dist/src/Common/Channels/Instagram.d.ts +1 -0
  52. package/dist/src/Common/Channels/MercadoLibre.d.ts +1 -0
  53. package/dist/src/Common/Channels/WebChat.d.ts +1 -0
  54. package/dist/src/Contacts/CommunicationEndpoint.d.ts +107 -0
  55. package/dist/src/Contacts/CommunicationEndpoint.js +39 -0
  56. package/dist/src/Contacts/CommunicationMethod.d.ts +9 -0
  57. package/dist/src/Contacts/CommunicationMethod.js +2 -0
  58. package/dist/src/Contacts/contacts.d.ts +2 -2
  59. package/dist/src/Contacts/index.d.ts +2 -0
  60. package/dist/src/Contacts/index.js +2 -0
  61. package/dist/src/Conversations/Assignment.d.ts +181 -0
  62. package/dist/src/Conversations/Assignment.js +4 -0
  63. package/dist/src/Conversations/Conversation.d.ts +410 -48
  64. package/dist/src/Conversations/Conversation.js +14 -34
  65. package/dist/src/Conversations/DashBoard/dashboard.d.ts +2 -2
  66. package/dist/src/Conversations/Flows/Workflows/Workflow.d.ts +280 -123
  67. package/dist/src/Conversations/Flows/Workflows/Workflow.js +85 -35
  68. package/dist/src/Conversations/Groups/Group.d.ts +2 -8
  69. package/dist/src/Conversations/Groups/Group.js +0 -6
  70. package/dist/src/Conversations/InboxMongo.d.ts +154 -0
  71. package/dist/src/Conversations/InboxMongo.js +128 -0
  72. package/dist/src/Conversations/InboxProjection.d.ts +162 -0
  73. package/dist/src/Conversations/InboxProjection.js +2 -0
  74. package/dist/src/Conversations/Label.d.ts +1 -1
  75. package/dist/src/Conversations/Outbox.d.ts +24 -0
  76. package/dist/src/Conversations/Outbox.js +4 -0
  77. package/dist/src/Conversations/Queue.d.ts +107 -0
  78. package/dist/src/Conversations/Queue.js +4 -0
  79. package/dist/src/Conversations/Routing.d.ts +164 -0
  80. package/dist/src/Conversations/Routing.js +2 -0
  81. package/dist/src/Conversations/Sla.d.ts +227 -0
  82. package/dist/src/Conversations/Sla.js +6 -0
  83. package/dist/src/Conversations/Transfer.d.ts +73 -0
  84. package/dist/src/Conversations/Transfer.js +2 -0
  85. package/dist/src/Conversations/WebHook.d.ts +1 -1
  86. package/dist/src/Conversations/index.d.ts +9 -1
  87. package/dist/src/Conversations/index.js +9 -1
  88. package/dist/src/Events/DomainEventTypes.d.ts +51 -0
  89. package/dist/src/Events/DomainEventTypes.js +49 -0
  90. package/dist/src/Events/index.d.ts +1 -0
  91. package/dist/src/Events/index.js +17 -0
  92. package/dist/src/Forms/API.d.ts +53 -0
  93. package/dist/src/Forms/API.js +2 -0
  94. package/dist/src/Forms/SubmittedForm.d.ts +56 -0
  95. package/dist/src/Forms/SubmittedForm.js +9 -0
  96. package/dist/src/Forms/index.d.ts +2 -0
  97. package/dist/src/Forms/index.js +18 -0
  98. package/dist/src/Presence/AgentPause.d.ts +24 -0
  99. package/dist/src/Presence/AgentPause.js +19 -0
  100. package/dist/src/Presence/QueueParticipation.d.ts +17 -0
  101. package/dist/src/Presence/QueueParticipation.js +2 -0
  102. package/dist/src/Presence/QueueRoutingState.d.ts +27 -0
  103. package/dist/src/Presence/QueueRoutingState.js +9 -0
  104. package/dist/src/Presence/index.d.ts +3 -0
  105. package/dist/src/Presence/index.js +19 -0
  106. package/dist/src/PublicAPI/apiKey.d.ts +92 -3
  107. package/dist/src/PublicAPI/apiKey.js +27 -0
  108. package/dist/src/Tickets/AI.d.ts +50 -2
  109. package/dist/src/Tickets/AdvancedApi.d.ts +142 -2
  110. package/dist/src/Tickets/AdvancedApi.js +28 -1
  111. package/dist/src/Tickets/Approval.d.ts +20 -4
  112. package/dist/src/Tickets/Automation.d.ts +46 -2
  113. package/dist/src/Tickets/Category.d.ts +18 -0
  114. package/dist/src/Tickets/Dashboard.d.ts +78 -0
  115. package/dist/src/Tickets/Dashboard.js +13 -1
  116. package/dist/src/Tickets/Fields.d.ts +4 -0
  117. package/dist/src/Tickets/Layouts.d.ts +3 -1
  118. package/dist/src/Tickets/Routing.d.ts +105 -3
  119. package/dist/src/Tickets/Routing.js +7 -1
  120. package/dist/src/Tickets/Security.d.ts +271 -4
  121. package/dist/src/Tickets/Security.js +10 -1
  122. package/dist/src/Tickets/SelfService.d.ts +190 -0
  123. package/dist/src/Tickets/Sla.d.ts +140 -0
  124. package/dist/src/Tickets/Workflow.d.ts +20 -0
  125. package/dist/src/Users/UserTrii.d.ts +10 -0
  126. package/dist/src/Users/UserTrii.js +8 -1
  127. package/dist/src/index.d.ts +4 -0
  128. package/dist/src/index.js +5 -1
  129. package/package.json +12 -12
  130. package/dist/Conversations/DashBoard/dashboardForms.d.ts +0 -44
  131. package/dist/Conversations/DashBoard/dashboardForms.js +0 -24
  132. package/dist/Conversations/InboxCounters.d.ts +0 -18
  133. package/dist/src/Conversations/DashBoard/dashboardForms.d.ts +0 -44
  134. package/dist/src/Conversations/DashBoard/dashboardForms.js +0 -24
  135. /package/dist/{Conversations/InboxCounters.js → src/Automations/Flows/Requests.js} +0 -0
@@ -0,0 +1,28 @@
1
+ import { AutomationJsonObject } from '../Common';
2
+ export declare enum AutomationValidationSeverity {
3
+ INFO = "info",
4
+ WARNING = "warning",
5
+ ERROR = "error"
6
+ }
7
+ export interface AutomationValidationIssue {
8
+ code: string;
9
+ severity: AutomationValidationSeverity;
10
+ message: string;
11
+ path?: string | null;
12
+ nodeId?: string | null;
13
+ entryPointId?: string | null;
14
+ details?: AutomationJsonObject | null;
15
+ }
16
+ export interface AutomationFlowValidationResult {
17
+ flowId: string;
18
+ flowVersionId: string;
19
+ valid: boolean;
20
+ issues: AutomationValidationIssue[];
21
+ validatedAt: string;
22
+ }
23
+ export interface FlowEntryPointOverlap {
24
+ firstEntryPointId: string;
25
+ secondEntryPointId: string;
26
+ reason: string;
27
+ allowsMultipleExecutions: boolean;
28
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AutomationValidationSeverity = void 0;
4
+ var AutomationValidationSeverity;
5
+ (function (AutomationValidationSeverity) {
6
+ AutomationValidationSeverity["INFO"] = "info";
7
+ AutomationValidationSeverity["WARNING"] = "warning";
8
+ AutomationValidationSeverity["ERROR"] = "error";
9
+ })(AutomationValidationSeverity || (exports.AutomationValidationSeverity = AutomationValidationSeverity = {}));
@@ -0,0 +1,4 @@
1
+ export * from './Flow';
2
+ export * from './Canvas';
3
+ export * from './Requests';
4
+ export * from './Validation';
@@ -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("./Flow"), exports);
18
+ __exportStar(require("./Canvas"), exports);
19
+ __exportStar(require("./Requests"), exports);
20
+ __exportStar(require("./Validation"), exports);
@@ -0,0 +1,116 @@
1
+ import { AutomationJsonObject, AutomationJsonSchema, AutomationJsonValue, AutomationPageRequest, AutomationSourceApplication } from '../Common';
2
+ import { AutomationCapabilityReference } from '../Capabilities';
3
+ import { AutomationTriggerDefinition } from '../Triggers';
4
+ import { AutomationNodeHandle, AutomationNodeKind } from '../Flows';
5
+ export declare enum AutomationNodePropertyEditor {
6
+ STRING = "string",
7
+ NUMBER = "number",
8
+ BOOLEAN = "boolean",
9
+ PASSWORD = "password",
10
+ JSON = "json",
11
+ DATE = "date",
12
+ FILE = "file",
13
+ CODE = "code",
14
+ OPTIONS = "options",
15
+ MULTI_OPTIONS = "multiOptions",
16
+ ASYNC_OPTIONS = "asyncOptions",
17
+ ASYNC_MULTI_OPTIONS = "asyncMultiOptions"
18
+ }
19
+ export declare enum AutomationNodeVisibilityLogicalOperator {
20
+ ALL = "all",
21
+ ANY = "any"
22
+ }
23
+ export declare enum AutomationNodeConditionOperator {
24
+ EQUALS = "equals"
25
+ }
26
+ export interface AutomationNodeCondition {
27
+ propertyId: string;
28
+ operator: AutomationNodeConditionOperator;
29
+ value?: AutomationJsonValue;
30
+ }
31
+ export interface AutomationNodeVisibilityRule {
32
+ logicalOperator: AutomationNodeVisibilityLogicalOperator;
33
+ conditions: AutomationNodeCondition[];
34
+ }
35
+ export interface AutomationNodePropertyUi {
36
+ tabId: string;
37
+ tabLabel: string;
38
+ order: number;
39
+ labelKey?: string | null;
40
+ placeholder?: string | null;
41
+ rows?: number | null;
42
+ numberMin?: number | null;
43
+ numberMax?: number | null;
44
+ step?: number | null;
45
+ acceptVariable?: boolean | null;
46
+ acceptEmojis?: boolean | null;
47
+ allowMaximizeInput?: boolean | null;
48
+ itemProperties: AutomationNodePropertyDefinition[];
49
+ }
50
+ export interface AutomationNodeDefinition {
51
+ code: string;
52
+ version: number;
53
+ kind: AutomationNodeKind;
54
+ sourceApplication: AutomationSourceApplication;
55
+ name: string;
56
+ description?: string | null;
57
+ icon?: string | null;
58
+ color?: string | null;
59
+ tags: string[];
60
+ requiredPermissions: string[];
61
+ capability?: AutomationCapabilityReference | null;
62
+ /** Metadata disponible únicamente para nodos que pueden iniciar un Flow. */
63
+ trigger?: AutomationTriggerDefinition | null;
64
+ inputs: AutomationNodeHandle[];
65
+ outputs: AutomationNodeHandle[];
66
+ properties: AutomationNodePropertyDefinition[];
67
+ inputSchema?: AutomationJsonSchema | null;
68
+ outputSchema?: AutomationJsonSchema | null;
69
+ enabled: boolean;
70
+ }
71
+ export interface AutomationNodePropertyDefinition {
72
+ id: string;
73
+ label: string;
74
+ description?: string | null;
75
+ editor: AutomationNodePropertyEditor;
76
+ required: boolean;
77
+ defaultValue?: AutomationJsonValue;
78
+ schema?: AutomationJsonSchema | null;
79
+ options: AutomationNodeOption[];
80
+ optionsCapabilityCode?: string | null;
81
+ ui: AutomationNodePropertyUi;
82
+ showWhen?: AutomationNodeVisibilityRule | null;
83
+ hideWhen?: AutomationNodeVisibilityRule | null;
84
+ }
85
+ export interface AutomationNodeOption {
86
+ id: string;
87
+ label: string;
88
+ description?: string | null;
89
+ imageUrl?: string | null;
90
+ metadata?: AutomationJsonObject | null;
91
+ }
92
+ export interface AutomationNodeDefinitionQuery extends AutomationPageRequest {
93
+ search?: string | null;
94
+ kinds?: AutomationNodeKind[] | null;
95
+ sourceApplications?: AutomationSourceApplication[] | null;
96
+ tags?: string[] | null;
97
+ enabledOnly: boolean;
98
+ }
99
+ export interface AutomationNodeOptionsRequest {
100
+ definitionCode: string;
101
+ definitionVersion: number;
102
+ propertyId: string;
103
+ currentValues: AutomationJsonObject;
104
+ context: AutomationJsonObject;
105
+ /** Optional provider-defined, case-insensitive text search. */
106
+ search?: string | null;
107
+ /** Opaque cursor returned by the previous response. */
108
+ continuationToken?: string | null;
109
+ /** Preferred page size. The API clamps it to the supported range (1-200). */
110
+ limit?: number;
111
+ }
112
+ export interface AutomationNodeOptionsResult {
113
+ options: AutomationNodeOption[];
114
+ /** Opaque cursor for the next page; null or omitted means the last page. */
115
+ continuationToken?: string | null;
116
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AutomationNodeConditionOperator = exports.AutomationNodeVisibilityLogicalOperator = exports.AutomationNodePropertyEditor = void 0;
4
+ var AutomationNodePropertyEditor;
5
+ (function (AutomationNodePropertyEditor) {
6
+ AutomationNodePropertyEditor["STRING"] = "string";
7
+ AutomationNodePropertyEditor["NUMBER"] = "number";
8
+ AutomationNodePropertyEditor["BOOLEAN"] = "boolean";
9
+ AutomationNodePropertyEditor["PASSWORD"] = "password";
10
+ AutomationNodePropertyEditor["JSON"] = "json";
11
+ AutomationNodePropertyEditor["DATE"] = "date";
12
+ AutomationNodePropertyEditor["FILE"] = "file";
13
+ AutomationNodePropertyEditor["CODE"] = "code";
14
+ AutomationNodePropertyEditor["OPTIONS"] = "options";
15
+ AutomationNodePropertyEditor["MULTI_OPTIONS"] = "multiOptions";
16
+ AutomationNodePropertyEditor["ASYNC_OPTIONS"] = "asyncOptions";
17
+ AutomationNodePropertyEditor["ASYNC_MULTI_OPTIONS"] = "asyncMultiOptions";
18
+ })(AutomationNodePropertyEditor || (exports.AutomationNodePropertyEditor = AutomationNodePropertyEditor = {}));
19
+ var AutomationNodeVisibilityLogicalOperator;
20
+ (function (AutomationNodeVisibilityLogicalOperator) {
21
+ AutomationNodeVisibilityLogicalOperator["ALL"] = "all";
22
+ AutomationNodeVisibilityLogicalOperator["ANY"] = "any";
23
+ })(AutomationNodeVisibilityLogicalOperator || (exports.AutomationNodeVisibilityLogicalOperator = AutomationNodeVisibilityLogicalOperator = {}));
24
+ var AutomationNodeConditionOperator;
25
+ (function (AutomationNodeConditionOperator) {
26
+ AutomationNodeConditionOperator["EQUALS"] = "equals";
27
+ })(AutomationNodeConditionOperator || (exports.AutomationNodeConditionOperator = AutomationNodeConditionOperator = {}));
@@ -0,0 +1 @@
1
+ export * from './Node';
@@ -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("./Node"), exports);
@@ -0,0 +1,112 @@
1
+ import { AutomationJsonObject, AutomationJsonSchema, AutomationSourceApplication } from '../Common';
2
+ /** Forma en que una instancia del trigger puede iniciar una ejecución. */
3
+ export declare enum AutomationTriggerActivationKind {
4
+ MANUAL = "manual",
5
+ DOMAIN_EVENT = "domainEvent",
6
+ WEBHOOK = "webhook",
7
+ SCHEDULE = "schedule"
8
+ }
9
+ /** Entidad principal que queda asociada a la ejecución iniciada. */
10
+ export declare enum AutomationTriggerSubjectKind {
11
+ NONE = "none",
12
+ CONTACT = "contact",
13
+ BUSINESS = "business",
14
+ CONVERSATION = "conversation",
15
+ TICKET = "ticket",
16
+ FORM_SUBMISSION = "formSubmission",
17
+ WEBHOOK = "webhook",
18
+ SCHEDULE = "schedule"
19
+ }
20
+ /** Política histórica de reingreso para la misma identidad CRM. */
21
+ export declare enum AutomationTriggerReentryMode {
22
+ /** Cada ocurrencia elegible puede crear una ejecución. */
23
+ EVERY_OCCURRENCE = "everyOccurrence",
24
+ /** La identidad primaria del evento sólo ingresa una vez. */
25
+ ONCE_PER_SUBJECT = "oncePerSubject",
26
+ /** El contacto sólo ingresa una vez en la automatización. */
27
+ ONCE_PER_CONTACT = "oncePerContact",
28
+ /** La dirección/canal del contacto sólo ingresa una vez. */
29
+ ONCE_PER_CONTACT_ADDRESS = "oncePerContactAddress"
30
+ }
31
+ /** Alcance histórico utilizado al aplicar una política de reingreso. */
32
+ export declare enum AutomationTriggerHistoryScope {
33
+ /** Publicar una versión nueva no reinicia el historial. */
34
+ FLOW = "flow",
35
+ /** Cada versión publicada mantiene su propio historial. */
36
+ FLOW_VERSION = "flowVersion"
37
+ }
38
+ /** Control de ejecuciones simultáneas para una misma identidad. */
39
+ export declare enum AutomationTriggerConcurrencyMode {
40
+ ALLOW = "allow",
41
+ SINGLE_ACTIVE_PER_SUBJECT = "singleActivePerSubject",
42
+ SINGLE_ACTIVE_PER_CONTACT = "singleActivePerContact",
43
+ SINGLE_ACTIVE_PER_CONTACT_ADDRESS = "singleActivePerContactAddress"
44
+ }
45
+ /**
46
+ * Evento seleccionable dentro de un trigger de módulo.
47
+ *
48
+ * `code` es la opción estable usada por el diseñador. `eventType` es el
49
+ * identificador contractual resuelto por backend y nunca debe solicitarse
50
+ * como texto libre al usuario.
51
+ */
52
+ export interface AutomationTriggerEventDefinition {
53
+ code: string;
54
+ name: string;
55
+ description?: string | null;
56
+ sourceApplication: AutomationSourceApplication;
57
+ eventType: string;
58
+ eventVersion: number;
59
+ subjectKind: AutomationTriggerSubjectKind;
60
+ configurationSchema?: AutomationJsonSchema | null;
61
+ supportsEntryFilters: boolean;
62
+ supportedReentryModes: AutomationTriggerReentryMode[];
63
+ defaultReentryMode: AutomationTriggerReentryMode;
64
+ supportedConcurrencyModes: AutomationTriggerConcurrencyMode[];
65
+ defaultConcurrencyMode: AutomationTriggerConcurrencyMode;
66
+ }
67
+ /** Metadata de trigger publicada junto con una definición de nodo. */
68
+ export interface AutomationTriggerDefinition {
69
+ activationKind: AutomationTriggerActivationKind;
70
+ defaultEventCode: string;
71
+ events: AutomationTriggerEventDefinition[];
72
+ }
73
+ /**
74
+ * Selección normalizada persistida en el Entry Point.
75
+ * La configuración se valida contra el schema del evento seleccionado.
76
+ */
77
+ export interface AutomationTriggerBinding {
78
+ definitionCode: string;
79
+ definitionVersion: number;
80
+ eventCode: string;
81
+ activationKind: AutomationTriggerActivationKind;
82
+ configuration: AutomationJsonObject;
83
+ }
84
+ /** Política aplicada antes de crear una ejecución. */
85
+ export interface AutomationTriggerAdmissionPolicy {
86
+ reentryMode: AutomationTriggerReentryMode;
87
+ historyScope: AutomationTriggerHistoryScope;
88
+ concurrencyMode: AutomationTriggerConcurrencyMode;
89
+ }
90
+ /**
91
+ * Referencia estable a una propiedad estándar o personalizada.
92
+ * `nameKey` es la identidad; nombre y tipo son snapshots informativos.
93
+ */
94
+ export interface AutomationTriggerPropertyReference {
95
+ resourceType: string;
96
+ nameKey: string;
97
+ valueType: string;
98
+ displayNameSnapshot?: string | null;
99
+ }
100
+ export declare enum AutomationWebhookAuthenticationMode {
101
+ NONE = "none",
102
+ SHARED_SECRET = "sharedSecret",
103
+ HMAC_SHA256 = "hmacSha256"
104
+ }
105
+ export declare enum AutomationScheduleKind {
106
+ ONCE = "once",
107
+ INTERVAL = "interval",
108
+ DAILY = "daily",
109
+ WEEKLY = "weekly",
110
+ MONTHLY = "monthly",
111
+ CRON = "cron"
112
+ }
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AutomationScheduleKind = exports.AutomationWebhookAuthenticationMode = exports.AutomationTriggerConcurrencyMode = exports.AutomationTriggerHistoryScope = exports.AutomationTriggerReentryMode = exports.AutomationTriggerSubjectKind = exports.AutomationTriggerActivationKind = void 0;
4
+ /** Forma en que una instancia del trigger puede iniciar una ejecución. */
5
+ var AutomationTriggerActivationKind;
6
+ (function (AutomationTriggerActivationKind) {
7
+ AutomationTriggerActivationKind["MANUAL"] = "manual";
8
+ AutomationTriggerActivationKind["DOMAIN_EVENT"] = "domainEvent";
9
+ AutomationTriggerActivationKind["WEBHOOK"] = "webhook";
10
+ AutomationTriggerActivationKind["SCHEDULE"] = "schedule";
11
+ })(AutomationTriggerActivationKind || (exports.AutomationTriggerActivationKind = AutomationTriggerActivationKind = {}));
12
+ /** Entidad principal que queda asociada a la ejecución iniciada. */
13
+ var AutomationTriggerSubjectKind;
14
+ (function (AutomationTriggerSubjectKind) {
15
+ AutomationTriggerSubjectKind["NONE"] = "none";
16
+ AutomationTriggerSubjectKind["CONTACT"] = "contact";
17
+ AutomationTriggerSubjectKind["BUSINESS"] = "business";
18
+ AutomationTriggerSubjectKind["CONVERSATION"] = "conversation";
19
+ AutomationTriggerSubjectKind["TICKET"] = "ticket";
20
+ AutomationTriggerSubjectKind["FORM_SUBMISSION"] = "formSubmission";
21
+ AutomationTriggerSubjectKind["WEBHOOK"] = "webhook";
22
+ AutomationTriggerSubjectKind["SCHEDULE"] = "schedule";
23
+ })(AutomationTriggerSubjectKind || (exports.AutomationTriggerSubjectKind = AutomationTriggerSubjectKind = {}));
24
+ /** Política histórica de reingreso para la misma identidad CRM. */
25
+ var AutomationTriggerReentryMode;
26
+ (function (AutomationTriggerReentryMode) {
27
+ /** Cada ocurrencia elegible puede crear una ejecución. */
28
+ AutomationTriggerReentryMode["EVERY_OCCURRENCE"] = "everyOccurrence";
29
+ /** La identidad primaria del evento sólo ingresa una vez. */
30
+ AutomationTriggerReentryMode["ONCE_PER_SUBJECT"] = "oncePerSubject";
31
+ /** El contacto sólo ingresa una vez en la automatización. */
32
+ AutomationTriggerReentryMode["ONCE_PER_CONTACT"] = "oncePerContact";
33
+ /** La dirección/canal del contacto sólo ingresa una vez. */
34
+ AutomationTriggerReentryMode["ONCE_PER_CONTACT_ADDRESS"] = "oncePerContactAddress";
35
+ })(AutomationTriggerReentryMode || (exports.AutomationTriggerReentryMode = AutomationTriggerReentryMode = {}));
36
+ /** Alcance histórico utilizado al aplicar una política de reingreso. */
37
+ var AutomationTriggerHistoryScope;
38
+ (function (AutomationTriggerHistoryScope) {
39
+ /** Publicar una versión nueva no reinicia el historial. */
40
+ AutomationTriggerHistoryScope["FLOW"] = "flow";
41
+ /** Cada versión publicada mantiene su propio historial. */
42
+ AutomationTriggerHistoryScope["FLOW_VERSION"] = "flowVersion";
43
+ })(AutomationTriggerHistoryScope || (exports.AutomationTriggerHistoryScope = AutomationTriggerHistoryScope = {}));
44
+ /** Control de ejecuciones simultáneas para una misma identidad. */
45
+ var AutomationTriggerConcurrencyMode;
46
+ (function (AutomationTriggerConcurrencyMode) {
47
+ AutomationTriggerConcurrencyMode["ALLOW"] = "allow";
48
+ AutomationTriggerConcurrencyMode["SINGLE_ACTIVE_PER_SUBJECT"] = "singleActivePerSubject";
49
+ AutomationTriggerConcurrencyMode["SINGLE_ACTIVE_PER_CONTACT"] = "singleActivePerContact";
50
+ AutomationTriggerConcurrencyMode["SINGLE_ACTIVE_PER_CONTACT_ADDRESS"] = "singleActivePerContactAddress";
51
+ })(AutomationTriggerConcurrencyMode || (exports.AutomationTriggerConcurrencyMode = AutomationTriggerConcurrencyMode = {}));
52
+ var AutomationWebhookAuthenticationMode;
53
+ (function (AutomationWebhookAuthenticationMode) {
54
+ AutomationWebhookAuthenticationMode["NONE"] = "none";
55
+ AutomationWebhookAuthenticationMode["SHARED_SECRET"] = "sharedSecret";
56
+ AutomationWebhookAuthenticationMode["HMAC_SHA256"] = "hmacSha256";
57
+ })(AutomationWebhookAuthenticationMode || (exports.AutomationWebhookAuthenticationMode = AutomationWebhookAuthenticationMode = {}));
58
+ var AutomationScheduleKind;
59
+ (function (AutomationScheduleKind) {
60
+ AutomationScheduleKind["ONCE"] = "once";
61
+ AutomationScheduleKind["INTERVAL"] = "interval";
62
+ AutomationScheduleKind["DAILY"] = "daily";
63
+ AutomationScheduleKind["WEEKLY"] = "weekly";
64
+ AutomationScheduleKind["MONTHLY"] = "monthly";
65
+ AutomationScheduleKind["CRON"] = "cron";
66
+ })(AutomationScheduleKind || (exports.AutomationScheduleKind = AutomationScheduleKind = {}));
@@ -0,0 +1 @@
1
+ export * from './Trigger';
@@ -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("./Trigger"), exports);
@@ -0,0 +1,7 @@
1
+ export * from './Common';
2
+ export * from './Flows';
3
+ export * from './Capabilities';
4
+ export * from './Executions';
5
+ export * from './Nodes';
6
+ export * from './Events';
7
+ export * from './Triggers';
@@ -0,0 +1,23 @@
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);
21
+ __exportStar(require("./Nodes"), exports);
22
+ __exportStar(require("./Events"), exports);
23
+ __exportStar(require("./Triggers"), exports);
@@ -0,0 +1,61 @@
1
+ import { UserInfo } from "../Users/UserTrii";
2
+ export interface Chat {
3
+ id: string;
4
+ spaceId: string;
5
+ type: ChatType;
6
+ ownerId: string;
7
+ chatName: string;
8
+ chatImage: string;
9
+ chatMembers: IChatMemeber[];
10
+ chatMembersCount: number;
11
+ remoteAddress: string;
12
+ remoteAddressId: string;
13
+ lastMessage: string;
14
+ lastMessageId?: string;
15
+ newMessagesCount: number;
16
+ newMessagesUnread: boolean;
17
+ pinned: boolean;
18
+ status: ConversationSatus;
19
+ archived: boolean;
20
+ /** Domain objects discussed or served by this conversation. */
21
+ contextReferences?: ContextReference[];
22
+ finalizedAt: Date;
23
+ finalizedBy?: string;
24
+ createdAt: Date;
25
+ updatedAt: Date;
26
+ }
27
+ export interface ContextReference {
28
+ entityType: ContextType;
29
+ entityId: string;
30
+ role?: string;
31
+ linkedAt: Date;
32
+ linkedBy?: string;
33
+ }
34
+ export declare enum ContextType {
35
+ TICKET = "TICKET",
36
+ CONVERSATION = "CONVERSATION",
37
+ LEAD = "LEAD",
38
+ DEBT = "DEBT"
39
+ }
40
+ export declare enum ChatType {
41
+ /**messages between two users */
42
+ DIRECT = 1,
43
+ /**messages between multiple users */
44
+ GROUP = 2,
45
+ /**Messages to discuss a conversation */
46
+ DISCUSS_CONVERSATION = 11,
47
+ /**Messages to discuss a ticket */
48
+ DISCUSS_TICKET = 12
49
+ }
50
+ export interface IChatMemeber {
51
+ joinTimeStamp: Date;
52
+ isAdmin: boolean;
53
+ userId: string;
54
+ user: UserInfo;
55
+ }
56
+ export declare enum ConversationSatus {
57
+ NEW = 1,
58
+ ACTIVE = 2,
59
+ FINALIZED = 3,
60
+ ARCHIVED = 4
61
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConversationSatus = exports.ChatType = exports.ContextType = void 0;
4
+ var ContextType;
5
+ (function (ContextType) {
6
+ ContextType["TICKET"] = "TICKET";
7
+ ContextType["CONVERSATION"] = "CONVERSATION";
8
+ ContextType["LEAD"] = "LEAD";
9
+ ContextType["DEBT"] = "DEBT";
10
+ })(ContextType || (exports.ContextType = ContextType = {}));
11
+ var ChatType;
12
+ (function (ChatType) {
13
+ /**messages between two users */
14
+ ChatType[ChatType["DIRECT"] = 1] = "DIRECT";
15
+ /**messages between multiple users */
16
+ ChatType[ChatType["GROUP"] = 2] = "GROUP";
17
+ /**Messages to discuss a conversation */
18
+ ChatType[ChatType["DISCUSS_CONVERSATION"] = 11] = "DISCUSS_CONVERSATION";
19
+ /**Messages to discuss a ticket */
20
+ ChatType[ChatType["DISCUSS_TICKET"] = 12] = "DISCUSS_TICKET";
21
+ })(ChatType || (exports.ChatType = ChatType = {}));
22
+ var ConversationSatus;
23
+ (function (ConversationSatus) {
24
+ ConversationSatus[ConversationSatus["NEW"] = 1] = "NEW";
25
+ ConversationSatus[ConversationSatus["ACTIVE"] = 2] = "ACTIVE";
26
+ ConversationSatus[ConversationSatus["FINALIZED"] = 3] = "FINALIZED";
27
+ ConversationSatus[ConversationSatus["ARCHIVED"] = 4] = "ARCHIVED";
28
+ })(ConversationSatus || (exports.ConversationSatus = ConversationSatus = {}));
@@ -37,6 +37,16 @@ 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
+ }
40
50
  interface IChannel {
41
51
  id?: string | null;
42
52
  spaceId?: string | null;
@@ -44,13 +54,30 @@ interface IChannel {
44
54
  description?: string | null;
45
55
  type?: ChannelType | null;
46
56
  permissions?: Permission[] | null;
57
+ /**
58
+ * @deprecated Legacy channel assignment configuration. Use
59
+ * ChannelConversationRoutingConfig; Flow bindings live in FlowEntryPoint.
60
+ */
47
61
  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
+ */
48
67
  assignMethod: AssignMethod;
68
+ /**
69
+ * @deprecated Ownership is produced by the routing decision.
70
+ */
49
71
  assignToOwner?: boolean;
50
72
  /**
51
73
  * habilita la creacion de conversaciones para este canal, si esta en false, los mensajes entrantes no generaran conversaciones
52
74
  */
53
75
  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;
54
81
  /**
55
82
  * Gets or sets a value indicating whether webhook notifications are enabled.
56
83
  * Redirects incoming messages to the specified webhook URL when set to true.
@@ -96,4 +123,4 @@ declare enum channelStatus {
96
123
  SUSPENDED = 7,
97
124
  CONFIGURATION_PENDING = 9
98
125
  }
99
- export { IChannel, IChannelInfo, channelStatus, MessagingAvailability };
126
+ export { IChannel, IChannelInfo, ChannelConversationRoutingConfig, channelStatus, MessagingAvailability };
@@ -30,6 +30,7 @@ export declare class EmailConfig {
30
30
  reassign?: boolean;
31
31
  reassignTime?: number;
32
32
  reassignGroupId?: string;
33
+ reOpenTime?: number;
33
34
  connectedEmailDoamin: string;
34
35
  inboundConnectedEmail: string;
35
36
  inboundConnectedEmailStatus: EmailConfigOutboundStatus;
@@ -1,6 +1,7 @@
1
1
  import { ISchedule } from "../Schedules/Schedules";
2
2
  export declare class FacebookConfig {
3
3
  token?: string | '';
4
+ reOpenTime?: number;
4
5
  fbAccessToken: string;
5
6
  fbAccessTokenExpiration: Date;
6
7
  fbUserId: string;
@@ -43,6 +43,7 @@ export declare class FormConfig {
43
43
  reassignGroupId?: string;
44
44
  scheduleId?: string | null;
45
45
  schedule?: ISchedule | null;
46
+ reOpenTime?: number;
46
47
  title?: string | '';
47
48
  subTitle?: string | '';
48
49
  color?: string | '';
@@ -4,6 +4,7 @@ export declare class GoogleBusinessConfig {
4
4
  reassign?: boolean;
5
5
  reassignTime?: number;
6
6
  reassignGroupId?: string;
7
+ reOpenTime?: number;
7
8
  autoResponseBusinessHours?: boolean;
8
9
  autoResponseOutOfBusinessHours?: boolean;
9
10
  autoResponseHoliday?: boolean;
@@ -16,6 +16,7 @@ export declare class InstagramConfig {
16
16
  reassign?: boolean;
17
17
  reassignTime?: number;
18
18
  reassignGroupId?: string;
19
+ reOpenTime?: number;
19
20
  signatureEnabled?: boolean;
20
21
  signatureText?: string;
21
22
  autoResponseBusinessHours?: boolean;