0.5.9 • Published 11 months ago

@veterancrowd/wrapped-sqs-client v0.5.9

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

Backup Status

WrappedSqsClient

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

API Documentation

WrappedSqsClient

WrappedSqsClient.WrappedSqsClient

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

Kind: static class of WrappedSqsClient

new exports.WrappedSqsClient(options)

WrappedSqsClient constructor.

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

wrappedSqsClient.queueInitialized ⇒ boolean

Returns true if queue has been initialized.

Kind: instance property of WrappedSqsClient
Returns: boolean - True if the queue has been initialized.

wrappedSqsClient.queueName ⇒ string

Gets queue name.

Kind: instance property of WrappedSqsClient
Returns: string - Queue name.

wrappedSqsClient.queueUrl ⇒ string

Gets the queue URL.

Kind: instance property of WrappedSqsClient
Returns: string - Queue URL.

wrappedSqsClient.createQueue(queueName, attributes, tags) ⇒ Promise.<WrappedSqsClient>

Creates a new queue.

Kind: instance method of WrappedSqsClient
Returns: Promise.<WrappedSqsClient> - WrappedSqsClient instance.

ParamTypeDescription
queueNamestringQueue name
attributesObject.<string, string>CreateQueueCommandInput attributes
tagsObject.<string, string>CreateQueueCommandInput tags

wrappedSqsClient.deleteQueue() ⇒ Promise.<WrappedSqsClient>

Deletes a queue.

Kind: instance method of WrappedSqsClient
Returns: Promise.<WrappedSqsClient> - WrappedSqsClient instance.

wrappedSqsClient.deleteMessageBatch(messages) ⇒ Promise.<WrappedSqsClient>

Deletes a message batch.

Kind: instance method of WrappedSqsClient
Returns: Promise.<WrappedSqsClient> - WrappedSqsClient instance.

ParamTypeDescription
messagesArray.<object>Messages to delete.

wrappedSqsClient.getQueue(queueName) ⇒ Promise.<WrappedSqsClient>

Get existing queue by name.

Kind: instance method of WrappedSqsClient
Returns: Promise.<WrappedSqsClient> - WrappedSqsClient instance.

ParamTypeDescription
queueNamestringQueue name.

wrappedSqsClient.getQueueAttributes(attributeNames) ⇒ Promise.<object>

Get queue attributes.

Kind: instance method of WrappedSqsClient
Returns: Promise.<object> - Queue attributes.

ParamTypeDescription
attributeNamesArray.<string>GetQueueAttributesCommand

wrappedSqsClient.purgeQueue() ⇒ Promise.<WrappedSqsClient>

Purge queue.

Kind: instance method of WrappedSqsClient
Returns: Promise.<WrappedSqsClient> - WrappedSqsClient instance.

wrappedSqsClient.queueExists(queueName) ⇒ Promise.<boolean>

Test queue existence by name.

Kind: instance method of WrappedSqsClient
Returns: Promise.<boolean> - True if queue exists.

ParamTypeDescription
queueNamestringQueue name.

wrappedSqsClient.receiveMessages(options) ⇒ Promise.<Array.<{messageId: string, body: any, attributes: Object.<string, string>}>>

Receive queue messages.

Kind: instance method of WrappedSqsClient
Returns: Promise.<Array.<{messageId: string, body: any, attributes: Object.<string, string>}>> - Array of messages.

ParamTypeDescription
optionsobjectOptions.
options.limitnumberMaximum number of messages to receive.

wrappedSqsClient.sendMessage(options) ⇒ Promise.<WrappedSqsClient>

Sends a message.

Kind: instance method of WrappedSqsClient
Returns: Promise.<WrappedSqsClient> - WrappedSqsClient instance.

ParamTypeDescription
optionsobjectOptions.
options.body*SendMessageCommandInput messageBody. Must be a string or a JSON-serializable object.
options.deduplicationIdstringSendMessageCommandInput messageDeduplicationId
options.delaySecondsnumberDelay in seconds.
options.groupIdstringSendMessageCommandInput messageGroupId
options.messageAttributesDecodedMessageAttributesMessage attributes.
options.systemAttributesDecodedMessageAttributesSendMessageCommandInput messageSystemAttributes

wrappedSqsClient.sendMessageBatch(entries) ⇒ Promise.<WrappedSqsClient>

Sends a message batch.

Kind: instance method of WrappedSqsClient
Returns: Promise.<WrappedSqsClient> - WrappedSqsClient instance.

ParamTypeDescription
entriesArray.<SendMessageBatchRequestEntry>Entries.

WrappedSqsClient.decodeMessage(message) ⇒ object

Decode message from SQS.

Kind: static method of WrappedSqsClient
Returns: object - Decoded message.

ParamTypeDescription
messageobjectEncoded message.

WrappedSqsClient.decodeMessageAttributes(attributes) ⇒ DecodedMessageAttributes

Decode message attributes from SQS.

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

ParamTypeDescription
attributesEncodedMessageAttributesEncoded message attributes.

WrappedSqsClient.encodeMessageAttributes(attributes) ⇒ EncodedMessageAttributes

Encode message attributes for SQS.

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

ParamTypeDescription
attributesDecodedMessageAttributesDecoded message attributes.

WrappedSqsClient~defaultClientConfig : SQSClientConfig

Kind: inner constant of WrappedSqsClient

WrappedSqsClient~DecodedMessageAttributes : Object.<string, (string|number)>

Kind: inner typedef of WrappedSqsClient

WrappedSqsClient~EncodedMessageAttributes : Object.<string, MessageAttributeValue>

Kind: inner typedef of WrappedSqsClient

WrappedSqsClient~SendMessageBatchRequestEntry : object

Kind: inner typedef of WrappedSqsClient
Properties

NameTypeDescription
body*SendMessageCommandInput messageBody. Must be a string or a JSON-serializable object.
deduplicationIdstringSendMessageCommandInput messageDeduplicationId
delaySecondsnumberDelay in seconds.
groupIdstringSendMessageCommandInput messageGroupId
idstringMessage ID.
messageAttributesDecodedMessageAttributesMessage attributes.
systemAttributesDecodedMessageAttributesSendMessageCommandInput messageSystemAttributes

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

0.5.8

11 months ago

0.5.7

12 months ago

0.5.9

11 months ago

0.5.6

1 year ago

0.5.5

1 year ago

0.5.4

1 year ago

0.5.3

1 year ago

0.5.2

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago

0.4.15

1 year ago

0.4.14

1 year ago

0.4.13

1 year ago

0.4.12

1 year ago

0.4.11

1 year ago

0.4.10

1 year ago

0.4.9

1 year ago

0.4.8

2 years ago

0.4.5

2 years ago

0.4.4

2 years ago

0.3.5

2 years ago

0.4.7

2 years ago

0.4.6

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.3

2 years ago

0.3.4

2 years ago

0.4.2

2 years ago

0.3.2

2 years ago

0.3.3

2 years ago

0.3.0-0

2 years ago

0.3.0

2 years ago

0.3.1

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.1.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.0.9

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago