chatbot-nc 2.1.93 → 2.1.94
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/cjs/aws/index.d.ts +2 -18
- package/dist/cjs/aws/services/AWSSES.d.ts +2 -19
- package/dist/cjs/aws/services/AWSSES.js +85 -78
- package/dist/cjs/aws/services/AWSSES.js.map +1 -1
- package/dist/esm/aws/index.d.ts +2 -18
- package/dist/esm/aws/services/AWSSES.d.ts +2 -19
- package/dist/esm/aws/services/AWSSES.js +85 -78
- package/dist/esm/aws/services/AWSSES.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/aws/index.d.ts
CHANGED
|
@@ -73,26 +73,10 @@ export declare const AWS: {
|
|
|
73
73
|
accessKeyId: string;
|
|
74
74
|
secretAccessKey: string;
|
|
75
75
|
}, param: import("@aws-sdk/client-sesv2").CreateEmailIdentityCommandInput) => Promise<boolean>;
|
|
76
|
-
|
|
76
|
+
addDomainIdentity: (credentials: {
|
|
77
77
|
accessKeyId: string;
|
|
78
78
|
secretAccessKey: string;
|
|
79
|
-
}) => Promise<
|
|
80
|
-
createReceiptRuleSet: (param: import("@aws-sdk/client-ses").CreateReceiptRuleCommandInput, credentials?: {
|
|
81
|
-
accessKeyId: string;
|
|
82
|
-
secretAccessKey: string;
|
|
83
|
-
}) => Promise<boolean>;
|
|
84
|
-
createReceiptRuleCommand: (param: import("@aws-sdk/client-ses").CreateReceiptRuleCommandInput, credentials?: {
|
|
85
|
-
accessKeyId: string;
|
|
86
|
-
secretAccessKey: string;
|
|
87
|
-
}) => Promise<boolean>;
|
|
88
|
-
deleteReceiptRuleCommand: (param: import("@aws-sdk/client-ses").DeleteReceiptRuleCommandInput, credentials?: {
|
|
89
|
-
accessKeyId: string;
|
|
90
|
-
secretAccessKey: string;
|
|
91
|
-
}) => Promise<boolean>;
|
|
92
|
-
setActiveReceiptRuleSet: (param: import("@aws-sdk/client-ses").SetActiveReceiptRuleSetCommandInput, credentials?: {
|
|
93
|
-
accessKeyId: string;
|
|
94
|
-
secretAccessKey: string;
|
|
95
|
-
}) => Promise<boolean>;
|
|
79
|
+
}, param: import("@aws-sdk/client-sesv2").CreateEmailIdentityCommandInput) => Promise<import("@aws-sdk/client-sesv2").CreateEmailIdentityCommandOutput>;
|
|
96
80
|
};
|
|
97
81
|
SQS: {
|
|
98
82
|
publish: (queue: string, message: string, group: string, delay?: number, messageAttributes?: Record<string, import("@aws-sdk/client-sqs").MessageAttributeValue>) => Promise<void>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CreateEmailIdentityCommandInput, GetEmailIdentityCommandInput } from '@aws-sdk/client-sesv2';
|
|
2
|
-
import { CreateReceiptRuleCommandInput, SetActiveReceiptRuleSetCommandInput, DeleteReceiptRuleCommandInput } from '@aws-sdk/client-ses';
|
|
3
2
|
export declare const SES: {
|
|
4
3
|
isEmailVerified: (credentials: {
|
|
5
4
|
accessKeyId: string;
|
|
@@ -9,24 +8,8 @@ export declare const SES: {
|
|
|
9
8
|
accessKeyId: string;
|
|
10
9
|
secretAccessKey: string;
|
|
11
10
|
}, param: CreateEmailIdentityCommandInput) => Promise<boolean>;
|
|
12
|
-
|
|
11
|
+
addDomainIdentity: (credentials: {
|
|
13
12
|
accessKeyId: string;
|
|
14
13
|
secretAccessKey: string;
|
|
15
|
-
}) => Promise<
|
|
16
|
-
createReceiptRuleSet: (param: CreateReceiptRuleCommandInput, credentials?: {
|
|
17
|
-
accessKeyId: string;
|
|
18
|
-
secretAccessKey: string;
|
|
19
|
-
}) => Promise<boolean>;
|
|
20
|
-
createReceiptRuleCommand: (param: CreateReceiptRuleCommandInput, credentials?: {
|
|
21
|
-
accessKeyId: string;
|
|
22
|
-
secretAccessKey: string;
|
|
23
|
-
}) => Promise<boolean>;
|
|
24
|
-
deleteReceiptRuleCommand: (param: DeleteReceiptRuleCommandInput, credentials?: {
|
|
25
|
-
accessKeyId: string;
|
|
26
|
-
secretAccessKey: string;
|
|
27
|
-
}) => Promise<boolean>;
|
|
28
|
-
setActiveReceiptRuleSet: (param: SetActiveReceiptRuleSetCommandInput, credentials?: {
|
|
29
|
-
accessKeyId: string;
|
|
30
|
-
secretAccessKey: string;
|
|
31
|
-
}) => Promise<boolean>;
|
|
14
|
+
}, param: CreateEmailIdentityCommandInput) => Promise<import("@aws-sdk/client-sesv2").CreateEmailIdentityCommandOutput>;
|
|
32
15
|
};
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SES = void 0;
|
|
4
4
|
const client_sesv2_1 = require("@aws-sdk/client-sesv2");
|
|
5
|
-
const client_ses_1 = require("@aws-sdk/client-ses");
|
|
6
5
|
// const sendEmail = async (param:SendEmailCommandInput) => {
|
|
7
6
|
// try {
|
|
8
7
|
// const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
@@ -52,95 +51,103 @@ const verifyEmailIdentity = async (credentials, param) => {
|
|
|
52
51
|
throw error;
|
|
53
52
|
}
|
|
54
53
|
};
|
|
55
|
-
const
|
|
54
|
+
const addDomainIdentity = async (credentials, param) => {
|
|
56
55
|
try {
|
|
57
56
|
const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const client = new client_ses_1.SESClient(config);
|
|
62
|
-
var command = await new client_ses_1.ListReceiptRuleSetsCommand({});
|
|
63
|
-
await client.send(command);
|
|
64
|
-
return true;
|
|
65
|
-
}
|
|
66
|
-
catch (error) {
|
|
67
|
-
console.error(error);
|
|
68
|
-
throw error;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
const createReceiptRuleSet = async (param, credentials) => {
|
|
72
|
-
try {
|
|
73
|
-
const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
74
|
-
let config = { awsRegion };
|
|
75
|
-
if (credentials)
|
|
76
|
-
config = { credentials, region: awsRegion };
|
|
77
|
-
const client = new client_ses_1.SESClient(config);
|
|
78
|
-
var command = await new client_ses_1.CreateReceiptRuleSetCommand(param);
|
|
79
|
-
await client.send(command);
|
|
80
|
-
return true;
|
|
81
|
-
}
|
|
82
|
-
catch (error) {
|
|
83
|
-
console.error(error);
|
|
84
|
-
throw error;
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
const createReceiptRuleCommand = async (param, credentials) => {
|
|
88
|
-
try {
|
|
89
|
-
const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
90
|
-
let config = { awsRegion };
|
|
91
|
-
if (credentials)
|
|
92
|
-
config = { credentials, region: awsRegion };
|
|
93
|
-
const client = new client_ses_1.SESClient(config);
|
|
94
|
-
var command = await new client_ses_1.CreateReceiptRuleCommand(param);
|
|
95
|
-
await client.send(command);
|
|
96
|
-
return true;
|
|
97
|
-
}
|
|
98
|
-
catch (error) {
|
|
99
|
-
console.error(error);
|
|
100
|
-
throw error;
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
const deleteReceiptRuleCommand = async (param, credentials) => {
|
|
104
|
-
try {
|
|
105
|
-
const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
106
|
-
let config = { awsRegion };
|
|
107
|
-
if (credentials)
|
|
108
|
-
config = { credentials, region: awsRegion };
|
|
109
|
-
const client = new client_ses_1.SESClient(config);
|
|
110
|
-
var command = await new client_ses_1.DeleteReceiptRuleCommand(param);
|
|
111
|
-
await client.send(command);
|
|
112
|
-
return true;
|
|
113
|
-
}
|
|
114
|
-
catch (error) {
|
|
115
|
-
console.error(error);
|
|
116
|
-
throw error;
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
const setActiveReceiptRuleSet = async (param, credentials) => {
|
|
120
|
-
try {
|
|
121
|
-
const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
122
|
-
let config = { awsRegion };
|
|
123
|
-
if (credentials)
|
|
124
|
-
config = { credentials, region: awsRegion };
|
|
125
|
-
const client = new client_ses_1.SESClient(config);
|
|
126
|
-
var command = await new client_ses_1.SetActiveReceiptRuleSetCommand(param);
|
|
127
|
-
await client.send(command);
|
|
128
|
-
return true;
|
|
57
|
+
const client = new client_sesv2_1.SESv2Client({ region: awsRegion, credentials });
|
|
58
|
+
var command = await new client_sesv2_1.CreateEmailIdentityCommand(param);
|
|
59
|
+
return await client.send(command);
|
|
129
60
|
}
|
|
130
61
|
catch (error) {
|
|
131
62
|
console.error(error);
|
|
132
63
|
throw error;
|
|
133
64
|
}
|
|
134
65
|
};
|
|
66
|
+
// const listReceiptRuleSets = async (credentials?:{accessKeyId:string,secretAccessKey:string}) => {
|
|
67
|
+
// try {
|
|
68
|
+
// const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
69
|
+
// let config = {awsRegion} as Record<string,any>;
|
|
70
|
+
// if(credentials)
|
|
71
|
+
// config = {credentials,region:awsRegion}
|
|
72
|
+
// const client = new SESClient(config);
|
|
73
|
+
// var command = await new ListReceiptRuleSetsCommand({});
|
|
74
|
+
// await client.send(command);
|
|
75
|
+
// return true;
|
|
76
|
+
// } catch (error) {
|
|
77
|
+
// console.error(error);
|
|
78
|
+
// throw error;
|
|
79
|
+
// }
|
|
80
|
+
// }
|
|
81
|
+
// const createReceiptRuleSet = async (param:CreateReceiptRuleCommandInput,credentials?:{accessKeyId:string,secretAccessKey:string}) => {
|
|
82
|
+
// try {
|
|
83
|
+
// const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
84
|
+
// let config = {awsRegion} as Record<string,any>;
|
|
85
|
+
// if(credentials)
|
|
86
|
+
// config = {credentials,region:awsRegion}
|
|
87
|
+
// const client = new SESClient(config);
|
|
88
|
+
// var command = await new CreateReceiptRuleSetCommand(param);
|
|
89
|
+
// await client.send(command);
|
|
90
|
+
// return true;
|
|
91
|
+
// } catch (error) {
|
|
92
|
+
// console.error(error);
|
|
93
|
+
// throw error;
|
|
94
|
+
// }
|
|
95
|
+
// }
|
|
96
|
+
// const createReceiptRuleCommand = async (param:CreateReceiptRuleCommandInput,credentials?:{accessKeyId:string,secretAccessKey:string}) => {
|
|
97
|
+
// try {
|
|
98
|
+
// const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
99
|
+
// let config = {awsRegion} as Record<string,any>;
|
|
100
|
+
// if(credentials)
|
|
101
|
+
// config = {credentials,region:awsRegion}
|
|
102
|
+
// const client = new SESClient(config);
|
|
103
|
+
// var command = await new CreateReceiptRuleCommand(param);
|
|
104
|
+
// await client.send(command);
|
|
105
|
+
// return true;
|
|
106
|
+
// } catch (error) {
|
|
107
|
+
// console.error(error);
|
|
108
|
+
// throw error;
|
|
109
|
+
// }
|
|
110
|
+
// }
|
|
111
|
+
// const deleteReceiptRuleCommand = async (param:DeleteReceiptRuleCommandInput,credentials?:{accessKeyId:string,secretAccessKey:string}) => {
|
|
112
|
+
// try {
|
|
113
|
+
// const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
114
|
+
// let config = {awsRegion} as Record<string,any>;
|
|
115
|
+
// if(credentials)
|
|
116
|
+
// config = {credentials,region:awsRegion}
|
|
117
|
+
// const client = new SESClient(config);
|
|
118
|
+
// var command = await new DeleteReceiptRuleCommand(param);
|
|
119
|
+
// await client.send(command);
|
|
120
|
+
// return true;
|
|
121
|
+
// } catch (error) {
|
|
122
|
+
// console.error(error);
|
|
123
|
+
// throw error;
|
|
124
|
+
// }
|
|
125
|
+
// }
|
|
126
|
+
// const setActiveReceiptRuleSet = async (param:SetActiveReceiptRuleSetCommandInput,credentials?:{accessKeyId:string,secretAccessKey:string}) => {
|
|
127
|
+
// try {
|
|
128
|
+
// const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
129
|
+
// let config = {awsRegion} as Record<string,any>;
|
|
130
|
+
// if(credentials)
|
|
131
|
+
// config = {credentials,region:awsRegion}
|
|
132
|
+
// const client = new SESClient(config);
|
|
133
|
+
// var command = await new SetActiveReceiptRuleSetCommand(param);
|
|
134
|
+
// await client.send(command);
|
|
135
|
+
// return true;
|
|
136
|
+
// } catch (error) {
|
|
137
|
+
// console.error(error);
|
|
138
|
+
// throw error;
|
|
139
|
+
// }
|
|
140
|
+
// }
|
|
135
141
|
exports.SES = {
|
|
136
142
|
// sendEmail,
|
|
137
143
|
isEmailVerified,
|
|
138
144
|
verifyEmailIdentity,
|
|
145
|
+
addDomainIdentity
|
|
139
146
|
///This are used for email
|
|
140
|
-
listReceiptRuleSets,
|
|
141
|
-
createReceiptRuleSet,
|
|
142
|
-
createReceiptRuleCommand,
|
|
143
|
-
deleteReceiptRuleCommand,
|
|
144
|
-
setActiveReceiptRuleSet
|
|
147
|
+
// listReceiptRuleSets,
|
|
148
|
+
// createReceiptRuleSet,
|
|
149
|
+
// createReceiptRuleCommand,
|
|
150
|
+
// deleteReceiptRuleCommand,
|
|
151
|
+
// setActiveReceiptRuleSet
|
|
145
152
|
};
|
|
146
153
|
//# sourceMappingURL=AWSSES.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AWSSES.js","sourceRoot":"","sources":["../../../../aws/services/AWSSES.ts"],"names":[],"mappings":";;;AAAA,wDAAiN;
|
|
1
|
+
{"version":3,"file":"AWSSES.js","sourceRoot":"","sources":["../../../../aws/services/AWSSES.ts"],"names":[],"mappings":";;;AAAA,wDAAiN;AAIjN,6DAA6D;AAC7D,YAAY;AACZ,2EAA2E;AAC3E,iEAAiE;AAEjE,2DAA2D;AAC3D,mDAAmD;AACnD,0DAA0D;AAC1D,kDAAkD;AAClD,2EAA2E;AAC3E,wBAAwB;AACxB,kFAAkF;AAClF,gCAAgC;AAChC,QAAQ;AACR,IAAI;AAEJ;;;;GAIG;AACH,MAAM,eAAe,GAAG,KAAK,EAAE,WAAuD,EAAC,KAAmC,EAAE,EAAE;IAC1H,IAAI,CAAC;QAED,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WA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zE,sCAAsC;AACtC,uBAAuB;AACvB,wBAAwB;AACxB,gCAAgC;AAChC,uBAAuB;AACvB,QAAQ;AACR,IAAI;AAES,QAAA,GAAG,GAAG;IACf,aAAa;IACb,eAAe;IACf,mBAAmB;IACnB,iBAAiB;IACjB,0BAA0B;IAC1B,uBAAuB;IACvB,wBAAwB;IACxB,4BAA4B;IAC5B,4BAA4B;IAC5B,0BAA0B;CAC7B,CAAA"}
|
package/dist/esm/aws/index.d.ts
CHANGED
|
@@ -73,26 +73,10 @@ export declare const AWS: {
|
|
|
73
73
|
accessKeyId: string;
|
|
74
74
|
secretAccessKey: string;
|
|
75
75
|
}, param: import("@aws-sdk/client-sesv2").CreateEmailIdentityCommandInput) => Promise<boolean>;
|
|
76
|
-
|
|
76
|
+
addDomainIdentity: (credentials: {
|
|
77
77
|
accessKeyId: string;
|
|
78
78
|
secretAccessKey: string;
|
|
79
|
-
}) => Promise<
|
|
80
|
-
createReceiptRuleSet: (param: import("@aws-sdk/client-ses").CreateReceiptRuleCommandInput, credentials?: {
|
|
81
|
-
accessKeyId: string;
|
|
82
|
-
secretAccessKey: string;
|
|
83
|
-
}) => Promise<boolean>;
|
|
84
|
-
createReceiptRuleCommand: (param: import("@aws-sdk/client-ses").CreateReceiptRuleCommandInput, credentials?: {
|
|
85
|
-
accessKeyId: string;
|
|
86
|
-
secretAccessKey: string;
|
|
87
|
-
}) => Promise<boolean>;
|
|
88
|
-
deleteReceiptRuleCommand: (param: import("@aws-sdk/client-ses").DeleteReceiptRuleCommandInput, credentials?: {
|
|
89
|
-
accessKeyId: string;
|
|
90
|
-
secretAccessKey: string;
|
|
91
|
-
}) => Promise<boolean>;
|
|
92
|
-
setActiveReceiptRuleSet: (param: import("@aws-sdk/client-ses").SetActiveReceiptRuleSetCommandInput, credentials?: {
|
|
93
|
-
accessKeyId: string;
|
|
94
|
-
secretAccessKey: string;
|
|
95
|
-
}) => Promise<boolean>;
|
|
79
|
+
}, param: import("@aws-sdk/client-sesv2").CreateEmailIdentityCommandInput) => Promise<import("@aws-sdk/client-sesv2").CreateEmailIdentityCommandOutput>;
|
|
96
80
|
};
|
|
97
81
|
SQS: {
|
|
98
82
|
publish: (queue: string, message: string, group: string, delay?: number, messageAttributes?: Record<string, import("@aws-sdk/client-sqs").MessageAttributeValue>) => Promise<void>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CreateEmailIdentityCommandInput, GetEmailIdentityCommandInput } from '@aws-sdk/client-sesv2';
|
|
2
|
-
import { CreateReceiptRuleCommandInput, SetActiveReceiptRuleSetCommandInput, DeleteReceiptRuleCommandInput } from '@aws-sdk/client-ses';
|
|
3
2
|
export declare const SES: {
|
|
4
3
|
isEmailVerified: (credentials: {
|
|
5
4
|
accessKeyId: string;
|
|
@@ -9,24 +8,8 @@ export declare const SES: {
|
|
|
9
8
|
accessKeyId: string;
|
|
10
9
|
secretAccessKey: string;
|
|
11
10
|
}, param: CreateEmailIdentityCommandInput) => Promise<boolean>;
|
|
12
|
-
|
|
11
|
+
addDomainIdentity: (credentials: {
|
|
13
12
|
accessKeyId: string;
|
|
14
13
|
secretAccessKey: string;
|
|
15
|
-
}) => Promise<
|
|
16
|
-
createReceiptRuleSet: (param: CreateReceiptRuleCommandInput, credentials?: {
|
|
17
|
-
accessKeyId: string;
|
|
18
|
-
secretAccessKey: string;
|
|
19
|
-
}) => Promise<boolean>;
|
|
20
|
-
createReceiptRuleCommand: (param: CreateReceiptRuleCommandInput, credentials?: {
|
|
21
|
-
accessKeyId: string;
|
|
22
|
-
secretAccessKey: string;
|
|
23
|
-
}) => Promise<boolean>;
|
|
24
|
-
deleteReceiptRuleCommand: (param: DeleteReceiptRuleCommandInput, credentials?: {
|
|
25
|
-
accessKeyId: string;
|
|
26
|
-
secretAccessKey: string;
|
|
27
|
-
}) => Promise<boolean>;
|
|
28
|
-
setActiveReceiptRuleSet: (param: SetActiveReceiptRuleSetCommandInput, credentials?: {
|
|
29
|
-
accessKeyId: string;
|
|
30
|
-
secretAccessKey: string;
|
|
31
|
-
}) => Promise<boolean>;
|
|
14
|
+
}, param: CreateEmailIdentityCommandInput) => Promise<import("@aws-sdk/client-sesv2").CreateEmailIdentityCommandOutput>;
|
|
32
15
|
};
|
|
@@ -8,7 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { CreateEmailIdentityCommand, GetEmailIdentityCommand, SESv2Client } from '@aws-sdk/client-sesv2';
|
|
11
|
-
import { SESClient, CreateReceiptRuleCommand, ListReceiptRuleSetsCommand, CreateReceiptRuleSetCommand, SetActiveReceiptRuleSetCommand, DeleteReceiptRuleCommand } from '@aws-sdk/client-ses';
|
|
12
11
|
// const sendEmail = async (param:SendEmailCommandInput) => {
|
|
13
12
|
// try {
|
|
14
13
|
// const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
@@ -58,95 +57,103 @@ const verifyEmailIdentity = (credentials, param) => __awaiter(void 0, void 0, vo
|
|
|
58
57
|
throw error;
|
|
59
58
|
}
|
|
60
59
|
});
|
|
61
|
-
const
|
|
60
|
+
const addDomainIdentity = (credentials, param) => __awaiter(void 0, void 0, void 0, function* () {
|
|
62
61
|
try {
|
|
63
62
|
const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const client = new SESClient(config);
|
|
68
|
-
var command = yield new ListReceiptRuleSetsCommand({});
|
|
69
|
-
yield client.send(command);
|
|
70
|
-
return true;
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
console.error(error);
|
|
74
|
-
throw error;
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
const createReceiptRuleSet = (param, credentials) => __awaiter(void 0, void 0, void 0, function* () {
|
|
78
|
-
try {
|
|
79
|
-
const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
80
|
-
let config = { awsRegion };
|
|
81
|
-
if (credentials)
|
|
82
|
-
config = { credentials, region: awsRegion };
|
|
83
|
-
const client = new SESClient(config);
|
|
84
|
-
var command = yield new CreateReceiptRuleSetCommand(param);
|
|
85
|
-
yield client.send(command);
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
catch (error) {
|
|
89
|
-
console.error(error);
|
|
90
|
-
throw error;
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
const createReceiptRuleCommand = (param, credentials) => __awaiter(void 0, void 0, void 0, function* () {
|
|
94
|
-
try {
|
|
95
|
-
const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
96
|
-
let config = { awsRegion };
|
|
97
|
-
if (credentials)
|
|
98
|
-
config = { credentials, region: awsRegion };
|
|
99
|
-
const client = new SESClient(config);
|
|
100
|
-
var command = yield new CreateReceiptRuleCommand(param);
|
|
101
|
-
yield client.send(command);
|
|
102
|
-
return true;
|
|
103
|
-
}
|
|
104
|
-
catch (error) {
|
|
105
|
-
console.error(error);
|
|
106
|
-
throw error;
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
const deleteReceiptRuleCommand = (param, credentials) => __awaiter(void 0, void 0, void 0, function* () {
|
|
110
|
-
try {
|
|
111
|
-
const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
112
|
-
let config = { awsRegion };
|
|
113
|
-
if (credentials)
|
|
114
|
-
config = { credentials, region: awsRegion };
|
|
115
|
-
const client = new SESClient(config);
|
|
116
|
-
var command = yield new DeleteReceiptRuleCommand(param);
|
|
117
|
-
yield client.send(command);
|
|
118
|
-
return true;
|
|
119
|
-
}
|
|
120
|
-
catch (error) {
|
|
121
|
-
console.error(error);
|
|
122
|
-
throw error;
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
const setActiveReceiptRuleSet = (param, credentials) => __awaiter(void 0, void 0, void 0, function* () {
|
|
126
|
-
try {
|
|
127
|
-
const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
128
|
-
let config = { awsRegion };
|
|
129
|
-
if (credentials)
|
|
130
|
-
config = { credentials, region: awsRegion };
|
|
131
|
-
const client = new SESClient(config);
|
|
132
|
-
var command = yield new SetActiveReceiptRuleSetCommand(param);
|
|
133
|
-
yield client.send(command);
|
|
134
|
-
return true;
|
|
63
|
+
const client = new SESv2Client({ region: awsRegion, credentials });
|
|
64
|
+
var command = yield new CreateEmailIdentityCommand(param);
|
|
65
|
+
return yield client.send(command);
|
|
135
66
|
}
|
|
136
67
|
catch (error) {
|
|
137
68
|
console.error(error);
|
|
138
69
|
throw error;
|
|
139
70
|
}
|
|
140
71
|
});
|
|
72
|
+
// const listReceiptRuleSets = async (credentials?:{accessKeyId:string,secretAccessKey:string}) => {
|
|
73
|
+
// try {
|
|
74
|
+
// const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
75
|
+
// let config = {awsRegion} as Record<string,any>;
|
|
76
|
+
// if(credentials)
|
|
77
|
+
// config = {credentials,region:awsRegion}
|
|
78
|
+
// const client = new SESClient(config);
|
|
79
|
+
// var command = await new ListReceiptRuleSetsCommand({});
|
|
80
|
+
// await client.send(command);
|
|
81
|
+
// return true;
|
|
82
|
+
// } catch (error) {
|
|
83
|
+
// console.error(error);
|
|
84
|
+
// throw error;
|
|
85
|
+
// }
|
|
86
|
+
// }
|
|
87
|
+
// const createReceiptRuleSet = async (param:CreateReceiptRuleCommandInput,credentials?:{accessKeyId:string,secretAccessKey:string}) => {
|
|
88
|
+
// try {
|
|
89
|
+
// const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
90
|
+
// let config = {awsRegion} as Record<string,any>;
|
|
91
|
+
// if(credentials)
|
|
92
|
+
// config = {credentials,region:awsRegion}
|
|
93
|
+
// const client = new SESClient(config);
|
|
94
|
+
// var command = await new CreateReceiptRuleSetCommand(param);
|
|
95
|
+
// await client.send(command);
|
|
96
|
+
// return true;
|
|
97
|
+
// } catch (error) {
|
|
98
|
+
// console.error(error);
|
|
99
|
+
// throw error;
|
|
100
|
+
// }
|
|
101
|
+
// }
|
|
102
|
+
// const createReceiptRuleCommand = async (param:CreateReceiptRuleCommandInput,credentials?:{accessKeyId:string,secretAccessKey:string}) => {
|
|
103
|
+
// try {
|
|
104
|
+
// const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
105
|
+
// let config = {awsRegion} as Record<string,any>;
|
|
106
|
+
// if(credentials)
|
|
107
|
+
// config = {credentials,region:awsRegion}
|
|
108
|
+
// const client = new SESClient(config);
|
|
109
|
+
// var command = await new CreateReceiptRuleCommand(param);
|
|
110
|
+
// await client.send(command);
|
|
111
|
+
// return true;
|
|
112
|
+
// } catch (error) {
|
|
113
|
+
// console.error(error);
|
|
114
|
+
// throw error;
|
|
115
|
+
// }
|
|
116
|
+
// }
|
|
117
|
+
// const deleteReceiptRuleCommand = async (param:DeleteReceiptRuleCommandInput,credentials?:{accessKeyId:string,secretAccessKey:string}) => {
|
|
118
|
+
// try {
|
|
119
|
+
// const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
120
|
+
// let config = {awsRegion} as Record<string,any>;
|
|
121
|
+
// if(credentials)
|
|
122
|
+
// config = {credentials,region:awsRegion}
|
|
123
|
+
// const client = new SESClient(config);
|
|
124
|
+
// var command = await new DeleteReceiptRuleCommand(param);
|
|
125
|
+
// await client.send(command);
|
|
126
|
+
// return true;
|
|
127
|
+
// } catch (error) {
|
|
128
|
+
// console.error(error);
|
|
129
|
+
// throw error;
|
|
130
|
+
// }
|
|
131
|
+
// }
|
|
132
|
+
// const setActiveReceiptRuleSet = async (param:SetActiveReceiptRuleSetCommandInput,credentials?:{accessKeyId:string,secretAccessKey:string}) => {
|
|
133
|
+
// try {
|
|
134
|
+
// const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
|
|
135
|
+
// let config = {awsRegion} as Record<string,any>;
|
|
136
|
+
// if(credentials)
|
|
137
|
+
// config = {credentials,region:awsRegion}
|
|
138
|
+
// const client = new SESClient(config);
|
|
139
|
+
// var command = await new SetActiveReceiptRuleSetCommand(param);
|
|
140
|
+
// await client.send(command);
|
|
141
|
+
// return true;
|
|
142
|
+
// } catch (error) {
|
|
143
|
+
// console.error(error);
|
|
144
|
+
// throw error;
|
|
145
|
+
// }
|
|
146
|
+
// }
|
|
141
147
|
export const SES = {
|
|
142
148
|
// sendEmail,
|
|
143
149
|
isEmailVerified,
|
|
144
150
|
verifyEmailIdentity,
|
|
151
|
+
addDomainIdentity
|
|
145
152
|
///This are used for email
|
|
146
|
-
listReceiptRuleSets,
|
|
147
|
-
createReceiptRuleSet,
|
|
148
|
-
createReceiptRuleCommand,
|
|
149
|
-
deleteReceiptRuleCommand,
|
|
150
|
-
setActiveReceiptRuleSet
|
|
153
|
+
// listReceiptRuleSets,
|
|
154
|
+
// createReceiptRuleSet,
|
|
155
|
+
// createReceiptRuleCommand,
|
|
156
|
+
// deleteReceiptRuleCommand,
|
|
157
|
+
// setActiveReceiptRuleSet
|
|
151
158
|
};
|
|
152
159
|
//# sourceMappingURL=AWSSES.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AWSSES.js","sourceRoot":"","sources":["../../../../aws/services/AWSSES.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,0BAA0B,EAAmC,uBAAuB,EAAyE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"AWSSES.js","sourceRoot":"","sources":["../../../../aws/services/AWSSES.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,0BAA0B,EAAmC,uBAAuB,EAAyE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIjN,6DAA6D;AAC7D,YAAY;AACZ,2EAA2E;AAC3E,iEAAiE;AAEjE,2DAA2D;AAC3D,mDAAmD;AACnD,0DAA0D;AAC1D,kDAAkD;AAClD,2EAA2E;AAC3E,wBAAwB;AACxB,kFAAkF;AACl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