@allthings/cloud-toolkit 1.0.0 → 1.1.0-dev.0
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 +12 -0
- package/dist/lib.cjs.js +71 -3
- package/dist/lib.esm.js +50 -3
- package/dist/lib.umd.min.js +1 -1
- package/dist/src/aws/index.d.ts +2 -0
- package/dist/src/aws/ses.d.ts +32 -0
- package/dist/src/aws/ses.test.d.ts +1 -0
- package/dist/src/index.d.ts +1 -1
- package/package.json +4 -1
- package/dist/test/setup.js +0 -0
package/dist/src/aws/index.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import parameterStore, { DEFAULT_CLIENT_CONFIG as DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, IParameterStore } from './parameterStore';
|
|
2
|
+
import ses, { DEFAULT_CLIENT_CONFIG as DEFAULT_SES_CLIENT_CONFIG, IEmailAttachment, IEmailOptions, ISES } from './ses';
|
|
3
|
+
export { DEFAULT_SES_CLIENT_CONFIG, IEmailAttachment, IEmailOptions, ISES, ses };
|
|
2
4
|
export { DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, IParameterStore, parameterStore, };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
/// <reference types="node" />
|
|
4
|
+
import * as aws from '@aws-sdk/client-ses';
|
|
5
|
+
import { Transporter } from 'nodemailer';
|
|
6
|
+
export interface ISES {
|
|
7
|
+
clientConfig?: aws.SESClientConfig;
|
|
8
|
+
customSMTPConfig?: {
|
|
9
|
+
host: string;
|
|
10
|
+
port: number;
|
|
11
|
+
secure: boolean;
|
|
12
|
+
};
|
|
13
|
+
logger?: (message: string) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const DEFAULT_CLIENT_CONFIG: ISES;
|
|
16
|
+
export interface IEmailAttachment {
|
|
17
|
+
readonly content: string | Buffer | NodeJS.ReadableStream;
|
|
18
|
+
readonly contentType: string;
|
|
19
|
+
readonly filename: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IEmailOptions {
|
|
22
|
+
readonly attachments?: readonly IEmailAttachment[];
|
|
23
|
+
readonly html?: string;
|
|
24
|
+
readonly subject: string;
|
|
25
|
+
readonly text?: string;
|
|
26
|
+
readonly to: string | readonly string[];
|
|
27
|
+
}
|
|
28
|
+
declare const sendMail: (config: ISES, transport: Transporter, options: IEmailOptions, from: string) => Promise<boolean>;
|
|
29
|
+
declare const ses: (fromEmailAddress: string, userConfig: ISES) => {
|
|
30
|
+
sendMail: (options: IEmailOptions) => Promise<boolean>;
|
|
31
|
+
};
|
|
32
|
+
export default ses;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, IParameterStore, parameterStore, } from './aws';
|
|
1
|
+
export { DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, DEFAULT_SES_CLIENT_CONFIG, IEmailAttachment, IEmailOptions, IParameterStore, ISES, parameterStore, ses, } from './aws';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allthings/cloud-toolkit",
|
|
3
|
-
"version": "1.0.0",
|
|
3
|
+
"version": "1.1.0-dev.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Allthings GmbH",
|
|
6
6
|
"keywords": [
|
|
@@ -50,9 +50,11 @@
|
|
|
50
50
|
"serve": "npx serve -l 3333"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
+
"@aws-sdk/client-ses": "3.687.0",
|
|
53
54
|
"@aws-sdk/client-ssm": "3.682.0",
|
|
54
55
|
"bottleneck": "2.19.5",
|
|
55
56
|
"cross-fetch": "4.0.0",
|
|
57
|
+
"nodemailer": "6.9.16",
|
|
56
58
|
"query-string": "7.1.3"
|
|
57
59
|
},
|
|
58
60
|
"devDependencies": {
|
|
@@ -66,6 +68,7 @@
|
|
|
66
68
|
"@rollup/plugin-terser": "0.4.4",
|
|
67
69
|
"@types/jest": "26.0.24",
|
|
68
70
|
"@types/node": "22.9.0",
|
|
71
|
+
"@types/nodemailer": "6.4.16",
|
|
69
72
|
"@types/query-string": "6.3.0",
|
|
70
73
|
"aws-sdk-client-mock": "4.1.0",
|
|
71
74
|
"eslint": "8.57.1",
|
package/dist/test/setup.js
DELETED
|
File without changes
|