@allthings/cloud-toolkit 1.4.0 → 1.5.1-dev.1
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.
- package/README.md +8 -0
- package/dist/lib.cjs.js +79 -0
- package/dist/lib.esm.js +79 -1
- package/dist/lib.umd.min.js +1 -1
- package/dist/src/aws/index.d.ts +1 -0
- package/dist/src/aws/sqs.d.ts +21 -0
- package/dist/src/aws/sqs.test.d.ts +1 -0
- package/dist/src/index.d.ts +1 -1
- package/package.json +3 -2
package/dist/src/aws/index.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export { default as dynamodb, IDynamoDBConfig, IUnprocessedItems, TBatchWriteIte
|
|
|
2
2
|
export { ILambda, default as lambda, TInvokeLambda } from './lambda';
|
|
3
3
|
export { DEFAULT_CLIENT_CONFIG as DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, IParameterStore, default as parameterStore, TGetSecret, TGetSecrets, } from './parameterStore';
|
|
4
4
|
export { DEFAULT_CLIENT_CONFIG as DEFAULT_SES_CLIENT_CONFIG, IEmailAttachment, IEmailOptions, ISES, default as ses, TSendMail, } from './ses';
|
|
5
|
+
export { ISQS, default as sqs, TDeleteQueueItem, TGetQueueItems, TGetQueueUrl, TSendMessage, } from './sqs';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DeleteMessageCommandInput, DeleteMessageCommandOutput, MessageAttributeValue, ReceiveMessageCommandOutput, SQSClient, SQSClientConfig } from '@aws-sdk/client-sqs';
|
|
2
|
+
import { TAWSLogger } from './types';
|
|
3
|
+
export interface ISQS {
|
|
4
|
+
clientConfig?: SQSClientConfig;
|
|
5
|
+
logger?: TAWSLogger;
|
|
6
|
+
}
|
|
7
|
+
export type TGetQueueUrl = (queueName: string) => Promise<string | undefined>;
|
|
8
|
+
export type TSendMessage = (queueUrl: string, message: string, messageAttributes?: Record<string, MessageAttributeValue>, messageDelay?: number) => Promise<string | undefined>;
|
|
9
|
+
export type TGetQueueItems = (queueUrl: string, maxNumberOfMessages?: number) => Promise<ReceiveMessageCommandOutput | undefined>;
|
|
10
|
+
export type TDeleteQueueItem = (queueUrl: string, receiptHandle: DeleteMessageCommandInput['ReceiptHandle']) => Promise<ReceiveMessageCommandOutput | undefined>;
|
|
11
|
+
declare const deleteQueueItem: (sqsClient: SQSClient, config: ISQS, queueUrl: string, receiptHandle: DeleteMessageCommandInput['ReceiptHandle']) => Promise<DeleteMessageCommandOutput | undefined>;
|
|
12
|
+
declare const getQueueItems: (sqsClient: SQSClient, config: ISQS, queueUrl: string, maxNumberOfMessages?: number) => Promise<ReceiveMessageCommandOutput | undefined>;
|
|
13
|
+
declare const getQueueUrl: (sqsClient: SQSClient, config: ISQS, queueName: string) => Promise<string | undefined>;
|
|
14
|
+
declare const sendMessage: (sqsClient: SQSClient, config: ISQS, queueUrl: string, message: string, messageAttributes?: Record<string, MessageAttributeValue>, messageDelay?: number) => Promise<string | undefined>;
|
|
15
|
+
declare const sqs: (userConfig: ISQS) => {
|
|
16
|
+
deleteQueueItem: TDeleteQueueItem;
|
|
17
|
+
getQueueItems: TGetQueueItems;
|
|
18
|
+
getQueueUrl: TGetQueueUrl;
|
|
19
|
+
sendMessage: TSendMessage;
|
|
20
|
+
};
|
|
21
|
+
export default sqs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, DEFAULT_SES_CLIENT_CONFIG, dynamodb, IDynamoDBConfig, IEmailAttachment, IEmailOptions, ILambda, IParameterStore, ISES, IUnprocessedItems, lambda, parameterStore, ses, TBatchWriteItems, TDeleteItem, TGetItem, TGetSecret, TGetSecrets, TInvokeLambda, TPutItem, TQueryTable, TScanTable, TSendMail, TUpdateItem, } from './aws';
|
|
1
|
+
export { DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, DEFAULT_SES_CLIENT_CONFIG, dynamodb, IDynamoDBConfig, IEmailAttachment, IEmailOptions, ILambda, IParameterStore, ISES, ISQS, IUnprocessedItems, lambda, parameterStore, ses, sqs, TBatchWriteItems, TDeleteItem, TDeleteQueueItem, TGetItem, TGetQueueItems, TGetQueueUrl, TGetSecret, TGetSecrets, TInvokeLambda, TPutItem, TQueryTable, TScanTable, TSendMail, TSendMessage, TUpdateItem, } from './aws';
|
|
2
2
|
export { default as logger } from './logger/logger';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allthings/cloud-toolkit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1-dev.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Allthings GmbH",
|
|
6
6
|
"keywords": [
|
|
@@ -51,10 +51,11 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@aws-sdk/client-dynamodb": "3.696.0",
|
|
54
|
-
"@aws-sdk/lib-dynamodb": "3.696.0",
|
|
55
54
|
"@aws-sdk/client-lambda": "3.693.0",
|
|
56
55
|
"@aws-sdk/client-ses": "3.693.0",
|
|
56
|
+
"@aws-sdk/client-sqs": "3.699.0",
|
|
57
57
|
"@aws-sdk/client-ssm": "3.693.0",
|
|
58
|
+
"@aws-sdk/lib-dynamodb": "3.696.0",
|
|
58
59
|
"bottleneck": "2.19.5",
|
|
59
60
|
"cross-fetch": "4.0.0",
|
|
60
61
|
"nodemailer": "6.9.16",
|