@allthings/cloud-toolkit 5.3.0-beta.1 → 5.3.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 +1 -1
- package/dist/lib.cjs.js +15 -52
- package/dist/lib.esm.mjs +15 -52
- package/dist/ses.cjs.js +15 -52
- package/dist/ses.esm.mjs +15 -52
- package/dist/src/aws/emailHeaders.d.ts +4 -3
- package/dist/src/aws/index.d.ts +1 -1
- package/dist/src/aws/ses.d.ts +3 -17
- package/dist/src/index.d.ts +1 -1
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ caller builds them. Every header is omitted when the value it needs is not given
|
|
|
28
28
|
| `Content-Language` | `contentLanguage` |
|
|
29
29
|
| `Feedback-ID` | `feedbackId` |
|
|
30
30
|
| `List-Id` | `listId` |
|
|
31
|
-
| `List-Unsubscribe` | `unsubscribeUrl
|
|
31
|
+
| `List-Unsubscribe` | `unsubscribeUrl` |
|
|
32
32
|
| `List-Unsubscribe-Post` | `oneClickUnsubscribe` (default true, https target only) |
|
|
33
33
|
| `Precedence: bulk` | `bulk` (default false) |
|
|
34
34
|
| `X-Entity-Ref-ID` | `entityReferenceId` |
|
package/dist/lib.cjs.js
CHANGED
|
@@ -908,39 +908,20 @@ const AUTO_RESPONSE_SUPPRESSION_HEADERS = {
|
|
|
908
908
|
'Auto-Submitted': 'auto-generated',
|
|
909
909
|
'X-Auto-Response-Suppress': 'OOF, AutoReply',
|
|
910
910
|
};
|
|
911
|
-
const
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
];
|
|
926
|
-
const supportsOneClick = oneClickUnsubscribe &&
|
|
927
|
-
httpsUnsubscribe !== undefined &&
|
|
928
|
-
/^https:/i.test(httpsUnsubscribe);
|
|
929
|
-
return {
|
|
930
|
-
...(suppressAutoResponses ? AUTO_RESPONSE_SUPPRESSION_HEADERS : {}),
|
|
931
|
-
...(language ? { 'Content-Language': language } : {}),
|
|
932
|
-
...(feedback ? { 'Feedback-ID': feedback } : {}),
|
|
933
|
-
...(list ? { 'List-Id': angleBracketed(list) } : {}),
|
|
934
|
-
...(unsubscribeTargets.length > 0
|
|
935
|
-
? { 'List-Unsubscribe': unsubscribeTargets.join(', ') }
|
|
936
|
-
: {}),
|
|
937
|
-
...(supportsOneClick
|
|
938
|
-
? { 'List-Unsubscribe-Post': 'List-Unsubscribe=One-Click' }
|
|
939
|
-
: {}),
|
|
940
|
-
...(bulk ? { Precedence: 'bulk' } : {}),
|
|
941
|
-
...(entityReference ? { 'X-Entity-Ref-ID': entityReference } : {}),
|
|
942
|
-
};
|
|
943
|
-
};
|
|
911
|
+
const emailHeaders = ({ bulk = false, contentLanguage, entityReferenceId, feedbackId, listId, oneClickUnsubscribe = true, suppressAutoResponses = true, unsubscribeUrl, } = {}) => Object.fromEntries(Object.entries({
|
|
912
|
+
...(suppressAutoResponses ? AUTO_RESPONSE_SUPPRESSION_HEADERS : {}),
|
|
913
|
+
'Content-Language': contentLanguage?.trim(),
|
|
914
|
+
'Feedback-ID': feedbackId?.trim(),
|
|
915
|
+
'List-Id': listId?.trim().replace(/^<*([^<>].*?)>*$/, '<$1>'),
|
|
916
|
+
'List-Unsubscribe': unsubscribeUrl
|
|
917
|
+
?.trim()
|
|
918
|
+
.replace(/^<*([^<>].*?)>*$/, '<$1>'),
|
|
919
|
+
'List-Unsubscribe-Post': oneClickUnsubscribe &&
|
|
920
|
+
/^<?https:/i.test(unsubscribeUrl?.trim() ?? '') &&
|
|
921
|
+
'List-Unsubscribe=One-Click',
|
|
922
|
+
Precedence: bulk && 'bulk',
|
|
923
|
+
'X-Entity-Ref-ID': entityReferenceId?.trim(),
|
|
924
|
+
}).filter(([, value]) => value));
|
|
944
925
|
|
|
945
926
|
const invokeLambda = async (lambdaClient, config, invocationType, payload) => {
|
|
946
927
|
try {
|
|
@@ -1048,24 +1029,6 @@ const parameterStore = (userConfig) => {
|
|
|
1048
1029
|
const DEFAULT_CLIENT_CONFIG = {
|
|
1049
1030
|
clientConfig: { region: 'eu-west-1' },
|
|
1050
1031
|
};
|
|
1051
|
-
const toMailOptions = (options) => ({
|
|
1052
|
-
attachments: options.attachments,
|
|
1053
|
-
bcc: options.bcc,
|
|
1054
|
-
cc: options.cc,
|
|
1055
|
-
envelope: options.envelope,
|
|
1056
|
-
from: options.from,
|
|
1057
|
-
headers: options.headers,
|
|
1058
|
-
html: options.html,
|
|
1059
|
-
inReplyTo: options.inReplyTo,
|
|
1060
|
-
messageId: options.messageId,
|
|
1061
|
-
references: options.references,
|
|
1062
|
-
replyTo: options.replyTo,
|
|
1063
|
-
sender: options.sender,
|
|
1064
|
-
ses: options.ses,
|
|
1065
|
-
subject: options.subject,
|
|
1066
|
-
text: options.text,
|
|
1067
|
-
to: options.to,
|
|
1068
|
-
});
|
|
1069
1032
|
const sendMail = async (config, transport, options, responseCallback) => {
|
|
1070
1033
|
try {
|
|
1071
1034
|
if (!options.html && !options.text) {
|
|
@@ -1080,7 +1043,7 @@ const sendMail = async (config, transport, options, responseCallback) => {
|
|
|
1080
1043
|
}
|
|
1081
1044
|
return false;
|
|
1082
1045
|
}
|
|
1083
|
-
const transportResponse = await transport.sendMail(
|
|
1046
|
+
const transportResponse = await transport.sendMail(options);
|
|
1084
1047
|
if (responseCallback) {
|
|
1085
1048
|
await responseCallback(transportResponse);
|
|
1086
1049
|
}
|
package/dist/lib.esm.mjs
CHANGED
|
@@ -886,39 +886,20 @@ const AUTO_RESPONSE_SUPPRESSION_HEADERS = {
|
|
|
886
886
|
'Auto-Submitted': 'auto-generated',
|
|
887
887
|
'X-Auto-Response-Suppress': 'OOF, AutoReply',
|
|
888
888
|
};
|
|
889
|
-
const
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
];
|
|
904
|
-
const supportsOneClick = oneClickUnsubscribe &&
|
|
905
|
-
httpsUnsubscribe !== undefined &&
|
|
906
|
-
/^https:/i.test(httpsUnsubscribe);
|
|
907
|
-
return {
|
|
908
|
-
...(suppressAutoResponses ? AUTO_RESPONSE_SUPPRESSION_HEADERS : {}),
|
|
909
|
-
...(language ? { 'Content-Language': language } : {}),
|
|
910
|
-
...(feedback ? { 'Feedback-ID': feedback } : {}),
|
|
911
|
-
...(list ? { 'List-Id': angleBracketed(list) } : {}),
|
|
912
|
-
...(unsubscribeTargets.length > 0
|
|
913
|
-
? { 'List-Unsubscribe': unsubscribeTargets.join(', ') }
|
|
914
|
-
: {}),
|
|
915
|
-
...(supportsOneClick
|
|
916
|
-
? { 'List-Unsubscribe-Post': 'List-Unsubscribe=One-Click' }
|
|
917
|
-
: {}),
|
|
918
|
-
...(bulk ? { Precedence: 'bulk' } : {}),
|
|
919
|
-
...(entityReference ? { 'X-Entity-Ref-ID': entityReference } : {}),
|
|
920
|
-
};
|
|
921
|
-
};
|
|
889
|
+
const emailHeaders = ({ bulk = false, contentLanguage, entityReferenceId, feedbackId, listId, oneClickUnsubscribe = true, suppressAutoResponses = true, unsubscribeUrl, } = {}) => Object.fromEntries(Object.entries({
|
|
890
|
+
...(suppressAutoResponses ? AUTO_RESPONSE_SUPPRESSION_HEADERS : {}),
|
|
891
|
+
'Content-Language': contentLanguage?.trim(),
|
|
892
|
+
'Feedback-ID': feedbackId?.trim(),
|
|
893
|
+
'List-Id': listId?.trim().replace(/^<*([^<>].*?)>*$/, '<$1>'),
|
|
894
|
+
'List-Unsubscribe': unsubscribeUrl
|
|
895
|
+
?.trim()
|
|
896
|
+
.replace(/^<*([^<>].*?)>*$/, '<$1>'),
|
|
897
|
+
'List-Unsubscribe-Post': oneClickUnsubscribe &&
|
|
898
|
+
/^<?https:/i.test(unsubscribeUrl?.trim() ?? '') &&
|
|
899
|
+
'List-Unsubscribe=One-Click',
|
|
900
|
+
Precedence: bulk && 'bulk',
|
|
901
|
+
'X-Entity-Ref-ID': entityReferenceId?.trim(),
|
|
902
|
+
}).filter(([, value]) => value));
|
|
922
903
|
|
|
923
904
|
const invokeLambda = async (lambdaClient, config, invocationType, payload) => {
|
|
924
905
|
try {
|
|
@@ -1026,24 +1007,6 @@ const parameterStore = (userConfig) => {
|
|
|
1026
1007
|
const DEFAULT_CLIENT_CONFIG = {
|
|
1027
1008
|
clientConfig: { region: 'eu-west-1' },
|
|
1028
1009
|
};
|
|
1029
|
-
const toMailOptions = (options) => ({
|
|
1030
|
-
attachments: options.attachments,
|
|
1031
|
-
bcc: options.bcc,
|
|
1032
|
-
cc: options.cc,
|
|
1033
|
-
envelope: options.envelope,
|
|
1034
|
-
from: options.from,
|
|
1035
|
-
headers: options.headers,
|
|
1036
|
-
html: options.html,
|
|
1037
|
-
inReplyTo: options.inReplyTo,
|
|
1038
|
-
messageId: options.messageId,
|
|
1039
|
-
references: options.references,
|
|
1040
|
-
replyTo: options.replyTo,
|
|
1041
|
-
sender: options.sender,
|
|
1042
|
-
ses: options.ses,
|
|
1043
|
-
subject: options.subject,
|
|
1044
|
-
text: options.text,
|
|
1045
|
-
to: options.to,
|
|
1046
|
-
});
|
|
1047
1010
|
const sendMail = async (config, transport, options, responseCallback) => {
|
|
1048
1011
|
try {
|
|
1049
1012
|
if (!options.html && !options.text) {
|
|
@@ -1058,7 +1021,7 @@ const sendMail = async (config, transport, options, responseCallback) => {
|
|
|
1058
1021
|
}
|
|
1059
1022
|
return false;
|
|
1060
1023
|
}
|
|
1061
|
-
const transportResponse = await transport.sendMail(
|
|
1024
|
+
const transportResponse = await transport.sendMail(options);
|
|
1062
1025
|
if (responseCallback) {
|
|
1063
1026
|
await responseCallback(transportResponse);
|
|
1064
1027
|
}
|
package/dist/ses.cjs.js
CHANGED
|
@@ -7,61 +7,24 @@ const AUTO_RESPONSE_SUPPRESSION_HEADERS = {
|
|
|
7
7
|
'Auto-Submitted': 'auto-generated',
|
|
8
8
|
'X-Auto-Response-Suppress': 'OOF, AutoReply',
|
|
9
9
|
};
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
];
|
|
25
|
-
const supportsOneClick = oneClickUnsubscribe &&
|
|
26
|
-
httpsUnsubscribe !== undefined &&
|
|
27
|
-
/^https:/i.test(httpsUnsubscribe);
|
|
28
|
-
return {
|
|
29
|
-
...(suppressAutoResponses ? AUTO_RESPONSE_SUPPRESSION_HEADERS : {}),
|
|
30
|
-
...(language ? { 'Content-Language': language } : {}),
|
|
31
|
-
...(feedback ? { 'Feedback-ID': feedback } : {}),
|
|
32
|
-
...(list ? { 'List-Id': angleBracketed(list) } : {}),
|
|
33
|
-
...(unsubscribeTargets.length > 0
|
|
34
|
-
? { 'List-Unsubscribe': unsubscribeTargets.join(', ') }
|
|
35
|
-
: {}),
|
|
36
|
-
...(supportsOneClick
|
|
37
|
-
? { 'List-Unsubscribe-Post': 'List-Unsubscribe=One-Click' }
|
|
38
|
-
: {}),
|
|
39
|
-
...(bulk ? { Precedence: 'bulk' } : {}),
|
|
40
|
-
...(entityReference ? { 'X-Entity-Ref-ID': entityReference } : {}),
|
|
41
|
-
};
|
|
42
|
-
};
|
|
10
|
+
const emailHeaders = ({ bulk = false, contentLanguage, entityReferenceId, feedbackId, listId, oneClickUnsubscribe = true, suppressAutoResponses = true, unsubscribeUrl, } = {}) => Object.fromEntries(Object.entries({
|
|
11
|
+
...(suppressAutoResponses ? AUTO_RESPONSE_SUPPRESSION_HEADERS : {}),
|
|
12
|
+
'Content-Language': contentLanguage?.trim(),
|
|
13
|
+
'Feedback-ID': feedbackId?.trim(),
|
|
14
|
+
'List-Id': listId?.trim().replace(/^<*([^<>].*?)>*$/, '<$1>'),
|
|
15
|
+
'List-Unsubscribe': unsubscribeUrl
|
|
16
|
+
?.trim()
|
|
17
|
+
.replace(/^<*([^<>].*?)>*$/, '<$1>'),
|
|
18
|
+
'List-Unsubscribe-Post': oneClickUnsubscribe &&
|
|
19
|
+
/^<?https:/i.test(unsubscribeUrl?.trim() ?? '') &&
|
|
20
|
+
'List-Unsubscribe=One-Click',
|
|
21
|
+
Precedence: bulk && 'bulk',
|
|
22
|
+
'X-Entity-Ref-ID': entityReferenceId?.trim(),
|
|
23
|
+
}).filter(([, value]) => value));
|
|
43
24
|
|
|
44
25
|
const DEFAULT_CLIENT_CONFIG = {
|
|
45
26
|
clientConfig: { region: 'eu-west-1' },
|
|
46
27
|
};
|
|
47
|
-
const toMailOptions = (options) => ({
|
|
48
|
-
attachments: options.attachments,
|
|
49
|
-
bcc: options.bcc,
|
|
50
|
-
cc: options.cc,
|
|
51
|
-
envelope: options.envelope,
|
|
52
|
-
from: options.from,
|
|
53
|
-
headers: options.headers,
|
|
54
|
-
html: options.html,
|
|
55
|
-
inReplyTo: options.inReplyTo,
|
|
56
|
-
messageId: options.messageId,
|
|
57
|
-
references: options.references,
|
|
58
|
-
replyTo: options.replyTo,
|
|
59
|
-
sender: options.sender,
|
|
60
|
-
ses: options.ses,
|
|
61
|
-
subject: options.subject,
|
|
62
|
-
text: options.text,
|
|
63
|
-
to: options.to,
|
|
64
|
-
});
|
|
65
28
|
const sendMail = async (config, transport, options, responseCallback) => {
|
|
66
29
|
try {
|
|
67
30
|
if (!options.html && !options.text) {
|
|
@@ -76,7 +39,7 @@ const sendMail = async (config, transport, options, responseCallback) => {
|
|
|
76
39
|
}
|
|
77
40
|
return false;
|
|
78
41
|
}
|
|
79
|
-
const transportResponse = await transport.sendMail(
|
|
42
|
+
const transportResponse = await transport.sendMail(options);
|
|
80
43
|
if (responseCallback) {
|
|
81
44
|
await responseCallback(transportResponse);
|
|
82
45
|
}
|
package/dist/ses.esm.mjs
CHANGED
|
@@ -5,61 +5,24 @@ const AUTO_RESPONSE_SUPPRESSION_HEADERS = {
|
|
|
5
5
|
'Auto-Submitted': 'auto-generated',
|
|
6
6
|
'X-Auto-Response-Suppress': 'OOF, AutoReply',
|
|
7
7
|
};
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
];
|
|
23
|
-
const supportsOneClick = oneClickUnsubscribe &&
|
|
24
|
-
httpsUnsubscribe !== undefined &&
|
|
25
|
-
/^https:/i.test(httpsUnsubscribe);
|
|
26
|
-
return {
|
|
27
|
-
...(suppressAutoResponses ? AUTO_RESPONSE_SUPPRESSION_HEADERS : {}),
|
|
28
|
-
...(language ? { 'Content-Language': language } : {}),
|
|
29
|
-
...(feedback ? { 'Feedback-ID': feedback } : {}),
|
|
30
|
-
...(list ? { 'List-Id': angleBracketed(list) } : {}),
|
|
31
|
-
...(unsubscribeTargets.length > 0
|
|
32
|
-
? { 'List-Unsubscribe': unsubscribeTargets.join(', ') }
|
|
33
|
-
: {}),
|
|
34
|
-
...(supportsOneClick
|
|
35
|
-
? { 'List-Unsubscribe-Post': 'List-Unsubscribe=One-Click' }
|
|
36
|
-
: {}),
|
|
37
|
-
...(bulk ? { Precedence: 'bulk' } : {}),
|
|
38
|
-
...(entityReference ? { 'X-Entity-Ref-ID': entityReference } : {}),
|
|
39
|
-
};
|
|
40
|
-
};
|
|
8
|
+
const emailHeaders = ({ bulk = false, contentLanguage, entityReferenceId, feedbackId, listId, oneClickUnsubscribe = true, suppressAutoResponses = true, unsubscribeUrl, } = {}) => Object.fromEntries(Object.entries({
|
|
9
|
+
...(suppressAutoResponses ? AUTO_RESPONSE_SUPPRESSION_HEADERS : {}),
|
|
10
|
+
'Content-Language': contentLanguage?.trim(),
|
|
11
|
+
'Feedback-ID': feedbackId?.trim(),
|
|
12
|
+
'List-Id': listId?.trim().replace(/^<*([^<>].*?)>*$/, '<$1>'),
|
|
13
|
+
'List-Unsubscribe': unsubscribeUrl
|
|
14
|
+
?.trim()
|
|
15
|
+
.replace(/^<*([^<>].*?)>*$/, '<$1>'),
|
|
16
|
+
'List-Unsubscribe-Post': oneClickUnsubscribe &&
|
|
17
|
+
/^<?https:/i.test(unsubscribeUrl?.trim() ?? '') &&
|
|
18
|
+
'List-Unsubscribe=One-Click',
|
|
19
|
+
Precedence: bulk && 'bulk',
|
|
20
|
+
'X-Entity-Ref-ID': entityReferenceId?.trim(),
|
|
21
|
+
}).filter(([, value]) => value));
|
|
41
22
|
|
|
42
23
|
const DEFAULT_CLIENT_CONFIG = {
|
|
43
24
|
clientConfig: { region: 'eu-west-1' },
|
|
44
25
|
};
|
|
45
|
-
const toMailOptions = (options) => ({
|
|
46
|
-
attachments: options.attachments,
|
|
47
|
-
bcc: options.bcc,
|
|
48
|
-
cc: options.cc,
|
|
49
|
-
envelope: options.envelope,
|
|
50
|
-
from: options.from,
|
|
51
|
-
headers: options.headers,
|
|
52
|
-
html: options.html,
|
|
53
|
-
inReplyTo: options.inReplyTo,
|
|
54
|
-
messageId: options.messageId,
|
|
55
|
-
references: options.references,
|
|
56
|
-
replyTo: options.replyTo,
|
|
57
|
-
sender: options.sender,
|
|
58
|
-
ses: options.ses,
|
|
59
|
-
subject: options.subject,
|
|
60
|
-
text: options.text,
|
|
61
|
-
to: options.to,
|
|
62
|
-
});
|
|
63
26
|
const sendMail = async (config, transport, options, responseCallback) => {
|
|
64
27
|
try {
|
|
65
28
|
if (!options.html && !options.text) {
|
|
@@ -74,7 +37,7 @@ const sendMail = async (config, transport, options, responseCallback) => {
|
|
|
74
37
|
}
|
|
75
38
|
return false;
|
|
76
39
|
}
|
|
77
|
-
const transportResponse = await transport.sendMail(
|
|
40
|
+
const transportResponse = await transport.sendMail(options);
|
|
78
41
|
if (responseCallback) {
|
|
79
42
|
await responseCallback(transportResponse);
|
|
80
43
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type Mail from 'nodemailer/lib/mailer';
|
|
2
|
+
type Headers = Mail.Headers;
|
|
2
3
|
export declare const AUTO_RESPONSE_SUPPRESSION_HEADERS: {
|
|
3
4
|
readonly 'Auto-Submitted': "auto-generated";
|
|
4
5
|
readonly 'X-Auto-Response-Suppress': "OOF, AutoReply";
|
|
@@ -11,7 +12,7 @@ export interface IEmailHeaderOptions {
|
|
|
11
12
|
readonly listId?: string;
|
|
12
13
|
readonly oneClickUnsubscribe?: boolean;
|
|
13
14
|
readonly suppressAutoResponses?: boolean;
|
|
14
|
-
readonly unsubscribeMailto?: string;
|
|
15
15
|
readonly unsubscribeUrl?: string;
|
|
16
16
|
}
|
|
17
|
-
export declare const emailHeaders: ({ bulk, contentLanguage, entityReferenceId, feedbackId, listId, oneClickUnsubscribe, suppressAutoResponses,
|
|
17
|
+
export declare const emailHeaders: ({ bulk, contentLanguage, entityReferenceId, feedbackId, listId, oneClickUnsubscribe, suppressAutoResponses, unsubscribeUrl, }?: IEmailHeaderOptions) => Headers;
|
|
18
|
+
export {};
|
package/dist/src/aws/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ export { dynamodb, IDynamoDBConfig, IDynamoDBInstance, IUnprocessedItems, TBatch
|
|
|
2
2
|
export { AUTO_RESPONSE_SUPPRESSION_HEADERS, emailHeaders, IEmailHeaderOptions, } from './emailHeaders';
|
|
3
3
|
export { ILambda, ILambdaInstance, lambda, TInvokeLambda } from './lambda';
|
|
4
4
|
export { DEFAULT_CLIENT_CONFIG as DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, IParameterStore, IParameterStoreInstance, parameterStore, TGetSecret, TGetSecrets, } from './parameterStore';
|
|
5
|
-
export { DEFAULT_CLIENT_CONFIG as DEFAULT_SES_CLIENT_CONFIG, IEmailAttachment,
|
|
5
|
+
export { DEFAULT_CLIENT_CONFIG as DEFAULT_SES_CLIENT_CONFIG, IEmailAttachment, IEmailOptions, ISES, ISESInstance, ses, TSendMail, } from './ses';
|
|
6
6
|
export { ISQS, ISQSInstance, sqs, TDeleteQueueItem, TGetQueueItems, TGetQueueUrl, TSendMessage, } from './sqs';
|
package/dist/src/aws/ses.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { SESv2ClientConfig } from '@aws-sdk/client-sesv2';
|
|
2
|
+
import type Mail from 'nodemailer/lib/mailer';
|
|
3
3
|
import { Logger } from 'winston';
|
|
4
|
+
type Headers = Mail.Headers;
|
|
4
5
|
export interface ISES {
|
|
5
6
|
clientConfig?: SESv2ClientConfig;
|
|
6
7
|
customSMTPConfig?: {
|
|
@@ -16,29 +17,14 @@ export interface IEmailAttachment {
|
|
|
16
17
|
readonly contentType: string;
|
|
17
18
|
readonly filename: string;
|
|
18
19
|
}
|
|
19
|
-
export interface IEmailEnvelope {
|
|
20
|
-
readonly from?: string;
|
|
21
|
-
readonly to?: string | readonly string[];
|
|
22
|
-
}
|
|
23
|
-
export interface IEmailSESOptions {
|
|
24
|
-
readonly ConfigurationSetName?: SendEmailCommandInput['ConfigurationSetName'];
|
|
25
|
-
readonly EmailTags?: SendEmailCommandInput['EmailTags'];
|
|
26
|
-
readonly FeedbackForwardingEmailAddress?: SendEmailCommandInput['FeedbackForwardingEmailAddress'];
|
|
27
|
-
}
|
|
28
20
|
export interface IEmailOptions {
|
|
29
21
|
readonly attachments?: readonly IEmailAttachment[];
|
|
30
22
|
readonly bcc?: string | readonly string[];
|
|
31
23
|
readonly cc?: string | readonly string[];
|
|
32
|
-
readonly envelope?: IEmailEnvelope;
|
|
33
24
|
readonly from: string;
|
|
34
25
|
readonly headers?: Headers;
|
|
35
26
|
readonly html?: string;
|
|
36
|
-
readonly inReplyTo?: string;
|
|
37
|
-
readonly messageId?: string;
|
|
38
|
-
readonly references?: string | readonly string[];
|
|
39
27
|
readonly replyTo?: string | readonly string[];
|
|
40
|
-
readonly sender?: string;
|
|
41
|
-
readonly ses?: IEmailSESOptions;
|
|
42
28
|
readonly subject: string;
|
|
43
29
|
readonly text?: string;
|
|
44
30
|
readonly to: string | readonly string[];
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Alagarr, alagarr, ClientError, HandlerFunction, IInterfaceAlagarrOptions, IInterfaceHeaders, IInterfaceQueryParameters, IInterfaceRequest, IInterfaceResponse, ServerError, } from './alagarr';
|
|
2
|
-
export { AUTO_RESPONSE_SUPPRESSION_HEADERS, DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, DEFAULT_SES_CLIENT_CONFIG, dynamodb, emailHeaders, IDynamoDBConfig, IDynamoDBInstance, IEmailAttachment,
|
|
2
|
+
export { AUTO_RESPONSE_SUPPRESSION_HEADERS, DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, DEFAULT_SES_CLIENT_CONFIG, dynamodb, emailHeaders, IDynamoDBConfig, IDynamoDBInstance, IEmailAttachment, IEmailHeaderOptions, IEmailOptions, ILambda, ILambdaInstance, IParameterStore, IParameterStoreInstance, ISES, ISESInstance, ISQS, ISQSInstance, IUnprocessedItems, lambda, parameterStore, ses, sqs, TBatchWriteItems, TDeleteItem, TDeleteQueueItem, TGetItem, TGetQueueItems, TGetQueueUrl, TGetSecret, TGetSecrets, TInvokeLambda, TPutItem, TQueryTable, TScanTable, TSendMail, TSendMessage, TUpdateItem, } from './aws';
|
|
3
3
|
export { atob, btoa } from './base64';
|
|
4
4
|
export { logger } from './logger/logger';
|
|
5
5
|
export { asyncReduce, deepFlatten, flatten, List, partial, splitEvery, times, until, } from './utils';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allthings/cloud-toolkit",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Allthings GmbH",
|
|
6
6
|
"keywords": [
|
|
@@ -148,28 +148,29 @@
|
|
|
148
148
|
"@aws-sdk/lib-dynamodb": "^3.1042.0",
|
|
149
149
|
"@types/aws-lambda": "^8.10.162",
|
|
150
150
|
"bottleneck": "^2.19.5",
|
|
151
|
-
"nodemailer": "^
|
|
151
|
+
"nodemailer": "^10.0.0",
|
|
152
152
|
"winston": "^3.19.0"
|
|
153
153
|
},
|
|
154
154
|
"devDependencies": {
|
|
155
|
-
"@allthings/eslint-config": "5.2.
|
|
155
|
+
"@allthings/eslint-config": "5.2.1",
|
|
156
156
|
"@commitlint/cli": "21.2.2",
|
|
157
157
|
"@commitlint/config-conventional": "21.2.2",
|
|
158
158
|
"@rollup/plugin-node-resolve": "16.0.3",
|
|
159
159
|
"@types/node": "24.13.3",
|
|
160
160
|
"@types/nodemailer": "8.0.1",
|
|
161
|
-
"@vitest/coverage-v8": "
|
|
161
|
+
"@vitest/coverage-v8": "5.0.0",
|
|
162
162
|
"aws-sdk-client-mock": "4.1.0",
|
|
163
163
|
"conventional-changelog-conventionalcommits": "9.3.1",
|
|
164
|
-
"eslint": "10.
|
|
164
|
+
"eslint": "10.10.0",
|
|
165
165
|
"husky": "9.1.7",
|
|
166
|
-
"lint-staged": "17.
|
|
166
|
+
"lint-staged": "17.5.0",
|
|
167
167
|
"prettier": "3.9.6",
|
|
168
168
|
"rimraf": "6.1.3",
|
|
169
|
-
"rollup": "4.
|
|
169
|
+
"rollup": "4.63.1",
|
|
170
170
|
"semantic-release": "25.0.9",
|
|
171
171
|
"typescript": "6.0.3",
|
|
172
|
-
"
|
|
172
|
+
"vite": "8.2.2",
|
|
173
|
+
"vitest": "5.0.0"
|
|
173
174
|
},
|
|
174
175
|
"prettier": {
|
|
175
176
|
"printWidth": 80,
|