@scaleway/sdk-inference 1.0.5 → 1.1.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,5 +1,5 @@
1
- import { API as ParentAPI } from '@scaleway/sdk-client';
2
1
  import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
2
+ import { API as ParentAPI } from '@scaleway/sdk-client';
3
3
  import type { CreateDeploymentRequest, CreateEndpointRequest, CreateModelRequest, DeleteDeploymentRequest, DeleteEndpointRequest, DeleteModelRequest, Deployment, Endpoint, GetDeploymentCertificateRequest, GetDeploymentRequest, GetModelRequest, ListDeploymentsRequest, ListDeploymentsResponse, ListModelsRequest, ListModelsResponse, ListNodeTypesRequest, ListNodeTypesResponse, Model, UpdateDeploymentRequest, UpdateEndpointRequest } from './types.gen';
4
4
  /**
5
5
  * Managed Inference API.
@@ -3,7 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const DEPLOYMENT_TRANSIENT_STATUSES = [
4
4
  "creating",
5
5
  "deploying",
6
- "deleting"
6
+ "deleting",
7
+ "scaling"
7
8
  ];
8
9
  const MODEL_TRANSIENT_STATUSES = [
9
10
  "preparing",
@@ -1,7 +1,8 @@
1
1
  const DEPLOYMENT_TRANSIENT_STATUSES = [
2
2
  "creating",
3
3
  "deploying",
4
- "deleting"
4
+ "deleting",
5
+ "scaling"
5
6
  ];
6
7
  const MODEL_TRANSIENT_STATUSES = [
7
8
  "preparing",
@@ -18,5 +18,4 @@ exports.unmarshalListDeploymentsResponse = marshalling_gen.unmarshalListDeployme
18
18
  exports.unmarshalListModelsResponse = marshalling_gen.unmarshalListModelsResponse;
19
19
  exports.unmarshalListNodeTypesResponse = marshalling_gen.unmarshalListNodeTypesResponse;
20
20
  exports.unmarshalModel = marshalling_gen.unmarshalModel;
21
- exports.unmarshalModelSupportInfo = marshalling_gen.unmarshalModelSupportInfo;
22
21
  exports.ValidationRules = validationRules_gen;
@@ -1,5 +1,5 @@
1
1
  export { API } from './api.gen';
2
2
  export * from './content.gen';
3
3
  export * from './marshalling.gen';
4
- export type { CreateDeploymentRequest, CreateEndpointRequest, CreateModelRequest, DeleteDeploymentRequest, DeleteEndpointRequest, DeleteModelRequest, Deployment, DeploymentQuantization, DeploymentStatus, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicNetworkDetails, EndpointSpec, GetDeploymentCertificateRequest, GetDeploymentRequest, GetModelRequest, ListDeploymentsRequest, ListDeploymentsRequestOrderBy, ListDeploymentsResponse, ListModelsRequest, ListModelsRequestOrderBy, ListModelsResponse, ListNodeTypesRequest, ListNodeTypesResponse, Model, ModelSource, ModelStatus, ModelSupportInfo, ModelSupportedNode, ModelSupportedQuantization, NodeType, NodeTypeStock, UpdateDeploymentRequest, UpdateEndpointRequest, } from './types.gen';
4
+ export type { CreateDeploymentRequest, CreateEndpointRequest, CreateModelRequest, DeleteDeploymentRequest, DeleteEndpointRequest, DeleteModelRequest, Deployment, DeploymentQuantization, DeploymentStatus, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicNetworkDetails, EndpointSpec, GetDeploymentCertificateRequest, GetDeploymentRequest, GetModelRequest, ListDeploymentsRequest, ListDeploymentsRequestOrderBy, ListDeploymentsResponse, ListModelsRequest, ListModelsRequestOrderBy, ListModelsResponse, ListNodeTypesRequest, ListNodeTypesResponse, Model, ModelSource, ModelStatus, ModelSupportedNode, ModelSupportedQuantization, ModelSupportInfo, NodeType, NodeTypeStock, UpdateDeploymentRequest, UpdateEndpointRequest, } from './types.gen';
5
5
  export * as ValidationRules from './validation-rules.gen';
@@ -1,6 +1,6 @@
1
1
  import { API } from "./api.gen.js";
2
2
  import { DEPLOYMENT_TRANSIENT_STATUSES, MODEL_TRANSIENT_STATUSES } from "./content.gen.js";
3
- import { marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalCreateModelRequest, marshalUpdateDeploymentRequest, marshalUpdateEndpointRequest, unmarshalDeployment, unmarshalEndpoint, unmarshalListDeploymentsResponse, unmarshalListModelsResponse, unmarshalListNodeTypesResponse, unmarshalModel, unmarshalModelSupportInfo } from "./marshalling.gen.js";
3
+ import { marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalCreateModelRequest, marshalUpdateDeploymentRequest, marshalUpdateEndpointRequest, unmarshalDeployment, unmarshalEndpoint, unmarshalListDeploymentsResponse, unmarshalListModelsResponse, unmarshalListNodeTypesResponse, unmarshalModel } from "./marshalling.gen.js";
4
4
  import * as validationRules_gen from "./validation-rules.gen.js";
5
5
  export {
6
6
  API,
@@ -17,6 +17,5 @@ export {
17
17
  unmarshalListDeploymentsResponse,
18
18
  unmarshalListModelsResponse,
19
19
  unmarshalListNodeTypesResponse,
20
- unmarshalModel,
21
- unmarshalModelSupportInfo
20
+ unmarshalModel
22
21
  };
@@ -34,42 +34,6 @@ const unmarshalEndpoint = (data) => {
34
34
  url: data.url
35
35
  };
36
36
  };
37
- const unmarshalModelSupportedQuantization = (data) => {
38
- if (!sdkClient.isJSONObject(data)) {
39
- throw new TypeError(
40
- `Unmarshalling the type 'ModelSupportedQuantization' failed as data isn't a dictionary.`
41
- );
42
- }
43
- return {
44
- allowed: data.allowed,
45
- maxContextSize: data.max_context_size,
46
- quantizationBits: data.quantization_bits
47
- };
48
- };
49
- const unmarshalModelSupportedNode = (data) => {
50
- if (!sdkClient.isJSONObject(data)) {
51
- throw new TypeError(
52
- `Unmarshalling the type 'ModelSupportedNode' failed as data isn't a dictionary.`
53
- );
54
- }
55
- return {
56
- nodeTypeName: data.node_type_name,
57
- quantizations: sdkClient.unmarshalArrayOfObject(
58
- data.quantizations,
59
- unmarshalModelSupportedQuantization
60
- )
61
- };
62
- };
63
- const unmarshalModelSupportInfo = (data) => {
64
- if (!sdkClient.isJSONObject(data)) {
65
- throw new TypeError(
66
- `Unmarshalling the type 'ModelSupportInfo' failed as data isn't a dictionary.`
67
- );
68
- }
69
- return {
70
- nodes: sdkClient.unmarshalArrayOfObject(data.nodes, unmarshalModelSupportedNode)
71
- };
72
- };
73
37
  const unmarshalDeploymentQuantization = (data) => {
74
38
  if (!sdkClient.isJSONObject(data)) {
75
39
  throw new TypeError(
@@ -106,6 +70,42 @@ const unmarshalDeployment = (data) => {
106
70
  updatedAt: sdkClient.unmarshalDate(data.updated_at)
107
71
  };
108
72
  };
73
+ const unmarshalModelSupportedQuantization = (data) => {
74
+ if (!sdkClient.isJSONObject(data)) {
75
+ throw new TypeError(
76
+ `Unmarshalling the type 'ModelSupportedQuantization' failed as data isn't a dictionary.`
77
+ );
78
+ }
79
+ return {
80
+ allowed: data.allowed,
81
+ maxContextSize: data.max_context_size,
82
+ quantizationBits: data.quantization_bits
83
+ };
84
+ };
85
+ const unmarshalModelSupportedNode = (data) => {
86
+ if (!sdkClient.isJSONObject(data)) {
87
+ throw new TypeError(
88
+ `Unmarshalling the type 'ModelSupportedNode' failed as data isn't a dictionary.`
89
+ );
90
+ }
91
+ return {
92
+ nodeTypeName: data.node_type_name,
93
+ quantizations: sdkClient.unmarshalArrayOfObject(
94
+ data.quantizations,
95
+ unmarshalModelSupportedQuantization
96
+ )
97
+ };
98
+ };
99
+ const unmarshalModelSupportInfo = (data) => {
100
+ if (!sdkClient.isJSONObject(data)) {
101
+ throw new TypeError(
102
+ `Unmarshalling the type 'ModelSupportInfo' failed as data isn't a dictionary.`
103
+ );
104
+ }
105
+ return {
106
+ nodes: sdkClient.unmarshalArrayOfObject(data.nodes, unmarshalModelSupportedNode)
107
+ };
108
+ };
109
109
  const unmarshalModel = (data) => {
110
110
  if (!sdkClient.isJSONObject(data)) {
111
111
  throw new TypeError(
@@ -255,4 +255,3 @@ exports.unmarshalListDeploymentsResponse = unmarshalListDeploymentsResponse;
255
255
  exports.unmarshalListModelsResponse = unmarshalListModelsResponse;
256
256
  exports.unmarshalListNodeTypesResponse = unmarshalListNodeTypesResponse;
257
257
  exports.unmarshalModel = unmarshalModel;
258
- exports.unmarshalModelSupportInfo = unmarshalModelSupportInfo;
@@ -1,7 +1,6 @@
1
1
  import type { DefaultValues } from '@scaleway/sdk-client';
2
- import type { CreateDeploymentRequest, CreateEndpointRequest, CreateModelRequest, Deployment, Endpoint, ListDeploymentsResponse, ListModelsResponse, ListNodeTypesResponse, Model, ModelSupportInfo, UpdateDeploymentRequest, UpdateEndpointRequest } from './types.gen';
2
+ import type { CreateDeploymentRequest, CreateEndpointRequest, CreateModelRequest, Deployment, Endpoint, ListDeploymentsResponse, ListModelsResponse, ListNodeTypesResponse, Model, UpdateDeploymentRequest, UpdateEndpointRequest } from './types.gen';
3
3
  export declare const unmarshalEndpoint: (data: unknown) => Endpoint;
4
- export declare const unmarshalModelSupportInfo: (data: unknown) => ModelSupportInfo;
5
4
  export declare const unmarshalDeployment: (data: unknown) => Deployment;
6
5
  export declare const unmarshalModel: (data: unknown) => Model;
7
6
  export declare const unmarshalListDeploymentsResponse: (data: unknown) => ListDeploymentsResponse;
@@ -32,42 +32,6 @@ const unmarshalEndpoint = (data) => {
32
32
  url: data.url
33
33
  };
34
34
  };
35
- const unmarshalModelSupportedQuantization = (data) => {
36
- if (!isJSONObject(data)) {
37
- throw new TypeError(
38
- `Unmarshalling the type 'ModelSupportedQuantization' failed as data isn't a dictionary.`
39
- );
40
- }
41
- return {
42
- allowed: data.allowed,
43
- maxContextSize: data.max_context_size,
44
- quantizationBits: data.quantization_bits
45
- };
46
- };
47
- const unmarshalModelSupportedNode = (data) => {
48
- if (!isJSONObject(data)) {
49
- throw new TypeError(
50
- `Unmarshalling the type 'ModelSupportedNode' failed as data isn't a dictionary.`
51
- );
52
- }
53
- return {
54
- nodeTypeName: data.node_type_name,
55
- quantizations: unmarshalArrayOfObject(
56
- data.quantizations,
57
- unmarshalModelSupportedQuantization
58
- )
59
- };
60
- };
61
- const unmarshalModelSupportInfo = (data) => {
62
- if (!isJSONObject(data)) {
63
- throw new TypeError(
64
- `Unmarshalling the type 'ModelSupportInfo' failed as data isn't a dictionary.`
65
- );
66
- }
67
- return {
68
- nodes: unmarshalArrayOfObject(data.nodes, unmarshalModelSupportedNode)
69
- };
70
- };
71
35
  const unmarshalDeploymentQuantization = (data) => {
72
36
  if (!isJSONObject(data)) {
73
37
  throw new TypeError(
@@ -104,6 +68,42 @@ const unmarshalDeployment = (data) => {
104
68
  updatedAt: unmarshalDate(data.updated_at)
105
69
  };
106
70
  };
71
+ const unmarshalModelSupportedQuantization = (data) => {
72
+ if (!isJSONObject(data)) {
73
+ throw new TypeError(
74
+ `Unmarshalling the type 'ModelSupportedQuantization' failed as data isn't a dictionary.`
75
+ );
76
+ }
77
+ return {
78
+ allowed: data.allowed,
79
+ maxContextSize: data.max_context_size,
80
+ quantizationBits: data.quantization_bits
81
+ };
82
+ };
83
+ const unmarshalModelSupportedNode = (data) => {
84
+ if (!isJSONObject(data)) {
85
+ throw new TypeError(
86
+ `Unmarshalling the type 'ModelSupportedNode' failed as data isn't a dictionary.`
87
+ );
88
+ }
89
+ return {
90
+ nodeTypeName: data.node_type_name,
91
+ quantizations: unmarshalArrayOfObject(
92
+ data.quantizations,
93
+ unmarshalModelSupportedQuantization
94
+ )
95
+ };
96
+ };
97
+ const unmarshalModelSupportInfo = (data) => {
98
+ if (!isJSONObject(data)) {
99
+ throw new TypeError(
100
+ `Unmarshalling the type 'ModelSupportInfo' failed as data isn't a dictionary.`
101
+ );
102
+ }
103
+ return {
104
+ nodes: unmarshalArrayOfObject(data.nodes, unmarshalModelSupportedNode)
105
+ };
106
+ };
107
107
  const unmarshalModel = (data) => {
108
108
  if (!isJSONObject(data)) {
109
109
  throw new TypeError(
@@ -253,6 +253,5 @@ export {
253
253
  unmarshalListDeploymentsResponse,
254
254
  unmarshalListModelsResponse,
255
255
  unmarshalListNodeTypesResponse,
256
- unmarshalModel,
257
- unmarshalModelSupportInfo
256
+ unmarshalModel
258
257
  };
@@ -1,5 +1,5 @@
1
1
  import type { Region as ScwRegion } from '@scaleway/sdk-client';
2
- export type DeploymentStatus = 'unknown_status' | 'creating' | 'deploying' | 'ready' | 'error' | 'deleting' | 'locked';
2
+ export type DeploymentStatus = 'unknown_status' | 'creating' | 'deploying' | 'ready' | 'error' | 'deleting' | 'locked' | 'scaling';
3
3
  export type ListDeploymentsRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'name_asc' | 'name_desc';
4
4
  export type ListModelsRequestOrderBy = 'display_rank_asc' | 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
5
5
  export type ModelStatus = 'unknown_status' | 'preparing' | 'downloading' | 'ready' | 'error';
@@ -1,5 +1,5 @@
1
- import { API as ParentAPI } from '@scaleway/sdk-client';
2
1
  import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
2
+ import { API as ParentAPI } from '@scaleway/sdk-client';
3
3
  import type { AddDeploymentACLRulesRequest, AddDeploymentACLRulesResponse, CreateDeploymentRequest, CreateEndpointRequest, DeleteDeploymentACLRuleRequest, DeleteDeploymentRequest, DeleteEndpointRequest, Deployment, Endpoint, Eula, GetDeploymentCertificateRequest, GetDeploymentRequest, GetModelEulaRequest, GetModelRequest, ListDeploymentACLRulesRequest, ListDeploymentACLRulesResponse, ListDeploymentsRequest, ListDeploymentsResponse, ListModelsRequest, ListModelsResponse, ListNodeTypesRequest, ListNodeTypesResponse, Model, SetDeploymentACLRulesRequest, SetDeploymentACLRulesResponse, UpdateDeploymentRequest, UpdateEndpointRequest } from './types.gen';
4
4
  /**
5
5
  * Managed Inference API.
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const DEPLOYMENT_TRANSIENT_STATUSES = [
4
4
  "creating",
5
5
  "deploying",
6
- "deleting"
6
+ "deleting",
7
+ "scaling"
7
8
  ];
8
9
  exports.DEPLOYMENT_TRANSIENT_STATUSES = DEPLOYMENT_TRANSIENT_STATUSES;
@@ -1,7 +1,8 @@
1
1
  const DEPLOYMENT_TRANSIENT_STATUSES = [
2
2
  "creating",
3
3
  "deploying",
4
- "deleting"
4
+ "deleting",
5
+ "scaling"
5
6
  ];
6
7
  export {
7
8
  DEPLOYMENT_TRANSIENT_STATUSES
@@ -1,5 +1,5 @@
1
1
  import type { Region as ScwRegion } from '@scaleway/sdk-client';
2
- export type DeploymentStatus = 'unknown_status' | 'creating' | 'deploying' | 'ready' | 'error' | 'deleting' | 'locked';
2
+ export type DeploymentStatus = 'unknown_status' | 'creating' | 'deploying' | 'ready' | 'error' | 'deleting' | 'locked' | 'scaling';
3
3
  export type ListDeploymentsRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'name_asc' | 'name_desc';
4
4
  export type ListModelsRequestOrderBy = 'display_rank_asc' | 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
5
5
  export type NodeTypeStock = 'unknown_stock' | 'low_stock' | 'out_of_stock' | 'available';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-inference",
3
- "version": "1.0.5",
3
+ "version": "1.1.0",
4
4
  "description": "Scaleway SDK inference",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -26,17 +26,17 @@
26
26
  "directory": "packages_generated/inference"
27
27
  },
28
28
  "engines": {
29
- "node": ">=20.19.1"
29
+ "node": ">=20.19.4"
30
30
  },
31
31
  "dependencies": {
32
- "@scaleway/random-name": "5.1.1",
33
- "@scaleway/sdk-std": "1.0.5"
32
+ "@scaleway/random-name": "5.1.2",
33
+ "@scaleway/sdk-std": "1.0.6"
34
34
  },
35
35
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.3.0"
36
+ "@scaleway/sdk-client": "^1.3.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.3.0"
39
+ "@scaleway/sdk-client": "^1.3.1"
40
40
  },
41
41
  "scripts": {
42
42
  "package:check": "pnpm publint",