Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/src/publish/netlify/api/services/DnsZoneService.ts
6464 views
1
/* istanbul ignore file */
2
/* tslint:disable */
3
/* eslint-disable */
4
import type { CancelablePromise } from "../core/CancelablePromise.ts";
5
import type { BaseHttpRequest } from "../core/BaseHttpRequest.ts";
6
7
export class DnsZoneService {
8
constructor(public readonly httpRequest: BaseHttpRequest) {}
9
10
/**
11
* @returns any OK
12
* @throws ApiError
13
*/
14
public getDnsForSite({
15
siteId,
16
}: {
17
siteId: string;
18
}): CancelablePromise<
19
Array<{
20
id?: string;
21
name?: string;
22
errors?: Array<string>;
23
supported_record_types?: Array<string>;
24
user_id?: string;
25
created_at?: string;
26
updated_at?: string;
27
records?: Array<{
28
id?: string;
29
hostname?: string;
30
type?: string;
31
value?: string;
32
ttl?: number;
33
priority?: number;
34
dns_zone_id?: string;
35
site_id?: string;
36
flag?: number;
37
tag?: string;
38
managed?: boolean;
39
}>;
40
dns_servers?: Array<string>;
41
account_id?: string;
42
site_id?: string;
43
account_slug?: string;
44
account_name?: string;
45
domain?: string;
46
ipv6_enabled?: boolean;
47
dedicated?: boolean;
48
}>
49
> {
50
return this.httpRequest.request({
51
method: "GET",
52
url: "/sites/{site_id}/dns",
53
path: {
54
"site_id": siteId,
55
},
56
});
57
}
58
59
/**
60
* @returns any OK
61
* @throws ApiError
62
*/
63
public configureDnsForSite({
64
siteId,
65
}: {
66
siteId: string;
67
}): CancelablePromise<
68
Array<{
69
id?: string;
70
name?: string;
71
errors?: Array<string>;
72
supported_record_types?: Array<string>;
73
user_id?: string;
74
created_at?: string;
75
updated_at?: string;
76
records?: Array<{
77
id?: string;
78
hostname?: string;
79
type?: string;
80
value?: string;
81
ttl?: number;
82
priority?: number;
83
dns_zone_id?: string;
84
site_id?: string;
85
flag?: number;
86
tag?: string;
87
managed?: boolean;
88
}>;
89
dns_servers?: Array<string>;
90
account_id?: string;
91
site_id?: string;
92
account_slug?: string;
93
account_name?: string;
94
domain?: string;
95
ipv6_enabled?: boolean;
96
dedicated?: boolean;
97
}>
98
> {
99
return this.httpRequest.request({
100
method: "PUT",
101
url: "/sites/{site_id}/dns",
102
path: {
103
"site_id": siteId,
104
},
105
});
106
}
107
108
/**
109
* @returns any error
110
* @throws ApiError
111
*/
112
public createDnsZone({
113
dnsZoneParams,
114
}: {
115
dnsZoneParams: {
116
account_slug?: string;
117
site_id?: string;
118
name?: string;
119
};
120
}): CancelablePromise<{
121
code?: number;
122
message: string;
123
}> {
124
return this.httpRequest.request({
125
method: "POST",
126
url: "/dns_zones",
127
body: dnsZoneParams,
128
});
129
}
130
131
/**
132
* @returns any get all DNS zones the user has access to
133
* @throws ApiError
134
*/
135
public getDnsZones({
136
accountSlug,
137
}: {
138
accountSlug?: string;
139
}): CancelablePromise<
140
Array<{
141
id?: string;
142
name?: string;
143
errors?: Array<string>;
144
supported_record_types?: Array<string>;
145
user_id?: string;
146
created_at?: string;
147
updated_at?: string;
148
records?: Array<{
149
id?: string;
150
hostname?: string;
151
type?: string;
152
value?: string;
153
ttl?: number;
154
priority?: number;
155
dns_zone_id?: string;
156
site_id?: string;
157
flag?: number;
158
tag?: string;
159
managed?: boolean;
160
}>;
161
dns_servers?: Array<string>;
162
account_id?: string;
163
site_id?: string;
164
account_slug?: string;
165
account_name?: string;
166
domain?: string;
167
ipv6_enabled?: boolean;
168
dedicated?: boolean;
169
}>
170
> {
171
return this.httpRequest.request({
172
method: "GET",
173
url: "/dns_zones",
174
query: {
175
"account_slug": accountSlug,
176
},
177
});
178
}
179
180
/**
181
* @returns any get a single DNS zone
182
* @throws ApiError
183
*/
184
public getDnsZone({
185
zoneId,
186
}: {
187
zoneId: string;
188
}): CancelablePromise<{
189
id?: string;
190
name?: string;
191
errors?: Array<string>;
192
supported_record_types?: Array<string>;
193
user_id?: string;
194
created_at?: string;
195
updated_at?: string;
196
records?: Array<{
197
id?: string;
198
hostname?: string;
199
type?: string;
200
value?: string;
201
ttl?: number;
202
priority?: number;
203
dns_zone_id?: string;
204
site_id?: string;
205
flag?: number;
206
tag?: string;
207
managed?: boolean;
208
}>;
209
dns_servers?: Array<string>;
210
account_id?: string;
211
site_id?: string;
212
account_slug?: string;
213
account_name?: string;
214
domain?: string;
215
ipv6_enabled?: boolean;
216
dedicated?: boolean;
217
}> {
218
return this.httpRequest.request({
219
method: "GET",
220
url: "/dns_zones/{zone_id}",
221
path: {
222
"zone_id": zoneId,
223
},
224
});
225
}
226
227
/**
228
* @returns any error
229
* @throws ApiError
230
*/
231
public deleteDnsZone({
232
zoneId,
233
}: {
234
zoneId: string;
235
}): CancelablePromise<{
236
code?: number;
237
message: string;
238
}> {
239
return this.httpRequest.request({
240
method: "DELETE",
241
url: "/dns_zones/{zone_id}",
242
path: {
243
"zone_id": zoneId,
244
},
245
});
246
}
247
248
/**
249
* @returns any transfer a DNS zone to another account
250
* @throws ApiError
251
*/
252
public transferDnsZone({
253
zoneId,
254
accountId,
255
transferAccountId,
256
transferUserId,
257
}: {
258
zoneId: string;
259
/** the account of the dns zone **/
260
accountId: string;
261
/** the account you want to transfer the dns zone to **/
262
transferAccountId: string;
263
/** the user you want to transfer the dns zone to **/
264
transferUserId: string;
265
}): CancelablePromise<{
266
id?: string;
267
name?: string;
268
errors?: Array<string>;
269
supported_record_types?: Array<string>;
270
user_id?: string;
271
created_at?: string;
272
updated_at?: string;
273
records?: Array<{
274
id?: string;
275
hostname?: string;
276
type?: string;
277
value?: string;
278
ttl?: number;
279
priority?: number;
280
dns_zone_id?: string;
281
site_id?: string;
282
flag?: number;
283
tag?: string;
284
managed?: boolean;
285
}>;
286
dns_servers?: Array<string>;
287
account_id?: string;
288
site_id?: string;
289
account_slug?: string;
290
account_name?: string;
291
domain?: string;
292
ipv6_enabled?: boolean;
293
dedicated?: boolean;
294
}> {
295
return this.httpRequest.request({
296
method: "PUT",
297
url: "/dns_zones/{zone_id}/transfer",
298
path: {
299
"zone_id": zoneId,
300
},
301
query: {
302
"account_id": accountId,
303
"transfer_account_id": transferAccountId,
304
"transfer_user_id": transferUserId,
305
},
306
});
307
}
308
309
/**
310
* @returns any get all DNS records for a single DNS zone
311
* @throws ApiError
312
*/
313
public getDnsRecords({
314
zoneId,
315
}: {
316
zoneId: string;
317
}): CancelablePromise<
318
Array<{
319
id?: string;
320
hostname?: string;
321
type?: string;
322
value?: string;
323
ttl?: number;
324
priority?: number;
325
dns_zone_id?: string;
326
site_id?: string;
327
flag?: number;
328
tag?: string;
329
managed?: boolean;
330
}>
331
> {
332
return this.httpRequest.request({
333
method: "GET",
334
url: "/dns_zones/{zone_id}/dns_records",
335
path: {
336
"zone_id": zoneId,
337
},
338
});
339
}
340
341
/**
342
* @returns any error
343
* @throws ApiError
344
*/
345
public createDnsRecord({
346
zoneId,
347
dnsRecord,
348
}: {
349
zoneId: string;
350
dnsRecord: {
351
type?: string;
352
hostname?: string;
353
value?: string;
354
ttl?: number;
355
priority?: number;
356
weight?: number;
357
port?: number;
358
flag?: number;
359
tag?: string;
360
};
361
}): CancelablePromise<{
362
code?: number;
363
message: string;
364
}> {
365
return this.httpRequest.request({
366
method: "POST",
367
url: "/dns_zones/{zone_id}/dns_records",
368
path: {
369
"zone_id": zoneId,
370
},
371
body: dnsRecord,
372
});
373
}
374
375
/**
376
* @returns any get a single DNS record
377
* @throws ApiError
378
*/
379
public getIndividualDnsRecord({
380
zoneId,
381
dnsRecordId,
382
}: {
383
zoneId: string;
384
dnsRecordId: string;
385
}): CancelablePromise<{
386
id?: string;
387
hostname?: string;
388
type?: string;
389
value?: string;
390
ttl?: number;
391
priority?: number;
392
dns_zone_id?: string;
393
site_id?: string;
394
flag?: number;
395
tag?: string;
396
managed?: boolean;
397
}> {
398
return this.httpRequest.request({
399
method: "GET",
400
url: "/dns_zones/{zone_id}/dns_records/{dns_record_id}",
401
path: {
402
"zone_id": zoneId,
403
"dns_record_id": dnsRecordId,
404
},
405
});
406
}
407
408
/**
409
* @returns any error
410
* @throws ApiError
411
*/
412
public deleteDnsRecord({
413
zoneId,
414
dnsRecordId,
415
}: {
416
zoneId: string;
417
dnsRecordId: string;
418
}): CancelablePromise<{
419
code?: number;
420
message: string;
421
}> {
422
return this.httpRequest.request({
423
method: "DELETE",
424
url: "/dns_zones/{zone_id}/dns_records/{dns_record_id}",
425
path: {
426
"zone_id": zoneId,
427
"dns_record_id": dnsRecordId,
428
},
429
});
430
}
431
}
432
433