easywork-common-lib 1.0.485 → 1.0.486
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AmqpConnection } from "@golevelup/nestjs-rabbitmq";
|
|
2
2
|
import type { calendar_v3 } from "googleapis";
|
|
3
|
-
interface
|
|
3
|
+
interface GeneralData {
|
|
4
4
|
userInfo: {
|
|
5
5
|
userId: string;
|
|
6
6
|
token: string;
|
|
@@ -11,12 +11,23 @@ interface Data {
|
|
|
11
11
|
};
|
|
12
12
|
eventGoogle: calendar_v3.Schema$Event;
|
|
13
13
|
}
|
|
14
|
+
interface DeleteData {
|
|
15
|
+
userInfo: {
|
|
16
|
+
userId: string;
|
|
17
|
+
token: string;
|
|
18
|
+
oauthId: string;
|
|
19
|
+
};
|
|
20
|
+
event: {
|
|
21
|
+
id: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
14
24
|
export declare class EasyEventService {
|
|
15
25
|
private readonly amqpConnection;
|
|
16
26
|
private readonly exchangeName;
|
|
17
27
|
private readonly routingKey;
|
|
18
28
|
constructor(amqpConnection: AmqpConnection, exchangeName: string, routingKey: string);
|
|
19
|
-
createEvent(data:
|
|
20
|
-
updateEvent(data:
|
|
29
|
+
createEvent(data: GeneralData): Promise<void>;
|
|
30
|
+
updateEvent(data: GeneralData): Promise<void>;
|
|
31
|
+
deleteEvent(data: DeleteData): Promise<void>;
|
|
21
32
|
}
|
|
22
33
|
export {};
|
|
@@ -33,6 +33,10 @@ let EasyEventService = class EasyEventService {
|
|
|
33
33
|
logger.debug(`Updating event...`, this.exchangeName, this.routingKey);
|
|
34
34
|
await this.amqpConnection.publish(this.exchangeName, this.routingKey, data);
|
|
35
35
|
}
|
|
36
|
+
async deleteEvent(data) {
|
|
37
|
+
logger.debug(`Updating event...`, this.exchangeName, this.routingKey);
|
|
38
|
+
await this.amqpConnection.publish(this.exchangeName, this.routingKey, data);
|
|
39
|
+
}
|
|
36
40
|
};
|
|
37
41
|
exports.EasyEventService = EasyEventService;
|
|
38
42
|
exports.EasyEventService = EasyEventService = __decorate([
|
|
@@ -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;
|
|
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;IACI;IAHhD,YACmB,cAA8B,EACL,YAAoB,EAChB,UAAkB;QAF/C,mBAAc,GAAd,cAAc,CAAgB;QACL,iBAAY,GAAZ,YAAY,CAAQ;QAChB,eAAU,GAAV,UAAU,CAAQ;IAC/D,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,IAAiB;QACjC,MAAM,CAAC,KAAK,CAAC,yBAAyB,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC5E,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC9E,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAiB;QACjC,MAAM,CAAC,KAAK,CAAC,mBAAmB,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACtE,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC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