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/ServiceInstanceService.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 ServiceInstanceService {
8
constructor(public readonly httpRequest: BaseHttpRequest) {}
9
10
/**
11
* @returns any OK
12
* @throws ApiError
13
*/
14
public listServiceInstancesForSite({
15
siteId,
16
}: {
17
siteId: string;
18
}): CancelablePromise<
19
Array<{
20
id?: string;
21
url?: string;
22
config?: any;
23
external_attributes?: any;
24
service_slug?: string;
25
service_path?: string;
26
service_name?: string;
27
env?: any;
28
snippets?: Array<any>;
29
auth_url?: string;
30
created_at?: string;
31
updated_at?: string;
32
}>
33
> {
34
return this.httpRequest.request({
35
method: "GET",
36
url: "/sites/{site_id}/service-instances",
37
path: {
38
"site_id": siteId,
39
},
40
});
41
}
42
43
/**
44
* @returns any error
45
* @throws ApiError
46
*/
47
public createServiceInstance({
48
siteId,
49
addon,
50
config,
51
}: {
52
siteId: string;
53
addon: string;
54
config: any;
55
}): CancelablePromise<{
56
code?: number;
57
message: string;
58
}> {
59
return this.httpRequest.request({
60
method: "POST",
61
url: "/sites/{site_id}/services/{addon}/instances",
62
path: {
63
"site_id": siteId,
64
"addon": addon,
65
},
66
body: config,
67
});
68
}
69
70
/**
71
* @returns any OK
72
* @throws ApiError
73
*/
74
public showServiceInstance({
75
siteId,
76
addon,
77
instanceId,
78
}: {
79
siteId: string;
80
addon: string;
81
instanceId: string;
82
}): CancelablePromise<{
83
id?: string;
84
url?: string;
85
config?: any;
86
external_attributes?: any;
87
service_slug?: string;
88
service_path?: string;
89
service_name?: string;
90
env?: any;
91
snippets?: Array<any>;
92
auth_url?: string;
93
created_at?: string;
94
updated_at?: string;
95
}> {
96
return this.httpRequest.request({
97
method: "GET",
98
url: "/sites/{site_id}/services/{addon}/instances/{instance_id}",
99
path: {
100
"site_id": siteId,
101
"addon": addon,
102
"instance_id": instanceId,
103
},
104
});
105
}
106
107
/**
108
* @returns any error
109
* @throws ApiError
110
*/
111
public updateServiceInstance({
112
siteId,
113
addon,
114
instanceId,
115
config,
116
}: {
117
siteId: string;
118
addon: string;
119
instanceId: string;
120
config: any;
121
}): CancelablePromise<{
122
code?: number;
123
message: string;
124
}> {
125
return this.httpRequest.request({
126
method: "PUT",
127
url: "/sites/{site_id}/services/{addon}/instances/{instance_id}",
128
path: {
129
"site_id": siteId,
130
"addon": addon,
131
"instance_id": instanceId,
132
},
133
body: config,
134
});
135
}
136
137
/**
138
* @returns any error
139
* @throws ApiError
140
*/
141
public deleteServiceInstance({
142
siteId,
143
addon,
144
instanceId,
145
}: {
146
siteId: string;
147
addon: string;
148
instanceId: string;
149
}): CancelablePromise<{
150
code?: number;
151
message: string;
152
}> {
153
return this.httpRequest.request({
154
method: "DELETE",
155
url: "/sites/{site_id}/services/{addon}/instances/{instance_id}",
156
path: {
157
"site_id": siteId,
158
"addon": addon,
159
"instance_id": instanceId,
160
},
161
});
162
}
163
}
164
165