@databricks/sdk-modelregistry 0.1.0-dev.1 → 0.1.0-dev.3

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/src/v1/client.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
2
 
3
3
  import {VERSION as AUTH_VERSION} from '@databricks/sdk-auth';
4
- import type {Call} from '@databricks/sdk-core/api';
5
4
  import {createDefault} from '@databricks/sdk-core/clientinfo';
6
5
  import type {Logger} from '@databricks/sdk-core/logger';
7
6
  import {NoOpLogger} from '@databricks/sdk-core/logger';
@@ -19,72 +18,72 @@ import {
19
18
  import pkgJson from '../../package.json' with {type: 'json'};
20
19
  import type {
21
20
  ApproveTransitionRequest,
22
- ApproveTransitionRequest_Response,
21
+ ApproveTransitionResponse,
23
22
  CreateCommentRequest,
24
- CreateCommentRequest_Response,
23
+ CreateCommentResponse,
25
24
  CreateModelVersionRequest,
26
- CreateModelVersionRequest_Response,
25
+ CreateModelVersionResponse,
27
26
  CreateRegisteredModelRequest,
28
- CreateRegisteredModelRequest_Response,
27
+ CreateRegisteredModelResponse,
29
28
  CreateRegistryWebhookRequest,
30
- CreateRegistryWebhookRequest_Response,
29
+ CreateRegistryWebhookResponse,
31
30
  CreateTransitionRequest,
32
- CreateTransitionRequest_Response,
31
+ CreateTransitionResponse,
33
32
  DeleteCommentRequest,
34
- DeleteCommentRequest_Response,
33
+ DeleteCommentResponse,
35
34
  DeleteModelVersionRequest,
36
- DeleteModelVersionRequest_Response,
35
+ DeleteModelVersionResponse,
37
36
  DeleteModelVersionTagRequest,
38
- DeleteModelVersionTagRequest_Response,
37
+ DeleteModelVersionTagResponse,
39
38
  DeleteRegisteredModelRequest,
40
- DeleteRegisteredModelRequest_Response,
39
+ DeleteRegisteredModelResponse,
41
40
  DeleteRegisteredModelTagRequest,
42
- DeleteRegisteredModelTagRequest_Response,
41
+ DeleteRegisteredModelTagResponse,
43
42
  DeleteRegistryWebhookRequest,
44
- DeleteRegistryWebhookRequest_Response,
43
+ DeleteRegistryWebhookResponse,
45
44
  DeleteTransitionRequest,
46
- DeleteTransitionRequest_Response,
47
- GetLatestVersionsRequest,
48
- GetLatestVersionsRequest_Response,
45
+ DeleteTransitionResponse,
46
+ GetLatestVersionsResponse,
49
47
  GetModelVersionDownloadUriRequest,
50
- GetModelVersionDownloadUriRequest_Response,
48
+ GetModelVersionDownloadUriResponse,
51
49
  GetModelVersionRequest,
52
- GetModelVersionRequest_Response,
50
+ GetModelVersionResponse,
53
51
  GetRegisteredModelDatabricksRequest,
54
- GetRegisteredModelDatabricksRequest_Response,
52
+ GetRegisteredModelDatabricksResponse,
53
+ ListLatestVersionsRequest,
55
54
  ListRegisteredModelsRequest,
56
- ListRegisteredModelsRequest_Response,
55
+ ListRegisteredModelsResponse,
57
56
  ListRegistryWebhooksRequest,
58
- ListRegistryWebhooksRequest_Response,
57
+ ListRegistryWebhooksResponse,
59
58
  ListTransitionRequest,
60
- ListTransitionRequest_Response,
59
+ ListTransitionResponse,
61
60
  ModelVersion,
62
61
  RegisteredModel,
63
62
  RegistryWebhook,
64
63
  RejectTransitionRequest,
65
- RejectTransitionRequest_Response,
64
+ RejectTransitionResponse,
66
65
  RenameRegisteredModelRequest,
67
- RenameRegisteredModelRequest_Response,
66
+ RenameRegisteredModelResponse,
68
67
  SearchModelVersionsRequest,
69
- SearchModelVersionsRequest_Response,
68
+ SearchModelVersionsResponse,
70
69
  SearchRegisteredModelsRequest,
71
- SearchRegisteredModelsRequest_Response,
70
+ SearchRegisteredModelsResponse,
72
71
  SetModelVersionTagRequest,
73
- SetModelVersionTagRequest_Response,
72
+ SetModelVersionTagResponse,
74
73
  SetRegisteredModelTagRequest,
75
- SetRegisteredModelTagRequest_Response,
74
+ SetRegisteredModelTagResponse,
76
75
  TestRegistryWebhookRequest,
77
- TestRegistryWebhookRequest_Response,
76
+ TestRegistryWebhookResponse,
78
77
  TransitionModelVersionStageDatabricksRequest,
79
- TransitionModelVersionStageDatabricksRequest_Response,
78
+ TransitionModelVersionStageDatabricksResponse,
80
79
  UpdateCommentRequest,
81
- UpdateCommentRequest_Response,
80
+ UpdateCommentResponse,
82
81
  UpdateModelVersionRequest,
83
- UpdateModelVersionRequest_Response,
82
+ UpdateModelVersionResponse,
84
83
  UpdateRegisteredModelRequest,
85
- UpdateRegisteredModelRequest_Response,
84
+ UpdateRegisteredModelResponse,
86
85
  UpdateRegistryWebhookRequest,
87
- UpdateRegistryWebhookRequest_Response,
86
+ UpdateRegistryWebhookResponse,
88
87
  } from './model';
89
88
  import {
90
89
  marshalApproveTransitionRequestSchema,
@@ -93,7 +92,7 @@ import {
93
92
  marshalCreateRegisteredModelRequestSchema,
94
93
  marshalCreateRegistryWebhookRequestSchema,
95
94
  marshalCreateTransitionRequestSchema,
96
- marshalGetLatestVersionsRequestSchema,
95
+ marshalListLatestVersionsRequestSchema,
97
96
  marshalRejectTransitionRequestSchema,
98
97
  marshalRenameRegisteredModelRequestSchema,
99
98
  marshalSetModelVersionTagRequestSchema,
@@ -104,38 +103,38 @@ import {
104
103
  marshalUpdateModelVersionRequestSchema,
105
104
  marshalUpdateRegisteredModelRequestSchema,
106
105
  marshalUpdateRegistryWebhookRequestSchema,
107
- unmarshalApproveTransitionRequest_ResponseSchema,
108
- unmarshalCreateCommentRequest_ResponseSchema,
109
- unmarshalCreateModelVersionRequest_ResponseSchema,
110
- unmarshalCreateRegisteredModelRequest_ResponseSchema,
111
- unmarshalCreateRegistryWebhookRequest_ResponseSchema,
112
- unmarshalCreateTransitionRequest_ResponseSchema,
113
- unmarshalDeleteCommentRequest_ResponseSchema,
114
- unmarshalDeleteModelVersionRequest_ResponseSchema,
115
- unmarshalDeleteModelVersionTagRequest_ResponseSchema,
116
- unmarshalDeleteRegisteredModelRequest_ResponseSchema,
117
- unmarshalDeleteRegisteredModelTagRequest_ResponseSchema,
118
- unmarshalDeleteRegistryWebhookRequest_ResponseSchema,
119
- unmarshalDeleteTransitionRequest_ResponseSchema,
120
- unmarshalGetLatestVersionsRequest_ResponseSchema,
121
- unmarshalGetModelVersionDownloadUriRequest_ResponseSchema,
122
- unmarshalGetModelVersionRequest_ResponseSchema,
123
- unmarshalGetRegisteredModelDatabricksRequest_ResponseSchema,
124
- unmarshalListRegisteredModelsRequest_ResponseSchema,
125
- unmarshalListRegistryWebhooksRequest_ResponseSchema,
126
- unmarshalListTransitionRequest_ResponseSchema,
127
- unmarshalRejectTransitionRequest_ResponseSchema,
128
- unmarshalRenameRegisteredModelRequest_ResponseSchema,
129
- unmarshalSearchModelVersionsRequest_ResponseSchema,
130
- unmarshalSearchRegisteredModelsRequest_ResponseSchema,
131
- unmarshalSetModelVersionTagRequest_ResponseSchema,
132
- unmarshalSetRegisteredModelTagRequest_ResponseSchema,
133
- unmarshalTestRegistryWebhookRequest_ResponseSchema,
134
- unmarshalTransitionModelVersionStageDatabricksRequest_ResponseSchema,
135
- unmarshalUpdateCommentRequest_ResponseSchema,
136
- unmarshalUpdateModelVersionRequest_ResponseSchema,
137
- unmarshalUpdateRegisteredModelRequest_ResponseSchema,
138
- unmarshalUpdateRegistryWebhookRequest_ResponseSchema,
106
+ unmarshalApproveTransitionResponseSchema,
107
+ unmarshalCreateCommentResponseSchema,
108
+ unmarshalCreateModelVersionResponseSchema,
109
+ unmarshalCreateRegisteredModelResponseSchema,
110
+ unmarshalCreateRegistryWebhookResponseSchema,
111
+ unmarshalCreateTransitionResponseSchema,
112
+ unmarshalDeleteCommentResponseSchema,
113
+ unmarshalDeleteModelVersionResponseSchema,
114
+ unmarshalDeleteModelVersionTagResponseSchema,
115
+ unmarshalDeleteRegisteredModelResponseSchema,
116
+ unmarshalDeleteRegisteredModelTagResponseSchema,
117
+ unmarshalDeleteRegistryWebhookResponseSchema,
118
+ unmarshalDeleteTransitionResponseSchema,
119
+ unmarshalGetLatestVersionsResponseSchema,
120
+ unmarshalGetModelVersionDownloadUriResponseSchema,
121
+ unmarshalGetModelVersionResponseSchema,
122
+ unmarshalGetRegisteredModelDatabricksResponseSchema,
123
+ unmarshalListRegisteredModelsResponseSchema,
124
+ unmarshalListRegistryWebhooksResponseSchema,
125
+ unmarshalListTransitionResponseSchema,
126
+ unmarshalRejectTransitionResponseSchema,
127
+ unmarshalRenameRegisteredModelResponseSchema,
128
+ unmarshalSearchModelVersionsResponseSchema,
129
+ unmarshalSearchRegisteredModelsResponseSchema,
130
+ unmarshalSetModelVersionTagResponseSchema,
131
+ unmarshalSetRegisteredModelTagResponseSchema,
132
+ unmarshalTestRegistryWebhookResponseSchema,
133
+ unmarshalTransitionModelVersionStageDatabricksResponseSchema,
134
+ unmarshalUpdateCommentResponseSchema,
135
+ unmarshalUpdateModelVersionResponseSchema,
136
+ unmarshalUpdateRegisteredModelResponseSchema,
137
+ unmarshalUpdateRegistryWebhookResponseSchema,
139
138
  } from './model';
140
139
 
141
140
  // Package identity segment for this client to be used in the User-Agent header.
@@ -144,7 +143,7 @@ const PACKAGE_SEGMENT = {
144
143
  value: pkgJson.version,
145
144
  };
146
145
 
147
- export class ModelregistryClient {
146
+ export class ModelRegistryClient {
148
147
  private readonly host: string;
149
148
  // Workspace ID used to route workspace-level calls on unified hosts (SPOG).
150
149
  // When set, workspace-level methods send X-Databricks-Org-Id on every
@@ -176,11 +175,11 @@ export class ModelregistryClient {
176
175
  async approveTransitionRequest(
177
176
  req: ApproveTransitionRequest,
178
177
  options?: CallOptions
179
- ): Promise<ApproveTransitionRequest_Response> {
178
+ ): Promise<ApproveTransitionResponse> {
180
179
  const url = `${this.host}/api/2.0/mlflow/transition-requests/approve`;
181
180
  const body = marshalRequest(req, marshalApproveTransitionRequestSchema);
182
- let resp: ApproveTransitionRequest_Response | undefined;
183
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
181
+ let resp: ApproveTransitionResponse | undefined;
182
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
184
183
  const headers = new Headers({'Content-Type': 'application/json'});
185
184
  if (this.workspaceId !== undefined) {
186
185
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -192,14 +191,11 @@ export class ModelregistryClient {
192
191
  httpClient: this.httpClient,
193
192
  logger: this.logger,
194
193
  });
195
- resp = parseResponse(
196
- respBody,
197
- unmarshalApproveTransitionRequest_ResponseSchema
198
- );
194
+ resp = parseResponse(respBody, unmarshalApproveTransitionResponseSchema);
199
195
  };
200
196
  await executeCall(call, options);
201
197
  if (resp === undefined) {
202
- throw new Error('API call completed without a result.');
198
+ throw new Error('operation completed without a result.');
203
199
  }
204
200
  return resp;
205
201
  }
@@ -211,11 +207,11 @@ export class ModelregistryClient {
211
207
  async createComment(
212
208
  req: CreateCommentRequest,
213
209
  options?: CallOptions
214
- ): Promise<CreateCommentRequest_Response> {
210
+ ): Promise<CreateCommentResponse> {
215
211
  const url = `${this.host}/api/2.0/mlflow/comments/create`;
216
212
  const body = marshalRequest(req, marshalCreateCommentRequestSchema);
217
- let resp: CreateCommentRequest_Response | undefined;
218
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
213
+ let resp: CreateCommentResponse | undefined;
214
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
219
215
  const headers = new Headers({'Content-Type': 'application/json'});
220
216
  if (this.workspaceId !== undefined) {
221
217
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -227,14 +223,11 @@ export class ModelregistryClient {
227
223
  httpClient: this.httpClient,
228
224
  logger: this.logger,
229
225
  });
230
- resp = parseResponse(
231
- respBody,
232
- unmarshalCreateCommentRequest_ResponseSchema
233
- );
226
+ resp = parseResponse(respBody, unmarshalCreateCommentResponseSchema);
234
227
  };
235
228
  await executeCall(call, options);
236
229
  if (resp === undefined) {
237
- throw new Error('API call completed without a result.');
230
+ throw new Error('operation completed without a result.');
238
231
  }
239
232
  return resp;
240
233
  }
@@ -246,11 +239,11 @@ export class ModelregistryClient {
246
239
  async createRegistryWebhook(
247
240
  req: CreateRegistryWebhookRequest,
248
241
  options?: CallOptions
249
- ): Promise<CreateRegistryWebhookRequest_Response> {
242
+ ): Promise<CreateRegistryWebhookResponse> {
250
243
  const url = `${this.host}/api/2.0/mlflow/registry-webhooks/create`;
251
244
  const body = marshalRequest(req, marshalCreateRegistryWebhookRequestSchema);
252
- let resp: CreateRegistryWebhookRequest_Response | undefined;
253
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
245
+ let resp: CreateRegistryWebhookResponse | undefined;
246
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
254
247
  const headers = new Headers({'Content-Type': 'application/json'});
255
248
  if (this.workspaceId !== undefined) {
256
249
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -264,12 +257,12 @@ export class ModelregistryClient {
264
257
  });
265
258
  resp = parseResponse(
266
259
  respBody,
267
- unmarshalCreateRegistryWebhookRequest_ResponseSchema
260
+ unmarshalCreateRegistryWebhookResponseSchema
268
261
  );
269
262
  };
270
263
  await executeCall(call, options);
271
264
  if (resp === undefined) {
272
- throw new Error('API call completed without a result.');
265
+ throw new Error('operation completed without a result.');
273
266
  }
274
267
  return resp;
275
268
  }
@@ -278,11 +271,11 @@ export class ModelregistryClient {
278
271
  async createTransitionRequest(
279
272
  req: CreateTransitionRequest,
280
273
  options?: CallOptions
281
- ): Promise<CreateTransitionRequest_Response> {
274
+ ): Promise<CreateTransitionResponse> {
282
275
  const url = `${this.host}/api/2.0/mlflow/transition-requests/create`;
283
276
  const body = marshalRequest(req, marshalCreateTransitionRequestSchema);
284
- let resp: CreateTransitionRequest_Response | undefined;
285
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
277
+ let resp: CreateTransitionResponse | undefined;
278
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
286
279
  const headers = new Headers({'Content-Type': 'application/json'});
287
280
  if (this.workspaceId !== undefined) {
288
281
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -294,14 +287,11 @@ export class ModelregistryClient {
294
287
  httpClient: this.httpClient,
295
288
  logger: this.logger,
296
289
  });
297
- resp = parseResponse(
298
- respBody,
299
- unmarshalCreateTransitionRequest_ResponseSchema
300
- );
290
+ resp = parseResponse(respBody, unmarshalCreateTransitionResponseSchema);
301
291
  };
302
292
  await executeCall(call, options);
303
293
  if (resp === undefined) {
304
- throw new Error('API call completed without a result.');
294
+ throw new Error('operation completed without a result.');
305
295
  }
306
296
  return resp;
307
297
  }
@@ -310,7 +300,7 @@ export class ModelregistryClient {
310
300
  async deleteComment(
311
301
  req: DeleteCommentRequest,
312
302
  options?: CallOptions
313
- ): Promise<DeleteCommentRequest_Response> {
303
+ ): Promise<DeleteCommentResponse> {
314
304
  const url = `${this.host}/api/2.0/mlflow/comments/delete`;
315
305
  const params = new URLSearchParams();
316
306
  if (req.id !== undefined) {
@@ -318,8 +308,8 @@ export class ModelregistryClient {
318
308
  }
319
309
  const query = params.toString();
320
310
  const fullUrl = query !== '' ? `${url}?${query}` : url;
321
- let resp: DeleteCommentRequest_Response | undefined;
322
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
311
+ let resp: DeleteCommentResponse | undefined;
312
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
323
313
  const headers = new Headers();
324
314
  if (this.workspaceId !== undefined) {
325
315
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -331,14 +321,11 @@ export class ModelregistryClient {
331
321
  httpClient: this.httpClient,
332
322
  logger: this.logger,
333
323
  });
334
- resp = parseResponse(
335
- respBody,
336
- unmarshalDeleteCommentRequest_ResponseSchema
337
- );
324
+ resp = parseResponse(respBody, unmarshalDeleteCommentResponseSchema);
338
325
  };
339
326
  await executeCall(call, options);
340
327
  if (resp === undefined) {
341
- throw new Error('API call completed without a result.');
328
+ throw new Error('operation completed without a result.');
342
329
  }
343
330
  return resp;
344
331
  }
@@ -350,7 +337,7 @@ export class ModelregistryClient {
350
337
  async deleteRegistryWebhook(
351
338
  req: DeleteRegistryWebhookRequest,
352
339
  options?: CallOptions
353
- ): Promise<DeleteRegistryWebhookRequest_Response> {
340
+ ): Promise<DeleteRegistryWebhookResponse> {
354
341
  const url = `${this.host}/api/2.0/mlflow/registry-webhooks/delete`;
355
342
  const params = new URLSearchParams();
356
343
  if (req.id !== undefined) {
@@ -358,8 +345,8 @@ export class ModelregistryClient {
358
345
  }
359
346
  const query = params.toString();
360
347
  const fullUrl = query !== '' ? `${url}?${query}` : url;
361
- let resp: DeleteRegistryWebhookRequest_Response | undefined;
362
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
348
+ let resp: DeleteRegistryWebhookResponse | undefined;
349
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
363
350
  const headers = new Headers();
364
351
  if (this.workspaceId !== undefined) {
365
352
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -373,12 +360,12 @@ export class ModelregistryClient {
373
360
  });
374
361
  resp = parseResponse(
375
362
  respBody,
376
- unmarshalDeleteRegistryWebhookRequest_ResponseSchema
363
+ unmarshalDeleteRegistryWebhookResponseSchema
377
364
  );
378
365
  };
379
366
  await executeCall(call, options);
380
367
  if (resp === undefined) {
381
- throw new Error('API call completed without a result.');
368
+ throw new Error('operation completed without a result.');
382
369
  }
383
370
  return resp;
384
371
  }
@@ -387,7 +374,7 @@ export class ModelregistryClient {
387
374
  async deleteTransitionRequest(
388
375
  req: DeleteTransitionRequest,
389
376
  options?: CallOptions
390
- ): Promise<DeleteTransitionRequest_Response> {
377
+ ): Promise<DeleteTransitionResponse> {
391
378
  const url = `${this.host}/api/2.0/mlflow/transition-requests/delete`;
392
379
  const params = new URLSearchParams();
393
380
  if (req.name !== undefined) {
@@ -407,8 +394,8 @@ export class ModelregistryClient {
407
394
  }
408
395
  const query = params.toString();
409
396
  const fullUrl = query !== '' ? `${url}?${query}` : url;
410
- let resp: DeleteTransitionRequest_Response | undefined;
411
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
397
+ let resp: DeleteTransitionResponse | undefined;
398
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
412
399
  const headers = new Headers();
413
400
  if (this.workspaceId !== undefined) {
414
401
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -420,14 +407,11 @@ export class ModelregistryClient {
420
407
  httpClient: this.httpClient,
421
408
  logger: this.logger,
422
409
  });
423
- resp = parseResponse(
424
- respBody,
425
- unmarshalDeleteTransitionRequest_ResponseSchema
426
- );
410
+ resp = parseResponse(respBody, unmarshalDeleteTransitionResponseSchema);
427
411
  };
428
412
  await executeCall(call, options);
429
413
  if (resp === undefined) {
430
- throw new Error('API call completed without a result.');
414
+ throw new Error('operation completed without a result.');
431
415
  }
432
416
  return resp;
433
417
  }
@@ -440,7 +424,7 @@ export class ModelregistryClient {
440
424
  async getRegisteredModelDatabricks(
441
425
  req: GetRegisteredModelDatabricksRequest,
442
426
  options?: CallOptions
443
- ): Promise<GetRegisteredModelDatabricksRequest_Response> {
427
+ ): Promise<GetRegisteredModelDatabricksResponse> {
444
428
  const url = `${this.host}/api/2.0/mlflow/databricks/registered-models/get`;
445
429
  const params = new URLSearchParams();
446
430
  if (req.name !== undefined) {
@@ -448,8 +432,8 @@ export class ModelregistryClient {
448
432
  }
449
433
  const query = params.toString();
450
434
  const fullUrl = query !== '' ? `${url}?${query}` : url;
451
- let resp: GetRegisteredModelDatabricksRequest_Response | undefined;
452
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
435
+ let resp: GetRegisteredModelDatabricksResponse | undefined;
436
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
453
437
  const headers = new Headers();
454
438
  if (this.workspaceId !== undefined) {
455
439
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -463,12 +447,12 @@ export class ModelregistryClient {
463
447
  });
464
448
  resp = parseResponse(
465
449
  respBody,
466
- unmarshalGetRegisteredModelDatabricksRequest_ResponseSchema
450
+ unmarshalGetRegisteredModelDatabricksResponseSchema
467
451
  );
468
452
  };
469
453
  await executeCall(call, options);
470
454
  if (resp === undefined) {
471
- throw new Error('API call completed without a result.');
455
+ throw new Error('operation completed without a result.');
472
456
  }
473
457
  return resp;
474
458
  }
@@ -480,7 +464,7 @@ export class ModelregistryClient {
480
464
  async listRegistryWebhooks(
481
465
  req: ListRegistryWebhooksRequest,
482
466
  options?: CallOptions
483
- ): Promise<ListRegistryWebhooksRequest_Response> {
467
+ ): Promise<ListRegistryWebhooksResponse> {
484
468
  const url = `${this.host}/api/2.0/mlflow/registry-webhooks/list`;
485
469
  const params = new URLSearchParams();
486
470
  if (req.modelName !== undefined) {
@@ -497,8 +481,8 @@ export class ModelregistryClient {
497
481
  }
498
482
  const query = params.toString();
499
483
  const fullUrl = query !== '' ? `${url}?${query}` : url;
500
- let resp: ListRegistryWebhooksRequest_Response | undefined;
501
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
484
+ let resp: ListRegistryWebhooksResponse | undefined;
485
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
502
486
  const headers = new Headers();
503
487
  if (this.workspaceId !== undefined) {
504
488
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -512,12 +496,12 @@ export class ModelregistryClient {
512
496
  });
513
497
  resp = parseResponse(
514
498
  respBody,
515
- unmarshalListRegistryWebhooksRequest_ResponseSchema
499
+ unmarshalListRegistryWebhooksResponseSchema
516
500
  );
517
501
  };
518
502
  await executeCall(call, options);
519
503
  if (resp === undefined) {
520
- throw new Error('API call completed without a result.');
504
+ throw new Error('operation completed without a result.');
521
505
  }
522
506
  return resp;
523
507
  }
@@ -543,7 +527,7 @@ export class ModelregistryClient {
543
527
  async listTransitionsRequest(
544
528
  req: ListTransitionRequest,
545
529
  options?: CallOptions
546
- ): Promise<ListTransitionRequest_Response> {
530
+ ): Promise<ListTransitionResponse> {
547
531
  const url = `${this.host}/api/2.0/mlflow/transition-requests/list`;
548
532
  const params = new URLSearchParams();
549
533
  if (req.name !== undefined) {
@@ -554,8 +538,8 @@ export class ModelregistryClient {
554
538
  }
555
539
  const query = params.toString();
556
540
  const fullUrl = query !== '' ? `${url}?${query}` : url;
557
- let resp: ListTransitionRequest_Response | undefined;
558
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
541
+ let resp: ListTransitionResponse | undefined;
542
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
559
543
  const headers = new Headers();
560
544
  if (this.workspaceId !== undefined) {
561
545
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -567,14 +551,11 @@ export class ModelregistryClient {
567
551
  httpClient: this.httpClient,
568
552
  logger: this.logger,
569
553
  });
570
- resp = parseResponse(
571
- respBody,
572
- unmarshalListTransitionRequest_ResponseSchema
573
- );
554
+ resp = parseResponse(respBody, unmarshalListTransitionResponseSchema);
574
555
  };
575
556
  await executeCall(call, options);
576
557
  if (resp === undefined) {
577
- throw new Error('API call completed without a result.');
558
+ throw new Error('operation completed without a result.');
578
559
  }
579
560
  return resp;
580
561
  }
@@ -583,11 +564,11 @@ export class ModelregistryClient {
583
564
  async rejectTransitionRequest(
584
565
  req: RejectTransitionRequest,
585
566
  options?: CallOptions
586
- ): Promise<RejectTransitionRequest_Response> {
567
+ ): Promise<RejectTransitionResponse> {
587
568
  const url = `${this.host}/api/2.0/mlflow/transition-requests/reject`;
588
569
  const body = marshalRequest(req, marshalRejectTransitionRequestSchema);
589
- let resp: RejectTransitionRequest_Response | undefined;
590
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
570
+ let resp: RejectTransitionResponse | undefined;
571
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
591
572
  const headers = new Headers({'Content-Type': 'application/json'});
592
573
  if (this.workspaceId !== undefined) {
593
574
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -599,14 +580,11 @@ export class ModelregistryClient {
599
580
  httpClient: this.httpClient,
600
581
  logger: this.logger,
601
582
  });
602
- resp = parseResponse(
603
- respBody,
604
- unmarshalRejectTransitionRequest_ResponseSchema
605
- );
583
+ resp = parseResponse(respBody, unmarshalRejectTransitionResponseSchema);
606
584
  };
607
585
  await executeCall(call, options);
608
586
  if (resp === undefined) {
609
- throw new Error('API call completed without a result.');
587
+ throw new Error('operation completed without a result.');
610
588
  }
611
589
  return resp;
612
590
  }
@@ -618,11 +596,11 @@ export class ModelregistryClient {
618
596
  async testRegistryWebhook(
619
597
  req: TestRegistryWebhookRequest,
620
598
  options?: CallOptions
621
- ): Promise<TestRegistryWebhookRequest_Response> {
599
+ ): Promise<TestRegistryWebhookResponse> {
622
600
  const url = `${this.host}/api/2.0/mlflow/registry-webhooks/test`;
623
601
  const body = marshalRequest(req, marshalTestRegistryWebhookRequestSchema);
624
- let resp: TestRegistryWebhookRequest_Response | undefined;
625
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
602
+ let resp: TestRegistryWebhookResponse | undefined;
603
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
626
604
  const headers = new Headers({'Content-Type': 'application/json'});
627
605
  if (this.workspaceId !== undefined) {
628
606
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -636,12 +614,12 @@ export class ModelregistryClient {
636
614
  });
637
615
  resp = parseResponse(
638
616
  respBody,
639
- unmarshalTestRegistryWebhookRequest_ResponseSchema
617
+ unmarshalTestRegistryWebhookResponseSchema
640
618
  );
641
619
  };
642
620
  await executeCall(call, options);
643
621
  if (resp === undefined) {
644
- throw new Error('API call completed without a result.');
622
+ throw new Error('operation completed without a result.');
645
623
  }
646
624
  return resp;
647
625
  }
@@ -654,14 +632,14 @@ export class ModelregistryClient {
654
632
  async transitionModelVersionStageDatabricks(
655
633
  req: TransitionModelVersionStageDatabricksRequest,
656
634
  options?: CallOptions
657
- ): Promise<TransitionModelVersionStageDatabricksRequest_Response> {
635
+ ): Promise<TransitionModelVersionStageDatabricksResponse> {
658
636
  const url = `${this.host}/api/2.0/mlflow/databricks/model-versions/transition-stage`;
659
637
  const body = marshalRequest(
660
638
  req,
661
639
  marshalTransitionModelVersionStageDatabricksRequestSchema
662
640
  );
663
- let resp: TransitionModelVersionStageDatabricksRequest_Response | undefined;
664
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
641
+ let resp: TransitionModelVersionStageDatabricksResponse | undefined;
642
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
665
643
  const headers = new Headers({'Content-Type': 'application/json'});
666
644
  if (this.workspaceId !== undefined) {
667
645
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -675,12 +653,12 @@ export class ModelregistryClient {
675
653
  });
676
654
  resp = parseResponse(
677
655
  respBody,
678
- unmarshalTransitionModelVersionStageDatabricksRequest_ResponseSchema
656
+ unmarshalTransitionModelVersionStageDatabricksResponseSchema
679
657
  );
680
658
  };
681
659
  await executeCall(call, options);
682
660
  if (resp === undefined) {
683
- throw new Error('API call completed without a result.');
661
+ throw new Error('operation completed without a result.');
684
662
  }
685
663
  return resp;
686
664
  }
@@ -689,11 +667,11 @@ export class ModelregistryClient {
689
667
  async updateComment(
690
668
  req: UpdateCommentRequest,
691
669
  options?: CallOptions
692
- ): Promise<UpdateCommentRequest_Response> {
670
+ ): Promise<UpdateCommentResponse> {
693
671
  const url = `${this.host}/api/2.0/mlflow/comments/update`;
694
672
  const body = marshalRequest(req, marshalUpdateCommentRequestSchema);
695
- let resp: UpdateCommentRequest_Response | undefined;
696
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
673
+ let resp: UpdateCommentResponse | undefined;
674
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
697
675
  const headers = new Headers({'Content-Type': 'application/json'});
698
676
  if (this.workspaceId !== undefined) {
699
677
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -705,14 +683,11 @@ export class ModelregistryClient {
705
683
  httpClient: this.httpClient,
706
684
  logger: this.logger,
707
685
  });
708
- resp = parseResponse(
709
- respBody,
710
- unmarshalUpdateCommentRequest_ResponseSchema
711
- );
686
+ resp = parseResponse(respBody, unmarshalUpdateCommentResponseSchema);
712
687
  };
713
688
  await executeCall(call, options);
714
689
  if (resp === undefined) {
715
- throw new Error('API call completed without a result.');
690
+ throw new Error('operation completed without a result.');
716
691
  }
717
692
  return resp;
718
693
  }
@@ -724,11 +699,11 @@ export class ModelregistryClient {
724
699
  async updateRegistryWebhook(
725
700
  req: UpdateRegistryWebhookRequest,
726
701
  options?: CallOptions
727
- ): Promise<UpdateRegistryWebhookRequest_Response> {
702
+ ): Promise<UpdateRegistryWebhookResponse> {
728
703
  const url = `${this.host}/api/2.0/mlflow/registry-webhooks/update`;
729
704
  const body = marshalRequest(req, marshalUpdateRegistryWebhookRequestSchema);
730
- let resp: UpdateRegistryWebhookRequest_Response | undefined;
731
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
705
+ let resp: UpdateRegistryWebhookResponse | undefined;
706
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
732
707
  const headers = new Headers({'Content-Type': 'application/json'});
733
708
  if (this.workspaceId !== undefined) {
734
709
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -742,12 +717,12 @@ export class ModelregistryClient {
742
717
  });
743
718
  resp = parseResponse(
744
719
  respBody,
745
- unmarshalUpdateRegistryWebhookRequest_ResponseSchema
720
+ unmarshalUpdateRegistryWebhookResponseSchema
746
721
  );
747
722
  };
748
723
  await executeCall(call, options);
749
724
  if (resp === undefined) {
750
- throw new Error('API call completed without a result.');
725
+ throw new Error('operation completed without a result.');
751
726
  }
752
727
  return resp;
753
728
  }
@@ -756,11 +731,11 @@ export class ModelregistryClient {
756
731
  async createModelVersion(
757
732
  req: CreateModelVersionRequest,
758
733
  options?: CallOptions
759
- ): Promise<CreateModelVersionRequest_Response> {
734
+ ): Promise<CreateModelVersionResponse> {
760
735
  const url = `${this.host}/api/2.0/mlflow/model-versions/create`;
761
736
  const body = marshalRequest(req, marshalCreateModelVersionRequestSchema);
762
- let resp: CreateModelVersionRequest_Response | undefined;
763
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
737
+ let resp: CreateModelVersionResponse | undefined;
738
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
764
739
  const headers = new Headers({'Content-Type': 'application/json'});
765
740
  if (this.workspaceId !== undefined) {
766
741
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -772,14 +747,11 @@ export class ModelregistryClient {
772
747
  httpClient: this.httpClient,
773
748
  logger: this.logger,
774
749
  });
775
- resp = parseResponse(
776
- respBody,
777
- unmarshalCreateModelVersionRequest_ResponseSchema
778
- );
750
+ resp = parseResponse(respBody, unmarshalCreateModelVersionResponseSchema);
779
751
  };
780
752
  await executeCall(call, options);
781
753
  if (resp === undefined) {
782
- throw new Error('API call completed without a result.');
754
+ throw new Error('operation completed without a result.');
783
755
  }
784
756
  return resp;
785
757
  }
@@ -791,11 +763,11 @@ export class ModelregistryClient {
791
763
  async createRegisteredModel(
792
764
  req: CreateRegisteredModelRequest,
793
765
  options?: CallOptions
794
- ): Promise<CreateRegisteredModelRequest_Response> {
766
+ ): Promise<CreateRegisteredModelResponse> {
795
767
  const url = `${this.host}/api/2.0/mlflow/registered-models/create`;
796
768
  const body = marshalRequest(req, marshalCreateRegisteredModelRequestSchema);
797
- let resp: CreateRegisteredModelRequest_Response | undefined;
798
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
769
+ let resp: CreateRegisteredModelResponse | undefined;
770
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
799
771
  const headers = new Headers({'Content-Type': 'application/json'});
800
772
  if (this.workspaceId !== undefined) {
801
773
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -809,12 +781,12 @@ export class ModelregistryClient {
809
781
  });
810
782
  resp = parseResponse(
811
783
  respBody,
812
- unmarshalCreateRegisteredModelRequest_ResponseSchema
784
+ unmarshalCreateRegisteredModelResponseSchema
813
785
  );
814
786
  };
815
787
  await executeCall(call, options);
816
788
  if (resp === undefined) {
817
- throw new Error('API call completed without a result.');
789
+ throw new Error('operation completed without a result.');
818
790
  }
819
791
  return resp;
820
792
  }
@@ -823,7 +795,7 @@ export class ModelregistryClient {
823
795
  async deleteModelVersion(
824
796
  req: DeleteModelVersionRequest,
825
797
  options?: CallOptions
826
- ): Promise<DeleteModelVersionRequest_Response> {
798
+ ): Promise<DeleteModelVersionResponse> {
827
799
  const url = `${this.host}/api/2.0/mlflow/model-versions/delete`;
828
800
  const params = new URLSearchParams();
829
801
  if (req.name !== undefined) {
@@ -834,8 +806,8 @@ export class ModelregistryClient {
834
806
  }
835
807
  const query = params.toString();
836
808
  const fullUrl = query !== '' ? `${url}?${query}` : url;
837
- let resp: DeleteModelVersionRequest_Response | undefined;
838
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
809
+ let resp: DeleteModelVersionResponse | undefined;
810
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
839
811
  const headers = new Headers();
840
812
  if (this.workspaceId !== undefined) {
841
813
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -847,14 +819,11 @@ export class ModelregistryClient {
847
819
  httpClient: this.httpClient,
848
820
  logger: this.logger,
849
821
  });
850
- resp = parseResponse(
851
- respBody,
852
- unmarshalDeleteModelVersionRequest_ResponseSchema
853
- );
822
+ resp = parseResponse(respBody, unmarshalDeleteModelVersionResponseSchema);
854
823
  };
855
824
  await executeCall(call, options);
856
825
  if (resp === undefined) {
857
- throw new Error('API call completed without a result.');
826
+ throw new Error('operation completed without a result.');
858
827
  }
859
828
  return resp;
860
829
  }
@@ -863,7 +832,7 @@ export class ModelregistryClient {
863
832
  async deleteModelVersionTag(
864
833
  req: DeleteModelVersionTagRequest,
865
834
  options?: CallOptions
866
- ): Promise<DeleteModelVersionTagRequest_Response> {
835
+ ): Promise<DeleteModelVersionTagResponse> {
867
836
  const url = `${this.host}/api/2.0/mlflow/model-versions/delete-tag`;
868
837
  const params = new URLSearchParams();
869
838
  if (req.name !== undefined) {
@@ -877,8 +846,8 @@ export class ModelregistryClient {
877
846
  }
878
847
  const query = params.toString();
879
848
  const fullUrl = query !== '' ? `${url}?${query}` : url;
880
- let resp: DeleteModelVersionTagRequest_Response | undefined;
881
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
849
+ let resp: DeleteModelVersionTagResponse | undefined;
850
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
882
851
  const headers = new Headers();
883
852
  if (this.workspaceId !== undefined) {
884
853
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -892,12 +861,12 @@ export class ModelregistryClient {
892
861
  });
893
862
  resp = parseResponse(
894
863
  respBody,
895
- unmarshalDeleteModelVersionTagRequest_ResponseSchema
864
+ unmarshalDeleteModelVersionTagResponseSchema
896
865
  );
897
866
  };
898
867
  await executeCall(call, options);
899
868
  if (resp === undefined) {
900
- throw new Error('API call completed without a result.');
869
+ throw new Error('operation completed without a result.');
901
870
  }
902
871
  return resp;
903
872
  }
@@ -906,7 +875,7 @@ export class ModelregistryClient {
906
875
  async deleteRegisteredModel(
907
876
  req: DeleteRegisteredModelRequest,
908
877
  options?: CallOptions
909
- ): Promise<DeleteRegisteredModelRequest_Response> {
878
+ ): Promise<DeleteRegisteredModelResponse> {
910
879
  const url = `${this.host}/api/2.0/mlflow/registered-models/delete`;
911
880
  const params = new URLSearchParams();
912
881
  if (req.name !== undefined) {
@@ -914,8 +883,8 @@ export class ModelregistryClient {
914
883
  }
915
884
  const query = params.toString();
916
885
  const fullUrl = query !== '' ? `${url}?${query}` : url;
917
- let resp: DeleteRegisteredModelRequest_Response | undefined;
918
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
886
+ let resp: DeleteRegisteredModelResponse | undefined;
887
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
919
888
  const headers = new Headers();
920
889
  if (this.workspaceId !== undefined) {
921
890
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -929,12 +898,12 @@ export class ModelregistryClient {
929
898
  });
930
899
  resp = parseResponse(
931
900
  respBody,
932
- unmarshalDeleteRegisteredModelRequest_ResponseSchema
901
+ unmarshalDeleteRegisteredModelResponseSchema
933
902
  );
934
903
  };
935
904
  await executeCall(call, options);
936
905
  if (resp === undefined) {
937
- throw new Error('API call completed without a result.');
906
+ throw new Error('operation completed without a result.');
938
907
  }
939
908
  return resp;
940
909
  }
@@ -943,7 +912,7 @@ export class ModelregistryClient {
943
912
  async deleteRegisteredModelTag(
944
913
  req: DeleteRegisteredModelTagRequest,
945
914
  options?: CallOptions
946
- ): Promise<DeleteRegisteredModelTagRequest_Response> {
915
+ ): Promise<DeleteRegisteredModelTagResponse> {
947
916
  const url = `${this.host}/api/2.0/mlflow/registered-models/delete-tag`;
948
917
  const params = new URLSearchParams();
949
918
  if (req.name !== undefined) {
@@ -954,8 +923,8 @@ export class ModelregistryClient {
954
923
  }
955
924
  const query = params.toString();
956
925
  const fullUrl = query !== '' ? `${url}?${query}` : url;
957
- let resp: DeleteRegisteredModelTagRequest_Response | undefined;
958
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
926
+ let resp: DeleteRegisteredModelTagResponse | undefined;
927
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
959
928
  const headers = new Headers();
960
929
  if (this.workspaceId !== undefined) {
961
930
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -969,44 +938,12 @@ export class ModelregistryClient {
969
938
  });
970
939
  resp = parseResponse(
971
940
  respBody,
972
- unmarshalDeleteRegisteredModelTagRequest_ResponseSchema
973
- );
974
- };
975
- await executeCall(call, options);
976
- if (resp === undefined) {
977
- throw new Error('API call completed without a result.');
978
- }
979
- return resp;
980
- }
981
-
982
- /** Gets the latest version of a registered model. */
983
- async getLatestVersions(
984
- req: GetLatestVersionsRequest,
985
- options?: CallOptions
986
- ): Promise<GetLatestVersionsRequest_Response> {
987
- const url = `${this.host}/api/2.0/mlflow/registered-models/get-latest-versions`;
988
- const body = marshalRequest(req, marshalGetLatestVersionsRequestSchema);
989
- let resp: GetLatestVersionsRequest_Response | undefined;
990
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
991
- const headers = new Headers({'Content-Type': 'application/json'});
992
- if (this.workspaceId !== undefined) {
993
- headers.set('X-Databricks-Org-Id', this.workspaceId);
994
- }
995
- headers.set('User-Agent', this.userAgent);
996
- const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
997
- const respBody = await executeHttpCall({
998
- request: httpReq,
999
- httpClient: this.httpClient,
1000
- logger: this.logger,
1001
- });
1002
- resp = parseResponse(
1003
- respBody,
1004
- unmarshalGetLatestVersionsRequest_ResponseSchema
941
+ unmarshalDeleteRegisteredModelTagResponseSchema
1005
942
  );
1006
943
  };
1007
944
  await executeCall(call, options);
1008
945
  if (resp === undefined) {
1009
- throw new Error('API call completed without a result.');
946
+ throw new Error('operation completed without a result.');
1010
947
  }
1011
948
  return resp;
1012
949
  }
@@ -1015,7 +952,7 @@ export class ModelregistryClient {
1015
952
  async getModelVersion(
1016
953
  req: GetModelVersionRequest,
1017
954
  options?: CallOptions
1018
- ): Promise<GetModelVersionRequest_Response> {
955
+ ): Promise<GetModelVersionResponse> {
1019
956
  const url = `${this.host}/api/2.0/mlflow/model-versions/get`;
1020
957
  const params = new URLSearchParams();
1021
958
  if (req.name !== undefined) {
@@ -1026,8 +963,8 @@ export class ModelregistryClient {
1026
963
  }
1027
964
  const query = params.toString();
1028
965
  const fullUrl = query !== '' ? `${url}?${query}` : url;
1029
- let resp: GetModelVersionRequest_Response | undefined;
1030
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
966
+ let resp: GetModelVersionResponse | undefined;
967
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
1031
968
  const headers = new Headers();
1032
969
  if (this.workspaceId !== undefined) {
1033
970
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -1039,14 +976,11 @@ export class ModelregistryClient {
1039
976
  httpClient: this.httpClient,
1040
977
  logger: this.logger,
1041
978
  });
1042
- resp = parseResponse(
1043
- respBody,
1044
- unmarshalGetModelVersionRequest_ResponseSchema
1045
- );
979
+ resp = parseResponse(respBody, unmarshalGetModelVersionResponseSchema);
1046
980
  };
1047
981
  await executeCall(call, options);
1048
982
  if (resp === undefined) {
1049
- throw new Error('API call completed without a result.');
983
+ throw new Error('operation completed without a result.');
1050
984
  }
1051
985
  return resp;
1052
986
  }
@@ -1055,7 +989,7 @@ export class ModelregistryClient {
1055
989
  async getModelVersionDownloadUri(
1056
990
  req: GetModelVersionDownloadUriRequest,
1057
991
  options?: CallOptions
1058
- ): Promise<GetModelVersionDownloadUriRequest_Response> {
992
+ ): Promise<GetModelVersionDownloadUriResponse> {
1059
993
  const url = `${this.host}/api/2.0/mlflow/model-versions/get-download-uri`;
1060
994
  const params = new URLSearchParams();
1061
995
  if (req.name !== undefined) {
@@ -1066,8 +1000,8 @@ export class ModelregistryClient {
1066
1000
  }
1067
1001
  const query = params.toString();
1068
1002
  const fullUrl = query !== '' ? `${url}?${query}` : url;
1069
- let resp: GetModelVersionDownloadUriRequest_Response | undefined;
1070
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
1003
+ let resp: GetModelVersionDownloadUriResponse | undefined;
1004
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
1071
1005
  const headers = new Headers();
1072
1006
  if (this.workspaceId !== undefined) {
1073
1007
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -1081,12 +1015,41 @@ export class ModelregistryClient {
1081
1015
  });
1082
1016
  resp = parseResponse(
1083
1017
  respBody,
1084
- unmarshalGetModelVersionDownloadUriRequest_ResponseSchema
1018
+ unmarshalGetModelVersionDownloadUriResponseSchema
1085
1019
  );
1086
1020
  };
1087
1021
  await executeCall(call, options);
1088
1022
  if (resp === undefined) {
1089
- throw new Error('API call completed without a result.');
1023
+ throw new Error('operation completed without a result.');
1024
+ }
1025
+ return resp;
1026
+ }
1027
+
1028
+ /** Gets the latest version of a registered model. */
1029
+ async listLatestVersions(
1030
+ req: ListLatestVersionsRequest,
1031
+ options?: CallOptions
1032
+ ): Promise<GetLatestVersionsResponse> {
1033
+ const url = `${this.host}/api/2.0/mlflow/registered-models/get-latest-versions`;
1034
+ const body = marshalRequest(req, marshalListLatestVersionsRequestSchema);
1035
+ let resp: GetLatestVersionsResponse | undefined;
1036
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
1037
+ const headers = new Headers({'Content-Type': 'application/json'});
1038
+ if (this.workspaceId !== undefined) {
1039
+ headers.set('X-Databricks-Org-Id', this.workspaceId);
1040
+ }
1041
+ headers.set('User-Agent', this.userAgent);
1042
+ const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
1043
+ const respBody = await executeHttpCall({
1044
+ request: httpReq,
1045
+ httpClient: this.httpClient,
1046
+ logger: this.logger,
1047
+ });
1048
+ resp = parseResponse(respBody, unmarshalGetLatestVersionsResponseSchema);
1049
+ };
1050
+ await executeCall(call, options);
1051
+ if (resp === undefined) {
1052
+ throw new Error('operation completed without a result.');
1090
1053
  }
1091
1054
  return resp;
1092
1055
  }
@@ -1095,7 +1058,7 @@ export class ModelregistryClient {
1095
1058
  async listRegisteredModels(
1096
1059
  req: ListRegisteredModelsRequest,
1097
1060
  options?: CallOptions
1098
- ): Promise<ListRegisteredModelsRequest_Response> {
1061
+ ): Promise<ListRegisteredModelsResponse> {
1099
1062
  const url = `${this.host}/api/2.0/mlflow/registered-models/list`;
1100
1063
  const params = new URLSearchParams();
1101
1064
  if (req.maxResults !== undefined) {
@@ -1106,8 +1069,8 @@ export class ModelregistryClient {
1106
1069
  }
1107
1070
  const query = params.toString();
1108
1071
  const fullUrl = query !== '' ? `${url}?${query}` : url;
1109
- let resp: ListRegisteredModelsRequest_Response | undefined;
1110
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
1072
+ let resp: ListRegisteredModelsResponse | undefined;
1073
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
1111
1074
  const headers = new Headers();
1112
1075
  if (this.workspaceId !== undefined) {
1113
1076
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -1121,12 +1084,12 @@ export class ModelregistryClient {
1121
1084
  });
1122
1085
  resp = parseResponse(
1123
1086
  respBody,
1124
- unmarshalListRegisteredModelsRequest_ResponseSchema
1087
+ unmarshalListRegisteredModelsResponseSchema
1125
1088
  );
1126
1089
  };
1127
1090
  await executeCall(call, options);
1128
1091
  if (resp === undefined) {
1129
- throw new Error('API call completed without a result.');
1092
+ throw new Error('operation completed without a result.');
1130
1093
  }
1131
1094
  return resp;
1132
1095
  }
@@ -1152,11 +1115,11 @@ export class ModelregistryClient {
1152
1115
  async renameRegisteredModel(
1153
1116
  req: RenameRegisteredModelRequest,
1154
1117
  options?: CallOptions
1155
- ): Promise<RenameRegisteredModelRequest_Response> {
1118
+ ): Promise<RenameRegisteredModelResponse> {
1156
1119
  const url = `${this.host}/api/2.0/mlflow/registered-models/rename`;
1157
1120
  const body = marshalRequest(req, marshalRenameRegisteredModelRequestSchema);
1158
- let resp: RenameRegisteredModelRequest_Response | undefined;
1159
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
1121
+ let resp: RenameRegisteredModelResponse | undefined;
1122
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
1160
1123
  const headers = new Headers({'Content-Type': 'application/json'});
1161
1124
  if (this.workspaceId !== undefined) {
1162
1125
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -1170,12 +1133,12 @@ export class ModelregistryClient {
1170
1133
  });
1171
1134
  resp = parseResponse(
1172
1135
  respBody,
1173
- unmarshalRenameRegisteredModelRequest_ResponseSchema
1136
+ unmarshalRenameRegisteredModelResponseSchema
1174
1137
  );
1175
1138
  };
1176
1139
  await executeCall(call, options);
1177
1140
  if (resp === undefined) {
1178
- throw new Error('API call completed without a result.');
1141
+ throw new Error('operation completed without a result.');
1179
1142
  }
1180
1143
  return resp;
1181
1144
  }
@@ -1184,7 +1147,7 @@ export class ModelregistryClient {
1184
1147
  async searchModelVersions(
1185
1148
  req: SearchModelVersionsRequest,
1186
1149
  options?: CallOptions
1187
- ): Promise<SearchModelVersionsRequest_Response> {
1150
+ ): Promise<SearchModelVersionsResponse> {
1188
1151
  const url = `${this.host}/api/2.0/mlflow/model-versions/search`;
1189
1152
  const params = new URLSearchParams();
1190
1153
  if (req.filter !== undefined) {
@@ -1201,8 +1164,8 @@ export class ModelregistryClient {
1201
1164
  }
1202
1165
  const query = params.toString();
1203
1166
  const fullUrl = query !== '' ? `${url}?${query}` : url;
1204
- let resp: SearchModelVersionsRequest_Response | undefined;
1205
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
1167
+ let resp: SearchModelVersionsResponse | undefined;
1168
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
1206
1169
  const headers = new Headers();
1207
1170
  if (this.workspaceId !== undefined) {
1208
1171
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -1216,12 +1179,12 @@ export class ModelregistryClient {
1216
1179
  });
1217
1180
  resp = parseResponse(
1218
1181
  respBody,
1219
- unmarshalSearchModelVersionsRequest_ResponseSchema
1182
+ unmarshalSearchModelVersionsResponseSchema
1220
1183
  );
1221
1184
  };
1222
1185
  await executeCall(call, options);
1223
1186
  if (resp === undefined) {
1224
- throw new Error('API call completed without a result.');
1187
+ throw new Error('operation completed without a result.');
1225
1188
  }
1226
1189
  return resp;
1227
1190
  }
@@ -1247,7 +1210,7 @@ export class ModelregistryClient {
1247
1210
  async searchRegisteredModels(
1248
1211
  req: SearchRegisteredModelsRequest,
1249
1212
  options?: CallOptions
1250
- ): Promise<SearchRegisteredModelsRequest_Response> {
1213
+ ): Promise<SearchRegisteredModelsResponse> {
1251
1214
  const url = `${this.host}/api/2.0/mlflow/registered-models/search`;
1252
1215
  const params = new URLSearchParams();
1253
1216
  if (req.filter !== undefined) {
@@ -1264,8 +1227,8 @@ export class ModelregistryClient {
1264
1227
  }
1265
1228
  const query = params.toString();
1266
1229
  const fullUrl = query !== '' ? `${url}?${query}` : url;
1267
- let resp: SearchRegisteredModelsRequest_Response | undefined;
1268
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
1230
+ let resp: SearchRegisteredModelsResponse | undefined;
1231
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
1269
1232
  const headers = new Headers();
1270
1233
  if (this.workspaceId !== undefined) {
1271
1234
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -1279,12 +1242,12 @@ export class ModelregistryClient {
1279
1242
  });
1280
1243
  resp = parseResponse(
1281
1244
  respBody,
1282
- unmarshalSearchRegisteredModelsRequest_ResponseSchema
1245
+ unmarshalSearchRegisteredModelsResponseSchema
1283
1246
  );
1284
1247
  };
1285
1248
  await executeCall(call, options);
1286
1249
  if (resp === undefined) {
1287
- throw new Error('API call completed without a result.');
1250
+ throw new Error('operation completed without a result.');
1288
1251
  }
1289
1252
  return resp;
1290
1253
  }
@@ -1310,11 +1273,11 @@ export class ModelregistryClient {
1310
1273
  async setModelVersionTag(
1311
1274
  req: SetModelVersionTagRequest,
1312
1275
  options?: CallOptions
1313
- ): Promise<SetModelVersionTagRequest_Response> {
1276
+ ): Promise<SetModelVersionTagResponse> {
1314
1277
  const url = `${this.host}/api/2.0/mlflow/model-versions/set-tag`;
1315
1278
  const body = marshalRequest(req, marshalSetModelVersionTagRequestSchema);
1316
- let resp: SetModelVersionTagRequest_Response | undefined;
1317
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
1279
+ let resp: SetModelVersionTagResponse | undefined;
1280
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
1318
1281
  const headers = new Headers({'Content-Type': 'application/json'});
1319
1282
  if (this.workspaceId !== undefined) {
1320
1283
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -1326,14 +1289,11 @@ export class ModelregistryClient {
1326
1289
  httpClient: this.httpClient,
1327
1290
  logger: this.logger,
1328
1291
  });
1329
- resp = parseResponse(
1330
- respBody,
1331
- unmarshalSetModelVersionTagRequest_ResponseSchema
1332
- );
1292
+ resp = parseResponse(respBody, unmarshalSetModelVersionTagResponseSchema);
1333
1293
  };
1334
1294
  await executeCall(call, options);
1335
1295
  if (resp === undefined) {
1336
- throw new Error('API call completed without a result.');
1296
+ throw new Error('operation completed without a result.');
1337
1297
  }
1338
1298
  return resp;
1339
1299
  }
@@ -1342,11 +1302,11 @@ export class ModelregistryClient {
1342
1302
  async setRegisteredModelTag(
1343
1303
  req: SetRegisteredModelTagRequest,
1344
1304
  options?: CallOptions
1345
- ): Promise<SetRegisteredModelTagRequest_Response> {
1305
+ ): Promise<SetRegisteredModelTagResponse> {
1346
1306
  const url = `${this.host}/api/2.0/mlflow/registered-models/set-tag`;
1347
1307
  const body = marshalRequest(req, marshalSetRegisteredModelTagRequestSchema);
1348
- let resp: SetRegisteredModelTagRequest_Response | undefined;
1349
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
1308
+ let resp: SetRegisteredModelTagResponse | undefined;
1309
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
1350
1310
  const headers = new Headers({'Content-Type': 'application/json'});
1351
1311
  if (this.workspaceId !== undefined) {
1352
1312
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -1360,12 +1320,12 @@ export class ModelregistryClient {
1360
1320
  });
1361
1321
  resp = parseResponse(
1362
1322
  respBody,
1363
- unmarshalSetRegisteredModelTagRequest_ResponseSchema
1323
+ unmarshalSetRegisteredModelTagResponseSchema
1364
1324
  );
1365
1325
  };
1366
1326
  await executeCall(call, options);
1367
1327
  if (resp === undefined) {
1368
- throw new Error('API call completed without a result.');
1328
+ throw new Error('operation completed without a result.');
1369
1329
  }
1370
1330
  return resp;
1371
1331
  }
@@ -1374,11 +1334,11 @@ export class ModelregistryClient {
1374
1334
  async updateModelVersion(
1375
1335
  req: UpdateModelVersionRequest,
1376
1336
  options?: CallOptions
1377
- ): Promise<UpdateModelVersionRequest_Response> {
1337
+ ): Promise<UpdateModelVersionResponse> {
1378
1338
  const url = `${this.host}/api/2.0/mlflow/model-versions/update`;
1379
1339
  const body = marshalRequest(req, marshalUpdateModelVersionRequestSchema);
1380
- let resp: UpdateModelVersionRequest_Response | undefined;
1381
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
1340
+ let resp: UpdateModelVersionResponse | undefined;
1341
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
1382
1342
  const headers = new Headers({'Content-Type': 'application/json'});
1383
1343
  if (this.workspaceId !== undefined) {
1384
1344
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -1390,14 +1350,11 @@ export class ModelregistryClient {
1390
1350
  httpClient: this.httpClient,
1391
1351
  logger: this.logger,
1392
1352
  });
1393
- resp = parseResponse(
1394
- respBody,
1395
- unmarshalUpdateModelVersionRequest_ResponseSchema
1396
- );
1353
+ resp = parseResponse(respBody, unmarshalUpdateModelVersionResponseSchema);
1397
1354
  };
1398
1355
  await executeCall(call, options);
1399
1356
  if (resp === undefined) {
1400
- throw new Error('API call completed without a result.');
1357
+ throw new Error('operation completed without a result.');
1401
1358
  }
1402
1359
  return resp;
1403
1360
  }
@@ -1406,11 +1363,11 @@ export class ModelregistryClient {
1406
1363
  async updateRegisteredModel(
1407
1364
  req: UpdateRegisteredModelRequest,
1408
1365
  options?: CallOptions
1409
- ): Promise<UpdateRegisteredModelRequest_Response> {
1366
+ ): Promise<UpdateRegisteredModelResponse> {
1410
1367
  const url = `${this.host}/api/2.0/mlflow/registered-models/update`;
1411
1368
  const body = marshalRequest(req, marshalUpdateRegisteredModelRequestSchema);
1412
- let resp: UpdateRegisteredModelRequest_Response | undefined;
1413
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
1369
+ let resp: UpdateRegisteredModelResponse | undefined;
1370
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
1414
1371
  const headers = new Headers({'Content-Type': 'application/json'});
1415
1372
  if (this.workspaceId !== undefined) {
1416
1373
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -1424,12 +1381,12 @@ export class ModelregistryClient {
1424
1381
  });
1425
1382
  resp = parseResponse(
1426
1383
  respBody,
1427
- unmarshalUpdateRegisteredModelRequest_ResponseSchema
1384
+ unmarshalUpdateRegisteredModelResponseSchema
1428
1385
  );
1429
1386
  };
1430
1387
  await executeCall(call, options);
1431
1388
  if (resp === undefined) {
1432
- throw new Error('API call completed without a result.');
1389
+ throw new Error('operation completed without a result.');
1433
1390
  }
1434
1391
  return resp;
1435
1392
  }