-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathswagger.yaml
More file actions
3242 lines (3242 loc) · 82 KB
/
swagger.yaml
File metadata and controls
3242 lines (3242 loc) · 82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
basePath: /api/v1
definitions:
auth.TokenPair:
properties:
access_token:
type: string
refresh_token:
type: string
type: object
gorm.DeletedAt:
properties:
time:
type: string
valid:
description: Valid is true if Time is not NULL
type: boolean
type: object
gridtypes.Unit:
enum:
- 1024
- 1048576
- 1073741824
- 1099511627776
format: int64
type: integer
x-enum-varnames:
- Kilobyte
- Megabyte
- Gigabyte
- Terabyte
handlers.APIResponse:
properties:
data: {}
message:
type: string
status:
type: integer
type: object
handlers.ChangePasswordInput:
properties:
confirm_password:
type: string
email:
type: string
password:
maxLength: 64
minLength: 8
type: string
required:
- confirm_password
- email
- password
type: object
handlers.ChargeBalanceInput:
properties:
amount:
type: number
card_type:
type: string
payment_method_id:
type: string
required:
- amount
- card_type
- payment_method_id
type: object
handlers.ChargeBalanceResponse:
properties:
email:
type: string
workflow_id:
type: string
type: object
handlers.ClusterInput:
properties:
name:
type: string
nodes:
items:
$ref: '#/definitions/handlers.NodeInput'
type: array
token:
type: string
required:
- name
- nodes
type: object
handlers.CreditRequestInput:
properties:
amount:
type: number
memo:
maxLength: 255
minLength: 3
type: string
required:
- amount
- memo
type: object
handlers.CreditUserResponse:
properties:
amount:
type: number
memo:
type: string
user:
type: string
type: object
handlers.DeploymentListResponse:
properties:
count:
type: integer
deployments:
items:
$ref: '#/definitions/services.ClusterData'
type: array
type: object
handlers.DeploymentWorkflowResponse:
properties:
status:
type: string
task_id:
type: string
type: object
handlers.EmailInput:
properties:
email:
type: string
required:
- email
type: object
handlers.GenerateVouchersInput:
properties:
count:
type: integer
expire_after_days:
type: integer
value:
type: number
required:
- count
- expire_after_days
- value
type: object
handlers.KubeconfigResponse:
properties:
kubeconfig:
type: string
type: object
handlers.ListNodesResponse:
properties:
nodes:
items:
$ref: '#/definitions/types.Node'
type: array
total:
type: integer
type: object
handlers.ListNodesWithDiscountResponse:
properties:
nodes:
items:
$ref: '#/definitions/handlers.NodesWithDiscount'
type: array
total:
type: integer
type: object
handlers.LoginInput:
properties:
email:
type: string
password:
maxLength: 64
minLength: 3
type: string
required:
- email
- password
type: object
handlers.MaintenanceModeStatus:
properties:
enabled:
type: boolean
type: object
handlers.NodeInput:
properties:
cpu:
type: integer
data_disks:
description: Storage in MB
items:
type: integer
type: array
entrypoint:
type: string
env_vars:
additionalProperties:
type: string
description: SSH_KEY, etc.
type: object
flist:
type: string
gpu_ids:
description: List of GPU IDs
items:
type: string
type: array
memory:
description: Memory in MB
type: integer
name:
type: string
node_id:
type: integer
root_size:
description: Storage in MB
type: integer
type:
enum:
- worker
- master
- leader
type: string
required:
- cpu
- memory
- name
- node_id
- root_size
- type
type: object
handlers.NodeStoragePoolResponse:
properties:
pools:
items:
$ref: '#/definitions/services.Pool'
type: array
type: object
handlers.NodesWithDiscount:
properties:
certificationType:
type: string
city:
type: string
country:
type: string
cpu_benchmark:
$ref: '#/definitions/types.CpuBenchmark'
created:
type: integer
dedicated:
type: boolean
discount_price:
type: number
dmi:
$ref: '#/definitions/types.Dmi'
extraFee:
type: integer
farm_free_ips:
type: integer
farmId:
type: integer
farmName:
type: string
farmingPolicyId:
type: integer
features:
items:
type: string
type: array
gpus:
items:
$ref: '#/definitions/types.NodeGPU'
type: array
gridVersion:
type: integer
healthy:
type: boolean
id:
type: string
inDedicatedFarm:
type: boolean
location:
$ref: '#/definitions/types.Location'
nodeId:
type: integer
num_gpu:
type: integer
power:
$ref: '#/definitions/types.NodePower'
price_usd:
type: number
publicConfig:
$ref: '#/definitions/types.PublicConfig'
rentContractId:
type: integer
rentable:
type: boolean
rented:
type: boolean
rentedByTwinId:
type: integer
serialNumber:
type: string
speed:
$ref: '#/definitions/types.Speed'
status:
type: string
total_resources:
$ref: '#/definitions/types.Capacity'
twinId:
type: integer
updatedAt:
type: integer
uptime:
type: integer
used_resources:
$ref: '#/definitions/types.Capacity'
type: object
handlers.NotificationResponse:
description: A notification response
properties:
created_at:
type: string
id:
type: string
payload:
additionalProperties:
type: string
type: object
read_at:
type: string
severity:
$ref: '#/definitions/models.NotificationSeverity'
status:
$ref: '#/definitions/models.NotificationStatus'
task_id:
type: string
type:
$ref: '#/definitions/models.NotificationType'
type: object
handlers.PendingRecordsResponse:
properties:
pending_records:
items:
$ref: '#/definitions/services.PendingRecordsWithUSDAmounts'
type: array
type: object
handlers.RedeemVoucherResponse:
properties:
amount:
type: number
email:
type: string
voucher_code:
type: string
workflow_id:
type: string
type: object
handlers.RefreshTokenInput:
properties:
refresh_token:
type: string
required:
- refresh_token
type: object
handlers.RefreshTokenResponse:
properties:
access_token:
type: string
type: object
handlers.RegisterInput:
properties:
confirm_password:
type: string
email:
type: string
name:
maxLength: 64
minLength: 3
type: string
password:
maxLength: 64
minLength: 8
type: string
required:
- confirm_password
- email
- name
- password
type: object
handlers.RegisterResponse:
properties:
email:
type: string
timeout:
type: string
type: object
handlers.RegisterUserResponse:
properties:
email:
type: string
workflow_id:
type: string
type: object
handlers.ReserveNodeResponse:
properties:
email:
type: string
node_id:
type: integer
workflow_id:
type: string
type: object
handlers.SSHKeyInput:
properties:
name:
type: string
public_key:
type: string
required:
- name
- public_key
type: object
handlers.TwinResponse:
properties:
account_id:
type: string
public_key:
type: string
relay:
type: string
twin_id:
type: integer
type: object
handlers.UnreserveNodeResponse:
properties:
contract_id:
type: integer
email:
type: string
workflow_id:
type: string
type: object
handlers.UserBalanceResponse:
properties:
balance_usd:
type: number
debt_usd:
type: number
pending_balance_usd:
type: number
type: object
handlers.UserWorkflow:
properties:
created_at:
type: string
current_step:
type: integer
metadata:
additionalProperties:
type: string
type: object
name:
type: string
status:
type: string
step_name:
type: string
total_steps:
type: integer
workflow_id:
type: string
type: object
handlers.UserWorkflowsResponse:
properties:
workflows:
items:
$ref: '#/definitions/handlers.UserWorkflow'
type: array
type: object
handlers.VerifyCodeInput:
properties:
code:
type: integer
email:
type: string
required:
- code
- email
type: object
handlers.VerifyRegisterUserResponse:
properties:
access_token:
type: string
email:
type: string
refresh_token:
type: string
workflow_id:
type: string
type: object
kubedeployer.Cluster:
properties:
name:
maxLength: 20
minLength: 3
type: string
network:
allOf:
- $ref: '#/definitions/workloads.ZNet'
description: Computed
nodes:
items:
$ref: '#/definitions/kubedeployer.Node'
minItems: 1
type: array
project_name:
type: string
token:
type: string
required:
- name
- nodes
type: object
kubedeployer.Node:
properties:
contract_id:
type: integer
cpu:
minimum: 1
type: integer
data_disks:
description: Storage in MB
items:
type: integer
minItems: 1
type: array
entrypoint:
type: string
env_vars:
additionalProperties:
type: string
type: object
flist:
description: Optional fields
type: string
gpu_ids:
description: List of GPU IDs
items:
type: string
type: array
ip:
description: Computed
type: string
memory:
description: Memory in MB
minimum: 2048
type: integer
mycelium_ip:
type: string
name:
maxLength: 20
minLength: 3
type: string
node_id:
type: integer
original_name:
type: string
planetary_ip:
type: string
root_size:
description: Storage in MB
minimum: 5120
type: integer
type:
allOf:
- $ref: '#/definitions/kubedeployer.NodeType'
enum:
- worker
- master
- leader
required:
- cpu
- data_disks
- memory
- name
- node_id
- root_size
- type
type: object
kubedeployer.NodeType:
enum:
- worker
- master
- leader
type: string
x-enum-varnames:
- NodeTypeWorker
- NodeTypeMaster
- NodeTypeLeader
models.Invoice:
properties:
created_at:
type: string
id:
type: integer
nodes:
items:
$ref: '#/definitions/models.NodeItem'
type: array
tax:
description: 'TODO:'
type: number
total:
type: number
user_id:
type: integer
required:
- user_id
type: object
models.NodeItem:
properties:
contract_id:
type: integer
cost:
type: number
id:
type: integer
invoice_id:
type: integer
node_id:
type: integer
period:
type: number
rent_created_at:
type: string
type: object
models.NotificationSeverity:
enum:
- info
- error
- warning
- success
type: string
x-enum-varnames:
- NotificationSeverityInfo
- NotificationSeverityError
- NotificationSeverityWarning
- NotificationSeveritySuccess
models.NotificationStatus:
enum:
- unread
- read
type: string
x-enum-varnames:
- NotificationStatusUnread
- NotificationStatusRead
models.NotificationType:
enum:
- deployment
- billing
- user
- connected
- node
- admin
type: string
x-enum-varnames:
- NotificationTypeDeployment
- NotificationTypeBilling
- NotificationTypeUser
- NotificationTypeConnected
- NotificationTypeNode
- NotificationTypeAdmin
models.SSHKey:
properties:
created_at:
type: string
deleted_at:
$ref: '#/definitions/gorm.DeletedAt'
id:
description: Primary key
type: integer
name:
description: Unique name per user
type: string
public_key:
description: Unique public key per user
type: string
updated_at:
type: string
userID:
description: User owner
type: integer
required:
- name
- public_key
- userID
type: object
models.Voucher:
properties:
code:
type: string
created_at:
type: string
expires_at:
type: string
id:
type: integer
redeemed:
type: boolean
value:
type: number
required:
- code
- created_at
- expires_at
- value
type: object
services.AdminWorkflow:
properties:
created_at:
type: string
current_step:
type: integer
display_name:
type: string
error:
type: string
metadata:
additionalProperties:
type: string
type: object
name:
type: string
queue_name:
type: string
state:
additionalProperties: {}
type: object
status:
type: string
step_name:
type: string
total_steps:
type: integer
user_id:
type: integer
uuid:
type: string
type: object
services.ClusterData:
properties:
cluster:
$ref: '#/definitions/kubedeployer.Cluster'
created_at:
type: string
id:
type: integer
project_name:
type: string
updated_at:
type: string
type: object
services.PendingRecordsWithUSDAmounts:
properties:
created_at:
type: string
id:
type: integer
tft_amount:
description: TFTs are multiplied by 1e7
type: integer
transfer_mode:
type: string
transferred_tft_amount:
type: integer
transferred_usd_amount:
type: number
updated_at:
type: string
usd_amount:
type: number
user_id:
type: integer
username:
type: string
type: object
services.Pool:
properties:
free:
description: free space in bytes
type: integer
name:
type: string
type:
description: type of the disk wither ssd or hdd
type: string
type: object
services.Stats:
properties:
cores:
type: integer
countries:
type: integer
ssd:
type: number
system_account_balance:
type: number
total_clusters:
type: integer
total_users:
type: integer
up_nodes:
type: integer
type: object
services.UserWithPendingBalance:
properties:
account_address:
type: string
admin:
type: boolean
code:
type: integer
created_at:
type: string
credit_card_balance:
description: millicent, money from credit card
type: integer
credited_balance:
description: millicent, manually added by admin or from vouchers
type: integer
debt:
description: millicent
type: integer
email:
type: string
id:
type: integer
pending_balance_usd:
type: number
sponsored:
type: boolean
ssh_key:
type: string
stripe_customer_id:
type: string
updated_at:
type: string
username:
type: string
verified:
type: boolean
required:
- email
- username
type: object
services.UserWithUSDBalance:
properties:
account_address:
type: string
admin:
type: boolean
balance:
description: USD balance
type: number
code:
type: integer
created_at:
type: string
credit_card_balance:
description: millicent, money from credit card
type: integer
credited_balance:
description: millicent, manually added by admin or from vouchers
type: integer
debt:
description: millicent
type: integer
email:
type: string
id:
type: integer
sponsored:
type: boolean
ssh_key:
type: string
stripe_customer_id:
type: string
updated_at:
type: string
username:
type: string
verified:
type: boolean
required:
- email
- username
type: object
types.BIOS:
properties:
vendor:
type: string
version:
type: string
type: object
types.Baseboard:
properties:
manufacturer:
type: string
product_name:
type: string
type: object
types.Capacity:
properties:
cru:
type: integer
hru:
$ref: '#/definitions/gridtypes.Unit'
mru:
$ref: '#/definitions/gridtypes.Unit'
sru:
$ref: '#/definitions/gridtypes.Unit'
type: object
types.CpuBenchmark:
properties:
multi:
type: number
node_twin_id:
type: integer
single:
type: number
threads:
type: integer
updated_at:
type: integer
workloads:
type: integer
type: object
types.Dmi:
properties:
baseboard:
$ref: '#/definitions/types.Baseboard'
bios:
$ref: '#/definitions/types.BIOS'
memory:
items:
$ref: '#/definitions/types.Memory'
type: array
node_twin_id:
type: integer
processor:
items:
$ref: '#/definitions/types.Processor'
type: array
updated_at:
type: integer
type: object
types.Location:
properties:
city:
type: string
country:
type: string
latitude:
type: number
longitude:
type: number
region:
type: string
type: object
types.Memory:
properties:
manufacturer:
type: string
type:
type: string
type: object
types.Node:
properties:
certificationType:
type: string
city:
type: string
country:
type: string
cpu_benchmark:
$ref: '#/definitions/types.CpuBenchmark'
created:
type: integer
dedicated:
type: boolean
dmi:
$ref: '#/definitions/types.Dmi'
extraFee:
type: integer
farm_free_ips:
type: integer
farmId:
type: integer