@scaleway/sdk-tem 2.2.0 → 2.3.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/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +2 -4
- package/dist/v1alpha1/api.gen.js +347 -537
- package/dist/v1alpha1/content.gen.js +4 -8
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/index.gen.js +36 -34
- package/dist/v1alpha1/marshalling.gen.js +353 -546
- package/dist/v1alpha1/validation-rules.gen.js +90 -124
- package/package.json +4 -4
|
@@ -1,600 +1,407 @@
|
|
|
1
1
|
import { isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
message: data.message,
|
|
11
|
-
rank: data.rank,
|
|
12
|
-
triedAt: unmarshalDate(data.tried_at)
|
|
13
|
-
};
|
|
2
|
+
var unmarshalEmailTry = (data) => {
|
|
3
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EmailTry' failed as data isn't a dictionary.`);
|
|
4
|
+
return {
|
|
5
|
+
code: data.code,
|
|
6
|
+
message: data.message,
|
|
7
|
+
rank: data.rank,
|
|
8
|
+
triedAt: unmarshalDate(data.tried_at)
|
|
9
|
+
};
|
|
14
10
|
};
|
|
15
11
|
const unmarshalEmail = (data) => {
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
dkim: data.dkim ? unmarshalDomainRecordsDKIM(data.dkim) : void 0,
|
|
91
|
-
dmarc: data.dmarc ? unmarshalDomainRecordsDMARC(data.dmarc) : void 0,
|
|
92
|
-
mx: data.mx ? unmarshalDomainRecordsMX(data.mx) : void 0,
|
|
93
|
-
spf: data.spf ? unmarshalDomainRecordsSPF(data.spf) : void 0
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
const unmarshalDomainReputation = (data) => {
|
|
97
|
-
if (!isJSONObject(data)) {
|
|
98
|
-
throw new TypeError(
|
|
99
|
-
`Unmarshalling the type 'DomainReputation' failed as data isn't a dictionary.`
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
return {
|
|
103
|
-
previousScore: data.previous_score,
|
|
104
|
-
previousScoredAt: unmarshalDate(data.previous_scored_at),
|
|
105
|
-
score: data.score,
|
|
106
|
-
scoredAt: unmarshalDate(data.scored_at),
|
|
107
|
-
status: data.status
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
const unmarshalDomainStatistics = (data) => {
|
|
111
|
-
if (!isJSONObject(data)) {
|
|
112
|
-
throw new TypeError(
|
|
113
|
-
`Unmarshalling the type 'DomainStatistics' failed as data isn't a dictionary.`
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
return {
|
|
117
|
-
canceledCount: data.canceled_count,
|
|
118
|
-
failedCount: data.failed_count,
|
|
119
|
-
sentCount: data.sent_count,
|
|
120
|
-
totalCount: data.total_count
|
|
121
|
-
};
|
|
12
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Email' failed as data isn't a dictionary.`);
|
|
13
|
+
return {
|
|
14
|
+
createdAt: unmarshalDate(data.created_at),
|
|
15
|
+
flags: data.flags,
|
|
16
|
+
id: data.id,
|
|
17
|
+
lastTries: unmarshalArrayOfObject(data.last_tries, unmarshalEmailTry),
|
|
18
|
+
mailFrom: data.mail_from,
|
|
19
|
+
mailRcpt: data.mail_rcpt,
|
|
20
|
+
messageId: data.message_id,
|
|
21
|
+
projectId: data.project_id,
|
|
22
|
+
rcptTo: data.rcpt_to,
|
|
23
|
+
rcptType: data.rcpt_type,
|
|
24
|
+
status: data.status,
|
|
25
|
+
statusDetails: data.status_details,
|
|
26
|
+
subject: data.subject,
|
|
27
|
+
tryCount: data.try_count,
|
|
28
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
var unmarshalDomainRecordsDKIM = (data) => {
|
|
32
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRecordsDKIM' failed as data isn't a dictionary.`);
|
|
33
|
+
return {
|
|
34
|
+
name: data.name,
|
|
35
|
+
value: data.value
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
var unmarshalDomainRecordsDMARC = (data) => {
|
|
39
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRecordsDMARC' failed as data isn't a dictionary.`);
|
|
40
|
+
return {
|
|
41
|
+
name: data.name,
|
|
42
|
+
value: data.value
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
var unmarshalDomainRecordsMX = (data) => {
|
|
46
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRecordsMX' failed as data isn't a dictionary.`);
|
|
47
|
+
return {
|
|
48
|
+
name: data.name,
|
|
49
|
+
value: data.value
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
var unmarshalDomainRecordsSPF = (data) => {
|
|
53
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRecordsSPF' failed as data isn't a dictionary.`);
|
|
54
|
+
return {
|
|
55
|
+
name: data.name,
|
|
56
|
+
value: data.value
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
var unmarshalDomainRecords = (data) => {
|
|
60
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRecords' failed as data isn't a dictionary.`);
|
|
61
|
+
return {
|
|
62
|
+
dkim: data.dkim ? unmarshalDomainRecordsDKIM(data.dkim) : void 0,
|
|
63
|
+
dmarc: data.dmarc ? unmarshalDomainRecordsDMARC(data.dmarc) : void 0,
|
|
64
|
+
mx: data.mx ? unmarshalDomainRecordsMX(data.mx) : void 0,
|
|
65
|
+
spf: data.spf ? unmarshalDomainRecordsSPF(data.spf) : void 0
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
var unmarshalDomainReputation = (data) => {
|
|
69
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainReputation' failed as data isn't a dictionary.`);
|
|
70
|
+
return {
|
|
71
|
+
previousScore: data.previous_score,
|
|
72
|
+
previousScoredAt: unmarshalDate(data.previous_scored_at),
|
|
73
|
+
score: data.score,
|
|
74
|
+
scoredAt: unmarshalDate(data.scored_at),
|
|
75
|
+
status: data.status
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
var unmarshalDomainStatistics = (data) => {
|
|
79
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainStatistics' failed as data isn't a dictionary.`);
|
|
80
|
+
return {
|
|
81
|
+
canceledCount: data.canceled_count,
|
|
82
|
+
failedCount: data.failed_count,
|
|
83
|
+
sentCount: data.sent_count,
|
|
84
|
+
totalCount: data.total_count
|
|
85
|
+
};
|
|
122
86
|
};
|
|
123
87
|
const unmarshalDomain = (data) => {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
spfConfig: data.spf_config,
|
|
145
|
-
statistics: data.statistics ? unmarshalDomainStatistics(data.statistics) : void 0,
|
|
146
|
-
status: data.status
|
|
147
|
-
};
|
|
88
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`);
|
|
89
|
+
return {
|
|
90
|
+
autoconfig: data.autoconfig,
|
|
91
|
+
createdAt: unmarshalDate(data.created_at),
|
|
92
|
+
dkimConfig: data.dkim_config,
|
|
93
|
+
id: data.id,
|
|
94
|
+
lastError: data.last_error,
|
|
95
|
+
lastValidAt: unmarshalDate(data.last_valid_at),
|
|
96
|
+
name: data.name,
|
|
97
|
+
nextCheckAt: unmarshalDate(data.next_check_at),
|
|
98
|
+
organizationId: data.organization_id,
|
|
99
|
+
projectId: data.project_id,
|
|
100
|
+
records: data.records ? unmarshalDomainRecords(data.records) : void 0,
|
|
101
|
+
region: data.region,
|
|
102
|
+
reputation: data.reputation ? unmarshalDomainReputation(data.reputation) : void 0,
|
|
103
|
+
revokedAt: unmarshalDate(data.revoked_at),
|
|
104
|
+
spfConfig: data.spf_config,
|
|
105
|
+
statistics: data.statistics ? unmarshalDomainStatistics(data.statistics) : void 0,
|
|
106
|
+
status: data.status
|
|
107
|
+
};
|
|
148
108
|
};
|
|
149
109
|
const unmarshalOfferSubscription = (data) => {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
projectId: data.project_id,
|
|
165
|
-
sla: data.sla,
|
|
166
|
-
subscribedAt: unmarshalDate(data.subscribed_at)
|
|
167
|
-
};
|
|
110
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferSubscription' failed as data isn't a dictionary.`);
|
|
111
|
+
return {
|
|
112
|
+
cancellationAvailableAt: unmarshalDate(data.cancellation_available_at),
|
|
113
|
+
includedMonthlyEmails: data.included_monthly_emails,
|
|
114
|
+
maxCustomBlocklistsPerDomain: data.max_custom_blocklists_per_domain,
|
|
115
|
+
maxDedicatedIps: data.max_dedicated_ips,
|
|
116
|
+
maxDomains: data.max_domains,
|
|
117
|
+
maxWebhooksPerDomain: data.max_webhooks_per_domain,
|
|
118
|
+
offerName: data.offer_name,
|
|
119
|
+
organizationId: data.organization_id,
|
|
120
|
+
projectId: data.project_id,
|
|
121
|
+
sla: data.sla,
|
|
122
|
+
subscribedAt: unmarshalDate(data.subscribed_at)
|
|
123
|
+
};
|
|
168
124
|
};
|
|
169
125
|
const unmarshalWebhook = (data) => {
|
|
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
|
-
domainId: data.domain_id,
|
|
197
|
-
email: data.email,
|
|
198
|
-
endsAt: unmarshalDate(data.ends_at),
|
|
199
|
-
id: data.id,
|
|
200
|
-
reason: data.reason,
|
|
201
|
-
type: data.type,
|
|
202
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
203
|
-
};
|
|
126
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Webhook' failed as data isn't a dictionary.`);
|
|
127
|
+
return {
|
|
128
|
+
createdAt: unmarshalDate(data.created_at),
|
|
129
|
+
domainId: data.domain_id,
|
|
130
|
+
eventTypes: data.event_types,
|
|
131
|
+
id: data.id,
|
|
132
|
+
name: data.name,
|
|
133
|
+
organizationId: data.organization_id,
|
|
134
|
+
projectId: data.project_id,
|
|
135
|
+
snsArn: data.sns_arn,
|
|
136
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
var unmarshalBlocklist = (data) => {
|
|
140
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Blocklist' failed as data isn't a dictionary.`);
|
|
141
|
+
return {
|
|
142
|
+
createdAt: unmarshalDate(data.created_at),
|
|
143
|
+
custom: data.custom,
|
|
144
|
+
domainId: data.domain_id,
|
|
145
|
+
email: data.email,
|
|
146
|
+
endsAt: unmarshalDate(data.ends_at),
|
|
147
|
+
id: data.id,
|
|
148
|
+
reason: data.reason,
|
|
149
|
+
type: data.type,
|
|
150
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
151
|
+
};
|
|
204
152
|
};
|
|
205
153
|
const unmarshalBulkCreateBlocklistsResponse = (data) => {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
`Unmarshalling the type 'BulkCreateBlocklistsResponse' failed as data isn't a dictionary.`
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
return {
|
|
212
|
-
blocklists: unmarshalArrayOfObject(data.blocklists, unmarshalBlocklist)
|
|
213
|
-
};
|
|
154
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BulkCreateBlocklistsResponse' failed as data isn't a dictionary.`);
|
|
155
|
+
return { blocklists: unmarshalArrayOfObject(data.blocklists, unmarshalBlocklist) };
|
|
214
156
|
};
|
|
215
157
|
const unmarshalCreateEmailResponse = (data) => {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
status: data.status
|
|
259
|
-
};
|
|
260
|
-
};
|
|
261
|
-
const unmarshalDomainLastStatusMXRecord = (data) => {
|
|
262
|
-
if (!isJSONObject(data)) {
|
|
263
|
-
throw new TypeError(
|
|
264
|
-
`Unmarshalling the type 'DomainLastStatusMXRecord' failed as data isn't a dictionary.`
|
|
265
|
-
);
|
|
266
|
-
}
|
|
267
|
-
return {
|
|
268
|
-
error: data.error,
|
|
269
|
-
lastValidAt: unmarshalDate(data.last_valid_at),
|
|
270
|
-
status: data.status
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
|
-
const unmarshalDomainLastStatusSpfRecord = (data) => {
|
|
274
|
-
if (!isJSONObject(data)) {
|
|
275
|
-
throw new TypeError(
|
|
276
|
-
`Unmarshalling the type 'DomainLastStatusSpfRecord' failed as data isn't a dictionary.`
|
|
277
|
-
);
|
|
278
|
-
}
|
|
279
|
-
return {
|
|
280
|
-
error: data.error,
|
|
281
|
-
lastValidAt: unmarshalDate(data.last_valid_at),
|
|
282
|
-
status: data.status
|
|
283
|
-
};
|
|
158
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CreateEmailResponse' failed as data isn't a dictionary.`);
|
|
159
|
+
return { emails: unmarshalArrayOfObject(data.emails, unmarshalEmail) };
|
|
160
|
+
};
|
|
161
|
+
var unmarshalDomainLastStatusAutoconfigState = (data) => {
|
|
162
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainLastStatusAutoconfigState' failed as data isn't a dictionary.`);
|
|
163
|
+
return {
|
|
164
|
+
autoconfigurable: data.autoconfigurable,
|
|
165
|
+
enabled: data.enabled,
|
|
166
|
+
reason: data.reason ? data.reason : void 0
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
var unmarshalDomainLastStatusDkimRecord = (data) => {
|
|
170
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainLastStatusDkimRecord' failed as data isn't a dictionary.`);
|
|
171
|
+
return {
|
|
172
|
+
error: data.error,
|
|
173
|
+
lastValidAt: unmarshalDate(data.last_valid_at),
|
|
174
|
+
status: data.status
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
var unmarshalDomainLastStatusDmarcRecord = (data) => {
|
|
178
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainLastStatusDmarcRecord' failed as data isn't a dictionary.`);
|
|
179
|
+
return {
|
|
180
|
+
error: data.error,
|
|
181
|
+
lastValidAt: unmarshalDate(data.last_valid_at),
|
|
182
|
+
status: data.status
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
var unmarshalDomainLastStatusMXRecord = (data) => {
|
|
186
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainLastStatusMXRecord' failed as data isn't a dictionary.`);
|
|
187
|
+
return {
|
|
188
|
+
error: data.error,
|
|
189
|
+
lastValidAt: unmarshalDate(data.last_valid_at),
|
|
190
|
+
status: data.status
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
var unmarshalDomainLastStatusSpfRecord = (data) => {
|
|
194
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainLastStatusSpfRecord' failed as data isn't a dictionary.`);
|
|
195
|
+
return {
|
|
196
|
+
error: data.error,
|
|
197
|
+
lastValidAt: unmarshalDate(data.last_valid_at),
|
|
198
|
+
status: data.status
|
|
199
|
+
};
|
|
284
200
|
};
|
|
285
201
|
const unmarshalDomainLastStatus = (data) => {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
domainName: data.domain_name,
|
|
297
|
-
mxRecord: data.mx_record ? unmarshalDomainLastStatusMXRecord(data.mx_record) : void 0,
|
|
298
|
-
spfRecord: data.spf_record ? unmarshalDomainLastStatusSpfRecord(data.spf_record) : void 0
|
|
299
|
-
};
|
|
202
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainLastStatus' failed as data isn't a dictionary.`);
|
|
203
|
+
return {
|
|
204
|
+
autoconfigState: data.autoconfig_state ? unmarshalDomainLastStatusAutoconfigState(data.autoconfig_state) : void 0,
|
|
205
|
+
dkimRecord: data.dkim_record ? unmarshalDomainLastStatusDkimRecord(data.dkim_record) : void 0,
|
|
206
|
+
dmarcRecord: data.dmarc_record ? unmarshalDomainLastStatusDmarcRecord(data.dmarc_record) : void 0,
|
|
207
|
+
domainId: data.domain_id,
|
|
208
|
+
domainName: data.domain_name,
|
|
209
|
+
mxRecord: data.mx_record ? unmarshalDomainLastStatusMXRecord(data.mx_record) : void 0,
|
|
210
|
+
spfRecord: data.spf_record ? unmarshalDomainLastStatusSpfRecord(data.spf_record) : void 0
|
|
211
|
+
};
|
|
300
212
|
};
|
|
301
213
|
const unmarshalListBlocklistsResponse = (data) => {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
return {
|
|
308
|
-
blocklists: unmarshalArrayOfObject(data.blocklists, unmarshalBlocklist),
|
|
309
|
-
totalCount: data.total_count
|
|
310
|
-
};
|
|
214
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListBlocklistsResponse' failed as data isn't a dictionary.`);
|
|
215
|
+
return {
|
|
216
|
+
blocklists: unmarshalArrayOfObject(data.blocklists, unmarshalBlocklist),
|
|
217
|
+
totalCount: data.total_count
|
|
218
|
+
};
|
|
311
219
|
};
|
|
312
220
|
const unmarshalListDomainsResponse = (data) => {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
return {
|
|
319
|
-
domains: unmarshalArrayOfObject(data.domains, unmarshalDomain),
|
|
320
|
-
totalCount: data.total_count
|
|
321
|
-
};
|
|
221
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDomainsResponse' failed as data isn't a dictionary.`);
|
|
222
|
+
return {
|
|
223
|
+
domains: unmarshalArrayOfObject(data.domains, unmarshalDomain),
|
|
224
|
+
totalCount: data.total_count
|
|
225
|
+
};
|
|
322
226
|
};
|
|
323
227
|
const unmarshalListEmailsResponse = (data) => {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
return {
|
|
330
|
-
emails: unmarshalArrayOfObject(data.emails, unmarshalEmail),
|
|
331
|
-
totalCount: data.total_count
|
|
332
|
-
};
|
|
228
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListEmailsResponse' failed as data isn't a dictionary.`);
|
|
229
|
+
return {
|
|
230
|
+
emails: unmarshalArrayOfObject(data.emails, unmarshalEmail),
|
|
231
|
+
totalCount: data.total_count
|
|
232
|
+
};
|
|
333
233
|
};
|
|
334
234
|
const unmarshalListOfferSubscriptionsResponse = (data) => {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
return {
|
|
355
|
-
commitmentPeriod: data.commitment_period,
|
|
356
|
-
createdAt: unmarshalDate(data.created_at),
|
|
357
|
-
includedMonthlyEmails: data.included_monthly_emails,
|
|
358
|
-
maxCustomBlocklistsPerDomain: data.max_custom_blocklists_per_domain,
|
|
359
|
-
maxDedicatedIps: data.max_dedicated_ips,
|
|
360
|
-
maxDomains: data.max_domains,
|
|
361
|
-
maxWebhooksPerDomain: data.max_webhooks_per_domain,
|
|
362
|
-
name: data.name,
|
|
363
|
-
sla: data.sla
|
|
364
|
-
};
|
|
235
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOfferSubscriptionsResponse' failed as data isn't a dictionary.`);
|
|
236
|
+
return {
|
|
237
|
+
offerSubscriptions: unmarshalArrayOfObject(data.offer_subscriptions, unmarshalOfferSubscription),
|
|
238
|
+
totalCount: data.total_count
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
var unmarshalOffer = (data) => {
|
|
242
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Offer' failed as data isn't a dictionary.`);
|
|
243
|
+
return {
|
|
244
|
+
commitmentPeriod: data.commitment_period,
|
|
245
|
+
createdAt: unmarshalDate(data.created_at),
|
|
246
|
+
includedMonthlyEmails: data.included_monthly_emails,
|
|
247
|
+
maxCustomBlocklistsPerDomain: data.max_custom_blocklists_per_domain,
|
|
248
|
+
maxDedicatedIps: data.max_dedicated_ips,
|
|
249
|
+
maxDomains: data.max_domains,
|
|
250
|
+
maxWebhooksPerDomain: data.max_webhooks_per_domain,
|
|
251
|
+
name: data.name,
|
|
252
|
+
sla: data.sla
|
|
253
|
+
};
|
|
365
254
|
};
|
|
366
255
|
const unmarshalListOffersResponse = (data) => {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
return {
|
|
384
|
-
details: data.details,
|
|
385
|
-
ips: data.ips,
|
|
386
|
-
projectId: data.project_id,
|
|
387
|
-
reverse: data.reverse,
|
|
388
|
-
status: data.status,
|
|
389
|
-
zone: data.zone
|
|
390
|
-
};
|
|
256
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`);
|
|
257
|
+
return {
|
|
258
|
+
offers: unmarshalArrayOfObject(data.offers, unmarshalOffer),
|
|
259
|
+
totalCount: data.total_count
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
var unmarshalPool = (data) => {
|
|
263
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Pool' failed as data isn't a dictionary.`);
|
|
264
|
+
return {
|
|
265
|
+
details: data.details,
|
|
266
|
+
ips: data.ips,
|
|
267
|
+
projectId: data.project_id,
|
|
268
|
+
reverse: data.reverse,
|
|
269
|
+
status: data.status,
|
|
270
|
+
zone: data.zone
|
|
271
|
+
};
|
|
391
272
|
};
|
|
392
273
|
const unmarshalListPoolsResponse = (data) => {
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
id: data.id,
|
|
415
|
-
organizationId: data.organization_id,
|
|
416
|
-
projectId: data.project_id,
|
|
417
|
-
status: data.status,
|
|
418
|
-
type: data.type,
|
|
419
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
420
|
-
webhookId: data.webhook_id
|
|
421
|
-
};
|
|
274
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPoolsResponse' failed as data isn't a dictionary.`);
|
|
275
|
+
return {
|
|
276
|
+
pools: unmarshalArrayOfObject(data.pools, unmarshalPool),
|
|
277
|
+
totalCount: data.total_count
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
var unmarshalWebhookEvent = (data) => {
|
|
281
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'WebhookEvent' failed as data isn't a dictionary.`);
|
|
282
|
+
return {
|
|
283
|
+
createdAt: unmarshalDate(data.created_at),
|
|
284
|
+
data: data.data,
|
|
285
|
+
domainId: data.domain_id,
|
|
286
|
+
emailId: data.email_id,
|
|
287
|
+
id: data.id,
|
|
288
|
+
organizationId: data.organization_id,
|
|
289
|
+
projectId: data.project_id,
|
|
290
|
+
status: data.status,
|
|
291
|
+
type: data.type,
|
|
292
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
293
|
+
webhookId: data.webhook_id
|
|
294
|
+
};
|
|
422
295
|
};
|
|
423
296
|
const unmarshalListWebhookEventsResponse = (data) => {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
return {
|
|
430
|
-
totalCount: data.total_count,
|
|
431
|
-
webhookEvents: unmarshalArrayOfObject(
|
|
432
|
-
data.webhook_events,
|
|
433
|
-
unmarshalWebhookEvent
|
|
434
|
-
)
|
|
435
|
-
};
|
|
297
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListWebhookEventsResponse' failed as data isn't a dictionary.`);
|
|
298
|
+
return {
|
|
299
|
+
totalCount: data.total_count,
|
|
300
|
+
webhookEvents: unmarshalArrayOfObject(data.webhook_events, unmarshalWebhookEvent)
|
|
301
|
+
};
|
|
436
302
|
};
|
|
437
303
|
const unmarshalListWebhooksResponse = (data) => {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
return {
|
|
444
|
-
totalCount: data.total_count,
|
|
445
|
-
webhooks: unmarshalArrayOfObject(data.webhooks, unmarshalWebhook)
|
|
446
|
-
};
|
|
304
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListWebhooksResponse' failed as data isn't a dictionary.`);
|
|
305
|
+
return {
|
|
306
|
+
totalCount: data.total_count,
|
|
307
|
+
webhooks: unmarshalArrayOfObject(data.webhooks, unmarshalWebhook)
|
|
308
|
+
};
|
|
447
309
|
};
|
|
448
310
|
const unmarshalProjectConsumption = (data) => {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
);
|
|
468
|
-
}
|
|
469
|
-
return {
|
|
470
|
-
enabled: data.enabled,
|
|
471
|
-
frequency: data.frequency,
|
|
472
|
-
sendingDay: data.sending_day,
|
|
473
|
-
sendingHour: data.sending_hour
|
|
474
|
-
};
|
|
311
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ProjectConsumption' failed as data isn't a dictionary.`);
|
|
312
|
+
return {
|
|
313
|
+
customBlocklistsCount: data.custom_blocklists_count,
|
|
314
|
+
dedicatedIpsCount: data.dedicated_ips_count,
|
|
315
|
+
domainsCount: data.domains_count,
|
|
316
|
+
monthlyEmailsCount: data.monthly_emails_count,
|
|
317
|
+
projectId: data.project_id,
|
|
318
|
+
webhooksCount: data.webhooks_count
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
var unmarshalProjectSettingsPeriodicReport = (data) => {
|
|
322
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ProjectSettingsPeriodicReport' failed as data isn't a dictionary.`);
|
|
323
|
+
return {
|
|
324
|
+
enabled: data.enabled,
|
|
325
|
+
frequency: data.frequency,
|
|
326
|
+
sendingDay: data.sending_day,
|
|
327
|
+
sendingHour: data.sending_hour
|
|
328
|
+
};
|
|
475
329
|
};
|
|
476
330
|
const unmarshalProjectSettings = (data) => {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
`Unmarshalling the type 'ProjectSettings' failed as data isn't a dictionary.`
|
|
480
|
-
);
|
|
481
|
-
}
|
|
482
|
-
return {
|
|
483
|
-
periodicReport: data.periodic_report ? unmarshalProjectSettingsPeriodicReport(data.periodic_report) : void 0
|
|
484
|
-
};
|
|
331
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ProjectSettings' failed as data isn't a dictionary.`);
|
|
332
|
+
return { periodicReport: data.periodic_report ? unmarshalProjectSettingsPeriodicReport(data.periodic_report) : void 0 };
|
|
485
333
|
};
|
|
486
334
|
const unmarshalStatistics = (data) => {
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
sendingCount: data.sending_count,
|
|
497
|
-
sentCount: data.sent_count,
|
|
498
|
-
totalCount: data.total_count
|
|
499
|
-
};
|
|
335
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Statistics' failed as data isn't a dictionary.`);
|
|
336
|
+
return {
|
|
337
|
+
canceledCount: data.canceled_count,
|
|
338
|
+
failedCount: data.failed_count,
|
|
339
|
+
newCount: data.new_count,
|
|
340
|
+
sendingCount: data.sending_count,
|
|
341
|
+
sentCount: data.sent_count,
|
|
342
|
+
totalCount: data.total_count
|
|
343
|
+
};
|
|
500
344
|
};
|
|
501
345
|
const marshalBulkCreateBlocklistsRequest = (request, defaults) => ({
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
346
|
+
domain_id: request.domainId,
|
|
347
|
+
emails: request.emails,
|
|
348
|
+
reason: request.reason,
|
|
349
|
+
type: request.type
|
|
506
350
|
});
|
|
507
351
|
const marshalCreateDomainRequest = (request, defaults) => ({
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
352
|
+
accept_tos: request.acceptTos,
|
|
353
|
+
autoconfig: request.autoconfig,
|
|
354
|
+
domain_name: request.domainName,
|
|
355
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
512
356
|
});
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
357
|
+
var marshalCreateEmailRequestAddress = (request, defaults) => ({
|
|
358
|
+
email: request.email,
|
|
359
|
+
name: request.name
|
|
516
360
|
});
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
361
|
+
var marshalCreateEmailRequestAttachment = (request, defaults) => ({
|
|
362
|
+
content: request.content,
|
|
363
|
+
name: request.name,
|
|
364
|
+
type: request.type
|
|
521
365
|
});
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
366
|
+
var marshalCreateEmailRequestHeader = (request, defaults) => ({
|
|
367
|
+
key: request.key,
|
|
368
|
+
value: request.value
|
|
525
369
|
});
|
|
526
370
|
const marshalCreateEmailRequest = (request, defaults) => ({
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
send_before: request.sendBefore,
|
|
539
|
-
subject: request.subject,
|
|
540
|
-
text: request.text,
|
|
541
|
-
to: request.to !== void 0 ? request.to.map((elt) => marshalCreateEmailRequestAddress(elt)) : void 0
|
|
371
|
+
additional_headers: request.additionalHeaders !== void 0 ? request.additionalHeaders.map((elt) => marshalCreateEmailRequestHeader(elt, defaults)) : void 0,
|
|
372
|
+
attachments: request.attachments !== void 0 ? request.attachments.map((elt) => marshalCreateEmailRequestAttachment(elt, defaults)) : void 0,
|
|
373
|
+
bcc: request.bcc !== void 0 ? request.bcc.map((elt) => marshalCreateEmailRequestAddress(elt, defaults)) : void 0,
|
|
374
|
+
cc: request.cc !== void 0 ? request.cc.map((elt) => marshalCreateEmailRequestAddress(elt, defaults)) : void 0,
|
|
375
|
+
from: marshalCreateEmailRequestAddress(request.from, defaults),
|
|
376
|
+
html: request.html,
|
|
377
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
378
|
+
send_before: request.sendBefore,
|
|
379
|
+
subject: request.subject,
|
|
380
|
+
text: request.text,
|
|
381
|
+
to: request.to !== void 0 ? request.to.map((elt) => marshalCreateEmailRequestAddress(elt, defaults)) : void 0
|
|
542
382
|
});
|
|
543
383
|
const marshalCreateWebhookRequest = (request, defaults) => ({
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
});
|
|
550
|
-
const marshalUpdateDomainRequest = (request, defaults) => ({
|
|
551
|
-
autoconfig: request.autoconfig
|
|
384
|
+
domain_id: request.domainId,
|
|
385
|
+
event_types: request.eventTypes !== void 0 ? request.eventTypes : void 0,
|
|
386
|
+
name: request.name,
|
|
387
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
388
|
+
sns_arn: request.snsArn
|
|
552
389
|
});
|
|
390
|
+
const marshalUpdateDomainRequest = (request, defaults) => ({ autoconfig: request.autoconfig });
|
|
553
391
|
const marshalUpdateOfferSubscriptionRequest = (request, defaults) => ({
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
});
|
|
557
|
-
const marshalUpdateProjectSettingsRequestUpdatePeriodicReport = (request, defaults) => ({
|
|
558
|
-
enabled: request.enabled,
|
|
559
|
-
frequency: request.frequency,
|
|
560
|
-
sending_day: request.sendingDay,
|
|
561
|
-
sending_hour: request.sendingHour
|
|
392
|
+
name: request.name,
|
|
393
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
562
394
|
});
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
395
|
+
var marshalUpdateProjectSettingsRequestUpdatePeriodicReport = (request, defaults) => ({
|
|
396
|
+
enabled: request.enabled,
|
|
397
|
+
frequency: request.frequency,
|
|
398
|
+
sending_day: request.sendingDay,
|
|
399
|
+
sending_hour: request.sendingHour
|
|
567
400
|
});
|
|
401
|
+
const marshalUpdateProjectSettingsRequest = (request, defaults) => ({ periodic_report: request.periodicReport !== void 0 ? marshalUpdateProjectSettingsRequestUpdatePeriodicReport(request.periodicReport, defaults) : void 0 });
|
|
568
402
|
const marshalUpdateWebhookRequest = (request, defaults) => ({
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
403
|
+
event_types: request.eventTypes !== void 0 ? request.eventTypes : void 0,
|
|
404
|
+
name: request.name,
|
|
405
|
+
sns_arn: request.snsArn
|
|
572
406
|
});
|
|
573
|
-
export {
|
|
574
|
-
marshalBulkCreateBlocklistsRequest,
|
|
575
|
-
marshalCreateDomainRequest,
|
|
576
|
-
marshalCreateEmailRequest,
|
|
577
|
-
marshalCreateWebhookRequest,
|
|
578
|
-
marshalUpdateDomainRequest,
|
|
579
|
-
marshalUpdateOfferSubscriptionRequest,
|
|
580
|
-
marshalUpdateProjectSettingsRequest,
|
|
581
|
-
marshalUpdateWebhookRequest,
|
|
582
|
-
unmarshalBulkCreateBlocklistsResponse,
|
|
583
|
-
unmarshalCreateEmailResponse,
|
|
584
|
-
unmarshalDomain,
|
|
585
|
-
unmarshalDomainLastStatus,
|
|
586
|
-
unmarshalEmail,
|
|
587
|
-
unmarshalListBlocklistsResponse,
|
|
588
|
-
unmarshalListDomainsResponse,
|
|
589
|
-
unmarshalListEmailsResponse,
|
|
590
|
-
unmarshalListOfferSubscriptionsResponse,
|
|
591
|
-
unmarshalListOffersResponse,
|
|
592
|
-
unmarshalListPoolsResponse,
|
|
593
|
-
unmarshalListWebhookEventsResponse,
|
|
594
|
-
unmarshalListWebhooksResponse,
|
|
595
|
-
unmarshalOfferSubscription,
|
|
596
|
-
unmarshalProjectConsumption,
|
|
597
|
-
unmarshalProjectSettings,
|
|
598
|
-
unmarshalStatistics,
|
|
599
|
-
unmarshalWebhook
|
|
600
|
-
};
|
|
407
|
+
export { marshalBulkCreateBlocklistsRequest, marshalCreateDomainRequest, marshalCreateEmailRequest, marshalCreateWebhookRequest, marshalUpdateDomainRequest, marshalUpdateOfferSubscriptionRequest, marshalUpdateProjectSettingsRequest, marshalUpdateWebhookRequest, unmarshalBulkCreateBlocklistsResponse, unmarshalCreateEmailResponse, unmarshalDomain, unmarshalDomainLastStatus, unmarshalEmail, unmarshalListBlocklistsResponse, unmarshalListDomainsResponse, unmarshalListEmailsResponse, unmarshalListOfferSubscriptionsResponse, unmarshalListOffersResponse, unmarshalListPoolsResponse, unmarshalListWebhookEventsResponse, unmarshalListWebhooksResponse, unmarshalOfferSubscription, unmarshalProjectConsumption, unmarshalProjectSettings, unmarshalStatistics, unmarshalWebhook };
|