easywork-common-lib 1.0.487 → 1.0.489
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.
|
@@ -18,14 +18,13 @@ interface DeleteData {
|
|
|
18
18
|
oauthId: string;
|
|
19
19
|
};
|
|
20
20
|
event: {
|
|
21
|
-
|
|
21
|
+
googleId: string;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
export declare class EasyEventService {
|
|
25
25
|
private readonly amqpConnection;
|
|
26
26
|
private readonly exchangeName;
|
|
27
|
-
|
|
28
|
-
constructor(amqpConnection: AmqpConnection, exchangeName: string, routingKey: string);
|
|
27
|
+
constructor(amqpConnection: AmqpConnection, exchangeName: string);
|
|
29
28
|
createEvent(data: GeneralData): Promise<void>;
|
|
30
29
|
updateEvent(data: GeneralData): Promise<void>;
|
|
31
30
|
deleteEvent(data: DeleteData): Promise<void>;
|
|
@@ -19,30 +19,27 @@ const logger = new common_1.Logger("EasyEventService");
|
|
|
19
19
|
let EasyEventService = class EasyEventService {
|
|
20
20
|
amqpConnection;
|
|
21
21
|
exchangeName;
|
|
22
|
-
|
|
23
|
-
constructor(amqpConnection, exchangeName, routingKey) {
|
|
22
|
+
constructor(amqpConnection, exchangeName) {
|
|
24
23
|
this.amqpConnection = amqpConnection;
|
|
25
24
|
this.exchangeName = exchangeName;
|
|
26
|
-
this.routingKey = routingKey;
|
|
27
25
|
}
|
|
28
26
|
async createEvent(data) {
|
|
29
|
-
logger.debug(`Creating a new event...`, this.exchangeName,
|
|
30
|
-
await this.amqpConnection.publish(this.exchangeName,
|
|
27
|
+
logger.debug(`Creating a new event...`, this.exchangeName, "event.create");
|
|
28
|
+
await this.amqpConnection.publish(this.exchangeName, "event.create", data);
|
|
31
29
|
}
|
|
32
30
|
async updateEvent(data) {
|
|
33
|
-
logger.debug(`Updating event...`, this.exchangeName,
|
|
34
|
-
await this.amqpConnection.publish(this.exchangeName,
|
|
31
|
+
logger.debug(`Updating event...`, this.exchangeName, "event.update");
|
|
32
|
+
await this.amqpConnection.publish(this.exchangeName, "event.update", data);
|
|
35
33
|
}
|
|
36
34
|
async deleteEvent(data) {
|
|
37
|
-
logger.debug(`Deleting event...`, this.exchangeName,
|
|
38
|
-
await this.amqpConnection.publish(this.exchangeName,
|
|
35
|
+
logger.debug(`Deleting event...`, this.exchangeName, "event.delete");
|
|
36
|
+
await this.amqpConnection.publish(this.exchangeName, "event.delete", data);
|
|
39
37
|
}
|
|
40
38
|
};
|
|
41
39
|
exports.EasyEventService = EasyEventService;
|
|
42
40
|
exports.EasyEventService = EasyEventService = __decorate([
|
|
43
41
|
(0, common_1.Injectable)(),
|
|
44
42
|
__param(1, (0, common_1.Inject)("EXCHANGE_NAME")),
|
|
45
|
-
|
|
46
|
-
__metadata("design:paramtypes", [nestjs_rabbitmq_1.AmqpConnection, String, String])
|
|
43
|
+
__metadata("design:paramtypes", [nestjs_rabbitmq_1.AmqpConnection, String])
|
|
47
44
|
], EasyEventService);
|
|
48
45
|
//# sourceMappingURL=event.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.service.js","sourceRoot":"","sources":["../../../src/modules/queue/event.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAA4D;AAC5D,2CAA4D;AAG5D,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAkB,CAAC,CAAC;AA0BvC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAER;IACyB;
|
|
1
|
+
{"version":3,"file":"event.service.js","sourceRoot":"","sources":["../../../src/modules/queue/event.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAA4D;AAC5D,2CAA4D;AAG5D,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAkB,CAAC,CAAC;AA0BvC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAER;IACyB;IAF5C,YACmB,cAA8B,EACL,YAAoB;QAD7C,mBAAc,GAAd,cAAc,C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