wsp-ms-core 1.0.77 → 1.0.78-beta-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/index.ts
30
30
  var src_exports = {};
31
31
  __export(src_exports, {
32
+ BaseEvent: () => BaseEvent,
32
33
  BaseObject: () => BaseObject,
33
34
  BasicUnitOfWork: () => BasicUnitOfWork,
34
35
  BasicUnitOfWorkFactory: () => BasicUnitOfWorkFactory,
@@ -38,7 +39,6 @@ __export(src_exports, {
38
39
  DomainEntity: () => DomainEntity,
39
40
  DomainError: () => DomainError,
40
41
  DomainEvent: () => DomainEvent,
41
- DomainEventStatus: () => DomainEventStatus,
42
42
  Email: () => Email,
43
43
  ErrorManager: () => ErrorManager,
44
44
  EventBus: () => EventBus,
@@ -48,14 +48,18 @@ __export(src_exports, {
48
48
  FatalError: () => FatalError,
49
49
  HttpHealthCheckController: () => HttpHealthCheckController,
50
50
  HttpNotFoundController: () => HttpNotFoundController,
51
+ IntegrationEvent: () => IntegrationEvent,
51
52
  InternalError: () => InternalError,
52
53
  KafkaManager: () => KafkaManager,
53
54
  Language: () => Language,
54
55
  MysqlConnection: () => MysqlConnection,
55
56
  MysqlConnector: () => MysqlConnector,
57
+ OutboxRecord: () => OutboxRecord,
56
58
  PaymentGateway: () => PaymentGateway,
57
59
  PaymentStatus: () => PaymentStatus,
58
60
  Price: () => Price,
61
+ ProcessStatus: () => ProcessStatus,
62
+ StringVars: () => StringVars,
59
63
  UUID: () => UUID,
60
64
  UsageError: () => UsageError,
61
65
  ValueObject: () => ValueObject,
@@ -232,6 +236,32 @@ _DateTime.FORMATS = {
232
236
  };
233
237
  var DateTime = _DateTime;
234
238
 
239
+ // src/domain/contracts/BaseEvent.ts
240
+ var BaseEvent = class {
241
+ constructor(tenantUuid, version, type, payload) {
242
+ this._tenantUuid = tenantUuid;
243
+ this._version = version;
244
+ this._type = type;
245
+ this._payload = payload;
246
+ this._occurredAt = DateTime.now();
247
+ }
248
+ get tenantUuid() {
249
+ return this._tenantUuid;
250
+ }
251
+ get version() {
252
+ return this._version;
253
+ }
254
+ get type() {
255
+ return this._type;
256
+ }
257
+ get payload() {
258
+ return this._payload;
259
+ }
260
+ get ocurredAt() {
261
+ return this._occurredAt;
262
+ }
263
+ };
264
+
235
265
  // src/domain/contracts/DomainEntity.ts
236
266
  var DomainEntity = class {
237
267
  constructor(props) {
@@ -266,6 +296,13 @@ var DomainEntity = class {
266
296
  }
267
297
  };
268
298
 
299
+ // src/domain/contracts/BaseObject.ts
300
+ var BaseObject = class {
301
+ constructor(props) {
302
+ this.props = props;
303
+ }
304
+ };
305
+
269
306
  // src/domain/contracts/DomainError.ts
270
307
  var DomainError = class extends Error {
271
308
  constructor(type, message = "") {
@@ -274,101 +311,34 @@ var DomainError = class extends Error {
274
311
  }
275
312
  };
276
313
 
277
- // src/domain/errors/InternalError.ts
278
- var InternalError = class extends DomainError {
314
+ // src/domain/errors/FatalError.ts
315
+ var FatalError = class extends DomainError {
279
316
  constructor(type, message = "") {
280
317
  super(type, message);
281
318
  }
282
319
  };
283
320
 
284
- // src/domain/value-objects/UUID.ts
285
- var crypto = __toESM(require("crypto"));
286
- var _UUID = class _UUID extends ValueObject {
287
- constructor(value) {
288
- super(value);
289
- }
290
- validate(uuid) {
291
- if (!_UUID.isValid(uuid)) {
292
- throw new InternalError(`Invalid uuid <${uuid}>`);
293
- }
294
- }
295
- toPrimitives() {
296
- return { value: this.value };
297
- }
298
- static create(uuid) {
299
- return new _UUID(uuid ?? crypto.randomUUID());
300
- }
301
- static version(uuid) {
302
- const m = /^[0-9a-f]{8}-[0-9a-f]{4}-([1-8])[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.exec(uuid);
303
- return m ? Number(m[1]) : void 0;
304
- }
305
- static isNil(uuid) {
306
- return /^0{8}-0{4}-0{4}-0{4}-0{12}$/i.test(uuid);
307
- }
308
- static isRFCStyle(uuid) {
309
- return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(uuid);
310
- }
311
- static isValid(uuid, opts = {}) {
312
- const allowed = opts.allowedVersions ?? [1, 2, 3, 4, 5, 6, 7, 8];
313
- const allowNil = opts.allowNil ?? false;
314
- if (allowNil && _UUID.isNil(uuid))
315
- return true;
316
- if (!_UUID.isRFCStyle(uuid))
317
- return false;
318
- const v = _UUID.version(uuid);
319
- return !!v && allowed.includes(v);
321
+ // src/domain/errors/InternalError.ts
322
+ var InternalError = class extends DomainError {
323
+ constructor(type, message = "") {
324
+ super(type, message);
320
325
  }
321
326
  };
322
- _UUID.NIL = "00000000-0000-0000-0000-000000000000";
323
- var UUID = _UUID;
324
327
 
325
- // src/domain/value-objects/DomainEventStatus.ts
326
- var _DomainEventStatus = class _DomainEventStatus extends ValueObject {
327
- constructor(status) {
328
- super(status.trim().toUpperCase());
329
- }
330
- validate(value) {
331
- if (!_DomainEventStatus.SUPPORTED.includes(value)) {
332
- throw new InternalError(`Domain event status <${value}> is not supported`);
333
- }
334
- }
335
- toPrimitives() {
336
- return void 0;
337
- }
338
- static create(status) {
339
- return new _DomainEventStatus(status);
328
+ // src/domain/errors/UsageError.ts
329
+ var UsageError = class extends DomainError {
330
+ constructor(type, vars = {}) {
331
+ super(type);
332
+ this.vars = vars;
340
333
  }
341
334
  };
342
- _DomainEventStatus.SUPPORTED = ["PENDING", "PROCESSING", "PROCESSED", "FAILED", "DEAD"];
343
- _DomainEventStatus.PENDING = new _DomainEventStatus("PENDING");
344
- _DomainEventStatus.PROCESSING = new _DomainEventStatus("PROCESSING");
345
- _DomainEventStatus.PROCESSED = new _DomainEventStatus("PROCESSED");
346
- _DomainEventStatus.FAILED = new _DomainEventStatus("FAILED");
347
- _DomainEventStatus.DEAD = new _DomainEventStatus("DEAD");
348
- var DomainEventStatus = _DomainEventStatus;
349
335
 
350
- // src/domain/contracts/DomainEvent.ts
351
- var DomainEvent = class _DomainEvent {
352
- constructor(eventUuid, eventType, tenantUuid, aggregateUuid, aggregateType, topic, payload, status, attempts, errorMessage, publishedAt, lastAttempt, createdAt) {
353
- this._eventUuid = eventUuid;
354
- this._tenantUuid = tenantUuid;
336
+ // src/domain/events/DomainEvent.ts
337
+ var DomainEvent = class extends BaseEvent {
338
+ constructor(tenantUuid, version, type, payload, aggregateUuid, aggregateType) {
339
+ super(tenantUuid, version, type, payload);
355
340
  this._aggregateUuid = aggregateUuid;
356
341
  this._aggregateType = aggregateType;
357
- this._eventType = eventType;
358
- this._topic = topic;
359
- this._payload = payload;
360
- this._status = status;
361
- this._attempts = attempts;
362
- this._errorMessage = errorMessage;
363
- this._publishedAt = publishedAt;
364
- this._lastAttempt = lastAttempt;
365
- this._createdAt = createdAt;
366
- }
367
- get eventUuid() {
368
- return this._eventUuid;
369
- }
370
- get tenantUuid() {
371
- return this._tenantUuid;
372
342
  }
373
343
  get aggregateUuid() {
374
344
  return this._aggregateUuid;
@@ -376,169 +346,98 @@ var DomainEvent = class _DomainEvent {
376
346
  get aggregateType() {
377
347
  return this._aggregateType;
378
348
  }
379
- get eventType() {
380
- return this._eventType;
381
- }
382
- get topic() {
383
- return this._topic;
384
- }
385
- get payload() {
386
- return this._payload;
387
- }
388
- get status() {
389
- return this._status;
390
- }
391
- get attempts() {
392
- return this._attempts;
393
- }
394
- get errorMessage() {
395
- return this._errorMessage;
349
+ };
350
+
351
+ // src/domain/value-objects/payments/PaymentGateway.ts
352
+ var _PaymentGateway = class _PaymentGateway extends ValueObject {
353
+ constructor(gateway) {
354
+ super(gateway);
396
355
  }
397
- get publishedAt() {
398
- return this._publishedAt;
356
+ validate(value) {
357
+ if (!_PaymentGateway.SUPPORTED.includes(value)) {
358
+ throw new InternalError(`Payment gateway <${value}> is not supported`);
359
+ }
399
360
  }
400
- get lastAttempt() {
401
- return this._lastAttempt;
361
+ isExternal() {
362
+ return _PaymentGateway.EXTERNALS.includes(this.value);
402
363
  }
403
- get createdAt() {
404
- return this._createdAt;
364
+ toPrimitives() {
365
+ return { value: this.value };
405
366
  }
406
- incrementAttempts() {
407
- this._attempts++;
408
- this._lastAttempt = DateTime.now();
367
+ static create(gateway) {
368
+ return new _PaymentGateway(gateway.trim().toUpperCase());
409
369
  }
410
- markProcessed() {
411
- this._status = DomainEventStatus.PROCESSED;
412
- this._publishedAt = DateTime.now();
370
+ };
371
+ _PaymentGateway.SUPPORTED = [
372
+ "MERCADOPAGO",
373
+ "HANDY",
374
+ "WONA_DEBIT",
375
+ "WONA_CARD",
376
+ "WONA_CASH",
377
+ "WONA_TRANSFER",
378
+ "WONA_MERCADOPAGO"
379
+ ];
380
+ _PaymentGateway.EXTERNALS = ["MERCADOPAGO", "STRIPE"];
381
+ _PaymentGateway.MERCADOPAGO = new _PaymentGateway("MERCADOPAGO");
382
+ _PaymentGateway.HANDY = new _PaymentGateway("HANDY");
383
+ _PaymentGateway.WONA_DEBIT = new _PaymentGateway("WONA_DEBIT");
384
+ _PaymentGateway.WONA_CARD = new _PaymentGateway("WONA_CARD");
385
+ _PaymentGateway.WONA_CASH = new _PaymentGateway("WONA_CASH");
386
+ _PaymentGateway.WONA_TRANSFER = new _PaymentGateway("WONA_TRANSFER");
387
+ _PaymentGateway.WONA_MERCADOPAGO = new _PaymentGateway("WONA_MERCADOPAGO");
388
+ var PaymentGateway = _PaymentGateway;
389
+
390
+ // src/domain/value-objects/payments/PaymentStatus.ts
391
+ var _PaymentStatus = class _PaymentStatus extends ValueObject {
392
+ constructor(status) {
393
+ super(status);
413
394
  }
414
- markProcessing() {
415
- this.incrementAttempts();
416
- this._status = DomainEventStatus.PROCESSING;
395
+ validate(status) {
396
+ if (!_PaymentStatus.SUPPORTED.includes(status)) {
397
+ throw new InternalError(`Payment status <${status}> is not supported`);
398
+ }
417
399
  }
418
- markWithError(error) {
419
- this._status = this.attempts < 5 ? DomainEventStatus.FAILED : DomainEventStatus.DEAD;
420
- this._errorMessage = error;
400
+ get isDone() {
401
+ return this.value === "DONE";
421
402
  }
422
- toPrimitives() {
423
- return {
424
- eventUuid: this.eventUuid.value,
425
- eventType: this.eventType,
426
- tenantUuid: this.tenantUuid.value,
427
- aggregateUuid: this.aggregateUuid.value,
428
- aggregateType: this.aggregateType,
429
- topic: this.topic,
430
- payload: this.payload,
431
- status: this.status.value,
432
- attempts: this.attempts,
433
- errorMessage: this.errorMessage ?? void 0,
434
- publishedAt: this.publishedAt?.value ?? void 0,
435
- lastAttempt: this.lastAttempt?.value ?? void 0,
436
- createdAt: this.createdAt.value
437
- };
403
+ get isPending() {
404
+ return this.value === "PENDING";
438
405
  }
439
- static reconstitute(data) {
440
- return new _DomainEvent(
441
- UUID.create(data.event_uuid),
442
- String(data.event_type),
443
- UUID.create(data.tenant_uuid),
444
- UUID.create(data.aggregate_uuid),
445
- String(data.aggregate_type),
446
- String(data.topic),
447
- String(data.payload),
448
- DomainEventStatus.create(data.status),
449
- Number(data.attempts),
450
- data.error_message ?? void 0,
451
- data.published_at ? DateTime.create(data.published_at) : void 0,
452
- data.last_attempt ? DateTime.create(data.last_attempt) : void 0,
453
- data.created_at ? DateTime.create(data.created_at) : void 0
454
- );
406
+ get isInProgress() {
407
+ return this.value === "IN_PROGRESS";
455
408
  }
456
- };
457
-
458
- // src/domain/contracts/BaseObject.ts
459
- var BaseObject = class {
460
- constructor(props) {
461
- this.props = props;
409
+ get isFailed() {
410
+ return this.value === "FAILED";
462
411
  }
463
- };
464
-
465
- // src/domain/errors/FatalError.ts
466
- var FatalError = class extends DomainError {
467
- constructor(type, message = "") {
468
- super(type, message);
412
+ get isCanceled() {
413
+ return this.value === "CANCELED";
469
414
  }
470
- };
471
-
472
- // src/domain/errors/UsageError.ts
473
- var UsageError = class extends DomainError {
474
- constructor(type, vars = {}) {
475
- super(type);
476
- this.vars = vars;
415
+ get isHold() {
416
+ return this.value === "HOLD";
477
417
  }
478
- };
479
-
480
- // src/domain/value-objects/Currency.ts
481
- var _Currency = class _Currency extends ValueObject {
482
- constructor(alpha) {
483
- super(alpha.toUpperCase().trim());
484
- this.numeric = _Currency.ALPHA_TO_NUM[this.value];
418
+ get isPendingRefund() {
419
+ return this.value === "PENDING_REFUND";
485
420
  }
486
- validate(alpha) {
487
- const code = alpha.toUpperCase().trim();
488
- if (!_Currency.ALPHA_REGEX.test(code)) {
489
- throw new Error(`Currency code <${alpha}> is not a valid ISO\u20114217 alpha value`);
490
- }
491
- if (!(code in _Currency.ALPHA_TO_NUM)) {
492
- throw new Error(`Currency <${code}> is not supported`);
493
- }
421
+ get isRefunded() {
422
+ return this.value === "REFUNDED";
494
423
  }
495
424
  toPrimitives() {
496
- return {
497
- value: this.value
498
- };
499
- }
500
- static create(raw) {
501
- if (typeof raw === "number" || _Currency.NUM_REGEX.test(raw)) {
502
- const num = Number(raw);
503
- const alpha = _Currency.NUM_TO_ALPHA[num];
504
- if (!alpha) {
505
- throw new Error(`Numeric currency <${raw}> is not supported`);
506
- }
507
- return new _Currency(alpha);
508
- }
509
- return new _Currency(String(raw));
425
+ return { value: this.value };
510
426
  }
511
- static isValid(raw) {
512
- try {
513
- _Currency.create(raw);
514
- return true;
515
- } catch {
516
- return false;
517
- }
427
+ static create(gateway) {
428
+ return new _PaymentStatus(gateway.trim().toUpperCase());
518
429
  }
519
430
  };
520
- _Currency.ALPHA_REGEX = /^[A-Z]{3}$/u;
521
- _Currency.NUM_REGEX = /^\d{3}$/u;
522
- _Currency.ALPHA_TO_NUM = {
523
- USD: 840,
524
- EUR: 978,
525
- UYU: 858,
526
- ARS: 32,
527
- BRL: 986
528
- };
529
- _Currency.NUM_TO_ALPHA = Object.entries(_Currency.ALPHA_TO_NUM).reduce(
530
- (acc, [alpha, num]) => {
531
- acc[num] = alpha;
532
- return acc;
533
- },
534
- {}
535
- );
536
- _Currency.USD = new _Currency("USD");
537
- _Currency.EUR = new _Currency("EUR");
538
- _Currency.UYU = new _Currency("UYU");
539
- _Currency.ARS = new _Currency("ARS");
540
- _Currency.BRL = new _Currency("BRL");
541
- var Currency = _Currency;
431
+ _PaymentStatus.SUPPORTED = ["DONE", "PENDING", "FAILED", "CANCELED", "HOLD", "PENDING_REFUND", "REFUNDED", "IN_PROGRESS"];
432
+ _PaymentStatus.DONE = new _PaymentStatus("DONE");
433
+ _PaymentStatus.PENDING = new _PaymentStatus("PENDING");
434
+ _PaymentStatus.IN_PROGRESS = new _PaymentStatus("IN_PROGRESS");
435
+ _PaymentStatus.FAILED = new _PaymentStatus("FAILED");
436
+ _PaymentStatus.CANCELED = new _PaymentStatus("CANCELED");
437
+ _PaymentStatus.HOLD = new _PaymentStatus("HOLD");
438
+ _PaymentStatus.PENDING_REFUND = new _PaymentStatus("PENDING_REFUND");
439
+ _PaymentStatus.REFUNDED = new _PaymentStatus("REFUNDED");
440
+ var PaymentStatus = _PaymentStatus;
542
441
 
543
442
  // src/utils/StringVars.ts
544
443
  var StringVars = class {
@@ -831,6 +730,69 @@ _Country.PARAGUAY = new _Country("PARAGUAY");
831
730
  _Country.USA = new _Country("USA");
832
731
  var Country = _Country;
833
732
 
733
+ // src/domain/value-objects/Currency.ts
734
+ var _Currency = class _Currency extends ValueObject {
735
+ constructor(alpha) {
736
+ super(alpha.toUpperCase().trim());
737
+ this.numeric = _Currency.ALPHA_TO_NUM[this.value];
738
+ }
739
+ validate(alpha) {
740
+ const code = alpha.toUpperCase().trim();
741
+ if (!_Currency.ALPHA_REGEX.test(code)) {
742
+ throw new Error(`Currency code <${alpha}> is not a valid ISO\u20114217 alpha value`);
743
+ }
744
+ if (!(code in _Currency.ALPHA_TO_NUM)) {
745
+ throw new Error(`Currency <${code}> is not supported`);
746
+ }
747
+ }
748
+ toPrimitives() {
749
+ return {
750
+ value: this.value
751
+ };
752
+ }
753
+ static create(raw) {
754
+ if (typeof raw === "number" || _Currency.NUM_REGEX.test(raw)) {
755
+ const num = Number(raw);
756
+ const alpha = _Currency.NUM_TO_ALPHA[num];
757
+ if (!alpha) {
758
+ throw new Error(`Numeric currency <${raw}> is not supported`);
759
+ }
760
+ return new _Currency(alpha);
761
+ }
762
+ return new _Currency(String(raw));
763
+ }
764
+ static isValid(raw) {
765
+ try {
766
+ _Currency.create(raw);
767
+ return true;
768
+ } catch {
769
+ return false;
770
+ }
771
+ }
772
+ };
773
+ _Currency.ALPHA_REGEX = /^[A-Z]{3}$/u;
774
+ _Currency.NUM_REGEX = /^\d{3}$/u;
775
+ _Currency.ALPHA_TO_NUM = {
776
+ USD: 840,
777
+ EUR: 978,
778
+ UYU: 858,
779
+ ARS: 32,
780
+ BRL: 986
781
+ };
782
+ _Currency.NUM_TO_ALPHA = Object.entries(_Currency.ALPHA_TO_NUM).reduce(
783
+ (acc, [alpha, num]) => {
784
+ acc[num] = alpha;
785
+ return acc;
786
+ },
787
+ {}
788
+ );
789
+ _Currency.USD = new _Currency("USD");
790
+ _Currency.EUR = new _Currency("EUR");
791
+ _Currency.UYU = new _Currency("UYU");
792
+ _Currency.ARS = new _Currency("ARS");
793
+ _Currency.BRL = new _Currency("BRL");
794
+ var Currency = _Currency;
795
+
834
796
  // src/domain/value-objects/Email.ts
835
797
  var _Email = class _Email extends ValueObject {
836
798
  constructor(email) {
@@ -1024,111 +986,110 @@ _Price.MIN_AMOUNT = -1e6;
1024
986
  _Price.MAX_AMOUNT = 1e9;
1025
987
  var Price = _Price;
1026
988
 
1027
- // src/domain/value-objects/payments/PaymentGateway.ts
1028
- var _PaymentGateway = class _PaymentGateway extends ValueObject {
1029
- constructor(gateway) {
1030
- super(gateway);
989
+ // src/domain/value-objects/ProcessStatus.ts
990
+ var _ProcessStatus = class _ProcessStatus extends ValueObject {
991
+ constructor(status) {
992
+ super(status.trim().toUpperCase());
1031
993
  }
1032
994
  validate(value) {
1033
- if (!_PaymentGateway.SUPPORTED.includes(value)) {
1034
- throw new InternalError(`Payment gateway <${value}> is not supported`);
995
+ if (!_ProcessStatus.SUPPORTED.includes(value)) {
996
+ throw new InternalError(`Domain event status <${value}> is not supported`);
1035
997
  }
1036
998
  }
1037
- isExternal() {
1038
- return _PaymentGateway.EXTERNALS.includes(this.value);
1039
- }
1040
999
  toPrimitives() {
1041
- return { value: this.value };
1000
+ return void 0;
1042
1001
  }
1043
- static create(gateway) {
1044
- return new _PaymentGateway(gateway.trim().toUpperCase());
1002
+ static create(status) {
1003
+ return new _ProcessStatus(status);
1045
1004
  }
1046
1005
  };
1047
- _PaymentGateway.SUPPORTED = [
1048
- "MERCADOPAGO",
1049
- "HANDY",
1050
- "WONA_DEBIT",
1051
- "WONA_CARD",
1052
- "WONA_CASH",
1053
- "WONA_TRANSFER",
1054
- "WONA_MERCADOPAGO"
1055
- ];
1056
- _PaymentGateway.EXTERNALS = ["MERCADOPAGO", "STRIPE"];
1057
- _PaymentGateway.MERCADOPAGO = new _PaymentGateway("MERCADOPAGO");
1058
- _PaymentGateway.HANDY = new _PaymentGateway("HANDY");
1059
- _PaymentGateway.WONA_DEBIT = new _PaymentGateway("WONA_DEBIT");
1060
- _PaymentGateway.WONA_CARD = new _PaymentGateway("WONA_CARD");
1061
- _PaymentGateway.WONA_CASH = new _PaymentGateway("WONA_CASH");
1062
- _PaymentGateway.WONA_TRANSFER = new _PaymentGateway("WONA_TRANSFER");
1063
- _PaymentGateway.WONA_MERCADOPAGO = new _PaymentGateway("WONA_MERCADOPAGO");
1064
- var PaymentGateway = _PaymentGateway;
1006
+ _ProcessStatus.SUPPORTED = ["PENDING", "PROCESSING", "PROCESSED", "FAILED", "DEAD"];
1007
+ _ProcessStatus.PENDING = new _ProcessStatus("PENDING");
1008
+ _ProcessStatus.PROCESSING = new _ProcessStatus("PROCESSING");
1009
+ _ProcessStatus.PROCESSED = new _ProcessStatus("PROCESSED");
1010
+ _ProcessStatus.FAILED = new _ProcessStatus("FAILED");
1011
+ _ProcessStatus.DEAD = new _ProcessStatus("DEAD");
1012
+ var ProcessStatus = _ProcessStatus;
1065
1013
 
1066
- // src/domain/value-objects/payments/PaymentStatus.ts
1067
- var _PaymentStatus = class _PaymentStatus extends ValueObject {
1068
- constructor(status) {
1069
- super(status);
1014
+ // src/domain/value-objects/UUID.ts
1015
+ var crypto = __toESM(require("crypto"));
1016
+ var _UUID = class _UUID extends ValueObject {
1017
+ constructor(value) {
1018
+ super(value);
1070
1019
  }
1071
- validate(status) {
1072
- if (!_PaymentStatus.SUPPORTED.includes(status)) {
1073
- throw new InternalError(`Payment status <${status}> is not supported`);
1020
+ validate(uuid) {
1021
+ if (!_UUID.isValid(uuid)) {
1022
+ throw new InternalError(`Invalid uuid <${uuid}>`);
1074
1023
  }
1075
1024
  }
1076
- get isDone() {
1077
- return this.value === "DONE";
1078
- }
1079
- get isPending() {
1080
- return this.value === "PENDING";
1025
+ toPrimitives() {
1026
+ return { value: this.value };
1081
1027
  }
1082
- get isInProgress() {
1083
- return this.value === "IN_PROGRESS";
1028
+ static create(uuid) {
1029
+ return new _UUID(uuid ?? crypto.randomUUID());
1084
1030
  }
1085
- get isFailed() {
1086
- return this.value === "FAILED";
1031
+ static version(uuid) {
1032
+ const m = /^[0-9a-f]{8}-[0-9a-f]{4}-([1-8])[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.exec(uuid);
1033
+ return m ? Number(m[1]) : void 0;
1087
1034
  }
1088
- get isCanceled() {
1089
- return this.value === "CANCELED";
1035
+ static isNil(uuid) {
1036
+ return /^0{8}-0{4}-0{4}-0{4}-0{12}$/i.test(uuid);
1090
1037
  }
1091
- get isHold() {
1092
- return this.value === "HOLD";
1038
+ static isRFCStyle(uuid) {
1039
+ return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(uuid);
1093
1040
  }
1094
- get isPendingRefund() {
1095
- return this.value === "PENDING_REFUND";
1041
+ static isValid(uuid, opts = {}) {
1042
+ const allowed = opts.allowedVersions ?? [1, 2, 3, 4, 5, 6, 7, 8];
1043
+ const allowNil = opts.allowNil ?? false;
1044
+ if (allowNil && _UUID.isNil(uuid))
1045
+ return true;
1046
+ if (!_UUID.isRFCStyle(uuid))
1047
+ return false;
1048
+ const v = _UUID.version(uuid);
1049
+ return !!v && allowed.includes(v);
1096
1050
  }
1097
- get isRefunded() {
1098
- return this.value === "REFUNDED";
1051
+ };
1052
+ _UUID.NIL = "00000000-0000-0000-0000-000000000000";
1053
+ var UUID = _UUID;
1054
+
1055
+ // src/application/contracts/IntegrationEvent.ts
1056
+ var IntegrationEvent = class extends BaseEvent {
1057
+ constructor(tenantUuid, version, type, payload, aggregateUuid, aggregateType) {
1058
+ super(tenantUuid, version, type, payload);
1059
+ this._aggregateUuid = aggregateUuid;
1060
+ this._aggregateType = aggregateType;
1099
1061
  }
1100
- toPrimitives() {
1101
- return { value: this.value };
1062
+ get aggregateUuid() {
1063
+ return this._aggregateUuid;
1102
1064
  }
1103
- static create(gateway) {
1104
- return new _PaymentStatus(gateway.trim().toUpperCase());
1065
+ get aggregateType() {
1066
+ return this._aggregateType;
1105
1067
  }
1106
1068
  };
1107
- _PaymentStatus.SUPPORTED = ["DONE", "PENDING", "FAILED", "CANCELED", "HOLD", "PENDING_REFUND", "REFUNDED", "IN_PROGRESS"];
1108
- _PaymentStatus.DONE = new _PaymentStatus("DONE");
1109
- _PaymentStatus.PENDING = new _PaymentStatus("PENDING");
1110
- _PaymentStatus.IN_PROGRESS = new _PaymentStatus("IN_PROGRESS");
1111
- _PaymentStatus.FAILED = new _PaymentStatus("FAILED");
1112
- _PaymentStatus.CANCELED = new _PaymentStatus("CANCELED");
1113
- _PaymentStatus.HOLD = new _PaymentStatus("HOLD");
1114
- _PaymentStatus.PENDING_REFUND = new _PaymentStatus("PENDING_REFUND");
1115
- _PaymentStatus.REFUNDED = new _PaymentStatus("REFUNDED");
1116
- var PaymentStatus = _PaymentStatus;
1117
1069
 
1118
1070
  // src/application/event-bus/EventBus.ts
1119
- var EventBus = class {
1071
+ var _EventBus = class _EventBus {
1120
1072
  constructor(repository) {
1121
1073
  this.repository = repository;
1122
1074
  }
1123
1075
  async publish(event) {
1124
- await this.repository.create(event);
1076
+ const mapper = _EventBus.MAPPERS.get(event.type);
1077
+ if (!mapper) {
1078
+ throw new InternalError(ErrorManager.APP_ERRORS.PROCESS, `Eventbus mapper not found for <${event.type}>`);
1079
+ }
1080
+ await this.repository.create(mapper(event));
1125
1081
  }
1126
1082
  async publishMany(events) {
1127
1083
  for (let event of events) {
1128
1084
  await this.publish(event);
1129
1085
  }
1130
1086
  }
1087
+ static addMapper(eventType, mapper) {
1088
+ _EventBus.MAPPERS.set(eventType, mapper);
1089
+ }
1131
1090
  };
1091
+ _EventBus.MAPPERS = /* @__PURE__ */ new Map();
1092
+ var EventBus = _EventBus;
1132
1093
 
1133
1094
  // src/application/unit-of-work/BasicUnitOfWork.ts
1134
1095
  var BasicUnitOfWork = class {
@@ -1218,104 +1179,164 @@ var EventManager = class {
1218
1179
  }
1219
1180
  };
1220
1181
 
1221
- // src/infrastructure/mysql/Mysql.ts
1222
- var import_promise = require("mysql2/promise");
1223
- var _MysqlConnector = class _MysqlConnector {
1224
- constructor(pool) {
1225
- this._pool = pool ?? (0, import_promise.createPool)({
1226
- host: process.env.DB_HOST,
1227
- port: Number(process.env.DB_PORT ?? 3306),
1228
- user: process.env.DB_USER,
1229
- password: process.env.DB_PASSWORD,
1230
- database: process.env.DB_DATABASE,
1231
- dateStrings: true,
1232
- connectionLimit: Number(process.env.DB_POOL_SIZE) || _MysqlConnector.DEFAULT_POOL_SIZE,
1233
- decimalNumbers: true
1234
- });
1182
+ // src/infrastructure/contracts/OutboxRecord.ts
1183
+ var OutboxRecord = class _OutboxRecord {
1184
+ constructor(eventUuid, eventType, tenantUuid, aggregateUuid, aggregateType, topic, payload, status, attempts, errorMessage, publishedAt, lastAttempt, createdAt) {
1185
+ this._eventUuid = eventUuid;
1186
+ this._tenantUuid = tenantUuid;
1187
+ this._aggregateUuid = aggregateUuid;
1188
+ this._aggregateType = aggregateType;
1189
+ this._eventType = eventType;
1190
+ this._topic = topic;
1191
+ this._payload = payload;
1192
+ this._status = status;
1193
+ this._attempts = attempts;
1194
+ this._errorMessage = errorMessage;
1195
+ this._publishedAt = publishedAt;
1196
+ this._lastAttempt = lastAttempt;
1197
+ this._createdAt = createdAt;
1235
1198
  }
1236
- async wrap(conn) {
1237
- return new MysqlConnection(conn);
1199
+ get eventUuid() {
1200
+ return this._eventUuid;
1238
1201
  }
1239
- async query(sql, params = []) {
1240
- const [rows] = await this._pool.query(sql, params);
1241
- return rows;
1202
+ get tenantUuid() {
1203
+ return this._tenantUuid;
1242
1204
  }
1243
- async getConnection() {
1244
- const conn = await this._pool.getConnection();
1245
- return this.wrap(conn);
1205
+ get aggregateUuid() {
1206
+ return this._aggregateUuid;
1246
1207
  }
1247
- async closePool() {
1248
- await this._pool.end();
1208
+ get aggregateType() {
1209
+ return this._aggregateType;
1249
1210
  }
1250
- static async ping() {
1251
- const connector = new _MysqlConnector();
1252
- try {
1253
- const conn = await connector._pool.getConnection();
1254
- await conn.ping();
1255
- conn.release();
1256
- return true;
1257
- } catch {
1258
- return false;
1259
- } finally {
1260
- await connector.closePool();
1261
- }
1211
+ get eventType() {
1212
+ return this._eventType;
1262
1213
  }
1263
- };
1264
- _MysqlConnector.DEFAULT_POOL_SIZE = 20;
1265
- var MysqlConnector = _MysqlConnector;
1266
- var MysqlConnection = class {
1267
- constructor(conn) {
1268
- this._conn = conn;
1214
+ get topic() {
1215
+ return this._topic;
1269
1216
  }
1270
- async query(statement, params = []) {
1271
- const [rows] = await this._conn.query(statement, params);
1272
- return rows;
1217
+ get payload() {
1218
+ return this._payload;
1273
1219
  }
1274
- async begin() {
1275
- await this._conn.beginTransaction();
1220
+ get status() {
1221
+ return this._status;
1276
1222
  }
1277
- async commit() {
1278
- await this._conn.commit();
1223
+ get attempts() {
1224
+ return this._attempts;
1279
1225
  }
1280
- async rollback() {
1281
- await this._conn.rollback();
1226
+ get errorMessage() {
1227
+ return this._errorMessage;
1282
1228
  }
1283
- async transaction(fn) {
1284
- await this.begin();
1285
- try {
1286
- const result = await fn(this);
1287
- await this.commit();
1288
- return result;
1289
- } catch (err) {
1290
- await this.rollback();
1291
- throw err;
1292
- }
1229
+ get publishedAt() {
1230
+ return this._publishedAt;
1231
+ }
1232
+ get lastAttempt() {
1233
+ return this._lastAttempt;
1234
+ }
1235
+ get createdAt() {
1236
+ return this._createdAt;
1237
+ }
1238
+ incrementAttempts() {
1239
+ this._attempts++;
1240
+ this._lastAttempt = DateTime.now();
1241
+ }
1242
+ markProcessed() {
1243
+ this._status = ProcessStatus.PROCESSED;
1244
+ this._publishedAt = DateTime.now();
1245
+ }
1246
+ markProcessing() {
1247
+ this.incrementAttempts();
1248
+ this._status = ProcessStatus.PROCESSING;
1249
+ }
1250
+ markWithError(error) {
1251
+ this._status = this.attempts < 5 ? ProcessStatus.FAILED : ProcessStatus.DEAD;
1252
+ this._errorMessage = error;
1253
+ }
1254
+ toPrimitives() {
1255
+ return {
1256
+ eventUuid: this.eventUuid.value,
1257
+ eventType: this.eventType,
1258
+ tenantUuid: this.tenantUuid.value,
1259
+ aggregateUuid: this.aggregateUuid.value,
1260
+ aggregateType: this.aggregateType,
1261
+ topic: this.topic,
1262
+ payload: this.payload,
1263
+ status: this.status.value,
1264
+ attempts: this.attempts,
1265
+ errorMessage: this.errorMessage ?? void 0,
1266
+ publishedAt: this.publishedAt?.value ?? void 0,
1267
+ lastAttempt: this.lastAttempt?.value ?? void 0,
1268
+ createdAt: this.createdAt.value
1269
+ };
1293
1270
  }
1294
- async close() {
1295
- await this._conn.release();
1271
+ static reconstitute(data) {
1272
+ return new _OutboxRecord(
1273
+ UUID.create(data.event_uuid),
1274
+ String(data.event_type),
1275
+ UUID.create(data.tenant_uuid),
1276
+ UUID.create(data.aggregate_uuid),
1277
+ String(data.aggregate_type),
1278
+ String(data.topic),
1279
+ String(data.payload),
1280
+ ProcessStatus.create(data.status),
1281
+ Number(data.attempts),
1282
+ data.error_message ?? void 0,
1283
+ data.published_at ? DateTime.create(data.published_at) : void 0,
1284
+ data.last_attempt ? DateTime.create(data.last_attempt) : void 0,
1285
+ data.created_at ? DateTime.create(data.created_at) : void 0
1286
+ );
1296
1287
  }
1297
1288
  };
1298
1289
 
1299
- // src/infrastructure/http/DefaultController.ts
1300
- var HttpHealthCheckController = class {
1301
- async handle(request) {
1302
- return {
1303
- statusCode: 200,
1304
- body: {
1305
- date: DateTime.create().value,
1306
- code: 200
1307
- }
1308
- };
1290
+ // src/infrastructure/event-bus/EventBusMysqlRepository.ts
1291
+ var EventBusMysqlRepository = class {
1292
+ constructor(connection) {
1293
+ this.connection = connection;
1309
1294
  }
1310
- };
1311
- var HttpNotFoundController = class {
1312
- async handle(request) {
1313
- return {
1314
- statusCode: 404,
1315
- body: {
1316
- message: `Route ${request.headers.location} not found`
1317
- }
1318
- };
1295
+ eventToRowValues(e) {
1296
+ return [
1297
+ e.eventUuid.value,
1298
+ e.eventType,
1299
+ e.tenantUuid.value,
1300
+ e.aggregateUuid.value,
1301
+ e.aggregateType,
1302
+ e.topic,
1303
+ e.payload,
1304
+ e.status.value,
1305
+ e.attempts,
1306
+ e.errorMessage,
1307
+ e.publishedAt?.value,
1308
+ e.lastAttempt?.value,
1309
+ e.createdAt.value
1310
+ ];
1311
+ }
1312
+ async create(event) {
1313
+ const values = this.eventToRowValues(event);
1314
+ await this.connection.query(
1315
+ `INSERT INTO events_outbox (event_uuid, event_type, tenant_uuid, aggregate_uuid, aggregate_type, topic,
1316
+ payload, status, attempts, error_message, published_at, last_attempt, created_at)
1317
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
1318
+ values
1319
+ );
1320
+ }
1321
+ async update(event) {
1322
+ const values = [event.status.value, event.attempts, event.errorMessage, event.publishedAt?.value, event.lastAttempt?.value, event.eventUuid.value];
1323
+ await this.connection.query(
1324
+ `UPDATE events_outbox
1325
+ SET status = ?,
1326
+ attempts = ?,
1327
+ error_message = ?,
1328
+ published_at = ?,
1329
+ last_attempt = ?
1330
+ WHERE event_uuid = ?`,
1331
+ values
1332
+ );
1333
+ }
1334
+ async listPending(limit) {
1335
+ const result = await this.connection.query(
1336
+ `SELECT * FROM events_outbox WHERE status IN ('PENDING','FAILED') AND published_at IS NULL LIMIT 50`,
1337
+ []
1338
+ );
1339
+ return result.length > 0 ? result.map((r) => OutboxRecord.reconstitute(r)) : [];
1319
1340
  }
1320
1341
  };
1321
1342
 
@@ -1449,56 +1470,26 @@ function adaptExpressErrorHandler(errorManager) {
1449
1470
  };
1450
1471
  }
1451
1472
 
1452
- // src/infrastructure/event-bus/EventBusMysqlRepository.ts
1453
- var EventBusMysqlRepository = class {
1454
- constructor(connection) {
1455
- this.connection = connection;
1456
- }
1457
- eventToRowValues(e) {
1458
- return [
1459
- e.eventUuid.value,
1460
- e.eventType,
1461
- e.tenantUuid.value,
1462
- e.aggregateUuid.value,
1463
- e.aggregateType,
1464
- e.topic,
1465
- e.payload,
1466
- e.status.value,
1467
- e.attempts,
1468
- e.errorMessage,
1469
- e.publishedAt?.value,
1470
- e.lastAttempt?.value,
1471
- e.createdAt.value
1472
- ];
1473
- }
1474
- async create(event) {
1475
- const values = this.eventToRowValues(event);
1476
- await this.connection.query(
1477
- `INSERT INTO events_outbox (event_uuid, event_type, tenant_uuid, aggregate_uuid, aggregate_type, topic,
1478
- payload, status, attempts, error_message, published_at, last_attempt, created_at)
1479
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
1480
- values
1481
- );
1482
- }
1483
- async update(event) {
1484
- const values = [event.status.value, event.attempts, event.errorMessage, event.publishedAt?.value, event.lastAttempt?.value, event.eventUuid.value];
1485
- await this.connection.query(
1486
- `UPDATE events_outbox
1487
- SET status = ?,
1488
- attempts = ?,
1489
- error_message = ?,
1490
- published_at = ?,
1491
- last_attempt = ?
1492
- WHERE event_uuid = ?`,
1493
- values
1494
- );
1473
+ // src/infrastructure/http/DefaultController.ts
1474
+ var HttpHealthCheckController = class {
1475
+ async handle(request) {
1476
+ return {
1477
+ statusCode: 200,
1478
+ body: {
1479
+ date: DateTime.create().value,
1480
+ code: 200
1481
+ }
1482
+ };
1495
1483
  }
1496
- async listPending(limit) {
1497
- const result = await this.connection.query(
1498
- `SELECT * FROM events_outbox WHERE status IN ('PENDING','FAILED') AND published_at IS NULL LIMIT 50`,
1499
- []
1500
- );
1501
- return result.length > 0 ? result.map((r) => DomainEvent.reconstitute(r)) : [];
1484
+ };
1485
+ var HttpNotFoundController = class {
1486
+ async handle(request) {
1487
+ return {
1488
+ statusCode: 404,
1489
+ body: {
1490
+ message: `Route ${request.headers.location} not found`
1491
+ }
1492
+ };
1502
1493
  }
1503
1494
  };
1504
1495
 
@@ -1539,8 +1530,7 @@ var KafkaManager = class extends EventManager {
1539
1530
  eachMessage: async ({ topic, partition, message, heartbeat }) => {
1540
1531
  try {
1541
1532
  await this.execCallback(this._onMessage, `[New message detected for ${topic}]: ${message.value?.toString()}`);
1542
- const evt = JSON.parse(String(message.value?.toString()));
1543
- await this.execRoute(topic, evt);
1533
+ await this.execRoute(topic, String(message.value?.toString()));
1544
1534
  const next = (BigInt(message.offset) + 1n).toString();
1545
1535
  await this.consumer.commitOffsets([{ topic, partition, offset: next }]);
1546
1536
  await heartbeat();
@@ -1556,28 +1546,12 @@ var KafkaManager = class extends EventManager {
1556
1546
  await this.execCallback(this._onError, new InternalError(ErrorManager.APP_ERRORS.PROCESS, error.toString()));
1557
1547
  }
1558
1548
  }
1559
- async send(message) {
1560
- if (!message.producer) {
1561
- message.producer = process.env.NAME && process.env.ENVIRONMENT ? `${process.env.NAME}-${process.env.ENVIRONMENT}` : "unknown";
1562
- }
1563
- if (!message.date) {
1564
- message.date = DateTime.now().value;
1565
- }
1566
- try {
1567
- if (!this.producer) {
1568
- throw new InternalError(ErrorManager.APP_ERRORS.PROCESS, "Producer not initialized");
1569
- }
1570
- await this.producer.connect();
1571
- await this.producer.send({
1572
- topic: message.topic,
1573
- messages: [{ value: JSON.stringify({ producer: message.producer, data: message }) }]
1574
- });
1575
- await this.producer.disconnect();
1576
- } catch (error) {
1577
- throw new InternalError(error.toString());
1578
- }
1579
- }
1580
- async sendRaw(message, topic) {
1549
+ async send(topic, message) {
1550
+ const evt = {
1551
+ date: DateTime.now().value,
1552
+ producer: process.env.NAME && process.env.ENVIRONMENT ? `${process.env.NAME}-${process.env.ENVIRONMENT}` : "unknown",
1553
+ data: message
1554
+ };
1581
1555
  try {
1582
1556
  if (!this.producer) {
1583
1557
  throw new InternalError(ErrorManager.APP_ERRORS.PROCESS, "Producer not initialized");
@@ -1585,7 +1559,7 @@ var KafkaManager = class extends EventManager {
1585
1559
  await this.producer.connect();
1586
1560
  await this.producer.send({
1587
1561
  topic,
1588
- messages: [{ value: message }]
1562
+ messages: [{ value: JSON.stringify(evt) }]
1589
1563
  });
1590
1564
  await this.producer.disconnect();
1591
1565
  } catch (error) {
@@ -1609,6 +1583,84 @@ var KafkaManager = class extends EventManager {
1609
1583
  }
1610
1584
  };
1611
1585
 
1586
+ // src/infrastructure/mysql/Mysql.ts
1587
+ var import_promise = require("mysql2/promise");
1588
+ var _MysqlConnector = class _MysqlConnector {
1589
+ constructor(pool) {
1590
+ this._pool = pool ?? (0, import_promise.createPool)({
1591
+ host: process.env.DB_HOST,
1592
+ port: Number(process.env.DB_PORT ?? 3306),
1593
+ user: process.env.DB_USER,
1594
+ password: process.env.DB_PASSWORD,
1595
+ database: process.env.DB_DATABASE,
1596
+ dateStrings: true,
1597
+ connectionLimit: Number(process.env.DB_POOL_SIZE) || _MysqlConnector.DEFAULT_POOL_SIZE,
1598
+ decimalNumbers: true
1599
+ });
1600
+ }
1601
+ async wrap(conn) {
1602
+ return new MysqlConnection(conn);
1603
+ }
1604
+ async query(sql, params = []) {
1605
+ const [rows] = await this._pool.query(sql, params);
1606
+ return rows;
1607
+ }
1608
+ async getConnection() {
1609
+ const conn = await this._pool.getConnection();
1610
+ return this.wrap(conn);
1611
+ }
1612
+ async closePool() {
1613
+ await this._pool.end();
1614
+ }
1615
+ static async ping() {
1616
+ const connector = new _MysqlConnector();
1617
+ try {
1618
+ const conn = await connector._pool.getConnection();
1619
+ await conn.ping();
1620
+ conn.release();
1621
+ return true;
1622
+ } catch {
1623
+ return false;
1624
+ } finally {
1625
+ await connector.closePool();
1626
+ }
1627
+ }
1628
+ };
1629
+ _MysqlConnector.DEFAULT_POOL_SIZE = 20;
1630
+ var MysqlConnector = _MysqlConnector;
1631
+ var MysqlConnection = class {
1632
+ constructor(conn) {
1633
+ this._conn = conn;
1634
+ }
1635
+ async query(statement, params = []) {
1636
+ const [rows] = await this._conn.query(statement, params);
1637
+ return rows;
1638
+ }
1639
+ async begin() {
1640
+ await this._conn.beginTransaction();
1641
+ }
1642
+ async commit() {
1643
+ await this._conn.commit();
1644
+ }
1645
+ async rollback() {
1646
+ await this._conn.rollback();
1647
+ }
1648
+ async transaction(fn) {
1649
+ await this.begin();
1650
+ try {
1651
+ const result = await fn(this);
1652
+ await this.commit();
1653
+ return result;
1654
+ } catch (err) {
1655
+ await this.rollback();
1656
+ throw err;
1657
+ }
1658
+ }
1659
+ async close() {
1660
+ await this._conn.release();
1661
+ }
1662
+ };
1663
+
1612
1664
  // src/utils/ExchangeRates.ts
1613
1665
  var ExchangeRates = class _ExchangeRates extends BaseObject {
1614
1666
  constructor(props) {
@@ -1662,6 +1714,7 @@ var ExchangeRates = class _ExchangeRates extends BaseObject {
1662
1714
  };
1663
1715
  // Annotate the CommonJS export names for ESM import in node:
1664
1716
  0 && (module.exports = {
1717
+ BaseEvent,
1665
1718
  BaseObject,
1666
1719
  BasicUnitOfWork,
1667
1720
  BasicUnitOfWorkFactory,
@@ -1671,7 +1724,6 @@ var ExchangeRates = class _ExchangeRates extends BaseObject {
1671
1724
  DomainEntity,
1672
1725
  DomainError,
1673
1726
  DomainEvent,
1674
- DomainEventStatus,
1675
1727
  Email,
1676
1728
  ErrorManager,
1677
1729
  EventBus,
@@ -1681,14 +1733,18 @@ var ExchangeRates = class _ExchangeRates extends BaseObject {
1681
1733
  FatalError,
1682
1734
  HttpHealthCheckController,
1683
1735
  HttpNotFoundController,
1736
+ IntegrationEvent,
1684
1737
  InternalError,
1685
1738
  KafkaManager,
1686
1739
  Language,
1687
1740
  MysqlConnection,
1688
1741
  MysqlConnector,
1742
+ OutboxRecord,
1689
1743
  PaymentGateway,
1690
1744
  PaymentStatus,
1691
1745
  Price,
1746
+ ProcessStatus,
1747
+ StringVars,
1692
1748
  UUID,
1693
1749
  UsageError,
1694
1750
  ValueObject,