@pristine-ts/aws 0.0.390 → 0.0.391
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/dist/lib/cjs/clients/sqs.client.js +37 -26
- package/dist/lib/cjs/clients/sqs.client.js.map +1 -1
- package/dist/lib/cjs/options/sqs-client.options.js +7 -0
- package/dist/lib/cjs/options/sqs-client.options.js.map +1 -0
- package/dist/lib/esm/clients/sqs.client.js +37 -26
- package/dist/lib/esm/clients/sqs.client.js.map +1 -1
- package/dist/lib/esm/options/sqs-client.options.js +3 -0
- package/dist/lib/esm/options/sqs-client.options.js.map +1 -0
- package/dist/types/clients/sqs.client.d.ts +3 -7
- package/dist/types/interfaces/sqs-client.interface.d.ts +3 -8
- package/dist/types/options/sqs-client.options.d.ts +33 -0
- package/package.json +7 -7
|
@@ -52,41 +52,49 @@ let SqsClient = class SqsClient {
|
|
|
52
52
|
* Sends a message to the specified Queue URL.
|
|
53
53
|
* @param queueUrl The queue url where to send the message.
|
|
54
54
|
* @param body The body of the message to send in the queue.
|
|
55
|
-
* @param
|
|
56
|
-
* @param delaySeconds The length of time, in seconds, for which to delay a specific message.
|
|
57
|
-
* @param messageDeduplicationId The unique id used by Amazon SQS in Fifo queues to avoid treating a message twice.
|
|
58
|
-
* @param options
|
|
59
|
-
* @param configs The configs for which the SQS client is created.
|
|
55
|
+
* @param options The options to customize the request.
|
|
60
56
|
*/
|
|
61
|
-
send(queueUrl, body,
|
|
57
|
+
send(queueUrl, body, options) {
|
|
58
|
+
var _a;
|
|
62
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
60
|
try {
|
|
64
|
-
const client = this.getClient(
|
|
61
|
+
const client = this.getClient(options.clientConfigs);
|
|
62
|
+
const MessageAttributes = {};
|
|
63
|
+
if (options.eventGroupId) {
|
|
64
|
+
MessageAttributes["eventGroupId"] = {
|
|
65
|
+
DataType: "String",
|
|
66
|
+
StringValue: options.eventGroupId,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
65
69
|
const command = new client_sqs_1.SendMessageCommand({
|
|
66
70
|
QueueUrl: queueUrl,
|
|
67
71
|
MessageBody: body,
|
|
68
|
-
MessageGroupId: messageGroupId,
|
|
69
|
-
DelaySeconds: delaySeconds,
|
|
70
|
-
MessageDeduplicationId: messageDeduplicationId,
|
|
72
|
+
MessageGroupId: options.messageGroupId,
|
|
73
|
+
DelaySeconds: options.delaySeconds,
|
|
74
|
+
MessageDeduplicationId: options.messageDeduplicationId,
|
|
75
|
+
MessageAttributes,
|
|
71
76
|
});
|
|
72
77
|
this.logHandler.debug("SqsClient: Sending a message to the queue.", {
|
|
73
|
-
|
|
78
|
+
highlights: {
|
|
74
79
|
queueUrl,
|
|
75
80
|
body,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
},
|
|
82
|
+
eventId: options.eventId,
|
|
83
|
+
eventGroupId: options.eventGroupId,
|
|
84
|
+
extra: {
|
|
85
|
+
options
|
|
79
86
|
}
|
|
80
87
|
});
|
|
81
|
-
const response = yield client.send(command, options);
|
|
88
|
+
const response = yield client.send(command, options.clientOptions);
|
|
82
89
|
this.logHandler.debug("SqsClient: Message successfully sent to the queue.", {
|
|
83
|
-
|
|
90
|
+
highlights: {
|
|
84
91
|
queueUrl,
|
|
85
92
|
body,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
93
|
+
},
|
|
94
|
+
eventId: options.eventId,
|
|
95
|
+
eventGroupId: options.eventGroupId,
|
|
96
|
+
extra: {
|
|
97
|
+
options
|
|
90
98
|
}
|
|
91
99
|
});
|
|
92
100
|
return {
|
|
@@ -95,16 +103,19 @@ let SqsClient = class SqsClient {
|
|
|
95
103
|
}
|
|
96
104
|
catch (error) {
|
|
97
105
|
this.logHandler.error("SqsClient: There was an error sending the message to the queue.", {
|
|
98
|
-
|
|
99
|
-
error,
|
|
106
|
+
highlights: {
|
|
100
107
|
queueUrl,
|
|
101
108
|
body,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
109
|
+
errorMessage: (_a = error.message) !== null && _a !== void 0 ? _a : "Unknown error",
|
|
110
|
+
},
|
|
111
|
+
eventId: options.eventId,
|
|
112
|
+
eventGroupId: options.eventGroupId,
|
|
113
|
+
extra: {
|
|
114
|
+
options,
|
|
115
|
+
error,
|
|
105
116
|
}
|
|
106
117
|
});
|
|
107
|
-
throw new sqs_send_message_error_1.SqsSendMessageError(error, queueUrl, body, messageGroupId, delaySeconds);
|
|
118
|
+
throw new sqs_send_message_error_1.SqsSendMessageError(error, queueUrl, body, options.messageGroupId, options.delaySeconds);
|
|
108
119
|
}
|
|
109
120
|
});
|
|
110
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqs.client.js","sourceRoot":"","sources":["../../../../src/clients/sqs.client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA4C;AAE5C,
|
|
1
|
+
{"version":3,"file":"sqs.client.js","sourceRoot":"","sources":["../../../../src/clients/sqs.client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA4C;AAE5C,oDAA0G;AAE1G,6EAAqE;AACrE,gDAAsD;AACtD,8DAAuD;AAKvD;;;GAGG;AAII,IAAM,SAAS,GAAf,MAAM,SAAS;IAElB;;;;OAIG;IACH,YACoD,UAA+B,EAC7B,MAAc;QADhB,eAAU,GAAV,UAAU,CAAqB;QAC7B,WAAM,GAAN,MAAM,CAAQ;IAEpE,CAAC;IAED;;;OAGG;IACI,SAAS,CAAC,OAAkC;QAC/C,OAAO,IAAI,sBAAS,iBAChB,MAAM,EAAE,IAAI,CAAC,MAAM,IAChB,OAAO,EACZ,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACG,IAAI,CAAC,QAAgB,EAAE,IAAY,EAAE,OAAyB;;;YAChE,IAAI,CAAC;gBACD,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,a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U,EAAE;wBACV,QAAQ;wBACR,IAAI;wBACJ,YAAY,EAAE,MAAA,KAAK,CAAC,OAAO,mCAAI,eAAe;qBAC/C;oBACD,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,YAAY,EAAE,OAAO,CAAC,YAAY;oBAClC,KAAK,EAAE;wBACL,OAAO;wBACP,KAAK;qBACN;iBACF,CAAC,CAAC;gBAEH,MAAM,IAAI,4CAAmB,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;YACvG,CAAC;;KACJ;CACJ,CAAA;AApGY,8BAAS;oBAAT,SAAS;IAHrB,IAAA,YAAG,EAAC,oBAAoB,CAAC;IACzB,IAAA,qBAAY,EAAC,qCAAgB,CAAC;IAC9B,IAAA,qBAAU,GAAE;IASJ,WAAA,IAAA,iBAAM,EAAC,qBAAqB,CAAC,CAAA;IAC7B,WAAA,IAAA,iBAAM,EAAC,uBAAuB,CAAC,CAAA;;GAT3B,SAAS,CAoGrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqs-client.options.js","sourceRoot":"","sources":["../../../../src/options/sqs-client.options.ts"],"names":[],"mappings":";;;AAGA,MAAa,gBAAgB;CAoC5B;AApCD,4CAoCC"}
|
|
@@ -49,41 +49,49 @@ let SqsClient = class SqsClient {
|
|
|
49
49
|
* Sends a message to the specified Queue URL.
|
|
50
50
|
* @param queueUrl The queue url where to send the message.
|
|
51
51
|
* @param body The body of the message to send in the queue.
|
|
52
|
-
* @param
|
|
53
|
-
* @param delaySeconds The length of time, in seconds, for which to delay a specific message.
|
|
54
|
-
* @param messageDeduplicationId The unique id used by Amazon SQS in Fifo queues to avoid treating a message twice.
|
|
55
|
-
* @param options
|
|
56
|
-
* @param configs The configs for which the SQS client is created.
|
|
52
|
+
* @param options The options to customize the request.
|
|
57
53
|
*/
|
|
58
|
-
send(queueUrl, body,
|
|
54
|
+
send(queueUrl, body, options) {
|
|
55
|
+
var _a;
|
|
59
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
57
|
try {
|
|
61
|
-
const client = this.getClient(
|
|
58
|
+
const client = this.getClient(options.clientConfigs);
|
|
59
|
+
const MessageAttributes = {};
|
|
60
|
+
if (options.eventGroupId) {
|
|
61
|
+
MessageAttributes["eventGroupId"] = {
|
|
62
|
+
DataType: "String",
|
|
63
|
+
StringValue: options.eventGroupId,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
62
66
|
const command = new SendMessageCommand({
|
|
63
67
|
QueueUrl: queueUrl,
|
|
64
68
|
MessageBody: body,
|
|
65
|
-
MessageGroupId: messageGroupId,
|
|
66
|
-
DelaySeconds: delaySeconds,
|
|
67
|
-
MessageDeduplicationId: messageDeduplicationId,
|
|
69
|
+
MessageGroupId: options.messageGroupId,
|
|
70
|
+
DelaySeconds: options.delaySeconds,
|
|
71
|
+
MessageDeduplicationId: options.messageDeduplicationId,
|
|
72
|
+
MessageAttributes,
|
|
68
73
|
});
|
|
69
74
|
this.logHandler.debug("SqsClient: Sending a message to the queue.", {
|
|
70
|
-
|
|
75
|
+
highlights: {
|
|
71
76
|
queueUrl,
|
|
72
77
|
body,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
},
|
|
79
|
+
eventId: options.eventId,
|
|
80
|
+
eventGroupId: options.eventGroupId,
|
|
81
|
+
extra: {
|
|
82
|
+
options
|
|
76
83
|
}
|
|
77
84
|
});
|
|
78
|
-
const response = yield client.send(command, options);
|
|
85
|
+
const response = yield client.send(command, options.clientOptions);
|
|
79
86
|
this.logHandler.debug("SqsClient: Message successfully sent to the queue.", {
|
|
80
|
-
|
|
87
|
+
highlights: {
|
|
81
88
|
queueUrl,
|
|
82
89
|
body,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
90
|
+
},
|
|
91
|
+
eventId: options.eventId,
|
|
92
|
+
eventGroupId: options.eventGroupId,
|
|
93
|
+
extra: {
|
|
94
|
+
options
|
|
87
95
|
}
|
|
88
96
|
});
|
|
89
97
|
return {
|
|
@@ -92,16 +100,19 @@ let SqsClient = class SqsClient {
|
|
|
92
100
|
}
|
|
93
101
|
catch (error) {
|
|
94
102
|
this.logHandler.error("SqsClient: There was an error sending the message to the queue.", {
|
|
95
|
-
|
|
96
|
-
error,
|
|
103
|
+
highlights: {
|
|
97
104
|
queueUrl,
|
|
98
105
|
body,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
errorMessage: (_a = error.message) !== null && _a !== void 0 ? _a : "Unknown error",
|
|
107
|
+
},
|
|
108
|
+
eventId: options.eventId,
|
|
109
|
+
eventGroupId: options.eventGroupId,
|
|
110
|
+
extra: {
|
|
111
|
+
options,
|
|
112
|
+
error,
|
|
102
113
|
}
|
|
103
114
|
});
|
|
104
|
-
throw new SqsSendMessageError(error, queueUrl, body, messageGroupId, delaySeconds);
|
|
115
|
+
throw new SqsSendMessageError(error, queueUrl, body, options.messageGroupId, options.delaySeconds);
|
|
105
116
|
}
|
|
106
117
|
});
|
|
107
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqs.client.js","sourceRoot":"","sources":["../../../../src/clients/sqs.client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAC,SAAS,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"sqs.client.js","sourceRoot":"","sources":["../../../../src/clients/sqs.client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAC,SAAS,EAAE,kBAAkB,EAAyC,MAAM,qBAAqB,CAAC;AAE1G,OAAO,EAAC,mBAAmB,EAAC,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAC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"","sources":["../../../../src/options/sqs-client.options.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,gBAAgB;CAoC5B"}
|
|
@@ -2,7 +2,7 @@ import { LogHandlerInterface } from "@pristine-ts/logging";
|
|
|
2
2
|
import { SQSClient, SQSClientConfig } from "@aws-sdk/client-sqs";
|
|
3
3
|
import { SqsMessageSentConfirmationModel } from "../models/sqs-message-sent-confirmation.model";
|
|
4
4
|
import { SqsClientInterface } from "../interfaces/sqs-client.interface";
|
|
5
|
-
import {
|
|
5
|
+
import { SqsClientOptions } from "../options/sqs-client.options";
|
|
6
6
|
/**
|
|
7
7
|
* The client to use to interact with AWS SQS. It is a wrapper around the SQSClient of @aws-sdk/client-sqs.
|
|
8
8
|
* It is tagged so it can be injected using SqsClientInterface.
|
|
@@ -25,11 +25,7 @@ export declare class SqsClient implements SqsClientInterface {
|
|
|
25
25
|
* Sends a message to the specified Queue URL.
|
|
26
26
|
* @param queueUrl The queue url where to send the message.
|
|
27
27
|
* @param body The body of the message to send in the queue.
|
|
28
|
-
* @param
|
|
29
|
-
* @param delaySeconds The length of time, in seconds, for which to delay a specific message.
|
|
30
|
-
* @param messageDeduplicationId The unique id used by Amazon SQS in Fifo queues to avoid treating a message twice.
|
|
31
|
-
* @param options
|
|
32
|
-
* @param configs The configs for which the SQS client is created.
|
|
28
|
+
* @param options The options to customize the request.
|
|
33
29
|
*/
|
|
34
|
-
send(queueUrl: string, body: string,
|
|
30
|
+
send(queueUrl: string, body: string, options: SqsClientOptions): Promise<SqsMessageSentConfirmationModel>;
|
|
35
31
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SqsMessageSentConfirmationModel } from "../models/sqs-message-sent-confirmation.model";
|
|
2
2
|
import { SQSClient, SQSClientConfig } from "@aws-sdk/client-sqs";
|
|
3
|
-
import {
|
|
3
|
+
import { SqsClientOptions } from "../options/sqs-client.options";
|
|
4
4
|
/**
|
|
5
5
|
* The S3Client Interface defines the methods that an S3 client must implement.
|
|
6
6
|
* When injecting the S3 client the 'S3ClientInterface' tag should be used.
|
|
@@ -15,12 +15,7 @@ export interface SqsClientInterface {
|
|
|
15
15
|
* Sends a message to the specified Queue URL.
|
|
16
16
|
* @param queueUrl The queue url where to send the message.
|
|
17
17
|
* @param body The body of the message to send in the queue.
|
|
18
|
-
* @param
|
|
19
|
-
* @param delaySeconds The length of time, in seconds, for which to delay a specific message.
|
|
20
|
-
* @param endpoint The endpoint for SQS.
|
|
21
|
-
* @param messageDeduplicationId
|
|
22
|
-
* @param options
|
|
23
|
-
* @param configs The configs for which the SQS client is created.
|
|
18
|
+
* @param options The options to customize the request.
|
|
24
19
|
*/
|
|
25
|
-
send(queueUrl: string, body: string,
|
|
20
|
+
send(queueUrl: string, body: string, options: SqsClientOptions): Promise<SqsMessageSentConfirmationModel>;
|
|
26
21
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ClientOptionsInterface } from "../interfaces/client-options.interface";
|
|
2
|
+
import { SQSClientConfig } from "@aws-sdk/client-sqs";
|
|
3
|
+
export declare class SqsClientOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The id of the Event this operation was triggered BY. Used for logging purposes.
|
|
6
|
+
* WARNING: It will NOT be added to the MessageAttributes.
|
|
7
|
+
*/
|
|
8
|
+
eventId: string;
|
|
9
|
+
/**
|
|
10
|
+
* Event Group Id that groups all the events in a similar operation. Will be added to MessageAttributes.
|
|
11
|
+
*/
|
|
12
|
+
eventGroupId?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The message group id for FIFO queues.
|
|
15
|
+
*/
|
|
16
|
+
messageGroupId?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The length of time, in seconds, for which to delay a specific message.
|
|
19
|
+
*/
|
|
20
|
+
delaySeconds?: number;
|
|
21
|
+
/**
|
|
22
|
+
* The unique id used by Amazon SQS in Fifo queues to avoid treating a message twice.
|
|
23
|
+
*/
|
|
24
|
+
messageDeduplicationId?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Client Options
|
|
27
|
+
*/
|
|
28
|
+
clientOptions?: Partial<ClientOptionsInterface>;
|
|
29
|
+
/**
|
|
30
|
+
* The configs for which the SQS client is created, that can be overriden.
|
|
31
|
+
*/
|
|
32
|
+
clientConfigs?: Partial<SQSClientConfig>;
|
|
33
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pristine-ts/aws",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.391",
|
|
4
4
|
"description": "",
|
|
5
5
|
"module": "dist/lib/esm/aws.module.js",
|
|
6
6
|
"main": "dist/lib/cjs/aws.module.js",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"@awslabs-community-fork/dynamodb-data-mapper": "^0.7.13",
|
|
31
31
|
"@awslabs-community-fork/dynamodb-data-marshaller": "^0.7.13",
|
|
32
32
|
"@awslabs-community-fork/dynamodb-expressions": "^0.7.13",
|
|
33
|
-
"@pristine-ts/common": "^0.0.
|
|
34
|
-
"@pristine-ts/core": "^0.0.
|
|
35
|
-
"@pristine-ts/logging": "^0.0.
|
|
36
|
-
"@pristine-ts/networking": "^0.0.
|
|
37
|
-
"@pristine-ts/security": "^0.0.
|
|
33
|
+
"@pristine-ts/common": "^0.0.391",
|
|
34
|
+
"@pristine-ts/core": "^0.0.391",
|
|
35
|
+
"@pristine-ts/logging": "^0.0.391",
|
|
36
|
+
"@pristine-ts/networking": "^0.0.391",
|
|
37
|
+
"@pristine-ts/security": "^0.0.391",
|
|
38
38
|
"uuid": "^9.0.1"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"src/*.{js,ts}"
|
|
75
75
|
]
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "ee9fbf48d0fedf614d8a567157a18507aa1ae385"
|
|
78
78
|
}
|