@sitel/common 1.0.126 → 1.0.129
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/build/absence-constants.d.ts +42 -42
- package/build/absence-constants.js +56 -56
- package/build/errors/bad-request-error.d.ts +9 -9
- package/build/errors/bad-request-error.js +34 -34
- package/build/errors/custom-error.d.ts +8 -8
- package/build/errors/custom-error.js +28 -28
- package/build/errors/database-connection-error.d.ts +9 -9
- package/build/errors/database-connection-error.js +34 -34
- package/build/errors/not-authorized-error.d.ts +9 -9
- package/build/errors/not-authorized-error.js +34 -34
- package/build/errors/not-found-error.d.ts +8 -8
- package/build/errors/not-found-error.js +33 -33
- package/build/errors/person-substitute-not-available-error.d.ts +9 -9
- package/build/errors/person-substitute-not-available-error.js +34 -34
- package/build/errors/request-validation-error.d.ts +11 -11
- package/build/errors/request-validation-error.js +37 -37
- package/build/events/base-listener.d.ts +23 -18
- package/build/events/base-listener.js +34 -34
- package/build/events/base-publisher.d.ts +13 -13
- package/build/events/base-publisher.js +24 -24
- package/build/events/manual-event-payload.d.ts +16 -16
- package/build/events/manual-event-payload.js +11 -11
- package/build/events/notify/admin/bipe-sync-event.d.ts +17 -17
- package/build/events/notify/admin/bipe-sync-event.js +2 -2
- package/build/events/notify/base-event-payload.d.ts +10 -10
- package/build/events/notify/base-event-payload.js +2 -2
- package/build/events/notify/calendar-event.d.ts +9 -9
- package/build/events/notify/calendar-event.js +2 -2
- package/build/events/notify/contact.d.ts +9 -9
- package/build/events/notify/contact.js +2 -2
- package/build/events/notify/group/approval-group-reminded-event.d.ts +6 -6
- package/build/events/notify/group/approval-group-reminded-event.js +2 -2
- package/build/events/notify/group/approval-group-requested-event.d.ts +12 -12
- package/build/events/notify/group/approval-group-requested-event.js +2 -2
- package/build/events/notify/index.d.ts +23 -23
- package/build/events/notify/index.js +39 -39
- package/build/events/notify/manual/manual-event.d.ts +6 -6
- package/build/events/notify/manual/manual-event.js +2 -2
- package/build/events/notify/member/annual-vacation-info-event.d.ts +25 -25
- package/build/events/notify/member/annual-vacation-info-event.js +2 -2
- package/build/events/notify/member/ts-validation-reminded-event.d.ts +6 -6
- package/build/events/notify/member/ts-validation-reminded-event.js +2 -2
- package/build/events/notify/notify-completed-event.d.ts +5 -5
- package/build/events/notify/notify-completed-event.js +2 -2
- package/build/events/notify/notify-type-value.d.ts +21 -21
- package/build/events/notify/notify-type-value.js +25 -25
- package/build/events/notify/requestor/absence-cancelled-event.d.ts +18 -18
- package/build/events/notify/requestor/absence-cancelled-event.js +2 -2
- package/build/events/notify/requestor/absence-created-event.d.ts +9 -9
- package/build/events/notify/requestor/absence-created-event.js +2 -2
- package/build/events/notify/requestor/absence-updated-event.d.ts +20 -20
- package/build/events/notify/requestor/absence-updated-event.js +2 -2
- package/build/events/notify/requestor/approval-group-accepted-event.d.ts +14 -14
- package/build/events/notify/requestor/approval-group-accepted-event.js +2 -2
- package/build/events/notify/requestor/approval-group-refused-event.d.ts +16 -16
- package/build/events/notify/requestor/approval-group-refused-event.js +2 -2
- package/build/events/notify/requestor/approval-service-accepted-event.d.ts +18 -18
- package/build/events/notify/requestor/approval-service-accepted-event.js +2 -2
- package/build/events/notify/requestor/approval-service-refused-event.d.ts +16 -16
- package/build/events/notify/requestor/approval-service-refused-event.js +2 -2
- package/build/events/notify/requestor/approval-substitute-accepted-event.d.ts +14 -14
- package/build/events/notify/requestor/approval-substitute-accepted-event.js +2 -2
- package/build/events/notify/requestor/approval-substitute-refused-event.d.ts +16 -16
- package/build/events/notify/requestor/approval-substitute-refused-event.js +2 -2
- package/build/events/notify/service/approval-service-reminded-event.d.ts +6 -6
- package/build/events/notify/service/approval-service-reminded-event.js +2 -2
- package/build/events/notify/service/approval-service-requested-event.d.ts +12 -12
- package/build/events/notify/service/approval-service-requested-event.js +2 -2
- package/build/events/notify/service/ts-validation-reported-event.d.ts +11 -11
- package/build/events/notify/service/ts-validation-reported-event.js +2 -2
- package/build/events/notify/substitute/approval-substitute-reminded-event.d.ts +6 -6
- package/build/events/notify/substitute/approval-substitute-reminded-event.js +2 -2
- package/build/events/notify/substitute/approval-substitute-requested-event.d.ts +12 -12
- package/build/events/notify/substitute/approval-substitute-requested-event.js +2 -2
- package/build/events/notify/substitute/information-substitute-reminded-event.d.ts +11 -11
- package/build/events/notify/substitute/information-substitute-reminded-event.js +2 -2
- package/build/events/presence/index.d.ts +4 -4
- package/build/events/presence/index.js +20 -20
- package/build/events/presence/person-archived-event.d.ts +9 -9
- package/build/events/presence/person-archived-event.js +2 -2
- package/build/events/presence/person-created-event.d.ts +8 -8
- package/build/events/presence/person-created-event.js +2 -2
- package/build/events/presence/person-updated-event.d.ts +10 -10
- package/build/events/presence/person-updated-event.js +2 -2
- package/build/events/presence/person-work-rate-changed-event.d.ts +9 -9
- package/build/events/presence/person-work-rate-changed-event.js +2 -2
- package/build/events/subjects.d.ts +55 -55
- package/build/events/subjects.js +75 -75
- package/build/events/worker/absence-approval-event.d.ts +16 -16
- package/build/events/worker/absence-approval-event.js +9 -9
- package/build/events/worker/absence-created-event.d.ts +13 -13
- package/build/events/worker/absence-created-event.js +8 -8
- package/build/events/worker/absence-deleted-event.d.ts +15 -15
- package/build/events/worker/absence-deleted-event.js +9 -9
- package/build/events/worker/absence-updated-event.d.ts +15 -15
- package/build/events/worker/absence-updated-event.js +9 -9
- package/build/events/worker/index.d.ts +5 -5
- package/build/events/worker/index.js +21 -21
- package/build/events/worker/manuel-event.d.ts +6 -6
- package/build/events/worker/manuel-event.js +2 -2
- package/build/index.d.ts +22 -22
- package/build/index.js +38 -38
- package/build/middlewares/current-user.d.ts +10 -10
- package/build/middlewares/current-user.js +17 -17
- package/build/middlewares/error-handler.d.ts +5 -5
- package/build/middlewares/error-handler.js +18 -18
- package/build/middlewares/require-auth.d.ts +10 -10
- package/build/middlewares/require-auth.js +11 -11
- package/build/middlewares/user-payload.d.ts +18 -18
- package/build/middlewares/user-payload.js +2 -2
- package/build/middlewares/validate-request.d.ts +2 -2
- package/build/middlewares/validate-request.js +13 -13
- package/build/services/jwt-utils.d.ts +3 -3
- package/build/services/jwt-utils.js +16 -16
- package/package.json +2 -2
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.PersonOrSubstituteNotAvailableError = void 0;
|
|
19
|
-
var custom_error_1 = require("./custom-error");
|
|
20
|
-
var PersonOrSubstituteNotAvailableError = /** @class */ (function (_super) {
|
|
21
|
-
__extends(PersonOrSubstituteNotAvailableError, _super);
|
|
22
|
-
function PersonOrSubstituteNotAvailableError(message) {
|
|
23
|
-
var _this = _super.call(this, message) || this;
|
|
24
|
-
_this.message = message;
|
|
25
|
-
_this.statusCode = 409;
|
|
26
|
-
Object.setPrototypeOf(_this, PersonOrSubstituteNotAvailableError.prototype);
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
PersonOrSubstituteNotAvailableError.prototype.serializeErrors = function () {
|
|
30
|
-
return [{ message: this.message }];
|
|
31
|
-
};
|
|
32
|
-
return PersonOrSubstituteNotAvailableError;
|
|
33
|
-
}(custom_error_1.CustomError));
|
|
34
|
-
exports.PersonOrSubstituteNotAvailableError = PersonOrSubstituteNotAvailableError;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.PersonOrSubstituteNotAvailableError = void 0;
|
|
19
|
+
var custom_error_1 = require("./custom-error");
|
|
20
|
+
var PersonOrSubstituteNotAvailableError = /** @class */ (function (_super) {
|
|
21
|
+
__extends(PersonOrSubstituteNotAvailableError, _super);
|
|
22
|
+
function PersonOrSubstituteNotAvailableError(message) {
|
|
23
|
+
var _this = _super.call(this, message) || this;
|
|
24
|
+
_this.message = message;
|
|
25
|
+
_this.statusCode = 409;
|
|
26
|
+
Object.setPrototypeOf(_this, PersonOrSubstituteNotAvailableError.prototype);
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
PersonOrSubstituteNotAvailableError.prototype.serializeErrors = function () {
|
|
30
|
+
return [{ message: this.message }];
|
|
31
|
+
};
|
|
32
|
+
return PersonOrSubstituteNotAvailableError;
|
|
33
|
+
}(custom_error_1.CustomError));
|
|
34
|
+
exports.PersonOrSubstituteNotAvailableError = PersonOrSubstituteNotAvailableError;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ValidationError } from 'express-validator';
|
|
2
|
-
import { CustomError } from './custom-error';
|
|
3
|
-
export declare class RequestValidationError extends CustomError {
|
|
4
|
-
errors: ValidationError[];
|
|
5
|
-
statusCode: number;
|
|
6
|
-
constructor(errors: ValidationError[]);
|
|
7
|
-
serializeErrors(): {
|
|
8
|
-
message: any;
|
|
9
|
-
field: string;
|
|
10
|
-
}[];
|
|
11
|
-
}
|
|
1
|
+
import { ValidationError } from 'express-validator';
|
|
2
|
+
import { CustomError } from './custom-error';
|
|
3
|
+
export declare class RequestValidationError extends CustomError {
|
|
4
|
+
errors: ValidationError[];
|
|
5
|
+
statusCode: number;
|
|
6
|
+
constructor(errors: ValidationError[]);
|
|
7
|
+
serializeErrors(): {
|
|
8
|
+
message: any;
|
|
9
|
+
field: string;
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.RequestValidationError = void 0;
|
|
19
|
-
var custom_error_1 = require("./custom-error");
|
|
20
|
-
var RequestValidationError = /** @class */ (function (_super) {
|
|
21
|
-
__extends(RequestValidationError, _super);
|
|
22
|
-
function RequestValidationError(errors) {
|
|
23
|
-
var _this = _super.call(this, 'Invalid request parameters') || this;
|
|
24
|
-
_this.errors = errors;
|
|
25
|
-
_this.statusCode = 400;
|
|
26
|
-
// Only because we are extending a built in class
|
|
27
|
-
Object.setPrototypeOf(_this, RequestValidationError.prototype);
|
|
28
|
-
return _this;
|
|
29
|
-
}
|
|
30
|
-
RequestValidationError.prototype.serializeErrors = function () {
|
|
31
|
-
return this.errors.map(function (err) {
|
|
32
|
-
return { message: err.msg, field: err.param };
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
return RequestValidationError;
|
|
36
|
-
}(custom_error_1.CustomError));
|
|
37
|
-
exports.RequestValidationError = RequestValidationError;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.RequestValidationError = void 0;
|
|
19
|
+
var custom_error_1 = require("./custom-error");
|
|
20
|
+
var RequestValidationError = /** @class */ (function (_super) {
|
|
21
|
+
__extends(RequestValidationError, _super);
|
|
22
|
+
function RequestValidationError(errors) {
|
|
23
|
+
var _this = _super.call(this, 'Invalid request parameters') || this;
|
|
24
|
+
_this.errors = errors;
|
|
25
|
+
_this.statusCode = 400;
|
|
26
|
+
// Only because we are extending a built in class
|
|
27
|
+
Object.setPrototypeOf(_this, RequestValidationError.prototype);
|
|
28
|
+
return _this;
|
|
29
|
+
}
|
|
30
|
+
RequestValidationError.prototype.serializeErrors = function () {
|
|
31
|
+
return this.errors.map(function (err) {
|
|
32
|
+
return { message: err.msg, field: err.param };
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
return RequestValidationError;
|
|
36
|
+
}(custom_error_1.CustomError));
|
|
37
|
+
exports.RequestValidationError = RequestValidationError;
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import { Message, Stan } from 'node-nats-streaming';
|
|
2
|
-
import { Subjects } from './subjects';
|
|
3
|
-
interface Event {
|
|
4
|
-
subject: Subjects;
|
|
5
|
-
data: any;
|
|
6
|
-
}
|
|
7
|
-
export declare abstract class Listener<T extends Event> {
|
|
8
|
-
abstract subject: T['subject'];
|
|
9
|
-
abstract queueGroupName: string;
|
|
10
|
-
abstract onMessage(data: T['data'], msg: Message): void;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { Message, Stan } from 'node-nats-streaming';
|
|
2
|
+
import { Subjects } from './subjects';
|
|
3
|
+
interface Event {
|
|
4
|
+
subject: Subjects;
|
|
5
|
+
data: any;
|
|
6
|
+
}
|
|
7
|
+
export declare abstract class Listener<T extends Event> {
|
|
8
|
+
abstract subject: T['subject'];
|
|
9
|
+
abstract queueGroupName: string;
|
|
10
|
+
abstract onMessage(data: T['data'], msg: Message): void;
|
|
11
|
+
/**
|
|
12
|
+
* NATS streaming server will attempt redelivery of the message.
|
|
13
|
+
* This timeout interval is specified by the subscription option SubscriptionOptions#setAckWait(milliseconds),
|
|
14
|
+
* which defaults to 30 seconds.
|
|
15
|
+
*/
|
|
16
|
+
protected client: Stan;
|
|
17
|
+
protected ackWait: number;
|
|
18
|
+
constructor(client: Stan);
|
|
19
|
+
subscriptionOptions(): import("node-nats-streaming").SubscriptionOptions;
|
|
20
|
+
listen(): void;
|
|
21
|
+
parseMessage(msg: Message): any;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Listener = void 0;
|
|
4
|
-
var Listener = /** @class */ (function () {
|
|
5
|
-
function Listener(client) {
|
|
6
|
-
this.ackWait =
|
|
7
|
-
this.client = client;
|
|
8
|
-
}
|
|
9
|
-
Listener.prototype.subscriptionOptions = function () {
|
|
10
|
-
return this.client
|
|
11
|
-
.subscriptionOptions()
|
|
12
|
-
.setDeliverAllAvailable()
|
|
13
|
-
.setManualAckMode(true)
|
|
14
|
-
.setAckWait(this.ackWait)
|
|
15
|
-
.setDurableName(this.queueGroupName);
|
|
16
|
-
};
|
|
17
|
-
Listener.prototype.listen = function () {
|
|
18
|
-
var _this = this;
|
|
19
|
-
var subscription = this.client.subscribe(this.subject, this.queueGroupName, this.subscriptionOptions());
|
|
20
|
-
subscription.on('message', function (msg) {
|
|
21
|
-
console.log("Message received[".concat(msg.getSequence(), "]:").concat(_this.subject, "/").concat(_this.queueGroupName));
|
|
22
|
-
var parsedData = _this.parseMessage(msg);
|
|
23
|
-
_this.onMessage(parsedData, msg);
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
Listener.prototype.parseMessage = function (msg) {
|
|
27
|
-
var data = msg.getData();
|
|
28
|
-
return typeof data === 'string'
|
|
29
|
-
? JSON.parse(data)
|
|
30
|
-
: JSON.parse(data.toString('utf8'));
|
|
31
|
-
};
|
|
32
|
-
return Listener;
|
|
33
|
-
}());
|
|
34
|
-
exports.Listener = Listener;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Listener = void 0;
|
|
4
|
+
var Listener = /** @class */ (function () {
|
|
5
|
+
function Listener(client) {
|
|
6
|
+
this.ackWait = 60 * 1000 * 3; // NATS streaming server will attempt redelivery of the message after 3 minutes.
|
|
7
|
+
this.client = client;
|
|
8
|
+
}
|
|
9
|
+
Listener.prototype.subscriptionOptions = function () {
|
|
10
|
+
return this.client
|
|
11
|
+
.subscriptionOptions()
|
|
12
|
+
.setDeliverAllAvailable()
|
|
13
|
+
.setManualAckMode(true)
|
|
14
|
+
.setAckWait(this.ackWait)
|
|
15
|
+
.setDurableName(this.queueGroupName);
|
|
16
|
+
};
|
|
17
|
+
Listener.prototype.listen = function () {
|
|
18
|
+
var _this = this;
|
|
19
|
+
var subscription = this.client.subscribe(this.subject, this.queueGroupName, this.subscriptionOptions());
|
|
20
|
+
subscription.on('message', function (msg) {
|
|
21
|
+
console.log("Message received[".concat(msg.getSequence(), "]:").concat(_this.subject, "/").concat(_this.queueGroupName));
|
|
22
|
+
var parsedData = _this.parseMessage(msg);
|
|
23
|
+
_this.onMessage(parsedData, msg);
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
Listener.prototype.parseMessage = function (msg) {
|
|
27
|
+
var data = msg.getData();
|
|
28
|
+
return typeof data === 'string'
|
|
29
|
+
? JSON.parse(data)
|
|
30
|
+
: JSON.parse(data.toString('utf8'));
|
|
31
|
+
};
|
|
32
|
+
return Listener;
|
|
33
|
+
}());
|
|
34
|
+
exports.Listener = Listener;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Stan } from 'node-nats-streaming';
|
|
2
|
-
import { Subjects } from './subjects';
|
|
3
|
-
interface Event {
|
|
4
|
-
subject: Subjects;
|
|
5
|
-
data: any;
|
|
6
|
-
}
|
|
7
|
-
export declare abstract class Publisher<T extends Event> {
|
|
8
|
-
abstract subject: T['subject'];
|
|
9
|
-
protected client: Stan;
|
|
10
|
-
constructor(client: Stan);
|
|
11
|
-
publish(data: T['data']): Promise<void>;
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
1
|
+
import { Stan } from 'node-nats-streaming';
|
|
2
|
+
import { Subjects } from './subjects';
|
|
3
|
+
interface Event {
|
|
4
|
+
subject: Subjects;
|
|
5
|
+
data: any;
|
|
6
|
+
}
|
|
7
|
+
export declare abstract class Publisher<T extends Event> {
|
|
8
|
+
abstract subject: T['subject'];
|
|
9
|
+
protected client: Stan;
|
|
10
|
+
constructor(client: Stan);
|
|
11
|
+
publish(data: T['data']): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Publisher = void 0;
|
|
4
|
-
var Publisher = /** @class */ (function () {
|
|
5
|
-
function Publisher(client) {
|
|
6
|
-
this.client = client;
|
|
7
|
-
}
|
|
8
|
-
Publisher.prototype.publish = function (data) {
|
|
9
|
-
var _this = this;
|
|
10
|
-
return new Promise(function (resolve, reject) {
|
|
11
|
-
_this.client.publish(_this.subject, JSON.stringify(data), function (err, guid) {
|
|
12
|
-
if (err) {
|
|
13
|
-
reject('publish failed: ' + err);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
console.log("published message with guid:".concat(guid, " to subject:").concat(_this.subject));
|
|
17
|
-
resolve();
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
return Publisher;
|
|
23
|
-
}());
|
|
24
|
-
exports.Publisher = Publisher;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Publisher = void 0;
|
|
4
|
+
var Publisher = /** @class */ (function () {
|
|
5
|
+
function Publisher(client) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
}
|
|
8
|
+
Publisher.prototype.publish = function (data) {
|
|
9
|
+
var _this = this;
|
|
10
|
+
return new Promise(function (resolve, reject) {
|
|
11
|
+
_this.client.publish(_this.subject, JSON.stringify(data), function (err, guid) {
|
|
12
|
+
if (err) {
|
|
13
|
+
reject('publish failed: ' + err);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
console.log("published message with guid:".concat(guid, " to subject:").concat(_this.subject));
|
|
17
|
+
resolve();
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
return Publisher;
|
|
23
|
+
}());
|
|
24
|
+
exports.Publisher = Publisher;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
from - The email address of the sender. All email addresses can be plain ‘sender@server.com’ or formatted '“Sender Name” sender@server.com', see Address object for details
|
|
3
|
-
to - Comma separated list or an array of recipients email addresses that will appear on the To: field
|
|
4
|
-
cc - Comma separated list or an array of recipients email addresses that will appear on the Cc: field
|
|
5
|
-
bcc - Comma separated list or an array of recipients email addresses that will appear on the Bcc: field
|
|
6
|
-
subject - The subject of the email
|
|
7
|
-
text - The plaintext version of the message as an Unicode string, Buffer, Stream or an attachment-like object ({path: ‘/var/data/…'})
|
|
8
|
-
html - The HTML version of the message as an Unicode string, Buffer, Stream or an attachment-like object ({path: ‘http://…'})
|
|
9
|
-
*/
|
|
10
|
-
export interface ManualPayload {
|
|
11
|
-
to: string[];
|
|
12
|
-
cc: string[];
|
|
13
|
-
bcc: string[];
|
|
14
|
-
subject: string;
|
|
15
|
-
html: string;
|
|
16
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
from - The email address of the sender. All email addresses can be plain ‘sender@server.com’ or formatted '“Sender Name” sender@server.com', see Address object for details
|
|
3
|
+
to - Comma separated list or an array of recipients email addresses that will appear on the To: field
|
|
4
|
+
cc - Comma separated list or an array of recipients email addresses that will appear on the Cc: field
|
|
5
|
+
bcc - Comma separated list or an array of recipients email addresses that will appear on the Bcc: field
|
|
6
|
+
subject - The subject of the email
|
|
7
|
+
text - The plaintext version of the message as an Unicode string, Buffer, Stream or an attachment-like object ({path: ‘/var/data/…'})
|
|
8
|
+
html - The HTML version of the message as an Unicode string, Buffer, Stream or an attachment-like object ({path: ‘http://…'})
|
|
9
|
+
*/
|
|
10
|
+
export interface ManualPayload {
|
|
11
|
+
to: string[];
|
|
12
|
+
cc: string[];
|
|
13
|
+
bcc: string[];
|
|
14
|
+
subject: string;
|
|
15
|
+
html: string;
|
|
16
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
from - The email address of the sender. All email addresses can be plain ‘sender@server.com’ or formatted '“Sender Name” sender@server.com', see Address object for details
|
|
4
|
-
to - Comma separated list or an array of recipients email addresses that will appear on the To: field
|
|
5
|
-
cc - Comma separated list or an array of recipients email addresses that will appear on the Cc: field
|
|
6
|
-
bcc - Comma separated list or an array of recipients email addresses that will appear on the Bcc: field
|
|
7
|
-
subject - The subject of the email
|
|
8
|
-
text - The plaintext version of the message as an Unicode string, Buffer, Stream or an attachment-like object ({path: ‘/var/data/…'})
|
|
9
|
-
html - The HTML version of the message as an Unicode string, Buffer, Stream or an attachment-like object ({path: ‘http://…'})
|
|
10
|
-
*/
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
from - The email address of the sender. All email addresses can be plain ‘sender@server.com’ or formatted '“Sender Name” sender@server.com', see Address object for details
|
|
4
|
+
to - Comma separated list or an array of recipients email addresses that will appear on the To: field
|
|
5
|
+
cc - Comma separated list or an array of recipients email addresses that will appear on the Cc: field
|
|
6
|
+
bcc - Comma separated list or an array of recipients email addresses that will appear on the Bcc: field
|
|
7
|
+
subject - The subject of the email
|
|
8
|
+
text - The plaintext version of the message as an Unicode string, Buffer, Stream or an attachment-like object ({path: ‘/var/data/…'})
|
|
9
|
+
html - The HTML version of the message as an Unicode string, Buffer, Stream or an attachment-like object ({path: ‘http://…'})
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Subjects } from '../../subjects';
|
|
2
|
-
import { Contact } from '../contact';
|
|
3
|
-
/**
|
|
4
|
-
* prev
|
|
5
|
-
*/
|
|
6
|
-
interface NotifyBipeSyncPayload {
|
|
7
|
-
recipient: Contact;
|
|
8
|
-
updated: {
|
|
9
|
-
prev: Contact;
|
|
10
|
-
current: Contact;
|
|
11
|
-
}[];
|
|
12
|
-
}
|
|
13
|
-
export interface NotifyBipeSyncEvent {
|
|
14
|
-
subject: Subjects.NotifyBipeSync;
|
|
15
|
-
data: NotifyBipeSyncPayload;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
1
|
+
import { Subjects } from '../../subjects';
|
|
2
|
+
import { Contact } from '../contact';
|
|
3
|
+
/**
|
|
4
|
+
* prev
|
|
5
|
+
*/
|
|
6
|
+
interface NotifyBipeSyncPayload {
|
|
7
|
+
recipient: Contact;
|
|
8
|
+
updated: {
|
|
9
|
+
prev: Contact;
|
|
10
|
+
current: Contact;
|
|
11
|
+
}[];
|
|
12
|
+
}
|
|
13
|
+
export interface NotifyBipeSyncEvent {
|
|
14
|
+
subject: Subjects.NotifyBipeSync;
|
|
15
|
+
data: NotifyBipeSyncPayload;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Contact } from './contact';
|
|
2
|
-
import { notifyTypeValue } from './notify-type-value';
|
|
3
|
-
export interface NotifyBaseEventPayload {
|
|
4
|
-
recipient: Contact;
|
|
5
|
-
fromDate: string;
|
|
6
|
-
toDate: string;
|
|
7
|
-
reason: notifyTypeValue;
|
|
8
|
-
substitutes: Contact[];
|
|
9
|
-
comment: string;
|
|
10
|
-
}
|
|
1
|
+
import { Contact } from './contact';
|
|
2
|
+
import { notifyTypeValue } from './notify-type-value';
|
|
3
|
+
export interface NotifyBaseEventPayload {
|
|
4
|
+
recipient: Contact;
|
|
5
|
+
fromDate: string;
|
|
6
|
+
toDate: string;
|
|
7
|
+
reason: notifyTypeValue;
|
|
8
|
+
substitutes: Contact[];
|
|
9
|
+
comment: string;
|
|
10
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export interface CalendarEvent {
|
|
2
|
-
text: string;
|
|
3
|
-
UID: string;
|
|
4
|
-
DTSTAMP: string;
|
|
5
|
-
DTSTART: string;
|
|
6
|
-
DTEND: string;
|
|
7
|
-
X_MICROSOFT_CDO_ALLDAYEVENT: string;
|
|
8
|
-
X_MICROSOFT_MSNCALENDAR_ALLDAYEVENT: string;
|
|
9
|
-
}
|
|
1
|
+
export interface CalendarEvent {
|
|
2
|
+
text: string;
|
|
3
|
+
UID: string;
|
|
4
|
+
DTSTAMP: string;
|
|
5
|
+
DTSTART: string;
|
|
6
|
+
DTEND: string;
|
|
7
|
+
X_MICROSOFT_CDO_ALLDAYEVENT: string;
|
|
8
|
+
X_MICROSOFT_MSNCALENDAR_ALLDAYEVENT: string;
|
|
9
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export interface Contact {
|
|
2
|
-
id?: number;
|
|
3
|
-
email: string;
|
|
4
|
-
displayName: string;
|
|
5
|
-
type?: number;
|
|
6
|
-
role?: number;
|
|
7
|
-
serviceName?: string;
|
|
8
|
-
comment?: string;
|
|
9
|
-
}
|
|
1
|
+
export interface Contact {
|
|
2
|
+
id?: number;
|
|
3
|
+
email: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
type?: number;
|
|
6
|
+
role?: number;
|
|
7
|
+
serviceName?: string;
|
|
8
|
+
comment?: string;
|
|
9
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Subjects } from '../../subjects';
|
|
2
|
-
import { NotifyBaseEventPayload } from '../base-event-payload';
|
|
3
|
-
export interface NotifyGroupRemindedEvent {
|
|
4
|
-
subject: Subjects.NotifyGroupReminded;
|
|
5
|
-
data: NotifyBaseEventPayload;
|
|
6
|
-
}
|
|
1
|
+
import { Subjects } from '../../subjects';
|
|
2
|
+
import { NotifyBaseEventPayload } from '../base-event-payload';
|
|
3
|
+
export interface NotifyGroupRemindedEvent {
|
|
4
|
+
subject: Subjects.NotifyGroupReminded;
|
|
5
|
+
data: NotifyBaseEventPayload;
|
|
6
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Subjects } from '../../subjects';
|
|
2
|
-
import { NotifyBaseEventPayload } from '../base-event-payload';
|
|
3
|
-
import { Contact } from '../contact';
|
|
4
|
-
interface NotifyGroupRequestedPayload extends NotifyBaseEventPayload {
|
|
5
|
-
requestor: Contact;
|
|
6
|
-
approvals?: Contact[];
|
|
7
|
-
}
|
|
8
|
-
export interface NotifyGroupRequestedEvent {
|
|
9
|
-
subject: Subjects.NotifyGroupRequested;
|
|
10
|
-
data: NotifyGroupRequestedPayload;
|
|
11
|
-
}
|
|
12
|
-
export {};
|
|
1
|
+
import { Subjects } from '../../subjects';
|
|
2
|
+
import { NotifyBaseEventPayload } from '../base-event-payload';
|
|
3
|
+
import { Contact } from '../contact';
|
|
4
|
+
interface NotifyGroupRequestedPayload extends NotifyBaseEventPayload {
|
|
5
|
+
requestor: Contact;
|
|
6
|
+
approvals?: Contact[];
|
|
7
|
+
}
|
|
8
|
+
export interface NotifyGroupRequestedEvent {
|
|
9
|
+
subject: Subjects.NotifyGroupRequested;
|
|
10
|
+
data: NotifyGroupRequestedPayload;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export * from './requestor/absence-cancelled-event';
|
|
2
|
-
export * from './requestor/absence-created-event';
|
|
3
|
-
export * from './requestor/absence-updated-event';
|
|
4
|
-
export * from './requestor/approval-group-accepted-event';
|
|
5
|
-
export * from './requestor/approval-group-refused-event';
|
|
6
|
-
export * from './requestor/approval-service-accepted-event';
|
|
7
|
-
export * from './requestor/approval-service-refused-event';
|
|
8
|
-
export * from './requestor/approval-substitute-accepted-event';
|
|
9
|
-
export * from './requestor/approval-substitute-refused-event';
|
|
10
|
-
export * from './group/approval-group-reminded-event';
|
|
11
|
-
export * from './group/approval-group-requested-event';
|
|
12
|
-
export * from './service/approval-service-reminded-event';
|
|
13
|
-
export * from './service/approval-service-requested-event';
|
|
14
|
-
export * from './service/ts-validation-reported-event';
|
|
15
|
-
export * from './substitute/approval-substitute-reminded-event';
|
|
16
|
-
export * from './substitute/approval-substitute-requested-event';
|
|
17
|
-
export * from './substitute/information-substitute-reminded-event';
|
|
18
|
-
export * from './member/ts-validation-reminded-event';
|
|
19
|
-
export * from './notify-completed-event';
|
|
20
|
-
export * from './notify-type-value';
|
|
21
|
-
export * from './manual/manual-event';
|
|
22
|
-
export * from './admin/bipe-sync-event';
|
|
23
|
-
export * from './member/annual-vacation-info-event';
|
|
1
|
+
export * from './requestor/absence-cancelled-event';
|
|
2
|
+
export * from './requestor/absence-created-event';
|
|
3
|
+
export * from './requestor/absence-updated-event';
|
|
4
|
+
export * from './requestor/approval-group-accepted-event';
|
|
5
|
+
export * from './requestor/approval-group-refused-event';
|
|
6
|
+
export * from './requestor/approval-service-accepted-event';
|
|
7
|
+
export * from './requestor/approval-service-refused-event';
|
|
8
|
+
export * from './requestor/approval-substitute-accepted-event';
|
|
9
|
+
export * from './requestor/approval-substitute-refused-event';
|
|
10
|
+
export * from './group/approval-group-reminded-event';
|
|
11
|
+
export * from './group/approval-group-requested-event';
|
|
12
|
+
export * from './service/approval-service-reminded-event';
|
|
13
|
+
export * from './service/approval-service-requested-event';
|
|
14
|
+
export * from './service/ts-validation-reported-event';
|
|
15
|
+
export * from './substitute/approval-substitute-reminded-event';
|
|
16
|
+
export * from './substitute/approval-substitute-requested-event';
|
|
17
|
+
export * from './substitute/information-substitute-reminded-event';
|
|
18
|
+
export * from './member/ts-validation-reminded-event';
|
|
19
|
+
export * from './notify-completed-event';
|
|
20
|
+
export * from './notify-type-value';
|
|
21
|
+
export * from './manual/manual-event';
|
|
22
|
+
export * from './admin/bipe-sync-event';
|
|
23
|
+
export * from './member/annual-vacation-info-event';
|