@trii/types 2.10.704 → 2.10.706

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 (110) hide show
  1. package/dist/Common/index.js +7 -17
  2. package/dist/Conversations/Assignment.d.ts +2 -0
  3. package/dist/Conversations/Conversation.d.ts +24 -0
  4. package/dist/Conversations/index.js +7 -17
  5. package/dist/Tickets/SelfService.d.ts +60 -0
  6. package/dist/index.js +7 -17
  7. package/dist/src/Automations/Capabilities/Capability.d.ts +33 -0
  8. package/dist/src/Automations/Capabilities/Capability.js +15 -1
  9. package/dist/src/Automations/Common.d.ts +47 -0
  10. package/dist/src/Automations/Common.js +22 -0
  11. package/dist/src/Automations/Events/Event.d.ts +31 -3
  12. package/dist/src/Automations/Events/Event.js +12 -0
  13. package/dist/src/Automations/Executions/Execution.d.ts +144 -4
  14. package/dist/src/Automations/Executions/Execution.js +40 -1
  15. package/dist/src/Automations/Executions/Testing.d.ts +166 -0
  16. package/dist/src/Automations/Executions/Testing.js +54 -0
  17. package/dist/src/Automations/Executions/index.d.ts +1 -0
  18. package/dist/src/Automations/Executions/index.js +1 -0
  19. package/dist/src/Automations/Flows/Canvas.d.ts +21 -4
  20. package/dist/src/Automations/Flows/Canvas.js +5 -1
  21. package/dist/src/Automations/Flows/Flow.d.ts +48 -3
  22. package/dist/src/Automations/Flows/Flow.js +25 -1
  23. package/dist/src/Automations/Nodes/Node.d.ts +41 -3
  24. package/dist/src/Automations/Nodes/Node.js +10 -1
  25. package/dist/src/Common/Channels/Channel.d.ts +6 -4
  26. package/dist/src/Conversations/Conversation.d.ts +90 -0
  27. package/dist/src/Tickets/Dashboard.d.ts +1 -0
  28. package/package.json +5 -2
  29. package/dist/AI/MapPolygon.d.ts +0 -22
  30. package/dist/AI/MapPolygon.js +0 -2
  31. package/dist/Conversations/DashBoard/dashboardForms.d.ts +0 -44
  32. package/dist/Conversations/DashBoard/dashboardForms.js +0 -24
  33. package/dist/Conversations/Flows/Nodes/NodeAIChatBot.d.ts +0 -0
  34. package/dist/Conversations/Flows/Nodes/NodeAIChatBot.js +0 -0
  35. package/dist/Conversations/Flows/Nodes/NodeApi.d.ts +0 -2
  36. package/dist/Conversations/Flows/Nodes/NodeApi.js +0 -183
  37. package/dist/Conversations/Flows/Nodes/NodeBotIA.d.ts +0 -15
  38. package/dist/Conversations/Flows/Nodes/NodeBotIA.js +0 -6
  39. package/dist/Conversations/Flows/Nodes/NodeChatBotIA.d.ts +0 -15
  40. package/dist/Conversations/Flows/Nodes/NodeChatBotIA.js +0 -6
  41. package/dist/Conversations/Flows/Nodes/NodeConditional.d.ts +0 -0
  42. package/dist/Conversations/Flows/Nodes/NodeConditional.js +0 -0
  43. package/dist/Conversations/Flows/Nodes/NodeContactSearch.d.ts +0 -0
  44. package/dist/Conversations/Flows/Nodes/NodeContactSearch.js +0 -0
  45. package/dist/Conversations/Flows/Nodes/NodeContactUpdate.d.ts +0 -0
  46. package/dist/Conversations/Flows/Nodes/NodeContactUpdate.js +0 -0
  47. package/dist/Conversations/Flows/Nodes/NodeConversationAssignTo.d.ts +0 -0
  48. package/dist/Conversations/Flows/Nodes/NodeConversationAssignTo.js +0 -0
  49. package/dist/Conversations/Flows/Nodes/NodeConversationFinalize.d.ts +0 -0
  50. package/dist/Conversations/Flows/Nodes/NodeConversationFinalize.js +0 -0
  51. package/dist/Conversations/Flows/Nodes/NodeConversationUpdate.d.ts +0 -0
  52. package/dist/Conversations/Flows/Nodes/NodeConversationUpdate.js +0 -0
  53. package/dist/Conversations/Flows/Nodes/NodeFillForm.d.ts +0 -0
  54. package/dist/Conversations/Flows/Nodes/NodeFillForm.js +0 -0
  55. package/dist/Conversations/Flows/Nodes/NodeFillTicket.d.ts +0 -1
  56. package/dist/Conversations/Flows/Nodes/NodeFillTicket.js +0 -9
  57. package/dist/Conversations/Flows/Nodes/NodeGoogleCalendar.d.ts +0 -20
  58. package/dist/Conversations/Flows/Nodes/NodeGoogleCalendar.js +0 -2
  59. package/dist/Conversations/Flows/Nodes/NodeGoogleMaps copy.d.ts +0 -12
  60. package/dist/Conversations/Flows/Nodes/NodeGoogleMaps copy.js +0 -6
  61. package/dist/Conversations/Flows/Nodes/NodeGoogleMaps.d.ts +0 -15
  62. package/dist/Conversations/Flows/Nodes/NodeGoogleMaps.js +0 -2
  63. package/dist/Conversations/Flows/Nodes/NodeMsgReply.d.ts +0 -0
  64. package/dist/Conversations/Flows/Nodes/NodeMsgReply.js +0 -0
  65. package/dist/Conversations/Flows/Nodes/NodeMsgSend.d.ts +0 -0
  66. package/dist/Conversations/Flows/Nodes/NodeMsgSend.js +0 -0
  67. package/dist/Conversations/Flows/Nodes/NodeMsgText.d.ts +0 -1
  68. package/dist/Conversations/Flows/Nodes/NodeMsgText.js +0 -27
  69. package/dist/Conversations/Flows/Nodes/NodeMsgWaitResponse.d.ts +0 -0
  70. package/dist/Conversations/Flows/Nodes/NodeMsgWaitResponse.js +0 -0
  71. package/dist/Conversations/Flows/Nodes/NodeRedirect.d.ts +0 -0
  72. package/dist/Conversations/Flows/Nodes/NodeRedirect.js +0 -0
  73. package/dist/Conversations/Flows/Nodes/NodeSendEmail.d.ts +0 -0
  74. package/dist/Conversations/Flows/Nodes/NodeSendEmail.js +0 -0
  75. package/dist/Conversations/Flows/Nodes/NodeSqlQuery.d.ts +0 -0
  76. package/dist/Conversations/Flows/Nodes/NodeSqlQuery.js +0 -0
  77. package/dist/Conversations/Flows/Nodes/NodeStart.d.ts +0 -0
  78. package/dist/Conversations/Flows/Nodes/NodeStart.js +0 -0
  79. package/dist/Conversations/Flows/Nodes/NodeTimeScheduleControl.d.ts +0 -0
  80. package/dist/Conversations/Flows/Nodes/NodeTimeScheduleControl.js +0 -0
  81. package/dist/Conversations/Flows/Nodes/NodeTimeTimer.d.ts +0 -0
  82. package/dist/Conversations/Flows/Nodes/NodeTimeTimer.js +0 -0
  83. package/dist/Conversations/Flows/Nodes/NodeTimeWaitUntil.d.ts +0 -0
  84. package/dist/Conversations/Flows/Nodes/NodeTimeWaitUntil.js +0 -0
  85. package/dist/Conversations/Flows/Nodes/NodeToolCalculator.d.ts +0 -2
  86. package/dist/Conversations/Flows/Nodes/NodeToolCalculator.js +0 -37
  87. package/dist/Conversations/Flows/Nodes/NodeToolContacts.d.ts +0 -2
  88. package/dist/Conversations/Flows/Nodes/NodeToolContacts.js +0 -59
  89. package/dist/Conversations/Flows/Nodes/NodeToolFunction.d.ts +0 -2
  90. package/dist/Conversations/Flows/Nodes/NodeToolFunction.js +0 -45
  91. package/dist/Conversations/Flows/Nodes/NodeToolGoogleCalendar.d.ts +0 -2
  92. package/dist/Conversations/Flows/Nodes/NodeToolGoogleCalendar.js +0 -87
  93. package/dist/Conversations/Flows/Nodes/NodeToolGoogleMaps.d.ts +0 -1
  94. package/dist/Conversations/Flows/Nodes/NodeToolGoogleMaps.js +0 -2
  95. package/dist/Conversations/Flows/Nodes/NodeToolKnowledge.d.ts +0 -2
  96. package/dist/Conversations/Flows/Nodes/NodeToolKnowledge.js +0 -52
  97. package/dist/Conversations/Flows/Nodes/NodeToolMapsCheckPolygon.d.ts +0 -2
  98. package/dist/Conversations/Flows/Nodes/NodeToolMapsCheckPolygon.js +0 -59
  99. package/dist/Conversations/Flows/Nodes/NodeToolMcpClient.d.ts +0 -2
  100. package/dist/Conversations/Flows/Nodes/NodeToolMcpClient.js +0 -45
  101. package/dist/Conversations/Flows/Nodes/NodeToolShoppingCart.d.ts +0 -2
  102. package/dist/Conversations/Flows/Nodes/NodeToolShoppingCart.js +0 -81
  103. package/dist/Conversations/Flows/Nodes/index.d.ts +0 -24
  104. package/dist/Conversations/Flows/Nodes/index.js +0 -40
  105. package/dist/Conversations/InboxCounters.d.ts +0 -18
  106. package/dist/Conversations/InboxCounters.js +0 -2
  107. package/dist/Presence/ChannelRoutingState.d.ts +0 -17
  108. package/dist/Presence/ChannelRoutingState.js +0 -9
  109. package/dist/Tickets/AccessLevel.d.ts +0 -5
  110. package/dist/Tickets/AccessLevel.js +0 -9
@@ -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) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
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.QueueEvent = exports.Schedules = exports.Notifications = exports.Messages = exports.Channels = exports.API = void 0;
37
27
  exports.API = __importStar(require("./API/index"));
@@ -5,9 +5,11 @@ export type ConversationAssignmentReason = 'conversation_created' | 'routing_sel
5
5
  export type AssignmentOwnerReference = {
6
6
  type: 'none';
7
7
  id?: never;
8
+ displayName?: string;
8
9
  } | {
9
10
  type: 'user' | 'bot' | 'flow';
10
11
  id: ID;
12
+ displayName?: string;
11
13
  };
12
14
  export type AssignmentStateReference = {
13
15
  status: 'unrouted';
@@ -5,6 +5,7 @@ import { Channels } from "../Common/index";
5
5
  import { IContactAddress, IContactInfo } from "../Contacts/contacts";
6
6
  import { IEnding } from "./Ending";
7
7
  import { ChatType } from "../Chats/Chat";
8
+ import { TransferConversationCommand, TransferConversationResult } from "./Transfer";
8
9
  export interface IConversation {
9
10
  id: string;
10
11
  spaceId: string;
@@ -310,15 +311,18 @@ export type InboxVisibilityReason = 'manual_follow' | 'assigned_to_user' | 'shar
310
311
  export interface ConversationInboxSnapshot {
311
312
  interactionKind: 'private' | 'wall_post' | 'comment' | 'mention';
312
313
  channelType: string;
314
+ channelId?: ID;
313
315
  contact: {
314
316
  id?: ID;
315
317
  displayName: string;
316
318
  initials?: string;
319
+ isBusiness: boolean;
317
320
  };
318
321
  status: ConversationStatus;
319
322
  owner: ConversationOwner;
320
323
  queueId?: ID;
321
324
  preview?: string;
325
+ lastMessageId?: ID;
322
326
  unreadCount: number;
323
327
  priority: 'low' | 'normal' | 'high' | 'urgent';
324
328
  sla: {
@@ -495,4 +499,24 @@ export interface ConversationDetailResponse {
495
499
  export interface AddConversationParticipantRequest {
496
500
  userId: string;
497
501
  }
502
+ export interface TransferQueueOptionDto {
503
+ id: ID;
504
+ name: string;
505
+ color?: string;
506
+ canTransfer: boolean;
507
+ supportsCurrentChannel: boolean;
508
+ }
509
+ export interface TransferUserOptionDto {
510
+ id: ID;
511
+ displayName: string;
512
+ available: boolean;
513
+ capacityUsed: number;
514
+ capacityTotal: number;
515
+ }
516
+ export interface TransferOptionsResponse {
517
+ queues: TransferQueueOptionDto[];
518
+ usersByQueue?: Record<ID, TransferUserOptionDto[]>;
519
+ }
520
+ export type StartTransferRequest = Pick<TransferConversationCommand, 'target' | 'expectedConversationVersion' | 'reason'>;
521
+ export type StartTransferResponse = TransferConversationResult;
498
522
  export {};
@@ -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) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
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
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
27
  };
@@ -259,6 +259,20 @@ export interface ITicketAudiencePolicy extends ITicketAuditedEntity {
259
259
  rules: ITicketAudienceRule[];
260
260
  enabled: boolean;
261
261
  }
262
+ export interface ICreateTicketAudiencePolicyDto {
263
+ name: string;
264
+ description?: string;
265
+ defaultEffect: TicketAudienceRuleEffect;
266
+ rules?: ITicketAudienceRule[];
267
+ enabled?: boolean;
268
+ }
269
+ export interface IUpdateTicketAudiencePolicyDto {
270
+ name?: string;
271
+ description?: string | null;
272
+ defaultEffect?: TicketAudienceRuleEffect;
273
+ rules?: ITicketAudienceRule[];
274
+ enabled?: boolean;
275
+ }
262
276
  export interface ITicketRequestDraft {
263
277
  id: string;
264
278
  spaceId: string;
@@ -321,6 +335,28 @@ export interface ITicketKnowledgeReference extends ITicketAuditedEntity {
321
335
  order?: number;
322
336
  enabled: boolean;
323
337
  }
338
+ export interface ICreateTicketKnowledgeReferenceDto {
339
+ referenceType: TicketKnowledgeReferenceType;
340
+ documentId: string;
341
+ portalIds?: string[];
342
+ requestTypeIds?: string[];
343
+ categoryIds?: string[];
344
+ locales?: string[];
345
+ audiencePolicyId?: string;
346
+ order?: number;
347
+ enabled?: boolean;
348
+ }
349
+ export interface IUpdateTicketKnowledgeReferenceDto {
350
+ referenceType?: TicketKnowledgeReferenceType;
351
+ documentId?: string;
352
+ portalIds?: string[] | null;
353
+ requestTypeIds?: string[] | null;
354
+ categoryIds?: string[] | null;
355
+ locales?: string[] | null;
356
+ audiencePolicyId?: string | null;
357
+ order?: number | null;
358
+ enabled?: boolean;
359
+ }
324
360
  /** Rules may work globally at portal level and become more specific by request type/category. */
325
361
  export interface ITicketDeflectionRule extends ITicketAuditedEntity {
326
362
  name: string;
@@ -334,6 +370,30 @@ export interface ITicketDeflectionRule extends ITicketAuditedEntity {
334
370
  audiencePolicyId?: string;
335
371
  enabled: boolean;
336
372
  }
373
+ export interface ICreateTicketDeflectionRuleDto {
374
+ name: string;
375
+ portalId: string;
376
+ requestTypeIds?: string[];
377
+ categoryIds?: string[];
378
+ knowledgeReferenceIds?: string[];
379
+ includeKnownIssues?: boolean;
380
+ minimumScore?: number;
381
+ maximumSuggestions?: number;
382
+ audiencePolicyId?: string;
383
+ enabled?: boolean;
384
+ }
385
+ export interface IUpdateTicketDeflectionRuleDto {
386
+ name?: string;
387
+ portalId?: string;
388
+ requestTypeIds?: string[] | null;
389
+ categoryIds?: string[] | null;
390
+ knowledgeReferenceIds?: string[] | null;
391
+ includeKnownIssues?: boolean;
392
+ minimumScore?: number | null;
393
+ maximumSuggestions?: number | null;
394
+ audiencePolicyId?: string | null;
395
+ enabled?: boolean;
396
+ }
337
397
  export interface ITicketDeflectionSuggestion {
338
398
  knowledgeReferenceId?: string;
339
399
  knownIssueTicketId?: string;
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) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
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.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"));
@@ -4,6 +4,37 @@ export declare enum AutomationCapabilityKind {
4
4
  ACTION = "action",
5
5
  CONDITION = "condition"
6
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
+ }
7
38
  /**
8
39
  * Capacidad publicada por una aplicación de negocio para que Automation pueda
9
40
  * descubrirla y representarla sin incorporar reglas de ese dominio.
@@ -19,6 +50,8 @@ export interface AutomationCapability {
19
50
  requiredPermissions: string[];
20
51
  enabled: boolean;
21
52
  version: number;
53
+ /** Metadata opcional para definitions anteriores a la política de ejecución. */
54
+ executionSupport?: AutomationCapabilityExecutionSupport | null;
22
55
  }
23
56
  export interface AutomationCapabilityQuery {
24
57
  sourceApplications?: AutomationSourceApplication[];
@@ -1,9 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AutomationCapabilityKind = void 0;
3
+ exports.AutomationCapabilityIdempotency = exports.AutomationCapabilityEffectClass = exports.AutomationCapabilityKind = void 0;
4
4
  var AutomationCapabilityKind;
5
5
  (function (AutomationCapabilityKind) {
6
6
  AutomationCapabilityKind["TRIGGER"] = "trigger";
7
7
  AutomationCapabilityKind["ACTION"] = "action";
8
8
  AutomationCapabilityKind["CONDITION"] = "condition";
9
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 = {}));
@@ -5,11 +5,33 @@
5
5
  * traducirse ni depender del nombre visible de la aplicación.
6
6
  */
7
7
  export declare enum AutomationSourceApplication {
8
+ /** Automations y sus capacidades Core. */
9
+ AUTOMATIONS = "automations",
10
+ /** Gestión de conversaciones y mensajería conversacional. */
8
11
  CONVERSATIONS = "conversations",
12
+ /** Gestión de contactos y organizaciones. */
13
+ CONTACTS = "contacts",
14
+ /** Gestión de tickets y soporte. */
9
15
  TICKETS = "tickets",
16
+ /** Campañas y operaciones de marketing. */
10
17
  MARKETING = "marketing",
18
+ /** Procesos y oportunidades comerciales. */
11
19
  SALES = "sales",
20
+ /** Telefonía y llamadas. */
12
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. */
13
35
  GENERIC = "generic"
14
36
  }
15
37
  export type AutomationJsonValue = string | number | boolean | null | AutomationJsonObject | AutomationJsonValue[];
@@ -45,3 +67,28 @@ export interface AutomationError {
45
67
  message: string;
46
68
  details?: AutomationJsonObject | null;
47
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
+ }
@@ -9,10 +9,32 @@ exports.AutomationSourceApplication = void 0;
9
9
  */
10
10
  var AutomationSourceApplication;
11
11
  (function (AutomationSourceApplication) {
12
+ /** Automations y sus capacidades Core. */
13
+ AutomationSourceApplication["AUTOMATIONS"] = "automations";
14
+ /** Gestión de conversaciones y mensajería conversacional. */
12
15
  AutomationSourceApplication["CONVERSATIONS"] = "conversations";
16
+ /** Gestión de contactos y organizaciones. */
17
+ AutomationSourceApplication["CONTACTS"] = "contacts";
18
+ /** Gestión de tickets y soporte. */
13
19
  AutomationSourceApplication["TICKETS"] = "tickets";
20
+ /** Campañas y operaciones de marketing. */
14
21
  AutomationSourceApplication["MARKETING"] = "marketing";
22
+ /** Procesos y oportunidades comerciales. */
15
23
  AutomationSourceApplication["SALES"] = "sales";
24
+ /** Telefonía y llamadas. */
16
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. */
17
39
  AutomationSourceApplication["GENERIC"] = "generic";
18
40
  })(AutomationSourceApplication || (exports.AutomationSourceApplication = AutomationSourceApplication = {}));
@@ -1,4 +1,4 @@
1
- import { AutomationJsonObject, AutomationJsonSchema, AutomationSourceApplication } from '../Common';
1
+ import { AutomationCustomer, AutomationJsonObject, AutomationJsonSchema, AutomationResourceReference, AutomationSourceApplication } from '../Common';
2
2
  export interface AutomationEventDefinition {
3
3
  eventType: string;
4
4
  version: number;
@@ -6,6 +6,7 @@ export interface AutomationEventDefinition {
6
6
  name: string;
7
7
  description?: string | null;
8
8
  payloadSchema: AutomationJsonSchema;
9
+ /** Schema de la vista del envelope cuyos paths pueden utilizarse en filtros. */
9
10
  filterSchema?: AutomationJsonSchema | null;
10
11
  requiredPermissions: string[];
11
12
  enabled: boolean;
@@ -18,23 +19,50 @@ export interface AutomationEventEnvelope {
18
19
  eventVersion: number;
19
20
  occurredAt: string;
20
21
  receivedAt: string;
21
- subjectId?: string | null;
22
+ customer?: AutomationCustomer | null;
23
+ /** Entidad principal sobre la que ocurrió el evento. */
24
+ subject?: AutomationResourceReference | null;
22
25
  correlationId?: string | null;
23
26
  causationId?: string | null;
24
27
  idempotencyKey?: string | null;
25
28
  payload: AutomationJsonObject;
26
29
  metadata?: AutomationJsonObject | null;
27
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
+ }
28
50
  export interface ResolveFlowEntryPointsRequest {
29
51
  event: AutomationEventEnvelope;
30
52
  }
31
53
  export interface ResolvedFlowEntryPoint {
54
+ /** Definición estable del Flow. */
32
55
  flowId: string;
56
+ /** Versión publicada candidata a recibir el evento. */
33
57
  flowVersionId: string;
58
+ /** Entry Point evaluado. */
34
59
  entryPointId: string;
60
+ /** Prioridad utilizada para resolver candidatos. */
35
61
  priority: number;
62
+ /** Indica si el candidato debe iniciar una ejecución. */
36
63
  selected: boolean;
37
- exclusionReason?: string | null;
64
+ /** Motivo de exclusión; ausente cuando selected es true. */
65
+ exclusion?: AutomationEntryPointExclusion | null;
38
66
  }
39
67
  export interface ResolveFlowEntryPointsResult {
40
68
  matches: ResolvedFlowEntryPoint[];
@@ -1,2 +1,14 @@
1
1
  "use strict";
2
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 = {}));