@scaleway/sdk-inference 2.3.1 → 2.3.2
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/dist/_virtual/_rolldown/runtime.js +2 -0
- package/dist/v1/api.gen.js +5 -3
- package/dist/v1/content.gen.js +4 -2
- package/dist/v1/index.gen.js +3 -1
- package/dist/v1/marshalling.gen.js +13 -11
- package/dist/v1/types.gen.js +0 -0
- package/dist/v1/validation-rules.gen.js +9 -7
- package/dist/v1beta1/api.gen.js +5 -3
- package/dist/v1beta1/content.gen.js +3 -1
- package/dist/v1beta1/index.gen.js +3 -1
- package/dist/v1beta1/marshalling.gen.js +18 -16
- package/dist/v1beta1/types.gen.js +0 -0
- package/dist/v1beta1/validation-rules.gen.js +7 -5
- package/package.json +5 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __exportAll = (all, no_symbols) => {
|
|
3
4
|
let target = {};
|
|
@@ -8,4 +9,5 @@ var __exportAll = (all, no_symbols) => {
|
|
|
8
9
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
9
10
|
return target;
|
|
10
11
|
};
|
|
12
|
+
//#endregion
|
|
11
13
|
export { __exportAll };
|
package/dist/v1/api.gen.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { DEPLOYMENT_TRANSIENT_STATUSES, MODEL_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
2
|
import { marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalCreateModelRequest, marshalUpdateDeploymentRequest, marshalUpdateEndpointRequest, unmarshalDeployment, unmarshalEndpoint, unmarshalListDeploymentsResponse, unmarshalListModelsResponse, unmarshalListNodeTypesResponse, unmarshalModel } from "./marshalling.gen.js";
|
|
3
|
-
import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
3
|
+
import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
|
+
//#region src/v1/api.gen.ts
|
|
4
5
|
var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
5
6
|
/**
|
|
6
7
|
* Managed Inference API.
|
|
7
8
|
|
|
8
9
|
This API allows you to handle your Managed Inference services.
|
|
9
10
|
*/
|
|
10
|
-
var API
|
|
11
|
+
var API = class extends API$1 {
|
|
11
12
|
/**
|
|
12
13
|
* Locality of this API.
|
|
13
14
|
* type ∈ {'zone','region','global','unspecified'}
|
|
@@ -187,4 +188,5 @@ var API$1 = class extends API {
|
|
|
187
188
|
*/
|
|
188
189
|
listNodeTypes = (request) => enrichForPagination("nodeTypes", this.pageOfListNodeTypes, request);
|
|
189
190
|
};
|
|
190
|
-
|
|
191
|
+
//#endregion
|
|
192
|
+
export { API };
|
package/dist/v1/content.gen.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
//#region src/v1/content.gen.ts
|
|
1
2
|
/** Lists transient statutes of the enum {@link DeploymentStatus}. */
|
|
2
|
-
|
|
3
|
+
var DEPLOYMENT_TRANSIENT_STATUSES = [
|
|
3
4
|
"creating",
|
|
4
5
|
"deploying",
|
|
5
6
|
"deleting",
|
|
6
7
|
"scaling"
|
|
7
8
|
];
|
|
8
9
|
/** Lists transient statutes of the enum {@link ModelStatus}. */
|
|
9
|
-
|
|
10
|
+
var MODEL_TRANSIENT_STATUSES = ["preparing", "downloading"];
|
|
11
|
+
//#endregion
|
|
10
12
|
export { DEPLOYMENT_TRANSIENT_STATUSES, MODEL_TRANSIENT_STATUSES };
|
package/dist/v1/index.gen.js
CHANGED
|
@@ -3,6 +3,7 @@ import { DEPLOYMENT_TRANSIENT_STATUSES, MODEL_TRANSIENT_STATUSES } from "./conte
|
|
|
3
3
|
import { marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalCreateModelRequest, marshalUpdateDeploymentRequest, marshalUpdateEndpointRequest, unmarshalDeployment, unmarshalEndpoint, unmarshalListDeploymentsResponse, unmarshalListModelsResponse, unmarshalListNodeTypesResponse, unmarshalModel } from "./marshalling.gen.js";
|
|
4
4
|
import { API } from "./api.gen.js";
|
|
5
5
|
import { validation_rules_gen_exports } from "./validation-rules.gen.js";
|
|
6
|
+
//#region src/v1/index.gen.ts
|
|
6
7
|
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
7
8
|
API: () => API,
|
|
8
9
|
DEPLOYMENT_TRANSIENT_STATUSES: () => DEPLOYMENT_TRANSIENT_STATUSES,
|
|
@@ -20,4 +21,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
20
21
|
unmarshalListNodeTypesResponse: () => unmarshalListNodeTypesResponse,
|
|
21
22
|
unmarshalModel: () => unmarshalModel
|
|
22
23
|
});
|
|
23
|
-
|
|
24
|
+
//#endregion
|
|
25
|
+
export { API, DEPLOYMENT_TRANSIENT_STATUSES, MODEL_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalCreateModelRequest, marshalUpdateDeploymentRequest, marshalUpdateEndpointRequest, unmarshalDeployment, unmarshalEndpoint, unmarshalListDeploymentsResponse, unmarshalListModelsResponse, unmarshalListNodeTypesResponse, unmarshalModel };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
2
2
|
import randomName from "@scaleway/random-name";
|
|
3
|
+
//#region src/v1/marshalling.gen.ts
|
|
3
4
|
var unmarshalEndpointPrivateNetworkDetails = (data) => {
|
|
4
5
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary.`);
|
|
5
6
|
return { privateNetworkId: data.private_network_id };
|
|
@@ -8,7 +9,7 @@ var unmarshalEndpointPublicNetworkDetails = (data) => {
|
|
|
8
9
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPublicNetworkDetails' failed as data isn't a dictionary.`);
|
|
9
10
|
return {};
|
|
10
11
|
};
|
|
11
|
-
|
|
12
|
+
var unmarshalEndpoint = (data) => {
|
|
12
13
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`);
|
|
13
14
|
return {
|
|
14
15
|
disableAuth: data.disable_auth,
|
|
@@ -22,7 +23,7 @@ var unmarshalDeploymentQuantization = (data) => {
|
|
|
22
23
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DeploymentQuantization' failed as data isn't a dictionary.`);
|
|
23
24
|
return { bits: data.bits };
|
|
24
25
|
};
|
|
25
|
-
|
|
26
|
+
var unmarshalDeployment = (data) => {
|
|
26
27
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Deployment' failed as data isn't a dictionary.`);
|
|
27
28
|
return {
|
|
28
29
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -63,7 +64,7 @@ var unmarshalModelSupportInfo = (data) => {
|
|
|
63
64
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ModelSupportInfo' failed as data isn't a dictionary.`);
|
|
64
65
|
return { nodes: unmarshalArrayOfObject(data.nodes, unmarshalModelSupportedNode) };
|
|
65
66
|
};
|
|
66
|
-
|
|
67
|
+
var unmarshalModel = (data) => {
|
|
67
68
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Model' failed as data isn't a dictionary.`);
|
|
68
69
|
return {
|
|
69
70
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -82,14 +83,14 @@ const unmarshalModel = (data) => {
|
|
|
82
83
|
updatedAt: unmarshalDate(data.updated_at)
|
|
83
84
|
};
|
|
84
85
|
};
|
|
85
|
-
|
|
86
|
+
var unmarshalListDeploymentsResponse = (data) => {
|
|
86
87
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDeploymentsResponse' failed as data isn't a dictionary.`);
|
|
87
88
|
return {
|
|
88
89
|
deployments: unmarshalArrayOfObject(data.deployments, unmarshalDeployment),
|
|
89
90
|
totalCount: data.total_count
|
|
90
91
|
};
|
|
91
92
|
};
|
|
92
|
-
|
|
93
|
+
var unmarshalListModelsResponse = (data) => {
|
|
93
94
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListModelsResponse' failed as data isn't a dictionary.`);
|
|
94
95
|
return {
|
|
95
96
|
models: unmarshalArrayOfObject(data.models, unmarshalModel),
|
|
@@ -113,7 +114,7 @@ var unmarshalNodeType = (data) => {
|
|
|
113
114
|
vram: data.vram
|
|
114
115
|
};
|
|
115
116
|
};
|
|
116
|
-
|
|
117
|
+
var unmarshalListNodeTypesResponse = (data) => {
|
|
117
118
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`);
|
|
118
119
|
return {
|
|
119
120
|
nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
|
|
@@ -133,7 +134,7 @@ var marshalEndpointSpec = (request, defaults) => ({
|
|
|
133
134
|
value: request.privateNetwork !== void 0 ? marshalEndpointPrivateNetworkDetails(request.privateNetwork, defaults) : void 0
|
|
134
135
|
}])
|
|
135
136
|
});
|
|
136
|
-
|
|
137
|
+
var marshalCreateDeploymentRequest = (request, defaults) => ({
|
|
137
138
|
accept_eula: request.acceptEula,
|
|
138
139
|
endpoints: request.endpoints.map((elt) => marshalEndpointSpec(elt, defaults)),
|
|
139
140
|
max_size: request.maxSize,
|
|
@@ -145,7 +146,7 @@ const marshalCreateDeploymentRequest = (request, defaults) => ({
|
|
|
145
146
|
quantization: request.quantization !== void 0 ? marshalDeploymentQuantization(request.quantization, defaults) : void 0,
|
|
146
147
|
tags: request.tags
|
|
147
148
|
});
|
|
148
|
-
|
|
149
|
+
var marshalCreateEndpointRequest = (request, defaults) => ({
|
|
149
150
|
deployment_id: request.deploymentId,
|
|
150
151
|
endpoint: marshalEndpointSpec(request.endpoint, defaults)
|
|
151
152
|
});
|
|
@@ -156,12 +157,12 @@ var marshalModelSource = (request, defaults) => ({
|
|
|
156
157
|
value: request.secret
|
|
157
158
|
}])
|
|
158
159
|
});
|
|
159
|
-
|
|
160
|
+
var marshalCreateModelRequest = (request, defaults) => ({
|
|
160
161
|
name: request.name || randomName("model"),
|
|
161
162
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
162
163
|
source: marshalModelSource(request.source, defaults)
|
|
163
164
|
});
|
|
164
|
-
|
|
165
|
+
var marshalUpdateDeploymentRequest = (request, defaults) => ({
|
|
165
166
|
max_size: request.maxSize,
|
|
166
167
|
min_size: request.minSize,
|
|
167
168
|
model_id: request.modelId,
|
|
@@ -169,5 +170,6 @@ const marshalUpdateDeploymentRequest = (request, defaults) => ({
|
|
|
169
170
|
quantization: request.quantization !== void 0 ? marshalDeploymentQuantization(request.quantization, defaults) : void 0,
|
|
170
171
|
tags: request.tags
|
|
171
172
|
});
|
|
172
|
-
|
|
173
|
+
var marshalUpdateEndpointRequest = (request, defaults) => ({ disable_auth: request.disableAuth });
|
|
174
|
+
//#endregion
|
|
173
175
|
export { marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalCreateModelRequest, marshalUpdateDeploymentRequest, marshalUpdateEndpointRequest, unmarshalDeployment, unmarshalEndpoint, unmarshalListDeploymentsResponse, unmarshalListModelsResponse, unmarshalListNodeTypesResponse, unmarshalModel };
|
|
File without changes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region src/v1/validation-rules.gen.ts
|
|
2
3
|
var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
|
|
3
4
|
CreateDeploymentRequest: () => CreateDeploymentRequest,
|
|
4
5
|
CreateModelRequest: () => CreateModelRequest,
|
|
@@ -7,7 +8,7 @@ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
7
8
|
ListModelsRequest: () => ListModelsRequest,
|
|
8
9
|
UpdateDeploymentRequest: () => UpdateDeploymentRequest
|
|
9
10
|
});
|
|
10
|
-
|
|
11
|
+
var CreateDeploymentRequest = {
|
|
11
12
|
maxSize: {
|
|
12
13
|
greaterThanOrEqual: 1,
|
|
13
14
|
lessThanOrEqual: 50
|
|
@@ -26,21 +27,21 @@ const CreateDeploymentRequest = {
|
|
|
26
27
|
minLength: 1
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
|
-
|
|
30
|
+
var CreateModelRequest = { name: {
|
|
30
31
|
maxLength: 255,
|
|
31
32
|
minLength: 1,
|
|
32
33
|
pattern: /^[A-Za-z0-9-_/.:]+$/
|
|
33
34
|
} };
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
var DeploymentQuantization = { bits: { lessThanOrEqual: 32 } };
|
|
36
|
+
var ListDeploymentsRequest = { name: {
|
|
36
37
|
maxLength: 255,
|
|
37
38
|
minLength: 1
|
|
38
39
|
} };
|
|
39
|
-
|
|
40
|
+
var ListModelsRequest = { name: {
|
|
40
41
|
maxLength: 255,
|
|
41
42
|
minLength: 1
|
|
42
43
|
} };
|
|
43
|
-
|
|
44
|
+
var UpdateDeploymentRequest = {
|
|
44
45
|
maxSize: {
|
|
45
46
|
greaterThanOrEqual: 1,
|
|
46
47
|
lessThanOrEqual: 50
|
|
@@ -55,4 +56,5 @@ const UpdateDeploymentRequest = {
|
|
|
55
56
|
pattern: /^[A-Za-z0-9-_]+$/
|
|
56
57
|
}
|
|
57
58
|
};
|
|
58
|
-
|
|
59
|
+
//#endregion
|
|
60
|
+
export { CreateDeploymentRequest, CreateModelRequest, DeploymentQuantization, ListDeploymentsRequest, ListModelsRequest, UpdateDeploymentRequest, validation_rules_gen_exports };
|
package/dist/v1beta1/api.gen.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { DEPLOYMENT_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
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";
|
|
3
|
+
import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
|
+
//#region src/v1beta1/api.gen.ts
|
|
4
5
|
var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
5
6
|
/**
|
|
6
7
|
* Managed Inference API.
|
|
7
8
|
|
|
8
9
|
This API allows you to manage your Inference services.
|
|
9
10
|
*/
|
|
10
|
-
var API
|
|
11
|
+
var API = class extends API$1 {
|
|
11
12
|
/**
|
|
12
13
|
* Locality of this API.
|
|
13
14
|
* type ∈ {'zone','region','global','unspecified'}
|
|
@@ -207,4 +208,5 @@ var API$1 = class extends API {
|
|
|
207
208
|
*/
|
|
208
209
|
listNodeTypes = (request) => enrichForPagination("nodeTypes", this.pageOfListNodeTypes, request);
|
|
209
210
|
};
|
|
210
|
-
|
|
211
|
+
//#endregion
|
|
212
|
+
export { API };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
//#region src/v1beta1/content.gen.ts
|
|
1
2
|
/** Lists transient statutes of the enum {@link DeploymentStatus}. */
|
|
2
|
-
|
|
3
|
+
var DEPLOYMENT_TRANSIENT_STATUSES = [
|
|
3
4
|
"creating",
|
|
4
5
|
"deploying",
|
|
5
6
|
"deleting",
|
|
6
7
|
"scaling"
|
|
7
8
|
];
|
|
9
|
+
//#endregion
|
|
8
10
|
export { DEPLOYMENT_TRANSIENT_STATUSES };
|
|
@@ -3,6 +3,7 @@ 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
4
|
import { API } from "./api.gen.js";
|
|
5
5
|
import { validation_rules_gen_exports } from "./validation-rules.gen.js";
|
|
6
|
+
//#region src/v1beta1/index.gen.ts
|
|
6
7
|
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
7
8
|
API: () => API,
|
|
8
9
|
DEPLOYMENT_TRANSIENT_STATUSES: () => DEPLOYMENT_TRANSIENT_STATUSES,
|
|
@@ -24,4 +25,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
24
25
|
unmarshalModel: () => unmarshalModel,
|
|
25
26
|
unmarshalSetDeploymentACLRulesResponse: () => unmarshalSetDeploymentACLRulesResponse
|
|
26
27
|
});
|
|
27
|
-
|
|
28
|
+
//#endregion
|
|
29
|
+
export { API, DEPLOYMENT_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalAddDeploymentACLRulesRequest, marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalSetDeploymentACLRulesRequest, marshalUpdateDeploymentRequest, marshalUpdateEndpointRequest, unmarshalAddDeploymentACLRulesResponse, unmarshalDeployment, unmarshalEndpoint, unmarshalEula, unmarshalListDeploymentACLRulesResponse, unmarshalListDeploymentsResponse, unmarshalListModelsResponse, unmarshalListNodeTypesResponse, unmarshalModel, unmarshalSetDeploymentACLRulesResponse };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
2
2
|
import randomName from "@scaleway/random-name";
|
|
3
|
+
//#region src/v1beta1/marshalling.gen.ts
|
|
3
4
|
var unmarshalEndpointPrivateNetworkDetails = (data) => {
|
|
4
5
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary.`);
|
|
5
6
|
return { privateNetworkId: data.private_network_id };
|
|
@@ -8,7 +9,7 @@ var unmarshalEndpointPublicAccessDetails = (data) => {
|
|
|
8
9
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPublicAccessDetails' failed as data isn't a dictionary.`);
|
|
9
10
|
return {};
|
|
10
11
|
};
|
|
11
|
-
|
|
12
|
+
var unmarshalEndpoint = (data) => {
|
|
12
13
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`);
|
|
13
14
|
return {
|
|
14
15
|
disableAuth: data.disable_auth,
|
|
@@ -18,7 +19,7 @@ const unmarshalEndpoint = (data) => {
|
|
|
18
19
|
url: data.url
|
|
19
20
|
};
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
+
var unmarshalDeployment = (data) => {
|
|
22
23
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Deployment' failed as data isn't a dictionary.`);
|
|
23
24
|
return {
|
|
24
25
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -48,7 +49,7 @@ var unmarshalModelS3Model = (data) => {
|
|
|
48
49
|
tritonServerVersion: data.triton_server_version
|
|
49
50
|
};
|
|
50
51
|
};
|
|
51
|
-
|
|
52
|
+
var unmarshalModel = (data) => {
|
|
52
53
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Model' failed as data isn't a dictionary.`);
|
|
53
54
|
return {
|
|
54
55
|
compatibleNodeTypes: data.compatible_node_types,
|
|
@@ -75,29 +76,29 @@ var unmarshalACLRule = (data) => {
|
|
|
75
76
|
ip: data.ip
|
|
76
77
|
};
|
|
77
78
|
};
|
|
78
|
-
|
|
79
|
+
var unmarshalAddDeploymentACLRulesResponse = (data) => {
|
|
79
80
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddDeploymentACLRulesResponse' failed as data isn't a dictionary.`);
|
|
80
81
|
return { rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule) };
|
|
81
82
|
};
|
|
82
|
-
|
|
83
|
+
var unmarshalEula = (data) => {
|
|
83
84
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Eula' failed as data isn't a dictionary.`);
|
|
84
85
|
return { content: data.content };
|
|
85
86
|
};
|
|
86
|
-
|
|
87
|
+
var unmarshalListDeploymentACLRulesResponse = (data) => {
|
|
87
88
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDeploymentACLRulesResponse' failed as data isn't a dictionary.`);
|
|
88
89
|
return {
|
|
89
90
|
rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule),
|
|
90
91
|
totalCount: data.total_count
|
|
91
92
|
};
|
|
92
93
|
};
|
|
93
|
-
|
|
94
|
+
var unmarshalListDeploymentsResponse = (data) => {
|
|
94
95
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDeploymentsResponse' failed as data isn't a dictionary.`);
|
|
95
96
|
return {
|
|
96
97
|
deployments: unmarshalArrayOfObject(data.deployments, unmarshalDeployment),
|
|
97
98
|
totalCount: data.total_count
|
|
98
99
|
};
|
|
99
100
|
};
|
|
100
|
-
|
|
101
|
+
var unmarshalListModelsResponse = (data) => {
|
|
101
102
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListModelsResponse' failed as data isn't a dictionary.`);
|
|
102
103
|
return {
|
|
103
104
|
models: unmarshalArrayOfObject(data.models, unmarshalModel),
|
|
@@ -121,14 +122,14 @@ var unmarshalNodeType = (data) => {
|
|
|
121
122
|
vram: data.vram
|
|
122
123
|
};
|
|
123
124
|
};
|
|
124
|
-
|
|
125
|
+
var unmarshalListNodeTypesResponse = (data) => {
|
|
125
126
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`);
|
|
126
127
|
return {
|
|
127
128
|
nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
|
|
128
129
|
totalCount: data.total_count
|
|
129
130
|
};
|
|
130
131
|
};
|
|
131
|
-
|
|
132
|
+
var unmarshalSetDeploymentACLRulesResponse = (data) => {
|
|
132
133
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetDeploymentACLRulesResponse' failed as data isn't a dictionary.`);
|
|
133
134
|
return { rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule) };
|
|
134
135
|
};
|
|
@@ -136,7 +137,7 @@ var marshalACLRuleRequest = (request, defaults) => ({
|
|
|
136
137
|
description: request.description,
|
|
137
138
|
ip: request.ip
|
|
138
139
|
});
|
|
139
|
-
|
|
140
|
+
var marshalAddDeploymentACLRulesRequest = (request, defaults) => ({ acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt, defaults)) : void 0 });
|
|
140
141
|
var marshalEndpointSpecPrivateNetwork = (request, defaults) => ({ private_network_id: request.privateNetworkId });
|
|
141
142
|
var marshalEndpointSpecPublic = (request, defaults) => ({});
|
|
142
143
|
var marshalEndpointSpec = (request, defaults) => ({
|
|
@@ -149,7 +150,7 @@ var marshalEndpointSpec = (request, defaults) => ({
|
|
|
149
150
|
value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetwork(request.privateNetwork, defaults) : void 0
|
|
150
151
|
}])
|
|
151
152
|
});
|
|
152
|
-
|
|
153
|
+
var marshalCreateDeploymentRequest = (request, defaults) => ({
|
|
153
154
|
accept_eula: request.acceptEula,
|
|
154
155
|
endpoints: request.endpoints.map((elt) => marshalEndpointSpec(elt, defaults)),
|
|
155
156
|
max_size: request.maxSize,
|
|
@@ -160,16 +161,17 @@ const marshalCreateDeploymentRequest = (request, defaults) => ({
|
|
|
160
161
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
161
162
|
tags: request.tags
|
|
162
163
|
});
|
|
163
|
-
|
|
164
|
+
var marshalCreateEndpointRequest = (request, defaults) => ({
|
|
164
165
|
deployment_id: request.deploymentId,
|
|
165
166
|
endpoint: marshalEndpointSpec(request.endpoint, defaults)
|
|
166
167
|
});
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
var marshalSetDeploymentACLRulesRequest = (request, defaults) => ({ acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt, defaults)) : void 0 });
|
|
169
|
+
var marshalUpdateDeploymentRequest = (request, defaults) => ({
|
|
169
170
|
max_size: request.maxSize,
|
|
170
171
|
min_size: request.minSize,
|
|
171
172
|
name: request.name,
|
|
172
173
|
tags: request.tags
|
|
173
174
|
});
|
|
174
|
-
|
|
175
|
+
var marshalUpdateEndpointRequest = (request, defaults) => ({ disable_auth: request.disableAuth });
|
|
176
|
+
//#endregion
|
|
175
177
|
export { marshalAddDeploymentACLRulesRequest, marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalSetDeploymentACLRulesRequest, marshalUpdateDeploymentRequest, marshalUpdateEndpointRequest, unmarshalAddDeploymentACLRulesResponse, unmarshalDeployment, unmarshalEndpoint, unmarshalEula, unmarshalListDeploymentACLRulesResponse, unmarshalListDeploymentsResponse, unmarshalListModelsResponse, unmarshalListNodeTypesResponse, unmarshalModel, unmarshalSetDeploymentACLRulesResponse };
|
|
File without changes
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region src/v1beta1/validation-rules.gen.ts
|
|
2
3
|
var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
|
|
3
4
|
CreateDeploymentRequest: () => CreateDeploymentRequest,
|
|
4
5
|
ListDeploymentsRequest: () => ListDeploymentsRequest,
|
|
5
6
|
ListModelsRequest: () => ListModelsRequest,
|
|
6
7
|
UpdateDeploymentRequest: () => UpdateDeploymentRequest
|
|
7
8
|
});
|
|
8
|
-
|
|
9
|
+
var CreateDeploymentRequest = {
|
|
9
10
|
maxSize: {
|
|
10
11
|
greaterThanOrEqual: 1,
|
|
11
12
|
lessThanOrEqual: 50
|
|
@@ -29,15 +30,15 @@ const CreateDeploymentRequest = {
|
|
|
29
30
|
minLength: 1
|
|
30
31
|
}
|
|
31
32
|
};
|
|
32
|
-
|
|
33
|
+
var ListDeploymentsRequest = { name: {
|
|
33
34
|
maxLength: 255,
|
|
34
35
|
minLength: 1
|
|
35
36
|
} };
|
|
36
|
-
|
|
37
|
+
var ListModelsRequest = { name: {
|
|
37
38
|
maxLength: 255,
|
|
38
39
|
minLength: 1
|
|
39
40
|
} };
|
|
40
|
-
|
|
41
|
+
var UpdateDeploymentRequest = {
|
|
41
42
|
maxSize: {
|
|
42
43
|
greaterThanOrEqual: 1,
|
|
43
44
|
lessThanOrEqual: 50
|
|
@@ -51,4 +52,5 @@ const UpdateDeploymentRequest = {
|
|
|
51
52
|
minLength: 1
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
|
-
|
|
55
|
+
//#endregion
|
|
56
|
+
export { CreateDeploymentRequest, ListDeploymentsRequest, ListModelsRequest, UpdateDeploymentRequest, validation_rules_gen_exports };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-inference",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "Scaleway SDK inference",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"node": ">=20.19.6"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@scaleway/random-name": "5.1.
|
|
30
|
-
"@scaleway/sdk-std": "2.2.
|
|
29
|
+
"@scaleway/random-name": "5.1.4",
|
|
30
|
+
"@scaleway/sdk-std": "2.2.2"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@scaleway/sdk-client": "^2.2.
|
|
33
|
+
"@scaleway/sdk-client": "^2.2.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^2.2.
|
|
36
|
+
"@scaleway/sdk-client": "^2.2.2"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"package:check": "pnpm publint",
|