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/BuildService.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 BuildService {
8
constructor(public readonly httpRequest: BaseHttpRequest) {}
9
10
/**
11
* @returns any OK
12
* @throws ApiError
13
*/
14
public listSiteBuilds({
15
siteId,
16
page,
17
perPage,
18
}: {
19
siteId: string;
20
page?: number;
21
perPage?: number;
22
}): CancelablePromise<
23
Array<{
24
id?: string;
25
deploy_id?: string;
26
sha?: string;
27
done?: boolean;
28
error?: string;
29
created_at?: string;
30
}>
31
> {
32
return this.httpRequest.request({
33
method: "GET",
34
url: "/sites/{site_id}/builds",
35
path: {
36
"site_id": siteId,
37
},
38
query: {
39
"page": page,
40
"per_page": perPage,
41
},
42
});
43
}
44
45
/**
46
* @returns any OK
47
* @throws ApiError
48
*/
49
public createSiteBuild({
50
siteId,
51
build,
52
}: {
53
siteId: string;
54
build?: {
55
image?: string;
56
};
57
}): CancelablePromise<{
58
id?: string;
59
deploy_id?: string;
60
sha?: string;
61
done?: boolean;
62
error?: string;
63
created_at?: string;
64
}> {
65
return this.httpRequest.request({
66
method: "POST",
67
url: "/sites/{site_id}/builds",
68
path: {
69
"site_id": siteId,
70
},
71
body: build,
72
});
73
}
74
75
/**
76
* @returns any OK
77
* @throws ApiError
78
*/
79
public getSiteBuild({
80
buildId,
81
}: {
82
buildId: string;
83
}): CancelablePromise<{
84
id?: string;
85
deploy_id?: string;
86
sha?: string;
87
done?: boolean;
88
error?: string;
89
created_at?: string;
90
}> {
91
return this.httpRequest.request({
92
method: "GET",
93
url: "/builds/{build_id}",
94
path: {
95
"build_id": buildId,
96
},
97
});
98
}
99
100
/**
101
* @returns any error
102
* @throws ApiError
103
*/
104
public notifyBuildStart({
105
buildId,
106
}: {
107
buildId: string;
108
}): CancelablePromise<{
109
code?: number;
110
message: string;
111
}> {
112
return this.httpRequest.request({
113
method: "POST",
114
url: "/builds/{build_id}/start",
115
path: {
116
"build_id": buildId,
117
},
118
});
119
}
120
121
/**
122
* @returns any OK
123
* @throws ApiError
124
*/
125
public getAccountBuildStatus({
126
accountId,
127
}: {
128
accountId: string;
129
}): CancelablePromise<
130
Array<{
131
active?: number;
132
pending_concurrency?: number;
133
enqueued?: number;
134
build_count?: number;
135
minutes?: {
136
current?: number;
137
current_average_sec?: number;
138
previous?: number;
139
period_start_date?: string;
140
period_end_date?: string;
141
last_updated_at?: string;
142
included_minutes?: string;
143
included_minutes_with_packs?: string;
144
};
145
}>
146
> {
147
return this.httpRequest.request({
148
method: "GET",
149
url: "/{account_id}/builds/status",
150
path: {
151
"account_id": accountId,
152
},
153
});
154
}
155
}
156
157