@artstesh/postboy 3.3.0 → 3.4.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.
- package/lib/index.cjs +2 -0
- package/lib/index.cjs.map +1 -0
- package/lib/index.d.mts +701 -0
- package/lib/index.d.ts +701 -13
- package/lib/index.mjs +2 -0
- package/lib/index.mjs.map +1 -0
- package/package.json +52 -19
- package/lib/i-postboy-depending.service.d.ts +0 -5
- package/lib/i-postboy-depending.service.d.ts.map +0 -1
- package/lib/i-postboy-depending.service.js +0 -3
- package/lib/i-postboy-depending.service.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -32
- package/lib/index.js.map +0 -1
- package/lib/locker.store.d.ts +0 -9
- package/lib/locker.store.d.ts.map +0 -1
- package/lib/locker.store.js +0 -27
- package/lib/locker.store.js.map +0 -1
- package/lib/messages/add-middleware.executor.d.ts +0 -19
- package/lib/messages/add-middleware.executor.d.ts.map +0 -1
- package/lib/messages/add-middleware.executor.js +0 -24
- package/lib/messages/add-middleware.executor.js.map +0 -1
- package/lib/messages/add-namespace.executor.d.ts +0 -19
- package/lib/messages/add-namespace.executor.d.ts.map +0 -1
- package/lib/messages/add-namespace.executor.js +0 -24
- package/lib/messages/add-namespace.executor.js.map +0 -1
- package/lib/messages/connect-executor.executor.d.ts +0 -25
- package/lib/messages/connect-executor.executor.d.ts.map +0 -1
- package/lib/messages/connect-executor.executor.js +0 -30
- package/lib/messages/connect-executor.executor.js.map +0 -1
- package/lib/messages/connect-handler.executor.d.ts +0 -25
- package/lib/messages/connect-handler.executor.d.ts.map +0 -1
- package/lib/messages/connect-handler.executor.js +0 -30
- package/lib/messages/connect-handler.executor.js.map +0 -1
- package/lib/messages/connect-message.executor.d.ts +0 -28
- package/lib/messages/connect-message.executor.d.ts.map +0 -1
- package/lib/messages/connect-message.executor.js +0 -31
- package/lib/messages/connect-message.executor.js.map +0 -1
- package/lib/messages/connect.message.executor.d.ts +0 -28
- package/lib/messages/connect.message.executor.d.ts.map +0 -1
- package/lib/messages/connect.message.executor.js +0 -31
- package/lib/messages/connect.message.executor.js.map +0 -1
- package/lib/messages/disconnect-message.executor.d.ts +0 -19
- package/lib/messages/disconnect-message.executor.d.ts.map +0 -1
- package/lib/messages/disconnect-message.executor.js +0 -25
- package/lib/messages/disconnect-message.executor.js.map +0 -1
- package/lib/messages/eliminate-namespace.executor.d.ts +0 -16
- package/lib/messages/eliminate-namespace.executor.d.ts.map +0 -1
- package/lib/messages/eliminate-namespace.executor.js +0 -22
- package/lib/messages/eliminate-namespace.executor.js.map +0 -1
- package/lib/messages/index.d.ts +0 -11
- package/lib/messages/index.d.ts.map +0 -1
- package/lib/messages/index.js +0 -24
- package/lib/messages/index.js.map +0 -1
- package/lib/messages/lock-message.executor.d.ts +0 -22
- package/lib/messages/lock-message.executor.d.ts.map +0 -1
- package/lib/messages/lock-message.executor.js +0 -26
- package/lib/messages/lock-message.executor.js.map +0 -1
- package/lib/messages/remove-middleware.executor.d.ts +0 -17
- package/lib/messages/remove-middleware.executor.d.ts.map +0 -1
- package/lib/messages/remove-middleware.executor.js +0 -22
- package/lib/messages/remove-middleware.executor.js.map +0 -1
- package/lib/messages/unlock-message.executor.d.ts +0 -21
- package/lib/messages/unlock-message.executor.d.ts.map +0 -1
- package/lib/messages/unlock-message.executor.js +0 -25
- package/lib/messages/unlock-message.executor.js.map +0 -1
- package/lib/mocks/message-history-item-mock.d.ts +0 -10
- package/lib/mocks/message-history-item-mock.d.ts.map +0 -1
- package/lib/mocks/message-history-item-mock.js +0 -26
- package/lib/mocks/message-history-item-mock.js.map +0 -1
- package/lib/mocks/message-history-mock.d.ts +0 -9
- package/lib/mocks/message-history-mock.d.ts.map +0 -1
- package/lib/mocks/message-history-mock.js +0 -23
- package/lib/mocks/message-history-mock.js.map +0 -1
- package/lib/mocks/postboy-service-mock.d.ts +0 -22
- package/lib/mocks/postboy-service-mock.d.ts.map +0 -1
- package/lib/mocks/postboy-service-mock.js +0 -51
- package/lib/mocks/postboy-service-mock.js.map +0 -1
- package/lib/models/message-queue.model.d.ts +0 -44
- package/lib/models/message-queue.model.d.ts.map +0 -1
- package/lib/models/message-queue.model.js +0 -66
- package/lib/models/postboy-callback.message.d.ts +0 -48
- package/lib/models/postboy-callback.message.d.ts.map +0 -1
- package/lib/models/postboy-callback.message.js +0 -60
- package/lib/models/postboy-callback.message.js.map +0 -1
- package/lib/models/postboy-execution.handler.d.ts +0 -21
- package/lib/models/postboy-execution.handler.d.ts.map +0 -1
- package/lib/models/postboy-execution.handler.js +0 -17
- package/lib/models/postboy-execution.handler.js.map +0 -1
- package/lib/models/postboy-executor.d.ts +0 -5
- package/lib/models/postboy-executor.d.ts.map +0 -1
- package/lib/models/postboy-executor.js +0 -8
- package/lib/models/postboy-executor.js.map +0 -1
- package/lib/models/postboy-generic-message.d.ts +0 -8
- package/lib/models/postboy-generic-message.d.ts.map +0 -1
- package/lib/models/postboy-generic-message.js +0 -17
- package/lib/models/postboy-generic-message.js.map +0 -1
- package/lib/models/postboy-message-metadata.d.ts +0 -26
- package/lib/models/postboy-message-metadata.d.ts.map +0 -1
- package/lib/models/postboy-message-metadata.js +0 -3
- package/lib/models/postboy-message-metadata.js.map +0 -1
- package/lib/models/postboy-message.context.d.ts +0 -9
- package/lib/models/postboy-message.context.d.ts.map +0 -1
- package/lib/models/postboy-message.context.js +0 -3
- package/lib/models/postboy-message.context.js.map +0 -1
- package/lib/models/postboy-middleware.d.ts +0 -5
- package/lib/models/postboy-middleware.d.ts.map +0 -1
- package/lib/models/postboy-middleware.js +0 -3
- package/lib/models/postboy-middleware.js.map +0 -1
- package/lib/models/postboy-subscription.d.ts +0 -39
- package/lib/models/postboy-subscription.d.ts.map +0 -1
- package/lib/models/postboy-subscription.js +0 -49
- package/lib/models/postboy-subscription.js.map +0 -1
- package/lib/models/postboy.locker.d.ts +0 -6
- package/lib/models/postboy.locker.d.ts.map +0 -1
- package/lib/models/postboy.locker.js +0 -3
- package/lib/models/postboy.locker.js.map +0 -1
- package/lib/models/postboy.message.d.ts +0 -7
- package/lib/models/postboy.message.d.ts.map +0 -1
- package/lib/models/postboy.message.js +0 -17
- package/lib/models/postboy.message.js.map +0 -1
- package/lib/models/postboy.settings.d.ts +0 -13
- package/lib/models/postboy.settings.d.ts.map +0 -1
- package/lib/models/postboy.settings.js +0 -20
- package/lib/models/postboy.settings.js.map +0 -1
- package/lib/postboy-abstract.registrator.d.ts +0 -97
- package/lib/postboy-abstract.registrator.d.ts.map +0 -1
- package/lib/postboy-abstract.registrator.js +0 -138
- package/lib/postboy-abstract.registrator.js.map +0 -1
- package/lib/postboy.service.d.ts +0 -157
- package/lib/postboy.service.d.ts.map +0 -1
- package/lib/postboy.service.js +0 -235
- package/lib/postboy.service.js.map +0 -1
- package/lib/services/namespace-registrator.d.ts +0 -14
- package/lib/services/namespace-registrator.d.ts.map +0 -1
- package/lib/services/namespace-registrator.js +0 -21
- package/lib/services/namespace-registrator.js.map +0 -1
- package/lib/services/postboy-context.service.d.ts +0 -13
- package/lib/services/postboy-context.service.d.ts.map +0 -1
- package/lib/services/postboy-context.service.js +0 -50
- package/lib/services/postboy-context.service.js.map +0 -1
- package/lib/services/postboy-dependency.resolver.d.ts +0 -32
- package/lib/services/postboy-dependency.resolver.d.ts.map +0 -1
- package/lib/services/postboy-dependency.resolver.js +0 -38
- package/lib/services/postboy-dependency.resolver.js.map +0 -1
- package/lib/services/postboy-message.store.d.ts +0 -20
- package/lib/services/postboy-message.store.d.ts.map +0 -1
- package/lib/services/postboy-message.store.js +0 -61
- package/lib/services/postboy-message.store.js.map +0 -1
- package/lib/services/postboy-middleware.service.d.ts +0 -37
- package/lib/services/postboy-middleware.service.d.ts.map +0 -1
- package/lib/services/postboy-middleware.service.js +0 -50
- package/lib/services/postboy-middleware.service.js.map +0 -1
- package/lib/services/postboy-namespace.store.d.ts +0 -34
- package/lib/services/postboy-namespace.store.d.ts.map +0 -1
- package/lib/services/postboy-namespace.store.js +0 -54
- package/lib/services/postboy-namespace.store.js.map +0 -1
- package/lib/tests/integration/models/test-callback-message.d.ts +0 -6
- package/lib/tests/integration/models/test-callback-message.d.ts.map +0 -1
- package/lib/tests/integration/models/test-callback-message.js +0 -13
- package/lib/tests/integration/models/test-callback-message.js.map +0 -1
- package/lib/tests/integration/models/test-executor.d.ts +0 -7
- package/lib/tests/integration/models/test-executor.d.ts.map +0 -1
- package/lib/tests/integration/models/test-executor.js +0 -13
- package/lib/tests/integration/models/test-executor.js.map +0 -1
- package/lib/tests/integration/models/test-handler.d.ts +0 -8
- package/lib/tests/integration/models/test-handler.d.ts.map +0 -1
- package/lib/tests/integration/models/test-handler.js +0 -15
- package/lib/tests/integration/models/test-handler.js.map +0 -1
- package/lib/tests/integration/models/test-message.d.ts +0 -6
- package/lib/tests/integration/models/test-message.d.ts.map +0 -1
- package/lib/tests/integration/models/test-message.js +0 -13
- package/lib/tests/integration/models/test-message.js.map +0 -1
- package/lib/tests/integration/models/test-postboy.d.ts +0 -4
- package/lib/tests/integration/models/test-postboy.d.ts.map +0 -1
- package/lib/tests/integration/models/test-postboy.js +0 -8
- package/lib/tests/integration/models/test-postboy.js.map +0 -1
- package/lib/tests/integration/models/test-registry.d.ts +0 -8
- package/lib/tests/integration/models/test-registry.d.ts.map +0 -1
- package/lib/tests/integration/models/test-registry.js +0 -15
- package/lib/tests/integration/models/test-registry.js.map +0 -1
- package/lib/utils/id.generator.d.ts +0 -5
- package/lib/utils/id.generator.d.ts.map +0 -1
- package/lib/utils/id.generator.js +0 -18
- package/lib/utils/id.generator.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-service-mock.js","sourceRoot":"","sources":["../../src/mocks/postboy-service-mock.ts"],"names":[],"mappings":";;;AAAA,wDAAoD;AAGpD,+EAAmF;AAEnF,iEAA4D;AAI5D,MAAa,kBAAmB,SAAQ,gCAAc;IAAtD;;QACU,kBAAa,GAAa,EAAE,CAAC;QAC7B,aAAQ,GAAG,IAAI,yCAAkB,EAAE,CAAC;QAgBpC,UAAK,GAAG,CAAC,UAAoB,EAAE,EAAU,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;IA8BlG,CAAC;IA5CC,KAAK;QACH,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QACxB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,EAAU,EAAE,QAAgB,CAAC;;QACjC,OAAO,CAAA,MAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,0CAAE,MAAM,MAAK,KAAK,CAAC;IACjD,CAAC;IAED,UAAU,CAAC,EAAU,EAAE,QAAgB,CAAC;QACtC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;QACjD,OAAO,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,IAAI,KAAK,KAAK,KAAK,CAAC,CAAC;IAChD,CAAC;IAID,IAAI,CAAkC,QAAW;QAC/C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,CAAI,EAAU;QACrB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC;IAEM,GAAG,CAAkC,IAAoB;QAC9D,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAA,iCAAO,EAAC,IAAI,CAAC,CAAC,CAAC;QACvC,OAAO,KAAK,CAAC,SAAS,CAAC,IAAA,iCAAO,EAAC,IAAI,CAAC,CAAC,CAAC;IACxC,CAAC;IAED,IAAI,CAAkC,OAAU;QAC9C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC;IAED,YAAY,CAAI,OAAkC,EAAE,MAAuB;QACzE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3B,OAAO,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,CAAkC,IAAoB;QAC3D,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAA,iCAAO,EAAC,IAAI,CAAC,CAAC,CAAC;IAC1C,CAAC;CACF;AAhDD,gDAgDC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { PostboyCallbackMessage } from './postboy-callback.message';
|
|
2
|
-
export declare class MessageQueue<D> {
|
|
3
|
-
private cache;
|
|
4
|
-
/**
|
|
5
|
-
* Gets the current data stored in the instance.
|
|
6
|
-
*
|
|
7
|
-
* @return {D | null} The current data or null if no data is set.
|
|
8
|
-
*/
|
|
9
|
-
get data(): D | null;
|
|
10
|
-
private queries;
|
|
11
|
-
private _requestInProgress;
|
|
12
|
-
private _data;
|
|
13
|
-
constructor(cache?: boolean);
|
|
14
|
-
/**
|
|
15
|
-
* Resets the state of the instance by clearing stored data.
|
|
16
|
-
* This method sets the internal data to null, effectively resetting the object.
|
|
17
|
-
*
|
|
18
|
-
* @return {void} Does not return a value.
|
|
19
|
-
*/
|
|
20
|
-
reset(): MessageQueue<D>;
|
|
21
|
-
/**
|
|
22
|
-
* Attempts to finalize the provided query. It either queues the query for later processing
|
|
23
|
-
* if a request is in progress or data is missing, or completes the query immediately.
|
|
24
|
-
*
|
|
25
|
-
* @param {PostboyCallbackMessage<D>} query - The callback message to be finalized.
|
|
26
|
-
* @return {boolean} - Returns true if the query was successfully finalized, otherwise false.
|
|
27
|
-
*/
|
|
28
|
-
tryFinish(query: PostboyCallbackMessage<D>): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Adds a new query to the query queue.
|
|
31
|
-
*
|
|
32
|
-
* @param {PostboyCallbackMessage<D>} query - The query to be added to the queue.
|
|
33
|
-
* @return {MessageQueue<D>} The updated QueryQueue instance.
|
|
34
|
-
*/
|
|
35
|
-
add(query: PostboyCallbackMessage<D>): MessageQueue<D>;
|
|
36
|
-
/**
|
|
37
|
-
* Marks the operation as finished by updating the internal state and handling each query.
|
|
38
|
-
*
|
|
39
|
-
* @param {D} data - The data to be set for the current operation.
|
|
40
|
-
* @return {void} This method does not return a value.
|
|
41
|
-
*/
|
|
42
|
-
finish(data: D): void;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=message-queue.model.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message-queue.model.d.ts","sourceRoot":"","sources":["../../src/models/message-queue.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,qBAAa,YAAY,CAAC,CAAC;IAcb,OAAO,CAAC,KAAK;IAbzB;;;;OAIG;IACH,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,CAEnB;IAED,OAAO,CAAC,OAAO,CAA4E;IAC3F,OAAO,CAAC,kBAAkB,CAAiB;IAC3C,OAAO,CAAC,KAAK,CAAkB;gBAEX,KAAK,GAAE,OAAc;IAEzC;;;;;OAKG;IACI,KAAK,IAAI,YAAY,CAAC,CAAC,CAAC;IAK/B;;;;;;OAMG;IACI,SAAS,CAAC,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,OAAO;IAM3D;;;;;OAKG;IACI,GAAG,CAAC,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC;IAI7D;;;;;OAKG;IACI,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI;CAK7B"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MessageQueue = void 0;
|
|
4
|
-
const collections_1 = require("@artstesh/collections");
|
|
5
|
-
class MessageQueue {
|
|
6
|
-
/**
|
|
7
|
-
* Gets the current data stored in the instance.
|
|
8
|
-
*
|
|
9
|
-
* @return {D | null} The current data or null if no data is set.
|
|
10
|
-
*/
|
|
11
|
-
get data() {
|
|
12
|
-
return this._data;
|
|
13
|
-
}
|
|
14
|
-
constructor(cache = true) {
|
|
15
|
-
this.cache = cache;
|
|
16
|
-
this.queries = new collections_1.Queue();
|
|
17
|
-
this._requestInProgress = true;
|
|
18
|
-
this._data = null;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Resets the state of the instance by clearing stored data.
|
|
22
|
-
* This method sets the internal data to null, effectively resetting the object.
|
|
23
|
-
*
|
|
24
|
-
* @return {void} Does not return a value.
|
|
25
|
-
*/
|
|
26
|
-
reset() {
|
|
27
|
-
this._data = null;
|
|
28
|
-
return this;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Attempts to finalize the provided query. It either queues the query for later processing
|
|
32
|
-
* if a request is in progress or data is missing, or completes the query immediately.
|
|
33
|
-
*
|
|
34
|
-
* @param {PostboyCallbackMessage<D>} query - The callback message to be finalized.
|
|
35
|
-
* @return {boolean} - Returns true if the query was successfully finalized, otherwise false.
|
|
36
|
-
*/
|
|
37
|
-
tryFinish(query) {
|
|
38
|
-
if (this._requestInProgress || this._data === null)
|
|
39
|
-
return this.queries.put(query) && false;
|
|
40
|
-
query.finish(this._data);
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Adds a new query to the query queue.
|
|
45
|
-
*
|
|
46
|
-
* @param {PostboyCallbackMessage<D>} query - The query to be added to the queue.
|
|
47
|
-
* @return {MessageQueue<D>} The updated QueryQueue instance.
|
|
48
|
-
*/
|
|
49
|
-
add(query) {
|
|
50
|
-
return this.queries.put(query) && this;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Marks the operation as finished by updating the internal state and handling each query.
|
|
54
|
-
*
|
|
55
|
-
* @param {D} data - The data to be set for the current operation.
|
|
56
|
-
* @return {void} This method does not return a value.
|
|
57
|
-
*/
|
|
58
|
-
finish(data) {
|
|
59
|
-
if (this.cache)
|
|
60
|
-
this._data = data;
|
|
61
|
-
this._requestInProgress = false;
|
|
62
|
-
this.queries.each((q) => q.finish(data));
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
exports.MessageQueue = MessageQueue;
|
|
66
|
-
//# sourceMappingURL=message-queue.model.js.map
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Observable, Subject } from 'rxjs';
|
|
2
|
-
import { PostboyGenericMessage } from './postboy-generic-message';
|
|
3
|
-
/**
|
|
4
|
-
* An abstract class extending PostboyGenericMessage that provides mechanisms for managing
|
|
5
|
-
* asynchronous data communication using RxJS observables. It is designed to work with
|
|
6
|
-
* callback-based operations that emit a result of type T.
|
|
7
|
-
*
|
|
8
|
-
* @template T - The type of the data emitted by the observables in this class.
|
|
9
|
-
*
|
|
10
|
-
* @extends PostboyGenericMessage
|
|
11
|
-
*
|
|
12
|
-
* @property {Observable<T>} result - An observable that emits the result of the operation
|
|
13
|
-
* and completes once the operation is finished.
|
|
14
|
-
*
|
|
15
|
-
* @method next - Emits the next value for the result observable.
|
|
16
|
-
* @param {T} value - The value to be emitted by the result observable.
|
|
17
|
-
*
|
|
18
|
-
* @method finish - Emits the final value for the result observable and completes it.
|
|
19
|
-
* @param {T} value - The final value for the observable emission.
|
|
20
|
-
*/
|
|
21
|
-
export declare abstract class PostboyCallbackMessage<T> extends PostboyGenericMessage {
|
|
22
|
-
protected result$: Subject<T>;
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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;
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=postboy-callback.message.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,GAAI,OAAO,CAAC,KAAG,IAAI,CAA6B;IAE3D;;;;;OAKG;IACI,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAK7B;;;;;;OAMG;IACI,QAAQ,IAAI,IAAI;CAGxB"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PostboyCallbackMessage = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const postboy_generic_message_1 = require("./postboy-generic-message");
|
|
6
|
-
/**
|
|
7
|
-
* An abstract class extending PostboyGenericMessage that provides mechanisms for managing
|
|
8
|
-
* asynchronous data communication using RxJS observables. It is designed to work with
|
|
9
|
-
* callback-based operations that emit a result of type T.
|
|
10
|
-
*
|
|
11
|
-
* @template T - The type of the data emitted by the observables in this class.
|
|
12
|
-
*
|
|
13
|
-
* @extends PostboyGenericMessage
|
|
14
|
-
*
|
|
15
|
-
* @property {Observable<T>} result - An observable that emits the result of the operation
|
|
16
|
-
* and completes once the operation is finished.
|
|
17
|
-
*
|
|
18
|
-
* @method next - Emits the next value for the result observable.
|
|
19
|
-
* @param {T} value - The value to be emitted by the result observable.
|
|
20
|
-
*
|
|
21
|
-
* @method finish - Emits the final value for the result observable and completes it.
|
|
22
|
-
* @param {T} value - The final value for the observable emission.
|
|
23
|
-
*/
|
|
24
|
-
class PostboyCallbackMessage extends postboy_generic_message_1.PostboyGenericMessage {
|
|
25
|
-
constructor() {
|
|
26
|
-
super(...arguments);
|
|
27
|
-
this.result$ = new rxjs_1.Subject();
|
|
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
|
-
*/
|
|
36
|
-
this.next = (value) => this.result$.next(value);
|
|
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
|
-
*/
|
|
44
|
-
finish(value) {
|
|
45
|
-
this.result$.next(value);
|
|
46
|
-
this.result$.complete();
|
|
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
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.PostboyCallbackMessage = PostboyCallbackMessage;
|
|
60
|
-
//# sourceMappingURL=postboy-callback.message.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { PostboyExecutor } from './postboy-executor';
|
|
2
|
-
/**
|
|
3
|
-
* Abstract class representing a handler for executing a Postboy task.
|
|
4
|
-
*
|
|
5
|
-
* This class is intended to manage the execution flow of a PostboyExecutor instance.
|
|
6
|
-
* Subclasses must implement the `handle` method, which executes a given PostboyExecutor
|
|
7
|
-
* and returns a result of type R.
|
|
8
|
-
*
|
|
9
|
-
* @template R The type of the result returned by the `handle` method.
|
|
10
|
-
* @template E The type of the executor extending the PostboyExecutor.
|
|
11
|
-
*/
|
|
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
|
-
*/
|
|
19
|
-
abstract handle(executor: E): R;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=postboy-execution.handler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PostboyExecutionHandler = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Abstract class representing a handler for executing a Postboy task.
|
|
6
|
-
*
|
|
7
|
-
* This class is intended to manage the execution flow of a PostboyExecutor instance.
|
|
8
|
-
* Subclasses must implement the `handle` method, which executes a given PostboyExecutor
|
|
9
|
-
* and returns a result of type R.
|
|
10
|
-
*
|
|
11
|
-
* @template R The type of the result returned by the `handle` method.
|
|
12
|
-
* @template E The type of the executor extending the PostboyExecutor.
|
|
13
|
-
*/
|
|
14
|
-
class PostboyExecutionHandler {
|
|
15
|
-
}
|
|
16
|
-
exports.PostboyExecutionHandler = PostboyExecutionHandler;
|
|
17
|
-
//# sourceMappingURL=postboy-execution.handler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-executor.d.ts","sourceRoot":"","sources":["../../src/models/postboy-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,8BAAsB,eAAe,CAAC,CAAC,CAAE,SAAQ,cAAc;IAC7D,mBAA2B,kBAAkB,CAAC,EAAE,CAAC,CAAC;CACnD"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PostboyExecutor = void 0;
|
|
4
|
-
const postboy_message_1 = require("./postboy.message");
|
|
5
|
-
class PostboyExecutor extends postboy_message_1.PostboyMessage {
|
|
6
|
-
}
|
|
7
|
-
exports.PostboyExecutor = PostboyExecutor;
|
|
8
|
-
//# sourceMappingURL=postboy-executor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-executor.js","sourceRoot":"","sources":["../../src/models/postboy-executor.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AAEnD,MAAsB,eAAmB,SAAQ,gCAAc;CAE9D;AAFD,0CAEC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PostboyMessage } from './postboy.message';
|
|
2
|
-
/**
|
|
3
|
-
* An inheritor should have a static ID field
|
|
4
|
-
*/
|
|
5
|
-
export declare abstract class PostboyGenericMessage extends PostboyMessage {
|
|
6
|
-
}
|
|
7
|
-
export declare function checkId(message: new (...args: any[]) => any): string;
|
|
8
|
-
//# sourceMappingURL=postboy-generic-message.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-generic-message.d.ts","sourceRoot":"","sources":["../../src/models/postboy-generic-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,8BAAsB,qBAAsB,SAAQ,cAAc;CAAG;AACrE,wBAAgB,OAAO,CAAC,OAAO,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,MAAM,CAGpE"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PostboyGenericMessage = void 0;
|
|
4
|
-
exports.checkId = checkId;
|
|
5
|
-
const postboy_message_1 = require("./postboy.message");
|
|
6
|
-
/**
|
|
7
|
-
* An inheritor should have a static ID field
|
|
8
|
-
*/
|
|
9
|
-
class PostboyGenericMessage extends postboy_message_1.PostboyMessage {
|
|
10
|
-
}
|
|
11
|
-
exports.PostboyGenericMessage = PostboyGenericMessage;
|
|
12
|
-
function checkId(message) {
|
|
13
|
-
if (!message.ID)
|
|
14
|
-
throw new Error(`${message.name} should have a static ID field`);
|
|
15
|
-
return message.ID;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=postboy-generic-message.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-generic-message.js","sourceRoot":"","sources":["../../src/models/postboy-generic-message.ts"],"names":[],"mappings":";;;AAMA,0BAGC;AATD,uDAAmD;AAEnD;;GAEG;AACH,MAAsB,qBAAsB,SAAQ,gCAAc;CAAG;AAArE,sDAAqE;AACrE,SAAgB,OAAO,CAAC,OAAoC;IAC1D,IAAI,CAAE,OAAe,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC3F,OAAQ,OAAe,CAAC,EAAE,CAAC;AAC7B,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-message-metadata.js","sourceRoot":"","sources":["../../src/models/postboy-message-metadata.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-message.context.js","sourceRoot":"","sources":["../../src/models/postboy-message.context.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-middleware.d.ts","sourceRoot":"","sources":["../../src/models/postboy-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;CACvC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-middleware.js","sourceRoot":"","sources":["../../src/models/postboy-middleware.ts"],"names":[],"mappings":""}
|
|
@@ -1,39 +0,0 @@
|
|
|
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
|
-
*/
|
|
9
|
-
export declare class PostboySubscription<T> {
|
|
10
|
-
private subscription;
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
37
|
-
finish(): void;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=postboy-subscription.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
18
|
-
constructor(subscription, pipe) {
|
|
19
|
-
this.subscription = subscription;
|
|
20
|
-
this._subscription = !!pipe ? pipe(subscription) : subscription.asObservable();
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Returns an observable subscription.
|
|
24
|
-
*
|
|
25
|
-
* @return {Observable<T>} An observable instance of type T.
|
|
26
|
-
*/
|
|
27
|
-
sub() {
|
|
28
|
-
return this._subscription;
|
|
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
|
-
*/
|
|
36
|
-
fire(data) {
|
|
37
|
-
this.subscription.next(data);
|
|
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
|
-
*/
|
|
44
|
-
finish() {
|
|
45
|
-
this.subscription.complete();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.PostboySubscription = PostboySubscription;
|
|
49
|
-
//# sourceMappingURL=postboy-subscription.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postboy.locker.d.ts","sourceRoot":"","sources":["../../src/models/postboy.locker.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postboy.locker.js","sourceRoot":"","sources":["../../src/models/postboy.locker.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PostboyMessageMetadata } from './postboy-message-metadata';
|
|
2
|
-
export declare abstract class PostboyMessage {
|
|
3
|
-
metadata: PostboyMessageMetadata;
|
|
4
|
-
get id(): string;
|
|
5
|
-
setMetadata(metadata: Partial<PostboyMessageMetadata>): this;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=postboy.message.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PostboyMessage = void 0;
|
|
4
|
-
class PostboyMessage {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.metadata = {};
|
|
7
|
-
}
|
|
8
|
-
get id() {
|
|
9
|
-
return this.constructor.ID;
|
|
10
|
-
}
|
|
11
|
-
setMetadata(metadata) {
|
|
12
|
-
this.metadata = { ...this.metadata, ...metadata };
|
|
13
|
-
return this;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.PostboyMessage = PostboyMessage;
|
|
17
|
-
//# sourceMappingURL=postboy.message.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PostboySettings = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Represents configurable settings for the Postboy system.
|
|
6
|
-
*/
|
|
7
|
-
class PostboySettings {
|
|
8
|
-
/**
|
|
9
|
-
* Constructs an instance of the class with optional settings.
|
|
10
|
-
*
|
|
11
|
-
* @param {Partial<PostboySettings>} [settings] - Optional settings to configure the instance. Can include partial metadata or other configurations.
|
|
12
|
-
*/
|
|
13
|
-
constructor(settings) {
|
|
14
|
-
var _a;
|
|
15
|
-
this.metadata = false;
|
|
16
|
-
this.metadata = (_a = settings === null || settings === void 0 ? void 0 : settings.metadata) !== null && _a !== void 0 ? _a : this.metadata;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.PostboySettings = PostboySettings;
|
|
20
|
-
//# sourceMappingURL=postboy.settings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postboy.settings.js","sourceRoot":"","sources":["../../src/models/postboy.settings.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,eAAe;IAG1B;;;;OAIG;IACH,YAAY,QAAmC;;QAPxC,aAAQ,GAAY,KAAK,CAAC;QAQ/B,IAAI,CAAC,QAAQ,GAAG,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,QAAQ,mCAAI,IAAI,CAAC,QAAQ,CAAC;IACtD,CAAC;CACF;AAXD,0CAWC"}
|