@apipass/event-notification 0.0.20-alpha.0 → 0.0.23-alpha.0
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.
|
@@ -6,6 +6,6 @@ export declare class AWSEventNotificationService implements EventNotificationSer
|
|
|
6
6
|
private accountId;
|
|
7
7
|
private environment;
|
|
8
8
|
constructor(options: AWSEventNotificationOptions);
|
|
9
|
-
notifyEvent(eventName: string, content?:
|
|
9
|
+
notifyEvent(eventName: string, content?: any): void;
|
|
10
10
|
static getTopicArn(eventName: string, region: string, accountId: string, environment: string): string;
|
|
11
11
|
}
|
|
@@ -27,7 +27,7 @@ let AWSEventNotificationService = AWSEventNotificationService_1 = class AWSEvent
|
|
|
27
27
|
}
|
|
28
28
|
notifyEvent(eventName, content) {
|
|
29
29
|
const TopicArn = AWSEventNotificationService_1.getTopicArn(eventName, this.region, this.accountId, this.environment);
|
|
30
|
-
new sns.SNSClient({ region: this.region }).send(new sns.PublishCommand({ TopicArn: TopicArn, Message: content }));
|
|
30
|
+
new sns.SNSClient({ region: this.region }).send(new sns.PublishCommand({ TopicArn: TopicArn, Message: JSON.stringify(content) }));
|
|
31
31
|
this.logger.warn(`Message send to topic: ${TopicArn}`);
|
|
32
32
|
}
|
|
33
33
|
static getTopicArn(eventName, region, accountId, environment) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aws-event-notification.service.js","sourceRoot":"","sources":["../src/aws-event-notification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA2C;AAC3C,2CAA4D;AAC5D,iFAA2E;AAC3E,6EAA2E;AAIpE,IAAM,2BAA2B,mCAAjC,MAAM,2BAA2B;IAOpC,YAA+C,OAAoC;QANlE,WAAM,GAAG,IAAI,eAAM,CAAC,6BAA2B,CAAC,IAAI,CAAC,CAAC;QAOnE,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,SAAS,GA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S,IAAI,WAAW,EAAE,CAAA;IAC3E,CAAC;CAEJ,CAAA;AAvBY,2BAA2B;IADvC,IAAA,mBAAU,GAAE;IAQI,WAAA,IAAA,eAAM,EAAC,wDAAyB,CAAC,CAAA;qCAAU,wDAA2B;GAP1E,2BAA2B,CAuBvC;AAvBY,kEAA2B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apipass/event-notification",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23-alpha.0",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Nathan Lemos <nathan@apipass.com.br>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"tsc": "tsc"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "5ff21e34a728e8e3c72f98f1c8ad27916b1c5472"
|
|
29
29
|
}
|