tencentcloud-sdk-nodejs-ses 4.0.1053 → 4.1.15

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.
@@ -1,421 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
2
- /*
3
- * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing,
12
- * software distributed under the License is distributed on an
13
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- * KIND, either express or implied. See the License for the
15
- * specific language governing permissions and limitations
16
- * under the License.
17
- */
18
- import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common"
19
- import {
20
- BatchSendEmailRequest,
21
- GetEmailTemplateRequest,
22
- ListSendTasksResponse,
23
- CreateReceiverResponse,
24
- CreateCustomBlacklistRequest,
25
- ListEmailAddressResponse,
26
- ListEmailAddressRequest,
27
- UpdateCustomBlackListResponse,
28
- UpdateEmailSmtpPassWordResponse,
29
- ListReceiversRequest,
30
- GetEmailIdentityResponse,
31
- ListBlackEmailAddressRequest,
32
- Attachment,
33
- Template,
34
- ListSendTasksRequest,
35
- GetSendEmailStatusResponse,
36
- TemplatesMetadata,
37
- ReceiverDetail,
38
- DeleteBlackListRequest,
39
- EmailSender,
40
- BatchSendEmailResponse,
41
- DeleteEmailIdentityRequest,
42
- Volume,
43
- UpdateEmailIdentityRequest,
44
- GetEmailIdentityRequest,
45
- DeleteEmailIdentityResponse,
46
- GetStatisticsReportRequest,
47
- CreateCustomBlacklistResponse,
48
- CreateReceiverRequest,
49
- SendTaskData,
50
- ListReceiverDetailsResponse,
51
- DeleteEmailTemplateResponse,
52
- UpdateCustomBlackListRequest,
53
- CreateEmailIdentityRequest,
54
- ListCustomBlacklistRequest,
55
- UpdateEmailSmtpPassWordRequest,
56
- ReceiverData,
57
- UpdateEmailIdentityResponse,
58
- CreateEmailTemplateRequest,
59
- DeleteBlackListResponse,
60
- DeleteCustomBlackListRequest,
61
- UpdateEmailTemplateRequest,
62
- ListCustomBlacklistResponse,
63
- SendEmailStatus,
64
- ListEmailTemplatesRequest,
65
- CreateReceiverDetailWithDataResponse,
66
- ReceiverInputData,
67
- CreateReceiverDetailResponse,
68
- DeleteReceiverResponse,
69
- ListEmailTemplatesResponse,
70
- SendEmailResponse,
71
- SendEmailRequest,
72
- ListBlackEmailAddressResponse,
73
- GetSendEmailStatusRequest,
74
- Simple,
75
- DeleteReceiverRequest,
76
- ListEmailIdentitiesResponse,
77
- DeleteEmailTemplateRequest,
78
- TemplateContent,
79
- GetStatisticsReportResponse,
80
- DeleteEmailAddressRequest,
81
- BlackAddressDetail,
82
- EmailIdentity,
83
- BlackEmailAddress,
84
- DeleteEmailAddressResponse,
85
- CycleEmailParam,
86
- CreateEmailIdentityResponse,
87
- ListReceiverDetailsRequest,
88
- CreateEmailAddressRequest,
89
- DeleteCustomBlackListResponse,
90
- CreateReceiverDetailRequest,
91
- CreateEmailTemplateResponse,
92
- ListReceiversResponse,
93
- CreateEmailAddressResponse,
94
- UpdateEmailTemplateResponse,
95
- CreateReceiverDetailWithDataRequest,
96
- TimedEmailParam,
97
- DNSAttributes,
98
- GetEmailTemplateResponse,
99
- ListEmailIdentitiesRequest,
100
- } from "./ses_models"
101
-
102
- /**
103
- * ses client
104
- * @class
105
- */
106
- export class Client extends TencentCloudCommon.AbstractClient {
107
- constructor(clientConfig: TencentCloudCommon.ClientConfig) {
108
- super("ses.tencentcloudapi.com", "2020-10-02", clientConfig)
109
- }
110
-
111
- /**
112
- * 获取当前发信域名列表,包含已验证通过与未验证的域名
113
- */
114
- async ListEmailIdentities(
115
- req?: ListEmailIdentitiesRequest,
116
- cb?: (error: string, rep: ListEmailIdentitiesResponse) => void
117
- ): Promise<ListEmailIdentitiesResponse> {
118
- return this.request("ListEmailIdentities", req, cb)
119
- }
120
-
121
- /**
122
- * 在验证了发信域名之后,您需要一个发信地址来发送邮件。例如发信域名是mail.qcloud.com,那么发信地址可以为 service@mail.qcloud.com。如果您想要收件人在收件箱列表中显示您的别名,例如"腾讯云邮件通知"。那么发信地址为: 别名 空格 尖括号 邮箱地址。请注意中间需要有空格
123
- */
124
- async CreateEmailAddress(
125
- req: CreateEmailAddressRequest,
126
- cb?: (error: string, rep: CreateEmailAddressResponse) => void
127
- ): Promise<CreateEmailAddressResponse> {
128
- return this.request("CreateEmailAddress", req, cb)
129
- }
130
-
131
- /**
132
- * 添加收件人地址附带模板参数,使用本接口在添加收件人地址的同时传入模板参数,使每一个收件人地址在发信的时候使用的模板变量取值不同。用户首先调用创建收件人列表接口-CreateReceiver后,然后调用本接口传入收件人地址和发信时的模板参数,最后使用批量发送邮件接口-BatchSendEmail,即可完成批量发信。需要注意的是在使用本接口后BatchSendEmail接口中的Template参数不需再传。用户也可以在控制台上邮件发送-收件人列表菜单中,通过导入文件的方式,导入收件人地址和模板变量和参数值。本接口一次请求的收件人地址数量限制为2W条,本接口同时也可以用来向已经上传完成的收件人列表追加收件人地址,但收件人列表中收件人地址的总量不能超过一定的数量,目前是限制5万条。本接口不支持去除重复的收件人地址,用户需要自己保证上传和追加地址不重复,不与之前上传的地址重复。
133
- */
134
- async CreateReceiverDetailWithData(
135
- req: CreateReceiverDetailWithDataRequest,
136
- cb?: (error: string, rep: CreateReceiverDetailWithDataResponse) => void
137
- ): Promise<CreateReceiverDetailWithDataResponse> {
138
- return this.request("CreateReceiverDetailWithData", req, cb)
139
- }
140
-
141
- /**
142
- * 获取邮件发送状态。仅支持查询30天之内的数据
143
- */
144
- async GetSendEmailStatus(
145
- req: GetSendEmailStatusRequest,
146
- cb?: (error: string, rep: GetSendEmailStatusResponse) => void
147
- ): Promise<GetSendEmailStatusResponse> {
148
- return this.request("GetSendEmailStatus", req, cb)
149
- }
150
-
151
- /**
152
- * 根据收件人列表id查询收件人列表中的所有收件人邮箱地址,分页查询,可以根据收件邮箱地址来过滤查询
153
- */
154
- async ListReceiverDetails(
155
- req: ListReceiverDetailsRequest,
156
- cb?: (error: string, rep: ListReceiverDetailsResponse) => void
157
- ): Promise<ListReceiverDetailsResponse> {
158
- return this.request("ListReceiverDetails", req, cb)
159
- }
160
-
161
- /**
162
- * 创建收件人列表,收件人列表是发送批量邮件的目标邮件地址列表。创建列表后,需要上传收件人邮箱地址。之后创建发送任务,关联列表,便可以实现批量发送邮件的功能
163
- */
164
- async CreateReceiver(
165
- req: CreateReceiverRequest,
166
- cb?: (error: string, rep: CreateReceiverResponse) => void
167
- ): Promise<CreateReceiverResponse> {
168
- return this.request("CreateReceiver", req, cb)
169
- }
170
-
171
- /**
172
- * 获取某个发信域名的配置详情
173
- */
174
- async GetEmailIdentity(
175
- req: GetEmailIdentityRequest,
176
- cb?: (error: string, rep: GetEmailIdentityResponse) => void
177
- ): Promise<GetEmailIdentityResponse> {
178
- return this.request("GetEmailIdentity", req, cb)
179
- }
180
-
181
- /**
182
- * 根据模板ID获取模板详情
183
- */
184
- async GetEmailTemplate(
185
- req: GetEmailTemplateRequest,
186
- cb?: (error: string, rep: GetEmailTemplateResponse) => void
187
- ): Promise<GetEmailTemplateResponse> {
188
- return this.request("GetEmailTemplate", req, cb)
189
- }
190
-
191
- /**
192
- * 更新自定义黑名单
193
- */
194
- async UpdateCustomBlackList(
195
- req: UpdateCustomBlackListRequest,
196
- cb?: (error: string, rep: UpdateCustomBlackListResponse) => void
197
- ): Promise<UpdateCustomBlackListResponse> {
198
- return this.request("UpdateCustomBlackList", req, cb)
199
- }
200
-
201
- /**
202
- * 腾讯云发送的邮件一旦被收件方判断为硬退(Hard Bounce),腾讯云会拉黑该地址,并不允许所有用户向该地址发送邮件。成为邮箱黑名单。如果业务方确认是误判,可以从黑名单中删除。
203
- */
204
- async ListBlackEmailAddress(
205
- req: ListBlackEmailAddressRequest,
206
- cb?: (error: string, rep: ListBlackEmailAddressResponse) => void
207
- ): Promise<ListBlackEmailAddressResponse> {
208
- return this.request("ListBlackEmailAddress", req, cb)
209
- }
210
-
211
- /**
212
- * 更新邮件模板,更新后需再次审核
213
- */
214
- async UpdateEmailTemplate(
215
- req: UpdateEmailTemplateRequest,
216
- cb?: (error: string, rep: UpdateEmailTemplateResponse) => void
217
- ): Promise<UpdateEmailTemplateResponse> {
218
- return this.request("UpdateEmailTemplate", req, cb)
219
- }
220
-
221
- /**
222
- * 您已经成功配置好了您的DNS,接下来请求腾讯云验证您的DNS配置是否正确
223
- */
224
- async UpdateEmailIdentity(
225
- req: UpdateEmailIdentityRequest,
226
- cb?: (error: string, rep: UpdateEmailIdentityResponse) => void
227
- ): Promise<UpdateEmailIdentityResponse> {
228
- return this.request("UpdateEmailIdentity", req, cb)
229
- }
230
-
231
- /**
232
- * 删除发信域名,删除后,将不可再使用该域名进行发信
233
- */
234
- async DeleteEmailIdentity(
235
- req: DeleteEmailIdentityRequest,
236
- cb?: (error: string, rep: DeleteEmailIdentityResponse) => void
237
- ): Promise<DeleteEmailIdentityResponse> {
238
- return this.request("DeleteEmailIdentity", req, cb)
239
- }
240
-
241
- /**
242
- * 获取发信地址列表
243
- */
244
- async ListEmailAddress(
245
- req?: ListEmailAddressRequest,
246
- cb?: (error: string, rep: ListEmailAddressResponse) => void
247
- ): Promise<ListEmailAddressResponse> {
248
- return this.request("ListEmailAddress", req, cb)
249
- }
250
-
251
- /**
252
- * 根据收件id删除收件人列表,同时删除列表中的所有收件邮箱
253
- */
254
- async DeleteReceiver(
255
- req: DeleteReceiverRequest,
256
- cb?: (error: string, rep: DeleteReceiverResponse) => void
257
- ): Promise<DeleteReceiverResponse> {
258
- return this.request("DeleteReceiver", req, cb)
259
- }
260
-
261
- /**
262
- * 创建模板,该模板可以是TXT或者HTML,请注意如果HTML不要包含外部文件的CSS。模板中的变量使用 {{变量名}} 表示。
263
- 注意:模板需要审核通过才可以使用。
264
- */
265
- async CreateEmailTemplate(
266
- req: CreateEmailTemplateRequest,
267
- cb?: (error: string, rep: CreateEmailTemplateResponse) => void
268
- ): Promise<CreateEmailTemplateResponse> {
269
- return this.request("CreateEmailTemplate", req, cb)
270
- }
271
-
272
- /**
273
- * 您可以通过此API批量发送TEXT或者HTML邮件,适用于营销类、通知类邮件。默认仅支持使用模板发送邮件。批量发送之前,需先创建收件人列表,和收件人地址,并通过收件人列表id来进行发送。批量发送任务支持定时发送和周期重复发送,定时发送需传TimedParam,周期重复发送需传CycleParam
274
- */
275
- async BatchSendEmail(
276
- req: BatchSendEmailRequest,
277
- cb?: (error: string, rep: BatchSendEmailResponse) => void
278
- ): Promise<BatchSendEmailResponse> {
279
- return this.request("BatchSendEmail", req, cb)
280
- }
281
-
282
- /**
283
- * 设置邮箱的smtp密码。若要通过smtp发送邮件,必须为邮箱设置smtp密码。初始时,邮箱没有设置smtp密码,不能使用smtp的方式发送邮件。设置smtp密码后,可以修改密码。
284
- */
285
- async UpdateEmailSmtpPassWord(
286
- req: UpdateEmailSmtpPassWordRequest,
287
- cb?: (error: string, rep: UpdateEmailSmtpPassWordResponse) => void
288
- ): Promise<UpdateEmailSmtpPassWordResponse> {
289
- return this.request("UpdateEmailSmtpPassWord", req, cb)
290
- }
291
-
292
- /**
293
- * 添加自定义黑名单
294
- */
295
- async CreateCustomBlacklist(
296
- req: CreateCustomBlacklistRequest,
297
- cb?: (error: string, rep: CreateCustomBlacklistResponse) => void
298
- ): Promise<CreateCustomBlacklistResponse> {
299
- return this.request("CreateCustomBlacklist", req, cb)
300
- }
301
-
302
- /**
303
- * 删除发信模板
304
- */
305
- async DeleteEmailTemplate(
306
- req: DeleteEmailTemplateRequest,
307
- cb?: (error: string, rep: DeleteEmailTemplateResponse) => void
308
- ): Promise<DeleteEmailTemplateResponse> {
309
- return this.request("DeleteEmailTemplate", req, cb)
310
- }
311
-
312
- /**
313
- * 获取当前邮件模板列表
314
- */
315
- async ListEmailTemplates(
316
- req: ListEmailTemplatesRequest,
317
- cb?: (error: string, rep: ListEmailTemplatesResponse) => void
318
- ): Promise<ListEmailTemplatesResponse> {
319
- return this.request("ListEmailTemplates", req, cb)
320
- }
321
-
322
- /**
323
- * 分页查询批量发送邮件任务,包含即时发送任务,定时发送任务,周期重复发送任务,查询发送情况,包括请求数量,已发数量,缓存数量,任务状态等信息
324
- */
325
- async ListSendTasks(
326
- req: ListSendTasksRequest,
327
- cb?: (error: string, rep: ListSendTasksResponse) => void
328
- ): Promise<ListSendTasksResponse> {
329
- return this.request("ListSendTasks", req, cb)
330
- }
331
-
332
- /**
333
- * 在使用身份发送电子邮件之前,您需要有一个电子邮件域名,该域名可以是您的网站或者移动应用的域名。您首先必须进行验证,证明自己是该域名的所有者,并且授权给腾讯云SES发送许可,才可以从该域名发送电子邮件。
334
- */
335
- async CreateEmailIdentity(
336
- req: CreateEmailIdentityRequest,
337
- cb?: (error: string, rep: CreateEmailIdentityResponse) => void
338
- ): Promise<CreateEmailIdentityResponse> {
339
- return this.request("CreateEmailIdentity", req, cb)
340
- }
341
-
342
- /**
343
- * 删除自定义黑名单邮箱地址
344
- */
345
- async DeleteCustomBlackList(
346
- req: DeleteCustomBlackListRequest,
347
- cb?: (error: string, rep: DeleteCustomBlackListResponse) => void
348
- ): Promise<DeleteCustomBlackListResponse> {
349
- return this.request("DeleteCustomBlackList", req, cb)
350
- }
351
-
352
- /**
353
- * 邮箱被拉黑之后,用户如果确认收件邮箱有效或者已经处于激活状态,可以从腾讯云地址库中删除该黑名单之后继续投递。
354
- */
355
- async DeleteBlackList(
356
- req: DeleteBlackListRequest,
357
- cb?: (error: string, rep: DeleteBlackListResponse) => void
358
- ): Promise<DeleteBlackListResponse> {
359
- return this.request("DeleteBlackList", req, cb)
360
- }
361
-
362
- /**
363
- * 您可以通过此API发送HTML或者TEXT邮件,适用于触发类邮件(验证码、交易类)。默认仅支持使用模板发送邮件。
364
- */
365
- async SendEmail(
366
- req: SendEmailRequest,
367
- cb?: (error: string, rep: SendEmailResponse) => void
368
- ): Promise<SendEmailResponse> {
369
- return this.request("SendEmail", req, cb)
370
- }
371
-
372
- /**
373
- * 获取自定义黑名单列表
374
- */
375
- async ListCustomBlacklist(
376
- req: ListCustomBlacklistRequest,
377
- cb?: (error: string, rep: ListCustomBlacklistResponse) => void
378
- ): Promise<ListCustomBlacklistResponse> {
379
- return this.request("ListCustomBlacklist", req, cb)
380
- }
381
-
382
- /**
383
- * 获取近期发送的统计情况,包含发送量、送达率、打开率、退信率等一系列数据。
384
- */
385
- async GetStatisticsReport(
386
- req: GetStatisticsReportRequest,
387
- cb?: (error: string, rep: GetStatisticsReportResponse) => void
388
- ): Promise<GetStatisticsReportResponse> {
389
- return this.request("GetStatisticsReport", req, cb)
390
- }
391
-
392
- /**
393
- * 在创建完收件人列表后,向这个收件人列表中批量增加收件人邮箱地址,一次最大支持2万,异步完成处理。数据量比较大的时候,上传可能需要一点时间,可以通过查询收件人列表了解上传状态和上传数量。本接口与接口CreateReceiverDetailWithData的功能特性基本一致,只是不支持上传发信时的模板参数。用户首先调用创建收件人列表接口-CreateReceiver后,然后调用本接口传入收件人地址,最后使用批量发送邮件接口-BatchSendEmail,即可完成批量发信。本接口也支持追加收件人地址,也不支持去重,需要用户自己保证收件人地址不重复。本接口一次请求的收件人地址数量限制为2W条,但收件人列表中收件人地址的总量不能超过一定的数量,目前是限制5万条。
394
- */
395
- async CreateReceiverDetail(
396
- req: CreateReceiverDetailRequest,
397
- cb?: (error: string, rep: CreateReceiverDetailResponse) => void
398
- ): Promise<CreateReceiverDetailResponse> {
399
- return this.request("CreateReceiverDetail", req, cb)
400
- }
401
-
402
- /**
403
- * 根据条件查询收件人列表,支持分页,模糊查询,状态查询
404
- */
405
- async ListReceivers(
406
- req: ListReceiversRequest,
407
- cb?: (error: string, rep: ListReceiversResponse) => void
408
- ): Promise<ListReceiversResponse> {
409
- return this.request("ListReceivers", req, cb)
410
- }
411
-
412
- /**
413
- * 删除发信人地址
414
- */
415
- async DeleteEmailAddress(
416
- req: DeleteEmailAddressRequest,
417
- cb?: (error: string, rep: DeleteEmailAddressResponse) => void
418
- ): Promise<DeleteEmailAddressResponse> {
419
- return this.request("DeleteEmailAddress", req, cb)
420
- }
421
- }