@orangewall/customer-notifications-util 0.0.1 → 0.0.3
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.
|
@@ -22,6 +22,7 @@ const config_1 = __importDefault(require("config"));
|
|
|
22
22
|
*/
|
|
23
23
|
function sendCustomerNotification(messages, topicArn) {
|
|
24
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
console.log('Info: sendCustomerNotification is called with messages and topiArn: ', JSON.stringify(messages), topicArn);
|
|
25
26
|
try {
|
|
26
27
|
const snsClient = new client_sns_1.SNSClient(); // Default credentials and region from the environment
|
|
27
28
|
if (!topicArn) {
|
|
@@ -49,6 +50,7 @@ function _sendMessage(message, topicArn, snsClient) {
|
|
|
49
50
|
Message: JSON.stringify(message),
|
|
50
51
|
MessageAttributes: {},
|
|
51
52
|
};
|
|
53
|
+
console.log('Info: Message being pushed to SNS with these params: ', JSON.stringify(params));
|
|
52
54
|
const command = new client_sns_1.PublishCommand(params);
|
|
53
55
|
return snsClient.send(command);
|
|
54
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/customer-notifications/index.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/customer-notifications/index.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAoBnG"}
|
|
@@ -6,6 +6,7 @@ import config from 'config';
|
|
|
6
6
|
* @returns {Promise} - Resolves with the SNS publish result.
|
|
7
7
|
*/
|
|
8
8
|
export async function sendCustomerNotification(messages, topicArn) {
|
|
9
|
+
console.log('Info: sendCustomerNotification is called with messages and topiArn: ', JSON.stringify(messages), topicArn);
|
|
9
10
|
try {
|
|
10
11
|
const snsClient = new SNSClient(); // Default credentials and region from the environment
|
|
11
12
|
if (!topicArn) {
|
|
@@ -31,6 +32,7 @@ function _sendMessage(message, topicArn, snsClient) {
|
|
|
31
32
|
Message: JSON.stringify(message),
|
|
32
33
|
MessageAttributes: {},
|
|
33
34
|
};
|
|
35
|
+
console.log('Info: Message being pushed to SNS with these params: ', JSON.stringify(params));
|
|
34
36
|
const command = new PublishCommand(params);
|
|
35
37
|
return snsClient.send(command);
|
|
36
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/customer-notifications/index.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/customer-notifications/index.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAoBnG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orangewall/customer-notifications-util",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "library to send customer notifications ",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -27,7 +27,10 @@
|
|
|
27
27
|
"test": "mocha",
|
|
28
28
|
"semantic-release": "semantic-release",
|
|
29
29
|
"prepack": "npm run build",
|
|
30
|
-
"publish": "npm run build && npm publish --access public"
|
|
30
|
+
"publish": "npm run build && npm publish --access public",
|
|
31
|
+
"release:major": "npm version major && git push && git push --tags",
|
|
32
|
+
"release:minor": "npm version minor && git push && git push --tags",
|
|
33
|
+
"release:patch": "npm version patch && git push && git push --tags"
|
|
31
34
|
},
|
|
32
35
|
"release": {
|
|
33
36
|
"branches": [
|