@cobo/cobo-waas2 1.30.0 → 1.31.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/README.md +5 -36
- package/dist/ApiClient.js +1 -1
- package/dist/api/PaymentApi.js +39 -931
- package/dist/index.js +21 -105
- package/dist/model/Balance.js +14 -0
- package/dist/model/BridgingFee.js +9 -0
- package/dist/model/ContractCallParams.js +16 -0
- package/dist/model/CreatePaymentOrderRequest.js +4 -3
- package/dist/model/CreateTopUpAddresses.js +2 -2
- package/dist/model/CreateWalletAddress.js +2 -2
- package/dist/model/PaymentBridgeStatus.js +61 -0
- package/dist/model/PaymentBulkSendItem.js +9 -9
- package/dist/model/PaymentPayout.js +35 -4
- package/dist/model/PaymentPayoutDetail.js +49 -13
- package/dist/model/PaymentPayoutEvent.js +49 -13
- package/dist/model/PreCheck.js +89 -0
- package/dist/model/SkipCheckType.js +56 -0
- package/dist/model/SupportedToken.js +17 -17
- package/dist/model/TransferParams.js +16 -0
- package/dist/model/WebhookEventData.js +6 -0
- package/dist/model/WebhookEventType.js +15 -0
- package/docs/Balance.md +1 -0
- package/docs/BridgingFee.md +1 -0
- package/docs/ContractCallParams.md +1 -0
- package/docs/CreatePaymentOrderRequest.md +2 -2
- package/docs/CreateTopUpAddresses.md +1 -1
- package/docs/CreateWalletAddress.md +1 -1
- package/docs/PaymentApi.md +117 -1138
- package/docs/PaymentBridgeStatus.md +12 -0
- package/docs/PaymentBulkSendItem.md +5 -5
- package/docs/PaymentPayout.md +2 -1
- package/docs/PaymentPayoutDetail.md +2 -1
- package/docs/PaymentPayoutEvent.md +2 -1
- package/docs/PreCheck.md +9 -0
- package/docs/SkipCheckType.md +10 -0
- package/docs/SupportedToken.md +10 -10
- package/docs/TransferParams.md +1 -0
- package/docs/WebhookEventData.md +1 -0
- package/docs/WebhookEventType.md +6 -0
- package/package.json +1 -1
- package/dist/model/CreateCounterpartyWalletAddressRequest.js +0 -140
- package/dist/model/CreateDestinationBankAccountRequest.js +0 -272
- package/dist/model/CreateDestinationWalletAddressRequest.js +0 -140
- package/dist/model/DeleteCounterparty200Response.js +0 -110
- package/dist/model/DeleteCounterpartyWalletAddress200Response.js +0 -110
- package/dist/model/DeleteDestination200Response.js +0 -110
- package/dist/model/DeleteDestinationBankAccount200Response.js +0 -110
- package/dist/model/DeleteDestinationWalletAddress200Response.js +0 -110
- package/dist/model/EnableDestinationWhitelistRequest.js +0 -106
- package/dist/model/ListCounterpartyWalletAddress200Response.js +0 -123
- package/dist/model/ListDestinationBankAccounts200Response.js +0 -123
- package/dist/model/ListDestinationWalletAddresses200Response.js +0 -123
- package/dist/model/QueryDestinationWhitelistEnabled200Response.js +0 -106
- package/dist/model/UpdateCounterpartyByIdRequest.js +0 -160
- package/dist/model/UpdateDestinationByIdRequest.js +0 -173
- package/docs/CreateCounterpartyWalletAddressRequest.md +0 -11
- package/docs/CreateDestinationBankAccountRequest.md +0 -20
- package/docs/CreateDestinationWalletAddressRequest.md +0 -11
- package/docs/DeleteCounterparty200Response.md +0 -9
- package/docs/DeleteCounterpartyWalletAddress200Response.md +0 -9
- package/docs/DeleteDestination200Response.md +0 -9
- package/docs/DeleteDestinationBankAccount200Response.md +0 -9
- package/docs/DeleteDestinationWalletAddress200Response.md +0 -9
- package/docs/EnableDestinationWhitelistRequest.md +0 -9
- package/docs/ListCounterpartyWalletAddress200Response.md +0 -10
- package/docs/ListDestinationBankAccounts200Response.md +0 -10
- package/docs/ListDestinationWalletAddresses200Response.md +0 -10
- package/docs/QueryDestinationWhitelistEnabled200Response.md +0 -9
- package/docs/UpdateCounterpartyByIdRequest.md +0 -13
- package/docs/UpdateDestinationByIdRequest.md +0 -14
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _CommissionFee = _interopRequireDefault(require("./CommissionFee"));
|
|
8
9
|
var _PaymentPayoutItem = _interopRequireDefault(require("./PaymentPayoutItem"));
|
|
9
10
|
var _PaymentPayoutRecipientInfo = _interopRequireDefault(require("./PaymentPayoutRecipientInfo"));
|
|
10
11
|
var _PaymentPayoutStatus = _interopRequireDefault(require("./PaymentPayoutStatus"));
|
|
@@ -100,12 +101,15 @@ var PaymentPayout = /*#__PURE__*/function () {
|
|
|
100
101
|
if (data.hasOwnProperty('actual_payout_amount')) {
|
|
101
102
|
obj['actual_payout_amount'] = _ApiClient["default"].convertToType(data['actual_payout_amount'], 'String');
|
|
102
103
|
}
|
|
103
|
-
if (data.hasOwnProperty('
|
|
104
|
-
obj['
|
|
104
|
+
if (data.hasOwnProperty('commission_fees')) {
|
|
105
|
+
obj['commission_fees'] = _ApiClient["default"].convertToType(data['commission_fees'], [_CommissionFee["default"]]);
|
|
105
106
|
}
|
|
106
107
|
if (data.hasOwnProperty('remark')) {
|
|
107
108
|
obj['remark'] = _ApiClient["default"].convertToType(data['remark'], 'String');
|
|
108
109
|
}
|
|
110
|
+
if (data.hasOwnProperty('status')) {
|
|
111
|
+
obj['status'] = _PaymentPayoutStatus["default"].constructFromObject(data['status']);
|
|
112
|
+
}
|
|
109
113
|
if (data.hasOwnProperty('created_timestamp')) {
|
|
110
114
|
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
111
115
|
}
|
|
@@ -187,6 +191,27 @@ var PaymentPayout = /*#__PURE__*/function () {
|
|
|
187
191
|
if (data['actual_payout_amount'] && !(typeof data['actual_payout_amount'] === 'string' || data['actual_payout_amount'] instanceof String)) {
|
|
188
192
|
throw new Error("Expected the field `actual_payout_amount` to be a primitive type in the JSON string but got " + data['actual_payout_amount']);
|
|
189
193
|
}
|
|
194
|
+
if (data['commission_fees']) {
|
|
195
|
+
// data not null
|
|
196
|
+
// ensure the json data is an array
|
|
197
|
+
if (!Array.isArray(data['commission_fees'])) {
|
|
198
|
+
throw new Error("Expected the field `commission_fees` to be an array in the JSON data but got " + data['commission_fees']);
|
|
199
|
+
}
|
|
200
|
+
// validate the optional field `commission_fees` (array)
|
|
201
|
+
var _iterator3 = _createForOfIteratorHelper(data['commission_fees']),
|
|
202
|
+
_step3;
|
|
203
|
+
try {
|
|
204
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
205
|
+
var _item = _step3.value;
|
|
206
|
+
_CommissionFee["default"].validateJSON(_item);
|
|
207
|
+
}
|
|
208
|
+
} catch (err) {
|
|
209
|
+
_iterator3.e(err);
|
|
210
|
+
} finally {
|
|
211
|
+
_iterator3.f();
|
|
212
|
+
}
|
|
213
|
+
;
|
|
214
|
+
}
|
|
190
215
|
// ensure the json data is a string
|
|
191
216
|
if (data['remark'] && !(typeof data['remark'] === 'string' || data['remark'] instanceof String)) {
|
|
192
217
|
throw new Error("Expected the field `remark` to be a primitive type in the JSON string but got " + data['remark']);
|
|
@@ -244,9 +269,10 @@ PaymentPayout.prototype['initiator'] = undefined;
|
|
|
244
269
|
PaymentPayout.prototype['actual_payout_amount'] = undefined;
|
|
245
270
|
|
|
246
271
|
/**
|
|
247
|
-
*
|
|
272
|
+
* The commission fees of the payout.
|
|
273
|
+
* @member {Array.<module:model/CommissionFee>} commission_fees
|
|
248
274
|
*/
|
|
249
|
-
PaymentPayout.prototype['
|
|
275
|
+
PaymentPayout.prototype['commission_fees'] = undefined;
|
|
250
276
|
|
|
251
277
|
/**
|
|
252
278
|
* A note or comment about the payout.
|
|
@@ -254,6 +280,11 @@ PaymentPayout.prototype['status'] = undefined;
|
|
|
254
280
|
*/
|
|
255
281
|
PaymentPayout.prototype['remark'] = undefined;
|
|
256
282
|
|
|
283
|
+
/**
|
|
284
|
+
* @member {module:model/PaymentPayoutStatus} status
|
|
285
|
+
*/
|
|
286
|
+
PaymentPayout.prototype['status'] = undefined;
|
|
287
|
+
|
|
257
288
|
/**
|
|
258
289
|
* The created time of the payout, represented as a UNIX timestamp in seconds.
|
|
259
290
|
* @member {Number} created_timestamp
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _CommissionFee = _interopRequireDefault(require("./CommissionFee"));
|
|
8
9
|
var _PaymentPayout = _interopRequireDefault(require("./PaymentPayout"));
|
|
9
10
|
var _PaymentPayoutItem = _interopRequireDefault(require("./PaymentPayoutItem"));
|
|
10
11
|
var _PaymentPayoutRecipientInfo = _interopRequireDefault(require("./PaymentPayoutRecipientInfo"));
|
|
@@ -105,12 +106,15 @@ var PaymentPayoutDetail = /*#__PURE__*/function () {
|
|
|
105
106
|
if (data.hasOwnProperty('actual_payout_amount')) {
|
|
106
107
|
obj['actual_payout_amount'] = _ApiClient["default"].convertToType(data['actual_payout_amount'], 'String');
|
|
107
108
|
}
|
|
108
|
-
if (data.hasOwnProperty('
|
|
109
|
-
obj['
|
|
109
|
+
if (data.hasOwnProperty('commission_fees')) {
|
|
110
|
+
obj['commission_fees'] = _ApiClient["default"].convertToType(data['commission_fees'], [_CommissionFee["default"]]);
|
|
110
111
|
}
|
|
111
112
|
if (data.hasOwnProperty('remark')) {
|
|
112
113
|
obj['remark'] = _ApiClient["default"].convertToType(data['remark'], 'String');
|
|
113
114
|
}
|
|
115
|
+
if (data.hasOwnProperty('status')) {
|
|
116
|
+
obj['status'] = _PaymentPayoutStatus["default"].constructFromObject(data['status']);
|
|
117
|
+
}
|
|
114
118
|
if (data.hasOwnProperty('created_timestamp')) {
|
|
115
119
|
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
116
120
|
}
|
|
@@ -195,6 +199,27 @@ var PaymentPayoutDetail = /*#__PURE__*/function () {
|
|
|
195
199
|
if (data['actual_payout_amount'] && !(typeof data['actual_payout_amount'] === 'string' || data['actual_payout_amount'] instanceof String)) {
|
|
196
200
|
throw new Error("Expected the field `actual_payout_amount` to be a primitive type in the JSON string but got " + data['actual_payout_amount']);
|
|
197
201
|
}
|
|
202
|
+
if (data['commission_fees']) {
|
|
203
|
+
// data not null
|
|
204
|
+
// ensure the json data is an array
|
|
205
|
+
if (!Array.isArray(data['commission_fees'])) {
|
|
206
|
+
throw new Error("Expected the field `commission_fees` to be an array in the JSON data but got " + data['commission_fees']);
|
|
207
|
+
}
|
|
208
|
+
// validate the optional field `commission_fees` (array)
|
|
209
|
+
var _iterator3 = _createForOfIteratorHelper(data['commission_fees']),
|
|
210
|
+
_step3;
|
|
211
|
+
try {
|
|
212
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
213
|
+
var _item = _step3.value;
|
|
214
|
+
_CommissionFee["default"].validateJSON(_item);
|
|
215
|
+
}
|
|
216
|
+
} catch (err) {
|
|
217
|
+
_iterator3.e(err);
|
|
218
|
+
} finally {
|
|
219
|
+
_iterator3.f();
|
|
220
|
+
}
|
|
221
|
+
;
|
|
222
|
+
}
|
|
198
223
|
// ensure the json data is a string
|
|
199
224
|
if (data['remark'] && !(typeof data['remark'] === 'string' || data['remark'] instanceof String)) {
|
|
200
225
|
throw new Error("Expected the field `remark` to be a primitive type in the JSON string but got " + data['remark']);
|
|
@@ -206,17 +231,17 @@ var PaymentPayoutDetail = /*#__PURE__*/function () {
|
|
|
206
231
|
throw new Error("Expected the field `transactions` to be an array in the JSON data but got " + data['transactions']);
|
|
207
232
|
}
|
|
208
233
|
// validate the optional field `transactions` (array)
|
|
209
|
-
var
|
|
210
|
-
|
|
234
|
+
var _iterator4 = _createForOfIteratorHelper(data['transactions']),
|
|
235
|
+
_step4;
|
|
211
236
|
try {
|
|
212
|
-
for (
|
|
213
|
-
var
|
|
214
|
-
_PaymentTransaction["default"].validateJSON(
|
|
237
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
238
|
+
var _item2 = _step4.value;
|
|
239
|
+
_PaymentTransaction["default"].validateJSON(_item2);
|
|
215
240
|
}
|
|
216
241
|
} catch (err) {
|
|
217
|
-
|
|
242
|
+
_iterator4.e(err);
|
|
218
243
|
} finally {
|
|
219
|
-
|
|
244
|
+
_iterator4.f();
|
|
220
245
|
}
|
|
221
246
|
;
|
|
222
247
|
}
|
|
@@ -273,9 +298,10 @@ PaymentPayoutDetail.prototype['initiator'] = undefined;
|
|
|
273
298
|
PaymentPayoutDetail.prototype['actual_payout_amount'] = undefined;
|
|
274
299
|
|
|
275
300
|
/**
|
|
276
|
-
*
|
|
301
|
+
* The commission fees of the payout.
|
|
302
|
+
* @member {Array.<module:model/CommissionFee>} commission_fees
|
|
277
303
|
*/
|
|
278
|
-
PaymentPayoutDetail.prototype['
|
|
304
|
+
PaymentPayoutDetail.prototype['commission_fees'] = undefined;
|
|
279
305
|
|
|
280
306
|
/**
|
|
281
307
|
* A note or comment about the payout.
|
|
@@ -283,6 +309,11 @@ PaymentPayoutDetail.prototype['status'] = undefined;
|
|
|
283
309
|
*/
|
|
284
310
|
PaymentPayoutDetail.prototype['remark'] = undefined;
|
|
285
311
|
|
|
312
|
+
/**
|
|
313
|
+
* @member {module:model/PaymentPayoutStatus} status
|
|
314
|
+
*/
|
|
315
|
+
PaymentPayoutDetail.prototype['status'] = undefined;
|
|
316
|
+
|
|
286
317
|
/**
|
|
287
318
|
* The created time of the payout, represented as a UNIX timestamp in seconds.
|
|
288
319
|
* @member {Number} created_timestamp
|
|
@@ -341,14 +372,19 @@ _PaymentPayout["default"].prototype['initiator'] = undefined;
|
|
|
341
372
|
*/
|
|
342
373
|
_PaymentPayout["default"].prototype['actual_payout_amount'] = undefined;
|
|
343
374
|
/**
|
|
344
|
-
*
|
|
375
|
+
* The commission fees of the payout.
|
|
376
|
+
* @member {Array.<module:model/CommissionFee>} commission_fees
|
|
345
377
|
*/
|
|
346
|
-
_PaymentPayout["default"].prototype['
|
|
378
|
+
_PaymentPayout["default"].prototype['commission_fees'] = undefined;
|
|
347
379
|
/**
|
|
348
380
|
* A note or comment about the payout.
|
|
349
381
|
* @member {String} remark
|
|
350
382
|
*/
|
|
351
383
|
_PaymentPayout["default"].prototype['remark'] = undefined;
|
|
384
|
+
/**
|
|
385
|
+
* @member {module:model/PaymentPayoutStatus} status
|
|
386
|
+
*/
|
|
387
|
+
_PaymentPayout["default"].prototype['status'] = undefined;
|
|
352
388
|
/**
|
|
353
389
|
* The created time of the payout, represented as a UNIX timestamp in seconds.
|
|
354
390
|
* @member {Number} created_timestamp
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _CommissionFee = _interopRequireDefault(require("./CommissionFee"));
|
|
8
9
|
var _PaymentPayoutDetail = _interopRequireDefault(require("./PaymentPayoutDetail"));
|
|
9
10
|
var _PaymentPayoutItem = _interopRequireDefault(require("./PaymentPayoutItem"));
|
|
10
11
|
var _PaymentPayoutRecipientInfo = _interopRequireDefault(require("./PaymentPayoutRecipientInfo"));
|
|
@@ -114,12 +115,15 @@ var PaymentPayoutEvent = /*#__PURE__*/function () {
|
|
|
114
115
|
if (data.hasOwnProperty('actual_payout_amount')) {
|
|
115
116
|
obj['actual_payout_amount'] = _ApiClient["default"].convertToType(data['actual_payout_amount'], 'String');
|
|
116
117
|
}
|
|
117
|
-
if (data.hasOwnProperty('
|
|
118
|
-
obj['
|
|
118
|
+
if (data.hasOwnProperty('commission_fees')) {
|
|
119
|
+
obj['commission_fees'] = _ApiClient["default"].convertToType(data['commission_fees'], [_CommissionFee["default"]]);
|
|
119
120
|
}
|
|
120
121
|
if (data.hasOwnProperty('remark')) {
|
|
121
122
|
obj['remark'] = _ApiClient["default"].convertToType(data['remark'], 'String');
|
|
122
123
|
}
|
|
124
|
+
if (data.hasOwnProperty('status')) {
|
|
125
|
+
obj['status'] = _PaymentPayoutStatus["default"].constructFromObject(data['status']);
|
|
126
|
+
}
|
|
123
127
|
if (data.hasOwnProperty('created_timestamp')) {
|
|
124
128
|
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
125
129
|
}
|
|
@@ -208,6 +212,27 @@ var PaymentPayoutEvent = /*#__PURE__*/function () {
|
|
|
208
212
|
if (data['actual_payout_amount'] && !(typeof data['actual_payout_amount'] === 'string' || data['actual_payout_amount'] instanceof String)) {
|
|
209
213
|
throw new Error("Expected the field `actual_payout_amount` to be a primitive type in the JSON string but got " + data['actual_payout_amount']);
|
|
210
214
|
}
|
|
215
|
+
if (data['commission_fees']) {
|
|
216
|
+
// data not null
|
|
217
|
+
// ensure the json data is an array
|
|
218
|
+
if (!Array.isArray(data['commission_fees'])) {
|
|
219
|
+
throw new Error("Expected the field `commission_fees` to be an array in the JSON data but got " + data['commission_fees']);
|
|
220
|
+
}
|
|
221
|
+
// validate the optional field `commission_fees` (array)
|
|
222
|
+
var _iterator3 = _createForOfIteratorHelper(data['commission_fees']),
|
|
223
|
+
_step3;
|
|
224
|
+
try {
|
|
225
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
226
|
+
var _item = _step3.value;
|
|
227
|
+
_CommissionFee["default"].validateJSON(_item);
|
|
228
|
+
}
|
|
229
|
+
} catch (err) {
|
|
230
|
+
_iterator3.e(err);
|
|
231
|
+
} finally {
|
|
232
|
+
_iterator3.f();
|
|
233
|
+
}
|
|
234
|
+
;
|
|
235
|
+
}
|
|
211
236
|
// ensure the json data is a string
|
|
212
237
|
if (data['remark'] && !(typeof data['remark'] === 'string' || data['remark'] instanceof String)) {
|
|
213
238
|
throw new Error("Expected the field `remark` to be a primitive type in the JSON string but got " + data['remark']);
|
|
@@ -219,17 +244,17 @@ var PaymentPayoutEvent = /*#__PURE__*/function () {
|
|
|
219
244
|
throw new Error("Expected the field `transactions` to be an array in the JSON data but got " + data['transactions']);
|
|
220
245
|
}
|
|
221
246
|
// validate the optional field `transactions` (array)
|
|
222
|
-
var
|
|
223
|
-
|
|
247
|
+
var _iterator4 = _createForOfIteratorHelper(data['transactions']),
|
|
248
|
+
_step4;
|
|
224
249
|
try {
|
|
225
|
-
for (
|
|
226
|
-
var
|
|
227
|
-
_PaymentTransaction["default"].validateJSON(
|
|
250
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
251
|
+
var _item2 = _step4.value;
|
|
252
|
+
_PaymentTransaction["default"].validateJSON(_item2);
|
|
228
253
|
}
|
|
229
254
|
} catch (err) {
|
|
230
|
-
|
|
255
|
+
_iterator4.e(err);
|
|
231
256
|
} finally {
|
|
232
|
-
|
|
257
|
+
_iterator4.f();
|
|
233
258
|
}
|
|
234
259
|
;
|
|
235
260
|
}
|
|
@@ -292,9 +317,10 @@ PaymentPayoutEvent.prototype['initiator'] = undefined;
|
|
|
292
317
|
PaymentPayoutEvent.prototype['actual_payout_amount'] = undefined;
|
|
293
318
|
|
|
294
319
|
/**
|
|
295
|
-
*
|
|
320
|
+
* The commission fees of the payout.
|
|
321
|
+
* @member {Array.<module:model/CommissionFee>} commission_fees
|
|
296
322
|
*/
|
|
297
|
-
PaymentPayoutEvent.prototype['
|
|
323
|
+
PaymentPayoutEvent.prototype['commission_fees'] = undefined;
|
|
298
324
|
|
|
299
325
|
/**
|
|
300
326
|
* A note or comment about the payout.
|
|
@@ -302,6 +328,11 @@ PaymentPayoutEvent.prototype['status'] = undefined;
|
|
|
302
328
|
*/
|
|
303
329
|
PaymentPayoutEvent.prototype['remark'] = undefined;
|
|
304
330
|
|
|
331
|
+
/**
|
|
332
|
+
* @member {module:model/PaymentPayoutStatus} status
|
|
333
|
+
*/
|
|
334
|
+
PaymentPayoutEvent.prototype['status'] = undefined;
|
|
335
|
+
|
|
305
336
|
/**
|
|
306
337
|
* The created time of the payout, represented as a UNIX timestamp in seconds.
|
|
307
338
|
* @member {Number} created_timestamp
|
|
@@ -366,14 +397,19 @@ _PaymentPayoutDetail["default"].prototype['initiator'] = undefined;
|
|
|
366
397
|
*/
|
|
367
398
|
_PaymentPayoutDetail["default"].prototype['actual_payout_amount'] = undefined;
|
|
368
399
|
/**
|
|
369
|
-
*
|
|
400
|
+
* The commission fees of the payout.
|
|
401
|
+
* @member {Array.<module:model/CommissionFee>} commission_fees
|
|
370
402
|
*/
|
|
371
|
-
_PaymentPayoutDetail["default"].prototype['
|
|
403
|
+
_PaymentPayoutDetail["default"].prototype['commission_fees'] = undefined;
|
|
372
404
|
/**
|
|
373
405
|
* A note or comment about the payout.
|
|
374
406
|
* @member {String} remark
|
|
375
407
|
*/
|
|
376
408
|
_PaymentPayoutDetail["default"].prototype['remark'] = undefined;
|
|
409
|
+
/**
|
|
410
|
+
* @member {module:model/PaymentPayoutStatus} status
|
|
411
|
+
*/
|
|
412
|
+
_PaymentPayoutDetail["default"].prototype['status'] = undefined;
|
|
377
413
|
/**
|
|
378
414
|
* The created time of the payout, represented as a UNIX timestamp in seconds.
|
|
379
415
|
* @member {Number} created_timestamp
|
|
@@ -0,0 +1,89 @@
|
|
|
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 _SkipCheckType = _interopRequireDefault(require("./SkipCheckType"));
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
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); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), 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
|
+
* The PreCheck model module.
|
|
27
|
+
* @module model/PreCheck
|
|
28
|
+
*/
|
|
29
|
+
var PreCheck = /*#__PURE__*/function () {
|
|
30
|
+
/**
|
|
31
|
+
* Constructs a new <code>PreCheck</code>.
|
|
32
|
+
* Some validation settings for creating a transaction.
|
|
33
|
+
* @alias module:model/PreCheck
|
|
34
|
+
*/
|
|
35
|
+
function PreCheck() {
|
|
36
|
+
_classCallCheck(this, PreCheck);
|
|
37
|
+
PreCheck.initialize(this);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Initializes the fields of this object.
|
|
42
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
43
|
+
* Only for internal use.
|
|
44
|
+
*/
|
|
45
|
+
return _createClass(PreCheck, null, [{
|
|
46
|
+
key: "initialize",
|
|
47
|
+
value: function initialize(obj) {}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Constructs a <code>PreCheck</code> from a plain JavaScript object, optionally creating a new instance.
|
|
51
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
52
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
53
|
+
* @param {module:model/PreCheck} obj Optional instance to populate.
|
|
54
|
+
* @return {module:model/PreCheck} The populated <code>PreCheck</code> instance.
|
|
55
|
+
*/
|
|
56
|
+
}, {
|
|
57
|
+
key: "constructFromObject",
|
|
58
|
+
value: function constructFromObject(data, obj) {
|
|
59
|
+
if (data) {
|
|
60
|
+
obj = obj || new PreCheck();
|
|
61
|
+
if (data.hasOwnProperty('skip_checks')) {
|
|
62
|
+
obj['skip_checks'] = _ApiClient["default"].convertToType(data['skip_checks'], [_SkipCheckType["default"]]);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return obj;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Validates the JSON data with respect to <code>PreCheck</code>.
|
|
70
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
71
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>PreCheck</code>.
|
|
72
|
+
*/
|
|
73
|
+
}, {
|
|
74
|
+
key: "validateJSON",
|
|
75
|
+
value: function validateJSON(data) {
|
|
76
|
+
// ensure the json data is an array
|
|
77
|
+
if (!Array.isArray(data['skip_checks'])) {
|
|
78
|
+
throw new Error("Expected the field `skip_checks` to be an array in the JSON data but got " + data['skip_checks']);
|
|
79
|
+
}
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
}]);
|
|
83
|
+
}();
|
|
84
|
+
/**
|
|
85
|
+
* Selection to skip verification.
|
|
86
|
+
* @member {Array.<module:model/SkipCheckType>} skip_checks
|
|
87
|
+
*/
|
|
88
|
+
PreCheck.prototype['skip_checks'] = undefined;
|
|
89
|
+
var _default = exports["default"] = PreCheck;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 SkipCheckType.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var SkipCheckType = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function SkipCheckType() {
|
|
32
|
+
_classCallCheck(this, SkipCheckType);
|
|
33
|
+
/**
|
|
34
|
+
* value: "OnchainFeeBalance"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "OnchainFeeBalance", "OnchainFeeBalance");
|
|
38
|
+
/**
|
|
39
|
+
* value: "unknown_default_open_api"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
43
|
+
}
|
|
44
|
+
return _createClass(SkipCheckType, null, [{
|
|
45
|
+
key: "constructFromObject",
|
|
46
|
+
value:
|
|
47
|
+
/**
|
|
48
|
+
* Returns a <code>SkipCheckType</code> enum value from a Javascript object name.
|
|
49
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
50
|
+
* @return {module:model/SkipCheckType} The enum <code>SkipCheckType</code> value.
|
|
51
|
+
*/
|
|
52
|
+
function constructFromObject(object) {
|
|
53
|
+
return object;
|
|
54
|
+
}
|
|
55
|
+
}]);
|
|
56
|
+
}();
|
|
@@ -32,13 +32,13 @@ var SupportedToken = /*#__PURE__*/function () {
|
|
|
32
32
|
/**
|
|
33
33
|
* Constructs a new <code>SupportedToken</code>.
|
|
34
34
|
* @alias module:model/SupportedToken
|
|
35
|
-
* @param token_id {String}
|
|
36
|
-
* @param name {String}
|
|
37
|
-
* @param symbol {String}
|
|
38
|
-
* @param decimal {Number}
|
|
39
|
-
* @param token_address {String}
|
|
40
|
-
* @param chain_id {String}
|
|
41
|
-
* @param chain_symbol {String}
|
|
35
|
+
* @param token_id {String} The unique identifier of the token, in the format of `{chain_id}_{token_symbol}`.
|
|
36
|
+
* @param name {String} The full name of the token.
|
|
37
|
+
* @param symbol {String} The symbol of the token.
|
|
38
|
+
* @param decimal {Number} The number of decimal places for the token. This value is used to convert between the token's smallest unit and its display value.
|
|
39
|
+
* @param token_address {String} The contract address of the token. This is `null` for native coins (e.g., ETH on Ethereum).
|
|
40
|
+
* @param chain_id {String} The ID of the chain on which the token exists.
|
|
41
|
+
* @param chain_symbol {String} The symbol of the chain on which the token exists.
|
|
42
42
|
*/
|
|
43
43
|
function SupportedToken(token_id, name, symbol, decimal, token_address, chain_id, chain_symbol) {
|
|
44
44
|
_classCallCheck(this, SupportedToken);
|
|
@@ -170,61 +170,61 @@ var SupportedToken = /*#__PURE__*/function () {
|
|
|
170
170
|
SupportedToken.RequiredProperties = ["token_id", "name", "symbol", "decimal", "token_address", "chain_id", "chain_symbol"];
|
|
171
171
|
|
|
172
172
|
/**
|
|
173
|
-
*
|
|
173
|
+
* The unique identifier of the token, in the format of `{chain_id}_{token_symbol}`.
|
|
174
174
|
* @member {String} token_id
|
|
175
175
|
*/
|
|
176
176
|
SupportedToken.prototype['token_id'] = undefined;
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
|
-
*
|
|
179
|
+
* The full name of the token.
|
|
180
180
|
* @member {String} name
|
|
181
181
|
*/
|
|
182
182
|
SupportedToken.prototype['name'] = undefined;
|
|
183
183
|
|
|
184
184
|
/**
|
|
185
|
-
*
|
|
185
|
+
* The symbol of the token.
|
|
186
186
|
* @member {String} symbol
|
|
187
187
|
*/
|
|
188
188
|
SupportedToken.prototype['symbol'] = undefined;
|
|
189
189
|
|
|
190
190
|
/**
|
|
191
|
-
*
|
|
191
|
+
* The number of decimal places for the token. This value is used to convert between the token's smallest unit and its display value.
|
|
192
192
|
* @member {Number} decimal
|
|
193
193
|
*/
|
|
194
194
|
SupportedToken.prototype['decimal'] = undefined;
|
|
195
195
|
|
|
196
196
|
/**
|
|
197
|
-
*
|
|
197
|
+
* The contract address of the token. This is `null` for native coins (e.g., ETH on Ethereum).
|
|
198
198
|
* @member {String} token_address
|
|
199
199
|
*/
|
|
200
200
|
SupportedToken.prototype['token_address'] = undefined;
|
|
201
201
|
|
|
202
202
|
/**
|
|
203
|
-
*
|
|
203
|
+
* The ID of the chain on which the token exists.
|
|
204
204
|
* @member {String} chain_id
|
|
205
205
|
*/
|
|
206
206
|
SupportedToken.prototype['chain_id'] = undefined;
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
|
-
*
|
|
209
|
+
* The symbol of the chain on which the token exists.
|
|
210
210
|
* @member {String} chain_symbol
|
|
211
211
|
*/
|
|
212
212
|
SupportedToken.prototype['chain_symbol'] = undefined;
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
|
-
* URL
|
|
215
|
+
* The URL of the chain icon image.
|
|
216
216
|
* @member {String} chain_icon_url
|
|
217
217
|
*/
|
|
218
218
|
SupportedToken.prototype['chain_icon_url'] = undefined;
|
|
219
219
|
|
|
220
220
|
/**
|
|
221
|
-
* URL
|
|
221
|
+
* The URL of the token icon image.
|
|
222
222
|
* @member {String} token_icon_url
|
|
223
223
|
*/
|
|
224
224
|
SupportedToken.prototype['token_icon_url'] = undefined;
|
|
225
225
|
|
|
226
226
|
/**
|
|
227
|
-
* Whether the token
|
|
227
|
+
* Whether the token supports fiat off-ramp. - `true`: The token can be used for fiat off-ramp. - `false`: The token cannot be used for fiat off-ramp.
|
|
228
228
|
* @member {Boolean} can_off_ramp
|
|
229
229
|
*/
|
|
230
230
|
SupportedToken.prototype['can_off_ramp'] = undefined;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _AutoFuelType = _interopRequireDefault(require("./AutoFuelType"));
|
|
9
|
+
var _PreCheck = _interopRequireDefault(require("./PreCheck"));
|
|
9
10
|
var _TransactionProcessType = _interopRequireDefault(require("./TransactionProcessType"));
|
|
10
11
|
var _TransactionRequestFee = _interopRequireDefault(require("./TransactionRequestFee"));
|
|
11
12
|
var _TransferDestination = _interopRequireDefault(require("./TransferDestination"));
|
|
@@ -101,6 +102,9 @@ var TransferParams = /*#__PURE__*/function () {
|
|
|
101
102
|
if (data.hasOwnProperty('auto_fuel')) {
|
|
102
103
|
obj['auto_fuel'] = _AutoFuelType["default"].constructFromObject(data['auto_fuel']);
|
|
103
104
|
}
|
|
105
|
+
if (data.hasOwnProperty('pre_check')) {
|
|
106
|
+
obj['pre_check'] = _PreCheck["default"].constructFromObject(data['pre_check']);
|
|
107
|
+
}
|
|
104
108
|
}
|
|
105
109
|
return obj;
|
|
106
110
|
}
|
|
@@ -165,6 +169,13 @@ var TransferParams = /*#__PURE__*/function () {
|
|
|
165
169
|
_TransactionRequestFee["default"].validateJSON(data['fee']);
|
|
166
170
|
}
|
|
167
171
|
}
|
|
172
|
+
// validate the optional field `pre_check`
|
|
173
|
+
if (data['pre_check']) {
|
|
174
|
+
// data not null
|
|
175
|
+
if (!!_PreCheck["default"].validateJSON) {
|
|
176
|
+
_PreCheck["default"].validateJSON(data['pre_check']);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
168
179
|
return true;
|
|
169
180
|
}
|
|
170
181
|
}]);
|
|
@@ -219,4 +230,9 @@ TransferParams.prototype['transaction_process_type'] = undefined;
|
|
|
219
230
|
* @member {module:model/AutoFuelType} auto_fuel
|
|
220
231
|
*/
|
|
221
232
|
TransferParams.prototype['auto_fuel'] = undefined;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* @member {module:model/PreCheck} pre_check
|
|
236
|
+
*/
|
|
237
|
+
TransferParams.prototype['pre_check'] = undefined;
|
|
222
238
|
var _default = exports["default"] = TransferParams;
|
|
@@ -1266,6 +1266,12 @@ WebhookEventData.prototype['recipient_info'] = undefined;
|
|
|
1266
1266
|
*/
|
|
1267
1267
|
WebhookEventData.prototype['actual_payout_amount'] = undefined;
|
|
1268
1268
|
|
|
1269
|
+
/**
|
|
1270
|
+
* The commission fees of the payout.
|
|
1271
|
+
* @member {Array.<module:model/CommissionFee>} commission_fees
|
|
1272
|
+
*/
|
|
1273
|
+
WebhookEventData.prototype['commission_fees'] = undefined;
|
|
1274
|
+
|
|
1269
1275
|
/**
|
|
1270
1276
|
* A note or comment about the payout.
|
|
1271
1277
|
* @member {String} remark
|
|
@@ -185,6 +185,11 @@ var WebhookEventType = exports["default"] = /*#__PURE__*/function () {
|
|
|
185
185
|
* @const
|
|
186
186
|
*/
|
|
187
187
|
_defineProperty(this, "payment.status.updated", "payment.status.updated");
|
|
188
|
+
/**
|
|
189
|
+
* value: "payment.order.status.updated"
|
|
190
|
+
* @const
|
|
191
|
+
*/
|
|
192
|
+
_defineProperty(this, "payment.order.status.updated", "payment.order.status.updated");
|
|
188
193
|
/**
|
|
189
194
|
* value: "payment.refund.status.updated"
|
|
190
195
|
* @const
|
|
@@ -220,6 +225,16 @@ var WebhookEventType = exports["default"] = /*#__PURE__*/function () {
|
|
|
220
225
|
* @const
|
|
221
226
|
*/
|
|
222
227
|
_defineProperty(this, "payment.bulk_send.status.updated", "payment.bulk_send.status.updated");
|
|
228
|
+
/**
|
|
229
|
+
* value: "payment.transaction.external.created"
|
|
230
|
+
* @const
|
|
231
|
+
*/
|
|
232
|
+
_defineProperty(this, "payment.transaction.external.created", "payment.transaction.external.created");
|
|
233
|
+
/**
|
|
234
|
+
* value: "payment.transaction.external.completed"
|
|
235
|
+
* @const
|
|
236
|
+
*/
|
|
237
|
+
_defineProperty(this, "payment.transaction.external.completed", "payment.transaction.external.completed");
|
|
223
238
|
/**
|
|
224
239
|
* value: "compliance.disposition.status.updated"
|
|
225
240
|
* @const
|