@unboundcx/sdk 4.8.10 → 4.8.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.js +41 -1
- package/index.js +9 -6
- package/package.json +1 -4
- package/services/ai/playbooks.js +22 -21
- package/services/ai/settings.js +4 -2
- package/services/ai/translate.js +3 -1
- package/services/ai/vocabulary.js +4 -3
- package/services/ai.js +21 -20
- package/services/chat.js +267 -52
- package/services/developerApis.js +174 -0
- package/services/directory.js +40 -9
- package/services/documents.js +11 -10
- package/services/engagementMetrics.js +2 -1
- package/services/enroll.js +16 -15
- package/services/externalOAuth.js +12 -11
- package/services/fax.js +4 -3
- package/services/generateId.js +3 -2
- package/services/googleCalendar.js +7 -6
- package/services/knowledgeBase.js +9 -8
- package/services/layouts.js +15 -14
- package/services/login.js +8 -7
- package/services/lookup.js +4 -3
- package/services/messaging/EmailAddressesService.js +5 -4
- package/services/messaging/EmailAnalyticsService.js +5 -4
- package/services/messaging/EmailDomainsService.js +8 -7
- package/services/messaging/EmailMailboxesService.js +13 -12
- package/services/messaging/EmailQueueService.js +2 -1
- package/services/messaging/EmailService.js +12 -11
- package/services/messaging/EmailSuppressionService.js +5 -4
- package/services/messaging/EmailTemplatesService.js +6 -5
- package/services/messaging/SmsService.js +3 -2
- package/services/messaging/SmsTemplatesService.js +6 -5
- package/services/messaging/TenDlcBrandsService.js +11 -10
- package/services/messaging/TenDlcCampaignManagementService.js +14 -13
- package/services/messaging/TenDlcCampaignsService.js +2 -1
- package/services/messaging/TollFreeCampaignsService.js +13 -12
- package/services/notes.js +7 -6
- package/services/objects.js +97 -36
- package/services/permissions.js +34 -33
- package/services/phoneNumbers.js +28 -27
- package/services/portals.js +8 -7
- package/services/{inbox.js → recents.js} +9 -8
- package/services/recordTypes.js +12 -11
- package/services/search.js +2 -1
- package/services/sipEndpoints.js +8 -7
- package/services/storage.js +16 -15
- package/services/subscriptions.js +4 -3
- package/services/taskRouter/CCService.js +9 -8
- package/services/taskRouter/MetricsService.js +3 -2
- package/services/taskRouter/TaskService.js +13 -12
- package/services/taskRouter/WorkerService.js +9 -8
- package/services/triggers.js +9 -8
- package/services/verification.js +5 -4
- package/services/video.js +52 -51
- package/services/voice.js +13 -12
- package/services/workflows.js +22 -21
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { internalRequest } from '../base.js';
|
|
1
2
|
export class GoogleCalendarService {
|
|
2
3
|
constructor(sdk) {
|
|
3
4
|
this.sdk = sdk;
|
|
@@ -40,7 +41,7 @@ export class GoogleCalendarService {
|
|
|
40
41
|
body: webhookData,
|
|
41
42
|
};
|
|
42
43
|
|
|
43
|
-
const result = await this.sdk
|
|
44
|
+
const result = await internalRequest(this.sdk,
|
|
44
45
|
'/googleCalendar/webhook',
|
|
45
46
|
'POST',
|
|
46
47
|
params,
|
|
@@ -56,7 +57,7 @@ export class GoogleCalendarService {
|
|
|
56
57
|
},
|
|
57
58
|
);
|
|
58
59
|
|
|
59
|
-
const result = await this.sdk
|
|
60
|
+
const result = await internalRequest(this.sdk,
|
|
60
61
|
`/googleCalendar/webhook/${webhookId}`,
|
|
61
62
|
'DELETE',
|
|
62
63
|
);
|
|
@@ -64,12 +65,12 @@ export class GoogleCalendarService {
|
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
async listWebhooks() {
|
|
67
|
-
const result = await this.sdk
|
|
68
|
+
const result = await internalRequest(this.sdk, '/googleCalendar/webhooks', 'GET');
|
|
68
69
|
return result;
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
async getCalendarList() {
|
|
72
|
-
const result = await this.sdk
|
|
73
|
+
const result = await internalRequest(this.sdk, '/googleCalendar/calendars', 'GET');
|
|
73
74
|
return result;
|
|
74
75
|
}
|
|
75
76
|
|
|
@@ -97,7 +98,7 @@ export class GoogleCalendarService {
|
|
|
97
98
|
query: { calendarId, ...options },
|
|
98
99
|
};
|
|
99
100
|
|
|
100
|
-
const result = await this.sdk
|
|
101
|
+
const result = await internalRequest(this.sdk,
|
|
101
102
|
'/googleCalendar/events',
|
|
102
103
|
'GET',
|
|
103
104
|
params,
|
|
@@ -117,7 +118,7 @@ export class GoogleCalendarService {
|
|
|
117
118
|
body: changeData,
|
|
118
119
|
};
|
|
119
120
|
|
|
120
|
-
const result = await this.sdk
|
|
121
|
+
const result = await internalRequest(this.sdk,
|
|
121
122
|
'/googleCalendar/processChange',
|
|
122
123
|
'POST',
|
|
123
124
|
params,
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
223
|
+
const result = await internalRequest(this.sdk,
|
|
223
224
|
`/knowledgeBase/${knowledgeBaseId}/analytics/gaps`,
|
|
224
225
|
'GET',
|
|
225
226
|
params,
|
package/services/layouts.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
128
|
+
const result = await internalRequest(this.sdk,
|
|
128
129
|
'/login/forgotPassword',
|
|
129
130
|
'POST',
|
|
130
131
|
options,
|
package/services/lookup.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
246
|
+
const result = await internalRequest(this.sdk,
|
|
246
247
|
'/messaging/email/validate/domain',
|
|
247
248
|
'PUT',
|
|
248
249
|
options,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { internalRequest } from '../../base.js';
|
|
1
2
|
export class EmailMailboxesService {
|
|
2
3
|
constructor(sdk) {
|
|
3
4
|
this.sdk = sdk;
|
|
@@ -76,7 +77,7 @@ export class EmailMailboxesService {
|
|
|
76
77
|
ticketCreateEmailFrom: { type: 'string', required: false },
|
|
77
78
|
});
|
|
78
79
|
|
|
79
|
-
const result = await this.sdk
|
|
80
|
+
const result = await internalRequest(this.sdk, '/messaging/email/mailbox', 'POST', {
|
|
80
81
|
body: mailboxData,
|
|
81
82
|
});
|
|
82
83
|
return result;
|
|
@@ -154,7 +155,7 @@ export class EmailMailboxesService {
|
|
|
154
155
|
},
|
|
155
156
|
};
|
|
156
157
|
|
|
157
|
-
const result = await this.sdk
|
|
158
|
+
const result = await internalRequest(this.sdk,
|
|
158
159
|
'/messaging/email/mailbox',
|
|
159
160
|
'GET',
|
|
160
161
|
params,
|
|
@@ -189,7 +190,7 @@ export class EmailMailboxesService {
|
|
|
189
190
|
},
|
|
190
191
|
};
|
|
191
192
|
|
|
192
|
-
const result = await this.sdk
|
|
193
|
+
const result = await internalRequest(this.sdk,
|
|
193
194
|
`/messaging/email/mailbox/${id}`,
|
|
194
195
|
'GET',
|
|
195
196
|
params,
|
|
@@ -278,7 +279,7 @@ export class EmailMailboxesService {
|
|
|
278
279
|
},
|
|
279
280
|
);
|
|
280
281
|
|
|
281
|
-
const result = await this.sdk
|
|
282
|
+
const result = await internalRequest(this.sdk,
|
|
282
283
|
`/messaging/email/mailbox/${id}`,
|
|
283
284
|
'PUT',
|
|
284
285
|
{
|
|
@@ -303,7 +304,7 @@ export class EmailMailboxesService {
|
|
|
303
304
|
},
|
|
304
305
|
);
|
|
305
306
|
|
|
306
|
-
const result = await this.sdk
|
|
307
|
+
const result = await internalRequest(this.sdk,
|
|
307
308
|
`/messaging/email/mailbox/${id}`,
|
|
308
309
|
'DELETE',
|
|
309
310
|
);
|
|
@@ -361,7 +362,7 @@ export class EmailMailboxesService {
|
|
|
361
362
|
},
|
|
362
363
|
);
|
|
363
364
|
|
|
364
|
-
const result = await this.sdk
|
|
365
|
+
const result = await internalRequest(this.sdk,
|
|
365
366
|
`/messaging/email/mailbox/${mailboxId}/alias`,
|
|
366
367
|
'POST',
|
|
367
368
|
{
|
|
@@ -401,7 +402,7 @@ export class EmailMailboxesService {
|
|
|
401
402
|
},
|
|
402
403
|
);
|
|
403
404
|
|
|
404
|
-
const result = await this.sdk
|
|
405
|
+
const result = await internalRequest(this.sdk,
|
|
405
406
|
`/messaging/email/mailbox/alias/${aliasId}`,
|
|
406
407
|
'PUT',
|
|
407
408
|
{
|
|
@@ -426,7 +427,7 @@ export class EmailMailboxesService {
|
|
|
426
427
|
},
|
|
427
428
|
);
|
|
428
429
|
|
|
429
|
-
const result = await this.sdk
|
|
430
|
+
const result = await internalRequest(this.sdk,
|
|
430
431
|
`/messaging/email/mailbox/alias/${aliasId}`,
|
|
431
432
|
'DELETE',
|
|
432
433
|
);
|
|
@@ -449,7 +450,7 @@ export class EmailMailboxesService {
|
|
|
449
450
|
},
|
|
450
451
|
);
|
|
451
452
|
|
|
452
|
-
const result = await this.sdk
|
|
453
|
+
const result = await internalRequest(this.sdk,
|
|
453
454
|
`/messaging/email/mailbox/${mailboxId}/folders`,
|
|
454
455
|
'GET',
|
|
455
456
|
);
|
|
@@ -467,7 +468,7 @@ export class EmailMailboxesService {
|
|
|
467
468
|
);
|
|
468
469
|
const body = { name };
|
|
469
470
|
if (parent) body.parent = parent;
|
|
470
|
-
return this.sdk
|
|
471
|
+
return internalRequest(this.sdk,
|
|
471
472
|
`/messaging/email/mailbox/${mailboxId}/folders`,
|
|
472
473
|
'POST',
|
|
473
474
|
{ body },
|
|
@@ -483,7 +484,7 @@ export class EmailMailboxesService {
|
|
|
483
484
|
to: { type: 'string', required: true },
|
|
484
485
|
},
|
|
485
486
|
);
|
|
486
|
-
return this.sdk
|
|
487
|
+
return internalRequest(this.sdk,
|
|
487
488
|
`/messaging/email/mailbox/${mailboxId}/folders`,
|
|
488
489
|
'PUT',
|
|
489
490
|
{ body: { from, to } },
|
|
@@ -498,7 +499,7 @@ export class EmailMailboxesService {
|
|
|
498
499
|
name: { type: 'string', required: true },
|
|
499
500
|
},
|
|
500
501
|
);
|
|
501
|
-
return this.sdk
|
|
502
|
+
return internalRequest(this.sdk,
|
|
502
503
|
`/messaging/email/mailbox/${mailboxId}/folders`,
|
|
503
504
|
'DELETE',
|
|
504
505
|
{ query: { name }, body: { name } },
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { internalRequest } from '../../base.js';
|
|
1
2
|
export class EmailQueueService {
|
|
2
3
|
constructor(sdk) {
|
|
3
4
|
this.sdk = sdk;
|
|
@@ -30,7 +31,7 @@ export class EmailQueueService {
|
|
|
30
31
|
if (limit !== undefined) options.query.limit = limit;
|
|
31
32
|
if (status) options.query.status = status;
|
|
32
33
|
|
|
33
|
-
const result = await this.sdk
|
|
34
|
+
const result = await internalRequest(this.sdk,
|
|
34
35
|
'/messaging/email/queue',
|
|
35
36
|
'GET',
|
|
36
37
|
options,
|