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

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/model.ts DELETED
@@ -1,1993 +0,0 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
-
3
- import {z} from 'zod';
4
-
5
- /**
6
- * An action that a user (with sufficient permissions) could take on an activity or comment.
7
- *
8
- * For activities, valid values are:
9
- * * `APPROVE_TRANSITION_REQUEST`: Approve a transition request
10
- *
11
- * * `REJECT_TRANSITION_REQUEST`: Reject a transition request
12
- *
13
- * * `CANCEL_TRANSITION_REQUEST`: Cancel (delete) a transition request
14
- *
15
- * For comments, valid values are:
16
- * * `EDIT_COMMENT`: Edit the comment
17
- *
18
- * * `DELETE_COMMENT`: Delete the comment
19
- */
20
- export enum ActivityAction {
21
- /** Approve a transition request. Available to users with sufficient permissions. */
22
- APPROVE_TRANSITION_REQUEST = 'APPROVE_TRANSITION_REQUEST',
23
- /** Reject a transition request. Available to users with sufficient permissions. */
24
- REJECT_TRANSITION_REQUEST = 'REJECT_TRANSITION_REQUEST',
25
- /** Cancel a transition request. Available to the user who created the request. */
26
- CANCEL_TRANSITION_REQUEST = 'CANCEL_TRANSITION_REQUEST',
27
- /** Edit the comment */
28
- EDIT_COMMENT = 'EDIT_COMMENT',
29
- /** Delete the comment */
30
- DELETE_COMMENT = 'DELETE_COMMENT',
31
- }
32
-
33
- /**
34
- * Type of activity. Valid values are:
35
- * * `APPLIED_TRANSITION`: User applied the corresponding stage transition.
36
- *
37
- * * `REQUESTED_TRANSITION`: User requested the corresponding stage transition.
38
- *
39
- * * `CANCELLED_REQUEST`: User cancelled an existing transition request.
40
- *
41
- * * `APPROVED_REQUEST`: User approved the corresponding stage transition.
42
- *
43
- * * `REJECTED_REQUEST`: User rejected the coressponding stage transition.
44
- *
45
- * * `SYSTEM_TRANSITION`: For events performed as a side effect, such as archiving existing model versions in a stage.
46
- */
47
- export enum ActivityType {
48
- /** Indicates that the corresponding stage transition was applied by user. */
49
- APPLIED_TRANSITION = 'APPLIED_TRANSITION',
50
- /** Corresponding stage transition was requested by user. */
51
- REQUESTED_TRANSITION = 'REQUESTED_TRANSITION',
52
- /** User cancelled an existing request. */
53
- CANCELLED_REQUEST = 'CANCELLED_REQUEST',
54
- /** Corresponding transition request was approved by user. */
55
- APPROVED_REQUEST = 'APPROVED_REQUEST',
56
- /** Corresponding transition request was rejected by user. */
57
- REJECTED_REQUEST = 'REJECTED_REQUEST',
58
- /** User posted a new comment */
59
- NEW_COMMENT = 'NEW_COMMENT',
60
- /** Corresponding transition for events such as archiving existing model versions */
61
- SYSTEM_TRANSITION = 'SYSTEM_TRANSITION',
62
- }
63
-
64
- /**
65
- * The status of the model version. Valid values are:
66
- * * `PENDING_REGISTRATION`: Request to register a new model version is pending as server performs background tasks.
67
- *
68
- * * `FAILED_REGISTRATION`: Request to register a new model version has failed.
69
- *
70
- * * `READY`: Model version is ready for use.
71
- */
72
- export enum ModelVersionStatus {
73
- /** Request to register a new model version is pending as server performs background tasks. */
74
- PENDING_REGISTRATION = 'PENDING_REGISTRATION',
75
- /** Request to register a new model version has failed. */
76
- FAILED_REGISTRATION = 'FAILED_REGISTRATION',
77
- /** Model version is ready for use. */
78
- READY = 'READY',
79
- }
80
-
81
- /** Permission level of the requesting user on the object. For what is allowed at each level, see [MLflow Model permissions](..). */
82
- export enum PermissionLevel {
83
- CAN_MANAGE = 'CAN_MANAGE',
84
- /** reserved 1; // IS_OWNER = 1; was DEPRECATED */
85
- CAN_EDIT = 'CAN_EDIT',
86
- CAN_READ = 'CAN_READ',
87
- CAN_MANAGE_STAGING_VERSIONS = 'CAN_MANAGE_STAGING_VERSIONS',
88
- CAN_MANAGE_PRODUCTION_VERSIONS = 'CAN_MANAGE_PRODUCTION_VERSIONS',
89
- /**
90
- * Only applicable to the root ACL path, for which it is the default value if no permissions are
91
- * set explicitly for the user. It is the default set by the MLflow service and The ACL database
92
- * does not understand this value.
93
- */
94
- CAN_CREATE_REGISTERED_MODEL = 'CAN_CREATE_REGISTERED_MODEL',
95
- }
96
-
97
- /**
98
- * .. note::
99
- * Experimental: This entity may change or be removed in a future release without warning.
100
- * Email subscription types for registry notifications:
101
- * - `ALL_EVENTS`: Subscribed to all events.
102
- * - `DEFAULT`: Default subscription type.
103
- * - `SUBSCRIBED`: Subscribed to notifications.
104
- * - `UNSUBSCRIBED`: Not subscribed to notifications.
105
- */
106
- export enum RegistryEmailSubscriptionType {
107
- ALL_EVENTS = 'ALL_EVENTS',
108
- DEFAULT = 'DEFAULT',
109
- SUBSCRIBED = 'SUBSCRIBED',
110
- UNSUBSCRIBED = 'UNSUBSCRIBED',
111
- }
112
-
113
- export enum RegistryWebhookEvent {
114
- MODEL_VERSION_CREATED = 'MODEL_VERSION_CREATED',
115
- MODEL_VERSION_TRANSITIONED_STAGE = 'MODEL_VERSION_TRANSITIONED_STAGE',
116
- TRANSITION_REQUEST_CREATED = 'TRANSITION_REQUEST_CREATED',
117
- COMMENT_CREATED = 'COMMENT_CREATED',
118
- REGISTERED_MODEL_CREATED = 'REGISTERED_MODEL_CREATED',
119
- MODEL_VERSION_TAG_SET = 'MODEL_VERSION_TAG_SET',
120
- MODEL_VERSION_TRANSITIONED_TO_STAGING = 'MODEL_VERSION_TRANSITIONED_TO_STAGING',
121
- MODEL_VERSION_TRANSITIONED_TO_PRODUCTION = 'MODEL_VERSION_TRANSITIONED_TO_PRODUCTION',
122
- MODEL_VERSION_TRANSITIONED_TO_ARCHIVED = 'MODEL_VERSION_TRANSITIONED_TO_ARCHIVED',
123
- TRANSITION_REQUEST_TO_STAGING_CREATED = 'TRANSITION_REQUEST_TO_STAGING_CREATED',
124
- TRANSITION_REQUEST_TO_PRODUCTION_CREATED = 'TRANSITION_REQUEST_TO_PRODUCTION_CREATED',
125
- TRANSITION_REQUEST_TO_ARCHIVED_CREATED = 'TRANSITION_REQUEST_TO_ARCHIVED_CREATED',
126
- }
127
-
128
- /**
129
- * Enable or disable triggering the webhook, or put the webhook into test mode. The default is `ACTIVE`:
130
- * * `ACTIVE`: Webhook is triggered when an associated event happens.
131
- *
132
- * * `DISABLED`: Webhook is not triggered.
133
- *
134
- * * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is not triggered on a real event.
135
- */
136
- export enum RegistryWebhookStatus {
137
- /** Event and test triggers will be sent. */
138
- ACTIVE = 'ACTIVE',
139
- /** No triggers will be sent. */
140
- DISABLED = 'DISABLED',
141
- /** Test triggers will be sent, but not actual events. */
142
- TEST_MODE = 'TEST_MODE',
143
- }
144
-
145
- /**
146
- * For activities, this contains the activity recorded for the action.
147
- * For comments, this contains the comment details.
148
- * For transition requests, this contains the transition request details.
149
- */
150
- export interface Activity {
151
- /** Creation time of the object, as a Unix timestamp in milliseconds. */
152
- creationTimestamp?: bigint | undefined;
153
- /** The username of the user that created the object. */
154
- userId?: string | undefined;
155
- activityType?: ActivityType | undefined;
156
- /** User-provided comment associated with the activity, comment, or transition request. */
157
- comment?: string | undefined;
158
- /** Time of the object at last update, as a Unix timestamp in milliseconds. */
159
- lastUpdatedTimestamp?: bigint | undefined;
160
- /**
161
- * Source stage of the transition (if the activity is stage transition related). Valid values are:
162
- *
163
- * * `None`: The initial stage of a model version.
164
- *
165
- * * `Staging`: Staging or pre-production stage.
166
- *
167
- * * `Production`: Production stage.
168
- *
169
- * * `Archived`: Archived stage.
170
- */
171
- fromStage?: string | undefined;
172
- /**
173
- * Target stage of the transition (if the activity is stage transition related). Valid values are:
174
- *
175
- * * `None`: The initial stage of a model version.
176
- *
177
- * * `Staging`: Staging or pre-production stage.
178
- *
179
- * * `Production`: Production stage.
180
- *
181
- * * `Archived`: Archived stage.
182
- */
183
- toStage?: string | undefined;
184
- /** Comment made by system, for example explaining an activity of type `SYSTEM_TRANSITION`. It usually describes a side effect, such as a version being archived as part of another version's stage transition, and may not be returned for some activity types. */
185
- systemComment?: string | undefined;
186
- /** Array of actions on the activity allowed for the current viewer. */
187
- availableActions?: ActivityAction[] | undefined;
188
- /** Unique identifier for the object. */
189
- id?: string | undefined;
190
- }
191
-
192
- /** Details required to identify and approve a model version stage transition request. */
193
- export interface ApproveTransitionRequest {
194
- /** Name of the model. */
195
- name?: string | undefined;
196
- /** Version of the model. */
197
- version?: string | undefined;
198
- /**
199
- * Target stage of the transition. Valid values are:
200
- *
201
- * * `None`: The initial stage of a model version.
202
- *
203
- * * `Staging`: Staging or pre-production stage.
204
- *
205
- * * `Production`: Production stage.
206
- *
207
- * * `Archived`: Archived stage.
208
- */
209
- stage?: string | undefined;
210
- /** Specifies whether to archive all current model versions in the target stage. */
211
- archiveExistingVersions?: boolean | undefined;
212
- /** User-provided comment on the action. */
213
- comment?: string | undefined;
214
- }
215
-
216
- export interface ApproveTransitionResponse {
217
- /** New activity generated as a result of this operation. */
218
- activity?: Activity | undefined;
219
- }
220
-
221
- /**
222
- * For activities, this contains the activity recorded for the action.
223
- * For comments, this contains the comment details.
224
- * For transition requests, this contains the transition request details.
225
- */
226
- export interface CommentObject {
227
- /** Creation time of the object, as a Unix timestamp in milliseconds. */
228
- creationTimestamp?: bigint | undefined;
229
- /** The username of the user that created the object. */
230
- userId?: string | undefined;
231
- activityType?: ActivityType | undefined;
232
- /** User-provided comment associated with the activity, comment, or transition request. */
233
- comment?: string | undefined;
234
- /** Time of the object at last update, as a Unix timestamp in milliseconds. */
235
- lastUpdatedTimestamp?: bigint | undefined;
236
- /**
237
- * Source stage of the transition (if the activity is stage transition related). Valid values are:
238
- *
239
- * * `None`: The initial stage of a model version.
240
- *
241
- * * `Staging`: Staging or pre-production stage.
242
- *
243
- * * `Production`: Production stage.
244
- *
245
- * * `Archived`: Archived stage.
246
- */
247
- fromStage?: string | undefined;
248
- /**
249
- * Target stage of the transition (if the activity is stage transition related). Valid values are:
250
- *
251
- * * `None`: The initial stage of a model version.
252
- *
253
- * * `Staging`: Staging or pre-production stage.
254
- *
255
- * * `Production`: Production stage.
256
- *
257
- * * `Archived`: Archived stage.
258
- */
259
- toStage?: string | undefined;
260
- /** Comment made by system, for example explaining an activity of type `SYSTEM_TRANSITION`. It usually describes a side effect, such as a version being archived as part of another version's stage transition, and may not be returned for some activity types. */
261
- systemComment?: string | undefined;
262
- /** Array of actions on the activity allowed for the current viewer. */
263
- availableActions?: ActivityAction[] | undefined;
264
- /** Unique identifier for the object. */
265
- id?: string | undefined;
266
- }
267
-
268
- /** Details required to create a comment on a model version. */
269
- export interface CreateCommentRequest {
270
- /** Name of the model. */
271
- name?: string | undefined;
272
- /** Version of the model. */
273
- version?: string | undefined;
274
- /** User-provided comment on the action. */
275
- comment?: string | undefined;
276
- }
277
-
278
- export interface CreateCommentResponse {
279
- /** New comment object */
280
- comment?: CommentObject | undefined;
281
- }
282
-
283
- export interface CreateModelVersionRequest {
284
- /** Register model under this name */
285
- name?: string | undefined;
286
- /** URI indicating the location of the model artifacts. */
287
- source?: string | undefined;
288
- /**
289
- * MLflow run ID for correlation, if `source` was generated by an experiment run in
290
- * MLflow tracking server
291
- */
292
- runId?: string | undefined;
293
- /** Additional metadata for model version. */
294
- tags?: ModelVersionTag[] | undefined;
295
- /**
296
- * MLflow run link - this is the exact link of the run that generated this model version,
297
- * potentially hosted at another instance of MLflow.
298
- */
299
- runLink?: string | undefined;
300
- /** Optional description for model version. */
301
- description?: string | undefined;
302
- }
303
-
304
- export interface CreateModelVersionResponse {
305
- /** Return new version number generated for this model in registry. */
306
- modelVersion?: ModelVersion | undefined;
307
- }
308
-
309
- export interface CreateRegisteredModelRequest {
310
- /** Register models under this name */
311
- name?: string | undefined;
312
- /** Additional metadata for registered model. */
313
- tags?: RegisteredModelTag[] | undefined;
314
- /** Optional description for registered model. */
315
- description?: string | undefined;
316
- }
317
-
318
- export interface CreateRegisteredModelResponse {
319
- registeredModel?: RegisteredModel | undefined;
320
- }
321
-
322
- /** Details required to create a registry webhook. */
323
- export interface CreateRegistryWebhookRequest {
324
- /** If model name is not specified, a registry-wide webhook is created that listens for the specified events across all versions of all registered models. */
325
- modelName?: string | undefined;
326
- /**
327
- * Events that can trigger a registry webhook:
328
- * * `MODEL_VERSION_CREATED`: A new model version was created for the associated model.
329
- *
330
- * * `MODEL_VERSION_TRANSITIONED_STAGE`: A model version’s stage was changed.
331
- *
332
- * * `TRANSITION_REQUEST_CREATED`: A user requested a model version’s stage be transitioned.
333
- *
334
- * * `COMMENT_CREATED`: A user wrote a comment on a registered model.
335
- *
336
- * * `REGISTERED_MODEL_CREATED`: A new registered model was created. This event type can only be specified for a registry-wide webhook, which can be created by not specifying a model name in the create request.
337
- *
338
- * * `MODEL_VERSION_TAG_SET`: A user set a tag on the model version.
339
- *
340
- * * `MODEL_VERSION_TRANSITIONED_TO_STAGING`: A model version was transitioned to staging.
341
- *
342
- * * `MODEL_VERSION_TRANSITIONED_TO_PRODUCTION`: A model version was transitioned to production.
343
- *
344
- * * `MODEL_VERSION_TRANSITIONED_TO_ARCHIVED`: A model version was archived.
345
- *
346
- * * `TRANSITION_REQUEST_TO_STAGING_CREATED`: A user requested a model version be transitioned to staging.
347
- *
348
- * * `TRANSITION_REQUEST_TO_PRODUCTION_CREATED`: A user requested a model version be transitioned to production.
349
- *
350
- * * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model version be archived.
351
- */
352
- events?: RegistryWebhookEvent[] | undefined;
353
- /** User-specified description for the webhook. */
354
- description?: string | undefined;
355
- /**
356
- * Enable or disable triggering the webhook, or put the webhook into test mode. The default is `ACTIVE`:
357
- * * `ACTIVE`: Webhook is triggered when an associated event happens.
358
- *
359
- * * `DISABLED`: Webhook is not triggered.
360
- *
361
- * * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is not triggered on a real event.
362
- */
363
- status?: RegistryWebhookStatus | undefined;
364
- /** External HTTPS URL called on event trigger (by using a POST request). */
365
- httpUrlSpec?: HttpUrlSpec | undefined;
366
- /** ID of the job that the webhook runs. */
367
- jobSpec?: JobSpec | undefined;
368
- }
369
-
370
- export interface CreateRegistryWebhookResponse {
371
- webhook?: RegistryWebhook | undefined;
372
- }
373
-
374
- /** Details required to create a model version stage transition request. */
375
- export interface CreateTransitionRequest {
376
- /** Name of the model. */
377
- name?: string | undefined;
378
- /** Version of the model. */
379
- version?: string | undefined;
380
- /**
381
- * Target stage of the transition. Valid values are:
382
- *
383
- * * `None`: The initial stage of a model version.
384
- *
385
- * * `Staging`: Staging or pre-production stage.
386
- *
387
- * * `Production`: Production stage.
388
- *
389
- * * `Archived`: Archived stage.
390
- */
391
- stage?: string | undefined;
392
- /** User-provided comment on the action. */
393
- comment?: string | undefined;
394
- }
395
-
396
- export interface CreateTransitionResponse {
397
- /** New activity generated for stage transition request. */
398
- request?: TransitionRequest | undefined;
399
- }
400
-
401
- export interface DeleteCommentRequest {
402
- /** Unique identifier of an activity */
403
- id?: string | undefined;
404
- }
405
-
406
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
407
- export interface DeleteCommentResponse {}
408
-
409
- export interface DeleteModelVersionRequest {
410
- /** Name of the registered model */
411
- name?: string | undefined;
412
- /** Model version number */
413
- version?: string | undefined;
414
- }
415
-
416
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
417
- export interface DeleteModelVersionResponse {}
418
-
419
- export interface DeleteModelVersionTagRequest {
420
- /** Name of the registered model that the tag was logged under. */
421
- name?: string | undefined;
422
- /** Model version number that the tag was logged under. */
423
- version?: string | undefined;
424
- /** Name of the tag. The name must be an exact match; wild-card deletion is not supported. Maximum size is 250 bytes. */
425
- key?: string | undefined;
426
- }
427
-
428
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
429
- export interface DeleteModelVersionTagResponse {}
430
-
431
- export interface DeleteRegisteredModelRequest {
432
- /** Registered model unique name identifier. */
433
- name?: string | undefined;
434
- }
435
-
436
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
437
- export interface DeleteRegisteredModelResponse {}
438
-
439
- export interface DeleteRegisteredModelTagRequest {
440
- /** Name of the registered model that the tag was logged under. */
441
- name?: string | undefined;
442
- /** Name of the tag. The name must be an exact match; wild-card deletion is not supported. Maximum size is 250 bytes. */
443
- key?: string | undefined;
444
- }
445
-
446
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
447
- export interface DeleteRegisteredModelTagResponse {}
448
-
449
- /**
450
- * .. note::
451
- * Experimental: This entity may change or be removed in a future release without warning.
452
- */
453
- export interface DeleteRegistryWebhookRequest {
454
- /** Webhook ID required to delete a registry webhook. */
455
- id?: string | undefined;
456
- }
457
-
458
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
459
- export interface DeleteRegistryWebhookResponse {}
460
-
461
- export interface DeleteTransitionRequest {
462
- /** Name of the model. */
463
- name?: string | undefined;
464
- /** Version of the model. */
465
- version?: string | undefined;
466
- /**
467
- * Target stage of the transition request. Valid values are:
468
- *
469
- * * `None`: The initial stage of a model version.
470
- *
471
- * * `Staging`: Staging or pre-production stage.
472
- *
473
- * * `Production`: Production stage.
474
- *
475
- * * `Archived`: Archived stage.
476
- */
477
- stage?: string | undefined;
478
- /** Username of the user who created this request. Of the transition requests matching the specified details, only the one transition created by this user will be deleted. */
479
- creator?: string | undefined;
480
- /** User-provided comment on the action. */
481
- comment?: string | undefined;
482
- }
483
-
484
- export interface DeleteTransitionResponse {
485
- /** New activity generated as a result of this operation. */
486
- activity?: Activity | undefined;
487
- }
488
-
489
- /** Feature list wrap all the features for a model version */
490
- export interface FeatureList {
491
- features?: LinkedFeature[] | undefined;
492
- }
493
-
494
- export interface GetLatestVersionsResponse {
495
- /**
496
- * Latest version models for each requests stage. Only return models with current `READY` status.
497
- * If no `stages` provided, returns the latest version for each stage, including `"None"`.
498
- */
499
- modelVersions?: ModelVersion[] | undefined;
500
- }
501
-
502
- export interface GetModelVersionDownloadUriRequest {
503
- /** Name of the registered model */
504
- name?: string | undefined;
505
- /** Model version number */
506
- version?: string | undefined;
507
- }
508
-
509
- export interface GetModelVersionDownloadUriResponse {
510
- /** URI corresponding to where artifacts for this model version are stored. */
511
- artifactUri?: string | undefined;
512
- }
513
-
514
- export interface GetModelVersionRequest {
515
- /** Name of the registered model */
516
- name?: string | undefined;
517
- /** Model version number */
518
- version?: string | undefined;
519
- }
520
-
521
- export interface GetModelVersionResponse {
522
- modelVersion?: ModelVersion | undefined;
523
- }
524
-
525
- export interface GetRegisteredModelDatabricksRequest {
526
- /** Registered model unique name identifier. */
527
- name?: string | undefined;
528
- }
529
-
530
- export interface GetRegisteredModelDatabricksResponse {
531
- registeredModelDatabricks?: RegisteredModelDatabricks | undefined;
532
- }
533
-
534
- export interface HttpUrlSpec {
535
- /** External HTTPS URL called on event trigger (by using a POST request). */
536
- url?: string | undefined;
537
- /** Enable/disable SSL certificate validation. Default is true. For self-signed certificates, this field must be false AND the destination server must disable certificate validation as well. For security purposes, it is encouraged to perform secret validation with the HMAC-encoded portion of the payload and acknowledge the risk associated with disabling hostname validation whereby it becomes more likely that requests can be maliciously routed to an unintended host. */
538
- enableSslVerification?: boolean | undefined;
539
- /** Shared secret required for HMAC encoding payload. The HMAC-encoded payload will be sent in the header as: { "X-Databricks-Signature": $encoded_payload }. */
540
- secret?: string | undefined;
541
- /** Value of the authorization header that should be sent in the request sent by the wehbook. It should be of the form `"<auth type> <credentials>"`. If set to an empty string, no authorization header will be included in the request. */
542
- authorization?: string | undefined;
543
- }
544
-
545
- export interface JobSpec {
546
- /** ID of the job that the webhook runs. */
547
- jobId?: string | undefined;
548
- /** URL of the workspace containing the job that this webhook runs. If not specified, the job’s workspace URL is assumed to be the same as the workspace where the webhook is created. */
549
- workspaceUrl?: string | undefined;
550
- /** The personal access token used to authorize webhook's job runs. */
551
- accessToken?: string | undefined;
552
- }
553
-
554
- /** Feature for model version. ([ML-57150] Renamed from Feature to LinkedFeature) */
555
- export interface LinkedFeature {
556
- /** Feature table name */
557
- featureTableName?: string | undefined;
558
- /** Feature name */
559
- featureName?: string | undefined;
560
- /** Feature table id */
561
- featureTableId?: string | undefined;
562
- }
563
-
564
- export interface ListLatestVersionsRequest {
565
- /** Registered model unique name identifier. */
566
- name?: string | undefined;
567
- /** List of stages. */
568
- stages?: string[] | undefined;
569
- }
570
-
571
- export interface ListRegisteredModelsRequest {
572
- /** Maximum number of registered models desired. Max threshold is 1000. */
573
- maxResults?: bigint | undefined;
574
- /** Pagination token to go to the next page based on a previous query. */
575
- pageToken?: string | undefined;
576
- }
577
-
578
- export interface ListRegisteredModelsResponse {
579
- registeredModels?: RegisteredModel[] | undefined;
580
- /** Pagination token to request next page of models for the same query. */
581
- nextPageToken?: string | undefined;
582
- }
583
-
584
- export interface ListRegistryWebhooksRequest {
585
- /**
586
- * Registered model name
587
- * If not specified, all webhooks associated with the specified events are listed, regardless of their associated model.
588
- */
589
- modelName?: string | undefined;
590
- /**
591
- * Events that trigger the webhook.
592
- * * `MODEL_VERSION_CREATED`: A new model version was created for the associated model.
593
- *
594
- * * `MODEL_VERSION_TRANSITIONED_STAGE`: A model version’s stage was changed.
595
- *
596
- * * `TRANSITION_REQUEST_CREATED`: A user requested a model version’s stage be transitioned.
597
- *
598
- * * `COMMENT_CREATED`: A user wrote a comment on a registered model.
599
- *
600
- * * `REGISTERED_MODEL_CREATED`: A new registered model was created. This event type can only be specified for a registry-wide webhook, which can be created by not specifying a model name in the create request.
601
- *
602
- * * `MODEL_VERSION_TAG_SET`: A user set a tag on the model version.
603
- *
604
- * * `MODEL_VERSION_TRANSITIONED_TO_STAGING`: A model version was transitioned to staging.
605
- *
606
- * * `MODEL_VERSION_TRANSITIONED_TO_PRODUCTION`: A model version was transitioned to production.
607
- *
608
- * * `MODEL_VERSION_TRANSITIONED_TO_ARCHIVED`: A model version was archived.
609
- *
610
- * * `TRANSITION_REQUEST_TO_STAGING_CREATED`: A user requested a model version be transitioned to staging.
611
- *
612
- * * `TRANSITION_REQUEST_TO_PRODUCTION_CREATED`: A user requested a model version be transitioned to production.
613
- *
614
- * * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model version be archived.
615
- *
616
- * If `events` is specified, any webhook with one or more of the specified trigger events is included in the output.
617
- * If `events` is not specified, webhooks of all event types are included in the output.
618
- */
619
- events?: RegistryWebhookEvent[] | undefined;
620
- /** Token indicating the page of artifact results to fetch */
621
- pageToken?: string | undefined;
622
- maxResults?: bigint | undefined;
623
- }
624
-
625
- export interface ListRegistryWebhooksResponse {
626
- /** Array of registry webhooks. */
627
- webhooks?: RegistryWebhook[] | undefined;
628
- /** Token that can be used to retrieve the next page of artifact results */
629
- nextPageToken?: string | undefined;
630
- }
631
-
632
- export interface ListTransitionRequest {
633
- /** Name of the registered model. */
634
- name?: string | undefined;
635
- /** Version of the model. */
636
- version?: string | undefined;
637
- }
638
-
639
- export interface ListTransitionResponse {
640
- /** Array of open transition requests. */
641
- requests?: Activity[] | undefined;
642
- }
643
-
644
- export interface ModelVersion {
645
- /** Unique name of the model */
646
- name?: string | undefined;
647
- /** Model's version number. */
648
- version?: string | undefined;
649
- /** Timestamp recorded when this `model_version` was created. */
650
- creationTimestamp?: bigint | undefined;
651
- /** Timestamp recorded when metadata for this `model_version` was last updated. */
652
- lastUpdatedTimestamp?: bigint | undefined;
653
- /** User that created this `model_version`. */
654
- userId?: string | undefined;
655
- /** Current stage for this `model_version`. */
656
- currentStage?: string | undefined;
657
- /** Description of this `model_version`. */
658
- description?: string | undefined;
659
- /** URI indicating the location of the source model artifacts, used when creating `model_version` */
660
- source?: string | undefined;
661
- /**
662
- * MLflow run ID used when creating `model_version`, if `source` was generated by an
663
- * experiment run stored in MLflow tracking server.
664
- */
665
- runId?: string | undefined;
666
- /** Current status of `model_version` */
667
- status?: ModelVersionStatus | undefined;
668
- /** Details on current `status`, if it is pending or failed. */
669
- statusMessage?: string | undefined;
670
- /** Tags: Additional metadata key-value pairs for this `model_version`. */
671
- tags?: ModelVersionTag[] | undefined;
672
- /** Run Link: Direct link to the run that generated this version */
673
- runLink?: string | undefined;
674
- }
675
-
676
- export interface ModelVersionDatabricks {
677
- /** Name of the model. */
678
- name?: string | undefined;
679
- /** Version of the model. */
680
- version?: string | undefined;
681
- /** Creation time of the object, as a Unix timestamp in milliseconds. */
682
- creationTimestamp?: bigint | undefined;
683
- /** Time of the object at last update, as a Unix timestamp in milliseconds. */
684
- lastUpdatedTimestamp?: bigint | undefined;
685
- /** The username of the user that created the object. */
686
- userId?: string | undefined;
687
- currentStage?: string | undefined;
688
- /** User-specified description for the object. */
689
- description?: string | undefined;
690
- /** URI that indicates the location of the source model artifacts. This is used when creating the model version. */
691
- source?: string | undefined;
692
- /** Unique identifier for the MLflow tracking run associated with the source model artifacts. */
693
- runId?: string | undefined;
694
- status?: ModelVersionStatus | undefined;
695
- /** Details on the current status, for example why registration failed. */
696
- statusMessage?: string | undefined;
697
- /**
698
- * Open requests for this `model_versions`.
699
- * Gap in sequence number is intentional and is done in order to
700
- * match field sequence numbers of `ModelVersion` proto message
701
- */
702
- openRequests?: Activity[] | undefined;
703
- permissionLevel?: PermissionLevel | undefined;
704
- /** Array of tags that are associated with the model version. */
705
- tags?: ModelVersionTag[] | undefined;
706
- /** URL of the run associated with the model artifacts. This field is set at model version creation time only for model versions whose source run is from a tracking server that is different from the registry server. */
707
- runLink?: string | undefined;
708
- /**
709
- * Email Subscription Status: This is the subscription status of the user to the model version
710
- * Users get subscribed by interacting with the model version.
711
- */
712
- emailSubscriptionStatus?: RegistryEmailSubscriptionType | undefined;
713
- /** Feature lineage of `model_version`. */
714
- featureList?: FeatureList | undefined;
715
- }
716
-
717
- export interface ModelVersionTag {
718
- /** The tag key. */
719
- key?: string | undefined;
720
- /** The tag value. */
721
- value?: string | undefined;
722
- }
723
-
724
- export interface RegisteredModel {
725
- /** Unique name for the model. */
726
- name?: string | undefined;
727
- /** Timestamp recorded when this `registered_model` was created. */
728
- creationTimestamp?: bigint | undefined;
729
- /** Timestamp recorded when metadata for this `registered_model` was last updated. */
730
- lastUpdatedTimestamp?: bigint | undefined;
731
- /** User that created this `registered_model` */
732
- userId?: string | undefined;
733
- /** Description of this `registered_model`. */
734
- description?: string | undefined;
735
- /**
736
- * Collection of latest model versions for each stage.
737
- * Only contains models with current `READY` status.
738
- */
739
- latestVersions?: ModelVersion[] | undefined;
740
- /** Tags: Additional metadata key-value pairs for this `registered_model`. */
741
- tags?: RegisteredModelTag[] | undefined;
742
- }
743
-
744
- export interface RegisteredModelDatabricks {
745
- /** Name of the model. */
746
- name?: string | undefined;
747
- /** Creation time of the object, as a Unix timestamp in milliseconds. */
748
- creationTimestamp?: bigint | undefined;
749
- /** Last update time of the object, as a Unix timestamp in milliseconds. */
750
- lastUpdatedTimestamp?: bigint | undefined;
751
- /** The username of the user that created the object. */
752
- userId?: string | undefined;
753
- /** User-specified description for the object. */
754
- description?: string | undefined;
755
- /** Array of model versions, each the latest version for its stage. */
756
- latestVersions?: ModelVersion[] | undefined;
757
- /** Unique identifier for the object. */
758
- id?: string | undefined;
759
- /** Permission level granted for the requesting user on this registered model */
760
- permissionLevel?: PermissionLevel | undefined;
761
- /** Array of tags associated with the model. */
762
- tags?: RegisteredModelTag[] | undefined;
763
- }
764
-
765
- /** Tag for a registered model */
766
- export interface RegisteredModelTag {
767
- /** The tag key. */
768
- key?: string | undefined;
769
- /** The tag value. */
770
- value?: string | undefined;
771
- }
772
-
773
- export interface RegistryWebhook {
774
- /** Webhook ID */
775
- id?: string | undefined;
776
- /**
777
- * Events that can trigger a registry webhook:
778
- * * `MODEL_VERSION_CREATED`: A new model version was created for the associated model.
779
- *
780
- * * `MODEL_VERSION_TRANSITIONED_STAGE`: A model version’s stage was changed.
781
- *
782
- * * `TRANSITION_REQUEST_CREATED`: A user requested a model version’s stage be transitioned.
783
- *
784
- * * `COMMENT_CREATED`: A user wrote a comment on a registered model.
785
- *
786
- * * `REGISTERED_MODEL_CREATED`: A new registered model was created. This event type can only be specified for a registry-wide webhook, which can be created by not specifying a model name in the create request.
787
- *
788
- * * `MODEL_VERSION_TAG_SET`: A user set a tag on the model version.
789
- *
790
- * * `MODEL_VERSION_TRANSITIONED_TO_STAGING`: A model version was transitioned to staging.
791
- *
792
- * * `MODEL_VERSION_TRANSITIONED_TO_PRODUCTION`: A model version was transitioned to production.
793
- *
794
- * * `MODEL_VERSION_TRANSITIONED_TO_ARCHIVED`: A model version was archived.
795
- *
796
- * * `TRANSITION_REQUEST_TO_STAGING_CREATED`: A user requested a model version be transitioned to staging.
797
- *
798
- * * `TRANSITION_REQUEST_TO_PRODUCTION_CREATED`: A user requested a model version be transitioned to production.
799
- *
800
- * * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model version be archived.
801
- */
802
- events?: RegistryWebhookEvent[] | undefined;
803
- /** Creation time of the object, as a Unix timestamp in milliseconds. */
804
- creationTimestamp?: bigint | undefined;
805
- /** Time of the object at last update, as a Unix timestamp in milliseconds. */
806
- lastUpdatedTimestamp?: bigint | undefined;
807
- /** User-specified description for the webhook. */
808
- description?: string | undefined;
809
- status?: RegistryWebhookStatus | undefined;
810
- httpUrlSpec?: HttpUrlSpec | undefined;
811
- jobSpec?: JobSpec | undefined;
812
- /** Name of the model whose events would trigger this webhook. */
813
- modelName?: string | undefined;
814
- }
815
-
816
- /** Details required to identify and reject a model version stage transition request. */
817
- export interface RejectTransitionRequest {
818
- /** Name of the model. */
819
- name?: string | undefined;
820
- /** Version of the model. */
821
- version?: string | undefined;
822
- /**
823
- * Target stage of the transition. Valid values are:
824
- *
825
- * * `None`: The initial stage of a model version.
826
- *
827
- * * `Staging`: Staging or pre-production stage.
828
- *
829
- * * `Production`: Production stage.
830
- *
831
- * * `Archived`: Archived stage.
832
- */
833
- stage?: string | undefined;
834
- /** User-provided comment on the action. */
835
- comment?: string | undefined;
836
- }
837
-
838
- export interface RejectTransitionResponse {
839
- /** New activity generated as a result of this operation. */
840
- activity?: Activity | undefined;
841
- }
842
-
843
- export interface RenameRegisteredModelRequest {
844
- /** Registered model unique name identifier. */
845
- name?: string | undefined;
846
- /** If provided, updates the name for this `registered_model`. */
847
- newName?: string | undefined;
848
- }
849
-
850
- export interface RenameRegisteredModelResponse {
851
- registeredModel?: RegisteredModel | undefined;
852
- }
853
-
854
- export interface SearchModelVersionsRequest {
855
- /**
856
- * String filter condition, like "name='my-model-name'". Must be a single boolean condition,
857
- * with string values wrapped in single quotes.
858
- */
859
- filter?: string | undefined;
860
- /** Maximum number of models desired. Max threshold is 10K. */
861
- maxResults?: bigint | undefined;
862
- /**
863
- * List of columns to be ordered by including model name, version, stage with an
864
- * optional "DESC" or "ASC" annotation, where "ASC" is the default.
865
- * Tiebreaks are done by latest stage transition timestamp, followed by name ASC, followed by
866
- * version DESC.
867
- */
868
- orderBy?: string[] | undefined;
869
- /** Pagination token to go to next page based on previous search query. */
870
- pageToken?: string | undefined;
871
- }
872
-
873
- export interface SearchModelVersionsResponse {
874
- /** Models that match the search criteria */
875
- modelVersions?: ModelVersion[] | undefined;
876
- /** Pagination token to request next page of models for the same search query. */
877
- nextPageToken?: string | undefined;
878
- }
879
-
880
- export interface SearchRegisteredModelsRequest {
881
- /**
882
- * String filter condition, like "name LIKE 'my-model-name'".
883
- * Interpreted in the backend automatically as "name LIKE '%my-model-name%'".
884
- * Single boolean condition, with string values wrapped in single quotes.
885
- */
886
- filter?: string | undefined;
887
- /** Maximum number of models desired. Default is 100. Max threshold is 1000. */
888
- maxResults?: bigint | undefined;
889
- /**
890
- * List of columns for ordering search results, which can include model name and last updated
891
- * timestamp with an optional "DESC" or "ASC" annotation, where "ASC" is the default.
892
- * Tiebreaks are done by model name ASC.
893
- */
894
- orderBy?: string[] | undefined;
895
- /** Pagination token to go to the next page based on a previous search query. */
896
- pageToken?: string | undefined;
897
- }
898
-
899
- export interface SearchRegisteredModelsResponse {
900
- /** Registered Models that match the search criteria. */
901
- registeredModels?: RegisteredModel[] | undefined;
902
- /** Pagination token to request the next page of models. */
903
- nextPageToken?: string | undefined;
904
- }
905
-
906
- export interface SetModelVersionTagRequest {
907
- /** Unique name of the model. */
908
- name?: string | undefined;
909
- /** Model version number. */
910
- version?: string | undefined;
911
- /**
912
- * Name of the tag. Maximum size depends on storage backend.
913
- * If a tag with this name already exists, its preexisting value will be replaced by the specified `value`.
914
- * All storage backends are guaranteed to support key values up to 250 bytes in size.
915
- */
916
- key?: string | undefined;
917
- /**
918
- * String value of the tag being logged. Maximum size depends on storage backend.
919
- * All storage backends are guaranteed to support key values up to 5000 bytes in size.
920
- */
921
- value?: string | undefined;
922
- }
923
-
924
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
925
- export interface SetModelVersionTagResponse {}
926
-
927
- export interface SetRegisteredModelTagRequest {
928
- /** Unique name of the model. */
929
- name?: string | undefined;
930
- /**
931
- * Name of the tag. Maximum size depends on storage backend.
932
- * If a tag with this name already exists, its preexisting value will be replaced by the specified `value`.
933
- * All storage backends are guaranteed to support key values up to 250 bytes in size.
934
- */
935
- key?: string | undefined;
936
- /**
937
- * String value of the tag being logged. Maximum size depends on storage backend.
938
- * All storage backends are guaranteed to support key values up to 5000 bytes in size.
939
- */
940
- value?: string | undefined;
941
- }
942
-
943
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
944
- export interface SetRegisteredModelTagResponse {}
945
-
946
- /** Details required to test a registry webhook. */
947
- export interface TestRegistryWebhookRequest {
948
- /** Webhook ID */
949
- id?: string | undefined;
950
- /** If `event` is specified, the test trigger uses the specified event. If `event` is not specified, the test trigger uses a randomly chosen event associated with the webhook. */
951
- event?: RegistryWebhookEvent | undefined;
952
- }
953
-
954
- export interface TestRegistryWebhookResponse {
955
- /** Status code returned by the webhook URL */
956
- statusCode?: number | undefined;
957
- /** Body of the response from the webhook URL */
958
- body?: string | undefined;
959
- }
960
-
961
- /** Details required to transition a model version's stage. */
962
- export interface TransitionModelVersionStageDatabricksRequest {
963
- /** Name of the model. */
964
- name?: string | undefined;
965
- /** Version of the model. */
966
- version?: string | undefined;
967
- /**
968
- * Target stage of the transition. Valid values are:
969
- *
970
- * * `None`: The initial stage of a model version.
971
- *
972
- * * `Staging`: Staging or pre-production stage.
973
- *
974
- * * `Production`: Production stage.
975
- *
976
- * * `Archived`: Archived stage.
977
- */
978
- stage?: string | undefined;
979
- /** Specifies whether to archive all current model versions in the target stage. */
980
- archiveExistingVersions?: boolean | undefined;
981
- /** User-provided comment on the action. */
982
- comment?: string | undefined;
983
- }
984
-
985
- export interface TransitionModelVersionStageDatabricksResponse {
986
- /** Updated model version */
987
- modelVersionDatabricks?: ModelVersionDatabricks | undefined;
988
- }
989
-
990
- /**
991
- * For activities, this contains the activity recorded for the action.
992
- * For comments, this contains the comment details.
993
- * For transition requests, this contains the transition request details.
994
- */
995
- export interface TransitionRequest {
996
- /** Creation time of the object, as a Unix timestamp in milliseconds. */
997
- creationTimestamp?: bigint | undefined;
998
- /** The username of the user that created the object. */
999
- userId?: string | undefined;
1000
- activityType?: ActivityType | undefined;
1001
- /** User-provided comment associated with the activity, comment, or transition request. */
1002
- comment?: string | undefined;
1003
- /** Time of the object at last update, as a Unix timestamp in milliseconds. */
1004
- lastUpdatedTimestamp?: bigint | undefined;
1005
- /**
1006
- * Source stage of the transition (if the activity is stage transition related). Valid values are:
1007
- *
1008
- * * `None`: The initial stage of a model version.
1009
- *
1010
- * * `Staging`: Staging or pre-production stage.
1011
- *
1012
- * * `Production`: Production stage.
1013
- *
1014
- * * `Archived`: Archived stage.
1015
- */
1016
- fromStage?: string | undefined;
1017
- /**
1018
- * Target stage of the transition (if the activity is stage transition related). Valid values are:
1019
- *
1020
- * * `None`: The initial stage of a model version.
1021
- *
1022
- * * `Staging`: Staging or pre-production stage.
1023
- *
1024
- * * `Production`: Production stage.
1025
- *
1026
- * * `Archived`: Archived stage.
1027
- */
1028
- toStage?: string | undefined;
1029
- /** Comment made by system, for example explaining an activity of type `SYSTEM_TRANSITION`. It usually describes a side effect, such as a version being archived as part of another version's stage transition, and may not be returned for some activity types. */
1030
- systemComment?: string | undefined;
1031
- /** Array of actions on the activity allowed for the current viewer. */
1032
- availableActions?: ActivityAction[] | undefined;
1033
- /** Unique identifier for the object. */
1034
- id?: string | undefined;
1035
- }
1036
-
1037
- /** Details required to edit a comment on a model version. */
1038
- export interface UpdateCommentRequest {
1039
- /** Unique identifier of an activity */
1040
- id?: string | undefined;
1041
- /** User-provided comment on the action. */
1042
- comment?: string | undefined;
1043
- }
1044
-
1045
- export interface UpdateCommentResponse {
1046
- /** Updated comment object */
1047
- comment?: CommentObject | undefined;
1048
- }
1049
-
1050
- export interface UpdateModelVersionRequest {
1051
- /** Name of the registered model */
1052
- name?: string | undefined;
1053
- /** Model version number */
1054
- version?: string | undefined;
1055
- /** If provided, updates the description for this `registered_model`. */
1056
- description?: string | undefined;
1057
- }
1058
-
1059
- export interface UpdateModelVersionResponse {
1060
- /** Return new version number generated for this model in registry. */
1061
- modelVersion?: ModelVersion | undefined;
1062
- }
1063
-
1064
- export interface UpdateRegisteredModelRequest {
1065
- /** Registered model unique name identifier. */
1066
- name?: string | undefined;
1067
- /** If provided, updates the description for this `registered_model`. */
1068
- description?: string | undefined;
1069
- }
1070
-
1071
- export interface UpdateRegisteredModelResponse {
1072
- registeredModel?: RegisteredModel | undefined;
1073
- }
1074
-
1075
- /** Details required to update a registry webhook. Only the fields that need to be updated should be specified, and both `http_url_spec` and `job_spec` should not be specified in the same request. */
1076
- export interface UpdateRegistryWebhookRequest {
1077
- /** Webhook ID */
1078
- id?: string | undefined;
1079
- /**
1080
- * Events that can trigger a registry webhook:
1081
- * * `MODEL_VERSION_CREATED`: A new model version was created for the associated model.
1082
- *
1083
- * * `MODEL_VERSION_TRANSITIONED_STAGE`: A model version’s stage was changed.
1084
- *
1085
- * * `TRANSITION_REQUEST_CREATED`: A user requested a model version’s stage be transitioned.
1086
- *
1087
- * * `COMMENT_CREATED`: A user wrote a comment on a registered model.
1088
- *
1089
- * * `REGISTERED_MODEL_CREATED`: A new registered model was created. This event type can only be specified for a registry-wide webhook, which can be created by not specifying a model name in the create request.
1090
- *
1091
- * * `MODEL_VERSION_TAG_SET`: A user set a tag on the model version.
1092
- *
1093
- * * `MODEL_VERSION_TRANSITIONED_TO_STAGING`: A model version was transitioned to staging.
1094
- *
1095
- * * `MODEL_VERSION_TRANSITIONED_TO_PRODUCTION`: A model version was transitioned to production.
1096
- *
1097
- * * `MODEL_VERSION_TRANSITIONED_TO_ARCHIVED`: A model version was archived.
1098
- *
1099
- * * `TRANSITION_REQUEST_TO_STAGING_CREATED`: A user requested a model version be transitioned to staging.
1100
- *
1101
- * * `TRANSITION_REQUEST_TO_PRODUCTION_CREATED`: A user requested a model version be transitioned to production.
1102
- *
1103
- * * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model version be archived.
1104
- */
1105
- events?: RegistryWebhookEvent[] | undefined;
1106
- /** User-specified description for the webhook. */
1107
- description?: string | undefined;
1108
- status?: RegistryWebhookStatus | undefined;
1109
- httpUrlSpec?: HttpUrlSpec | undefined;
1110
- jobSpec?: JobSpec | undefined;
1111
- }
1112
-
1113
- export interface UpdateRegistryWebhookResponse {
1114
- webhook?: RegistryWebhook | undefined;
1115
- }
1116
-
1117
- export const unmarshalActivitySchema: z.ZodType<Activity> = z
1118
- .object({
1119
- creation_timestamp: z
1120
- .union([z.number(), z.bigint()])
1121
- .transform(v => BigInt(v))
1122
- .optional(),
1123
- user_id: z.string().optional(),
1124
- activity_type: z.enum(ActivityType).optional(),
1125
- comment: z.string().optional(),
1126
- last_updated_timestamp: z
1127
- .union([z.number(), z.bigint()])
1128
- .transform(v => BigInt(v))
1129
- .optional(),
1130
- from_stage: z.string().optional(),
1131
- to_stage: z.string().optional(),
1132
- system_comment: z.string().optional(),
1133
- available_actions: z.array(z.enum(ActivityAction)).optional(),
1134
- id: z.string().optional(),
1135
- })
1136
- .transform(d => ({
1137
- creationTimestamp: d.creation_timestamp,
1138
- userId: d.user_id,
1139
- activityType: d.activity_type,
1140
- comment: d.comment,
1141
- lastUpdatedTimestamp: d.last_updated_timestamp,
1142
- fromStage: d.from_stage,
1143
- toStage: d.to_stage,
1144
- systemComment: d.system_comment,
1145
- availableActions: d.available_actions,
1146
- id: d.id,
1147
- }));
1148
-
1149
- export const unmarshalApproveTransitionResponseSchema: z.ZodType<ApproveTransitionResponse> =
1150
- z
1151
- .object({
1152
- activity: z.lazy(() => unmarshalActivitySchema).optional(),
1153
- })
1154
- .transform(d => ({
1155
- activity: d.activity,
1156
- }));
1157
-
1158
- export const unmarshalCommentObjectSchema: z.ZodType<CommentObject> = z
1159
- .object({
1160
- creation_timestamp: z
1161
- .union([z.number(), z.bigint()])
1162
- .transform(v => BigInt(v))
1163
- .optional(),
1164
- user_id: z.string().optional(),
1165
- activity_type: z.enum(ActivityType).optional(),
1166
- comment: z.string().optional(),
1167
- last_updated_timestamp: z
1168
- .union([z.number(), z.bigint()])
1169
- .transform(v => BigInt(v))
1170
- .optional(),
1171
- from_stage: z.string().optional(),
1172
- to_stage: z.string().optional(),
1173
- system_comment: z.string().optional(),
1174
- available_actions: z.array(z.enum(ActivityAction)).optional(),
1175
- id: z.string().optional(),
1176
- })
1177
- .transform(d => ({
1178
- creationTimestamp: d.creation_timestamp,
1179
- userId: d.user_id,
1180
- activityType: d.activity_type,
1181
- comment: d.comment,
1182
- lastUpdatedTimestamp: d.last_updated_timestamp,
1183
- fromStage: d.from_stage,
1184
- toStage: d.to_stage,
1185
- systemComment: d.system_comment,
1186
- availableActions: d.available_actions,
1187
- id: d.id,
1188
- }));
1189
-
1190
- export const unmarshalCreateCommentResponseSchema: z.ZodType<CreateCommentResponse> =
1191
- z
1192
- .object({
1193
- comment: z.lazy(() => unmarshalCommentObjectSchema).optional(),
1194
- })
1195
- .transform(d => ({
1196
- comment: d.comment,
1197
- }));
1198
-
1199
- export const unmarshalCreateModelVersionResponseSchema: z.ZodType<CreateModelVersionResponse> =
1200
- z
1201
- .object({
1202
- model_version: z.lazy(() => unmarshalModelVersionSchema).optional(),
1203
- })
1204
- .transform(d => ({
1205
- modelVersion: d.model_version,
1206
- }));
1207
-
1208
- export const unmarshalCreateRegisteredModelResponseSchema: z.ZodType<CreateRegisteredModelResponse> =
1209
- z
1210
- .object({
1211
- registered_model: z.lazy(() => unmarshalRegisteredModelSchema).optional(),
1212
- })
1213
- .transform(d => ({
1214
- registeredModel: d.registered_model,
1215
- }));
1216
-
1217
- export const unmarshalCreateRegistryWebhookResponseSchema: z.ZodType<CreateRegistryWebhookResponse> =
1218
- z
1219
- .object({
1220
- webhook: z.lazy(() => unmarshalRegistryWebhookSchema).optional(),
1221
- })
1222
- .transform(d => ({
1223
- webhook: d.webhook,
1224
- }));
1225
-
1226
- export const unmarshalCreateTransitionResponseSchema: z.ZodType<CreateTransitionResponse> =
1227
- z
1228
- .object({
1229
- request: z.lazy(() => unmarshalTransitionRequestSchema).optional(),
1230
- })
1231
- .transform(d => ({
1232
- request: d.request,
1233
- }));
1234
-
1235
- export const unmarshalDeleteCommentResponseSchema: z.ZodType<DeleteCommentResponse> =
1236
- z.object({});
1237
-
1238
- export const unmarshalDeleteModelVersionResponseSchema: z.ZodType<DeleteModelVersionResponse> =
1239
- z.object({});
1240
-
1241
- export const unmarshalDeleteModelVersionTagResponseSchema: z.ZodType<DeleteModelVersionTagResponse> =
1242
- z.object({});
1243
-
1244
- export const unmarshalDeleteRegisteredModelResponseSchema: z.ZodType<DeleteRegisteredModelResponse> =
1245
- z.object({});
1246
-
1247
- export const unmarshalDeleteRegisteredModelTagResponseSchema: z.ZodType<DeleteRegisteredModelTagResponse> =
1248
- z.object({});
1249
-
1250
- export const unmarshalDeleteRegistryWebhookResponseSchema: z.ZodType<DeleteRegistryWebhookResponse> =
1251
- z.object({});
1252
-
1253
- export const unmarshalDeleteTransitionResponseSchema: z.ZodType<DeleteTransitionResponse> =
1254
- z
1255
- .object({
1256
- activity: z.lazy(() => unmarshalActivitySchema).optional(),
1257
- })
1258
- .transform(d => ({
1259
- activity: d.activity,
1260
- }));
1261
-
1262
- export const unmarshalFeatureListSchema: z.ZodType<FeatureList> = z
1263
- .object({
1264
- features: z.array(z.lazy(() => unmarshalLinkedFeatureSchema)).optional(),
1265
- })
1266
- .transform(d => ({
1267
- features: d.features,
1268
- }));
1269
-
1270
- export const unmarshalGetLatestVersionsResponseSchema: z.ZodType<GetLatestVersionsResponse> =
1271
- z
1272
- .object({
1273
- model_versions: z
1274
- .array(z.lazy(() => unmarshalModelVersionSchema))
1275
- .optional(),
1276
- })
1277
- .transform(d => ({
1278
- modelVersions: d.model_versions,
1279
- }));
1280
-
1281
- export const unmarshalGetModelVersionDownloadUriResponseSchema: z.ZodType<GetModelVersionDownloadUriResponse> =
1282
- z
1283
- .object({
1284
- artifact_uri: z.string().optional(),
1285
- })
1286
- .transform(d => ({
1287
- artifactUri: d.artifact_uri,
1288
- }));
1289
-
1290
- export const unmarshalGetModelVersionResponseSchema: z.ZodType<GetModelVersionResponse> =
1291
- z
1292
- .object({
1293
- model_version: z.lazy(() => unmarshalModelVersionSchema).optional(),
1294
- })
1295
- .transform(d => ({
1296
- modelVersion: d.model_version,
1297
- }));
1298
-
1299
- export const unmarshalGetRegisteredModelDatabricksResponseSchema: z.ZodType<GetRegisteredModelDatabricksResponse> =
1300
- z
1301
- .object({
1302
- registered_model_databricks: z
1303
- .lazy(() => unmarshalRegisteredModelDatabricksSchema)
1304
- .optional(),
1305
- })
1306
- .transform(d => ({
1307
- registeredModelDatabricks: d.registered_model_databricks,
1308
- }));
1309
-
1310
- export const unmarshalHttpUrlSpecSchema: z.ZodType<HttpUrlSpec> = z
1311
- .object({
1312
- url: z.string().optional(),
1313
- enable_ssl_verification: z.boolean().optional(),
1314
- secret: z.string().optional(),
1315
- authorization: z.string().optional(),
1316
- })
1317
- .transform(d => ({
1318
- url: d.url,
1319
- enableSslVerification: d.enable_ssl_verification,
1320
- secret: d.secret,
1321
- authorization: d.authorization,
1322
- }));
1323
-
1324
- export const unmarshalJobSpecSchema: z.ZodType<JobSpec> = z
1325
- .object({
1326
- job_id: z.string().optional(),
1327
- workspace_url: z.string().optional(),
1328
- access_token: z.string().optional(),
1329
- })
1330
- .transform(d => ({
1331
- jobId: d.job_id,
1332
- workspaceUrl: d.workspace_url,
1333
- accessToken: d.access_token,
1334
- }));
1335
-
1336
- export const unmarshalLinkedFeatureSchema: z.ZodType<LinkedFeature> = z
1337
- .object({
1338
- feature_table_name: z.string().optional(),
1339
- feature_name: z.string().optional(),
1340
- feature_table_id: z.string().optional(),
1341
- })
1342
- .transform(d => ({
1343
- featureTableName: d.feature_table_name,
1344
- featureName: d.feature_name,
1345
- featureTableId: d.feature_table_id,
1346
- }));
1347
-
1348
- export const unmarshalListRegisteredModelsResponseSchema: z.ZodType<ListRegisteredModelsResponse> =
1349
- z
1350
- .object({
1351
- registered_models: z
1352
- .array(z.lazy(() => unmarshalRegisteredModelSchema))
1353
- .optional(),
1354
- next_page_token: z.string().optional(),
1355
- })
1356
- .transform(d => ({
1357
- registeredModels: d.registered_models,
1358
- nextPageToken: d.next_page_token,
1359
- }));
1360
-
1361
- export const unmarshalListRegistryWebhooksResponseSchema: z.ZodType<ListRegistryWebhooksResponse> =
1362
- z
1363
- .object({
1364
- webhooks: z
1365
- .array(z.lazy(() => unmarshalRegistryWebhookSchema))
1366
- .optional(),
1367
- next_page_token: z.string().optional(),
1368
- })
1369
- .transform(d => ({
1370
- webhooks: d.webhooks,
1371
- nextPageToken: d.next_page_token,
1372
- }));
1373
-
1374
- export const unmarshalListTransitionResponseSchema: z.ZodType<ListTransitionResponse> =
1375
- z
1376
- .object({
1377
- requests: z.array(z.lazy(() => unmarshalActivitySchema)).optional(),
1378
- })
1379
- .transform(d => ({
1380
- requests: d.requests,
1381
- }));
1382
-
1383
- export const unmarshalModelVersionSchema: z.ZodType<ModelVersion> = z
1384
- .object({
1385
- name: z.string().optional(),
1386
- version: z.string().optional(),
1387
- creation_timestamp: z
1388
- .union([z.number(), z.bigint()])
1389
- .transform(v => BigInt(v))
1390
- .optional(),
1391
- last_updated_timestamp: z
1392
- .union([z.number(), z.bigint()])
1393
- .transform(v => BigInt(v))
1394
- .optional(),
1395
- user_id: z.string().optional(),
1396
- current_stage: z.string().optional(),
1397
- description: z.string().optional(),
1398
- source: z.string().optional(),
1399
- run_id: z.string().optional(),
1400
- status: z.enum(ModelVersionStatus).optional(),
1401
- status_message: z.string().optional(),
1402
- tags: z.array(z.lazy(() => unmarshalModelVersionTagSchema)).optional(),
1403
- run_link: z.string().optional(),
1404
- })
1405
- .transform(d => ({
1406
- name: d.name,
1407
- version: d.version,
1408
- creationTimestamp: d.creation_timestamp,
1409
- lastUpdatedTimestamp: d.last_updated_timestamp,
1410
- userId: d.user_id,
1411
- currentStage: d.current_stage,
1412
- description: d.description,
1413
- source: d.source,
1414
- runId: d.run_id,
1415
- status: d.status,
1416
- statusMessage: d.status_message,
1417
- tags: d.tags,
1418
- runLink: d.run_link,
1419
- }));
1420
-
1421
- export const unmarshalModelVersionDatabricksSchema: z.ZodType<ModelVersionDatabricks> =
1422
- z
1423
- .object({
1424
- name: z.string().optional(),
1425
- version: z.string().optional(),
1426
- creation_timestamp: z
1427
- .union([z.number(), z.bigint()])
1428
- .transform(v => BigInt(v))
1429
- .optional(),
1430
- last_updated_timestamp: z
1431
- .union([z.number(), z.bigint()])
1432
- .transform(v => BigInt(v))
1433
- .optional(),
1434
- user_id: z.string().optional(),
1435
- current_stage: z.string().optional(),
1436
- description: z.string().optional(),
1437
- source: z.string().optional(),
1438
- run_id: z.string().optional(),
1439
- status: z.enum(ModelVersionStatus).optional(),
1440
- status_message: z.string().optional(),
1441
- open_requests: z.array(z.lazy(() => unmarshalActivitySchema)).optional(),
1442
- permission_level: z.enum(PermissionLevel).optional(),
1443
- tags: z.array(z.lazy(() => unmarshalModelVersionTagSchema)).optional(),
1444
- run_link: z.string().optional(),
1445
- email_subscription_status: z
1446
- .enum(RegistryEmailSubscriptionType)
1447
- .optional(),
1448
- feature_list: z.lazy(() => unmarshalFeatureListSchema).optional(),
1449
- })
1450
- .transform(d => ({
1451
- name: d.name,
1452
- version: d.version,
1453
- creationTimestamp: d.creation_timestamp,
1454
- lastUpdatedTimestamp: d.last_updated_timestamp,
1455
- userId: d.user_id,
1456
- currentStage: d.current_stage,
1457
- description: d.description,
1458
- source: d.source,
1459
- runId: d.run_id,
1460
- status: d.status,
1461
- statusMessage: d.status_message,
1462
- openRequests: d.open_requests,
1463
- permissionLevel: d.permission_level,
1464
- tags: d.tags,
1465
- runLink: d.run_link,
1466
- emailSubscriptionStatus: d.email_subscription_status,
1467
- featureList: d.feature_list,
1468
- }));
1469
-
1470
- export const unmarshalModelVersionTagSchema: z.ZodType<ModelVersionTag> = z
1471
- .object({
1472
- key: z.string().optional(),
1473
- value: z.string().optional(),
1474
- })
1475
- .transform(d => ({
1476
- key: d.key,
1477
- value: d.value,
1478
- }));
1479
-
1480
- export const unmarshalRegisteredModelSchema: z.ZodType<RegisteredModel> = z
1481
- .object({
1482
- name: z.string().optional(),
1483
- creation_timestamp: z
1484
- .union([z.number(), z.bigint()])
1485
- .transform(v => BigInt(v))
1486
- .optional(),
1487
- last_updated_timestamp: z
1488
- .union([z.number(), z.bigint()])
1489
- .transform(v => BigInt(v))
1490
- .optional(),
1491
- user_id: z.string().optional(),
1492
- description: z.string().optional(),
1493
- latest_versions: z
1494
- .array(z.lazy(() => unmarshalModelVersionSchema))
1495
- .optional(),
1496
- tags: z.array(z.lazy(() => unmarshalRegisteredModelTagSchema)).optional(),
1497
- })
1498
- .transform(d => ({
1499
- name: d.name,
1500
- creationTimestamp: d.creation_timestamp,
1501
- lastUpdatedTimestamp: d.last_updated_timestamp,
1502
- userId: d.user_id,
1503
- description: d.description,
1504
- latestVersions: d.latest_versions,
1505
- tags: d.tags,
1506
- }));
1507
-
1508
- export const unmarshalRegisteredModelDatabricksSchema: z.ZodType<RegisteredModelDatabricks> =
1509
- z
1510
- .object({
1511
- name: z.string().optional(),
1512
- creation_timestamp: z
1513
- .union([z.number(), z.bigint()])
1514
- .transform(v => BigInt(v))
1515
- .optional(),
1516
- last_updated_timestamp: z
1517
- .union([z.number(), z.bigint()])
1518
- .transform(v => BigInt(v))
1519
- .optional(),
1520
- user_id: z.string().optional(),
1521
- description: z.string().optional(),
1522
- latest_versions: z
1523
- .array(z.lazy(() => unmarshalModelVersionSchema))
1524
- .optional(),
1525
- id: z.string().optional(),
1526
- permission_level: z.enum(PermissionLevel).optional(),
1527
- tags: z.array(z.lazy(() => unmarshalRegisteredModelTagSchema)).optional(),
1528
- })
1529
- .transform(d => ({
1530
- name: d.name,
1531
- creationTimestamp: d.creation_timestamp,
1532
- lastUpdatedTimestamp: d.last_updated_timestamp,
1533
- userId: d.user_id,
1534
- description: d.description,
1535
- latestVersions: d.latest_versions,
1536
- id: d.id,
1537
- permissionLevel: d.permission_level,
1538
- tags: d.tags,
1539
- }));
1540
-
1541
- export const unmarshalRegisteredModelTagSchema: z.ZodType<RegisteredModelTag> =
1542
- z
1543
- .object({
1544
- key: z.string().optional(),
1545
- value: z.string().optional(),
1546
- })
1547
- .transform(d => ({
1548
- key: d.key,
1549
- value: d.value,
1550
- }));
1551
-
1552
- export const unmarshalRegistryWebhookSchema: z.ZodType<RegistryWebhook> = z
1553
- .object({
1554
- id: z.string().optional(),
1555
- events: z.array(z.enum(RegistryWebhookEvent)).optional(),
1556
- creation_timestamp: z
1557
- .union([z.number(), z.bigint()])
1558
- .transform(v => BigInt(v))
1559
- .optional(),
1560
- last_updated_timestamp: z
1561
- .union([z.number(), z.bigint()])
1562
- .transform(v => BigInt(v))
1563
- .optional(),
1564
- description: z.string().optional(),
1565
- status: z.enum(RegistryWebhookStatus).optional(),
1566
- http_url_spec: z.lazy(() => unmarshalHttpUrlSpecSchema).optional(),
1567
- job_spec: z.lazy(() => unmarshalJobSpecSchema).optional(),
1568
- model_name: z.string().optional(),
1569
- })
1570
- .transform(d => ({
1571
- id: d.id,
1572
- events: d.events,
1573
- creationTimestamp: d.creation_timestamp,
1574
- lastUpdatedTimestamp: d.last_updated_timestamp,
1575
- description: d.description,
1576
- status: d.status,
1577
- httpUrlSpec: d.http_url_spec,
1578
- jobSpec: d.job_spec,
1579
- modelName: d.model_name,
1580
- }));
1581
-
1582
- export const unmarshalRejectTransitionResponseSchema: z.ZodType<RejectTransitionResponse> =
1583
- z
1584
- .object({
1585
- activity: z.lazy(() => unmarshalActivitySchema).optional(),
1586
- })
1587
- .transform(d => ({
1588
- activity: d.activity,
1589
- }));
1590
-
1591
- export const unmarshalRenameRegisteredModelResponseSchema: z.ZodType<RenameRegisteredModelResponse> =
1592
- z
1593
- .object({
1594
- registered_model: z.lazy(() => unmarshalRegisteredModelSchema).optional(),
1595
- })
1596
- .transform(d => ({
1597
- registeredModel: d.registered_model,
1598
- }));
1599
-
1600
- export const unmarshalSearchModelVersionsResponseSchema: z.ZodType<SearchModelVersionsResponse> =
1601
- z
1602
- .object({
1603
- model_versions: z
1604
- .array(z.lazy(() => unmarshalModelVersionSchema))
1605
- .optional(),
1606
- next_page_token: z.string().optional(),
1607
- })
1608
- .transform(d => ({
1609
- modelVersions: d.model_versions,
1610
- nextPageToken: d.next_page_token,
1611
- }));
1612
-
1613
- export const unmarshalSearchRegisteredModelsResponseSchema: z.ZodType<SearchRegisteredModelsResponse> =
1614
- z
1615
- .object({
1616
- registered_models: z
1617
- .array(z.lazy(() => unmarshalRegisteredModelSchema))
1618
- .optional(),
1619
- next_page_token: z.string().optional(),
1620
- })
1621
- .transform(d => ({
1622
- registeredModels: d.registered_models,
1623
- nextPageToken: d.next_page_token,
1624
- }));
1625
-
1626
- export const unmarshalSetModelVersionTagResponseSchema: z.ZodType<SetModelVersionTagResponse> =
1627
- z.object({});
1628
-
1629
- export const unmarshalSetRegisteredModelTagResponseSchema: z.ZodType<SetRegisteredModelTagResponse> =
1630
- z.object({});
1631
-
1632
- export const unmarshalTestRegistryWebhookResponseSchema: z.ZodType<TestRegistryWebhookResponse> =
1633
- z
1634
- .object({
1635
- status_code: z.number().optional(),
1636
- body: z.string().optional(),
1637
- })
1638
- .transform(d => ({
1639
- statusCode: d.status_code,
1640
- body: d.body,
1641
- }));
1642
-
1643
- export const unmarshalTransitionModelVersionStageDatabricksResponseSchema: z.ZodType<TransitionModelVersionStageDatabricksResponse> =
1644
- z
1645
- .object({
1646
- model_version_databricks: z
1647
- .lazy(() => unmarshalModelVersionDatabricksSchema)
1648
- .optional(),
1649
- })
1650
- .transform(d => ({
1651
- modelVersionDatabricks: d.model_version_databricks,
1652
- }));
1653
-
1654
- export const unmarshalTransitionRequestSchema: z.ZodType<TransitionRequest> = z
1655
- .object({
1656
- creation_timestamp: z
1657
- .union([z.number(), z.bigint()])
1658
- .transform(v => BigInt(v))
1659
- .optional(),
1660
- user_id: z.string().optional(),
1661
- activity_type: z.enum(ActivityType).optional(),
1662
- comment: z.string().optional(),
1663
- last_updated_timestamp: z
1664
- .union([z.number(), z.bigint()])
1665
- .transform(v => BigInt(v))
1666
- .optional(),
1667
- from_stage: z.string().optional(),
1668
- to_stage: z.string().optional(),
1669
- system_comment: z.string().optional(),
1670
- available_actions: z.array(z.enum(ActivityAction)).optional(),
1671
- id: z.string().optional(),
1672
- })
1673
- .transform(d => ({
1674
- creationTimestamp: d.creation_timestamp,
1675
- userId: d.user_id,
1676
- activityType: d.activity_type,
1677
- comment: d.comment,
1678
- lastUpdatedTimestamp: d.last_updated_timestamp,
1679
- fromStage: d.from_stage,
1680
- toStage: d.to_stage,
1681
- systemComment: d.system_comment,
1682
- availableActions: d.available_actions,
1683
- id: d.id,
1684
- }));
1685
-
1686
- export const unmarshalUpdateCommentResponseSchema: z.ZodType<UpdateCommentResponse> =
1687
- z
1688
- .object({
1689
- comment: z.lazy(() => unmarshalCommentObjectSchema).optional(),
1690
- })
1691
- .transform(d => ({
1692
- comment: d.comment,
1693
- }));
1694
-
1695
- export const unmarshalUpdateModelVersionResponseSchema: z.ZodType<UpdateModelVersionResponse> =
1696
- z
1697
- .object({
1698
- model_version: z.lazy(() => unmarshalModelVersionSchema).optional(),
1699
- })
1700
- .transform(d => ({
1701
- modelVersion: d.model_version,
1702
- }));
1703
-
1704
- export const unmarshalUpdateRegisteredModelResponseSchema: z.ZodType<UpdateRegisteredModelResponse> =
1705
- z
1706
- .object({
1707
- registered_model: z.lazy(() => unmarshalRegisteredModelSchema).optional(),
1708
- })
1709
- .transform(d => ({
1710
- registeredModel: d.registered_model,
1711
- }));
1712
-
1713
- export const unmarshalUpdateRegistryWebhookResponseSchema: z.ZodType<UpdateRegistryWebhookResponse> =
1714
- z
1715
- .object({
1716
- webhook: z.lazy(() => unmarshalRegistryWebhookSchema).optional(),
1717
- })
1718
- .transform(d => ({
1719
- webhook: d.webhook,
1720
- }));
1721
-
1722
- export const marshalApproveTransitionRequestSchema: z.ZodType = z
1723
- .object({
1724
- name: z.string().optional(),
1725
- version: z.string().optional(),
1726
- stage: z.string().optional(),
1727
- archiveExistingVersions: z.boolean().optional(),
1728
- comment: z.string().optional(),
1729
- })
1730
- .transform(d => ({
1731
- name: d.name,
1732
- version: d.version,
1733
- stage: d.stage,
1734
- archive_existing_versions: d.archiveExistingVersions,
1735
- comment: d.comment,
1736
- }));
1737
-
1738
- export const marshalCreateCommentRequestSchema: z.ZodType = z
1739
- .object({
1740
- name: z.string().optional(),
1741
- version: z.string().optional(),
1742
- comment: z.string().optional(),
1743
- })
1744
- .transform(d => ({
1745
- name: d.name,
1746
- version: d.version,
1747
- comment: d.comment,
1748
- }));
1749
-
1750
- export const marshalCreateModelVersionRequestSchema: z.ZodType = z
1751
- .object({
1752
- name: z.string().optional(),
1753
- source: z.string().optional(),
1754
- runId: z.string().optional(),
1755
- tags: z.array(z.lazy(() => marshalModelVersionTagSchema)).optional(),
1756
- runLink: z.string().optional(),
1757
- description: z.string().optional(),
1758
- })
1759
- .transform(d => ({
1760
- name: d.name,
1761
- source: d.source,
1762
- run_id: d.runId,
1763
- tags: d.tags,
1764
- run_link: d.runLink,
1765
- description: d.description,
1766
- }));
1767
-
1768
- export const marshalCreateRegisteredModelRequestSchema: z.ZodType = z
1769
- .object({
1770
- name: z.string().optional(),
1771
- tags: z.array(z.lazy(() => marshalRegisteredModelTagSchema)).optional(),
1772
- description: z.string().optional(),
1773
- })
1774
- .transform(d => ({
1775
- name: d.name,
1776
- tags: d.tags,
1777
- description: d.description,
1778
- }));
1779
-
1780
- export const marshalCreateRegistryWebhookRequestSchema: z.ZodType = z
1781
- .object({
1782
- modelName: z.string().optional(),
1783
- events: z.array(z.enum(RegistryWebhookEvent)).optional(),
1784
- description: z.string().optional(),
1785
- status: z.enum(RegistryWebhookStatus).optional(),
1786
- httpUrlSpec: z.lazy(() => marshalHttpUrlSpecSchema).optional(),
1787
- jobSpec: z.lazy(() => marshalJobSpecSchema).optional(),
1788
- })
1789
- .transform(d => ({
1790
- model_name: d.modelName,
1791
- events: d.events,
1792
- description: d.description,
1793
- status: d.status,
1794
- http_url_spec: d.httpUrlSpec,
1795
- job_spec: d.jobSpec,
1796
- }));
1797
-
1798
- export const marshalCreateTransitionRequestSchema: z.ZodType = z
1799
- .object({
1800
- name: z.string().optional(),
1801
- version: z.string().optional(),
1802
- stage: z.string().optional(),
1803
- comment: z.string().optional(),
1804
- })
1805
- .transform(d => ({
1806
- name: d.name,
1807
- version: d.version,
1808
- stage: d.stage,
1809
- comment: d.comment,
1810
- }));
1811
-
1812
- export const marshalHttpUrlSpecSchema: z.ZodType = z
1813
- .object({
1814
- url: z.string().optional(),
1815
- enableSslVerification: z.boolean().optional(),
1816
- secret: z.string().optional(),
1817
- authorization: z.string().optional(),
1818
- })
1819
- .transform(d => ({
1820
- url: d.url,
1821
- enable_ssl_verification: d.enableSslVerification,
1822
- secret: d.secret,
1823
- authorization: d.authorization,
1824
- }));
1825
-
1826
- export const marshalJobSpecSchema: z.ZodType = z
1827
- .object({
1828
- jobId: z.string().optional(),
1829
- workspaceUrl: z.string().optional(),
1830
- accessToken: z.string().optional(),
1831
- })
1832
- .transform(d => ({
1833
- job_id: d.jobId,
1834
- workspace_url: d.workspaceUrl,
1835
- access_token: d.accessToken,
1836
- }));
1837
-
1838
- export const marshalListLatestVersionsRequestSchema: z.ZodType = z
1839
- .object({
1840
- name: z.string().optional(),
1841
- stages: z.array(z.string()).optional(),
1842
- })
1843
- .transform(d => ({
1844
- name: d.name,
1845
- stages: d.stages,
1846
- }));
1847
-
1848
- export const marshalModelVersionTagSchema: z.ZodType = z
1849
- .object({
1850
- key: z.string().optional(),
1851
- value: z.string().optional(),
1852
- })
1853
- .transform(d => ({
1854
- key: d.key,
1855
- value: d.value,
1856
- }));
1857
-
1858
- export const marshalRegisteredModelTagSchema: z.ZodType = z
1859
- .object({
1860
- key: z.string().optional(),
1861
- value: z.string().optional(),
1862
- })
1863
- .transform(d => ({
1864
- key: d.key,
1865
- value: d.value,
1866
- }));
1867
-
1868
- export const marshalRejectTransitionRequestSchema: z.ZodType = z
1869
- .object({
1870
- name: z.string().optional(),
1871
- version: z.string().optional(),
1872
- stage: z.string().optional(),
1873
- comment: z.string().optional(),
1874
- })
1875
- .transform(d => ({
1876
- name: d.name,
1877
- version: d.version,
1878
- stage: d.stage,
1879
- comment: d.comment,
1880
- }));
1881
-
1882
- export const marshalRenameRegisteredModelRequestSchema: z.ZodType = z
1883
- .object({
1884
- name: z.string().optional(),
1885
- newName: z.string().optional(),
1886
- })
1887
- .transform(d => ({
1888
- name: d.name,
1889
- new_name: d.newName,
1890
- }));
1891
-
1892
- export const marshalSetModelVersionTagRequestSchema: z.ZodType = z
1893
- .object({
1894
- name: z.string().optional(),
1895
- version: z.string().optional(),
1896
- key: z.string().optional(),
1897
- value: z.string().optional(),
1898
- })
1899
- .transform(d => ({
1900
- name: d.name,
1901
- version: d.version,
1902
- key: d.key,
1903
- value: d.value,
1904
- }));
1905
-
1906
- export const marshalSetRegisteredModelTagRequestSchema: z.ZodType = z
1907
- .object({
1908
- name: z.string().optional(),
1909
- key: z.string().optional(),
1910
- value: z.string().optional(),
1911
- })
1912
- .transform(d => ({
1913
- name: d.name,
1914
- key: d.key,
1915
- value: d.value,
1916
- }));
1917
-
1918
- export const marshalTestRegistryWebhookRequestSchema: z.ZodType = z
1919
- .object({
1920
- id: z.string().optional(),
1921
- event: z.enum(RegistryWebhookEvent).optional(),
1922
- })
1923
- .transform(d => ({
1924
- id: d.id,
1925
- event: d.event,
1926
- }));
1927
-
1928
- export const marshalTransitionModelVersionStageDatabricksRequestSchema: z.ZodType =
1929
- z
1930
- .object({
1931
- name: z.string().optional(),
1932
- version: z.string().optional(),
1933
- stage: z.string().optional(),
1934
- archiveExistingVersions: z.boolean().optional(),
1935
- comment: z.string().optional(),
1936
- })
1937
- .transform(d => ({
1938
- name: d.name,
1939
- version: d.version,
1940
- stage: d.stage,
1941
- archive_existing_versions: d.archiveExistingVersions,
1942
- comment: d.comment,
1943
- }));
1944
-
1945
- export const marshalUpdateCommentRequestSchema: z.ZodType = z
1946
- .object({
1947
- id: z.string().optional(),
1948
- comment: z.string().optional(),
1949
- })
1950
- .transform(d => ({
1951
- id: d.id,
1952
- comment: d.comment,
1953
- }));
1954
-
1955
- export const marshalUpdateModelVersionRequestSchema: z.ZodType = z
1956
- .object({
1957
- name: z.string().optional(),
1958
- version: z.string().optional(),
1959
- description: z.string().optional(),
1960
- })
1961
- .transform(d => ({
1962
- name: d.name,
1963
- version: d.version,
1964
- description: d.description,
1965
- }));
1966
-
1967
- export const marshalUpdateRegisteredModelRequestSchema: z.ZodType = z
1968
- .object({
1969
- name: z.string().optional(),
1970
- description: z.string().optional(),
1971
- })
1972
- .transform(d => ({
1973
- name: d.name,
1974
- description: d.description,
1975
- }));
1976
-
1977
- export const marshalUpdateRegistryWebhookRequestSchema: z.ZodType = z
1978
- .object({
1979
- id: z.string().optional(),
1980
- events: z.array(z.enum(RegistryWebhookEvent)).optional(),
1981
- description: z.string().optional(),
1982
- status: z.enum(RegistryWebhookStatus).optional(),
1983
- httpUrlSpec: z.lazy(() => marshalHttpUrlSpecSchema).optional(),
1984
- jobSpec: z.lazy(() => marshalJobSpecSchema).optional(),
1985
- })
1986
- .transform(d => ({
1987
- id: d.id,
1988
- events: d.events,
1989
- description: d.description,
1990
- status: d.status,
1991
- http_url_spec: d.httpUrlSpec,
1992
- job_spec: d.jobSpec,
1993
- }));