@sitel/common 1.0.87 → 1.0.91
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 +32 -32
- package/build/errors/custom-error.d.ts +8 -8
- package/build/errors/custom-error.js +26 -26
- package/build/errors/database-connection-error.d.ts +9 -9
- package/build/errors/database-connection-error.js +32 -32
- package/build/errors/not-authorized-error.d.ts +9 -9
- package/build/errors/not-authorized-error.js +32 -32
- package/build/errors/not-found-error.d.ts +8 -8
- package/build/errors/not-found-error.js +31 -31
- package/build/errors/person-substitute-not-available-error.d.ts +9 -9
- package/build/errors/person-substitute-not-available-error.js +32 -32
- package/build/errors/request-validation-error.d.ts +11 -11
- package/build/errors/request-validation-error.js +35 -35
- package/build/events/base-listener.d.ts +18 -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/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/extra/extra-manuel-payload.d.ts +16 -0
- package/build/events/notify/extra/extra-manuel-payload.js +11 -0
- package/build/events/notify/extra/index.d.ts +2 -0
- package/build/events/notify/extra/index.js +14 -0
- package/build/events/notify/extra/notify-manuel-event.d.ts +6 -0
- package/build/events/notify/extra/notify-manuel-event.js +2 -0
- package/build/events/notify/extra/worker-manuel-event.d.ts +6 -0
- package/build/events/notify/extra/worker-manuel-event.js +2 -0
- 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 +21 -20
- package/build/events/notify/index.js +33 -32
- 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 -20
- package/build/events/notify/notify-type-value.js +25 -24
- 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/config-person-created-event.d.ts +7 -7
- package/build/events/presence/config-person-created-event.js +2 -2
- package/build/events/presence/config-person-updated-event.d.ts +7 -7
- package/build/events/presence/config-person-updated-event.js +2 -2
- package/build/events/presence/index.d.ts +2 -2
- package/build/events/presence/index.js +14 -14
- package/build/events/subjects.d.ts +45 -39
- package/build/events/subjects.js +64 -58
- 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 +4 -4
- package/build/events/worker/index.js +16 -16
- package/build/index.d.ts +22 -22
- package/build/index.js +34 -34
- 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 +17 -17
- 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 +1 -1
|
@@ -1,32 +1,32 @@
|
|
|
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
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.PersonOrSubstituteNotAvailableError = void 0;
|
|
17
|
-
var custom_error_1 = require("./custom-error");
|
|
18
|
-
var PersonOrSubstituteNotAvailableError = /** @class */ (function (_super) {
|
|
19
|
-
__extends(PersonOrSubstituteNotAvailableError, _super);
|
|
20
|
-
function PersonOrSubstituteNotAvailableError(message) {
|
|
21
|
-
var _this = _super.call(this, message) || this;
|
|
22
|
-
_this.message = message;
|
|
23
|
-
_this.statusCode = 409;
|
|
24
|
-
Object.setPrototypeOf(_this, PersonOrSubstituteNotAvailableError.prototype);
|
|
25
|
-
return _this;
|
|
26
|
-
}
|
|
27
|
-
PersonOrSubstituteNotAvailableError.prototype.serializeErrors = function () {
|
|
28
|
-
return [{ message: this.message }];
|
|
29
|
-
};
|
|
30
|
-
return PersonOrSubstituteNotAvailableError;
|
|
31
|
-
}(custom_error_1.CustomError));
|
|
32
|
-
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
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PersonOrSubstituteNotAvailableError = void 0;
|
|
17
|
+
var custom_error_1 = require("./custom-error");
|
|
18
|
+
var PersonOrSubstituteNotAvailableError = /** @class */ (function (_super) {
|
|
19
|
+
__extends(PersonOrSubstituteNotAvailableError, _super);
|
|
20
|
+
function PersonOrSubstituteNotAvailableError(message) {
|
|
21
|
+
var _this = _super.call(this, message) || this;
|
|
22
|
+
_this.message = message;
|
|
23
|
+
_this.statusCode = 409;
|
|
24
|
+
Object.setPrototypeOf(_this, PersonOrSubstituteNotAvailableError.prototype);
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
PersonOrSubstituteNotAvailableError.prototype.serializeErrors = function () {
|
|
28
|
+
return [{ message: this.message }];
|
|
29
|
+
};
|
|
30
|
+
return PersonOrSubstituteNotAvailableError;
|
|
31
|
+
}(custom_error_1.CustomError));
|
|
32
|
+
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,35 +1,35 @@
|
|
|
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
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.RequestValidationError = void 0;
|
|
17
|
-
var custom_error_1 = require("./custom-error");
|
|
18
|
-
var RequestValidationError = /** @class */ (function (_super) {
|
|
19
|
-
__extends(RequestValidationError, _super);
|
|
20
|
-
function RequestValidationError(errors) {
|
|
21
|
-
var _this = _super.call(this, 'Invalid request parameters') || this;
|
|
22
|
-
_this.errors = errors;
|
|
23
|
-
_this.statusCode = 400;
|
|
24
|
-
// Only because we are extending a built in class
|
|
25
|
-
Object.setPrototypeOf(_this, RequestValidationError.prototype);
|
|
26
|
-
return _this;
|
|
27
|
-
}
|
|
28
|
-
RequestValidationError.prototype.serializeErrors = function () {
|
|
29
|
-
return this.errors.map(function (err) {
|
|
30
|
-
return { message: err.msg, field: err.param };
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
return RequestValidationError;
|
|
34
|
-
}(custom_error_1.CustomError));
|
|
35
|
-
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
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.RequestValidationError = void 0;
|
|
17
|
+
var custom_error_1 = require("./custom-error");
|
|
18
|
+
var RequestValidationError = /** @class */ (function (_super) {
|
|
19
|
+
__extends(RequestValidationError, _super);
|
|
20
|
+
function RequestValidationError(errors) {
|
|
21
|
+
var _this = _super.call(this, 'Invalid request parameters') || this;
|
|
22
|
+
_this.errors = errors;
|
|
23
|
+
_this.statusCode = 400;
|
|
24
|
+
// Only because we are extending a built in class
|
|
25
|
+
Object.setPrototypeOf(_this, RequestValidationError.prototype);
|
|
26
|
+
return _this;
|
|
27
|
+
}
|
|
28
|
+
RequestValidationError.prototype.serializeErrors = function () {
|
|
29
|
+
return this.errors.map(function (err) {
|
|
30
|
+
return { message: err.msg, field: err.param };
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
return RequestValidationError;
|
|
34
|
+
}(custom_error_1.CustomError));
|
|
35
|
+
exports.RequestValidationError = RequestValidationError;
|
|
@@ -1,18 +1,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
|
-
protected client: Stan;
|
|
12
|
-
protected ackWait: number;
|
|
13
|
-
constructor(client: Stan);
|
|
14
|
-
subscriptionOptions(): import("node-nats-streaming").SubscriptionOptions;
|
|
15
|
-
listen(): void;
|
|
16
|
-
parseMessage(msg: Message): any;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
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
|
+
protected client: Stan;
|
|
12
|
+
protected ackWait: number;
|
|
13
|
+
constructor(client: Stan);
|
|
14
|
+
subscriptionOptions(): import("node-nats-streaming").SubscriptionOptions;
|
|
15
|
+
listen(): void;
|
|
16
|
+
parseMessage(msg: Message): any;
|
|
17
|
+
}
|
|
18
|
+
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 = 5 * 1000;
|
|
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[" + msg.getSequence() + "]:" + _this.subject + "/" + _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 = 5 * 1000;
|
|
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[" + msg.getSequence() + "]:" + _this.subject + "/" + _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:" + guid + " to subject:" + _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:" + guid + " to subject:" + _this.subject);
|
|
17
|
+
resolve();
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
return Publisher;
|
|
23
|
+
}());
|
|
24
|
+
exports.Publisher = Publisher;
|
|
@@ -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 });
|
|
@@ -0,0 +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 ExtraManuelPaylod {
|
|
11
|
+
to: string[];
|
|
12
|
+
cc: string[];
|
|
13
|
+
bcc: string[];
|
|
14
|
+
subject: string;
|
|
15
|
+
html: string;
|
|
16
|
+
}
|
|
@@ -0,0 +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 });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./notify-manuel-event"), exports);
|
|
14
|
+
__exportStar(require("./worker-manuel-event"), exports);
|
|
@@ -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,20 +1,21 @@
|
|
|
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';
|
|
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 './extra';
|