@databricks/sdk-modelregistry 0.1.0-dev.1 → 0.1.0-dev.2
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/dist/v1/client.d.ts +4 -4
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +58 -58
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/index.d.ts +2 -2
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +1 -1
- package/dist/v1/model.d.ts +15 -15
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +19 -19
- package/dist/v1/model.js.map +1 -1
- package/dist/v1/utils.d.ts +1 -2
- package/dist/v1/utils.d.ts.map +1 -1
- package/dist/v1/utils.js +1 -1
- package/dist/v1/utils.js.map +1 -1
- package/package.json +4 -4
- package/src/v1/client.ts +99 -100
- package/src/v1/index.ts +3 -3
- package/src/v1/model.ts +38 -38
- package/src/v1/utils.ts +3 -3
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';
|
|
@@ -44,14 +43,14 @@ import type {
|
|
|
44
43
|
DeleteRegistryWebhookRequest_Response,
|
|
45
44
|
DeleteTransitionRequest,
|
|
46
45
|
DeleteTransitionRequest_Response,
|
|
47
|
-
GetLatestVersionsRequest,
|
|
48
|
-
GetLatestVersionsRequest_Response,
|
|
49
46
|
GetModelVersionDownloadUriRequest,
|
|
50
47
|
GetModelVersionDownloadUriRequest_Response,
|
|
51
48
|
GetModelVersionRequest,
|
|
52
49
|
GetModelVersionRequest_Response,
|
|
53
50
|
GetRegisteredModelDatabricksRequest,
|
|
54
51
|
GetRegisteredModelDatabricksRequest_Response,
|
|
52
|
+
ListLatestVersionsRequest,
|
|
53
|
+
ListLatestVersionsRequest_Response,
|
|
55
54
|
ListRegisteredModelsRequest,
|
|
56
55
|
ListRegisteredModelsRequest_Response,
|
|
57
56
|
ListRegistryWebhooksRequest,
|
|
@@ -93,7 +92,7 @@ import {
|
|
|
93
92
|
marshalCreateRegisteredModelRequestSchema,
|
|
94
93
|
marshalCreateRegistryWebhookRequestSchema,
|
|
95
94
|
marshalCreateTransitionRequestSchema,
|
|
96
|
-
|
|
95
|
+
marshalListLatestVersionsRequestSchema,
|
|
97
96
|
marshalRejectTransitionRequestSchema,
|
|
98
97
|
marshalRenameRegisteredModelRequestSchema,
|
|
99
98
|
marshalSetModelVersionTagRequestSchema,
|
|
@@ -117,10 +116,10 @@ import {
|
|
|
117
116
|
unmarshalDeleteRegisteredModelTagRequest_ResponseSchema,
|
|
118
117
|
unmarshalDeleteRegistryWebhookRequest_ResponseSchema,
|
|
119
118
|
unmarshalDeleteTransitionRequest_ResponseSchema,
|
|
120
|
-
unmarshalGetLatestVersionsRequest_ResponseSchema,
|
|
121
119
|
unmarshalGetModelVersionDownloadUriRequest_ResponseSchema,
|
|
122
120
|
unmarshalGetModelVersionRequest_ResponseSchema,
|
|
123
121
|
unmarshalGetRegisteredModelDatabricksRequest_ResponseSchema,
|
|
122
|
+
unmarshalListLatestVersionsRequest_ResponseSchema,
|
|
124
123
|
unmarshalListRegisteredModelsRequest_ResponseSchema,
|
|
125
124
|
unmarshalListRegistryWebhooksRequest_ResponseSchema,
|
|
126
125
|
unmarshalListTransitionRequest_ResponseSchema,
|
|
@@ -144,7 +143,7 @@ const PACKAGE_SEGMENT = {
|
|
|
144
143
|
value: pkgJson.version,
|
|
145
144
|
};
|
|
146
145
|
|
|
147
|
-
export class
|
|
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
|
|
@@ -180,7 +179,7 @@ export class ModelregistryClient {
|
|
|
180
179
|
const url = `${this.host}/api/2.0/mlflow/transition-requests/approve`;
|
|
181
180
|
const body = marshalRequest(req, marshalApproveTransitionRequestSchema);
|
|
182
181
|
let resp: ApproveTransitionRequest_Response | undefined;
|
|
183
|
-
const call
|
|
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);
|
|
@@ -199,7 +198,7 @@ export class ModelregistryClient {
|
|
|
199
198
|
};
|
|
200
199
|
await executeCall(call, options);
|
|
201
200
|
if (resp === undefined) {
|
|
202
|
-
throw new Error('
|
|
201
|
+
throw new Error('operation completed without a result.');
|
|
203
202
|
}
|
|
204
203
|
return resp;
|
|
205
204
|
}
|
|
@@ -215,7 +214,7 @@ export class ModelregistryClient {
|
|
|
215
214
|
const url = `${this.host}/api/2.0/mlflow/comments/create`;
|
|
216
215
|
const body = marshalRequest(req, marshalCreateCommentRequestSchema);
|
|
217
216
|
let resp: CreateCommentRequest_Response | undefined;
|
|
218
|
-
const call
|
|
217
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
219
218
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
220
219
|
if (this.workspaceId !== undefined) {
|
|
221
220
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -234,7 +233,7 @@ export class ModelregistryClient {
|
|
|
234
233
|
};
|
|
235
234
|
await executeCall(call, options);
|
|
236
235
|
if (resp === undefined) {
|
|
237
|
-
throw new Error('
|
|
236
|
+
throw new Error('operation completed without a result.');
|
|
238
237
|
}
|
|
239
238
|
return resp;
|
|
240
239
|
}
|
|
@@ -250,7 +249,7 @@ export class ModelregistryClient {
|
|
|
250
249
|
const url = `${this.host}/api/2.0/mlflow/registry-webhooks/create`;
|
|
251
250
|
const body = marshalRequest(req, marshalCreateRegistryWebhookRequestSchema);
|
|
252
251
|
let resp: CreateRegistryWebhookRequest_Response | undefined;
|
|
253
|
-
const call
|
|
252
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
254
253
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
255
254
|
if (this.workspaceId !== undefined) {
|
|
256
255
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -269,7 +268,7 @@ export class ModelregistryClient {
|
|
|
269
268
|
};
|
|
270
269
|
await executeCall(call, options);
|
|
271
270
|
if (resp === undefined) {
|
|
272
|
-
throw new Error('
|
|
271
|
+
throw new Error('operation completed without a result.');
|
|
273
272
|
}
|
|
274
273
|
return resp;
|
|
275
274
|
}
|
|
@@ -282,7 +281,7 @@ export class ModelregistryClient {
|
|
|
282
281
|
const url = `${this.host}/api/2.0/mlflow/transition-requests/create`;
|
|
283
282
|
const body = marshalRequest(req, marshalCreateTransitionRequestSchema);
|
|
284
283
|
let resp: CreateTransitionRequest_Response | undefined;
|
|
285
|
-
const call
|
|
284
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
286
285
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
287
286
|
if (this.workspaceId !== undefined) {
|
|
288
287
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -301,7 +300,7 @@ export class ModelregistryClient {
|
|
|
301
300
|
};
|
|
302
301
|
await executeCall(call, options);
|
|
303
302
|
if (resp === undefined) {
|
|
304
|
-
throw new Error('
|
|
303
|
+
throw new Error('operation completed without a result.');
|
|
305
304
|
}
|
|
306
305
|
return resp;
|
|
307
306
|
}
|
|
@@ -319,7 +318,7 @@ export class ModelregistryClient {
|
|
|
319
318
|
const query = params.toString();
|
|
320
319
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
321
320
|
let resp: DeleteCommentRequest_Response | undefined;
|
|
322
|
-
const call
|
|
321
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
323
322
|
const headers = new Headers();
|
|
324
323
|
if (this.workspaceId !== undefined) {
|
|
325
324
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -338,7 +337,7 @@ export class ModelregistryClient {
|
|
|
338
337
|
};
|
|
339
338
|
await executeCall(call, options);
|
|
340
339
|
if (resp === undefined) {
|
|
341
|
-
throw new Error('
|
|
340
|
+
throw new Error('operation completed without a result.');
|
|
342
341
|
}
|
|
343
342
|
return resp;
|
|
344
343
|
}
|
|
@@ -359,7 +358,7 @@ export class ModelregistryClient {
|
|
|
359
358
|
const query = params.toString();
|
|
360
359
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
361
360
|
let resp: DeleteRegistryWebhookRequest_Response | undefined;
|
|
362
|
-
const call
|
|
361
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
363
362
|
const headers = new Headers();
|
|
364
363
|
if (this.workspaceId !== undefined) {
|
|
365
364
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -378,7 +377,7 @@ export class ModelregistryClient {
|
|
|
378
377
|
};
|
|
379
378
|
await executeCall(call, options);
|
|
380
379
|
if (resp === undefined) {
|
|
381
|
-
throw new Error('
|
|
380
|
+
throw new Error('operation completed without a result.');
|
|
382
381
|
}
|
|
383
382
|
return resp;
|
|
384
383
|
}
|
|
@@ -408,7 +407,7 @@ export class ModelregistryClient {
|
|
|
408
407
|
const query = params.toString();
|
|
409
408
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
410
409
|
let resp: DeleteTransitionRequest_Response | undefined;
|
|
411
|
-
const call
|
|
410
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
412
411
|
const headers = new Headers();
|
|
413
412
|
if (this.workspaceId !== undefined) {
|
|
414
413
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -427,7 +426,7 @@ export class ModelregistryClient {
|
|
|
427
426
|
};
|
|
428
427
|
await executeCall(call, options);
|
|
429
428
|
if (resp === undefined) {
|
|
430
|
-
throw new Error('
|
|
429
|
+
throw new Error('operation completed without a result.');
|
|
431
430
|
}
|
|
432
431
|
return resp;
|
|
433
432
|
}
|
|
@@ -449,7 +448,7 @@ export class ModelregistryClient {
|
|
|
449
448
|
const query = params.toString();
|
|
450
449
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
451
450
|
let resp: GetRegisteredModelDatabricksRequest_Response | undefined;
|
|
452
|
-
const call
|
|
451
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
453
452
|
const headers = new Headers();
|
|
454
453
|
if (this.workspaceId !== undefined) {
|
|
455
454
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -468,7 +467,7 @@ export class ModelregistryClient {
|
|
|
468
467
|
};
|
|
469
468
|
await executeCall(call, options);
|
|
470
469
|
if (resp === undefined) {
|
|
471
|
-
throw new Error('
|
|
470
|
+
throw new Error('operation completed without a result.');
|
|
472
471
|
}
|
|
473
472
|
return resp;
|
|
474
473
|
}
|
|
@@ -498,7 +497,7 @@ export class ModelregistryClient {
|
|
|
498
497
|
const query = params.toString();
|
|
499
498
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
500
499
|
let resp: ListRegistryWebhooksRequest_Response | undefined;
|
|
501
|
-
const call
|
|
500
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
502
501
|
const headers = new Headers();
|
|
503
502
|
if (this.workspaceId !== undefined) {
|
|
504
503
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -517,7 +516,7 @@ export class ModelregistryClient {
|
|
|
517
516
|
};
|
|
518
517
|
await executeCall(call, options);
|
|
519
518
|
if (resp === undefined) {
|
|
520
|
-
throw new Error('
|
|
519
|
+
throw new Error('operation completed without a result.');
|
|
521
520
|
}
|
|
522
521
|
return resp;
|
|
523
522
|
}
|
|
@@ -555,7 +554,7 @@ export class ModelregistryClient {
|
|
|
555
554
|
const query = params.toString();
|
|
556
555
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
557
556
|
let resp: ListTransitionRequest_Response | undefined;
|
|
558
|
-
const call
|
|
557
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
559
558
|
const headers = new Headers();
|
|
560
559
|
if (this.workspaceId !== undefined) {
|
|
561
560
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -574,7 +573,7 @@ export class ModelregistryClient {
|
|
|
574
573
|
};
|
|
575
574
|
await executeCall(call, options);
|
|
576
575
|
if (resp === undefined) {
|
|
577
|
-
throw new Error('
|
|
576
|
+
throw new Error('operation completed without a result.');
|
|
578
577
|
}
|
|
579
578
|
return resp;
|
|
580
579
|
}
|
|
@@ -587,7 +586,7 @@ export class ModelregistryClient {
|
|
|
587
586
|
const url = `${this.host}/api/2.0/mlflow/transition-requests/reject`;
|
|
588
587
|
const body = marshalRequest(req, marshalRejectTransitionRequestSchema);
|
|
589
588
|
let resp: RejectTransitionRequest_Response | undefined;
|
|
590
|
-
const call
|
|
589
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
591
590
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
592
591
|
if (this.workspaceId !== undefined) {
|
|
593
592
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -606,7 +605,7 @@ export class ModelregistryClient {
|
|
|
606
605
|
};
|
|
607
606
|
await executeCall(call, options);
|
|
608
607
|
if (resp === undefined) {
|
|
609
|
-
throw new Error('
|
|
608
|
+
throw new Error('operation completed without a result.');
|
|
610
609
|
}
|
|
611
610
|
return resp;
|
|
612
611
|
}
|
|
@@ -622,7 +621,7 @@ export class ModelregistryClient {
|
|
|
622
621
|
const url = `${this.host}/api/2.0/mlflow/registry-webhooks/test`;
|
|
623
622
|
const body = marshalRequest(req, marshalTestRegistryWebhookRequestSchema);
|
|
624
623
|
let resp: TestRegistryWebhookRequest_Response | undefined;
|
|
625
|
-
const call
|
|
624
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
626
625
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
627
626
|
if (this.workspaceId !== undefined) {
|
|
628
627
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -641,7 +640,7 @@ export class ModelregistryClient {
|
|
|
641
640
|
};
|
|
642
641
|
await executeCall(call, options);
|
|
643
642
|
if (resp === undefined) {
|
|
644
|
-
throw new Error('
|
|
643
|
+
throw new Error('operation completed without a result.');
|
|
645
644
|
}
|
|
646
645
|
return resp;
|
|
647
646
|
}
|
|
@@ -661,7 +660,7 @@ export class ModelregistryClient {
|
|
|
661
660
|
marshalTransitionModelVersionStageDatabricksRequestSchema
|
|
662
661
|
);
|
|
663
662
|
let resp: TransitionModelVersionStageDatabricksRequest_Response | undefined;
|
|
664
|
-
const call
|
|
663
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
665
664
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
666
665
|
if (this.workspaceId !== undefined) {
|
|
667
666
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -680,7 +679,7 @@ export class ModelregistryClient {
|
|
|
680
679
|
};
|
|
681
680
|
await executeCall(call, options);
|
|
682
681
|
if (resp === undefined) {
|
|
683
|
-
throw new Error('
|
|
682
|
+
throw new Error('operation completed without a result.');
|
|
684
683
|
}
|
|
685
684
|
return resp;
|
|
686
685
|
}
|
|
@@ -693,7 +692,7 @@ export class ModelregistryClient {
|
|
|
693
692
|
const url = `${this.host}/api/2.0/mlflow/comments/update`;
|
|
694
693
|
const body = marshalRequest(req, marshalUpdateCommentRequestSchema);
|
|
695
694
|
let resp: UpdateCommentRequest_Response | undefined;
|
|
696
|
-
const call
|
|
695
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
697
696
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
698
697
|
if (this.workspaceId !== undefined) {
|
|
699
698
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -712,7 +711,7 @@ export class ModelregistryClient {
|
|
|
712
711
|
};
|
|
713
712
|
await executeCall(call, options);
|
|
714
713
|
if (resp === undefined) {
|
|
715
|
-
throw new Error('
|
|
714
|
+
throw new Error('operation completed without a result.');
|
|
716
715
|
}
|
|
717
716
|
return resp;
|
|
718
717
|
}
|
|
@@ -728,7 +727,7 @@ export class ModelregistryClient {
|
|
|
728
727
|
const url = `${this.host}/api/2.0/mlflow/registry-webhooks/update`;
|
|
729
728
|
const body = marshalRequest(req, marshalUpdateRegistryWebhookRequestSchema);
|
|
730
729
|
let resp: UpdateRegistryWebhookRequest_Response | undefined;
|
|
731
|
-
const call
|
|
730
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
732
731
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
733
732
|
if (this.workspaceId !== undefined) {
|
|
734
733
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -747,7 +746,7 @@ export class ModelregistryClient {
|
|
|
747
746
|
};
|
|
748
747
|
await executeCall(call, options);
|
|
749
748
|
if (resp === undefined) {
|
|
750
|
-
throw new Error('
|
|
749
|
+
throw new Error('operation completed without a result.');
|
|
751
750
|
}
|
|
752
751
|
return resp;
|
|
753
752
|
}
|
|
@@ -760,7 +759,7 @@ export class ModelregistryClient {
|
|
|
760
759
|
const url = `${this.host}/api/2.0/mlflow/model-versions/create`;
|
|
761
760
|
const body = marshalRequest(req, marshalCreateModelVersionRequestSchema);
|
|
762
761
|
let resp: CreateModelVersionRequest_Response | undefined;
|
|
763
|
-
const call
|
|
762
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
764
763
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
765
764
|
if (this.workspaceId !== undefined) {
|
|
766
765
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -779,7 +778,7 @@ export class ModelregistryClient {
|
|
|
779
778
|
};
|
|
780
779
|
await executeCall(call, options);
|
|
781
780
|
if (resp === undefined) {
|
|
782
|
-
throw new Error('
|
|
781
|
+
throw new Error('operation completed without a result.');
|
|
783
782
|
}
|
|
784
783
|
return resp;
|
|
785
784
|
}
|
|
@@ -795,7 +794,7 @@ export class ModelregistryClient {
|
|
|
795
794
|
const url = `${this.host}/api/2.0/mlflow/registered-models/create`;
|
|
796
795
|
const body = marshalRequest(req, marshalCreateRegisteredModelRequestSchema);
|
|
797
796
|
let resp: CreateRegisteredModelRequest_Response | undefined;
|
|
798
|
-
const call
|
|
797
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
799
798
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
800
799
|
if (this.workspaceId !== undefined) {
|
|
801
800
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -814,7 +813,7 @@ export class ModelregistryClient {
|
|
|
814
813
|
};
|
|
815
814
|
await executeCall(call, options);
|
|
816
815
|
if (resp === undefined) {
|
|
817
|
-
throw new Error('
|
|
816
|
+
throw new Error('operation completed without a result.');
|
|
818
817
|
}
|
|
819
818
|
return resp;
|
|
820
819
|
}
|
|
@@ -835,7 +834,7 @@ export class ModelregistryClient {
|
|
|
835
834
|
const query = params.toString();
|
|
836
835
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
837
836
|
let resp: DeleteModelVersionRequest_Response | undefined;
|
|
838
|
-
const call
|
|
837
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
839
838
|
const headers = new Headers();
|
|
840
839
|
if (this.workspaceId !== undefined) {
|
|
841
840
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -854,7 +853,7 @@ export class ModelregistryClient {
|
|
|
854
853
|
};
|
|
855
854
|
await executeCall(call, options);
|
|
856
855
|
if (resp === undefined) {
|
|
857
|
-
throw new Error('
|
|
856
|
+
throw new Error('operation completed without a result.');
|
|
858
857
|
}
|
|
859
858
|
return resp;
|
|
860
859
|
}
|
|
@@ -878,7 +877,7 @@ export class ModelregistryClient {
|
|
|
878
877
|
const query = params.toString();
|
|
879
878
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
880
879
|
let resp: DeleteModelVersionTagRequest_Response | undefined;
|
|
881
|
-
const call
|
|
880
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
882
881
|
const headers = new Headers();
|
|
883
882
|
if (this.workspaceId !== undefined) {
|
|
884
883
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -897,7 +896,7 @@ export class ModelregistryClient {
|
|
|
897
896
|
};
|
|
898
897
|
await executeCall(call, options);
|
|
899
898
|
if (resp === undefined) {
|
|
900
|
-
throw new Error('
|
|
899
|
+
throw new Error('operation completed without a result.');
|
|
901
900
|
}
|
|
902
901
|
return resp;
|
|
903
902
|
}
|
|
@@ -915,7 +914,7 @@ export class ModelregistryClient {
|
|
|
915
914
|
const query = params.toString();
|
|
916
915
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
917
916
|
let resp: DeleteRegisteredModelRequest_Response | undefined;
|
|
918
|
-
const call
|
|
917
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
919
918
|
const headers = new Headers();
|
|
920
919
|
if (this.workspaceId !== undefined) {
|
|
921
920
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -934,7 +933,7 @@ export class ModelregistryClient {
|
|
|
934
933
|
};
|
|
935
934
|
await executeCall(call, options);
|
|
936
935
|
if (resp === undefined) {
|
|
937
|
-
throw new Error('
|
|
936
|
+
throw new Error('operation completed without a result.');
|
|
938
937
|
}
|
|
939
938
|
return resp;
|
|
940
939
|
}
|
|
@@ -955,7 +954,7 @@ export class ModelregistryClient {
|
|
|
955
954
|
const query = params.toString();
|
|
956
955
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
957
956
|
let resp: DeleteRegisteredModelTagRequest_Response | undefined;
|
|
958
|
-
const call
|
|
957
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
959
958
|
const headers = new Headers();
|
|
960
959
|
if (this.workspaceId !== undefined) {
|
|
961
960
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -974,39 +973,7 @@ export class ModelregistryClient {
|
|
|
974
973
|
};
|
|
975
974
|
await executeCall(call, options);
|
|
976
975
|
if (resp === undefined) {
|
|
977
|
-
throw new Error('
|
|
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
|
|
1005
|
-
);
|
|
1006
|
-
};
|
|
1007
|
-
await executeCall(call, options);
|
|
1008
|
-
if (resp === undefined) {
|
|
1009
|
-
throw new Error('API call completed without a result.');
|
|
976
|
+
throw new Error('operation completed without a result.');
|
|
1010
977
|
}
|
|
1011
978
|
return resp;
|
|
1012
979
|
}
|
|
@@ -1027,7 +994,7 @@ export class ModelregistryClient {
|
|
|
1027
994
|
const query = params.toString();
|
|
1028
995
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1029
996
|
let resp: GetModelVersionRequest_Response | undefined;
|
|
1030
|
-
const call
|
|
997
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1031
998
|
const headers = new Headers();
|
|
1032
999
|
if (this.workspaceId !== undefined) {
|
|
1033
1000
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1046,7 +1013,7 @@ export class ModelregistryClient {
|
|
|
1046
1013
|
};
|
|
1047
1014
|
await executeCall(call, options);
|
|
1048
1015
|
if (resp === undefined) {
|
|
1049
|
-
throw new Error('
|
|
1016
|
+
throw new Error('operation completed without a result.');
|
|
1050
1017
|
}
|
|
1051
1018
|
return resp;
|
|
1052
1019
|
}
|
|
@@ -1067,7 +1034,7 @@ export class ModelregistryClient {
|
|
|
1067
1034
|
const query = params.toString();
|
|
1068
1035
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1069
1036
|
let resp: GetModelVersionDownloadUriRequest_Response | undefined;
|
|
1070
|
-
const call
|
|
1037
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1071
1038
|
const headers = new Headers();
|
|
1072
1039
|
if (this.workspaceId !== undefined) {
|
|
1073
1040
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1086,7 +1053,39 @@ export class ModelregistryClient {
|
|
|
1086
1053
|
};
|
|
1087
1054
|
await executeCall(call, options);
|
|
1088
1055
|
if (resp === undefined) {
|
|
1089
|
-
throw new Error('
|
|
1056
|
+
throw new Error('operation completed without a result.');
|
|
1057
|
+
}
|
|
1058
|
+
return resp;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
/** Gets the latest version of a registered model. */
|
|
1062
|
+
async listLatestVersions(
|
|
1063
|
+
req: ListLatestVersionsRequest,
|
|
1064
|
+
options?: CallOptions
|
|
1065
|
+
): Promise<ListLatestVersionsRequest_Response> {
|
|
1066
|
+
const url = `${this.host}/api/2.0/mlflow/registered-models/get-latest-versions`;
|
|
1067
|
+
const body = marshalRequest(req, marshalListLatestVersionsRequestSchema);
|
|
1068
|
+
let resp: ListLatestVersionsRequest_Response | undefined;
|
|
1069
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1070
|
+
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1071
|
+
if (this.workspaceId !== undefined) {
|
|
1072
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
1073
|
+
}
|
|
1074
|
+
headers.set('User-Agent', this.userAgent);
|
|
1075
|
+
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
1076
|
+
const respBody = await executeHttpCall({
|
|
1077
|
+
request: httpReq,
|
|
1078
|
+
httpClient: this.httpClient,
|
|
1079
|
+
logger: this.logger,
|
|
1080
|
+
});
|
|
1081
|
+
resp = parseResponse(
|
|
1082
|
+
respBody,
|
|
1083
|
+
unmarshalListLatestVersionsRequest_ResponseSchema
|
|
1084
|
+
);
|
|
1085
|
+
};
|
|
1086
|
+
await executeCall(call, options);
|
|
1087
|
+
if (resp === undefined) {
|
|
1088
|
+
throw new Error('operation completed without a result.');
|
|
1090
1089
|
}
|
|
1091
1090
|
return resp;
|
|
1092
1091
|
}
|
|
@@ -1107,7 +1106,7 @@ export class ModelregistryClient {
|
|
|
1107
1106
|
const query = params.toString();
|
|
1108
1107
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1109
1108
|
let resp: ListRegisteredModelsRequest_Response | undefined;
|
|
1110
|
-
const call
|
|
1109
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1111
1110
|
const headers = new Headers();
|
|
1112
1111
|
if (this.workspaceId !== undefined) {
|
|
1113
1112
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1126,7 +1125,7 @@ export class ModelregistryClient {
|
|
|
1126
1125
|
};
|
|
1127
1126
|
await executeCall(call, options);
|
|
1128
1127
|
if (resp === undefined) {
|
|
1129
|
-
throw new Error('
|
|
1128
|
+
throw new Error('operation completed without a result.');
|
|
1130
1129
|
}
|
|
1131
1130
|
return resp;
|
|
1132
1131
|
}
|
|
@@ -1156,7 +1155,7 @@ export class ModelregistryClient {
|
|
|
1156
1155
|
const url = `${this.host}/api/2.0/mlflow/registered-models/rename`;
|
|
1157
1156
|
const body = marshalRequest(req, marshalRenameRegisteredModelRequestSchema);
|
|
1158
1157
|
let resp: RenameRegisteredModelRequest_Response | undefined;
|
|
1159
|
-
const call
|
|
1158
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1160
1159
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1161
1160
|
if (this.workspaceId !== undefined) {
|
|
1162
1161
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1175,7 +1174,7 @@ export class ModelregistryClient {
|
|
|
1175
1174
|
};
|
|
1176
1175
|
await executeCall(call, options);
|
|
1177
1176
|
if (resp === undefined) {
|
|
1178
|
-
throw new Error('
|
|
1177
|
+
throw new Error('operation completed without a result.');
|
|
1179
1178
|
}
|
|
1180
1179
|
return resp;
|
|
1181
1180
|
}
|
|
@@ -1202,7 +1201,7 @@ export class ModelregistryClient {
|
|
|
1202
1201
|
const query = params.toString();
|
|
1203
1202
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1204
1203
|
let resp: SearchModelVersionsRequest_Response | undefined;
|
|
1205
|
-
const call
|
|
1204
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1206
1205
|
const headers = new Headers();
|
|
1207
1206
|
if (this.workspaceId !== undefined) {
|
|
1208
1207
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1221,7 +1220,7 @@ export class ModelregistryClient {
|
|
|
1221
1220
|
};
|
|
1222
1221
|
await executeCall(call, options);
|
|
1223
1222
|
if (resp === undefined) {
|
|
1224
|
-
throw new Error('
|
|
1223
|
+
throw new Error('operation completed without a result.');
|
|
1225
1224
|
}
|
|
1226
1225
|
return resp;
|
|
1227
1226
|
}
|
|
@@ -1265,7 +1264,7 @@ export class ModelregistryClient {
|
|
|
1265
1264
|
const query = params.toString();
|
|
1266
1265
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1267
1266
|
let resp: SearchRegisteredModelsRequest_Response | undefined;
|
|
1268
|
-
const call
|
|
1267
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1269
1268
|
const headers = new Headers();
|
|
1270
1269
|
if (this.workspaceId !== undefined) {
|
|
1271
1270
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1284,7 +1283,7 @@ export class ModelregistryClient {
|
|
|
1284
1283
|
};
|
|
1285
1284
|
await executeCall(call, options);
|
|
1286
1285
|
if (resp === undefined) {
|
|
1287
|
-
throw new Error('
|
|
1286
|
+
throw new Error('operation completed without a result.');
|
|
1288
1287
|
}
|
|
1289
1288
|
return resp;
|
|
1290
1289
|
}
|
|
@@ -1314,7 +1313,7 @@ export class ModelregistryClient {
|
|
|
1314
1313
|
const url = `${this.host}/api/2.0/mlflow/model-versions/set-tag`;
|
|
1315
1314
|
const body = marshalRequest(req, marshalSetModelVersionTagRequestSchema);
|
|
1316
1315
|
let resp: SetModelVersionTagRequest_Response | undefined;
|
|
1317
|
-
const call
|
|
1316
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1318
1317
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1319
1318
|
if (this.workspaceId !== undefined) {
|
|
1320
1319
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1333,7 +1332,7 @@ export class ModelregistryClient {
|
|
|
1333
1332
|
};
|
|
1334
1333
|
await executeCall(call, options);
|
|
1335
1334
|
if (resp === undefined) {
|
|
1336
|
-
throw new Error('
|
|
1335
|
+
throw new Error('operation completed without a result.');
|
|
1337
1336
|
}
|
|
1338
1337
|
return resp;
|
|
1339
1338
|
}
|
|
@@ -1346,7 +1345,7 @@ export class ModelregistryClient {
|
|
|
1346
1345
|
const url = `${this.host}/api/2.0/mlflow/registered-models/set-tag`;
|
|
1347
1346
|
const body = marshalRequest(req, marshalSetRegisteredModelTagRequestSchema);
|
|
1348
1347
|
let resp: SetRegisteredModelTagRequest_Response | undefined;
|
|
1349
|
-
const call
|
|
1348
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1350
1349
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1351
1350
|
if (this.workspaceId !== undefined) {
|
|
1352
1351
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1365,7 +1364,7 @@ export class ModelregistryClient {
|
|
|
1365
1364
|
};
|
|
1366
1365
|
await executeCall(call, options);
|
|
1367
1366
|
if (resp === undefined) {
|
|
1368
|
-
throw new Error('
|
|
1367
|
+
throw new Error('operation completed without a result.');
|
|
1369
1368
|
}
|
|
1370
1369
|
return resp;
|
|
1371
1370
|
}
|
|
@@ -1378,7 +1377,7 @@ export class ModelregistryClient {
|
|
|
1378
1377
|
const url = `${this.host}/api/2.0/mlflow/model-versions/update`;
|
|
1379
1378
|
const body = marshalRequest(req, marshalUpdateModelVersionRequestSchema);
|
|
1380
1379
|
let resp: UpdateModelVersionRequest_Response | undefined;
|
|
1381
|
-
const call
|
|
1380
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1382
1381
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1383
1382
|
if (this.workspaceId !== undefined) {
|
|
1384
1383
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1397,7 +1396,7 @@ export class ModelregistryClient {
|
|
|
1397
1396
|
};
|
|
1398
1397
|
await executeCall(call, options);
|
|
1399
1398
|
if (resp === undefined) {
|
|
1400
|
-
throw new Error('
|
|
1399
|
+
throw new Error('operation completed without a result.');
|
|
1401
1400
|
}
|
|
1402
1401
|
return resp;
|
|
1403
1402
|
}
|
|
@@ -1410,7 +1409,7 @@ export class ModelregistryClient {
|
|
|
1410
1409
|
const url = `${this.host}/api/2.0/mlflow/registered-models/update`;
|
|
1411
1410
|
const body = marshalRequest(req, marshalUpdateRegisteredModelRequestSchema);
|
|
1412
1411
|
let resp: UpdateRegisteredModelRequest_Response | undefined;
|
|
1413
|
-
const call
|
|
1412
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1414
1413
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1415
1414
|
if (this.workspaceId !== undefined) {
|
|
1416
1415
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1429,7 +1428,7 @@ export class ModelregistryClient {
|
|
|
1429
1428
|
};
|
|
1430
1429
|
await executeCall(call, options);
|
|
1431
1430
|
if (resp === undefined) {
|
|
1432
|
-
throw new Error('
|
|
1431
|
+
throw new Error('operation completed without a result.');
|
|
1433
1432
|
}
|
|
1434
1433
|
return resp;
|
|
1435
1434
|
}
|
package/src/v1/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export {ModelRegistryClient} from './client';
|
|
4
4
|
|
|
5
5
|
export {
|
|
6
6
|
ActivityAction,
|
|
@@ -42,8 +42,6 @@ export type {
|
|
|
42
42
|
DeleteTransitionRequest,
|
|
43
43
|
DeleteTransitionRequest_Response,
|
|
44
44
|
FeatureList,
|
|
45
|
-
GetLatestVersionsRequest,
|
|
46
|
-
GetLatestVersionsRequest_Response,
|
|
47
45
|
GetModelVersionDownloadUriRequest,
|
|
48
46
|
GetModelVersionDownloadUriRequest_Response,
|
|
49
47
|
GetModelVersionRequest,
|
|
@@ -53,6 +51,8 @@ export type {
|
|
|
53
51
|
HttpUrlSpec,
|
|
54
52
|
JobSpec,
|
|
55
53
|
LinkedFeature,
|
|
54
|
+
ListLatestVersionsRequest,
|
|
55
|
+
ListLatestVersionsRequest_Response,
|
|
56
56
|
ListRegisteredModelsRequest,
|
|
57
57
|
ListRegisteredModelsRequest_Response,
|
|
58
58
|
ListRegistryWebhooksRequest,
|