11declare type TRunsRequestParams = {
22 project_name ?: IProject [ 'project_name' ] ;
3- repo_id ?: string ,
4- user_name ?: string ,
5- only_active ?: boolean ,
6- prev_submitted_at ?: string ,
7- prev_run_id ?: string ,
8- limit ?: number ,
9- ascending ?: boolean ,
3+ repo_id ?: string ;
4+ user_name ?: string ;
5+ only_active ?: boolean ;
6+ prev_submitted_at ?: string ;
7+ prev_run_id ?: string ;
8+ limit ?: number ;
9+ ascending ?: boolean ;
1010} ;
1111
1212declare type TDeleteRunsRequestParams = {
@@ -30,133 +30,133 @@ declare type TJobStatus =
3030 | 'terminated'
3131 | 'aborted'
3232 | 'failed'
33- | 'done'
33+ | 'done' ;
3434
3535declare type TJobErrorCode =
36- | "failed_to_start_due_to_no_capacity"
37- | "interrupted_by_no_capacity"
38- | "waiting_runner_limit_exceeded"
39- | "container_exited_with_error"
40- | "ports_binding_failed"
41-
36+ | 'failed_to_start_due_to_no_capacity'
37+ | 'interrupted_by_no_capacity'
38+ | 'waiting_runner_limit_exceeded'
39+ | 'container_exited_with_error'
40+ | 'ports_binding_failed' ;
4241
4342declare interface IAppSpec {
44- port : number ,
45- app_name : string ,
46- map_to_port ?: number ,
47- url_path ?: string ,
48- url_query_params ?: { [ key : string ] : string }
43+ port : number ;
44+ app_name : string ;
45+ map_to_port ?: number ;
46+ url_path ?: string ;
47+ url_query_params ?: { [ key : string ] : string } ;
4948}
5049
5150declare interface IJobSpec {
52- app_specs ?: IAppSpec
53- commands : string [ ] ,
54- env ?: { [ key : string ] : string } ,
55- home_dir ?: string
56- image_name : string
57- job_name : string
58- job_num : number
59- max_duration ?: number ,
60- working_dir : string
51+ app_specs ?: IAppSpec ;
52+ commands : string [ ] ;
53+ env ?: { [ key : string ] : string } ;
54+ home_dir ?: string ;
55+ image_name : string ;
56+ job_name : string ;
57+ job_num : number ;
58+ max_duration ?: number ;
59+ working_dir : string ;
6160}
6261
6362declare interface IGpu {
64- name : string ,
65- memory_mib : number ,
63+ name : string ;
64+ memory_mib : number ;
6665}
6766
6867declare interface IDisk {
69- size_mib : number
68+ size_mib : number ;
7069}
7170
7271declare interface IResources {
73- cpus : number ,
74- memory_mib : number
75- gpus : IGpu [ ] ,
76- spot : boolean ,
72+ cpus : number ;
73+ memory_mib : number ;
74+ gpus : IGpu [ ] ;
75+ spot : boolean ;
7776
78- disk ?: IDisk ,
77+ disk ?: IDisk ;
7978
80- description ?: string
79+ description ?: string ;
8180}
8281
8382declare interface InstanceType {
84- name : string ,
85- resources : IResources ,
83+ name : string ;
84+ resources : IResources ;
8685}
8786
8887declare interface IJobProvisioningData {
89- backend : TBackendType ,
90- instance_type : InstanceType ,
91- instance_id : string ,
92- hostname : string ,
93- region : string ,
94- price : number ,
95- username : string ,
96- ssh_port : number ,
97- dockerized : boolean ,
98- backend_data ?: string ,
88+ backend : TBackendType ;
89+ instance_type : InstanceType ;
90+ instance_id : string ;
91+ hostname : string ;
92+ region : string ;
93+ price : number ;
94+ username : string ;
95+ ssh_port : number ;
96+ dockerized : boolean ;
97+ backend_data ?: string ;
9998}
10099
101100declare interface IJobSubmission {
102- id : string ,
103- job_provisioning_data ?: IJobProvisioningData | null ,
104- error_code ?: TJobErrorCode | null ,
105- submission_num : number
106- status : TJobStatus ,
107- submitted_at : number ,
108- termination_reason ?: string | null
109- termination_reason_message ?: string | null
101+ id : string ;
102+ job_provisioning_data ?: IJobProvisioningData | null ;
103+ error_code ?: TJobErrorCode | null ;
104+ submission_num : number ;
105+ status : TJobStatus ;
106+ submitted_at : number ;
107+ termination_reason ?: string | null ;
108+ termination_reason_message ?: string | null ;
110109}
111110
112111declare interface IJob {
113- job_spec : IJobSpec
114- job_submissions : IJobSubmission [ ]
112+ job_spec : IJobSpec ;
113+ job_submissions : IJobSubmission [ ] ;
115114}
116115
117116declare interface IDevEnvironmentConfiguration {
118- type : 'dev-environment'
117+ type : 'dev-environment' ;
119118}
120119
121120declare interface ITaskConfiguration {
122- type : 'task'
121+ type : 'task' ;
123122}
124123
125124declare interface IServiceConfiguration {
126- type : 'service'
125+ type : 'service' ;
126+ gateway : string | null ;
127127}
128128declare interface IRunSpec {
129- configuration : IDevEnvironmentConfiguration | ITaskConfiguration | IServiceConfiguration ,
130- configuration_path : string ,
131- repo_code_hash ?: string
132- repo_id : string
133- run_name ?: string ,
134- ssh_key_pub : string
135- working_dir : string
136- repo_data : IRemoteRunRepoData | ILocalRunRepoData | VirtualRunRepoData
129+ configuration : IDevEnvironmentConfiguration | ITaskConfiguration | IServiceConfiguration ;
130+ configuration_path : string ;
131+ repo_code_hash ?: string ;
132+ repo_id : string ;
133+ run_name ?: string ;
134+ ssh_key_pub : string ;
135+ working_dir : string ;
136+ repo_data : IRemoteRunRepoData | ILocalRunRepoData | VirtualRunRepoData ;
137137}
138138
139139declare interface IModel {
140- name : string
141- base_url : string
142- type : string
140+ name : string ;
141+ base_url : string ;
142+ type : string ;
143143}
144144
145145declare interface IRunService {
146- url : string ,
147- model : null | IModel
146+ url : string ;
147+ model : null | IModel ;
148148}
149149
150150declare interface IRun {
151- id : string ,
152- project_name : string ,
153- user : string ,
154- submitted_at : string ,
155- status : TJobStatus ,
156- error ?: string
157- jobs : IJob [ ] ,
158- run_spec : IRunSpec ,
159- latest_job_submission ?: IJobSubmission
160- cost : number ,
151+ id : string ;
152+ project_name : string ;
153+ user : string ;
154+ submitted_at : string ;
155+ status : TJobStatus ;
156+ error ?: string ;
157+ jobs : IJob [ ] ;
158+ run_spec : IRunSpec ;
159+ latest_job_submission ?: IJobSubmission ;
160+ cost : number ;
161161 service : IRunService | null ;
162162}
0 commit comments