@scaleway/sdk 1.13.0 → 1.15.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.
- package/dist/api/account/v2/api.gen.js +77 -60
- package/dist/api/applesilicon/v1alpha1/api.gen.js +175 -173
- package/dist/api/baremetal/v1/api.gen.js +434 -378
- package/dist/api/baremetal/v1/api.utils.js +19 -22
- package/dist/api/billing/v2alpha1/api.gen.js +21 -17
- package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
- package/dist/api/container/v1beta1/api.gen.js +384 -337
- package/dist/api/domain/v2beta1/api.gen.js +754 -668
- package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
- package/dist/api/function/v1beta1/api.gen.js +467 -407
- package/dist/api/iam/v1alpha1/api.gen.js +641 -557
- package/dist/api/instance/v1/api.gen.js +802 -677
- package/dist/api/instance/v1/api.utils.js +337 -325
- package/dist/api/instance/v1/marshalling.gen.js +2 -1
- package/dist/api/iot/v1/api.gen.js +508 -452
- package/dist/api/ipfs/index.js +2 -0
- package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
- package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
- package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
- package/dist/api/k8s/v1/api.gen.js +403 -342
- package/dist/api/k8s/v1/api.utils.js +7 -10
- package/dist/api/k8s/v1/marshalling.gen.js +19 -1
- package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
- package/dist/api/lb/v1/api.gen.js +1501 -1363
- package/dist/api/lb/v1/api.utils.js +71 -75
- package/dist/api/lb/v1/marshalling.gen.js +6 -0
- package/dist/api/marketplace/v1/api.gen.js +35 -32
- package/dist/api/marketplace/v2/api.gen.js +117 -102
- package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
- package/dist/api/rdb/v1/api.gen.js +897 -819
- package/dist/api/redis/v1/api.gen.js +358 -333
- package/dist/api/registry/v1/api.gen.js +211 -189
- package/dist/api/secret/v1alpha1/api.gen.js +265 -245
- package/dist/api/secret/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/tem/v1alpha1/api.gen.js +183 -156
- package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
- package/dist/api/test/v1/api.gen.js +116 -104
- package/dist/api/vpc/v1/api.gen.js +74 -65
- package/dist/api/vpc/v2/api.gen.js +200 -178
- package/dist/api/vpc/v2/marshalling.gen.js +2 -0
- package/dist/api/vpcgw/v1/api.gen.js +575 -501
- package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
- package/dist/index.cjs +738 -343
- package/dist/index.d.ts +2067 -1592
- package/dist/index.js +28 -26
- package/dist/internal/logger/console-logger.js +4 -5
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/scw-error.js +0 -1
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ import { API as API$1 } from '../../../scw/api.js';
|
|
|
3
3
|
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
4
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
5
|
import { EMAIL_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
-
import { marshalCreateEmailRequest, unmarshalCreateEmailResponse, unmarshalEmail, unmarshalListEmailsResponse, unmarshalStatistics, marshalCreateDomainRequest, unmarshalDomain, unmarshalListDomainsResponse } from './marshalling.gen.js';
|
|
6
|
+
import { marshalCreateEmailRequest, unmarshalCreateEmailResponse, unmarshalEmail, unmarshalListEmailsResponse, unmarshalStatistics, marshalCreateDomainRequest, unmarshalDomain, unmarshalListDomainsResponse, unmarshalDomainLastStatus } from './marshalling.gen.js';
|
|
7
7
|
|
|
8
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
9
9
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -13,190 +13,217 @@ const jsonContentHeaders = {
|
|
|
13
13
|
|
|
14
14
|
/** Transactional Email API. */
|
|
15
15
|
class API extends API$1 {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
16
|
+
/** Lists the available regions of the API. */
|
|
17
|
+
static LOCALITIES = ['fr-par'];
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Send an email. You must specify the `region`, the sender and the
|
|
21
|
+
* recipient's information and the `project_id` to send an email from a
|
|
22
|
+
* checked domain. The subject of the email must contain at least 6
|
|
23
|
+
* characters.
|
|
24
|
+
*
|
|
25
|
+
* @param request - The request {@link CreateEmailRequest}
|
|
26
|
+
* @returns A Promise of CreateEmailResponse
|
|
27
|
+
*/
|
|
28
|
+
createEmail = request => this.client.fetch({
|
|
29
|
+
body: JSON.stringify(marshalCreateEmailRequest(request, this.client.settings)),
|
|
30
|
+
headers: jsonContentHeaders,
|
|
31
|
+
method: 'POST',
|
|
32
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/emails`
|
|
33
|
+
}, unmarshalCreateEmailResponse);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get an email. Retrieve information about a specific email using the
|
|
37
|
+
* `email_id` and `region` parameters.
|
|
38
|
+
*
|
|
39
|
+
* @param request - The request {@link GetEmailRequest}
|
|
40
|
+
* @returns A Promise of Email
|
|
41
|
+
*/
|
|
42
|
+
getEmail = request => this.client.fetch({
|
|
43
|
+
method: 'GET',
|
|
44
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/emails/${validatePathParam('emailId', request.emailId)}`
|
|
45
|
+
}, unmarshalEmail);
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Waits for {@link Email} to be in a final state.
|
|
49
|
+
*
|
|
50
|
+
* @param request - The request {@link GetEmailRequest}
|
|
51
|
+
* @param options - The waiting options
|
|
52
|
+
* @returns A Promise of Email
|
|
53
|
+
*/
|
|
54
|
+
waitForEmail = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!EMAIL_TRANSIENT_STATUSES.includes(res.status))), this.getEmail, request, options);
|
|
55
|
+
pageOfListEmails = (() => {
|
|
56
|
+
var _this = this;
|
|
57
|
+
return function (request) {
|
|
55
58
|
if (request === void 0) {
|
|
56
59
|
request = {};
|
|
57
60
|
}
|
|
58
61
|
return _this.client.fetch({
|
|
59
62
|
method: 'GET',
|
|
60
63
|
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/emails`,
|
|
61
|
-
urlParams: urlParams(['domain_id', request.domainId], ['mail_from', request.mailFrom], ['mail_rcpt', request.mailRcpt], ['mail_to', request.mailTo], ['message_id', request.messageId], ['order_by', request.orderBy ?? 'created_at_desc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['since', request.since], ['statuses', request.statuses], ['subject', request.subject], ['until', request.until])
|
|
64
|
+
urlParams: urlParams(['domain_id', request.domainId], ['mail_from', request.mailFrom], ['mail_rcpt', request.mailRcpt], ['mail_to', request.mailTo], ['message_id', request.messageId], ['order_by', request.orderBy ?? 'created_at_desc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['search', request.search], ['since', request.since], ['statuses', request.statuses], ['subject', request.subject], ['until', request.until])
|
|
62
65
|
}, unmarshalListEmailsResponse);
|
|
63
66
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
* @param request - The request {@link ListEmailsRequest}
|
|
77
|
-
* @returns A Promise of ListEmailsResponse
|
|
78
|
-
*/
|
|
79
|
-
this.listEmails = function (request) {
|
|
67
|
+
})();
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* List emails. Retrieve the list of emails sent from a specific domain or for
|
|
71
|
+
* a specific Project or Organization. You must specify the `region`.
|
|
72
|
+
*
|
|
73
|
+
* @param request - The request {@link ListEmailsRequest}
|
|
74
|
+
* @returns A Promise of ListEmailsResponse
|
|
75
|
+
*/
|
|
76
|
+
listEmails = (() => {
|
|
77
|
+
var _this2 = this;
|
|
78
|
+
return function (request) {
|
|
80
79
|
if (request === void 0) {
|
|
81
80
|
request = {};
|
|
82
81
|
}
|
|
83
|
-
return enrichForPagination('emails',
|
|
82
|
+
return enrichForPagination('emails', _this2.pageOfListEmails, request);
|
|
84
83
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
})();
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Email statuses. Get information on your emails' statuses.
|
|
88
|
+
*
|
|
89
|
+
* @param request - The request {@link GetStatisticsRequest}
|
|
90
|
+
* @returns A Promise of Statistics
|
|
91
|
+
*/
|
|
92
|
+
getStatistics = (() => {
|
|
93
|
+
var _this3 = this;
|
|
94
|
+
return function (request) {
|
|
92
95
|
if (request === void 0) {
|
|
93
96
|
request = {};
|
|
94
97
|
}
|
|
95
|
-
return
|
|
98
|
+
return _this3.client.fetch({
|
|
96
99
|
method: 'GET',
|
|
97
|
-
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ??
|
|
100
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/statistics`,
|
|
98
101
|
urlParams: urlParams(['domain_id', request.domainId], ['mail_from', request.mailFrom], ['project_id', request.projectId], ['since', request.since], ['until', request.until])
|
|
99
102
|
}, unmarshalStatistics);
|
|
100
103
|
};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
104
|
+
})();
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Cancel an email. You can cancel the sending of an email if it has not been
|
|
108
|
+
* sent yet. You must specify the `region` and the `email_id` of the email you
|
|
109
|
+
* want to cancel.
|
|
110
|
+
*
|
|
111
|
+
* @param request - The request {@link CancelEmailRequest}
|
|
112
|
+
* @returns A Promise of Email
|
|
113
|
+
*/
|
|
114
|
+
cancelEmail = request => this.client.fetch({
|
|
115
|
+
body: '{}',
|
|
116
|
+
headers: jsonContentHeaders,
|
|
117
|
+
method: 'POST',
|
|
118
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/emails/${validatePathParam('emailId', request.emailId)}/cancel`
|
|
119
|
+
}, unmarshalEmail);
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Register a domain in a project. You must specify the `region`, `project_id`
|
|
123
|
+
* and `domain_name` to register a domain in a specific Project.
|
|
124
|
+
*
|
|
125
|
+
* @param request - The request {@link CreateDomainRequest}
|
|
126
|
+
* @returns A Promise of Domain
|
|
127
|
+
*/
|
|
128
|
+
createDomain = request => this.client.fetch({
|
|
129
|
+
body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
|
|
130
|
+
headers: jsonContentHeaders,
|
|
131
|
+
method: 'POST',
|
|
132
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`
|
|
133
|
+
}, unmarshalDomain);
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Get information about a domain. Retrieve information about a specific
|
|
137
|
+
* domain using the `region` and `domain_id` parameters.
|
|
138
|
+
*
|
|
139
|
+
* @param request - The request {@link GetDomainRequest}
|
|
140
|
+
* @returns A Promise of Domain
|
|
141
|
+
*/
|
|
142
|
+
getDomain = request => this.client.fetch({
|
|
143
|
+
method: 'GET',
|
|
144
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
|
|
145
|
+
}, unmarshalDomain);
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Waits for {@link Domain} to be in a final state.
|
|
149
|
+
*
|
|
150
|
+
* @param request - The request {@link GetDomainRequest}
|
|
151
|
+
* @param options - The waiting options
|
|
152
|
+
* @returns A Promise of Domain
|
|
153
|
+
*/
|
|
154
|
+
waitForDomain = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
155
|
+
pageOfListDomains = (() => {
|
|
156
|
+
var _this4 = this;
|
|
157
|
+
return function (request) {
|
|
148
158
|
if (request === void 0) {
|
|
149
159
|
request = {};
|
|
150
160
|
}
|
|
151
|
-
return
|
|
161
|
+
return _this4.client.fetch({
|
|
152
162
|
method: 'GET',
|
|
153
|
-
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ??
|
|
154
|
-
urlParams: urlParams(['name', request.name], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ??
|
|
163
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/domains`,
|
|
164
|
+
urlParams: urlParams(['name', request.name], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize], ['project_id', request.projectId], ['status', request.status])
|
|
155
165
|
}, unmarshalListDomainsResponse);
|
|
156
166
|
};
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
167
|
+
})();
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* List domains. Retrieve domains in a specific project or in a specific
|
|
171
|
+
* Organization using the `region` parameter.
|
|
172
|
+
*
|
|
173
|
+
* @param request - The request {@link ListDomainsRequest}
|
|
174
|
+
* @returns A Promise of ListDomainsResponse
|
|
175
|
+
*/
|
|
176
|
+
listDomains = (() => {
|
|
177
|
+
var _this5 = this;
|
|
178
|
+
return function (request) {
|
|
165
179
|
if (request === void 0) {
|
|
166
180
|
request = {};
|
|
167
181
|
}
|
|
168
|
-
return enrichForPagination('domains',
|
|
182
|
+
return enrichForPagination('domains', _this5.pageOfListDomains, request);
|
|
169
183
|
};
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
184
|
+
})();
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Delete a domain. You must specify the domain you want to delete by the
|
|
188
|
+
* `region` and `domain_id`. Deleting a domain is permanent and cannot be
|
|
189
|
+
* undone.
|
|
190
|
+
*
|
|
191
|
+
* @param request - The request {@link RevokeDomainRequest}
|
|
192
|
+
* @returns A Promise of Domain
|
|
193
|
+
*/
|
|
194
|
+
revokeDomain = request => this.client.fetch({
|
|
195
|
+
body: '{}',
|
|
196
|
+
headers: jsonContentHeaders,
|
|
197
|
+
method: 'POST',
|
|
198
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}/revoke`
|
|
199
|
+
}, unmarshalDomain);
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Domain DNS check. Perform an immediate DNS check of a domain using the
|
|
203
|
+
* `region` and `domain_id` parameters.
|
|
204
|
+
*
|
|
205
|
+
* @param request - The request {@link CheckDomainRequest}
|
|
206
|
+
* @returns A Promise of Domain
|
|
207
|
+
*/
|
|
208
|
+
checkDomain = request => this.client.fetch({
|
|
209
|
+
body: '{}',
|
|
210
|
+
headers: jsonContentHeaders,
|
|
211
|
+
method: 'POST',
|
|
212
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}/check`
|
|
213
|
+
}, unmarshalDomain);
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Display SPF and DKIM records status and potential errors. Display SPF and
|
|
217
|
+
* DKIM records status and potential errors, including the found records to
|
|
218
|
+
* make debugging easier.
|
|
219
|
+
*
|
|
220
|
+
* @param request - The request {@link GetDomainLastStatusRequest}
|
|
221
|
+
* @returns A Promise of DomainLastStatus
|
|
222
|
+
*/
|
|
223
|
+
getDomainLastStatus = request => this.client.fetch({
|
|
224
|
+
method: 'GET',
|
|
225
|
+
path: `/transactional-email/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}/verification`
|
|
226
|
+
}, unmarshalDomainLastStatus);
|
|
199
227
|
}
|
|
200
|
-
API.LOCALITIES = ['fr-par'];
|
|
201
228
|
|
|
202
229
|
export { API };
|
|
@@ -46,6 +46,26 @@ const unmarshalDomain = data => {
|
|
|
46
46
|
status: data.status
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
|
+
const unmarshalDomainLastStatusDkimRecord = data => {
|
|
50
|
+
if (!isJSONObject(data)) {
|
|
51
|
+
throw new TypeError(`Unmarshalling the type 'DomainLastStatusDkimRecord' failed as data isn't a dictionary.`);
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
error: data.error,
|
|
55
|
+
lastValidAt: unmarshalDate(data.last_valid_at),
|
|
56
|
+
status: data.status
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
const unmarshalDomainLastStatusSpfRecord = data => {
|
|
60
|
+
if (!isJSONObject(data)) {
|
|
61
|
+
throw new TypeError(`Unmarshalling the type 'DomainLastStatusSpfRecord' failed as data isn't a dictionary.`);
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
error: data.error,
|
|
65
|
+
lastValidAt: unmarshalDate(data.last_valid_at),
|
|
66
|
+
status: data.status
|
|
67
|
+
};
|
|
68
|
+
};
|
|
49
69
|
const unmarshalEmail = data => {
|
|
50
70
|
if (!isJSONObject(data)) {
|
|
51
71
|
throw new TypeError(`Unmarshalling the type 'Email' failed as data isn't a dictionary.`);
|
|
@@ -75,6 +95,17 @@ const unmarshalCreateEmailResponse = data => {
|
|
|
75
95
|
emails: unmarshalArrayOfObject(data.emails, unmarshalEmail)
|
|
76
96
|
};
|
|
77
97
|
};
|
|
98
|
+
const unmarshalDomainLastStatus = data => {
|
|
99
|
+
if (!isJSONObject(data)) {
|
|
100
|
+
throw new TypeError(`Unmarshalling the type 'DomainLastStatus' failed as data isn't a dictionary.`);
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
dkimRecord: data.dkim_record ? unmarshalDomainLastStatusDkimRecord(data.dkim_record) : undefined,
|
|
104
|
+
domainId: data.domain_id,
|
|
105
|
+
domainName: data.domain_name,
|
|
106
|
+
spfRecord: data.spf_record ? unmarshalDomainLastStatusSpfRecord(data.spf_record) : undefined
|
|
107
|
+
};
|
|
108
|
+
};
|
|
78
109
|
const unmarshalListDomainsResponse = data => {
|
|
79
110
|
if (!isJSONObject(data)) {
|
|
80
111
|
throw new TypeError(`Unmarshalling the type 'ListDomainsResponse' failed as data isn't a dictionary.`);
|
|
@@ -133,4 +164,4 @@ const marshalCreateEmailRequest = (request, defaults) => ({
|
|
|
133
164
|
to: request.to ? request.to.map(elt => marshalCreateEmailRequestAddress(elt)) : undefined
|
|
134
165
|
});
|
|
135
166
|
|
|
136
|
-
export { marshalCreateDomainRequest, marshalCreateEmailRequest, unmarshalCreateEmailResponse, unmarshalDomain, unmarshalEmail, unmarshalListDomainsResponse, unmarshalListEmailsResponse, unmarshalStatistics };
|
|
167
|
+
export { marshalCreateDomainRequest, marshalCreateEmailRequest, unmarshalCreateEmailResponse, unmarshalDomain, unmarshalDomainLastStatus, unmarshalEmail, unmarshalListDomainsResponse, unmarshalListEmailsResponse, unmarshalStatistics };
|