@scaleway/sdk-inference 1.0.1

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 (37) hide show
  1. package/LICENSE +191 -0
  2. package/dist/index.gen.cjs +6 -0
  3. package/dist/index.gen.d.ts +6 -0
  4. package/dist/index.gen.js +6 -0
  5. package/dist/v1/api.gen.cjs +271 -0
  6. package/dist/v1/api.gen.d.ts +137 -0
  7. package/dist/v1/api.gen.js +271 -0
  8. package/dist/v1/content.gen.cjs +13 -0
  9. package/dist/v1/content.gen.d.ts +5 -0
  10. package/dist/v1/content.gen.js +13 -0
  11. package/dist/v1/index.gen.cjs +22 -0
  12. package/dist/v1/index.gen.d.ts +5 -0
  13. package/dist/v1/index.gen.js +22 -0
  14. package/dist/v1/marshalling.gen.cjs +258 -0
  15. package/dist/v1/marshalling.gen.d.ts +14 -0
  16. package/dist/v1/marshalling.gen.js +258 -0
  17. package/dist/v1/types.gen.d.ts +577 -0
  18. package/dist/v1/validation-rules.gen.cjs +65 -0
  19. package/dist/v1/validation-rules.gen.d.ts +57 -0
  20. package/dist/v1/validation-rules.gen.js +65 -0
  21. package/dist/v1beta1/api.gen.cjs +301 -0
  22. package/dist/v1beta1/api.gen.d.ts +148 -0
  23. package/dist/v1beta1/api.gen.js +301 -0
  24. package/dist/v1beta1/content.gen.cjs +8 -0
  25. package/dist/v1beta1/content.gen.d.ts +3 -0
  26. package/dist/v1beta1/content.gen.js +8 -0
  27. package/dist/v1beta1/index.gen.cjs +25 -0
  28. package/dist/v1beta1/index.gen.d.ts +5 -0
  29. package/dist/v1beta1/index.gen.js +25 -0
  30. package/dist/v1beta1/marshalling.gen.cjs +271 -0
  31. package/dist/v1beta1/marshalling.gen.d.ts +18 -0
  32. package/dist/v1beta1/marshalling.gen.js +271 -0
  33. package/dist/v1beta1/types.gen.d.ts +622 -0
  34. package/dist/v1beta1/validation-rules.gen.cjs +56 -0
  35. package/dist/v1beta1/validation-rules.gen.d.ts +50 -0
  36. package/dist/v1beta1/validation-rules.gen.js +56 -0
  37. package/package.json +51 -0
@@ -0,0 +1,622 @@
1
+ import type { Region as ScwRegion } from '@scaleway/sdk-client';
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 = 'display_rank_asc' | '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
+ /**
8
+ * ID of the Private Network.
9
+ */
10
+ privateNetworkId: string;
11
+ }
12
+ export interface EndpointPublicAccessDetails {
13
+ }
14
+ export interface EndpointSpecPrivateNetwork {
15
+ /**
16
+ * ID of the Private Network.
17
+ */
18
+ privateNetworkId: string;
19
+ }
20
+ export interface EndpointSpecPublic {
21
+ }
22
+ export interface Endpoint {
23
+ /**
24
+ * Unique identifier.
25
+ */
26
+ id: string;
27
+ /**
28
+ * For private endpoints, the URL will be accessible only from the Private Network.
29
+ In addition, private endpoints will expose a CA certificate that can be used to verify the server's identity.
30
+ This CA certificate can be retrieved using the `GetDeploymentCertificate` API call.
31
+ */
32
+ url: string;
33
+ /**
34
+ * Defines whether the endpoint is public.
35
+ *
36
+ * One-of ('details'): at most one of 'publicAccess', 'privateNetwork' could be set.
37
+ */
38
+ publicAccess?: EndpointPublicAccessDetails;
39
+ /**
40
+ * Details of the Private Network.
41
+ *
42
+ * One-of ('details'): at most one of 'publicAccess', 'privateNetwork' could be set.
43
+ */
44
+ privateNetwork?: EndpointPrivateNetworkDetails;
45
+ /**
46
+ * Defines whether the authentication is disabled.
47
+ */
48
+ disableAuth: boolean;
49
+ }
50
+ export interface ModelS3Model {
51
+ s3Url: string;
52
+ pythonDependencies: Record<string, string>;
53
+ nodeType?: string;
54
+ tritonServerVersion?: string;
55
+ }
56
+ export interface ACLRuleRequest {
57
+ /**
58
+ * It can be specified as a single IP address or a range of IP addresses in CIDR notation.
59
+ */
60
+ ip: string;
61
+ /**
62
+ * Description of the ACL rule.
63
+ */
64
+ description: string;
65
+ }
66
+ export interface ACLRule {
67
+ /**
68
+ * Unique identifier.
69
+ */
70
+ id: string;
71
+ /**
72
+ * Allowed IP address or CIDR range.
73
+ */
74
+ ip: string;
75
+ /**
76
+ * Description of the ACL rule.
77
+ */
78
+ description: string;
79
+ }
80
+ export interface EndpointSpec {
81
+ /**
82
+ * Set the endpoint as public.
83
+ *
84
+ * One-of ('spec'): at most one of 'public', 'privateNetwork' could be set.
85
+ */
86
+ public?: EndpointSpecPublic;
87
+ /**
88
+ * Private endpoints are only accessible from the Private Network.
89
+ *
90
+ * One-of ('spec'): at most one of 'public', 'privateNetwork' could be set.
91
+ */
92
+ privateNetwork?: EndpointSpecPrivateNetwork;
93
+ /**
94
+ * By default, deployments are protected by IAM authentication.
95
+ When setting this field to true, the authentication will be disabled.
96
+ */
97
+ disableAuth: boolean;
98
+ }
99
+ export interface Deployment {
100
+ /**
101
+ * Unique identifier.
102
+ */
103
+ id: string;
104
+ /**
105
+ * Name of the deployment.
106
+ */
107
+ name: string;
108
+ /**
109
+ * Project ID.
110
+ */
111
+ projectId: string;
112
+ /**
113
+ * Status of the deployment.
114
+ */
115
+ status: DeploymentStatus;
116
+ /**
117
+ * List of tags applied to the deployment.
118
+ */
119
+ tags: string[];
120
+ /**
121
+ * Node type of the deployment.
122
+ */
123
+ nodeType: string;
124
+ /**
125
+ * List of endpoints.
126
+ */
127
+ endpoints: Endpoint[];
128
+ /**
129
+ * Current size of the pool.
130
+ */
131
+ size: number;
132
+ /**
133
+ * Defines the minimum size of the pool.
134
+ */
135
+ minSize: number;
136
+ /**
137
+ * Defines the maximum size of the pool.
138
+ */
139
+ maxSize: number;
140
+ /**
141
+ * Displays information if your deployment is in error state.
142
+ */
143
+ errorMessage?: string;
144
+ /**
145
+ * The inference model used for the deployment.
146
+ */
147
+ modelName: string;
148
+ /**
149
+ * ID of the model used for the deployment.
150
+ */
151
+ modelId: string;
152
+ /**
153
+ * Creation date of the deployment.
154
+ */
155
+ createdAt?: Date;
156
+ /**
157
+ * Last modification date of the deployment.
158
+ */
159
+ updatedAt?: Date;
160
+ /**
161
+ * Region of the deployment.
162
+ */
163
+ region: ScwRegion;
164
+ }
165
+ export interface Model {
166
+ /**
167
+ * Unique identifier.
168
+ */
169
+ id: string;
170
+ /**
171
+ * Unique Name identifier.
172
+ */
173
+ name: string;
174
+ /**
175
+ * Project ID.
176
+ */
177
+ projectId: string;
178
+ /**
179
+ * Name of the model provider.
180
+ */
181
+ provider: string;
182
+ /**
183
+ * List of tags applied to the model.
184
+ */
185
+ tags: string[];
186
+ /**
187
+ * Purpose of the model.
188
+ */
189
+ description: string;
190
+ /**
191
+ * Defines whether the model has an end user license agreement.
192
+ */
193
+ hasEula: boolean;
194
+ /**
195
+ * Creation date of the model.
196
+ */
197
+ createdAt?: Date;
198
+ /**
199
+ * Last modification date of the model.
200
+ */
201
+ updatedAt?: Date;
202
+ /**
203
+ * Region of the model.
204
+ */
205
+ region: ScwRegion;
206
+ /**
207
+ * Object Storage URL pointing to the model source weight.
208
+ *
209
+ * One-of ('source'): at most one of 's3Model' could be set.
210
+ */
211
+ s3Model?: ModelS3Model;
212
+ /**
213
+ * Defines whether the model is public or not.
214
+ */
215
+ isPublic: boolean;
216
+ /**
217
+ * Names of the node types compatible with the model.
218
+ */
219
+ compatibleNodeTypes: string[];
220
+ /**
221
+ * Quantization level of the model.
222
+ */
223
+ quantizationLevel: string;
224
+ }
225
+ export interface NodeType {
226
+ /**
227
+ * Name of the node type.
228
+ */
229
+ name: string;
230
+ /**
231
+ * Current stock status for the node type.
232
+ */
233
+ stockStatus: NodeTypeStock;
234
+ /**
235
+ * Current specs of the offer.
236
+ */
237
+ description: string;
238
+ /**
239
+ * Number of virtual CPUs.
240
+ */
241
+ vcpus: number;
242
+ /**
243
+ * Quantity of RAM.
244
+ */
245
+ memory: number;
246
+ /**
247
+ * Quantity of GPU RAM.
248
+ */
249
+ vram: number;
250
+ /**
251
+ * The node type is currently disabled.
252
+ */
253
+ disabled: boolean;
254
+ /**
255
+ * The node type is currently in beta.
256
+ */
257
+ beta: boolean;
258
+ /**
259
+ * Creation date of the node type.
260
+ */
261
+ createdAt?: Date;
262
+ /**
263
+ * Last modification date of the node type.
264
+ */
265
+ updatedAt?: Date;
266
+ /**
267
+ * Number of GPUs.
268
+ */
269
+ gpus: number;
270
+ /**
271
+ * Region of the node type.
272
+ */
273
+ region: ScwRegion;
274
+ }
275
+ export type AddDeploymentACLRulesRequest = {
276
+ /**
277
+ * Region to target. If none is passed will use default region from the config.
278
+ */
279
+ region?: ScwRegion;
280
+ /**
281
+ * ID of the deployment to add ACL rules to.
282
+ */
283
+ deploymentId: string;
284
+ /**
285
+ * List of ACL rules to add.
286
+ */
287
+ acls?: ACLRuleRequest[];
288
+ };
289
+ export interface AddDeploymentACLRulesResponse {
290
+ /**
291
+ * List of ACL rules added.
292
+ */
293
+ rules: ACLRule[];
294
+ }
295
+ export type CreateDeploymentRequest = {
296
+ /**
297
+ * Region to target. If none is passed will use default region from the config.
298
+ */
299
+ region?: ScwRegion;
300
+ /**
301
+ * Name of the deployment.
302
+ */
303
+ name?: string;
304
+ /**
305
+ * ID of the Project to create the deployment in.
306
+ */
307
+ projectId?: string;
308
+ /**
309
+ * Name of the model to use.
310
+ */
311
+ modelName: string;
312
+ /**
313
+ * If the model has an EULA, you must accept it before proceeding.
314
+ The terms of the EULA can be retrieved using the `GetModelEula` API call.
315
+ */
316
+ acceptEula?: boolean;
317
+ /**
318
+ * Name of the node type to use.
319
+ */
320
+ nodeType: string;
321
+ /**
322
+ * List of tags to apply to the deployment.
323
+ */
324
+ tags?: string[];
325
+ /**
326
+ * Defines the minimum size of the pool.
327
+ */
328
+ minSize?: number;
329
+ /**
330
+ * Defines the maximum size of the pool.
331
+ */
332
+ maxSize?: number;
333
+ /**
334
+ * List of endpoints to create.
335
+ */
336
+ endpoints: EndpointSpec[];
337
+ };
338
+ export type CreateEndpointRequest = {
339
+ /**
340
+ * Region to target. If none is passed will use default region from the config.
341
+ */
342
+ region?: ScwRegion;
343
+ /**
344
+ * ID of the deployment to create the endpoint for.
345
+ */
346
+ deploymentId: string;
347
+ /**
348
+ * Specification of the endpoint.
349
+ */
350
+ endpoint: EndpointSpec;
351
+ };
352
+ export type DeleteDeploymentACLRuleRequest = {
353
+ /**
354
+ * Region to target. If none is passed will use default region from the config.
355
+ */
356
+ region?: ScwRegion;
357
+ /**
358
+ * ID of the ACL rule to delete.
359
+ */
360
+ aclId: string;
361
+ };
362
+ export type DeleteDeploymentRequest = {
363
+ /**
364
+ * Region to target. If none is passed will use default region from the config.
365
+ */
366
+ region?: ScwRegion;
367
+ /**
368
+ * ID of the deployment to delete.
369
+ */
370
+ deploymentId: string;
371
+ };
372
+ export type DeleteEndpointRequest = {
373
+ /**
374
+ * Region to target. If none is passed will use default region from the config.
375
+ */
376
+ region?: ScwRegion;
377
+ /**
378
+ * ID of the endpoint to delete.
379
+ */
380
+ endpointId: string;
381
+ };
382
+ export interface Eula {
383
+ /**
384
+ * Content of the end user license agreement.
385
+ */
386
+ content: string;
387
+ }
388
+ export type GetDeploymentCertificateRequest = {
389
+ /**
390
+ * Region to target. If none is passed will use default region from the config.
391
+ */
392
+ region?: ScwRegion;
393
+ deploymentId: string;
394
+ };
395
+ export type GetDeploymentRequest = {
396
+ /**
397
+ * Region to target. If none is passed will use default region from the config.
398
+ */
399
+ region?: ScwRegion;
400
+ /**
401
+ * ID of the deployment to get.
402
+ */
403
+ deploymentId: string;
404
+ };
405
+ export type GetModelEulaRequest = {
406
+ /**
407
+ * Region to target. If none is passed will use default region from the config.
408
+ */
409
+ region?: ScwRegion;
410
+ modelId: string;
411
+ };
412
+ export type GetModelRequest = {
413
+ /**
414
+ * Region to target. If none is passed will use default region from the config.
415
+ */
416
+ region?: ScwRegion;
417
+ /**
418
+ * ID of the model to get.
419
+ */
420
+ modelId: string;
421
+ };
422
+ export type ListDeploymentACLRulesRequest = {
423
+ /**
424
+ * Region to target. If none is passed will use default region from the config.
425
+ */
426
+ region?: ScwRegion;
427
+ /**
428
+ * ID of the deployment to list ACL rules for.
429
+ */
430
+ deploymentId: string;
431
+ /**
432
+ * Page number to return.
433
+ */
434
+ page?: number;
435
+ /**
436
+ * Maximum number of ACL rules to return per page.
437
+ */
438
+ pageSize?: number;
439
+ };
440
+ export interface ListDeploymentACLRulesResponse {
441
+ /**
442
+ * List of ACL rules on the current page.
443
+ */
444
+ rules: ACLRule[];
445
+ /**
446
+ * Total number of ACL rules.
447
+ */
448
+ totalCount: number;
449
+ }
450
+ export type ListDeploymentsRequest = {
451
+ /**
452
+ * Region to target. If none is passed will use default region from the config.
453
+ */
454
+ region?: ScwRegion;
455
+ /**
456
+ * Page number to return.
457
+ */
458
+ page?: number;
459
+ /**
460
+ * Maximum number of deployments to return per page.
461
+ */
462
+ pageSize?: number;
463
+ /**
464
+ * Order in which to return results.
465
+ */
466
+ orderBy?: ListDeploymentsRequestOrderBy;
467
+ /**
468
+ * Filter by Project ID.
469
+ */
470
+ projectId?: string;
471
+ /**
472
+ * Filter by Organization ID.
473
+ */
474
+ organizationId?: string;
475
+ /**
476
+ * Filter by deployment name.
477
+ */
478
+ name?: string;
479
+ /**
480
+ * Filter by tags.
481
+ */
482
+ tags?: string[];
483
+ };
484
+ export interface ListDeploymentsResponse {
485
+ /**
486
+ * List of deployments on the current page.
487
+ */
488
+ deployments: Deployment[];
489
+ /**
490
+ * Total number of deployments.
491
+ */
492
+ totalCount: number;
493
+ }
494
+ export type ListModelsRequest = {
495
+ /**
496
+ * Region to target. If none is passed will use default region from the config.
497
+ */
498
+ region?: ScwRegion;
499
+ /**
500
+ * Order in which to return results.
501
+ */
502
+ orderBy?: ListModelsRequestOrderBy;
503
+ /**
504
+ * Page number to return.
505
+ */
506
+ page?: number;
507
+ /**
508
+ * Maximum number of models to return per page.
509
+ */
510
+ pageSize?: number;
511
+ /**
512
+ * Filter by Project ID.
513
+ */
514
+ projectId?: string;
515
+ /**
516
+ * Filter by model name.
517
+ */
518
+ name?: string;
519
+ /**
520
+ * Filter by tags.
521
+ */
522
+ tags?: string[];
523
+ };
524
+ export interface ListModelsResponse {
525
+ /**
526
+ * List of models on the current page.
527
+ */
528
+ models: Model[];
529
+ /**
530
+ * Total number of models.
531
+ */
532
+ totalCount: number;
533
+ }
534
+ export type ListNodeTypesRequest = {
535
+ /**
536
+ * Region to target. If none is passed will use default region from the config.
537
+ */
538
+ region?: ScwRegion;
539
+ /**
540
+ * Page number to return.
541
+ */
542
+ page?: number;
543
+ /**
544
+ * Maximum number of node types to return per page.
545
+ */
546
+ pageSize?: number;
547
+ /**
548
+ * Include disabled node types in the response.
549
+ */
550
+ includeDisabledTypes: boolean;
551
+ };
552
+ export interface ListNodeTypesResponse {
553
+ /**
554
+ * List of node types.
555
+ */
556
+ nodeTypes: NodeType[];
557
+ /**
558
+ * Total number of node types.
559
+ */
560
+ totalCount: number;
561
+ }
562
+ export type SetDeploymentACLRulesRequest = {
563
+ /**
564
+ * Region to target. If none is passed will use default region from the config.
565
+ */
566
+ region?: ScwRegion;
567
+ /**
568
+ * ID of the deployment to set ACL rules for.
569
+ */
570
+ deploymentId: string;
571
+ /**
572
+ * All existing ACL rules will be replaced by the new ones.
573
+ */
574
+ acls?: ACLRuleRequest[];
575
+ };
576
+ export interface SetDeploymentACLRulesResponse {
577
+ /**
578
+ * List of ACL rules that were set.
579
+ */
580
+ rules: ACLRule[];
581
+ }
582
+ export type UpdateDeploymentRequest = {
583
+ /**
584
+ * Region to target. If none is passed will use default region from the config.
585
+ */
586
+ region?: ScwRegion;
587
+ /**
588
+ * ID of the deployment to update.
589
+ */
590
+ deploymentId: string;
591
+ /**
592
+ * Name of the deployment.
593
+ */
594
+ name?: string;
595
+ /**
596
+ * List of tags to apply to the deployment.
597
+ */
598
+ tags?: string[];
599
+ /**
600
+ * Defines the new minimum size of the pool.
601
+ */
602
+ minSize?: number;
603
+ /**
604
+ * Defines the new maximum size of the pool.
605
+ */
606
+ maxSize?: number;
607
+ };
608
+ export type UpdateEndpointRequest = {
609
+ /**
610
+ * Region to target. If none is passed will use default region from the config.
611
+ */
612
+ region?: ScwRegion;
613
+ /**
614
+ * ID of the endpoint to update.
615
+ */
616
+ endpointId: string;
617
+ /**
618
+ * By default, deployments are protected by IAM authentication.
619
+ When setting this field to true, the authentication will be disabled.
620
+ */
621
+ disableAuth?: boolean;
622
+ };
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const CreateDeploymentRequest = {
4
+ maxSize: {
5
+ greaterThanOrEqual: 1,
6
+ lessThanOrEqual: 50
7
+ },
8
+ minSize: {
9
+ greaterThanOrEqual: 1,
10
+ lessThanOrEqual: 50
11
+ },
12
+ modelName: {
13
+ maxLength: 255,
14
+ minLength: 0,
15
+ pattern: /^[A-Za-z0-9_-]+\/[A-Za-z0-9_.-]+(:\w+)?$/
16
+ },
17
+ name: {
18
+ maxLength: 255,
19
+ minLength: 1,
20
+ pattern: /^[A-Za-z0-9-_]+$/
21
+ },
22
+ nodeType: {
23
+ maxLength: 64,
24
+ minLength: 1
25
+ }
26
+ };
27
+ const ListDeploymentsRequest = {
28
+ name: {
29
+ maxLength: 255,
30
+ minLength: 1
31
+ }
32
+ };
33
+ const ListModelsRequest = {
34
+ name: {
35
+ maxLength: 255,
36
+ minLength: 1
37
+ }
38
+ };
39
+ const UpdateDeploymentRequest = {
40
+ maxSize: {
41
+ greaterThanOrEqual: 1,
42
+ lessThanOrEqual: 50
43
+ },
44
+ minSize: {
45
+ greaterThanOrEqual: 1,
46
+ lessThanOrEqual: 50
47
+ },
48
+ name: {
49
+ maxLength: 255,
50
+ minLength: 1
51
+ }
52
+ };
53
+ exports.CreateDeploymentRequest = CreateDeploymentRequest;
54
+ exports.ListDeploymentsRequest = ListDeploymentsRequest;
55
+ exports.ListModelsRequest = ListModelsRequest;
56
+ exports.UpdateDeploymentRequest = UpdateDeploymentRequest;
@@ -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
+ };