@signageos/lib 23.9.1 → 23.9.2
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/README.md +2 -2
- package/dist/AMQP/CQRS/ICommand.d.ts +3 -36
- package/dist/AMQP/CQRS/ICommand.js +18 -0
- package/dist/AMQP/CQRS/ICommand.js.map +1 -1
- package/dist/AMQP/CQRS/ICommandError.d.ts +4 -4
- package/dist/AMQP/CQRS/commandQueue.d.ts +4 -59
- package/dist/AMQP/CQRS/commandQueue.js +16 -308
- package/dist/AMQP/CQRS/commandQueue.js.map +1 -1
- package/dist/AMQP/CQRS/commandResponseHelper.d.ts +4 -3
- package/dist/AMQP/CQRS/commandResponseHelper.js +18 -5
- package/dist/AMQP/CQRS/commandResponseHelper.js.map +1 -1
- package/dist/AMQP/CQRS/storedCommandQueue.d.ts +4 -27
- package/dist/AMQP/CQRS/storedCommandQueue.js +16 -296
- package/dist/AMQP/CQRS/storedCommandQueue.js.map +1 -1
- package/dist/AMQP/ChannelProvider.d.ts +5 -37
- package/dist/AMQP/ChannelProvider.js +9 -868
- package/dist/AMQP/ChannelProvider.js.map +1 -1
- package/dist/AMQP/DeviceActions/Bridge/deviceActionBridgeFactory.d.ts +4 -39
- package/dist/AMQP/DeviceActions/Bridge/deviceActionBridgeFactory.js +16 -287
- package/dist/AMQP/DeviceActions/Bridge/deviceActionBridgeFactory.js.map +1 -1
- package/dist/AMQP/DeviceActions/IDeviceAction.d.ts +4 -4
- package/dist/AMQP/DeviceActions/deviceActionsQueue.d.ts +2 -81
- package/dist/AMQP/DeviceActions/deviceActionsQueue.js +14 -531
- package/dist/AMQP/DeviceActions/deviceActionsQueue.js.map +1 -1
- package/dist/AMQP/EventSourcing/EventConsumer/AmqpEventConsumer.d.ts +2 -45
- package/dist/AMQP/EventSourcing/EventConsumer/AmqpEventConsumer.js +14 -211
- package/dist/AMQP/EventSourcing/EventConsumer/AmqpEventConsumer.js.map +1 -1
- package/dist/AMQP/EventSourcing/EventConsumer/IEventConsumer.d.ts +2 -11
- package/dist/AMQP/EventSourcing/EventConsumer/IEventConsumer.js +18 -0
- package/dist/AMQP/EventSourcing/EventConsumer/IEventConsumer.js.map +1 -1
- package/dist/AMQP/EventSourcing/EventConsumer/InMemoryEventConsumer.d.ts +2 -13
- package/dist/AMQP/EventSourcing/EventConsumer/InMemoryEventConsumer.js +14 -69
- package/dist/AMQP/EventSourcing/EventConsumer/InMemoryEventConsumer.js.map +1 -1
- package/dist/AMQP/EventSourcing/IEvent.d.ts +3 -70
- package/dist/AMQP/EventSourcing/IEvent.js +18 -0
- package/dist/AMQP/EventSourcing/IEvent.js.map +1 -1
- package/dist/AMQP/EventSourcing/Locked/deferredState.d.ts +2 -19
- package/dist/AMQP/EventSourcing/Locked/deferredState.js +15 -66
- package/dist/AMQP/EventSourcing/Locked/deferredState.js.map +1 -1
- package/dist/AMQP/EventSourcing/Locked/lockedEventConsumer.d.ts +2 -68
- package/dist/AMQP/EventSourcing/Locked/lockedEventConsumer.js +14 -429
- package/dist/AMQP/EventSourcing/Locked/lockedEventConsumer.js.map +1 -1
- package/dist/AMQP/EventSourcing/Locked/rejectedTimestamps.d.ts +2 -22
- package/dist/AMQP/EventSourcing/Locked/rejectedTimestamps.js +16 -59
- package/dist/AMQP/EventSourcing/Locked/rejectedTimestamps.js.map +1 -1
- package/dist/AMQP/EventSourcing/Locked/withLock.d.ts +2 -40
- package/dist/AMQP/EventSourcing/Locked/withLock.js +14 -134
- package/dist/AMQP/EventSourcing/Locked/withLock.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueue.d.ts +2 -85
- package/dist/AMQP/EventSourcing/eventQueue.js +14 -132
- package/dist/AMQP/EventSourcing/eventQueue.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueue.utils.d.ts +2 -71
- package/dist/AMQP/EventSourcing/eventQueue.utils.js +16 -152
- package/dist/AMQP/EventSourcing/eventQueue.utils.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueueDetached.d.ts +2 -47
- package/dist/AMQP/EventSourcing/eventQueueDetached.js +14 -421
- package/dist/AMQP/EventSourcing/eventQueueDetached.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueueDomain.d.ts +2 -53
- package/dist/AMQP/EventSourcing/eventQueueDomain.js +14 -611
- package/dist/AMQP/EventSourcing/eventQueueDomain.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueuePublish.d.ts +2 -17
- package/dist/AMQP/EventSourcing/eventQueuePublish.js +14 -202
- package/dist/AMQP/EventSourcing/eventQueuePublish.js.map +1 -1
- package/dist/AMQP/EventSourcing/synchronization.d.ts +2 -37
- package/dist/AMQP/EventSourcing/synchronization.js +18 -9
- package/dist/AMQP/EventSourcing/synchronization.js.map +1 -1
- package/dist/AMQP/Exchange.d.ts +4 -1
- package/dist/AMQP/Exchange.js +18 -0
- package/dist/AMQP/Exchange.js.map +1 -1
- package/dist/AMQP/IAsyncGotMessage.d.ts +2 -13
- package/dist/AMQP/IAsyncGotMessage.js +18 -0
- package/dist/AMQP/IAsyncGotMessage.js.map +1 -1
- package/dist/AMQP/IChannel.d.ts +5 -43
- package/dist/AMQP/IChannel.js +18 -0
- package/dist/AMQP/IChannel.js.map +1 -1
- package/dist/AMQP/IConsumeOptions.d.ts +5 -106
- package/dist/AMQP/IConsumeOptions.js +18 -0
- package/dist/AMQP/IConsumeOptions.js.map +1 -1
- package/dist/AMQP/IMessageOptions.d.ts +5 -6
- package/dist/AMQP/IMessageOptions.js +18 -0
- package/dist/AMQP/IMessageOptions.js.map +1 -1
- package/dist/AMQP/INackOptions.d.ts +5 -4
- package/dist/AMQP/INackOptions.js +18 -0
- package/dist/AMQP/INackOptions.js.map +1 -1
- package/dist/AMQP/IQueueOptions.d.ts +5 -8
- package/dist/AMQP/IQueueOptions.js +18 -0
- package/dist/AMQP/IQueueOptions.js.map +1 -1
- package/dist/AMQP/Logging/IDeviceLog.d.ts +4 -15
- package/dist/AMQP/Logging/IDeviceLog.js +18 -7
- package/dist/AMQP/Logging/IDeviceLog.js.map +1 -1
- package/dist/AMQP/Logging/logDeviceQueue.d.ts +4 -12
- package/dist/AMQP/Logging/logDeviceQueue.js +16 -102
- package/dist/AMQP/Logging/logDeviceQueue.js.map +1 -1
- package/dist/AMQP/QueueFetcher.d.ts +3 -11
- package/dist/AMQP/QueueFetcher.js +17 -156
- package/dist/AMQP/QueueFetcher.js.map +1 -1
- package/dist/AMQP/QueuePublisher.d.ts +5 -7
- package/dist/AMQP/QueuePublisher.js +19 -127
- package/dist/AMQP/QueuePublisher.js.map +1 -1
- package/dist/AMQP/QueueRepeatableSubscription.d.ts +5 -14
- package/dist/AMQP/QueueRepeatableSubscription.js +19 -154
- package/dist/AMQP/QueueRepeatableSubscription.js.map +1 -1
- package/dist/AMQP/QueueSubscriber.d.ts +5 -27
- package/dist/AMQP/QueueSubscriber.js +9 -303
- package/dist/AMQP/QueueSubscriber.js.map +1 -1
- package/dist/AMQP/ResponseProvider.d.ts +4 -20
- package/dist/AMQP/ResponseProvider.js +16 -188
- package/dist/AMQP/ResponseProvider.js.map +1 -1
- package/dist/AMQP/Static/filesQueue.d.ts +4 -12
- package/dist/AMQP/Static/filesQueue.js +6 -205
- package/dist/AMQP/Static/filesQueue.js.map +1 -1
- package/dist/AMQP/amqpConnectionFactory.d.ts +2 -25
- package/dist/AMQP/amqpConnectionFactory.js +4 -219
- package/dist/AMQP/amqpConnectionFactory.js.map +1 -1
- package/dist/AMQP/amqpErrors.d.ts +4 -5
- package/dist/AMQP/amqpErrors.js +18 -27
- package/dist/AMQP/amqpErrors.js.map +1 -1
- package/dist/AMQP/errors.d.ts +4 -3
- package/dist/AMQP/errors.js +18 -27
- package/dist/AMQP/errors.js.map +1 -1
- package/dist/AMQP/fetchNextMessage.d.ts +3 -12
- package/dist/AMQP/fetchNextMessage.js +20 -111
- package/dist/AMQP/fetchNextMessage.js.map +1 -1
- package/dist/AMQP/queueConfigurator.d.ts +2 -3
- package/dist/AMQP/queueConfigurator.js +14 -71
- package/dist/AMQP/queueConfigurator.js.map +1 -1
- package/dist/DateTime/waitUntil.d.ts +4 -15
- package/dist/DateTime/waitUntil.js +17 -139
- package/dist/DateTime/waitUntil.js.map +1 -1
- package/dist/Events/AsyncEventEmitter.d.ts +2 -29
- package/dist/Events/AsyncEventEmitter.js +14 -118
- package/dist/Events/AsyncEventEmitter.js.map +1 -1
- package/dist/Events/eventsHelpers.d.ts +4 -3
- package/dist/Events/eventsHelpers.js +18 -21
- package/dist/Events/eventsHelpers.js.map +1 -1
- package/dist/Hash/checksum.d.ts +2 -3
- package/dist/Hash/checksum.js +16 -15
- package/dist/Hash/checksum.js.map +1 -1
- package/dist/Hash/checksumFile.d.ts +2 -2
- package/dist/Hash/checksumFile.js +4 -65
- package/dist/Hash/checksumFile.js.map +1 -1
- package/dist/Hash/generator.d.ts +4 -2
- package/dist/Hash/generator.js +18 -12
- package/dist/Hash/generator.js.map +1 -1
- package/dist/HttpStatus/checks/amqpStatusCheck.d.ts +1 -1
- package/dist/HttpStatus/statuses/amqpStatus.d.ts +1 -1
- package/dist/Metrics/MetricsClient.d.ts +2 -44
- package/dist/Metrics/MetricsClient.js +6 -86
- package/dist/Metrics/MetricsClient.js.map +1 -1
- package/dist/Metrics/metrics.d.ts +2 -82
- package/dist/Metrics/metrics.js +4 -238
- package/dist/Metrics/metrics.js.map +1 -1
- package/dist/Metrics/processSocketsMetrics.d.ts +4 -10
- package/dist/Metrics/processSocketsMetrics.js +17 -88
- package/dist/Metrics/processSocketsMetrics.js.map +1 -1
- package/dist/Service/dbConnections.d.ts +1 -1
- package/dist/Service/metrics/connections.js +7 -7
- package/dist/Service/metrics/connections.js.map +1 -1
- package/dist/ThirdParty/connection.d.ts +0 -11
- package/package.json +5 -9
- package/dist/AMQP/IAMQPPool.d.ts +0 -5
- package/dist/AMQP/IAMQPPool.js +0 -3
- package/dist/AMQP/IAMQPPool.js.map +0 -1
- package/dist/Events/genericGracefulExit.d.ts +0 -11
- package/dist/Events/genericGracefulExit.js +0 -90
- package/dist/Events/genericGracefulExit.js.map +0 -1
- package/dist/GenericPool/options.d.ts +0 -63
- package/dist/GenericPool/options.js +0 -3
- package/dist/GenericPool/options.js.map +0 -1
- package/dist/Metrics/deviceConsumerMetrics.d.ts +0 -6
- package/dist/Metrics/deviceConsumerMetrics.js +0 -59
- package/dist/Metrics/deviceConsumerMetrics.js.map +0 -1
- package/dist/Metrics/eventConsumerMetrics.d.ts +0 -19
- package/dist/Metrics/eventConsumerMetrics.js +0 -52
- package/dist/Metrics/eventConsumerMetrics.js.map +0 -1
- package/dist/Metrics/eventQueueMetrics.d.ts +0 -7
- package/dist/Metrics/eventQueueMetrics.js +0 -19
- package/dist/Metrics/eventQueueMetrics.js.map +0 -1
- package/dist/Pool/IBasePool.d.ts +0 -6
- package/dist/Pool/IBasePool.js +0 -3
- package/dist/Pool/IBasePool.js.map +0 -1
- package/dist/System/signalSender.d.ts +0 -1
- package/dist/System/signalSender.js +0 -7
- package/dist/System/signalSender.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# General Library
|
|
2
2
|
|
|
3
|
-
This repository contains all sets of generic TypeScript tools and utils for different technologies, like databases: 'MongoDB,
|
|
4
|
-
|
|
3
|
+
This repository contains all sets of generic TypeScript tools and utils for different technologies, like databases: 'MongoDB,
|
|
4
|
+
Redis, InfluxDB', monitoring in Prometheus, wrappers and helpers for Azure SDK, Browser Storage, time management,
|
|
5
5
|
observables, async iterators and a lot more.
|
|
6
6
|
|
|
7
7
|
It's published as an npm library @signageos/lib that can be used in any project that requires and is using those technologies to simplify
|
|
@@ -1,38 +1,5 @@
|
|
|
1
|
-
export interface ICommandPayload<TCommandType extends string = string> {
|
|
2
|
-
type: TCommandType;
|
|
3
|
-
}
|
|
4
1
|
/**
|
|
5
|
-
*
|
|
6
|
-
* It's a wrapper interface for the command payload.
|
|
7
|
-
* It contains all the necessary metadata for the command.
|
|
8
|
-
* This command is mostly used for command query responsibility segregation (CQRS).
|
|
2
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
9
3
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* Unique identifier of the command.
|
|
13
|
-
*/
|
|
14
|
-
id: string;
|
|
15
|
-
/**
|
|
16
|
-
* Type of the command.
|
|
17
|
-
* It should be always the same as {@link ICommandPayload['type']}.
|
|
18
|
-
*/
|
|
19
|
-
type: TPayload['type'];
|
|
20
|
-
/**
|
|
21
|
-
* Identifier of the source of the command.
|
|
22
|
-
* It's usually used for logging and debugging.
|
|
23
|
-
* It can be used in some cases to identify the source of the command
|
|
24
|
-
* and to check if the event was dispatched by the same source as the command.
|
|
25
|
-
*/
|
|
26
|
-
sourceUid: string;
|
|
27
|
-
/**
|
|
28
|
-
* Date when the command was dispatched.
|
|
29
|
-
*/
|
|
30
|
-
receivedAt: Date;
|
|
31
|
-
/**
|
|
32
|
-
* Payload of the command.
|
|
33
|
-
* The only required field is the `type` field.
|
|
34
|
-
* The `type` field should always be the same as the `type` field of the command.
|
|
35
|
-
*/
|
|
36
|
-
payload: TPayload;
|
|
37
|
-
}
|
|
38
|
-
export default ICommand;
|
|
4
|
+
export * from '@signageos/amqp/dist/CQRS/ICommand';
|
|
5
|
+
export { default } from '@signageos/amqp/dist/CQRS/ICommand';
|
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
19
|
+
*/
|
|
20
|
+
__exportStar(require("@signageos/amqp/dist/CQRS/ICommand"), exports);
|
|
3
21
|
//# sourceMappingURL=ICommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICommand.js","sourceRoot":"","sources":["../../../src/AMQP/CQRS/ICommand.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ICommand.js","sourceRoot":"","sources":["../../../src/AMQP/CQRS/ICommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,qEAAmD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
3
|
+
*/
|
|
4
|
+
export { default } from '@signageos/amqp/dist/CQRS/ICommandError';
|
|
@@ -1,59 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { ITimestamp, LastSynchronizationEvents } from '../EventSourcing/synchronization';
|
|
6
|
-
export declare const QUEUE_NAME = "commands";
|
|
7
|
-
export declare const AUTO_SNAPSHOTS_QUEUE_NAME = "auto_snapshots";
|
|
8
|
-
export type BindOptions = Pick<IQueueOptions, 'prefetchCount'>;
|
|
9
|
-
export interface IMessageOptions {
|
|
10
|
-
priority?: number;
|
|
11
|
-
/** Commands are persistent by default but it can be changed for a single command */
|
|
12
|
-
persistent?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export type IResponse<TPayload extends ICommandPayload, TError extends ICommandError> = IProcessSucceed<TPayload> | IProcessFailed<TPayload, TError> | IError;
|
|
15
|
-
export {
|
|
16
|
-
/** @deprecated import from ../EventSourcing/synchronization */
|
|
17
|
-
ITimestamp,
|
|
18
|
-
/** @deprecated import from ../EventSourcing/synchronization */
|
|
19
|
-
LastSynchronizationEvents, };
|
|
20
|
-
export interface IProcessSucceed<TPayload extends ICommandPayload> {
|
|
21
|
-
status: 'process_succeed';
|
|
22
|
-
dispatchedAt: Date;
|
|
23
|
-
command: ICommand<TPayload>;
|
|
24
|
-
/**
|
|
25
|
-
* List of lock keys which are used to lock the event store for the command processing.
|
|
26
|
-
* The lock keys are used to synchronize the command processing between multiple consumers.
|
|
27
|
-
* @deprecated Use `lastEvents.*.lockKeys` for a specific event or aggregate all with `getAllLockKeys` instead.
|
|
28
|
-
*/
|
|
29
|
-
lockKeys: string[];
|
|
30
|
-
lastEvents: LastSynchronizationEvents;
|
|
31
|
-
/**
|
|
32
|
-
* Timestamp of the last event created by successfully processed command.
|
|
33
|
-
* This timestamp can be used to detect synchronization status of consumers.
|
|
34
|
-
* When timestamp is null, the event store was not changed. No new event was emitted, so consumers are up-to-date.
|
|
35
|
-
* @deprecated Use `lastEvents.*.timestamp` for a specific event or find the latest event by it's `timestamp` instead.
|
|
36
|
-
*/
|
|
37
|
-
timestamp: ITimestamp | null;
|
|
38
|
-
}
|
|
39
|
-
export interface IProcessFailed<TPayload extends ICommandPayload, TError extends ICommandError> {
|
|
40
|
-
status: 'process_failed';
|
|
41
|
-
dispatchedAt: Date;
|
|
42
|
-
command: ICommand<TPayload>;
|
|
43
|
-
message: string;
|
|
44
|
-
error: TError;
|
|
45
|
-
}
|
|
46
|
-
export interface IError {
|
|
47
|
-
status: 'error';
|
|
48
|
-
dispatchedAt: Date;
|
|
49
|
-
error: any;
|
|
50
|
-
}
|
|
51
|
-
export declare function enqueue<TPayload extends ICommandPayload>(amqpConnection: IAMQPConnection, command: ICommand<TPayload>, messageOptions?: IMessageOptions): Promise<void>;
|
|
52
|
-
export declare function process<TPayload extends ICommandPayload, TCommandError extends ICommandError = ICommandError>(amqpConnection: IAMQPConnection, command: ICommand<TPayload>, messageOptions?: IMessageOptions): Promise<IResponse<TPayload, TCommandError>>;
|
|
53
|
-
export declare function bindAll<TPayload extends ICommandPayload>(amqpConnection: IAMQPConnection, options: BindOptions, onCommand: (command: ICommand<TPayload>) => Promise<IResponse<TPayload, ICommandError> | undefined>): Promise<import("../QueueSubscriber").ICancelConsumption>;
|
|
54
|
-
export declare function bindAutoSnapshots<TPayload extends ICommandPayload>(amqpConnection: IAMQPConnection, options: BindOptions, onCommand: (command: ICommand<TPayload>) => Promise<void>): Promise<import("../QueueSubscriber").ICancelConsumption>;
|
|
55
|
-
export declare function fetchNext<TPayload extends ICommandPayload>(amqpConnection: IAMQPConnection): Promise<ICommand<TPayload> | null>;
|
|
56
|
-
export declare function fetchNextAutoSnapshot<TPayload extends ICommandPayload>(amqpConnection: IAMQPConnection): Promise<ICommand<TPayload> | null>;
|
|
57
|
-
export declare function purgeAll(amqpConnection: IAMQPConnection): Promise<void>;
|
|
58
|
-
export declare function deleteAll(amqpConnection: IAMQPConnection): Promise<void>;
|
|
59
|
-
export declare function prepareAll(amqpConnection: IAMQPConnection): Promise<void>;
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
3
|
+
*/
|
|
4
|
+
export * from '@signageos/amqp/dist/CQRS/commandQueue';
|
|
@@ -1,313 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
47
7
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
51
15
|
};
|
|
52
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
exports
|
|
57
|
-
exports.bindAutoSnapshots = bindAutoSnapshots;
|
|
58
|
-
exports.fetchNext = fetchNext;
|
|
59
|
-
exports.fetchNextAutoSnapshot = fetchNextAutoSnapshot;
|
|
60
|
-
exports.purgeAll = purgeAll;
|
|
61
|
-
exports.deleteAll = deleteAll;
|
|
62
|
-
exports.prepareAll = prepareAll;
|
|
63
|
-
var fetchNextMessage_1 = __importDefault(require("../fetchNextMessage"));
|
|
64
|
-
exports.QUEUE_NAME = 'commands';
|
|
65
|
-
exports.AUTO_SNAPSHOTS_QUEUE_NAME = 'auto_snapshots';
|
|
66
|
-
var DEFAULT_OPTIONS = {
|
|
67
|
-
persistent: true,
|
|
68
|
-
confirmable: false,
|
|
69
|
-
maxPriority: 10,
|
|
70
|
-
};
|
|
71
|
-
function enqueue(amqpConnection_1, command_1) {
|
|
72
|
-
return __awaiter(this, arguments, void 0, function (amqpConnection, command, messageOptions) {
|
|
73
|
-
var createChannel;
|
|
74
|
-
var _this = this;
|
|
75
|
-
if (messageOptions === void 0) { messageOptions = { priority: 5 }; }
|
|
76
|
-
return __generator(this, function (_a) {
|
|
77
|
-
switch (_a.label) {
|
|
78
|
-
case 0:
|
|
79
|
-
createChannel = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
80
|
-
var channel;
|
|
81
|
-
return __generator(this, function (_a) {
|
|
82
|
-
switch (_a.label) {
|
|
83
|
-
case 0: return [4 /*yield*/, amqpConnection.channelProvider.getChannel(exports.QUEUE_NAME, DEFAULT_OPTIONS)];
|
|
84
|
-
case 1:
|
|
85
|
-
channel = _a.sent();
|
|
86
|
-
return [4 /*yield*/, channel.assertExchange(exports.QUEUE_NAME, 'topic')];
|
|
87
|
-
case 2:
|
|
88
|
-
_a.sent();
|
|
89
|
-
return [2 /*return*/, channel];
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}); };
|
|
93
|
-
return [4 /*yield*/, amqpConnection.queuePublisher.enqueue(createChannel, command, undefined, exports.QUEUE_NAME, exports.QUEUE_NAME, messageOptions)];
|
|
94
|
-
case 1:
|
|
95
|
-
_a.sent();
|
|
96
|
-
return [2 /*return*/];
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
function process(amqpConnection_1, command_1) {
|
|
102
|
-
return __awaiter(this, arguments, void 0, function (amqpConnection, command, messageOptions) {
|
|
103
|
-
var _this = this;
|
|
104
|
-
if (messageOptions === void 0) { messageOptions = { priority: 6 }; }
|
|
105
|
-
return __generator(this, function (_a) {
|
|
106
|
-
switch (_a.label) {
|
|
107
|
-
case 0: return [4 /*yield*/, amqpConnection.queuePublisher.enqueueExpectingResponse(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
108
|
-
var channel;
|
|
109
|
-
return __generator(this, function (_a) {
|
|
110
|
-
switch (_a.label) {
|
|
111
|
-
case 0: return [4 /*yield*/, amqpConnection.channelProvider.getChannel(exports.QUEUE_NAME, DEFAULT_OPTIONS)];
|
|
112
|
-
case 1:
|
|
113
|
-
channel = _a.sent();
|
|
114
|
-
return [4 /*yield*/, channel.assertExchange(exports.QUEUE_NAME, 'topic')];
|
|
115
|
-
case 2:
|
|
116
|
-
_a.sent();
|
|
117
|
-
return [2 /*return*/, channel];
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
}); }, command, undefined, exports.QUEUE_NAME, exports.QUEUE_NAME, messageOptions)];
|
|
121
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
function bindAll(amqpConnection, options, onCommand) {
|
|
127
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
128
|
-
var fullOptions;
|
|
129
|
-
var _this = this;
|
|
130
|
-
return __generator(this, function (_a) {
|
|
131
|
-
switch (_a.label) {
|
|
132
|
-
case 0:
|
|
133
|
-
fullOptions = __assign(__assign({}, DEFAULT_OPTIONS), options);
|
|
134
|
-
return [4 /*yield*/, amqpConnection.queueSubscriber.subscribeExpectingConfirmationRepeatable(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
135
|
-
var channel;
|
|
136
|
-
return __generator(this, function (_a) {
|
|
137
|
-
switch (_a.label) {
|
|
138
|
-
case 0: return [4 /*yield*/, amqpConnection.channelProvider.getChannel(exports.QUEUE_NAME, fullOptions)];
|
|
139
|
-
case 1:
|
|
140
|
-
channel = _a.sent();
|
|
141
|
-
return [4 /*yield*/, channel.assertExchange(exports.QUEUE_NAME, 'topic')];
|
|
142
|
-
case 2:
|
|
143
|
-
_a.sent();
|
|
144
|
-
return [2 /*return*/, channel];
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
}); }, exports.QUEUE_NAME, [{ exchangeName: exports.QUEUE_NAME, routingKey: exports.QUEUE_NAME, persistent: true }], function (command, _headers, ack, nack) { return __awaiter(_this, void 0, void 0, function () {
|
|
148
|
-
var response, error_1;
|
|
149
|
-
return __generator(this, function (_a) {
|
|
150
|
-
switch (_a.label) {
|
|
151
|
-
case 0:
|
|
152
|
-
_a.trys.push([0, 2, , 3]);
|
|
153
|
-
return [4 /*yield*/, onCommand(command)];
|
|
154
|
-
case 1:
|
|
155
|
-
response = _a.sent();
|
|
156
|
-
ack();
|
|
157
|
-
return [2 /*return*/, response];
|
|
158
|
-
case 2:
|
|
159
|
-
error_1 = _a.sent();
|
|
160
|
-
nack();
|
|
161
|
-
throw error_1;
|
|
162
|
-
case 3: return [2 /*return*/];
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
}); }, { autoDelete: false, respond: true })];
|
|
166
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
function bindAutoSnapshots(amqpConnection, options, onCommand) {
|
|
172
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
173
|
-
var fullOptions;
|
|
174
|
-
var _this = this;
|
|
175
|
-
return __generator(this, function (_a) {
|
|
176
|
-
switch (_a.label) {
|
|
177
|
-
case 0:
|
|
178
|
-
fullOptions = __assign(__assign({}, DEFAULT_OPTIONS), options);
|
|
179
|
-
return [4 /*yield*/, amqpConnection.queueSubscriber.subscribeExpectingConfirmationRepeatable(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
180
|
-
var channel;
|
|
181
|
-
return __generator(this, function (_a) {
|
|
182
|
-
switch (_a.label) {
|
|
183
|
-
case 0: return [4 /*yield*/, amqpConnection.channelProvider.getChannel(exports.AUTO_SNAPSHOTS_QUEUE_NAME, fullOptions)];
|
|
184
|
-
case 1:
|
|
185
|
-
channel = _a.sent();
|
|
186
|
-
return [4 /*yield*/, channel.assertExchange(exports.QUEUE_NAME, 'topic')];
|
|
187
|
-
case 2:
|
|
188
|
-
_a.sent();
|
|
189
|
-
return [2 /*return*/, channel];
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
}); }, exports.AUTO_SNAPSHOTS_QUEUE_NAME, [{ exchangeName: exports.QUEUE_NAME, routingKey: exports.QUEUE_NAME, persistent: true }], function (command, _headers, ack, nack) { return __awaiter(_this, void 0, void 0, function () {
|
|
193
|
-
var error_2;
|
|
194
|
-
return __generator(this, function (_a) {
|
|
195
|
-
switch (_a.label) {
|
|
196
|
-
case 0:
|
|
197
|
-
_a.trys.push([0, 2, , 3]);
|
|
198
|
-
return [4 /*yield*/, onCommand(command)];
|
|
199
|
-
case 1:
|
|
200
|
-
_a.sent();
|
|
201
|
-
ack();
|
|
202
|
-
return [3 /*break*/, 3];
|
|
203
|
-
case 2:
|
|
204
|
-
error_2 = _a.sent();
|
|
205
|
-
nack();
|
|
206
|
-
throw error_2;
|
|
207
|
-
case 3: return [2 /*return*/];
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
}); }, { autoDelete: false, durable: false, respond: false })];
|
|
211
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
function fetchNext(amqpConnection) {
|
|
217
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
218
|
-
return __generator(this, function (_a) {
|
|
219
|
-
switch (_a.label) {
|
|
220
|
-
case 0: return [4 /*yield*/, (0, fetchNextMessage_1.default)(amqpConnection, exports.QUEUE_NAME, exports.QUEUE_NAME, exports.QUEUE_NAME, undefined, {
|
|
221
|
-
maxPriority: DEFAULT_OPTIONS.maxPriority,
|
|
222
|
-
})];
|
|
223
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
function fetchNextAutoSnapshot(amqpConnection) {
|
|
229
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
230
|
-
return __generator(this, function (_a) {
|
|
231
|
-
switch (_a.label) {
|
|
232
|
-
case 0: return [4 /*yield*/, (0, fetchNextMessage_1.default)(amqpConnection, exports.AUTO_SNAPSHOTS_QUEUE_NAME, exports.QUEUE_NAME, exports.QUEUE_NAME, undefined, {
|
|
233
|
-
maxPriority: DEFAULT_OPTIONS.maxPriority,
|
|
234
|
-
durable: false,
|
|
235
|
-
})];
|
|
236
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
function purgeAll(amqpConnection) {
|
|
242
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
243
|
-
var channel;
|
|
244
|
-
return __generator(this, function (_a) {
|
|
245
|
-
switch (_a.label) {
|
|
246
|
-
case 0: return [4 /*yield*/, amqpConnection.channelProvider.getChannel(exports.QUEUE_NAME)];
|
|
247
|
-
case 1:
|
|
248
|
-
channel = _a.sent();
|
|
249
|
-
_a.label = 2;
|
|
250
|
-
case 2:
|
|
251
|
-
_a.trys.push([2, , 5, 7]);
|
|
252
|
-
return [4 /*yield*/, channel.purge(exports.QUEUE_NAME)];
|
|
253
|
-
case 3:
|
|
254
|
-
_a.sent();
|
|
255
|
-
return [4 /*yield*/, channel.purge(exports.AUTO_SNAPSHOTS_QUEUE_NAME)];
|
|
256
|
-
case 4:
|
|
257
|
-
_a.sent();
|
|
258
|
-
return [3 /*break*/, 7];
|
|
259
|
-
case 5: return [4 /*yield*/, channel.close()];
|
|
260
|
-
case 6:
|
|
261
|
-
_a.sent();
|
|
262
|
-
return [7 /*endfinally*/];
|
|
263
|
-
case 7: return [2 /*return*/];
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
function deleteAll(amqpConnection) {
|
|
269
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
270
|
-
var channel;
|
|
271
|
-
return __generator(this, function (_a) {
|
|
272
|
-
switch (_a.label) {
|
|
273
|
-
case 0: return [4 /*yield*/, amqpConnection.channelProvider.getChannel(exports.QUEUE_NAME)];
|
|
274
|
-
case 1:
|
|
275
|
-
channel = _a.sent();
|
|
276
|
-
_a.label = 2;
|
|
277
|
-
case 2:
|
|
278
|
-
_a.trys.push([2, , 5, 7]);
|
|
279
|
-
return [4 /*yield*/, channel.delete(exports.QUEUE_NAME)];
|
|
280
|
-
case 3:
|
|
281
|
-
_a.sent();
|
|
282
|
-
return [4 /*yield*/, channel.delete(exports.AUTO_SNAPSHOTS_QUEUE_NAME)];
|
|
283
|
-
case 4:
|
|
284
|
-
_a.sent();
|
|
285
|
-
return [3 /*break*/, 7];
|
|
286
|
-
case 5: return [4 /*yield*/, channel.close()];
|
|
287
|
-
case 6:
|
|
288
|
-
_a.sent();
|
|
289
|
-
return [7 /*endfinally*/];
|
|
290
|
-
case 7: return [2 /*return*/];
|
|
291
|
-
}
|
|
292
|
-
});
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
function prepareAll(amqpConnection) {
|
|
296
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
297
|
-
return __generator(this, function (_a) {
|
|
298
|
-
switch (_a.label) {
|
|
299
|
-
case 0:
|
|
300
|
-
// Hack to create event queue for exchange
|
|
301
|
-
return [4 /*yield*/, fetchNext(amqpConnection)];
|
|
302
|
-
case 1:
|
|
303
|
-
// Hack to create event queue for exchange
|
|
304
|
-
_a.sent();
|
|
305
|
-
return [4 /*yield*/, fetchNextAutoSnapshot(amqpConnection)];
|
|
306
|
-
case 2:
|
|
307
|
-
_a.sent();
|
|
308
|
-
return [2 /*return*/];
|
|
309
|
-
}
|
|
310
|
-
});
|
|
311
|
-
});
|
|
312
|
-
}
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
19
|
+
*/
|
|
20
|
+
__exportStar(require("@signageos/amqp/dist/CQRS/commandQueue"), exports);
|
|
313
21
|
//# sourceMappingURL=commandQueue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandQueue.js","sourceRoot":"","sources":["../../../src/AMQP/CQRS/commandQueue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commandQueue.js","sourceRoot":"","sources":["../../../src/AMQP/CQRS/commandQueue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,yEAAuD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
3
|
+
*/
|
|
4
|
+
export * from '@signageos/amqp/dist/CQRS/commandResponseHelper';
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "getAllLockKeys", { enumerable: true, get: function () { return synchronization_1.getAllLockKeys; } });
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
19
|
+
*/
|
|
20
|
+
__exportStar(require("@signageos/amqp/dist/CQRS/commandResponseHelper"), exports);
|
|
8
21
|
//# sourceMappingURL=commandResponseHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandResponseHelper.js","sourceRoot":"","sources":["../../../src/AMQP/CQRS/commandResponseHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commandResponseHelper.js","sourceRoot":"","sources":["../../../src/AMQP/CQRS/commandResponseHelper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,kFAAgE"}
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export declare const AGGREGATED_QUEUE_NAME = "aggregated_commands";
|
|
6
|
-
export interface IStoredCommand<TPayload extends ICommandPayload> extends ICommand<TPayload> {
|
|
7
|
-
id: string;
|
|
8
|
-
dispatchedAt: Date;
|
|
9
|
-
}
|
|
10
|
-
export type IAggregatedCommand = {
|
|
11
|
-
commandId: string;
|
|
12
|
-
succeededAt: Date;
|
|
13
|
-
} | {
|
|
14
|
-
commandId: string;
|
|
15
|
-
failedAt: Date;
|
|
16
|
-
error: any;
|
|
17
|
-
};
|
|
18
|
-
export declare function createStoredCommand<TPayload extends ICommandPayload>(amqpConnection: IAMQPConnection, command: IStoredCommand<TPayload>): Promise<void>;
|
|
19
|
-
export declare function bindStoredCommands<TPayload extends ICommandPayload>(amqpConnection: IAMQPConnection, onCommand: (command: IStoredCommand<TPayload>) => Promise<void>): Promise<import("../QueueSubscriber").ICancelConsumption>;
|
|
20
|
-
export declare function fetchNextStoredCommand<TPayload extends ICommandPayload>(amqpConnection: IAMQPConnection): Promise<IStoredCommand<TPayload> | null>;
|
|
21
|
-
export declare function markAggregatedCommandSucceeded<TPayload extends ICommandPayload>(amqpConnection: IAMQPConnection, command: IStoredCommand<TPayload>, succeededAt: Date): Promise<void>;
|
|
22
|
-
export declare function markAggregatedCommandFailed<TPayload extends ICommandPayload>(amqpConnection: IAMQPConnection, command: IStoredCommand<TPayload>, failedAt: Date, error: any): Promise<void>;
|
|
23
|
-
export declare function bindAggregatedCommands(amqpConnection: IAMQPConnection, onCommand: (aggregatedCommand: IAggregatedCommand, ack: () => void, nack: (options?: INackOptions) => void) => Promise<void>): Promise<import("../QueueSubscriber").ICancelConsumption>;
|
|
24
|
-
export declare function fetchNextAggregatedCommand(amqpConnection: IAMQPConnection): Promise<IAggregatedCommand | null>;
|
|
25
|
-
export declare function purgeAll(amqpConnection: IAMQPConnection): Promise<void>;
|
|
26
|
-
export declare function deleteAll(amqpConnection: IAMQPConnection): Promise<void>;
|
|
27
|
-
export declare function prepareAll(amqpConnection: IAMQPConnection): Promise<void>;
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
3
|
+
*/
|
|
4
|
+
export * from '@signageos/amqp/dist/CQRS/storedCommandQueue';
|