@akashnetwork/chain-sdk 1.0.0-alpha.28 → 1.0.0-alpha.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/sdk/provider/auth/mtls/CertificateManager.cjs +1 -1
- package/dist/cjs/sdk/provider/auth/mtls/CertificateManager.cjs.map +2 -2
- package/dist/cjs/sdk/transport/interceptors/retry.cjs +11 -1
- package/dist/cjs/sdk/transport/interceptors/retry.cjs.map +2 -2
- package/dist/cjs/sdl/SDL/SDL.cjs +2 -2
- package/dist/cjs/sdl/SDL/SDL.cjs.map +2 -2
- package/dist/cjs/sdl/validateSDL/validateSDL.cjs +2 -2
- package/dist/cjs/sdl/validateSDL/validateSDL.cjs.map +2 -2
- package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs +1717 -1227
- package/dist/cjs/sdl/validateSDL/validateSDLInput.cjs.map +2 -2
- package/dist/cjs/utils/jsonSchemaValidation.cjs +5 -3
- package/dist/cjs/utils/jsonSchemaValidation.cjs.map +2 -2
- package/dist/esm/{chunk-PN5ITHYB.js → chunk-C7JHIHHY.js} +1713 -1211
- package/dist/esm/chunk-C7JHIHHY.js.map +7 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.web.js +1 -1
- package/dist/sdl-schema.yaml +142 -83
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/sdk/provider/auth/mtls/CertificateManager.d.ts +1 -0
- package/dist/types/sdl/validateSDL/validateSDLInput.d.ts +200 -109
- package/package.json +2 -1
- package/dist/esm/chunk-PN5ITHYB.js.map +0 -7
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage attributes validation:
|
|
3
|
+
* 1. RAM class must not be persistent
|
|
4
|
+
* 2. Non-RAM classes (beta1, beta2, beta3, default) require persistent=true
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export type StorageAttributesValidation = StorageRamClassMustNotBePersistent & {
|
|
8
|
+
class: string;
|
|
9
|
+
persistent: boolean | string;
|
|
10
|
+
};
|
|
1
11
|
/**
|
|
2
12
|
* String array or null value (used for command args and env vars)
|
|
3
13
|
*/
|
|
@@ -70,7 +80,7 @@ export interface SDLInput {
|
|
|
70
80
|
}[] | null;
|
|
71
81
|
};
|
|
72
82
|
};
|
|
73
|
-
units
|
|
83
|
+
units?: string | number;
|
|
74
84
|
};
|
|
75
85
|
memory: {
|
|
76
86
|
size: string;
|
|
@@ -135,7 +145,7 @@ export interface SDLInput {
|
|
|
135
145
|
ip?: string;
|
|
136
146
|
service?: string;
|
|
137
147
|
}[];
|
|
138
|
-
}[];
|
|
148
|
+
}[] | null;
|
|
139
149
|
image: string;
|
|
140
150
|
params?: {
|
|
141
151
|
storage?: {
|
|
@@ -164,14 +174,10 @@ export interface StorageVolume {
|
|
|
164
174
|
size: string;
|
|
165
175
|
}
|
|
166
176
|
/**
|
|
167
|
-
*
|
|
168
|
-
* 1. RAM class must not be persistent
|
|
169
|
-
* 2. Non-RAM classes (beta1, beta2, beta3, default) require persistent=true
|
|
170
|
-
*
|
|
177
|
+
* RAM storage class must not have persistent=true
|
|
171
178
|
*/
|
|
172
|
-
export interface
|
|
173
|
-
|
|
174
|
-
persistent?: boolean | string;
|
|
179
|
+
export interface StorageRamClassMustNotBePersistent {
|
|
180
|
+
[k: string]: unknown;
|
|
175
181
|
}
|
|
176
182
|
/**
|
|
177
183
|
* Price definition with amount and denomination
|
|
@@ -239,19 +245,8 @@ declare var schema: {
|
|
|
239
245
|
required: string[];
|
|
240
246
|
type: string;
|
|
241
247
|
};
|
|
242
|
-
|
|
248
|
+
storageRamClassMustNotBePersistent: {
|
|
243
249
|
description: string;
|
|
244
|
-
additionalProperties: boolean;
|
|
245
|
-
properties: {
|
|
246
|
-
class: {
|
|
247
|
-
type: string;
|
|
248
|
-
};
|
|
249
|
-
persistent: {
|
|
250
|
-
oneOf: {
|
|
251
|
-
type: string;
|
|
252
|
-
}[];
|
|
253
|
-
};
|
|
254
|
-
};
|
|
255
250
|
not: {
|
|
256
251
|
properties: {
|
|
257
252
|
class: {
|
|
@@ -267,6 +262,47 @@ declare var schema: {
|
|
|
267
262
|
};
|
|
268
263
|
required: string[];
|
|
269
264
|
};
|
|
265
|
+
};
|
|
266
|
+
storageNonRamClassRequiresPersistent: {
|
|
267
|
+
description: string;
|
|
268
|
+
if: {
|
|
269
|
+
properties: {
|
|
270
|
+
class: {
|
|
271
|
+
enum: string[];
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
required: string[];
|
|
275
|
+
};
|
|
276
|
+
then: {
|
|
277
|
+
properties: {
|
|
278
|
+
persistent: {
|
|
279
|
+
oneOf: ({
|
|
280
|
+
const: boolean;
|
|
281
|
+
} | {
|
|
282
|
+
const: string;
|
|
283
|
+
})[];
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
required: string[];
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
storageAttributesValidation: {
|
|
290
|
+
description: string;
|
|
291
|
+
additionalProperties: boolean;
|
|
292
|
+
properties: {
|
|
293
|
+
class: {
|
|
294
|
+
type: string;
|
|
295
|
+
};
|
|
296
|
+
persistent: {
|
|
297
|
+
oneOf: {
|
|
298
|
+
type: string;
|
|
299
|
+
}[];
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
allOf: {
|
|
303
|
+
$ref: string;
|
|
304
|
+
}[];
|
|
305
|
+
required: string[];
|
|
270
306
|
type: string;
|
|
271
307
|
};
|
|
272
308
|
storageVolume: {
|
|
@@ -292,6 +328,54 @@ declare var schema: {
|
|
|
292
328
|
minLength: number;
|
|
293
329
|
pattern: string;
|
|
294
330
|
};
|
|
331
|
+
gpuUnitsGt0RequiresAttributes: {
|
|
332
|
+
description: string;
|
|
333
|
+
if: {
|
|
334
|
+
properties: {
|
|
335
|
+
units: {
|
|
336
|
+
oneOf: ({
|
|
337
|
+
type: string;
|
|
338
|
+
exclusiveMinimum: number;
|
|
339
|
+
not?: undefined;
|
|
340
|
+
} | {
|
|
341
|
+
type: string;
|
|
342
|
+
not: {
|
|
343
|
+
pattern: string;
|
|
344
|
+
};
|
|
345
|
+
exclusiveMinimum?: undefined;
|
|
346
|
+
})[];
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
required: string[];
|
|
350
|
+
};
|
|
351
|
+
then: {
|
|
352
|
+
required: string[];
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
gpuAttributesRequireUnitsGt0: {
|
|
356
|
+
description: string;
|
|
357
|
+
if: {
|
|
358
|
+
required: string[];
|
|
359
|
+
};
|
|
360
|
+
then: {
|
|
361
|
+
properties: {
|
|
362
|
+
units: {
|
|
363
|
+
oneOf: ({
|
|
364
|
+
type: string;
|
|
365
|
+
exclusiveMinimum: number;
|
|
366
|
+
not?: undefined;
|
|
367
|
+
} | {
|
|
368
|
+
type: string;
|
|
369
|
+
not: {
|
|
370
|
+
pattern: string;
|
|
371
|
+
};
|
|
372
|
+
exclusiveMinimum?: undefined;
|
|
373
|
+
})[];
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
required: string[];
|
|
377
|
+
};
|
|
378
|
+
};
|
|
295
379
|
exposeToWithIpEnforcesGlobal: {
|
|
296
380
|
description: string;
|
|
297
381
|
if: {
|
|
@@ -440,7 +524,9 @@ declare var schema: {
|
|
|
440
524
|
}[];
|
|
441
525
|
};
|
|
442
526
|
};
|
|
443
|
-
|
|
527
|
+
allOf: {
|
|
528
|
+
$ref: string;
|
|
529
|
+
}[];
|
|
444
530
|
type: string;
|
|
445
531
|
};
|
|
446
532
|
memory: {
|
|
@@ -565,111 +651,116 @@ declare var schema: {
|
|
|
565
651
|
$ref: string;
|
|
566
652
|
};
|
|
567
653
|
expose: {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
type: string;
|
|
576
|
-
};
|
|
577
|
-
as: {
|
|
578
|
-
$ref: string;
|
|
579
|
-
};
|
|
580
|
-
http_options: {
|
|
581
|
-
additionalProperties: boolean;
|
|
582
|
-
properties: {
|
|
583
|
-
max_body_size: {
|
|
654
|
+
oneOf: ({
|
|
655
|
+
type: string;
|
|
656
|
+
items: {
|
|
657
|
+
additionalProperties: boolean;
|
|
658
|
+
properties: {
|
|
659
|
+
accept: {
|
|
660
|
+
items: {
|
|
584
661
|
type: string;
|
|
585
|
-
minimum: number;
|
|
586
|
-
maximum: number;
|
|
587
|
-
description: string;
|
|
588
662
|
};
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
maxItems: number;
|
|
599
|
-
minItems: number;
|
|
600
|
-
not?: undefined;
|
|
601
|
-
} | {
|
|
663
|
+
type: string;
|
|
664
|
+
};
|
|
665
|
+
as: {
|
|
666
|
+
$ref: string;
|
|
667
|
+
};
|
|
668
|
+
http_options: {
|
|
669
|
+
additionalProperties: boolean;
|
|
670
|
+
properties: {
|
|
671
|
+
max_body_size: {
|
|
602
672
|
type: string;
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
673
|
+
minimum: number;
|
|
674
|
+
maximum: number;
|
|
675
|
+
description: string;
|
|
676
|
+
};
|
|
677
|
+
next_cases: {
|
|
678
|
+
oneOf: ({
|
|
679
|
+
type: string;
|
|
680
|
+
items: {
|
|
681
|
+
$ref: string;
|
|
682
|
+
};
|
|
607
683
|
contains: {
|
|
608
684
|
const: string;
|
|
609
685
|
};
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
};
|
|
630
|
-
send_timeout: {
|
|
631
|
-
type: string;
|
|
632
|
-
minimum: number;
|
|
633
|
-
maximum: number;
|
|
634
|
-
description: string;
|
|
635
|
-
};
|
|
636
|
-
};
|
|
637
|
-
type: string;
|
|
638
|
-
};
|
|
639
|
-
port: {
|
|
640
|
-
$ref: string;
|
|
641
|
-
};
|
|
642
|
-
proto: {
|
|
643
|
-
enum: string[];
|
|
644
|
-
type: string;
|
|
645
|
-
};
|
|
646
|
-
to: {
|
|
647
|
-
items: {
|
|
648
|
-
additionalProperties: boolean;
|
|
649
|
-
properties: {
|
|
650
|
-
global: {
|
|
686
|
+
maxItems: number;
|
|
687
|
+
minItems: number;
|
|
688
|
+
not?: undefined;
|
|
689
|
+
} | {
|
|
690
|
+
type: string;
|
|
691
|
+
items: {
|
|
692
|
+
$ref: string;
|
|
693
|
+
};
|
|
694
|
+
not: {
|
|
695
|
+
contains: {
|
|
696
|
+
const: string;
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
contains?: undefined;
|
|
700
|
+
maxItems?: undefined;
|
|
701
|
+
minItems?: undefined;
|
|
702
|
+
})[];
|
|
703
|
+
};
|
|
704
|
+
next_timeout: {
|
|
651
705
|
type: string;
|
|
706
|
+
minimum: number;
|
|
652
707
|
};
|
|
653
|
-
|
|
654
|
-
minLength: number;
|
|
708
|
+
next_tries: {
|
|
655
709
|
type: string;
|
|
710
|
+
minimum: number;
|
|
656
711
|
};
|
|
657
|
-
|
|
712
|
+
read_timeout: {
|
|
658
713
|
type: string;
|
|
714
|
+
minimum: number;
|
|
715
|
+
maximum: number;
|
|
716
|
+
description: string;
|
|
717
|
+
};
|
|
718
|
+
send_timeout: {
|
|
719
|
+
type: string;
|
|
720
|
+
minimum: number;
|
|
721
|
+
maximum: number;
|
|
722
|
+
description: string;
|
|
659
723
|
};
|
|
660
724
|
};
|
|
661
|
-
allOf: {
|
|
662
|
-
$ref: string;
|
|
663
|
-
}[];
|
|
664
725
|
type: string;
|
|
665
726
|
};
|
|
666
|
-
|
|
727
|
+
port: {
|
|
728
|
+
$ref: string;
|
|
729
|
+
};
|
|
730
|
+
proto: {
|
|
731
|
+
enum: string[];
|
|
732
|
+
type: string;
|
|
733
|
+
};
|
|
734
|
+
to: {
|
|
735
|
+
items: {
|
|
736
|
+
additionalProperties: boolean;
|
|
737
|
+
properties: {
|
|
738
|
+
global: {
|
|
739
|
+
type: string;
|
|
740
|
+
};
|
|
741
|
+
ip: {
|
|
742
|
+
minLength: number;
|
|
743
|
+
type: string;
|
|
744
|
+
};
|
|
745
|
+
service: {
|
|
746
|
+
type: string;
|
|
747
|
+
};
|
|
748
|
+
};
|
|
749
|
+
allOf: {
|
|
750
|
+
$ref: string;
|
|
751
|
+
}[];
|
|
752
|
+
type: string;
|
|
753
|
+
};
|
|
754
|
+
type: string;
|
|
755
|
+
};
|
|
667
756
|
};
|
|
757
|
+
required: string[];
|
|
758
|
+
type: string;
|
|
668
759
|
};
|
|
669
|
-
|
|
760
|
+
} | {
|
|
670
761
|
type: string;
|
|
671
|
-
|
|
672
|
-
|
|
762
|
+
items?: undefined;
|
|
763
|
+
})[];
|
|
673
764
|
};
|
|
674
765
|
image: {
|
|
675
766
|
type: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akashnetwork/chain-sdk",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Akash API TypeScript client",
|
|
6
6
|
"keywords": [],
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"test:cov": "jest --selectProjects unit functional --coverage",
|
|
40
40
|
"test:functional": "jest --selectProjects functional",
|
|
41
41
|
"test:unit": "jest --selectProjects unit",
|
|
42
|
+
"test:sdk-compatibility": "jest --selectProjects functional --testPathPattern=sdl-parity.spec.ts",
|
|
42
43
|
"compile:validators": "node --experimental-strip-types --no-warnings ./script/compile-json-schema-to-ts.ts",
|
|
43
44
|
"release": "npm run build && npm test && npm publish --tag alpha"
|
|
44
45
|
},
|