@scaleway/sdk-inference 2.2.2 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +3 -6
- package/dist/v1/api.gen.js +188 -271
- package/dist/v1/content.gen.js +8 -12
- package/dist/v1/index.gen.js +21 -19
- package/dist/v1/marshalling.gen.js +143 -224
- package/dist/v1/validation-rules.gen.js +54 -62
- package/dist/v1beta1/api.gen.js +208 -300
- package/dist/v1beta1/content.gen.js +6 -7
- package/dist/v1beta1/index.gen.js +25 -23
- package/dist/v1beta1/marshalling.gen.js +144 -240
- package/dist/v1beta1/validation-rules.gen.js +50 -52
- package/package.json +4 -4
package/dist/v1beta1/api.gen.js
CHANGED
|
@@ -1,302 +1,210 @@
|
|
|
1
|
-
import { API as API$1, toApiLocality, urlParams, validatePathParam, enrichForPagination, waitForResource } from "@scaleway/sdk-client";
|
|
2
1
|
import { DEPLOYMENT_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Set new ACL. Set new ACL rules for a specific deployment.
|
|
212
|
-
*
|
|
213
|
-
* @param request - The request {@link SetDeploymentACLRulesRequest}
|
|
214
|
-
* @returns A Promise of SetDeploymentACLRulesResponse
|
|
215
|
-
*/
|
|
216
|
-
setDeploymentACLRules = (request) => this.client.fetch(
|
|
217
|
-
{
|
|
218
|
-
body: JSON.stringify(
|
|
219
|
-
marshalSetDeploymentACLRulesRequest(request, this.client.settings)
|
|
220
|
-
),
|
|
221
|
-
headers: jsonContentHeaders,
|
|
222
|
-
method: "PUT",
|
|
223
|
-
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/acls`
|
|
224
|
-
},
|
|
225
|
-
unmarshalSetDeploymentACLRulesResponse
|
|
226
|
-
);
|
|
227
|
-
/**
|
|
228
|
-
* Delete an existing ACL.
|
|
229
|
-
*
|
|
230
|
-
* @param request - The request {@link DeleteDeploymentACLRuleRequest}
|
|
231
|
-
*/
|
|
232
|
-
deleteDeploymentACLRule = (request) => this.client.fetch(
|
|
233
|
-
{
|
|
234
|
-
method: "DELETE",
|
|
235
|
-
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
236
|
-
}
|
|
237
|
-
);
|
|
238
|
-
pageOfListModels = (request = {}) => this.client.fetch(
|
|
239
|
-
{
|
|
240
|
-
method: "GET",
|
|
241
|
-
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/models`,
|
|
242
|
-
urlParams: urlParams(
|
|
243
|
-
["name", request.name],
|
|
244
|
-
["order_by", request.orderBy],
|
|
245
|
-
["page", request.page],
|
|
246
|
-
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
247
|
-
["project_id", request.projectId],
|
|
248
|
-
["tags", request.tags]
|
|
249
|
-
)
|
|
250
|
-
},
|
|
251
|
-
unmarshalListModelsResponse
|
|
252
|
-
);
|
|
253
|
-
/**
|
|
254
|
-
* List models. List all available models.
|
|
255
|
-
*
|
|
256
|
-
* @param request - The request {@link ListModelsRequest}
|
|
257
|
-
* @returns A Promise of ListModelsResponse
|
|
258
|
-
*/
|
|
259
|
-
listModels = (request = {}) => enrichForPagination("models", this.pageOfListModels, request);
|
|
260
|
-
/**
|
|
261
|
-
* Get a model. Get the model for the given ID.
|
|
262
|
-
*
|
|
263
|
-
* @param request - The request {@link GetModelRequest}
|
|
264
|
-
* @returns A Promise of Model
|
|
265
|
-
*/
|
|
266
|
-
getModel = (request) => this.client.fetch(
|
|
267
|
-
{
|
|
268
|
-
method: "GET",
|
|
269
|
-
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/models/${validatePathParam("modelId", request.modelId)}`
|
|
270
|
-
},
|
|
271
|
-
unmarshalModel
|
|
272
|
-
);
|
|
273
|
-
getModelEula = (request) => this.client.fetch(
|
|
274
|
-
{
|
|
275
|
-
method: "GET",
|
|
276
|
-
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/models/${validatePathParam("modelId", request.modelId)}/eula`
|
|
277
|
-
},
|
|
278
|
-
unmarshalEula
|
|
279
|
-
);
|
|
280
|
-
pageOfListNodeTypes = (request) => this.client.fetch(
|
|
281
|
-
{
|
|
282
|
-
method: "GET",
|
|
283
|
-
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/node-types`,
|
|
284
|
-
urlParams: urlParams(
|
|
285
|
-
["include_disabled_types", request.includeDisabledTypes],
|
|
286
|
-
["page", request.page],
|
|
287
|
-
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
288
|
-
)
|
|
289
|
-
},
|
|
290
|
-
unmarshalListNodeTypesResponse
|
|
291
|
-
);
|
|
292
|
-
/**
|
|
293
|
-
* List available node types. List all available node types. By default, the node types returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
|
|
294
|
-
*
|
|
295
|
-
* @param request - The request {@link ListNodeTypesRequest}
|
|
296
|
-
* @returns A Promise of ListNodeTypesResponse
|
|
297
|
-
*/
|
|
298
|
-
listNodeTypes = (request) => enrichForPagination("nodeTypes", this.pageOfListNodeTypes, request);
|
|
299
|
-
}
|
|
300
|
-
export {
|
|
301
|
-
API
|
|
2
|
+
import { marshalAddDeploymentACLRulesRequest, marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalSetDeploymentACLRulesRequest, marshalUpdateDeploymentRequest, marshalUpdateEndpointRequest, unmarshalAddDeploymentACLRulesResponse, unmarshalDeployment, unmarshalEndpoint, unmarshalEula, unmarshalListDeploymentACLRulesResponse, unmarshalListDeploymentsResponse, unmarshalListModelsResponse, unmarshalListNodeTypesResponse, unmarshalModel, unmarshalSetDeploymentACLRulesResponse } from "./marshalling.gen.js";
|
|
3
|
+
import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
|
+
var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
5
|
+
/**
|
|
6
|
+
* Managed Inference API.
|
|
7
|
+
|
|
8
|
+
This API allows you to manage your Inference services.
|
|
9
|
+
*/
|
|
10
|
+
var API$1 = class extends API {
|
|
11
|
+
/**
|
|
12
|
+
* Locality of this API.
|
|
13
|
+
* type ∈ {'zone','region','global','unspecified'}
|
|
14
|
+
*/
|
|
15
|
+
static LOCALITY = toApiLocality({ regions: ["fr-par"] });
|
|
16
|
+
pageOfListDeployments = (request = {}) => this.client.fetch({
|
|
17
|
+
method: "GET",
|
|
18
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments`,
|
|
19
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["tags", request.tags])
|
|
20
|
+
}, unmarshalListDeploymentsResponse);
|
|
21
|
+
/**
|
|
22
|
+
* List inference deployments. List all your inference deployments.
|
|
23
|
+
*
|
|
24
|
+
* @param request - The request {@link ListDeploymentsRequest}
|
|
25
|
+
* @returns A Promise of ListDeploymentsResponse
|
|
26
|
+
*/
|
|
27
|
+
listDeployments = (request = {}) => enrichForPagination("deployments", this.pageOfListDeployments, request);
|
|
28
|
+
/**
|
|
29
|
+
* Get a deployment. Get the deployment for the given ID.
|
|
30
|
+
*
|
|
31
|
+
* @param request - The request {@link GetDeploymentRequest}
|
|
32
|
+
* @returns A Promise of Deployment
|
|
33
|
+
*/
|
|
34
|
+
getDeployment = (request) => this.client.fetch({
|
|
35
|
+
method: "GET",
|
|
36
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}`
|
|
37
|
+
}, unmarshalDeployment);
|
|
38
|
+
/**
|
|
39
|
+
* Waits for {@link Deployment} to be in a final state.
|
|
40
|
+
*
|
|
41
|
+
* @param request - The request {@link GetDeploymentRequest}
|
|
42
|
+
* @param options - The waiting options
|
|
43
|
+
* @returns A Promise of Deployment
|
|
44
|
+
*/
|
|
45
|
+
waitForDeployment = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!DEPLOYMENT_TRANSIENT_STATUSES.includes(res.status))), this.getDeployment, request, options);
|
|
46
|
+
/**
|
|
47
|
+
* Create a deployment. Create a new inference deployment related to a specific model.
|
|
48
|
+
*
|
|
49
|
+
* @param request - The request {@link CreateDeploymentRequest}
|
|
50
|
+
* @returns A Promise of Deployment
|
|
51
|
+
*/
|
|
52
|
+
createDeployment = (request) => this.client.fetch({
|
|
53
|
+
body: JSON.stringify(marshalCreateDeploymentRequest(request, this.client.settings)),
|
|
54
|
+
headers: jsonContentHeaders,
|
|
55
|
+
method: "POST",
|
|
56
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments`
|
|
57
|
+
}, unmarshalDeployment);
|
|
58
|
+
/**
|
|
59
|
+
* Update a deployment. Update an existing inference deployment.
|
|
60
|
+
*
|
|
61
|
+
* @param request - The request {@link UpdateDeploymentRequest}
|
|
62
|
+
* @returns A Promise of Deployment
|
|
63
|
+
*/
|
|
64
|
+
updateDeployment = (request) => this.client.fetch({
|
|
65
|
+
body: JSON.stringify(marshalUpdateDeploymentRequest(request, this.client.settings)),
|
|
66
|
+
headers: jsonContentHeaders,
|
|
67
|
+
method: "PATCH",
|
|
68
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}`
|
|
69
|
+
}, unmarshalDeployment);
|
|
70
|
+
/**
|
|
71
|
+
* Delete a deployment. Delete an existing inference deployment.
|
|
72
|
+
*
|
|
73
|
+
* @param request - The request {@link DeleteDeploymentRequest}
|
|
74
|
+
* @returns A Promise of Deployment
|
|
75
|
+
*/
|
|
76
|
+
deleteDeployment = (request) => this.client.fetch({
|
|
77
|
+
method: "DELETE",
|
|
78
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}`
|
|
79
|
+
}, unmarshalDeployment);
|
|
80
|
+
/**
|
|
81
|
+
* Get the CA certificate. Get the CA certificate used for the deployment of private endpoints.
|
|
82
|
+
The CA certificate will be returned as a PEM file.
|
|
83
|
+
*
|
|
84
|
+
* @param request - The request {@link GetDeploymentCertificateRequest}
|
|
85
|
+
* @returns A Promise of Blob
|
|
86
|
+
*/
|
|
87
|
+
getDeploymentCertificate = (request) => this.client.fetch({
|
|
88
|
+
method: "GET",
|
|
89
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/certificate`,
|
|
90
|
+
urlParams: urlParams(["dl", 1]),
|
|
91
|
+
responseType: "blob"
|
|
92
|
+
});
|
|
93
|
+
/**
|
|
94
|
+
* Create an endpoint. Create a new Endpoint related to a specific deployment.
|
|
95
|
+
*
|
|
96
|
+
* @param request - The request {@link CreateEndpointRequest}
|
|
97
|
+
* @returns A Promise of Endpoint
|
|
98
|
+
*/
|
|
99
|
+
createEndpoint = (request) => this.client.fetch({
|
|
100
|
+
body: JSON.stringify(marshalCreateEndpointRequest(request, this.client.settings)),
|
|
101
|
+
headers: jsonContentHeaders,
|
|
102
|
+
method: "POST",
|
|
103
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints`
|
|
104
|
+
}, unmarshalEndpoint);
|
|
105
|
+
/**
|
|
106
|
+
* Update an endpoint. Update an existing Endpoint.
|
|
107
|
+
*
|
|
108
|
+
* @param request - The request {@link UpdateEndpointRequest}
|
|
109
|
+
* @returns A Promise of Endpoint
|
|
110
|
+
*/
|
|
111
|
+
updateEndpoint = (request) => this.client.fetch({
|
|
112
|
+
body: JSON.stringify(marshalUpdateEndpointRequest(request, this.client.settings)),
|
|
113
|
+
headers: jsonContentHeaders,
|
|
114
|
+
method: "PATCH",
|
|
115
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
|
|
116
|
+
}, unmarshalEndpoint);
|
|
117
|
+
/**
|
|
118
|
+
* Delete an endpoint. Delete an existing Endpoint.
|
|
119
|
+
*
|
|
120
|
+
* @param request - The request {@link DeleteEndpointRequest}
|
|
121
|
+
*/
|
|
122
|
+
deleteEndpoint = (request) => this.client.fetch({
|
|
123
|
+
method: "DELETE",
|
|
124
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
|
|
125
|
+
});
|
|
126
|
+
pageOfListDeploymentACLRules = (request) => this.client.fetch({
|
|
127
|
+
method: "GET",
|
|
128
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/acls`,
|
|
129
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
130
|
+
}, unmarshalListDeploymentACLRulesResponse);
|
|
131
|
+
/**
|
|
132
|
+
* List your ACLs. List ACLs for a specific deployment.
|
|
133
|
+
*
|
|
134
|
+
* @param request - The request {@link ListDeploymentACLRulesRequest}
|
|
135
|
+
* @returns A Promise of ListDeploymentACLRulesResponse
|
|
136
|
+
*/
|
|
137
|
+
listDeploymentACLRules = (request) => enrichForPagination("rules", this.pageOfListDeploymentACLRules, request);
|
|
138
|
+
/**
|
|
139
|
+
* Add new ACLs. Add new ACL rules for a specific deployment.
|
|
140
|
+
*
|
|
141
|
+
* @param request - The request {@link AddDeploymentACLRulesRequest}
|
|
142
|
+
* @returns A Promise of AddDeploymentACLRulesResponse
|
|
143
|
+
*/
|
|
144
|
+
addDeploymentACLRules = (request) => this.client.fetch({
|
|
145
|
+
body: JSON.stringify(marshalAddDeploymentACLRulesRequest(request, this.client.settings)),
|
|
146
|
+
headers: jsonContentHeaders,
|
|
147
|
+
method: "POST",
|
|
148
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/acls`
|
|
149
|
+
}, unmarshalAddDeploymentACLRulesResponse);
|
|
150
|
+
/**
|
|
151
|
+
* Set new ACL. Set new ACL rules for a specific deployment.
|
|
152
|
+
*
|
|
153
|
+
* @param request - The request {@link SetDeploymentACLRulesRequest}
|
|
154
|
+
* @returns A Promise of SetDeploymentACLRulesResponse
|
|
155
|
+
*/
|
|
156
|
+
setDeploymentACLRules = (request) => this.client.fetch({
|
|
157
|
+
body: JSON.stringify(marshalSetDeploymentACLRulesRequest(request, this.client.settings)),
|
|
158
|
+
headers: jsonContentHeaders,
|
|
159
|
+
method: "PUT",
|
|
160
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam("deploymentId", request.deploymentId)}/acls`
|
|
161
|
+
}, unmarshalSetDeploymentACLRulesResponse);
|
|
162
|
+
/**
|
|
163
|
+
* Delete an existing ACL.
|
|
164
|
+
*
|
|
165
|
+
* @param request - The request {@link DeleteDeploymentACLRuleRequest}
|
|
166
|
+
*/
|
|
167
|
+
deleteDeploymentACLRule = (request) => this.client.fetch({
|
|
168
|
+
method: "DELETE",
|
|
169
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/acls/${validatePathParam("aclId", request.aclId)}`
|
|
170
|
+
});
|
|
171
|
+
pageOfListModels = (request = {}) => this.client.fetch({
|
|
172
|
+
method: "GET",
|
|
173
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/models`,
|
|
174
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["tags", request.tags])
|
|
175
|
+
}, unmarshalListModelsResponse);
|
|
176
|
+
/**
|
|
177
|
+
* List models. List all available models.
|
|
178
|
+
*
|
|
179
|
+
* @param request - The request {@link ListModelsRequest}
|
|
180
|
+
* @returns A Promise of ListModelsResponse
|
|
181
|
+
*/
|
|
182
|
+
listModels = (request = {}) => enrichForPagination("models", this.pageOfListModels, request);
|
|
183
|
+
/**
|
|
184
|
+
* Get a model. Get the model for the given ID.
|
|
185
|
+
*
|
|
186
|
+
* @param request - The request {@link GetModelRequest}
|
|
187
|
+
* @returns A Promise of Model
|
|
188
|
+
*/
|
|
189
|
+
getModel = (request) => this.client.fetch({
|
|
190
|
+
method: "GET",
|
|
191
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/models/${validatePathParam("modelId", request.modelId)}`
|
|
192
|
+
}, unmarshalModel);
|
|
193
|
+
getModelEula = (request) => this.client.fetch({
|
|
194
|
+
method: "GET",
|
|
195
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/models/${validatePathParam("modelId", request.modelId)}/eula`
|
|
196
|
+
}, unmarshalEula);
|
|
197
|
+
pageOfListNodeTypes = (request) => this.client.fetch({
|
|
198
|
+
method: "GET",
|
|
199
|
+
path: `/inference/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/node-types`,
|
|
200
|
+
urlParams: urlParams(["include_disabled_types", request.includeDisabledTypes], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
201
|
+
}, unmarshalListNodeTypesResponse);
|
|
202
|
+
/**
|
|
203
|
+
* List available node types. List all available node types. By default, the node types returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
|
|
204
|
+
*
|
|
205
|
+
* @param request - The request {@link ListNodeTypesRequest}
|
|
206
|
+
* @returns A Promise of ListNodeTypesResponse
|
|
207
|
+
*/
|
|
208
|
+
listNodeTypes = (request) => enrichForPagination("nodeTypes", this.pageOfListNodeTypes, request);
|
|
302
209
|
};
|
|
210
|
+
export { API$1 as API };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
/** Lists transient statutes of the enum {@link DeploymentStatus}. */
|
|
1
2
|
const DEPLOYMENT_TRANSIENT_STATUSES = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
"creating",
|
|
4
|
+
"deploying",
|
|
5
|
+
"deleting",
|
|
6
|
+
"scaling"
|
|
6
7
|
];
|
|
7
|
-
export {
|
|
8
|
-
DEPLOYMENT_TRANSIENT_STATUSES
|
|
9
|
-
};
|
|
8
|
+
export { DEPLOYMENT_TRANSIENT_STATUSES };
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { DEPLOYMENT_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
3
|
import { marshalAddDeploymentACLRulesRequest, marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalSetDeploymentACLRulesRequest, marshalUpdateDeploymentRequest, marshalUpdateEndpointRequest, unmarshalAddDeploymentACLRulesResponse, unmarshalDeployment, unmarshalEndpoint, unmarshalEula, unmarshalListDeploymentACLRulesResponse, unmarshalListDeploymentsResponse, unmarshalListModelsResponse, unmarshalListNodeTypesResponse, unmarshalModel, unmarshalSetDeploymentACLRulesResponse } from "./marshalling.gen.js";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
4
|
+
import { API } from "./api.gen.js";
|
|
5
|
+
import { validation_rules_gen_exports } from "./validation-rules.gen.js";
|
|
6
|
+
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
+
API: () => API,
|
|
8
|
+
DEPLOYMENT_TRANSIENT_STATUSES: () => DEPLOYMENT_TRANSIENT_STATUSES,
|
|
9
|
+
ValidationRules: () => validation_rules_gen_exports,
|
|
10
|
+
marshalAddDeploymentACLRulesRequest: () => marshalAddDeploymentACLRulesRequest,
|
|
11
|
+
marshalCreateDeploymentRequest: () => marshalCreateDeploymentRequest,
|
|
12
|
+
marshalCreateEndpointRequest: () => marshalCreateEndpointRequest,
|
|
13
|
+
marshalSetDeploymentACLRulesRequest: () => marshalSetDeploymentACLRulesRequest,
|
|
14
|
+
marshalUpdateDeploymentRequest: () => marshalUpdateDeploymentRequest,
|
|
15
|
+
marshalUpdateEndpointRequest: () => marshalUpdateEndpointRequest,
|
|
16
|
+
unmarshalAddDeploymentACLRulesResponse: () => unmarshalAddDeploymentACLRulesResponse,
|
|
17
|
+
unmarshalDeployment: () => unmarshalDeployment,
|
|
18
|
+
unmarshalEndpoint: () => unmarshalEndpoint,
|
|
19
|
+
unmarshalEula: () => unmarshalEula,
|
|
20
|
+
unmarshalListDeploymentACLRulesResponse: () => unmarshalListDeploymentACLRulesResponse,
|
|
21
|
+
unmarshalListDeploymentsResponse: () => unmarshalListDeploymentsResponse,
|
|
22
|
+
unmarshalListModelsResponse: () => unmarshalListModelsResponse,
|
|
23
|
+
unmarshalListNodeTypesResponse: () => unmarshalListNodeTypesResponse,
|
|
24
|
+
unmarshalModel: () => unmarshalModel,
|
|
25
|
+
unmarshalSetDeploymentACLRulesResponse: () => unmarshalSetDeploymentACLRulesResponse
|
|
26
|
+
});
|
|
27
|
+
export { index_gen_exports };
|