@unboundcx/sdk 2.7.6 → 2.8.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.
@@ -1,1986 +1,37 @@
1
- export class MessagingService {
2
- constructor(sdk) {
3
- this.sdk = sdk;
4
- this.sms = new SmsService(sdk);
5
- this.email = new EmailService(sdk);
6
- this.campaigns = new CampaignsService(sdk);
7
- }
8
- }
9
-
10
- export class SmsService {
11
- constructor(sdk) {
12
- this.sdk = sdk;
13
- this.templates = new SmsTemplatesService(sdk);
14
- }
15
-
16
- /**
17
- * Send an SMS/MMS message
18
- * @param {Object} params - Message parameters
19
- * @param {string} params.to - Recipient phone number (required)
20
- * @param {string} [params.from] - Sender phone number
21
- * @param {string} [params.message] - Message text
22
- * @param {string} [params.templateId] - Template ID to use
23
- * @param {Object} [params.variables] - Template variables
24
- * @param {Array<string>} [params.mediaUrls] - Media URLs for MMS
25
- * @param {string} [params.webhookUrl] - Webhook URL for delivery status
26
- * @returns {Promise<Object>} Message details
27
- */
28
- async send({
29
- from,
30
- to,
31
- message,
32
- templateId,
33
- variables,
34
- mediaUrls,
35
- webhookUrl,
36
- }) {
37
- const messageData = {};
38
- if (from) messageData.from = from;
39
- if (message) messageData.message = message;
40
- if (templateId) messageData.templateId = templateId;
41
- if (variables) messageData.variables = variables;
42
- if (mediaUrls) messageData.mediaUrls = mediaUrls;
43
- if (webhookUrl) messageData.webhookUrl = webhookUrl;
44
-
45
- this.sdk.validateParams(
46
- { to, ...messageData },
47
- {
48
- to: { type: 'string', required: true },
49
- from: { type: 'string', required: false },
50
- message: { type: 'string', required: false },
51
- templateId: { type: 'string', required: false },
52
- variables: { type: 'object', required: false },
53
- mediaUrls: { type: 'array', required: false },
54
- webhookUrl: { type: 'string', required: false },
55
- },
56
- );
57
-
58
- const options = {
59
- body: { to, ...messageData },
60
- };
61
-
62
- const result = await this.sdk._fetch('/messaging/sms', 'POST', options);
63
- return result;
64
- }
65
-
66
- /**
67
- * Get SMS/MMS message by ID
68
- * @param {string} id - Message ID
69
- * @returns {Promise<Object>} Message details
70
- */
71
- async get(id) {
72
- this.sdk.validateParams(
73
- { id },
74
- {
75
- id: { type: 'string', required: true },
76
- },
77
- );
78
-
79
- const result = await this.sdk._fetch(`/messaging/sms/${id}`, 'GET');
80
- return result;
81
- }
82
- }
83
-
84
- export class SmsTemplatesService {
85
- constructor(sdk) {
86
- this.sdk = sdk;
87
- }
88
-
89
- /**
90
- * Create SMS template
91
- * @param {Object} params - Template parameters
92
- * @param {string} params.name - Template name (required)
93
- * @param {string} params.message - Template message (required)
94
- * @param {Object} [params.variables] - Template variables
95
- * @returns {Promise<Object>} Created template details
96
- */
97
- async create({ name, message, variables }) {
98
- this.sdk.validateParams(
99
- { name, message },
100
- {
101
- name: { type: 'string', required: true },
102
- message: { type: 'string', required: true },
103
- variables: { type: 'object', required: false },
104
- },
105
- );
106
-
107
- const templateData = { name, message };
108
- if (variables) templateData.variables = variables;
109
-
110
- const options = {
111
- body: templateData,
112
- };
113
-
114
- const result = await this.sdk._fetch(
115
- '/messaging/sms/templates',
116
- 'POST',
117
- options,
118
- );
119
- return result;
120
- }
121
-
122
- /**
123
- * Update SMS template
124
- * @param {string} id - Template ID
125
- * @param {Object} params - Update parameters
126
- * @param {string} [params.name] - Template name
127
- * @param {string} [params.message] - Template message
128
- * @param {Object} [params.variables] - Template variables
129
- * @returns {Promise<Object>} Updated template details
130
- */
131
- async update(id, { name, message, variables }) {
132
- this.sdk.validateParams(
133
- { id },
134
- {
135
- id: { type: 'string', required: true },
136
- name: { type: 'string', required: false },
137
- message: { type: 'string', required: false },
138
- variables: { type: 'object', required: false },
139
- },
140
- );
141
-
142
- const updateData = {};
143
- if (name) updateData.name = name;
144
- if (message) updateData.message = message;
145
- if (variables) updateData.variables = variables;
146
-
147
- const options = {
148
- body: updateData,
149
- };
150
-
151
- const result = await this.sdk._fetch(
152
- `/messaging/sms/templates/${id}`,
153
- 'PUT',
154
- options,
155
- );
156
- return result;
157
- }
158
-
159
- /**
160
- * Delete SMS template
161
- * @param {string} id - Template ID
162
- * @returns {Promise<Object>} Deletion result
163
- */
164
- async delete(id) {
165
- this.sdk.validateParams(
166
- { id },
167
- {
168
- id: { type: 'string', required: true },
169
- },
170
- );
171
-
172
- const result = await this.sdk._fetch(
173
- `/messaging/sms/templates/${id}`,
174
- 'DELETE',
175
- );
176
- return result;
177
- }
178
-
179
- /**
180
- * Get SMS template by ID
181
- * @param {string} id - Template ID
182
- * @returns {Promise<Object>} Template details
183
- */
184
- async get(id) {
185
- this.sdk.validateParams(
186
- { id },
187
- {
188
- id: { type: 'string', required: true },
189
- },
190
- );
191
-
192
- const result = await this.sdk._fetch(
193
- `/messaging/sms/templates/${id}`,
194
- 'GET',
195
- );
196
- return result;
197
- }
198
-
199
- /**
200
- * List all SMS templates
201
- * @returns {Promise<Array>} List of templates
202
- */
203
- async list() {
204
- const result = await this.sdk._fetch('/messaging/sms/templates', 'GET');
205
- return result;
206
- }
207
- }
208
-
209
- export class EmailService {
210
- constructor(sdk) {
211
- this.sdk = sdk;
212
- this.templates = new EmailTemplatesService(sdk);
213
- this.domains = new EmailDomainsService(sdk);
214
- this.addresses = new EmailAddressesService(sdk);
215
- this.analytics = new EmailAnalyticsService(sdk);
216
- }
217
-
218
- /**
219
- * Send an email message
220
- * @param {Object} params - Email parameters
221
- * @param {string} params.from - Sender email address (required)
222
- * @param {string|Array<string>} params.to - Recipient email address(es) (required)
223
- * @param {string} params.subject - Email subject (required)
224
- * @param {string|Array<string>} [params.cc] - CC recipients
225
- * @param {string|Array<string>} [params.bcc] - BCC recipients
226
- * @param {string} [params.html] - HTML email body
227
- * @param {string} [params.text] - Plain text email body
228
- * @param {string} [params.templateId] - Email template ID to use
229
- * @param {Object} [params.variables] - Template variables for substitution
230
- * @param {Array} [params.storageId] - Array of storage IDs for attachments
231
- * @param {string} [params.replyTo] - Reply-to email address
232
- * @param {string} [params.replyToEmailId] - ID of email this is replying to
233
- * @param {string} [params.relatedId] - Related record ID
234
- * @param {string} [params.emailType='marketing'] - Email type: 'marketing' or 'transactional'
235
- * @param {boolean} [params.tracking=true] - Enable email tracking (opens, clicks)
236
- * @returns {Promise<Object>} Email send result with ID
237
- */
238
- async send({
239
- from,
240
- to,
241
- cc,
242
- bcc,
243
- subject,
244
- html,
245
- text,
246
- templateId,
247
- variables,
248
- storageId,
249
- replyTo,
250
- replyToEmailId,
251
- relatedId,
252
- emailType,
253
- tracking,
254
- }) {
255
- this.sdk.validateParams(
256
- { from, to, subject },
257
- {
258
- from: { type: 'string', required: true },
259
- to: { type: ['string', 'array'], required: true },
260
- subject: { type: 'string', required: true },
261
- cc: { type: ['string', 'array'], required: false },
262
- bcc: { type: ['string', 'array'], required: false },
263
- html: { type: 'string', required: false },
264
- text: { type: 'string', required: false },
265
- templateId: { type: 'string', required: false },
266
- variables: { type: 'object', required: false },
267
- storageId: { type: 'array', required: false },
268
- replyTo: { type: 'string', required: false },
269
- replyToEmailId: { type: 'string', required: false },
270
- relatedId: { type: 'string', required: false },
271
- emailType: { type: 'string', required: false },
272
- tracking: { type: 'boolean', required: false },
273
- },
274
- );
275
-
276
- const emailData = {
277
- from,
278
- to,
279
- subject,
280
- };
281
-
282
- if (cc) emailData.cc = cc;
283
- if (bcc) emailData.bcc = bcc;
284
- if (html) emailData.html = html;
285
- if (text) emailData.text = text;
286
- if (templateId) emailData.templateId = templateId;
287
- if (variables) emailData.variables = variables;
288
- if (storageId) emailData.storageId = storageId;
289
- if (replyTo) emailData.replyTo = replyTo;
290
- if (replyToEmailId) emailData.replyToEmailId = replyToEmailId;
291
- if (relatedId) emailData.relatedId = relatedId;
292
- if (emailType) emailData.emailType = emailType;
293
- if (tracking !== undefined) emailData.tracking = tracking;
294
-
295
- const options = {
296
- body: emailData,
297
- };
298
-
299
- const result = await this.sdk._fetch('/messaging/email', 'POST', options);
300
- return result;
301
- }
302
-
303
- /**
304
- * Get email message by ID
305
- * @param {string} id - Email message ID (required)
306
- * @returns {Promise<Object>} Email message details
307
- */
308
- async get(id) {
309
- this.sdk.validateParams(
310
- { id },
311
- {
312
- id: { type: 'string', required: true },
313
- },
314
- );
315
-
316
- const result = await this.sdk._fetch(`/messaging/email/${id}`, 'GET');
317
- return result;
318
- }
319
-
320
- /**
321
- * Update domain email settings
322
- * @param {string} id - Domain ID (required)
323
- * @param {Object} params - Update parameters
324
- * @param {boolean} [params.dkimEnabled] - Enable DKIM signing
325
- * @param {Object} [params.customDkim] - Custom DKIM configuration
326
- * @returns {Promise<Object>} Updated domain details
327
- */
328
- async updateDomain(id, { dkimEnabled, customDkim }) {
329
- this.sdk.validateParams(
330
- { id },
331
- {
332
- id: { type: 'string', required: true },
333
- dkimEnabled: { type: 'boolean', required: false },
334
- customDkim: { type: 'object', required: false },
335
- },
336
- );
337
-
338
- const updateData = {};
339
- if (dkimEnabled !== undefined) updateData.dkimEnabled = dkimEnabled;
340
- if (customDkim) updateData.customDkim = customDkim;
341
-
342
- const options = {
343
- body: updateData,
344
- };
345
-
346
- const result = await this.sdk._fetch(
347
- `/messaging/email/${id}`,
348
- 'PUT',
349
- options,
350
- );
351
- return result;
352
- }
353
- }
354
-
355
- export class EmailTemplatesService {
356
- constructor(sdk) {
357
- this.sdk = sdk;
358
- }
359
-
360
- /**
361
- * Create email template
362
- * @param {Object} params - Template parameters
363
- * @param {string} params.name - Template name (required)
364
- * @param {string} params.subject - Template subject (required)
365
- * @param {string} [params.html] - HTML template body
366
- * @param {string} [params.text] - Plain text template body
367
- * @param {Object} [params.variables] - Template variable definitions
368
- * @returns {Promise<Object>} Created template details
369
- */
370
- async create({ name, subject, html, text, variables }) {
371
- this.sdk.validateParams(
372
- { name, subject },
373
- {
374
- name: { type: 'string', required: true },
375
- subject: { type: 'string', required: true },
376
- html: { type: 'string', required: false },
377
- text: { type: 'string', required: false },
378
- variables: { type: 'object', required: false },
379
- },
380
- );
381
-
382
- const templateData = { name, subject };
383
- if (html) templateData.html = html;
384
- if (text) templateData.text = text;
385
- if (variables) templateData.variables = variables;
386
-
387
- const options = {
388
- body: templateData,
389
- };
390
-
391
- const result = await this.sdk._fetch(
392
- '/messaging/email/template',
393
- 'POST',
394
- options,
395
- );
396
- return result;
397
- }
398
-
399
- /**
400
- * Update email template
401
- * @param {string} id - Template ID (required)
402
- * @param {Object} params - Update parameters
403
- * @param {string} [params.name] - Template name
404
- * @param {string} [params.subject] - Template subject
405
- * @param {string} [params.html] - HTML template body
406
- * @param {string} [params.text] - Plain text template body
407
- * @param {Object} [params.variables] - Template variable definitions
408
- * @returns {Promise<Object>} Updated template details
409
- */
410
- async update(id, { name, subject, html, text, variables }) {
411
- this.sdk.validateParams(
412
- { id },
413
- {
414
- id: { type: 'string', required: true },
415
- name: { type: 'string', required: false },
416
- subject: { type: 'string', required: false },
417
- html: { type: 'string', required: false },
418
- text: { type: 'string', required: false },
419
- variables: { type: 'object', required: false },
420
- },
421
- );
422
-
423
- const updateData = {};
424
- if (name) updateData.name = name;
425
- if (subject) updateData.subject = subject;
426
- if (html) updateData.html = html;
427
- if (text) updateData.text = text;
428
- if (variables) updateData.variables = variables;
429
-
430
- const options = {
431
- body: updateData,
432
- };
433
-
434
- const result = await this.sdk._fetch(
435
- `/messaging/email/template/${id}`,
436
- 'PUT',
437
- options,
438
- );
439
- return result;
440
- }
441
-
442
- /**
443
- * Delete email template
444
- * @param {string} id - Template ID (required)
445
- * @returns {Promise<Object>} Deletion confirmation
446
- */
447
- async delete(id) {
448
- this.sdk.validateParams(
449
- { id },
450
- {
451
- id: { type: 'string', required: true },
452
- },
453
- );
454
-
455
- const result = await this.sdk._fetch(
456
- `/messaging/email/template/${id}`,
457
- 'DELETE',
458
- );
459
- return result;
460
- }
461
-
462
- /**
463
- * Get email template by ID
464
- * @param {string} id - Template ID (required)
465
- * @returns {Promise<Object>} Template details
466
- */
467
- async get(id) {
468
- this.sdk.validateParams(
469
- { id },
470
- {
471
- id: { type: 'string', required: true },
472
- },
473
- );
474
-
475
- const result = await this.sdk._fetch(
476
- `/messaging/email/template/${id}`,
477
- 'GET',
478
- );
479
- return result;
480
- }
481
-
482
- /**
483
- * List all email templates
484
- * @returns {Promise<Array>} List of email templates
485
- */
486
- async list() {
487
- const result = await this.sdk._fetch('/messaging/email/template', 'GET');
488
- return result;
489
- }
490
- }
491
-
492
- export class EmailDomainsService {
493
- constructor(sdk) {
494
- this.sdk = sdk;
495
- }
496
-
497
- /**
498
- * Create domain verification
499
- * @param {Object} params - Domain parameters
500
- * @param {string} params.domain - Domain name (required)
501
- * @param {string} [params.primaryRegion] - Primary AWS region
502
- * @param {string} [params.secondaryRegion] - Secondary AWS region
503
- * @param {string} [params.mailFromSubdomain='mail'] - Mail-from subdomain
504
- * @returns {Promise<Object>} Created domain with DNS records to configure
505
- */
506
- async create({ domain, primaryRegion, secondaryRegion, mailFromSubdomain }) {
507
- this.sdk.validateParams(
508
- { domain },
509
- {
510
- domain: { type: 'string', required: true },
511
- primaryRegion: { type: 'string', required: false },
512
- secondaryRegion: { type: 'string', required: false },
513
- mailFromSubdomain: { type: 'string', required: false },
514
- },
515
- );
516
-
517
- const domainData = { domain };
518
- if (primaryRegion) domainData.primaryRegion = primaryRegion;
519
- if (secondaryRegion) domainData.secondaryRegion = secondaryRegion;
520
- if (mailFromSubdomain) domainData.mailFromSubdomain = mailFromSubdomain;
521
-
522
- const options = {
523
- body: domainData,
524
- };
525
-
526
- const result = await this.sdk._fetch(
527
- '/messaging/email/validate/domain',
528
- 'POST',
529
- options,
530
- );
531
- return result;
532
- }
533
-
534
- /**
535
- * Delete domain verification
536
- * @param {string} domainId - Domain ID (required)
537
- * @returns {Promise<Object>} Deletion confirmation
538
- */
539
- async delete(domainId) {
540
- this.sdk.validateParams(
541
- { domainId },
542
- {
543
- domainId: { type: 'string', required: true },
544
- },
545
- );
546
-
547
- const options = {
548
- body: { domainId },
549
- };
550
-
551
- const result = await this.sdk._fetch(
552
- '/messaging/email/validate/domain',
553
- 'DELETE',
554
- options,
555
- );
556
- return result;
557
- }
558
-
559
- /**
560
- * List all verified domains
561
- * @returns {Promise<Array>} List of verified domains with status, regions, and portal information
562
- * @example
563
- * // Returns array of domain objects:
564
- * // {
565
- * // id: 'domain-id',
566
- * // domain: 'mydomain.com',
567
- * // primaryRegion: 'us-east-1',
568
- * // secondaryRegion: 'us-west-2',
569
- * // primaryRegionStatus: 'active',
570
- * // secondaryRegionStatus: 'active',
571
- * // portalId: 'portal-id',
572
- * // portalName: 'My Portal',
573
- * // recordTypeId: 'record-type-id',
574
- * // isDeleted: false,
575
- * // createdAt: '2023-...'
576
- * // }
577
- */
578
- async list() {
579
- const result = await this.sdk._fetch('/messaging/email/validate/domain', 'GET');
580
- return result;
581
- }
582
-
583
- /**
584
- * Get domain details by ID including DNS configuration
585
- * @param {string} domainId - Domain ID (required)
586
- * @returns {Promise<Object>} Domain details with DNS records to configure
587
- * @example
588
- * // Returns domain object with DNS records:
589
- * // {
590
- * // id: 'domain-id',
591
- * // domain: 'mydomain.com',
592
- * // primaryRegion: 'us-east-1',
593
- * // secondaryRegion: 'us-west-2',
594
- * // primaryRegionStatus: 'active',
595
- * // secondaryRegionStatus: 'active',
596
- * // mailFrom: 'mail.mydomain.com',
597
- * // portalId: 'portal-id',
598
- * // portalName: 'My Portal',
599
- * // brandId: 'brand-id',
600
- * // recordTypeId: 'record-type-id',
601
- * // createdAt: '2023-...',
602
- * // dns: [
603
- * // {
604
- * // type: 'CNAME',
605
- * // name: 'domainid._domainkey.mydomain.com',
606
- * // value: 'domainid.dkim.example.com',
607
- * // description: 'DKIM signature verification'
608
- * // },
609
- * // {
610
- * // type: 'CNAME',
611
- * // name: 'mail.mydomain.com',
612
- * // value: 'mail.ses.amazonaws.com',
613
- * // description: 'MAIL FROM domain routing'
614
- * // },
615
- * // {
616
- * // type: 'TXT',
617
- * // name: 'mydomain.com',
618
- * // value: '"v=spf1 include:mail.mydomain.com ~all"',
619
- * // description: 'SPF record for email authentication'
620
- * // },
621
- * // {
622
- * // type: 'TXT',
623
- * // name: '_dmarc.mydomain.com',
624
- * // value: '"v=DMARC1; p=quarantine; rua=mailto:dmarc@...',
625
- * // description: 'DMARC policy for email authentication and reporting'
626
- * // }
627
- * // ]
628
- * // }
629
- */
630
- async get(domainId) {
631
- this.sdk.validateParams(
632
- { domainId },
633
- {
634
- domainId: { type: 'string', required: true },
635
- },
636
- );
637
-
638
- const result = await this.sdk._fetch(
639
- `/messaging/email/validate/domain/${domainId}`,
640
- 'GET',
641
- );
642
- return result;
643
- }
644
-
645
- /**
646
- * Validate DNS records for domain
647
- * @param {string} domain - Domain name (required)
648
- * @returns {Promise<Object>} DNS validation results
649
- */
650
- async validateDns(domain) {
651
- this.sdk.validateParams(
652
- { domain },
653
- {
654
- domain: { type: 'string', required: true },
655
- },
656
- );
657
-
658
- const options = {
659
- query: { domain },
660
- };
661
-
662
- const result = await this.sdk._fetch(
663
- '/messaging/email/validate/domain/dns',
664
- 'GET',
665
- options,
666
- );
667
- return result;
668
- }
669
-
670
- /**
671
- * Check domain verification status
672
- * @param {string} domain - Domain name (required)
673
- * @returns {Promise<Object>} Domain verification status
674
- */
675
- async checkStatus(domain) {
676
- this.sdk.validateParams(
677
- { domain },
678
- {
679
- domain: { type: 'string', required: true },
680
- },
681
- );
682
-
683
- const options = {
684
- query: { domain },
685
- };
686
-
687
- const result = await this.sdk._fetch(
688
- '/messaging/email/validate/domain/status',
689
- 'GET',
690
- options,
691
- );
692
- return result;
693
- }
694
-
695
- /**
696
- * Update domain settings
697
- * @param {Object} params - Update parameters
698
- * @param {string} params.domainId - Domain ID (required)
699
- * @param {string} [params.primaryRegion] - Primary AWS region
700
- * @param {string} [params.secondaryRegion] - Secondary AWS region
701
- * @param {boolean} [params.dkimEnabled] - Enable DKIM signing
702
- * @param {Object} [params.customDkim] - Custom DKIM configuration
703
- * @returns {Promise<Object>} Updated domain details
704
- */
705
- async update({ domainId, primaryRegion, secondaryRegion, dkimEnabled, customDkim }) {
706
- this.sdk.validateParams(
707
- { domainId },
708
- {
709
- domainId: { type: 'string', required: true },
710
- primaryRegion: { type: 'string', required: false },
711
- secondaryRegion: { type: 'string', required: false },
712
- dkimEnabled: { type: 'boolean', required: false },
713
- customDkim: { type: 'object', required: false },
714
- },
715
- );
716
-
717
- const updateData = { domainId };
718
- if (primaryRegion) updateData.primaryRegion = primaryRegion;
719
- if (secondaryRegion) updateData.secondaryRegion = secondaryRegion;
720
- if (dkimEnabled !== undefined) updateData.dkimEnabled = dkimEnabled;
721
- if (customDkim) updateData.customDkim = customDkim;
722
-
723
- const options = {
724
- body: updateData,
725
- };
726
-
727
- const result = await this.sdk._fetch(
728
- '/messaging/email/validate/domain',
729
- 'PUT',
730
- options,
731
- );
732
- return result;
733
- }
734
- }
735
-
736
- export class EmailAddressesService {
737
- constructor(sdk) {
738
- this.sdk = sdk;
739
- }
740
-
741
- /**
742
- * Create email address verification
743
- * @param {string} emailAddress - Email address to verify (required)
744
- * @returns {Promise<Object>} Email verification details
745
- */
746
- async create(emailAddress) {
747
- this.sdk.validateParams(
748
- { emailAddress },
749
- {
750
- emailAddress: { type: 'string', required: true },
751
- },
752
- );
753
-
754
- const options = {
755
- body: { emailAddress },
756
- };
757
-
758
- const result = await this.sdk._fetch(
759
- '/messaging/email/validate/emailAddress',
760
- 'POST',
761
- options,
762
- );
763
- return result;
764
- }
765
-
766
- /**
767
- * Delete email address verification
768
- * @param {string} emailAddress - Email address to remove (required)
769
- * @returns {Promise<Object>} Deletion confirmation
770
- */
771
- async delete(emailAddress) {
772
- this.sdk.validateParams(
773
- { emailAddress },
774
- {
775
- emailAddress: { type: 'string', required: true },
776
- },
777
- );
778
-
779
- const result = await this.sdk._fetch(
780
- `/messaging/email/validate/emailAddress/${encodeURIComponent(emailAddress)}`,
781
- 'DELETE',
782
- );
783
- return result;
784
- }
785
-
786
- /**
787
- * List all verified email addresses
788
- * @returns {Promise<Array>} List of verified email addresses
789
- */
790
- async list() {
791
- const result = await this.sdk._fetch('/messaging/email/validate/emailAddress', 'GET');
792
- return result;
793
- }
794
-
795
- /**
796
- * Check email address verification status
797
- * @param {string} emailAddress - Email address to check (required)
798
- * @returns {Promise<Object>} Email verification status
799
- */
800
- async checkStatus(emailAddress) {
801
- this.sdk.validateParams(
802
- { emailAddress },
803
- {
804
- emailAddress: { type: 'string', required: true },
805
- },
806
- );
807
-
808
- const options = {
809
- query: { emailAddress },
810
- };
811
-
812
- const result = await this.sdk._fetch(
813
- '/messaging/email/validate/emailAddress/status',
814
- 'GET',
815
- options,
816
- );
817
- return result;
818
- }
819
- }
820
-
821
- export class CampaignsService {
822
- constructor(sdk) {
823
- this.sdk = sdk;
824
- this.tollFree = new TollFreeCampaignsService(sdk);
825
- this.tenDlc = new TenDlcCampaignsService(sdk);
826
- }
827
- }
828
-
829
- export class TollFreeCampaignsService {
830
- constructor(sdk) {
831
- this.sdk = sdk;
832
- }
833
-
834
- /**
835
- * Create toll-free campaign
836
- * @param {Object} params - Campaign parameters
837
- * @param {string} params.companyName - Company name (required)
838
- * @param {string} params.phoneNumber - Phone number (required)
839
- * @param {string} params.description - Campaign description (required)
840
- * @param {string} params.messageFlow - Message flow description (required)
841
- * @param {string} [params.helpMessage] - Help message
842
- * @param {Array<string>} [params.optInKeywords] - Opt-in keywords
843
- * @param {Array<string>} [params.optOutKeywords] - Opt-out keywords
844
- * @param {string} [params.website] - Business website
845
- * @returns {Promise<Object>} Created campaign details
846
- */
847
- async create({
848
- companyName,
849
- phoneNumber,
850
- description,
851
- messageFlow,
852
- helpMessage,
853
- optInKeywords,
854
- optOutKeywords,
855
- website,
856
- }) {
857
- this.sdk.validateParams(
858
- { companyName, phoneNumber, description, messageFlow },
859
- {
860
- companyName: { type: 'string', required: true },
861
- phoneNumber: { type: 'string', required: true },
862
- description: { type: 'string', required: true },
863
- messageFlow: { type: 'string', required: true },
864
- helpMessage: { type: 'string', required: false },
865
- optInKeywords: { type: 'array', required: false },
866
- optOutKeywords: { type: 'array', required: false },
867
- website: { type: 'string', required: false },
868
- },
869
- );
870
-
871
- const campaignData = {
872
- companyName,
873
- phoneNumber,
874
- description,
875
- messageFlow,
876
- };
877
-
878
- if (helpMessage) campaignData.helpMessage = helpMessage;
879
- if (optInKeywords) campaignData.optInKeywords = optInKeywords;
880
- if (optOutKeywords) campaignData.optOutKeywords = optOutKeywords;
881
- if (website) campaignData.website = website;
882
-
883
- const options = {
884
- body: campaignData,
885
- };
886
-
887
- const result = await this.sdk._fetch(
888
- '/messaging/campaigns/tollfree',
889
- 'POST',
890
- options,
891
- );
892
- return result;
893
- }
894
-
895
- /**
896
- * Get toll-free campaign by ID
897
- * @param {string} campaignId - Campaign ID
898
- * @returns {Promise<Object>} Campaign details
899
- */
900
- async get(campaignId) {
901
- this.sdk.validateParams(
902
- { campaignId },
903
- {
904
- campaignId: { type: 'string', required: true },
905
- },
906
- );
907
-
908
- const result = await this.sdk._fetch(
909
- `/messaging/campaigns/tollfree/${campaignId}`,
910
- 'GET',
911
- );
912
- return result;
913
- }
914
-
915
- /**
916
- * Update toll-free campaign
917
- * @param {string} campaignId - Campaign ID to update
918
- * @param {Object} params - Update parameters
919
- * @param {string} [params.name] - Campaign name
920
- * @param {string} [params.campaignDescription] - Campaign description
921
- * @param {string} [params.address1] - Business address line 1
922
- * @param {string} [params.address2] - Business address line 2
923
- * @param {string} [params.city] - Business city
924
- * @param {string} [params.state] - Business state
925
- * @param {string} [params.zip] - Business zip code
926
- * @param {string} [params.pocFirstName] - Point of contact first name
927
- * @param {string} [params.pocLastName] - Point of contact last name
928
- * @param {string} [params.pocPhoneNumber] - Point of contact phone
929
- * @param {string} [params.pocEmail] - Point of contact email
930
- * @param {string} [params.businessName] - Business name
931
- * @param {string} [params.website] - Business website
932
- * @param {string} [params.messageVolume] - Expected message volume
933
- * @param {string} [params.optInWorkflow] - Opt-in workflow description
934
- * @param {Array<string>} [params.optInWorkflowUrls] - Opt-in workflow image URLs
935
- * @param {Array<string>} [params.phoneNumbers] - Phone numbers for campaign
936
- * @param {string} [params.productionMessageExample] - Production message example
937
- * @param {string} [params.useCase] - Use case category
938
- * @param {string} [params.useCaseDescription] - Use case description
939
- * @param {string} [params.webhookUrl] - Webhook URL
940
- * @returns {Promise<Object>} Updated campaign information
941
- */
942
- async update(campaignId, {
943
- name,
944
- campaignDescription,
945
- address1,
946
- address2,
947
- city,
948
- state,
949
- zip,
950
- pocFirstName,
951
- pocLastName,
952
- pocPhoneNumber,
953
- pocEmail,
954
- businessName,
955
- website,
956
- messageVolume,
957
- optInWorkflow,
958
- optInWorkflowUrls,
959
- phoneNumbers,
960
- productionMessageExample,
961
- useCase,
962
- useCaseDescription,
963
- webhookUrl,
964
- } = {}) {
965
- this.sdk.validateParams(
966
- { campaignId, name, campaignDescription, address1, address2, city, state, zip, pocFirstName, pocLastName, pocPhoneNumber, pocEmail, businessName, website, messageVolume, optInWorkflow, optInWorkflowUrls, phoneNumbers, productionMessageExample, useCase, useCaseDescription, webhookUrl },
967
- {
968
- campaignId: { type: 'string', required: true },
969
- name: { type: 'string', required: false },
970
- campaignDescription: { type: 'string', required: false },
971
- address1: { type: 'string', required: false },
972
- address2: { type: 'string', required: false },
973
- city: { type: 'string', required: false },
974
- state: { type: 'string', required: false },
975
- zip: { type: 'string', required: false },
976
- pocFirstName: { type: 'string', required: false },
977
- pocLastName: { type: 'string', required: false },
978
- pocPhoneNumber: { type: 'string', required: false },
979
- pocEmail: { type: 'string', required: false },
980
- businessName: { type: 'string', required: false },
981
- website: { type: 'string', required: false },
982
- messageVolume: { type: 'string', required: false },
983
- optInWorkflow: { type: 'string', required: false },
984
- optInWorkflowUrls: { type: 'array', required: false },
985
- phoneNumbers: { type: 'array', required: false },
986
- productionMessageExample: { type: 'string', required: false },
987
- useCase: { type: 'string', required: false },
988
- useCaseDescription: { type: 'string', required: false },
989
- webhookUrl: { type: 'string', required: false },
990
- },
991
- );
992
-
993
- const updateData = {};
994
- if (name !== undefined) updateData.name = name;
995
- if (campaignDescription !== undefined) updateData.campaignDescription = campaignDescription;
996
- if (address1 !== undefined) updateData.address1 = address1;
997
- if (address2 !== undefined) updateData.address2 = address2;
998
- if (city !== undefined) updateData.city = city;
999
- if (state !== undefined) updateData.state = state;
1000
- if (zip !== undefined) updateData.zip = zip;
1001
- if (pocFirstName !== undefined) updateData.pocFirstName = pocFirstName;
1002
- if (pocLastName !== undefined) updateData.pocLastName = pocLastName;
1003
- if (pocPhoneNumber !== undefined) updateData.pocPhoneNumber = pocPhoneNumber;
1004
- if (pocEmail !== undefined) updateData.pocEmail = pocEmail;
1005
- if (businessName !== undefined) updateData.businessName = businessName;
1006
- if (website !== undefined) updateData.website = website;
1007
- if (messageVolume !== undefined) updateData.messageVolume = messageVolume;
1008
- if (optInWorkflow !== undefined) updateData.optInWorkflow = optInWorkflow;
1009
- if (optInWorkflowUrls !== undefined) updateData.optInWorkflowUrls = optInWorkflowUrls;
1010
- if (phoneNumbers !== undefined) updateData.phoneNumbers = phoneNumbers;
1011
- if (productionMessageExample !== undefined) updateData.productionMessageExample = productionMessageExample;
1012
- if (useCase !== undefined) updateData.useCase = useCase;
1013
- if (useCaseDescription !== undefined) updateData.useCaseDescription = useCaseDescription;
1014
- if (webhookUrl !== undefined) updateData.webhookUrl = webhookUrl;
1015
-
1016
- const options = {
1017
- body: updateData,
1018
- };
1019
-
1020
- const result = await this.sdk._fetch(
1021
- `/messaging/campaigns/tollfree/${campaignId}`,
1022
- 'PUT',
1023
- options,
1024
- );
1025
- return result;
1026
- }
1027
-
1028
- async delete(campaignId) {
1029
- this.sdk.validateParams(
1030
- { campaignId },
1031
- {
1032
- campaignId: { type: 'string', required: true },
1033
- },
1034
- );
1035
-
1036
- const result = await this.sdk._fetch(
1037
- `/messaging/campaigns/tollfree/${campaignId}`,
1038
- 'DELETE',
1039
- );
1040
- return result;
1041
- }
1042
-
1043
- /**
1044
- * List all toll-free campaigns with optional filtering
1045
- * @param {Object} [params] - Filter parameters
1046
- * @param {number} [params.page=1] - Page number
1047
- * @param {number} [params.limit=50] - Items per page
1048
- * @param {string} [params.name] - Filter by campaign name
1049
- * @param {string} [params.status] - Filter by status
1050
- * @param {string} [params.operatorType='contains'] - Filter operator: contains, equals, startsWith, endsWith
1051
- * @returns {Promise<Array>} List of campaigns
1052
- */
1053
- async list({ page, limit, name, status, operatorType } = {}) {
1054
- const queryParams = new URLSearchParams();
1055
-
1056
- if (page !== undefined) queryParams.append('page', page);
1057
- if (limit !== undefined) queryParams.append('limit', limit);
1058
- if (name) queryParams.append('name', name);
1059
- if (status) queryParams.append('status', status);
1060
- if (operatorType) queryParams.append('operatorType', operatorType);
1061
-
1062
- const url = queryParams.toString()
1063
- ? `/messaging/campaigns/tollfree?${queryParams.toString()}`
1064
- : '/messaging/campaigns/tollfree';
1065
-
1066
- const result = await this.sdk._fetch(url, 'GET');
1067
- return result;
1068
- }
1069
-
1070
- async refreshStatus(campaignId) {
1071
- this.sdk.validateParams(
1072
- { campaignId },
1073
- {
1074
- campaignId: { type: 'string', required: true },
1075
- },
1076
- );
1077
-
1078
- const result = await this.sdk._fetch(
1079
- `/messaging/campaigns/tollfree/refresh/${campaignId}`,
1080
- 'GET',
1081
- );
1082
- return result;
1083
- }
1084
-
1085
- async getPhoneNumberCampaignStatus(phoneNumber) {
1086
- this.sdk.validateParams(
1087
- { phoneNumber },
1088
- {
1089
- phoneNumber: { type: 'string', required: true },
1090
- },
1091
- );
1092
-
1093
- const result = await this.sdk._fetch(
1094
- `/messaging/campaigns/tollfree/phoneNumber/${encodeURIComponent(
1095
- phoneNumber,
1096
- )}/campaignStatus`,
1097
- 'GET',
1098
- );
1099
- return result;
1100
- }
1101
- }
1102
-
1103
- export class TenDlcCampaignsService {
1104
- constructor(sdk) {
1105
- this.sdk = sdk;
1106
- this.brands = new TenDlcBrandsService(sdk);
1107
- this.campaigns = new TenDlcCampaignManagementService(sdk);
1108
- }
1109
-
1110
- /**
1111
- * Get phone number campaign status for 10DLC
1112
- * @param {string} phoneNumber - Phone number to check
1113
- * @returns {Promise<Object>} Campaign status information
1114
- */
1115
- async getPhoneNumberCampaignStatus(phoneNumber) {
1116
- this.sdk.validateParams(
1117
- { phoneNumber },
1118
- {
1119
- phoneNumber: { type: 'string', required: true },
1120
- },
1121
- );
1122
-
1123
- const result = await this.sdk._fetch(
1124
- `/messaging/campaigns/10dlc/phoneNumber/${encodeURIComponent(
1125
- phoneNumber,
1126
- )}/campaignStatus`,
1127
- 'GET',
1128
- );
1129
- return result;
1130
- }
1131
- }
1132
-
1133
- export class TenDlcBrandsService {
1134
- constructor(sdk) {
1135
- this.sdk = sdk;
1136
- }
1137
-
1138
- /**
1139
- * List all 10DLC brands with optional filtering
1140
- * @param {Object} [params] - Filter parameters
1141
- * @param {number} [params.page=1] - Page number
1142
- * @param {number} [params.limit=50] - Items per page
1143
- * @param {string} [params.name] - Filter by brand name
1144
- * @param {string} [params.status] - Filter by status
1145
- * @param {string} [params.operatorType='contains'] - Filter operator: contains, equals, startsWith, endsWith
1146
- * @returns {Promise<Array>} List of brands
1147
- */
1148
- async list({ page, limit, name, status, operatorType } = {}) {
1149
- const queryParams = new URLSearchParams();
1150
-
1151
- if (page !== undefined) queryParams.append('page', page);
1152
- if (limit !== undefined) queryParams.append('limit', limit);
1153
- if (name) queryParams.append('name', name);
1154
- if (status) queryParams.append('status', status);
1155
- if (operatorType) queryParams.append('operatorType', operatorType);
1156
-
1157
- const url = queryParams.toString()
1158
- ? `/messaging/campaigns/10dlc/brand?${queryParams.toString()}`
1159
- : '/messaging/campaigns/10dlc/brand';
1160
-
1161
- const result = await this.sdk._fetch(url, 'GET');
1162
- return result;
1163
- }
1164
-
1165
- /**
1166
- * Create a new 10DLC brand
1167
- * @param {Object} params - Brand parameters
1168
- * @param {string} params.name - Brand display name (required)
1169
- * @param {string} params.entityType - Entity type: PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT (required)
1170
- * @param {string} [params.cspId] - CSP ID for resellers
1171
- * @param {string} params.companyName - Company name (required)
1172
- * @param {string} [params.ein] - Employer Identification Number
1173
- * @param {string} params.address1 - Street address (required)
1174
- * @param {string} [params.address2] - Street address line 2
1175
- * @param {string} params.city - City (required)
1176
- * @param {string} params.state - State (required)
1177
- * @param {string} params.postalCode - Postal code (required)
1178
- * @param {string} params.country - Country (required)
1179
- * @param {string} [params.pocFirstName] - Point of contact first name
1180
- * @param {string} [params.pocLastName] - Point of contact last name
1181
- * @param {string} params.pocEmail - Point of contact email (required)
1182
- * @param {string} params.pocPhone - Point of contact phone (required)
1183
- * @param {string} [params.stockSymbol] - Stock symbol for public companies
1184
- * @param {string} [params.stockExchange] - Stock exchange for public companies
1185
- * @param {string} [params.website] - Company website
1186
- * @param {string} params.vertical - Business vertical (required)
1187
- * @param {string} [params.altBusinessId] - Alternative business ID
1188
- * @param {string} [params.altBusinessIdType] - Alternative business ID type
1189
- * @param {string} [params.brandRelationship] - Brand relationship
1190
- * @returns {Promise<Object>} Created brand details
1191
- */
1192
- async create({
1193
- name,
1194
- entityType,
1195
- cspId,
1196
- companyName,
1197
- ein,
1198
- address1,
1199
- address2,
1200
- city,
1201
- state,
1202
- postalCode,
1203
- country,
1204
- pocFirstName,
1205
- pocLastName,
1206
- pocEmail,
1207
- pocPhone,
1208
- stockSymbol,
1209
- stockExchange,
1210
- website,
1211
- vertical,
1212
- altBusinessId,
1213
- altBusinessIdType,
1214
- brandRelationship,
1215
- }) {
1216
- this.sdk.validateParams(
1217
- { name, entityType, companyName, address1, city, state, postalCode, country, pocEmail, pocPhone, vertical },
1218
- {
1219
- name: { type: 'string', required: true },
1220
- entityType: { type: 'string', required: true },
1221
- cspId: { type: 'string', required: false },
1222
- companyName: { type: 'string', required: true },
1223
- ein: { type: 'string', required: false },
1224
- address1: { type: 'string', required: true },
1225
- address2: { type: 'string', required: false },
1226
- city: { type: 'string', required: true },
1227
- state: { type: 'string', required: true },
1228
- postalCode: { type: 'string', required: true },
1229
- country: { type: 'string', required: true },
1230
- pocFirstName: { type: 'string', required: false },
1231
- pocLastName: { type: 'string', required: false },
1232
- pocEmail: { type: 'string', required: true },
1233
- pocPhone: { type: 'string', required: true },
1234
- stockSymbol: { type: 'string', required: false },
1235
- stockExchange: { type: 'string', required: false },
1236
- website: { type: 'string', required: false },
1237
- vertical: { type: 'string', required: true },
1238
- altBusinessId: { type: 'string', required: false },
1239
- altBusinessIdType: { type: 'string', required: false },
1240
- brandRelationship: { type: 'string', required: false },
1241
- },
1242
- );
1243
-
1244
- const brandData = {
1245
- name,
1246
- entityType,
1247
- companyName,
1248
- address1,
1249
- city,
1250
- state,
1251
- postalCode,
1252
- country,
1253
- pocEmail,
1254
- pocPhone,
1255
- vertical,
1256
- };
1257
- if (cspId) brandData.cspId = cspId;
1258
- if (ein) brandData.ein = ein;
1259
- if (address2) brandData.address2 = address2;
1260
- if (pocFirstName) brandData.pocFirstName = pocFirstName;
1261
- if (pocLastName) brandData.pocLastName = pocLastName;
1262
- if (stockSymbol) brandData.stockSymbol = stockSymbol;
1263
- if (stockExchange) brandData.stockExchange = stockExchange;
1264
- if (website) brandData.website = website;
1265
- if (altBusinessId) brandData.altBusinessId = altBusinessId;
1266
- if (altBusinessIdType) brandData.altBusinessIdType = altBusinessIdType;
1267
- if (brandRelationship) brandData.brandRelationship = brandRelationship;
1268
-
1269
- const options = {
1270
- body: brandData,
1271
- };
1272
-
1273
- const result = await this.sdk._fetch(
1274
- '/messaging/campaigns/10dlc/brand',
1275
- 'POST',
1276
- options,
1277
- );
1278
- return result;
1279
- }
1280
-
1281
- /**
1282
- * Get a 10DLC brand by ID
1283
- * @param {string} brandId - Brand ID (required)
1284
- * @returns {Promise<Object>} Brand details
1285
- */
1286
- async get(brandId) {
1287
- this.sdk.validateParams(
1288
- { brandId },
1289
- {
1290
- brandId: { type: 'string', required: true },
1291
- },
1292
- );
1293
-
1294
- const result = await this.sdk._fetch(
1295
- `/messaging/campaigns/10dlc/brand/${brandId}`,
1296
- 'GET',
1297
- );
1298
- return result;
1299
- }
1300
-
1301
- /**
1302
- * Update a 10DLC brand
1303
- * @param {string} brandId - Brand ID to update (required)
1304
- * @param {Object} params - Brand parameters to update
1305
- * @param {string} [params.name] - Brand display name
1306
- * @param {string} [params.entityType] - Entity type: PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT
1307
- * @param {string} [params.cspId] - CSP ID for resellers
1308
- * @param {string} [params.companyName] - Company name
1309
- * @param {string} [params.ein] - Employer Identification Number
1310
- * @param {string} [params.address1] - Street address
1311
- * @param {string} [params.address2] - Street address line 2
1312
- * @param {string} [params.city] - City
1313
- * @param {string} [params.state] - State
1314
- * @param {string} [params.postalCode] - Postal code
1315
- * @param {string} [params.country] - Country
1316
- * @param {string} [params.pocFirstName] - Point of contact first name
1317
- * @param {string} [params.pocLastName] - Point of contact last name
1318
- * @param {string} [params.pocEmail] - Point of contact email
1319
- * @param {string} [params.pocPhone] - Point of contact phone
1320
- * @param {string} [params.stockSymbol] - Stock symbol for public companies
1321
- * @param {string} [params.stockExchange] - Stock exchange for public companies
1322
- * @param {string} [params.website] - Company website
1323
- * @param {string} [params.vertical] - Business vertical
1324
- * @param {string} [params.altBusinessId] - Alternative business ID
1325
- * @param {string} [params.altBusinessIdType] - Alternative business ID type
1326
- * @param {string} [params.brandRelationship] - Brand relationship
1327
- * @param {string} [params.businessContactEmail] - Business contact email for 2025 compliance
1328
- * @param {string} [params.firstName] - First name for 2025 compliance
1329
- * @param {string} [params.lastName] - Last name for 2025 compliance
1330
- * @param {string} [params.mobilePhone] - Mobile phone for 2025 compliance
1331
- * @returns {Promise<Object>} Updated brand details
1332
- */
1333
- async update(brandId, {
1334
- name,
1335
- entityType,
1336
- cspId,
1337
- companyName,
1338
- ein,
1339
- address1,
1340
- address2,
1341
- city,
1342
- state,
1343
- postalCode,
1344
- country,
1345
- pocFirstName,
1346
- pocLastName,
1347
- pocEmail,
1348
- pocPhone,
1349
- stockSymbol,
1350
- stockExchange,
1351
- website,
1352
- vertical,
1353
- altBusinessId,
1354
- altBusinessIdType,
1355
- brandRelationship,
1356
- businessContactEmail,
1357
- firstName,
1358
- lastName,
1359
- mobilePhone,
1360
- } = {}) {
1361
- this.sdk.validateParams(
1362
- { brandId },
1363
- {
1364
- brandId: { type: 'string', required: true },
1365
- name: { type: 'string', required: false },
1366
- entityType: { type: 'string', required: false },
1367
- cspId: { type: 'string', required: false },
1368
- companyName: { type: 'string', required: false },
1369
- ein: { type: 'string', required: false },
1370
- address1: { type: 'string', required: false },
1371
- address2: { type: 'string', required: false },
1372
- city: { type: 'string', required: false },
1373
- state: { type: 'string', required: false },
1374
- postalCode: { type: 'string', required: false },
1375
- country: { type: 'string', required: false },
1376
- pocFirstName: { type: 'string', required: false },
1377
- pocLastName: { type: 'string', required: false },
1378
- pocEmail: { type: 'string', required: false },
1379
- pocPhone: { type: 'string', required: false },
1380
- stockSymbol: { type: 'string', required: false },
1381
- stockExchange: { type: 'string', required: false },
1382
- website: { type: 'string', required: false },
1383
- vertical: { type: 'string', required: false },
1384
- altBusinessId: { type: 'string', required: false },
1385
- altBusinessIdType: { type: 'string', required: false },
1386
- brandRelationship: { type: 'string', required: false },
1387
- businessContactEmail: { type: 'string', required: false },
1388
- firstName: { type: 'string', required: false },
1389
- lastName: { type: 'string', required: false },
1390
- mobilePhone: { type: 'string', required: false },
1391
- },
1392
- );
1393
-
1394
- const updateData = {};
1395
- if (name !== undefined) updateData.name = name;
1396
- if (entityType !== undefined) updateData.entityType = entityType;
1397
- if (cspId !== undefined) updateData.cspId = cspId;
1398
- if (companyName !== undefined) updateData.companyName = companyName;
1399
- if (ein !== undefined) updateData.ein = ein;
1400
- if (address1 !== undefined) updateData.address1 = address1;
1401
- if (address2 !== undefined) updateData.address2 = address2;
1402
- if (city !== undefined) updateData.city = city;
1403
- if (state !== undefined) updateData.state = state;
1404
- if (postalCode !== undefined) updateData.postalCode = postalCode;
1405
- if (country !== undefined) updateData.country = country;
1406
- if (pocFirstName !== undefined) updateData.pocFirstName = pocFirstName;
1407
- if (pocLastName !== undefined) updateData.pocLastName = pocLastName;
1408
- if (pocEmail !== undefined) updateData.pocEmail = pocEmail;
1409
- if (pocPhone !== undefined) updateData.pocPhone = pocPhone;
1410
- if (stockSymbol !== undefined) updateData.stockSymbol = stockSymbol;
1411
- if (stockExchange !== undefined) updateData.stockExchange = stockExchange;
1412
- if (website !== undefined) updateData.website = website;
1413
- if (vertical !== undefined) updateData.vertical = vertical;
1414
- if (altBusinessId !== undefined) updateData.altBusinessId = altBusinessId;
1415
- if (altBusinessIdType !== undefined) updateData.altBusinessIdType = altBusinessIdType;
1416
- if (brandRelationship !== undefined) updateData.brandRelationship = brandRelationship;
1417
- if (businessContactEmail !== undefined) updateData.businessContactEmail = businessContactEmail;
1418
- if (firstName !== undefined) updateData.firstName = firstName;
1419
- if (lastName !== undefined) updateData.lastName = lastName;
1420
- if (mobilePhone !== undefined) updateData.mobilePhone = mobilePhone;
1421
-
1422
- const options = {
1423
- body: updateData,
1424
- };
1425
-
1426
- const result = await this.sdk._fetch(
1427
- `/messaging/campaigns/10dlc/brand/${brandId}`,
1428
- 'PUT',
1429
- options,
1430
- );
1431
- return result;
1432
- }
1433
-
1434
- /**
1435
- * Delete a 10DLC brand
1436
- * @param {string} brandId - Brand ID to delete (required)
1437
- * @returns {Promise<Object>} Deletion confirmation
1438
- */
1439
- async delete(brandId) {
1440
- this.sdk.validateParams(
1441
- { brandId },
1442
- {
1443
- brandId: { type: 'string', required: true },
1444
- },
1445
- );
1446
-
1447
- const result = await this.sdk._fetch(
1448
- `/messaging/campaigns/10dlc/brand/${brandId}`,
1449
- 'DELETE',
1450
- );
1451
- return result;
1452
- }
1453
-
1454
- /**
1455
- * Revet (re-vet) a 10DLC brand - resubmit brand for carrier approval
1456
- * @param {string} brandId - Brand ID to revet (required)
1457
- * @returns {Promise<Object>} Revet confirmation and updated brand status
1458
- */
1459
- async revet(brandId) {
1460
- this.sdk.validateParams(
1461
- { brandId },
1462
- {
1463
- brandId: { type: 'string', required: true },
1464
- },
1465
- );
1466
-
1467
- const result = await this.sdk._fetch(
1468
- `/messaging/campaigns/10dlc/brand/${brandId}/revet`,
1469
- 'PUT',
1470
- );
1471
- return result;
1472
- }
1473
-
1474
- /**
1475
- * Get brand feedback from carriers
1476
- * @param {string} brandId - Brand ID to get feedback for (required)
1477
- * @returns {Promise<Object>} Brand feedback details from carriers
1478
- */
1479
- async getFeedback(brandId) {
1480
- this.sdk.validateParams(
1481
- { brandId },
1482
- {
1483
- brandId: { type: 'string', required: true },
1484
- },
1485
- );
1486
-
1487
- const result = await this.sdk._fetch(
1488
- `/messaging/campaigns/10dlc/brand/${brandId}/feedback`,
1489
- 'GET',
1490
- );
1491
- return result;
1492
- }
1493
-
1494
- /**
1495
- * Create external brand vetting for higher throughput approval
1496
- * @param {string} brandId - Brand ID to create external vetting for (required)
1497
- * @param {Object} [vettingData] - External vetting data
1498
- * @returns {Promise<Object>} External vetting creation confirmation
1499
- */
1500
- async createExternalVetting(brandId, vettingData) {
1501
- this.sdk.validateParams(
1502
- { brandId },
1503
- {
1504
- brandId: { type: 'string', required: true },
1505
- vettingData: { type: 'object', required: false },
1506
- },
1507
- );
1508
-
1509
- const options = {
1510
- body: vettingData || {},
1511
- };
1512
-
1513
- const result = await this.sdk._fetch(
1514
- `/messaging/campaigns/10dlc/brand/${brandId}/externalVetting`,
1515
- 'POST',
1516
- options,
1517
- );
1518
- return result;
1519
- }
1520
-
1521
- /**
1522
- * Get brand external vetting responses
1523
- * @param {string} brandId - Brand ID to get vetting responses for (required)
1524
- * @returns {Promise<Object>} External vetting responses
1525
- */
1526
- async getExternalVettingResponses(brandId) {
1527
- this.sdk.validateParams(
1528
- { brandId },
1529
- {
1530
- brandId: { type: 'string', required: true },
1531
- },
1532
- );
1533
-
1534
- const result = await this.sdk._fetch(
1535
- `/messaging/campaigns/10dlc/brand/${brandId}/externalvetting/responses`,
1536
- 'GET',
1537
- );
1538
- return result;
1539
- }
1540
-
1541
- /**
1542
- * Resend two-factor authentication email for PUBLIC_PROFIT brands
1543
- * @param {string} brandId - Brand ID to resend 2FA for
1544
- * @returns {Promise<Object>} Success message and details
1545
- */
1546
- async resend2fa(brandId) {
1547
- this.sdk.validateParams(
1548
- { brandId },
1549
- {
1550
- brandId: { type: 'string', required: true },
1551
- },
1552
- );
1553
-
1554
- const result = await this.sdk._fetch(
1555
- `/messaging/campaigns/10dlc/brand/${brandId}/resend-2fa`,
1556
- 'POST',
1557
- );
1558
- return result;
1559
- }
1560
- }
1561
-
1562
- export class TenDlcCampaignManagementService {
1563
- constructor(sdk) {
1564
- this.sdk = sdk;
1565
- }
1566
-
1567
- /**
1568
- * List all 10DLC campaigns with optional filtering
1569
- * @param {Object} [params] - Filter parameters
1570
- * @param {number} [params.page=1] - Page number
1571
- * @param {number} [params.limit=50] - Items per page
1572
- * @param {string} [params.name] - Filter by campaign name
1573
- * @param {string} [params.status] - Filter by status
1574
- * @param {string} [params.operatorType='contains'] - Filter operator: contains, equals, startsWith, endsWith
1575
- * @returns {Promise<Array>} List of campaigns
1576
- */
1577
- async list({ page, limit, name, status, operatorType } = {}) {
1578
- const queryParams = new URLSearchParams();
1579
-
1580
- if (page !== undefined) queryParams.append('page', page);
1581
- if (limit !== undefined) queryParams.append('limit', limit);
1582
- if (name) queryParams.append('name', name);
1583
- if (status) queryParams.append('status', status);
1584
- if (operatorType) queryParams.append('operatorType', operatorType);
1585
-
1586
- const url = queryParams.toString()
1587
- ? `/messaging/campaigns/10dlc/campaign?${queryParams.toString()}`
1588
- : '/messaging/campaigns/10dlc/campaign';
1589
-
1590
- const result = await this.sdk._fetch(url, 'GET');
1591
- return result;
1592
- }
1593
-
1594
- /**
1595
- * Create a new 10DLC campaign
1596
- * @param {Object} params - Campaign parameters
1597
- * @param {string} params.brandId - Brand ID (required)
1598
- * @param {string} params.description - Campaign description (required)
1599
- * @param {string} params.messageFlow - Message flow description (required)
1600
- * @param {string} [params.helpMessage] - Help message
1601
- * @param {string} [params.optInMessage] - Opt-in message
1602
- * @param {string} [params.optOutMessage] - Opt-out message
1603
- * @param {string} [params.useCase] - Use case category
1604
- * @param {string} [params.vertical] - Vertical category
1605
- * @returns {Promise<Object>} Created campaign details
1606
- */
1607
- async create({
1608
- brandId,
1609
- description,
1610
- messageFlow,
1611
- helpMessage,
1612
- optInMessage,
1613
- optOutMessage,
1614
- useCase,
1615
- vertical,
1616
- }) {
1617
- this.sdk.validateParams(
1618
- { brandId, description, messageFlow, helpMessage, optInMessage, optOutMessage, useCase, vertical },
1619
- {
1620
- brandId: { type: 'string', required: true },
1621
- description: { type: 'string', required: true },
1622
- messageFlow: { type: 'string', required: true },
1623
- helpMessage: { type: 'string', required: false },
1624
- optInMessage: { type: 'string', required: false },
1625
- optOutMessage: { type: 'string', required: false },
1626
- useCase: { type: 'string', required: false },
1627
- vertical: { type: 'string', required: false },
1628
- },
1629
- );
1630
-
1631
- const campaignData = {
1632
- brandId,
1633
- description,
1634
- messageFlow,
1635
- };
1636
-
1637
- if (helpMessage !== undefined) campaignData.helpMessage = helpMessage;
1638
- if (optInMessage !== undefined) campaignData.optInMessage = optInMessage;
1639
- if (optOutMessage !== undefined) campaignData.optOutMessage = optOutMessage;
1640
- if (useCase !== undefined) campaignData.useCase = useCase;
1641
- if (vertical !== undefined) campaignData.vertical = vertical;
1642
-
1643
- const options = {
1644
- body: campaignData,
1645
- };
1646
-
1647
- const result = await this.sdk._fetch(
1648
- '/messaging/campaigns/10dlc/campaign',
1649
- 'POST',
1650
- options,
1651
- );
1652
- return result;
1653
- }
1654
-
1655
- /**
1656
- * Get a 10DLC campaign by ID
1657
- */
1658
- async get(campaignId) {
1659
- this.sdk.validateParams(
1660
- { campaignId },
1661
- {
1662
- campaignId: { type: 'string', required: true },
1663
- },
1664
- );
1665
-
1666
- const result = await this.sdk._fetch(
1667
- `/messaging/campaigns/10dlc/campaign/${campaignId}`,
1668
- 'GET',
1669
- );
1670
- return result;
1671
- }
1672
-
1673
- /**
1674
- * Update a 10DLC campaign
1675
- * @param {string} campaignId - Campaign ID to update
1676
- * @param {Object} params - Update parameters
1677
- * @param {string} [params.name] - Campaign name
1678
- * @param {string} [params.description] - Campaign description
1679
- * @param {string} [params.messageFlow] - Message flow description
1680
- * @param {Array<string>} [params.samples] - Sample messages (up to 4)
1681
- * @param {string} [params.webhookUrl] - Webhook URL
1682
- * @param {string} [params.helpMessage] - Help message
1683
- * @param {string} [params.optInMessage] - Opt-in message
1684
- * @param {string} [params.optOutMessage] - Opt-out message
1685
- * @param {string} [params.helpKeywords] - Help keywords (comma-separated)
1686
- * @param {string} [params.optinKeywords] - Opt-in keywords (comma-separated)
1687
- * @param {string} [params.optoutKeywords] - Opt-out keywords (comma-separated)
1688
- * @param {boolean} [params.affiliateMarketing] - Affiliate marketing flag
1689
- * @param {boolean} [params.ageGated] - Age gated content flag
1690
- * @param {boolean} [params.directLending] - Direct lending flag
1691
- * @param {boolean} [params.embeddedLink] - Embedded links flag
1692
- * @param {boolean} [params.embeddedPhone] - Embedded phone numbers flag
1693
- * @param {boolean} [params.numberPool] - Number pool usage flag
1694
- * @param {boolean} [params.autoRenewal] - Auto-renewal flag
1695
- * @param {boolean} [params.subscriberHelp] - Subscriber help support flag
1696
- * @param {boolean} [params.subscriberOptin] - Subscriber opt-in requirement flag
1697
- * @param {boolean} [params.subscriberOptout] - Subscriber opt-out support flag
1698
- * @returns {Promise<Object>} Updated campaign information
1699
- */
1700
- async update(campaignId, {
1701
- name,
1702
- description,
1703
- messageFlow,
1704
- samples,
1705
- webhookUrl,
1706
- helpMessage,
1707
- optInMessage,
1708
- optOutMessage,
1709
- helpKeywords,
1710
- optinKeywords,
1711
- optoutKeywords,
1712
- affiliateMarketing,
1713
- ageGated,
1714
- directLending,
1715
- embeddedLink,
1716
- embeddedPhone,
1717
- numberPool,
1718
- autoRenewal,
1719
- subscriberHelp,
1720
- subscriberOptin,
1721
- subscriberOptout,
1722
- } = {}) {
1723
- this.sdk.validateParams(
1724
- { campaignId, name, description, messageFlow, samples, webhookUrl, helpMessage, optInMessage, optOutMessage, helpKeywords, optinKeywords, optoutKeywords, affiliateMarketing, ageGated, directLending, embeddedLink, embeddedPhone, numberPool, autoRenewal, subscriberHelp, subscriberOptin, subscriberOptout },
1725
- {
1726
- campaignId: { type: 'string', required: true },
1727
- name: { type: 'string', required: false },
1728
- description: { type: 'string', required: false },
1729
- messageFlow: { type: 'string', required: false },
1730
- samples: { type: 'array', required: false },
1731
- webhookUrl: { type: 'string', required: false },
1732
- helpMessage: { type: 'string', required: false },
1733
- optInMessage: { type: 'string', required: false },
1734
- optOutMessage: { type: 'string', required: false },
1735
- helpKeywords: { type: 'array', required: false },
1736
- optinKeywords: { type: 'array', required: false },
1737
- optoutKeywords: { type: 'array', required: false },
1738
- affiliateMarketing: { type: 'boolean', required: false },
1739
- ageGated: { type: 'boolean', required: false },
1740
- directLending: { type: 'boolean', required: false },
1741
- embeddedLink: { type: 'boolean', required: false },
1742
- embeddedPhone: { type: 'boolean', required: false },
1743
- numberPool: { type: 'boolean', required: false },
1744
- autoRenewal: { type: 'boolean', required: false },
1745
- subscriberHelp: { type: 'boolean', required: false },
1746
- subscriberOptin: { type: 'boolean', required: false },
1747
- subscriberOptout: { type: 'boolean', required: false },
1748
- },
1749
- );
1750
-
1751
- const updateData = {};
1752
- if (name !== undefined) updateData.name = name;
1753
- if (description !== undefined) updateData.description = description;
1754
- if (messageFlow !== undefined) updateData.messageFlow = messageFlow;
1755
- if (samples !== undefined) updateData.samples = samples;
1756
- if (webhookUrl !== undefined) updateData.webhookUrl = webhookUrl;
1757
- if (helpMessage !== undefined) updateData.helpMessage = helpMessage;
1758
- if (optInMessage !== undefined) updateData.optInMessage = optInMessage;
1759
- if (optOutMessage !== undefined) updateData.optOutMessage = optOutMessage;
1760
- if (helpKeywords !== undefined) updateData.helpKeywords = helpKeywords;
1761
- if (optinKeywords !== undefined) updateData.optinKeywords = optinKeywords;
1762
- if (optoutKeywords !== undefined) updateData.optoutKeywords = optoutKeywords;
1763
- if (affiliateMarketing !== undefined) updateData.affiliateMarketing = affiliateMarketing;
1764
- if (ageGated !== undefined) updateData.ageGated = ageGated;
1765
- if (directLending !== undefined) updateData.directLending = directLending;
1766
- if (embeddedLink !== undefined) updateData.embeddedLink = embeddedLink;
1767
- if (embeddedPhone !== undefined) updateData.embeddedPhone = embeddedPhone;
1768
- if (numberPool !== undefined) updateData.numberPool = numberPool;
1769
- if (autoRenewal !== undefined) updateData.autoRenewal = autoRenewal;
1770
- if (subscriberHelp !== undefined) updateData.subscriberHelp = subscriberHelp;
1771
- if (subscriberOptin !== undefined) updateData.subscriberOptin = subscriberOptin;
1772
- if (subscriberOptout !== undefined) updateData.subscriberOptout = subscriberOptout;
1773
-
1774
- const options = {
1775
- body: updateData,
1776
- };
1777
-
1778
- const result = await this.sdk._fetch(
1779
- `/messaging/campaigns/10dlc/campaign/${campaignId}`,
1780
- 'PUT',
1781
- options,
1782
- );
1783
- return result;
1784
- }
1785
-
1786
- /**
1787
- * Delete a 10DLC campaign
1788
- */
1789
- async delete(campaignId) {
1790
- this.sdk.validateParams(
1791
- { campaignId },
1792
- {
1793
- campaignId: { type: 'string', required: true },
1794
- },
1795
- );
1796
-
1797
- const result = await this.sdk._fetch(
1798
- `/messaging/campaigns/10dlc/campaign/${campaignId}`,
1799
- 'DELETE',
1800
- );
1801
- return result;
1802
- }
1803
-
1804
- /**
1805
- * Get campaign operation status
1806
- */
1807
- async getOperationStatus(campaignId) {
1808
- this.sdk.validateParams(
1809
- { campaignId },
1810
- {
1811
- campaignId: { type: 'string', required: true },
1812
- },
1813
- );
1814
-
1815
- const result = await this.sdk._fetch(
1816
- `/messaging/campaigns/10dlc/campaign/${campaignId}/operationStatus`,
1817
- 'GET',
1818
- );
1819
- return result;
1820
- }
1821
-
1822
- /**
1823
- * Get MNO campaign metadata
1824
- */
1825
- async getMnoMetaData(campaignId) {
1826
- this.sdk.validateParams(
1827
- { campaignId },
1828
- {
1829
- campaignId: { type: 'string', required: true },
1830
- },
1831
- );
1832
-
1833
- const result = await this.sdk._fetch(
1834
- `/messaging/campaigns/10dlc/campaign/${campaignId}/mnoMetaData`,
1835
- 'GET',
1836
- );
1837
- return result;
1838
- }
1839
-
1840
- /**
1841
- * Add phone number to campaign
1842
- */
1843
- async addPhoneNumber(campaignId, phoneNumberData) {
1844
- this.sdk.validateParams(
1845
- { campaignId, phoneNumberData },
1846
- {
1847
- campaignId: { type: 'string', required: true },
1848
- phoneNumberData: { type: 'object', required: true },
1849
- },
1850
- );
1851
-
1852
- const options = {
1853
- body: phoneNumberData,
1854
- };
1855
-
1856
- const result = await this.sdk._fetch(
1857
- `/messaging/campaigns/10dlc/campaign/${campaignId}/phoneNumber`,
1858
- 'POST',
1859
- options,
1860
- );
1861
- return result;
1862
- }
1863
-
1864
- /**
1865
- * Update phone number in campaign
1866
- */
1867
- async updatePhoneNumber(campaignId, phoneNumberData) {
1868
- this.sdk.validateParams(
1869
- { campaignId, phoneNumberData },
1870
- {
1871
- campaignId: { type: 'string', required: true },
1872
- phoneNumberData: { type: 'object', required: true },
1873
- },
1874
- );
1875
-
1876
- const options = {
1877
- body: phoneNumberData,
1878
- };
1879
-
1880
- const result = await this.sdk._fetch(
1881
- `/messaging/campaigns/10dlc/campaign/${campaignId}/phoneNumber`,
1882
- 'PUT',
1883
- options,
1884
- );
1885
- return result;
1886
- }
1887
-
1888
- /**
1889
- * Remove phone number from campaign
1890
- */
1891
- async removePhoneNumber(campaignId, phoneNumberData) {
1892
- this.sdk.validateParams(
1893
- { campaignId, phoneNumberData },
1894
- {
1895
- campaignId: { type: 'string', required: true },
1896
- phoneNumberData: { type: 'object', required: true },
1897
- },
1898
- );
1899
-
1900
- const options = {
1901
- body: phoneNumberData,
1902
- };
1903
-
1904
- const result = await this.sdk._fetch(
1905
- `/messaging/campaigns/10dlc/campaign/${campaignId}/phoneNumber`,
1906
- 'DELETE',
1907
- options,
1908
- );
1909
- return result;
1910
- }
1911
- }
1912
-
1913
- export class EmailAnalyticsService {
1914
- constructor(sdk) {
1915
- this.sdk = sdk;
1916
- }
1917
-
1918
- /**
1919
- * Get email queue time series analytics
1920
- * @param {Object} [params] - Analytics parameters
1921
- * @param {string} [params.period='24h'] - Time period: '1h', '6h', '24h', '7d', '30d'
1922
- * @param {string} [params.granularity='hour'] - Data granularity: 'minute', 'hour', 'day'
1923
- * @returns {Promise<Object>} Time series data with summary statistics
1924
- * @example
1925
- * // Get hourly analytics for last 24 hours
1926
- * const analytics = await sdk.messaging.email.analytics.timeSeries({ period: '24h', granularity: 'hour' });
1927
- * // Returns: { period, granularity, data: [{ timestamp, sent, delivered, failed, queued }], summary }
1928
- */
1929
- async timeSeries({ period, granularity } = {}) {
1930
- const options = { query: {} };
1931
- if (period) options.query.period = period;
1932
- if (granularity) options.query.granularity = granularity;
1933
-
1934
- const result = await this.sdk._fetch('/messaging/email/analytics/timeseries', 'GET', options);
1935
- return result;
1936
- }
1937
-
1938
- /**
1939
- * Get email queue summary statistics
1940
- * @param {Object} [params] - Summary parameters
1941
- * @param {string} [params.period='24h'] - Time period: '1h', '6h', '24h', '7d', '30d'
1942
- * @returns {Promise<Object>} Summary statistics
1943
- * @example
1944
- * // Get summary stats for last 24 hours
1945
- * const summary = await sdk.messaging.email.analytics.summary({ period: '24h' });
1946
- * // Returns: { totalSent, deliveryRate, errorRate, avgEmailsPerMinute, avgProcessingSeconds }
1947
- */
1948
- async summary({ period } = {}) {
1949
- const options = { query: {} };
1950
- if (period) options.query.period = period;
1951
-
1952
- const result = await this.sdk._fetch('/messaging/email/analytics/summary', 'GET', options);
1953
- return result;
1954
- }
1955
-
1956
- /**
1957
- * Get real-time email queue metrics
1958
- * @returns {Promise<Object>} Real-time queue statistics
1959
- * @example
1960
- * // Get current queue status
1961
- * const realtime = await sdk.messaging.email.analytics.realtime();
1962
- * // Returns: { queueDepth, currentSendRatePerMinute, last5Minutes: { sent, delivered, failed } }
1963
- */
1964
- async realtime() {
1965
- const result = await this.sdk._fetch('/messaging/email/analytics/realtime', 'GET');
1966
- return result;
1967
- }
1968
-
1969
- /**
1970
- * Get email error analysis by domain
1971
- * @param {Object} [params] - Error analysis parameters
1972
- * @param {string} [params.period='7d'] - Time period: '24h', '7d', '30d'
1973
- * @returns {Promise<Object>} Error analysis with domain breakdown
1974
- * @example
1975
- * // Get error analysis for last 7 days
1976
- * const errors = await sdk.messaging.email.analytics.errors({ period: '7d' });
1977
- * // Returns: { overallErrorRate, topErrorDomains: [{ domain, errorRate, totalErrors }] }
1978
- */
1979
- async errors({ period } = {}) {
1980
- const options = { query: {} };
1981
- if (period) options.query.period = period;
1982
-
1983
- const result = await this.sdk._fetch('/messaging/email/analytics/errors', 'GET', options);
1984
- return result;
1985
- }
1986
- }
1
+ // Import all extracted services
2
+ import { MessagingService } from './messaging/MessagingService.js';
3
+ import { SmsService } from './messaging/SmsService.js';
4
+ import { SmsTemplatesService } from './messaging/SmsTemplatesService.js';
5
+ import { EmailService } from './messaging/EmailService.js';
6
+ import { EmailTemplatesService } from './messaging/EmailTemplatesService.js';
7
+ import { EmailDomainsService } from './messaging/EmailDomainsService.js';
8
+ import { EmailAddressesService } from './messaging/EmailAddressesService.js';
9
+ import { EmailMailboxesService } from './messaging/EmailMailboxesService.js';
10
+ import { CampaignsService } from './messaging/CampaignsService.js';
11
+ import { TollFreeCampaignsService } from './messaging/TollFreeCampaignsService.js';
12
+ import { TenDlcCampaignsService } from './messaging/TenDlcCampaignsService.js';
13
+ import { TenDlcBrandsService } from './messaging/TenDlcBrandsService.js';
14
+ import { TenDlcCampaignManagementService } from './messaging/TenDlcCampaignManagementService.js';
15
+ import { EmailAnalyticsService } from './messaging/EmailAnalyticsService.js';
16
+ import { EmailQueueService } from './messaging/EmailQueueService.js';
17
+ import { EmailSuppressionService } from './messaging/EmailSuppressionService.js';
18
+
19
+ // Re-export all services - maintains exact same API
20
+ export {
21
+ MessagingService,
22
+ SmsService,
23
+ SmsTemplatesService,
24
+ EmailService,
25
+ EmailTemplatesService,
26
+ EmailDomainsService,
27
+ EmailAddressesService,
28
+ EmailMailboxesService,
29
+ CampaignsService,
30
+ TollFreeCampaignsService,
31
+ TenDlcCampaignsService,
32
+ TenDlcBrandsService,
33
+ TenDlcCampaignManagementService,
34
+ EmailAnalyticsService,
35
+ EmailQueueService,
36
+ EmailSuppressionService,
37
+ };