@scaleway/sdk 2.34.0 → 2.36.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.
Files changed (67) hide show
  1. package/dist/api/baremetal/v1/api.gen.d.ts +1 -1
  2. package/dist/api/block/v1alpha1/api.gen.d.ts +1 -1
  3. package/dist/api/cockpit/v1/api.gen.cjs +26 -0
  4. package/dist/api/cockpit/v1/api.gen.d.ts +12 -1
  5. package/dist/api/cockpit/v1/api.gen.js +27 -1
  6. package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
  7. package/dist/api/cockpit/v1/marshalling.gen.cjs +26 -0
  8. package/dist/api/cockpit/v1/marshalling.gen.d.ts +2 -1
  9. package/dist/api/cockpit/v1/marshalling.gen.js +26 -0
  10. package/dist/api/cockpit/v1/types.gen.d.ts +34 -0
  11. package/dist/api/cockpit/v1/validation-rules.gen.cjs +10 -0
  12. package/dist/api/cockpit/v1/validation-rules.gen.d.ts +9 -0
  13. package/dist/api/cockpit/v1/validation-rules.gen.js +10 -0
  14. package/dist/api/container/v1beta1/index.gen.d.ts +1 -1
  15. package/dist/api/container/v1beta1/marshalling.gen.cjs +3 -0
  16. package/dist/api/container/v1beta1/marshalling.gen.js +3 -0
  17. package/dist/api/container/v1beta1/types.gen.d.ts +7 -0
  18. package/dist/api/function/v1beta1/index.gen.d.ts +1 -1
  19. package/dist/api/function/v1beta1/marshalling.gen.cjs +3 -0
  20. package/dist/api/function/v1beta1/marshalling.gen.js +3 -0
  21. package/dist/api/function/v1beta1/types.gen.d.ts +8 -1
  22. package/dist/api/inference/v1beta1/api.gen.d.ts +151 -0
  23. package/dist/api/inference/v1beta1/content.gen.d.ts +3 -0
  24. package/dist/api/inference/v1beta1/index.gen.d.ts +4 -0
  25. package/dist/api/inference/v1beta1/marshalling.gen.d.ts +18 -0
  26. package/dist/api/inference/v1beta1/types.gen.d.ts +435 -0
  27. package/dist/api/inference/v1beta1/validation-rules.gen.d.ts +50 -0
  28. package/dist/api/instance/v1/api.utils.cjs +1 -2
  29. package/dist/api/instance/v1/api.utils.js +1 -2
  30. package/dist/api/secret/v1beta1/api.gen.cjs +25 -0
  31. package/dist/api/secret/v1beta1/api.gen.d.ts +12 -1
  32. package/dist/api/secret/v1beta1/api.gen.js +26 -1
  33. package/dist/api/secret/v1beta1/index.gen.d.ts +1 -1
  34. package/dist/api/secret/v1beta1/marshalling.gen.cjs +12 -0
  35. package/dist/api/secret/v1beta1/marshalling.gen.d.ts +2 -1
  36. package/dist/api/secret/v1beta1/marshalling.gen.js +12 -0
  37. package/dist/api/secret/v1beta1/types.gen.d.ts +17 -0
  38. package/dist/api/tem/v1alpha1/marshalling.gen.cjs +1 -1
  39. package/dist/api/tem/v1alpha1/marshalling.gen.js +1 -1
  40. package/dist/api/tem/v1alpha1/types.gen.d.ts +1 -1
  41. package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +64 -0
  42. package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +57 -0
  43. package/dist/api/tem/v1alpha1/validation-rules.gen.js +64 -0
  44. package/dist/helpers/marshalling.cjs +2 -4
  45. package/dist/helpers/marshalling.js +2 -4
  46. package/dist/internal/async/interval-retrier.cjs +2 -4
  47. package/dist/internal/async/interval-retrier.js +2 -4
  48. package/dist/scw/auth.cjs +2 -4
  49. package/dist/scw/auth.js +2 -4
  50. package/dist/scw/constants.cjs +1 -1
  51. package/dist/scw/constants.d.ts +2 -2
  52. package/dist/scw/constants.js +1 -1
  53. package/dist/scw/errors/standard/invalid-arguments-error.cjs +1 -2
  54. package/dist/scw/errors/standard/invalid-arguments-error.js +1 -2
  55. package/dist/scw/errors/standard/out-of-stock-error.cjs +1 -2
  56. package/dist/scw/errors/standard/out-of-stock-error.js +1 -2
  57. package/dist/scw/errors/standard/permissions-denied-error.cjs +1 -2
  58. package/dist/scw/errors/standard/permissions-denied-error.js +1 -2
  59. package/dist/scw/errors/standard/quotas-exceeded-error.cjs +1 -2
  60. package/dist/scw/errors/standard/quotas-exceeded-error.js +1 -2
  61. package/dist/scw/errors/standard/too-many-requests-error.cjs +1 -2
  62. package/dist/scw/errors/standard/too-many-requests-error.js +1 -2
  63. package/dist/scw/fetch/resource-paginator.cjs +1 -2
  64. package/dist/scw/fetch/resource-paginator.js +1 -2
  65. package/dist/scw/fetch/response-parser.cjs +2 -4
  66. package/dist/scw/fetch/response-parser.js +2 -4
  67. package/package.json +2 -2
@@ -0,0 +1,151 @@
1
+ import { API as ParentAPI } from '../../../bridge';
2
+ import type { Region, WaitForOptions } from '../../../bridge';
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
+ /**
5
+ * Managed Inference API.
6
+ *
7
+ * This API allows you to manage your Inference services.
8
+ */
9
+ export declare class API extends ParentAPI {
10
+ /** Lists the available regions of the API. */
11
+ static readonly LOCALITIES: Region[];
12
+ protected pageOfListDeployments: (request?: Readonly<ListDeploymentsRequest>) => Promise<ListDeploymentsResponse>;
13
+ /**
14
+ * List inference deployments. List all your inference deployments.
15
+ *
16
+ * @param request - The request {@link ListDeploymentsRequest}
17
+ * @returns A Promise of ListDeploymentsResponse
18
+ */
19
+ listDeployments: (request?: Readonly<ListDeploymentsRequest>) => Promise<ListDeploymentsResponse> & {
20
+ all: () => Promise<Deployment[]>;
21
+ [Symbol.asyncIterator]: () => AsyncGenerator<Deployment[], void, void>;
22
+ };
23
+ /**
24
+ * Get a deployment. Get the deployment for the given ID.
25
+ *
26
+ * @param request - The request {@link GetDeploymentRequest}
27
+ * @returns A Promise of Deployment
28
+ */
29
+ getDeployment: (request: Readonly<GetDeploymentRequest>) => Promise<Deployment>;
30
+ /**
31
+ * Waits for {@link Deployment} to be in a final state.
32
+ *
33
+ * @param request - The request {@link GetDeploymentRequest}
34
+ * @param options - The waiting options
35
+ * @returns A Promise of Deployment
36
+ */
37
+ waitForDeployment: (request: Readonly<GetDeploymentRequest>, options?: Readonly<WaitForOptions<Deployment>>) => Promise<Deployment>;
38
+ /**
39
+ * Create a deployment. Create a new inference deployment related to a
40
+ * specific model.
41
+ *
42
+ * @param request - The request {@link CreateDeploymentRequest}
43
+ * @returns A Promise of Deployment
44
+ */
45
+ createDeployment: (request: Readonly<CreateDeploymentRequest>) => Promise<Deployment>;
46
+ /**
47
+ * Update a deployment. Update an existing inference deployment.
48
+ *
49
+ * @param request - The request {@link UpdateDeploymentRequest}
50
+ * @returns A Promise of Deployment
51
+ */
52
+ updateDeployment: (request: Readonly<UpdateDeploymentRequest>) => Promise<Deployment>;
53
+ /**
54
+ * Delete a deployment. Delete an existing inference deployment.
55
+ *
56
+ * @param request - The request {@link DeleteDeploymentRequest}
57
+ * @returns A Promise of Deployment
58
+ */
59
+ deleteDeployment: (request: Readonly<DeleteDeploymentRequest>) => Promise<Deployment>;
60
+ /**
61
+ * Get the CA certificate. Get the CA certificate used for the deployment of
62
+ * private endpoints. The CA certificate will be returned as a PEM file.
63
+ *
64
+ * @param request - The request {@link GetDeploymentCertificateRequest}
65
+ * @returns A Promise of Blob
66
+ */
67
+ getDeploymentCertificate: (request: Readonly<GetDeploymentCertificateRequest>) => Promise<Blob>;
68
+ /**
69
+ * Create an endpoint. Create a new Endpoint related to a specific deployment.
70
+ *
71
+ * @param request - The request {@link CreateEndpointRequest}
72
+ * @returns A Promise of Endpoint
73
+ */
74
+ createEndpoint: (request: Readonly<CreateEndpointRequest>) => Promise<Endpoint>;
75
+ /**
76
+ * Update an endpoint. Update an existing Endpoint.
77
+ *
78
+ * @param request - The request {@link UpdateEndpointRequest}
79
+ * @returns A Promise of Endpoint
80
+ */
81
+ updateEndpoint: (request: Readonly<UpdateEndpointRequest>) => Promise<Endpoint>;
82
+ /**
83
+ * Delete an endpoint. Delete an existing Endpoint.
84
+ *
85
+ * @param request - The request {@link DeleteEndpointRequest}
86
+ */
87
+ deleteEndpoint: (request: Readonly<DeleteEndpointRequest>) => Promise<void>;
88
+ protected pageOfListDeploymentACLRules: (request: Readonly<ListDeploymentACLRulesRequest>) => Promise<ListDeploymentACLRulesResponse>;
89
+ /**
90
+ * List your ACLs. List ACLs for a specific deployment.
91
+ *
92
+ * @param request - The request {@link ListDeploymentACLRulesRequest}
93
+ * @returns A Promise of ListDeploymentACLRulesResponse
94
+ */
95
+ listDeploymentACLRules: (request: Readonly<ListDeploymentACLRulesRequest>) => Promise<ListDeploymentACLRulesResponse> & {
96
+ all: () => Promise<import("./types.gen").ACLRule[]>;
97
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").ACLRule[], void, void>;
98
+ };
99
+ /**
100
+ * Add new ACLs. Add new ACL rules for a specific deployment.
101
+ *
102
+ * @param request - The request {@link AddDeploymentACLRulesRequest}
103
+ * @returns A Promise of AddDeploymentACLRulesResponse
104
+ */
105
+ addDeploymentACLRules: (request: Readonly<AddDeploymentACLRulesRequest>) => Promise<AddDeploymentACLRulesResponse>;
106
+ /**
107
+ * Set new ACL. Set new ACL rules for a specific deployment.
108
+ *
109
+ * @param request - The request {@link SetDeploymentACLRulesRequest}
110
+ * @returns A Promise of SetDeploymentACLRulesResponse
111
+ */
112
+ setDeploymentACLRules: (request: Readonly<SetDeploymentACLRulesRequest>) => Promise<SetDeploymentACLRulesResponse>;
113
+ /**
114
+ * Delete an exising ACL.
115
+ *
116
+ * @param request - The request {@link DeleteDeploymentACLRuleRequest}
117
+ */
118
+ deleteDeploymentACLRule: (request: Readonly<DeleteDeploymentACLRuleRequest>) => Promise<void>;
119
+ protected pageOfListModels: (request?: Readonly<ListModelsRequest>) => Promise<ListModelsResponse>;
120
+ /**
121
+ * List models. List all available models.
122
+ *
123
+ * @param request - The request {@link ListModelsRequest}
124
+ * @returns A Promise of ListModelsResponse
125
+ */
126
+ listModels: (request?: Readonly<ListModelsRequest>) => Promise<ListModelsResponse> & {
127
+ all: () => Promise<Model[]>;
128
+ [Symbol.asyncIterator]: () => AsyncGenerator<Model[], void, void>;
129
+ };
130
+ /**
131
+ * Get a model. Get the model for the given ID.
132
+ *
133
+ * @param request - The request {@link GetModelRequest}
134
+ * @returns A Promise of Model
135
+ */
136
+ getModel: (request: Readonly<GetModelRequest>) => Promise<Model>;
137
+ getModelEula: (request: Readonly<GetModelEulaRequest>) => Promise<Eula>;
138
+ protected pageOfListNodeTypes: (request: Readonly<ListNodeTypesRequest>) => Promise<ListNodeTypesResponse>;
139
+ /**
140
+ * List available node types. List all available node types. By default, the
141
+ * node types returned in the list are ordered by creation date in ascending
142
+ * order, though this can be modified via the `order_by` field.
143
+ *
144
+ * @param request - The request {@link ListNodeTypesRequest}
145
+ * @returns A Promise of ListNodeTypesResponse
146
+ */
147
+ listNodeTypes: (request: Readonly<ListNodeTypesRequest>) => Promise<ListNodeTypesResponse> & {
148
+ all: () => Promise<import("./types.gen").NodeType[]>;
149
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").NodeType[], void, void>;
150
+ };
151
+ }
@@ -0,0 +1,3 @@
1
+ import type { DeploymentStatus } from './types.gen';
2
+ /** Lists transient statutes of the enum {@link DeploymentStatus}. */
3
+ export declare const DEPLOYMENT_TRANSIENT_STATUSES: DeploymentStatus[];
@@ -0,0 +1,4 @@
1
+ export { API } from './api.gen';
2
+ export * from './content.gen';
3
+ export type { ACLRule, ACLRuleRequest, AddDeploymentACLRulesRequest, AddDeploymentACLRulesResponse, CreateDeploymentRequest, CreateEndpointRequest, DeleteDeploymentACLRuleRequest, DeleteDeploymentRequest, DeleteEndpointRequest, Deployment, DeploymentStatus, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicAccessDetails, EndpointSpec, EndpointSpecPrivateNetwork, EndpointSpecPublic, Eula, GetDeploymentCertificateRequest, GetDeploymentRequest, GetModelEulaRequest, GetModelRequest, ListDeploymentACLRulesRequest, ListDeploymentACLRulesResponse, ListDeploymentsRequest, ListDeploymentsRequestOrderBy, ListDeploymentsResponse, ListModelsRequest, ListModelsRequestOrderBy, ListModelsResponse, ListNodeTypesRequest, ListNodeTypesResponse, Model, ModelS3Model, NodeType, NodeTypeStock, SetDeploymentACLRulesRequest, SetDeploymentACLRulesResponse, UpdateDeploymentRequest, UpdateEndpointRequest, } from './types.gen';
4
+ export * as ValidationRules from './validation-rules.gen';
@@ -0,0 +1,18 @@
1
+ import type { DefaultValues } from '../../../bridge';
2
+ import type { AddDeploymentACLRulesRequest, AddDeploymentACLRulesResponse, CreateDeploymentRequest, CreateEndpointRequest, Deployment, Endpoint, Eula, ListDeploymentACLRulesResponse, ListDeploymentsResponse, ListModelsResponse, ListNodeTypesResponse, Model, SetDeploymentACLRulesRequest, SetDeploymentACLRulesResponse, UpdateDeploymentRequest, UpdateEndpointRequest } from './types.gen';
3
+ export declare const unmarshalEndpoint: (data: unknown) => Endpoint;
4
+ export declare const unmarshalDeployment: (data: unknown) => Deployment;
5
+ export declare const unmarshalModel: (data: unknown) => Model;
6
+ export declare const unmarshalAddDeploymentACLRulesResponse: (data: unknown) => AddDeploymentACLRulesResponse;
7
+ export declare const unmarshalEula: (data: unknown) => Eula;
8
+ export declare const unmarshalListDeploymentACLRulesResponse: (data: unknown) => ListDeploymentACLRulesResponse;
9
+ export declare const unmarshalListDeploymentsResponse: (data: unknown) => ListDeploymentsResponse;
10
+ export declare const unmarshalListModelsResponse: (data: unknown) => ListModelsResponse;
11
+ export declare const unmarshalListNodeTypesResponse: (data: unknown) => ListNodeTypesResponse;
12
+ export declare const unmarshalSetDeploymentACLRulesResponse: (data: unknown) => SetDeploymentACLRulesResponse;
13
+ export declare const marshalAddDeploymentACLRulesRequest: (request: AddDeploymentACLRulesRequest, defaults: DefaultValues) => Record<string, unknown>;
14
+ export declare const marshalCreateDeploymentRequest: (request: CreateDeploymentRequest, defaults: DefaultValues) => Record<string, unknown>;
15
+ export declare const marshalCreateEndpointRequest: (request: CreateEndpointRequest, defaults: DefaultValues) => Record<string, unknown>;
16
+ export declare const marshalSetDeploymentACLRulesRequest: (request: SetDeploymentACLRulesRequest, defaults: DefaultValues) => Record<string, unknown>;
17
+ export declare const marshalUpdateDeploymentRequest: (request: UpdateDeploymentRequest, defaults: DefaultValues) => Record<string, unknown>;
18
+ export declare const marshalUpdateEndpointRequest: (request: UpdateEndpointRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -0,0 +1,435 @@
1
+ import type { Region } from '../../../bridge';
2
+ export type DeploymentStatus = 'unknown_status' | 'creating' | 'deploying' | 'ready' | 'error' | 'deleting' | 'locked';
3
+ export type ListDeploymentsRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'name_asc' | 'name_desc';
4
+ export type ListModelsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
5
+ export type NodeTypeStock = 'unknown_stock' | 'low_stock' | 'out_of_stock' | 'available';
6
+ export interface EndpointPrivateNetworkDetails {
7
+ /** ID of the Private Network. */
8
+ privateNetworkId: string;
9
+ }
10
+ export interface EndpointPublicAccessDetails {
11
+ }
12
+ export interface EndpointSpecPrivateNetwork {
13
+ /** ID of the Private Network. */
14
+ privateNetworkId: string;
15
+ }
16
+ export interface EndpointSpecPublic {
17
+ }
18
+ export interface Endpoint {
19
+ /** Unique identifier. */
20
+ id: string;
21
+ /**
22
+ * For private endpoints, the URL will be accessible only from the Private
23
+ * Network. In addition, private endpoints will expose a CA certificate that
24
+ * can be used to verify the server's identity. This CA certificate can be
25
+ * retrieved using the `GetDeploymentCertificate` API call.
26
+ */
27
+ url: string;
28
+ /**
29
+ * Defines whether the endpoint is public.
30
+ *
31
+ * One-of ('details'): at most one of 'publicAccess', 'privateNetwork' could
32
+ * be set.
33
+ */
34
+ publicAccess?: EndpointPublicAccessDetails;
35
+ /**
36
+ * Details of the Private Network.
37
+ *
38
+ * One-of ('details'): at most one of 'publicAccess', 'privateNetwork' could
39
+ * be set.
40
+ */
41
+ privateNetwork?: EndpointPrivateNetworkDetails;
42
+ /** Defines whether the authentication is disabled. */
43
+ disableAuth: boolean;
44
+ }
45
+ export interface ModelS3Model {
46
+ s3Url: string;
47
+ pythonDependencies: Record<string, string>;
48
+ nodeType?: string;
49
+ tritonServerVersion?: string;
50
+ }
51
+ export interface ACLRuleRequest {
52
+ /**
53
+ * It can be specified as a single IP address or a range of IP addresses in
54
+ * CIDR notation.
55
+ */
56
+ ip: string;
57
+ /** Description of the ACL rule. */
58
+ description: string;
59
+ }
60
+ export interface ACLRule {
61
+ /** Unique identifier. */
62
+ id: string;
63
+ /** Allowed IP address or CIDR range. */
64
+ ip: string;
65
+ /** Description of the ACL rule. */
66
+ description: string;
67
+ }
68
+ export interface EndpointSpec {
69
+ /**
70
+ * Set the endpoint as public.
71
+ *
72
+ * One-of ('spec'): at most one of 'public', 'privateNetwork' could be set.
73
+ */
74
+ public?: EndpointSpecPublic;
75
+ /**
76
+ * Private endpoints are only accessible from the Private Network.
77
+ *
78
+ * One-of ('spec'): at most one of 'public', 'privateNetwork' could be set.
79
+ */
80
+ privateNetwork?: EndpointSpecPrivateNetwork;
81
+ /**
82
+ * By default, deployments are protected by IAM authentication. When setting
83
+ * this field to true, the authentication will be disabled.
84
+ */
85
+ disableAuth: boolean;
86
+ }
87
+ export interface Deployment {
88
+ /** Unique identifier. */
89
+ id: string;
90
+ /** Name of the deployment. */
91
+ name: string;
92
+ /** Project ID. */
93
+ projectId: string;
94
+ /** Status of the deployment. */
95
+ status: DeploymentStatus;
96
+ /** List of tags applied to the deployment. */
97
+ tags: string[];
98
+ /** Node type of the deployment. */
99
+ nodeType: string;
100
+ /** List of endpoints. */
101
+ endpoints: Endpoint[];
102
+ /** Current size of the pool. */
103
+ size: number;
104
+ /** Defines the minimum size of the pool. */
105
+ minSize: number;
106
+ /** Defines the maximum size of the pool. */
107
+ maxSize: number;
108
+ /** Displays information if your deployment is in error state. */
109
+ errorMessage?: string;
110
+ /** The inference model used for the deployment. */
111
+ modelName: string;
112
+ /** ID of the model used for the deployment. */
113
+ modelId: string;
114
+ /** Creation date of the deployment. */
115
+ createdAt?: Date;
116
+ /** Last modification date of the deployment. */
117
+ updatedAt?: Date;
118
+ /** Region of the deployment. */
119
+ region: Region;
120
+ }
121
+ export interface Model {
122
+ /** Unique identifier. */
123
+ id: string;
124
+ /** Unique Name identifier. */
125
+ name: string;
126
+ /** Project ID. */
127
+ projectId: string;
128
+ /** Name of the model provider. */
129
+ provider: string;
130
+ /** List of tags applied to the model. */
131
+ tags: string[];
132
+ /** Purpose of the model. */
133
+ description: string;
134
+ /** Defines whether the model has an end user licence agreement. */
135
+ hasEula: boolean;
136
+ /** Creation date of the model. */
137
+ createdAt?: Date;
138
+ /** Last modification date of the model. */
139
+ updatedAt?: Date;
140
+ /** Region of the model. */
141
+ region: Region;
142
+ /**
143
+ * S3 URL pointing to the model source weight.
144
+ *
145
+ * One-of ('source'): at most one of 's3Model' could be set.
146
+ */
147
+ s3Model?: ModelS3Model;
148
+ /** Defines whether the model is public or not. */
149
+ isPublic: boolean;
150
+ /** Names of the node types compatible with the model. */
151
+ compatibleNodeTypes: string[];
152
+ /** Quantization level of the model. */
153
+ quantizationLevel: string;
154
+ }
155
+ export interface NodeType {
156
+ /** Name of the node type. */
157
+ name: string;
158
+ /** Current stock status for the node type. */
159
+ stockStatus: NodeTypeStock;
160
+ /** Current specs of the offer. */
161
+ description: string;
162
+ /** Number of virtual CPUs. */
163
+ vcpus: number;
164
+ /** Quantity of RAM. */
165
+ memory: number;
166
+ /** Quantity of GPU RAM. */
167
+ vram: number;
168
+ /** The node type is currently disabled. */
169
+ disabled: boolean;
170
+ /** The node type is currently in beta. */
171
+ beta: boolean;
172
+ /** Creation date of the node type. */
173
+ createdAt?: Date;
174
+ /** Last modification date of the node type. */
175
+ updatedAt?: Date;
176
+ /** Number of GPUs. */
177
+ gpus: number;
178
+ /** Region of the node type. */
179
+ region: Region;
180
+ }
181
+ export type AddDeploymentACLRulesRequest = {
182
+ /**
183
+ * Region to target. If none is passed will use default region from the
184
+ * config.
185
+ */
186
+ region?: Region;
187
+ /** ID of the deployment to add ACL rules to. */
188
+ deploymentId: string;
189
+ /** List of ACL rules to add. */
190
+ acls?: ACLRuleRequest[];
191
+ };
192
+ export interface AddDeploymentACLRulesResponse {
193
+ /** List of ACL rules added. */
194
+ rules: ACLRule[];
195
+ }
196
+ export type CreateDeploymentRequest = {
197
+ /**
198
+ * Region to target. If none is passed will use default region from the
199
+ * config.
200
+ */
201
+ region?: Region;
202
+ /** Name of the deployment. */
203
+ name?: string;
204
+ /** ID of the Project to create the deployment in. */
205
+ projectId?: string;
206
+ /** Name of the model to use. */
207
+ modelName: string;
208
+ /**
209
+ * If the model has an EULA, you must accept it before proceeding. The terms
210
+ * of the EULA can be retrieved using the `GetModelEula` API call.
211
+ */
212
+ acceptEula?: boolean;
213
+ /** Name of the node type to use. */
214
+ nodeType: string;
215
+ /** List of tags to apply to the deployment. */
216
+ tags?: string[];
217
+ /** Defines the minimum size of the pool. */
218
+ minSize?: number;
219
+ /** Defines the maximum size of the pool. */
220
+ maxSize?: number;
221
+ /** List of endpoints to create. */
222
+ endpoints: EndpointSpec[];
223
+ };
224
+ export type CreateEndpointRequest = {
225
+ /**
226
+ * Region to target. If none is passed will use default region from the
227
+ * config.
228
+ */
229
+ region?: Region;
230
+ /** ID of the deployment to create the endpoint for. */
231
+ deploymentId: string;
232
+ /** Specification of the endpoint. */
233
+ endpoint: EndpointSpec;
234
+ };
235
+ export type DeleteDeploymentACLRuleRequest = {
236
+ /**
237
+ * Region to target. If none is passed will use default region from the
238
+ * config.
239
+ */
240
+ region?: Region;
241
+ /** ID of the ACL rule to delete. */
242
+ aclId: string;
243
+ };
244
+ export type DeleteDeploymentRequest = {
245
+ /**
246
+ * Region to target. If none is passed will use default region from the
247
+ * config.
248
+ */
249
+ region?: Region;
250
+ /** ID of the deployment to delete. */
251
+ deploymentId: string;
252
+ };
253
+ export type DeleteEndpointRequest = {
254
+ /**
255
+ * Region to target. If none is passed will use default region from the
256
+ * config.
257
+ */
258
+ region?: Region;
259
+ /** ID of the endpoint to delete. */
260
+ endpointId: string;
261
+ };
262
+ export interface Eula {
263
+ /** Content of the end user licence agreement. */
264
+ content: string;
265
+ }
266
+ export type GetDeploymentCertificateRequest = {
267
+ /**
268
+ * Region to target. If none is passed will use default region from the
269
+ * config.
270
+ */
271
+ region?: Region;
272
+ deploymentId: string;
273
+ };
274
+ export type GetDeploymentRequest = {
275
+ /**
276
+ * Region to target. If none is passed will use default region from the
277
+ * config.
278
+ */
279
+ region?: Region;
280
+ /** ID of the deployment to get. */
281
+ deploymentId: string;
282
+ };
283
+ export type GetModelEulaRequest = {
284
+ /**
285
+ * Region to target. If none is passed will use default region from the
286
+ * config.
287
+ */
288
+ region?: Region;
289
+ modelId: string;
290
+ };
291
+ export type GetModelRequest = {
292
+ /**
293
+ * Region to target. If none is passed will use default region from the
294
+ * config.
295
+ */
296
+ region?: Region;
297
+ /** ID of the model to get. */
298
+ modelId: string;
299
+ };
300
+ export type ListDeploymentACLRulesRequest = {
301
+ /**
302
+ * Region to target. If none is passed will use default region from the
303
+ * config.
304
+ */
305
+ region?: Region;
306
+ /** ID of the deployment to list ACL rules for. */
307
+ deploymentId: string;
308
+ /** Page number to return. */
309
+ page?: number;
310
+ /** Maximum number of ACL rules to return per page. */
311
+ pageSize?: number;
312
+ };
313
+ export interface ListDeploymentACLRulesResponse {
314
+ /** List of ACL rules on the current page. */
315
+ rules: ACLRule[];
316
+ /** Total number of ACL rules. */
317
+ totalCount: number;
318
+ }
319
+ export type ListDeploymentsRequest = {
320
+ /**
321
+ * Region to target. If none is passed will use default region from the
322
+ * config.
323
+ */
324
+ region?: Region;
325
+ /** Page number to return. */
326
+ page?: number;
327
+ /** Maximum number of deployments to return per page. */
328
+ pageSize?: number;
329
+ /** Order in which to return results. */
330
+ orderBy?: ListDeploymentsRequestOrderBy;
331
+ /** Filter by Project ID. */
332
+ projectId?: string;
333
+ /** Filter by Organization ID. */
334
+ organizationId?: string;
335
+ /** Filter by deployment name. */
336
+ name?: string;
337
+ /** Filter by tags. */
338
+ tags?: string[];
339
+ };
340
+ export interface ListDeploymentsResponse {
341
+ /** List of deployments on the current page. */
342
+ deployments: Deployment[];
343
+ /** Total number of deployments. */
344
+ totalCount: number;
345
+ }
346
+ export type ListModelsRequest = {
347
+ /**
348
+ * Region to target. If none is passed will use default region from the
349
+ * config.
350
+ */
351
+ region?: Region;
352
+ /** Order in which to return results. */
353
+ orderBy?: ListModelsRequestOrderBy;
354
+ /** Page number to return. */
355
+ page?: number;
356
+ /** Maximum number of models to return per page. */
357
+ pageSize?: number;
358
+ /** Filter by Project ID. */
359
+ projectId?: string;
360
+ /** Filter by model name. */
361
+ name?: string;
362
+ /** Filter by tags. */
363
+ tags?: string[];
364
+ };
365
+ export interface ListModelsResponse {
366
+ /** List of models on the current page. */
367
+ models: Model[];
368
+ /** Total number of models. */
369
+ totalCount: number;
370
+ }
371
+ export type ListNodeTypesRequest = {
372
+ /**
373
+ * Region to target. If none is passed will use default region from the
374
+ * config.
375
+ */
376
+ region?: Region;
377
+ /** Page number to return. */
378
+ page?: number;
379
+ /** Maximum number of node types to return per page. */
380
+ pageSize?: number;
381
+ /** Include disabled node types in the response. */
382
+ includeDisabledTypes: boolean;
383
+ };
384
+ export interface ListNodeTypesResponse {
385
+ /** List of node types. */
386
+ nodeTypes: NodeType[];
387
+ /** Total number of node types. */
388
+ totalCount: number;
389
+ }
390
+ export type SetDeploymentACLRulesRequest = {
391
+ /**
392
+ * Region to target. If none is passed will use default region from the
393
+ * config.
394
+ */
395
+ region?: Region;
396
+ /** ID of the deployment to set ACL rules for. */
397
+ deploymentId: string;
398
+ /** All existing ACL rules will be replaced by the new ones. */
399
+ acls?: ACLRuleRequest[];
400
+ };
401
+ export interface SetDeploymentACLRulesResponse {
402
+ /** List of ACL rules that were set. */
403
+ rules: ACLRule[];
404
+ }
405
+ export type UpdateDeploymentRequest = {
406
+ /**
407
+ * Region to target. If none is passed will use default region from the
408
+ * config.
409
+ */
410
+ region?: Region;
411
+ /** ID of the deployment to update. */
412
+ deploymentId: string;
413
+ /** Name of the deployment. */
414
+ name?: string;
415
+ /** List of tags to apply to the deployment. */
416
+ tags?: string[];
417
+ /** Defines the new minimum size of the pool. */
418
+ minSize?: number;
419
+ /** Defines the new maximum size of the pool. */
420
+ maxSize?: number;
421
+ };
422
+ export type UpdateEndpointRequest = {
423
+ /**
424
+ * Region to target. If none is passed will use default region from the
425
+ * config.
426
+ */
427
+ region?: Region;
428
+ /** ID of the endpoint to update. */
429
+ endpointId: string;
430
+ /**
431
+ * By default, deployments are protected by IAM authentication. When setting
432
+ * this field to true, the authentication will be disabled.
433
+ */
434
+ disableAuth?: boolean;
435
+ };
@@ -0,0 +1,50 @@
1
+ export declare const CreateDeploymentRequest: {
2
+ maxSize: {
3
+ greaterThanOrEqual: number;
4
+ lessThanOrEqual: number;
5
+ };
6
+ minSize: {
7
+ greaterThanOrEqual: number;
8
+ lessThanOrEqual: number;
9
+ };
10
+ modelName: {
11
+ maxLength: number;
12
+ minLength: number;
13
+ pattern: RegExp;
14
+ };
15
+ name: {
16
+ maxLength: number;
17
+ minLength: number;
18
+ pattern: RegExp;
19
+ };
20
+ nodeType: {
21
+ maxLength: number;
22
+ minLength: number;
23
+ };
24
+ };
25
+ export declare const ListDeploymentsRequest: {
26
+ name: {
27
+ maxLength: number;
28
+ minLength: number;
29
+ };
30
+ };
31
+ export declare const ListModelsRequest: {
32
+ name: {
33
+ maxLength: number;
34
+ minLength: number;
35
+ };
36
+ };
37
+ export declare const UpdateDeploymentRequest: {
38
+ maxSize: {
39
+ greaterThanOrEqual: number;
40
+ lessThanOrEqual: number;
41
+ };
42
+ minSize: {
43
+ greaterThanOrEqual: number;
44
+ lessThanOrEqual: number;
45
+ };
46
+ name: {
47
+ maxLength: number;
48
+ minLength: number;
49
+ };
50
+ };
@@ -5,8 +5,7 @@ const marshalling = require("../../../helpers/marshalling.cjs");
5
5
  const api_gen = require("./api.gen.cjs");
6
6
  const content_gen = require("./content.gen.cjs");
7
7
  const validateNotUndefined = (obj) => {
8
- if (obj === void 0)
9
- throw new TypeError(`object was found undefined`);
8
+ if (obj === void 0) throw new TypeError(`object was found undefined`);
10
9
  return obj;
11
10
  };
12
11
  class InstanceV1UtilsAPI extends api_gen.API {
@@ -3,8 +3,7 @@ import { validatePathParam } from "../../../helpers/marshalling.js";
3
3
  import { API } from "./api.gen.js";
4
4
  import { IMAGE_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES } from "./content.gen.js";
5
5
  const validateNotUndefined = (obj) => {
6
- if (obj === void 0)
7
- throw new TypeError(`object was found undefined`);
6
+ if (obj === void 0) throw new TypeError(`object was found undefined`);
8
7
  return obj;
9
8
  };
10
9
  class InstanceV1UtilsAPI extends API {