@artstesh/postboy 1.2.3 → 1.3.0

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 (142) hide show
  1. package/README.md +1 -1
  2. package/lib/index.d.ts +3 -2
  3. package/lib/index.d.ts.map +1 -1
  4. package/lib/index.js +3 -2
  5. package/lib/index.js.map +1 -1
  6. package/lib/messages/add-middleware.executor.d.ts +19 -0
  7. package/lib/messages/add-middleware.executor.d.ts.map +1 -0
  8. package/lib/messages/add-middleware.executor.js +24 -0
  9. package/lib/messages/add-middleware.executor.js.map +1 -0
  10. package/lib/messages/add-namespace.executor.d.ts +19 -0
  11. package/lib/messages/add-namespace.executor.d.ts.map +1 -0
  12. package/lib/messages/add-namespace.executor.js +24 -0
  13. package/lib/messages/add-namespace.executor.js.map +1 -0
  14. package/lib/messages/connect-executor.executor.d.ts +25 -0
  15. package/lib/messages/connect-executor.executor.d.ts.map +1 -0
  16. package/lib/messages/connect-executor.executor.js +30 -0
  17. package/lib/messages/connect-executor.executor.js.map +1 -0
  18. package/lib/messages/connect-handler.executor.d.ts +25 -0
  19. package/lib/messages/connect-handler.executor.d.ts.map +1 -0
  20. package/lib/messages/connect-handler.executor.js +30 -0
  21. package/lib/messages/connect-handler.executor.js.map +1 -0
  22. package/lib/messages/connect-message.executor.d.ts +28 -0
  23. package/lib/messages/connect-message.executor.d.ts.map +1 -0
  24. package/lib/messages/connect-message.executor.js +31 -0
  25. package/lib/messages/connect-message.executor.js.map +1 -0
  26. package/lib/messages/connect.message.executor.d.ts +28 -0
  27. package/lib/messages/connect.message.executor.d.ts.map +1 -0
  28. package/lib/messages/connect.message.executor.js +31 -0
  29. package/lib/messages/connect.message.executor.js.map +1 -0
  30. package/lib/messages/disconnect-message.executor.d.ts +19 -0
  31. package/lib/messages/disconnect-message.executor.d.ts.map +1 -0
  32. package/lib/messages/disconnect-message.executor.js +25 -0
  33. package/lib/messages/disconnect-message.executor.js.map +1 -0
  34. package/lib/messages/eliminate-namespace.executor.d.ts +16 -0
  35. package/lib/messages/eliminate-namespace.executor.d.ts.map +1 -0
  36. package/lib/messages/eliminate-namespace.executor.js +22 -0
  37. package/lib/messages/eliminate-namespace.executor.js.map +1 -0
  38. package/lib/messages/index.d.ts +11 -0
  39. package/lib/messages/index.d.ts.map +1 -0
  40. package/lib/messages/index.js +24 -0
  41. package/lib/messages/index.js.map +1 -0
  42. package/lib/messages/lock-message.executor.d.ts +22 -0
  43. package/lib/messages/lock-message.executor.d.ts.map +1 -0
  44. package/lib/messages/lock-message.executor.js +26 -0
  45. package/lib/messages/lock-message.executor.js.map +1 -0
  46. package/lib/messages/remove-middleware.executor.d.ts +17 -0
  47. package/lib/messages/remove-middleware.executor.d.ts.map +1 -0
  48. package/lib/messages/remove-middleware.executor.js +22 -0
  49. package/lib/messages/remove-middleware.executor.js.map +1 -0
  50. package/lib/messages/unlock-message.executor.d.ts +21 -0
  51. package/lib/messages/unlock-message.executor.d.ts.map +1 -0
  52. package/lib/messages/unlock-message.executor.js +25 -0
  53. package/lib/messages/unlock-message.executor.js.map +1 -0
  54. package/lib/models/cancel-details.d.ts +9 -0
  55. package/lib/models/cancel-details.d.ts.map +1 -0
  56. package/lib/models/cancel-details.js +3 -0
  57. package/lib/models/cancel-details.js.map +1 -0
  58. package/lib/models/cancel-error.d.ts +7 -0
  59. package/lib/models/cancel-error.d.ts.map +1 -0
  60. package/lib/models/cancel-error.js +18 -0
  61. package/lib/models/cancel-error.js.map +1 -0
  62. package/lib/models/middleware-decision.enum.d.ts +5 -0
  63. package/lib/models/middleware-decision.enum.d.ts.map +1 -0
  64. package/lib/models/middleware-decision.enum.js +9 -0
  65. package/lib/models/middleware-decision.enum.js.map +1 -0
  66. package/lib/models/middleware-stage.enum.d.ts +6 -0
  67. package/lib/models/middleware-stage.enum.d.ts.map +1 -0
  68. package/lib/models/middleware-stage.enum.js +10 -0
  69. package/lib/models/middleware-stage.enum.js.map +1 -0
  70. package/lib/models/pipeline-context.d.ts +7 -0
  71. package/lib/models/pipeline-context.d.ts.map +1 -0
  72. package/lib/models/pipeline-context.js +3 -0
  73. package/lib/models/pipeline-context.js.map +1 -0
  74. package/lib/models/pipeline-result.d.ts +6 -0
  75. package/lib/models/pipeline-result.d.ts.map +1 -0
  76. package/lib/models/pipeline-result.js +3 -0
  77. package/lib/models/pipeline-result.js.map +1 -0
  78. package/lib/models/postboy-callback.message.d.ts +21 -0
  79. package/lib/models/postboy-callback.message.d.ts.map +1 -1
  80. package/lib/models/postboy-callback.message.js +23 -0
  81. package/lib/models/postboy-callback.message.js.map +1 -1
  82. package/lib/models/postboy-execution.handler.d.ts +6 -0
  83. package/lib/models/postboy-execution.handler.d.ts.map +1 -1
  84. package/lib/models/postboy-execution.handler.js.map +1 -1
  85. package/lib/models/postboy-message-metadata.d.ts +26 -0
  86. package/lib/models/postboy-message-metadata.d.ts.map +1 -0
  87. package/lib/models/postboy-message-metadata.js +3 -0
  88. package/lib/models/postboy-message-metadata.js.map +1 -0
  89. package/lib/models/postboy-message.context.d.ts +9 -0
  90. package/lib/models/postboy-message.context.d.ts.map +1 -0
  91. package/lib/models/postboy-message.context.js +3 -0
  92. package/lib/models/postboy-message.context.js.map +1 -0
  93. package/lib/models/postboy-subscription.d.ts +31 -2
  94. package/lib/models/postboy-subscription.d.ts.map +1 -1
  95. package/lib/models/postboy-subscription.js +31 -2
  96. package/lib/models/postboy-subscription.js.map +1 -1
  97. package/lib/models/postboy.message.d.ts +3 -0
  98. package/lib/models/postboy.message.d.ts.map +1 -1
  99. package/lib/models/postboy.message.js +7 -0
  100. package/lib/models/postboy.message.js.map +1 -1
  101. package/lib/models/postboy.settings.d.ts +13 -0
  102. package/lib/models/postboy.settings.d.ts.map +1 -0
  103. package/lib/models/postboy.settings.js +20 -0
  104. package/lib/models/postboy.settings.js.map +1 -0
  105. package/lib/postboy-abstract.registrator.d.ts +15 -32
  106. package/lib/postboy-abstract.registrator.d.ts.map +1 -1
  107. package/lib/postboy-abstract.registrator.js +68 -73
  108. package/lib/postboy-abstract.registrator.js.map +1 -1
  109. package/lib/postboy.service.d.ts +73 -39
  110. package/lib/postboy.service.d.ts.map +1 -1
  111. package/lib/postboy.service.js +124 -60
  112. package/lib/postboy.service.js.map +1 -1
  113. package/lib/services/namespace-registrator.d.ts +13 -13
  114. package/lib/services/namespace-registrator.js +20 -20
  115. package/lib/services/postboy-context.service.d.ts +13 -0
  116. package/lib/services/postboy-context.service.d.ts.map +1 -0
  117. package/lib/services/postboy-context.service.js +50 -0
  118. package/lib/services/postboy-context.service.js.map +1 -0
  119. package/lib/services/postboy-dependency.resolver.d.ts +25 -0
  120. package/lib/services/postboy-dependency.resolver.d.ts.map +1 -1
  121. package/lib/services/postboy-dependency.resolver.js +25 -0
  122. package/lib/services/postboy-dependency.resolver.js.map +1 -1
  123. package/lib/services/postboy-message.store.d.ts +5 -1
  124. package/lib/services/postboy-message.store.d.ts.map +1 -1
  125. package/lib/services/postboy-message.store.js +23 -7
  126. package/lib/services/postboy-message.store.js.map +1 -1
  127. package/lib/services/postboy-middleware.d.ts +35 -0
  128. package/lib/services/postboy-middleware.d.ts.map +1 -0
  129. package/lib/services/postboy-middleware.js +47 -0
  130. package/lib/services/postboy-middleware.js.map +1 -0
  131. package/lib/services/postboy-middleware.service.d.ts +28 -0
  132. package/lib/services/postboy-middleware.service.d.ts.map +1 -1
  133. package/lib/services/postboy-middleware.service.js +30 -0
  134. package/lib/services/postboy-middleware.service.js.map +1 -1
  135. package/lib/services/postboy-namespace.store.d.ts +33 -34
  136. package/lib/services/postboy-namespace.store.d.ts.map +1 -1
  137. package/lib/services/postboy-namespace.store.js +53 -53
  138. package/lib/services/postboy-namespace.store.js.map +1 -1
  139. package/lib/utils/id.generator.d.ts +4 -4
  140. package/lib/utils/id.generator.js +17 -17
  141. package/lib/utils/id.generator.js.map +1 -1
  142. package/package.json +5 -10
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LockMessage = void 0;
4
+ const postboy_executor_1 = require("../models/postboy-executor");
5
+ /**
6
+ * Locks a specific message type to prevent firing of them.
7
+ *
8
+ * This class is used to handle operations associated with locking mechanisms
9
+ * for a specified message type.
10
+ *
11
+ * @template T - A type that extends {@link PostboyGenericMessage}.
12
+ */
13
+ class LockMessage extends postboy_executor_1.PostboyExecutor {
14
+ /**
15
+ * Constructs an instance of the class with the specified message type.
16
+ *
17
+ * @param {MessageType<T>} type - The type of the message to be used for the instance.
18
+ */
19
+ constructor(type) {
20
+ super();
21
+ this.type = type;
22
+ }
23
+ }
24
+ exports.LockMessage = LockMessage;
25
+ LockMessage.ID = '477df3e2-1f99-4476-9a3b-afd1fa426436';
26
+ //# sourceMappingURL=lock-message.executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock-message.executor.js","sourceRoot":"","sources":["../../src/messages/lock-message.executor.ts"],"names":[],"mappings":";;;AAEA,iEAA6D;AAE7D;;;;;;;GAOG;AACH,MAAa,WAA6C,SAAQ,kCAAqB;IAGrF;;;;OAIG;IACH,YAAmB,IAAoB;QACrC,KAAK,EAAE,CAAC;QADS,SAAI,GAAJ,IAAI,CAAgB;IAEvC,CAAC;;AAVH,kCAWC;AAViB,cAAE,GAAG,sCAAsC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { PostboyMiddleware } from '../models/postboy-middleware';
2
+ import { PostboyExecutor } from '../models/postboy-executor';
3
+ /**
4
+ * Represents a class responsible for removing {@link PostboyMiddleware} in execution flow.
5
+ * This class extends PostboyExecutor and operates with a void return type.
6
+ */
7
+ export declare class RemoveMiddleware extends PostboyExecutor<void> {
8
+ middleware: PostboyMiddleware;
9
+ static readonly ID = "c25c708c-53c9-498d-a28b-936fbaf68b91";
10
+ /**
11
+ * Constructs an instance of the class with the specified middleware.
12
+ *
13
+ * @param {PostboyMiddleware} middleware - The {@link PostboyMiddleware} instance to be removed.
14
+ */
15
+ constructor(middleware: PostboyMiddleware);
16
+ }
17
+ //# sourceMappingURL=remove-middleware.executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-middleware.executor.d.ts","sourceRoot":"","sources":["../../src/messages/remove-middleware.executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,eAAe,CAAC,IAAI,CAAC;IAQtC,UAAU,EAAE,iBAAiB;IAPhD,MAAM,CAAC,QAAQ,CAAC,EAAE,0CAA0C;IAE5D;;;;OAIG;gBACgB,UAAU,EAAE,iBAAiB;CAGjD"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RemoveMiddleware = void 0;
4
+ const postboy_executor_1 = require("../models/postboy-executor");
5
+ /**
6
+ * Represents a class responsible for removing {@link PostboyMiddleware} in execution flow.
7
+ * This class extends PostboyExecutor and operates with a void return type.
8
+ */
9
+ class RemoveMiddleware extends postboy_executor_1.PostboyExecutor {
10
+ /**
11
+ * Constructs an instance of the class with the specified middleware.
12
+ *
13
+ * @param {PostboyMiddleware} middleware - The {@link PostboyMiddleware} instance to be removed.
14
+ */
15
+ constructor(middleware) {
16
+ super();
17
+ this.middleware = middleware;
18
+ }
19
+ }
20
+ exports.RemoveMiddleware = RemoveMiddleware;
21
+ RemoveMiddleware.ID = 'c25c708c-53c9-498d-a28b-936fbaf68b91';
22
+ //# sourceMappingURL=remove-middleware.executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-middleware.executor.js","sourceRoot":"","sources":["../../src/messages/remove-middleware.executor.ts"],"names":[],"mappings":";;;AACA,iEAA6D;AAE7D;;;GAGG;AACH,MAAa,gBAAiB,SAAQ,kCAAqB;IAGzD;;;;OAIG;IACH,YAAmB,UAA6B;QAC9C,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAmB;IAEhD,CAAC;;AAVH,4CAWC;AAViB,mBAAE,GAAG,sCAAsC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { PostboyGenericMessage } from '../models/postboy-generic-message';
2
+ import { PostboyExecutor } from '../models/postboy-executor';
3
+ import { MessageType } from '../postboy-abstract.registrator';
4
+ /**
5
+ * A specialized executor that handles the unlocking process for messages of a specified type.
6
+ * Unlocks a previously locked message, making it available for processing again.
7
+ *
8
+ * @template T - The type parameter extending {@link PostboyGenericMessage}, representing the message type handled by the executor.
9
+ * @extends {PostboyExecutor<void>}
10
+ */
11
+ export declare class UnlockMessage<T extends PostboyGenericMessage> extends PostboyExecutor<void> {
12
+ type: MessageType<T>;
13
+ static readonly ID = "d71d25e3-90ac-4009-b972-9e6c6b05611e";
14
+ /**
15
+ * Creates an instance of the class with the specified message type.
16
+ *
17
+ * @param {MessageType<T>} type - The message type for this instance.
18
+ */
19
+ constructor(type: MessageType<T>);
20
+ }
21
+ //# sourceMappingURL=unlock-message.executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unlock-message.executor.d.ts","sourceRoot":"","sources":["../../src/messages/unlock-message.executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D;;;;;;GAMG;AACH,qBAAa,aAAa,CAAC,CAAC,SAAS,qBAAqB,CAAE,SAAQ,eAAe,CAAC,IAAI,CAAC;IAQpE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;IAPvC,MAAM,CAAC,QAAQ,CAAC,EAAE,0CAA0C;IAE5D;;;;OAIG;gBACgB,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;CAGxC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UnlockMessage = void 0;
4
+ const postboy_executor_1 = require("../models/postboy-executor");
5
+ /**
6
+ * A specialized executor that handles the unlocking process for messages of a specified type.
7
+ * Unlocks a previously locked message, making it available for processing again.
8
+ *
9
+ * @template T - The type parameter extending {@link PostboyGenericMessage}, representing the message type handled by the executor.
10
+ * @extends {PostboyExecutor<void>}
11
+ */
12
+ class UnlockMessage extends postboy_executor_1.PostboyExecutor {
13
+ /**
14
+ * Creates an instance of the class with the specified message type.
15
+ *
16
+ * @param {MessageType<T>} type - The message type for this instance.
17
+ */
18
+ constructor(type) {
19
+ super();
20
+ this.type = type;
21
+ }
22
+ }
23
+ exports.UnlockMessage = UnlockMessage;
24
+ UnlockMessage.ID = 'd71d25e3-90ac-4009-b972-9e6c6b05611e';
25
+ //# sourceMappingURL=unlock-message.executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unlock-message.executor.js","sourceRoot":"","sources":["../../src/messages/unlock-message.executor.ts"],"names":[],"mappings":";;;AACA,iEAA6D;AAG7D;;;;;;GAMG;AACH,MAAa,aAA+C,SAAQ,kCAAqB;IAGvF;;;;OAIG;IACH,YAAmB,IAAoB;QACrC,KAAK,EAAE,CAAC;QADS,SAAI,GAAJ,IAAI,CAAgB;IAEvC,CAAC;;AAVH,sCAWC;AAViB,gBAAE,GAAG,sCAAsC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { MiddlewareStage } from "./middleware-stage.enum";
2
+ export interface CancelDetails {
3
+ stage: MiddlewareStage;
4
+ reason?: string;
5
+ middleware?: string;
6
+ messageId?: string;
7
+ namespace?: string;
8
+ }
9
+ //# sourceMappingURL=cancel-details.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-details.d.ts","sourceRoot":"","sources":["../../src/models/cancel-details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,eAAe,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=cancel-details.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-details.js","sourceRoot":"","sources":["../../src/models/cancel-details.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { CancelDetails } from "./cancel-details";
2
+ export declare class CancelError extends Error {
3
+ readonly details: CancelDetails;
4
+ constructor(details: CancelDetails);
5
+ }
6
+ export declare function isCancelError(error: unknown): error is CancelError;
7
+ //# sourceMappingURL=cancel-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-error.d.ts","sourceRoot":"","sources":["../../src/models/cancel-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAG/C,qBAAa,WAAY,SAAQ,KAAK;IACpC,SAAgB,OAAO,EAAE,aAAa,CAAC;gBAE3B,OAAO,EAAE,aAAa;CAKnC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAElE"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CancelError = void 0;
4
+ exports.isCancelError = isCancelError;
5
+ const middleware_stage_enum_1 = require("./middleware-stage.enum");
6
+ class CancelError extends Error {
7
+ constructor(details) {
8
+ var _a;
9
+ super((_a = details.reason) !== null && _a !== void 0 ? _a : `Postboy operation was cancelled at stage "${middleware_stage_enum_1.MiddlewareStage[details.stage]}"`);
10
+ this.name = 'PostboyCancelError';
11
+ this.details = details;
12
+ }
13
+ }
14
+ exports.CancelError = CancelError;
15
+ function isCancelError(error) {
16
+ return error instanceof CancelError;
17
+ }
18
+ //# sourceMappingURL=cancel-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-error.js","sourceRoot":"","sources":["../../src/models/cancel-error.ts"],"names":[],"mappings":";;;AAaA,sCAEC;AAdD,mEAAwD;AAExD,MAAa,WAAY,SAAQ,KAAK;IAGpC,YAAY,OAAsB;;QAChC,KAAK,CAAC,MAAA,OAAO,CAAC,MAAM,mCAAI,6CAA6C,uCAAe,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxG,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AARD,kCAQC;AAED,SAAgB,aAAa,CAAC,KAAc;IAC1C,OAAO,KAAK,YAAY,WAAW,CAAC;AACtC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare enum MiddlewareDecision {
2
+ Continue = 1,
3
+ Interrupt = 2
4
+ }
5
+ //# sourceMappingURL=middleware-decision.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware-decision.enum.d.ts","sourceRoot":"","sources":["../../src/models/middleware-decision.enum.ts"],"names":[],"mappings":"AACA,oBAAY,kBAAkB;IAC5B,QAAQ,IAAG;IACX,SAAS,IAAA;CACV"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MiddlewareDecision = void 0;
4
+ var MiddlewareDecision;
5
+ (function (MiddlewareDecision) {
6
+ MiddlewareDecision[MiddlewareDecision["Continue"] = 1] = "Continue";
7
+ MiddlewareDecision[MiddlewareDecision["Interrupt"] = 2] = "Interrupt";
8
+ })(MiddlewareDecision || (exports.MiddlewareDecision = MiddlewareDecision = {}));
9
+ //# sourceMappingURL=middleware-decision.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware-decision.enum.js","sourceRoot":"","sources":["../../src/models/middleware-decision.enum.ts"],"names":[],"mappings":";;;AACA,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,mEAAW,CAAA;IACX,qEAAS,CAAA;AACX,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B"}
@@ -0,0 +1,6 @@
1
+ export declare enum MiddlewareStage {
2
+ Publish = 1,
3
+ Callback = 2,
4
+ Execute = 3
5
+ }
6
+ //# sourceMappingURL=middleware-stage.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware-stage.enum.d.ts","sourceRoot":"","sources":["../../src/models/middleware-stage.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,OAAO,IAAI;IACX,QAAQ,IAAA;IACR,OAAO,IAAA;CACR"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MiddlewareStage = void 0;
4
+ var MiddlewareStage;
5
+ (function (MiddlewareStage) {
6
+ MiddlewareStage[MiddlewareStage["Publish"] = 1] = "Publish";
7
+ MiddlewareStage[MiddlewareStage["Callback"] = 2] = "Callback";
8
+ MiddlewareStage[MiddlewareStage["Execute"] = 3] = "Execute";
9
+ })(MiddlewareStage || (exports.MiddlewareStage = MiddlewareStage = {}));
10
+ //# sourceMappingURL=middleware-stage.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware-stage.enum.js","sourceRoot":"","sources":["../../src/models/middleware-stage.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,2DAAW,CAAA;IACX,6DAAQ,CAAA;IACR,2DAAO,CAAA;AACT,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B"}
@@ -0,0 +1,7 @@
1
+ import { PostboyMessage } from "./postboy.message";
2
+ import { MiddlewareStage } from "./middleware-stage.enum";
3
+ export interface PipelineContext<T extends PostboyMessage = PostboyMessage> {
4
+ stage: MiddlewareStage;
5
+ message: T;
6
+ }
7
+ //# sourceMappingURL=pipeline-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-context.d.ts","sourceRoot":"","sources":["../../src/models/pipeline-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAExD,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc;IACxE,KAAK,EAAE,eAAe,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC;CACZ"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=pipeline-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-context.js","sourceRoot":"","sources":["../../src/models/pipeline-context.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export type PipelineResult = {
2
+ cancelled: boolean;
3
+ cancelledBy?: string;
4
+ reason?: string;
5
+ };
6
+ //# sourceMappingURL=pipeline-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-result.d.ts","sourceRoot":"","sources":["../../src/models/pipeline-result.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=pipeline-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-result.js","sourceRoot":"","sources":["../../src/models/pipeline-result.ts"],"names":[],"mappings":""}
@@ -21,7 +21,28 @@ import { PostboyGenericMessage } from './postboy-generic-message';
21
21
  export declare abstract class PostboyCallbackMessage<T> extends PostboyGenericMessage {
22
22
  protected result$: Subject<T>;
23
23
  result: Observable<T>;
24
+ /**
25
+ * Emits the provided value.
26
+ *
27
+ * @template T - The type of the value to emit.
28
+ * @param {T} value - The value to emit through the `result$` observable.
29
+ * @returns {void}
30
+ */
24
31
  next: (value: T) => void;
32
+ /**
33
+ * Marks the operation as complete by emitting the provided value and then completing the result stream.
34
+ *
35
+ * @param {T} value - The value to emit prior to completing the result stream.
36
+ * @return {void} This method does not return a value.
37
+ */
25
38
  finish(value: T): void;
39
+ /**
40
+ * Completes the current observable result stream.
41
+ * This method marks the result observable as complete, ensuring no further values
42
+ * or events will be emitted from it.
43
+ *
44
+ * @return {void} No value is returned from this method.
45
+ */
46
+ complete(): void;
26
47
  }
27
48
  //# sourceMappingURL=postboy-callback.message.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postboy-callback.message.d.ts","sourceRoot":"","sources":["../../src/models/postboy-callback.message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAAsB,sBAAsB,CAAC,CAAC,CAAE,SAAQ,qBAAqB;IAC3E,SAAS,CAAC,OAAO,aAAoB;IAC9B,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAA+B;IAEpD,IAAI,UAAW,CAAC,KAAG,IAAI,CAA6B;IAEpD,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;CAI9B"}
1
+ {"version":3,"file":"postboy-callback.message.d.ts","sourceRoot":"","sources":["../../src/models/postboy-callback.message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAAsB,sBAAsB,CAAC,CAAC,CAAE,SAAQ,qBAAqB;IAC3E,SAAS,CAAC,OAAO,aAAoB;IAC9B,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAA+B;IAE3D;;;;;;OAMG;IACI,IAAI,UAAW,CAAC,KAAG,IAAI,CAA6B;IAE3D;;;;;OAKG;IACI,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAK7B;;;;;;OAMG;IACI,QAAQ,IAAI,IAAI;CAGxB"}
@@ -26,12 +26,35 @@ class PostboyCallbackMessage extends postboy_generic_message_1.PostboyGenericMes
26
26
  super(...arguments);
27
27
  this.result$ = new rxjs_1.Subject();
28
28
  this.result = this.result$.asObservable();
29
+ /**
30
+ * Emits the provided value.
31
+ *
32
+ * @template T - The type of the value to emit.
33
+ * @param {T} value - The value to emit through the `result$` observable.
34
+ * @returns {void}
35
+ */
29
36
  this.next = (value) => this.result$.next(value);
30
37
  }
38
+ /**
39
+ * Marks the operation as complete by emitting the provided value and then completing the result stream.
40
+ *
41
+ * @param {T} value - The value to emit prior to completing the result stream.
42
+ * @return {void} This method does not return a value.
43
+ */
31
44
  finish(value) {
32
45
  this.result$.next(value);
33
46
  this.result$.complete();
34
47
  }
48
+ /**
49
+ * Completes the current observable result stream.
50
+ * This method marks the result observable as complete, ensuring no further values
51
+ * or events will be emitted from it.
52
+ *
53
+ * @return {void} No value is returned from this method.
54
+ */
55
+ complete() {
56
+ this.result$.complete();
57
+ }
35
58
  }
36
59
  exports.PostboyCallbackMessage = PostboyCallbackMessage;
37
60
  //# sourceMappingURL=postboy-callback.message.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"postboy-callback.message.js","sourceRoot":"","sources":["../../src/models/postboy-callback.message.ts"],"names":[],"mappings":";;;AAAA,+BAA2C;AAC3C,uEAAkE;AAElE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAsB,sBAA0B,SAAQ,+CAAqB;IAA7E;;QACY,YAAO,GAAG,IAAI,cAAO,EAAK,CAAC;QAC9B,WAAM,GAAkB,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;QAEpD,SAAI,GAAG,CAAC,KAAQ,EAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAM7D,CAAC;IAJQ,MAAM,CAAC,KAAQ;QACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;CACF;AAVD,wDAUC"}
1
+ {"version":3,"file":"postboy-callback.message.js","sourceRoot":"","sources":["../../src/models/postboy-callback.message.ts"],"names":[],"mappings":";;;AAAA,+BAA2C;AAC3C,uEAAkE;AAElE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAsB,sBAA0B,SAAQ,+CAAqB;IAA7E;;QACY,YAAO,GAAG,IAAI,cAAO,EAAK,CAAC;QAC9B,WAAM,GAAkB,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;QAE3D;;;;;;WAMG;QACI,SAAI,GAAG,CAAC,KAAQ,EAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAuB7D,CAAC;IArBC;;;;;OAKG;IACI,MAAM,CAAC,KAAQ;QACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;IAED;;;;;;OAMG;IACI,QAAQ;QACb,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;CACF;AAlCD,wDAkCC"}
@@ -10,6 +10,12 @@ import { PostboyExecutor } from './postboy-executor';
10
10
  * @template E The type of the executor extending the PostboyExecutor.
11
11
  */
12
12
  export declare abstract class PostboyExecutionHandler<R, E extends PostboyExecutor<R>> {
13
+ /**
14
+ * Abstract method to handle the specified executor and return a result.
15
+ *
16
+ * @param {E} executor - The executor that will be processed by the method.
17
+ * @return {R} The result obtained after handling the executor.
18
+ */
13
19
  abstract handle(executor: E): R;
14
20
  }
15
21
  //# sourceMappingURL=postboy-execution.handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postboy-execution.handler.d.ts","sourceRoot":"","sources":["../../src/models/postboy-execution.handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;GASG;AACH,8BAAsB,uBAAuB,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,CAAC,CAAC;IAC3E,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC;CAChC"}
1
+ {"version":3,"file":"postboy-execution.handler.d.ts","sourceRoot":"","sources":["../../src/models/postboy-execution.handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;GASG;AACH,8BAAsB,uBAAuB,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,CAAC,CAAC;IAC3E;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC;CAChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"postboy-execution.handler.js","sourceRoot":"","sources":["../../src/models/postboy-execution.handler.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;GASG;AACH,MAAsB,uBAAuB;CAE5C;AAFD,0DAEC"}
1
+ {"version":3,"file":"postboy-execution.handler.js","sourceRoot":"","sources":["../../src/models/postboy-execution.handler.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;GASG;AACH,MAAsB,uBAAuB;CAQ5C;AARD,0DAQC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Represents metadata associated with a Postboy message.
3
+ *
4
+ * This interface can be used to store optional metadata that provides
5
+ * additional context or tracking information for a message. It supports
6
+ * flexible extension by allowing additional properties through an index signature.
7
+ *
8
+ * Properties:
9
+ * - `correlationId` (optional): A unique identifier used to correlate
10
+ * related messages or operations across systems.
11
+ * - `causationId` (optional): The identifier of the preceding message
12
+ * or event that caused the current message to be produced.
13
+ * - `source` (optional): The origin or source of the message, such as
14
+ * a particular service or system.
15
+ * - `tags` (optional): An array of tags or labels that can be attached
16
+ * to the message for categorization, filtering, or logging purposes.
17
+ * - `[key: string]` (optional): Additional custom properties can be
18
+ * added to capture specific metadata not covered by the predefined fields.
19
+ */
20
+ export interface PostboyMessageMetadata {
21
+ correlationId?: string;
22
+ causationId?: string;
23
+ tags?: Set<string>;
24
+ [key: string]: any;
25
+ }
26
+ //# sourceMappingURL=postboy-message-metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postboy-message-metadata.d.ts","sourceRoot":"","sources":["../../src/models/postboy-message-metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,sBAAsB;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=postboy-message-metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postboy-message-metadata.js","sourceRoot":"","sources":["../../src/models/postboy-message-metadata.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export interface PostboyMessageContext {
2
+ correlationId: string;
3
+ currentMessageId: string;
4
+ parentMessageId?: string;
5
+ depth: number;
6
+ startedAt: Date;
7
+ tags?: Set<string>;
8
+ }
9
+ //# sourceMappingURL=postboy-message.context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postboy-message.context.d.ts","sourceRoot":"","sources":["../../src/models/postboy-message.context.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;IAChB,IAAI,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=postboy-message.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postboy-message.context.js","sourceRoot":"","sources":["../../src/models/postboy-message.context.ts"],"names":[],"mappings":""}
@@ -1,10 +1,39 @@
1
1
  import { Observable, Subject } from 'rxjs';
2
+ /**
3
+ * A class that manages a reactive subscription using a provided Subject and transformation pipe.
4
+ * Offers methods to interact with the subscription, such as emitting data, completing the subscription,
5
+ * and accessing the transformed observable.
6
+ *
7
+ * @template T The type of data managed by the subscription.
8
+ */
2
9
  export declare class PostboySubscription<T> {
3
10
  private subscription;
4
- private pipe;
5
- constructor(subscription: Subject<T>, pipe: (s: Subject<T>) => Observable<T>);
11
+ private readonly _subscription;
12
+ /**
13
+ * Constructs an instance of the class with a given subscription and a transformation pipe.
14
+ *
15
+ * @param {Subject<T>} subscription - The source Subject that will be transformed.
16
+ * @param {(s: Subject<T>) => Observable<T>} pipe - A function that applies a transformation to the subscription.
17
+ */
18
+ constructor(subscription: Subject<T>, pipe?: (s: Subject<T>) => Observable<T>);
19
+ /**
20
+ * Returns an observable subscription.
21
+ *
22
+ * @return {Observable<T>} An observable instance of type T.
23
+ */
6
24
  sub(): Observable<T>;
25
+ /**
26
+ * Triggers an event by emitting the provided data to all subscribers.
27
+ *
28
+ * @param {T} data - The data to emit to the subscribers.
29
+ * @return {void} - Does not return any value.
30
+ */
7
31
  fire(data: T): void;
32
+ /**
33
+ * Completes the subscription, signaling that no further values will be sent.
34
+ * This is typically used to finalize or clean up resources.
35
+ * @return {void} This method does not return any value.
36
+ */
8
37
  finish(): void;
9
38
  }
10
39
  //# sourceMappingURL=postboy-subscription.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postboy-subscription.d.ts","sourceRoot":"","sources":["../../src/models/postboy-subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE3C,qBAAa,mBAAmB,CAAC,CAAC;IAE9B,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,IAAI;gBADJ,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,EACxB,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC;IAGzC,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC;IAIpB,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI;IAInB,MAAM,IAAI,IAAI;CAGtB"}
1
+ {"version":3,"file":"postboy-subscription.d.ts","sourceRoot":"","sources":["../../src/models/postboy-subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE3C;;;;;;GAMG;AACH,qBAAa,mBAAmB,CAAC,CAAC;IAU9B,OAAO,CAAC,YAAY;IATtB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAE9C;;;;;OAKG;gBAEO,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,EAChC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC;IAKzC;;;;OAIG;IACI,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC;IAI3B;;;;;OAKG;IACI,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI;IAI1B;;;;OAIG;IACI,MAAM,IAAI,IAAI;CAGtB"}
@@ -1,17 +1,46 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PostboySubscription = void 0;
4
+ /**
5
+ * A class that manages a reactive subscription using a provided Subject and transformation pipe.
6
+ * Offers methods to interact with the subscription, such as emitting data, completing the subscription,
7
+ * and accessing the transformed observable.
8
+ *
9
+ * @template T The type of data managed by the subscription.
10
+ */
4
11
  class PostboySubscription {
12
+ /**
13
+ * Constructs an instance of the class with a given subscription and a transformation pipe.
14
+ *
15
+ * @param {Subject<T>} subscription - The source Subject that will be transformed.
16
+ * @param {(s: Subject<T>) => Observable<T>} pipe - A function that applies a transformation to the subscription.
17
+ */
5
18
  constructor(subscription, pipe) {
6
19
  this.subscription = subscription;
7
- this.pipe = pipe;
20
+ this._subscription = !!pipe ? pipe(subscription) : subscription.asObservable();
8
21
  }
22
+ /**
23
+ * Returns an observable subscription.
24
+ *
25
+ * @return {Observable<T>} An observable instance of type T.
26
+ */
9
27
  sub() {
10
- return this.pipe(this.subscription);
28
+ return this._subscription;
11
29
  }
30
+ /**
31
+ * Triggers an event by emitting the provided data to all subscribers.
32
+ *
33
+ * @param {T} data - The data to emit to the subscribers.
34
+ * @return {void} - Does not return any value.
35
+ */
12
36
  fire(data) {
13
37
  this.subscription.next(data);
14
38
  }
39
+ /**
40
+ * Completes the subscription, signaling that no further values will be sent.
41
+ * This is typically used to finalize or clean up resources.
42
+ * @return {void} This method does not return any value.
43
+ */
15
44
  finish() {
16
45
  this.subscription.complete();
17
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"postboy-subscription.js","sourceRoot":"","sources":["../../src/models/postboy-subscription.ts"],"names":[],"mappings":";;;AAEA,MAAa,mBAAmB;IAC9B,YACU,YAAwB,EACxB,IAAsC;QADtC,iBAAY,GAAZ,YAAY,CAAY;QACxB,SAAI,GAAJ,IAAI,CAAkC;IAC7C,CAAC;IAEG,GAAG;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACtC,CAAC;IAEM,IAAI,CAAC,IAAO;QACjB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAEM,MAAM;QACX,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;IAC/B,CAAC;CACF;AAjBD,kDAiBC"}
1
+ {"version":3,"file":"postboy-subscription.js","sourceRoot":"","sources":["../../src/models/postboy-subscription.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACH,MAAa,mBAAmB;IAG9B;;;;;OAKG;IACH,YACU,YAAwB,EAChC,IAAuC;QAD/B,iBAAY,GAAZ,YAAY,CAAY;QAGhC,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;IACjF,CAAC;IAED;;;;OAIG;IACI,GAAG;QACR,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED;;;;;OAKG;IACI,IAAI,CAAC,IAAO;QACjB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACI,MAAM;QACX,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;IAC/B,CAAC;CACF;AA3CD,kDA2CC"}
@@ -1,4 +1,7 @@
1
+ import { PostboyMessageMetadata } from './postboy-message-metadata';
1
2
  export declare abstract class PostboyMessage {
3
+ metadata: PostboyMessageMetadata;
2
4
  get id(): string;
5
+ setMetadata(metadata: Partial<PostboyMessageMetadata>): this;
3
6
  }
4
7
  //# sourceMappingURL=postboy.message.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postboy.message.d.ts","sourceRoot":"","sources":["../../src/models/postboy.message.ts"],"names":[],"mappings":"AAAA,8BAAsB,cAAc;IAClC,IAAW,EAAE,IAAI,MAAM,CAEtB;CACF"}
1
+ {"version":3,"file":"postboy.message.d.ts","sourceRoot":"","sources":["../../src/models/postboy.message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,8BAAsB,cAAc;IAC3B,QAAQ,EAAE,sBAAsB,CAAM;IAC7C,IAAW,EAAE,IAAI,MAAM,CAEtB;IAED,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAAG,IAAI;CAI7D"}
@@ -2,9 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PostboyMessage = void 0;
4
4
  class PostboyMessage {
5
+ constructor() {
6
+ this.metadata = {};
7
+ }
5
8
  get id() {
6
9
  return this.constructor.ID;
7
10
  }
11
+ setMetadata(metadata) {
12
+ this.metadata = { ...this.metadata, ...metadata };
13
+ return this;
14
+ }
8
15
  }
9
16
  exports.PostboyMessage = PostboyMessage;
10
17
  //# sourceMappingURL=postboy.message.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"postboy.message.js","sourceRoot":"","sources":["../../src/models/postboy.message.ts"],"names":[],"mappings":";;;AAAA,MAAsB,cAAc;IAClC,IAAW,EAAE;QACX,OAAQ,IAAI,CAAC,WAAmB,CAAC,EAAE,CAAC;IACtC,CAAC;CACF;AAJD,wCAIC"}
1
+ {"version":3,"file":"postboy.message.js","sourceRoot":"","sources":["../../src/models/postboy.message.ts"],"names":[],"mappings":";;;AAEA,MAAsB,cAAc;IAApC;QACS,aAAQ,GAA2B,EAAE,CAAC;IAS/C,CAAC;IARC,IAAW,EAAE;QACX,OAAQ,IAAI,CAAC,WAAmB,CAAC,EAAE,CAAC;IACtC,CAAC;IAED,WAAW,CAAC,QAAyC;QACnD,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;QAClD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAVD,wCAUC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Represents configurable settings for the Postboy system.
3
+ */
4
+ export declare class PostboySettings {
5
+ metadata: boolean;
6
+ /**
7
+ * Constructs an instance of the class with optional settings.
8
+ *
9
+ * @param {Partial<PostboySettings>} [settings] - Optional settings to configure the instance. Can include partial metadata or other configurations.
10
+ */
11
+ constructor(settings?: Partial<PostboySettings>);
12
+ }
13
+ //# sourceMappingURL=postboy.settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postboy.settings.d.ts","sourceRoot":"","sources":["../../src/models/postboy.settings.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,eAAe;IACnB,QAAQ,EAAE,OAAO,CAAS;IAEjC;;;;OAIG;gBACS,QAAQ,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;CAGhD"}