Skip to content

Commit d839519

Browse files
committed
chore: update API specs
1 parent f9a49b1 commit d839519

4 files changed

Lines changed: 197 additions & 212 deletions

File tree

client/src/features/sessionsV2/api/computeResources.generated-api.ts

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ export type GetResourcePoolsByResourcePoolIdUsersAndUserIdApiArg = {
484484
userId: string;
485485
};
486486
export type DeleteResourcePoolsByResourcePoolIdUsersAndUserIdApiResponse =
487-
/** status 204 The user was removed or it was not part of the pool */ void;
487+
/** status 204 The user was removed, or it was not part of the pool */ void;
488488
export type DeleteResourcePoolsByResourcePoolIdUsersAndUserIdApiArg = {
489489
resourcePoolId: number;
490490
userId: string;
@@ -532,30 +532,30 @@ export type PutUsersByUserIdResourcePoolsApiArg = {
532532
export type GetVersionApiResponse = /** status 200 The error */ Version;
533533
export type GetVersionApiArg = void;
534534
export type Name = string;
535+
export type DefaultFlag = boolean;
535536
export type Cpu = number;
536537
export type Memory = number;
537538
export type Gpu = number;
538539
export type Storage = number;
539-
export type IntegerId = number;
540-
export type DefaultFlag = boolean;
541540
export type K8SLabel = string;
542541
export type K8SLabelList = K8SLabel[];
543542
export type NodeAffinity = {
544543
key: K8SLabel;
545544
required_during_scheduling?: boolean;
546545
};
547546
export type NodeAffinityList = NodeAffinity[];
547+
export type IntegerId = number;
548548
export type ResourceClassWithId = {
549549
name: Name;
550+
default: DefaultFlag;
550551
cpu: Cpu;
551552
memory: Memory;
552553
gpu: Gpu;
553554
max_storage: Storage;
554555
default_storage: Storage;
555-
id: IntegerId;
556-
default: DefaultFlag;
557556
tolerations?: K8SLabelList;
558557
node_affinities?: NodeAffinityList;
558+
id: IntegerId;
559559
};
560560
export type ErrorResponse = {
561561
error: {
@@ -629,18 +629,12 @@ export type QuotaWithId = {
629629
gpu: Gpu;
630630
id: Name;
631631
};
632-
export type ResourceClassWithIdFiltered = {
633-
name: Name;
634-
cpu: Cpu;
635-
memory: Memory;
636-
gpu: Gpu;
637-
max_storage: Storage;
638-
default_storage: Storage;
639-
id: IntegerId;
640-
default: DefaultFlag;
632+
export type UsageHoursRemaining = number;
633+
export type UsageHoursTotal = number;
634+
export type ResourceClassWithIdFiltered = ResourceClassWithId & {
641635
matching?: boolean;
642-
tolerations?: K8SLabelList;
643-
node_affinities?: NodeAffinityList;
636+
usage_hours_remaining?: UsageHoursRemaining;
637+
usage_hours_total?: UsageHoursTotal;
644638
};
645639
export type PublicFlag = boolean;
646640
export type RemoteConfigurationFirecrestProviderId = string;
@@ -669,6 +663,7 @@ export type IdleThreshold = number;
669663
export type HibernationThreshold = number;
670664
export type HibernationWarningPeriod = number;
671665
export type RuntimePlatform = "linux/amd64" | "linux/arm64";
666+
export type CreditsUsed = number;
672667
export type ResourcePoolWithIdFiltered = {
673668
quota?: QuotaWithId;
674669
classes: ResourceClassWithIdFiltered[];
@@ -682,6 +677,7 @@ export type ResourcePoolWithIdFiltered = {
682677
hibernation_warning_period?: HibernationWarningPeriod;
683678
cluster_id?: Ulid;
684679
platform: RuntimePlatform;
680+
credits_used?: CreditsUsed;
685681
};
686682
export type ResourcePoolsWithIdFiltered = ResourcePoolWithIdFiltered[];
687683
export type CpuFilter = number;
@@ -711,12 +707,12 @@ export type QuotaWithOptionalId = {
711707
};
712708
export type ResourceClass = {
713709
name: Name;
710+
default: DefaultFlag;
714711
cpu: Cpu;
715712
memory: Memory;
716713
gpu: Gpu;
717714
max_storage: Storage;
718715
default_storage: Storage;
719-
default: DefaultFlag;
720716
tolerations?: K8SLabelList;
721717
node_affinities?: NodeAffinityList;
722718
};
@@ -753,21 +749,21 @@ export type QuotaPatch = {
753749
memory?: Memory;
754750
gpu?: Gpu;
755751
};
756-
export type DefaultFlagPatch = boolean;
757-
export type ResourceClassPatchWithId = {
752+
export type ResourceClassProperties = {
758753
name?: Name;
754+
default?: DefaultFlag;
759755
cpu?: Cpu;
760756
memory?: Memory;
761757
gpu?: Gpu;
762758
max_storage?: Storage;
763759
default_storage?: Storage;
764-
id: IntegerId;
765-
default?: DefaultFlagPatch;
766760
tolerations?: K8SLabelList;
767761
node_affinities?: NodeAffinityList;
768762
};
763+
export type ResourceClassPatchWithId = ResourceClassProperties & {
764+
id?: IntegerId;
765+
};
769766
export type ResourceClassesPatchWithId = ResourceClassPatchWithId[];
770-
export type PublicFlagPatch = boolean;
771767
export type RemoteConfigurationPatchReset = object;
772768
export type RemoteConfigurationFirecrestPatch = {
773769
/** Kind of remote resource pool */
@@ -791,8 +787,8 @@ export type ResourcePoolPatch = {
791787
quota?: QuotaPatch;
792788
classes?: ResourceClassesPatchWithId;
793789
name?: Name;
794-
public?: PublicFlagPatch;
795-
default?: DefaultFlagPatch;
790+
public?: PublicFlag;
791+
default?: DefaultFlag;
796792
remote?: RemoteConfigurationPatch;
797793
idle_threshold?: IdleThreshold;
798794
hibernation_threshold?: HibernationThreshold;
@@ -801,17 +797,7 @@ export type ResourcePoolPatch = {
801797
platform?: RuntimePlatform;
802798
};
803799
export type ResourceClassesWithIdResponse = ResourceClassWithId[];
804-
export type ResourceClassPatch = {
805-
name?: Name;
806-
cpu?: Cpu;
807-
memory?: Memory;
808-
gpu?: Gpu;
809-
max_storage?: Storage;
810-
default_storage?: Storage;
811-
default?: DefaultFlagPatch;
812-
tolerations?: K8SLabelList;
813-
node_affinities?: NodeAffinityList;
814-
};
800+
export type ResourceClassPatch = ResourceClassProperties;
815801
export type NodeAffinityListResponse = NodeAffinity[];
816802
export type UserId = string;
817803
export type PoolUserWithId = {

0 commit comments

Comments
 (0)