@cobo/cobo-waas2 1.25.0 → 1.26.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.
Files changed (102) hide show
  1. package/README.md +21 -5
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AutoSweepApi.js +2 -2
  4. package/dist/api/ComplianceApi.js +2 -2
  5. package/dist/api/FeeStationApi.js +6 -6
  6. package/dist/api/PaymentApi.js +48 -6
  7. package/dist/api/TokenizationApi.js +122 -4
  8. package/dist/api/TransactionsApi.js +2 -2
  9. package/dist/index.js +105 -14
  10. package/dist/model/AutoFuelType.js +5 -0
  11. package/dist/model/CreateCryptoAddressRequest.js +1 -1
  12. package/dist/model/CreateMerchantRequest.js +1 -1
  13. package/dist/model/CreatePaymentOrderRequest.js +8 -8
  14. package/dist/model/CreateRefundLinkRequest.js +129 -0
  15. package/dist/model/FeeStationCheckFeeStationUsage.js +28 -10
  16. package/dist/model/FeeStationCheckFeeStationUsageResponse.js +33 -20
  17. package/dist/model/FeeStationSponsorTransactionDescription.js +125 -0
  18. package/dist/model/Link.js +2 -2
  19. package/dist/model/LinkDisplayInfo.js +2 -2
  20. package/dist/model/MerchantBalance.js +1 -1
  21. package/dist/model/Order.js +1 -1
  22. package/dist/model/OrderLinkBusinessInfo.js +11 -11
  23. package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +4 -4
  24. package/dist/model/PaymentOrderEventData.js +2 -2
  25. package/dist/model/PspBalance.js +1 -1
  26. package/dist/model/RefundLinkBusinessInfo.js +162 -0
  27. package/dist/model/RefundStatus.js +10 -0
  28. package/dist/model/SubmitKytScreeningsReviewBody.js +1 -1
  29. package/dist/model/SwapQuote.js +18 -18
  30. package/dist/model/TokenizationERC20TokenParams.js +5 -5
  31. package/dist/model/{TokenizationTokenPermissionParams.js → TokenizationERC20TokenPermissionParams.js} +23 -23
  32. package/dist/model/TokenizationERC20WrappedTokenParams.js +177 -0
  33. package/dist/model/TokenizationERC20WrappedTokenPermissionParams.js +166 -0
  34. package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +38 -11
  35. package/dist/model/TokenizationIssueTokenParamsTokenParams.js +72 -10
  36. package/dist/model/TokenizationListPermissionsResponse.js +146 -0
  37. package/dist/model/TokenizationListPermissionsResponseDataInner.js +126 -0
  38. package/dist/model/TokenizationOperationType.js +5 -0
  39. package/dist/model/TokenizationPermissionAction.js +66 -0
  40. package/dist/model/TokenizationSOLWrappedTokenParams.js +177 -0
  41. package/dist/model/TokenizationSolWrappedTokenPermissionParams.js +127 -0
  42. package/dist/model/TokenizationTokenDetailInfo.js +51 -5
  43. package/dist/model/TokenizationTokenInfo.js +26 -4
  44. package/dist/model/TokenizationTokenPermissionType.js +5 -0
  45. package/dist/model/TokenizationTokenStandard.js +10 -0
  46. package/dist/model/{TokenizationTokenPermissionsResponse.js → TokenizationUpdateAddressPermissions.js} +51 -53
  47. package/dist/model/TokenizationUpdatePermissionsEstimateFeeParams.js +198 -0
  48. package/dist/model/TokenizationUpdatePermissionsParams.js +145 -0
  49. package/dist/model/TokenizationUpdatePermissionsRequest.js +213 -0
  50. package/dist/model/TransactionCoboCategory.js +35 -0
  51. package/dist/model/UpdateMerchantByIdRequest.js +1 -1
  52. package/dist/model/WebhookEventData.js +1 -1
  53. package/docs/AutoFuelType.md +2 -0
  54. package/docs/AutoSweepApi.md +2 -2
  55. package/docs/ComplianceApi.md +1 -1
  56. package/docs/CreateCryptoAddressRequest.md +1 -1
  57. package/docs/CreateMerchantRequest.md +1 -1
  58. package/docs/CreatePaymentOrderRequest.md +5 -5
  59. package/docs/CreateRefundLinkRequest.md +10 -0
  60. package/docs/FeeStationApi.md +4 -4
  61. package/docs/FeeStationCheckFeeStationUsage.md +4 -2
  62. package/docs/FeeStationCheckFeeStationUsageResponse.md +4 -3
  63. package/docs/FeeStationSponsorTransactionDescription.md +10 -0
  64. package/docs/Link.md +1 -1
  65. package/docs/LinkDisplayInfo.md +2 -2
  66. package/docs/MerchantBalance.md +1 -1
  67. package/docs/Order.md +1 -1
  68. package/docs/OrderLinkBusinessInfo.md +7 -7
  69. package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
  70. package/docs/PaymentApi.md +56 -3
  71. package/docs/PaymentOrderEventData.md +1 -1
  72. package/docs/PspBalance.md +1 -1
  73. package/docs/RefundLinkBusinessInfo.md +13 -0
  74. package/docs/RefundStatus.md +4 -0
  75. package/docs/SwapQuote.md +10 -10
  76. package/docs/TokenizationApi.md +120 -2
  77. package/docs/TokenizationERC20TokenParams.md +1 -1
  78. package/docs/{TokenizationTokenPermissionParams.md → TokenizationERC20TokenPermissionParams.md} +1 -1
  79. package/docs/TokenizationERC20WrappedTokenParams.md +14 -0
  80. package/docs/TokenizationERC20WrappedTokenPermissionParams.md +15 -0
  81. package/docs/TokenizationEstimateFeeRequestOperationParams.md +1 -1
  82. package/docs/TokenizationIssueTokenParamsTokenParams.md +2 -1
  83. package/docs/TokenizationListPermissionsResponse.md +10 -0
  84. package/docs/TokenizationListPermissionsResponseDataInner.md +10 -0
  85. package/docs/TokenizationOperationType.md +2 -0
  86. package/docs/TokenizationPermissionAction.md +14 -0
  87. package/docs/TokenizationSOLWrappedTokenParams.md +14 -0
  88. package/docs/TokenizationSolWrappedTokenPermissionParams.md +12 -0
  89. package/docs/TokenizationTokenDetailInfo.md +3 -0
  90. package/docs/TokenizationTokenInfo.md +2 -0
  91. package/docs/TokenizationTokenPermissionType.md +2 -0
  92. package/docs/TokenizationTokenStandard.md +4 -0
  93. package/docs/TokenizationUpdateAddressPermissions.md +11 -0
  94. package/docs/TokenizationUpdatePermissionsEstimateFeeParams.md +13 -0
  95. package/docs/TokenizationUpdatePermissionsParams.md +10 -0
  96. package/docs/TokenizationUpdatePermissionsRequest.md +13 -0
  97. package/docs/TransactionCoboCategory.md +14 -0
  98. package/docs/TransactionsApi.md +1 -1
  99. package/docs/UpdateMerchantByIdRequest.md +1 -1
  100. package/docs/WebhookEventData.md +1 -1
  101. package/package.json +1 -1
  102. package/docs/TokenizationTokenPermissionsResponse.md +0 -10
@@ -19,9 +19,10 @@ var _TokenizationToggleAllowlistEstimateFeeParams = _interopRequireDefault(requi
19
19
  var _TokenizationTokenOperationSource = _interopRequireDefault(require("./TokenizationTokenOperationSource"));
20
20
  var _TokenizationUnpauseEstimateFeeParams = _interopRequireDefault(require("./TokenizationUnpauseEstimateFeeParams"));
21
21
  var _TokenizationUpdateAddressAction = _interopRequireDefault(require("./TokenizationUpdateAddressAction"));
22
+ var _TokenizationUpdateAddressPermissions = _interopRequireDefault(require("./TokenizationUpdateAddressPermissions"));
22
23
  var _TokenizationUpdateAllowlistAddressesEstimateFeeParams = _interopRequireDefault(require("./TokenizationUpdateAllowlistAddressesEstimateFeeParams"));
23
24
  var _TokenizationUpdateBlocklistAddressesEstimateFeeParams = _interopRequireDefault(require("./TokenizationUpdateBlocklistAddressesEstimateFeeParams"));
24
- var _TokenizationUpdateBlocklistAddressesParamsAddressesInner = _interopRequireDefault(require("./TokenizationUpdateBlocklistAddressesParamsAddressesInner"));
25
+ var _TokenizationUpdatePermissionsEstimateFeeParams = _interopRequireDefault(require("./TokenizationUpdatePermissionsEstimateFeeParams"));
25
26
  var _TokenizationEstimateFeeRequestOperationParams;
26
27
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
27
28
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
@@ -48,7 +49,7 @@ var TokenizationEstimateFeeRequestOperationParams = /*#__PURE__*/function () {
48
49
  /**
49
50
  * Constructs a new <code>TokenizationEstimateFeeRequestOperationParams</code>.
50
51
  * @alias module:model/TokenizationEstimateFeeRequestOperationParams
51
- * @param {(module:model/TokenizationBurnEstimateFeeParams|module:model/TokenizationContractCallEstimateFeeParams|module:model/TokenizationIssueEstimateFeeParams|module:model/TokenizationMintEstimateFeeParams|module:model/TokenizationPauseEstimateFeeParams|module:model/TokenizationToggleAllowlistEstimateFeeParams|module:model/TokenizationUnpauseEstimateFeeParams|module:model/TokenizationUpdateAllowlistAddressesEstimateFeeParams|module:model/TokenizationUpdateBlocklistAddressesEstimateFeeParams)} instance The actual instance to initialize TokenizationEstimateFeeRequestOperationParams.
52
+ * @param {(module:model/TokenizationBurnEstimateFeeParams|module:model/TokenizationContractCallEstimateFeeParams|module:model/TokenizationIssueEstimateFeeParams|module:model/TokenizationMintEstimateFeeParams|module:model/TokenizationPauseEstimateFeeParams|module:model/TokenizationToggleAllowlistEstimateFeeParams|module:model/TokenizationUnpauseEstimateFeeParams|module:model/TokenizationUpdateAllowlistAddressesEstimateFeeParams|module:model/TokenizationUpdateBlocklistAddressesEstimateFeeParams|module:model/TokenizationUpdatePermissionsEstimateFeeParams)} instance The actual instance to initialize TokenizationEstimateFeeRequestOperationParams.
52
53
  */
53
54
  function TokenizationEstimateFeeRequestOperationParams() {
54
55
  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -105,6 +106,10 @@ var TokenizationEstimateFeeRequestOperationParams = /*#__PURE__*/function () {
105
106
  this.actualInstance = _TokenizationUpdateBlocklistAddressesEstimateFeeParams["default"].constructFromObject(instance);
106
107
  match++;
107
108
  break;
109
+ case "UpdatePermissions":
110
+ this.actualInstance = _TokenizationUpdatePermissionsEstimateFeeParams["default"].constructFromObject(instance);
111
+ match++;
112
+ break;
108
113
  default:
109
114
  errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
110
115
  break;
@@ -318,13 +323,36 @@ var TokenizationEstimateFeeRequestOperationParams = /*#__PURE__*/function () {
318
323
  // json data failed to deserialize into TokenizationContractCallEstimateFeeParams
319
324
  errorMessages.push("Failed to construct TokenizationContractCallEstimateFeeParams: " + err);
320
325
  }
326
+ try {
327
+ if (instance instanceof _TokenizationUpdatePermissionsEstimateFeeParams["default"]) {
328
+ this.actualInstance = instance;
329
+ } else if (!!_TokenizationUpdatePermissionsEstimateFeeParams["default"].validateJSON && _TokenizationUpdatePermissionsEstimateFeeParams["default"].validateJSON(instance)) {
330
+ // plain JS object
331
+ // create TokenizationUpdatePermissionsEstimateFeeParams from JS object
332
+ this.actualInstance = _TokenizationUpdatePermissionsEstimateFeeParams["default"].constructFromObject(instance);
333
+ } else {
334
+ if (_TokenizationUpdatePermissionsEstimateFeeParams["default"].constructFromObject(instance)) {
335
+ if (!!_TokenizationUpdatePermissionsEstimateFeeParams["default"].constructFromObject(instance).toJSON) {
336
+ if (_TokenizationUpdatePermissionsEstimateFeeParams["default"].constructFromObject(instance).toJSON()) {
337
+ this.actualInstance = _TokenizationUpdatePermissionsEstimateFeeParams["default"].constructFromObject(instance);
338
+ }
339
+ } else {
340
+ this.actualInstance = _TokenizationUpdatePermissionsEstimateFeeParams["default"].constructFromObject(instance);
341
+ }
342
+ }
343
+ }
344
+ match++;
345
+ } catch (err) {
346
+ // json data failed to deserialize into TokenizationUpdatePermissionsEstimateFeeParams
347
+ errorMessages.push("Failed to construct TokenizationUpdatePermissionsEstimateFeeParams: " + err);
348
+ }
321
349
 
322
350
  // if (match > 1) {
323
- // throw new Error("Multiple matches found constructing `TokenizationEstimateFeeRequestOperationParams` with oneOf schemas TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams. Input: " + JSON.stringify(instance));
351
+ // throw new Error("Multiple matches found constructing `TokenizationEstimateFeeRequestOperationParams` with oneOf schemas TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams, TokenizationUpdatePermissionsEstimateFeeParams. Input: " + JSON.stringify(instance));
324
352
  // } else
325
353
  if (match === 0) {
326
354
  // this.actualInstance = null; // clear the actual instance in case there are multiple matches
327
- // throw new Error("No match found constructing `TokenizationEstimateFeeRequestOperationParams` with oneOf schemas TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams. Details: " +
355
+ // throw new Error("No match found constructing `TokenizationEstimateFeeRequestOperationParams` with oneOf schemas TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams, TokenizationUpdatePermissionsEstimateFeeParams. Details: " +
328
356
  // errorMessages.join(", "));
329
357
  return;
330
358
  } else {// only 1 match
@@ -343,16 +371,16 @@ var TokenizationEstimateFeeRequestOperationParams = /*#__PURE__*/function () {
343
371
  key: "getActualInstance",
344
372
  value:
345
373
  /**
346
- * Gets the actual instance, which can be <code>TokenizationBurnEstimateFeeParams</code>, <code>TokenizationContractCallEstimateFeeParams</code>, <code>TokenizationIssueEstimateFeeParams</code>, <code>TokenizationMintEstimateFeeParams</code>, <code>TokenizationPauseEstimateFeeParams</code>, <code>TokenizationToggleAllowlistEstimateFeeParams</code>, <code>TokenizationUnpauseEstimateFeeParams</code>, <code>TokenizationUpdateAllowlistAddressesEstimateFeeParams</code>, <code>TokenizationUpdateBlocklistAddressesEstimateFeeParams</code>.
347
- * @return {(module:model/TokenizationBurnEstimateFeeParams|module:model/TokenizationContractCallEstimateFeeParams|module:model/TokenizationIssueEstimateFeeParams|module:model/TokenizationMintEstimateFeeParams|module:model/TokenizationPauseEstimateFeeParams|module:model/TokenizationToggleAllowlistEstimateFeeParams|module:model/TokenizationUnpauseEstimateFeeParams|module:model/TokenizationUpdateAllowlistAddressesEstimateFeeParams|module:model/TokenizationUpdateBlocklistAddressesEstimateFeeParams)} The actual instance.
374
+ * Gets the actual instance, which can be <code>TokenizationBurnEstimateFeeParams</code>, <code>TokenizationContractCallEstimateFeeParams</code>, <code>TokenizationIssueEstimateFeeParams</code>, <code>TokenizationMintEstimateFeeParams</code>, <code>TokenizationPauseEstimateFeeParams</code>, <code>TokenizationToggleAllowlistEstimateFeeParams</code>, <code>TokenizationUnpauseEstimateFeeParams</code>, <code>TokenizationUpdateAllowlistAddressesEstimateFeeParams</code>, <code>TokenizationUpdateBlocklistAddressesEstimateFeeParams</code>, <code>TokenizationUpdatePermissionsEstimateFeeParams</code>.
375
+ * @return {(module:model/TokenizationBurnEstimateFeeParams|module:model/TokenizationContractCallEstimateFeeParams|module:model/TokenizationIssueEstimateFeeParams|module:model/TokenizationMintEstimateFeeParams|module:model/TokenizationPauseEstimateFeeParams|module:model/TokenizationToggleAllowlistEstimateFeeParams|module:model/TokenizationUnpauseEstimateFeeParams|module:model/TokenizationUpdateAllowlistAddressesEstimateFeeParams|module:model/TokenizationUpdateBlocklistAddressesEstimateFeeParams|module:model/TokenizationUpdatePermissionsEstimateFeeParams)} The actual instance.
348
376
  */
349
377
  function getActualInstance() {
350
378
  return this.actualInstance;
351
379
  }
352
380
 
353
381
  /**
354
- * Sets the actual instance, which can be <code>TokenizationBurnEstimateFeeParams</code>, <code>TokenizationContractCallEstimateFeeParams</code>, <code>TokenizationIssueEstimateFeeParams</code>, <code>TokenizationMintEstimateFeeParams</code>, <code>TokenizationPauseEstimateFeeParams</code>, <code>TokenizationToggleAllowlistEstimateFeeParams</code>, <code>TokenizationUnpauseEstimateFeeParams</code>, <code>TokenizationUpdateAllowlistAddressesEstimateFeeParams</code>, <code>TokenizationUpdateBlocklistAddressesEstimateFeeParams</code>.
355
- * @param {(module:model/TokenizationBurnEstimateFeeParams|module:model/TokenizationContractCallEstimateFeeParams|module:model/TokenizationIssueEstimateFeeParams|module:model/TokenizationMintEstimateFeeParams|module:model/TokenizationPauseEstimateFeeParams|module:model/TokenizationToggleAllowlistEstimateFeeParams|module:model/TokenizationUnpauseEstimateFeeParams|module:model/TokenizationUpdateAllowlistAddressesEstimateFeeParams|module:model/TokenizationUpdateBlocklistAddressesEstimateFeeParams)} obj The actual instance.
382
+ * Sets the actual instance, which can be <code>TokenizationBurnEstimateFeeParams</code>, <code>TokenizationContractCallEstimateFeeParams</code>, <code>TokenizationIssueEstimateFeeParams</code>, <code>TokenizationMintEstimateFeeParams</code>, <code>TokenizationPauseEstimateFeeParams</code>, <code>TokenizationToggleAllowlistEstimateFeeParams</code>, <code>TokenizationUnpauseEstimateFeeParams</code>, <code>TokenizationUpdateAllowlistAddressesEstimateFeeParams</code>, <code>TokenizationUpdateBlocklistAddressesEstimateFeeParams</code>, <code>TokenizationUpdatePermissionsEstimateFeeParams</code>.
383
+ * @param {(module:model/TokenizationBurnEstimateFeeParams|module:model/TokenizationContractCallEstimateFeeParams|module:model/TokenizationIssueEstimateFeeParams|module:model/TokenizationMintEstimateFeeParams|module:model/TokenizationPauseEstimateFeeParams|module:model/TokenizationToggleAllowlistEstimateFeeParams|module:model/TokenizationUnpauseEstimateFeeParams|module:model/TokenizationUpdateAllowlistAddressesEstimateFeeParams|module:model/TokenizationUpdateBlocklistAddressesEstimateFeeParams|module:model/TokenizationUpdatePermissionsEstimateFeeParams)} obj The actual instance.
356
384
  */
357
385
  }, {
358
386
  key: "setActualInstance",
@@ -426,8 +454,7 @@ TokenizationEstimateFeeRequestOperationParams.prototype['burns'] = undefined;
426
454
  TokenizationEstimateFeeRequestOperationParams.prototype['action'] = undefined;
427
455
 
428
456
  /**
429
- * A list of addresses to manage. For 'add' operations, notes can be provided. For 'remove' operations, notes are ignored.
430
- * @member {Array.<module:model/TokenizationUpdateBlocklistAddressesParamsAddressesInner>} addresses
457
+ * @member {Array.<module:model/TokenizationUpdateAddressPermissions>} addresses
431
458
  */
432
459
  TokenizationEstimateFeeRequestOperationParams.prototype['addresses'] = undefined;
433
460
 
@@ -441,5 +468,5 @@ TokenizationEstimateFeeRequestOperationParams.prototype['activation'] = undefine
441
468
  * @member {module:model/TokenizationContractCallParamsData} data
442
469
  */
443
470
  TokenizationEstimateFeeRequestOperationParams.prototype['data'] = undefined;
444
- TokenizationEstimateFeeRequestOperationParams.OneOf = ["TokenizationBurnEstimateFeeParams", "TokenizationContractCallEstimateFeeParams", "TokenizationIssueEstimateFeeParams", "TokenizationMintEstimateFeeParams", "TokenizationPauseEstimateFeeParams", "TokenizationToggleAllowlistEstimateFeeParams", "TokenizationUnpauseEstimateFeeParams", "TokenizationUpdateAllowlistAddressesEstimateFeeParams", "TokenizationUpdateBlocklistAddressesEstimateFeeParams"];
471
+ TokenizationEstimateFeeRequestOperationParams.OneOf = ["TokenizationBurnEstimateFeeParams", "TokenizationContractCallEstimateFeeParams", "TokenizationIssueEstimateFeeParams", "TokenizationMintEstimateFeeParams", "TokenizationPauseEstimateFeeParams", "TokenizationToggleAllowlistEstimateFeeParams", "TokenizationUnpauseEstimateFeeParams", "TokenizationUpdateAllowlistAddressesEstimateFeeParams", "TokenizationUpdateBlocklistAddressesEstimateFeeParams", "TokenizationUpdatePermissionsEstimateFeeParams"];
445
472
  var _default = exports["default"] = TokenizationEstimateFeeRequestOperationParams;
@@ -6,8 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _TokenizationERC20TokenParams = _interopRequireDefault(require("./TokenizationERC20TokenParams"));
9
+ var _TokenizationERC20WrappedTokenParams = _interopRequireDefault(require("./TokenizationERC20WrappedTokenParams"));
9
10
  var _TokenizationSOLTokenParams = _interopRequireDefault(require("./TokenizationSOLTokenParams"));
10
- var _TokenizationSolTokenPermissionParams = _interopRequireDefault(require("./TokenizationSolTokenPermissionParams"));
11
+ var _TokenizationSOLWrappedTokenParams = _interopRequireDefault(require("./TokenizationSOLWrappedTokenParams"));
12
+ var _TokenizationSolWrappedTokenPermissionParams = _interopRequireDefault(require("./TokenizationSolWrappedTokenPermissionParams"));
11
13
  var _TokenizationTokenStandard = _interopRequireDefault(require("./TokenizationTokenStandard"));
12
14
  var _TokenizationIssueTokenParamsTokenParams;
13
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -35,7 +37,7 @@ var TokenizationIssueTokenParamsTokenParams = /*#__PURE__*/function () {
35
37
  /**
36
38
  * Constructs a new <code>TokenizationIssueTokenParamsTokenParams</code>.
37
39
  * @alias module:model/TokenizationIssueTokenParamsTokenParams
38
- * @param {(module:model/TokenizationERC20TokenParams|module:model/TokenizationSOLTokenParams)} instance The actual instance to initialize TokenizationIssueTokenParamsTokenParams.
40
+ * @param {(module:model/TokenizationERC20TokenParams|module:model/TokenizationERC20WrappedTokenParams|module:model/TokenizationSOLTokenParams|module:model/TokenizationSOLWrappedTokenParams)} instance The actual instance to initialize TokenizationIssueTokenParamsTokenParams.
39
41
  */
40
42
  function TokenizationIssueTokenParamsTokenParams() {
41
43
  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -60,6 +62,14 @@ var TokenizationIssueTokenParamsTokenParams = /*#__PURE__*/function () {
60
62
  this.actualInstance = _TokenizationERC20TokenParams["default"].constructFromObject(instance);
61
63
  match++;
62
64
  break;
65
+ case "ERC20Wrapper":
66
+ this.actualInstance = _TokenizationERC20WrappedTokenParams["default"].constructFromObject(instance);
67
+ match++;
68
+ break;
69
+ case "SOLWrapper":
70
+ this.actualInstance = _TokenizationSOLWrappedTokenParams["default"].constructFromObject(instance);
71
+ match++;
72
+ break;
63
73
  case "SPLToken2022":
64
74
  this.actualInstance = _TokenizationSOLTokenParams["default"].constructFromObject(instance);
65
75
  match++;
@@ -93,6 +103,29 @@ var TokenizationIssueTokenParamsTokenParams = /*#__PURE__*/function () {
93
103
  // json data failed to deserialize into TokenizationERC20TokenParams
94
104
  errorMessages.push("Failed to construct TokenizationERC20TokenParams: " + err);
95
105
  }
106
+ try {
107
+ if (instance instanceof _TokenizationERC20WrappedTokenParams["default"]) {
108
+ this.actualInstance = instance;
109
+ } else if (!!_TokenizationERC20WrappedTokenParams["default"].validateJSON && _TokenizationERC20WrappedTokenParams["default"].validateJSON(instance)) {
110
+ // plain JS object
111
+ // create TokenizationERC20WrappedTokenParams from JS object
112
+ this.actualInstance = _TokenizationERC20WrappedTokenParams["default"].constructFromObject(instance);
113
+ } else {
114
+ if (_TokenizationERC20WrappedTokenParams["default"].constructFromObject(instance)) {
115
+ if (!!_TokenizationERC20WrappedTokenParams["default"].constructFromObject(instance).toJSON) {
116
+ if (_TokenizationERC20WrappedTokenParams["default"].constructFromObject(instance).toJSON()) {
117
+ this.actualInstance = _TokenizationERC20WrappedTokenParams["default"].constructFromObject(instance);
118
+ }
119
+ } else {
120
+ this.actualInstance = _TokenizationERC20WrappedTokenParams["default"].constructFromObject(instance);
121
+ }
122
+ }
123
+ }
124
+ match++;
125
+ } catch (err) {
126
+ // json data failed to deserialize into TokenizationERC20WrappedTokenParams
127
+ errorMessages.push("Failed to construct TokenizationERC20WrappedTokenParams: " + err);
128
+ }
96
129
  try {
97
130
  if (instance instanceof _TokenizationSOLTokenParams["default"]) {
98
131
  this.actualInstance = instance;
@@ -116,13 +149,36 @@ var TokenizationIssueTokenParamsTokenParams = /*#__PURE__*/function () {
116
149
  // json data failed to deserialize into TokenizationSOLTokenParams
117
150
  errorMessages.push("Failed to construct TokenizationSOLTokenParams: " + err);
118
151
  }
152
+ try {
153
+ if (instance instanceof _TokenizationSOLWrappedTokenParams["default"]) {
154
+ this.actualInstance = instance;
155
+ } else if (!!_TokenizationSOLWrappedTokenParams["default"].validateJSON && _TokenizationSOLWrappedTokenParams["default"].validateJSON(instance)) {
156
+ // plain JS object
157
+ // create TokenizationSOLWrappedTokenParams from JS object
158
+ this.actualInstance = _TokenizationSOLWrappedTokenParams["default"].constructFromObject(instance);
159
+ } else {
160
+ if (_TokenizationSOLWrappedTokenParams["default"].constructFromObject(instance)) {
161
+ if (!!_TokenizationSOLWrappedTokenParams["default"].constructFromObject(instance).toJSON) {
162
+ if (_TokenizationSOLWrappedTokenParams["default"].constructFromObject(instance).toJSON()) {
163
+ this.actualInstance = _TokenizationSOLWrappedTokenParams["default"].constructFromObject(instance);
164
+ }
165
+ } else {
166
+ this.actualInstance = _TokenizationSOLWrappedTokenParams["default"].constructFromObject(instance);
167
+ }
168
+ }
169
+ }
170
+ match++;
171
+ } catch (err) {
172
+ // json data failed to deserialize into TokenizationSOLWrappedTokenParams
173
+ errorMessages.push("Failed to construct TokenizationSOLWrappedTokenParams: " + err);
174
+ }
119
175
 
120
176
  // if (match > 1) {
121
- // throw new Error("Multiple matches found constructing `TokenizationIssueTokenParamsTokenParams` with oneOf schemas TokenizationERC20TokenParams, TokenizationSOLTokenParams. Input: " + JSON.stringify(instance));
177
+ // throw new Error("Multiple matches found constructing `TokenizationIssueTokenParamsTokenParams` with oneOf schemas TokenizationERC20TokenParams, TokenizationERC20WrappedTokenParams, TokenizationSOLTokenParams, TokenizationSOLWrappedTokenParams. Input: " + JSON.stringify(instance));
122
178
  // } else
123
179
  if (match === 0) {
124
180
  // this.actualInstance = null; // clear the actual instance in case there are multiple matches
125
- // throw new Error("No match found constructing `TokenizationIssueTokenParamsTokenParams` with oneOf schemas TokenizationERC20TokenParams, TokenizationSOLTokenParams. Details: " +
181
+ // throw new Error("No match found constructing `TokenizationIssueTokenParamsTokenParams` with oneOf schemas TokenizationERC20TokenParams, TokenizationERC20WrappedTokenParams, TokenizationSOLTokenParams, TokenizationSOLWrappedTokenParams. Details: " +
126
182
  // errorMessages.join(", "));
127
183
  return;
128
184
  } else {// only 1 match
@@ -141,16 +197,16 @@ var TokenizationIssueTokenParamsTokenParams = /*#__PURE__*/function () {
141
197
  key: "getActualInstance",
142
198
  value:
143
199
  /**
144
- * Gets the actual instance, which can be <code>TokenizationERC20TokenParams</code>, <code>TokenizationSOLTokenParams</code>.
145
- * @return {(module:model/TokenizationERC20TokenParams|module:model/TokenizationSOLTokenParams)} The actual instance.
200
+ * Gets the actual instance, which can be <code>TokenizationERC20TokenParams</code>, <code>TokenizationERC20WrappedTokenParams</code>, <code>TokenizationSOLTokenParams</code>, <code>TokenizationSOLWrappedTokenParams</code>.
201
+ * @return {(module:model/TokenizationERC20TokenParams|module:model/TokenizationERC20WrappedTokenParams|module:model/TokenizationSOLTokenParams|module:model/TokenizationSOLWrappedTokenParams)} The actual instance.
146
202
  */
147
203
  function getActualInstance() {
148
204
  return this.actualInstance;
149
205
  }
150
206
 
151
207
  /**
152
- * Sets the actual instance, which can be <code>TokenizationERC20TokenParams</code>, <code>TokenizationSOLTokenParams</code>.
153
- * @param {(module:model/TokenizationERC20TokenParams|module:model/TokenizationSOLTokenParams)} obj The actual instance.
208
+ * Sets the actual instance, which can be <code>TokenizationERC20TokenParams</code>, <code>TokenizationERC20WrappedTokenParams</code>, <code>TokenizationSOLTokenParams</code>, <code>TokenizationSOLWrappedTokenParams</code>.
209
+ * @param {(module:model/TokenizationERC20TokenParams|module:model/TokenizationERC20WrappedTokenParams|module:model/TokenizationSOLTokenParams|module:model/TokenizationSOLWrappedTokenParams)} obj The actual instance.
154
210
  */
155
211
  }, {
156
212
  key: "setActualInstance",
@@ -204,8 +260,14 @@ TokenizationIssueTokenParamsTokenParams.prototype['decimals'] = undefined;
204
260
  TokenizationIssueTokenParamsTokenParams.prototype['token_access_activated'] = false;
205
261
 
206
262
  /**
207
- * @member {module:model/TokenizationSolTokenPermissionParams} permissions
263
+ * @member {module:model/TokenizationSolWrappedTokenPermissionParams} permissions
208
264
  */
209
265
  TokenizationIssueTokenParamsTokenParams.prototype['permissions'] = undefined;
210
- TokenizationIssueTokenParamsTokenParams.OneOf = ["TokenizationERC20TokenParams", "TokenizationSOLTokenParams"];
266
+
267
+ /**
268
+ * The address of the underlying token that this tokenized asset represents.
269
+ * @member {String} underlying_token
270
+ */
271
+ TokenizationIssueTokenParamsTokenParams.prototype['underlying_token'] = undefined;
272
+ TokenizationIssueTokenParamsTokenParams.OneOf = ["TokenizationERC20TokenParams", "TokenizationERC20WrappedTokenParams", "TokenizationSOLTokenParams", "TokenizationSOLWrappedTokenParams"];
211
273
  var _default = exports["default"] = TokenizationIssueTokenParamsTokenParams;
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _Pagination = _interopRequireDefault(require("./Pagination"));
9
+ var _TokenizationListPermissionsResponseDataInner = _interopRequireDefault(require("./TokenizationListPermissionsResponseDataInner"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
+ * Cobo Wallet as a Service 2.0
21
+ *
22
+ * Contact: help@cobo.com
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The TokenizationListPermissionsResponse model module.
31
+ * @module model/TokenizationListPermissionsResponse
32
+ */
33
+ var TokenizationListPermissionsResponse = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>TokenizationListPermissionsResponse</code>.
36
+ * @alias module:model/TokenizationListPermissionsResponse
37
+ * @param data {Array.<module:model/TokenizationListPermissionsResponseDataInner>} List of permissions.
38
+ * @param pagination {module:model/Pagination}
39
+ */
40
+ function TokenizationListPermissionsResponse(data, pagination) {
41
+ _classCallCheck(this, TokenizationListPermissionsResponse);
42
+ TokenizationListPermissionsResponse.initialize(this, data, pagination);
43
+ }
44
+
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+ return _createClass(TokenizationListPermissionsResponse, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, data, pagination) {
53
+ obj['data'] = data;
54
+ obj['pagination'] = pagination;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>TokenizationListPermissionsResponse</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/TokenizationListPermissionsResponse} obj Optional instance to populate.
62
+ * @return {module:model/TokenizationListPermissionsResponse} The populated <code>TokenizationListPermissionsResponse</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new TokenizationListPermissionsResponse();
69
+ if (data.hasOwnProperty('data')) {
70
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_TokenizationListPermissionsResponseDataInner["default"]]);
71
+ }
72
+ if (data.hasOwnProperty('pagination')) {
73
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
74
+ }
75
+ }
76
+ return obj;
77
+ }
78
+
79
+ /**
80
+ * Validates the JSON data with respect to <code>TokenizationListPermissionsResponse</code>.
81
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
82
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationListPermissionsResponse</code>.
83
+ */
84
+ }, {
85
+ key: "validateJSON",
86
+ value: function validateJSON(data) {
87
+ // check to make sure all required properties are present in the JSON string
88
+ var _iterator = _createForOfIteratorHelper(TokenizationListPermissionsResponse.RequiredProperties),
89
+ _step;
90
+ try {
91
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
92
+ var property = _step.value;
93
+ if (!data.hasOwnProperty(property)) {
94
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
95
+ }
96
+ }
97
+ } catch (err) {
98
+ _iterator.e(err);
99
+ } finally {
100
+ _iterator.f();
101
+ }
102
+ if (data['data']) {
103
+ // data not null
104
+ // ensure the json data is an array
105
+ if (!Array.isArray(data['data'])) {
106
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
107
+ }
108
+ // validate the optional field `data` (array)
109
+ var _iterator2 = _createForOfIteratorHelper(data['data']),
110
+ _step2;
111
+ try {
112
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
113
+ var item = _step2.value;
114
+ _TokenizationListPermissionsResponseDataInner["default"].validateJSON(item);
115
+ }
116
+ } catch (err) {
117
+ _iterator2.e(err);
118
+ } finally {
119
+ _iterator2.f();
120
+ }
121
+ ;
122
+ }
123
+ // validate the optional field `pagination`
124
+ if (data['pagination']) {
125
+ // data not null
126
+ if (!!_Pagination["default"].validateJSON) {
127
+ _Pagination["default"].validateJSON(data['pagination']);
128
+ }
129
+ }
130
+ return true;
131
+ }
132
+ }]);
133
+ }();
134
+ TokenizationListPermissionsResponse.RequiredProperties = ["data", "pagination"];
135
+
136
+ /**
137
+ * List of permissions.
138
+ * @member {Array.<module:model/TokenizationListPermissionsResponseDataInner>} data
139
+ */
140
+ TokenizationListPermissionsResponse.prototype['data'] = undefined;
141
+
142
+ /**
143
+ * @member {module:model/Pagination} pagination
144
+ */
145
+ TokenizationListPermissionsResponse.prototype['pagination'] = undefined;
146
+ var _default = exports["default"] = TokenizationListPermissionsResponse;
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _TokenizationTokenPermissionType = _interopRequireDefault(require("./TokenizationTokenPermissionType"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
12
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
13
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
+ * Cobo Wallet as a Service 2.0
20
+ *
21
+ * Contact: help@cobo.com
22
+ *
23
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
+ * https://openapi-generator.tech
25
+ * Do not edit the class manually.
26
+ *
27
+ */
28
+ /**
29
+ * The TokenizationListPermissionsResponseDataInner model module.
30
+ * @module model/TokenizationListPermissionsResponseDataInner
31
+ */
32
+ var TokenizationListPermissionsResponseDataInner = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>TokenizationListPermissionsResponseDataInner</code>.
35
+ * @alias module:model/TokenizationListPermissionsResponseDataInner
36
+ * @param address {String} The address with permissions.
37
+ * @param permissions {Array.<module:model/TokenizationTokenPermissionType>} The permissions assigned to this address.
38
+ */
39
+ function TokenizationListPermissionsResponseDataInner(address, permissions) {
40
+ _classCallCheck(this, TokenizationListPermissionsResponseDataInner);
41
+ TokenizationListPermissionsResponseDataInner.initialize(this, address, permissions);
42
+ }
43
+
44
+ /**
45
+ * Initializes the fields of this object.
46
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
47
+ * Only for internal use.
48
+ */
49
+ return _createClass(TokenizationListPermissionsResponseDataInner, null, [{
50
+ key: "initialize",
51
+ value: function initialize(obj, address, permissions) {
52
+ obj['address'] = address;
53
+ obj['permissions'] = permissions;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>TokenizationListPermissionsResponseDataInner</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
59
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
60
+ * @param {module:model/TokenizationListPermissionsResponseDataInner} obj Optional instance to populate.
61
+ * @return {module:model/TokenizationListPermissionsResponseDataInner} The populated <code>TokenizationListPermissionsResponseDataInner</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new TokenizationListPermissionsResponseDataInner();
68
+ if (data.hasOwnProperty('address')) {
69
+ obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
70
+ }
71
+ if (data.hasOwnProperty('permissions')) {
72
+ obj['permissions'] = _ApiClient["default"].convertToType(data['permissions'], [_TokenizationTokenPermissionType["default"]]);
73
+ }
74
+ }
75
+ return obj;
76
+ }
77
+
78
+ /**
79
+ * Validates the JSON data with respect to <code>TokenizationListPermissionsResponseDataInner</code>.
80
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationListPermissionsResponseDataInner</code>.
82
+ */
83
+ }, {
84
+ key: "validateJSON",
85
+ value: function validateJSON(data) {
86
+ // check to make sure all required properties are present in the JSON string
87
+ var _iterator = _createForOfIteratorHelper(TokenizationListPermissionsResponseDataInner.RequiredProperties),
88
+ _step;
89
+ try {
90
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
91
+ var property = _step.value;
92
+ if (!data.hasOwnProperty(property)) {
93
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
94
+ }
95
+ }
96
+ // ensure the json data is a string
97
+ } catch (err) {
98
+ _iterator.e(err);
99
+ } finally {
100
+ _iterator.f();
101
+ }
102
+ if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
103
+ throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
104
+ }
105
+ // ensure the json data is an array
106
+ if (!Array.isArray(data['permissions'])) {
107
+ throw new Error("Expected the field `permissions` to be an array in the JSON data but got " + data['permissions']);
108
+ }
109
+ return true;
110
+ }
111
+ }]);
112
+ }();
113
+ TokenizationListPermissionsResponseDataInner.RequiredProperties = ["address", "permissions"];
114
+
115
+ /**
116
+ * The address with permissions.
117
+ * @member {String} address
118
+ */
119
+ TokenizationListPermissionsResponseDataInner.prototype['address'] = undefined;
120
+
121
+ /**
122
+ * The permissions assigned to this address.
123
+ * @member {Array.<module:model/TokenizationTokenPermissionType>} permissions
124
+ */
125
+ TokenizationListPermissionsResponseDataInner.prototype['permissions'] = undefined;
126
+ var _default = exports["default"] = TokenizationListPermissionsResponseDataInner;
@@ -75,6 +75,11 @@ var TokenizationOperationType = exports["default"] = /*#__PURE__*/function () {
75
75
  * @const
76
76
  */
77
77
  _defineProperty(this, "ContractCall", "ContractCall");
78
+ /**
79
+ * value: "UpdatePermissions"
80
+ * @const
81
+ */
82
+ _defineProperty(this, "UpdatePermissions", "UpdatePermissions");
78
83
  /**
79
84
  * value: "unknown_default_open_api"
80
85
  * @const
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
16
+ * Cobo Wallet as a Service 2.0
17
+ *
18
+ * Contact: help@cobo.com
19
+ *
20
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
+ * https://openapi-generator.tech
22
+ * Do not edit the class manually.
23
+ *
24
+ */
25
+ /**
26
+ * Enum class TokenizationPermissionAction.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var TokenizationPermissionAction = exports["default"] = /*#__PURE__*/function () {
31
+ function TokenizationPermissionAction() {
32
+ _classCallCheck(this, TokenizationPermissionAction);
33
+ /**
34
+ * value: "add"
35
+ * @const
36
+ */
37
+ _defineProperty(this, "add", "add");
38
+ /**
39
+ * value: "remove"
40
+ * @const
41
+ */
42
+ _defineProperty(this, "remove", "remove");
43
+ /**
44
+ * value: "set"
45
+ * @const
46
+ */
47
+ _defineProperty(this, "set", "set");
48
+ /**
49
+ * value: "unknown_default_open_api"
50
+ * @const
51
+ */
52
+ _defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
53
+ }
54
+ return _createClass(TokenizationPermissionAction, null, [{
55
+ key: "constructFromObject",
56
+ value:
57
+ /**
58
+ * Returns a <code>TokenizationPermissionAction</code> enum value from a Javascript object name.
59
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
60
+ * @return {module:model/TokenizationPermissionAction} The enum <code>TokenizationPermissionAction</code> value.
61
+ */
62
+ function constructFromObject(object) {
63
+ return object;
64
+ }
65
+ }]);
66
+ }();