@ibm-cloud/ibm_dph_services 0.2.0 → 0.4.0

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/dph/v1.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * (C) Copyright IBM Corp. 2024.
3
+ * (C) Copyright IBM Corp. 2025.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -84,12 +84,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
84
84
  var extend = require("extend");
85
85
  var ibm_cloud_sdk_core_1 = require("ibm-cloud-sdk-core");
86
86
  var common_1 = require("../lib/common");
87
- var commonConstants = require('../lib/common.constants');
88
- var SERVICE_NAME = commonConstants.SERVICE_NAME, CONTENT_TYPE_JSON = commonConstants.CONTENT_TYPE_JSON, CONTENT_TYPE_PATCH_JSON = commonConstants.CONTENT_TYPE_PATCH_JSON, SERVICE_VERSION = commonConstants.SERVICE_VERSION, INITIALIZE = commonConstants.INITIALIZE, URL_GET_INITIALIZE_STATUS = commonConstants.URL_GET_INITIALIZE_STATUS, HTTP_GET = commonConstants.HTTP_GET, GET_INITIALIZE_STATUS = commonConstants.GET_INITIALIZE_STATUS, URL_CREATE_DATA_PRODUCT = commonConstants.URL_CREATE_DATA_PRODUCT, CREATE_DATA_PRODUCT = commonConstants.CREATE_DATA_PRODUCT, HTTP_POST = commonConstants.HTTP_POST, GET_SERVICEID_CREDENTIALS = commonConstants.GET_SERVICEID_CREDENTIALS, URL_GET_SERVICEID_CREDENTIALS = commonConstants.URL_GET_SERVICEID_CREDENTIALS, URL_INITIALIZE = commonConstants.URL_INITIALIZE, MANAGE_APIKEYS = commonConstants.MANAGE_APIKEYS, URL_MANAGE_APIKEYS = commonConstants.URL_MANAGE_APIKEYS, LIST_DATA_PRODUCTS = commonConstants.LIST_DATA_PRODUCTS, URL_LIST_DATA_PRODUCTS = commonConstants.URL_LIST_DATA_PRODUCTS, GET_DATA_PRODUCT = commonConstants.GET_DATA_PRODUCT, URL_GET_DATA_PRODUCT = commonConstants.URL_GET_DATA_PRODUCT, COMPLETE_DRAFT_CONTRACT_TERMS_DOCUMENT = commonConstants.COMPLETE_DRAFT_CONTRACT_TERMS_DOCUMENT, URL_COMPLETE_DRAFT_CONTRACT_TERMS_DOCUMENT = commonConstants.URL_COMPLETE_DRAFT_CONTRACT_TERMS_DOCUMENT, LIST_DATA_PRODUCT_DRAFTS = commonConstants.LIST_DATA_PRODUCT_DRAFTS, URL_LIST_DATA_PRODUCT_DRAFTS = commonConstants.URL_LIST_DATA_PRODUCT_DRAFTS, CREATE_DATA_PRODUCT_DRAFT = commonConstants.CREATE_DATA_PRODUCT_DRAFT, URL_CREATE_DATA_PRODUCT_DRAFT = commonConstants.URL_CREATE_DATA_PRODUCT_DRAFT, CREATE_DRAFT_CONTRACT_TERMS_DOCUMENT = commonConstants.CREATE_DRAFT_CONTRACT_TERMS_DOCUMENT, URL_CREATE_DRAFT_CONTRACT_TERMS_DOCUMENT = commonConstants.URL_CREATE_DRAFT_CONTRACT_TERMS_DOCUMENT, GET_DATA_PRODUCT_DRAFT = commonConstants.GET_DATA_PRODUCT_DRAFT, URL_GET_DATA_PRODUCT_DRAFT = commonConstants.URL_GET_DATA_PRODUCT_DRAFT, DLETE_DATA_PRODUCT_DRAFT = commonConstants.DLETE_DATA_PRODUCT_DRAFT, URL_DELETE_DATA_PRODUCT_DRAFT = commonConstants.URL_DELETE_DATA_PRODUCT_DRAFT, HTTP_DELETE = commonConstants.HTTP_DELETE, UPDATE_DATA_PRODUCT_DRAFT = commonConstants.UPDATE_DATA_PRODUCT_DRAFT, URL_UPDATE_DATA_PRODUCT_DRAFT = commonConstants.URL_UPDATE_DATA_PRODUCT_DRAFT, HTTP_PATCH = commonConstants.HTTP_PATCH, GET_DRAFT_CONTRACT_TERMS_DOCUMENT = commonConstants.GET_DRAFT_CONTRACT_TERMS_DOCUMENT, URL_GET_DRAFT_CONTRACT_TERMS_DOCUMENT = commonConstants.URL_GET_DRAFT_CONTRACT_TERMS_DOCUMENT, DELETE_DRAFT_CONTRACT_TERMS_DOCUMENT = commonConstants.DELETE_DRAFT_CONTRACT_TERMS_DOCUMENT, URL_DELETE_DRAFT_CONTRACT_TERMS_DOCUMENT = commonConstants.URL_DELETE_DRAFT_CONTRACT_TERMS_DOCUMENT, UPDATE_DRAFT_CONTRACT_TERMS_DOCUMENT = commonConstants.UPDATE_DRAFT_CONTRACT_TERMS_DOCUMENT, URL_UPDATE_DRAFT_CONTRACT_TERMS_DOCUMENT = commonConstants.URL_UPDATE_DRAFT_CONTRACT_TERMS_DOCUMENT, PUBLISH_DATA_PRODUCT_DRAFT = commonConstants.PUBLISH_DATA_PRODUCT_DRAFT, URL_PUBLISH_DATA_PRODUCT_DRAFT = commonConstants.URL_PUBLISH_DATA_PRODUCT_DRAFT, GET_DATA_PRODUCT_RELEASE = commonConstants.GET_DATA_PRODUCT_RELEASE, URL_GET_DATA_PRODUCT_RELEASE = commonConstants.URL_GET_DATA_PRODUCT_RELEASE, UPDATE_DATA_PRODUCT_RELEASE = commonConstants.UPDATE_DATA_PRODUCT_RELEASE, URL_UPDATE_DATA_PRODUCT_RELEASE = commonConstants.URL_UPDATE_DATA_PRODUCT_RELEASE, GET_RELEASE_CONTRACT_TERMS_DOCUMENT = commonConstants.GET_RELEASE_CONTRACT_TERMS_DOCUMENT, URL_GET_RELEASE_CONTRACT_TERMS_DOCUMENT = commonConstants.URL_GET_RELEASE_CONTRACT_TERMS_DOCUMENT, LIST_DATA_PRODUCT_RELEASES = commonConstants.LIST_DATA_PRODUCT_RELEASES, URL_LIST_DATA_PRODUCT_RELEASES = commonConstants.URL_LIST_DATA_PRODUCT_RELEASES, RETIRE_DATA_PRODUCT_RELEASE = commonConstants.RETIRE_DATA_PRODUCT_RELEASE, URL_RETIRE_DATA_PRODUCT_RELEASE = commonConstants.URL_RETIRE_DATA_PRODUCT_RELEASE;
89
87
  /**
90
88
  * Data Product Hub API Service
91
89
  *
92
- * API Version: 1.0.0
90
+ * API Version: 1
93
91
  */
94
92
  var DphV1 = /** @class */ (function (_super) {
95
93
  __extends(DphV1, _super);
@@ -169,16 +167,16 @@ var DphV1 = /** @class */ (function (_super) {
169
167
  var query = {
170
168
  'container.id': _params.containerId,
171
169
  };
172
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, GET_INITIALIZE_STATUS);
170
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getInitializeStatus');
173
171
  var parameters = {
174
172
  options: {
175
- url: URL_GET_INITIALIZE_STATUS,
176
- method: HTTP_GET,
173
+ url: '/data_product_exchange/v1/configuration/initialize/status',
174
+ method: 'GET',
177
175
  qs: query,
178
176
  },
179
177
  defaultOptions: extend(true, {}, this.baseOptions, {
180
178
  headers: extend(true, sdkHeaders, {
181
- 'Accept': CONTENT_TYPE_JSON,
179
+ 'Accept': 'application/json',
182
180
  }, _params.headers),
183
181
  }),
184
182
  };
@@ -201,15 +199,15 @@ var DphV1 = /** @class */ (function (_super) {
201
199
  if (_validationErrors) {
202
200
  return Promise.reject(_validationErrors);
203
201
  }
204
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, GET_SERVICEID_CREDENTIALS);
202
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getServiceIdCredentials');
205
203
  var parameters = {
206
204
  options: {
207
- url: URL_GET_SERVICEID_CREDENTIALS,
208
- method: HTTP_GET,
205
+ url: '/data_product_exchange/v1/configuration/credentials',
206
+ method: 'GET',
209
207
  },
210
208
  defaultOptions: extend(true, {}, this.baseOptions, {
211
209
  headers: extend(true, sdkHeaders, {
212
- 'Accept': CONTENT_TYPE_JSON,
210
+ 'Accept': 'application/json',
213
211
  }, _params.headers),
214
212
  }),
215
213
  };
@@ -251,17 +249,17 @@ var DphV1 = /** @class */ (function (_super) {
251
249
  'container': _params.container,
252
250
  'include': _params.include,
253
251
  };
254
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, INITIALIZE);
252
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'initialize');
255
253
  var parameters = {
256
254
  options: {
257
- url: URL_INITIALIZE,
258
- method: HTTP_POST,
255
+ url: '/data_product_exchange/v1/configuration/initialize',
256
+ method: 'POST',
259
257
  body: body,
260
258
  },
261
259
  defaultOptions: extend(true, {}, this.baseOptions, {
262
260
  headers: extend(true, sdkHeaders, {
263
- 'Accept': CONTENT_TYPE_JSON,
264
- 'Content-Type': CONTENT_TYPE_JSON,
261
+ 'Accept': 'application/json',
262
+ 'Content-Type': 'application/json',
265
263
  }, _params.headers),
266
264
  }),
267
265
  };
@@ -284,11 +282,11 @@ var DphV1 = /** @class */ (function (_super) {
284
282
  if (_validationErrors) {
285
283
  return Promise.reject(_validationErrors);
286
284
  }
287
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, MANAGE_APIKEYS);
285
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'manageApiKeys');
288
286
  var parameters = {
289
287
  options: {
290
- url: URL_MANAGE_APIKEYS,
291
- method: HTTP_POST,
288
+ url: '/data_product_exchange/v1/configuration/rotate_credentials',
289
+ method: 'POST',
292
290
  },
293
291
  defaultOptions: extend(true, {}, this.baseOptions, {
294
292
  headers: extend(true, sdkHeaders, {}, _params.headers),
@@ -296,17 +294,100 @@ var DphV1 = /** @class */ (function (_super) {
296
294
  };
297
295
  return this.createRequest(parameters);
298
296
  };
297
+ /*************************
298
+ * dataAssetVisualization
299
+ ************************/
300
+ /**
301
+ * Create visualization asset and initialize profiling for the provided data assets.
302
+ *
303
+ * Use this API to create visualization asset and initialize profiling for the provided data assets<br/><br/>Provide
304
+ * the below required fields<br/><br/>Required fields:<br/><br/>- catalog_id<br/>- Collection of assetId with it's
305
+ * related asset id<br/><br/>.
306
+ *
307
+ * @param {Object} [params] - The parameters to send to the service.
308
+ * @param {DataAssetRelationship[]} [params.assets] - Data product hub asset and it's related part asset.
309
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
310
+ * @returns {Promise<DphV1.Response<DphV1.DataAssetVisualizationRes>>}
311
+ */
312
+ DphV1.prototype.createDataAssetVisualization = function (params) {
313
+ var _params = __assign({}, params);
314
+ var _requiredParams = [];
315
+ var _validParams = ['assets', 'headers'];
316
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
317
+ if (_validationErrors) {
318
+ return Promise.reject(_validationErrors);
319
+ }
320
+ var body = {
321
+ 'assets': _params.assets,
322
+ };
323
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createDataAssetVisualization');
324
+ var parameters = {
325
+ options: {
326
+ url: '/data_product_exchange/v1/data_asset/visualization',
327
+ method: 'POST',
328
+ body: body,
329
+ },
330
+ defaultOptions: extend(true, {}, this.baseOptions, {
331
+ headers: extend(true, sdkHeaders, {
332
+ 'Accept': 'application/json',
333
+ 'Content-Type': 'application/json',
334
+ }, _params.headers),
335
+ }),
336
+ };
337
+ return this.createRequest(parameters);
338
+ };
339
+ /**
340
+ * Reinitiate visualization for an asset.
341
+ *
342
+ * Use this API to Reinitiate visualization for an asset which is in below scenarios<br/><br/>- Previous bucket got
343
+ * deleted and new bucket is created.<br/>- Data visualization attachment is missing in asset details.<br/>-
344
+ * Visualization asset reference is missing in related asset details.<br/><br/>.
345
+ *
346
+ * @param {Object} [params] - The parameters to send to the service.
347
+ * @param {DataAssetRelationship[]} [params.assets] - Data product hub asset and it's related part asset.
348
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
349
+ * @returns {Promise<DphV1.Response<DphV1.DataAssetVisualizationRes>>}
350
+ */
351
+ DphV1.prototype.reinitiateDataAssetVisualization = function (params) {
352
+ var _params = __assign({}, params);
353
+ var _requiredParams = [];
354
+ var _validParams = ['assets', 'headers'];
355
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
356
+ if (_validationErrors) {
357
+ return Promise.reject(_validationErrors);
358
+ }
359
+ var body = {
360
+ 'assets': _params.assets,
361
+ };
362
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'reinitiateDataAssetVisualization');
363
+ var parameters = {
364
+ options: {
365
+ url: '/data_product_exchange/v1/data_asset/visualization/reinitiate',
366
+ method: 'POST',
367
+ body: body,
368
+ },
369
+ defaultOptions: extend(true, {}, this.baseOptions, {
370
+ headers: extend(true, sdkHeaders, {
371
+ 'Accept': 'application/json',
372
+ 'Content-Type': 'application/json',
373
+ }, _params.headers),
374
+ }),
375
+ };
376
+ return this.createRequest(parameters);
377
+ };
299
378
  /*************************
300
379
  * dataProducts
301
380
  ************************/
302
381
  /**
382
+ * Retrieve a list of data products.
383
+ *
303
384
  * Retrieve a list of data products.
304
385
  *
305
386
  * @param {Object} [params] - The parameters to send to the service.
306
387
  * @param {number} [params.limit] - Limit the number of data products in the results. The maximum limit is 200.
307
388
  * @param {string} [params.start] - Start token for pagination.
308
389
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
309
- * @returns {Promise<DphV1.Response<DphV1.DataProductSummaryCollection>>}
390
+ * @returns {Promise<DphV1.Response<DphV1.DataProductCollection>>}
310
391
  */
311
392
  DphV1.prototype.listDataProducts = function (params) {
312
393
  var _params = __assign({}, params);
@@ -320,16 +401,16 @@ var DphV1 = /** @class */ (function (_super) {
320
401
  'limit': _params.limit,
321
402
  'start': _params.start,
322
403
  };
323
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, LIST_DATA_PRODUCTS);
404
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'listDataProducts');
324
405
  var parameters = {
325
406
  options: {
326
- url: URL_LIST_DATA_PRODUCTS,
327
- method: HTTP_GET,
407
+ url: '/data_product_exchange/v1/data_products',
408
+ method: 'GET',
328
409
  qs: query,
329
410
  },
330
411
  defaultOptions: extend(true, {}, this.baseOptions, {
331
412
  headers: extend(true, sdkHeaders, {
332
- 'Accept': CONTENT_TYPE_JSON,
413
+ 'Accept': 'application/json',
333
414
  }, _params.headers),
334
415
  }),
335
416
  };
@@ -343,14 +424,16 @@ var DphV1 = /** @class */ (function (_super) {
343
424
  * default version **1.0.0** will be used.<br/><br/>The `domain` is optional.
344
425
  *
345
426
  * @param {Object} params - The parameters to send to the service.
346
- * @param {DataProductVersionPrototype[]} params.drafts - Collection of data products drafts to add to data product.
427
+ * @param {DataProductDraftPrototype[]} params.drafts - Collection of data products drafts to add to data product.
428
+ * @param {number} [params.limit] - Limit the number of data products in the results. The maximum limit is 200.
429
+ * @param {string} [params.start] - Start token for pagination.
347
430
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
348
431
  * @returns {Promise<DphV1.Response<DphV1.DataProduct>>}
349
432
  */
350
433
  DphV1.prototype.createDataProduct = function (params) {
351
434
  var _params = __assign({}, params);
352
435
  var _requiredParams = ['drafts'];
353
- var _validParams = ['drafts', 'headers'];
436
+ var _validParams = ['drafts', 'limit', 'start', 'headers'];
354
437
  var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
355
438
  if (_validationErrors) {
356
439
  return Promise.reject(_validationErrors);
@@ -358,23 +441,30 @@ var DphV1 = /** @class */ (function (_super) {
358
441
  var body = {
359
442
  'drafts': _params.drafts,
360
443
  };
361
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, CREATE_DATA_PRODUCT);
444
+ var query = {
445
+ 'limit': _params.limit,
446
+ 'start': _params.start,
447
+ };
448
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createDataProduct');
362
449
  var parameters = {
363
450
  options: {
364
- url: URL_CREATE_DATA_PRODUCT,
365
- method: HTTP_POST,
451
+ url: '/data_product_exchange/v1/data_products',
452
+ method: 'POST',
366
453
  body: body,
454
+ qs: query,
367
455
  },
368
456
  defaultOptions: extend(true, {}, this.baseOptions, {
369
457
  headers: extend(true, sdkHeaders, {
370
- 'Accept': CONTENT_TYPE_JSON,
371
- 'Content-Type': CONTENT_TYPE_JSON,
458
+ 'Accept': 'application/json',
459
+ 'Content-Type': 'application/json',
372
460
  }, _params.headers),
373
461
  }),
374
462
  };
375
463
  return this.createRequest(parameters);
376
464
  };
377
465
  /**
466
+ * Retrieve a data product identified by id.
467
+ *
378
468
  * Retrieve a data product identified by id.
379
469
  *
380
470
  * @param {Object} params - The parameters to send to the service.
@@ -393,16 +483,16 @@ var DphV1 = /** @class */ (function (_super) {
393
483
  var path = {
394
484
  'data_product_id': _params.dataProductId,
395
485
  };
396
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, GET_DATA_PRODUCT);
486
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getDataProduct');
397
487
  var parameters = {
398
488
  options: {
399
- url: URL_GET_DATA_PRODUCT,
400
- method: HTTP_GET,
489
+ url: '/data_product_exchange/v1/data_products/{data_product_id}',
490
+ method: 'GET',
401
491
  path: path,
402
492
  },
403
493
  defaultOptions: extend(true, {}, this.baseOptions, {
404
494
  headers: extend(true, sdkHeaders, {
405
- 'Accept': CONTENT_TYPE_JSON,
495
+ 'Accept': 'application/json',
406
496
  }, _params.headers),
407
497
  }),
408
498
  };
@@ -415,7 +505,8 @@ var DphV1 = /** @class */ (function (_super) {
415
505
  * Complete a contract document upload operation.
416
506
  *
417
507
  * After uploading a file to the provided signed URL, call this endpoint to mark the upload as complete. After the
418
- * upload operation is marked as complete, the file is available to download.
508
+ * upload operation is marked as complete, the file is available to download. Use '-' for the `data_product_id` to
509
+ * skip specifying the data product ID explicitly.
419
510
  * - After the upload is marked as complete, the returned URL is displayed in the "url" field. The signed URL is used
420
511
  * to download the document.
421
512
  * - Calling complete on referential documents results in an error.
@@ -443,16 +534,16 @@ var DphV1 = /** @class */ (function (_super) {
443
534
  'contract_terms_id': _params.contractTermsId,
444
535
  'document_id': _params.documentId,
445
536
  };
446
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, COMPLETE_DRAFT_CONTRACT_TERMS_DOCUMENT);
537
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'completeDraftContractTermsDocument');
447
538
  var parameters = {
448
539
  options: {
449
- url: URL_COMPLETE_DRAFT_CONTRACT_TERMS_DOCUMENT,
450
- method: HTTP_POST,
540
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}/complete',
541
+ method: 'POST',
451
542
  path: path,
452
543
  },
453
544
  defaultOptions: extend(true, {}, this.baseOptions, {
454
545
  headers: extend(true, sdkHeaders, {
455
- 'Accept': CONTENT_TYPE_JSON,
546
+ 'Accept': 'application/json',
456
547
  }, _params.headers),
457
548
  }),
458
549
  };
@@ -461,6 +552,9 @@ var DphV1 = /** @class */ (function (_super) {
461
552
  /**
462
553
  * Retrieve a list of data product drafts.
463
554
  *
555
+ * Retrieve a list of data product drafts. Use '-' for the `data_product_id` to skip specifying the data product ID
556
+ * explicitly.
557
+ *
464
558
  * @param {Object} params - The parameters to send to the service.
465
559
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
466
560
  * @param {string} [params.assetContainerId] - Filter the list of data product drafts by container id.
@@ -494,23 +588,25 @@ var DphV1 = /** @class */ (function (_super) {
494
588
  var path = {
495
589
  'data_product_id': _params.dataProductId,
496
590
  };
497
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, LIST_DATA_PRODUCT_DRAFTS);
591
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'listDataProductDrafts');
498
592
  var parameters = {
499
593
  options: {
500
- url: URL_LIST_DATA_PRODUCT_DRAFTS,
501
- method: HTTP_GET,
594
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts',
595
+ method: 'GET',
502
596
  qs: query,
503
597
  path: path,
504
598
  },
505
599
  defaultOptions: extend(true, {}, this.baseOptions, {
506
600
  headers: extend(true, sdkHeaders, {
507
- 'Accept': CONTENT_TYPE_JSON,
601
+ 'Accept': 'application/json',
508
602
  }, _params.headers),
509
603
  }),
510
604
  };
511
605
  return this.createRequest(parameters);
512
606
  };
513
607
  /**
608
+ * Create a new draft of an existing data product.
609
+ *
514
610
  * Create a new draft of an existing data product.
515
611
  *
516
612
  * @param {Object} params - The parameters to send to the service.
@@ -529,10 +625,7 @@ var DphV1 = /** @class */ (function (_super) {
529
625
  * @param {string[]} [params.tags] - Tags on the data product.
530
626
  * @param {UseCase[]} [params.useCases] - A list of use cases associated with the data product version.
531
627
  * @param {string[]} [params.types] - Types of parts on the data product.
532
- * @param {DataProductContractTerms[]} [params.contractTerms] - Contract terms binding various aspects of the data
533
- * product.
534
- * @param {boolean} [params.isRestricted] - Indicates whether the data product is restricted or not. A restricted data
535
- * product indicates that orders of the data product requires explicit approval before data is delivered.
628
+ * @param {ContractTerms[]} [params.contractTerms] - Contract terms binding various aspects of the data product.
536
629
  * @param {Domain} [params.domain] - Domain that the data product version belongs to. If this is the first version of
537
630
  * a data product, this field is required. If this is a new version of an existing data product, the domain will
538
631
  * default to the domain of the previous version of the data product.
@@ -541,8 +634,17 @@ var DphV1 = /** @class */ (function (_super) {
541
634
  * version of an existing data product, the data product parts will default to the parts list from the previous
542
635
  * version of the data product.
543
636
  * @param {DataProductWorkflows} [params.workflows] - The workflows associated with the data product version.
637
+ * @param {boolean} [params.dataviewEnabled] - Indicates whether the dataView has enabled for data product.
638
+ * @param {string} [params.comments] - Comments by a producer that are provided either at the time of data product
639
+ * version creation or retiring.
640
+ * @param {AssetListAccessControl} [params.accessControl] - Access control object.
641
+ * @param {string} [params.lastUpdatedAt] - Timestamp of last asset update.
642
+ * @param {ContainerIdentity} [params.subContainer] - The identity schema for a IBM knowledge catalog container
643
+ * (catalog/project/space).
644
+ * @param {boolean} [params.isRestricted] - Indicates whether the data product is restricted or not. A restricted data
645
+ * product indicates that orders of the data product requires explicit approval before data is delivered.
544
646
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
545
- * @returns {Promise<DphV1.Response<DphV1.DataProductVersion>>}
647
+ * @returns {Promise<DphV1.Response<DphV1.DataProductDraft>>}
546
648
  */
547
649
  DphV1.prototype.createDataProductDraft = function (params) {
548
650
  var _params = __assign({}, params);
@@ -559,10 +661,15 @@ var DphV1 = /** @class */ (function (_super) {
559
661
  'useCases',
560
662
  'types',
561
663
  'contractTerms',
562
- 'isRestricted',
563
664
  'domain',
564
665
  'partsOut',
565
666
  'workflows',
667
+ 'dataviewEnabled',
668
+ 'comments',
669
+ 'accessControl',
670
+ 'lastUpdatedAt',
671
+ 'subContainer',
672
+ 'isRestricted',
566
673
  'headers',
567
674
  ];
568
675
  var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
@@ -580,26 +687,31 @@ var DphV1 = /** @class */ (function (_super) {
580
687
  'use_cases': _params.useCases,
581
688
  'types': _params.types,
582
689
  'contract_terms': _params.contractTerms,
583
- 'is_restricted': _params.isRestricted,
584
690
  'domain': _params.domain,
585
691
  'parts_out': _params.partsOut,
586
692
  'workflows': _params.workflows,
693
+ 'dataview_enabled': _params.dataviewEnabled,
694
+ 'comments': _params.comments,
695
+ 'access_control': _params.accessControl,
696
+ 'last_updated_at': _params.lastUpdatedAt,
697
+ 'sub_container': _params.subContainer,
698
+ 'is_restricted': _params.isRestricted,
587
699
  };
588
700
  var path = {
589
701
  'data_product_id': _params.dataProductId,
590
702
  };
591
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, CREATE_DATA_PRODUCT_DRAFT);
703
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createDataProductDraft');
592
704
  var parameters = {
593
705
  options: {
594
- url: URL_CREATE_DATA_PRODUCT_DRAFT,
595
- method: HTTP_POST,
706
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts',
707
+ method: 'POST',
596
708
  body: body,
597
709
  path: path,
598
710
  },
599
711
  defaultOptions: extend(true, {}, this.baseOptions, {
600
712
  headers: extend(true, sdkHeaders, {
601
- 'Accept': CONTENT_TYPE_JSON,
602
- 'Content-Type': CONTENT_TYPE_JSON,
713
+ 'Accept': 'application/json',
714
+ 'Content-Type': 'application/json',
603
715
  }, _params.headers),
604
716
  }),
605
717
  };
@@ -608,6 +720,9 @@ var DphV1 = /** @class */ (function (_super) {
608
720
  /**
609
721
  * Upload a contract document to the data product draft contract terms.
610
722
  *
723
+ * Upload a contract document to the data product draft identified by draft_id. Use '-' for the `data_product_id` to
724
+ * skip specifying the data product ID explicitly.
725
+ *
611
726
  * - If the request object contains a "url" parameter, a referential document is created to store the provided url.
612
727
  * - If the request object does not contain a "url" parameter, an attachment document is created, and a signed url
613
728
  * will be returned in an "upload_url" parameter. The data product producer can upload the document using the provided
@@ -651,18 +766,18 @@ var DphV1 = /** @class */ (function (_super) {
651
766
  'draft_id': _params.draftId,
652
767
  'contract_terms_id': _params.contractTermsId,
653
768
  };
654
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, CREATE_DRAFT_CONTRACT_TERMS_DOCUMENT);
769
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createDraftContractTermsDocument');
655
770
  var parameters = {
656
771
  options: {
657
- url: URL_CREATE_DRAFT_CONTRACT_TERMS_DOCUMENT,
658
- method: HTTP_POST,
772
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents',
773
+ method: 'POST',
659
774
  body: body,
660
775
  path: path,
661
776
  },
662
777
  defaultOptions: extend(true, {}, this.baseOptions, {
663
778
  headers: extend(true, sdkHeaders, {
664
- 'Accept': CONTENT_TYPE_JSON,
665
- 'Content-Type': CONTENT_TYPE_JSON,
779
+ 'Accept': 'application/json',
780
+ 'Content-Type': 'application/json',
666
781
  }, _params.headers),
667
782
  }),
668
783
  };
@@ -671,11 +786,14 @@ var DphV1 = /** @class */ (function (_super) {
671
786
  /**
672
787
  * Get a draft of an existing data product.
673
788
  *
789
+ * Get a draft of an existing data product. Use '-' for the `data_product_id` to skip specifying the data product ID
790
+ * explicitly.
791
+ *
674
792
  * @param {Object} params - The parameters to send to the service.
675
793
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
676
794
  * @param {string} params.draftId - Data product draft id.
677
795
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
678
- * @returns {Promise<DphV1.Response<DphV1.DataProductVersion>>}
796
+ * @returns {Promise<DphV1.Response<DphV1.DataProductDraft>>}
679
797
  */
680
798
  DphV1.prototype.getDataProductDraft = function (params) {
681
799
  var _params = __assign({}, params);
@@ -689,16 +807,16 @@ var DphV1 = /** @class */ (function (_super) {
689
807
  'data_product_id': _params.dataProductId,
690
808
  'draft_id': _params.draftId,
691
809
  };
692
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, GET_DATA_PRODUCT_DRAFT);
810
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getDataProductDraft');
693
811
  var parameters = {
694
812
  options: {
695
- url: URL_GET_DATA_PRODUCT_DRAFT,
696
- method: HTTP_GET,
813
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}',
814
+ method: 'GET',
697
815
  path: path,
698
816
  },
699
817
  defaultOptions: extend(true, {}, this.baseOptions, {
700
818
  headers: extend(true, sdkHeaders, {
701
- 'Accept': CONTENT_TYPE_JSON,
819
+ 'Accept': 'application/json',
702
820
  }, _params.headers),
703
821
  }),
704
822
  };
@@ -707,6 +825,9 @@ var DphV1 = /** @class */ (function (_super) {
707
825
  /**
708
826
  * Delete a data product draft identified by ID.
709
827
  *
828
+ * Delete a data product draft identified by a valid ID. Use '-' for the `data_product_id` to skip specifying the data
829
+ * product ID explicitly.
830
+ *
710
831
  * @param {Object} params - The parameters to send to the service.
711
832
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
712
833
  * @param {string} params.draftId - Data product draft id.
@@ -725,11 +846,11 @@ var DphV1 = /** @class */ (function (_super) {
725
846
  'data_product_id': _params.dataProductId,
726
847
  'draft_id': _params.draftId,
727
848
  };
728
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, DLETE_DATA_PRODUCT_DRAFT);
849
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteDataProductDraft');
729
850
  var parameters = {
730
851
  options: {
731
- url: URL_DELETE_DATA_PRODUCT_DRAFT,
732
- method: HTTP_DELETE,
852
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}',
853
+ method: 'DELETE',
733
854
  path: path,
734
855
  },
735
856
  defaultOptions: extend(true, {}, this.baseOptions, {
@@ -741,10 +862,11 @@ var DphV1 = /** @class */ (function (_super) {
741
862
  /**
742
863
  * Update the data product draft identified by ID.
743
864
  *
744
- * Use this API to update the properties of a data product draft identified by a valid ID.<br/><br/>Specify patch
745
- * operations using http://jsonpatch.com/ syntax.<br/><br/>Supported patch operations include:<br/><br/>- Update the
746
- * properties of a data product<br/><br/>- Add/Remove parts from a data product (up to 20 parts)<br/><br/>- Add/Remove
747
- * use cases from a data product<br/><br/>- Update the data product state<br/><br/>.
865
+ * Use this API to update the properties of a data product draft identified by a valid ID. Use '-' for the
866
+ * `data_product_id` to skip specifying the data product ID explicitly.<br/><br/>Specify patch operations using
867
+ * http://jsonpatch.com/ syntax.<br/><br/>Supported patch operations include:<br/><br/>- Update the properties of a
868
+ * data product<br/><br/>- Add/Remove parts from a data product (up to 20 parts)<br/><br/>- Add/Remove use cases from
869
+ * a data product<br/><br/>- Update the data product state<br/><br/>.
748
870
  *
749
871
  * @param {Object} params - The parameters to send to the service.
750
872
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
@@ -752,7 +874,7 @@ var DphV1 = /** @class */ (function (_super) {
752
874
  * @param {JsonPatchOperation[]} params.jsonPatchInstructions - A set of patch operations as defined in RFC 6902. See
753
875
  * http://jsonpatch.com/ for more information.
754
876
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
755
- * @returns {Promise<DphV1.Response<DphV1.DataProductVersion>>}
877
+ * @returns {Promise<DphV1.Response<DphV1.DataProductDraft>>}
756
878
  */
757
879
  DphV1.prototype.updateDataProductDraft = function (params) {
758
880
  var _params = __assign({}, params);
@@ -767,18 +889,18 @@ var DphV1 = /** @class */ (function (_super) {
767
889
  'data_product_id': _params.dataProductId,
768
890
  'draft_id': _params.draftId,
769
891
  };
770
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, UPDATE_DATA_PRODUCT_DRAFT);
892
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'updateDataProductDraft');
771
893
  var parameters = {
772
894
  options: {
773
- url: URL_UPDATE_DATA_PRODUCT_DRAFT,
774
- method: HTTP_PATCH,
895
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}',
896
+ method: 'PATCH',
775
897
  body: body,
776
898
  path: path,
777
899
  },
778
900
  defaultOptions: extend(true, {}, this.baseOptions, {
779
901
  headers: extend(true, sdkHeaders, {
780
- 'Accept': CONTENT_TYPE_JSON,
781
- 'Content-Type': CONTENT_TYPE_PATCH_JSON,
902
+ 'Accept': 'application/json',
903
+ 'Content-Type': 'application/json-patch+json',
782
904
  }, _params.headers),
783
905
  }),
784
906
  };
@@ -790,7 +912,8 @@ var DphV1 = /** @class */ (function (_super) {
790
912
  * If a document has a completed attachment, the response contains the `url` which can be used to download the
791
913
  * attachment. If a document does not have a completed attachment, the response contains the `url` which was submitted
792
914
  * at document creation. If a document has an attachment that is incomplete, an error is returned to prompt the user
793
- * to upload the document file and complete it.
915
+ * to upload the document file and complete it. Use '-' for the `data_product_id` to skip specifying the data product
916
+ * ID explicitly.
794
917
  *
795
918
  * @param {Object} params - The parameters to send to the service.
796
919
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
@@ -814,16 +937,16 @@ var DphV1 = /** @class */ (function (_super) {
814
937
  'contract_terms_id': _params.contractTermsId,
815
938
  'document_id': _params.documentId,
816
939
  };
817
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, GET_DRAFT_CONTRACT_TERMS_DOCUMENT);
940
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getDraftContractTermsDocument');
818
941
  var parameters = {
819
942
  options: {
820
- url: URL_GET_DRAFT_CONTRACT_TERMS_DOCUMENT,
821
- method: HTTP_GET,
943
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}',
944
+ method: 'GET',
822
945
  path: path,
823
946
  },
824
947
  defaultOptions: extend(true, {}, this.baseOptions, {
825
948
  headers: extend(true, sdkHeaders, {
826
- 'Accept': CONTENT_TYPE_JSON,
949
+ 'Accept': 'application/json',
827
950
  }, _params.headers),
828
951
  }),
829
952
  };
@@ -832,7 +955,10 @@ var DphV1 = /** @class */ (function (_super) {
832
955
  /**
833
956
  * Delete a contract document.
834
957
  *
835
- * Contract documents can only be deleted for data product versions that are in DRAFT state.
958
+ * Delete an existing contract document.
959
+ *
960
+ * Contract documents can only be deleted for data product versions that are in DRAFT state. Use '-' for the
961
+ * `data_product_id` to skip specifying the data product ID explicitly.
836
962
  *
837
963
  * @param {Object} params - The parameters to send to the service.
838
964
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
@@ -856,11 +982,11 @@ var DphV1 = /** @class */ (function (_super) {
856
982
  'contract_terms_id': _params.contractTermsId,
857
983
  'document_id': _params.documentId,
858
984
  };
859
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, DELETE_DRAFT_CONTRACT_TERMS_DOCUMENT);
985
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteDraftContractTermsDocument');
860
986
  var parameters = {
861
987
  options: {
862
- url: URL_DELETE_DRAFT_CONTRACT_TERMS_DOCUMENT,
863
- method: HTTP_DELETE,
988
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}',
989
+ method: 'DELETE',
864
990
  path: path,
865
991
  },
866
992
  defaultOptions: extend(true, {}, this.baseOptions, {
@@ -880,6 +1006,7 @@ var DphV1 = /** @class */ (function (_super) {
880
1006
  * - Update the url of document if it does not have an attachment.
881
1007
  * - Update the type of the document.
882
1008
  * <br/><br/>Contract terms documents can only be updated if the associated data product version is in DRAFT state.
1009
+ * Use '-' for the `data_product_id` to skip specifying the data product ID explicitly.
883
1010
  *
884
1011
  * @param {Object} params - The parameters to send to the service.
885
1012
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
@@ -919,124 +1046,215 @@ var DphV1 = /** @class */ (function (_super) {
919
1046
  'contract_terms_id': _params.contractTermsId,
920
1047
  'document_id': _params.documentId,
921
1048
  };
922
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, UPDATE_DRAFT_CONTRACT_TERMS_DOCUMENT);
1049
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'updateDraftContractTermsDocument');
923
1050
  var parameters = {
924
1051
  options: {
925
- url: URL_UPDATE_DRAFT_CONTRACT_TERMS_DOCUMENT,
926
- method: HTTP_PATCH,
1052
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}',
1053
+ method: 'PATCH',
927
1054
  body: body,
928
1055
  path: path,
929
1056
  },
930
1057
  defaultOptions: extend(true, {}, this.baseOptions, {
931
1058
  headers: extend(true, sdkHeaders, {
932
- 'Accept': CONTENT_TYPE_JSON,
933
- 'Content-Type': CONTENT_TYPE_PATCH_JSON,
1059
+ 'Accept': 'application/json',
1060
+ 'Content-Type': 'application/json-patch+json',
934
1061
  }, _params.headers),
935
1062
  }),
936
1063
  };
937
1064
  return this.createRequest(parameters);
938
1065
  };
939
1066
  /**
940
- * Publish a draft of an existing data product.
1067
+ * Retrieve a data product contract terms identified by id.
1068
+ *
1069
+ * Retrieve a data product contract terms identified by id.
941
1070
  *
942
1071
  * @param {Object} params - The parameters to send to the service.
943
1072
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
944
1073
  * @param {string} params.draftId - Data product draft id.
1074
+ * @param {string} params.contractTermsId - Contract terms id.
1075
+ * @param {string} [params.accept] - The type of the response: application/json or application/odcs+yaml.
1076
+ * @param {boolean} [params.includeContractDocuments] - Set to false to exclude external contract documents (e.g.,
1077
+ * Terms and Conditions URLs) from the response. By default, these are included.
1078
+ * @param {boolean} [params.autopopulateServerInformation] - Set to true to autopopulate server information from
1079
+ * connection details. Default is false.
1080
+ * @param {string} [params.serverAssetId] - Asset ID of the server used for autopopulating connection details.
945
1081
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
946
- * @returns {Promise<DphV1.Response<DphV1.DataProductVersion>>}
1082
+ * @returns {Promise<DphV1.Response<DphV1.ContractTerms>>}
947
1083
  */
948
- DphV1.prototype.publishDataProductDraft = function (params) {
1084
+ DphV1.prototype.getDataProductDraftContractTerms = function (params) {
949
1085
  var _params = __assign({}, params);
950
- var _requiredParams = ['dataProductId', 'draftId'];
951
- var _validParams = ['dataProductId', 'draftId', 'headers'];
1086
+ var _requiredParams = ['dataProductId', 'draftId', 'contractTermsId'];
1087
+ var _validParams = [
1088
+ 'dataProductId',
1089
+ 'draftId',
1090
+ 'contractTermsId',
1091
+ 'accept',
1092
+ 'includeContractDocuments',
1093
+ 'autopopulateServerInformation',
1094
+ 'serverAssetId',
1095
+ 'headers',
1096
+ ];
952
1097
  var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
953
1098
  if (_validationErrors) {
954
1099
  return Promise.reject(_validationErrors);
955
1100
  }
1101
+ var query = {
1102
+ 'include_contract_documents': _params.includeContractDocuments,
1103
+ 'autopopulate_server_information': _params.autopopulateServerInformation,
1104
+ 'server_asset_id': _params.serverAssetId,
1105
+ };
956
1106
  var path = {
957
1107
  'data_product_id': _params.dataProductId,
958
1108
  'draft_id': _params.draftId,
1109
+ 'contract_terms_id': _params.contractTermsId,
959
1110
  };
960
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, PUBLISH_DATA_PRODUCT_DRAFT);
1111
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getDataProductDraftContractTerms');
961
1112
  var parameters = {
962
1113
  options: {
963
- url: URL_PUBLISH_DATA_PRODUCT_DRAFT,
964
- method: HTTP_POST,
1114
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}',
1115
+ method: 'GET',
1116
+ qs: query,
965
1117
  path: path,
966
1118
  },
967
1119
  defaultOptions: extend(true, {}, this.baseOptions, {
968
1120
  headers: extend(true, sdkHeaders, {
969
- 'Accept': CONTENT_TYPE_JSON,
1121
+ 'Accept': _params.accept,
970
1122
  }, _params.headers),
971
1123
  }),
972
1124
  };
973
1125
  return this.createRequest(parameters);
974
1126
  };
975
- /*************************
976
- * dataProductReleases
977
- ************************/
978
1127
  /**
979
- * Get a release of an existing data product.
1128
+ * Update a data product contract terms identified by id.
1129
+ *
1130
+ * Update a data product contract terms identified by id.
980
1131
  *
981
1132
  * @param {Object} params - The parameters to send to the service.
982
1133
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
983
- * @param {string} params.releaseId - Data product release id.
984
- * @param {boolean} [params.checkCallerApproval] - If the value is true, then it will be verfied whether the caller is
985
- * present in the data access request pre-approved user list.
1134
+ * @param {string} params.draftId - Data product draft id.
1135
+ * @param {string} params.contractTermsId - Contract terms id.
1136
+ * @param {AssetReference} [params.asset] - The reference schema for a asset in a container.
1137
+ * @param {string} [params.id] - ID of the contract terms.
1138
+ * @param {ContractTermsDocument[]} [params.documents] - Collection of contract terms documents.
1139
+ * @param {string} [params.errorMsg] - An error message, if existing, relating to the contract terms.
1140
+ * @param {Overview} [params.overview] - Overview details of a data contract.
1141
+ * @param {Description} [params.description] - Description details of a data contract.
1142
+ * @param {ContractTemplateOrganization[]} [params.organization] - List of sub domains to be added within a domain.
1143
+ * @param {Roles[]} [params.roles] - List of roles associated with the contract.
1144
+ * @param {Pricing} [params.price] - Represents the pricing details of the contract.
1145
+ * @param {ContractTemplateSLA[]} [params.sla] - Service Level Agreement details.
1146
+ * @param {ContractTemplateSupportAndCommunication[]} [params.supportAndCommunication] - Support and communication
1147
+ * details for the contract.
1148
+ * @param {ContractTemplateCustomProperty[]} [params.customProperties] - Custom properties that are not part of the
1149
+ * standard contract.
1150
+ * @param {ContractTest} [params.contractTest] - Contains the contract test status and related metadata.
1151
+ * @param {ContractServer[]} [params.servers] - List of server definitions.
1152
+ * @param {ContractSchema[]} [params.schema] - Schema details of the data asset.
986
1153
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
987
- * @returns {Promise<DphV1.Response<DphV1.DataProductVersion>>}
1154
+ * @returns {Promise<DphV1.Response<DphV1.ContractTerms>>}
988
1155
  */
989
- DphV1.prototype.getDataProductRelease = function (params) {
1156
+ DphV1.prototype.replaceDataProductDraftContractTerms = function (params) {
990
1157
  var _params = __assign({}, params);
991
- var _requiredParams = ['dataProductId', 'releaseId'];
992
- var _validParams = ['dataProductId', 'releaseId', 'checkCallerApproval', 'headers'];
1158
+ var _requiredParams = ['dataProductId', 'draftId', 'contractTermsId'];
1159
+ var _validParams = [
1160
+ 'dataProductId',
1161
+ 'draftId',
1162
+ 'contractTermsId',
1163
+ 'asset',
1164
+ 'id',
1165
+ 'documents',
1166
+ 'errorMsg',
1167
+ 'overview',
1168
+ 'description',
1169
+ 'organization',
1170
+ 'roles',
1171
+ 'price',
1172
+ 'sla',
1173
+ 'supportAndCommunication',
1174
+ 'customProperties',
1175
+ 'contractTest',
1176
+ 'servers',
1177
+ 'schema',
1178
+ 'headers',
1179
+ ];
993
1180
  var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
994
1181
  if (_validationErrors) {
995
1182
  return Promise.reject(_validationErrors);
996
1183
  }
997
- var query = {
998
- 'check_caller_approval': _params.checkCallerApproval,
1184
+ var body = {
1185
+ 'asset': _params.asset,
1186
+ 'id': _params.id,
1187
+ 'documents': _params.documents,
1188
+ 'error_msg': _params.errorMsg,
1189
+ 'overview': _params.overview,
1190
+ 'description': _params.description,
1191
+ 'organization': _params.organization,
1192
+ 'roles': _params.roles,
1193
+ 'price': _params.price,
1194
+ 'sla': _params.sla,
1195
+ 'support_and_communication': _params.supportAndCommunication,
1196
+ 'custom_properties': _params.customProperties,
1197
+ 'contract_test': _params.contractTest,
1198
+ 'servers': _params.servers,
1199
+ 'schema': _params.schema,
999
1200
  };
1000
1201
  var path = {
1001
1202
  'data_product_id': _params.dataProductId,
1002
- 'release_id': _params.releaseId,
1203
+ 'draft_id': _params.draftId,
1204
+ 'contract_terms_id': _params.contractTermsId,
1003
1205
  };
1004
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, GET_DATA_PRODUCT_RELEASE);
1206
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'replaceDataProductDraftContractTerms');
1005
1207
  var parameters = {
1006
1208
  options: {
1007
- url: URL_GET_DATA_PRODUCT_RELEASE,
1008
- method: HTTP_GET,
1009
- qs: query,
1209
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}',
1210
+ method: 'PUT',
1211
+ body: body,
1010
1212
  path: path,
1011
1213
  },
1012
1214
  defaultOptions: extend(true, {}, this.baseOptions, {
1013
1215
  headers: extend(true, sdkHeaders, {
1014
- 'Accept': CONTENT_TYPE_JSON,
1216
+ 'Accept': 'application/json',
1217
+ 'Content-Type': 'application/json',
1015
1218
  }, _params.headers),
1016
1219
  }),
1017
1220
  };
1018
1221
  return this.createRequest(parameters);
1019
1222
  };
1020
1223
  /**
1021
- * Update the data product release identified by ID.
1224
+ * Update a contract terms property.
1022
1225
  *
1023
- * Use this API to update the properties of a data product release identified by a valid ID.<br/><br/>Specify patch
1024
- * operations using http://jsonpatch.com/ syntax.<br/><br/>Supported patch operations include:<br/><br/>- Update the
1025
- * properties of a data product<br/><br/>- Add/remove parts from a data product (up to 20 parts)<br/><br/>- Add/remove
1026
- * use cases from a data product<br/><br/>.
1226
+ * Use this API to update the properties of a contract terms that is identified by a valid ID.
1227
+ *
1228
+ * Specify patch operations using http://jsonpatch.com/ syntax.
1229
+ *
1230
+ * Supported patch operations include:
1231
+ * - Update the contract terms properties.
1232
+ * <br/><br/>Contract terms can only be updated if the associated data product version is in DRAFT state.
1027
1233
  *
1028
1234
  * @param {Object} params - The parameters to send to the service.
1029
1235
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1030
- * @param {string} params.releaseId - Data product release id.
1236
+ * @param {string} params.draftId - Data product draft id.
1237
+ * @param {string} params.contractTermsId - Contract terms id.
1031
1238
  * @param {JsonPatchOperation[]} params.jsonPatchInstructions - A set of patch operations as defined in RFC 6902. See
1032
1239
  * http://jsonpatch.com/ for more information.
1033
1240
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1034
- * @returns {Promise<DphV1.Response<DphV1.DataProductVersion>>}
1241
+ * @returns {Promise<DphV1.Response<DphV1.ContractTerms>>}
1035
1242
  */
1036
- DphV1.prototype.updateDataProductRelease = function (params) {
1243
+ DphV1.prototype.updateDataProductDraftContractTerms = function (params) {
1037
1244
  var _params = __assign({}, params);
1038
- var _requiredParams = ['dataProductId', 'releaseId', 'jsonPatchInstructions'];
1039
- var _validParams = ['dataProductId', 'releaseId', 'jsonPatchInstructions', 'headers'];
1245
+ var _requiredParams = [
1246
+ 'dataProductId',
1247
+ 'draftId',
1248
+ 'contractTermsId',
1249
+ 'jsonPatchInstructions',
1250
+ ];
1251
+ var _validParams = [
1252
+ 'dataProductId',
1253
+ 'draftId',
1254
+ 'contractTermsId',
1255
+ 'jsonPatchInstructions',
1256
+ 'headers',
1257
+ ];
1040
1258
  var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1041
1259
  if (_validationErrors) {
1042
1260
  return Promise.reject(_validationErrors);
@@ -1044,189 +1262,1201 @@ var DphV1 = /** @class */ (function (_super) {
1044
1262
  var body = _params.jsonPatchInstructions;
1045
1263
  var path = {
1046
1264
  'data_product_id': _params.dataProductId,
1047
- 'release_id': _params.releaseId,
1265
+ 'draft_id': _params.draftId,
1266
+ 'contract_terms_id': _params.contractTermsId,
1048
1267
  };
1049
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, UPDATE_DATA_PRODUCT_RELEASE);
1268
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'updateDataProductDraftContractTerms');
1050
1269
  var parameters = {
1051
1270
  options: {
1052
- url: URL_UPDATE_DATA_PRODUCT_RELEASE,
1053
- method: HTTP_PATCH,
1271
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}',
1272
+ method: 'PATCH',
1054
1273
  body: body,
1055
1274
  path: path,
1056
1275
  },
1057
1276
  defaultOptions: extend(true, {}, this.baseOptions, {
1058
1277
  headers: extend(true, sdkHeaders, {
1059
- 'Accept': CONTENT_TYPE_JSON,
1060
- 'Content-Type': CONTENT_TYPE_PATCH_JSON,
1278
+ 'Accept': 'application/json',
1279
+ 'Content-Type': 'application/json-patch+json',
1061
1280
  }, _params.headers),
1062
1281
  }),
1063
1282
  };
1064
1283
  return this.createRequest(parameters);
1065
1284
  };
1066
1285
  /**
1067
- * Get a contract document.
1286
+ * Retrieve a data product contract terms identified by id in specified format.
1068
1287
  *
1069
- * If the document has a completed attachment, the response contains the `url` to download the attachment.<br/><br/>
1070
- * If the document does not have an attachment, the response contains the `url` which was submitted at document
1071
- * creation.<br/><br/> If the document has an incomplete attachment, an error is returned to prompt the user to upload
1072
- * the document file to complete the attachment.
1288
+ * Retrieve a data product contract terms identified by id in specified format.
1073
1289
  *
1074
1290
  * @param {Object} params - The parameters to send to the service.
1075
1291
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1076
- * @param {string} params.releaseId - Data product release id.
1292
+ * @param {string} params.draftId - Data product draft id.
1077
1293
  * @param {string} params.contractTermsId - Contract terms id.
1078
- * @param {string} params.documentId - Document id.
1294
+ * @param {string} params.format - The format for returning contract terms. For example: odcs.
1295
+ * @param {string} params.formatVersion - The version of the format for returning contract terms. For example: 3.
1296
+ * @param {string} [params.accept] - The type of the response: application/odcs+yaml or application/json.
1079
1297
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1080
- * @returns {Promise<DphV1.Response<DphV1.ContractTermsDocument>>}
1298
+ * @returns {Promise<DphV1.Response<NodeJS.ReadableStream>>}
1081
1299
  */
1082
- DphV1.prototype.getReleaseContractTermsDocument = function (params) {
1300
+ DphV1.prototype.getContractTermsInSpecifiedFormat = function (params) {
1083
1301
  var _params = __assign({}, params);
1084
- var _requiredParams = ['dataProductId', 'releaseId', 'contractTermsId', 'documentId'];
1085
- var _validParams = ['dataProductId', 'releaseId', 'contractTermsId', 'documentId', 'headers'];
1302
+ var _requiredParams = [
1303
+ 'dataProductId',
1304
+ 'draftId',
1305
+ 'contractTermsId',
1306
+ 'format',
1307
+ 'formatVersion',
1308
+ ];
1309
+ var _validParams = [
1310
+ 'dataProductId',
1311
+ 'draftId',
1312
+ 'contractTermsId',
1313
+ 'format',
1314
+ 'formatVersion',
1315
+ 'accept',
1316
+ 'headers',
1317
+ ];
1086
1318
  var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1087
1319
  if (_validationErrors) {
1088
1320
  return Promise.reject(_validationErrors);
1089
1321
  }
1322
+ var query = {
1323
+ 'format': _params.format,
1324
+ 'format_version': _params.formatVersion,
1325
+ };
1090
1326
  var path = {
1091
1327
  'data_product_id': _params.dataProductId,
1092
- 'release_id': _params.releaseId,
1328
+ 'draft_id': _params.draftId,
1093
1329
  'contract_terms_id': _params.contractTermsId,
1094
- 'document_id': _params.documentId,
1095
1330
  };
1096
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, GET_RELEASE_CONTRACT_TERMS_DOCUMENT);
1331
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getContractTermsInSpecifiedFormat');
1097
1332
  var parameters = {
1098
1333
  options: {
1099
- url: URL_GET_RELEASE_CONTRACT_TERMS_DOCUMENT,
1100
- method: HTTP_GET,
1334
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/format',
1335
+ method: 'GET',
1336
+ qs: query,
1101
1337
  path: path,
1338
+ responseType: 'stream',
1102
1339
  },
1103
1340
  defaultOptions: extend(true, {}, this.baseOptions, {
1104
1341
  headers: extend(true, sdkHeaders, {
1105
- 'Accept': CONTENT_TYPE_JSON,
1342
+ 'Accept': _params.accept,
1106
1343
  }, _params.headers),
1107
1344
  }),
1108
1345
  };
1109
1346
  return this.createRequest(parameters);
1110
1347
  };
1111
1348
  /**
1112
- * Retrieve a list of data product releases.
1349
+ * Publish a draft of an existing data product.
1350
+ *
1351
+ * Publish a draft of an existing data product. Use '-' for the `data_product_id` to skip specifying the data product
1352
+ * ID explicitly.
1113
1353
  *
1114
1354
  * @param {Object} params - The parameters to send to the service.
1115
1355
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1116
- * @param {string} [params.assetContainerId] - Filter the list of data product releases by container id.
1117
- * @param {string[]} [params.state] - Filter the list of data product versions by state. States are: available and
1118
- * retired. Default is "available","retired".
1119
- * @param {string} [params.version] - Filter the list of data product releases by version number.
1120
- * @param {number} [params.limit] - Limit the number of data product releases in the results. The maximum is 200.
1121
- * @param {string} [params.start] - Start token for pagination.
1356
+ * @param {string} params.draftId - Data product draft id.
1122
1357
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1123
- * @returns {Promise<DphV1.Response<DphV1.DataProductReleaseCollection>>}
1358
+ * @returns {Promise<DphV1.Response<DphV1.DataProductRelease>>}
1124
1359
  */
1125
- DphV1.prototype.listDataProductReleases = function (params) {
1360
+ DphV1.prototype.publishDataProductDraft = function (params) {
1126
1361
  var _params = __assign({}, params);
1127
- var _requiredParams = ['dataProductId'];
1128
- var _validParams = [
1129
- 'dataProductId',
1130
- 'assetContainerId',
1131
- 'state',
1132
- 'version',
1133
- 'limit',
1134
- 'start',
1135
- 'headers',
1136
- ];
1362
+ var _requiredParams = ['dataProductId', 'draftId'];
1363
+ var _validParams = ['dataProductId', 'draftId', 'headers'];
1137
1364
  var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1138
1365
  if (_validationErrors) {
1139
1366
  return Promise.reject(_validationErrors);
1140
1367
  }
1141
- var query = {
1142
- 'asset.container.id': _params.assetContainerId,
1143
- 'state': _params.state,
1144
- 'version': _params.version,
1145
- 'limit': _params.limit,
1146
- 'start': _params.start,
1147
- };
1148
1368
  var path = {
1149
1369
  'data_product_id': _params.dataProductId,
1370
+ 'draft_id': _params.draftId,
1150
1371
  };
1151
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, LIST_DATA_PRODUCT_RELEASES);
1372
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'publishDataProductDraft');
1152
1373
  var parameters = {
1153
1374
  options: {
1154
- url: URL_LIST_DATA_PRODUCT_RELEASES,
1155
- method: HTTP_GET,
1156
- qs: query,
1375
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/publish',
1376
+ method: 'POST',
1157
1377
  path: path,
1158
1378
  },
1159
1379
  defaultOptions: extend(true, {}, this.baseOptions, {
1160
1380
  headers: extend(true, sdkHeaders, {
1161
- 'Accept': CONTENT_TYPE_JSON,
1381
+ 'Accept': 'application/json',
1162
1382
  }, _params.headers),
1163
1383
  }),
1164
1384
  };
1165
1385
  return this.createRequest(parameters);
1166
1386
  };
1387
+ /*************************
1388
+ * dataProductReleases
1389
+ ************************/
1167
1390
  /**
1168
- * Retire a release of an existing data product.
1391
+ * Get a release of an existing data product.
1392
+ *
1393
+ * Get a release of an existing data product. Use '-' for the `data_product_id` to skip specifying the data product ID
1394
+ * explicitly.
1169
1395
  *
1170
1396
  * @param {Object} params - The parameters to send to the service.
1171
1397
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1172
1398
  * @param {string} params.releaseId - Data product release id.
1399
+ * @param {boolean} [params.checkCallerApproval] - If the value is true, then it will be verfied whether the caller is
1400
+ * present in the data access request pre-approved user list.
1173
1401
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1174
- * @returns {Promise<DphV1.Response<DphV1.DataProductVersion>>}
1402
+ * @returns {Promise<DphV1.Response<DphV1.DataProductRelease>>}
1175
1403
  */
1176
- DphV1.prototype.retireDataProductRelease = function (params) {
1404
+ DphV1.prototype.getDataProductRelease = function (params) {
1177
1405
  var _params = __assign({}, params);
1178
1406
  var _requiredParams = ['dataProductId', 'releaseId'];
1179
- var _validParams = ['dataProductId', 'releaseId', 'headers'];
1407
+ var _validParams = ['dataProductId', 'releaseId', 'checkCallerApproval', 'headers'];
1180
1408
  var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1181
1409
  if (_validationErrors) {
1182
1410
  return Promise.reject(_validationErrors);
1183
1411
  }
1412
+ var query = {
1413
+ 'check_caller_approval': _params.checkCallerApproval,
1414
+ };
1184
1415
  var path = {
1185
1416
  'data_product_id': _params.dataProductId,
1186
1417
  'release_id': _params.releaseId,
1187
1418
  };
1188
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, LIST_DATA_PRODUCT_RELEASES);
1419
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getDataProductRelease');
1189
1420
  var parameters = {
1190
1421
  options: {
1191
- url: URL_RETIRE_DATA_PRODUCT_RELEASE,
1192
- method: HTTP_POST,
1422
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}',
1423
+ method: 'GET',
1424
+ qs: query,
1193
1425
  path: path,
1194
1426
  },
1195
1427
  defaultOptions: extend(true, {}, this.baseOptions, {
1196
1428
  headers: extend(true, sdkHeaders, {
1197
- 'Accept': CONTENT_TYPE_JSON,
1429
+ 'Accept': 'application/json',
1198
1430
  }, _params.headers),
1199
1431
  }),
1200
1432
  };
1201
1433
  return this.createRequest(parameters);
1202
1434
  };
1203
- DphV1.DEFAULT_SERVICE_NAME = SERVICE_NAME;
1204
- return DphV1;
1205
- }(ibm_cloud_sdk_core_1.BaseService));
1206
- /*************************
1207
- * interfaces
1208
- ************************/
1209
- (function (DphV1) {
1210
- /** Constants for the `initialize` operation. */
1211
- var InitializeConstants;
1212
- (function (InitializeConstants) {
1213
- /** Include */
1214
- var Include;
1215
- (function (Include) {
1216
- Include["DELIVERY_METHODS"] = "delivery_methods";
1217
- Include["DOMAINS_MULTI_INDUSTRY"] = "domains_multi_industry";
1218
- Include["DATA_PRODUCT_SAMPLES"] = "data_product_samples";
1219
- Include["WORKFLOWS"] = "workflows";
1220
- Include["PROJECT"] = "project";
1221
- Include["CATALOG_CONFIGURATIONS"] = "catalog_configurations";
1222
- Include["FUNCTIONAL_ADMIN_USER_GROUP"] = "functional_admin_user_group";
1223
- Include["ACCOUNT_OWNER_INTO_CATALOG_MEMBERS"] = "account_owner_into_catalog_members";
1224
- })(Include = InitializeConstants.Include || (InitializeConstants.Include = {}));
1225
- })(InitializeConstants = DphV1.InitializeConstants || (DphV1.InitializeConstants = {}));
1226
- /** Constants for the `createDataProductDraft` operation. */
1227
- var CreateDataProductDraftConstants;
1228
- (function (CreateDataProductDraftConstants) {
1229
- /** The state of the data product version. If not specified, the data product version will be created in `draft` state. */
1435
+ /**
1436
+ * Update the data product release identified by ID.
1437
+ *
1438
+ * Use this API to update the properties of a data product release identified by a valid ID. Use '-' for the
1439
+ * `data_product_id` to skip specifying the data product ID explicitly.<br/><br/>Specify patch operations using
1440
+ * http://jsonpatch.com/ syntax.<br/><br/>Supported patch operations include:<br/><br/>- Update the properties of a
1441
+ * data product<br/><br/>- Add/remove parts from a data product (up to 20 parts)<br/><br/>- Add/remove use cases from
1442
+ * a data product<br/><br/>.
1443
+ *
1444
+ * @param {Object} params - The parameters to send to the service.
1445
+ * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1446
+ * @param {string} params.releaseId - Data product release id.
1447
+ * @param {JsonPatchOperation[]} params.jsonPatchInstructions - A set of patch operations as defined in RFC 6902. See
1448
+ * http://jsonpatch.com/ for more information.
1449
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1450
+ * @returns {Promise<DphV1.Response<DphV1.DataProductRelease>>}
1451
+ */
1452
+ DphV1.prototype.updateDataProductRelease = function (params) {
1453
+ var _params = __assign({}, params);
1454
+ var _requiredParams = ['dataProductId', 'releaseId', 'jsonPatchInstructions'];
1455
+ var _validParams = ['dataProductId', 'releaseId', 'jsonPatchInstructions', 'headers'];
1456
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1457
+ if (_validationErrors) {
1458
+ return Promise.reject(_validationErrors);
1459
+ }
1460
+ var body = _params.jsonPatchInstructions;
1461
+ var path = {
1462
+ 'data_product_id': _params.dataProductId,
1463
+ 'release_id': _params.releaseId,
1464
+ };
1465
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'updateDataProductRelease');
1466
+ var parameters = {
1467
+ options: {
1468
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}',
1469
+ method: 'PATCH',
1470
+ body: body,
1471
+ path: path,
1472
+ },
1473
+ defaultOptions: extend(true, {}, this.baseOptions, {
1474
+ headers: extend(true, sdkHeaders, {
1475
+ 'Accept': 'application/json',
1476
+ 'Content-Type': 'application/json-patch+json',
1477
+ }, _params.headers),
1478
+ }),
1479
+ };
1480
+ return this.createRequest(parameters);
1481
+ };
1482
+ /**
1483
+ * Get a contract document.
1484
+ *
1485
+ * If the document has a completed attachment, the response contains the `url` to download the attachment.<br/><br/>
1486
+ * If the document does not have an attachment, the response contains the `url` which was submitted at document
1487
+ * creation.<br/><br/> If the document has an incomplete attachment, an error is returned to prompt the user to upload
1488
+ * the document file to complete the attachment. Use '-' for the `data_product_id` to skip specifying the data product
1489
+ * ID explicitly.
1490
+ *
1491
+ * @param {Object} params - The parameters to send to the service.
1492
+ * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1493
+ * @param {string} params.releaseId - Data product release id.
1494
+ * @param {string} params.contractTermsId - Contract terms id.
1495
+ * @param {string} params.documentId - Document id.
1496
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1497
+ * @returns {Promise<DphV1.Response<DphV1.ContractTermsDocument>>}
1498
+ */
1499
+ DphV1.prototype.getReleaseContractTermsDocument = function (params) {
1500
+ var _params = __assign({}, params);
1501
+ var _requiredParams = ['dataProductId', 'releaseId', 'contractTermsId', 'documentId'];
1502
+ var _validParams = ['dataProductId', 'releaseId', 'contractTermsId', 'documentId', 'headers'];
1503
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1504
+ if (_validationErrors) {
1505
+ return Promise.reject(_validationErrors);
1506
+ }
1507
+ var path = {
1508
+ 'data_product_id': _params.dataProductId,
1509
+ 'release_id': _params.releaseId,
1510
+ 'contract_terms_id': _params.contractTermsId,
1511
+ 'document_id': _params.documentId,
1512
+ };
1513
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getReleaseContractTermsDocument');
1514
+ var parameters = {
1515
+ options: {
1516
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}/contract_terms/{contract_terms_id}/documents/{document_id}',
1517
+ method: 'GET',
1518
+ path: path,
1519
+ },
1520
+ defaultOptions: extend(true, {}, this.baseOptions, {
1521
+ headers: extend(true, sdkHeaders, {
1522
+ 'Accept': 'application/json',
1523
+ }, _params.headers),
1524
+ }),
1525
+ };
1526
+ return this.createRequest(parameters);
1527
+ };
1528
+ /**
1529
+ * Retrieve a published data product contract terms identified by id.
1530
+ *
1531
+ * Retrieve a published data product contract terms identified by id.
1532
+ *
1533
+ * @param {Object} params - The parameters to send to the service.
1534
+ * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1535
+ * @param {string} params.releaseId - Data product release id.
1536
+ * @param {string} params.contractTermsId - Contract terms id.
1537
+ * @param {string} [params.accept] - The type of the response: application/odcs+yaml or application/json.
1538
+ * @param {boolean} [params.includeContractDocuments] - Set to false to exclude external contract documents (e.g.,
1539
+ * Terms and Conditions URLs) from the response. By default, these are included.
1540
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1541
+ * @returns {Promise<DphV1.Response<NodeJS.ReadableStream>>}
1542
+ */
1543
+ DphV1.prototype.getPublishedDataProductDraftContractTerms = function (params) {
1544
+ var _params = __assign({}, params);
1545
+ var _requiredParams = ['dataProductId', 'releaseId', 'contractTermsId'];
1546
+ var _validParams = [
1547
+ 'dataProductId',
1548
+ 'releaseId',
1549
+ 'contractTermsId',
1550
+ 'accept',
1551
+ 'includeContractDocuments',
1552
+ 'headers',
1553
+ ];
1554
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1555
+ if (_validationErrors) {
1556
+ return Promise.reject(_validationErrors);
1557
+ }
1558
+ var query = {
1559
+ 'include_contract_documents': _params.includeContractDocuments,
1560
+ };
1561
+ var path = {
1562
+ 'data_product_id': _params.dataProductId,
1563
+ 'release_id': _params.releaseId,
1564
+ 'contract_terms_id': _params.contractTermsId,
1565
+ };
1566
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getPublishedDataProductDraftContractTerms');
1567
+ var parameters = {
1568
+ options: {
1569
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}/contract_terms/{contract_terms_id}',
1570
+ method: 'GET',
1571
+ qs: query,
1572
+ path: path,
1573
+ responseType: 'stream',
1574
+ },
1575
+ defaultOptions: extend(true, {}, this.baseOptions, {
1576
+ headers: extend(true, sdkHeaders, {
1577
+ 'Accept': _params.accept,
1578
+ }, _params.headers),
1579
+ }),
1580
+ };
1581
+ return this.createRequest(parameters);
1582
+ };
1583
+ /**
1584
+ * Retrieve a list of data product releases.
1585
+ *
1586
+ * Retrieve a list of data product releases. Use '-' for the `data_product_id` to skip specifying the data product ID
1587
+ * explicitly.
1588
+ *
1589
+ * @param {Object} params - The parameters to send to the service.
1590
+ * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1591
+ * @param {string} [params.assetContainerId] - Filter the list of data product releases by container id.
1592
+ * @param {string[]} [params.state] - Filter the list of data product versions by state. States are: available and
1593
+ * retired. Default is "available","retired".
1594
+ * @param {string} [params.version] - Filter the list of data product releases by version number.
1595
+ * @param {number} [params.limit] - Limit the number of data product releases in the results. The maximum is 200.
1596
+ * @param {string} [params.start] - Start token for pagination.
1597
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1598
+ * @returns {Promise<DphV1.Response<DphV1.DataProductReleaseCollection>>}
1599
+ */
1600
+ DphV1.prototype.listDataProductReleases = function (params) {
1601
+ var _params = __assign({}, params);
1602
+ var _requiredParams = ['dataProductId'];
1603
+ var _validParams = [
1604
+ 'dataProductId',
1605
+ 'assetContainerId',
1606
+ 'state',
1607
+ 'version',
1608
+ 'limit',
1609
+ 'start',
1610
+ 'headers',
1611
+ ];
1612
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1613
+ if (_validationErrors) {
1614
+ return Promise.reject(_validationErrors);
1615
+ }
1616
+ var query = {
1617
+ 'asset.container.id': _params.assetContainerId,
1618
+ 'state': _params.state,
1619
+ 'version': _params.version,
1620
+ 'limit': _params.limit,
1621
+ 'start': _params.start,
1622
+ };
1623
+ var path = {
1624
+ 'data_product_id': _params.dataProductId,
1625
+ };
1626
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'listDataProductReleases');
1627
+ var parameters = {
1628
+ options: {
1629
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/releases',
1630
+ method: 'GET',
1631
+ qs: query,
1632
+ path: path,
1633
+ },
1634
+ defaultOptions: extend(true, {}, this.baseOptions, {
1635
+ headers: extend(true, sdkHeaders, {
1636
+ 'Accept': 'application/json',
1637
+ }, _params.headers),
1638
+ }),
1639
+ };
1640
+ return this.createRequest(parameters);
1641
+ };
1642
+ /**
1643
+ * Retire a release of an existing data product.
1644
+ *
1645
+ * Retire a release of an existing data product. Use '-' for the `data_product_id` to skip specifying the data product
1646
+ * ID explicitly.
1647
+ *
1648
+ * @param {Object} params - The parameters to send to the service.
1649
+ * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1650
+ * @param {string} params.releaseId - Data product release id.
1651
+ * @param {boolean} [params.revokeAccess] - Revoke's Access from all the Subscriptions of the Data Product. No user's
1652
+ * can able to see the subscribed assets anymore.
1653
+ * @param {string} [params.startAt] - The date and time when the revoke access operation should start (ISO 8601
1654
+ * format, e.g., 2025-09-24T06:55:29Z). If not provided, the operation starts immediately.
1655
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1656
+ * @returns {Promise<DphV1.Response<DphV1.DataProductRelease>>}
1657
+ */
1658
+ DphV1.prototype.retireDataProductRelease = function (params) {
1659
+ var _params = __assign({}, params);
1660
+ var _requiredParams = ['dataProductId', 'releaseId'];
1661
+ var _validParams = ['dataProductId', 'releaseId', 'revokeAccess', 'startAt', 'headers'];
1662
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1663
+ if (_validationErrors) {
1664
+ return Promise.reject(_validationErrors);
1665
+ }
1666
+ var query = {
1667
+ 'revoke_access': _params.revokeAccess,
1668
+ 'start_at': _params.startAt,
1669
+ };
1670
+ var path = {
1671
+ 'data_product_id': _params.dataProductId,
1672
+ 'release_id': _params.releaseId,
1673
+ };
1674
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'retireDataProductRelease');
1675
+ var parameters = {
1676
+ options: {
1677
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}/retire',
1678
+ method: 'POST',
1679
+ qs: query,
1680
+ path: path,
1681
+ },
1682
+ defaultOptions: extend(true, {}, this.baseOptions, {
1683
+ headers: extend(true, sdkHeaders, {
1684
+ 'Accept': 'application/json',
1685
+ 'Content-Type': 'application/x-www-form-urlencoded',
1686
+ }, _params.headers),
1687
+ }),
1688
+ };
1689
+ return this.createRequest(parameters);
1690
+ };
1691
+ /**
1692
+ * Revoke access from Data Product subscriptions.
1693
+ *
1694
+ * Revoke's access from Subscriptions of the data product id passed in the path parameter. Optionally specify a future
1695
+ * date-time when the revoke access operation should start using the start_at field in ISO 8601 format (e.g.,
1696
+ * 2025-09-24T06:55:29Z). If start_at is not provided, the revoke access operation starts immediately.
1697
+ *
1698
+ * @param {Object} params - The parameters to send to the service.
1699
+ * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1700
+ * @param {string} params.releaseId - The unique identifier of the data product release.
1701
+ * @param {NodeJS.ReadableStream | Buffer} [params.body] - Request parameters to handle revoke access from
1702
+ * subscriptions. The start_at field can be used to schedule the revoke access operation for a future date-time.
1703
+ * @param {string} [params.contentType] - The type of the input.
1704
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1705
+ * @returns {Promise<DphV1.Response<DphV1.RevokeAccessResponse>>}
1706
+ */
1707
+ DphV1.prototype.createRevokeAccessProcess = function (params) {
1708
+ var _params = __assign({}, params);
1709
+ var _requiredParams = ['dataProductId', 'releaseId'];
1710
+ var _validParams = ['dataProductId', 'releaseId', 'body', 'contentType', 'headers'];
1711
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1712
+ if (_validationErrors) {
1713
+ return Promise.reject(_validationErrors);
1714
+ }
1715
+ var body = _params.body;
1716
+ var path = {
1717
+ 'data_product_id': _params.dataProductId,
1718
+ 'release_id': _params.releaseId,
1719
+ };
1720
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createRevokeAccessProcess');
1721
+ var parameters = {
1722
+ options: {
1723
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}/revoke_access',
1724
+ method: 'POST',
1725
+ body: body,
1726
+ path: path,
1727
+ },
1728
+ defaultOptions: extend(true, {}, this.baseOptions, {
1729
+ headers: extend(true, sdkHeaders, {
1730
+ 'Accept': 'application/json',
1731
+ 'Content-Type': _params.contentType,
1732
+ }, _params.headers),
1733
+ }),
1734
+ };
1735
+ return this.createRequest(parameters);
1736
+ };
1737
+ /*************************
1738
+ * dataProductContractTemplates
1739
+ ************************/
1740
+ /**
1741
+ * Retrieve a list of data product contract templates.
1742
+ *
1743
+ * Retrieve a list of data product contract templates.
1744
+ *
1745
+ * @param {Object} [params] - The parameters to send to the service.
1746
+ * @param {string} [params.containerId] - Container ID of the data product catalog. If not supplied, the data product
1747
+ * catalog is looked up by using the uid of the default data product catalog.
1748
+ * @param {string} [params.contractTemplateName] - Name of the data product contract template. If not supplied, the
1749
+ * data product templates within the catalog will returned.
1750
+ * @param {string} [params.domainIds] - Comma-separated domain IDs to filter data product contract templates. If not
1751
+ * supplied, the data product templates within the catalog will returned.
1752
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1753
+ * @returns {Promise<DphV1.Response<DphV1.DataProductContractTemplateCollection>>}
1754
+ */
1755
+ DphV1.prototype.listDataProductContractTemplate = function (params) {
1756
+ var _params = __assign({}, params);
1757
+ var _requiredParams = [];
1758
+ var _validParams = ['containerId', 'contractTemplateName', 'domainIds', 'headers'];
1759
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1760
+ if (_validationErrors) {
1761
+ return Promise.reject(_validationErrors);
1762
+ }
1763
+ var query = {
1764
+ 'container.id': _params.containerId,
1765
+ 'contract_template.name': _params.contractTemplateName,
1766
+ 'domain.ids': _params.domainIds,
1767
+ };
1768
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'listDataProductContractTemplate');
1769
+ var parameters = {
1770
+ options: {
1771
+ url: '/data_product_exchange/v1/contract_templates',
1772
+ method: 'GET',
1773
+ qs: query,
1774
+ },
1775
+ defaultOptions: extend(true, {}, this.baseOptions, {
1776
+ headers: extend(true, sdkHeaders, {
1777
+ 'Accept': 'application/json',
1778
+ }, _params.headers),
1779
+ }),
1780
+ };
1781
+ return this.createRequest(parameters);
1782
+ };
1783
+ /**
1784
+ * Create new data product contract template.
1785
+ *
1786
+ * Create new data product contract template.
1787
+ *
1788
+ * @param {Object} params - The parameters to send to the service.
1789
+ * @param {ContainerReference} params.container - Container reference.
1790
+ * @param {string} [params.id] - The identifier of the data product contract template.
1791
+ * @param {string} [params.creatorId] - The identifier of the user who created the data product contract template.
1792
+ * @param {string} [params.createdAt] - The timestamp when the data product contract template was created.
1793
+ * @param {string} [params.name] - The name of the contract template.
1794
+ * @param {ErrorMessage} [params.error] - Contains the code and details.
1795
+ * @param {ContractTerms} [params.contractTerms] - Defines the complete structure of a contract terms.
1796
+ * @param {string} [params.containerId] - Container ID of the data product catalog. If not supplied, the data product
1797
+ * catalog is looked up by using the uid of the default data product catalog.
1798
+ * @param {string} [params.contractTemplateName] - Name of the data product contract template. If not supplied, the
1799
+ * data product templates within the catalog will returned.
1800
+ * @param {string} [params.domainIds] - Comma-separated domain IDs to filter data product contract templates. If not
1801
+ * supplied, the data product templates within the catalog will returned.
1802
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1803
+ * @returns {Promise<DphV1.Response<DphV1.DataProductContractTemplate>>}
1804
+ */
1805
+ DphV1.prototype.createContractTemplate = function (params) {
1806
+ var _params = __assign({}, params);
1807
+ var _requiredParams = ['container'];
1808
+ var _validParams = [
1809
+ 'container',
1810
+ 'id',
1811
+ 'creatorId',
1812
+ 'createdAt',
1813
+ 'name',
1814
+ 'error',
1815
+ 'contractTerms',
1816
+ 'containerId',
1817
+ 'contractTemplateName',
1818
+ 'domainIds',
1819
+ 'headers',
1820
+ ];
1821
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1822
+ if (_validationErrors) {
1823
+ return Promise.reject(_validationErrors);
1824
+ }
1825
+ var body = {
1826
+ 'container': _params.container,
1827
+ 'id': _params.id,
1828
+ 'creator_id': _params.creatorId,
1829
+ 'created_at': _params.createdAt,
1830
+ 'name': _params.name,
1831
+ 'error': _params.error,
1832
+ 'contract_terms': _params.contractTerms,
1833
+ };
1834
+ var query = {
1835
+ 'container.id': _params.containerId,
1836
+ 'contract_template.name': _params.contractTemplateName,
1837
+ 'domain.ids': _params.domainIds,
1838
+ };
1839
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createContractTemplate');
1840
+ var parameters = {
1841
+ options: {
1842
+ url: '/data_product_exchange/v1/contract_templates',
1843
+ method: 'POST',
1844
+ body: body,
1845
+ qs: query,
1846
+ },
1847
+ defaultOptions: extend(true, {}, this.baseOptions, {
1848
+ headers: extend(true, sdkHeaders, {
1849
+ 'Accept': 'application/json',
1850
+ 'Content-Type': 'application/json',
1851
+ }, _params.headers),
1852
+ }),
1853
+ };
1854
+ return this.createRequest(parameters);
1855
+ };
1856
+ /**
1857
+ * Retrieve a data product contract template identified by id.
1858
+ *
1859
+ * Retrieve a data product contract template identified by id.
1860
+ *
1861
+ * @param {Object} params - The parameters to send to the service.
1862
+ * @param {string} params.contractTemplateId - Data Product Contract Template id.
1863
+ * @param {string} params.containerId - Container ID of the data product catalog.
1864
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1865
+ * @returns {Promise<DphV1.Response<DphV1.DataProductContractTemplate>>}
1866
+ */
1867
+ DphV1.prototype.getContractTemplate = function (params) {
1868
+ var _params = __assign({}, params);
1869
+ var _requiredParams = ['contractTemplateId', 'containerId'];
1870
+ var _validParams = ['contractTemplateId', 'containerId', 'headers'];
1871
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1872
+ if (_validationErrors) {
1873
+ return Promise.reject(_validationErrors);
1874
+ }
1875
+ var query = {
1876
+ 'container.id': _params.containerId,
1877
+ };
1878
+ var path = {
1879
+ 'contract_template_id': _params.contractTemplateId,
1880
+ };
1881
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getContractTemplate');
1882
+ var parameters = {
1883
+ options: {
1884
+ url: '/data_product_exchange/v1/contract_templates/{contract_template_id}',
1885
+ method: 'GET',
1886
+ qs: query,
1887
+ path: path,
1888
+ },
1889
+ defaultOptions: extend(true, {}, this.baseOptions, {
1890
+ headers: extend(true, sdkHeaders, {
1891
+ 'Accept': 'application/json',
1892
+ }, _params.headers),
1893
+ }),
1894
+ };
1895
+ return this.createRequest(parameters);
1896
+ };
1897
+ /**
1898
+ * Delete a data product contract template identified by id.
1899
+ *
1900
+ * Delete a data product contract template identified by id.
1901
+ *
1902
+ * @param {Object} params - The parameters to send to the service.
1903
+ * @param {string} params.contractTemplateId - Data Product Contract Template id.
1904
+ * @param {string} params.containerId - Container ID of the data product catalog.
1905
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1906
+ * @returns {Promise<DphV1.Response<DphV1.EmptyObject>>}
1907
+ */
1908
+ DphV1.prototype.deleteDataProductContractTemplate = function (params) {
1909
+ var _params = __assign({}, params);
1910
+ var _requiredParams = ['contractTemplateId', 'containerId'];
1911
+ var _validParams = ['contractTemplateId', 'containerId', 'headers'];
1912
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1913
+ if (_validationErrors) {
1914
+ return Promise.reject(_validationErrors);
1915
+ }
1916
+ var query = {
1917
+ 'container.id': _params.containerId,
1918
+ };
1919
+ var path = {
1920
+ 'contract_template_id': _params.contractTemplateId,
1921
+ };
1922
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteDataProductContractTemplate');
1923
+ var parameters = {
1924
+ options: {
1925
+ url: '/data_product_exchange/v1/contract_templates/{contract_template_id}',
1926
+ method: 'DELETE',
1927
+ qs: query,
1928
+ path: path,
1929
+ },
1930
+ defaultOptions: extend(true, {}, this.baseOptions, {
1931
+ headers: extend(true, sdkHeaders, {}, _params.headers),
1932
+ }),
1933
+ };
1934
+ return this.createRequest(parameters);
1935
+ };
1936
+ /**
1937
+ * Update the data product contract template identified by ID.
1938
+ *
1939
+ * Use this API to update the properties of a data product contract template identified by a valid
1940
+ * ID.<br/><br/>Specify patch operations using http://jsonpatch.com/ syntax.<br/><br/>Supported patch operations
1941
+ * include:<br/><br/>- Update the name of a data product contract template<br/><br/>- Update the contract terms of
1942
+ * data product contract template<br/><br/>.
1943
+ *
1944
+ * @param {Object} params - The parameters to send to the service.
1945
+ * @param {string} params.contractTemplateId - Data Product Contract Template id.
1946
+ * @param {string} params.containerId - Container ID of the data product catalog.
1947
+ * @param {JsonPatchOperation[]} params.jsonPatchInstructions - A set of patch operations as defined in RFC 6902. See
1948
+ * http://jsonpatch.com/ for more information.
1949
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1950
+ * @returns {Promise<DphV1.Response<DphV1.DataProductContractTemplate>>}
1951
+ */
1952
+ DphV1.prototype.updateDataProductContractTemplate = function (params) {
1953
+ var _params = __assign({}, params);
1954
+ var _requiredParams = ['contractTemplateId', 'containerId', 'jsonPatchInstructions'];
1955
+ var _validParams = ['contractTemplateId', 'containerId', 'jsonPatchInstructions', 'headers'];
1956
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1957
+ if (_validationErrors) {
1958
+ return Promise.reject(_validationErrors);
1959
+ }
1960
+ var body = _params.jsonPatchInstructions;
1961
+ var query = {
1962
+ 'container.id': _params.containerId,
1963
+ };
1964
+ var path = {
1965
+ 'contract_template_id': _params.contractTemplateId,
1966
+ };
1967
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'updateDataProductContractTemplate');
1968
+ var parameters = {
1969
+ options: {
1970
+ url: '/data_product_exchange/v1/contract_templates/{contract_template_id}',
1971
+ method: 'PATCH',
1972
+ body: body,
1973
+ qs: query,
1974
+ path: path,
1975
+ },
1976
+ defaultOptions: extend(true, {}, this.baseOptions, {
1977
+ headers: extend(true, sdkHeaders, {
1978
+ 'Accept': 'application/json',
1979
+ 'Content-Type': 'application/json-patch+json',
1980
+ }, _params.headers),
1981
+ }),
1982
+ };
1983
+ return this.createRequest(parameters);
1984
+ };
1985
+ /*************************
1986
+ * dataProductDomains
1987
+ ************************/
1988
+ /**
1989
+ * Retrieve a list of data product domains.
1990
+ *
1991
+ * Retrieve a list of data product domains.
1992
+ *
1993
+ * @param {Object} [params] - The parameters to send to the service.
1994
+ * @param {string} [params.containerId] - Container ID of the data product catalog. If not supplied, the data product
1995
+ * catalog is looked up by using the uid of the default data product catalog.
1996
+ * @param {boolean} [params.includeSubdomains] - Include subdomains in the response.
1997
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1998
+ * @returns {Promise<DphV1.Response<DphV1.DataProductDomainCollection>>}
1999
+ */
2000
+ DphV1.prototype.listDataProductDomains = function (params) {
2001
+ var _params = __assign({}, params);
2002
+ var _requiredParams = [];
2003
+ var _validParams = ['containerId', 'includeSubdomains', 'headers'];
2004
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2005
+ if (_validationErrors) {
2006
+ return Promise.reject(_validationErrors);
2007
+ }
2008
+ var query = {
2009
+ 'container.id': _params.containerId,
2010
+ 'include_subdomains': _params.includeSubdomains,
2011
+ };
2012
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'listDataProductDomains');
2013
+ var parameters = {
2014
+ options: {
2015
+ url: '/data_product_exchange/v1/domains',
2016
+ method: 'GET',
2017
+ qs: query,
2018
+ },
2019
+ defaultOptions: extend(true, {}, this.baseOptions, {
2020
+ headers: extend(true, sdkHeaders, {
2021
+ 'Accept': 'application/json',
2022
+ }, _params.headers),
2023
+ }),
2024
+ };
2025
+ return this.createRequest(parameters);
2026
+ };
2027
+ /**
2028
+ * Create new data product domain.
2029
+ *
2030
+ * Create new data product domain.
2031
+ *
2032
+ * @param {Object} params - The parameters to send to the service.
2033
+ * @param {ContainerReference} params.container - Container reference.
2034
+ * @param {string} [params.trace] - The id to trace the failed domain creations.
2035
+ * @param {ErrorModelResource[]} [params.errors] - Set of errors on the sub domain creation.
2036
+ * @param {string} [params.name] - The name of the data product domain.
2037
+ * @param {string} [params.description] - The description of the data product domain.
2038
+ * @param {string} [params.id] - The identifier of the data product domain.
2039
+ * @param {string} [params.createdBy] - The identifier of the creator of the data product domain.
2040
+ * @param {MemberRolesSchema} [params.memberRoles] - Member roles of a corresponding asset.
2041
+ * @param {PropertiesSchema} [params.properties] - Properties of the corresponding asset.
2042
+ * @param {InitializeSubDomain[]} [params.subDomains] - List of sub domains to be added within a domain.
2043
+ * @param {ContainerIdentity} [params.subContainer] - The identity schema for a IBM knowledge catalog container
2044
+ * (catalog/project/space).
2045
+ * @param {boolean} [params.linkToSubcontainers] - Link domains to subcontainers.
2046
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2047
+ * @returns {Promise<DphV1.Response<DphV1.DataProductDomain>>}
2048
+ */
2049
+ DphV1.prototype.createDataProductDomain = function (params) {
2050
+ var _params = __assign({}, params);
2051
+ var _requiredParams = ['container'];
2052
+ var _validParams = [
2053
+ 'container',
2054
+ 'trace',
2055
+ 'errors',
2056
+ 'name',
2057
+ 'description',
2058
+ 'id',
2059
+ 'createdBy',
2060
+ 'memberRoles',
2061
+ 'properties',
2062
+ 'subDomains',
2063
+ 'subContainer',
2064
+ 'linkToSubcontainers',
2065
+ 'headers',
2066
+ ];
2067
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2068
+ if (_validationErrors) {
2069
+ return Promise.reject(_validationErrors);
2070
+ }
2071
+ var body = {
2072
+ 'container': _params.container,
2073
+ 'trace': _params.trace,
2074
+ 'errors': _params.errors,
2075
+ 'name': _params.name,
2076
+ 'description': _params.description,
2077
+ 'id': _params.id,
2078
+ 'created_by': _params.createdBy,
2079
+ 'member_roles': _params.memberRoles,
2080
+ 'properties': _params.properties,
2081
+ 'sub_domains': _params.subDomains,
2082
+ 'sub_container': _params.subContainer,
2083
+ };
2084
+ var query = {
2085
+ 'link_to_subcontainers': _params.linkToSubcontainers,
2086
+ };
2087
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createDataProductDomain');
2088
+ var parameters = {
2089
+ options: {
2090
+ url: '/data_product_exchange/v1/domains',
2091
+ method: 'POST',
2092
+ body: body,
2093
+ qs: query,
2094
+ },
2095
+ defaultOptions: extend(true, {}, this.baseOptions, {
2096
+ headers: extend(true, sdkHeaders, {
2097
+ 'Accept': 'application/json',
2098
+ 'Content-Type': 'application/json',
2099
+ }, _params.headers),
2100
+ }),
2101
+ };
2102
+ return this.createRequest(parameters);
2103
+ };
2104
+ /**
2105
+ * Create data product subdomains for a specific domain identified by id.
2106
+ *
2107
+ * Create data product subdomains for a specific domain identified by id.
2108
+ *
2109
+ * @param {Object} params - The parameters to send to the service.
2110
+ * @param {string} params.domainId - Domain id.
2111
+ * @param {string} params.containerId - Container ID of the data product catalog.
2112
+ * @param {string} [params.name] - The name of the data product subdomain.
2113
+ * @param {string} [params.id] - The identifier of the data product subdomain.
2114
+ * @param {string} [params.description] - The description of the data product subdomain.
2115
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2116
+ * @returns {Promise<DphV1.Response<DphV1.InitializeSubDomain>>}
2117
+ */
2118
+ DphV1.prototype.createDataProductSubdomain = function (params) {
2119
+ var _params = __assign({}, params);
2120
+ var _requiredParams = ['domainId', 'containerId'];
2121
+ var _validParams = ['domainId', 'containerId', 'name', 'id', 'description', 'headers'];
2122
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2123
+ if (_validationErrors) {
2124
+ return Promise.reject(_validationErrors);
2125
+ }
2126
+ var body = {
2127
+ 'name': _params.name,
2128
+ 'id': _params.id,
2129
+ 'description': _params.description,
2130
+ };
2131
+ var query = {
2132
+ 'container.id': _params.containerId,
2133
+ };
2134
+ var path = {
2135
+ 'domain_id': _params.domainId,
2136
+ };
2137
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createDataProductSubdomain');
2138
+ var parameters = {
2139
+ options: {
2140
+ url: '/data_product_exchange/v1/domains/{domain_id}/subdomains',
2141
+ method: 'POST',
2142
+ body: body,
2143
+ qs: query,
2144
+ path: path,
2145
+ },
2146
+ defaultOptions: extend(true, {}, this.baseOptions, {
2147
+ headers: extend(true, sdkHeaders, {
2148
+ 'Accept': 'application/json',
2149
+ 'Content-Type': 'application/json',
2150
+ }, _params.headers),
2151
+ }),
2152
+ };
2153
+ return this.createRequest(parameters);
2154
+ };
2155
+ /**
2156
+ * Retrieve a data product domain or subdomain identified by id.
2157
+ *
2158
+ * Retrieve a data product domain or subdomain identified by id.
2159
+ *
2160
+ * @param {Object} params - The parameters to send to the service.
2161
+ * @param {string} params.domainId - Domain id.
2162
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2163
+ * @returns {Promise<DphV1.Response<DphV1.DataProductDomain>>}
2164
+ */
2165
+ DphV1.prototype.getDomain = function (params) {
2166
+ var _params = __assign({}, params);
2167
+ var _requiredParams = ['domainId'];
2168
+ var _validParams = ['domainId', 'headers'];
2169
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2170
+ if (_validationErrors) {
2171
+ return Promise.reject(_validationErrors);
2172
+ }
2173
+ var path = {
2174
+ 'domain_id': _params.domainId,
2175
+ };
2176
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getDomain');
2177
+ var parameters = {
2178
+ options: {
2179
+ url: '/data_product_exchange/v1/domains/{domain_id}',
2180
+ method: 'GET',
2181
+ path: path,
2182
+ },
2183
+ defaultOptions: extend(true, {}, this.baseOptions, {
2184
+ headers: extend(true, sdkHeaders, {
2185
+ 'Accept': 'application/json',
2186
+ }, _params.headers),
2187
+ }),
2188
+ };
2189
+ return this.createRequest(parameters);
2190
+ };
2191
+ /**
2192
+ * Delete a data product domain identified by id.
2193
+ *
2194
+ * Delete a data product domain identified by id.
2195
+ *
2196
+ * @param {Object} params - The parameters to send to the service.
2197
+ * @param {string} params.domainId - Domain id.
2198
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2199
+ * @returns {Promise<DphV1.Response<DphV1.EmptyObject>>}
2200
+ */
2201
+ DphV1.prototype.deleteDomain = function (params) {
2202
+ var _params = __assign({}, params);
2203
+ var _requiredParams = ['domainId'];
2204
+ var _validParams = ['domainId', 'headers'];
2205
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2206
+ if (_validationErrors) {
2207
+ return Promise.reject(_validationErrors);
2208
+ }
2209
+ var path = {
2210
+ 'domain_id': _params.domainId,
2211
+ };
2212
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteDomain');
2213
+ var parameters = {
2214
+ options: {
2215
+ url: '/data_product_exchange/v1/domains/{domain_id}',
2216
+ method: 'DELETE',
2217
+ path: path,
2218
+ },
2219
+ defaultOptions: extend(true, {}, this.baseOptions, {
2220
+ headers: extend(true, sdkHeaders, {}, _params.headers),
2221
+ }),
2222
+ };
2223
+ return this.createRequest(parameters);
2224
+ };
2225
+ /**
2226
+ * Update the data product domain identified by ID.
2227
+ *
2228
+ * Use this API to update the properties of a data product domain identified by a valid ID.<br/><br/>Specify patch
2229
+ * operations using http://jsonpatch.com/ syntax.<br/><br/>Supported patch operations include:<br/><br/>- Update the
2230
+ * name of a data product domain<br/><br/>- Update the description of a data product domain<br/><br/>- Update the rov
2231
+ * of a data product domain<br/><br/>.
2232
+ *
2233
+ * @param {Object} params - The parameters to send to the service.
2234
+ * @param {string} params.domainId - Domain id.
2235
+ * @param {string} params.containerId - Container ID of the data product catalog.
2236
+ * @param {JsonPatchOperation[]} params.jsonPatchInstructions - A set of patch operations as defined in RFC 6902. See
2237
+ * http://jsonpatch.com/ for more information.
2238
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2239
+ * @returns {Promise<DphV1.Response<DphV1.DataProductDomain>>}
2240
+ */
2241
+ DphV1.prototype.updateDataProductDomain = function (params) {
2242
+ var _params = __assign({}, params);
2243
+ var _requiredParams = ['domainId', 'containerId', 'jsonPatchInstructions'];
2244
+ var _validParams = ['domainId', 'containerId', 'jsonPatchInstructions', 'headers'];
2245
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2246
+ if (_validationErrors) {
2247
+ return Promise.reject(_validationErrors);
2248
+ }
2249
+ var body = _params.jsonPatchInstructions;
2250
+ var query = {
2251
+ 'container.id': _params.containerId,
2252
+ };
2253
+ var path = {
2254
+ 'domain_id': _params.domainId,
2255
+ };
2256
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'updateDataProductDomain');
2257
+ var parameters = {
2258
+ options: {
2259
+ url: '/data_product_exchange/v1/domains/{domain_id}',
2260
+ method: 'PATCH',
2261
+ body: body,
2262
+ qs: query,
2263
+ path: path,
2264
+ },
2265
+ defaultOptions: extend(true, {}, this.baseOptions, {
2266
+ headers: extend(true, sdkHeaders, {
2267
+ 'Accept': 'application/json',
2268
+ 'Content-Type': 'application/json-patch+json',
2269
+ }, _params.headers),
2270
+ }),
2271
+ };
2272
+ return this.createRequest(parameters);
2273
+ };
2274
+ /**
2275
+ * Retrieve all data products in a domain specified by id or any of it's subdomains.
2276
+ *
2277
+ * Retrieve all the data products tagged to the domain identified by id or any of it's subdomains.
2278
+ *
2279
+ * @param {Object} params - The parameters to send to the service.
2280
+ * @param {string} params.domainId - Domain id.
2281
+ * @param {string} params.containerId - Container ID of the data product catalog.
2282
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2283
+ * @returns {Promise<DphV1.Response<DphV1.DataProductVersionCollection>>}
2284
+ */
2285
+ DphV1.prototype.getDataProductByDomain = function (params) {
2286
+ var _params = __assign({}, params);
2287
+ var _requiredParams = ['domainId', 'containerId'];
2288
+ var _validParams = ['domainId', 'containerId', 'headers'];
2289
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2290
+ if (_validationErrors) {
2291
+ return Promise.reject(_validationErrors);
2292
+ }
2293
+ var query = {
2294
+ 'container.id': _params.containerId,
2295
+ };
2296
+ var path = {
2297
+ 'domain_id': _params.domainId,
2298
+ };
2299
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getDataProductByDomain');
2300
+ var parameters = {
2301
+ options: {
2302
+ url: '/data_product_exchange/v1/domains/{domain_id}/data_products',
2303
+ method: 'GET',
2304
+ qs: query,
2305
+ path: path,
2306
+ },
2307
+ defaultOptions: extend(true, {}, this.baseOptions, {
2308
+ headers: extend(true, sdkHeaders, {
2309
+ 'Accept': 'application/json',
2310
+ }, _params.headers),
2311
+ }),
2312
+ };
2313
+ return this.createRequest(parameters);
2314
+ };
2315
+ /*************************
2316
+ * bucketServices
2317
+ ************************/
2318
+ /**
2319
+ * Create a new Bucket.
2320
+ *
2321
+ * Use this API to create a new S3 Bucket on an AWS Hosting.
2322
+ *
2323
+ * @param {Object} params - The parameters to send to the service.
2324
+ * @param {boolean} params.isShared - Flag to specify whether the bucket is dedicated or shared.
2325
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2326
+ * @returns {Promise<DphV1.Response<DphV1.BucketResponse>>}
2327
+ */
2328
+ DphV1.prototype.createS3Bucket = function (params) {
2329
+ var _params = __assign({}, params);
2330
+ var _requiredParams = ['isShared'];
2331
+ var _validParams = ['isShared', 'headers'];
2332
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2333
+ if (_validationErrors) {
2334
+ return Promise.reject(_validationErrors);
2335
+ }
2336
+ var query = {
2337
+ 'is_shared': _params.isShared,
2338
+ };
2339
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createS3Bucket');
2340
+ var parameters = {
2341
+ options: {
2342
+ url: '/data_product_exchange/v1/bucket',
2343
+ method: 'POST',
2344
+ qs: query,
2345
+ },
2346
+ defaultOptions: extend(true, {}, this.baseOptions, {
2347
+ headers: extend(true, sdkHeaders, {
2348
+ 'Accept': 'application/json',
2349
+ }, _params.headers),
2350
+ }),
2351
+ };
2352
+ return this.createRequest(parameters);
2353
+ };
2354
+ /**
2355
+ * Validate the Bucket Existence.
2356
+ *
2357
+ * Use this API to validate the bucket existence on an AWS hosting.
2358
+ *
2359
+ * @param {Object} params - The parameters to send to the service.
2360
+ * @param {string} params.bucketName - Name of the bucket to validate.
2361
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2362
+ * @returns {Promise<DphV1.Response<DphV1.BucketValidationResponse>>}
2363
+ */
2364
+ DphV1.prototype.getS3BucketValidation = function (params) {
2365
+ var _params = __assign({}, params);
2366
+ var _requiredParams = ['bucketName'];
2367
+ var _validParams = ['bucketName', 'headers'];
2368
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2369
+ if (_validationErrors) {
2370
+ return Promise.reject(_validationErrors);
2371
+ }
2372
+ var path = {
2373
+ 'bucket_name': _params.bucketName,
2374
+ };
2375
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getS3BucketValidation');
2376
+ var parameters = {
2377
+ options: {
2378
+ url: '/data_product_exchange/v1/bucket/validate/{bucket_name}',
2379
+ method: 'GET',
2380
+ path: path,
2381
+ },
2382
+ defaultOptions: extend(true, {}, this.baseOptions, {
2383
+ headers: extend(true, sdkHeaders, {
2384
+ 'Accept': 'application/json',
2385
+ }, _params.headers),
2386
+ }),
2387
+ };
2388
+ return this.createRequest(parameters);
2389
+ };
2390
+ /*************************
2391
+ * dataProductRevokeAccessJobRuns
2392
+ ************************/
2393
+ /**
2394
+ * Access revoke status of the subscriptions against the data product release id.
2395
+ *
2396
+ * Retrieves the status of revoke access requests.
2397
+ *
2398
+ * @param {Object} params - The parameters to send to the service.
2399
+ * @param {string} params.releaseId - Pass the data product release version id to retrieve job runs state for that
2400
+ * specific DPV ID.
2401
+ * @param {number} [params.limit] - Limit the number of tracking assets in the results. The maximum is 200.
2402
+ * @param {string} [params.start] - Start token for pagination.
2403
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2404
+ * @returns {Promise<DphV1.Response<DphV1.RevokeAccessStateResponse>>}
2405
+ */
2406
+ DphV1.prototype.getRevokeAccessProcessState = function (params) {
2407
+ var _params = __assign({}, params);
2408
+ var _requiredParams = ['releaseId'];
2409
+ var _validParams = ['releaseId', 'limit', 'start', 'headers'];
2410
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2411
+ if (_validationErrors) {
2412
+ return Promise.reject(_validationErrors);
2413
+ }
2414
+ var query = {
2415
+ 'release_id': _params.releaseId,
2416
+ 'limit': _params.limit,
2417
+ 'start': _params.start,
2418
+ };
2419
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getRevokeAccessProcessState');
2420
+ var parameters = {
2421
+ options: {
2422
+ url: '/data_product_exchange/v1/data_product_revoke_access/job_runs',
2423
+ method: 'GET',
2424
+ qs: query,
2425
+ },
2426
+ defaultOptions: extend(true, {}, this.baseOptions, {
2427
+ headers: extend(true, sdkHeaders, {
2428
+ 'Accept': 'application/json',
2429
+ }, _params.headers),
2430
+ }),
2431
+ };
2432
+ return this.createRequest(parameters);
2433
+ };
2434
+ DphV1.DEFAULT_SERVICE_NAME = 'dph';
2435
+ return DphV1;
2436
+ }(ibm_cloud_sdk_core_1.BaseService));
2437
+ /*************************
2438
+ * interfaces
2439
+ ************************/
2440
+ (function (DphV1) {
2441
+ /** Constants for the `initialize` operation. */
2442
+ var InitializeConstants;
2443
+ (function (InitializeConstants) {
2444
+ /** Include */
2445
+ var Include;
2446
+ (function (Include) {
2447
+ Include["DELIVERY_METHODS"] = "delivery_methods";
2448
+ Include["DOMAINS_MULTI_INDUSTRY"] = "domains_multi_industry";
2449
+ Include["DATA_PRODUCT_SAMPLES"] = "data_product_samples";
2450
+ Include["WORKFLOWS"] = "workflows";
2451
+ Include["PROJECT"] = "project";
2452
+ Include["CATALOG_CONFIGURATIONS"] = "catalog_configurations";
2453
+ Include["FUNCTIONAL_ADMIN_USER_GROUP"] = "functional_admin_user_group";
2454
+ })(Include = InitializeConstants.Include || (InitializeConstants.Include = {}));
2455
+ })(InitializeConstants = DphV1.InitializeConstants || (DphV1.InitializeConstants = {}));
2456
+ /** Constants for the `createDataProductDraft` operation. */
2457
+ var CreateDataProductDraftConstants;
2458
+ (function (CreateDataProductDraftConstants) {
2459
+ /** The state of the data product version. If not specified, the data product version will be created in `draft` state. */
1230
2460
  var State;
1231
2461
  (function (State) {
1232
2462
  State["DRAFT"] = "draft";
@@ -1250,6 +2480,36 @@ var DphV1 = /** @class */ (function (_super) {
1250
2480
  Type["SLA"] = "sla";
1251
2481
  })(Type = CreateDraftContractTermsDocumentConstants.Type || (CreateDraftContractTermsDocumentConstants.Type = {}));
1252
2482
  })(CreateDraftContractTermsDocumentConstants = DphV1.CreateDraftContractTermsDocumentConstants || (DphV1.CreateDraftContractTermsDocumentConstants = {}));
2483
+ /** Constants for the `getDataProductDraftContractTerms` operation. */
2484
+ var GetDataProductDraftContractTermsConstants;
2485
+ (function (GetDataProductDraftContractTermsConstants) {
2486
+ /** The type of the response: application/json or application/odcs+yaml. */
2487
+ var Accept;
2488
+ (function (Accept) {
2489
+ Accept["APPLICATION_JSON"] = "application/json";
2490
+ Accept["APPLICATION_ODCS_YAML"] = "application/odcs+yaml";
2491
+ })(Accept = GetDataProductDraftContractTermsConstants.Accept || (GetDataProductDraftContractTermsConstants.Accept = {}));
2492
+ })(GetDataProductDraftContractTermsConstants = DphV1.GetDataProductDraftContractTermsConstants || (DphV1.GetDataProductDraftContractTermsConstants = {}));
2493
+ /** Constants for the `getContractTermsInSpecifiedFormat` operation. */
2494
+ var GetContractTermsInSpecifiedFormatConstants;
2495
+ (function (GetContractTermsInSpecifiedFormatConstants) {
2496
+ /** The type of the response: application/odcs+yaml or application/json. */
2497
+ var Accept;
2498
+ (function (Accept) {
2499
+ Accept["APPLICATION_ODCS_YAML"] = "application/odcs+yaml";
2500
+ Accept["APPLICATION_JSON"] = "application/json";
2501
+ })(Accept = GetContractTermsInSpecifiedFormatConstants.Accept || (GetContractTermsInSpecifiedFormatConstants.Accept = {}));
2502
+ })(GetContractTermsInSpecifiedFormatConstants = DphV1.GetContractTermsInSpecifiedFormatConstants || (DphV1.GetContractTermsInSpecifiedFormatConstants = {}));
2503
+ /** Constants for the `getPublishedDataProductDraftContractTerms` operation. */
2504
+ var GetPublishedDataProductDraftContractTermsConstants;
2505
+ (function (GetPublishedDataProductDraftContractTermsConstants) {
2506
+ /** The type of the response: application/odcs+yaml or application/json. */
2507
+ var Accept;
2508
+ (function (Accept) {
2509
+ Accept["APPLICATION_ODCS_YAML"] = "application/odcs+yaml";
2510
+ Accept["APPLICATION_JSON"] = "application/json";
2511
+ })(Accept = GetPublishedDataProductDraftContractTermsConstants.Accept || (GetPublishedDataProductDraftContractTermsConstants.Accept = {}));
2512
+ })(GetPublishedDataProductDraftContractTermsConstants = DphV1.GetPublishedDataProductDraftContractTermsConstants || (DphV1.GetPublishedDataProductDraftContractTermsConstants = {}));
1253
2513
  /** Constants for the `listDataProductReleases` operation. */
1254
2514
  var ListDataProductReleasesConstants;
1255
2515
  (function (ListDataProductReleasesConstants) {
@@ -1284,8 +2544,20 @@ var DphV1 = /** @class */ (function (_super) {
1284
2544
  })(Type = Constants.Type || (Constants.Type = {}));
1285
2545
  })(Constants = ContractTermsDocument.Constants || (ContractTermsDocument.Constants = {}));
1286
2546
  })(ContractTermsDocument = DphV1.ContractTermsDocument || (DphV1.ContractTermsDocument = {}));
1287
- var DataProductVersion;
1288
- (function (DataProductVersion) {
2547
+ var ContractTest;
2548
+ (function (ContractTest) {
2549
+ var Constants;
2550
+ (function (Constants) {
2551
+ /** Status of the contract test (pass or fail). */
2552
+ var Status;
2553
+ (function (Status) {
2554
+ Status["PASS"] = "pass";
2555
+ Status["FAIL"] = "fail";
2556
+ })(Status = Constants.Status || (Constants.Status = {}));
2557
+ })(Constants = ContractTest.Constants || (ContractTest.Constants = {}));
2558
+ })(ContractTest = DphV1.ContractTest || (DphV1.ContractTest = {}));
2559
+ var DataProductDraft;
2560
+ (function (DataProductDraft) {
1289
2561
  var Constants;
1290
2562
  (function (Constants) {
1291
2563
  /** The state of the data product version. */
@@ -1301,10 +2573,10 @@ var DphV1 = /** @class */ (function (_super) {
1301
2573
  Types["DATA"] = "data";
1302
2574
  Types["CODE"] = "code";
1303
2575
  })(Types = Constants.Types || (Constants.Types = {}));
1304
- })(Constants = DataProductVersion.Constants || (DataProductVersion.Constants = {}));
1305
- })(DataProductVersion = DphV1.DataProductVersion || (DphV1.DataProductVersion = {}));
1306
- var DataProductVersionPrototype;
1307
- (function (DataProductVersionPrototype) {
2576
+ })(Constants = DataProductDraft.Constants || (DataProductDraft.Constants = {}));
2577
+ })(DataProductDraft = DphV1.DataProductDraft || (DphV1.DataProductDraft = {}));
2578
+ var DataProductDraftPrototype;
2579
+ (function (DataProductDraftPrototype) {
1308
2580
  var Constants;
1309
2581
  (function (Constants) {
1310
2582
  /** The state of the data product version. If not specified, the data product version will be created in `draft` state. */
@@ -1320,8 +2592,65 @@ var DphV1 = /** @class */ (function (_super) {
1320
2592
  Types["DATA"] = "data";
1321
2593
  Types["CODE"] = "code";
1322
2594
  })(Types = Constants.Types || (Constants.Types = {}));
1323
- })(Constants = DataProductVersionPrototype.Constants || (DataProductVersionPrototype.Constants = {}));
1324
- })(DataProductVersionPrototype = DphV1.DataProductVersionPrototype || (DphV1.DataProductVersionPrototype = {}));
2595
+ })(Constants = DataProductDraftPrototype.Constants || (DataProductDraftPrototype.Constants = {}));
2596
+ })(DataProductDraftPrototype = DphV1.DataProductDraftPrototype || (DphV1.DataProductDraftPrototype = {}));
2597
+ var DataProductDraftSummary;
2598
+ (function (DataProductDraftSummary) {
2599
+ var Constants;
2600
+ (function (Constants) {
2601
+ /** The state of the data product version. */
2602
+ var State;
2603
+ (function (State) {
2604
+ State["DRAFT"] = "draft";
2605
+ State["AVAILABLE"] = "available";
2606
+ State["RETIRED"] = "retired";
2607
+ })(State = Constants.State || (Constants.State = {}));
2608
+ /** Types of parts on the data product. */
2609
+ var Types;
2610
+ (function (Types) {
2611
+ Types["DATA"] = "data";
2612
+ Types["CODE"] = "code";
2613
+ })(Types = Constants.Types || (Constants.Types = {}));
2614
+ })(Constants = DataProductDraftSummary.Constants || (DataProductDraftSummary.Constants = {}));
2615
+ })(DataProductDraftSummary = DphV1.DataProductDraftSummary || (DphV1.DataProductDraftSummary = {}));
2616
+ var DataProductRelease;
2617
+ (function (DataProductRelease) {
2618
+ var Constants;
2619
+ (function (Constants) {
2620
+ /** The state of the data product version. */
2621
+ var State;
2622
+ (function (State) {
2623
+ State["DRAFT"] = "draft";
2624
+ State["AVAILABLE"] = "available";
2625
+ State["RETIRED"] = "retired";
2626
+ })(State = Constants.State || (Constants.State = {}));
2627
+ /** Types of parts on the data product. */
2628
+ var Types;
2629
+ (function (Types) {
2630
+ Types["DATA"] = "data";
2631
+ Types["CODE"] = "code";
2632
+ })(Types = Constants.Types || (Constants.Types = {}));
2633
+ })(Constants = DataProductRelease.Constants || (DataProductRelease.Constants = {}));
2634
+ })(DataProductRelease = DphV1.DataProductRelease || (DphV1.DataProductRelease = {}));
2635
+ var DataProductReleaseSummary;
2636
+ (function (DataProductReleaseSummary) {
2637
+ var Constants;
2638
+ (function (Constants) {
2639
+ /** The state of the data product version. */
2640
+ var State;
2641
+ (function (State) {
2642
+ State["DRAFT"] = "draft";
2643
+ State["AVAILABLE"] = "available";
2644
+ State["RETIRED"] = "retired";
2645
+ })(State = Constants.State || (Constants.State = {}));
2646
+ /** Types of parts on the data product. */
2647
+ var Types;
2648
+ (function (Types) {
2649
+ Types["DATA"] = "data";
2650
+ Types["CODE"] = "code";
2651
+ })(Types = Constants.Types || (Constants.Types = {}));
2652
+ })(Constants = DataProductReleaseSummary.Constants || (DataProductReleaseSummary.Constants = {}));
2653
+ })(DataProductReleaseSummary = DphV1.DataProductReleaseSummary || (DphV1.DataProductReleaseSummary = {}));
1325
2654
  var DataProductVersionSummary;
1326
2655
  (function (DataProductVersionSummary) {
1327
2656
  var Constants;
@@ -1341,6 +2670,18 @@ var DphV1 = /** @class */ (function (_super) {
1341
2670
  })(Types = Constants.Types || (Constants.Types = {}));
1342
2671
  })(Constants = DataProductVersionSummary.Constants || (DataProductVersionSummary.Constants = {}));
1343
2672
  })(DataProductVersionSummary = DphV1.DataProductVersionSummary || (DphV1.DataProductVersionSummary = {}));
2673
+ var EngineDetailsModel;
2674
+ (function (EngineDetailsModel) {
2675
+ var Constants;
2676
+ (function (Constants) {
2677
+ /** The type of the engine (eg: Presto/Spark). */
2678
+ var EngineType;
2679
+ (function (EngineType) {
2680
+ EngineType["SPARK"] = "spark";
2681
+ EngineType["PRESTO"] = "presto";
2682
+ })(EngineType = Constants.EngineType || (Constants.EngineType = {}));
2683
+ })(Constants = EngineDetailsModel.Constants || (EngineDetailsModel.Constants = {}));
2684
+ })(EngineDetailsModel = DphV1.EngineDetailsModel || (DphV1.EngineDetailsModel = {}));
1344
2685
  var ErrorModelResource;
1345
2686
  (function (ErrorModelResource) {
1346
2687
  var Constants;
@@ -1378,6 +2719,7 @@ var DphV1 = /** @class */ (function (_super) {
1378
2719
  Code["DELETED"] = "deleted";
1379
2720
  Code["NOT_IMPLEMENTED"] = "not_implemented";
1380
2721
  Code["FEATURE_NOT_ENABLED"] = "feature_not_enabled";
2722
+ Code["MISSING_ASSET_DETAILS"] = "missing_asset_details";
1381
2723
  })(Code = Constants.Code || (Constants.Code = {}));
1382
2724
  })(Constants = ErrorModelResource.Constants || (ErrorModelResource.Constants = {}));
1383
2725
  })(ErrorModelResource = DphV1.ErrorModelResource || (DphV1.ErrorModelResource = {}));
@@ -1531,7 +2873,7 @@ var DphV1 = /** @class */ (function (_super) {
1531
2873
  };
1532
2874
  /**
1533
2875
  * Returns the next page of results by invoking listDataProductDrafts().
1534
- * @returns {Promise<DphV1.DataProductVersionSummary[]>}
2876
+ * @returns {Promise<DphV1.DataProductDraftSummary[]>}
1535
2877
  */
1536
2878
  DataProductDraftsPager.prototype.getNext = function () {
1537
2879
  return __awaiter(this, void 0, void 0, function () {
@@ -1563,7 +2905,7 @@ var DphV1 = /** @class */ (function (_super) {
1563
2905
  };
1564
2906
  /**
1565
2907
  * Returns all results by invoking listDataProductDrafts() repeatedly until all pages of results have been retrieved.
1566
- * @returns {Promise<DphV1.DataProductVersionSummary[]>}
2908
+ * @returns {Promise<DphV1.DataProductDraftSummary[]>}
1567
2909
  */
1568
2910
  DataProductDraftsPager.prototype.getAll = function () {
1569
2911
  return __awaiter(this, void 0, void 0, function () {
@@ -1618,7 +2960,7 @@ var DphV1 = /** @class */ (function (_super) {
1618
2960
  };
1619
2961
  /**
1620
2962
  * Returns the next page of results by invoking listDataProductReleases().
1621
- * @returns {Promise<DphV1.DataProductVersionSummary[]>}
2963
+ * @returns {Promise<DphV1.DataProductReleaseSummary[]>}
1622
2964
  */
1623
2965
  DataProductReleasesPager.prototype.getNext = function () {
1624
2966
  return __awaiter(this, void 0, void 0, function () {
@@ -1650,7 +2992,7 @@ var DphV1 = /** @class */ (function (_super) {
1650
2992
  };
1651
2993
  /**
1652
2994
  * Returns all results by invoking listDataProductReleases() repeatedly until all pages of results have been retrieved.
1653
- * @returns {Promise<DphV1.DataProductVersionSummary[]>}
2995
+ * @returns {Promise<DphV1.DataProductReleaseSummary[]>}
1654
2996
  */
1655
2997
  DataProductReleasesPager.prototype.getAll = function () {
1656
2998
  return __awaiter(this, void 0, void 0, function () {