@unboundcx/sdk 4.8.9 → 4.8.11

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.
Files changed (57) hide show
  1. package/base.js +71 -29
  2. package/index.js +6 -3
  3. package/package.json +1 -4
  4. package/services/ai/playbooks.js +22 -21
  5. package/services/ai/settings.js +4 -2
  6. package/services/ai/translate.js +3 -1
  7. package/services/ai/vocabulary.js +4 -3
  8. package/services/ai.js +21 -20
  9. package/services/chat.js +124 -48
  10. package/services/developerApis.js +174 -0
  11. package/services/directory.js +109 -12
  12. package/services/documents.js +11 -10
  13. package/services/engagementMetrics.js +2 -1
  14. package/services/enroll.js +16 -15
  15. package/services/externalOAuth.js +12 -11
  16. package/services/fax.js +4 -3
  17. package/services/generateId.js +3 -2
  18. package/services/googleCalendar.js +7 -6
  19. package/services/inbox.js +59 -11
  20. package/services/knowledgeBase.js +9 -8
  21. package/services/layouts.js +15 -14
  22. package/services/login.js +8 -7
  23. package/services/lookup.js +4 -3
  24. package/services/messaging/EmailAddressesService.js +5 -4
  25. package/services/messaging/EmailAnalyticsService.js +5 -4
  26. package/services/messaging/EmailDomainsService.js +8 -7
  27. package/services/messaging/EmailMailboxesService.js +59 -9
  28. package/services/messaging/EmailQueueService.js +2 -1
  29. package/services/messaging/EmailService.js +12 -11
  30. package/services/messaging/EmailSuppressionService.js +5 -4
  31. package/services/messaging/EmailTemplatesService.js +6 -5
  32. package/services/messaging/SmsService.js +3 -2
  33. package/services/messaging/SmsTemplatesService.js +6 -5
  34. package/services/messaging/TenDlcBrandsService.js +11 -10
  35. package/services/messaging/TenDlcCampaignManagementService.js +14 -13
  36. package/services/messaging/TenDlcCampaignsService.js +2 -1
  37. package/services/messaging/TollFreeCampaignsService.js +13 -12
  38. package/services/notes.js +7 -6
  39. package/services/objects.js +97 -36
  40. package/services/permissions.js +34 -33
  41. package/services/phoneNumbers.js +28 -27
  42. package/services/portals.js +8 -7
  43. package/services/recordTypes.js +12 -11
  44. package/services/search.js +2 -1
  45. package/services/sipEndpoints.js +8 -7
  46. package/services/storage.js +16 -15
  47. package/services/subscriptions.js +4 -3
  48. package/services/taskRouter/CCService.js +303 -0
  49. package/services/taskRouter/MetricsService.js +56 -1
  50. package/services/taskRouter/TaskRouterService.js +2 -0
  51. package/services/taskRouter/TaskService.js +13 -12
  52. package/services/taskRouter/WorkerService.js +9 -8
  53. package/services/triggers.js +9 -8
  54. package/services/verification.js +5 -4
  55. package/services/video.js +230 -45
  56. package/services/voice.js +40 -11
  57. package/services/workflows.js +22 -21
package/services/inbox.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { internalRequest } from '../base.js';
1
2
  export class InboxService {
2
3
  constructor(sdk) {
3
4
  this.sdk = sdk;
@@ -9,21 +10,59 @@ export class InboxService {
9
10
  *
10
11
  * @param {Object} params
11
12
  * @param {string|string[]} [params.types] - Source kinds to include
12
- * ('call','voicemail','fax','sms'). Pass an array or a comma-joined
13
- * string; omit to include all kinds.
13
+ * ('call','voicemail','fax','sms','meeting'). Pass an array or a
14
+ * comma-joined string; omit to include all kinds.
14
15
  * @param {number} [params.limit] - Max items to return.
15
16
  * @param {string} [params.before] - UTC cursor 'YYYY-MM-DD HH:mm:ss';
16
17
  * only items strictly older than this are returned.
17
18
  * @param {boolean} [params.unreadOnly] - When true, only unread items.
19
+ * @param {string} [params.startDate] - Inclusive range start `YYYY-MM-DD`.
20
+ * @param {string} [params.endDate] - Inclusive range end `YYYY-MM-DD`.
21
+ * @param {string} [params.q] - Search numbers, names, previews.
22
+ * @param {string} [params.direction] - `inbound` or `outbound`.
23
+ * @param {boolean} [params.missed] - Missed inbound calls only.
24
+ * @param {boolean} [params.hasRecording] - Calls/meetings with a recording.
25
+ * @param {boolean} [params.hasTranscription] - Calls/meetings/voicemail
26
+ * with a transcript.
18
27
  * @returns {Promise<{items: Object[], nextCursor: string|null}>}
19
28
  */
20
- async list({ types, limit, before, unreadOnly } = {}) {
29
+ async list({
30
+ types,
31
+ limit,
32
+ before,
33
+ unreadOnly,
34
+ startDate,
35
+ endDate,
36
+ q,
37
+ direction,
38
+ missed,
39
+ hasRecording,
40
+ hasTranscription,
41
+ } = {}) {
21
42
  this.sdk.validateParams(
22
- { limit, before, unreadOnly },
43
+ {
44
+ limit,
45
+ before,
46
+ unreadOnly,
47
+ startDate,
48
+ endDate,
49
+ q,
50
+ direction,
51
+ missed,
52
+ hasRecording,
53
+ hasTranscription,
54
+ },
23
55
  {
24
56
  limit: { type: 'number', required: false },
25
57
  before: { type: 'string', required: false },
26
58
  unreadOnly: { type: 'boolean', required: false },
59
+ startDate: { type: 'string', required: false },
60
+ endDate: { type: 'string', required: false },
61
+ q: { type: 'string', required: false },
62
+ direction: { type: 'string', required: false },
63
+ missed: { type: 'boolean', required: false },
64
+ hasRecording: { type: 'boolean', required: false },
65
+ hasTranscription: { type: 'boolean', required: false },
27
66
  },
28
67
  );
29
68
 
@@ -42,10 +81,19 @@ export class InboxService {
42
81
  if (limit !== undefined) query.limit = limit;
43
82
  if (before !== undefined) query.before = before;
44
83
  if (unreadOnly !== undefined) query.unreadOnly = unreadOnly;
84
+ if (startDate !== undefined) query.startDate = startDate;
85
+ if (endDate !== undefined) query.endDate = endDate;
86
+ if (q !== undefined) query.q = q;
87
+ if (direction !== undefined) query.direction = direction;
88
+ if (missed !== undefined) query.missed = missed;
89
+ if (hasRecording !== undefined) query.hasRecording = hasRecording;
90
+ if (hasTranscription !== undefined) {
91
+ query.hasTranscription = hasTranscription;
92
+ }
45
93
 
46
94
  const params = { query };
47
95
 
48
- const result = await this.sdk._fetch('/inbox', 'GET', params);
96
+ const result = await internalRequest(this.sdk, '/inbox', 'GET', params);
49
97
  return result;
50
98
  }
51
99
 
@@ -77,18 +125,18 @@ export class InboxService {
77
125
 
78
126
  const params = { query };
79
127
 
80
- const result = await this.sdk._fetch('/inbox/smsThread', 'GET', params);
128
+ const result = await internalRequest(this.sdk, '/inbox/smsThread', 'GET', params);
81
129
  return result;
82
130
  }
83
131
 
84
132
  /**
85
- * Fetch inbox stats (calls/talk time/missed/unread voicemail) for the
86
- * current user.
133
+ * Fetch inbox stats (calls/talk time/missed/unread voicemail/meetings) for
134
+ * the current user.
87
135
  *
88
- * @returns {Promise<{callsToday: number, talkTimeSeconds: number, missedToday: number, unreadVoicemail: number, oldestUnreadVoicemailAt: string|null}>}
136
+ * @returns {Promise<{callsToday: number, talkTimeSeconds: number, missedToday: number, unreadVoicemail: number, oldestUnreadVoicemailAt: string|null, meetingsToday: number, meetingMinutesToday: number}>}
89
137
  */
90
138
  async stats() {
91
- const result = await this.sdk._fetch('/inbox/stats', 'GET');
139
+ const result = await internalRequest(this.sdk, '/inbox/stats', 'GET');
92
140
  return result;
93
141
  }
94
142
 
@@ -105,7 +153,7 @@ export class InboxService {
105
153
  { voicemailMessageId },
106
154
  { voicemailMessageId: { type: 'string', required: true } },
107
155
  );
108
- return await this.sdk._fetch(
156
+ return await internalRequest(this.sdk,
109
157
  `/inbox/voicemail/${voicemailMessageId}/transcribe`,
110
158
  'POST',
111
159
  { body: {} },
@@ -1,3 +1,4 @@
1
+ import { internalRequest } from '../base.js';
1
2
  export class KnowledgeBaseService {
2
3
  constructor(sdk) {
3
4
  this.sdk = sdk;
@@ -30,7 +31,7 @@ export class KnowledgeBaseService {
30
31
  body: { query, knowledgeBaseId, limit, filters, rerank },
31
32
  };
32
33
 
33
- const result = await this.sdk._fetch(
34
+ const result = await internalRequest(this.sdk,
34
35
  '/knowledgeBase/search',
35
36
  'POST',
36
37
  params,
@@ -59,7 +60,7 @@ export class KnowledgeBaseService {
59
60
  body: { url },
60
61
  };
61
62
 
62
- const result = await this.sdk._fetch(
63
+ const result = await internalRequest(this.sdk,
63
64
  '/knowledgeBase/discover-url',
64
65
  'POST',
65
66
  params,
@@ -92,7 +93,7 @@ export class KnowledgeBaseService {
92
93
  body: { knowledgeBaseId, url, categoryId, title, refreshInterval },
93
94
  };
94
95
 
95
- const result = await this.sdk._fetch(
96
+ const result = await internalRequest(this.sdk,
96
97
  '/knowledgeBase/ingest/url',
97
98
  'POST',
98
99
  params,
@@ -118,7 +119,7 @@ export class KnowledgeBaseService {
118
119
  },
119
120
  );
120
121
 
121
- const result = await this.sdk._fetch(
122
+ const result = await internalRequest(this.sdk,
122
123
  `/knowledgeBase/process/${sourceType}/${id}`,
123
124
  'POST',
124
125
  );
@@ -140,7 +141,7 @@ export class KnowledgeBaseService {
140
141
  },
141
142
  );
142
143
 
143
- const result = await this.sdk._fetch(
144
+ const result = await internalRequest(this.sdk,
144
145
  `/knowledgeBase/process/${id}/status`,
145
146
  'GET',
146
147
  );
@@ -163,7 +164,7 @@ export class KnowledgeBaseService {
163
164
  },
164
165
  );
165
166
 
166
- const result = await this.sdk._fetch(
167
+ const result = await internalRequest(this.sdk,
167
168
  `/knowledgeBase/articles/${id}/publish`,
168
169
  'POST',
169
170
  );
@@ -190,7 +191,7 @@ export class KnowledgeBaseService {
190
191
  query: filters,
191
192
  };
192
193
 
193
- const result = await this.sdk._fetch(
194
+ const result = await internalRequest(this.sdk,
194
195
  `/knowledgeBase/${knowledgeBaseId}/analytics`,
195
196
  'GET',
196
197
  params,
@@ -219,7 +220,7 @@ export class KnowledgeBaseService {
219
220
  query: filters,
220
221
  };
221
222
 
222
- const result = await this.sdk._fetch(
223
+ const result = await internalRequest(this.sdk,
223
224
  `/knowledgeBase/${knowledgeBaseId}/analytics/gaps`,
224
225
  'GET',
225
226
  params,
@@ -1,5 +1,6 @@
1
1
  import * as layoutSchemas from '../schemas/layouts/index.js';
2
2
 
3
+ import { internalRequest } from '../base.js';
3
4
  export class LayoutsService {
4
5
  constructor(sdk) {
5
6
  this.sdk = sdk;
@@ -26,7 +27,7 @@ export class LayoutsService {
26
27
  uri = `${uri}/${id}`;
27
28
  }
28
29
 
29
- const result = await this.sdk._fetch(uri, 'GET', params);
30
+ const result = await internalRequest(this.sdk, uri, 'GET', params);
30
31
  return result;
31
32
  }
32
33
 
@@ -42,7 +43,7 @@ export class LayoutsService {
42
43
  body: layout,
43
44
  };
44
45
 
45
- const result = await this.sdk._fetch('/layouts/', 'POST', params);
46
+ const result = await internalRequest(this.sdk, '/layouts/', 'POST', params);
46
47
  return result;
47
48
  }
48
49
 
@@ -59,7 +60,7 @@ export class LayoutsService {
59
60
  body: layout,
60
61
  };
61
62
 
62
- const result = await this.sdk._fetch(`/layouts/${id}`, 'PUT', params);
63
+ const result = await internalRequest(this.sdk, `/layouts/${id}`, 'PUT', params);
63
64
  return result;
64
65
  }
65
66
 
@@ -73,7 +74,7 @@ export class LayoutsService {
73
74
 
74
75
  const params = {};
75
76
 
76
- const result = await this.sdk._fetch(`/layouts/${id}`, 'DELETE', params);
77
+ const result = await internalRequest(this.sdk, `/layouts/${id}`, 'DELETE', params);
77
78
  return result;
78
79
  }
79
80
 
@@ -89,7 +90,7 @@ export class LayoutsService {
89
90
  query,
90
91
  };
91
92
 
92
- const result = await this.sdk._fetch(
93
+ const result = await internalRequest(this.sdk,
93
94
  '/layouts/selectDynamic/search',
94
95
  'GET',
95
96
  params,
@@ -121,7 +122,7 @@ export class LayoutsService {
121
122
 
122
123
  const params = { query };
123
124
 
124
- const result = await this.sdk._fetch('/layouts/resolve', 'GET', params);
125
+ const result = await internalRequest(this.sdk, '/layouts/resolve', 'GET', params);
125
126
  return result;
126
127
  }
127
128
 
@@ -131,7 +132,7 @@ export class LayoutsService {
131
132
  { layoutId: { type: 'string', required: true } },
132
133
  );
133
134
 
134
- const result = await this.sdk._fetch(`/layouts/${layoutId}/versions`, 'GET', {});
135
+ const result = await internalRequest(this.sdk, `/layouts/${layoutId}/versions`, 'GET', {});
135
136
  return result;
136
137
  }
137
138
 
@@ -141,7 +142,7 @@ export class LayoutsService {
141
142
  { layoutId: { type: 'string', required: true } },
142
143
  );
143
144
 
144
- const result = await this.sdk._fetch(`/layouts/${layoutId}/edit`, 'GET', {});
145
+ const result = await internalRequest(this.sdk, `/layouts/${layoutId}/edit`, 'GET', {});
145
146
  return result;
146
147
  }
147
148
 
@@ -155,7 +156,7 @@ export class LayoutsService {
155
156
  body: { changeNote },
156
157
  };
157
158
 
158
- const result = await this.sdk._fetch(`/layouts/${layoutId}/publish`, 'POST', params);
159
+ const result = await internalRequest(this.sdk, `/layouts/${layoutId}/publish`, 'POST', params);
159
160
  return result;
160
161
  }
161
162
 
@@ -168,7 +169,7 @@ export class LayoutsService {
168
169
  },
169
170
  );
170
171
 
171
- const result = await this.sdk._fetch(
172
+ const result = await internalRequest(this.sdk,
172
173
  `/layouts/${layoutId}/versions/${version}/rollback`,
173
174
  'POST',
174
175
  {},
@@ -199,7 +200,7 @@ export class LayoutAssignmentsService {
199
200
  query: { objectName: resolvedObjectName, kind },
200
201
  };
201
202
 
202
- const result = await this.sdk._fetch('/layouts/assignments', 'GET', params);
203
+ const result = await internalRequest(this.sdk, '/layouts/assignments', 'GET', params);
203
204
  return result;
204
205
  }
205
206
 
@@ -221,7 +222,7 @@ export class LayoutAssignmentsService {
221
222
  },
222
223
  };
223
224
 
224
- const result = await this.sdk._fetch('/layouts/assignments', 'POST', params);
225
+ const result = await internalRequest(this.sdk, '/layouts/assignments', 'POST', params);
225
226
  return result;
226
227
  }
227
228
 
@@ -235,7 +236,7 @@ export class LayoutAssignmentsService {
235
236
  body: updates,
236
237
  };
237
238
 
238
- const result = await this.sdk._fetch(`/layouts/assignments/${id}`, 'PUT', params);
239
+ const result = await internalRequest(this.sdk, `/layouts/assignments/${id}`, 'PUT', params);
239
240
  return result;
240
241
  }
241
242
 
@@ -245,7 +246,7 @@ export class LayoutAssignmentsService {
245
246
  { id: { type: 'string', required: true } },
246
247
  );
247
248
 
248
- const result = await this.sdk._fetch(`/layouts/assignments/${id}`, 'DELETE', {});
249
+ const result = await internalRequest(this.sdk, `/layouts/assignments/${id}`, 'DELETE', {});
249
250
  return result;
250
251
  }
251
252
  }
package/services/login.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { internalRequest } from '../base.js';
1
2
  export class LoginService {
2
3
  constructor(sdk) {
3
4
  this.sdk = sdk;
@@ -17,7 +18,7 @@ export class LoginService {
17
18
  body: { username, password, tokenType: 'cookie', namespace },
18
19
  };
19
20
 
20
- const login = await this.sdk._fetch('/login', 'POST', options, true);
21
+ const login = await internalRequest(this.sdk, '/login', 'POST', options, true);
21
22
 
22
23
  if (typeof window !== 'undefined') {
23
24
  const canUseLocalStorage = typeof localStorage !== 'undefined';
@@ -37,7 +38,7 @@ export class LoginService {
37
38
  }
38
39
 
39
40
  async logout() {
40
- const logout = await this.sdk._fetch('/login', 'DELETE', {}, true);
41
+ const logout = await internalRequest(this.sdk, '/login', 'DELETE', {}, true);
41
42
 
42
43
  if (typeof window !== 'undefined') {
43
44
  const canUseLocalStorage = typeof localStorage !== 'undefined';
@@ -54,7 +55,7 @@ export class LoginService {
54
55
  async validate(forceFetch = true) {
55
56
  console.log('login :: validate :: forceFetch', forceFetch);
56
57
  const options = {};
57
- const validation = await this.sdk._fetch(
58
+ const validation = await internalRequest(this.sdk,
58
59
  '/login/validate',
59
60
  'POST',
60
61
  options,
@@ -75,7 +76,7 @@ export class LoginService {
75
76
  body: { password: newPassword },
76
77
  };
77
78
 
78
- const result = await this.sdk._fetch(
79
+ const result = await internalRequest(this.sdk,
79
80
  '/login/changePassword',
80
81
  'PUT',
81
82
  options,
@@ -84,7 +85,7 @@ export class LoginService {
84
85
  }
85
86
 
86
87
  async getPasswordRequirements() {
87
- const result = await this.sdk._fetch(
88
+ const result = await internalRequest(this.sdk,
88
89
  '/login/passwordRequirements',
89
90
  'GET',
90
91
  {},
@@ -104,7 +105,7 @@ export class LoginService {
104
105
  body: { password },
105
106
  };
106
107
 
107
- const result = await this.sdk._fetch(
108
+ const result = await internalRequest(this.sdk,
108
109
  '/login/validatePasswordStrength',
109
110
  'POST',
110
111
  options,
@@ -124,7 +125,7 @@ export class LoginService {
124
125
  body: { email },
125
126
  };
126
127
 
127
- const result = await this.sdk._fetch(
128
+ const result = await internalRequest(this.sdk,
128
129
  '/login/forgotPassword',
129
130
  'POST',
130
131
  options,
@@ -1,3 +1,4 @@
1
+ import { internalRequest } from '../base.js';
1
2
  export class LookupService {
2
3
  constructor(sdk) {
3
4
  this.sdk = sdk;
@@ -15,7 +16,7 @@ export class LookupService {
15
16
  query: { phoneNumber },
16
17
  };
17
18
 
18
- const result = await this.sdk._fetch('/lookup/cnam', 'GET', params);
19
+ const result = await internalRequest(this.sdk, '/lookup/cnam', 'GET', params);
19
20
  return result;
20
21
  }
21
22
 
@@ -32,7 +33,7 @@ export class LookupService {
32
33
  query: { phoneNumber, cnam },
33
34
  };
34
35
 
35
- const result = await this.sdk._fetch('/lookup/lrn', 'GET', params);
36
+ const result = await internalRequest(this.sdk, '/lookup/lrn', 'GET', params);
36
37
  return result;
37
38
  }
38
39
 
@@ -48,7 +49,7 @@ export class LookupService {
48
49
  query: { phoneNumber },
49
50
  };
50
51
 
51
- const result = await this.sdk._fetch('/lookup/number', 'GET', params);
52
+ const result = await internalRequest(this.sdk, '/lookup/number', 'GET', params);
52
53
  return result;
53
54
  }
54
55
  }
@@ -1,3 +1,4 @@
1
+ import { internalRequest } from '../../base.js';
1
2
  export class EmailAddressesService {
2
3
  constructor(sdk) {
3
4
  this.sdk = sdk;
@@ -20,7 +21,7 @@ export class EmailAddressesService {
20
21
  body: { emailAddress },
21
22
  };
22
23
 
23
- const result = await this.sdk._fetch(
24
+ const result = await internalRequest(this.sdk,
24
25
  '/messaging/email/validate/emailAddress',
25
26
  'POST',
26
27
  options,
@@ -41,7 +42,7 @@ export class EmailAddressesService {
41
42
  },
42
43
  );
43
44
 
44
- const result = await this.sdk._fetch(
45
+ const result = await internalRequest(this.sdk,
45
46
  `/messaging/email/validate/emailAddress/${encodeURIComponent(
46
47
  emailAddress,
47
48
  )}`,
@@ -55,7 +56,7 @@ export class EmailAddressesService {
55
56
  * @returns {Promise<Array>} List of verified email addresses
56
57
  */
57
58
  async list() {
58
- const result = await this.sdk._fetch(
59
+ const result = await internalRequest(this.sdk,
59
60
  '/messaging/email/validate/emailAddress',
60
61
  'GET',
61
62
  );
@@ -79,7 +80,7 @@ export class EmailAddressesService {
79
80
  query: { emailAddress },
80
81
  };
81
82
 
82
- const result = await this.sdk._fetch(
83
+ const result = await internalRequest(this.sdk,
83
84
  '/messaging/email/validate/emailAddress/status',
84
85
  'GET',
85
86
  options,
@@ -1,3 +1,4 @@
1
+ import { internalRequest } from '../../base.js';
1
2
  export class EmailAnalyticsService {
2
3
  constructor(sdk) {
3
4
  this.sdk = sdk;
@@ -25,7 +26,7 @@ export class EmailAnalyticsService {
25
26
  if (granularity) options.query.granularity = granularity;
26
27
  if (timezone) options.query.timezone = timezone;
27
28
 
28
- const result = await this.sdk._fetch(
29
+ const result = await internalRequest(this.sdk,
29
30
  '/messaging/email/analytics/timeseries',
30
31
  'GET',
31
32
  options,
@@ -61,7 +62,7 @@ export class EmailAnalyticsService {
61
62
  if (period) options.query.period = period;
62
63
  if (timezone) options.query.timezone = timezone;
63
64
 
64
- const result = await this.sdk._fetch(
65
+ const result = await internalRequest(this.sdk,
65
66
  '/messaging/email/analytics/summary',
66
67
  'GET',
67
68
  options,
@@ -78,7 +79,7 @@ export class EmailAnalyticsService {
78
79
  * // Returns: { queueDepth, currentSendRatePerMinute, last5Minutes: { sent, delivered, failed } }
79
80
  */
80
81
  async realtime() {
81
- const result = await this.sdk._fetch(
82
+ const result = await internalRequest(this.sdk,
82
83
  '/messaging/email/analytics/realtime',
83
84
  'GET',
84
85
  );
@@ -99,7 +100,7 @@ export class EmailAnalyticsService {
99
100
  const options = { query: {} };
100
101
  if (period) options.query.period = period;
101
102
 
102
- const result = await this.sdk._fetch(
103
+ const result = await internalRequest(this.sdk,
103
104
  '/messaging/email/analytics/errors',
104
105
  'GET',
105
106
  options,
@@ -1,3 +1,4 @@
1
+ import { internalRequest } from '../../base.js';
1
2
  export class EmailDomainsService {
2
3
  constructor(sdk) {
3
4
  this.sdk = sdk;
@@ -32,7 +33,7 @@ export class EmailDomainsService {
32
33
  body: domainData,
33
34
  };
34
35
 
35
- const result = await this.sdk._fetch(
36
+ const result = await internalRequest(this.sdk,
36
37
  '/messaging/email/validate/domain',
37
38
  'POST',
38
39
  options,
@@ -57,7 +58,7 @@ export class EmailDomainsService {
57
58
  body: { domainId },
58
59
  };
59
60
 
60
- const result = await this.sdk._fetch(
61
+ const result = await internalRequest(this.sdk,
61
62
  '/messaging/email/validate/domain',
62
63
  'DELETE',
63
64
  options,
@@ -85,7 +86,7 @@ export class EmailDomainsService {
85
86
  * // }
86
87
  */
87
88
  async list() {
88
- const result = await this.sdk._fetch(
89
+ const result = await internalRequest(this.sdk,
89
90
  '/messaging/email/validate/domain',
90
91
  'GET',
91
92
  );
@@ -147,7 +148,7 @@ export class EmailDomainsService {
147
148
  },
148
149
  );
149
150
 
150
- const result = await this.sdk._fetch(
151
+ const result = await internalRequest(this.sdk,
151
152
  `/messaging/email/validate/domain/${domainId}`,
152
153
  'GET',
153
154
  );
@@ -171,7 +172,7 @@ export class EmailDomainsService {
171
172
  query: { domain },
172
173
  };
173
174
 
174
- const result = await this.sdk._fetch(
175
+ const result = await internalRequest(this.sdk,
175
176
  '/messaging/email/validate/domain/dns',
176
177
  'GET',
177
178
  options,
@@ -196,7 +197,7 @@ export class EmailDomainsService {
196
197
  query: { domain },
197
198
  };
198
199
 
199
- const result = await this.sdk._fetch(
200
+ const result = await internalRequest(this.sdk,
200
201
  '/messaging/email/validate/domain/status',
201
202
  'GET',
202
203
  options,
@@ -242,7 +243,7 @@ export class EmailDomainsService {
242
243
  body: updateData,
243
244
  };
244
245
 
245
- const result = await this.sdk._fetch(
246
+ const result = await internalRequest(this.sdk,
246
247
  '/messaging/email/validate/domain',
247
248
  'PUT',
248
249
  options,