@databricks/sdk-marketplaces 0.0.0-dev → 0.1.0-dev.1

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.
@@ -0,0 +1,2560 @@
1
+ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
+
3
+ import {z} from 'zod';
4
+
5
+ export enum AssetType {
6
+ ASSET_TYPE_UNSPECIFIED = 'ASSET_TYPE_UNSPECIFIED',
7
+ ASSET_TYPE_GIT_REPO = 'ASSET_TYPE_GIT_REPO',
8
+ ASSET_TYPE_DATA_TABLE = 'ASSET_TYPE_DATA_TABLE',
9
+ ASSET_TYPE_MODEL = 'ASSET_TYPE_MODEL',
10
+ ASSET_TYPE_NOTEBOOK = 'ASSET_TYPE_NOTEBOOK',
11
+ /**
12
+ * (MP-2408): media-based assets generally involve volumes; however some volumes files (e.g. CSV) still correspond to datasets
13
+ * as such, add a new asset type to specify media
14
+ */
15
+ ASSET_TYPE_MEDIA = 'ASSET_TYPE_MEDIA',
16
+ ASSET_TYPE_PARTNER_INTEGRATION = 'ASSET_TYPE_PARTNER_INTEGRATION',
17
+ ASSET_TYPE_APP = 'ASSET_TYPE_APP',
18
+ ASSET_TYPE_MCP = 'ASSET_TYPE_MCP',
19
+ }
20
+
21
+ export enum Category {
22
+ ADVERTISING_AND_MARKETING = 'ADVERTISING_AND_MARKETING',
23
+ CLIMATE_AND_ENVIRONMENT = 'CLIMATE_AND_ENVIRONMENT',
24
+ COMMERCE = 'COMMERCE',
25
+ DEMOGRAPHICS = 'DEMOGRAPHICS',
26
+ ECONOMICS = 'ECONOMICS',
27
+ EDUCATION = 'EDUCATION',
28
+ ENERGY = 'ENERGY',
29
+ FINANCIAL = 'FINANCIAL',
30
+ GAMING = 'GAMING',
31
+ GEOSPATIAL = 'GEOSPATIAL',
32
+ HEALTH = 'HEALTH',
33
+ LOOKUP_TABLES = 'LOOKUP_TABLES',
34
+ MANUFACTURING = 'MANUFACTURING',
35
+ MEDIA = 'MEDIA',
36
+ OTHER = 'OTHER',
37
+ PUBLIC_SECTOR = 'PUBLIC_SECTOR',
38
+ RETAIL = 'RETAIL',
39
+ SECURITY = 'SECURITY',
40
+ SCIENCE_AND_RESEARCH = 'SCIENCE_AND_RESEARCH',
41
+ SPORTS = 'SPORTS',
42
+ TRANSPORTATION_AND_LOGISTICS = 'TRANSPORTATION_AND_LOGISTICS',
43
+ TRAVEL_AND_TOURISM = 'TRAVEL_AND_TOURISM',
44
+ }
45
+
46
+ export enum Cost {
47
+ FREE = 'FREE',
48
+ PAID = 'PAID',
49
+ }
50
+
51
+ export enum DataRefresh {
52
+ NONE = 'NONE',
53
+ SECOND = 'SECOND',
54
+ MINUTE = 'MINUTE',
55
+ HOURLY = 'HOURLY',
56
+ DAILY = 'DAILY',
57
+ WEEKLY = 'WEEKLY',
58
+ MONTHLY = 'MONTHLY',
59
+ QUARTERLY = 'QUARTERLY',
60
+ YEARLY = 'YEARLY',
61
+ }
62
+
63
+ export enum DeltaSharingRecipientType {
64
+ DELTA_SHARING_RECIPIENT_TYPE_DATABRICKS = 'DELTA_SHARING_RECIPIENT_TYPE_DATABRICKS',
65
+ DELTA_SHARING_RECIPIENT_TYPE_OPEN = 'DELTA_SHARING_RECIPIENT_TYPE_OPEN',
66
+ }
67
+
68
+ export enum ExchangeFilterType {
69
+ GLOBAL_METASTORE_ID = 'GLOBAL_METASTORE_ID',
70
+ }
71
+
72
+ export enum FileParentType {
73
+ PROVIDER = 'PROVIDER',
74
+ LISTING = 'LISTING',
75
+ LISTING_RESOURCE = 'LISTING_RESOURCE',
76
+ }
77
+
78
+ export enum FileStatus {
79
+ /** Published files have been sanitized by Marketplace backend and can be viewed by consumers. */
80
+ FILE_STATUS_PUBLISHED = 'FILE_STATUS_PUBLISHED',
81
+ /** Created files start in staging. These are viewable by provider APIs but not consumer APIs. */
82
+ FILE_STATUS_STAGING = 'FILE_STATUS_STAGING',
83
+ /** Indicates this file is in the process of being sanitized. */
84
+ FILE_STATUS_SANITIZING = 'FILE_STATUS_SANITIZING',
85
+ /** Something went wrong with sanitization, refer to the status message for more information. */
86
+ FILE_STATUS_SANITIZATION_FAILED = 'FILE_STATUS_SANITIZATION_FAILED',
87
+ }
88
+
89
+ export enum FulfillmentType {
90
+ REQUEST_ACCESS = 'REQUEST_ACCESS',
91
+ INSTALL = 'INSTALL',
92
+ }
93
+
94
+ export enum InstallationStatus {
95
+ INSTALLED = 'INSTALLED',
96
+ FAILED = 'FAILED',
97
+ }
98
+
99
+ export enum ListingShareType {
100
+ SAMPLE = 'SAMPLE',
101
+ FULL = 'FULL',
102
+ }
103
+
104
+ /** Enums */
105
+ export enum ListingStatus {
106
+ DRAFT = 'DRAFT',
107
+ PENDING = 'PENDING',
108
+ PUBLISHED = 'PUBLISHED',
109
+ SUSPENDED = 'SUSPENDED',
110
+ }
111
+
112
+ export enum ListingTagType {
113
+ LISTING_TAG_TYPE_UNSPECIFIED = 'LISTING_TAG_TYPE_UNSPECIFIED',
114
+ LISTING_TAG_TYPE_LANGUAGE = 'LISTING_TAG_TYPE_LANGUAGE',
115
+ LISTING_TAG_TYPE_TASK = 'LISTING_TAG_TYPE_TASK',
116
+ }
117
+
118
+ export enum ListingType {
119
+ STANDARD = 'STANDARD',
120
+ PERSONALIZED = 'PERSONALIZED',
121
+ }
122
+
123
+ export enum MarketplaceFileType {
124
+ PROVIDER_ICON = 'PROVIDER_ICON',
125
+ EMBEDDED_NOTEBOOK = 'EMBEDDED_NOTEBOOK',
126
+ APP = 'APP',
127
+ }
128
+
129
+ export enum PersonalizationRequestStatus {
130
+ NEW = 'NEW',
131
+ /** Pending already defined for ListingStatus */
132
+ REQUEST_PENDING = 'REQUEST_PENDING',
133
+ FULFILLED = 'FULFILLED',
134
+ DENIED = 'DENIED',
135
+ }
136
+
137
+ export enum Visibility {
138
+ PUBLIC = 'PUBLIC',
139
+ PRIVATE = 'PRIVATE',
140
+ }
141
+
142
+ export interface AddExchangeForListingRequest {
143
+ listingId?: string | undefined;
144
+ exchangeId?: string | undefined;
145
+ }
146
+
147
+ export interface AddExchangeForListingResponse {
148
+ exchangeForListing?: ExchangeListing | undefined;
149
+ }
150
+
151
+ export interface BatchGetListingsRequest {
152
+ ids?: string[] | undefined;
153
+ }
154
+
155
+ export interface BatchGetListingsResponse {
156
+ listings?: Listing[] | undefined;
157
+ }
158
+
159
+ export interface BatchGetProvidersRequest {
160
+ ids?: string[] | undefined;
161
+ }
162
+
163
+ export interface BatchGetProvidersResponse {
164
+ providers?: ProviderInfo[] | undefined;
165
+ }
166
+
167
+ export interface ConsumerTerms {
168
+ version?: string | undefined;
169
+ }
170
+
171
+ /** contact info for the consumer requesting data or performing a listing installation */
172
+ export interface ContactInfo {
173
+ firstName?: string | undefined;
174
+ lastName?: string | undefined;
175
+ email?: string | undefined;
176
+ company?: string | undefined;
177
+ }
178
+
179
+ export interface CreateExchangeFilterRequest {
180
+ filter?: ExchangeFilter | undefined;
181
+ }
182
+
183
+ export interface CreateExchangeFilterResponse {
184
+ filterId?: string | undefined;
185
+ }
186
+
187
+ export interface CreateExchangeRequest {
188
+ exchange?: Exchange | undefined;
189
+ }
190
+
191
+ export interface CreateExchangeResponse {
192
+ exchangeId?: string | undefined;
193
+ }
194
+
195
+ export interface CreateFileRequest {
196
+ fileParent?: FileParent | undefined;
197
+ marketplaceFileType?: MarketplaceFileType | undefined;
198
+ mimeType?: string | undefined;
199
+ displayName?: string | undefined;
200
+ }
201
+
202
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
203
+ export interface CreateFileRequest_Response {
204
+ /** Pre-signed POST URL to blob storage */
205
+ uploadUrl?: string | undefined;
206
+ fileInfo?: FileInfo | undefined;
207
+ }
208
+
209
+ export interface CreateListingRequest {
210
+ listing?: Listing | undefined;
211
+ }
212
+
213
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
214
+ export interface CreateListingRequest_Response {
215
+ listingId?: string | undefined;
216
+ }
217
+
218
+ /**
219
+ * Data request messages
220
+ * also creates a lead (maybe)
221
+ */
222
+ export interface CreatePersonalizationRequest {
223
+ listingId?: string | undefined;
224
+ comment?: string | undefined;
225
+ intendedUse?: string | undefined;
226
+ firstName?: string | undefined;
227
+ lastName?: string | undefined;
228
+ company?: string | undefined;
229
+ isFromLighthouse?: boolean | undefined;
230
+ recipientType?: DeltaSharingRecipientType | undefined;
231
+ acceptedConsumerTerms?: ConsumerTerms | undefined;
232
+ }
233
+
234
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
235
+ export interface CreatePersonalizationRequest_Response {
236
+ id?: string | undefined;
237
+ }
238
+
239
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
240
+ export interface CreateProviderAnalyticsDashboardRequest {}
241
+
242
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
243
+ export interface CreateProviderAnalyticsDashboardRequest_Response {
244
+ id?: string | undefined;
245
+ }
246
+
247
+ export interface CreateProviderRequest {
248
+ provider?: ProviderInfo | undefined;
249
+ }
250
+
251
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
252
+ export interface CreateProviderRequest_Response {
253
+ id?: string | undefined;
254
+ }
255
+
256
+ export interface DataRefreshInfo {
257
+ interval?: bigint | undefined;
258
+ unit?: DataRefresh | undefined;
259
+ }
260
+
261
+ export interface DeleteExchangeFilterRequest {
262
+ id?: string | undefined;
263
+ }
264
+
265
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
266
+ export interface DeleteExchangeFilterResponse {}
267
+
268
+ export interface DeleteExchangeRequest {
269
+ id?: string | undefined;
270
+ }
271
+
272
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
273
+ export interface DeleteExchangeResponse {}
274
+
275
+ export interface DeleteFileRequest {
276
+ fileId?: string | undefined;
277
+ }
278
+
279
+ // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
280
+ export interface DeleteFileRequest_Response {}
281
+
282
+ export interface DeleteListingRequest {
283
+ id?: string | undefined;
284
+ }
285
+
286
+ // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
287
+ export interface DeleteListingRequest_Response {}
288
+
289
+ export interface DeleteProviderRequest {
290
+ id?: string | undefined;
291
+ }
292
+
293
+ // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
294
+ export interface DeleteProviderRequest_Response {}
295
+
296
+ export interface Exchange {
297
+ id?: string | undefined;
298
+ name?: string | undefined;
299
+ comment?: string | undefined;
300
+ filters?: ExchangeFilter[] | undefined;
301
+ createdAt?: bigint | undefined;
302
+ createdBy?: string | undefined;
303
+ updatedAt?: bigint | undefined;
304
+ updatedBy?: string | undefined;
305
+ linkedListings?: ExchangeListing[] | undefined;
306
+ }
307
+
308
+ export interface ExchangeFilter {
309
+ id?: string | undefined;
310
+ exchangeId?: string | undefined;
311
+ filterValue?: string | undefined;
312
+ name?: string | undefined;
313
+ createdAt?: bigint | undefined;
314
+ createdBy?: string | undefined;
315
+ updatedAt?: bigint | undefined;
316
+ updatedBy?: string | undefined;
317
+ filterType?: ExchangeFilterType | undefined;
318
+ }
319
+
320
+ export interface ExchangeListing {
321
+ id?: string | undefined;
322
+ exchangeId?: string | undefined;
323
+ exchangeName?: string | undefined;
324
+ listingId?: string | undefined;
325
+ listingName?: string | undefined;
326
+ createdAt?: bigint | undefined;
327
+ createdBy?: string | undefined;
328
+ }
329
+
330
+ export interface FileInfo {
331
+ id?: string | undefined;
332
+ marketplaceFileType?: MarketplaceFileType | undefined;
333
+ fileParent?: FileParent | undefined;
334
+ mimeType?: string | undefined;
335
+ downloadLink?: string | undefined;
336
+ createdAt?: bigint | undefined;
337
+ updatedAt?: bigint | undefined;
338
+ /** Name displayed to users for applicable files, e.g. embedded notebooks */
339
+ displayName?: string | undefined;
340
+ status?: FileStatus | undefined;
341
+ /** Populated if status is in a failed state with more information on reason for the failure. */
342
+ statusMessage?: string | undefined;
343
+ }
344
+
345
+ export interface FileParent {
346
+ /** TODO make the following fields required */
347
+ parentId?: string | undefined;
348
+ fileParentType?: FileParentType | undefined;
349
+ }
350
+
351
+ export interface GetAllInstallations {
352
+ pageToken?: string | undefined;
353
+ pageSize?: number | undefined;
354
+ }
355
+
356
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
357
+ export interface GetAllInstallations_Response {
358
+ installations?: InstallationDetail[] | undefined;
359
+ nextPageToken?: string | undefined;
360
+ }
361
+
362
+ export interface GetAllPersonalizationRequestsForConsumer {
363
+ pageToken?: string | undefined;
364
+ pageSize?: number | undefined;
365
+ }
366
+
367
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
368
+ export interface GetAllPersonalizationRequestsForConsumer_Response {
369
+ personalizationRequests?: PersonalizationRequest[] | undefined;
370
+ nextPageToken?: string | undefined;
371
+ }
372
+
373
+ export interface GetExchangeRequest {
374
+ id?: string | undefined;
375
+ }
376
+
377
+ export interface GetExchangeResponse {
378
+ exchange?: Exchange | undefined;
379
+ }
380
+
381
+ export interface GetFileRequest {
382
+ fileId?: string | undefined;
383
+ }
384
+
385
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
386
+ export interface GetFileRequest_Response {
387
+ fileInfo?: FileInfo | undefined;
388
+ }
389
+
390
+ export interface GetInstallationDetails {
391
+ listingId?: string | undefined;
392
+ pageToken?: string | undefined;
393
+ pageSize?: number | undefined;
394
+ }
395
+
396
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
397
+ export interface GetInstallationDetails_Response {
398
+ installations?: InstallationDetail[] | undefined;
399
+ nextPageToken?: string | undefined;
400
+ }
401
+
402
+ /**
403
+ * this is effectively a static request for now and will return latest version of the dashboard template
404
+ * that exists on server.
405
+ */
406
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
407
+ export interface GetLatestVersionProviderAnalyticsDashboardRequest {}
408
+
409
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
410
+ export interface GetLatestVersionProviderAnalyticsDashboardRequest_Response {
411
+ /** version here is latest logical version of the dashboard template */
412
+ version?: bigint | undefined;
413
+ }
414
+
415
+ export interface GetListingContent {
416
+ listingId?: string | undefined;
417
+ pageToken?: string | undefined;
418
+ pageSize?: number | undefined;
419
+ }
420
+
421
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
422
+ export interface GetListingContent_Response {
423
+ sharedDataObjects?: SharedDataObject[] | undefined;
424
+ nextPageToken?: string | undefined;
425
+ }
426
+
427
+ export interface GetListingFulfillments {
428
+ listingId?: string | undefined;
429
+ pageToken?: string | undefined;
430
+ pageSize?: number | undefined;
431
+ }
432
+
433
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
434
+ export interface GetListingFulfillments_Response {
435
+ fulfillments?: ListingFulfillment[] | undefined;
436
+ nextPageToken?: string | undefined;
437
+ }
438
+
439
+ export interface GetListingRequest {
440
+ id?: string | undefined;
441
+ }
442
+
443
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
444
+ export interface GetListingRequest_Response {
445
+ listing?: Listing | undefined;
446
+ }
447
+
448
+ export interface GetListingsRequest {
449
+ pageToken?: string | undefined;
450
+ pageSize?: number | undefined;
451
+ }
452
+
453
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
454
+ export interface GetListingsRequest_Response {
455
+ listings?: Listing[] | undefined;
456
+ nextPageToken?: string | undefined;
457
+ }
458
+
459
+ export interface GetPersonalizationRequestsForConsumer {
460
+ listingId?: string | undefined;
461
+ }
462
+
463
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
464
+ export interface GetPersonalizationRequestsForConsumer_Response {
465
+ personalizationRequests?: PersonalizationRequest[] | undefined;
466
+ }
467
+
468
+ export interface GetPersonalizationRequestsForProviderRequest {
469
+ pageToken?: string | undefined;
470
+ pageSize?: number | undefined;
471
+ }
472
+
473
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
474
+ export interface GetPersonalizationRequestsForProviderRequest_Response {
475
+ personalizationRequests?: PersonalizationRequest[] | undefined;
476
+ nextPageToken?: string | undefined;
477
+ }
478
+
479
+ export interface GetProviderRequest {
480
+ id?: string | undefined;
481
+ }
482
+
483
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
484
+ export interface GetProviderRequest_Response {
485
+ provider?: ProviderInfo | undefined;
486
+ }
487
+
488
+ export interface GetPublishedListingForConsumer {
489
+ id?: string | undefined;
490
+ }
491
+
492
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
493
+ export interface GetPublishedListingForConsumer_Response {
494
+ listing?: Listing | undefined;
495
+ }
496
+
497
+ /** Listing messages */
498
+ export interface GetPublishedListingsForConsumer {
499
+ pageToken?: string | undefined;
500
+ pageSize?: number | undefined;
501
+ /** Matches any of the following asset types */
502
+ assets?: AssetType[] | undefined;
503
+ /** Matches any of the following categories */
504
+ categories?: Category[] | undefined;
505
+ /** Matches listings with this tag */
506
+ tags?: ListingTag | undefined;
507
+ /** Filters each listing based on if it is free. */
508
+ isFree?: boolean | undefined;
509
+ /** Filters each listing based on if it is a private exchange. */
510
+ isPrivateExchange?: boolean | undefined;
511
+ /** Filters each listing based on whether it is a staff pick. */
512
+ isStaffPick?: boolean | undefined;
513
+ /** Matches any of the following provider ids */
514
+ providerIds?: string[] | undefined;
515
+ }
516
+
517
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
518
+ export interface GetPublishedListingsForConsumer_Response {
519
+ listings?: Listing[] | undefined;
520
+ nextPageToken?: string | undefined;
521
+ }
522
+
523
+ export interface GetPublishedProviderForConsumer {
524
+ id?: string | undefined;
525
+ }
526
+
527
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
528
+ export interface GetPublishedProviderForConsumer_Response {
529
+ provider?: ProviderInfo | undefined;
530
+ }
531
+
532
+ export interface InstallListing {
533
+ listingId?: string | undefined;
534
+ shareName?: string | undefined;
535
+ catalogName?: string | undefined;
536
+ /** for git repo installations */
537
+ repoDetail?: RepoInstallation | undefined;
538
+ recipientType?: DeltaSharingRecipientType | undefined;
539
+ acceptedConsumerTerms?: ConsumerTerms | undefined;
540
+ }
541
+
542
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
543
+ export interface InstallListing_Response {
544
+ installation?: InstallationDetail | undefined;
545
+ }
546
+
547
+ export interface InstallationDetail {
548
+ id?: string | undefined;
549
+ listingId?: string | undefined;
550
+ shareName?: string | undefined;
551
+ catalogName?: string | undefined;
552
+ installedOn?: bigint | undefined;
553
+ status?: InstallationStatus | undefined;
554
+ errorMessage?: string | undefined;
555
+ listingName?: string | undefined;
556
+ repoName?: string | undefined;
557
+ repoPath?: string | undefined;
558
+ recipientType?: DeltaSharingRecipientType | undefined;
559
+ tokens?: TokenInfo[] | undefined;
560
+ tokenDetail?: TokenDetail | undefined;
561
+ }
562
+
563
+ export interface ListExchangeFiltersRequest {
564
+ exchangeId?: string | undefined;
565
+ pageToken?: string | undefined;
566
+ pageSize?: number | undefined;
567
+ }
568
+
569
+ export interface ListExchangeFiltersResponse {
570
+ filters?: ExchangeFilter[] | undefined;
571
+ nextPageToken?: string | undefined;
572
+ }
573
+
574
+ export interface ListExchangesForListingRequest {
575
+ listingId?: string | undefined;
576
+ pageToken?: string | undefined;
577
+ pageSize?: number | undefined;
578
+ }
579
+
580
+ export interface ListExchangesForListingResponse {
581
+ exchangeListing?: ExchangeListing[] | undefined;
582
+ nextPageToken?: string | undefined;
583
+ }
584
+
585
+ export interface ListExchangesRequest {
586
+ pageToken?: string | undefined;
587
+ pageSize?: number | undefined;
588
+ }
589
+
590
+ export interface ListExchangesResponse {
591
+ exchanges?: Exchange[] | undefined;
592
+ nextPageToken?: string | undefined;
593
+ }
594
+
595
+ export interface ListFilesRequest {
596
+ fileParent?: FileParent | undefined;
597
+ pageToken?: string | undefined;
598
+ pageSize?: number | undefined;
599
+ }
600
+
601
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
602
+ export interface ListFilesRequest_Response {
603
+ fileInfos?: FileInfo[] | undefined;
604
+ nextPageToken?: string | undefined;
605
+ }
606
+
607
+ export interface ListListingsForExchangeRequest {
608
+ exchangeId?: string | undefined;
609
+ pageToken?: string | undefined;
610
+ pageSize?: number | undefined;
611
+ }
612
+
613
+ export interface ListListingsForExchangeResponse {
614
+ exchangeListings?: ExchangeListing[] | undefined;
615
+ nextPageToken?: string | undefined;
616
+ }
617
+
618
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
619
+ export interface ListProviderAnalyticsDashboardRequest {}
620
+
621
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
622
+ export interface ListProviderAnalyticsDashboardRequest_Response {
623
+ id?: string | undefined;
624
+ version?: bigint | undefined;
625
+ /** dashboard_id will be used to open Lakeview dashboard. */
626
+ dashboardId?: string | undefined;
627
+ }
628
+
629
+ export interface ListProvidersRequest {
630
+ pageToken?: string | undefined;
631
+ pageSize?: number | undefined;
632
+ }
633
+
634
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
635
+ export interface ListProvidersRequest_Response {
636
+ providers?: ProviderInfo[] | undefined;
637
+ nextPageToken?: string | undefined;
638
+ }
639
+
640
+ export interface ListPublishedProvidersForConsumer {
641
+ pageToken?: string | undefined;
642
+ pageSize?: number | undefined;
643
+ isFeatured?: boolean | undefined;
644
+ }
645
+
646
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
647
+ export interface ListPublishedProvidersForConsumer_Response {
648
+ providers?: ProviderInfo[] | undefined;
649
+ nextPageToken?: string | undefined;
650
+ }
651
+
652
+ export interface Listing {
653
+ id?: string | undefined;
654
+ summary?: ListingSummary | undefined;
655
+ detail?: ListingDetail | undefined;
656
+ }
657
+
658
+ export interface ListingDetail {
659
+ description?: string | undefined;
660
+ termsOfService?: string | undefined;
661
+ documentationLink?: string | undefined;
662
+ supportLink?: string | undefined;
663
+ fileIds?: string[] | undefined;
664
+ privacyPolicyLink?: string | undefined;
665
+ embeddedNotebookFileInfos?: FileInfo[] | undefined;
666
+ /** Which geo region the listing data is collected from */
667
+ geographicalCoverage?: string | undefined;
668
+ /** Whether the dataset is free or paid */
669
+ cost?: Cost | undefined;
670
+ /**
671
+ * What the pricing model is (e.g. paid, subscription, paid upfront); should only be present if cost is paid
672
+ * TODO: Not used yet, should deprecate if we will never use it
673
+ */
674
+ pricingModel?: string | undefined;
675
+ /** How often data is updated */
676
+ updateFrequency?: DataRefreshInfo | undefined;
677
+ /** Smallest unit of time in the dataset */
678
+ collectionGranularity?: DataRefreshInfo | undefined;
679
+ /** The starting date timestamp for when the data spans */
680
+ collectionDateStart?: bigint | undefined;
681
+ /** The ending date timestamp for when the data spans */
682
+ collectionDateEnd?: bigint | undefined;
683
+ /** Where/how the data is sourced */
684
+ dataSource?: string | undefined;
685
+ /** size of the dataset in GB */
686
+ size?: number | undefined;
687
+ /** Type of assets included in the listing. eg. GIT_REPO, DATA_TABLE, MODEL, NOTEBOOK */
688
+ assets?: AssetType[] | undefined;
689
+ /**
690
+ * ID 20, 21 removed don't use
691
+ * License of the data asset - Required for listings with model based assets
692
+ */
693
+ license?: string | undefined;
694
+ /**
695
+ * Listing tags - Simple key value pair to annotate listings.
696
+ * When should I use tags vs dedicated fields?
697
+ * Using tags avoids the need to add new columns in the database for new annotations.
698
+ * However, this should be used sparingly since tags are stored as key value pair.
699
+ * Use tags only:
700
+ * 1. If the field is optional and won't need to have NOT NULL integrity check
701
+ * 2. The value is fairly fixed, static and low cardinality (eg. enums).
702
+ * 3. The value won't be used in filters or joins with other tables.
703
+ */
704
+ tags?: ListingTag[] | undefined;
705
+ }
706
+
707
+ export interface ListingFulfillment {
708
+ listingId?: string | undefined;
709
+ fulfillmentType?: FulfillmentType | undefined;
710
+ shareInfo?: ShareInfo | undefined;
711
+ repoInfo?: RepoInfo | undefined;
712
+ recipientType?: DeltaSharingRecipientType | undefined;
713
+ }
714
+
715
+ export interface ListingSetting {
716
+ visibility?: Visibility | undefined;
717
+ }
718
+
719
+ export interface ListingSummary {
720
+ name?: string | undefined;
721
+ subtitle?: string | undefined;
722
+ status?: ListingStatus | undefined;
723
+ share?: ShareInfo | undefined;
724
+ providerRegion?: RegionInfo | undefined;
725
+ setting?: ListingSetting | undefined;
726
+ createdAt?: bigint | undefined;
727
+ createdBy?: string | undefined;
728
+ updatedAt?: bigint | undefined;
729
+ updatedBy?: string | undefined;
730
+ publishedAt?: bigint | undefined;
731
+ publishedBy?: string | undefined;
732
+ categories?: Category[] | undefined;
733
+ listingType?: ListingType | undefined;
734
+ createdById?: bigint | undefined;
735
+ updatedById?: bigint | undefined;
736
+ providerId?: string | undefined;
737
+ exchangeIds?: string[] | undefined;
738
+ /** if a git repo is being created, a listing will be initialized with this field as opposed to a share */
739
+ gitRepo?: RepoInfo | undefined;
740
+ }
741
+
742
+ export interface ListingTag {
743
+ /** Tag name (enum) */
744
+ tagName?: ListingTagType | undefined;
745
+ /** String representation of the tag value. Values should be string literals (no complex types) */
746
+ tagValues?: string[] | undefined;
747
+ }
748
+
749
+ export interface PersonalizationRequest {
750
+ id?: string | undefined;
751
+ consumerRegion?: RegionInfo | undefined;
752
+ contactInfo?: ContactInfo | undefined;
753
+ comment?: string | undefined;
754
+ intendedUse?: string | undefined;
755
+ status?: PersonalizationRequestStatus | undefined;
756
+ statusMessage?: string | undefined;
757
+ /**
758
+ * Share information is required for data listings
759
+ * but should be empty/ignored for non-data listings (MCP and App).
760
+ */
761
+ share?: ShareInfo | undefined;
762
+ createdAt?: bigint | undefined;
763
+ listingId?: string | undefined;
764
+ updatedAt?: bigint | undefined;
765
+ metastoreId?: string | undefined;
766
+ listingName?: string | undefined;
767
+ isFromLighthouse?: boolean | undefined;
768
+ providerId?: string | undefined;
769
+ recipientType?: DeltaSharingRecipientType | undefined;
770
+ }
771
+
772
+ export interface ProviderInfo {
773
+ id?: string | undefined;
774
+ name?: string | undefined;
775
+ description?: string | undefined;
776
+ iconFilePath?: string | undefined;
777
+ businessContactEmail?: string | undefined;
778
+ supportContactEmail?: string | undefined;
779
+ /** is_featured is accessible by consumers only */
780
+ isFeatured?: boolean | undefined;
781
+ /** published_by is only applicable to data aggregators (e.g. Crux) */
782
+ publishedBy?: string | undefined;
783
+ companyWebsiteLink?: string | undefined;
784
+ iconFileId?: string | undefined;
785
+ termOfServiceLink?: string | undefined;
786
+ privacyPolicyLink?: string | undefined;
787
+ darkModeIconFileId?: string | undefined;
788
+ darkModeIconFilePath?: string | undefined;
789
+ }
790
+
791
+ export interface RegionInfo {
792
+ cloud?: string | undefined;
793
+ region?: string | undefined;
794
+ }
795
+
796
+ export interface RemoveExchangeForListingRequest {
797
+ id?: string | undefined;
798
+ }
799
+
800
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
801
+ export interface RemoveExchangeForListingResponse {}
802
+
803
+ export interface RepoInfo {
804
+ /** the git repo url e.g. https://github.com/databrickslabs/dolly.git */
805
+ gitRepoUrl?: string | undefined;
806
+ }
807
+
808
+ export interface RepoInstallation {
809
+ /** the user-specified repo name for their installed git repo listing */
810
+ repoName?: string | undefined;
811
+ /**
812
+ * refers to the full url file path that navigates the user to the repo's entrypoint (e.g. a README.md file, or the repo file view in the unified UI)
813
+ * should just be a relative path
814
+ */
815
+ repoPath?: string | undefined;
816
+ }
817
+
818
+ export interface SearchPublishedListingsForConsumer {
819
+ /** Fuzzy matches query */
820
+ query?: string | undefined;
821
+ isFree?: boolean | undefined;
822
+ isPrivateExchange?: boolean | undefined;
823
+ /** Matches any of the following provider ids */
824
+ providerIds?: string[] | undefined;
825
+ /** Matches any of the following categories */
826
+ categories?: Category[] | undefined;
827
+ /** Matches any of the following asset types */
828
+ assets?: AssetType[] | undefined;
829
+ pageToken?: string | undefined;
830
+ pageSize?: number | undefined;
831
+ }
832
+
833
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
834
+ export interface SearchPublishedListingsForConsumer_Response {
835
+ listings?: Listing[] | undefined;
836
+ nextPageToken?: string | undefined;
837
+ }
838
+
839
+ export interface ShareInfo {
840
+ name?: string | undefined;
841
+ type?: ListingShareType | undefined;
842
+ }
843
+
844
+ export interface SharedDataObject {
845
+ /** Name of the shared object */
846
+ name?: string | undefined;
847
+ /** The type of the data object. Could be one of: TABLE, SCHEMA, NOTEBOOK_FILE, MODEL, VOLUME */
848
+ dataObjectType?: string | undefined;
849
+ }
850
+
851
+ export interface TokenDetail {
852
+ /**
853
+ * These field names must follow the delta sharing protocol.
854
+ * Original message: RetrieveToken.Response in managed-catalog/api/messages/recipient.proto
855
+ */
856
+ shareCredentialsVersion?: number | undefined;
857
+ bearerToken?: string | undefined;
858
+ endpoint?: string | undefined;
859
+ expirationTime?: string | undefined;
860
+ }
861
+
862
+ export interface TokenInfo {
863
+ /** Unique id of the Recipient Token. */
864
+ id?: string | undefined;
865
+ /** Time at which this Recipient Token was created, in epoch milliseconds. */
866
+ createdAt?: bigint | undefined;
867
+ /** Username of Recipient Token creator. */
868
+ createdBy?: string | undefined;
869
+ /**
870
+ * Full activation url to retrieve the access token.
871
+ * It will be empty if the token is already retrieved.
872
+ */
873
+ activationUrl?: string | undefined;
874
+ /** Expiration timestamp of the token in epoch milliseconds. */
875
+ expirationTime?: bigint | undefined;
876
+ /** Time at which this Recipient Token was updated, in epoch milliseconds. */
877
+ updatedAt?: bigint | undefined;
878
+ /** Username of Recipient Token updater. */
879
+ updatedBy?: string | undefined;
880
+ }
881
+
882
+ export interface UninstallListing {
883
+ listingId?: string | undefined;
884
+ installationId?: string | undefined;
885
+ }
886
+
887
+ // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
888
+ export interface UninstallListing_Response {}
889
+
890
+ export interface UpdateExchangeFilterRequest {
891
+ id?: string | undefined;
892
+ filter?: ExchangeFilter | undefined;
893
+ }
894
+
895
+ export interface UpdateExchangeFilterResponse {
896
+ filter?: ExchangeFilter | undefined;
897
+ }
898
+
899
+ export interface UpdateExchangeRequest {
900
+ id?: string | undefined;
901
+ exchange?: Exchange | undefined;
902
+ }
903
+
904
+ export interface UpdateExchangeResponse {
905
+ exchange?: Exchange | undefined;
906
+ }
907
+
908
+ export interface UpdateInstallationDetail {
909
+ listingId?: string | undefined;
910
+ installationId?: string | undefined;
911
+ installation?: InstallationDetail | undefined;
912
+ rotateToken?: boolean | undefined;
913
+ }
914
+
915
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
916
+ export interface UpdateInstallationDetail_Response {
917
+ installation?: InstallationDetail | undefined;
918
+ }
919
+
920
+ export interface UpdateListingRequest {
921
+ id?: string | undefined;
922
+ listing?: Listing | undefined;
923
+ }
924
+
925
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
926
+ export interface UpdateListingRequest_Response {
927
+ listing?: Listing | undefined;
928
+ }
929
+
930
+ export interface UpdatePersonalizationRequestStatusRequest {
931
+ listingId?: string | undefined;
932
+ requestId?: string | undefined;
933
+ status?: PersonalizationRequestStatus | undefined;
934
+ reason?: string | undefined;
935
+ share?: ShareInfo | undefined;
936
+ }
937
+
938
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
939
+ export interface UpdatePersonalizationRequestStatusRequest_Response {
940
+ request?: PersonalizationRequest | undefined;
941
+ }
942
+
943
+ export interface UpdateProviderAnalyticsDashboardRequest {
944
+ /** id is immutable property and can't be updated. */
945
+ id?: string | undefined;
946
+ /**
947
+ * this is the version of the dashboard template we want to update our user to
948
+ * current expectation is that it should be equal to latest version of the dashboard template
949
+ */
950
+ version?: bigint | undefined;
951
+ }
952
+
953
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
954
+ export interface UpdateProviderAnalyticsDashboardRequest_Response {
955
+ /** id & version should be the same as the request */
956
+ id?: string | undefined;
957
+ version?: bigint | undefined;
958
+ /** this is newly created Lakeview dashboard for the user */
959
+ dashboardId?: string | undefined;
960
+ }
961
+
962
+ export interface UpdateProviderRequest {
963
+ id?: string | undefined;
964
+ provider?: ProviderInfo | undefined;
965
+ }
966
+
967
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
968
+ export interface UpdateProviderRequest_Response {
969
+ provider?: ProviderInfo | undefined;
970
+ }
971
+
972
+ export const unmarshalAddExchangeForListingResponseSchema: z.ZodType<AddExchangeForListingResponse> =
973
+ z
974
+ .object({
975
+ exchange_for_listing: z
976
+ .lazy(() => unmarshalExchangeListingSchema)
977
+ .optional(),
978
+ })
979
+ .transform(d => ({
980
+ exchangeForListing: d.exchange_for_listing,
981
+ }));
982
+
983
+ export const unmarshalBatchGetListingsResponseSchema: z.ZodType<BatchGetListingsResponse> =
984
+ z
985
+ .object({
986
+ listings: z.array(z.lazy(() => unmarshalListingSchema)).optional(),
987
+ })
988
+ .transform(d => ({
989
+ listings: d.listings,
990
+ }));
991
+
992
+ export const unmarshalBatchGetProvidersResponseSchema: z.ZodType<BatchGetProvidersResponse> =
993
+ z
994
+ .object({
995
+ providers: z.array(z.lazy(() => unmarshalProviderInfoSchema)).optional(),
996
+ })
997
+ .transform(d => ({
998
+ providers: d.providers,
999
+ }));
1000
+
1001
+ export const unmarshalContactInfoSchema: z.ZodType<ContactInfo> = z
1002
+ .object({
1003
+ first_name: z.string().optional(),
1004
+ last_name: z.string().optional(),
1005
+ email: z.string().optional(),
1006
+ company: z.string().optional(),
1007
+ })
1008
+ .transform(d => ({
1009
+ firstName: d.first_name,
1010
+ lastName: d.last_name,
1011
+ email: d.email,
1012
+ company: d.company,
1013
+ }));
1014
+
1015
+ export const unmarshalCreateExchangeFilterResponseSchema: z.ZodType<CreateExchangeFilterResponse> =
1016
+ z
1017
+ .object({
1018
+ filter_id: z.string().optional(),
1019
+ })
1020
+ .transform(d => ({
1021
+ filterId: d.filter_id,
1022
+ }));
1023
+
1024
+ export const unmarshalCreateExchangeResponseSchema: z.ZodType<CreateExchangeResponse> =
1025
+ z
1026
+ .object({
1027
+ exchange_id: z.string().optional(),
1028
+ })
1029
+ .transform(d => ({
1030
+ exchangeId: d.exchange_id,
1031
+ }));
1032
+
1033
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1034
+ export const unmarshalCreateFileRequest_ResponseSchema: z.ZodType<CreateFileRequest_Response> =
1035
+ z
1036
+ .object({
1037
+ upload_url: z.string().optional(),
1038
+ file_info: z.lazy(() => unmarshalFileInfoSchema).optional(),
1039
+ })
1040
+ .transform(d => ({
1041
+ uploadUrl: d.upload_url,
1042
+ fileInfo: d.file_info,
1043
+ }));
1044
+
1045
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1046
+ export const unmarshalCreateListingRequest_ResponseSchema: z.ZodType<CreateListingRequest_Response> =
1047
+ z
1048
+ .object({
1049
+ listing_id: z.string().optional(),
1050
+ })
1051
+ .transform(d => ({
1052
+ listingId: d.listing_id,
1053
+ }));
1054
+
1055
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1056
+ export const unmarshalCreatePersonalizationRequest_ResponseSchema: z.ZodType<CreatePersonalizationRequest_Response> =
1057
+ z
1058
+ .object({
1059
+ id: z.string().optional(),
1060
+ })
1061
+ .transform(d => ({
1062
+ id: d.id,
1063
+ }));
1064
+
1065
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1066
+ export const unmarshalCreateProviderAnalyticsDashboardRequest_ResponseSchema: z.ZodType<CreateProviderAnalyticsDashboardRequest_Response> =
1067
+ z
1068
+ .object({
1069
+ id: z.string().optional(),
1070
+ })
1071
+ .transform(d => ({
1072
+ id: d.id,
1073
+ }));
1074
+
1075
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1076
+ export const unmarshalCreateProviderRequest_ResponseSchema: z.ZodType<CreateProviderRequest_Response> =
1077
+ z
1078
+ .object({
1079
+ id: z.string().optional(),
1080
+ })
1081
+ .transform(d => ({
1082
+ id: d.id,
1083
+ }));
1084
+
1085
+ export const unmarshalDataRefreshInfoSchema: z.ZodType<DataRefreshInfo> = z
1086
+ .object({
1087
+ interval: z
1088
+ .union([z.number(), z.bigint()])
1089
+ .transform(v => BigInt(v))
1090
+ .optional(),
1091
+ unit: z.enum(DataRefresh).optional(),
1092
+ })
1093
+ .transform(d => ({
1094
+ interval: d.interval,
1095
+ unit: d.unit,
1096
+ }));
1097
+
1098
+ export const unmarshalDeleteExchangeFilterResponseSchema: z.ZodType<DeleteExchangeFilterResponse> =
1099
+ z.object({});
1100
+
1101
+ export const unmarshalDeleteExchangeResponseSchema: z.ZodType<DeleteExchangeResponse> =
1102
+ z.object({});
1103
+
1104
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1105
+ export const unmarshalDeleteFileRequest_ResponseSchema: z.ZodType<DeleteFileRequest_Response> =
1106
+ z.object({});
1107
+
1108
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1109
+ export const unmarshalDeleteListingRequest_ResponseSchema: z.ZodType<DeleteListingRequest_Response> =
1110
+ z.object({});
1111
+
1112
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1113
+ export const unmarshalDeleteProviderRequest_ResponseSchema: z.ZodType<DeleteProviderRequest_Response> =
1114
+ z.object({});
1115
+
1116
+ export const unmarshalExchangeSchema: z.ZodType<Exchange> = z
1117
+ .object({
1118
+ id: z.string().optional(),
1119
+ name: z.string().optional(),
1120
+ comment: z.string().optional(),
1121
+ filters: z.array(z.lazy(() => unmarshalExchangeFilterSchema)).optional(),
1122
+ created_at: z
1123
+ .union([z.number(), z.bigint()])
1124
+ .transform(v => BigInt(v))
1125
+ .optional(),
1126
+ created_by: z.string().optional(),
1127
+ updated_at: z
1128
+ .union([z.number(), z.bigint()])
1129
+ .transform(v => BigInt(v))
1130
+ .optional(),
1131
+ updated_by: z.string().optional(),
1132
+ linked_listings: z
1133
+ .array(z.lazy(() => unmarshalExchangeListingSchema))
1134
+ .optional(),
1135
+ })
1136
+ .transform(d => ({
1137
+ id: d.id,
1138
+ name: d.name,
1139
+ comment: d.comment,
1140
+ filters: d.filters,
1141
+ createdAt: d.created_at,
1142
+ createdBy: d.created_by,
1143
+ updatedAt: d.updated_at,
1144
+ updatedBy: d.updated_by,
1145
+ linkedListings: d.linked_listings,
1146
+ }));
1147
+
1148
+ export const unmarshalExchangeFilterSchema: z.ZodType<ExchangeFilter> = z
1149
+ .object({
1150
+ id: z.string().optional(),
1151
+ exchange_id: z.string().optional(),
1152
+ filter_value: z.string().optional(),
1153
+ name: z.string().optional(),
1154
+ created_at: z
1155
+ .union([z.number(), z.bigint()])
1156
+ .transform(v => BigInt(v))
1157
+ .optional(),
1158
+ created_by: z.string().optional(),
1159
+ updated_at: z
1160
+ .union([z.number(), z.bigint()])
1161
+ .transform(v => BigInt(v))
1162
+ .optional(),
1163
+ updated_by: z.string().optional(),
1164
+ filter_type: z.enum(ExchangeFilterType).optional(),
1165
+ })
1166
+ .transform(d => ({
1167
+ id: d.id,
1168
+ exchangeId: d.exchange_id,
1169
+ filterValue: d.filter_value,
1170
+ name: d.name,
1171
+ createdAt: d.created_at,
1172
+ createdBy: d.created_by,
1173
+ updatedAt: d.updated_at,
1174
+ updatedBy: d.updated_by,
1175
+ filterType: d.filter_type,
1176
+ }));
1177
+
1178
+ export const unmarshalExchangeListingSchema: z.ZodType<ExchangeListing> = z
1179
+ .object({
1180
+ id: z.string().optional(),
1181
+ exchange_id: z.string().optional(),
1182
+ exchange_name: z.string().optional(),
1183
+ listing_id: z.string().optional(),
1184
+ listing_name: z.string().optional(),
1185
+ created_at: z
1186
+ .union([z.number(), z.bigint()])
1187
+ .transform(v => BigInt(v))
1188
+ .optional(),
1189
+ created_by: z.string().optional(),
1190
+ })
1191
+ .transform(d => ({
1192
+ id: d.id,
1193
+ exchangeId: d.exchange_id,
1194
+ exchangeName: d.exchange_name,
1195
+ listingId: d.listing_id,
1196
+ listingName: d.listing_name,
1197
+ createdAt: d.created_at,
1198
+ createdBy: d.created_by,
1199
+ }));
1200
+
1201
+ export const unmarshalFileInfoSchema: z.ZodType<FileInfo> = z
1202
+ .object({
1203
+ id: z.string().optional(),
1204
+ marketplace_file_type: z.enum(MarketplaceFileType).optional(),
1205
+ file_parent: z.lazy(() => unmarshalFileParentSchema).optional(),
1206
+ mime_type: z.string().optional(),
1207
+ download_link: z.string().optional(),
1208
+ created_at: z
1209
+ .union([z.number(), z.bigint()])
1210
+ .transform(v => BigInt(v))
1211
+ .optional(),
1212
+ updated_at: z
1213
+ .union([z.number(), z.bigint()])
1214
+ .transform(v => BigInt(v))
1215
+ .optional(),
1216
+ display_name: z.string().optional(),
1217
+ status: z.enum(FileStatus).optional(),
1218
+ status_message: z.string().optional(),
1219
+ })
1220
+ .transform(d => ({
1221
+ id: d.id,
1222
+ marketplaceFileType: d.marketplace_file_type,
1223
+ fileParent: d.file_parent,
1224
+ mimeType: d.mime_type,
1225
+ downloadLink: d.download_link,
1226
+ createdAt: d.created_at,
1227
+ updatedAt: d.updated_at,
1228
+ displayName: d.display_name,
1229
+ status: d.status,
1230
+ statusMessage: d.status_message,
1231
+ }));
1232
+
1233
+ export const unmarshalFileParentSchema: z.ZodType<FileParent> = z
1234
+ .object({
1235
+ parent_id: z.string().optional(),
1236
+ file_parent_type: z.enum(FileParentType).optional(),
1237
+ })
1238
+ .transform(d => ({
1239
+ parentId: d.parent_id,
1240
+ fileParentType: d.file_parent_type,
1241
+ }));
1242
+
1243
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1244
+ export const unmarshalGetAllInstallations_ResponseSchema: z.ZodType<GetAllInstallations_Response> =
1245
+ z
1246
+ .object({
1247
+ installations: z
1248
+ .array(z.lazy(() => unmarshalInstallationDetailSchema))
1249
+ .optional(),
1250
+ next_page_token: z.string().optional(),
1251
+ })
1252
+ .transform(d => ({
1253
+ installations: d.installations,
1254
+ nextPageToken: d.next_page_token,
1255
+ }));
1256
+
1257
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1258
+ export const unmarshalGetAllPersonalizationRequestsForConsumer_ResponseSchema: z.ZodType<GetAllPersonalizationRequestsForConsumer_Response> =
1259
+ z
1260
+ .object({
1261
+ personalization_requests: z
1262
+ .array(z.lazy(() => unmarshalPersonalizationRequestSchema))
1263
+ .optional(),
1264
+ next_page_token: z.string().optional(),
1265
+ })
1266
+ .transform(d => ({
1267
+ personalizationRequests: d.personalization_requests,
1268
+ nextPageToken: d.next_page_token,
1269
+ }));
1270
+
1271
+ export const unmarshalGetExchangeResponseSchema: z.ZodType<GetExchangeResponse> =
1272
+ z
1273
+ .object({
1274
+ exchange: z.lazy(() => unmarshalExchangeSchema).optional(),
1275
+ })
1276
+ .transform(d => ({
1277
+ exchange: d.exchange,
1278
+ }));
1279
+
1280
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1281
+ export const unmarshalGetFileRequest_ResponseSchema: z.ZodType<GetFileRequest_Response> =
1282
+ z
1283
+ .object({
1284
+ file_info: z.lazy(() => unmarshalFileInfoSchema).optional(),
1285
+ })
1286
+ .transform(d => ({
1287
+ fileInfo: d.file_info,
1288
+ }));
1289
+
1290
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1291
+ export const unmarshalGetInstallationDetails_ResponseSchema: z.ZodType<GetInstallationDetails_Response> =
1292
+ z
1293
+ .object({
1294
+ installations: z
1295
+ .array(z.lazy(() => unmarshalInstallationDetailSchema))
1296
+ .optional(),
1297
+ next_page_token: z.string().optional(),
1298
+ })
1299
+ .transform(d => ({
1300
+ installations: d.installations,
1301
+ nextPageToken: d.next_page_token,
1302
+ }));
1303
+
1304
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1305
+ export const unmarshalGetLatestVersionProviderAnalyticsDashboardRequest_ResponseSchema: z.ZodType<GetLatestVersionProviderAnalyticsDashboardRequest_Response> =
1306
+ z
1307
+ .object({
1308
+ version: z
1309
+ .union([z.number(), z.bigint()])
1310
+ .transform(v => BigInt(v))
1311
+ .optional(),
1312
+ })
1313
+ .transform(d => ({
1314
+ version: d.version,
1315
+ }));
1316
+
1317
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1318
+ export const unmarshalGetListingContent_ResponseSchema: z.ZodType<GetListingContent_Response> =
1319
+ z
1320
+ .object({
1321
+ shared_data_objects: z
1322
+ .array(z.lazy(() => unmarshalSharedDataObjectSchema))
1323
+ .optional(),
1324
+ next_page_token: z.string().optional(),
1325
+ })
1326
+ .transform(d => ({
1327
+ sharedDataObjects: d.shared_data_objects,
1328
+ nextPageToken: d.next_page_token,
1329
+ }));
1330
+
1331
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1332
+ export const unmarshalGetListingFulfillments_ResponseSchema: z.ZodType<GetListingFulfillments_Response> =
1333
+ z
1334
+ .object({
1335
+ fulfillments: z
1336
+ .array(z.lazy(() => unmarshalListingFulfillmentSchema))
1337
+ .optional(),
1338
+ next_page_token: z.string().optional(),
1339
+ })
1340
+ .transform(d => ({
1341
+ fulfillments: d.fulfillments,
1342
+ nextPageToken: d.next_page_token,
1343
+ }));
1344
+
1345
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1346
+ export const unmarshalGetListingRequest_ResponseSchema: z.ZodType<GetListingRequest_Response> =
1347
+ z
1348
+ .object({
1349
+ listing: z.lazy(() => unmarshalListingSchema).optional(),
1350
+ })
1351
+ .transform(d => ({
1352
+ listing: d.listing,
1353
+ }));
1354
+
1355
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1356
+ export const unmarshalGetListingsRequest_ResponseSchema: z.ZodType<GetListingsRequest_Response> =
1357
+ z
1358
+ .object({
1359
+ listings: z.array(z.lazy(() => unmarshalListingSchema)).optional(),
1360
+ next_page_token: z.string().optional(),
1361
+ })
1362
+ .transform(d => ({
1363
+ listings: d.listings,
1364
+ nextPageToken: d.next_page_token,
1365
+ }));
1366
+
1367
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1368
+ export const unmarshalGetPersonalizationRequestsForConsumer_ResponseSchema: z.ZodType<GetPersonalizationRequestsForConsumer_Response> =
1369
+ z
1370
+ .object({
1371
+ personalization_requests: z
1372
+ .array(z.lazy(() => unmarshalPersonalizationRequestSchema))
1373
+ .optional(),
1374
+ })
1375
+ .transform(d => ({
1376
+ personalizationRequests: d.personalization_requests,
1377
+ }));
1378
+
1379
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1380
+ export const unmarshalGetPersonalizationRequestsForProviderRequest_ResponseSchema: z.ZodType<GetPersonalizationRequestsForProviderRequest_Response> =
1381
+ z
1382
+ .object({
1383
+ personalization_requests: z
1384
+ .array(z.lazy(() => unmarshalPersonalizationRequestSchema))
1385
+ .optional(),
1386
+ next_page_token: z.string().optional(),
1387
+ })
1388
+ .transform(d => ({
1389
+ personalizationRequests: d.personalization_requests,
1390
+ nextPageToken: d.next_page_token,
1391
+ }));
1392
+
1393
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1394
+ export const unmarshalGetProviderRequest_ResponseSchema: z.ZodType<GetProviderRequest_Response> =
1395
+ z
1396
+ .object({
1397
+ provider: z.lazy(() => unmarshalProviderInfoSchema).optional(),
1398
+ })
1399
+ .transform(d => ({
1400
+ provider: d.provider,
1401
+ }));
1402
+
1403
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1404
+ export const unmarshalGetPublishedListingForConsumer_ResponseSchema: z.ZodType<GetPublishedListingForConsumer_Response> =
1405
+ z
1406
+ .object({
1407
+ listing: z.lazy(() => unmarshalListingSchema).optional(),
1408
+ })
1409
+ .transform(d => ({
1410
+ listing: d.listing,
1411
+ }));
1412
+
1413
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1414
+ export const unmarshalGetPublishedListingsForConsumer_ResponseSchema: z.ZodType<GetPublishedListingsForConsumer_Response> =
1415
+ z
1416
+ .object({
1417
+ listings: z.array(z.lazy(() => unmarshalListingSchema)).optional(),
1418
+ next_page_token: z.string().optional(),
1419
+ })
1420
+ .transform(d => ({
1421
+ listings: d.listings,
1422
+ nextPageToken: d.next_page_token,
1423
+ }));
1424
+
1425
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1426
+ export const unmarshalGetPublishedProviderForConsumer_ResponseSchema: z.ZodType<GetPublishedProviderForConsumer_Response> =
1427
+ z
1428
+ .object({
1429
+ provider: z.lazy(() => unmarshalProviderInfoSchema).optional(),
1430
+ })
1431
+ .transform(d => ({
1432
+ provider: d.provider,
1433
+ }));
1434
+
1435
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1436
+ export const unmarshalInstallListing_ResponseSchema: z.ZodType<InstallListing_Response> =
1437
+ z
1438
+ .object({
1439
+ installation: z.lazy(() => unmarshalInstallationDetailSchema).optional(),
1440
+ })
1441
+ .transform(d => ({
1442
+ installation: d.installation,
1443
+ }));
1444
+
1445
+ export const unmarshalInstallationDetailSchema: z.ZodType<InstallationDetail> =
1446
+ z
1447
+ .object({
1448
+ id: z.string().optional(),
1449
+ listing_id: z.string().optional(),
1450
+ share_name: z.string().optional(),
1451
+ catalog_name: z.string().optional(),
1452
+ installed_on: z
1453
+ .union([z.number(), z.bigint()])
1454
+ .transform(v => BigInt(v))
1455
+ .optional(),
1456
+ status: z.enum(InstallationStatus).optional(),
1457
+ error_message: z.string().optional(),
1458
+ listing_name: z.string().optional(),
1459
+ repo_name: z.string().optional(),
1460
+ repo_path: z.string().optional(),
1461
+ recipient_type: z.enum(DeltaSharingRecipientType).optional(),
1462
+ tokens: z.array(z.lazy(() => unmarshalTokenInfoSchema)).optional(),
1463
+ token_detail: z.lazy(() => unmarshalTokenDetailSchema).optional(),
1464
+ })
1465
+ .transform(d => ({
1466
+ id: d.id,
1467
+ listingId: d.listing_id,
1468
+ shareName: d.share_name,
1469
+ catalogName: d.catalog_name,
1470
+ installedOn: d.installed_on,
1471
+ status: d.status,
1472
+ errorMessage: d.error_message,
1473
+ listingName: d.listing_name,
1474
+ repoName: d.repo_name,
1475
+ repoPath: d.repo_path,
1476
+ recipientType: d.recipient_type,
1477
+ tokens: d.tokens,
1478
+ tokenDetail: d.token_detail,
1479
+ }));
1480
+
1481
+ export const unmarshalListExchangeFiltersResponseSchema: z.ZodType<ListExchangeFiltersResponse> =
1482
+ z
1483
+ .object({
1484
+ filters: z.array(z.lazy(() => unmarshalExchangeFilterSchema)).optional(),
1485
+ next_page_token: z.string().optional(),
1486
+ })
1487
+ .transform(d => ({
1488
+ filters: d.filters,
1489
+ nextPageToken: d.next_page_token,
1490
+ }));
1491
+
1492
+ export const unmarshalListExchangesForListingResponseSchema: z.ZodType<ListExchangesForListingResponse> =
1493
+ z
1494
+ .object({
1495
+ exchange_listing: z
1496
+ .array(z.lazy(() => unmarshalExchangeListingSchema))
1497
+ .optional(),
1498
+ next_page_token: z.string().optional(),
1499
+ })
1500
+ .transform(d => ({
1501
+ exchangeListing: d.exchange_listing,
1502
+ nextPageToken: d.next_page_token,
1503
+ }));
1504
+
1505
+ export const unmarshalListExchangesResponseSchema: z.ZodType<ListExchangesResponse> =
1506
+ z
1507
+ .object({
1508
+ exchanges: z.array(z.lazy(() => unmarshalExchangeSchema)).optional(),
1509
+ next_page_token: z.string().optional(),
1510
+ })
1511
+ .transform(d => ({
1512
+ exchanges: d.exchanges,
1513
+ nextPageToken: d.next_page_token,
1514
+ }));
1515
+
1516
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1517
+ export const unmarshalListFilesRequest_ResponseSchema: z.ZodType<ListFilesRequest_Response> =
1518
+ z
1519
+ .object({
1520
+ file_infos: z.array(z.lazy(() => unmarshalFileInfoSchema)).optional(),
1521
+ next_page_token: z.string().optional(),
1522
+ })
1523
+ .transform(d => ({
1524
+ fileInfos: d.file_infos,
1525
+ nextPageToken: d.next_page_token,
1526
+ }));
1527
+
1528
+ export const unmarshalListListingsForExchangeResponseSchema: z.ZodType<ListListingsForExchangeResponse> =
1529
+ z
1530
+ .object({
1531
+ exchange_listings: z
1532
+ .array(z.lazy(() => unmarshalExchangeListingSchema))
1533
+ .optional(),
1534
+ next_page_token: z.string().optional(),
1535
+ })
1536
+ .transform(d => ({
1537
+ exchangeListings: d.exchange_listings,
1538
+ nextPageToken: d.next_page_token,
1539
+ }));
1540
+
1541
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1542
+ export const unmarshalListProviderAnalyticsDashboardRequest_ResponseSchema: z.ZodType<ListProviderAnalyticsDashboardRequest_Response> =
1543
+ z
1544
+ .object({
1545
+ id: z.string().optional(),
1546
+ version: z
1547
+ .union([z.number(), z.bigint()])
1548
+ .transform(v => BigInt(v))
1549
+ .optional(),
1550
+ dashboard_id: z.string().optional(),
1551
+ })
1552
+ .transform(d => ({
1553
+ id: d.id,
1554
+ version: d.version,
1555
+ dashboardId: d.dashboard_id,
1556
+ }));
1557
+
1558
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1559
+ export const unmarshalListProvidersRequest_ResponseSchema: z.ZodType<ListProvidersRequest_Response> =
1560
+ z
1561
+ .object({
1562
+ providers: z.array(z.lazy(() => unmarshalProviderInfoSchema)).optional(),
1563
+ next_page_token: z.string().optional(),
1564
+ })
1565
+ .transform(d => ({
1566
+ providers: d.providers,
1567
+ nextPageToken: d.next_page_token,
1568
+ }));
1569
+
1570
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1571
+ export const unmarshalListPublishedProvidersForConsumer_ResponseSchema: z.ZodType<ListPublishedProvidersForConsumer_Response> =
1572
+ z
1573
+ .object({
1574
+ providers: z.array(z.lazy(() => unmarshalProviderInfoSchema)).optional(),
1575
+ next_page_token: z.string().optional(),
1576
+ })
1577
+ .transform(d => ({
1578
+ providers: d.providers,
1579
+ nextPageToken: d.next_page_token,
1580
+ }));
1581
+
1582
+ export const unmarshalListingSchema: z.ZodType<Listing> = z
1583
+ .object({
1584
+ id: z.string().optional(),
1585
+ summary: z.lazy(() => unmarshalListingSummarySchema).optional(),
1586
+ detail: z.lazy(() => unmarshalListingDetailSchema).optional(),
1587
+ })
1588
+ .transform(d => ({
1589
+ id: d.id,
1590
+ summary: d.summary,
1591
+ detail: d.detail,
1592
+ }));
1593
+
1594
+ export const unmarshalListingDetailSchema: z.ZodType<ListingDetail> = z
1595
+ .object({
1596
+ description: z.string().optional(),
1597
+ terms_of_service: z.string().optional(),
1598
+ documentation_link: z.string().optional(),
1599
+ support_link: z.string().optional(),
1600
+ file_ids: z.array(z.string()).optional(),
1601
+ privacy_policy_link: z.string().optional(),
1602
+ embedded_notebook_file_infos: z
1603
+ .array(z.lazy(() => unmarshalFileInfoSchema))
1604
+ .optional(),
1605
+ geographical_coverage: z.string().optional(),
1606
+ cost: z.enum(Cost).optional(),
1607
+ pricing_model: z.string().optional(),
1608
+ update_frequency: z.lazy(() => unmarshalDataRefreshInfoSchema).optional(),
1609
+ collection_granularity: z
1610
+ .lazy(() => unmarshalDataRefreshInfoSchema)
1611
+ .optional(),
1612
+ collection_date_start: z
1613
+ .union([z.number(), z.bigint()])
1614
+ .transform(v => BigInt(v))
1615
+ .optional(),
1616
+ collection_date_end: z
1617
+ .union([z.number(), z.bigint()])
1618
+ .transform(v => BigInt(v))
1619
+ .optional(),
1620
+ data_source: z.string().optional(),
1621
+ size: z.number().optional(),
1622
+ assets: z.array(z.enum(AssetType)).optional(),
1623
+ license: z.string().optional(),
1624
+ tags: z.array(z.lazy(() => unmarshalListingTagSchema)).optional(),
1625
+ })
1626
+ .transform(d => ({
1627
+ description: d.description,
1628
+ termsOfService: d.terms_of_service,
1629
+ documentationLink: d.documentation_link,
1630
+ supportLink: d.support_link,
1631
+ fileIds: d.file_ids,
1632
+ privacyPolicyLink: d.privacy_policy_link,
1633
+ embeddedNotebookFileInfos: d.embedded_notebook_file_infos,
1634
+ geographicalCoverage: d.geographical_coverage,
1635
+ cost: d.cost,
1636
+ pricingModel: d.pricing_model,
1637
+ updateFrequency: d.update_frequency,
1638
+ collectionGranularity: d.collection_granularity,
1639
+ collectionDateStart: d.collection_date_start,
1640
+ collectionDateEnd: d.collection_date_end,
1641
+ dataSource: d.data_source,
1642
+ size: d.size,
1643
+ assets: d.assets,
1644
+ license: d.license,
1645
+ tags: d.tags,
1646
+ }));
1647
+
1648
+ export const unmarshalListingFulfillmentSchema: z.ZodType<ListingFulfillment> =
1649
+ z
1650
+ .object({
1651
+ listing_id: z.string().optional(),
1652
+ fulfillment_type: z.enum(FulfillmentType).optional(),
1653
+ share_info: z.lazy(() => unmarshalShareInfoSchema).optional(),
1654
+ repo_info: z.lazy(() => unmarshalRepoInfoSchema).optional(),
1655
+ recipient_type: z.enum(DeltaSharingRecipientType).optional(),
1656
+ })
1657
+ .transform(d => ({
1658
+ listingId: d.listing_id,
1659
+ fulfillmentType: d.fulfillment_type,
1660
+ shareInfo: d.share_info,
1661
+ repoInfo: d.repo_info,
1662
+ recipientType: d.recipient_type,
1663
+ }));
1664
+
1665
+ export const unmarshalListingSettingSchema: z.ZodType<ListingSetting> = z
1666
+ .object({
1667
+ visibility: z.enum(Visibility).optional(),
1668
+ })
1669
+ .transform(d => ({
1670
+ visibility: d.visibility,
1671
+ }));
1672
+
1673
+ export const unmarshalListingSummarySchema: z.ZodType<ListingSummary> = z
1674
+ .object({
1675
+ name: z.string().optional(),
1676
+ subtitle: z.string().optional(),
1677
+ status: z.enum(ListingStatus).optional(),
1678
+ share: z.lazy(() => unmarshalShareInfoSchema).optional(),
1679
+ provider_region: z.lazy(() => unmarshalRegionInfoSchema).optional(),
1680
+ setting: z.lazy(() => unmarshalListingSettingSchema).optional(),
1681
+ created_at: z
1682
+ .union([z.number(), z.bigint()])
1683
+ .transform(v => BigInt(v))
1684
+ .optional(),
1685
+ created_by: z.string().optional(),
1686
+ updated_at: z
1687
+ .union([z.number(), z.bigint()])
1688
+ .transform(v => BigInt(v))
1689
+ .optional(),
1690
+ updated_by: z.string().optional(),
1691
+ published_at: z
1692
+ .union([z.number(), z.bigint()])
1693
+ .transform(v => BigInt(v))
1694
+ .optional(),
1695
+ published_by: z.string().optional(),
1696
+ categories: z.array(z.enum(Category)).optional(),
1697
+ listingType: z.enum(ListingType).optional(),
1698
+ created_by_id: z
1699
+ .union([z.number(), z.bigint()])
1700
+ .transform(v => BigInt(v))
1701
+ .optional(),
1702
+ updated_by_id: z
1703
+ .union([z.number(), z.bigint()])
1704
+ .transform(v => BigInt(v))
1705
+ .optional(),
1706
+ provider_id: z.string().optional(),
1707
+ exchange_ids: z.array(z.string()).optional(),
1708
+ git_repo: z.lazy(() => unmarshalRepoInfoSchema).optional(),
1709
+ })
1710
+ .transform(d => ({
1711
+ name: d.name,
1712
+ subtitle: d.subtitle,
1713
+ status: d.status,
1714
+ share: d.share,
1715
+ providerRegion: d.provider_region,
1716
+ setting: d.setting,
1717
+ createdAt: d.created_at,
1718
+ createdBy: d.created_by,
1719
+ updatedAt: d.updated_at,
1720
+ updatedBy: d.updated_by,
1721
+ publishedAt: d.published_at,
1722
+ publishedBy: d.published_by,
1723
+ categories: d.categories,
1724
+ listingType: d.listingType,
1725
+ createdById: d.created_by_id,
1726
+ updatedById: d.updated_by_id,
1727
+ providerId: d.provider_id,
1728
+ exchangeIds: d.exchange_ids,
1729
+ gitRepo: d.git_repo,
1730
+ }));
1731
+
1732
+ export const unmarshalListingTagSchema: z.ZodType<ListingTag> = z
1733
+ .object({
1734
+ tag_name: z.enum(ListingTagType).optional(),
1735
+ tag_values: z.array(z.string()).optional(),
1736
+ })
1737
+ .transform(d => ({
1738
+ tagName: d.tag_name,
1739
+ tagValues: d.tag_values,
1740
+ }));
1741
+
1742
+ export const unmarshalPersonalizationRequestSchema: z.ZodType<PersonalizationRequest> =
1743
+ z
1744
+ .object({
1745
+ id: z.string().optional(),
1746
+ consumer_region: z.lazy(() => unmarshalRegionInfoSchema).optional(),
1747
+ contact_info: z.lazy(() => unmarshalContactInfoSchema).optional(),
1748
+ comment: z.string().optional(),
1749
+ intended_use: z.string().optional(),
1750
+ status: z.enum(PersonalizationRequestStatus).optional(),
1751
+ status_message: z.string().optional(),
1752
+ share: z.lazy(() => unmarshalShareInfoSchema).optional(),
1753
+ created_at: z
1754
+ .union([z.number(), z.bigint()])
1755
+ .transform(v => BigInt(v))
1756
+ .optional(),
1757
+ listing_id: z.string().optional(),
1758
+ updated_at: z
1759
+ .union([z.number(), z.bigint()])
1760
+ .transform(v => BigInt(v))
1761
+ .optional(),
1762
+ metastore_id: z.string().optional(),
1763
+ listing_name: z.string().optional(),
1764
+ is_from_lighthouse: z.boolean().optional(),
1765
+ provider_id: z.string().optional(),
1766
+ recipient_type: z.enum(DeltaSharingRecipientType).optional(),
1767
+ })
1768
+ .transform(d => ({
1769
+ id: d.id,
1770
+ consumerRegion: d.consumer_region,
1771
+ contactInfo: d.contact_info,
1772
+ comment: d.comment,
1773
+ intendedUse: d.intended_use,
1774
+ status: d.status,
1775
+ statusMessage: d.status_message,
1776
+ share: d.share,
1777
+ createdAt: d.created_at,
1778
+ listingId: d.listing_id,
1779
+ updatedAt: d.updated_at,
1780
+ metastoreId: d.metastore_id,
1781
+ listingName: d.listing_name,
1782
+ isFromLighthouse: d.is_from_lighthouse,
1783
+ providerId: d.provider_id,
1784
+ recipientType: d.recipient_type,
1785
+ }));
1786
+
1787
+ export const unmarshalProviderInfoSchema: z.ZodType<ProviderInfo> = z
1788
+ .object({
1789
+ id: z.string().optional(),
1790
+ name: z.string().optional(),
1791
+ description: z.string().optional(),
1792
+ icon_file_path: z.string().optional(),
1793
+ business_contact_email: z.string().optional(),
1794
+ support_contact_email: z.string().optional(),
1795
+ is_featured: z.boolean().optional(),
1796
+ published_by: z.string().optional(),
1797
+ company_website_link: z.string().optional(),
1798
+ icon_file_id: z.string().optional(),
1799
+ term_of_service_link: z.string().optional(),
1800
+ privacy_policy_link: z.string().optional(),
1801
+ dark_mode_icon_file_id: z.string().optional(),
1802
+ dark_mode_icon_file_path: z.string().optional(),
1803
+ })
1804
+ .transform(d => ({
1805
+ id: d.id,
1806
+ name: d.name,
1807
+ description: d.description,
1808
+ iconFilePath: d.icon_file_path,
1809
+ businessContactEmail: d.business_contact_email,
1810
+ supportContactEmail: d.support_contact_email,
1811
+ isFeatured: d.is_featured,
1812
+ publishedBy: d.published_by,
1813
+ companyWebsiteLink: d.company_website_link,
1814
+ iconFileId: d.icon_file_id,
1815
+ termOfServiceLink: d.term_of_service_link,
1816
+ privacyPolicyLink: d.privacy_policy_link,
1817
+ darkModeIconFileId: d.dark_mode_icon_file_id,
1818
+ darkModeIconFilePath: d.dark_mode_icon_file_path,
1819
+ }));
1820
+
1821
+ export const unmarshalRegionInfoSchema: z.ZodType<RegionInfo> = z
1822
+ .object({
1823
+ cloud: z.string().optional(),
1824
+ region: z.string().optional(),
1825
+ })
1826
+ .transform(d => ({
1827
+ cloud: d.cloud,
1828
+ region: d.region,
1829
+ }));
1830
+
1831
+ export const unmarshalRemoveExchangeForListingResponseSchema: z.ZodType<RemoveExchangeForListingResponse> =
1832
+ z.object({});
1833
+
1834
+ export const unmarshalRepoInfoSchema: z.ZodType<RepoInfo> = z
1835
+ .object({
1836
+ git_repo_url: z.string().optional(),
1837
+ })
1838
+ .transform(d => ({
1839
+ gitRepoUrl: d.git_repo_url,
1840
+ }));
1841
+
1842
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1843
+ export const unmarshalSearchPublishedListingsForConsumer_ResponseSchema: z.ZodType<SearchPublishedListingsForConsumer_Response> =
1844
+ z
1845
+ .object({
1846
+ listings: z.array(z.lazy(() => unmarshalListingSchema)).optional(),
1847
+ next_page_token: z.string().optional(),
1848
+ })
1849
+ .transform(d => ({
1850
+ listings: d.listings,
1851
+ nextPageToken: d.next_page_token,
1852
+ }));
1853
+
1854
+ export const unmarshalShareInfoSchema: z.ZodType<ShareInfo> = z
1855
+ .object({
1856
+ name: z.string().optional(),
1857
+ type: z.enum(ListingShareType).optional(),
1858
+ })
1859
+ .transform(d => ({
1860
+ name: d.name,
1861
+ type: d.type,
1862
+ }));
1863
+
1864
+ export const unmarshalSharedDataObjectSchema: z.ZodType<SharedDataObject> = z
1865
+ .object({
1866
+ name: z.string().optional(),
1867
+ data_object_type: z.string().optional(),
1868
+ })
1869
+ .transform(d => ({
1870
+ name: d.name,
1871
+ dataObjectType: d.data_object_type,
1872
+ }));
1873
+
1874
+ export const unmarshalTokenDetailSchema: z.ZodType<TokenDetail> = z
1875
+ .object({
1876
+ shareCredentialsVersion: z.number().optional(),
1877
+ bearerToken: z.string().optional(),
1878
+ endpoint: z.string().optional(),
1879
+ expirationTime: z.string().optional(),
1880
+ })
1881
+ .transform(d => ({
1882
+ shareCredentialsVersion: d.shareCredentialsVersion,
1883
+ bearerToken: d.bearerToken,
1884
+ endpoint: d.endpoint,
1885
+ expirationTime: d.expirationTime,
1886
+ }));
1887
+
1888
+ export const unmarshalTokenInfoSchema: z.ZodType<TokenInfo> = z
1889
+ .object({
1890
+ id: z.string().optional(),
1891
+ created_at: z
1892
+ .union([z.number(), z.bigint()])
1893
+ .transform(v => BigInt(v))
1894
+ .optional(),
1895
+ created_by: z.string().optional(),
1896
+ activation_url: z.string().optional(),
1897
+ expiration_time: z
1898
+ .union([z.number(), z.bigint()])
1899
+ .transform(v => BigInt(v))
1900
+ .optional(),
1901
+ updated_at: z
1902
+ .union([z.number(), z.bigint()])
1903
+ .transform(v => BigInt(v))
1904
+ .optional(),
1905
+ updated_by: z.string().optional(),
1906
+ })
1907
+ .transform(d => ({
1908
+ id: d.id,
1909
+ createdAt: d.created_at,
1910
+ createdBy: d.created_by,
1911
+ activationUrl: d.activation_url,
1912
+ expirationTime: d.expiration_time,
1913
+ updatedAt: d.updated_at,
1914
+ updatedBy: d.updated_by,
1915
+ }));
1916
+
1917
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1918
+ export const unmarshalUninstallListing_ResponseSchema: z.ZodType<UninstallListing_Response> =
1919
+ z.object({});
1920
+
1921
+ export const unmarshalUpdateExchangeFilterResponseSchema: z.ZodType<UpdateExchangeFilterResponse> =
1922
+ z
1923
+ .object({
1924
+ filter: z.lazy(() => unmarshalExchangeFilterSchema).optional(),
1925
+ })
1926
+ .transform(d => ({
1927
+ filter: d.filter,
1928
+ }));
1929
+
1930
+ export const unmarshalUpdateExchangeResponseSchema: z.ZodType<UpdateExchangeResponse> =
1931
+ z
1932
+ .object({
1933
+ exchange: z.lazy(() => unmarshalExchangeSchema).optional(),
1934
+ })
1935
+ .transform(d => ({
1936
+ exchange: d.exchange,
1937
+ }));
1938
+
1939
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1940
+ export const unmarshalUpdateInstallationDetail_ResponseSchema: z.ZodType<UpdateInstallationDetail_Response> =
1941
+ z
1942
+ .object({
1943
+ installation: z.lazy(() => unmarshalInstallationDetailSchema).optional(),
1944
+ })
1945
+ .transform(d => ({
1946
+ installation: d.installation,
1947
+ }));
1948
+
1949
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1950
+ export const unmarshalUpdateListingRequest_ResponseSchema: z.ZodType<UpdateListingRequest_Response> =
1951
+ z
1952
+ .object({
1953
+ listing: z.lazy(() => unmarshalListingSchema).optional(),
1954
+ })
1955
+ .transform(d => ({
1956
+ listing: d.listing,
1957
+ }));
1958
+
1959
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1960
+ export const unmarshalUpdatePersonalizationRequestStatusRequest_ResponseSchema: z.ZodType<UpdatePersonalizationRequestStatusRequest_Response> =
1961
+ z
1962
+ .object({
1963
+ request: z.lazy(() => unmarshalPersonalizationRequestSchema).optional(),
1964
+ })
1965
+ .transform(d => ({
1966
+ request: d.request,
1967
+ }));
1968
+
1969
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1970
+ export const unmarshalUpdateProviderAnalyticsDashboardRequest_ResponseSchema: z.ZodType<UpdateProviderAnalyticsDashboardRequest_Response> =
1971
+ z
1972
+ .object({
1973
+ id: z.string().optional(),
1974
+ version: z
1975
+ .union([z.number(), z.bigint()])
1976
+ .transform(v => BigInt(v))
1977
+ .optional(),
1978
+ dashboard_id: z.string().optional(),
1979
+ })
1980
+ .transform(d => ({
1981
+ id: d.id,
1982
+ version: d.version,
1983
+ dashboardId: d.dashboard_id,
1984
+ }));
1985
+
1986
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1987
+ export const unmarshalUpdateProviderRequest_ResponseSchema: z.ZodType<UpdateProviderRequest_Response> =
1988
+ z
1989
+ .object({
1990
+ provider: z.lazy(() => unmarshalProviderInfoSchema).optional(),
1991
+ })
1992
+ .transform(d => ({
1993
+ provider: d.provider,
1994
+ }));
1995
+
1996
+ export const marshalAddExchangeForListingRequestSchema: z.ZodType = z
1997
+ .object({
1998
+ listingId: z.string().optional(),
1999
+ exchangeId: z.string().optional(),
2000
+ })
2001
+ .transform(d => ({
2002
+ listing_id: d.listingId,
2003
+ exchange_id: d.exchangeId,
2004
+ }));
2005
+
2006
+ export const marshalConsumerTermsSchema: z.ZodType = z
2007
+ .object({
2008
+ version: z.string().optional(),
2009
+ })
2010
+ .transform(d => ({
2011
+ version: d.version,
2012
+ }));
2013
+
2014
+ export const marshalCreateExchangeFilterRequestSchema: z.ZodType = z
2015
+ .object({
2016
+ filter: z.lazy(() => marshalExchangeFilterSchema).optional(),
2017
+ })
2018
+ .transform(d => ({
2019
+ filter: d.filter,
2020
+ }));
2021
+
2022
+ export const marshalCreateExchangeRequestSchema: z.ZodType = z
2023
+ .object({
2024
+ exchange: z.lazy(() => marshalExchangeSchema).optional(),
2025
+ })
2026
+ .transform(d => ({
2027
+ exchange: d.exchange,
2028
+ }));
2029
+
2030
+ export const marshalCreateFileRequestSchema: z.ZodType = z
2031
+ .object({
2032
+ fileParent: z.lazy(() => marshalFileParentSchema).optional(),
2033
+ marketplaceFileType: z.enum(MarketplaceFileType).optional(),
2034
+ mimeType: z.string().optional(),
2035
+ displayName: z.string().optional(),
2036
+ })
2037
+ .transform(d => ({
2038
+ file_parent: d.fileParent,
2039
+ marketplace_file_type: d.marketplaceFileType,
2040
+ mime_type: d.mimeType,
2041
+ display_name: d.displayName,
2042
+ }));
2043
+
2044
+ export const marshalCreateListingRequestSchema: z.ZodType = z
2045
+ .object({
2046
+ listing: z.lazy(() => marshalListingSchema).optional(),
2047
+ })
2048
+ .transform(d => ({
2049
+ listing: d.listing,
2050
+ }));
2051
+
2052
+ export const marshalCreatePersonalizationRequestSchema: z.ZodType = z
2053
+ .object({
2054
+ listingId: z.string().optional(),
2055
+ comment: z.string().optional(),
2056
+ intendedUse: z.string().optional(),
2057
+ firstName: z.string().optional(),
2058
+ lastName: z.string().optional(),
2059
+ company: z.string().optional(),
2060
+ isFromLighthouse: z.boolean().optional(),
2061
+ recipientType: z.enum(DeltaSharingRecipientType).optional(),
2062
+ acceptedConsumerTerms: z.lazy(() => marshalConsumerTermsSchema).optional(),
2063
+ })
2064
+ .transform(d => ({
2065
+ listing_id: d.listingId,
2066
+ comment: d.comment,
2067
+ intended_use: d.intendedUse,
2068
+ first_name: d.firstName,
2069
+ last_name: d.lastName,
2070
+ company: d.company,
2071
+ is_from_lighthouse: d.isFromLighthouse,
2072
+ recipient_type: d.recipientType,
2073
+ accepted_consumer_terms: d.acceptedConsumerTerms,
2074
+ }));
2075
+
2076
+ export const marshalCreateProviderAnalyticsDashboardRequestSchema: z.ZodType =
2077
+ z.object({});
2078
+
2079
+ export const marshalCreateProviderRequestSchema: z.ZodType = z
2080
+ .object({
2081
+ provider: z.lazy(() => marshalProviderInfoSchema).optional(),
2082
+ })
2083
+ .transform(d => ({
2084
+ provider: d.provider,
2085
+ }));
2086
+
2087
+ export const marshalDataRefreshInfoSchema: z.ZodType = z
2088
+ .object({
2089
+ interval: z.bigint().optional(),
2090
+ unit: z.enum(DataRefresh).optional(),
2091
+ })
2092
+ .transform(d => ({
2093
+ interval: d.interval,
2094
+ unit: d.unit,
2095
+ }));
2096
+
2097
+ export const marshalExchangeSchema: z.ZodType = z
2098
+ .object({
2099
+ id: z.string().optional(),
2100
+ name: z.string().optional(),
2101
+ comment: z.string().optional(),
2102
+ filters: z.array(z.lazy(() => marshalExchangeFilterSchema)).optional(),
2103
+ createdAt: z.bigint().optional(),
2104
+ createdBy: z.string().optional(),
2105
+ updatedAt: z.bigint().optional(),
2106
+ updatedBy: z.string().optional(),
2107
+ linkedListings: z
2108
+ .array(z.lazy(() => marshalExchangeListingSchema))
2109
+ .optional(),
2110
+ })
2111
+ .transform(d => ({
2112
+ id: d.id,
2113
+ name: d.name,
2114
+ comment: d.comment,
2115
+ filters: d.filters,
2116
+ created_at: d.createdAt,
2117
+ created_by: d.createdBy,
2118
+ updated_at: d.updatedAt,
2119
+ updated_by: d.updatedBy,
2120
+ linked_listings: d.linkedListings,
2121
+ }));
2122
+
2123
+ export const marshalExchangeFilterSchema: z.ZodType = z
2124
+ .object({
2125
+ id: z.string().optional(),
2126
+ exchangeId: z.string().optional(),
2127
+ filterValue: z.string().optional(),
2128
+ name: z.string().optional(),
2129
+ createdAt: z.bigint().optional(),
2130
+ createdBy: z.string().optional(),
2131
+ updatedAt: z.bigint().optional(),
2132
+ updatedBy: z.string().optional(),
2133
+ filterType: z.enum(ExchangeFilterType).optional(),
2134
+ })
2135
+ .transform(d => ({
2136
+ id: d.id,
2137
+ exchange_id: d.exchangeId,
2138
+ filter_value: d.filterValue,
2139
+ name: d.name,
2140
+ created_at: d.createdAt,
2141
+ created_by: d.createdBy,
2142
+ updated_at: d.updatedAt,
2143
+ updated_by: d.updatedBy,
2144
+ filter_type: d.filterType,
2145
+ }));
2146
+
2147
+ export const marshalExchangeListingSchema: z.ZodType = z
2148
+ .object({
2149
+ id: z.string().optional(),
2150
+ exchangeId: z.string().optional(),
2151
+ exchangeName: z.string().optional(),
2152
+ listingId: z.string().optional(),
2153
+ listingName: z.string().optional(),
2154
+ createdAt: z.bigint().optional(),
2155
+ createdBy: z.string().optional(),
2156
+ })
2157
+ .transform(d => ({
2158
+ id: d.id,
2159
+ exchange_id: d.exchangeId,
2160
+ exchange_name: d.exchangeName,
2161
+ listing_id: d.listingId,
2162
+ listing_name: d.listingName,
2163
+ created_at: d.createdAt,
2164
+ created_by: d.createdBy,
2165
+ }));
2166
+
2167
+ export const marshalFileInfoSchema: z.ZodType = z
2168
+ .object({
2169
+ id: z.string().optional(),
2170
+ marketplaceFileType: z.enum(MarketplaceFileType).optional(),
2171
+ fileParent: z.lazy(() => marshalFileParentSchema).optional(),
2172
+ mimeType: z.string().optional(),
2173
+ downloadLink: z.string().optional(),
2174
+ createdAt: z.bigint().optional(),
2175
+ updatedAt: z.bigint().optional(),
2176
+ displayName: z.string().optional(),
2177
+ status: z.enum(FileStatus).optional(),
2178
+ statusMessage: z.string().optional(),
2179
+ })
2180
+ .transform(d => ({
2181
+ id: d.id,
2182
+ marketplace_file_type: d.marketplaceFileType,
2183
+ file_parent: d.fileParent,
2184
+ mime_type: d.mimeType,
2185
+ download_link: d.downloadLink,
2186
+ created_at: d.createdAt,
2187
+ updated_at: d.updatedAt,
2188
+ display_name: d.displayName,
2189
+ status: d.status,
2190
+ status_message: d.statusMessage,
2191
+ }));
2192
+
2193
+ export const marshalFileParentSchema: z.ZodType = z
2194
+ .object({
2195
+ parentId: z.string().optional(),
2196
+ fileParentType: z.enum(FileParentType).optional(),
2197
+ })
2198
+ .transform(d => ({
2199
+ parent_id: d.parentId,
2200
+ file_parent_type: d.fileParentType,
2201
+ }));
2202
+
2203
+ export const marshalInstallListingSchema: z.ZodType = z
2204
+ .object({
2205
+ listingId: z.string().optional(),
2206
+ shareName: z.string().optional(),
2207
+ catalogName: z.string().optional(),
2208
+ repoDetail: z.lazy(() => marshalRepoInstallationSchema).optional(),
2209
+ recipientType: z.enum(DeltaSharingRecipientType).optional(),
2210
+ acceptedConsumerTerms: z.lazy(() => marshalConsumerTermsSchema).optional(),
2211
+ })
2212
+ .transform(d => ({
2213
+ listing_id: d.listingId,
2214
+ share_name: d.shareName,
2215
+ catalog_name: d.catalogName,
2216
+ repo_detail: d.repoDetail,
2217
+ recipient_type: d.recipientType,
2218
+ accepted_consumer_terms: d.acceptedConsumerTerms,
2219
+ }));
2220
+
2221
+ export const marshalInstallationDetailSchema: z.ZodType = z
2222
+ .object({
2223
+ id: z.string().optional(),
2224
+ listingId: z.string().optional(),
2225
+ shareName: z.string().optional(),
2226
+ catalogName: z.string().optional(),
2227
+ installedOn: z.bigint().optional(),
2228
+ status: z.enum(InstallationStatus).optional(),
2229
+ errorMessage: z.string().optional(),
2230
+ listingName: z.string().optional(),
2231
+ repoName: z.string().optional(),
2232
+ repoPath: z.string().optional(),
2233
+ recipientType: z.enum(DeltaSharingRecipientType).optional(),
2234
+ tokens: z.array(z.lazy(() => marshalTokenInfoSchema)).optional(),
2235
+ tokenDetail: z.lazy(() => marshalTokenDetailSchema).optional(),
2236
+ })
2237
+ .transform(d => ({
2238
+ id: d.id,
2239
+ listing_id: d.listingId,
2240
+ share_name: d.shareName,
2241
+ catalog_name: d.catalogName,
2242
+ installed_on: d.installedOn,
2243
+ status: d.status,
2244
+ error_message: d.errorMessage,
2245
+ listing_name: d.listingName,
2246
+ repo_name: d.repoName,
2247
+ repo_path: d.repoPath,
2248
+ recipient_type: d.recipientType,
2249
+ tokens: d.tokens,
2250
+ token_detail: d.tokenDetail,
2251
+ }));
2252
+
2253
+ export const marshalListingSchema: z.ZodType = z
2254
+ .object({
2255
+ id: z.string().optional(),
2256
+ summary: z.lazy(() => marshalListingSummarySchema).optional(),
2257
+ detail: z.lazy(() => marshalListingDetailSchema).optional(),
2258
+ })
2259
+ .transform(d => ({
2260
+ id: d.id,
2261
+ summary: d.summary,
2262
+ detail: d.detail,
2263
+ }));
2264
+
2265
+ export const marshalListingDetailSchema: z.ZodType = z
2266
+ .object({
2267
+ description: z.string().optional(),
2268
+ termsOfService: z.string().optional(),
2269
+ documentationLink: z.string().optional(),
2270
+ supportLink: z.string().optional(),
2271
+ fileIds: z.array(z.string()).optional(),
2272
+ privacyPolicyLink: z.string().optional(),
2273
+ embeddedNotebookFileInfos: z
2274
+ .array(z.lazy(() => marshalFileInfoSchema))
2275
+ .optional(),
2276
+ geographicalCoverage: z.string().optional(),
2277
+ cost: z.enum(Cost).optional(),
2278
+ pricingModel: z.string().optional(),
2279
+ updateFrequency: z.lazy(() => marshalDataRefreshInfoSchema).optional(),
2280
+ collectionGranularity: z
2281
+ .lazy(() => marshalDataRefreshInfoSchema)
2282
+ .optional(),
2283
+ collectionDateStart: z.bigint().optional(),
2284
+ collectionDateEnd: z.bigint().optional(),
2285
+ dataSource: z.string().optional(),
2286
+ size: z.number().optional(),
2287
+ assets: z.array(z.enum(AssetType)).optional(),
2288
+ license: z.string().optional(),
2289
+ tags: z.array(z.lazy(() => marshalListingTagSchema)).optional(),
2290
+ })
2291
+ .transform(d => ({
2292
+ description: d.description,
2293
+ terms_of_service: d.termsOfService,
2294
+ documentation_link: d.documentationLink,
2295
+ support_link: d.supportLink,
2296
+ file_ids: d.fileIds,
2297
+ privacy_policy_link: d.privacyPolicyLink,
2298
+ embedded_notebook_file_infos: d.embeddedNotebookFileInfos,
2299
+ geographical_coverage: d.geographicalCoverage,
2300
+ cost: d.cost,
2301
+ pricing_model: d.pricingModel,
2302
+ update_frequency: d.updateFrequency,
2303
+ collection_granularity: d.collectionGranularity,
2304
+ collection_date_start: d.collectionDateStart,
2305
+ collection_date_end: d.collectionDateEnd,
2306
+ data_source: d.dataSource,
2307
+ size: d.size,
2308
+ assets: d.assets,
2309
+ license: d.license,
2310
+ tags: d.tags,
2311
+ }));
2312
+
2313
+ export const marshalListingSettingSchema: z.ZodType = z
2314
+ .object({
2315
+ visibility: z.enum(Visibility).optional(),
2316
+ })
2317
+ .transform(d => ({
2318
+ visibility: d.visibility,
2319
+ }));
2320
+
2321
+ export const marshalListingSummarySchema: z.ZodType = z
2322
+ .object({
2323
+ name: z.string().optional(),
2324
+ subtitle: z.string().optional(),
2325
+ status: z.enum(ListingStatus).optional(),
2326
+ share: z.lazy(() => marshalShareInfoSchema).optional(),
2327
+ providerRegion: z.lazy(() => marshalRegionInfoSchema).optional(),
2328
+ setting: z.lazy(() => marshalListingSettingSchema).optional(),
2329
+ createdAt: z.bigint().optional(),
2330
+ createdBy: z.string().optional(),
2331
+ updatedAt: z.bigint().optional(),
2332
+ updatedBy: z.string().optional(),
2333
+ publishedAt: z.bigint().optional(),
2334
+ publishedBy: z.string().optional(),
2335
+ categories: z.array(z.enum(Category)).optional(),
2336
+ listingType: z.enum(ListingType).optional(),
2337
+ createdById: z.bigint().optional(),
2338
+ updatedById: z.bigint().optional(),
2339
+ providerId: z.string().optional(),
2340
+ exchangeIds: z.array(z.string()).optional(),
2341
+ gitRepo: z.lazy(() => marshalRepoInfoSchema).optional(),
2342
+ })
2343
+ .transform(d => ({
2344
+ name: d.name,
2345
+ subtitle: d.subtitle,
2346
+ status: d.status,
2347
+ share: d.share,
2348
+ provider_region: d.providerRegion,
2349
+ setting: d.setting,
2350
+ created_at: d.createdAt,
2351
+ created_by: d.createdBy,
2352
+ updated_at: d.updatedAt,
2353
+ updated_by: d.updatedBy,
2354
+ published_at: d.publishedAt,
2355
+ published_by: d.publishedBy,
2356
+ categories: d.categories,
2357
+ listingType: d.listingType,
2358
+ created_by_id: d.createdById,
2359
+ updated_by_id: d.updatedById,
2360
+ provider_id: d.providerId,
2361
+ exchange_ids: d.exchangeIds,
2362
+ git_repo: d.gitRepo,
2363
+ }));
2364
+
2365
+ export const marshalListingTagSchema: z.ZodType = z
2366
+ .object({
2367
+ tagName: z.enum(ListingTagType).optional(),
2368
+ tagValues: z.array(z.string()).optional(),
2369
+ })
2370
+ .transform(d => ({
2371
+ tag_name: d.tagName,
2372
+ tag_values: d.tagValues,
2373
+ }));
2374
+
2375
+ export const marshalProviderInfoSchema: z.ZodType = z
2376
+ .object({
2377
+ id: z.string().optional(),
2378
+ name: z.string().optional(),
2379
+ description: z.string().optional(),
2380
+ iconFilePath: z.string().optional(),
2381
+ businessContactEmail: z.string().optional(),
2382
+ supportContactEmail: z.string().optional(),
2383
+ isFeatured: z.boolean().optional(),
2384
+ publishedBy: z.string().optional(),
2385
+ companyWebsiteLink: z.string().optional(),
2386
+ iconFileId: z.string().optional(),
2387
+ termOfServiceLink: z.string().optional(),
2388
+ privacyPolicyLink: z.string().optional(),
2389
+ darkModeIconFileId: z.string().optional(),
2390
+ darkModeIconFilePath: z.string().optional(),
2391
+ })
2392
+ .transform(d => ({
2393
+ id: d.id,
2394
+ name: d.name,
2395
+ description: d.description,
2396
+ icon_file_path: d.iconFilePath,
2397
+ business_contact_email: d.businessContactEmail,
2398
+ support_contact_email: d.supportContactEmail,
2399
+ is_featured: d.isFeatured,
2400
+ published_by: d.publishedBy,
2401
+ company_website_link: d.companyWebsiteLink,
2402
+ icon_file_id: d.iconFileId,
2403
+ term_of_service_link: d.termOfServiceLink,
2404
+ privacy_policy_link: d.privacyPolicyLink,
2405
+ dark_mode_icon_file_id: d.darkModeIconFileId,
2406
+ dark_mode_icon_file_path: d.darkModeIconFilePath,
2407
+ }));
2408
+
2409
+ export const marshalRegionInfoSchema: z.ZodType = z
2410
+ .object({
2411
+ cloud: z.string().optional(),
2412
+ region: z.string().optional(),
2413
+ })
2414
+ .transform(d => ({
2415
+ cloud: d.cloud,
2416
+ region: d.region,
2417
+ }));
2418
+
2419
+ export const marshalRepoInfoSchema: z.ZodType = z
2420
+ .object({
2421
+ gitRepoUrl: z.string().optional(),
2422
+ })
2423
+ .transform(d => ({
2424
+ git_repo_url: d.gitRepoUrl,
2425
+ }));
2426
+
2427
+ export const marshalRepoInstallationSchema: z.ZodType = z
2428
+ .object({
2429
+ repoName: z.string().optional(),
2430
+ repoPath: z.string().optional(),
2431
+ })
2432
+ .transform(d => ({
2433
+ repo_name: d.repoName,
2434
+ repo_path: d.repoPath,
2435
+ }));
2436
+
2437
+ export const marshalShareInfoSchema: z.ZodType = z
2438
+ .object({
2439
+ name: z.string().optional(),
2440
+ type: z.enum(ListingShareType).optional(),
2441
+ })
2442
+ .transform(d => ({
2443
+ name: d.name,
2444
+ type: d.type,
2445
+ }));
2446
+
2447
+ export const marshalTokenDetailSchema: z.ZodType = z
2448
+ .object({
2449
+ shareCredentialsVersion: z.number().optional(),
2450
+ bearerToken: z.string().optional(),
2451
+ endpoint: z.string().optional(),
2452
+ expirationTime: z.string().optional(),
2453
+ })
2454
+ .transform(d => ({
2455
+ shareCredentialsVersion: d.shareCredentialsVersion,
2456
+ bearerToken: d.bearerToken,
2457
+ endpoint: d.endpoint,
2458
+ expirationTime: d.expirationTime,
2459
+ }));
2460
+
2461
+ export const marshalTokenInfoSchema: z.ZodType = z
2462
+ .object({
2463
+ id: z.string().optional(),
2464
+ createdAt: z.bigint().optional(),
2465
+ createdBy: z.string().optional(),
2466
+ activationUrl: z.string().optional(),
2467
+ expirationTime: z.bigint().optional(),
2468
+ updatedAt: z.bigint().optional(),
2469
+ updatedBy: z.string().optional(),
2470
+ })
2471
+ .transform(d => ({
2472
+ id: d.id,
2473
+ created_at: d.createdAt,
2474
+ created_by: d.createdBy,
2475
+ activation_url: d.activationUrl,
2476
+ expiration_time: d.expirationTime,
2477
+ updated_at: d.updatedAt,
2478
+ updated_by: d.updatedBy,
2479
+ }));
2480
+
2481
+ export const marshalUpdateExchangeFilterRequestSchema: z.ZodType = z
2482
+ .object({
2483
+ id: z.string().optional(),
2484
+ filter: z.lazy(() => marshalExchangeFilterSchema).optional(),
2485
+ })
2486
+ .transform(d => ({
2487
+ id: d.id,
2488
+ filter: d.filter,
2489
+ }));
2490
+
2491
+ export const marshalUpdateExchangeRequestSchema: z.ZodType = z
2492
+ .object({
2493
+ id: z.string().optional(),
2494
+ exchange: z.lazy(() => marshalExchangeSchema).optional(),
2495
+ })
2496
+ .transform(d => ({
2497
+ id: d.id,
2498
+ exchange: d.exchange,
2499
+ }));
2500
+
2501
+ export const marshalUpdateInstallationDetailSchema: z.ZodType = z
2502
+ .object({
2503
+ listingId: z.string().optional(),
2504
+ installationId: z.string().optional(),
2505
+ installation: z.lazy(() => marshalInstallationDetailSchema).optional(),
2506
+ rotateToken: z.boolean().optional(),
2507
+ })
2508
+ .transform(d => ({
2509
+ listing_id: d.listingId,
2510
+ installation_id: d.installationId,
2511
+ installation: d.installation,
2512
+ rotate_token: d.rotateToken,
2513
+ }));
2514
+
2515
+ export const marshalUpdateListingRequestSchema: z.ZodType = z
2516
+ .object({
2517
+ id: z.string().optional(),
2518
+ listing: z.lazy(() => marshalListingSchema).optional(),
2519
+ })
2520
+ .transform(d => ({
2521
+ id: d.id,
2522
+ listing: d.listing,
2523
+ }));
2524
+
2525
+ export const marshalUpdatePersonalizationRequestStatusRequestSchema: z.ZodType =
2526
+ z
2527
+ .object({
2528
+ listingId: z.string().optional(),
2529
+ requestId: z.string().optional(),
2530
+ status: z.enum(PersonalizationRequestStatus).optional(),
2531
+ reason: z.string().optional(),
2532
+ share: z.lazy(() => marshalShareInfoSchema).optional(),
2533
+ })
2534
+ .transform(d => ({
2535
+ listing_id: d.listingId,
2536
+ request_id: d.requestId,
2537
+ status: d.status,
2538
+ reason: d.reason,
2539
+ share: d.share,
2540
+ }));
2541
+
2542
+ export const marshalUpdateProviderAnalyticsDashboardRequestSchema: z.ZodType = z
2543
+ .object({
2544
+ id: z.string().optional(),
2545
+ version: z.bigint().optional(),
2546
+ })
2547
+ .transform(d => ({
2548
+ id: d.id,
2549
+ version: d.version,
2550
+ }));
2551
+
2552
+ export const marshalUpdateProviderRequestSchema: z.ZodType = z
2553
+ .object({
2554
+ id: z.string().optional(),
2555
+ provider: z.lazy(() => marshalProviderInfoSchema).optional(),
2556
+ })
2557
+ .transform(d => ({
2558
+ id: d.id,
2559
+ provider: d.provider,
2560
+ }));