resolve-local-event-broker
Version:
The reSolve framework's event broker for applications on a local machine.
126 lines (109 loc) • 5.88 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ConsumerMethod = exports.PrivateOperationType = exports.PublicOperationType = exports.SERIALIZED_ERROR_SYMBOL = exports.NotificationStatus = exports.SubscriptionStatus = exports.QueueStrategy = exports.DeliveryStrategy = exports.LazinessStrategy = exports.SQLITE_BUSY = exports.TRANSFORM_NONE_SYMBOL = exports.TRANSFORM_JSON_MAPPED_ARRAY_SYMBOL = exports.TRANSFORM_JSON_REGULAR_SYMBOL = exports.BATCH_CONSUMING_TIME = exports.JSON_SQL_TYPE = exports.STRING_SQL_TYPE = exports.LONG_INTEGER_SQL_TYPE = exports.INTEGER_SQL_TYPE = exports.BATCHES_TABLE_NAME = exports.SUBSCRIBERS_TABLE_NAME = exports.NOTIFICATIONS_TABLE_NAME = void 0;
const NOTIFICATIONS_TABLE_NAME = 'notifications';
exports.NOTIFICATIONS_TABLE_NAME = NOTIFICATIONS_TABLE_NAME;
const SUBSCRIBERS_TABLE_NAME = 'subscribers';
exports.SUBSCRIBERS_TABLE_NAME = SUBSCRIBERS_TABLE_NAME;
const BATCHES_TABLE_NAME = 'batches';
exports.BATCHES_TABLE_NAME = BATCHES_TABLE_NAME;
const INTEGER_SQL_TYPE = 'INTEGER';
exports.INTEGER_SQL_TYPE = INTEGER_SQL_TYPE;
const LONG_INTEGER_SQL_TYPE = 'BIGINT';
exports.LONG_INTEGER_SQL_TYPE = LONG_INTEGER_SQL_TYPE;
const STRING_SQL_TYPE = 'VARCHAR(700)';
exports.STRING_SQL_TYPE = STRING_SQL_TYPE;
const JSON_SQL_TYPE = 'JSON';
exports.JSON_SQL_TYPE = JSON_SQL_TYPE;
const BATCH_CONSUMING_TIME = 240000;
exports.BATCH_CONSUMING_TIME = BATCH_CONSUMING_TIME;
const TRANSFORM_JSON_REGULAR_SYMBOL = Symbol('TRANSFORM_JSON_REGULAR');
exports.TRANSFORM_JSON_REGULAR_SYMBOL = TRANSFORM_JSON_REGULAR_SYMBOL;
const TRANSFORM_JSON_MAPPED_ARRAY_SYMBOL = Symbol('TRANSFORM_JSON_MAPPED_ARRAY');
exports.TRANSFORM_JSON_MAPPED_ARRAY_SYMBOL = TRANSFORM_JSON_MAPPED_ARRAY_SYMBOL;
const TRANSFORM_NONE_SYMBOL = Symbol('TRANSFORM_NONE');
exports.TRANSFORM_NONE_SYMBOL = TRANSFORM_NONE_SYMBOL;
const SQLITE_BUSY = 'SQLITE_BUSY';
exports.SQLITE_BUSY = SQLITE_BUSY;
const LazinessStrategy = function (LazinessStrategy) {
LazinessStrategy['EAGER'] = 'eager';
LazinessStrategy['LAZY'] = 'lazy';
return Object.freeze(LazinessStrategy);
}({});
exports.LazinessStrategy = LazinessStrategy;
const DeliveryStrategy = function (DeliveryStrategy) {
DeliveryStrategy['ACTIVE_NONE'] = 'active-none-transaction';
DeliveryStrategy['ACTIVE_REGULAR'] = 'active-regular-transaction';
DeliveryStrategy['ACTIVE_XA'] = 'active-xa-transaction';
DeliveryStrategy['PASSTHROUGH'] = 'passthrough';
return Object.freeze(DeliveryStrategy);
}({});
exports.DeliveryStrategy = DeliveryStrategy;
const QueueStrategy = function (QueueStrategy) {
QueueStrategy['GLOBAL'] = 'global';
QueueStrategy['EVENT_TYPES'] = 'event-types';
QueueStrategy['AGGREGATE_IDS'] = 'aggregate-ids';
QueueStrategy['NONE'] = 'none';
return Object.freeze(QueueStrategy);
}({});
exports.QueueStrategy = QueueStrategy;
const SubscriptionStatus = function (SubscriptionStatus) {
SubscriptionStatus['DELIVER'] = 'deliver';
SubscriptionStatus['SKIP'] = 'skip';
SubscriptionStatus['ERROR'] = 'error';
return Object.freeze(SubscriptionStatus);
}({});
exports.SubscriptionStatus = SubscriptionStatus;
const NotificationStatus = function (NotificationStatus) {
NotificationStatus['RECIEVED'] = 'received-notification';
NotificationStatus['PROCESSING'] = 'processing-notification';
NotificationStatus['ACKNOWLEDGE_ENTERING'] = 'acknowledge-entering-notification';
NotificationStatus['ACKNOWLEDGE_XA_COMMITING'] = 'acknowledge-xa-commiting-notification';
NotificationStatus['ACKNOWLEDGE_XA_ROLLBACKING'] = 'acknowledge-xa-rollbacking-notification';
NotificationStatus['TIMEOUT_ENTERING'] = 'timeout-entering-notification';
NotificationStatus['TIMEOUT_XA_COMMITING'] = 'timeout-xa-commiting-notification';
NotificationStatus['TIMEOUT_XA_ROLLBACKING'] = 'timeout-xa-rollbacking-notification';
return Object.freeze(NotificationStatus);
}({});
exports.NotificationStatus = NotificationStatus;
const SERIALIZED_ERROR_SYMBOL = Symbol('SERIALIZED_ERROR');
exports.SERIALIZED_ERROR_SYMBOL = SERIALIZED_ERROR_SYMBOL;
const PublicOperationType = function (PublicOperationType) {
PublicOperationType['PUBLISH'] = 'publish';
PublicOperationType['SUBSCRIBE'] = 'subscribe';
PublicOperationType['RESUBSCRIBE'] = 'resubscribe';
PublicOperationType['UNSUBSCRIBE'] = 'unsubscribe';
PublicOperationType['ACKNOWLEDGE'] = 'acknowledge';
PublicOperationType['STATUS'] = 'status';
PublicOperationType['RESUME'] = 'resume';
PublicOperationType['PAUSE'] = 'pause';
PublicOperationType['RESET'] = 'reset';
PublicOperationType['READ'] = 'read';
return Object.freeze(PublicOperationType);
}({});
exports.PublicOperationType = PublicOperationType;
const PrivateOperationType = function (PrivateOperationType) {
PrivateOperationType['PUSH_NOTIFICATIONS'] = 'push-notifications';
PrivateOperationType['PULL_NOTIFICATIONS'] = 'pull-notifications';
PrivateOperationType['RESUME_SUBSCRIBER'] = 'resume-subscriber';
PrivateOperationType['ACKNOWLEDGE_BATCH'] = 'acknowledge-batch';
PrivateOperationType['FINALIZE_BATCH'] = 'finalize-batch';
PrivateOperationType['REQUEST_TIMEOUT'] = 'request-timeout';
PrivateOperationType['DELIVER_BATCH'] = 'deliver-batch';
return Object.freeze(PrivateOperationType);
}({});
exports.PrivateOperationType = PrivateOperationType;
const ConsumerMethod = function (ConsumerMethod) {
ConsumerMethod['SaveEvent'] = 'SaveEvent';
ConsumerMethod['LoadEvents'] = 'LoadEvents';
ConsumerMethod['SendEvents'] = 'SendEvents';
ConsumerMethod['BeginXATransaction'] = 'BeginXATransaction';
ConsumerMethod['CommitXATransaction'] = 'CommitXATransaction';
ConsumerMethod['RollbackXATransaction'] = 'RollbackXATransaction';
ConsumerMethod['Drop'] = 'Drop';
return Object.freeze(ConsumerMethod);
}({});
exports.ConsumerMethod = ConsumerMethod;
//# sourceMappingURL=constants.js.map