@databricks/sdk-marketplaces 0.1.0-dev.3 → 0.1.0-dev.5
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/README.md +28 -0
- package/dist/v1/client.d.ts +3 -3
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +261 -213
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/model.d.ts +127 -110
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +165 -165
- package/dist/v1/model.js.map +1 -1
- package/dist/v1/transport.d.ts +30 -2
- package/dist/v1/transport.d.ts.map +1 -1
- package/dist/v1/transport.js +33 -16
- package/dist/v1/transport.js.map +1 -1
- package/dist/v1/utils.d.ts.map +1 -1
- package/dist/v1/utils.js +2 -1
- package/dist/v1/utils.js.map +1 -1
- package/package.json +9 -5
- package/src/v1/client.ts +0 -2253
- package/src/v1/index.ts +0 -150
- package/src/v1/model.ts +0 -2492
- package/src/v1/transport.ts +0 -73
- package/src/v1/utils.ts +0 -156
package/dist/v1/client.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { VERSION as AUTH_VERSION } from '@databricks/sdk-auth';
|
|
3
3
|
import { createDefault } from '@databricks/sdk-core/clientinfo';
|
|
4
4
|
import { NoOpLogger } from '@databricks/sdk-core/logger';
|
|
5
|
-
import {
|
|
5
|
+
import { resolveClientConfig } from './transport';
|
|
6
6
|
import { buildHttpRequest, executeCall, executeHttpCall, marshalRequest, parseResponse, flattenQueryParams, } from './utils';
|
|
7
7
|
import pkgJson from '../../package.json' with { type: 'json' };
|
|
8
8
|
import { marshalAddExchangeForListingRequestSchema, marshalCreateExchangeFilterRequestSchema, marshalCreateExchangeRequestSchema, marshalCreateFileRequestSchema, marshalCreateListingRequestSchema, marshalCreatePersonalizationRequestSchema, marshalCreateProviderAnalyticsDashboardRequestSchema, marshalCreateProviderRequestSchema, marshalFileParentSchema, marshalInstallListingSchema, marshalListingTagSchema, marshalUpdateExchangeFilterRequestSchema, marshalUpdateExchangeRequestSchema, marshalUpdateInstallationDetailSchema, marshalUpdateListingRequestSchema, marshalUpdatePersonalizationRequestStatusRequestSchema, marshalUpdateProviderAnalyticsDashboardRequestSchema, marshalUpdateProviderRequestSchema, unmarshalAddExchangeForListingResponseSchema, unmarshalBatchGetListingsResponseSchema, unmarshalBatchGetProvidersResponseSchema, unmarshalCreateExchangeFilterResponseSchema, unmarshalCreateExchangeResponseSchema, unmarshalCreateFileResponseSchema, unmarshalCreateInstallationResponseSchema, unmarshalCreateListingResponseSchema, unmarshalCreatePersonalizationResponseSchema, unmarshalCreateProviderAnalyticsDashboardResponseSchema, unmarshalCreateProviderResponseSchema, unmarshalDeleteExchangeFilterResponseSchema, unmarshalDeleteExchangeResponseSchema, unmarshalDeleteFileResponseSchema, unmarshalDeleteInstallationResponseSchema, unmarshalDeleteListingResponseSchema, unmarshalDeleteProviderResponseSchema, unmarshalGetAllPersonalizationRequestsForConsumerResponseSchema, unmarshalGetExchangeResponseSchema, unmarshalGetFileResponseSchema, unmarshalGetLatestVersionProviderAnalyticsDashboardResponseSchema, unmarshalGetListingContentMetadataResponseSchema, unmarshalGetListingResponseSchema, unmarshalGetListingsResponseSchema, unmarshalGetPersonalizationRequestsForConsumerResponseSchema, unmarshalGetPersonalizationRequestsForProviderResponseSchema, unmarshalGetProviderResponseSchema, unmarshalGetPublishedListingForConsumerResponseSchema, unmarshalGetPublishedListingsForConsumerResponseSchema, unmarshalGetPublishedProviderForConsumerResponseSchema, unmarshalListAllInstallationsResponseSchema, unmarshalListExchangeFiltersResponseSchema, unmarshalListExchangesForListingResponseSchema, unmarshalListExchangesResponseSchema, unmarshalListFilesResponseSchema, unmarshalListFulfillmentsResponseSchema, unmarshalListInstallationsResponseSchema, unmarshalListListingsForExchangeResponseSchema, unmarshalListProviderAnalyticsDashboardResponseSchema, unmarshalListProvidersResponseSchema, unmarshalListPublishedProvidersForConsumerResponseSchema, unmarshalRemoveExchangeForListingResponseSchema, unmarshalSearchPublishedListingsForConsumerResponseSchema, unmarshalUpdateExchangeFilterResponseSchema, unmarshalUpdateExchangeResponseSchema, unmarshalUpdateInstallationResponseSchema, unmarshalUpdateListingResponseSchema, unmarshalUpdatePersonalizationRequestStatusResponseSchema, unmarshalUpdateProviderAnalyticsDashboardResponseSchema, unmarshalUpdateProviderResponseSchema, } from './model';
|
|
@@ -12,34 +12,33 @@ const PACKAGE_SEGMENT = {
|
|
|
12
12
|
value: pkgJson.version,
|
|
13
13
|
};
|
|
14
14
|
export class MarketplacesClient {
|
|
15
|
-
|
|
16
|
-
// Workspace ID used to route workspace-level calls on unified hosts (SPOG).
|
|
17
|
-
// When set, workspace-level methods send X-Databricks-Org-Id on every
|
|
18
|
-
// request.
|
|
19
|
-
workspaceId;
|
|
20
|
-
httpClient;
|
|
15
|
+
options;
|
|
21
16
|
logger;
|
|
22
17
|
// User-Agent header value. Composed once at construction from
|
|
23
18
|
// createDefault() merged with this package's identity and the active
|
|
24
19
|
// credential's name.
|
|
25
20
|
userAgent;
|
|
21
|
+
// Memoized configuration. The profile is resolved once, lazily, on the first
|
|
22
|
+
// request, then reused; host, workspaceId/accountId, and credentials are
|
|
23
|
+
// filled from it when not set explicitly on the options.
|
|
24
|
+
config;
|
|
26
25
|
constructor(options) {
|
|
27
|
-
|
|
28
|
-
throw new Error('Host is required.');
|
|
29
|
-
}
|
|
30
|
-
this.host = options.host.replace(/\/$/, '');
|
|
31
|
-
this.workspaceId = options.workspaceId;
|
|
26
|
+
this.options = options;
|
|
32
27
|
this.logger = options.logger ?? new NoOpLogger();
|
|
33
28
|
const info = createDefault()
|
|
34
29
|
.with(PACKAGE_SEGMENT)
|
|
35
30
|
.with({ key: 'sdk-js-auth', value: AUTH_VERSION })
|
|
36
31
|
.with({ key: 'auth', value: options.credentials?.name() ?? 'default' });
|
|
37
32
|
this.userAgent = info.toString();
|
|
38
|
-
|
|
33
|
+
}
|
|
34
|
+
resolveConfig() {
|
|
35
|
+
this.config ??= resolveClientConfig(this.options);
|
|
36
|
+
return this.config;
|
|
39
37
|
}
|
|
40
38
|
/** Batch get a published listing in the Databricks Marketplace that the consumer has access to. */
|
|
41
39
|
async batchGetListings(req, options) {
|
|
42
|
-
const
|
|
40
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
41
|
+
const url = `${host}/api/2.1/marketplace-consumer/listings:batchGet`;
|
|
43
42
|
const params = new URLSearchParams();
|
|
44
43
|
if (req.ids !== undefined) {
|
|
45
44
|
params.append('ids', String(req.ids));
|
|
@@ -49,14 +48,14 @@ export class MarketplacesClient {
|
|
|
49
48
|
let resp;
|
|
50
49
|
const call = async (callSignal) => {
|
|
51
50
|
const headers = new Headers();
|
|
52
|
-
if (
|
|
53
|
-
headers.set('X-Databricks-Org-Id',
|
|
51
|
+
if (workspaceId !== undefined) {
|
|
52
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
54
53
|
}
|
|
55
54
|
headers.set('User-Agent', this.userAgent);
|
|
56
55
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
57
56
|
const respBody = await executeHttpCall({
|
|
58
57
|
request: httpReq,
|
|
59
|
-
httpClient
|
|
58
|
+
httpClient,
|
|
60
59
|
logger: this.logger,
|
|
61
60
|
});
|
|
62
61
|
resp = parseResponse(respBody, unmarshalBatchGetListingsResponseSchema);
|
|
@@ -69,7 +68,8 @@ export class MarketplacesClient {
|
|
|
69
68
|
}
|
|
70
69
|
/** Batch get a provider in the Databricks Marketplace with at least one visible listing. */
|
|
71
70
|
async batchGetProviders(req, options) {
|
|
72
|
-
const
|
|
71
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
72
|
+
const url = `${host}/api/2.1/marketplace-consumer/providers:batchGet`;
|
|
73
73
|
const params = new URLSearchParams();
|
|
74
74
|
if (req.ids !== undefined) {
|
|
75
75
|
params.append('ids', String(req.ids));
|
|
@@ -79,14 +79,14 @@ export class MarketplacesClient {
|
|
|
79
79
|
let resp;
|
|
80
80
|
const call = async (callSignal) => {
|
|
81
81
|
const headers = new Headers();
|
|
82
|
-
if (
|
|
83
|
-
headers.set('X-Databricks-Org-Id',
|
|
82
|
+
if (workspaceId !== undefined) {
|
|
83
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
84
84
|
}
|
|
85
85
|
headers.set('User-Agent', this.userAgent);
|
|
86
86
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
87
87
|
const respBody = await executeHttpCall({
|
|
88
88
|
request: httpReq,
|
|
89
|
-
httpClient
|
|
89
|
+
httpClient,
|
|
90
90
|
logger: this.logger,
|
|
91
91
|
});
|
|
92
92
|
resp = parseResponse(respBody, unmarshalBatchGetProvidersResponseSchema);
|
|
@@ -99,19 +99,20 @@ export class MarketplacesClient {
|
|
|
99
99
|
}
|
|
100
100
|
/** Create a personalization request for a listing. */
|
|
101
101
|
async createPersonalizationRequest(req, options) {
|
|
102
|
-
const
|
|
102
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
103
|
+
const url = `${host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/personalization-requests`;
|
|
103
104
|
const body = marshalRequest(req, marshalCreatePersonalizationRequestSchema);
|
|
104
105
|
let resp;
|
|
105
106
|
const call = async (callSignal) => {
|
|
106
107
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
107
|
-
if (
|
|
108
|
-
headers.set('X-Databricks-Org-Id',
|
|
108
|
+
if (workspaceId !== undefined) {
|
|
109
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
109
110
|
}
|
|
110
111
|
headers.set('User-Agent', this.userAgent);
|
|
111
112
|
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
112
113
|
const respBody = await executeHttpCall({
|
|
113
114
|
request: httpReq,
|
|
114
|
-
httpClient
|
|
115
|
+
httpClient,
|
|
115
116
|
logger: this.logger,
|
|
116
117
|
});
|
|
117
118
|
resp = parseResponse(respBody, unmarshalCreatePersonalizationResponseSchema);
|
|
@@ -124,7 +125,8 @@ export class MarketplacesClient {
|
|
|
124
125
|
}
|
|
125
126
|
/** List all installations for a particular listing. */
|
|
126
127
|
async getInstallationDetails(req, options) {
|
|
127
|
-
const
|
|
128
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
129
|
+
const url = `${host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/installations`;
|
|
128
130
|
const params = new URLSearchParams();
|
|
129
131
|
if (req.pageToken !== undefined) {
|
|
130
132
|
params.append('page_token', req.pageToken);
|
|
@@ -137,14 +139,14 @@ export class MarketplacesClient {
|
|
|
137
139
|
let resp;
|
|
138
140
|
const call = async (callSignal) => {
|
|
139
141
|
const headers = new Headers();
|
|
140
|
-
if (
|
|
141
|
-
headers.set('X-Databricks-Org-Id',
|
|
142
|
+
if (workspaceId !== undefined) {
|
|
143
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
142
144
|
}
|
|
143
145
|
headers.set('User-Agent', this.userAgent);
|
|
144
146
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
145
147
|
const respBody = await executeHttpCall({
|
|
146
148
|
request: httpReq,
|
|
147
|
-
httpClient
|
|
149
|
+
httpClient,
|
|
148
150
|
logger: this.logger,
|
|
149
151
|
});
|
|
150
152
|
resp = parseResponse(respBody, unmarshalListInstallationsResponseSchema);
|
|
@@ -170,7 +172,8 @@ export class MarketplacesClient {
|
|
|
170
172
|
}
|
|
171
173
|
/** Get a high level preview of the metadata of listing installable content. */
|
|
172
174
|
async getListingContent(req, options) {
|
|
173
|
-
const
|
|
175
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
176
|
+
const url = `${host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/content`;
|
|
174
177
|
const params = new URLSearchParams();
|
|
175
178
|
if (req.pageToken !== undefined) {
|
|
176
179
|
params.append('page_token', req.pageToken);
|
|
@@ -183,14 +186,14 @@ export class MarketplacesClient {
|
|
|
183
186
|
let resp;
|
|
184
187
|
const call = async (callSignal) => {
|
|
185
188
|
const headers = new Headers();
|
|
186
|
-
if (
|
|
187
|
-
headers.set('X-Databricks-Org-Id',
|
|
189
|
+
if (workspaceId !== undefined) {
|
|
190
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
188
191
|
}
|
|
189
192
|
headers.set('User-Agent', this.userAgent);
|
|
190
193
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
191
194
|
const respBody = await executeHttpCall({
|
|
192
195
|
request: httpReq,
|
|
193
|
-
httpClient
|
|
196
|
+
httpClient,
|
|
194
197
|
logger: this.logger,
|
|
195
198
|
});
|
|
196
199
|
resp = parseResponse(respBody, unmarshalGetListingContentMetadataResponseSchema);
|
|
@@ -216,18 +219,19 @@ export class MarketplacesClient {
|
|
|
216
219
|
}
|
|
217
220
|
/** Get the personalization request for a listing. Each consumer can make at *most* one personalization request for a listing. */
|
|
218
221
|
async getPersonalizationRequestsForConsumer(req, options) {
|
|
219
|
-
const
|
|
222
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
223
|
+
const url = `${host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/personalization-requests`;
|
|
220
224
|
let resp;
|
|
221
225
|
const call = async (callSignal) => {
|
|
222
226
|
const headers = new Headers();
|
|
223
|
-
if (
|
|
224
|
-
headers.set('X-Databricks-Org-Id',
|
|
227
|
+
if (workspaceId !== undefined) {
|
|
228
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
225
229
|
}
|
|
226
230
|
headers.set('User-Agent', this.userAgent);
|
|
227
231
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
228
232
|
const respBody = await executeHttpCall({
|
|
229
233
|
request: httpReq,
|
|
230
|
-
httpClient
|
|
234
|
+
httpClient,
|
|
231
235
|
logger: this.logger,
|
|
232
236
|
});
|
|
233
237
|
resp = parseResponse(respBody, unmarshalGetPersonalizationRequestsForConsumerResponseSchema);
|
|
@@ -240,18 +244,19 @@ export class MarketplacesClient {
|
|
|
240
244
|
}
|
|
241
245
|
/** Get a published listing in the Databricks Marketplace that the consumer has access to. */
|
|
242
246
|
async getPublishedListingForConsumer(req, options) {
|
|
243
|
-
const
|
|
247
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
248
|
+
const url = `${host}/api/2.0/marketplace-consumer/listings/${req.id ?? ''}`;
|
|
244
249
|
let resp;
|
|
245
250
|
const call = async (callSignal) => {
|
|
246
251
|
const headers = new Headers();
|
|
247
|
-
if (
|
|
248
|
-
headers.set('X-Databricks-Org-Id',
|
|
252
|
+
if (workspaceId !== undefined) {
|
|
253
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
249
254
|
}
|
|
250
255
|
headers.set('User-Agent', this.userAgent);
|
|
251
256
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
252
257
|
const respBody = await executeHttpCall({
|
|
253
258
|
request: httpReq,
|
|
254
|
-
httpClient
|
|
259
|
+
httpClient,
|
|
255
260
|
logger: this.logger,
|
|
256
261
|
});
|
|
257
262
|
resp = parseResponse(respBody, unmarshalGetPublishedListingForConsumerResponseSchema);
|
|
@@ -264,18 +269,19 @@ export class MarketplacesClient {
|
|
|
264
269
|
}
|
|
265
270
|
/** Get a provider in the Databricks Marketplace with at least one visible listing. */
|
|
266
271
|
async getPublishedProviderForConsumer(req, options) {
|
|
267
|
-
const
|
|
272
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
273
|
+
const url = `${host}/api/2.0/marketplace-consumer/providers/${req.id ?? ''}`;
|
|
268
274
|
let resp;
|
|
269
275
|
const call = async (callSignal) => {
|
|
270
276
|
const headers = new Headers();
|
|
271
|
-
if (
|
|
272
|
-
headers.set('X-Databricks-Org-Id',
|
|
277
|
+
if (workspaceId !== undefined) {
|
|
278
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
273
279
|
}
|
|
274
280
|
headers.set('User-Agent', this.userAgent);
|
|
275
281
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
276
282
|
const respBody = await executeHttpCall({
|
|
277
283
|
request: httpReq,
|
|
278
|
-
httpClient
|
|
284
|
+
httpClient,
|
|
279
285
|
logger: this.logger,
|
|
280
286
|
});
|
|
281
287
|
resp = parseResponse(respBody, unmarshalGetPublishedProviderForConsumerResponseSchema);
|
|
@@ -288,19 +294,20 @@ export class MarketplacesClient {
|
|
|
288
294
|
}
|
|
289
295
|
/** Install payload associated with a Databricks Marketplace listing. */
|
|
290
296
|
async installListing(req, options) {
|
|
291
|
-
const
|
|
297
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
298
|
+
const url = `${host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/installations`;
|
|
292
299
|
const body = marshalRequest(req, marshalInstallListingSchema);
|
|
293
300
|
let resp;
|
|
294
301
|
const call = async (callSignal) => {
|
|
295
302
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
296
|
-
if (
|
|
297
|
-
headers.set('X-Databricks-Org-Id',
|
|
303
|
+
if (workspaceId !== undefined) {
|
|
304
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
298
305
|
}
|
|
299
306
|
headers.set('User-Agent', this.userAgent);
|
|
300
307
|
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
301
308
|
const respBody = await executeHttpCall({
|
|
302
309
|
request: httpReq,
|
|
303
|
-
httpClient
|
|
310
|
+
httpClient,
|
|
304
311
|
logger: this.logger,
|
|
305
312
|
});
|
|
306
313
|
resp = parseResponse(respBody, unmarshalCreateInstallationResponseSchema);
|
|
@@ -313,7 +320,8 @@ export class MarketplacesClient {
|
|
|
313
320
|
}
|
|
314
321
|
/** List all installations across all listings. */
|
|
315
322
|
async listInstallations(req, options) {
|
|
316
|
-
const
|
|
323
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
324
|
+
const url = `${host}/api/2.0/marketplace-consumer/installations`;
|
|
317
325
|
const params = new URLSearchParams();
|
|
318
326
|
if (req.pageToken !== undefined) {
|
|
319
327
|
params.append('page_token', req.pageToken);
|
|
@@ -326,14 +334,14 @@ export class MarketplacesClient {
|
|
|
326
334
|
let resp;
|
|
327
335
|
const call = async (callSignal) => {
|
|
328
336
|
const headers = new Headers();
|
|
329
|
-
if (
|
|
330
|
-
headers.set('X-Databricks-Org-Id',
|
|
337
|
+
if (workspaceId !== undefined) {
|
|
338
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
331
339
|
}
|
|
332
340
|
headers.set('User-Agent', this.userAgent);
|
|
333
341
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
334
342
|
const respBody = await executeHttpCall({
|
|
335
343
|
request: httpReq,
|
|
336
|
-
httpClient
|
|
344
|
+
httpClient,
|
|
337
345
|
logger: this.logger,
|
|
338
346
|
});
|
|
339
347
|
resp = parseResponse(respBody, unmarshalListAllInstallationsResponseSchema);
|
|
@@ -363,7 +371,8 @@ export class MarketplacesClient {
|
|
|
363
371
|
* Personalized installations contain metadata about the attached share or git repo, as well as the Delta Sharing recipient type.
|
|
364
372
|
*/
|
|
365
373
|
async listListingFulfillments(req, options) {
|
|
366
|
-
const
|
|
374
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
375
|
+
const url = `${host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/fulfillments`;
|
|
367
376
|
const params = new URLSearchParams();
|
|
368
377
|
if (req.pageToken !== undefined) {
|
|
369
378
|
params.append('page_token', req.pageToken);
|
|
@@ -376,14 +385,14 @@ export class MarketplacesClient {
|
|
|
376
385
|
let resp;
|
|
377
386
|
const call = async (callSignal) => {
|
|
378
387
|
const headers = new Headers();
|
|
379
|
-
if (
|
|
380
|
-
headers.set('X-Databricks-Org-Id',
|
|
388
|
+
if (workspaceId !== undefined) {
|
|
389
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
381
390
|
}
|
|
382
391
|
headers.set('User-Agent', this.userAgent);
|
|
383
392
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
384
393
|
const respBody = await executeHttpCall({
|
|
385
394
|
request: httpReq,
|
|
386
|
-
httpClient
|
|
395
|
+
httpClient,
|
|
387
396
|
logger: this.logger,
|
|
388
397
|
});
|
|
389
398
|
resp = parseResponse(respBody, unmarshalListFulfillmentsResponseSchema);
|
|
@@ -409,7 +418,8 @@ export class MarketplacesClient {
|
|
|
409
418
|
}
|
|
410
419
|
/** List personalization requests for a consumer across all listings. */
|
|
411
420
|
async listPersonalizationRequestsForConsumer(req, options) {
|
|
412
|
-
const
|
|
421
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
422
|
+
const url = `${host}/api/2.0/marketplace-consumer/personalization-requests`;
|
|
413
423
|
const params = new URLSearchParams();
|
|
414
424
|
if (req.pageToken !== undefined) {
|
|
415
425
|
params.append('page_token', req.pageToken);
|
|
@@ -422,14 +432,14 @@ export class MarketplacesClient {
|
|
|
422
432
|
let resp;
|
|
423
433
|
const call = async (callSignal) => {
|
|
424
434
|
const headers = new Headers();
|
|
425
|
-
if (
|
|
426
|
-
headers.set('X-Databricks-Org-Id',
|
|
435
|
+
if (workspaceId !== undefined) {
|
|
436
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
427
437
|
}
|
|
428
438
|
headers.set('User-Agent', this.userAgent);
|
|
429
439
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
430
440
|
const respBody = await executeHttpCall({
|
|
431
441
|
request: httpReq,
|
|
432
|
-
httpClient
|
|
442
|
+
httpClient,
|
|
433
443
|
logger: this.logger,
|
|
434
444
|
});
|
|
435
445
|
resp = parseResponse(respBody, unmarshalGetAllPersonalizationRequestsForConsumerResponseSchema);
|
|
@@ -455,7 +465,8 @@ export class MarketplacesClient {
|
|
|
455
465
|
}
|
|
456
466
|
/** List all published listings in the Databricks Marketplace that the consumer has access to. */
|
|
457
467
|
async listPublishedListingsForConsumer(req, options) {
|
|
458
|
-
const
|
|
468
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
469
|
+
const url = `${host}/api/2.0/marketplace-consumer/listings`;
|
|
459
470
|
const params = new URLSearchParams();
|
|
460
471
|
if (req.pageToken !== undefined) {
|
|
461
472
|
params.append('page_token', req.pageToken);
|
|
@@ -489,14 +500,14 @@ export class MarketplacesClient {
|
|
|
489
500
|
let resp;
|
|
490
501
|
const call = async (callSignal) => {
|
|
491
502
|
const headers = new Headers();
|
|
492
|
-
if (
|
|
493
|
-
headers.set('X-Databricks-Org-Id',
|
|
503
|
+
if (workspaceId !== undefined) {
|
|
504
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
494
505
|
}
|
|
495
506
|
headers.set('User-Agent', this.userAgent);
|
|
496
507
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
497
508
|
const respBody = await executeHttpCall({
|
|
498
509
|
request: httpReq,
|
|
499
|
-
httpClient
|
|
510
|
+
httpClient,
|
|
500
511
|
logger: this.logger,
|
|
501
512
|
});
|
|
502
513
|
resp = parseResponse(respBody, unmarshalGetPublishedListingsForConsumerResponseSchema);
|
|
@@ -522,7 +533,8 @@ export class MarketplacesClient {
|
|
|
522
533
|
}
|
|
523
534
|
/** List all providers in the Databricks Marketplace with at least one visible listing. */
|
|
524
535
|
async listPublishedProvidersForConsumer(req, options) {
|
|
525
|
-
const
|
|
536
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
537
|
+
const url = `${host}/api/2.0/marketplace-consumer/providers`;
|
|
526
538
|
const params = new URLSearchParams();
|
|
527
539
|
if (req.pageToken !== undefined) {
|
|
528
540
|
params.append('page_token', req.pageToken);
|
|
@@ -538,14 +550,14 @@ export class MarketplacesClient {
|
|
|
538
550
|
let resp;
|
|
539
551
|
const call = async (callSignal) => {
|
|
540
552
|
const headers = new Headers();
|
|
541
|
-
if (
|
|
542
|
-
headers.set('X-Databricks-Org-Id',
|
|
553
|
+
if (workspaceId !== undefined) {
|
|
554
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
543
555
|
}
|
|
544
556
|
headers.set('User-Agent', this.userAgent);
|
|
545
557
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
546
558
|
const respBody = await executeHttpCall({
|
|
547
559
|
request: httpReq,
|
|
548
|
-
httpClient
|
|
560
|
+
httpClient,
|
|
549
561
|
logger: this.logger,
|
|
550
562
|
});
|
|
551
563
|
resp = parseResponse(respBody, unmarshalListPublishedProvidersForConsumerResponseSchema);
|
|
@@ -574,7 +586,8 @@ export class MarketplacesClient {
|
|
|
574
586
|
* This query supports a variety of different search parameters and performs fuzzy matching.
|
|
575
587
|
*/
|
|
576
588
|
async searchPublishedListingsForConsumer(req, options) {
|
|
577
|
-
const
|
|
589
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
590
|
+
const url = `${host}/api/2.0/marketplace-consumer/search-listings`;
|
|
578
591
|
const params = new URLSearchParams();
|
|
579
592
|
if (req.query !== undefined) {
|
|
580
593
|
params.append('query', req.query);
|
|
@@ -605,14 +618,14 @@ export class MarketplacesClient {
|
|
|
605
618
|
let resp;
|
|
606
619
|
const call = async (callSignal) => {
|
|
607
620
|
const headers = new Headers();
|
|
608
|
-
if (
|
|
609
|
-
headers.set('X-Databricks-Org-Id',
|
|
621
|
+
if (workspaceId !== undefined) {
|
|
622
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
610
623
|
}
|
|
611
624
|
headers.set('User-Agent', this.userAgent);
|
|
612
625
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
613
626
|
const respBody = await executeHttpCall({
|
|
614
627
|
request: httpReq,
|
|
615
|
-
httpClient
|
|
628
|
+
httpClient,
|
|
616
629
|
logger: this.logger,
|
|
617
630
|
});
|
|
618
631
|
resp = parseResponse(respBody, unmarshalSearchPublishedListingsForConsumerResponseSchema);
|
|
@@ -638,18 +651,19 @@ export class MarketplacesClient {
|
|
|
638
651
|
}
|
|
639
652
|
/** Uninstall an installation associated with a Databricks Marketplace listing. */
|
|
640
653
|
async uninstallListing(req, options) {
|
|
641
|
-
const
|
|
654
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
655
|
+
const url = `${host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/installations/${req.installationId ?? ''}`;
|
|
642
656
|
let resp;
|
|
643
657
|
const call = async (callSignal) => {
|
|
644
658
|
const headers = new Headers();
|
|
645
|
-
if (
|
|
646
|
-
headers.set('X-Databricks-Org-Id',
|
|
659
|
+
if (workspaceId !== undefined) {
|
|
660
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
647
661
|
}
|
|
648
662
|
headers.set('User-Agent', this.userAgent);
|
|
649
663
|
const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
|
|
650
664
|
const respBody = await executeHttpCall({
|
|
651
665
|
request: httpReq,
|
|
652
|
-
httpClient
|
|
666
|
+
httpClient,
|
|
653
667
|
logger: this.logger,
|
|
654
668
|
});
|
|
655
669
|
resp = parseResponse(respBody, unmarshalDeleteInstallationResponseSchema);
|
|
@@ -667,19 +681,20 @@ export class MarketplacesClient {
|
|
|
667
681
|
* 2. the token will be forcibly rotate if the rotateToken flag is true and the tokenInfo field is empty
|
|
668
682
|
*/
|
|
669
683
|
async updateInstallationDetail(req, options) {
|
|
670
|
-
const
|
|
684
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
685
|
+
const url = `${host}/api/2.0/marketplace-consumer/listings/${req.listingId ?? ''}/installations/${req.installationId ?? ''}`;
|
|
671
686
|
const body = marshalRequest(req, marshalUpdateInstallationDetailSchema);
|
|
672
687
|
let resp;
|
|
673
688
|
const call = async (callSignal) => {
|
|
674
689
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
675
|
-
if (
|
|
676
|
-
headers.set('X-Databricks-Org-Id',
|
|
690
|
+
if (workspaceId !== undefined) {
|
|
691
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
677
692
|
}
|
|
678
693
|
headers.set('User-Agent', this.userAgent);
|
|
679
694
|
const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
|
|
680
695
|
const respBody = await executeHttpCall({
|
|
681
696
|
request: httpReq,
|
|
682
|
-
httpClient
|
|
697
|
+
httpClient,
|
|
683
698
|
logger: this.logger,
|
|
684
699
|
});
|
|
685
700
|
resp = parseResponse(respBody, unmarshalUpdateInstallationResponseSchema);
|
|
@@ -692,19 +707,20 @@ export class MarketplacesClient {
|
|
|
692
707
|
}
|
|
693
708
|
/** Associate an exchange with a listing */
|
|
694
709
|
async addExchangeForListing(req, options) {
|
|
695
|
-
const
|
|
710
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
711
|
+
const url = `${host}/api/2.0/marketplace-exchange/exchanges-for-listing`;
|
|
696
712
|
const body = marshalRequest(req, marshalAddExchangeForListingRequestSchema);
|
|
697
713
|
let resp;
|
|
698
714
|
const call = async (callSignal) => {
|
|
699
715
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
700
|
-
if (
|
|
701
|
-
headers.set('X-Databricks-Org-Id',
|
|
716
|
+
if (workspaceId !== undefined) {
|
|
717
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
702
718
|
}
|
|
703
719
|
headers.set('User-Agent', this.userAgent);
|
|
704
720
|
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
705
721
|
const respBody = await executeHttpCall({
|
|
706
722
|
request: httpReq,
|
|
707
|
-
httpClient
|
|
723
|
+
httpClient,
|
|
708
724
|
logger: this.logger,
|
|
709
725
|
});
|
|
710
726
|
resp = parseResponse(respBody, unmarshalAddExchangeForListingResponseSchema);
|
|
@@ -717,19 +733,20 @@ export class MarketplacesClient {
|
|
|
717
733
|
}
|
|
718
734
|
/** Create an exchange */
|
|
719
735
|
async createExchange(req, options) {
|
|
720
|
-
const
|
|
736
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
737
|
+
const url = `${host}/api/2.0/marketplace-exchange/exchanges`;
|
|
721
738
|
const body = marshalRequest(req, marshalCreateExchangeRequestSchema);
|
|
722
739
|
let resp;
|
|
723
740
|
const call = async (callSignal) => {
|
|
724
741
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
725
|
-
if (
|
|
726
|
-
headers.set('X-Databricks-Org-Id',
|
|
742
|
+
if (workspaceId !== undefined) {
|
|
743
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
727
744
|
}
|
|
728
745
|
headers.set('User-Agent', this.userAgent);
|
|
729
746
|
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
730
747
|
const respBody = await executeHttpCall({
|
|
731
748
|
request: httpReq,
|
|
732
|
-
httpClient
|
|
749
|
+
httpClient,
|
|
733
750
|
logger: this.logger,
|
|
734
751
|
});
|
|
735
752
|
resp = parseResponse(respBody, unmarshalCreateExchangeResponseSchema);
|
|
@@ -742,19 +759,20 @@ export class MarketplacesClient {
|
|
|
742
759
|
}
|
|
743
760
|
/** Add an exchange filter. */
|
|
744
761
|
async createExchangeFilter(req, options) {
|
|
745
|
-
const
|
|
762
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
763
|
+
const url = `${host}/api/2.0/marketplace-exchange/filters`;
|
|
746
764
|
const body = marshalRequest(req, marshalCreateExchangeFilterRequestSchema);
|
|
747
765
|
let resp;
|
|
748
766
|
const call = async (callSignal) => {
|
|
749
767
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
750
|
-
if (
|
|
751
|
-
headers.set('X-Databricks-Org-Id',
|
|
768
|
+
if (workspaceId !== undefined) {
|
|
769
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
752
770
|
}
|
|
753
771
|
headers.set('User-Agent', this.userAgent);
|
|
754
772
|
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
755
773
|
const respBody = await executeHttpCall({
|
|
756
774
|
request: httpReq,
|
|
757
|
-
httpClient
|
|
775
|
+
httpClient,
|
|
758
776
|
logger: this.logger,
|
|
759
777
|
});
|
|
760
778
|
resp = parseResponse(respBody, unmarshalCreateExchangeFilterResponseSchema);
|
|
@@ -767,19 +785,20 @@ export class MarketplacesClient {
|
|
|
767
785
|
}
|
|
768
786
|
/** Create a file. Currently, only provider icons and attached notebooks are supported. */
|
|
769
787
|
async createFile(req, options) {
|
|
770
|
-
const
|
|
788
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
789
|
+
const url = `${host}/api/2.0/marketplace-provider/files`;
|
|
771
790
|
const body = marshalRequest(req, marshalCreateFileRequestSchema);
|
|
772
791
|
let resp;
|
|
773
792
|
const call = async (callSignal) => {
|
|
774
793
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
775
|
-
if (
|
|
776
|
-
headers.set('X-Databricks-Org-Id',
|
|
794
|
+
if (workspaceId !== undefined) {
|
|
795
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
777
796
|
}
|
|
778
797
|
headers.set('User-Agent', this.userAgent);
|
|
779
798
|
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
780
799
|
const respBody = await executeHttpCall({
|
|
781
800
|
request: httpReq,
|
|
782
|
-
httpClient
|
|
801
|
+
httpClient,
|
|
783
802
|
logger: this.logger,
|
|
784
803
|
});
|
|
785
804
|
resp = parseResponse(respBody, unmarshalCreateFileResponseSchema);
|
|
@@ -792,19 +811,20 @@ export class MarketplacesClient {
|
|
|
792
811
|
}
|
|
793
812
|
/** Create a new listing */
|
|
794
813
|
async createListing(req, options) {
|
|
795
|
-
const
|
|
814
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
815
|
+
const url = `${host}/api/2.0/marketplace-provider/listing`;
|
|
796
816
|
const body = marshalRequest(req, marshalCreateListingRequestSchema);
|
|
797
817
|
let resp;
|
|
798
818
|
const call = async (callSignal) => {
|
|
799
819
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
800
|
-
if (
|
|
801
|
-
headers.set('X-Databricks-Org-Id',
|
|
820
|
+
if (workspaceId !== undefined) {
|
|
821
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
802
822
|
}
|
|
803
823
|
headers.set('User-Agent', this.userAgent);
|
|
804
824
|
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
805
825
|
const respBody = await executeHttpCall({
|
|
806
826
|
request: httpReq,
|
|
807
|
-
httpClient
|
|
827
|
+
httpClient,
|
|
808
828
|
logger: this.logger,
|
|
809
829
|
});
|
|
810
830
|
resp = parseResponse(respBody, unmarshalCreateListingResponseSchema);
|
|
@@ -817,19 +837,20 @@ export class MarketplacesClient {
|
|
|
817
837
|
}
|
|
818
838
|
/** Create a provider */
|
|
819
839
|
async createProvider(req, options) {
|
|
820
|
-
const
|
|
840
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
841
|
+
const url = `${host}/api/2.0/marketplace-provider/provider`;
|
|
821
842
|
const body = marshalRequest(req, marshalCreateProviderRequestSchema);
|
|
822
843
|
let resp;
|
|
823
844
|
const call = async (callSignal) => {
|
|
824
845
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
825
|
-
if (
|
|
826
|
-
headers.set('X-Databricks-Org-Id',
|
|
846
|
+
if (workspaceId !== undefined) {
|
|
847
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
827
848
|
}
|
|
828
849
|
headers.set('User-Agent', this.userAgent);
|
|
829
850
|
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
830
851
|
const respBody = await executeHttpCall({
|
|
831
852
|
request: httpReq,
|
|
832
|
-
httpClient
|
|
853
|
+
httpClient,
|
|
833
854
|
logger: this.logger,
|
|
834
855
|
});
|
|
835
856
|
resp = parseResponse(respBody, unmarshalCreateProviderResponseSchema);
|
|
@@ -842,19 +863,20 @@ export class MarketplacesClient {
|
|
|
842
863
|
}
|
|
843
864
|
/** Create provider analytics dashboard. Returns Marketplace specific `id`. Not to be confused with the Lakeview dashboard id. */
|
|
844
865
|
async createProviderAnalyticsDashboard(req, options) {
|
|
845
|
-
const
|
|
866
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
867
|
+
const url = `${host}/api/2.0/marketplace-provider/analytics_dashboard`;
|
|
846
868
|
const body = marshalRequest(req, marshalCreateProviderAnalyticsDashboardRequestSchema);
|
|
847
869
|
let resp;
|
|
848
870
|
const call = async (callSignal) => {
|
|
849
871
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
850
|
-
if (
|
|
851
|
-
headers.set('X-Databricks-Org-Id',
|
|
872
|
+
if (workspaceId !== undefined) {
|
|
873
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
852
874
|
}
|
|
853
875
|
headers.set('User-Agent', this.userAgent);
|
|
854
876
|
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
855
877
|
const respBody = await executeHttpCall({
|
|
856
878
|
request: httpReq,
|
|
857
|
-
httpClient
|
|
879
|
+
httpClient,
|
|
858
880
|
logger: this.logger,
|
|
859
881
|
});
|
|
860
882
|
resp = parseResponse(respBody, unmarshalCreateProviderAnalyticsDashboardResponseSchema);
|
|
@@ -867,18 +889,19 @@ export class MarketplacesClient {
|
|
|
867
889
|
}
|
|
868
890
|
/** This removes a listing from marketplace. */
|
|
869
891
|
async deleteExchange(req, options) {
|
|
870
|
-
const
|
|
892
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
893
|
+
const url = `${host}/api/2.0/marketplace-exchange/exchanges/${req.id ?? ''}`;
|
|
871
894
|
let resp;
|
|
872
895
|
const call = async (callSignal) => {
|
|
873
896
|
const headers = new Headers();
|
|
874
|
-
if (
|
|
875
|
-
headers.set('X-Databricks-Org-Id',
|
|
897
|
+
if (workspaceId !== undefined) {
|
|
898
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
876
899
|
}
|
|
877
900
|
headers.set('User-Agent', this.userAgent);
|
|
878
901
|
const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
|
|
879
902
|
const respBody = await executeHttpCall({
|
|
880
903
|
request: httpReq,
|
|
881
|
-
httpClient
|
|
904
|
+
httpClient,
|
|
882
905
|
logger: this.logger,
|
|
883
906
|
});
|
|
884
907
|
resp = parseResponse(respBody, unmarshalDeleteExchangeResponseSchema);
|
|
@@ -891,18 +914,19 @@ export class MarketplacesClient {
|
|
|
891
914
|
}
|
|
892
915
|
/** Delete an exchange filter */
|
|
893
916
|
async deleteExchangeFilter(req, options) {
|
|
894
|
-
const
|
|
917
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
918
|
+
const url = `${host}/api/2.0/marketplace-exchange/filters/${req.id ?? ''}`;
|
|
895
919
|
let resp;
|
|
896
920
|
const call = async (callSignal) => {
|
|
897
921
|
const headers = new Headers();
|
|
898
|
-
if (
|
|
899
|
-
headers.set('X-Databricks-Org-Id',
|
|
922
|
+
if (workspaceId !== undefined) {
|
|
923
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
900
924
|
}
|
|
901
925
|
headers.set('User-Agent', this.userAgent);
|
|
902
926
|
const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
|
|
903
927
|
const respBody = await executeHttpCall({
|
|
904
928
|
request: httpReq,
|
|
905
|
-
httpClient
|
|
929
|
+
httpClient,
|
|
906
930
|
logger: this.logger,
|
|
907
931
|
});
|
|
908
932
|
resp = parseResponse(respBody, unmarshalDeleteExchangeFilterResponseSchema);
|
|
@@ -915,18 +939,19 @@ export class MarketplacesClient {
|
|
|
915
939
|
}
|
|
916
940
|
/** Delete a file */
|
|
917
941
|
async deleteFile(req, options) {
|
|
918
|
-
const
|
|
942
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
943
|
+
const url = `${host}/api/2.0/marketplace-provider/files/${req.fileId ?? ''}`;
|
|
919
944
|
let resp;
|
|
920
945
|
const call = async (callSignal) => {
|
|
921
946
|
const headers = new Headers();
|
|
922
|
-
if (
|
|
923
|
-
headers.set('X-Databricks-Org-Id',
|
|
947
|
+
if (workspaceId !== undefined) {
|
|
948
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
924
949
|
}
|
|
925
950
|
headers.set('User-Agent', this.userAgent);
|
|
926
951
|
const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
|
|
927
952
|
const respBody = await executeHttpCall({
|
|
928
953
|
request: httpReq,
|
|
929
|
-
httpClient
|
|
954
|
+
httpClient,
|
|
930
955
|
logger: this.logger,
|
|
931
956
|
});
|
|
932
957
|
resp = parseResponse(respBody, unmarshalDeleteFileResponseSchema);
|
|
@@ -939,18 +964,19 @@ export class MarketplacesClient {
|
|
|
939
964
|
}
|
|
940
965
|
/** Delete a listing */
|
|
941
966
|
async deleteListing(req, options) {
|
|
942
|
-
const
|
|
967
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
968
|
+
const url = `${host}/api/2.0/marketplace-provider/listings/${req.id ?? ''}`;
|
|
943
969
|
let resp;
|
|
944
970
|
const call = async (callSignal) => {
|
|
945
971
|
const headers = new Headers();
|
|
946
|
-
if (
|
|
947
|
-
headers.set('X-Databricks-Org-Id',
|
|
972
|
+
if (workspaceId !== undefined) {
|
|
973
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
948
974
|
}
|
|
949
975
|
headers.set('User-Agent', this.userAgent);
|
|
950
976
|
const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
|
|
951
977
|
const respBody = await executeHttpCall({
|
|
952
978
|
request: httpReq,
|
|
953
|
-
httpClient
|
|
979
|
+
httpClient,
|
|
954
980
|
logger: this.logger,
|
|
955
981
|
});
|
|
956
982
|
resp = parseResponse(respBody, unmarshalDeleteListingResponseSchema);
|
|
@@ -963,18 +989,19 @@ export class MarketplacesClient {
|
|
|
963
989
|
}
|
|
964
990
|
/** Delete provider */
|
|
965
991
|
async deleteProvider(req, options) {
|
|
966
|
-
const
|
|
992
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
993
|
+
const url = `${host}/api/2.0/marketplace-provider/providers/${req.id ?? ''}`;
|
|
967
994
|
let resp;
|
|
968
995
|
const call = async (callSignal) => {
|
|
969
996
|
const headers = new Headers();
|
|
970
|
-
if (
|
|
971
|
-
headers.set('X-Databricks-Org-Id',
|
|
997
|
+
if (workspaceId !== undefined) {
|
|
998
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
972
999
|
}
|
|
973
1000
|
headers.set('User-Agent', this.userAgent);
|
|
974
1001
|
const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
|
|
975
1002
|
const respBody = await executeHttpCall({
|
|
976
1003
|
request: httpReq,
|
|
977
|
-
httpClient
|
|
1004
|
+
httpClient,
|
|
978
1005
|
logger: this.logger,
|
|
979
1006
|
});
|
|
980
1007
|
resp = parseResponse(respBody, unmarshalDeleteProviderResponseSchema);
|
|
@@ -987,18 +1014,19 @@ export class MarketplacesClient {
|
|
|
987
1014
|
}
|
|
988
1015
|
/** Get an exchange. */
|
|
989
1016
|
async getExchange(req, options) {
|
|
990
|
-
const
|
|
1017
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1018
|
+
const url = `${host}/api/2.0/marketplace-exchange/exchanges/${req.id ?? ''}`;
|
|
991
1019
|
let resp;
|
|
992
1020
|
const call = async (callSignal) => {
|
|
993
1021
|
const headers = new Headers();
|
|
994
|
-
if (
|
|
995
|
-
headers.set('X-Databricks-Org-Id',
|
|
1022
|
+
if (workspaceId !== undefined) {
|
|
1023
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
996
1024
|
}
|
|
997
1025
|
headers.set('User-Agent', this.userAgent);
|
|
998
1026
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
999
1027
|
const respBody = await executeHttpCall({
|
|
1000
1028
|
request: httpReq,
|
|
1001
|
-
httpClient
|
|
1029
|
+
httpClient,
|
|
1002
1030
|
logger: this.logger,
|
|
1003
1031
|
});
|
|
1004
1032
|
resp = parseResponse(respBody, unmarshalGetExchangeResponseSchema);
|
|
@@ -1011,18 +1039,19 @@ export class MarketplacesClient {
|
|
|
1011
1039
|
}
|
|
1012
1040
|
/** Get a file */
|
|
1013
1041
|
async getFile(req, options) {
|
|
1014
|
-
const
|
|
1042
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1043
|
+
const url = `${host}/api/2.0/marketplace-provider/files/${req.fileId ?? ''}`;
|
|
1015
1044
|
let resp;
|
|
1016
1045
|
const call = async (callSignal) => {
|
|
1017
1046
|
const headers = new Headers();
|
|
1018
|
-
if (
|
|
1019
|
-
headers.set('X-Databricks-Org-Id',
|
|
1047
|
+
if (workspaceId !== undefined) {
|
|
1048
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1020
1049
|
}
|
|
1021
1050
|
headers.set('User-Agent', this.userAgent);
|
|
1022
1051
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
1023
1052
|
const respBody = await executeHttpCall({
|
|
1024
1053
|
request: httpReq,
|
|
1025
|
-
httpClient
|
|
1054
|
+
httpClient,
|
|
1026
1055
|
logger: this.logger,
|
|
1027
1056
|
});
|
|
1028
1057
|
resp = parseResponse(respBody, unmarshalGetFileResponseSchema);
|
|
@@ -1035,18 +1064,19 @@ export class MarketplacesClient {
|
|
|
1035
1064
|
}
|
|
1036
1065
|
/** Get latest version of provider analytics dashboard. */
|
|
1037
1066
|
async getLatestVersionProviderAnalyticsDashboard(_req, options) {
|
|
1038
|
-
const
|
|
1067
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1068
|
+
const url = `${host}/api/2.0/marketplace-provider/analytics_dashboard/latest`;
|
|
1039
1069
|
let resp;
|
|
1040
1070
|
const call = async (callSignal) => {
|
|
1041
1071
|
const headers = new Headers();
|
|
1042
|
-
if (
|
|
1043
|
-
headers.set('X-Databricks-Org-Id',
|
|
1072
|
+
if (workspaceId !== undefined) {
|
|
1073
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1044
1074
|
}
|
|
1045
1075
|
headers.set('User-Agent', this.userAgent);
|
|
1046
1076
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
1047
1077
|
const respBody = await executeHttpCall({
|
|
1048
1078
|
request: httpReq,
|
|
1049
|
-
httpClient
|
|
1079
|
+
httpClient,
|
|
1050
1080
|
logger: this.logger,
|
|
1051
1081
|
});
|
|
1052
1082
|
resp = parseResponse(respBody, unmarshalGetLatestVersionProviderAnalyticsDashboardResponseSchema);
|
|
@@ -1059,18 +1089,19 @@ export class MarketplacesClient {
|
|
|
1059
1089
|
}
|
|
1060
1090
|
/** Get a listing */
|
|
1061
1091
|
async getListing(req, options) {
|
|
1062
|
-
const
|
|
1092
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1093
|
+
const url = `${host}/api/2.0/marketplace-provider/listings/${req.id ?? ''}`;
|
|
1063
1094
|
let resp;
|
|
1064
1095
|
const call = async (callSignal) => {
|
|
1065
1096
|
const headers = new Headers();
|
|
1066
|
-
if (
|
|
1067
|
-
headers.set('X-Databricks-Org-Id',
|
|
1097
|
+
if (workspaceId !== undefined) {
|
|
1098
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1068
1099
|
}
|
|
1069
1100
|
headers.set('User-Agent', this.userAgent);
|
|
1070
1101
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
1071
1102
|
const respBody = await executeHttpCall({
|
|
1072
1103
|
request: httpReq,
|
|
1073
|
-
httpClient
|
|
1104
|
+
httpClient,
|
|
1074
1105
|
logger: this.logger,
|
|
1075
1106
|
});
|
|
1076
1107
|
resp = parseResponse(respBody, unmarshalGetListingResponseSchema);
|
|
@@ -1086,7 +1117,8 @@ export class MarketplacesClient {
|
|
|
1086
1117
|
* This will return all personalization requests, regardless of which listing they are for.
|
|
1087
1118
|
*/
|
|
1088
1119
|
async getPersonalizationRequestsForProvider(req, options) {
|
|
1089
|
-
const
|
|
1120
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1121
|
+
const url = `${host}/api/2.0/marketplace-provider/personalization-requests`;
|
|
1090
1122
|
const params = new URLSearchParams();
|
|
1091
1123
|
if (req.pageToken !== undefined) {
|
|
1092
1124
|
params.append('page_token', req.pageToken);
|
|
@@ -1099,14 +1131,14 @@ export class MarketplacesClient {
|
|
|
1099
1131
|
let resp;
|
|
1100
1132
|
const call = async (callSignal) => {
|
|
1101
1133
|
const headers = new Headers();
|
|
1102
|
-
if (
|
|
1103
|
-
headers.set('X-Databricks-Org-Id',
|
|
1134
|
+
if (workspaceId !== undefined) {
|
|
1135
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1104
1136
|
}
|
|
1105
1137
|
headers.set('User-Agent', this.userAgent);
|
|
1106
1138
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
1107
1139
|
const respBody = await executeHttpCall({
|
|
1108
1140
|
request: httpReq,
|
|
1109
|
-
httpClient
|
|
1141
|
+
httpClient,
|
|
1110
1142
|
logger: this.logger,
|
|
1111
1143
|
});
|
|
1112
1144
|
resp = parseResponse(respBody, unmarshalGetPersonalizationRequestsForProviderResponseSchema);
|
|
@@ -1132,18 +1164,19 @@ export class MarketplacesClient {
|
|
|
1132
1164
|
}
|
|
1133
1165
|
/** Get provider profile */
|
|
1134
1166
|
async getProvider(req, options) {
|
|
1135
|
-
const
|
|
1167
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1168
|
+
const url = `${host}/api/2.0/marketplace-provider/providers/${req.id ?? ''}`;
|
|
1136
1169
|
let resp;
|
|
1137
1170
|
const call = async (callSignal) => {
|
|
1138
1171
|
const headers = new Headers();
|
|
1139
|
-
if (
|
|
1140
|
-
headers.set('X-Databricks-Org-Id',
|
|
1172
|
+
if (workspaceId !== undefined) {
|
|
1173
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1141
1174
|
}
|
|
1142
1175
|
headers.set('User-Agent', this.userAgent);
|
|
1143
1176
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
1144
1177
|
const respBody = await executeHttpCall({
|
|
1145
1178
|
request: httpReq,
|
|
1146
|
-
httpClient
|
|
1179
|
+
httpClient,
|
|
1147
1180
|
logger: this.logger,
|
|
1148
1181
|
});
|
|
1149
1182
|
resp = parseResponse(respBody, unmarshalGetProviderResponseSchema);
|
|
@@ -1156,7 +1189,8 @@ export class MarketplacesClient {
|
|
|
1156
1189
|
}
|
|
1157
1190
|
/** List exchange filter */
|
|
1158
1191
|
async listExchangeFilters(req, options) {
|
|
1159
|
-
const
|
|
1192
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1193
|
+
const url = `${host}/api/2.0/marketplace-exchange/filters`;
|
|
1160
1194
|
const params = new URLSearchParams();
|
|
1161
1195
|
if (req.exchangeId !== undefined) {
|
|
1162
1196
|
params.append('exchange_id', req.exchangeId);
|
|
@@ -1172,14 +1206,14 @@ export class MarketplacesClient {
|
|
|
1172
1206
|
let resp;
|
|
1173
1207
|
const call = async (callSignal) => {
|
|
1174
1208
|
const headers = new Headers();
|
|
1175
|
-
if (
|
|
1176
|
-
headers.set('X-Databricks-Org-Id',
|
|
1209
|
+
if (workspaceId !== undefined) {
|
|
1210
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1177
1211
|
}
|
|
1178
1212
|
headers.set('User-Agent', this.userAgent);
|
|
1179
1213
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
1180
1214
|
const respBody = await executeHttpCall({
|
|
1181
1215
|
request: httpReq,
|
|
1182
|
-
httpClient
|
|
1216
|
+
httpClient,
|
|
1183
1217
|
logger: this.logger,
|
|
1184
1218
|
});
|
|
1185
1219
|
resp = parseResponse(respBody, unmarshalListExchangeFiltersResponseSchema);
|
|
@@ -1205,7 +1239,8 @@ export class MarketplacesClient {
|
|
|
1205
1239
|
}
|
|
1206
1240
|
/** List exchanges visible to provider */
|
|
1207
1241
|
async listExchanges(req, options) {
|
|
1208
|
-
const
|
|
1242
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1243
|
+
const url = `${host}/api/2.0/marketplace-exchange/exchanges`;
|
|
1209
1244
|
const params = new URLSearchParams();
|
|
1210
1245
|
if (req.pageToken !== undefined) {
|
|
1211
1246
|
params.append('page_token', req.pageToken);
|
|
@@ -1218,14 +1253,14 @@ export class MarketplacesClient {
|
|
|
1218
1253
|
let resp;
|
|
1219
1254
|
const call = async (callSignal) => {
|
|
1220
1255
|
const headers = new Headers();
|
|
1221
|
-
if (
|
|
1222
|
-
headers.set('X-Databricks-Org-Id',
|
|
1256
|
+
if (workspaceId !== undefined) {
|
|
1257
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1223
1258
|
}
|
|
1224
1259
|
headers.set('User-Agent', this.userAgent);
|
|
1225
1260
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
1226
1261
|
const respBody = await executeHttpCall({
|
|
1227
1262
|
request: httpReq,
|
|
1228
|
-
httpClient
|
|
1263
|
+
httpClient,
|
|
1229
1264
|
logger: this.logger,
|
|
1230
1265
|
});
|
|
1231
1266
|
resp = parseResponse(respBody, unmarshalListExchangesResponseSchema);
|
|
@@ -1251,7 +1286,8 @@ export class MarketplacesClient {
|
|
|
1251
1286
|
}
|
|
1252
1287
|
/** List exchanges associated with a listing */
|
|
1253
1288
|
async listExchangesForListing(req, options) {
|
|
1254
|
-
const
|
|
1289
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1290
|
+
const url = `${host}/api/2.0/marketplace-exchange/exchanges-for-listing`;
|
|
1255
1291
|
const params = new URLSearchParams();
|
|
1256
1292
|
if (req.listingId !== undefined) {
|
|
1257
1293
|
params.append('listing_id', req.listingId);
|
|
@@ -1267,14 +1303,14 @@ export class MarketplacesClient {
|
|
|
1267
1303
|
let resp;
|
|
1268
1304
|
const call = async (callSignal) => {
|
|
1269
1305
|
const headers = new Headers();
|
|
1270
|
-
if (
|
|
1271
|
-
headers.set('X-Databricks-Org-Id',
|
|
1306
|
+
if (workspaceId !== undefined) {
|
|
1307
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1272
1308
|
}
|
|
1273
1309
|
headers.set('User-Agent', this.userAgent);
|
|
1274
1310
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
1275
1311
|
const respBody = await executeHttpCall({
|
|
1276
1312
|
request: httpReq,
|
|
1277
|
-
httpClient
|
|
1313
|
+
httpClient,
|
|
1278
1314
|
logger: this.logger,
|
|
1279
1315
|
});
|
|
1280
1316
|
resp = parseResponse(respBody, unmarshalListExchangesForListingResponseSchema);
|
|
@@ -1300,7 +1336,8 @@ export class MarketplacesClient {
|
|
|
1300
1336
|
}
|
|
1301
1337
|
/** List files attached to a parent entity. */
|
|
1302
1338
|
async listFiles(req, options) {
|
|
1303
|
-
const
|
|
1339
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1340
|
+
const url = `${host}/api/2.0/marketplace-provider/files`;
|
|
1304
1341
|
const params = new URLSearchParams();
|
|
1305
1342
|
if (req.fileParent !== undefined) {
|
|
1306
1343
|
flattenQueryParams('file_parent', marshalFileParentSchema.parse(req.fileParent), params);
|
|
@@ -1316,14 +1353,14 @@ export class MarketplacesClient {
|
|
|
1316
1353
|
let resp;
|
|
1317
1354
|
const call = async (callSignal) => {
|
|
1318
1355
|
const headers = new Headers();
|
|
1319
|
-
if (
|
|
1320
|
-
headers.set('X-Databricks-Org-Id',
|
|
1356
|
+
if (workspaceId !== undefined) {
|
|
1357
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1321
1358
|
}
|
|
1322
1359
|
headers.set('User-Agent', this.userAgent);
|
|
1323
1360
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
1324
1361
|
const respBody = await executeHttpCall({
|
|
1325
1362
|
request: httpReq,
|
|
1326
|
-
httpClient
|
|
1363
|
+
httpClient,
|
|
1327
1364
|
logger: this.logger,
|
|
1328
1365
|
});
|
|
1329
1366
|
resp = parseResponse(respBody, unmarshalListFilesResponseSchema);
|
|
@@ -1349,7 +1386,8 @@ export class MarketplacesClient {
|
|
|
1349
1386
|
}
|
|
1350
1387
|
/** List listings owned by this provider */
|
|
1351
1388
|
async listListings(req, options) {
|
|
1352
|
-
const
|
|
1389
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1390
|
+
const url = `${host}/api/2.0/marketplace-provider/listings`;
|
|
1353
1391
|
const params = new URLSearchParams();
|
|
1354
1392
|
if (req.pageToken !== undefined) {
|
|
1355
1393
|
params.append('page_token', req.pageToken);
|
|
@@ -1362,14 +1400,14 @@ export class MarketplacesClient {
|
|
|
1362
1400
|
let resp;
|
|
1363
1401
|
const call = async (callSignal) => {
|
|
1364
1402
|
const headers = new Headers();
|
|
1365
|
-
if (
|
|
1366
|
-
headers.set('X-Databricks-Org-Id',
|
|
1403
|
+
if (workspaceId !== undefined) {
|
|
1404
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1367
1405
|
}
|
|
1368
1406
|
headers.set('User-Agent', this.userAgent);
|
|
1369
1407
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
1370
1408
|
const respBody = await executeHttpCall({
|
|
1371
1409
|
request: httpReq,
|
|
1372
|
-
httpClient
|
|
1410
|
+
httpClient,
|
|
1373
1411
|
logger: this.logger,
|
|
1374
1412
|
});
|
|
1375
1413
|
resp = parseResponse(respBody, unmarshalGetListingsResponseSchema);
|
|
@@ -1395,7 +1433,8 @@ export class MarketplacesClient {
|
|
|
1395
1433
|
}
|
|
1396
1434
|
/** List listings associated with an exchange */
|
|
1397
1435
|
async listListingsForExchange(req, options) {
|
|
1398
|
-
const
|
|
1436
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1437
|
+
const url = `${host}/api/2.0/marketplace-exchange/listings-for-exchange`;
|
|
1399
1438
|
const params = new URLSearchParams();
|
|
1400
1439
|
if (req.exchangeId !== undefined) {
|
|
1401
1440
|
params.append('exchange_id', req.exchangeId);
|
|
@@ -1411,14 +1450,14 @@ export class MarketplacesClient {
|
|
|
1411
1450
|
let resp;
|
|
1412
1451
|
const call = async (callSignal) => {
|
|
1413
1452
|
const headers = new Headers();
|
|
1414
|
-
if (
|
|
1415
|
-
headers.set('X-Databricks-Org-Id',
|
|
1453
|
+
if (workspaceId !== undefined) {
|
|
1454
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1416
1455
|
}
|
|
1417
1456
|
headers.set('User-Agent', this.userAgent);
|
|
1418
1457
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
1419
1458
|
const respBody = await executeHttpCall({
|
|
1420
1459
|
request: httpReq,
|
|
1421
|
-
httpClient
|
|
1460
|
+
httpClient,
|
|
1422
1461
|
logger: this.logger,
|
|
1423
1462
|
});
|
|
1424
1463
|
resp = parseResponse(respBody, unmarshalListListingsForExchangeResponseSchema);
|
|
@@ -1444,18 +1483,19 @@ export class MarketplacesClient {
|
|
|
1444
1483
|
}
|
|
1445
1484
|
/** Get provider analytics dashboard. */
|
|
1446
1485
|
async listProviderAnalyticsDashboard(_req, options) {
|
|
1447
|
-
const
|
|
1486
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1487
|
+
const url = `${host}/api/2.0/marketplace-provider/analytics_dashboard`;
|
|
1448
1488
|
let resp;
|
|
1449
1489
|
const call = async (callSignal) => {
|
|
1450
1490
|
const headers = new Headers();
|
|
1451
|
-
if (
|
|
1452
|
-
headers.set('X-Databricks-Org-Id',
|
|
1491
|
+
if (workspaceId !== undefined) {
|
|
1492
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1453
1493
|
}
|
|
1454
1494
|
headers.set('User-Agent', this.userAgent);
|
|
1455
1495
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
1456
1496
|
const respBody = await executeHttpCall({
|
|
1457
1497
|
request: httpReq,
|
|
1458
|
-
httpClient
|
|
1498
|
+
httpClient,
|
|
1459
1499
|
logger: this.logger,
|
|
1460
1500
|
});
|
|
1461
1501
|
resp = parseResponse(respBody, unmarshalListProviderAnalyticsDashboardResponseSchema);
|
|
@@ -1468,7 +1508,8 @@ export class MarketplacesClient {
|
|
|
1468
1508
|
}
|
|
1469
1509
|
/** List provider profiles for account. */
|
|
1470
1510
|
async listProviders(req, options) {
|
|
1471
|
-
const
|
|
1511
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1512
|
+
const url = `${host}/api/2.0/marketplace-provider/providers`;
|
|
1472
1513
|
const params = new URLSearchParams();
|
|
1473
1514
|
if (req.pageToken !== undefined) {
|
|
1474
1515
|
params.append('page_token', req.pageToken);
|
|
@@ -1481,14 +1522,14 @@ export class MarketplacesClient {
|
|
|
1481
1522
|
let resp;
|
|
1482
1523
|
const call = async (callSignal) => {
|
|
1483
1524
|
const headers = new Headers();
|
|
1484
|
-
if (
|
|
1485
|
-
headers.set('X-Databricks-Org-Id',
|
|
1525
|
+
if (workspaceId !== undefined) {
|
|
1526
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1486
1527
|
}
|
|
1487
1528
|
headers.set('User-Agent', this.userAgent);
|
|
1488
1529
|
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
1489
1530
|
const respBody = await executeHttpCall({
|
|
1490
1531
|
request: httpReq,
|
|
1491
|
-
httpClient
|
|
1532
|
+
httpClient,
|
|
1492
1533
|
logger: this.logger,
|
|
1493
1534
|
});
|
|
1494
1535
|
resp = parseResponse(respBody, unmarshalListProvidersResponseSchema);
|
|
@@ -1514,18 +1555,19 @@ export class MarketplacesClient {
|
|
|
1514
1555
|
}
|
|
1515
1556
|
/** Disassociate an exchange with a listing */
|
|
1516
1557
|
async removeExchangeForListing(req, options) {
|
|
1517
|
-
const
|
|
1558
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1559
|
+
const url = `${host}/api/2.0/marketplace-exchange/exchanges-for-listing/${req.id ?? ''}`;
|
|
1518
1560
|
let resp;
|
|
1519
1561
|
const call = async (callSignal) => {
|
|
1520
1562
|
const headers = new Headers();
|
|
1521
|
-
if (
|
|
1522
|
-
headers.set('X-Databricks-Org-Id',
|
|
1563
|
+
if (workspaceId !== undefined) {
|
|
1564
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1523
1565
|
}
|
|
1524
1566
|
headers.set('User-Agent', this.userAgent);
|
|
1525
1567
|
const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
|
|
1526
1568
|
const respBody = await executeHttpCall({
|
|
1527
1569
|
request: httpReq,
|
|
1528
|
-
httpClient
|
|
1570
|
+
httpClient,
|
|
1529
1571
|
logger: this.logger,
|
|
1530
1572
|
});
|
|
1531
1573
|
resp = parseResponse(respBody, unmarshalRemoveExchangeForListingResponseSchema);
|
|
@@ -1538,19 +1580,20 @@ export class MarketplacesClient {
|
|
|
1538
1580
|
}
|
|
1539
1581
|
/** Update an exchange */
|
|
1540
1582
|
async updateExchange(req, options) {
|
|
1541
|
-
const
|
|
1583
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1584
|
+
const url = `${host}/api/2.0/marketplace-exchange/exchanges/${req.id ?? ''}`;
|
|
1542
1585
|
const body = marshalRequest(req, marshalUpdateExchangeRequestSchema);
|
|
1543
1586
|
let resp;
|
|
1544
1587
|
const call = async (callSignal) => {
|
|
1545
1588
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
1546
|
-
if (
|
|
1547
|
-
headers.set('X-Databricks-Org-Id',
|
|
1589
|
+
if (workspaceId !== undefined) {
|
|
1590
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1548
1591
|
}
|
|
1549
1592
|
headers.set('User-Agent', this.userAgent);
|
|
1550
1593
|
const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
|
|
1551
1594
|
const respBody = await executeHttpCall({
|
|
1552
1595
|
request: httpReq,
|
|
1553
|
-
httpClient
|
|
1596
|
+
httpClient,
|
|
1554
1597
|
logger: this.logger,
|
|
1555
1598
|
});
|
|
1556
1599
|
resp = parseResponse(respBody, unmarshalUpdateExchangeResponseSchema);
|
|
@@ -1563,19 +1606,20 @@ export class MarketplacesClient {
|
|
|
1563
1606
|
}
|
|
1564
1607
|
/** Update an exchange filter. */
|
|
1565
1608
|
async updateExchangeFilter(req, options) {
|
|
1566
|
-
const
|
|
1609
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1610
|
+
const url = `${host}/api/2.0/marketplace-exchange/filters/${req.id ?? ''}`;
|
|
1567
1611
|
const body = marshalRequest(req, marshalUpdateExchangeFilterRequestSchema);
|
|
1568
1612
|
let resp;
|
|
1569
1613
|
const call = async (callSignal) => {
|
|
1570
1614
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
1571
|
-
if (
|
|
1572
|
-
headers.set('X-Databricks-Org-Id',
|
|
1615
|
+
if (workspaceId !== undefined) {
|
|
1616
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1573
1617
|
}
|
|
1574
1618
|
headers.set('User-Agent', this.userAgent);
|
|
1575
1619
|
const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
|
|
1576
1620
|
const respBody = await executeHttpCall({
|
|
1577
1621
|
request: httpReq,
|
|
1578
|
-
httpClient
|
|
1622
|
+
httpClient,
|
|
1579
1623
|
logger: this.logger,
|
|
1580
1624
|
});
|
|
1581
1625
|
resp = parseResponse(respBody, unmarshalUpdateExchangeFilterResponseSchema);
|
|
@@ -1588,19 +1632,20 @@ export class MarketplacesClient {
|
|
|
1588
1632
|
}
|
|
1589
1633
|
/** Update a listing */
|
|
1590
1634
|
async updateListing(req, options) {
|
|
1591
|
-
const
|
|
1635
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1636
|
+
const url = `${host}/api/2.0/marketplace-provider/listings/${req.id ?? ''}`;
|
|
1592
1637
|
const body = marshalRequest(req, marshalUpdateListingRequestSchema);
|
|
1593
1638
|
let resp;
|
|
1594
1639
|
const call = async (callSignal) => {
|
|
1595
1640
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
1596
|
-
if (
|
|
1597
|
-
headers.set('X-Databricks-Org-Id',
|
|
1641
|
+
if (workspaceId !== undefined) {
|
|
1642
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1598
1643
|
}
|
|
1599
1644
|
headers.set('User-Agent', this.userAgent);
|
|
1600
1645
|
const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
|
|
1601
1646
|
const respBody = await executeHttpCall({
|
|
1602
1647
|
request: httpReq,
|
|
1603
|
-
httpClient
|
|
1648
|
+
httpClient,
|
|
1604
1649
|
logger: this.logger,
|
|
1605
1650
|
});
|
|
1606
1651
|
resp = parseResponse(respBody, unmarshalUpdateListingResponseSchema);
|
|
@@ -1613,19 +1658,20 @@ export class MarketplacesClient {
|
|
|
1613
1658
|
}
|
|
1614
1659
|
/** Update personalization request. This method only permits updating the status of the request. */
|
|
1615
1660
|
async updatePersonalizationRequestStatus(req, options) {
|
|
1616
|
-
const
|
|
1661
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1662
|
+
const url = `${host}/api/2.0/marketplace-provider/listings/${req.listingId ?? ''}/personalization-requests/${req.requestId ?? ''}/request-status`;
|
|
1617
1663
|
const body = marshalRequest(req, marshalUpdatePersonalizationRequestStatusRequestSchema);
|
|
1618
1664
|
let resp;
|
|
1619
1665
|
const call = async (callSignal) => {
|
|
1620
1666
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
1621
|
-
if (
|
|
1622
|
-
headers.set('X-Databricks-Org-Id',
|
|
1667
|
+
if (workspaceId !== undefined) {
|
|
1668
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1623
1669
|
}
|
|
1624
1670
|
headers.set('User-Agent', this.userAgent);
|
|
1625
1671
|
const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
|
|
1626
1672
|
const respBody = await executeHttpCall({
|
|
1627
1673
|
request: httpReq,
|
|
1628
|
-
httpClient
|
|
1674
|
+
httpClient,
|
|
1629
1675
|
logger: this.logger,
|
|
1630
1676
|
});
|
|
1631
1677
|
resp = parseResponse(respBody, unmarshalUpdatePersonalizationRequestStatusResponseSchema);
|
|
@@ -1638,19 +1684,20 @@ export class MarketplacesClient {
|
|
|
1638
1684
|
}
|
|
1639
1685
|
/** Update provider profile */
|
|
1640
1686
|
async updateProvider(req, options) {
|
|
1641
|
-
const
|
|
1687
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1688
|
+
const url = `${host}/api/2.0/marketplace-provider/providers/${req.id ?? ''}`;
|
|
1642
1689
|
const body = marshalRequest(req, marshalUpdateProviderRequestSchema);
|
|
1643
1690
|
let resp;
|
|
1644
1691
|
const call = async (callSignal) => {
|
|
1645
1692
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
1646
|
-
if (
|
|
1647
|
-
headers.set('X-Databricks-Org-Id',
|
|
1693
|
+
if (workspaceId !== undefined) {
|
|
1694
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1648
1695
|
}
|
|
1649
1696
|
headers.set('User-Agent', this.userAgent);
|
|
1650
1697
|
const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
|
|
1651
1698
|
const respBody = await executeHttpCall({
|
|
1652
1699
|
request: httpReq,
|
|
1653
|
-
httpClient
|
|
1700
|
+
httpClient,
|
|
1654
1701
|
logger: this.logger,
|
|
1655
1702
|
});
|
|
1656
1703
|
resp = parseResponse(respBody, unmarshalUpdateProviderResponseSchema);
|
|
@@ -1663,19 +1710,20 @@ export class MarketplacesClient {
|
|
|
1663
1710
|
}
|
|
1664
1711
|
/** Update provider analytics dashboard. */
|
|
1665
1712
|
async updateProviderAnalyticsDashboard(req, options) {
|
|
1666
|
-
const
|
|
1713
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
1714
|
+
const url = `${host}/api/2.0/marketplace-provider/analytics_dashboard/${req.id ?? ''}`;
|
|
1667
1715
|
const body = marshalRequest(req, marshalUpdateProviderAnalyticsDashboardRequestSchema);
|
|
1668
1716
|
let resp;
|
|
1669
1717
|
const call = async (callSignal) => {
|
|
1670
1718
|
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
1671
|
-
if (
|
|
1672
|
-
headers.set('X-Databricks-Org-Id',
|
|
1719
|
+
if (workspaceId !== undefined) {
|
|
1720
|
+
headers.set('X-Databricks-Org-Id', workspaceId);
|
|
1673
1721
|
}
|
|
1674
1722
|
headers.set('User-Agent', this.userAgent);
|
|
1675
1723
|
const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
|
|
1676
1724
|
const respBody = await executeHttpCall({
|
|
1677
1725
|
request: httpReq,
|
|
1678
|
-
httpClient
|
|
1726
|
+
httpClient,
|
|
1679
1727
|
logger: this.logger,
|
|
1680
1728
|
});
|
|
1681
1729
|
resp = parseResponse(respBody, unmarshalUpdateProviderAnalyticsDashboardResponseSchema);
|