npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@veterancrowd/wrapped-sqs-client

v0.5.9

Published

An AWS SQS client wrapped to provide consistent logging and other services.

Downloads

18

Readme

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.

| Param | Type | Description | | --- | --- | --- | | [options] | object | Options. | | [options.config] | SQSClientConfig | SQSClientConfig. | | [options.logger] | object | Logger instance (default is global console object). Must have info, error & debug methods | | [options.logInternals] | boolean | Log AWS client internals (default is false). | | [options.queueUrl] | string | SQS 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.

| Param | Type | Description | | --- | --- | --- | | queueName | string | Queue name | | [attributes] | Object.<string, string> | CreateQueueCommandInput attributes | | [tags] | Object.<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.

| Param | Type | Description | | --- | --- | --- | | messages | Array.<object> | Messages to delete. |

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

Get existing queue by name.

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

| Param | Type | Description | | --- | --- | --- | | queueName | string | Queue name. |

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

Get queue attributes.

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

| Param | Type | Description | | --- | --- | --- | | [attributeNames] | Array.<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.

| Param | Type | Description | | --- | --- | --- | | queueName | string | Queue 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.

| Param | Type | Description | | --- | --- | --- | | [options] | object | Options. | | [options.limit] | number | Maximum number of messages to receive. |

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

Sends a message.

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

| Param | Type | Description | | --- | --- | --- | | options | object | Options. | | options.body | * | SendMessageCommandInput messageBody. Must be a string or a JSON-serializable object. | | [options.deduplicationId] | string | SendMessageCommandInput messageDeduplicationId | | [options.delaySeconds] | number | Delay in seconds. | | [options.groupId] | string | SendMessageCommandInput messageGroupId | | [options.messageAttributes] | DecodedMessageAttributes | Message attributes. | | [options.systemAttributes] | DecodedMessageAttributes | SendMessageCommandInput messageSystemAttributes |

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

Sends a message batch.

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

| Param | Type | Description | | --- | --- | --- | | entries | Array.<SendMessageBatchRequestEntry> | Entries. |

WrappedSqsClient.decodeMessage([message]) ⇒ object

Decode message from SQS.

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

| Param | Type | Description | | --- | --- | --- | | [message] | object | Encoded message. |

WrappedSqsClient.decodeMessageAttributes(attributes) ⇒ DecodedMessageAttributes

Decode message attributes from SQS.

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

| Param | Type | Description | | --- | --- | --- | | attributes | EncodedMessageAttributes | Encoded message attributes. |

WrappedSqsClient.encodeMessageAttributes(attributes) ⇒ EncodedMessageAttributes

Encode message attributes for SQS.

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

| Param | Type | Description | | --- | --- | --- | | attributes | DecodedMessageAttributes | Decoded 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

| Name | Type | Description | | --- | --- | --- | | body | * | SendMessageCommandInput messageBody. Must be a string or a JSON-serializable object. | | [deduplicationId] | string | SendMessageCommandInput messageDeduplicationId | | [delaySeconds] | number | Delay in seconds. | | [groupId] | string | SendMessageCommandInput messageGroupId | | id | string | Message ID. | | [messageAttributes] | DecodedMessageAttributes | Message attributes. | | [systemAttributes] | DecodedMessageAttributes | SendMessageCommandInput messageSystemAttributes |


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