@ibm-cloud/ibm_dph_services 0.2.0 → 0.3.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,15 @@ 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 {boolean} [params.isRestricted] - Indicates whether the data product is restricted or not. A restricted data
643
+ * product indicates that orders of the data product requires explicit approval before data is delivered.
544
644
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
545
- * @returns {Promise<DphV1.Response<DphV1.DataProductVersion>>}
645
+ * @returns {Promise<DphV1.Response<DphV1.DataProductDraft>>}
546
646
  */
547
647
  DphV1.prototype.createDataProductDraft = function (params) {
548
648
  var _params = __assign({}, params);
@@ -559,10 +659,14 @@ var DphV1 = /** @class */ (function (_super) {
559
659
  'useCases',
560
660
  'types',
561
661
  'contractTerms',
562
- 'isRestricted',
563
662
  'domain',
564
663
  'partsOut',
565
664
  'workflows',
665
+ 'dataviewEnabled',
666
+ 'comments',
667
+ 'accessControl',
668
+ 'lastUpdatedAt',
669
+ 'isRestricted',
566
670
  'headers',
567
671
  ];
568
672
  var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
@@ -580,26 +684,30 @@ var DphV1 = /** @class */ (function (_super) {
580
684
  'use_cases': _params.useCases,
581
685
  'types': _params.types,
582
686
  'contract_terms': _params.contractTerms,
583
- 'is_restricted': _params.isRestricted,
584
687
  'domain': _params.domain,
585
688
  'parts_out': _params.partsOut,
586
689
  'workflows': _params.workflows,
690
+ 'dataview_enabled': _params.dataviewEnabled,
691
+ 'comments': _params.comments,
692
+ 'access_control': _params.accessControl,
693
+ 'last_updated_at': _params.lastUpdatedAt,
694
+ 'is_restricted': _params.isRestricted,
587
695
  };
588
696
  var path = {
589
697
  'data_product_id': _params.dataProductId,
590
698
  };
591
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, CREATE_DATA_PRODUCT_DRAFT);
699
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createDataProductDraft');
592
700
  var parameters = {
593
701
  options: {
594
- url: URL_CREATE_DATA_PRODUCT_DRAFT,
595
- method: HTTP_POST,
702
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts',
703
+ method: 'POST',
596
704
  body: body,
597
705
  path: path,
598
706
  },
599
707
  defaultOptions: extend(true, {}, this.baseOptions, {
600
708
  headers: extend(true, sdkHeaders, {
601
- 'Accept': CONTENT_TYPE_JSON,
602
- 'Content-Type': CONTENT_TYPE_JSON,
709
+ 'Accept': 'application/json',
710
+ 'Content-Type': 'application/json',
603
711
  }, _params.headers),
604
712
  }),
605
713
  };
@@ -608,6 +716,9 @@ var DphV1 = /** @class */ (function (_super) {
608
716
  /**
609
717
  * Upload a contract document to the data product draft contract terms.
610
718
  *
719
+ * Upload a contract document to the data product draft identified by draft_id. Use '-' for the `data_product_id` to
720
+ * skip specifying the data product ID explicitly.
721
+ *
611
722
  * - If the request object contains a "url" parameter, a referential document is created to store the provided url.
612
723
  * - If the request object does not contain a "url" parameter, an attachment document is created, and a signed url
613
724
  * will be returned in an "upload_url" parameter. The data product producer can upload the document using the provided
@@ -651,18 +762,18 @@ var DphV1 = /** @class */ (function (_super) {
651
762
  'draft_id': _params.draftId,
652
763
  'contract_terms_id': _params.contractTermsId,
653
764
  };
654
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, CREATE_DRAFT_CONTRACT_TERMS_DOCUMENT);
765
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createDraftContractTermsDocument');
655
766
  var parameters = {
656
767
  options: {
657
- url: URL_CREATE_DRAFT_CONTRACT_TERMS_DOCUMENT,
658
- method: HTTP_POST,
768
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents',
769
+ method: 'POST',
659
770
  body: body,
660
771
  path: path,
661
772
  },
662
773
  defaultOptions: extend(true, {}, this.baseOptions, {
663
774
  headers: extend(true, sdkHeaders, {
664
- 'Accept': CONTENT_TYPE_JSON,
665
- 'Content-Type': CONTENT_TYPE_JSON,
775
+ 'Accept': 'application/json',
776
+ 'Content-Type': 'application/json',
666
777
  }, _params.headers),
667
778
  }),
668
779
  };
@@ -671,11 +782,14 @@ var DphV1 = /** @class */ (function (_super) {
671
782
  /**
672
783
  * Get a draft of an existing data product.
673
784
  *
785
+ * Get a draft of an existing data product. Use '-' for the `data_product_id` to skip specifying the data product ID
786
+ * explicitly.
787
+ *
674
788
  * @param {Object} params - The parameters to send to the service.
675
789
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
676
790
  * @param {string} params.draftId - Data product draft id.
677
791
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
678
- * @returns {Promise<DphV1.Response<DphV1.DataProductVersion>>}
792
+ * @returns {Promise<DphV1.Response<DphV1.DataProductDraft>>}
679
793
  */
680
794
  DphV1.prototype.getDataProductDraft = function (params) {
681
795
  var _params = __assign({}, params);
@@ -689,16 +803,16 @@ var DphV1 = /** @class */ (function (_super) {
689
803
  'data_product_id': _params.dataProductId,
690
804
  'draft_id': _params.draftId,
691
805
  };
692
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, GET_DATA_PRODUCT_DRAFT);
806
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getDataProductDraft');
693
807
  var parameters = {
694
808
  options: {
695
- url: URL_GET_DATA_PRODUCT_DRAFT,
696
- method: HTTP_GET,
809
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}',
810
+ method: 'GET',
697
811
  path: path,
698
812
  },
699
813
  defaultOptions: extend(true, {}, this.baseOptions, {
700
814
  headers: extend(true, sdkHeaders, {
701
- 'Accept': CONTENT_TYPE_JSON,
815
+ 'Accept': 'application/json',
702
816
  }, _params.headers),
703
817
  }),
704
818
  };
@@ -707,6 +821,9 @@ var DphV1 = /** @class */ (function (_super) {
707
821
  /**
708
822
  * Delete a data product draft identified by ID.
709
823
  *
824
+ * Delete a data product draft identified by a valid ID. Use '-' for the `data_product_id` to skip specifying the data
825
+ * product ID explicitly.
826
+ *
710
827
  * @param {Object} params - The parameters to send to the service.
711
828
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
712
829
  * @param {string} params.draftId - Data product draft id.
@@ -725,11 +842,11 @@ var DphV1 = /** @class */ (function (_super) {
725
842
  'data_product_id': _params.dataProductId,
726
843
  'draft_id': _params.draftId,
727
844
  };
728
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, DLETE_DATA_PRODUCT_DRAFT);
845
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteDataProductDraft');
729
846
  var parameters = {
730
847
  options: {
731
- url: URL_DELETE_DATA_PRODUCT_DRAFT,
732
- method: HTTP_DELETE,
848
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}',
849
+ method: 'DELETE',
733
850
  path: path,
734
851
  },
735
852
  defaultOptions: extend(true, {}, this.baseOptions, {
@@ -741,10 +858,11 @@ var DphV1 = /** @class */ (function (_super) {
741
858
  /**
742
859
  * Update the data product draft identified by ID.
743
860
  *
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/>.
861
+ * Use this API to update the properties of a data product draft identified by a valid ID. Use '-' for the
862
+ * `data_product_id` to skip specifying the data product ID explicitly.<br/><br/>Specify patch operations using
863
+ * http://jsonpatch.com/ syntax.<br/><br/>Supported patch operations include:<br/><br/>- Update the properties of a
864
+ * data product<br/><br/>- Add/Remove parts from a data product (up to 20 parts)<br/><br/>- Add/Remove use cases from
865
+ * a data product<br/><br/>- Update the data product state<br/><br/>.
748
866
  *
749
867
  * @param {Object} params - The parameters to send to the service.
750
868
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
@@ -752,7 +870,7 @@ var DphV1 = /** @class */ (function (_super) {
752
870
  * @param {JsonPatchOperation[]} params.jsonPatchInstructions - A set of patch operations as defined in RFC 6902. See
753
871
  * http://jsonpatch.com/ for more information.
754
872
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
755
- * @returns {Promise<DphV1.Response<DphV1.DataProductVersion>>}
873
+ * @returns {Promise<DphV1.Response<DphV1.DataProductDraft>>}
756
874
  */
757
875
  DphV1.prototype.updateDataProductDraft = function (params) {
758
876
  var _params = __assign({}, params);
@@ -767,18 +885,18 @@ var DphV1 = /** @class */ (function (_super) {
767
885
  'data_product_id': _params.dataProductId,
768
886
  'draft_id': _params.draftId,
769
887
  };
770
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, UPDATE_DATA_PRODUCT_DRAFT);
888
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'updateDataProductDraft');
771
889
  var parameters = {
772
890
  options: {
773
- url: URL_UPDATE_DATA_PRODUCT_DRAFT,
774
- method: HTTP_PATCH,
891
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}',
892
+ method: 'PATCH',
775
893
  body: body,
776
894
  path: path,
777
895
  },
778
896
  defaultOptions: extend(true, {}, this.baseOptions, {
779
897
  headers: extend(true, sdkHeaders, {
780
- 'Accept': CONTENT_TYPE_JSON,
781
- 'Content-Type': CONTENT_TYPE_PATCH_JSON,
898
+ 'Accept': 'application/json',
899
+ 'Content-Type': 'application/json-patch+json',
782
900
  }, _params.headers),
783
901
  }),
784
902
  };
@@ -790,7 +908,8 @@ var DphV1 = /** @class */ (function (_super) {
790
908
  * If a document has a completed attachment, the response contains the `url` which can be used to download the
791
909
  * attachment. If a document does not have a completed attachment, the response contains the `url` which was submitted
792
910
  * 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.
911
+ * to upload the document file and complete it. Use '-' for the `data_product_id` to skip specifying the data product
912
+ * ID explicitly.
794
913
  *
795
914
  * @param {Object} params - The parameters to send to the service.
796
915
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
@@ -814,16 +933,16 @@ var DphV1 = /** @class */ (function (_super) {
814
933
  'contract_terms_id': _params.contractTermsId,
815
934
  'document_id': _params.documentId,
816
935
  };
817
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, GET_DRAFT_CONTRACT_TERMS_DOCUMENT);
936
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getDraftContractTermsDocument');
818
937
  var parameters = {
819
938
  options: {
820
- url: URL_GET_DRAFT_CONTRACT_TERMS_DOCUMENT,
821
- method: HTTP_GET,
939
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}',
940
+ method: 'GET',
822
941
  path: path,
823
942
  },
824
943
  defaultOptions: extend(true, {}, this.baseOptions, {
825
944
  headers: extend(true, sdkHeaders, {
826
- 'Accept': CONTENT_TYPE_JSON,
945
+ 'Accept': 'application/json',
827
946
  }, _params.headers),
828
947
  }),
829
948
  };
@@ -832,7 +951,10 @@ var DphV1 = /** @class */ (function (_super) {
832
951
  /**
833
952
  * Delete a contract document.
834
953
  *
835
- * Contract documents can only be deleted for data product versions that are in DRAFT state.
954
+ * Delete an existing contract document.
955
+ *
956
+ * Contract documents can only be deleted for data product versions that are in DRAFT state. Use '-' for the
957
+ * `data_product_id` to skip specifying the data product ID explicitly.
836
958
  *
837
959
  * @param {Object} params - The parameters to send to the service.
838
960
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
@@ -856,11 +978,11 @@ var DphV1 = /** @class */ (function (_super) {
856
978
  'contract_terms_id': _params.contractTermsId,
857
979
  'document_id': _params.documentId,
858
980
  };
859
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, DELETE_DRAFT_CONTRACT_TERMS_DOCUMENT);
981
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteDraftContractTermsDocument');
860
982
  var parameters = {
861
983
  options: {
862
- url: URL_DELETE_DRAFT_CONTRACT_TERMS_DOCUMENT,
863
- method: HTTP_DELETE,
984
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}',
985
+ method: 'DELETE',
864
986
  path: path,
865
987
  },
866
988
  defaultOptions: extend(true, {}, this.baseOptions, {
@@ -880,6 +1002,7 @@ var DphV1 = /** @class */ (function (_super) {
880
1002
  * - Update the url of document if it does not have an attachment.
881
1003
  * - Update the type of the document.
882
1004
  * <br/><br/>Contract terms documents can only be updated if the associated data product version is in DRAFT state.
1005
+ * Use '-' for the `data_product_id` to skip specifying the data product ID explicitly.
883
1006
  *
884
1007
  * @param {Object} params - The parameters to send to the service.
885
1008
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
@@ -919,18 +1042,228 @@ var DphV1 = /** @class */ (function (_super) {
919
1042
  'contract_terms_id': _params.contractTermsId,
920
1043
  'document_id': _params.documentId,
921
1044
  };
922
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, UPDATE_DRAFT_CONTRACT_TERMS_DOCUMENT);
1045
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'updateDraftContractTermsDocument');
1046
+ var parameters = {
1047
+ options: {
1048
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}/documents/{document_id}',
1049
+ method: 'PATCH',
1050
+ body: body,
1051
+ path: path,
1052
+ },
1053
+ defaultOptions: extend(true, {}, this.baseOptions, {
1054
+ headers: extend(true, sdkHeaders, {
1055
+ 'Accept': 'application/json',
1056
+ 'Content-Type': 'application/json-patch+json',
1057
+ }, _params.headers),
1058
+ }),
1059
+ };
1060
+ return this.createRequest(parameters);
1061
+ };
1062
+ /**
1063
+ * Retrieve a data product contract terms identified by id.
1064
+ *
1065
+ * Retrieve a data product contract terms identified by id.
1066
+ *
1067
+ * @param {Object} params - The parameters to send to the service.
1068
+ * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1069
+ * @param {string} params.draftId - Data product draft id.
1070
+ * @param {string} params.contractTermsId - Contract terms id.
1071
+ * @param {string} [params.accept] - The type of the response: application/odcs+yaml or application/json.
1072
+ * @param {boolean} [params.includeContractDocuments] - Set to false to exclude external contract documents (e.g.,
1073
+ * Terms and Conditions URLs) from the response. By default, these are included.
1074
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1075
+ * @returns {Promise<DphV1.Response<NodeJS.ReadableStream>>}
1076
+ */
1077
+ DphV1.prototype.getDataProductDraftContractTerms = function (params) {
1078
+ var _params = __assign({}, params);
1079
+ var _requiredParams = ['dataProductId', 'draftId', 'contractTermsId'];
1080
+ var _validParams = [
1081
+ 'dataProductId',
1082
+ 'draftId',
1083
+ 'contractTermsId',
1084
+ 'accept',
1085
+ 'includeContractDocuments',
1086
+ 'headers',
1087
+ ];
1088
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1089
+ if (_validationErrors) {
1090
+ return Promise.reject(_validationErrors);
1091
+ }
1092
+ var query = {
1093
+ 'include_contract_documents': _params.includeContractDocuments,
1094
+ };
1095
+ var path = {
1096
+ 'data_product_id': _params.dataProductId,
1097
+ 'draft_id': _params.draftId,
1098
+ 'contract_terms_id': _params.contractTermsId,
1099
+ };
1100
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getDataProductDraftContractTerms');
1101
+ var parameters = {
1102
+ options: {
1103
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}',
1104
+ method: 'GET',
1105
+ qs: query,
1106
+ path: path,
1107
+ responseType: 'stream',
1108
+ },
1109
+ defaultOptions: extend(true, {}, this.baseOptions, {
1110
+ headers: extend(true, sdkHeaders, {
1111
+ 'Accept': _params.accept,
1112
+ }, _params.headers),
1113
+ }),
1114
+ };
1115
+ return this.createRequest(parameters);
1116
+ };
1117
+ /**
1118
+ * Update a data product contract terms identified by id.
1119
+ *
1120
+ * Update a data product contract terms identified by id.
1121
+ *
1122
+ * @param {Object} params - The parameters to send to the service.
1123
+ * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1124
+ * @param {string} params.draftId - Data product draft id.
1125
+ * @param {string} params.contractTermsId - Contract terms id.
1126
+ * @param {AssetReference} [params.asset] - The reference schema for a asset in a container.
1127
+ * @param {string} [params.id] - ID of the contract terms.
1128
+ * @param {ContractTermsDocument[]} [params.documents] - Collection of contract terms documents.
1129
+ * @param {string} [params.errorMsg] - An error message, if existing, relating to the contract terms.
1130
+ * @param {Overview} [params.overview] - Overview details of a data contract.
1131
+ * @param {Description} [params.description] - Description details of a data contract.
1132
+ * @param {ContractTemplateOrganization[]} [params.organization] - List of sub domains to be added within a domain.
1133
+ * @param {Roles[]} [params.roles] - List of roles associated with the contract.
1134
+ * @param {Pricing} [params.price] - Represents the pricing details of the contract.
1135
+ * @param {ContractTemplateSLA[]} [params.sla] - Service Level Agreement details.
1136
+ * @param {ContractTemplateSupportAndCommunication[]} [params.supportAndCommunication] - Support and communication
1137
+ * details for the contract.
1138
+ * @param {ContractTemplateCustomProperty[]} [params.customProperties] - Custom properties that are not part of the
1139
+ * standard contract.
1140
+ * @param {ContractTest} [params.contractTest] - Contains the contract test status and related metadata.
1141
+ * @param {ContractSchema[]} [params.schema] - Schema details of the data asset.
1142
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1143
+ * @returns {Promise<DphV1.Response<DphV1.ContractTerms>>}
1144
+ */
1145
+ DphV1.prototype.replaceDataProductDraftContractTerms = function (params) {
1146
+ var _params = __assign({}, params);
1147
+ var _requiredParams = ['dataProductId', 'draftId', 'contractTermsId'];
1148
+ var _validParams = [
1149
+ 'dataProductId',
1150
+ 'draftId',
1151
+ 'contractTermsId',
1152
+ 'asset',
1153
+ 'id',
1154
+ 'documents',
1155
+ 'errorMsg',
1156
+ 'overview',
1157
+ 'description',
1158
+ 'organization',
1159
+ 'roles',
1160
+ 'price',
1161
+ 'sla',
1162
+ 'supportAndCommunication',
1163
+ 'customProperties',
1164
+ 'contractTest',
1165
+ 'schema',
1166
+ 'headers',
1167
+ ];
1168
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1169
+ if (_validationErrors) {
1170
+ return Promise.reject(_validationErrors);
1171
+ }
1172
+ var body = {
1173
+ 'asset': _params.asset,
1174
+ 'id': _params.id,
1175
+ 'documents': _params.documents,
1176
+ 'error_msg': _params.errorMsg,
1177
+ 'overview': _params.overview,
1178
+ 'description': _params.description,
1179
+ 'organization': _params.organization,
1180
+ 'roles': _params.roles,
1181
+ 'price': _params.price,
1182
+ 'sla': _params.sla,
1183
+ 'support_and_communication': _params.supportAndCommunication,
1184
+ 'custom_properties': _params.customProperties,
1185
+ 'contract_test': _params.contractTest,
1186
+ 'schema': _params.schema,
1187
+ };
1188
+ var path = {
1189
+ 'data_product_id': _params.dataProductId,
1190
+ 'draft_id': _params.draftId,
1191
+ 'contract_terms_id': _params.contractTermsId,
1192
+ };
1193
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'replaceDataProductDraftContractTerms');
1194
+ var parameters = {
1195
+ options: {
1196
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}',
1197
+ method: 'PUT',
1198
+ body: body,
1199
+ path: path,
1200
+ },
1201
+ defaultOptions: extend(true, {}, this.baseOptions, {
1202
+ headers: extend(true, sdkHeaders, {
1203
+ 'Accept': 'application/json',
1204
+ 'Content-Type': 'application/json',
1205
+ }, _params.headers),
1206
+ }),
1207
+ };
1208
+ return this.createRequest(parameters);
1209
+ };
1210
+ /**
1211
+ * Update a contract terms property.
1212
+ *
1213
+ * Use this API to update the properties of a contract terms that is identified by a valid ID.
1214
+ *
1215
+ * Specify patch operations using http://jsonpatch.com/ syntax.
1216
+ *
1217
+ * Supported patch operations include:
1218
+ * - Update the contract terms properties.
1219
+ * <br/><br/>Contract terms can only be updated if the associated data product version is in DRAFT state.
1220
+ *
1221
+ * @param {Object} params - The parameters to send to the service.
1222
+ * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1223
+ * @param {string} params.draftId - Data product draft id.
1224
+ * @param {string} params.contractTermsId - Contract terms id.
1225
+ * @param {JsonPatchOperation[]} params.jsonPatchInstructions - A set of patch operations as defined in RFC 6902. See
1226
+ * http://jsonpatch.com/ for more information.
1227
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1228
+ * @returns {Promise<DphV1.Response<DphV1.ContractTerms>>}
1229
+ */
1230
+ DphV1.prototype.updateDataProductDraftContractTerms = function (params) {
1231
+ var _params = __assign({}, params);
1232
+ var _requiredParams = [
1233
+ 'dataProductId',
1234
+ 'draftId',
1235
+ 'contractTermsId',
1236
+ 'jsonPatchInstructions',
1237
+ ];
1238
+ var _validParams = [
1239
+ 'dataProductId',
1240
+ 'draftId',
1241
+ 'contractTermsId',
1242
+ 'jsonPatchInstructions',
1243
+ 'headers',
1244
+ ];
1245
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1246
+ if (_validationErrors) {
1247
+ return Promise.reject(_validationErrors);
1248
+ }
1249
+ var body = _params.jsonPatchInstructions;
1250
+ var path = {
1251
+ 'data_product_id': _params.dataProductId,
1252
+ 'draft_id': _params.draftId,
1253
+ 'contract_terms_id': _params.contractTermsId,
1254
+ };
1255
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'updateDataProductDraftContractTerms');
923
1256
  var parameters = {
924
1257
  options: {
925
- url: URL_UPDATE_DRAFT_CONTRACT_TERMS_DOCUMENT,
926
- method: HTTP_PATCH,
1258
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/contract_terms/{contract_terms_id}',
1259
+ method: 'PATCH',
927
1260
  body: body,
928
1261
  path: path,
929
1262
  },
930
1263
  defaultOptions: extend(true, {}, this.baseOptions, {
931
1264
  headers: extend(true, sdkHeaders, {
932
- 'Accept': CONTENT_TYPE_JSON,
933
- 'Content-Type': CONTENT_TYPE_PATCH_JSON,
1265
+ 'Accept': 'application/json',
1266
+ 'Content-Type': 'application/json-patch+json',
934
1267
  }, _params.headers),
935
1268
  }),
936
1269
  };
@@ -939,11 +1272,14 @@ var DphV1 = /** @class */ (function (_super) {
939
1272
  /**
940
1273
  * Publish a draft of an existing data product.
941
1274
  *
1275
+ * Publish a draft of an existing data product. Use '-' for the `data_product_id` to skip specifying the data product
1276
+ * ID explicitly.
1277
+ *
942
1278
  * @param {Object} params - The parameters to send to the service.
943
1279
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
944
1280
  * @param {string} params.draftId - Data product draft id.
945
1281
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
946
- * @returns {Promise<DphV1.Response<DphV1.DataProductVersion>>}
1282
+ * @returns {Promise<DphV1.Response<DphV1.DataProductRelease>>}
947
1283
  */
948
1284
  DphV1.prototype.publishDataProductDraft = function (params) {
949
1285
  var _params = __assign({}, params);
@@ -957,16 +1293,16 @@ var DphV1 = /** @class */ (function (_super) {
957
1293
  'data_product_id': _params.dataProductId,
958
1294
  'draft_id': _params.draftId,
959
1295
  };
960
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, PUBLISH_DATA_PRODUCT_DRAFT);
1296
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'publishDataProductDraft');
961
1297
  var parameters = {
962
1298
  options: {
963
- url: URL_PUBLISH_DATA_PRODUCT_DRAFT,
964
- method: HTTP_POST,
1299
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/drafts/{draft_id}/publish',
1300
+ method: 'POST',
965
1301
  path: path,
966
1302
  },
967
1303
  defaultOptions: extend(true, {}, this.baseOptions, {
968
1304
  headers: extend(true, sdkHeaders, {
969
- 'Accept': CONTENT_TYPE_JSON,
1305
+ 'Accept': 'application/json',
970
1306
  }, _params.headers),
971
1307
  }),
972
1308
  };
@@ -978,13 +1314,16 @@ var DphV1 = /** @class */ (function (_super) {
978
1314
  /**
979
1315
  * Get a release of an existing data product.
980
1316
  *
1317
+ * Get a release of an existing data product. Use '-' for the `data_product_id` to skip specifying the data product ID
1318
+ * explicitly.
1319
+ *
981
1320
  * @param {Object} params - The parameters to send to the service.
982
1321
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
983
1322
  * @param {string} params.releaseId - Data product release id.
984
1323
  * @param {boolean} [params.checkCallerApproval] - If the value is true, then it will be verfied whether the caller is
985
1324
  * present in the data access request pre-approved user list.
986
1325
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
987
- * @returns {Promise<DphV1.Response<DphV1.DataProductVersion>>}
1326
+ * @returns {Promise<DphV1.Response<DphV1.DataProductRelease>>}
988
1327
  */
989
1328
  DphV1.prototype.getDataProductRelease = function (params) {
990
1329
  var _params = __assign({}, params);
@@ -1001,17 +1340,17 @@ var DphV1 = /** @class */ (function (_super) {
1001
1340
  'data_product_id': _params.dataProductId,
1002
1341
  'release_id': _params.releaseId,
1003
1342
  };
1004
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, GET_DATA_PRODUCT_RELEASE);
1343
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getDataProductRelease');
1005
1344
  var parameters = {
1006
1345
  options: {
1007
- url: URL_GET_DATA_PRODUCT_RELEASE,
1008
- method: HTTP_GET,
1346
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}',
1347
+ method: 'GET',
1009
1348
  qs: query,
1010
1349
  path: path,
1011
1350
  },
1012
1351
  defaultOptions: extend(true, {}, this.baseOptions, {
1013
1352
  headers: extend(true, sdkHeaders, {
1014
- 'Accept': CONTENT_TYPE_JSON,
1353
+ 'Accept': 'application/json',
1015
1354
  }, _params.headers),
1016
1355
  }),
1017
1356
  };
@@ -1020,10 +1359,11 @@ var DphV1 = /** @class */ (function (_super) {
1020
1359
  /**
1021
1360
  * Update the data product release identified by ID.
1022
1361
  *
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/>.
1362
+ * Use this API to update the properties of a data product release identified by a valid ID. Use '-' for the
1363
+ * `data_product_id` to skip specifying the data product ID explicitly.<br/><br/>Specify patch operations using
1364
+ * http://jsonpatch.com/ syntax.<br/><br/>Supported patch operations include:<br/><br/>- Update the properties of a
1365
+ * data product<br/><br/>- Add/remove parts from a data product (up to 20 parts)<br/><br/>- Add/remove use cases from
1366
+ * a data product<br/><br/>.
1027
1367
  *
1028
1368
  * @param {Object} params - The parameters to send to the service.
1029
1369
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
@@ -1031,7 +1371,7 @@ var DphV1 = /** @class */ (function (_super) {
1031
1371
  * @param {JsonPatchOperation[]} params.jsonPatchInstructions - A set of patch operations as defined in RFC 6902. See
1032
1372
  * http://jsonpatch.com/ for more information.
1033
1373
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1034
- * @returns {Promise<DphV1.Response<DphV1.DataProductVersion>>}
1374
+ * @returns {Promise<DphV1.Response<DphV1.DataProductRelease>>}
1035
1375
  */
1036
1376
  DphV1.prototype.updateDataProductRelease = function (params) {
1037
1377
  var _params = __assign({}, params);
@@ -1046,18 +1386,18 @@ var DphV1 = /** @class */ (function (_super) {
1046
1386
  'data_product_id': _params.dataProductId,
1047
1387
  'release_id': _params.releaseId,
1048
1388
  };
1049
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, UPDATE_DATA_PRODUCT_RELEASE);
1389
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'updateDataProductRelease');
1050
1390
  var parameters = {
1051
1391
  options: {
1052
- url: URL_UPDATE_DATA_PRODUCT_RELEASE,
1053
- method: HTTP_PATCH,
1392
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}',
1393
+ method: 'PATCH',
1054
1394
  body: body,
1055
1395
  path: path,
1056
1396
  },
1057
1397
  defaultOptions: extend(true, {}, this.baseOptions, {
1058
1398
  headers: extend(true, sdkHeaders, {
1059
- 'Accept': CONTENT_TYPE_JSON,
1060
- 'Content-Type': CONTENT_TYPE_PATCH_JSON,
1399
+ 'Accept': 'application/json',
1400
+ 'Content-Type': 'application/json-patch+json',
1061
1401
  }, _params.headers),
1062
1402
  }),
1063
1403
  };
@@ -1069,7 +1409,8 @@ var DphV1 = /** @class */ (function (_super) {
1069
1409
  * If the document has a completed attachment, the response contains the `url` to download the attachment.<br/><br/>
1070
1410
  * If the document does not have an attachment, the response contains the `url` which was submitted at document
1071
1411
  * 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.
1412
+ * the document file to complete the attachment. Use '-' for the `data_product_id` to skip specifying the data product
1413
+ * ID explicitly.
1073
1414
  *
1074
1415
  * @param {Object} params - The parameters to send to the service.
1075
1416
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
@@ -1093,16 +1434,16 @@ var DphV1 = /** @class */ (function (_super) {
1093
1434
  'contract_terms_id': _params.contractTermsId,
1094
1435
  'document_id': _params.documentId,
1095
1436
  };
1096
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, GET_RELEASE_CONTRACT_TERMS_DOCUMENT);
1437
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getReleaseContractTermsDocument');
1097
1438
  var parameters = {
1098
1439
  options: {
1099
- url: URL_GET_RELEASE_CONTRACT_TERMS_DOCUMENT,
1100
- method: HTTP_GET,
1440
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}/contract_terms/{contract_terms_id}/documents/{document_id}',
1441
+ method: 'GET',
1101
1442
  path: path,
1102
1443
  },
1103
1444
  defaultOptions: extend(true, {}, this.baseOptions, {
1104
1445
  headers: extend(true, sdkHeaders, {
1105
- 'Accept': CONTENT_TYPE_JSON,
1446
+ 'Accept': 'application/json',
1106
1447
  }, _params.headers),
1107
1448
  }),
1108
1449
  };
@@ -1111,6 +1452,9 @@ var DphV1 = /** @class */ (function (_super) {
1111
1452
  /**
1112
1453
  * Retrieve a list of data product releases.
1113
1454
  *
1455
+ * Retrieve a list of data product releases. Use '-' for the `data_product_id` to skip specifying the data product ID
1456
+ * explicitly.
1457
+ *
1114
1458
  * @param {Object} params - The parameters to send to the service.
1115
1459
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1116
1460
  * @param {string} [params.assetContainerId] - Filter the list of data product releases by container id.
@@ -1148,17 +1492,17 @@ var DphV1 = /** @class */ (function (_super) {
1148
1492
  var path = {
1149
1493
  'data_product_id': _params.dataProductId,
1150
1494
  };
1151
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, LIST_DATA_PRODUCT_RELEASES);
1495
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'listDataProductReleases');
1152
1496
  var parameters = {
1153
1497
  options: {
1154
- url: URL_LIST_DATA_PRODUCT_RELEASES,
1155
- method: HTTP_GET,
1498
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/releases',
1499
+ method: 'GET',
1156
1500
  qs: query,
1157
1501
  path: path,
1158
1502
  },
1159
1503
  defaultOptions: extend(true, {}, this.baseOptions, {
1160
1504
  headers: extend(true, sdkHeaders, {
1161
- 'Accept': CONTENT_TYPE_JSON,
1505
+ 'Accept': 'application/json',
1162
1506
  }, _params.headers),
1163
1507
  }),
1164
1508
  };
@@ -1167,77 +1511,718 @@ var DphV1 = /** @class */ (function (_super) {
1167
1511
  /**
1168
1512
  * Retire a release of an existing data product.
1169
1513
  *
1514
+ * Retire a release of an existing data product. Use '-' for the `data_product_id` to skip specifying the data product
1515
+ * ID explicitly.
1516
+ *
1170
1517
  * @param {Object} params - The parameters to send to the service.
1171
1518
  * @param {string} params.dataProductId - Data product ID. Use '-' to skip specifying the data product ID explicitly.
1172
1519
  * @param {string} params.releaseId - Data product release id.
1520
+ * @param {boolean} [params.revokeAccess] - Revoke's Access from all the Subscriptions of the Data Product. No user's
1521
+ * can able to see the subscribed assets anymore.
1173
1522
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1174
- * @returns {Promise<DphV1.Response<DphV1.DataProductVersion>>}
1523
+ * @returns {Promise<DphV1.Response<DphV1.DataProductRelease>>}
1175
1524
  */
1176
1525
  DphV1.prototype.retireDataProductRelease = function (params) {
1177
1526
  var _params = __assign({}, params);
1178
1527
  var _requiredParams = ['dataProductId', 'releaseId'];
1179
- var _validParams = ['dataProductId', 'releaseId', 'headers'];
1528
+ var _validParams = ['dataProductId', 'releaseId', 'revokeAccess', 'headers'];
1180
1529
  var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1181
1530
  if (_validationErrors) {
1182
1531
  return Promise.reject(_validationErrors);
1183
1532
  }
1533
+ var query = {
1534
+ 'revoke_access': _params.revokeAccess,
1535
+ };
1184
1536
  var path = {
1185
1537
  'data_product_id': _params.dataProductId,
1186
1538
  'release_id': _params.releaseId,
1187
1539
  };
1188
- var sdkHeaders = (0, common_1.getSdkHeaders)(SERVICE_NAME, SERVICE_VERSION, LIST_DATA_PRODUCT_RELEASES);
1540
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'retireDataProductRelease');
1189
1541
  var parameters = {
1190
1542
  options: {
1191
- url: URL_RETIRE_DATA_PRODUCT_RELEASE,
1192
- method: HTTP_POST,
1543
+ url: '/data_product_exchange/v1/data_products/{data_product_id}/releases/{release_id}/retire',
1544
+ method: 'POST',
1545
+ qs: query,
1193
1546
  path: path,
1194
1547
  },
1195
1548
  defaultOptions: extend(true, {}, this.baseOptions, {
1196
1549
  headers: extend(true, sdkHeaders, {
1197
- 'Accept': CONTENT_TYPE_JSON,
1550
+ 'Accept': 'application/json',
1551
+ 'Content-Type': 'application/json',
1198
1552
  }, _params.headers),
1199
1553
  }),
1200
1554
  };
1201
1555
  return this.createRequest(parameters);
1202
1556
  };
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. */
1230
- var State;
1231
- (function (State) {
1232
- State["DRAFT"] = "draft";
1233
- State["AVAILABLE"] = "available";
1234
- State["RETIRED"] = "retired";
1235
- })(State = CreateDataProductDraftConstants.State || (CreateDataProductDraftConstants.State = {}));
1236
- /** Types */
1237
- var Types;
1238
- (function (Types) {
1239
- Types["DATA"] = "data";
1240
- Types["CODE"] = "code";
1557
+ /*************************
1558
+ * dataProductContractTemplates
1559
+ ************************/
1560
+ /**
1561
+ * Retrieve a list of data product contract templates.
1562
+ *
1563
+ * Retrieve a list of data product contract templates.
1564
+ *
1565
+ * @param {Object} [params] - The parameters to send to the service.
1566
+ * @param {string} [params.containerId] - Container ID of the data product catalog. If not supplied, the data product
1567
+ * catalog is looked up by using the uid of the default data product catalog.
1568
+ * @param {string} [params.contractTemplateName] - Name of the data product contract template. If not supplied, the
1569
+ * data product templates within the catalog will returned.
1570
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1571
+ * @returns {Promise<DphV1.Response<DphV1.DataProductContractTemplateCollection>>}
1572
+ */
1573
+ DphV1.prototype.listDataProductContractTemplate = function (params) {
1574
+ var _params = __assign({}, params);
1575
+ var _requiredParams = [];
1576
+ var _validParams = ['containerId', 'contractTemplateName', 'headers'];
1577
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1578
+ if (_validationErrors) {
1579
+ return Promise.reject(_validationErrors);
1580
+ }
1581
+ var query = {
1582
+ 'container.id': _params.containerId,
1583
+ 'contract_template.name': _params.contractTemplateName,
1584
+ };
1585
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'listDataProductContractTemplate');
1586
+ var parameters = {
1587
+ options: {
1588
+ url: '/data_product_exchange/v1/contract_templates',
1589
+ method: 'GET',
1590
+ qs: query,
1591
+ },
1592
+ defaultOptions: extend(true, {}, this.baseOptions, {
1593
+ headers: extend(true, sdkHeaders, {
1594
+ 'Accept': 'application/json',
1595
+ }, _params.headers),
1596
+ }),
1597
+ };
1598
+ return this.createRequest(parameters);
1599
+ };
1600
+ /**
1601
+ * Create new data product contract template.
1602
+ *
1603
+ * Create new data product contract template.
1604
+ *
1605
+ * @param {Object} params - The parameters to send to the service.
1606
+ * @param {ContainerReference} params.container - Container reference.
1607
+ * @param {string} [params.id] - The identifier of the data product contract template.
1608
+ * @param {string} [params.name] - The name of the contract template.
1609
+ * @param {ErrorMessage} [params.error] - Contains the code and details.
1610
+ * @param {ContractTerms} [params.contractTerms] - Defines the complete structure of a contract terms.
1611
+ * @param {string} [params.containerId] - Container ID of the data product catalog. If not supplied, the data product
1612
+ * catalog is looked up by using the uid of the default data product catalog.
1613
+ * @param {string} [params.contractTemplateName] - Name of the data product contract template. If not supplied, the
1614
+ * data product templates within the catalog will returned.
1615
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1616
+ * @returns {Promise<DphV1.Response<DphV1.DataProductContractTemplate>>}
1617
+ */
1618
+ DphV1.prototype.createContractTemplate = function (params) {
1619
+ var _params = __assign({}, params);
1620
+ var _requiredParams = ['container'];
1621
+ var _validParams = [
1622
+ 'container',
1623
+ 'id',
1624
+ 'name',
1625
+ 'error',
1626
+ 'contractTerms',
1627
+ 'containerId',
1628
+ 'contractTemplateName',
1629
+ 'headers',
1630
+ ];
1631
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1632
+ if (_validationErrors) {
1633
+ return Promise.reject(_validationErrors);
1634
+ }
1635
+ var body = {
1636
+ 'container': _params.container,
1637
+ 'id': _params.id,
1638
+ 'name': _params.name,
1639
+ 'error': _params.error,
1640
+ 'contract_terms': _params.contractTerms,
1641
+ };
1642
+ var query = {
1643
+ 'container.id': _params.containerId,
1644
+ 'contract_template.name': _params.contractTemplateName,
1645
+ };
1646
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createContractTemplate');
1647
+ var parameters = {
1648
+ options: {
1649
+ url: '/data_product_exchange/v1/contract_templates',
1650
+ method: 'POST',
1651
+ body: body,
1652
+ qs: query,
1653
+ },
1654
+ defaultOptions: extend(true, {}, this.baseOptions, {
1655
+ headers: extend(true, sdkHeaders, {
1656
+ 'Accept': 'application/json',
1657
+ 'Content-Type': 'application/json',
1658
+ }, _params.headers),
1659
+ }),
1660
+ };
1661
+ return this.createRequest(parameters);
1662
+ };
1663
+ /**
1664
+ * Retrieve a data product contract template identified by id.
1665
+ *
1666
+ * Retrieve a data product contract template identified by id.
1667
+ *
1668
+ * @param {Object} params - The parameters to send to the service.
1669
+ * @param {string} params.contractTemplateId - Data Product Contract Template id.
1670
+ * @param {string} params.containerId - Container ID of the data product catalog.
1671
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1672
+ * @returns {Promise<DphV1.Response<DphV1.DataProductContractTemplate>>}
1673
+ */
1674
+ DphV1.prototype.getContractTemplate = function (params) {
1675
+ var _params = __assign({}, params);
1676
+ var _requiredParams = ['contractTemplateId', 'containerId'];
1677
+ var _validParams = ['contractTemplateId', 'containerId', 'headers'];
1678
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1679
+ if (_validationErrors) {
1680
+ return Promise.reject(_validationErrors);
1681
+ }
1682
+ var query = {
1683
+ 'container.id': _params.containerId,
1684
+ };
1685
+ var path = {
1686
+ 'contract_template_id': _params.contractTemplateId,
1687
+ };
1688
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getContractTemplate');
1689
+ var parameters = {
1690
+ options: {
1691
+ url: '/data_product_exchange/v1/contract_templates/{contract_template_id}',
1692
+ method: 'GET',
1693
+ qs: query,
1694
+ path: path,
1695
+ },
1696
+ defaultOptions: extend(true, {}, this.baseOptions, {
1697
+ headers: extend(true, sdkHeaders, {
1698
+ 'Accept': 'application/json',
1699
+ }, _params.headers),
1700
+ }),
1701
+ };
1702
+ return this.createRequest(parameters);
1703
+ };
1704
+ /**
1705
+ * Delete a data product contract template identified by id.
1706
+ *
1707
+ * Delete a data product contract template identified by id.
1708
+ *
1709
+ * @param {Object} params - The parameters to send to the service.
1710
+ * @param {string} params.contractTemplateId - Data Product Contract Template id.
1711
+ * @param {string} params.containerId - Container ID of the data product catalog.
1712
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1713
+ * @returns {Promise<DphV1.Response<DphV1.EmptyObject>>}
1714
+ */
1715
+ DphV1.prototype.deleteDataProductContractTemplate = function (params) {
1716
+ var _params = __assign({}, params);
1717
+ var _requiredParams = ['contractTemplateId', 'containerId'];
1718
+ var _validParams = ['contractTemplateId', 'containerId', 'headers'];
1719
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1720
+ if (_validationErrors) {
1721
+ return Promise.reject(_validationErrors);
1722
+ }
1723
+ var query = {
1724
+ 'container.id': _params.containerId,
1725
+ };
1726
+ var path = {
1727
+ 'contract_template_id': _params.contractTemplateId,
1728
+ };
1729
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteDataProductContractTemplate');
1730
+ var parameters = {
1731
+ options: {
1732
+ url: '/data_product_exchange/v1/contract_templates/{contract_template_id}',
1733
+ method: 'DELETE',
1734
+ qs: query,
1735
+ path: path,
1736
+ },
1737
+ defaultOptions: extend(true, {}, this.baseOptions, {
1738
+ headers: extend(true, sdkHeaders, {}, _params.headers),
1739
+ }),
1740
+ };
1741
+ return this.createRequest(parameters);
1742
+ };
1743
+ /**
1744
+ * Update the data product contract template identified by ID.
1745
+ *
1746
+ * Use this API to update the properties of a data product contract template identified by a valid
1747
+ * ID.<br/><br/>Specify patch operations using http://jsonpatch.com/ syntax.<br/><br/>Supported patch operations
1748
+ * include:<br/><br/>- Update the name of a data product contract template<br/><br/>- Update the contract terms of
1749
+ * data product contract template<br/><br/>.
1750
+ *
1751
+ * @param {Object} params - The parameters to send to the service.
1752
+ * @param {string} params.contractTemplateId - Data Product Contract Template id.
1753
+ * @param {string} params.containerId - Container ID of the data product catalog.
1754
+ * @param {JsonPatchOperation[]} params.jsonPatchInstructions - A set of patch operations as defined in RFC 6902. See
1755
+ * http://jsonpatch.com/ for more information.
1756
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1757
+ * @returns {Promise<DphV1.Response<DphV1.DataProductContractTemplate>>}
1758
+ */
1759
+ DphV1.prototype.updateDataProductContractTemplate = function (params) {
1760
+ var _params = __assign({}, params);
1761
+ var _requiredParams = ['contractTemplateId', 'containerId', 'jsonPatchInstructions'];
1762
+ var _validParams = ['contractTemplateId', 'containerId', 'jsonPatchInstructions', 'headers'];
1763
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1764
+ if (_validationErrors) {
1765
+ return Promise.reject(_validationErrors);
1766
+ }
1767
+ var body = _params.jsonPatchInstructions;
1768
+ var query = {
1769
+ 'container.id': _params.containerId,
1770
+ };
1771
+ var path = {
1772
+ 'contract_template_id': _params.contractTemplateId,
1773
+ };
1774
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'updateDataProductContractTemplate');
1775
+ var parameters = {
1776
+ options: {
1777
+ url: '/data_product_exchange/v1/contract_templates/{contract_template_id}',
1778
+ method: 'PATCH',
1779
+ body: body,
1780
+ qs: query,
1781
+ path: path,
1782
+ },
1783
+ defaultOptions: extend(true, {}, this.baseOptions, {
1784
+ headers: extend(true, sdkHeaders, {
1785
+ 'Accept': 'application/json',
1786
+ 'Content-Type': 'application/json-patch+json',
1787
+ }, _params.headers),
1788
+ }),
1789
+ };
1790
+ return this.createRequest(parameters);
1791
+ };
1792
+ /*************************
1793
+ * dataProductDomains
1794
+ ************************/
1795
+ /**
1796
+ * Retrieve a list of data product domains.
1797
+ *
1798
+ * Retrieve a list of data product domains.
1799
+ *
1800
+ * @param {Object} [params] - The parameters to send to the service.
1801
+ * @param {string} [params.containerId] - Container ID of the data product catalog. If not supplied, the data product
1802
+ * catalog is looked up by using the uid of the default data product catalog.
1803
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1804
+ * @returns {Promise<DphV1.Response<DphV1.DataProductDomainCollection>>}
1805
+ */
1806
+ DphV1.prototype.listDataProductDomains = function (params) {
1807
+ var _params = __assign({}, params);
1808
+ var _requiredParams = [];
1809
+ var _validParams = ['containerId', 'headers'];
1810
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1811
+ if (_validationErrors) {
1812
+ return Promise.reject(_validationErrors);
1813
+ }
1814
+ var query = {
1815
+ 'container.id': _params.containerId,
1816
+ };
1817
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'listDataProductDomains');
1818
+ var parameters = {
1819
+ options: {
1820
+ url: '/data_product_exchange/v1/domains',
1821
+ method: 'GET',
1822
+ qs: query,
1823
+ },
1824
+ defaultOptions: extend(true, {}, this.baseOptions, {
1825
+ headers: extend(true, sdkHeaders, {
1826
+ 'Accept': 'application/json',
1827
+ }, _params.headers),
1828
+ }),
1829
+ };
1830
+ return this.createRequest(parameters);
1831
+ };
1832
+ /**
1833
+ * Create new data product domain.
1834
+ *
1835
+ * Create new data product domain.
1836
+ *
1837
+ * @param {Object} params - The parameters to send to the service.
1838
+ * @param {ContainerReference} params.container - Container reference.
1839
+ * @param {string} [params.trace] - The id to trace the failed domain creations.
1840
+ * @param {ErrorModelResource[]} [params.errors] - Set of errors on the sub domain creation.
1841
+ * @param {string} [params.name] - The name of the data product domain.
1842
+ * @param {string} [params.description] - The description of the data product domain.
1843
+ * @param {string} [params.id] - The identifier of the data product domain.
1844
+ * @param {MemberRolesSchema} [params.memberRoles] - Member roles of a corresponding asset.
1845
+ * @param {PropertiesSchema} [params.properties] - Properties of the corresponding asset.
1846
+ * @param {InitializeSubDomain[]} [params.subDomains] - List of sub domains to be added within a domain.
1847
+ * @param {string} [params.containerId] - Container ID of the data product catalog. If not supplied, the data product
1848
+ * catalog is looked up by using the uid of the default data product catalog.
1849
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1850
+ * @returns {Promise<DphV1.Response<DphV1.DataProductDomain>>}
1851
+ */
1852
+ DphV1.prototype.createDataProductDomain = function (params) {
1853
+ var _params = __assign({}, params);
1854
+ var _requiredParams = ['container'];
1855
+ var _validParams = [
1856
+ 'container',
1857
+ 'trace',
1858
+ 'errors',
1859
+ 'name',
1860
+ 'description',
1861
+ 'id',
1862
+ 'memberRoles',
1863
+ 'properties',
1864
+ 'subDomains',
1865
+ 'containerId',
1866
+ 'headers',
1867
+ ];
1868
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1869
+ if (_validationErrors) {
1870
+ return Promise.reject(_validationErrors);
1871
+ }
1872
+ var body = {
1873
+ 'container': _params.container,
1874
+ 'trace': _params.trace,
1875
+ 'errors': _params.errors,
1876
+ 'name': _params.name,
1877
+ 'description': _params.description,
1878
+ 'id': _params.id,
1879
+ 'member_roles': _params.memberRoles,
1880
+ 'properties': _params.properties,
1881
+ 'sub_domains': _params.subDomains,
1882
+ };
1883
+ var query = {
1884
+ 'container.id': _params.containerId,
1885
+ };
1886
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createDataProductDomain');
1887
+ var parameters = {
1888
+ options: {
1889
+ url: '/data_product_exchange/v1/domains',
1890
+ method: 'POST',
1891
+ body: body,
1892
+ qs: query,
1893
+ },
1894
+ defaultOptions: extend(true, {}, this.baseOptions, {
1895
+ headers: extend(true, sdkHeaders, {
1896
+ 'Accept': 'application/json',
1897
+ 'Content-Type': 'application/json',
1898
+ }, _params.headers),
1899
+ }),
1900
+ };
1901
+ return this.createRequest(parameters);
1902
+ };
1903
+ /**
1904
+ * Create data product subdomains for a specific domain identified by id.
1905
+ *
1906
+ * Create data product subdomains for a specific domain identified by id.
1907
+ *
1908
+ * @param {Object} params - The parameters to send to the service.
1909
+ * @param {string} params.domainId - Domain id.
1910
+ * @param {string} params.containerId - Container ID of the data product catalog.
1911
+ * @param {string} [params.name] - The name of the data product subdomain.
1912
+ * @param {string} [params.id] - The identifier of the data product subdomain.
1913
+ * @param {string} [params.description] - The description of the data product subdomain.
1914
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1915
+ * @returns {Promise<DphV1.Response<DphV1.InitializeSubDomain>>}
1916
+ */
1917
+ DphV1.prototype.createDataProductSubdomain = function (params) {
1918
+ var _params = __assign({}, params);
1919
+ var _requiredParams = ['domainId', 'containerId'];
1920
+ var _validParams = ['domainId', 'containerId', 'name', 'id', 'description', 'headers'];
1921
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1922
+ if (_validationErrors) {
1923
+ return Promise.reject(_validationErrors);
1924
+ }
1925
+ var body = {
1926
+ 'name': _params.name,
1927
+ 'id': _params.id,
1928
+ 'description': _params.description,
1929
+ };
1930
+ var query = {
1931
+ 'container.id': _params.containerId,
1932
+ };
1933
+ var path = {
1934
+ 'domain_id': _params.domainId,
1935
+ };
1936
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createDataProductSubdomain');
1937
+ var parameters = {
1938
+ options: {
1939
+ url: '/data_product_exchange/v1/domains/{domain_id}/subdomains',
1940
+ method: 'POST',
1941
+ body: body,
1942
+ qs: query,
1943
+ path: path,
1944
+ },
1945
+ defaultOptions: extend(true, {}, this.baseOptions, {
1946
+ headers: extend(true, sdkHeaders, {
1947
+ 'Accept': 'application/json',
1948
+ 'Content-Type': 'application/json',
1949
+ }, _params.headers),
1950
+ }),
1951
+ };
1952
+ return this.createRequest(parameters);
1953
+ };
1954
+ /**
1955
+ * Retrieve a data product domain or subdomain identified by id.
1956
+ *
1957
+ * Retrieve a data product domain or subdomain identified by id.
1958
+ *
1959
+ * @param {Object} params - The parameters to send to the service.
1960
+ * @param {string} params.domainId - Domain id.
1961
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1962
+ * @returns {Promise<DphV1.Response<DphV1.DataProductDomain>>}
1963
+ */
1964
+ DphV1.prototype.getDomain = function (params) {
1965
+ var _params = __assign({}, params);
1966
+ var _requiredParams = ['domainId'];
1967
+ var _validParams = ['domainId', 'headers'];
1968
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1969
+ if (_validationErrors) {
1970
+ return Promise.reject(_validationErrors);
1971
+ }
1972
+ var path = {
1973
+ 'domain_id': _params.domainId,
1974
+ };
1975
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getDomain');
1976
+ var parameters = {
1977
+ options: {
1978
+ url: '/data_product_exchange/v1/domains/{domain_id}',
1979
+ method: 'GET',
1980
+ path: path,
1981
+ },
1982
+ defaultOptions: extend(true, {}, this.baseOptions, {
1983
+ headers: extend(true, sdkHeaders, {
1984
+ 'Accept': 'application/json',
1985
+ }, _params.headers),
1986
+ }),
1987
+ };
1988
+ return this.createRequest(parameters);
1989
+ };
1990
+ /**
1991
+ * Delete a data product domain identified by id.
1992
+ *
1993
+ * Delete a data product domain identified by id.
1994
+ *
1995
+ * @param {Object} params - The parameters to send to the service.
1996
+ * @param {string} params.domainId - Domain id.
1997
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1998
+ * @returns {Promise<DphV1.Response<DphV1.EmptyObject>>}
1999
+ */
2000
+ DphV1.prototype.deleteDomain = function (params) {
2001
+ var _params = __assign({}, params);
2002
+ var _requiredParams = ['domainId'];
2003
+ var _validParams = ['domainId', '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 path = {
2009
+ 'domain_id': _params.domainId,
2010
+ };
2011
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteDomain');
2012
+ var parameters = {
2013
+ options: {
2014
+ url: '/data_product_exchange/v1/domains/{domain_id}',
2015
+ method: 'DELETE',
2016
+ path: path,
2017
+ },
2018
+ defaultOptions: extend(true, {}, this.baseOptions, {
2019
+ headers: extend(true, sdkHeaders, {}, _params.headers),
2020
+ }),
2021
+ };
2022
+ return this.createRequest(parameters);
2023
+ };
2024
+ /**
2025
+ * Update the data product domain identified by ID.
2026
+ *
2027
+ * Use this API to update the properties of a data product domain identified by a valid ID.<br/><br/>Specify patch
2028
+ * operations using http://jsonpatch.com/ syntax.<br/><br/>Supported patch operations include:<br/><br/>- Update the
2029
+ * name of a data product domain<br/><br/>- Update the description of a data product domain<br/><br/>- Update the rov
2030
+ * of a data product domain<br/><br/>.
2031
+ *
2032
+ * @param {Object} params - The parameters to send to the service.
2033
+ * @param {string} params.domainId - Domain id.
2034
+ * @param {string} params.containerId - Container ID of the data product catalog.
2035
+ * @param {JsonPatchOperation[]} params.jsonPatchInstructions - A set of patch operations as defined in RFC 6902. See
2036
+ * http://jsonpatch.com/ for more information.
2037
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2038
+ * @returns {Promise<DphV1.Response<DphV1.DataProductDomain>>}
2039
+ */
2040
+ DphV1.prototype.updateDataProductDomain = function (params) {
2041
+ var _params = __assign({}, params);
2042
+ var _requiredParams = ['domainId', 'containerId', 'jsonPatchInstructions'];
2043
+ var _validParams = ['domainId', 'containerId', 'jsonPatchInstructions', 'headers'];
2044
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2045
+ if (_validationErrors) {
2046
+ return Promise.reject(_validationErrors);
2047
+ }
2048
+ var body = _params.jsonPatchInstructions;
2049
+ var query = {
2050
+ 'container.id': _params.containerId,
2051
+ };
2052
+ var path = {
2053
+ 'domain_id': _params.domainId,
2054
+ };
2055
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'updateDataProductDomain');
2056
+ var parameters = {
2057
+ options: {
2058
+ url: '/data_product_exchange/v1/domains/{domain_id}',
2059
+ method: 'PATCH',
2060
+ body: body,
2061
+ qs: query,
2062
+ path: path,
2063
+ },
2064
+ defaultOptions: extend(true, {}, this.baseOptions, {
2065
+ headers: extend(true, sdkHeaders, {
2066
+ 'Accept': 'application/json',
2067
+ 'Content-Type': 'application/json-patch+json',
2068
+ }, _params.headers),
2069
+ }),
2070
+ };
2071
+ return this.createRequest(parameters);
2072
+ };
2073
+ /**
2074
+ * Retrieve all data products in a domain specified by id or any of it's subdomains.
2075
+ *
2076
+ * Retrieve all the data products tagged to the domain identified by id or any of it's subdomains.
2077
+ *
2078
+ * @param {Object} params - The parameters to send to the service.
2079
+ * @param {string} params.domainId - Domain id.
2080
+ * @param {string} params.containerId - Container ID of the data product catalog.
2081
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2082
+ * @returns {Promise<DphV1.Response<DphV1.DataProductVersionCollection>>}
2083
+ */
2084
+ DphV1.prototype.getDataProductByDomain = function (params) {
2085
+ var _params = __assign({}, params);
2086
+ var _requiredParams = ['domainId', 'containerId'];
2087
+ var _validParams = ['domainId', 'containerId', 'headers'];
2088
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2089
+ if (_validationErrors) {
2090
+ return Promise.reject(_validationErrors);
2091
+ }
2092
+ var query = {
2093
+ 'container.id': _params.containerId,
2094
+ };
2095
+ var path = {
2096
+ 'domain_id': _params.domainId,
2097
+ };
2098
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getDataProductByDomain');
2099
+ var parameters = {
2100
+ options: {
2101
+ url: '/data_product_exchange/v1/domains/{domain_id}/data_products',
2102
+ method: 'GET',
2103
+ qs: query,
2104
+ path: path,
2105
+ },
2106
+ defaultOptions: extend(true, {}, this.baseOptions, {
2107
+ headers: extend(true, sdkHeaders, {
2108
+ 'Accept': 'application/json',
2109
+ }, _params.headers),
2110
+ }),
2111
+ };
2112
+ return this.createRequest(parameters);
2113
+ };
2114
+ /*************************
2115
+ * bucketServices
2116
+ ************************/
2117
+ /**
2118
+ * Create a new Bucket.
2119
+ *
2120
+ * Use this API to create a new S3 Bucket on an AWS Hosting.
2121
+ *
2122
+ * @param {Object} params - The parameters to send to the service.
2123
+ * @param {boolean} params.isShared - Flag to specify whether the bucket is dedicated or shared.
2124
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2125
+ * @returns {Promise<DphV1.Response<DphV1.BucketResponse>>}
2126
+ */
2127
+ DphV1.prototype.createS3Bucket = function (params) {
2128
+ var _params = __assign({}, params);
2129
+ var _requiredParams = ['isShared'];
2130
+ var _validParams = ['isShared', 'headers'];
2131
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2132
+ if (_validationErrors) {
2133
+ return Promise.reject(_validationErrors);
2134
+ }
2135
+ var query = {
2136
+ 'is_shared': _params.isShared,
2137
+ };
2138
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'createS3Bucket');
2139
+ var parameters = {
2140
+ options: {
2141
+ url: '/data_product_exchange/v1/bucket',
2142
+ method: 'POST',
2143
+ qs: query,
2144
+ },
2145
+ defaultOptions: extend(true, {}, this.baseOptions, {
2146
+ headers: extend(true, sdkHeaders, {
2147
+ 'Accept': 'application/json',
2148
+ }, _params.headers),
2149
+ }),
2150
+ };
2151
+ return this.createRequest(parameters);
2152
+ };
2153
+ /**
2154
+ * Validate the Bucket Existence.
2155
+ *
2156
+ * Use this API to validate the bucket existence on an AWS hosting.
2157
+ *
2158
+ * @param {Object} params - The parameters to send to the service.
2159
+ * @param {string} params.bucketName - Name of the bucket to validate.
2160
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2161
+ * @returns {Promise<DphV1.Response<DphV1.BucketValidationResponse>>}
2162
+ */
2163
+ DphV1.prototype.getS3BucketValidation = function (params) {
2164
+ var _params = __assign({}, params);
2165
+ var _requiredParams = ['bucketName'];
2166
+ var _validParams = ['bucketName', 'headers'];
2167
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
2168
+ if (_validationErrors) {
2169
+ return Promise.reject(_validationErrors);
2170
+ }
2171
+ var path = {
2172
+ 'bucket_name': _params.bucketName,
2173
+ };
2174
+ var sdkHeaders = (0, common_1.getSdkHeaders)(DphV1.DEFAULT_SERVICE_NAME, 'v1', 'getS3BucketValidation');
2175
+ var parameters = {
2176
+ options: {
2177
+ url: '/data_product_exchange/v1/bucket/validate/{bucket_name}',
2178
+ method: 'GET',
2179
+ path: path,
2180
+ },
2181
+ defaultOptions: extend(true, {}, this.baseOptions, {
2182
+ headers: extend(true, sdkHeaders, {
2183
+ 'Accept': 'application/json',
2184
+ }, _params.headers),
2185
+ }),
2186
+ };
2187
+ return this.createRequest(parameters);
2188
+ };
2189
+ DphV1.DEFAULT_SERVICE_NAME = 'dph';
2190
+ return DphV1;
2191
+ }(ibm_cloud_sdk_core_1.BaseService));
2192
+ /*************************
2193
+ * interfaces
2194
+ ************************/
2195
+ (function (DphV1) {
2196
+ /** Constants for the `initialize` operation. */
2197
+ var InitializeConstants;
2198
+ (function (InitializeConstants) {
2199
+ /** Include */
2200
+ var Include;
2201
+ (function (Include) {
2202
+ Include["DELIVERY_METHODS"] = "delivery_methods";
2203
+ Include["DOMAINS_MULTI_INDUSTRY"] = "domains_multi_industry";
2204
+ Include["DATA_PRODUCT_SAMPLES"] = "data_product_samples";
2205
+ Include["WORKFLOWS"] = "workflows";
2206
+ Include["PROJECT"] = "project";
2207
+ Include["CATALOG_CONFIGURATIONS"] = "catalog_configurations";
2208
+ Include["FUNCTIONAL_ADMIN_USER_GROUP"] = "functional_admin_user_group";
2209
+ })(Include = InitializeConstants.Include || (InitializeConstants.Include = {}));
2210
+ })(InitializeConstants = DphV1.InitializeConstants || (DphV1.InitializeConstants = {}));
2211
+ /** Constants for the `createDataProductDraft` operation. */
2212
+ var CreateDataProductDraftConstants;
2213
+ (function (CreateDataProductDraftConstants) {
2214
+ /** The state of the data product version. If not specified, the data product version will be created in `draft` state. */
2215
+ var State;
2216
+ (function (State) {
2217
+ State["DRAFT"] = "draft";
2218
+ State["AVAILABLE"] = "available";
2219
+ State["RETIRED"] = "retired";
2220
+ })(State = CreateDataProductDraftConstants.State || (CreateDataProductDraftConstants.State = {}));
2221
+ /** Types */
2222
+ var Types;
2223
+ (function (Types) {
2224
+ Types["DATA"] = "data";
2225
+ Types["CODE"] = "code";
1241
2226
  })(Types = CreateDataProductDraftConstants.Types || (CreateDataProductDraftConstants.Types = {}));
1242
2227
  })(CreateDataProductDraftConstants = DphV1.CreateDataProductDraftConstants || (DphV1.CreateDataProductDraftConstants = {}));
1243
2228
  /** Constants for the `createDraftContractTermsDocument` operation. */
@@ -1250,6 +2235,16 @@ var DphV1 = /** @class */ (function (_super) {
1250
2235
  Type["SLA"] = "sla";
1251
2236
  })(Type = CreateDraftContractTermsDocumentConstants.Type || (CreateDraftContractTermsDocumentConstants.Type = {}));
1252
2237
  })(CreateDraftContractTermsDocumentConstants = DphV1.CreateDraftContractTermsDocumentConstants || (DphV1.CreateDraftContractTermsDocumentConstants = {}));
2238
+ /** Constants for the `getDataProductDraftContractTerms` operation. */
2239
+ var GetDataProductDraftContractTermsConstants;
2240
+ (function (GetDataProductDraftContractTermsConstants) {
2241
+ /** The type of the response: application/odcs+yaml or application/json. */
2242
+ var Accept;
2243
+ (function (Accept) {
2244
+ Accept["APPLICATION_ODCS_YAML"] = "application/odcs+yaml";
2245
+ Accept["APPLICATION_JSON"] = "application/json";
2246
+ })(Accept = GetDataProductDraftContractTermsConstants.Accept || (GetDataProductDraftContractTermsConstants.Accept = {}));
2247
+ })(GetDataProductDraftContractTermsConstants = DphV1.GetDataProductDraftContractTermsConstants || (DphV1.GetDataProductDraftContractTermsConstants = {}));
1253
2248
  /** Constants for the `listDataProductReleases` operation. */
1254
2249
  var ListDataProductReleasesConstants;
1255
2250
  (function (ListDataProductReleasesConstants) {
@@ -1284,8 +2279,20 @@ var DphV1 = /** @class */ (function (_super) {
1284
2279
  })(Type = Constants.Type || (Constants.Type = {}));
1285
2280
  })(Constants = ContractTermsDocument.Constants || (ContractTermsDocument.Constants = {}));
1286
2281
  })(ContractTermsDocument = DphV1.ContractTermsDocument || (DphV1.ContractTermsDocument = {}));
1287
- var DataProductVersion;
1288
- (function (DataProductVersion) {
2282
+ var ContractTest;
2283
+ (function (ContractTest) {
2284
+ var Constants;
2285
+ (function (Constants) {
2286
+ /** Status of the contract test (pass or fail). */
2287
+ var Status;
2288
+ (function (Status) {
2289
+ Status["PASS"] = "pass";
2290
+ Status["FAIL"] = "fail";
2291
+ })(Status = Constants.Status || (Constants.Status = {}));
2292
+ })(Constants = ContractTest.Constants || (ContractTest.Constants = {}));
2293
+ })(ContractTest = DphV1.ContractTest || (DphV1.ContractTest = {}));
2294
+ var DataProductDraft;
2295
+ (function (DataProductDraft) {
1289
2296
  var Constants;
1290
2297
  (function (Constants) {
1291
2298
  /** The state of the data product version. */
@@ -1301,10 +2308,10 @@ var DphV1 = /** @class */ (function (_super) {
1301
2308
  Types["DATA"] = "data";
1302
2309
  Types["CODE"] = "code";
1303
2310
  })(Types = Constants.Types || (Constants.Types = {}));
1304
- })(Constants = DataProductVersion.Constants || (DataProductVersion.Constants = {}));
1305
- })(DataProductVersion = DphV1.DataProductVersion || (DphV1.DataProductVersion = {}));
1306
- var DataProductVersionPrototype;
1307
- (function (DataProductVersionPrototype) {
2311
+ })(Constants = DataProductDraft.Constants || (DataProductDraft.Constants = {}));
2312
+ })(DataProductDraft = DphV1.DataProductDraft || (DphV1.DataProductDraft = {}));
2313
+ var DataProductDraftPrototype;
2314
+ (function (DataProductDraftPrototype) {
1308
2315
  var Constants;
1309
2316
  (function (Constants) {
1310
2317
  /** The state of the data product version. If not specified, the data product version will be created in `draft` state. */
@@ -1320,8 +2327,65 @@ var DphV1 = /** @class */ (function (_super) {
1320
2327
  Types["DATA"] = "data";
1321
2328
  Types["CODE"] = "code";
1322
2329
  })(Types = Constants.Types || (Constants.Types = {}));
1323
- })(Constants = DataProductVersionPrototype.Constants || (DataProductVersionPrototype.Constants = {}));
1324
- })(DataProductVersionPrototype = DphV1.DataProductVersionPrototype || (DphV1.DataProductVersionPrototype = {}));
2330
+ })(Constants = DataProductDraftPrototype.Constants || (DataProductDraftPrototype.Constants = {}));
2331
+ })(DataProductDraftPrototype = DphV1.DataProductDraftPrototype || (DphV1.DataProductDraftPrototype = {}));
2332
+ var DataProductDraftSummary;
2333
+ (function (DataProductDraftSummary) {
2334
+ var Constants;
2335
+ (function (Constants) {
2336
+ /** The state of the data product version. */
2337
+ var State;
2338
+ (function (State) {
2339
+ State["DRAFT"] = "draft";
2340
+ State["AVAILABLE"] = "available";
2341
+ State["RETIRED"] = "retired";
2342
+ })(State = Constants.State || (Constants.State = {}));
2343
+ /** Types of parts on the data product. */
2344
+ var Types;
2345
+ (function (Types) {
2346
+ Types["DATA"] = "data";
2347
+ Types["CODE"] = "code";
2348
+ })(Types = Constants.Types || (Constants.Types = {}));
2349
+ })(Constants = DataProductDraftSummary.Constants || (DataProductDraftSummary.Constants = {}));
2350
+ })(DataProductDraftSummary = DphV1.DataProductDraftSummary || (DphV1.DataProductDraftSummary = {}));
2351
+ var DataProductRelease;
2352
+ (function (DataProductRelease) {
2353
+ var Constants;
2354
+ (function (Constants) {
2355
+ /** The state of the data product version. */
2356
+ var State;
2357
+ (function (State) {
2358
+ State["DRAFT"] = "draft";
2359
+ State["AVAILABLE"] = "available";
2360
+ State["RETIRED"] = "retired";
2361
+ })(State = Constants.State || (Constants.State = {}));
2362
+ /** Types of parts on the data product. */
2363
+ var Types;
2364
+ (function (Types) {
2365
+ Types["DATA"] = "data";
2366
+ Types["CODE"] = "code";
2367
+ })(Types = Constants.Types || (Constants.Types = {}));
2368
+ })(Constants = DataProductRelease.Constants || (DataProductRelease.Constants = {}));
2369
+ })(DataProductRelease = DphV1.DataProductRelease || (DphV1.DataProductRelease = {}));
2370
+ var DataProductReleaseSummary;
2371
+ (function (DataProductReleaseSummary) {
2372
+ var Constants;
2373
+ (function (Constants) {
2374
+ /** The state of the data product version. */
2375
+ var State;
2376
+ (function (State) {
2377
+ State["DRAFT"] = "draft";
2378
+ State["AVAILABLE"] = "available";
2379
+ State["RETIRED"] = "retired";
2380
+ })(State = Constants.State || (Constants.State = {}));
2381
+ /** Types of parts on the data product. */
2382
+ var Types;
2383
+ (function (Types) {
2384
+ Types["DATA"] = "data";
2385
+ Types["CODE"] = "code";
2386
+ })(Types = Constants.Types || (Constants.Types = {}));
2387
+ })(Constants = DataProductReleaseSummary.Constants || (DataProductReleaseSummary.Constants = {}));
2388
+ })(DataProductReleaseSummary = DphV1.DataProductReleaseSummary || (DphV1.DataProductReleaseSummary = {}));
1325
2389
  var DataProductVersionSummary;
1326
2390
  (function (DataProductVersionSummary) {
1327
2391
  var Constants;
@@ -1378,6 +2442,7 @@ var DphV1 = /** @class */ (function (_super) {
1378
2442
  Code["DELETED"] = "deleted";
1379
2443
  Code["NOT_IMPLEMENTED"] = "not_implemented";
1380
2444
  Code["FEATURE_NOT_ENABLED"] = "feature_not_enabled";
2445
+ Code["MISSING_ASSET_DETAILS"] = "missing_asset_details";
1381
2446
  })(Code = Constants.Code || (Constants.Code = {}));
1382
2447
  })(Constants = ErrorModelResource.Constants || (ErrorModelResource.Constants = {}));
1383
2448
  })(ErrorModelResource = DphV1.ErrorModelResource || (DphV1.ErrorModelResource = {}));
@@ -1531,7 +2596,7 @@ var DphV1 = /** @class */ (function (_super) {
1531
2596
  };
1532
2597
  /**
1533
2598
  * Returns the next page of results by invoking listDataProductDrafts().
1534
- * @returns {Promise<DphV1.DataProductVersionSummary[]>}
2599
+ * @returns {Promise<DphV1.DataProductDraftSummary[]>}
1535
2600
  */
1536
2601
  DataProductDraftsPager.prototype.getNext = function () {
1537
2602
  return __awaiter(this, void 0, void 0, function () {
@@ -1563,7 +2628,7 @@ var DphV1 = /** @class */ (function (_super) {
1563
2628
  };
1564
2629
  /**
1565
2630
  * Returns all results by invoking listDataProductDrafts() repeatedly until all pages of results have been retrieved.
1566
- * @returns {Promise<DphV1.DataProductVersionSummary[]>}
2631
+ * @returns {Promise<DphV1.DataProductDraftSummary[]>}
1567
2632
  */
1568
2633
  DataProductDraftsPager.prototype.getAll = function () {
1569
2634
  return __awaiter(this, void 0, void 0, function () {
@@ -1618,7 +2683,7 @@ var DphV1 = /** @class */ (function (_super) {
1618
2683
  };
1619
2684
  /**
1620
2685
  * Returns the next page of results by invoking listDataProductReleases().
1621
- * @returns {Promise<DphV1.DataProductVersionSummary[]>}
2686
+ * @returns {Promise<DphV1.DataProductReleaseSummary[]>}
1622
2687
  */
1623
2688
  DataProductReleasesPager.prototype.getNext = function () {
1624
2689
  return __awaiter(this, void 0, void 0, function () {
@@ -1650,7 +2715,7 @@ var DphV1 = /** @class */ (function (_super) {
1650
2715
  };
1651
2716
  /**
1652
2717
  * Returns all results by invoking listDataProductReleases() repeatedly until all pages of results have been retrieved.
1653
- * @returns {Promise<DphV1.DataProductVersionSummary[]>}
2718
+ * @returns {Promise<DphV1.DataProductReleaseSummary[]>}
1654
2719
  */
1655
2720
  DataProductReleasesPager.prototype.getAll = function () {
1656
2721
  return __awaiter(this, void 0, void 0, function () {