wsp-ms-core 1.0.77 → 1.0.78-beta

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