Skip to content

Commit 83414ce

Browse files
authored
chore(jobs): rename job_run_id to id and job_definition_id to id (#987)
1 parent 1270fd8 commit 83414ce

File tree

3 files changed

+18
-30
lines changed

3 files changed

+18
-30
lines changed

packages/clients/src/api/jobs/v1alpha1/api.gen.ts

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,7 @@ export class API extends ParentAPI {
7777
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam(
7878
'region',
7979
request.region ?? this.client.settings.defaultRegion,
80-
)}/job-definitions/${validatePathParam(
81-
'jobDefinitionId',
82-
request.jobDefinitionId,
83-
)}`,
80+
)}/job-definitions/${validatePathParam('id', request.id)}`,
8481
},
8582
unmarshalJobDefinition,
8683
)
@@ -126,10 +123,7 @@ export class API extends ParentAPI {
126123
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam(
127124
'region',
128125
request.region ?? this.client.settings.defaultRegion,
129-
)}/job-definitions/${validatePathParam(
130-
'jobDefinitionId',
131-
request.jobDefinitionId,
132-
)}`,
126+
)}/job-definitions/${validatePathParam('id', request.id)}`,
133127
},
134128
unmarshalJobDefinition,
135129
)
@@ -140,10 +134,7 @@ export class API extends ParentAPI {
140134
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam(
141135
'region',
142136
request.region ?? this.client.settings.defaultRegion,
143-
)}/job-definitions/${validatePathParam(
144-
'jobDefinitionId',
145-
request.jobDefinitionId,
146-
)}`,
137+
)}/job-definitions/${validatePathParam('id', request.id)}`,
147138
})
148139

149140
startJobDefinition = (request: Readonly<StartJobDefinitionRequest>) =>
@@ -155,10 +146,7 @@ export class API extends ParentAPI {
155146
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam(
156147
'region',
157148
request.region ?? this.client.settings.defaultRegion,
158-
)}/job-definitions/${validatePathParam(
159-
'jobDefinitionId',
160-
request.jobDefinitionId,
161-
)}/start`,
149+
)}/job-definitions/${validatePathParam('id', request.id)}/start`,
162150
},
163151
unmarshalJobRun,
164152
)
@@ -170,7 +158,7 @@ export class API extends ParentAPI {
170158
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam(
171159
'region',
172160
request.region ?? this.client.settings.defaultRegion,
173-
)}/job-runs/${validatePathParam('jobRunId', request.jobRunId)}`,
161+
)}/job-runs/${validatePathParam('id', request.id)}`,
174162
},
175163
unmarshalJobRun,
176164
)
@@ -184,7 +172,7 @@ export class API extends ParentAPI {
184172
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam(
185173
'region',
186174
request.region ?? this.client.settings.defaultRegion,
187-
)}/job-runs/${validatePathParam('jobRunId', request.jobRunId)}/stop`,
175+
)}/job-runs/${validatePathParam('id', request.id)}/stop`,
188176
},
189177
unmarshalJobRun,
190178
)
@@ -198,7 +186,7 @@ export class API extends ParentAPI {
198186
request.region ?? this.client.settings.defaultRegion,
199187
)}/job-runs`,
200188
urlParams: urlParams(
201-
['job_definition_id', request.jobDefinitionId],
189+
['id', request.id],
202190
['order_by', request.orderBy],
203191
['page', request.page],
204192
[

packages/clients/src/api/jobs/v1alpha1/marshalling.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export const unmarshalJobDefinition = (data: unknown): JobDefinition => {
2929
createdAt: unmarshalDate(data.created_at),
3030
description: data.description,
3131
environmentVariables: data.environment_variables,
32+
id: data.id,
3233
imageUri: data.image_uri,
33-
jobDefinitionId: data.job_definition_id,
3434
jobTimeout: data.job_timeout,
3535
memoryLimit: data.memory_limit,
3636
name: data.name,
@@ -51,8 +51,8 @@ export const unmarshalJobRun = (data: unknown): JobRun => {
5151
createdAt: unmarshalDate(data.created_at),
5252
errorMessage: data.error_message,
5353
exitCode: data.exit_code,
54+
id: data.id,
5455
jobDefinitionId: data.job_definition_id,
55-
jobRunId: data.job_run_id,
5656
region: data.region,
5757
runDuration: data.run_duration,
5858
state: data.state,

packages/clients/src/api/jobs/v1alpha1/types.gen.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export type ListJobDefinitionsRequestOrderBy =
1818
export type ListJobRunsRequestOrderBy = 'created_at_asc' | 'created_at_desc'
1919

2020
export interface JobDefinition {
21-
jobDefinitionId: string
21+
id: string
2222
name: string
2323
createdAt?: Date
2424
updatedAt?: Date
@@ -38,7 +38,7 @@ export interface JobDefinition {
3838
}
3939

4040
export interface JobRun {
41-
jobRunId: string
41+
id: string
4242
jobDefinitionId: string
4343
state: JobRunState
4444
createdAt?: Date
@@ -77,7 +77,7 @@ export type DeleteJobDefinitionRequest = {
7777
* config.
7878
*/
7979
region?: Region
80-
jobDefinitionId: string
80+
id: string
8181
}
8282

8383
export type GetJobDefinitionRequest = {
@@ -86,7 +86,7 @@ export type GetJobDefinitionRequest = {
8686
* config.
8787
*/
8888
region?: Region
89-
jobDefinitionId: string
89+
id: string
9090
}
9191

9292
export type GetJobRunRequest = {
@@ -95,7 +95,7 @@ export type GetJobRunRequest = {
9595
* config.
9696
*/
9797
region?: Region
98-
jobRunId: string
98+
id: string
9999
}
100100

101101
export type GetServiceInfoRequest = {
@@ -132,7 +132,7 @@ export type ListJobRunsRequest = {
132132
page?: number
133133
pageSize?: number
134134
orderBy?: ListJobRunsRequestOrderBy
135-
jobDefinitionId?: string
135+
id?: string
136136
projectId?: string
137137
}
138138

@@ -147,7 +147,7 @@ export type StartJobDefinitionRequest = {
147147
* config.
148148
*/
149149
region?: Region
150-
jobDefinitionId: string
150+
id: string
151151
}
152152

153153
export type StopJobRunRequest = {
@@ -156,7 +156,7 @@ export type StopJobRunRequest = {
156156
* config.
157157
*/
158158
region?: Region
159-
jobRunId: string
159+
id: string
160160
}
161161

162162
export type UpdateJobDefinitionRequest = {
@@ -165,7 +165,7 @@ export type UpdateJobDefinitionRequest = {
165165
* config.
166166
*/
167167
region?: Region
168-
jobDefinitionId: string
168+
id: string
169169
name?: string
170170
cpuLimit?: number
171171
memoryLimit?: number

0 commit comments

Comments
 (0)