@trii/types 2.10.700 → 2.10.702

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.
@@ -1,4 +1,9 @@
1
1
  import { AutomationCustomer, AutomationJsonObject, AutomationJsonSchema, AutomationResourceReference, AutomationSourceApplication } from '../Common';
2
+ export declare const AUTOMATION_MESSAGE_SCHEMAS: {
3
+ readonly DOMAIN_EVENT_V1: "automations.domain-event/v1";
4
+ readonly START_REQUEST_V1: "automations.start-request/v1";
5
+ readonly EXECUTION_WORK_ITEM_V1: "automations.execution.work-item/v1";
6
+ };
2
7
  export interface AutomationEventDefinition {
3
8
  eventType: string;
4
9
  version: number;
@@ -12,13 +17,19 @@ export interface AutomationEventDefinition {
12
17
  enabled: boolean;
13
18
  }
14
19
  export interface AutomationEventEnvelope {
20
+ schema: typeof AUTOMATION_MESSAGE_SCHEMAS.DOMAIN_EVENT_V1;
15
21
  id: string;
16
22
  spaceId: string;
17
23
  sourceApplication: AutomationSourceApplication;
18
24
  eventType: string;
19
25
  eventVersion: number;
26
+ /** Clave estable usada como SessionId; no incluye spaceId. */
27
+ orderingKey: string;
28
+ /** Secuencia monotónica opcional asignada por el propietario del agregado. */
29
+ aggregateSequence?: number | null;
20
30
  occurredAt: string;
21
- receivedAt: string;
31
+ /** Instante de ingreso al primer consumidor controlado. */
32
+ receivedAt?: string | null;
22
33
  customer?: AutomationCustomer | null;
23
34
  /** Entidad principal sobre la que ocurrió el evento. */
24
35
  subject?: AutomationResourceReference | null;
@@ -28,6 +39,22 @@ export interface AutomationEventEnvelope {
28
39
  payload: AutomationJsonObject;
29
40
  metadata?: AutomationJsonObject | null;
30
41
  }
42
+ /** Solicitud asíncrona generada después de resolver un Entry Point. */
43
+ export interface AutomationStartRequestMessage {
44
+ schema: typeof AUTOMATION_MESSAGE_SCHEMAS.START_REQUEST_V1;
45
+ requestId: string;
46
+ spaceId: string;
47
+ flowId: string;
48
+ flowVersionId: string;
49
+ entryPointId: string;
50
+ trigger: AutomationEventEnvelope;
51
+ requestedAt: string;
52
+ correlationId?: string | null;
53
+ causationId?: string | null;
54
+ /** Debe permanecer estable en todos los reintentos de la misma operación. */
55
+ idempotencyKey: string;
56
+ metadata?: AutomationJsonObject | null;
57
+ }
31
58
  export declare enum AutomationEntryPointExclusionCode {
32
59
  ENTRY_POINT_DISABLED = "entryPointDisabled",
33
60
  SOURCE_APPLICATION_MISMATCH = "sourceApplicationMismatch",
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AutomationEntryPointExclusionCode = void 0;
3
+ exports.AutomationEntryPointExclusionCode = exports.AUTOMATION_MESSAGE_SCHEMAS = void 0;
4
+ exports.AUTOMATION_MESSAGE_SCHEMAS = {
5
+ DOMAIN_EVENT_V1: 'automations.domain-event/v1',
6
+ START_REQUEST_V1: 'automations.start-request/v1',
7
+ EXECUTION_WORK_ITEM_V1: 'automations.execution.work-item/v1',
8
+ };
4
9
  var AutomationEntryPointExclusionCode;
5
10
  (function (AutomationEntryPointExclusionCode) {
6
11
  AutomationEntryPointExclusionCode["ENTRY_POINT_DISABLED"] = "entryPointDisabled";
@@ -165,6 +165,20 @@ export interface IServiceCatalog extends ITicketAuditedEntity {
165
165
  order?: number;
166
166
  enabled: boolean;
167
167
  }
168
+ export interface ICreateServiceCatalogDto {
169
+ portalId: string;
170
+ name: string;
171
+ description?: string;
172
+ order?: number;
173
+ enabled?: boolean;
174
+ }
175
+ export interface IUpdateServiceCatalogDto {
176
+ portalId?: string;
177
+ name?: string;
178
+ description?: string | null;
179
+ order?: number | null;
180
+ enabled?: boolean;
181
+ }
168
182
  export interface IServiceCatalogSection extends ITicketAuditedEntity {
169
183
  catalogId: string;
170
184
  parentSectionId?: string;
@@ -174,6 +188,24 @@ export interface IServiceCatalogSection extends ITicketAuditedEntity {
174
188
  order: number;
175
189
  enabled: boolean;
176
190
  }
191
+ export interface ICreateServiceCatalogSectionDto {
192
+ catalogId: string;
193
+ parentSectionId?: string;
194
+ name: string;
195
+ description?: string;
196
+ icon?: string;
197
+ order?: number;
198
+ enabled?: boolean;
199
+ }
200
+ export interface IUpdateServiceCatalogSectionDto {
201
+ catalogId?: string;
202
+ parentSectionId?: string | null;
203
+ name?: string;
204
+ description?: string | null;
205
+ icon?: string | null;
206
+ order?: number;
207
+ enabled?: boolean;
208
+ }
177
209
  export interface IServiceCatalogItem extends ITicketAuditedEntity {
178
210
  catalogId: string;
179
211
  sectionId?: string;
@@ -186,6 +218,30 @@ export interface IServiceCatalogItem extends ITicketAuditedEntity {
186
218
  audiencePolicyId?: string;
187
219
  enabled: boolean;
188
220
  }
221
+ export interface ICreateServiceCatalogItemDto {
222
+ catalogId: string;
223
+ sectionId?: string;
224
+ requestTypeId: string;
225
+ name: string;
226
+ shortDescription?: string;
227
+ imageUrl?: string;
228
+ order?: number;
229
+ estimatedDeliveryMinutes?: number;
230
+ audiencePolicyId?: string;
231
+ enabled?: boolean;
232
+ }
233
+ export interface IUpdateServiceCatalogItemDto {
234
+ catalogId?: string;
235
+ sectionId?: string | null;
236
+ requestTypeId?: string;
237
+ name?: string;
238
+ shortDescription?: string | null;
239
+ imageUrl?: string | null;
240
+ order?: number;
241
+ estimatedDeliveryMinutes?: number | null;
242
+ audiencePolicyId?: string | null;
243
+ enabled?: boolean;
244
+ }
189
245
  export interface ITicketAudienceRule {
190
246
  id: string;
191
247
  effect: TicketAudienceRuleEffect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trii/types",
3
- "version": "2.10.700",
3
+ "version": "2.10.702",
4
4
  "description": "Types definitions for Trii projects - ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",