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/DeployService.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 DeployService {
8
constructor(public readonly httpRequest: BaseHttpRequest) {}
9
10
/**
11
* @returns any OK
12
* @throws ApiError
13
*/
14
public listSiteDeploys({
15
siteId,
16
page,
17
perPage,
18
}: {
19
siteId: string;
20
page?: number;
21
perPage?: number;
22
}): CancelablePromise<
23
Array<{
24
id?: string;
25
site_id?: string;
26
user_id?: string;
27
build_id?: string;
28
state?: string;
29
name?: string;
30
url?: string;
31
ssl_url?: string;
32
admin_url?: string;
33
deploy_url?: string;
34
deploy_ssl_url?: string;
35
screenshot_url?: string;
36
review_id?: number;
37
draft?: boolean;
38
required?: Array<string>;
39
required_functions?: Array<string>;
40
error_message?: string;
41
branch?: string;
42
commit_ref?: string;
43
commit_url?: string;
44
skipped?: boolean;
45
created_at?: string;
46
updated_at?: string;
47
published_at?: string;
48
title?: string;
49
context?: string;
50
locked?: boolean;
51
review_url?: string;
52
site_capabilities?: {
53
large_media_enabled?: boolean;
54
};
55
framework?: string;
56
function_schedules?: Array<{
57
name?: string;
58
cron?: string;
59
}>;
60
}>
61
> {
62
return this.httpRequest.request({
63
method: "GET",
64
url: "/sites/{site_id}/deploys",
65
path: {
66
"site_id": siteId,
67
},
68
query: {
69
"page": page,
70
"per_page": perPage,
71
},
72
});
73
}
74
75
/**
76
* @returns any OK
77
* @throws ApiError
78
*/
79
public createSiteDeploy({
80
siteId,
81
deploy,
82
title,
83
}: {
84
siteId: string;
85
deploy: {
86
files?: any;
87
draft?: boolean;
88
async?: boolean;
89
functions?: any;
90
function_schedules?: Array<{
91
name?: string;
92
cron?: string;
93
}>;
94
branch?: string;
95
framework?: string;
96
};
97
title?: string;
98
}): CancelablePromise<{
99
id?: string;
100
site_id?: string;
101
user_id?: string;
102
build_id?: string;
103
state?: string;
104
name?: string;
105
url?: string;
106
ssl_url?: string;
107
admin_url?: string;
108
deploy_url?: string;
109
deploy_ssl_url?: string;
110
screenshot_url?: string;
111
review_id?: number;
112
draft?: boolean;
113
required?: Array<string>;
114
required_functions?: Array<string>;
115
error_message?: string;
116
branch?: string;
117
commit_ref?: string;
118
commit_url?: string;
119
skipped?: boolean;
120
created_at?: string;
121
updated_at?: string;
122
published_at?: string;
123
title?: string;
124
context?: string;
125
locked?: boolean;
126
review_url?: string;
127
site_capabilities?: {
128
large_media_enabled?: boolean;
129
};
130
framework?: string;
131
function_schedules?: Array<{
132
name?: string;
133
cron?: string;
134
}>;
135
}> {
136
return this.httpRequest.request({
137
method: "POST",
138
url: "/sites/{site_id}/deploys",
139
path: {
140
"site_id": siteId,
141
},
142
query: {
143
"title": title,
144
},
145
body: deploy,
146
});
147
}
148
149
/**
150
* @returns any OK
151
* @throws ApiError
152
*/
153
public getSiteDeploy({
154
siteId,
155
deployId,
156
}: {
157
siteId: string;
158
deployId: string;
159
}): CancelablePromise<{
160
id?: string;
161
site_id?: string;
162
user_id?: string;
163
build_id?: string;
164
state?: string;
165
name?: string;
166
url?: string;
167
ssl_url?: string;
168
admin_url?: string;
169
deploy_url?: string;
170
deploy_ssl_url?: string;
171
screenshot_url?: string;
172
review_id?: number;
173
draft?: boolean;
174
required?: Array<string>;
175
required_functions?: Array<string>;
176
error_message?: string;
177
branch?: string;
178
commit_ref?: string;
179
commit_url?: string;
180
skipped?: boolean;
181
created_at?: string;
182
updated_at?: string;
183
published_at?: string;
184
title?: string;
185
context?: string;
186
locked?: boolean;
187
review_url?: string;
188
site_capabilities?: {
189
large_media_enabled?: boolean;
190
};
191
framework?: string;
192
function_schedules?: Array<{
193
name?: string;
194
cron?: string;
195
}>;
196
}> {
197
return this.httpRequest.request({
198
method: "GET",
199
url: "/sites/{site_id}/deploys/{deploy_id}",
200
path: {
201
"site_id": siteId,
202
"deploy_id": deployId,
203
},
204
});
205
}
206
207
/**
208
* @returns any OK
209
* @throws ApiError
210
*/
211
public updateSiteDeploy({
212
siteId,
213
deployId,
214
deploy,
215
}: {
216
siteId: string;
217
deployId: string;
218
deploy: {
219
files?: any;
220
draft?: boolean;
221
async?: boolean;
222
functions?: any;
223
function_schedules?: Array<{
224
name?: string;
225
cron?: string;
226
}>;
227
branch?: string;
228
framework?: string;
229
};
230
}): CancelablePromise<{
231
id?: string;
232
site_id?: string;
233
user_id?: string;
234
build_id?: string;
235
state?: string;
236
name?: string;
237
url?: string;
238
ssl_url?: string;
239
admin_url?: string;
240
deploy_url?: string;
241
deploy_ssl_url?: string;
242
screenshot_url?: string;
243
review_id?: number;
244
draft?: boolean;
245
required?: Array<string>;
246
required_functions?: Array<string>;
247
error_message?: string;
248
branch?: string;
249
commit_ref?: string;
250
commit_url?: string;
251
skipped?: boolean;
252
created_at?: string;
253
updated_at?: string;
254
published_at?: string;
255
title?: string;
256
context?: string;
257
locked?: boolean;
258
review_url?: string;
259
site_capabilities?: {
260
large_media_enabled?: boolean;
261
};
262
framework?: string;
263
function_schedules?: Array<{
264
name?: string;
265
cron?: string;
266
}>;
267
}> {
268
return this.httpRequest.request({
269
method: "PUT",
270
url: "/sites/{site_id}/deploys/{deploy_id}",
271
path: {
272
"site_id": siteId,
273
"deploy_id": deployId,
274
},
275
body: deploy,
276
});
277
}
278
279
/**
280
* @returns any error
281
* @throws ApiError
282
*/
283
public cancelSiteDeploy({
284
deployId,
285
}: {
286
deployId: string;
287
}): CancelablePromise<{
288
code?: number;
289
message: string;
290
}> {
291
return this.httpRequest.request({
292
method: "POST",
293
url: "/deploys/{deploy_id}/cancel",
294
path: {
295
"deploy_id": deployId,
296
},
297
});
298
}
299
300
/**
301
* @returns any error
302
* @throws ApiError
303
*/
304
public restoreSiteDeploy({
305
siteId,
306
deployId,
307
}: {
308
siteId: string;
309
deployId: string;
310
}): CancelablePromise<{
311
code?: number;
312
message: string;
313
}> {
314
return this.httpRequest.request({
315
method: "POST",
316
url: "/sites/{site_id}/deploys/{deploy_id}/restore",
317
path: {
318
"site_id": siteId,
319
"deploy_id": deployId,
320
},
321
});
322
}
323
324
/**
325
* @returns any error
326
* @throws ApiError
327
*/
328
public rollbackSiteDeploy({
329
siteId,
330
}: {
331
siteId: string;
332
}): CancelablePromise<{
333
code?: number;
334
message: string;
335
}> {
336
return this.httpRequest.request({
337
method: "PUT",
338
url: "/sites/{site_id}/rollback",
339
path: {
340
"site_id": siteId,
341
},
342
});
343
}
344
345
/**
346
* @returns any OK
347
* @throws ApiError
348
*/
349
public getDeploy({
350
deployId,
351
}: {
352
deployId: string;
353
}): CancelablePromise<{
354
id?: string;
355
site_id?: string;
356
user_id?: string;
357
build_id?: string;
358
state?: string;
359
name?: string;
360
url?: string;
361
ssl_url?: string;
362
admin_url?: string;
363
deploy_url?: string;
364
deploy_ssl_url?: string;
365
screenshot_url?: string;
366
review_id?: number;
367
draft?: boolean;
368
required?: Array<string>;
369
required_functions?: Array<string>;
370
error_message?: string;
371
branch?: string;
372
commit_ref?: string;
373
commit_url?: string;
374
skipped?: boolean;
375
created_at?: string;
376
updated_at?: string;
377
published_at?: string;
378
title?: string;
379
context?: string;
380
locked?: boolean;
381
review_url?: string;
382
site_capabilities?: {
383
large_media_enabled?: boolean;
384
};
385
framework?: string;
386
function_schedules?: Array<{
387
name?: string;
388
cron?: string;
389
}>;
390
}> {
391
return this.httpRequest.request({
392
method: "GET",
393
url: "/deploys/{deploy_id}",
394
path: {
395
"deploy_id": deployId,
396
},
397
});
398
}
399
400
/**
401
* @returns any OK
402
* @throws ApiError
403
*/
404
public lockDeploy({
405
deployId,
406
}: {
407
deployId: string;
408
}): CancelablePromise<{
409
id?: string;
410
site_id?: string;
411
user_id?: string;
412
build_id?: string;
413
state?: string;
414
name?: string;
415
url?: string;
416
ssl_url?: string;
417
admin_url?: string;
418
deploy_url?: string;
419
deploy_ssl_url?: string;
420
screenshot_url?: string;
421
review_id?: number;
422
draft?: boolean;
423
required?: Array<string>;
424
required_functions?: Array<string>;
425
error_message?: string;
426
branch?: string;
427
commit_ref?: string;
428
commit_url?: string;
429
skipped?: boolean;
430
created_at?: string;
431
updated_at?: string;
432
published_at?: string;
433
title?: string;
434
context?: string;
435
locked?: boolean;
436
review_url?: string;
437
site_capabilities?: {
438
large_media_enabled?: boolean;
439
};
440
framework?: string;
441
function_schedules?: Array<{
442
name?: string;
443
cron?: string;
444
}>;
445
}> {
446
return this.httpRequest.request({
447
method: "POST",
448
url: "/deploys/{deploy_id}/lock",
449
path: {
450
"deploy_id": deployId,
451
},
452
});
453
}
454
455
/**
456
* @returns any OK
457
* @throws ApiError
458
*/
459
public unlockDeploy({
460
deployId,
461
}: {
462
deployId: string;
463
}): CancelablePromise<{
464
id?: string;
465
site_id?: string;
466
user_id?: string;
467
build_id?: string;
468
state?: string;
469
name?: string;
470
url?: string;
471
ssl_url?: string;
472
admin_url?: string;
473
deploy_url?: string;
474
deploy_ssl_url?: string;
475
screenshot_url?: string;
476
review_id?: number;
477
draft?: boolean;
478
required?: Array<string>;
479
required_functions?: Array<string>;
480
error_message?: string;
481
branch?: string;
482
commit_ref?: string;
483
commit_url?: string;
484
skipped?: boolean;
485
created_at?: string;
486
updated_at?: string;
487
published_at?: string;
488
title?: string;
489
context?: string;
490
locked?: boolean;
491
review_url?: string;
492
site_capabilities?: {
493
large_media_enabled?: boolean;
494
};
495
framework?: string;
496
function_schedules?: Array<{
497
name?: string;
498
cron?: string;
499
}>;
500
}> {
501
return this.httpRequest.request({
502
method: "POST",
503
url: "/deploys/{deploy_id}/unlock",
504
path: {
505
"deploy_id": deployId,
506
},
507
});
508
}
509
}
510
511