@cobo/cobo-waas2 1.31.0 → 1.33.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 (46) hide show
  1. package/README.md +6 -1
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AutoSweepApi.js +4 -4
  4. package/dist/api/FeeStationApi.js +4 -4
  5. package/dist/api/PaymentApi.js +89 -14
  6. package/dist/api/TransactionsApi.js +4 -4
  7. package/dist/api/WalletsApi.js +83 -0
  8. package/dist/index.js +14 -0
  9. package/dist/model/CreateDestinationBankAccount.js +26 -0
  10. package/dist/model/DestinationBankAccount.js +26 -0
  11. package/dist/model/DestinationBankAccountDetail.js +26 -0
  12. package/dist/model/IntermediaryBankInfo.js +4 -6
  13. package/dist/model/MerchantBalance.js +4 -6
  14. package/dist/model/ReportType.js +5 -0
  15. package/dist/model/TransactionDepositToAddressDestinationTxInfo.js +26 -0
  16. package/dist/model/TransactionExtra.js +54 -8
  17. package/dist/model/TransactionRawTxInfo.js +32 -1
  18. package/dist/model/TransactionSelectedUtxo.js +39 -0
  19. package/dist/model/TransactionUtxoChange.js +13 -0
  20. package/dist/model/TriggerTestPaymentWebhookEventResponse.js +83 -0
  21. package/dist/model/TriggerTestPaymentsWebhookEventRequest.js +115 -0
  22. package/dist/model/UTXO.js +48 -0
  23. package/dist/model/UpdateDestinationBankAccount.js +26 -0
  24. package/dist/model/WebhookEventType.js +10 -0
  25. package/docs/AutoSweepApi.md +2 -2
  26. package/docs/CreateDestinationBankAccount.md +2 -0
  27. package/docs/DestinationBankAccount.md +2 -0
  28. package/docs/DestinationBankAccountDetail.md +2 -0
  29. package/docs/FeeStationApi.md +2 -2
  30. package/docs/IntermediaryBankInfo.md +1 -1
  31. package/docs/MerchantBalance.md +1 -1
  32. package/docs/PaymentApi.md +106 -6
  33. package/docs/ReportType.md +2 -0
  34. package/docs/TransactionDepositToAddressDestinationTxInfo.md +2 -0
  35. package/docs/TransactionExtra.md +3 -0
  36. package/docs/TransactionRawTxInfo.md +2 -1
  37. package/docs/TransactionSelectedUtxo.md +3 -0
  38. package/docs/TransactionUtxoChange.md +1 -0
  39. package/docs/TransactionsApi.md +2 -2
  40. package/docs/TriggerTestPaymentWebhookEventResponse.md +9 -0
  41. package/docs/TriggerTestPaymentsWebhookEventRequest.md +10 -0
  42. package/docs/UTXO.md +4 -0
  43. package/docs/UpdateDestinationBankAccount.md +2 -0
  44. package/docs/WalletsApi.md +71 -0
  45. package/docs/WebhookEventType.md +4 -0
  46. package/package.json +1 -1
@@ -35,11 +35,10 @@ var MerchantBalance = /*#__PURE__*/function () {
35
35
  * @alias module:model/MerchantBalance
36
36
  * @param merchant_id {String} The merchant ID.
37
37
  * @param token_id {String} The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`.
38
- * @param acquiring_type {module:model/AcquiringType}
39
38
  */
40
- function MerchantBalance(merchant_id, token_id, acquiring_type) {
39
+ function MerchantBalance(merchant_id, token_id) {
41
40
  _classCallCheck(this, MerchantBalance);
42
- MerchantBalance.initialize(this, merchant_id, token_id, acquiring_type);
41
+ MerchantBalance.initialize(this, merchant_id, token_id);
43
42
  }
44
43
 
45
44
  /**
@@ -49,10 +48,9 @@ var MerchantBalance = /*#__PURE__*/function () {
49
48
  */
50
49
  return _createClass(MerchantBalance, null, [{
51
50
  key: "initialize",
52
- value: function initialize(obj, merchant_id, token_id, acquiring_type) {
51
+ value: function initialize(obj, merchant_id, token_id) {
53
52
  obj['merchant_id'] = merchant_id;
54
53
  obj['token_id'] = token_id;
55
- obj['acquiring_type'] = acquiring_type;
56
54
  }
57
55
 
58
56
  /**
@@ -164,7 +162,7 @@ var MerchantBalance = /*#__PURE__*/function () {
164
162
  }
165
163
  }]);
166
164
  }();
167
- MerchantBalance.RequiredProperties = ["merchant_id", "token_id", "acquiring_type"];
165
+ MerchantBalance.RequiredProperties = ["merchant_id", "token_id"];
168
166
 
169
167
  /**
170
168
  * The merchant ID.
@@ -100,6 +100,11 @@ var ReportType = exports["default"] = /*#__PURE__*/function () {
100
100
  * @const
101
101
  */
102
102
  _defineProperty(this, "Summary", "Summary");
103
+ /**
104
+ * value: "BulkSend"
105
+ * @const
106
+ */
107
+ _defineProperty(this, "BulkSend", "BulkSend");
103
108
  /**
104
109
  * value: "unknown_default_open_api"
105
110
  * @const
@@ -59,6 +59,12 @@ var TransactionDepositToAddressDestinationTxInfo = /*#__PURE__*/function () {
59
59
  if (data.hasOwnProperty('vout_n')) {
60
60
  obj['vout_n'] = _ApiClient["default"].convertToType(data['vout_n'], 'Number');
61
61
  }
62
+ if (data.hasOwnProperty('object_id')) {
63
+ obj['object_id'] = _ApiClient["default"].convertToType(data['object_id'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('version')) {
66
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
67
+ }
62
68
  }
63
69
  return obj;
64
70
  }
@@ -71,6 +77,14 @@ var TransactionDepositToAddressDestinationTxInfo = /*#__PURE__*/function () {
71
77
  }, {
72
78
  key: "validateJSON",
73
79
  value: function validateJSON(data) {
80
+ // ensure the json data is a string
81
+ if (data['object_id'] && !(typeof data['object_id'] === 'string' || data['object_id'] instanceof String)) {
82
+ throw new Error("Expected the field `object_id` to be a primitive type in the JSON string but got " + data['object_id']);
83
+ }
84
+ // ensure the json data is a string
85
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
86
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
87
+ }
74
88
  return true;
75
89
  }
76
90
  }]);
@@ -80,4 +94,16 @@ var TransactionDepositToAddressDestinationTxInfo = /*#__PURE__*/function () {
80
94
  * @member {Number} vout_n
81
95
  */
82
96
  TransactionDepositToAddressDestinationTxInfo.prototype['vout_n'] = undefined;
97
+
98
+ /**
99
+ * The ID of the blockchain object to spend (e.g., SUI Coin object).
100
+ * @member {String} object_id
101
+ */
102
+ TransactionDepositToAddressDestinationTxInfo.prototype['object_id'] = undefined;
103
+
104
+ /**
105
+ * Object version number.
106
+ * @member {String} version
107
+ */
108
+ TransactionDepositToAddressDestinationTxInfo.prototype['version'] = undefined;
83
109
  var _default = exports["default"] = TransactionDepositToAddressDestinationTxInfo;
@@ -11,6 +11,7 @@ var _TransactionBabylonBusinessInfo = _interopRequireDefault(require("./Transact
11
11
  var _TransactionBabylonTxParameters = _interopRequireDefault(require("./TransactionBabylonTxParameters"));
12
12
  var _TransactionCoreStakeInfo = _interopRequireDefault(require("./TransactionCoreStakeInfo"));
13
13
  var _TransactionExtraType = _interopRequireDefault(require("./TransactionExtraType"));
14
+ var _TransactionWalletConnectInfo = _interopRequireDefault(require("./TransactionWalletConnectInfo"));
14
15
  var _TransactionExtra;
15
16
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
16
17
  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); }
@@ -37,7 +38,7 @@ var TransactionExtra = /*#__PURE__*/function () {
37
38
  /**
38
39
  * Constructs a new <code>TransactionExtra</code>.
39
40
  * @alias module:model/TransactionExtra
40
- * @param {(module:model/TransactionBabylonBusinessInfo|module:model/TransactionBabylonTxParameters|module:model/TransactionCoreStakeInfo)} instance The actual instance to initialize TransactionExtra.
41
+ * @param {(module:model/TransactionBabylonBusinessInfo|module:model/TransactionBabylonTxParameters|module:model/TransactionCoreStakeInfo|module:model/TransactionWalletConnectInfo)} instance The actual instance to initialize TransactionExtra.
41
42
  */
42
43
  function TransactionExtra() {
43
44
  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -70,6 +71,10 @@ var TransactionExtra = /*#__PURE__*/function () {
70
71
  this.actualInstance = _TransactionCoreStakeInfo["default"].constructFromObject(instance);
71
72
  match++;
72
73
  break;
74
+ case "WalletConnectInfo":
75
+ this.actualInstance = _TransactionWalletConnectInfo["default"].constructFromObject(instance);
76
+ match++;
77
+ break;
73
78
  default:
74
79
  errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
75
80
  break;
@@ -145,13 +150,36 @@ var TransactionExtra = /*#__PURE__*/function () {
145
150
  // json data failed to deserialize into TransactionCoreStakeInfo
146
151
  errorMessages.push("Failed to construct TransactionCoreStakeInfo: " + err);
147
152
  }
153
+ try {
154
+ if (instance instanceof _TransactionWalletConnectInfo["default"]) {
155
+ this.actualInstance = instance;
156
+ } else if (!!_TransactionWalletConnectInfo["default"].validateJSON && _TransactionWalletConnectInfo["default"].validateJSON(instance)) {
157
+ // plain JS object
158
+ // create TransactionWalletConnectInfo from JS object
159
+ this.actualInstance = _TransactionWalletConnectInfo["default"].constructFromObject(instance);
160
+ } else {
161
+ if (_TransactionWalletConnectInfo["default"].constructFromObject(instance)) {
162
+ if (!!_TransactionWalletConnectInfo["default"].constructFromObject(instance).toJSON) {
163
+ if (_TransactionWalletConnectInfo["default"].constructFromObject(instance).toJSON()) {
164
+ this.actualInstance = _TransactionWalletConnectInfo["default"].constructFromObject(instance);
165
+ }
166
+ } else {
167
+ this.actualInstance = _TransactionWalletConnectInfo["default"].constructFromObject(instance);
168
+ }
169
+ }
170
+ }
171
+ match++;
172
+ } catch (err) {
173
+ // json data failed to deserialize into TransactionWalletConnectInfo
174
+ errorMessages.push("Failed to construct TransactionWalletConnectInfo: " + err);
175
+ }
148
176
 
149
177
  // if (match > 1) {
150
- // throw new Error("Multiple matches found constructing `TransactionExtra` with oneOf schemas TransactionBabylonBusinessInfo, TransactionBabylonTxParameters, TransactionCoreStakeInfo. Input: " + JSON.stringify(instance));
178
+ // throw new Error("Multiple matches found constructing `TransactionExtra` with oneOf schemas TransactionBabylonBusinessInfo, TransactionBabylonTxParameters, TransactionCoreStakeInfo, TransactionWalletConnectInfo. Input: " + JSON.stringify(instance));
151
179
  // } else
152
180
  if (match === 0) {
153
181
  // this.actualInstance = null; // clear the actual instance in case there are multiple matches
154
- // throw new Error("No match found constructing `TransactionExtra` with oneOf schemas TransactionBabylonBusinessInfo, TransactionBabylonTxParameters, TransactionCoreStakeInfo. Details: " +
182
+ // throw new Error("No match found constructing `TransactionExtra` with oneOf schemas TransactionBabylonBusinessInfo, TransactionBabylonTxParameters, TransactionCoreStakeInfo, TransactionWalletConnectInfo. Details: " +
155
183
  // errorMessages.join(", "));
156
184
  return;
157
185
  } else {// only 1 match
@@ -170,16 +198,16 @@ var TransactionExtra = /*#__PURE__*/function () {
170
198
  key: "getActualInstance",
171
199
  value:
172
200
  /**
173
- * Gets the actual instance, which can be <code>TransactionBabylonBusinessInfo</code>, <code>TransactionBabylonTxParameters</code>, <code>TransactionCoreStakeInfo</code>.
174
- * @return {(module:model/TransactionBabylonBusinessInfo|module:model/TransactionBabylonTxParameters|module:model/TransactionCoreStakeInfo)} The actual instance.
201
+ * Gets the actual instance, which can be <code>TransactionBabylonBusinessInfo</code>, <code>TransactionBabylonTxParameters</code>, <code>TransactionCoreStakeInfo</code>, <code>TransactionWalletConnectInfo</code>.
202
+ * @return {(module:model/TransactionBabylonBusinessInfo|module:model/TransactionBabylonTxParameters|module:model/TransactionCoreStakeInfo|module:model/TransactionWalletConnectInfo)} The actual instance.
175
203
  */
176
204
  function getActualInstance() {
177
205
  return this.actualInstance;
178
206
  }
179
207
 
180
208
  /**
181
- * Sets the actual instance, which can be <code>TransactionBabylonBusinessInfo</code>, <code>TransactionBabylonTxParameters</code>, <code>TransactionCoreStakeInfo</code>.
182
- * @param {(module:model/TransactionBabylonBusinessInfo|module:model/TransactionBabylonTxParameters|module:model/TransactionCoreStakeInfo)} obj The actual instance.
209
+ * Sets the actual instance, which can be <code>TransactionBabylonBusinessInfo</code>, <code>TransactionBabylonTxParameters</code>, <code>TransactionCoreStakeInfo</code>, <code>TransactionWalletConnectInfo</code>.
210
+ * @param {(module:model/TransactionBabylonBusinessInfo|module:model/TransactionBabylonTxParameters|module:model/TransactionCoreStakeInfo|module:model/TransactionWalletConnectInfo)} obj The actual instance.
183
211
  */
184
212
  }, {
185
213
  key: "setActualInstance",
@@ -274,5 +302,23 @@ TransactionExtra.prototype['validator_address'] = undefined;
274
302
  * @member {String} reward_address
275
303
  */
276
304
  TransactionExtra.prototype['reward_address'] = undefined;
277
- TransactionExtra.OneOf = ["TransactionBabylonBusinessInfo", "TransactionBabylonTxParameters", "TransactionCoreStakeInfo"];
305
+
306
+ /**
307
+ * The dapp name that initiated this transaction.
308
+ * @member {String} dapp_name
309
+ */
310
+ TransactionExtra.prototype['dapp_name'] = undefined;
311
+
312
+ /**
313
+ * The dapp domain that initiated this transaction
314
+ * @member {String} dapp_domain
315
+ */
316
+ TransactionExtra.prototype['dapp_domain'] = undefined;
317
+
318
+ /**
319
+ * The session id that initiated this transaction
320
+ * @member {String} session_id
321
+ */
322
+ TransactionExtra.prototype['session_id'] = undefined;
323
+ TransactionExtra.OneOf = ["TransactionBabylonBusinessInfo", "TransactionBabylonTxParameters", "TransactionCoreStakeInfo", "TransactionWalletConnectInfo"];
278
324
  var _default = exports["default"] = TransactionExtra;
@@ -75,7 +75,10 @@ var TransactionRawTxInfo = /*#__PURE__*/function () {
75
75
  obj['unsigned_raw_tx'] = _ApiClient["default"].convertToType(data['unsigned_raw_tx'], 'String');
76
76
  }
77
77
  if (data.hasOwnProperty('utxo_change')) {
78
- obj['utxo_change'] = _TransactionUtxoChange["default"].constructFromObject(data['utxo_change']);
78
+ obj['utxo_change'] = _ApiClient["default"].convertToType(data['utxo_change'], _TransactionUtxoChange["default"]);
79
+ }
80
+ if (data.hasOwnProperty('utxo_changes')) {
81
+ obj['utxo_changes'] = _ApiClient["default"].convertToType(data['utxo_changes'], [_TransactionUtxoChange["default"]]);
79
82
  }
80
83
  }
81
84
  return obj;
@@ -125,6 +128,27 @@ var TransactionRawTxInfo = /*#__PURE__*/function () {
125
128
  _TransactionUtxoChange["default"].validateJSON(data['utxo_change']);
126
129
  }
127
130
  }
131
+ if (data['utxo_changes']) {
132
+ // data not null
133
+ // ensure the json data is an array
134
+ if (!Array.isArray(data['utxo_changes'])) {
135
+ throw new Error("Expected the field `utxo_changes` to be an array in the JSON data but got " + data['utxo_changes']);
136
+ }
137
+ // validate the optional field `utxo_changes` (array)
138
+ var _iterator2 = _createForOfIteratorHelper(data['utxo_changes']),
139
+ _step2;
140
+ try {
141
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
142
+ var _item = _step2.value;
143
+ _TransactionUtxoChange["default"].validateJSON(_item);
144
+ }
145
+ } catch (err) {
146
+ _iterator2.e(err);
147
+ } finally {
148
+ _iterator2.f();
149
+ }
150
+ ;
151
+ }
128
152
  return true;
129
153
  }
130
154
  }]);
@@ -154,7 +178,14 @@ TransactionRawTxInfo.prototype['raw_tx'] = undefined;
154
178
  TransactionRawTxInfo.prototype['unsigned_raw_tx'] = undefined;
155
179
 
156
180
  /**
181
+ * Deprecated. Use `utxo_changes` instead.
157
182
  * @member {module:model/TransactionUtxoChange} utxo_change
158
183
  */
159
184
  TransactionRawTxInfo.prototype['utxo_change'] = undefined;
185
+
186
+ /**
187
+ * The UTXO change outputs in the transaction.
188
+ * @member {Array.<module:model/TransactionUtxoChange>} utxo_changes
189
+ */
190
+ TransactionRawTxInfo.prototype['utxo_changes'] = undefined;
160
191
  var _default = exports["default"] = TransactionRawTxInfo;
@@ -63,6 +63,9 @@ var TransactionSelectedUtxo = /*#__PURE__*/function () {
63
63
  if (data.hasOwnProperty('vout_n')) {
64
64
  obj['vout_n'] = _ApiClient["default"].convertToType(data['vout_n'], 'Number');
65
65
  }
66
+ if (data.hasOwnProperty('token_id')) {
67
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
68
+ }
66
69
  if (data.hasOwnProperty('address')) {
67
70
  obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
68
71
  }
@@ -75,6 +78,12 @@ var TransactionSelectedUtxo = /*#__PURE__*/function () {
75
78
  if (data.hasOwnProperty('revealed_script')) {
76
79
  obj['revealed_script'] = _ApiClient["default"].convertToType(data['revealed_script'], 'String');
77
80
  }
81
+ if (data.hasOwnProperty('object_id')) {
82
+ obj['object_id'] = _ApiClient["default"].convertToType(data['object_id'], 'String');
83
+ }
84
+ if (data.hasOwnProperty('version')) {
85
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
86
+ }
78
87
  }
79
88
  return obj;
80
89
  }
@@ -92,6 +101,10 @@ var TransactionSelectedUtxo = /*#__PURE__*/function () {
92
101
  throw new Error("Expected the field `tx_hash` to be a primitive type in the JSON string but got " + data['tx_hash']);
93
102
  }
94
103
  // ensure the json data is a string
104
+ if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
105
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
106
+ }
107
+ // ensure the json data is a string
95
108
  if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
96
109
  throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
97
110
  }
@@ -107,6 +120,14 @@ var TransactionSelectedUtxo = /*#__PURE__*/function () {
107
120
  if (data['revealed_script'] && !(typeof data['revealed_script'] === 'string' || data['revealed_script'] instanceof String)) {
108
121
  throw new Error("Expected the field `revealed_script` to be a primitive type in the JSON string but got " + data['revealed_script']);
109
122
  }
123
+ // ensure the json data is a string
124
+ if (data['object_id'] && !(typeof data['object_id'] === 'string' || data['object_id'] instanceof String)) {
125
+ throw new Error("Expected the field `object_id` to be a primitive type in the JSON string but got " + data['object_id']);
126
+ }
127
+ // ensure the json data is a string
128
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
129
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
130
+ }
110
131
  return true;
111
132
  }
112
133
  }]);
@@ -123,6 +144,12 @@ TransactionSelectedUtxo.prototype['tx_hash'] = undefined;
123
144
  */
124
145
  TransactionSelectedUtxo.prototype['vout_n'] = undefined;
125
146
 
147
+ /**
148
+ * The token ID of the UTXO.
149
+ * @member {String} token_id
150
+ */
151
+ TransactionSelectedUtxo.prototype['token_id'] = undefined;
152
+
126
153
  /**
127
154
  * The address of the UTXO.
128
155
  * @member {String} address
@@ -146,4 +173,16 @@ TransactionSelectedUtxo.prototype['redeem_script'] = undefined;
146
173
  * @member {String} revealed_script
147
174
  */
148
175
  TransactionSelectedUtxo.prototype['revealed_script'] = undefined;
176
+
177
+ /**
178
+ * The ID of the blockchain object to spend (e.g., SUI Coin object).
179
+ * @member {String} object_id
180
+ */
181
+ TransactionSelectedUtxo.prototype['object_id'] = undefined;
182
+
183
+ /**
184
+ * Object version number.
185
+ * @member {String} version
186
+ */
187
+ TransactionSelectedUtxo.prototype['version'] = undefined;
149
188
  var _default = exports["default"] = TransactionSelectedUtxo;
@@ -63,6 +63,9 @@ var TransactionUtxoChange = /*#__PURE__*/function () {
63
63
  if (data.hasOwnProperty('value')) {
64
64
  obj['value'] = _ApiClient["default"].convertToType(data['value'], 'String');
65
65
  }
66
+ if (data.hasOwnProperty('token_id')) {
67
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
68
+ }
66
69
  }
67
70
  return obj;
68
71
  }
@@ -83,6 +86,10 @@ var TransactionUtxoChange = /*#__PURE__*/function () {
83
86
  if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) {
84
87
  throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']);
85
88
  }
89
+ // ensure the json data is a string
90
+ if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
91
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
92
+ }
86
93
  return true;
87
94
  }
88
95
  }]);
@@ -98,4 +105,10 @@ TransactionUtxoChange.prototype['address'] = undefined;
98
105
  * @member {String} value
99
106
  */
100
107
  TransactionUtxoChange.prototype['value'] = undefined;
108
+
109
+ /**
110
+ * The token ID of the UTXO change output.
111
+ * @member {String} token_id
112
+ */
113
+ TransactionUtxoChange.prototype['token_id'] = undefined;
101
114
  var _default = exports["default"] = TransactionUtxoChange;
@@ -0,0 +1,83 @@
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 _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ 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); } /**
15
+ * Cobo Wallet as a Service 2.0
16
+ *
17
+ * Contact: help@cobo.com
18
+ *
19
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20
+ * https://openapi-generator.tech
21
+ * Do not edit the class manually.
22
+ *
23
+ */
24
+ /**
25
+ * The TriggerTestPaymentWebhookEventResponse model module.
26
+ * @module model/TriggerTestPaymentWebhookEventResponse
27
+ */
28
+ var TriggerTestPaymentWebhookEventResponse = /*#__PURE__*/function () {
29
+ /**
30
+ * Constructs a new <code>TriggerTestPaymentWebhookEventResponse</code>.
31
+ * @alias module:model/TriggerTestPaymentWebhookEventResponse
32
+ */
33
+ function TriggerTestPaymentWebhookEventResponse() {
34
+ _classCallCheck(this, TriggerTestPaymentWebhookEventResponse);
35
+ TriggerTestPaymentWebhookEventResponse.initialize(this);
36
+ }
37
+
38
+ /**
39
+ * Initializes the fields of this object.
40
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
41
+ * Only for internal use.
42
+ */
43
+ return _createClass(TriggerTestPaymentWebhookEventResponse, null, [{
44
+ key: "initialize",
45
+ value: function initialize(obj) {}
46
+
47
+ /**
48
+ * Constructs a <code>TriggerTestPaymentWebhookEventResponse</code> from a plain JavaScript object, optionally creating a new instance.
49
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
50
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
51
+ * @param {module:model/TriggerTestPaymentWebhookEventResponse} obj Optional instance to populate.
52
+ * @return {module:model/TriggerTestPaymentWebhookEventResponse} The populated <code>TriggerTestPaymentWebhookEventResponse</code> instance.
53
+ */
54
+ }, {
55
+ key: "constructFromObject",
56
+ value: function constructFromObject(data, obj) {
57
+ if (data) {
58
+ obj = obj || new TriggerTestPaymentWebhookEventResponse();
59
+ if (data.hasOwnProperty('triggered')) {
60
+ obj['triggered'] = _ApiClient["default"].convertToType(data['triggered'], 'Boolean');
61
+ }
62
+ }
63
+ return obj;
64
+ }
65
+
66
+ /**
67
+ * Validates the JSON data with respect to <code>TriggerTestPaymentWebhookEventResponse</code>.
68
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
69
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TriggerTestPaymentWebhookEventResponse</code>.
70
+ */
71
+ }, {
72
+ key: "validateJSON",
73
+ value: function validateJSON(data) {
74
+ return true;
75
+ }
76
+ }]);
77
+ }();
78
+ /**
79
+ * Whether a test webhook event was successfully triggered. - `true`: The test webhook event was successfully triggered. - `false`: The test webhook event could not be triggered.
80
+ * @member {Boolean} triggered
81
+ */
82
+ TriggerTestPaymentWebhookEventResponse.prototype['triggered'] = undefined;
83
+ var _default = exports["default"] = TriggerTestPaymentWebhookEventResponse;
@@ -0,0 +1,115 @@
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 _WebhookEventType = _interopRequireDefault(require("./WebhookEventType"));
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 TriggerTestPaymentsWebhookEventRequest model module.
30
+ * @module model/TriggerTestPaymentsWebhookEventRequest
31
+ */
32
+ var TriggerTestPaymentsWebhookEventRequest = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>TriggerTestPaymentsWebhookEventRequest</code>.
35
+ * @alias module:model/TriggerTestPaymentsWebhookEventRequest
36
+ * @param event_type {module:model/WebhookEventType}
37
+ */
38
+ function TriggerTestPaymentsWebhookEventRequest(event_type) {
39
+ _classCallCheck(this, TriggerTestPaymentsWebhookEventRequest);
40
+ TriggerTestPaymentsWebhookEventRequest.initialize(this, event_type);
41
+ }
42
+
43
+ /**
44
+ * Initializes the fields of this object.
45
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
+ * Only for internal use.
47
+ */
48
+ return _createClass(TriggerTestPaymentsWebhookEventRequest, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj, event_type) {
51
+ obj['event_type'] = event_type;
52
+ }
53
+
54
+ /**
55
+ * Constructs a <code>TriggerTestPaymentsWebhookEventRequest</code> from a plain JavaScript object, optionally creating a new instance.
56
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
57
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
58
+ * @param {module:model/TriggerTestPaymentsWebhookEventRequest} obj Optional instance to populate.
59
+ * @return {module:model/TriggerTestPaymentsWebhookEventRequest} The populated <code>TriggerTestPaymentsWebhookEventRequest</code> instance.
60
+ */
61
+ }, {
62
+ key: "constructFromObject",
63
+ value: function constructFromObject(data, obj) {
64
+ if (data) {
65
+ obj = obj || new TriggerTestPaymentsWebhookEventRequest();
66
+ if (data.hasOwnProperty('event_type')) {
67
+ obj['event_type'] = _WebhookEventType["default"].constructFromObject(data['event_type']);
68
+ }
69
+ if (data.hasOwnProperty('override_data')) {
70
+ obj['override_data'] = _ApiClient["default"].convertToType(data['override_data'], Object);
71
+ }
72
+ }
73
+ return obj;
74
+ }
75
+
76
+ /**
77
+ * Validates the JSON data with respect to <code>TriggerTestPaymentsWebhookEventRequest</code>.
78
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
79
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TriggerTestPaymentsWebhookEventRequest</code>.
80
+ */
81
+ }, {
82
+ key: "validateJSON",
83
+ value: function validateJSON(data) {
84
+ // check to make sure all required properties are present in the JSON string
85
+ var _iterator = _createForOfIteratorHelper(TriggerTestPaymentsWebhookEventRequest.RequiredProperties),
86
+ _step;
87
+ try {
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ var property = _step.value;
90
+ if (!data.hasOwnProperty(property)) {
91
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
92
+ }
93
+ }
94
+ } catch (err) {
95
+ _iterator.e(err);
96
+ } finally {
97
+ _iterator.f();
98
+ }
99
+ return true;
100
+ }
101
+ }]);
102
+ }();
103
+ TriggerTestPaymentsWebhookEventRequest.RequiredProperties = ["event_type"];
104
+
105
+ /**
106
+ * @member {module:model/WebhookEventType} event_type
107
+ */
108
+ TriggerTestPaymentsWebhookEventRequest.prototype['event_type'] = undefined;
109
+
110
+ /**
111
+ * An optional object to customize the webhook event payload. Include only the fields you want to override. The provided fields must match the webhook event data structure for the specified event type. For the full event data structure, refer to the `data.data` property in the response of [List all webhook events](https://www.cobo.com/developers/v2/api-references/developers--webhooks/list-all-webhook-events). If this property is omitted, a default payload is returned.
112
+ * @member {Object} override_data
113
+ */
114
+ TriggerTestPaymentsWebhookEventRequest.prototype['override_data'] = undefined;
115
+ var _default = exports["default"] = TriggerTestPaymentsWebhookEventRequest;
@@ -84,6 +84,18 @@ var UTXO = /*#__PURE__*/function () {
84
84
  if (data.hasOwnProperty('is_frozen')) {
85
85
  obj['is_frozen'] = _ApiClient["default"].convertToType(data['is_frozen'], 'Boolean');
86
86
  }
87
+ if (data.hasOwnProperty('is_change')) {
88
+ obj['is_change'] = _ApiClient["default"].convertToType(data['is_change'], 'Boolean');
89
+ }
90
+ if (data.hasOwnProperty('chain_id')) {
91
+ obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
92
+ }
93
+ if (data.hasOwnProperty('object_id')) {
94
+ obj['object_id'] = _ApiClient["default"].convertToType(data['object_id'], 'String');
95
+ }
96
+ if (data.hasOwnProperty('version')) {
97
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
98
+ }
87
99
  }
88
100
  return obj;
89
101
  }
@@ -112,6 +124,18 @@ var UTXO = /*#__PURE__*/function () {
112
124
  if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) {
113
125
  throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']);
114
126
  }
127
+ // ensure the json data is a string
128
+ if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
129
+ throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
130
+ }
131
+ // ensure the json data is a string
132
+ if (data['object_id'] && !(typeof data['object_id'] === 'string' || data['object_id'] instanceof String)) {
133
+ throw new Error("Expected the field `object_id` to be a primitive type in the JSON string but got " + data['object_id']);
134
+ }
135
+ // ensure the json data is a string
136
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
137
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
138
+ }
115
139
  return true;
116
140
  }
117
141
  }]);
@@ -169,4 +193,28 @@ UTXO.prototype['confirmed_number'] = undefined;
169
193
  * @member {Boolean} is_frozen
170
194
  */
171
195
  UTXO.prototype['is_frozen'] = undefined;
196
+
197
+ /**
198
+ * Whether the UTXO is a change output of a transaction.
199
+ * @member {Boolean} is_change
200
+ */
201
+ UTXO.prototype['is_change'] = undefined;
202
+
203
+ /**
204
+ * The chain ID, which is the unique identifier of a blockchain.
205
+ * @member {String} chain_id
206
+ */
207
+ UTXO.prototype['chain_id'] = undefined;
208
+
209
+ /**
210
+ * The ID of the blockchain object to spend (e.g., SUI Coin object).
211
+ * @member {String} object_id
212
+ */
213
+ UTXO.prototype['object_id'] = undefined;
214
+
215
+ /**
216
+ * Object version number.
217
+ * @member {String} version
218
+ */
219
+ UTXO.prototype['version'] = undefined;
172
220
  var _default = exports["default"] = UTXO;