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/XInternalService.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 XInternalService {
8
constructor(public readonly httpRequest: BaseHttpRequest) {}
9
10
/**
11
* This is an internal-only endpoint.
12
* @returns any OK
13
* @throws ApiError
14
*/
15
public updatePlugin({
16
siteId,
17
_package,
18
pluginParams,
19
}: {
20
siteId: string;
21
_package: string;
22
pluginParams?: {
23
pinned_version?: string;
24
};
25
}): CancelablePromise<{
26
package?: string;
27
pinned_version?: string;
28
}> {
29
return this.httpRequest.request({
30
method: "PUT",
31
url: "/sites/{site_id}/plugins/{package}",
32
path: {
33
"site_id": siteId,
34
"package": _package,
35
},
36
body: pluginParams,
37
});
38
}
39
40
/**
41
* This is an internal-only endpoint.
42
* @returns any OK
43
* @throws ApiError
44
*/
45
public getLatestPluginRuns({
46
siteId,
47
packages,
48
state,
49
}: {
50
siteId: string;
51
packages: Array<string>;
52
state?: string;
53
}): CancelablePromise<
54
Array<
55
({
56
package?: string;
57
version?: string;
58
state?: string;
59
reporting_event?: string;
60
title?: string;
61
summary?: string;
62
text?: string;
63
} & {
64
deploy_id?: string;
65
})
66
>
67
> {
68
return this.httpRequest.request({
69
method: "GET",
70
url: "/sites/{site_id}/plugin_runs/latest",
71
path: {
72
"site_id": siteId,
73
},
74
query: {
75
"packages": packages,
76
"state": state,
77
},
78
});
79
}
80
81
/**
82
* This is an internal-only endpoint.
83
* @returns any error
84
* @throws ApiError
85
*/
86
public createPluginRun({
87
deployId,
88
pluginRun,
89
}: {
90
deployId: string;
91
pluginRun?: {
92
package?: string;
93
version?: string;
94
state?: string;
95
reporting_event?: string;
96
title?: string;
97
summary?: string;
98
text?: string;
99
};
100
}): CancelablePromise<{
101
code?: number;
102
message: string;
103
}> {
104
return this.httpRequest.request({
105
method: "POST",
106
url: "/deploys/{deploy_id}/plugin_runs",
107
path: {
108
"deploy_id": deployId,
109
},
110
body: pluginRun,
111
});
112
}
113
}
114
115