1.3.23 • Published 11 months ago

@veterancrowd/wrapped-sns-client v1.3.23

Weekly downloads
-
License
-
Repository
github
Last release
11 months ago

Backup Status

wrapped-sns-client

This package wraps the SNS Client - AWS SDK for JavaScript v3 to provide consistent logging and other services.

API Documentation

wrapped-sns-client

wrapped-sns-client.WrappedSnsClient

Wraps an AWS SNS client to provide standard logging & services.

Kind: static class of wrapped-sns-client

new exports.WrappedSnsClient(options)

WrappedSnsClient constructor.

ParamTypeDescription
optionsobjectOptions.
options.loggerobjectLogger instance (default is global console object). Must have info, error & debug methods
options.logInternalsbooleanLog AWS client internals (default is false).
options.configobjectSNSClientConfig.

wrappedSnsClient.createTopic(topicName, attributes) ⇒ Promise.<string>

Create SNS topic.

Kind: instance method of WrappedSnsClient
Returns: Promise.<string> - Topic ARN.

ParamTypeDescription
topicNamestringTopic name.
attributesobjectTopic attributes (see reference).

wrappedSnsClient.deleteTopic(topicArn) ⇒ Promise.<boolean>

Delete SNS topic.

Kind: instance method of WrappedSnsClient
Returns: Promise.<boolean> - True if successful.

ParamTypeDescription
topicArnstringTopic ARN.

wrappedSnsClient.getTopicAttributes(topicArn) ⇒ Promise.<object>

Get SNS topic attributes.

Kind: instance method of WrappedSnsClient
Returns: Promise.<object> - Topic attributes.

ParamTypeDescription
topicArnstringTopic ARN.

wrappedSnsClient.publish(options) ⇒ Promise.<string>

Publish message to SNS.

Kind: instance method of WrappedSnsClient
Returns: Promise.<string> - Message ID.

ParamTypeDescription
optionsobjectPublish options.
options.attributesDecodedMessageAttributesMessage attributes.
options.messageobject | stringMessage content.
options.messageStructureobjectMessage structure.
options.phoneNumberobjectPhone number.
options.subjectstringSubject
options.targetArnstringTarget ARN
options.topicArnstringTopic ARN

wrappedSnsClient.crudOperationHandler(topicArn, indexToken, getEntity) ⇒ function

Generate a DynamoDB Streams CRUD Operation Lambda event handler.

Kind: instance method of WrappedSnsClient
Returns: function - Event handler.

ParamTypeDescription
topicArnstringTopic ARN
indexTokenstringIndex token.
getEntityGetEntityCallbackget entity callback.

WrappedSnsClient.decodeMessageAttributes(attributes) ⇒ DecodedMessageAttributes

Decode message attributes from SNS.

Kind: static method of WrappedSnsClient
Returns: DecodedMessageAttributes - Decoded message attributes.

ParamTypeDescription
attributesEncodedMessageAttributesEncoded message attributes.

WrappedSnsClient.encodeMessageAttributes(attributes) ⇒ EncodedMessageAttributes

Encode message attributes for SNS.

Kind: static method of WrappedSnsClient
Returns: EncodedMessageAttributes - Encoded message attributes.

ParamTypeDescription
attributesDecodedMessageAttributesDecoded message attributes.

wrapped-sns-client~DecodedMessageAttributes : Object.<string, (string|number)>

Kind: inner typedef of wrapped-sns-client

wrapped-sns-client~EncodedMessageAttributes : Object.<string, object>

Kind: inner typedef of wrapped-sns-client

wrapped-sns-client~GetEntityCallback ⇒ string

Extract entity token from index value.

Kind: inner typedef of wrapped-sns-client
Returns: string - Entity token.

ParamTypeDescription
indexValuestringIndex value.

See more great templates and other tools on my GitHub Profile!

1.3.21

12 months ago

1.3.22

11 months ago

1.3.23

11 months ago

1.3.19

1 year ago

1.3.20

1 year ago

1.3.18

1 year ago

1.3.17

1 year ago

1.3.16

1 year ago

1.3.15

1 year ago

1.3.14

1 year ago

1.3.13

1 year ago

1.3.12

1 year ago

1.3.11

1 year ago

1.3.10

1 year ago

1.3.9

1 year ago

1.3.8

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.2.4

2 years ago

1.3.2

2 years ago

1.2.3

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.2

2 years ago

1.2.0

2 years ago

1.2.0-0

2 years ago

1.2.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.1.0

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago