@databricks/sdk-marketplaces 0.1.0-dev.1 → 0.1.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/v1/client.d.ts +20 -20
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +218 -218
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/index.d.ts +1 -1
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/model.d.ts +61 -61
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +56 -56
- package/dist/v1/model.js.map +1 -1
- package/dist/v1/utils.d.ts +1 -2
- package/dist/v1/utils.d.ts.map +1 -1
- package/dist/v1/utils.js +1 -1
- package/dist/v1/utils.js.map +1 -1
- package/package.json +4 -4
- package/src/v1/client.ts +351 -347
- package/src/v1/index.ts +10 -10
- package/src/v1/model.ts +137 -137
- package/src/v1/utils.ts +3 -3
package/src/v1/client.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
2
|
|
|
3
3
|
import {VERSION as AUTH_VERSION} from '@databricks/sdk-auth';
|
|
4
|
-
import type {Call} from '@databricks/sdk-core/api';
|
|
5
4
|
import {createDefault} from '@databricks/sdk-core/clientinfo';
|
|
6
5
|
import type {Logger} from '@databricks/sdk-core/logger';
|
|
7
6
|
import {NoOpLogger} from '@databricks/sdk-core/logger';
|
|
@@ -53,10 +52,6 @@ import type {
|
|
|
53
52
|
ExchangeFilter,
|
|
54
53
|
ExchangeListing,
|
|
55
54
|
FileInfo,
|
|
56
|
-
GetAllInstallations,
|
|
57
|
-
GetAllInstallations_Response,
|
|
58
|
-
GetAllPersonalizationRequestsForConsumer,
|
|
59
|
-
GetAllPersonalizationRequestsForConsumer_Response,
|
|
60
55
|
GetExchangeRequest,
|
|
61
56
|
GetExchangeResponse,
|
|
62
57
|
GetFileRequest,
|
|
@@ -67,12 +62,8 @@ import type {
|
|
|
67
62
|
GetLatestVersionProviderAnalyticsDashboardRequest_Response,
|
|
68
63
|
GetListingContent,
|
|
69
64
|
GetListingContent_Response,
|
|
70
|
-
GetListingFulfillments,
|
|
71
|
-
GetListingFulfillments_Response,
|
|
72
65
|
GetListingRequest,
|
|
73
66
|
GetListingRequest_Response,
|
|
74
|
-
GetListingsRequest,
|
|
75
|
-
GetListingsRequest_Response,
|
|
76
67
|
GetPersonalizationRequestsForConsumer,
|
|
77
68
|
GetPersonalizationRequestsForConsumer_Response,
|
|
78
69
|
GetPersonalizationRequestsForProviderRequest,
|
|
@@ -81,8 +72,6 @@ import type {
|
|
|
81
72
|
GetProviderRequest_Response,
|
|
82
73
|
GetPublishedListingForConsumer,
|
|
83
74
|
GetPublishedListingForConsumer_Response,
|
|
84
|
-
GetPublishedListingsForConsumer,
|
|
85
|
-
GetPublishedListingsForConsumer_Response,
|
|
86
75
|
GetPublishedProviderForConsumer,
|
|
87
76
|
GetPublishedProviderForConsumer_Response,
|
|
88
77
|
InstallListing,
|
|
@@ -96,12 +85,22 @@ import type {
|
|
|
96
85
|
ListExchangesResponse,
|
|
97
86
|
ListFilesRequest,
|
|
98
87
|
ListFilesRequest_Response,
|
|
88
|
+
ListInstallationsRequest,
|
|
89
|
+
ListInstallationsRequest_Response,
|
|
90
|
+
ListListingFulfillmentsRequest,
|
|
91
|
+
ListListingFulfillmentsRequest_Response,
|
|
99
92
|
ListListingsForExchangeRequest,
|
|
100
93
|
ListListingsForExchangeResponse,
|
|
94
|
+
ListListingsRequest,
|
|
95
|
+
ListListingsRequest_Response,
|
|
96
|
+
ListPersonalizationRequestsForConsumerRequest,
|
|
97
|
+
ListPersonalizationRequestsForConsumerRequest_Response,
|
|
101
98
|
ListProviderAnalyticsDashboardRequest,
|
|
102
99
|
ListProviderAnalyticsDashboardRequest_Response,
|
|
103
100
|
ListProvidersRequest,
|
|
104
101
|
ListProvidersRequest_Response,
|
|
102
|
+
ListPublishedListingsForConsumerRequest,
|
|
103
|
+
ListPublishedListingsForConsumerRequest_Response,
|
|
105
104
|
ListPublishedProvidersForConsumer,
|
|
106
105
|
ListPublishedProvidersForConsumer_Response,
|
|
107
106
|
Listing,
|
|
@@ -164,30 +163,30 @@ import {
|
|
|
164
163
|
unmarshalDeleteFileRequest_ResponseSchema,
|
|
165
164
|
unmarshalDeleteListingRequest_ResponseSchema,
|
|
166
165
|
unmarshalDeleteProviderRequest_ResponseSchema,
|
|
167
|
-
unmarshalGetAllInstallations_ResponseSchema,
|
|
168
|
-
unmarshalGetAllPersonalizationRequestsForConsumer_ResponseSchema,
|
|
169
166
|
unmarshalGetExchangeResponseSchema,
|
|
170
167
|
unmarshalGetFileRequest_ResponseSchema,
|
|
171
168
|
unmarshalGetInstallationDetails_ResponseSchema,
|
|
172
169
|
unmarshalGetLatestVersionProviderAnalyticsDashboardRequest_ResponseSchema,
|
|
173
170
|
unmarshalGetListingContent_ResponseSchema,
|
|
174
|
-
unmarshalGetListingFulfillments_ResponseSchema,
|
|
175
171
|
unmarshalGetListingRequest_ResponseSchema,
|
|
176
|
-
unmarshalGetListingsRequest_ResponseSchema,
|
|
177
172
|
unmarshalGetPersonalizationRequestsForConsumer_ResponseSchema,
|
|
178
173
|
unmarshalGetPersonalizationRequestsForProviderRequest_ResponseSchema,
|
|
179
174
|
unmarshalGetProviderRequest_ResponseSchema,
|
|
180
175
|
unmarshalGetPublishedListingForConsumer_ResponseSchema,
|
|
181
|
-
unmarshalGetPublishedListingsForConsumer_ResponseSchema,
|
|
182
176
|
unmarshalGetPublishedProviderForConsumer_ResponseSchema,
|
|
183
177
|
unmarshalInstallListing_ResponseSchema,
|
|
184
178
|
unmarshalListExchangeFiltersResponseSchema,
|
|
185
179
|
unmarshalListExchangesForListingResponseSchema,
|
|
186
180
|
unmarshalListExchangesResponseSchema,
|
|
187
181
|
unmarshalListFilesRequest_ResponseSchema,
|
|
182
|
+
unmarshalListInstallationsRequest_ResponseSchema,
|
|
183
|
+
unmarshalListListingFulfillmentsRequest_ResponseSchema,
|
|
188
184
|
unmarshalListListingsForExchangeResponseSchema,
|
|
185
|
+
unmarshalListListingsRequest_ResponseSchema,
|
|
186
|
+
unmarshalListPersonalizationRequestsForConsumerRequest_ResponseSchema,
|
|
189
187
|
unmarshalListProviderAnalyticsDashboardRequest_ResponseSchema,
|
|
190
188
|
unmarshalListProvidersRequest_ResponseSchema,
|
|
189
|
+
unmarshalListPublishedListingsForConsumerRequest_ResponseSchema,
|
|
191
190
|
unmarshalListPublishedProvidersForConsumer_ResponseSchema,
|
|
192
191
|
unmarshalRemoveExchangeForListingResponseSchema,
|
|
193
192
|
unmarshalSearchPublishedListingsForConsumer_ResponseSchema,
|
|
@@ -248,7 +247,7 @@ export class MarketplacesClient {
|
|
|
248
247
|
const query = params.toString();
|
|
249
248
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
250
249
|
let resp: BatchGetListingsResponse | undefined;
|
|
251
|
-
const call
|
|
250
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
252
251
|
const headers = new Headers();
|
|
253
252
|
if (this.workspaceId !== undefined) {
|
|
254
253
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -264,7 +263,7 @@ export class MarketplacesClient {
|
|
|
264
263
|
};
|
|
265
264
|
await executeCall(call, options);
|
|
266
265
|
if (resp === undefined) {
|
|
267
|
-
throw new Error('
|
|
266
|
+
throw new Error('operation completed without a result.');
|
|
268
267
|
}
|
|
269
268
|
return resp;
|
|
270
269
|
}
|
|
@@ -282,7 +281,7 @@ export class MarketplacesClient {
|
|
|
282
281
|
const query = params.toString();
|
|
283
282
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
284
283
|
let resp: BatchGetProvidersResponse | undefined;
|
|
285
|
-
const call
|
|
284
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
286
285
|
const headers = new Headers();
|
|
287
286
|
if (this.workspaceId !== undefined) {
|
|
288
287
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -298,7 +297,7 @@ export class MarketplacesClient {
|
|
|
298
297
|
};
|
|
299
298
|
await executeCall(call, options);
|
|
300
299
|
if (resp === undefined) {
|
|
301
|
-
throw new Error('
|
|
300
|
+
throw new Error('operation completed without a result.');
|
|
302
301
|
}
|
|
303
302
|
return resp;
|
|
304
303
|
}
|
|
@@ -311,7 +310,7 @@ export class MarketplacesClient {
|
|
|
311
310
|
const url = `${this.host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/personalization-requests`;
|
|
312
311
|
const body = marshalRequest(req, marshalCreatePersonalizationRequestSchema);
|
|
313
312
|
let resp: CreatePersonalizationRequest_Response | undefined;
|
|
314
|
-
const call
|
|
313
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
315
314
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
316
315
|
if (this.workspaceId !== undefined) {
|
|
317
316
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -330,17 +329,17 @@ export class MarketplacesClient {
|
|
|
330
329
|
};
|
|
331
330
|
await executeCall(call, options);
|
|
332
331
|
if (resp === undefined) {
|
|
333
|
-
throw new Error('
|
|
332
|
+
throw new Error('operation completed without a result.');
|
|
334
333
|
}
|
|
335
334
|
return resp;
|
|
336
335
|
}
|
|
337
336
|
|
|
338
|
-
/** List all installations
|
|
339
|
-
async
|
|
340
|
-
req:
|
|
337
|
+
/** List all installations for a particular listing. */
|
|
338
|
+
async getInstallationDetails(
|
|
339
|
+
req: GetInstallationDetails,
|
|
341
340
|
options?: CallOptions
|
|
342
|
-
): Promise<
|
|
343
|
-
const url = `${this.host}/api/2.0/marketplace-consumer/installations`;
|
|
341
|
+
): Promise<GetInstallationDetails_Response> {
|
|
342
|
+
const url = `${this.host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/installations`;
|
|
344
343
|
const params = new URLSearchParams();
|
|
345
344
|
if (req.pageToken !== undefined) {
|
|
346
345
|
params.append('page_token', req.pageToken);
|
|
@@ -350,8 +349,8 @@ export class MarketplacesClient {
|
|
|
350
349
|
}
|
|
351
350
|
const query = params.toString();
|
|
352
351
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
353
|
-
let resp:
|
|
354
|
-
const call
|
|
352
|
+
let resp: GetInstallationDetails_Response | undefined;
|
|
353
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
355
354
|
const headers = new Headers();
|
|
356
355
|
if (this.workspaceId !== undefined) {
|
|
357
356
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -365,23 +364,23 @@ export class MarketplacesClient {
|
|
|
365
364
|
});
|
|
366
365
|
resp = parseResponse(
|
|
367
366
|
respBody,
|
|
368
|
-
|
|
367
|
+
unmarshalGetInstallationDetails_ResponseSchema
|
|
369
368
|
);
|
|
370
369
|
};
|
|
371
370
|
await executeCall(call, options);
|
|
372
371
|
if (resp === undefined) {
|
|
373
|
-
throw new Error('
|
|
372
|
+
throw new Error('operation completed without a result.');
|
|
374
373
|
}
|
|
375
374
|
return resp;
|
|
376
375
|
}
|
|
377
376
|
|
|
378
|
-
async *
|
|
379
|
-
req:
|
|
377
|
+
async *getInstallationDetailsIter(
|
|
378
|
+
req: GetInstallationDetails,
|
|
380
379
|
options?: CallOptions
|
|
381
380
|
): AsyncGenerator<InstallationDetail> {
|
|
382
|
-
const pageReq:
|
|
381
|
+
const pageReq: GetInstallationDetails = {...req};
|
|
383
382
|
for (;;) {
|
|
384
|
-
const resp = await this.
|
|
383
|
+
const resp = await this.getInstallationDetails(pageReq, options);
|
|
385
384
|
for (const item of resp.installations ?? []) {
|
|
386
385
|
yield item;
|
|
387
386
|
}
|
|
@@ -392,12 +391,12 @@ export class MarketplacesClient {
|
|
|
392
391
|
}
|
|
393
392
|
}
|
|
394
393
|
|
|
395
|
-
/**
|
|
396
|
-
async
|
|
397
|
-
req:
|
|
394
|
+
/** Get a high level preview of the metadata of listing installable content. */
|
|
395
|
+
async getListingContent(
|
|
396
|
+
req: GetListingContent,
|
|
398
397
|
options?: CallOptions
|
|
399
|
-
): Promise<
|
|
400
|
-
const url = `${this.host}/api/2.0/marketplace-consumer/
|
|
398
|
+
): Promise<GetListingContent_Response> {
|
|
399
|
+
const url = `${this.host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/content`;
|
|
401
400
|
const params = new URLSearchParams();
|
|
402
401
|
if (req.pageToken !== undefined) {
|
|
403
402
|
params.append('page_token', req.pageToken);
|
|
@@ -407,8 +406,8 @@ export class MarketplacesClient {
|
|
|
407
406
|
}
|
|
408
407
|
const query = params.toString();
|
|
409
408
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
410
|
-
let resp:
|
|
411
|
-
const call
|
|
409
|
+
let resp: GetListingContent_Response | undefined;
|
|
410
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
412
411
|
const headers = new Headers();
|
|
413
412
|
if (this.workspaceId !== undefined) {
|
|
414
413
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -420,29 +419,23 @@ export class MarketplacesClient {
|
|
|
420
419
|
httpClient: this.httpClient,
|
|
421
420
|
logger: this.logger,
|
|
422
421
|
});
|
|
423
|
-
resp = parseResponse(
|
|
424
|
-
respBody,
|
|
425
|
-
unmarshalGetAllPersonalizationRequestsForConsumer_ResponseSchema
|
|
426
|
-
);
|
|
422
|
+
resp = parseResponse(respBody, unmarshalGetListingContent_ResponseSchema);
|
|
427
423
|
};
|
|
428
424
|
await executeCall(call, options);
|
|
429
425
|
if (resp === undefined) {
|
|
430
|
-
throw new Error('
|
|
426
|
+
throw new Error('operation completed without a result.');
|
|
431
427
|
}
|
|
432
428
|
return resp;
|
|
433
429
|
}
|
|
434
430
|
|
|
435
|
-
async *
|
|
436
|
-
req:
|
|
431
|
+
async *getListingContentIter(
|
|
432
|
+
req: GetListingContent,
|
|
437
433
|
options?: CallOptions
|
|
438
|
-
): AsyncGenerator<
|
|
439
|
-
const pageReq:
|
|
434
|
+
): AsyncGenerator<SharedDataObject> {
|
|
435
|
+
const pageReq: GetListingContent = {...req};
|
|
440
436
|
for (;;) {
|
|
441
|
-
const resp = await this.
|
|
442
|
-
|
|
443
|
-
options
|
|
444
|
-
);
|
|
445
|
-
for (const item of resp.personalizationRequests ?? []) {
|
|
437
|
+
const resp = await this.getListingContent(pageReq, options);
|
|
438
|
+
for (const item of resp.sharedDataObjects ?? []) {
|
|
446
439
|
yield item;
|
|
447
440
|
}
|
|
448
441
|
if (resp.nextPageToken === undefined || resp.nextPageToken === '') {
|
|
@@ -452,29 +445,51 @@ export class MarketplacesClient {
|
|
|
452
445
|
}
|
|
453
446
|
}
|
|
454
447
|
|
|
455
|
-
/**
|
|
456
|
-
async
|
|
457
|
-
req:
|
|
448
|
+
/** Get the personalization request for a listing. Each consumer can make at *most* one personalization request for a listing. */
|
|
449
|
+
async getPersonalizationRequestsForConsumer(
|
|
450
|
+
req: GetPersonalizationRequestsForConsumer,
|
|
458
451
|
options?: CallOptions
|
|
459
|
-
): Promise<
|
|
460
|
-
const url = `${this.host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
452
|
+
): Promise<GetPersonalizationRequestsForConsumer_Response> {
|
|
453
|
+
const url = `${this.host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/personalization-requests`;
|
|
454
|
+
let resp: GetPersonalizationRequestsForConsumer_Response | undefined;
|
|
455
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
456
|
+
const headers = new Headers();
|
|
457
|
+
if (this.workspaceId !== undefined) {
|
|
458
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
459
|
+
}
|
|
460
|
+
headers.set('User-Agent', this.userAgent);
|
|
461
|
+
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
462
|
+
const respBody = await executeHttpCall({
|
|
463
|
+
request: httpReq,
|
|
464
|
+
httpClient: this.httpClient,
|
|
465
|
+
logger: this.logger,
|
|
466
|
+
});
|
|
467
|
+
resp = parseResponse(
|
|
468
|
+
respBody,
|
|
469
|
+
unmarshalGetPersonalizationRequestsForConsumer_ResponseSchema
|
|
470
|
+
);
|
|
471
|
+
};
|
|
472
|
+
await executeCall(call, options);
|
|
473
|
+
if (resp === undefined) {
|
|
474
|
+
throw new Error('operation completed without a result.');
|
|
467
475
|
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
476
|
+
return resp;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/** Get a published listing in the Databricks Marketplace that the consumer has access to. */
|
|
480
|
+
async getPublishedListingForConsumer(
|
|
481
|
+
req: GetPublishedListingForConsumer,
|
|
482
|
+
options?: CallOptions
|
|
483
|
+
): Promise<GetPublishedListingForConsumer_Response> {
|
|
484
|
+
const url = `${this.host}/api/2.0/marketplace-consumer/listings/${req.id ?? ''}`;
|
|
485
|
+
let resp: GetPublishedListingForConsumer_Response | undefined;
|
|
486
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
472
487
|
const headers = new Headers();
|
|
473
488
|
if (this.workspaceId !== undefined) {
|
|
474
489
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
475
490
|
}
|
|
476
491
|
headers.set('User-Agent', this.userAgent);
|
|
477
|
-
const httpReq = buildHttpRequest('GET',
|
|
492
|
+
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
478
493
|
const respBody = await executeHttpCall({
|
|
479
494
|
request: httpReq,
|
|
480
495
|
httpClient: this.httpClient,
|
|
@@ -482,39 +497,82 @@ export class MarketplacesClient {
|
|
|
482
497
|
});
|
|
483
498
|
resp = parseResponse(
|
|
484
499
|
respBody,
|
|
485
|
-
|
|
500
|
+
unmarshalGetPublishedListingForConsumer_ResponseSchema
|
|
486
501
|
);
|
|
487
502
|
};
|
|
488
503
|
await executeCall(call, options);
|
|
489
504
|
if (resp === undefined) {
|
|
490
|
-
throw new Error('
|
|
505
|
+
throw new Error('operation completed without a result.');
|
|
491
506
|
}
|
|
492
507
|
return resp;
|
|
493
508
|
}
|
|
494
509
|
|
|
495
|
-
|
|
496
|
-
|
|
510
|
+
/** Get a provider in the Databricks Marketplace with at least one visible listing. */
|
|
511
|
+
async getPublishedProviderForConsumer(
|
|
512
|
+
req: GetPublishedProviderForConsumer,
|
|
497
513
|
options?: CallOptions
|
|
498
|
-
):
|
|
499
|
-
const
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
514
|
+
): Promise<GetPublishedProviderForConsumer_Response> {
|
|
515
|
+
const url = `${this.host}/api/2.0/marketplace-consumer/providers/${req.id ?? ''}`;
|
|
516
|
+
let resp: GetPublishedProviderForConsumer_Response | undefined;
|
|
517
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
518
|
+
const headers = new Headers();
|
|
519
|
+
if (this.workspaceId !== undefined) {
|
|
520
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
504
521
|
}
|
|
505
|
-
|
|
506
|
-
|
|
522
|
+
headers.set('User-Agent', this.userAgent);
|
|
523
|
+
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
524
|
+
const respBody = await executeHttpCall({
|
|
525
|
+
request: httpReq,
|
|
526
|
+
httpClient: this.httpClient,
|
|
527
|
+
logger: this.logger,
|
|
528
|
+
});
|
|
529
|
+
resp = parseResponse(
|
|
530
|
+
respBody,
|
|
531
|
+
unmarshalGetPublishedProviderForConsumer_ResponseSchema
|
|
532
|
+
);
|
|
533
|
+
};
|
|
534
|
+
await executeCall(call, options);
|
|
535
|
+
if (resp === undefined) {
|
|
536
|
+
throw new Error('operation completed without a result.');
|
|
537
|
+
}
|
|
538
|
+
return resp;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/** Install payload associated with a Databricks Marketplace listing. */
|
|
542
|
+
async installListing(
|
|
543
|
+
req: InstallListing,
|
|
544
|
+
options?: CallOptions
|
|
545
|
+
): Promise<InstallListing_Response> {
|
|
546
|
+
const url = `${this.host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/installations`;
|
|
547
|
+
const body = marshalRequest(req, marshalInstallListingSchema);
|
|
548
|
+
let resp: InstallListing_Response | undefined;
|
|
549
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
550
|
+
const headers = new Headers({'Content-Type': 'application/json'});
|
|
551
|
+
if (this.workspaceId !== undefined) {
|
|
552
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
507
553
|
}
|
|
508
|
-
|
|
554
|
+
headers.set('User-Agent', this.userAgent);
|
|
555
|
+
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
556
|
+
const respBody = await executeHttpCall({
|
|
557
|
+
request: httpReq,
|
|
558
|
+
httpClient: this.httpClient,
|
|
559
|
+
logger: this.logger,
|
|
560
|
+
});
|
|
561
|
+
resp = parseResponse(respBody, unmarshalInstallListing_ResponseSchema);
|
|
562
|
+
};
|
|
563
|
+
await executeCall(call, options);
|
|
564
|
+
if (resp === undefined) {
|
|
565
|
+
throw new Error('operation completed without a result.');
|
|
509
566
|
}
|
|
567
|
+
return resp;
|
|
510
568
|
}
|
|
511
569
|
|
|
512
|
-
/**
|
|
513
|
-
async
|
|
514
|
-
req:
|
|
570
|
+
/** List all installations across all listings. */
|
|
571
|
+
async listInstallations(
|
|
572
|
+
req: ListInstallationsRequest,
|
|
515
573
|
options?: CallOptions
|
|
516
|
-
): Promise<
|
|
517
|
-
const url = `${this.host}/api/2.0/marketplace-consumer/
|
|
574
|
+
): Promise<ListInstallationsRequest_Response> {
|
|
575
|
+
const url = `${this.host}/api/2.0/marketplace-consumer/installations`;
|
|
518
576
|
const params = new URLSearchParams();
|
|
519
577
|
if (req.pageToken !== undefined) {
|
|
520
578
|
params.append('page_token', req.pageToken);
|
|
@@ -524,8 +582,8 @@ export class MarketplacesClient {
|
|
|
524
582
|
}
|
|
525
583
|
const query = params.toString();
|
|
526
584
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
527
|
-
let resp:
|
|
528
|
-
const call
|
|
585
|
+
let resp: ListInstallationsRequest_Response | undefined;
|
|
586
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
529
587
|
const headers = new Headers();
|
|
530
588
|
if (this.workspaceId !== undefined) {
|
|
531
589
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -537,23 +595,26 @@ export class MarketplacesClient {
|
|
|
537
595
|
httpClient: this.httpClient,
|
|
538
596
|
logger: this.logger,
|
|
539
597
|
});
|
|
540
|
-
resp = parseResponse(
|
|
598
|
+
resp = parseResponse(
|
|
599
|
+
respBody,
|
|
600
|
+
unmarshalListInstallationsRequest_ResponseSchema
|
|
601
|
+
);
|
|
541
602
|
};
|
|
542
603
|
await executeCall(call, options);
|
|
543
604
|
if (resp === undefined) {
|
|
544
|
-
throw new Error('
|
|
605
|
+
throw new Error('operation completed without a result.');
|
|
545
606
|
}
|
|
546
607
|
return resp;
|
|
547
608
|
}
|
|
548
609
|
|
|
549
|
-
async *
|
|
550
|
-
req:
|
|
610
|
+
async *listInstallationsIter(
|
|
611
|
+
req: ListInstallationsRequest,
|
|
551
612
|
options?: CallOptions
|
|
552
|
-
): AsyncGenerator<
|
|
553
|
-
const pageReq:
|
|
613
|
+
): AsyncGenerator<InstallationDetail> {
|
|
614
|
+
const pageReq: ListInstallationsRequest = {...req};
|
|
554
615
|
for (;;) {
|
|
555
|
-
const resp = await this.
|
|
556
|
-
for (const item of resp.
|
|
616
|
+
const resp = await this.listInstallations(pageReq, options);
|
|
617
|
+
for (const item of resp.installations ?? []) {
|
|
557
618
|
yield item;
|
|
558
619
|
}
|
|
559
620
|
if (resp.nextPageToken === undefined || resp.nextPageToken === '') {
|
|
@@ -568,10 +629,10 @@ export class MarketplacesClient {
|
|
|
568
629
|
* Standard installations contain metadata about the attached share or git repo. Only one of these fields will be present.
|
|
569
630
|
* Personalized installations contain metadata about the attached share or git repo, as well as the Delta Sharing recipient type.
|
|
570
631
|
*/
|
|
571
|
-
async
|
|
572
|
-
req:
|
|
632
|
+
async listListingFulfillments(
|
|
633
|
+
req: ListListingFulfillmentsRequest,
|
|
573
634
|
options?: CallOptions
|
|
574
|
-
): Promise<
|
|
635
|
+
): Promise<ListListingFulfillmentsRequest_Response> {
|
|
575
636
|
const url = `${this.host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/fulfillments`;
|
|
576
637
|
const params = new URLSearchParams();
|
|
577
638
|
if (req.pageToken !== undefined) {
|
|
@@ -582,8 +643,8 @@ export class MarketplacesClient {
|
|
|
582
643
|
}
|
|
583
644
|
const query = params.toString();
|
|
584
645
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
585
|
-
let resp:
|
|
586
|
-
const call
|
|
646
|
+
let resp: ListListingFulfillmentsRequest_Response | undefined;
|
|
647
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
587
648
|
const headers = new Headers();
|
|
588
649
|
if (this.workspaceId !== undefined) {
|
|
589
650
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -597,23 +658,23 @@ export class MarketplacesClient {
|
|
|
597
658
|
});
|
|
598
659
|
resp = parseResponse(
|
|
599
660
|
respBody,
|
|
600
|
-
|
|
661
|
+
unmarshalListListingFulfillmentsRequest_ResponseSchema
|
|
601
662
|
);
|
|
602
663
|
};
|
|
603
664
|
await executeCall(call, options);
|
|
604
665
|
if (resp === undefined) {
|
|
605
|
-
throw new Error('
|
|
666
|
+
throw new Error('operation completed without a result.');
|
|
606
667
|
}
|
|
607
668
|
return resp;
|
|
608
669
|
}
|
|
609
670
|
|
|
610
|
-
async *
|
|
611
|
-
req:
|
|
671
|
+
async *listListingFulfillmentsIter(
|
|
672
|
+
req: ListListingFulfillmentsRequest,
|
|
612
673
|
options?: CallOptions
|
|
613
674
|
): AsyncGenerator<ListingFulfillment> {
|
|
614
|
-
const pageReq:
|
|
675
|
+
const pageReq: ListListingFulfillmentsRequest = {...req};
|
|
615
676
|
for (;;) {
|
|
616
|
-
const resp = await this.
|
|
677
|
+
const resp = await this.listListingFulfillments(pageReq, options);
|
|
617
678
|
for (const item of resp.fulfillments ?? []) {
|
|
618
679
|
yield item;
|
|
619
680
|
}
|
|
@@ -624,20 +685,31 @@ export class MarketplacesClient {
|
|
|
624
685
|
}
|
|
625
686
|
}
|
|
626
687
|
|
|
627
|
-
/**
|
|
628
|
-
async
|
|
629
|
-
req:
|
|
688
|
+
/** List personalization requests for a consumer across all listings. */
|
|
689
|
+
async listPersonalizationRequestsForConsumer(
|
|
690
|
+
req: ListPersonalizationRequestsForConsumerRequest,
|
|
630
691
|
options?: CallOptions
|
|
631
|
-
): Promise<
|
|
632
|
-
const url = `${this.host}/api/2.0/marketplace-consumer/
|
|
633
|
-
|
|
634
|
-
|
|
692
|
+
): Promise<ListPersonalizationRequestsForConsumerRequest_Response> {
|
|
693
|
+
const url = `${this.host}/api/2.0/marketplace-consumer/personalization-requests`;
|
|
694
|
+
const params = new URLSearchParams();
|
|
695
|
+
if (req.pageToken !== undefined) {
|
|
696
|
+
params.append('page_token', req.pageToken);
|
|
697
|
+
}
|
|
698
|
+
if (req.pageSize !== undefined) {
|
|
699
|
+
params.append('page_size', String(req.pageSize));
|
|
700
|
+
}
|
|
701
|
+
const query = params.toString();
|
|
702
|
+
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
703
|
+
let resp:
|
|
704
|
+
| ListPersonalizationRequestsForConsumerRequest_Response
|
|
705
|
+
| undefined;
|
|
706
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
635
707
|
const headers = new Headers();
|
|
636
708
|
if (this.workspaceId !== undefined) {
|
|
637
709
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
638
710
|
}
|
|
639
711
|
headers.set('User-Agent', this.userAgent);
|
|
640
|
-
const httpReq = buildHttpRequest('GET',
|
|
712
|
+
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
641
713
|
const respBody = await executeHttpCall({
|
|
642
714
|
request: httpReq,
|
|
643
715
|
httpClient: this.httpClient,
|
|
@@ -645,52 +717,41 @@ export class MarketplacesClient {
|
|
|
645
717
|
});
|
|
646
718
|
resp = parseResponse(
|
|
647
719
|
respBody,
|
|
648
|
-
|
|
720
|
+
unmarshalListPersonalizationRequestsForConsumerRequest_ResponseSchema
|
|
649
721
|
);
|
|
650
722
|
};
|
|
651
723
|
await executeCall(call, options);
|
|
652
724
|
if (resp === undefined) {
|
|
653
|
-
throw new Error('
|
|
725
|
+
throw new Error('operation completed without a result.');
|
|
654
726
|
}
|
|
655
727
|
return resp;
|
|
656
728
|
}
|
|
657
729
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
req: GetPublishedListingForConsumer,
|
|
730
|
+
async *listPersonalizationRequestsForConsumerIter(
|
|
731
|
+
req: ListPersonalizationRequestsForConsumerRequest,
|
|
661
732
|
options?: CallOptions
|
|
662
|
-
):
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
669
|
-
}
|
|
670
|
-
headers.set('User-Agent', this.userAgent);
|
|
671
|
-
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
672
|
-
const respBody = await executeHttpCall({
|
|
673
|
-
request: httpReq,
|
|
674
|
-
httpClient: this.httpClient,
|
|
675
|
-
logger: this.logger,
|
|
676
|
-
});
|
|
677
|
-
resp = parseResponse(
|
|
678
|
-
respBody,
|
|
679
|
-
unmarshalGetPublishedListingForConsumer_ResponseSchema
|
|
733
|
+
): AsyncGenerator<PersonalizationRequest> {
|
|
734
|
+
const pageReq: ListPersonalizationRequestsForConsumerRequest = {...req};
|
|
735
|
+
for (;;) {
|
|
736
|
+
const resp = await this.listPersonalizationRequestsForConsumer(
|
|
737
|
+
pageReq,
|
|
738
|
+
options
|
|
680
739
|
);
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
740
|
+
for (const item of resp.personalizationRequests ?? []) {
|
|
741
|
+
yield item;
|
|
742
|
+
}
|
|
743
|
+
if (resp.nextPageToken === undefined || resp.nextPageToken === '') {
|
|
744
|
+
return;
|
|
745
|
+
}
|
|
746
|
+
pageReq.pageToken = resp.nextPageToken;
|
|
685
747
|
}
|
|
686
|
-
return resp;
|
|
687
748
|
}
|
|
688
749
|
|
|
689
750
|
/** List all published listings in the Databricks Marketplace that the consumer has access to. */
|
|
690
|
-
async
|
|
691
|
-
req:
|
|
751
|
+
async listPublishedListingsForConsumer(
|
|
752
|
+
req: ListPublishedListingsForConsumerRequest,
|
|
692
753
|
options?: CallOptions
|
|
693
|
-
): Promise<
|
|
754
|
+
): Promise<ListPublishedListingsForConsumerRequest_Response> {
|
|
694
755
|
const url = `${this.host}/api/2.0/marketplace-consumer/listings`;
|
|
695
756
|
const params = new URLSearchParams();
|
|
696
757
|
if (req.pageToken !== undefined) {
|
|
@@ -726,8 +787,8 @@ export class MarketplacesClient {
|
|
|
726
787
|
}
|
|
727
788
|
const query = params.toString();
|
|
728
789
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
729
|
-
let resp:
|
|
730
|
-
const call
|
|
790
|
+
let resp: ListPublishedListingsForConsumerRequest_Response | undefined;
|
|
791
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
731
792
|
const headers = new Headers();
|
|
732
793
|
if (this.workspaceId !== undefined) {
|
|
733
794
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -741,23 +802,26 @@ export class MarketplacesClient {
|
|
|
741
802
|
});
|
|
742
803
|
resp = parseResponse(
|
|
743
804
|
respBody,
|
|
744
|
-
|
|
805
|
+
unmarshalListPublishedListingsForConsumerRequest_ResponseSchema
|
|
745
806
|
);
|
|
746
807
|
};
|
|
747
808
|
await executeCall(call, options);
|
|
748
809
|
if (resp === undefined) {
|
|
749
|
-
throw new Error('
|
|
810
|
+
throw new Error('operation completed without a result.');
|
|
750
811
|
}
|
|
751
812
|
return resp;
|
|
752
813
|
}
|
|
753
814
|
|
|
754
|
-
async *
|
|
755
|
-
req:
|
|
815
|
+
async *listPublishedListingsForConsumerIter(
|
|
816
|
+
req: ListPublishedListingsForConsumerRequest,
|
|
756
817
|
options?: CallOptions
|
|
757
818
|
): AsyncGenerator<Listing> {
|
|
758
|
-
const pageReq:
|
|
819
|
+
const pageReq: ListPublishedListingsForConsumerRequest = {...req};
|
|
759
820
|
for (;;) {
|
|
760
|
-
const resp = await this.
|
|
821
|
+
const resp = await this.listPublishedListingsForConsumer(
|
|
822
|
+
pageReq,
|
|
823
|
+
options
|
|
824
|
+
);
|
|
761
825
|
for (const item of resp.listings ?? []) {
|
|
762
826
|
yield item;
|
|
763
827
|
}
|
|
@@ -768,66 +832,6 @@ export class MarketplacesClient {
|
|
|
768
832
|
}
|
|
769
833
|
}
|
|
770
834
|
|
|
771
|
-
/** Get a provider in the Databricks Marketplace with at least one visible listing. */
|
|
772
|
-
async getPublishedProviderForConsumer(
|
|
773
|
-
req: GetPublishedProviderForConsumer,
|
|
774
|
-
options?: CallOptions
|
|
775
|
-
): Promise<GetPublishedProviderForConsumer_Response> {
|
|
776
|
-
const url = `${this.host}/api/2.0/marketplace-consumer/providers/${req.id ?? ''}`;
|
|
777
|
-
let resp: GetPublishedProviderForConsumer_Response | undefined;
|
|
778
|
-
const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
779
|
-
const headers = new Headers();
|
|
780
|
-
if (this.workspaceId !== undefined) {
|
|
781
|
-
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
782
|
-
}
|
|
783
|
-
headers.set('User-Agent', this.userAgent);
|
|
784
|
-
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
785
|
-
const respBody = await executeHttpCall({
|
|
786
|
-
request: httpReq,
|
|
787
|
-
httpClient: this.httpClient,
|
|
788
|
-
logger: this.logger,
|
|
789
|
-
});
|
|
790
|
-
resp = parseResponse(
|
|
791
|
-
respBody,
|
|
792
|
-
unmarshalGetPublishedProviderForConsumer_ResponseSchema
|
|
793
|
-
);
|
|
794
|
-
};
|
|
795
|
-
await executeCall(call, options);
|
|
796
|
-
if (resp === undefined) {
|
|
797
|
-
throw new Error('API call completed without a result.');
|
|
798
|
-
}
|
|
799
|
-
return resp;
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
/** Install payload associated with a Databricks Marketplace listing. */
|
|
803
|
-
async installListing(
|
|
804
|
-
req: InstallListing,
|
|
805
|
-
options?: CallOptions
|
|
806
|
-
): Promise<InstallListing_Response> {
|
|
807
|
-
const url = `${this.host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/installations`;
|
|
808
|
-
const body = marshalRequest(req, marshalInstallListingSchema);
|
|
809
|
-
let resp: InstallListing_Response | undefined;
|
|
810
|
-
const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
811
|
-
const headers = new Headers({'Content-Type': 'application/json'});
|
|
812
|
-
if (this.workspaceId !== undefined) {
|
|
813
|
-
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
814
|
-
}
|
|
815
|
-
headers.set('User-Agent', this.userAgent);
|
|
816
|
-
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
817
|
-
const respBody = await executeHttpCall({
|
|
818
|
-
request: httpReq,
|
|
819
|
-
httpClient: this.httpClient,
|
|
820
|
-
logger: this.logger,
|
|
821
|
-
});
|
|
822
|
-
resp = parseResponse(respBody, unmarshalInstallListing_ResponseSchema);
|
|
823
|
-
};
|
|
824
|
-
await executeCall(call, options);
|
|
825
|
-
if (resp === undefined) {
|
|
826
|
-
throw new Error('API call completed without a result.');
|
|
827
|
-
}
|
|
828
|
-
return resp;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
835
|
/** List all providers in the Databricks Marketplace with at least one visible listing. */
|
|
832
836
|
async listPublishedProvidersForConsumer(
|
|
833
837
|
req: ListPublishedProvidersForConsumer,
|
|
@@ -847,7 +851,7 @@ export class MarketplacesClient {
|
|
|
847
851
|
const query = params.toString();
|
|
848
852
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
849
853
|
let resp: ListPublishedProvidersForConsumer_Response | undefined;
|
|
850
|
-
const call
|
|
854
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
851
855
|
const headers = new Headers();
|
|
852
856
|
if (this.workspaceId !== undefined) {
|
|
853
857
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -866,7 +870,7 @@ export class MarketplacesClient {
|
|
|
866
870
|
};
|
|
867
871
|
await executeCall(call, options);
|
|
868
872
|
if (resp === undefined) {
|
|
869
|
-
throw new Error('
|
|
873
|
+
throw new Error('operation completed without a result.');
|
|
870
874
|
}
|
|
871
875
|
return resp;
|
|
872
876
|
}
|
|
@@ -928,7 +932,7 @@ export class MarketplacesClient {
|
|
|
928
932
|
const query = params.toString();
|
|
929
933
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
930
934
|
let resp: SearchPublishedListingsForConsumer_Response | undefined;
|
|
931
|
-
const call
|
|
935
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
932
936
|
const headers = new Headers();
|
|
933
937
|
if (this.workspaceId !== undefined) {
|
|
934
938
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -947,7 +951,7 @@ export class MarketplacesClient {
|
|
|
947
951
|
};
|
|
948
952
|
await executeCall(call, options);
|
|
949
953
|
if (resp === undefined) {
|
|
950
|
-
throw new Error('
|
|
954
|
+
throw new Error('operation completed without a result.');
|
|
951
955
|
}
|
|
952
956
|
return resp;
|
|
953
957
|
}
|
|
@@ -979,7 +983,7 @@ export class MarketplacesClient {
|
|
|
979
983
|
): Promise<UninstallListing_Response> {
|
|
980
984
|
const url = `${this.host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/installations/${req.installationId ?? ''}`;
|
|
981
985
|
let resp: UninstallListing_Response | undefined;
|
|
982
|
-
const call
|
|
986
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
983
987
|
const headers = new Headers();
|
|
984
988
|
if (this.workspaceId !== undefined) {
|
|
985
989
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -995,7 +999,7 @@ export class MarketplacesClient {
|
|
|
995
999
|
};
|
|
996
1000
|
await executeCall(call, options);
|
|
997
1001
|
if (resp === undefined) {
|
|
998
|
-
throw new Error('
|
|
1002
|
+
throw new Error('operation completed without a result.');
|
|
999
1003
|
}
|
|
1000
1004
|
return resp;
|
|
1001
1005
|
}
|
|
@@ -1013,7 +1017,7 @@ export class MarketplacesClient {
|
|
|
1013
1017
|
const url = `${this.host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/installations/${req.installationId ?? ''}`;
|
|
1014
1018
|
const body = marshalRequest(req, marshalUpdateInstallationDetailSchema);
|
|
1015
1019
|
let resp: UpdateInstallationDetail_Response | undefined;
|
|
1016
|
-
const call
|
|
1020
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1017
1021
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1018
1022
|
if (this.workspaceId !== undefined) {
|
|
1019
1023
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1032,7 +1036,7 @@ export class MarketplacesClient {
|
|
|
1032
1036
|
};
|
|
1033
1037
|
await executeCall(call, options);
|
|
1034
1038
|
if (resp === undefined) {
|
|
1035
|
-
throw new Error('
|
|
1039
|
+
throw new Error('operation completed without a result.');
|
|
1036
1040
|
}
|
|
1037
1041
|
return resp;
|
|
1038
1042
|
}
|
|
@@ -1045,7 +1049,7 @@ export class MarketplacesClient {
|
|
|
1045
1049
|
const url = `${this.host}/api/2.0/marketplace-exchange/exchanges-for-listing`;
|
|
1046
1050
|
const body = marshalRequest(req, marshalAddExchangeForListingRequestSchema);
|
|
1047
1051
|
let resp: AddExchangeForListingResponse | undefined;
|
|
1048
|
-
const call
|
|
1052
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1049
1053
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1050
1054
|
if (this.workspaceId !== undefined) {
|
|
1051
1055
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1064,7 +1068,7 @@ export class MarketplacesClient {
|
|
|
1064
1068
|
};
|
|
1065
1069
|
await executeCall(call, options);
|
|
1066
1070
|
if (resp === undefined) {
|
|
1067
|
-
throw new Error('
|
|
1071
|
+
throw new Error('operation completed without a result.');
|
|
1068
1072
|
}
|
|
1069
1073
|
return resp;
|
|
1070
1074
|
}
|
|
@@ -1077,7 +1081,7 @@ export class MarketplacesClient {
|
|
|
1077
1081
|
const url = `${this.host}/api/2.0/marketplace-exchange/exchanges`;
|
|
1078
1082
|
const body = marshalRequest(req, marshalCreateExchangeRequestSchema);
|
|
1079
1083
|
let resp: CreateExchangeResponse | undefined;
|
|
1080
|
-
const call
|
|
1084
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1081
1085
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1082
1086
|
if (this.workspaceId !== undefined) {
|
|
1083
1087
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1093,7 +1097,7 @@ export class MarketplacesClient {
|
|
|
1093
1097
|
};
|
|
1094
1098
|
await executeCall(call, options);
|
|
1095
1099
|
if (resp === undefined) {
|
|
1096
|
-
throw new Error('
|
|
1100
|
+
throw new Error('operation completed without a result.');
|
|
1097
1101
|
}
|
|
1098
1102
|
return resp;
|
|
1099
1103
|
}
|
|
@@ -1106,7 +1110,7 @@ export class MarketplacesClient {
|
|
|
1106
1110
|
const url = `${this.host}/api/2.0/marketplace-exchange/filters`;
|
|
1107
1111
|
const body = marshalRequest(req, marshalCreateExchangeFilterRequestSchema);
|
|
1108
1112
|
let resp: CreateExchangeFilterResponse | undefined;
|
|
1109
|
-
const call
|
|
1113
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1110
1114
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1111
1115
|
if (this.workspaceId !== undefined) {
|
|
1112
1116
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1125,7 +1129,7 @@ export class MarketplacesClient {
|
|
|
1125
1129
|
};
|
|
1126
1130
|
await executeCall(call, options);
|
|
1127
1131
|
if (resp === undefined) {
|
|
1128
|
-
throw new Error('
|
|
1132
|
+
throw new Error('operation completed without a result.');
|
|
1129
1133
|
}
|
|
1130
1134
|
return resp;
|
|
1131
1135
|
}
|
|
@@ -1138,7 +1142,7 @@ export class MarketplacesClient {
|
|
|
1138
1142
|
const url = `${this.host}/api/2.0/marketplace-provider/files`;
|
|
1139
1143
|
const body = marshalRequest(req, marshalCreateFileRequestSchema);
|
|
1140
1144
|
let resp: CreateFileRequest_Response | undefined;
|
|
1141
|
-
const call
|
|
1145
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1142
1146
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1143
1147
|
if (this.workspaceId !== undefined) {
|
|
1144
1148
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1154,7 +1158,7 @@ export class MarketplacesClient {
|
|
|
1154
1158
|
};
|
|
1155
1159
|
await executeCall(call, options);
|
|
1156
1160
|
if (resp === undefined) {
|
|
1157
|
-
throw new Error('
|
|
1161
|
+
throw new Error('operation completed without a result.');
|
|
1158
1162
|
}
|
|
1159
1163
|
return resp;
|
|
1160
1164
|
}
|
|
@@ -1167,7 +1171,7 @@ export class MarketplacesClient {
|
|
|
1167
1171
|
const url = `${this.host}/api/2.0/marketplace-provider/listing`;
|
|
1168
1172
|
const body = marshalRequest(req, marshalCreateListingRequestSchema);
|
|
1169
1173
|
let resp: CreateListingRequest_Response | undefined;
|
|
1170
|
-
const call
|
|
1174
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1171
1175
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1172
1176
|
if (this.workspaceId !== undefined) {
|
|
1173
1177
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1186,7 +1190,7 @@ export class MarketplacesClient {
|
|
|
1186
1190
|
};
|
|
1187
1191
|
await executeCall(call, options);
|
|
1188
1192
|
if (resp === undefined) {
|
|
1189
|
-
throw new Error('
|
|
1193
|
+
throw new Error('operation completed without a result.');
|
|
1190
1194
|
}
|
|
1191
1195
|
return resp;
|
|
1192
1196
|
}
|
|
@@ -1199,7 +1203,7 @@ export class MarketplacesClient {
|
|
|
1199
1203
|
const url = `${this.host}/api/2.0/marketplace-provider/provider`;
|
|
1200
1204
|
const body = marshalRequest(req, marshalCreateProviderRequestSchema);
|
|
1201
1205
|
let resp: CreateProviderRequest_Response | undefined;
|
|
1202
|
-
const call
|
|
1206
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1203
1207
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1204
1208
|
if (this.workspaceId !== undefined) {
|
|
1205
1209
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1218,7 +1222,7 @@ export class MarketplacesClient {
|
|
|
1218
1222
|
};
|
|
1219
1223
|
await executeCall(call, options);
|
|
1220
1224
|
if (resp === undefined) {
|
|
1221
|
-
throw new Error('
|
|
1225
|
+
throw new Error('operation completed without a result.');
|
|
1222
1226
|
}
|
|
1223
1227
|
return resp;
|
|
1224
1228
|
}
|
|
@@ -1234,7 +1238,7 @@ export class MarketplacesClient {
|
|
|
1234
1238
|
marshalCreateProviderAnalyticsDashboardRequestSchema
|
|
1235
1239
|
);
|
|
1236
1240
|
let resp: CreateProviderAnalyticsDashboardRequest_Response | undefined;
|
|
1237
|
-
const call
|
|
1241
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1238
1242
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
1239
1243
|
if (this.workspaceId !== undefined) {
|
|
1240
1244
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1253,7 +1257,7 @@ export class MarketplacesClient {
|
|
|
1253
1257
|
};
|
|
1254
1258
|
await executeCall(call, options);
|
|
1255
1259
|
if (resp === undefined) {
|
|
1256
|
-
throw new Error('
|
|
1260
|
+
throw new Error('operation completed without a result.');
|
|
1257
1261
|
}
|
|
1258
1262
|
return resp;
|
|
1259
1263
|
}
|
|
@@ -1265,7 +1269,7 @@ export class MarketplacesClient {
|
|
|
1265
1269
|
): Promise<DeleteExchangeResponse> {
|
|
1266
1270
|
const url = `${this.host}/api/2.0/marketplace-exchange/exchanges/${req.id ?? ''}`;
|
|
1267
1271
|
let resp: DeleteExchangeResponse | undefined;
|
|
1268
|
-
const call
|
|
1272
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1269
1273
|
const headers = new Headers();
|
|
1270
1274
|
if (this.workspaceId !== undefined) {
|
|
1271
1275
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1281,7 +1285,7 @@ export class MarketplacesClient {
|
|
|
1281
1285
|
};
|
|
1282
1286
|
await executeCall(call, options);
|
|
1283
1287
|
if (resp === undefined) {
|
|
1284
|
-
throw new Error('
|
|
1288
|
+
throw new Error('operation completed without a result.');
|
|
1285
1289
|
}
|
|
1286
1290
|
return resp;
|
|
1287
1291
|
}
|
|
@@ -1293,7 +1297,7 @@ export class MarketplacesClient {
|
|
|
1293
1297
|
): Promise<DeleteExchangeFilterResponse> {
|
|
1294
1298
|
const url = `${this.host}/api/2.0/marketplace-exchange/filters/${req.id ?? ''}`;
|
|
1295
1299
|
let resp: DeleteExchangeFilterResponse | undefined;
|
|
1296
|
-
const call
|
|
1300
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1297
1301
|
const headers = new Headers();
|
|
1298
1302
|
if (this.workspaceId !== undefined) {
|
|
1299
1303
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1312,7 +1316,7 @@ export class MarketplacesClient {
|
|
|
1312
1316
|
};
|
|
1313
1317
|
await executeCall(call, options);
|
|
1314
1318
|
if (resp === undefined) {
|
|
1315
|
-
throw new Error('
|
|
1319
|
+
throw new Error('operation completed without a result.');
|
|
1316
1320
|
}
|
|
1317
1321
|
return resp;
|
|
1318
1322
|
}
|
|
@@ -1324,7 +1328,7 @@ export class MarketplacesClient {
|
|
|
1324
1328
|
): Promise<DeleteFileRequest_Response> {
|
|
1325
1329
|
const url = `${this.host}/api/2.0/marketplace-provider/files/${req.fileId ?? ''}`;
|
|
1326
1330
|
let resp: DeleteFileRequest_Response | undefined;
|
|
1327
|
-
const call
|
|
1331
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1328
1332
|
const headers = new Headers();
|
|
1329
1333
|
if (this.workspaceId !== undefined) {
|
|
1330
1334
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1340,7 +1344,7 @@ export class MarketplacesClient {
|
|
|
1340
1344
|
};
|
|
1341
1345
|
await executeCall(call, options);
|
|
1342
1346
|
if (resp === undefined) {
|
|
1343
|
-
throw new Error('
|
|
1347
|
+
throw new Error('operation completed without a result.');
|
|
1344
1348
|
}
|
|
1345
1349
|
return resp;
|
|
1346
1350
|
}
|
|
@@ -1352,7 +1356,7 @@ export class MarketplacesClient {
|
|
|
1352
1356
|
): Promise<DeleteListingRequest_Response> {
|
|
1353
1357
|
const url = `${this.host}/api/2.0/marketplace-provider/listings/${req.id ?? ''}`;
|
|
1354
1358
|
let resp: DeleteListingRequest_Response | undefined;
|
|
1355
|
-
const call
|
|
1359
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1356
1360
|
const headers = new Headers();
|
|
1357
1361
|
if (this.workspaceId !== undefined) {
|
|
1358
1362
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1371,7 +1375,7 @@ export class MarketplacesClient {
|
|
|
1371
1375
|
};
|
|
1372
1376
|
await executeCall(call, options);
|
|
1373
1377
|
if (resp === undefined) {
|
|
1374
|
-
throw new Error('
|
|
1378
|
+
throw new Error('operation completed without a result.');
|
|
1375
1379
|
}
|
|
1376
1380
|
return resp;
|
|
1377
1381
|
}
|
|
@@ -1383,7 +1387,7 @@ export class MarketplacesClient {
|
|
|
1383
1387
|
): Promise<DeleteProviderRequest_Response> {
|
|
1384
1388
|
const url = `${this.host}/api/2.0/marketplace-provider/providers/${req.id ?? ''}`;
|
|
1385
1389
|
let resp: DeleteProviderRequest_Response | undefined;
|
|
1386
|
-
const call
|
|
1390
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1387
1391
|
const headers = new Headers();
|
|
1388
1392
|
if (this.workspaceId !== undefined) {
|
|
1389
1393
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1402,7 +1406,7 @@ export class MarketplacesClient {
|
|
|
1402
1406
|
};
|
|
1403
1407
|
await executeCall(call, options);
|
|
1404
1408
|
if (resp === undefined) {
|
|
1405
|
-
throw new Error('
|
|
1409
|
+
throw new Error('operation completed without a result.');
|
|
1406
1410
|
}
|
|
1407
1411
|
return resp;
|
|
1408
1412
|
}
|
|
@@ -1414,7 +1418,7 @@ export class MarketplacesClient {
|
|
|
1414
1418
|
): Promise<GetExchangeResponse> {
|
|
1415
1419
|
const url = `${this.host}/api/2.0/marketplace-exchange/exchanges/${req.id ?? ''}`;
|
|
1416
1420
|
let resp: GetExchangeResponse | undefined;
|
|
1417
|
-
const call
|
|
1421
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1418
1422
|
const headers = new Headers();
|
|
1419
1423
|
if (this.workspaceId !== undefined) {
|
|
1420
1424
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1430,7 +1434,7 @@ export class MarketplacesClient {
|
|
|
1430
1434
|
};
|
|
1431
1435
|
await executeCall(call, options);
|
|
1432
1436
|
if (resp === undefined) {
|
|
1433
|
-
throw new Error('
|
|
1437
|
+
throw new Error('operation completed without a result.');
|
|
1434
1438
|
}
|
|
1435
1439
|
return resp;
|
|
1436
1440
|
}
|
|
@@ -1442,7 +1446,7 @@ export class MarketplacesClient {
|
|
|
1442
1446
|
): Promise<GetFileRequest_Response> {
|
|
1443
1447
|
const url = `${this.host}/api/2.0/marketplace-provider/files/${req.fileId ?? ''}`;
|
|
1444
1448
|
let resp: GetFileRequest_Response | undefined;
|
|
1445
|
-
const call
|
|
1449
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1446
1450
|
const headers = new Headers();
|
|
1447
1451
|
if (this.workspaceId !== undefined) {
|
|
1448
1452
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1458,7 +1462,7 @@ export class MarketplacesClient {
|
|
|
1458
1462
|
};
|
|
1459
1463
|
await executeCall(call, options);
|
|
1460
1464
|
if (resp === undefined) {
|
|
1461
|
-
throw new Error('
|
|
1465
|
+
throw new Error('operation completed without a result.');
|
|
1462
1466
|
}
|
|
1463
1467
|
return resp;
|
|
1464
1468
|
}
|
|
@@ -1472,7 +1476,7 @@ export class MarketplacesClient {
|
|
|
1472
1476
|
let resp:
|
|
1473
1477
|
| GetLatestVersionProviderAnalyticsDashboardRequest_Response
|
|
1474
1478
|
| undefined;
|
|
1475
|
-
const call
|
|
1479
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1476
1480
|
const headers = new Headers();
|
|
1477
1481
|
if (this.workspaceId !== undefined) {
|
|
1478
1482
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1491,7 +1495,7 @@ export class MarketplacesClient {
|
|
|
1491
1495
|
};
|
|
1492
1496
|
await executeCall(call, options);
|
|
1493
1497
|
if (resp === undefined) {
|
|
1494
|
-
throw new Error('
|
|
1498
|
+
throw new Error('operation completed without a result.');
|
|
1495
1499
|
}
|
|
1496
1500
|
return resp;
|
|
1497
1501
|
}
|
|
@@ -1503,7 +1507,7 @@ export class MarketplacesClient {
|
|
|
1503
1507
|
): Promise<GetListingRequest_Response> {
|
|
1504
1508
|
const url = `${this.host}/api/2.0/marketplace-provider/listings/${req.id ?? ''}`;
|
|
1505
1509
|
let resp: GetListingRequest_Response | undefined;
|
|
1506
|
-
const call
|
|
1510
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1507
1511
|
const headers = new Headers();
|
|
1508
1512
|
if (this.workspaceId !== undefined) {
|
|
1509
1513
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1519,68 +1523,11 @@ export class MarketplacesClient {
|
|
|
1519
1523
|
};
|
|
1520
1524
|
await executeCall(call, options);
|
|
1521
1525
|
if (resp === undefined) {
|
|
1522
|
-
throw new Error('
|
|
1526
|
+
throw new Error('operation completed without a result.');
|
|
1523
1527
|
}
|
|
1524
1528
|
return resp;
|
|
1525
1529
|
}
|
|
1526
1530
|
|
|
1527
|
-
/** List listings owned by this provider */
|
|
1528
|
-
async getListings(
|
|
1529
|
-
req: GetListingsRequest,
|
|
1530
|
-
options?: CallOptions
|
|
1531
|
-
): Promise<GetListingsRequest_Response> {
|
|
1532
|
-
const url = `${this.host}/api/2.0/marketplace-provider/listings`;
|
|
1533
|
-
const params = new URLSearchParams();
|
|
1534
|
-
if (req.pageToken !== undefined) {
|
|
1535
|
-
params.append('page_token', req.pageToken);
|
|
1536
|
-
}
|
|
1537
|
-
if (req.pageSize !== undefined) {
|
|
1538
|
-
params.append('page_size', String(req.pageSize));
|
|
1539
|
-
}
|
|
1540
|
-
const query = params.toString();
|
|
1541
|
-
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1542
|
-
let resp: GetListingsRequest_Response | undefined;
|
|
1543
|
-
const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1544
|
-
const headers = new Headers();
|
|
1545
|
-
if (this.workspaceId !== undefined) {
|
|
1546
|
-
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
1547
|
-
}
|
|
1548
|
-
headers.set('User-Agent', this.userAgent);
|
|
1549
|
-
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
1550
|
-
const respBody = await executeHttpCall({
|
|
1551
|
-
request: httpReq,
|
|
1552
|
-
httpClient: this.httpClient,
|
|
1553
|
-
logger: this.logger,
|
|
1554
|
-
});
|
|
1555
|
-
resp = parseResponse(
|
|
1556
|
-
respBody,
|
|
1557
|
-
unmarshalGetListingsRequest_ResponseSchema
|
|
1558
|
-
);
|
|
1559
|
-
};
|
|
1560
|
-
await executeCall(call, options);
|
|
1561
|
-
if (resp === undefined) {
|
|
1562
|
-
throw new Error('API call completed without a result.');
|
|
1563
|
-
}
|
|
1564
|
-
return resp;
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
async *getListingsIter(
|
|
1568
|
-
req: GetListingsRequest,
|
|
1569
|
-
options?: CallOptions
|
|
1570
|
-
): AsyncGenerator<Listing> {
|
|
1571
|
-
const pageReq: GetListingsRequest = {...req};
|
|
1572
|
-
for (;;) {
|
|
1573
|
-
const resp = await this.getListings(pageReq, options);
|
|
1574
|
-
for (const item of resp.listings ?? []) {
|
|
1575
|
-
yield item;
|
|
1576
|
-
}
|
|
1577
|
-
if (resp.nextPageToken === undefined || resp.nextPageToken === '') {
|
|
1578
|
-
return;
|
|
1579
|
-
}
|
|
1580
|
-
pageReq.pageToken = resp.nextPageToken;
|
|
1581
|
-
}
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1584
1531
|
/**
|
|
1585
1532
|
* List personalization requests to this provider.
|
|
1586
1533
|
* This will return all personalization requests, regardless of which listing they are for.
|
|
@@ -1600,7 +1547,7 @@ export class MarketplacesClient {
|
|
|
1600
1547
|
const query = params.toString();
|
|
1601
1548
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1602
1549
|
let resp: GetPersonalizationRequestsForProviderRequest_Response | undefined;
|
|
1603
|
-
const call
|
|
1550
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1604
1551
|
const headers = new Headers();
|
|
1605
1552
|
if (this.workspaceId !== undefined) {
|
|
1606
1553
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1619,7 +1566,7 @@ export class MarketplacesClient {
|
|
|
1619
1566
|
};
|
|
1620
1567
|
await executeCall(call, options);
|
|
1621
1568
|
if (resp === undefined) {
|
|
1622
|
-
throw new Error('
|
|
1569
|
+
throw new Error('operation completed without a result.');
|
|
1623
1570
|
}
|
|
1624
1571
|
return resp;
|
|
1625
1572
|
}
|
|
@@ -1651,7 +1598,7 @@ export class MarketplacesClient {
|
|
|
1651
1598
|
): Promise<GetProviderRequest_Response> {
|
|
1652
1599
|
const url = `${this.host}/api/2.0/marketplace-provider/providers/${req.id ?? ''}`;
|
|
1653
1600
|
let resp: GetProviderRequest_Response | undefined;
|
|
1654
|
-
const call
|
|
1601
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1655
1602
|
const headers = new Headers();
|
|
1656
1603
|
if (this.workspaceId !== undefined) {
|
|
1657
1604
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1670,7 +1617,7 @@ export class MarketplacesClient {
|
|
|
1670
1617
|
};
|
|
1671
1618
|
await executeCall(call, options);
|
|
1672
1619
|
if (resp === undefined) {
|
|
1673
|
-
throw new Error('
|
|
1620
|
+
throw new Error('operation completed without a result.');
|
|
1674
1621
|
}
|
|
1675
1622
|
return resp;
|
|
1676
1623
|
}
|
|
@@ -1694,7 +1641,7 @@ export class MarketplacesClient {
|
|
|
1694
1641
|
const query = params.toString();
|
|
1695
1642
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1696
1643
|
let resp: ListExchangeFiltersResponse | undefined;
|
|
1697
|
-
const call
|
|
1644
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1698
1645
|
const headers = new Headers();
|
|
1699
1646
|
if (this.workspaceId !== undefined) {
|
|
1700
1647
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1713,7 +1660,7 @@ export class MarketplacesClient {
|
|
|
1713
1660
|
};
|
|
1714
1661
|
await executeCall(call, options);
|
|
1715
1662
|
if (resp === undefined) {
|
|
1716
|
-
throw new Error('
|
|
1663
|
+
throw new Error('operation completed without a result.');
|
|
1717
1664
|
}
|
|
1718
1665
|
return resp;
|
|
1719
1666
|
}
|
|
@@ -1751,7 +1698,7 @@ export class MarketplacesClient {
|
|
|
1751
1698
|
const query = params.toString();
|
|
1752
1699
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1753
1700
|
let resp: ListExchangesResponse | undefined;
|
|
1754
|
-
const call
|
|
1701
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1755
1702
|
const headers = new Headers();
|
|
1756
1703
|
if (this.workspaceId !== undefined) {
|
|
1757
1704
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1767,7 +1714,7 @@ export class MarketplacesClient {
|
|
|
1767
1714
|
};
|
|
1768
1715
|
await executeCall(call, options);
|
|
1769
1716
|
if (resp === undefined) {
|
|
1770
|
-
throw new Error('
|
|
1717
|
+
throw new Error('operation completed without a result.');
|
|
1771
1718
|
}
|
|
1772
1719
|
return resp;
|
|
1773
1720
|
}
|
|
@@ -1808,7 +1755,7 @@ export class MarketplacesClient {
|
|
|
1808
1755
|
const query = params.toString();
|
|
1809
1756
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1810
1757
|
let resp: ListExchangesForListingResponse | undefined;
|
|
1811
|
-
const call
|
|
1758
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1812
1759
|
const headers = new Headers();
|
|
1813
1760
|
if (this.workspaceId !== undefined) {
|
|
1814
1761
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1827,7 +1774,7 @@ export class MarketplacesClient {
|
|
|
1827
1774
|
};
|
|
1828
1775
|
await executeCall(call, options);
|
|
1829
1776
|
if (resp === undefined) {
|
|
1830
|
-
throw new Error('
|
|
1777
|
+
throw new Error('operation completed without a result.');
|
|
1831
1778
|
}
|
|
1832
1779
|
return resp;
|
|
1833
1780
|
}
|
|
@@ -1872,7 +1819,7 @@ export class MarketplacesClient {
|
|
|
1872
1819
|
const query = params.toString();
|
|
1873
1820
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1874
1821
|
let resp: ListFilesRequest_Response | undefined;
|
|
1875
|
-
const call
|
|
1822
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1876
1823
|
const headers = new Headers();
|
|
1877
1824
|
if (this.workspaceId !== undefined) {
|
|
1878
1825
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1888,7 +1835,7 @@ export class MarketplacesClient {
|
|
|
1888
1835
|
};
|
|
1889
1836
|
await executeCall(call, options);
|
|
1890
1837
|
if (resp === undefined) {
|
|
1891
|
-
throw new Error('
|
|
1838
|
+
throw new Error('operation completed without a result.');
|
|
1892
1839
|
}
|
|
1893
1840
|
return resp;
|
|
1894
1841
|
}
|
|
@@ -1910,6 +1857,63 @@ export class MarketplacesClient {
|
|
|
1910
1857
|
}
|
|
1911
1858
|
}
|
|
1912
1859
|
|
|
1860
|
+
/** List listings owned by this provider */
|
|
1861
|
+
async listListings(
|
|
1862
|
+
req: ListListingsRequest,
|
|
1863
|
+
options?: CallOptions
|
|
1864
|
+
): Promise<ListListingsRequest_Response> {
|
|
1865
|
+
const url = `${this.host}/api/2.0/marketplace-provider/listings`;
|
|
1866
|
+
const params = new URLSearchParams();
|
|
1867
|
+
if (req.pageToken !== undefined) {
|
|
1868
|
+
params.append('page_token', req.pageToken);
|
|
1869
|
+
}
|
|
1870
|
+
if (req.pageSize !== undefined) {
|
|
1871
|
+
params.append('page_size', String(req.pageSize));
|
|
1872
|
+
}
|
|
1873
|
+
const query = params.toString();
|
|
1874
|
+
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1875
|
+
let resp: ListListingsRequest_Response | undefined;
|
|
1876
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1877
|
+
const headers = new Headers();
|
|
1878
|
+
if (this.workspaceId !== undefined) {
|
|
1879
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
1880
|
+
}
|
|
1881
|
+
headers.set('User-Agent', this.userAgent);
|
|
1882
|
+
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
1883
|
+
const respBody = await executeHttpCall({
|
|
1884
|
+
request: httpReq,
|
|
1885
|
+
httpClient: this.httpClient,
|
|
1886
|
+
logger: this.logger,
|
|
1887
|
+
});
|
|
1888
|
+
resp = parseResponse(
|
|
1889
|
+
respBody,
|
|
1890
|
+
unmarshalListListingsRequest_ResponseSchema
|
|
1891
|
+
);
|
|
1892
|
+
};
|
|
1893
|
+
await executeCall(call, options);
|
|
1894
|
+
if (resp === undefined) {
|
|
1895
|
+
throw new Error('operation completed without a result.');
|
|
1896
|
+
}
|
|
1897
|
+
return resp;
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
async *listListingsIter(
|
|
1901
|
+
req: ListListingsRequest,
|
|
1902
|
+
options?: CallOptions
|
|
1903
|
+
): AsyncGenerator<Listing> {
|
|
1904
|
+
const pageReq: ListListingsRequest = {...req};
|
|
1905
|
+
for (;;) {
|
|
1906
|
+
const resp = await this.listListings(pageReq, options);
|
|
1907
|
+
for (const item of resp.listings ?? []) {
|
|
1908
|
+
yield item;
|
|
1909
|
+
}
|
|
1910
|
+
if (resp.nextPageToken === undefined || resp.nextPageToken === '') {
|
|
1911
|
+
return;
|
|
1912
|
+
}
|
|
1913
|
+
pageReq.pageToken = resp.nextPageToken;
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1913
1917
|
/** List listings associated with an exchange */
|
|
1914
1918
|
async listListingsForExchange(
|
|
1915
1919
|
req: ListListingsForExchangeRequest,
|
|
@@ -1929,7 +1933,7 @@ export class MarketplacesClient {
|
|
|
1929
1933
|
const query = params.toString();
|
|
1930
1934
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
1931
1935
|
let resp: ListListingsForExchangeResponse | undefined;
|
|
1932
|
-
const call
|
|
1936
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1933
1937
|
const headers = new Headers();
|
|
1934
1938
|
if (this.workspaceId !== undefined) {
|
|
1935
1939
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1948,7 +1952,7 @@ export class MarketplacesClient {
|
|
|
1948
1952
|
};
|
|
1949
1953
|
await executeCall(call, options);
|
|
1950
1954
|
if (resp === undefined) {
|
|
1951
|
-
throw new Error('
|
|
1955
|
+
throw new Error('operation completed without a result.');
|
|
1952
1956
|
}
|
|
1953
1957
|
return resp;
|
|
1954
1958
|
}
|
|
@@ -1977,7 +1981,7 @@ export class MarketplacesClient {
|
|
|
1977
1981
|
): Promise<ListProviderAnalyticsDashboardRequest_Response> {
|
|
1978
1982
|
const url = `${this.host}/api/2.0/marketplace-provider/analytics_dashboard`;
|
|
1979
1983
|
let resp: ListProviderAnalyticsDashboardRequest_Response | undefined;
|
|
1980
|
-
const call
|
|
1984
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1981
1985
|
const headers = new Headers();
|
|
1982
1986
|
if (this.workspaceId !== undefined) {
|
|
1983
1987
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -1996,7 +2000,7 @@ export class MarketplacesClient {
|
|
|
1996
2000
|
};
|
|
1997
2001
|
await executeCall(call, options);
|
|
1998
2002
|
if (resp === undefined) {
|
|
1999
|
-
throw new Error('
|
|
2003
|
+
throw new Error('operation completed without a result.');
|
|
2000
2004
|
}
|
|
2001
2005
|
return resp;
|
|
2002
2006
|
}
|
|
@@ -2017,7 +2021,7 @@ export class MarketplacesClient {
|
|
|
2017
2021
|
const query = params.toString();
|
|
2018
2022
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
2019
2023
|
let resp: ListProvidersRequest_Response | undefined;
|
|
2020
|
-
const call
|
|
2024
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
2021
2025
|
const headers = new Headers();
|
|
2022
2026
|
if (this.workspaceId !== undefined) {
|
|
2023
2027
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -2036,7 +2040,7 @@ export class MarketplacesClient {
|
|
|
2036
2040
|
};
|
|
2037
2041
|
await executeCall(call, options);
|
|
2038
2042
|
if (resp === undefined) {
|
|
2039
|
-
throw new Error('
|
|
2043
|
+
throw new Error('operation completed without a result.');
|
|
2040
2044
|
}
|
|
2041
2045
|
return resp;
|
|
2042
2046
|
}
|
|
@@ -2065,7 +2069,7 @@ export class MarketplacesClient {
|
|
|
2065
2069
|
): Promise<RemoveExchangeForListingResponse> {
|
|
2066
2070
|
const url = `${this.host}/api/2.0/marketplace-exchange/exchanges-for-listing/${req.id ?? ''}`;
|
|
2067
2071
|
let resp: RemoveExchangeForListingResponse | undefined;
|
|
2068
|
-
const call
|
|
2072
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
2069
2073
|
const headers = new Headers();
|
|
2070
2074
|
if (this.workspaceId !== undefined) {
|
|
2071
2075
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -2084,7 +2088,7 @@ export class MarketplacesClient {
|
|
|
2084
2088
|
};
|
|
2085
2089
|
await executeCall(call, options);
|
|
2086
2090
|
if (resp === undefined) {
|
|
2087
|
-
throw new Error('
|
|
2091
|
+
throw new Error('operation completed without a result.');
|
|
2088
2092
|
}
|
|
2089
2093
|
return resp;
|
|
2090
2094
|
}
|
|
@@ -2097,7 +2101,7 @@ export class MarketplacesClient {
|
|
|
2097
2101
|
const url = `${this.host}/api/2.0/marketplace-exchange/exchanges/${req.id ?? ''}`;
|
|
2098
2102
|
const body = marshalRequest(req, marshalUpdateExchangeRequestSchema);
|
|
2099
2103
|
let resp: UpdateExchangeResponse | undefined;
|
|
2100
|
-
const call
|
|
2104
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
2101
2105
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
2102
2106
|
if (this.workspaceId !== undefined) {
|
|
2103
2107
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -2113,7 +2117,7 @@ export class MarketplacesClient {
|
|
|
2113
2117
|
};
|
|
2114
2118
|
await executeCall(call, options);
|
|
2115
2119
|
if (resp === undefined) {
|
|
2116
|
-
throw new Error('
|
|
2120
|
+
throw new Error('operation completed without a result.');
|
|
2117
2121
|
}
|
|
2118
2122
|
return resp;
|
|
2119
2123
|
}
|
|
@@ -2126,7 +2130,7 @@ export class MarketplacesClient {
|
|
|
2126
2130
|
const url = `${this.host}/api/2.0/marketplace-exchange/filters/${req.id ?? ''}`;
|
|
2127
2131
|
const body = marshalRequest(req, marshalUpdateExchangeFilterRequestSchema);
|
|
2128
2132
|
let resp: UpdateExchangeFilterResponse | undefined;
|
|
2129
|
-
const call
|
|
2133
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
2130
2134
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
2131
2135
|
if (this.workspaceId !== undefined) {
|
|
2132
2136
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -2145,7 +2149,7 @@ export class MarketplacesClient {
|
|
|
2145
2149
|
};
|
|
2146
2150
|
await executeCall(call, options);
|
|
2147
2151
|
if (resp === undefined) {
|
|
2148
|
-
throw new Error('
|
|
2152
|
+
throw new Error('operation completed without a result.');
|
|
2149
2153
|
}
|
|
2150
2154
|
return resp;
|
|
2151
2155
|
}
|
|
@@ -2158,7 +2162,7 @@ export class MarketplacesClient {
|
|
|
2158
2162
|
const url = `${this.host}/api/2.0/marketplace-provider/listings/${req.id ?? ''}`;
|
|
2159
2163
|
const body = marshalRequest(req, marshalUpdateListingRequestSchema);
|
|
2160
2164
|
let resp: UpdateListingRequest_Response | undefined;
|
|
2161
|
-
const call
|
|
2165
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
2162
2166
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
2163
2167
|
if (this.workspaceId !== undefined) {
|
|
2164
2168
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -2177,7 +2181,7 @@ export class MarketplacesClient {
|
|
|
2177
2181
|
};
|
|
2178
2182
|
await executeCall(call, options);
|
|
2179
2183
|
if (resp === undefined) {
|
|
2180
|
-
throw new Error('
|
|
2184
|
+
throw new Error('operation completed without a result.');
|
|
2181
2185
|
}
|
|
2182
2186
|
return resp;
|
|
2183
2187
|
}
|
|
@@ -2193,7 +2197,7 @@ export class MarketplacesClient {
|
|
|
2193
2197
|
marshalUpdatePersonalizationRequestStatusRequestSchema
|
|
2194
2198
|
);
|
|
2195
2199
|
let resp: UpdatePersonalizationRequestStatusRequest_Response | undefined;
|
|
2196
|
-
const call
|
|
2200
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
2197
2201
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
2198
2202
|
if (this.workspaceId !== undefined) {
|
|
2199
2203
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -2212,7 +2216,7 @@ export class MarketplacesClient {
|
|
|
2212
2216
|
};
|
|
2213
2217
|
await executeCall(call, options);
|
|
2214
2218
|
if (resp === undefined) {
|
|
2215
|
-
throw new Error('
|
|
2219
|
+
throw new Error('operation completed without a result.');
|
|
2216
2220
|
}
|
|
2217
2221
|
return resp;
|
|
2218
2222
|
}
|
|
@@ -2225,7 +2229,7 @@ export class MarketplacesClient {
|
|
|
2225
2229
|
const url = `${this.host}/api/2.0/marketplace-provider/providers/${req.id ?? ''}`;
|
|
2226
2230
|
const body = marshalRequest(req, marshalUpdateProviderRequestSchema);
|
|
2227
2231
|
let resp: UpdateProviderRequest_Response | undefined;
|
|
2228
|
-
const call
|
|
2232
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
2229
2233
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
2230
2234
|
if (this.workspaceId !== undefined) {
|
|
2231
2235
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -2244,7 +2248,7 @@ export class MarketplacesClient {
|
|
|
2244
2248
|
};
|
|
2245
2249
|
await executeCall(call, options);
|
|
2246
2250
|
if (resp === undefined) {
|
|
2247
|
-
throw new Error('
|
|
2251
|
+
throw new Error('operation completed without a result.');
|
|
2248
2252
|
}
|
|
2249
2253
|
return resp;
|
|
2250
2254
|
}
|
|
@@ -2260,7 +2264,7 @@ export class MarketplacesClient {
|
|
|
2260
2264
|
marshalUpdateProviderAnalyticsDashboardRequestSchema
|
|
2261
2265
|
);
|
|
2262
2266
|
let resp: UpdateProviderAnalyticsDashboardRequest_Response | undefined;
|
|
2263
|
-
const call
|
|
2267
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
2264
2268
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
2265
2269
|
if (this.workspaceId !== undefined) {
|
|
2266
2270
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -2279,7 +2283,7 @@ export class MarketplacesClient {
|
|
|
2279
2283
|
};
|
|
2280
2284
|
await executeCall(call, options);
|
|
2281
2285
|
if (resp === undefined) {
|
|
2282
|
-
throw new Error('
|
|
2286
|
+
throw new Error('operation completed without a result.');
|
|
2283
2287
|
}
|
|
2284
2288
|
return resp;
|
|
2285
2289
|
}
|