@scaleway/sdk-inference 2.3.1 → 2.4.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.
@@ -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 };
@@ -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$1 = class extends 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
- export { API$1 as API };
191
+ //#endregion
192
+ export { API };
@@ -1,10 +1,12 @@
1
+ //#region src/v1/content.gen.ts
1
2
  /** Lists transient statutes of the enum {@link DeploymentStatus}. */
2
- const DEPLOYMENT_TRANSIENT_STATUSES = [
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
- const MODEL_TRANSIENT_STATUSES = ["preparing", "downloading"];
10
+ var MODEL_TRANSIENT_STATUSES = ["preparing", "downloading"];
11
+ //#endregion
10
12
  export { DEPLOYMENT_TRANSIENT_STATUSES, MODEL_TRANSIENT_STATUSES };
@@ -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
- export { index_gen_exports };
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
- const unmarshalEndpoint = (data) => {
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
- const unmarshalDeployment = (data) => {
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
- const unmarshalModel = (data) => {
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
- const unmarshalListDeploymentsResponse = (data) => {
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
- const unmarshalListModelsResponse = (data) => {
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
- const unmarshalListNodeTypesResponse = (data) => {
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
- const marshalCreateDeploymentRequest = (request, defaults) => ({
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
- const marshalCreateEndpointRequest = (request, defaults) => ({
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
- const marshalCreateModelRequest = (request, defaults) => ({
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
- const marshalUpdateDeploymentRequest = (request, defaults) => ({
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
- const marshalUpdateEndpointRequest = (request, defaults) => ({ disable_auth: request.disableAuth });
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 };
@@ -0,0 +1,70 @@
1
+ export declare const queriesMetadata: {
2
+ readonly namespace: "inference";
3
+ readonly version: "v1";
4
+ readonly folderName: "inferencev1";
5
+ readonly services: readonly [{
6
+ readonly apiClass: "API";
7
+ readonly methods: readonly [{
8
+ readonly methodName: "listDeployments";
9
+ readonly protoName: "ListDeployments";
10
+ readonly paramsType: "ListDeploymentsRequest";
11
+ readonly returnType: "ListDeploymentsResponse";
12
+ readonly isList: true;
13
+ readonly paginationType: "offset";
14
+ readonly pageParamKey: "page";
15
+ readonly listItemType: "Deployment";
16
+ readonly isPrivate: false;
17
+ readonly description: "\"";
18
+ }, {
19
+ readonly methodName: "getDeployment";
20
+ readonly protoName: "GetDeployment";
21
+ readonly paramsType: "GetDeploymentRequest";
22
+ readonly returnType: "Deployment";
23
+ readonly isList: false;
24
+ readonly paginationType: "none";
25
+ readonly isPrivate: false;
26
+ readonly description: "\"";
27
+ }, {
28
+ readonly methodName: "getDeploymentCertificate";
29
+ readonly protoName: "GetDeploymentCertificate";
30
+ readonly paramsType: "GetDeploymentCertificateRequest";
31
+ readonly returnType: "Blob";
32
+ readonly isList: false;
33
+ readonly paginationType: "none";
34
+ readonly isPrivate: false;
35
+ readonly description: "\"";
36
+ }, {
37
+ readonly methodName: "listModels";
38
+ readonly protoName: "ListModels";
39
+ readonly paramsType: "ListModelsRequest";
40
+ readonly returnType: "ListModelsResponse";
41
+ readonly isList: true;
42
+ readonly paginationType: "offset";
43
+ readonly pageParamKey: "page";
44
+ readonly listItemType: "Model";
45
+ readonly isPrivate: false;
46
+ readonly description: "\"";
47
+ }, {
48
+ readonly methodName: "getModel";
49
+ readonly protoName: "GetModel";
50
+ readonly paramsType: "GetModelRequest";
51
+ readonly returnType: "Model";
52
+ readonly isList: false;
53
+ readonly paginationType: "none";
54
+ readonly isPrivate: false;
55
+ readonly description: "\"";
56
+ }, {
57
+ readonly methodName: "listNodeTypes";
58
+ readonly protoName: "ListNodeTypes";
59
+ readonly paramsType: "ListNodeTypesRequest";
60
+ readonly returnType: "ListNodeTypesResponse";
61
+ readonly isList: true;
62
+ readonly paginationType: "offset";
63
+ readonly pageParamKey: "page";
64
+ readonly listItemType: "NodeType";
65
+ readonly isPrivate: false;
66
+ readonly description: "\"";
67
+ }];
68
+ }];
69
+ };
70
+ export type QueriesMetadata = typeof queriesMetadata;
@@ -0,0 +1,79 @@
1
+ //#region src/v1/metadata.gen.ts
2
+ var queriesMetadata = {
3
+ namespace: "inference",
4
+ version: "v1",
5
+ folderName: "inferencev1",
6
+ services: [{
7
+ apiClass: "API",
8
+ methods: [
9
+ {
10
+ methodName: "listDeployments",
11
+ protoName: "ListDeployments",
12
+ paramsType: "ListDeploymentsRequest",
13
+ returnType: "ListDeploymentsResponse",
14
+ isList: true,
15
+ paginationType: "offset",
16
+ pageParamKey: "page",
17
+ listItemType: "Deployment",
18
+ isPrivate: false,
19
+ description: "\""
20
+ },
21
+ {
22
+ methodName: "getDeployment",
23
+ protoName: "GetDeployment",
24
+ paramsType: "GetDeploymentRequest",
25
+ returnType: "Deployment",
26
+ isList: false,
27
+ paginationType: "none",
28
+ isPrivate: false,
29
+ description: "\""
30
+ },
31
+ {
32
+ methodName: "getDeploymentCertificate",
33
+ protoName: "GetDeploymentCertificate",
34
+ paramsType: "GetDeploymentCertificateRequest",
35
+ returnType: "Blob",
36
+ isList: false,
37
+ paginationType: "none",
38
+ isPrivate: false,
39
+ description: "\""
40
+ },
41
+ {
42
+ methodName: "listModels",
43
+ protoName: "ListModels",
44
+ paramsType: "ListModelsRequest",
45
+ returnType: "ListModelsResponse",
46
+ isList: true,
47
+ paginationType: "offset",
48
+ pageParamKey: "page",
49
+ listItemType: "Model",
50
+ isPrivate: false,
51
+ description: "\""
52
+ },
53
+ {
54
+ methodName: "getModel",
55
+ protoName: "GetModel",
56
+ paramsType: "GetModelRequest",
57
+ returnType: "Model",
58
+ isList: false,
59
+ paginationType: "none",
60
+ isPrivate: false,
61
+ description: "\""
62
+ },
63
+ {
64
+ methodName: "listNodeTypes",
65
+ protoName: "ListNodeTypes",
66
+ paramsType: "ListNodeTypesRequest",
67
+ returnType: "ListNodeTypesResponse",
68
+ isList: true,
69
+ paginationType: "offset",
70
+ pageParamKey: "page",
71
+ listItemType: "NodeType",
72
+ isPrivate: false,
73
+ description: "\""
74
+ }
75
+ ]
76
+ }]
77
+ };
78
+ //#endregion
79
+ export { queriesMetadata };
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
- const CreateDeploymentRequest = {
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
- const CreateModelRequest = { name: {
30
+ var CreateModelRequest = { name: {
30
31
  maxLength: 255,
31
32
  minLength: 1,
32
33
  pattern: /^[A-Za-z0-9-_/.:]+$/
33
34
  } };
34
- const DeploymentQuantization = { bits: { lessThanOrEqual: 32 } };
35
- const ListDeploymentsRequest = { name: {
35
+ var DeploymentQuantization = { bits: { lessThanOrEqual: 32 } };
36
+ var ListDeploymentsRequest = { name: {
36
37
  maxLength: 255,
37
38
  minLength: 1
38
39
  } };
39
- const ListModelsRequest = { name: {
40
+ var ListModelsRequest = { name: {
40
41
  maxLength: 255,
41
42
  minLength: 1
42
43
  } };
43
- const UpdateDeploymentRequest = {
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
- export { validation_rules_gen_exports };
59
+ //#endregion
60
+ export { CreateDeploymentRequest, CreateModelRequest, DeploymentQuantization, ListDeploymentsRequest, ListModelsRequest, UpdateDeploymentRequest, validation_rules_gen_exports };
@@ -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$1 = class extends 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
- export { API$1 as API };
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
- const DEPLOYMENT_TRANSIENT_STATUSES = [
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
- export { index_gen_exports };
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
- const unmarshalEndpoint = (data) => {
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
- const unmarshalDeployment = (data) => {
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
- const unmarshalModel = (data) => {
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
- const unmarshalAddDeploymentACLRulesResponse = (data) => {
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
- const unmarshalEula = (data) => {
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
- const unmarshalListDeploymentACLRulesResponse = (data) => {
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
- const unmarshalListDeploymentsResponse = (data) => {
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
- const unmarshalListModelsResponse = (data) => {
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
- const unmarshalListNodeTypesResponse = (data) => {
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
- const unmarshalSetDeploymentACLRulesResponse = (data) => {
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
- const marshalAddDeploymentACLRulesRequest = (request, defaults) => ({ acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt, defaults)) : void 0 });
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
- const marshalCreateDeploymentRequest = (request, defaults) => ({
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
- const marshalCreateEndpointRequest = (request, defaults) => ({
164
+ var marshalCreateEndpointRequest = (request, defaults) => ({
164
165
  deployment_id: request.deploymentId,
165
166
  endpoint: marshalEndpointSpec(request.endpoint, defaults)
166
167
  });
167
- const marshalSetDeploymentACLRulesRequest = (request, defaults) => ({ acls: request.acls !== void 0 ? request.acls.map((elt) => marshalACLRuleRequest(elt, defaults)) : void 0 });
168
- const marshalUpdateDeploymentRequest = (request, defaults) => ({
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
- const marshalUpdateEndpointRequest = (request, defaults) => ({ disable_auth: request.disableAuth });
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
- const CreateDeploymentRequest = {
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
- const ListDeploymentsRequest = { name: {
33
+ var ListDeploymentsRequest = { name: {
33
34
  maxLength: 255,
34
35
  minLength: 1
35
36
  } };
36
- const ListModelsRequest = { name: {
37
+ var ListModelsRequest = { name: {
37
38
  maxLength: 255,
38
39
  minLength: 1
39
40
  } };
40
- const UpdateDeploymentRequest = {
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
- export { validation_rules_gen_exports };
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.1",
3
+ "version": "2.4.0",
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.2",
30
- "@scaleway/sdk-std": "2.2.1"
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.1"
33
+ "@scaleway/sdk-client": "^2.2.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.2.1"
36
+ "@scaleway/sdk-client": "^2.2.2"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",