@cobo/cobo-waas2 1.21.0 → 1.23.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 +80 -5
- package/dist/ApiClient.js +1 -1
- package/dist/PreRequestScript.js +2 -4
- package/dist/api/AddressBooksApi.js +200 -21
- package/dist/api/AutoSweepApi.js +289 -0
- package/dist/api/ComplianceApi.js +214 -0
- package/dist/api/PaymentApi.js +233 -20
- package/dist/api/TokenizationApi.js +1024 -0
- package/dist/api/TransactionsApi.js +105 -4
- package/dist/api/WalletsApi.js +4 -4
- package/dist/api/WalletsMPCWalletsApi.js +2 -2
- package/dist/index.js +259 -7
- package/dist/model/AddressBook.js +12 -12
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/ApprovalDetail.js +11 -11
- package/dist/model/ApprovalResult.js +6 -11
- package/dist/model/ApprovalTemplate.js +4 -4
- package/dist/model/ApprovalTransactionResult.js +8 -8
- package/dist/model/ApprovalUserDetail.js +95 -24
- package/dist/model/AutoSweepTask.js +198 -0
- package/dist/model/AutoSweepTaskStatus.js +61 -0
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/ChainInfo.js +14 -1
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/ComplianceDispositionUpdateEventData.js +321 -0
- package/dist/model/CreateAddressBookParam.js +165 -0
- package/dist/model/CreateAddressBooks201Response.js +107 -0
- package/dist/model/CreateAddressBooksParam.js +128 -0
- package/dist/model/CreateAutoSweepTask.js +126 -0
- package/dist/model/CreateCryptoAddressRequest.js +5 -5
- package/dist/model/CreateCustodialWalletParams.js +9 -0
- package/dist/model/CreateExchangeWalletParams.js +14 -0
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +14 -0
- package/dist/model/CreatePaymentOrderRequest.js +3 -3
- package/dist/model/CreateRefundRequest.js +2 -2
- package/dist/model/CreateSafeWalletParams.js +9 -0
- package/dist/model/CreateSettlement.js +28 -5
- package/dist/model/CreateSmartContractWalletParams.js +6 -0
- package/dist/model/CreateSweepToAddress.js +126 -0
- package/dist/model/CreateWalletParams.js +6 -0
- package/dist/model/CreatedWalletInfo.js +6 -0
- package/dist/model/CustodialWalletInfo.js +9 -0
- package/dist/model/DeleteAddressBookById201Response.js +106 -0
- package/dist/model/DeleteCryptoAddress201Response.js +2 -2
- package/dist/model/DispositionEventData.js +170 -0
- package/dist/model/DispositionQueryResponse.js +146 -0
- package/dist/model/DispositionResponse.js +122 -0
- package/dist/model/DispositionStatus.js +116 -0
- package/dist/model/DispositionType.js +66 -0
- package/dist/model/ExchangeWalletInfo.js +14 -0
- package/dist/model/GetTokenizationAllowlistActivation200Response.js +107 -0
- package/dist/model/IsolateDisposition.js +167 -0
- package/dist/model/ListAutoSweepTask200Response.js +123 -0
- package/dist/model/ListMerchantBalances200Response.js +107 -0
- package/dist/model/ListPaymentWalletBalances200Response.js +107 -0
- package/dist/model/ListTokenizationBlocklistAddresses200Response.js +145 -0
- package/dist/model/ListWalletSweepToAddresses200Response.js +107 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/MPCWalletInfo.js +14 -0
- package/dist/model/Merchant.js +1 -1
- package/dist/model/MerchantBalance.js +201 -0
- package/dist/model/OrgInfo.js +9 -0
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- package/dist/model/PaymentOrderEventData.js +8 -3
- package/dist/model/PaymentRefundEventData.js +8 -3
- package/dist/model/PaymentSettlementEvent.js +8 -3
- package/dist/model/PaymentTransactionEventData.js +8 -3
- package/dist/model/PaymentWalletBalance.js +177 -0
- package/dist/model/PspBalance.js +175 -0
- package/dist/model/ReceivedAmountPerAddress.js +126 -0
- package/dist/model/RefundDisposition.js +167 -0
- package/dist/model/RoleDetail.js +41 -6
- package/dist/model/SafeWallet.js +9 -0
- package/dist/model/SettlementDetail.js +1 -1
- package/dist/model/SmartContractWalletInfo.js +6 -0
- package/dist/model/SuspendedTokenEventData.js +8 -3
- package/dist/model/SweepToAddress.js +135 -0
- package/dist/model/SweepToAddressStatus.js +61 -0
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokenizationActivityInfo.js +8 -4
- package/dist/model/TokenizationAllowlistActivationRequest.js +13 -0
- package/dist/model/TokenizationAllowlistAddressNote.js +4 -4
- package/dist/model/TokenizationAllowlistAddressesResponse.js +145 -0
- package/dist/model/TokenizationBlocklistAddressNote.js +4 -4
- package/dist/model/TokenizationBurnEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationBurnTokenParamsBurnsInner.js +4 -4
- package/dist/model/TokenizationBurnTokenRequest.js +13 -0
- package/dist/model/TokenizationContractCallEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationContractCallParamsData.js +43 -9
- package/dist/model/TokenizationContractCallRequest.js +13 -0
- package/dist/model/TokenizationContractCallType.js +5 -0
- package/dist/model/TokenizationERC20TokenParams.js +4 -4
- package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +6 -0
- package/dist/model/TokenizationEvmContractCallParams.js +2 -2
- package/dist/model/TokenizationIssueEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationIssueTokenParamsTokenParams.js +40 -12
- package/dist/model/TokenizationIssuedTokenRequest.js +14 -1
- package/dist/model/TokenizationMintEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationMintTokenRequest.js +13 -0
- package/dist/model/TokenizationMpcOperationSource.js +2 -2
- package/dist/model/TokenizationPauseEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationPauseTokenRequest.js +13 -0
- package/dist/model/TokenizationSOLTokenParams.js +173 -0
- package/dist/model/TokenizationSolContractCallParams.js +137 -0
- package/dist/model/TokenizationSolTokenPermissionParams.js +140 -0
- package/dist/model/TokenizationToggleAllowlistEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationTokenDetailInfo.js +6 -6
- package/dist/model/TokenizationTokenInfo.js +4 -4
- package/dist/model/TokenizationTokenOperationSource.js +1 -1
- package/dist/model/TokenizationTokenPermissionParams.js +1 -1
- package/dist/model/TokenizationTokenPermissionType.js +15 -0
- package/dist/model/TokenizationTokenStandard.js +5 -0
- package/dist/model/TokenizationUnpauseEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUnpauseTokenRequest.js +13 -0
- package/dist/model/TokenizationUpdateAllowlistAddressesEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUpdateAllowlistAddressesParamsAddressesInner.js +1 -1
- package/dist/model/TokenizationUpdateAllowlistAddressesRequest.js +13 -0
- package/dist/model/TokenizationUpdateBlocklistAddressesEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUpdateBlocklistAddressesParamsAddressesInner.js +1 -1
- package/dist/model/TokenizationUpdateBlocklistAddressesRequest.js +13 -0
- package/dist/model/TokenizationWeb3OperationSource.js +2 -2
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/UnfreezeDisposition.js +111 -0
- package/dist/model/UpdateAddressBookParam.js +150 -0
- package/dist/model/UpdateCustodialWalletParams.js +13 -6
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/UpdateMpcWalletParams.js +13 -6
- package/dist/model/UpdateWalletParams.js +6 -0
- package/dist/model/WalletInfo.js +6 -0
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEventData.js +62 -10
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +5 -0
- package/docs/AddressBook.md +7 -7
- package/docs/AddressBooksApi.md +218 -8
- package/docs/AddressesEventData.md +3 -1
- package/docs/ApprovalDetail.md +4 -4
- package/docs/ApprovalResult.md +3 -5
- package/docs/ApprovalTemplate.md +3 -3
- package/docs/ApprovalTransactionResult.md +4 -4
- package/docs/ApprovalUserDetail.md +15 -9
- package/docs/AutoSweepApi.md +285 -0
- package/docs/AutoSweepTask.md +16 -0
- package/docs/AutoSweepTaskStatus.md +12 -0
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/ChainInfo.md +2 -1
- package/docs/ChainsEventData.md +3 -1
- package/docs/ComplianceApi.md +218 -0
- package/docs/ComplianceDispositionUpdateEventData.md +56 -0
- package/docs/CreateAddressBookParam.md +13 -0
- package/docs/CreateAddressBooks201Response.md +9 -0
- package/docs/CreateAddressBooksParam.md +9 -0
- package/docs/CreateAutoSweepTask.md +10 -0
- package/docs/CreateCryptoAddressRequest.md +3 -3
- package/docs/CreateCustodialWalletParams.md +1 -0
- package/docs/CreateExchangeWalletParams.md +1 -0
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreateMpcWalletParams.md +1 -0
- package/docs/CreatePaymentOrderRequest.md +2 -2
- package/docs/CreateRefundRequest.md +1 -1
- package/docs/CreateSafeWalletParams.md +1 -0
- package/docs/CreateSettlement.md +2 -2
- package/docs/CreateSmartContractWalletParams.md +1 -0
- package/docs/CreateSweepToAddress.md +10 -0
- package/docs/CreateWalletParams.md +1 -0
- package/docs/CreatedWalletInfo.md +1 -0
- package/docs/CustodialWalletInfo.md +1 -0
- package/docs/DeleteAddressBookById201Response.md +9 -0
- package/docs/DeleteCryptoAddress201Response.md +1 -1
- package/docs/DispositionEventData.md +14 -0
- package/docs/DispositionQueryResponse.md +12 -0
- package/docs/DispositionResponse.md +10 -0
- package/docs/DispositionStatus.md +34 -0
- package/docs/DispositionType.md +14 -0
- package/docs/ExchangeWalletInfo.md +1 -0
- package/docs/GetTokenizationAllowlistActivation200Response.md +9 -0
- package/docs/IsolateDisposition.md +13 -0
- package/docs/ListAutoSweepTask200Response.md +10 -0
- package/docs/ListMerchantBalances200Response.md +9 -0
- package/docs/ListPaymentWalletBalances200Response.md +9 -0
- package/docs/ListTokenizationBlocklistAddresses200Response.md +10 -0
- package/docs/ListWalletSweepToAddresses200Response.md +9 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/MPCWalletInfo.md +1 -0
- package/docs/Merchant.md +1 -1
- package/docs/MerchantBalance.md +16 -0
- package/docs/OrgInfo.md +1 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentApi.md +229 -11
- package/docs/PaymentOrderEventData.md +3 -1
- package/docs/PaymentRefundEventData.md +3 -1
- package/docs/PaymentSettlementEvent.md +3 -1
- package/docs/PaymentTransactionEventData.md +3 -1
- package/docs/PaymentWalletBalance.md +14 -0
- package/docs/PspBalance.md +14 -0
- package/docs/ReceivedAmountPerAddress.md +10 -0
- package/docs/RefundDisposition.md +13 -0
- package/docs/RoleDetail.md +4 -1
- package/docs/SafeWallet.md +1 -0
- package/docs/SettlementDetail.md +1 -1
- package/docs/SmartContractWalletInfo.md +1 -0
- package/docs/SuspendedTokenEventData.md +3 -1
- package/docs/SweepToAddress.md +11 -0
- package/docs/SweepToAddressStatus.md +12 -0
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokenizationActivityInfo.md +2 -2
- package/docs/TokenizationAllowlistActivationRequest.md +1 -0
- package/docs/TokenizationAllowlistAddressNote.md +3 -3
- package/docs/TokenizationAllowlistAddressesResponse.md +10 -0
- package/docs/TokenizationApi.md +1069 -0
- package/docs/TokenizationBlocklistAddressNote.md +3 -3
- package/docs/TokenizationBurnEstimateFeeParams.md +1 -0
- package/docs/TokenizationBurnTokenParamsBurnsInner.md +2 -2
- package/docs/TokenizationBurnTokenRequest.md +1 -0
- package/docs/TokenizationContractCallEstimateFeeParams.md +1 -0
- package/docs/TokenizationContractCallParamsData.md +2 -1
- package/docs/TokenizationContractCallRequest.md +1 -0
- package/docs/TokenizationContractCallType.md +2 -0
- package/docs/TokenizationERC20TokenParams.md +1 -1
- package/docs/TokenizationEstimateFeeRequestOperationParams.md +1 -0
- package/docs/TokenizationEvmContractCallParams.md +1 -1
- package/docs/TokenizationIssueEstimateFeeParams.md +1 -0
- package/docs/TokenizationIssueTokenParamsTokenParams.md +2 -2
- package/docs/TokenizationIssuedTokenRequest.md +2 -1
- package/docs/TokenizationMintEstimateFeeParams.md +1 -0
- package/docs/TokenizationMintTokenRequest.md +1 -0
- package/docs/TokenizationMpcOperationSource.md +1 -1
- package/docs/TokenizationPauseEstimateFeeParams.md +1 -0
- package/docs/TokenizationPauseTokenRequest.md +1 -0
- package/docs/TokenizationSOLTokenParams.md +14 -0
- package/docs/TokenizationSolContractCallParams.md +10 -0
- package/docs/TokenizationSolTokenPermissionParams.md +13 -0
- package/docs/TokenizationToggleAllowlistEstimateFeeParams.md +1 -0
- package/docs/TokenizationTokenDetailInfo.md +1 -1
- package/docs/TokenizationTokenInfo.md +1 -1
- package/docs/TokenizationTokenOperationSource.md +1 -1
- package/docs/TokenizationTokenPermissionType.md +6 -0
- package/docs/TokenizationTokenStandard.md +2 -0
- package/docs/TokenizationUnpauseEstimateFeeParams.md +1 -0
- package/docs/TokenizationUnpauseTokenRequest.md +1 -0
- package/docs/TokenizationUpdateAllowlistAddressesEstimateFeeParams.md +1 -0
- package/docs/TokenizationUpdateAllowlistAddressesParamsAddressesInner.md +1 -1
- package/docs/TokenizationUpdateAllowlistAddressesRequest.md +1 -0
- package/docs/TokenizationUpdateBlocklistAddressesEstimateFeeParams.md +1 -0
- package/docs/TokenizationUpdateBlocklistAddressesParamsAddressesInner.md +1 -1
- package/docs/TokenizationUpdateBlocklistAddressesRequest.md +1 -0
- package/docs/TokenizationWeb3OperationSource.md +1 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +114 -2
- package/docs/UnfreezeDisposition.md +9 -0
- package/docs/UpdateAddressBookParam.md +12 -0
- package/docs/UpdateCustodialWalletParams.md +2 -1
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/UpdateMpcWalletParams.md +2 -1
- package/docs/UpdateWalletParams.md +1 -0
- package/docs/WalletInfo.md +1 -0
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +2 -2
- package/docs/WalletsMPCWalletsApi.md +1 -1
- package/docs/WebhookEventData.md +8 -2
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +2 -0
- package/package.json +1 -1
- package/dist/model/ApprovalShowInfo.js +0 -140
- package/docs/ApprovalShowInfo.md +0 -13
|
@@ -35,7 +35,7 @@ var AddressesEventData = /*#__PURE__*/function () {
|
|
|
35
35
|
* Constructs a new <code>AddressesEventData</code>.
|
|
36
36
|
* @alias module:model/AddressesEventData
|
|
37
37
|
* @implements module:model/WebhookEventDataType
|
|
38
|
-
* @param data_type {module:model/AddressesEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
38
|
+
* @param data_type {module:model/AddressesEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
|
|
39
39
|
*/
|
|
40
40
|
function AddressesEventData(data_type) {
|
|
41
41
|
_classCallCheck(this, AddressesEventData);
|
|
@@ -132,7 +132,7 @@ var AddressesEventData = /*#__PURE__*/function () {
|
|
|
132
132
|
AddressesEventData.RequiredProperties = ["data_type"];
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
|
-
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
135
|
+
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
|
|
136
136
|
* @member {module:model/AddressesEventData.DataTypeEnum} data_type
|
|
137
137
|
*/
|
|
138
138
|
AddressesEventData.prototype['data_type'] = undefined;
|
|
@@ -145,7 +145,7 @@ AddressesEventData.prototype['addresses'] = undefined;
|
|
|
145
145
|
|
|
146
146
|
// Implement WebhookEventDataType interface:
|
|
147
147
|
/**
|
|
148
|
-
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
148
|
+
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
|
|
149
149
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
150
150
|
*/
|
|
151
151
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -231,6 +231,11 @@ AddressesEventData['DataTypeEnum'] = {
|
|
|
231
231
|
* @const
|
|
232
232
|
*/
|
|
233
233
|
"SuspendedToken": "SuspendedToken",
|
|
234
|
+
/**
|
|
235
|
+
* value: "ComplianceDisposition"
|
|
236
|
+
* @const
|
|
237
|
+
*/
|
|
238
|
+
"ComplianceDisposition": "ComplianceDisposition",
|
|
234
239
|
/**
|
|
235
240
|
* value: "unknown_default_open_api"
|
|
236
241
|
* @const
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
29
|
var ApprovalDetail = /*#__PURE__*/function () {
|
|
30
30
|
/**
|
|
31
31
|
* Constructs a new <code>ApprovalDetail</code>.
|
|
32
|
-
*
|
|
32
|
+
* Details of the transaction approval.
|
|
33
33
|
* @alias module:model/ApprovalDetail
|
|
34
34
|
*/
|
|
35
35
|
function ApprovalDetail() {
|
|
@@ -67,8 +67,8 @@ var ApprovalDetail = /*#__PURE__*/function () {
|
|
|
67
67
|
if (data.hasOwnProperty('request_id')) {
|
|
68
68
|
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
69
69
|
}
|
|
70
|
-
if (data.hasOwnProperty('
|
|
71
|
-
obj['
|
|
70
|
+
if (data.hasOwnProperty('address_owner')) {
|
|
71
|
+
obj['address_owner'] = _RoleDetail["default"].constructFromObject(data['address_owner']);
|
|
72
72
|
}
|
|
73
73
|
if (data.hasOwnProperty('spender')) {
|
|
74
74
|
obj['spender'] = _RoleDetail["default"].constructFromObject(data['spender']);
|
|
@@ -100,11 +100,11 @@ var ApprovalDetail = /*#__PURE__*/function () {
|
|
|
100
100
|
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
101
101
|
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
102
102
|
}
|
|
103
|
-
// validate the optional field `
|
|
104
|
-
if (data['
|
|
103
|
+
// validate the optional field `address_owner`
|
|
104
|
+
if (data['address_owner']) {
|
|
105
105
|
// data not null
|
|
106
106
|
if (!!_RoleDetail["default"].validateJSON) {
|
|
107
|
-
_RoleDetail["default"].validateJSON(data['
|
|
107
|
+
_RoleDetail["default"].validateJSON(data['address_owner']);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
// validate the optional field `spender`
|
|
@@ -126,27 +126,27 @@ var ApprovalDetail = /*#__PURE__*/function () {
|
|
|
126
126
|
}]);
|
|
127
127
|
}();
|
|
128
128
|
/**
|
|
129
|
-
*
|
|
129
|
+
* Transaction ID.
|
|
130
130
|
* @member {String} transaction_id
|
|
131
131
|
*/
|
|
132
132
|
ApprovalDetail.prototype['transaction_id'] = undefined;
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
|
-
*
|
|
135
|
+
* Cobo ID used to track a transaction.
|
|
136
136
|
* @member {String} cobo_id
|
|
137
137
|
*/
|
|
138
138
|
ApprovalDetail.prototype['cobo_id'] = undefined;
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
|
-
*
|
|
141
|
+
* Request ID used to track a transaction request.
|
|
142
142
|
* @member {String} request_id
|
|
143
143
|
*/
|
|
144
144
|
ApprovalDetail.prototype['request_id'] = undefined;
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
|
-
* @member {module:model/RoleDetail}
|
|
147
|
+
* @member {module:model/RoleDetail} address_owner
|
|
148
148
|
*/
|
|
149
|
-
ApprovalDetail.prototype['
|
|
149
|
+
ApprovalDetail.prototype['address_owner'] = undefined;
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
152
|
* @member {module:model/RoleDetail} spender
|
|
@@ -31,25 +31,20 @@ var ApprovalResult = exports["default"] = /*#__PURE__*/function () {
|
|
|
31
31
|
function ApprovalResult() {
|
|
32
32
|
_classCallCheck(this, ApprovalResult);
|
|
33
33
|
/**
|
|
34
|
-
* value:
|
|
34
|
+
* value: "Approved"
|
|
35
35
|
* @const
|
|
36
36
|
*/
|
|
37
|
-
_defineProperty(this, "
|
|
37
|
+
_defineProperty(this, "APPROVED", "Approved");
|
|
38
38
|
/**
|
|
39
|
-
* value:
|
|
39
|
+
* value: "Rejected"
|
|
40
40
|
* @const
|
|
41
41
|
*/
|
|
42
|
-
_defineProperty(this, "
|
|
42
|
+
_defineProperty(this, "REJECTED", "Rejected");
|
|
43
43
|
/**
|
|
44
|
-
* value:
|
|
44
|
+
* value: "unknown_default_open_api"
|
|
45
45
|
* @const
|
|
46
46
|
*/
|
|
47
|
-
_defineProperty(this, "
|
|
48
|
-
/**
|
|
49
|
-
* value: 11184809
|
|
50
|
-
* @const
|
|
51
|
-
*/
|
|
52
|
-
_defineProperty(this, "unknown_default_open_api", 11184809);
|
|
47
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
53
48
|
}
|
|
54
49
|
return _createClass(ApprovalResult, null, [{
|
|
55
50
|
key: "constructFromObject",
|
|
@@ -28,7 +28,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
28
28
|
var ApprovalTemplate = /*#__PURE__*/function () {
|
|
29
29
|
/**
|
|
30
30
|
* Constructs a new <code>ApprovalTemplate</code>.
|
|
31
|
-
*
|
|
31
|
+
* Approval template details.
|
|
32
32
|
* @alias module:model/ApprovalTemplate
|
|
33
33
|
*/
|
|
34
34
|
function ApprovalTemplate() {
|
|
@@ -95,19 +95,19 @@ var ApprovalTemplate = /*#__PURE__*/function () {
|
|
|
95
95
|
}]);
|
|
96
96
|
}();
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
98
|
+
* Business key used to identify the type of approval template.
|
|
99
99
|
* @member {String} business_key
|
|
100
100
|
*/
|
|
101
101
|
ApprovalTemplate.prototype['business_key'] = undefined;
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
104
|
+
* Text content defined in the approval template used to generate approval messages shown to users
|
|
105
105
|
* @member {String} template_text
|
|
106
106
|
*/
|
|
107
107
|
ApprovalTemplate.prototype['template_text'] = undefined;
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* Version of the approval template.
|
|
111
111
|
* @member {String} template_version
|
|
112
112
|
*/
|
|
113
113
|
ApprovalTemplate.prototype['template_version'] = undefined;
|
|
@@ -31,25 +31,25 @@ var ApprovalTransactionResult = exports["default"] = /*#__PURE__*/function () {
|
|
|
31
31
|
function ApprovalTransactionResult() {
|
|
32
32
|
_classCallCheck(this, ApprovalTransactionResult);
|
|
33
33
|
/**
|
|
34
|
-
* value:
|
|
34
|
+
* value: "Rejected"
|
|
35
35
|
* @const
|
|
36
36
|
*/
|
|
37
|
-
_defineProperty(this, "REJECTED",
|
|
37
|
+
_defineProperty(this, "REJECTED", "Rejected");
|
|
38
38
|
/**
|
|
39
|
-
* value:
|
|
39
|
+
* value: "Pending"
|
|
40
40
|
* @const
|
|
41
41
|
*/
|
|
42
|
-
_defineProperty(this, "PENDING",
|
|
42
|
+
_defineProperty(this, "PENDING", "Pending");
|
|
43
43
|
/**
|
|
44
|
-
* value:
|
|
44
|
+
* value: "Approved"
|
|
45
45
|
* @const
|
|
46
46
|
*/
|
|
47
|
-
_defineProperty(this, "APPROVED",
|
|
47
|
+
_defineProperty(this, "APPROVED", "Approved");
|
|
48
48
|
/**
|
|
49
|
-
* value:
|
|
49
|
+
* value: "unknown_default_open_api"
|
|
50
50
|
* @const
|
|
51
51
|
*/
|
|
52
|
-
_defineProperty(this, "unknown_default_open_api",
|
|
52
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
53
53
|
}
|
|
54
54
|
return _createClass(ApprovalTransactionResult, null, [{
|
|
55
55
|
key: "constructFromObject",
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _ApprovalResult = _interopRequireDefault(require("./ApprovalResult"));
|
|
9
|
-
var _ApprovalShowInfo = _interopRequireDefault(require("./ApprovalShowInfo"));
|
|
10
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
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); }
|
|
12
11
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -30,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
29
|
var ApprovalUserDetail = /*#__PURE__*/function () {
|
|
31
30
|
/**
|
|
32
31
|
* Constructs a new <code>ApprovalUserDetail</code>.
|
|
33
|
-
*
|
|
32
|
+
* Details about a user involved in a transaction approval workflow.
|
|
34
33
|
* @alias module:model/ApprovalUserDetail
|
|
35
34
|
*/
|
|
36
35
|
function ApprovalUserDetail() {
|
|
@@ -59,8 +58,11 @@ var ApprovalUserDetail = /*#__PURE__*/function () {
|
|
|
59
58
|
value: function constructFromObject(data, obj) {
|
|
60
59
|
if (data) {
|
|
61
60
|
obj = obj || new ApprovalUserDetail();
|
|
62
|
-
if (data.hasOwnProperty('
|
|
63
|
-
obj['
|
|
61
|
+
if (data.hasOwnProperty('name')) {
|
|
62
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
63
|
+
}
|
|
64
|
+
if (data.hasOwnProperty('email')) {
|
|
65
|
+
obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
|
|
64
66
|
}
|
|
65
67
|
if (data.hasOwnProperty('pubkey')) {
|
|
66
68
|
obj['pubkey'] = _ApiClient["default"].convertToType(data['pubkey'], 'String');
|
|
@@ -74,6 +76,9 @@ var ApprovalUserDetail = /*#__PURE__*/function () {
|
|
|
74
76
|
if (data.hasOwnProperty('result')) {
|
|
75
77
|
obj['result'] = _ApprovalResult["default"].constructFromObject(data['result']);
|
|
76
78
|
}
|
|
79
|
+
if (data.hasOwnProperty('approval_result_code')) {
|
|
80
|
+
obj['approval_result_code'] = _ApiClient["default"].convertToType(data['approval_result_code'], 'Number');
|
|
81
|
+
}
|
|
77
82
|
if (data.hasOwnProperty('created_time')) {
|
|
78
83
|
obj['created_time'] = _ApiClient["default"].convertToType(data['created_time'], 'Number');
|
|
79
84
|
}
|
|
@@ -87,7 +92,19 @@ var ApprovalUserDetail = /*#__PURE__*/function () {
|
|
|
87
92
|
obj['is_for_sign'] = _ApiClient["default"].convertToType(data['is_for_sign'], 'Boolean');
|
|
88
93
|
}
|
|
89
94
|
if (data.hasOwnProperty('show_info')) {
|
|
90
|
-
obj['show_info'] =
|
|
95
|
+
obj['show_info'] = _ApiClient["default"].convertToType(data['show_info'], 'String');
|
|
96
|
+
}
|
|
97
|
+
if (data.hasOwnProperty('language')) {
|
|
98
|
+
obj['language'] = _ApiClient["default"].convertToType(data['language'], 'String');
|
|
99
|
+
}
|
|
100
|
+
if (data.hasOwnProperty('message_version')) {
|
|
101
|
+
obj['message_version'] = _ApiClient["default"].convertToType(data['message_version'], 'String');
|
|
102
|
+
}
|
|
103
|
+
if (data.hasOwnProperty('message')) {
|
|
104
|
+
obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String');
|
|
105
|
+
}
|
|
106
|
+
if (data.hasOwnProperty('extra_message')) {
|
|
107
|
+
obj['extra_message'] = _ApiClient["default"].convertToType(data['extra_message'], 'String');
|
|
91
108
|
}
|
|
92
109
|
}
|
|
93
110
|
return obj;
|
|
@@ -102,8 +119,12 @@ var ApprovalUserDetail = /*#__PURE__*/function () {
|
|
|
102
119
|
key: "validateJSON",
|
|
103
120
|
value: function validateJSON(data) {
|
|
104
121
|
// ensure the json data is a string
|
|
105
|
-
if (data['
|
|
106
|
-
throw new Error("Expected the field `
|
|
122
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
123
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
124
|
+
}
|
|
125
|
+
// ensure the json data is a string
|
|
126
|
+
if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
|
|
127
|
+
throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
|
|
107
128
|
}
|
|
108
129
|
// ensure the json data is a string
|
|
109
130
|
if (data['pubkey'] && !(typeof data['pubkey'] === 'string' || data['pubkey'] instanceof String)) {
|
|
@@ -125,37 +146,56 @@ var ApprovalUserDetail = /*#__PURE__*/function () {
|
|
|
125
146
|
if (data['header_title'] && !(typeof data['header_title'] === 'string' || data['header_title'] instanceof String)) {
|
|
126
147
|
throw new Error("Expected the field `header_title` to be a primitive type in the JSON string but got " + data['header_title']);
|
|
127
148
|
}
|
|
128
|
-
//
|
|
129
|
-
if (data['show_info']) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
149
|
+
// ensure the json data is a string
|
|
150
|
+
if (data['show_info'] && !(typeof data['show_info'] === 'string' || data['show_info'] instanceof String)) {
|
|
151
|
+
throw new Error("Expected the field `show_info` to be a primitive type in the JSON string but got " + data['show_info']);
|
|
152
|
+
}
|
|
153
|
+
// ensure the json data is a string
|
|
154
|
+
if (data['language'] && !(typeof data['language'] === 'string' || data['language'] instanceof String)) {
|
|
155
|
+
throw new Error("Expected the field `language` to be a primitive type in the JSON string but got " + data['language']);
|
|
156
|
+
}
|
|
157
|
+
// ensure the json data is a string
|
|
158
|
+
if (data['message_version'] && !(typeof data['message_version'] === 'string' || data['message_version'] instanceof String)) {
|
|
159
|
+
throw new Error("Expected the field `message_version` to be a primitive type in the JSON string but got " + data['message_version']);
|
|
160
|
+
}
|
|
161
|
+
// ensure the json data is a string
|
|
162
|
+
if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
|
|
163
|
+
throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
|
|
164
|
+
}
|
|
165
|
+
// ensure the json data is a string
|
|
166
|
+
if (data['extra_message'] && !(typeof data['extra_message'] === 'string' || data['extra_message'] instanceof String)) {
|
|
167
|
+
throw new Error("Expected the field `extra_message` to be a primitive type in the JSON string but got " + data['extra_message']);
|
|
134
168
|
}
|
|
135
169
|
return true;
|
|
136
170
|
}
|
|
137
171
|
}]);
|
|
138
172
|
}();
|
|
139
173
|
/**
|
|
140
|
-
*
|
|
141
|
-
* @member {String}
|
|
174
|
+
* Name of the user who approved the transaction.
|
|
175
|
+
* @member {String} name
|
|
142
176
|
*/
|
|
143
|
-
ApprovalUserDetail.prototype['
|
|
177
|
+
ApprovalUserDetail.prototype['name'] = undefined;
|
|
144
178
|
|
|
145
179
|
/**
|
|
146
|
-
*
|
|
180
|
+
* Email of the user.
|
|
181
|
+
* @member {String} email
|
|
182
|
+
*/
|
|
183
|
+
ApprovalUserDetail.prototype['email'] = undefined;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Public key of the user.
|
|
147
187
|
* @member {String} pubkey
|
|
148
188
|
*/
|
|
149
189
|
ApprovalUserDetail.prototype['pubkey'] = undefined;
|
|
150
190
|
|
|
151
191
|
/**
|
|
152
|
-
*
|
|
192
|
+
* Signature produced by the user for this approval.
|
|
153
193
|
* @member {String} signature
|
|
154
194
|
*/
|
|
155
195
|
ApprovalUserDetail.prototype['signature'] = undefined;
|
|
156
196
|
|
|
157
197
|
/**
|
|
158
|
-
*
|
|
198
|
+
* UUID of the statement associated with this approval.
|
|
159
199
|
* @member {String} statement_uuid
|
|
160
200
|
*/
|
|
161
201
|
ApprovalUserDetail.prototype['statement_uuid'] = undefined;
|
|
@@ -166,31 +206,62 @@ ApprovalUserDetail.prototype['statement_uuid'] = undefined;
|
|
|
166
206
|
ApprovalUserDetail.prototype['result'] = undefined;
|
|
167
207
|
|
|
168
208
|
/**
|
|
169
|
-
*
|
|
209
|
+
* Integer value representing the result of the approval.
|
|
210
|
+
* @member {Number} approval_result_code
|
|
211
|
+
*/
|
|
212
|
+
ApprovalUserDetail.prototype['approval_result_code'] = undefined;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Timestamp when the approval was created.
|
|
170
216
|
* @member {Number} created_time
|
|
171
217
|
*/
|
|
172
218
|
ApprovalUserDetail.prototype['created_time'] = undefined;
|
|
173
219
|
|
|
174
220
|
/**
|
|
175
|
-
*
|
|
221
|
+
* Version of the template used for the transaction approval.
|
|
176
222
|
* @member {String} template_version
|
|
177
223
|
*/
|
|
178
224
|
ApprovalUserDetail.prototype['template_version'] = undefined;
|
|
179
225
|
|
|
180
226
|
/**
|
|
181
|
-
*
|
|
227
|
+
* Display title used in the transaction approval.
|
|
182
228
|
* @member {String} header_title
|
|
183
229
|
*/
|
|
184
230
|
ApprovalUserDetail.prototype['header_title'] = undefined;
|
|
185
231
|
|
|
186
232
|
/**
|
|
187
|
-
* Indicates whether
|
|
233
|
+
* Indicates whether this approval requires signing: - `true`: The user must sign the transaction. - `false`: The user only needs to approve or reject without signing.
|
|
188
234
|
* @member {Boolean} is_for_sign
|
|
189
235
|
*/
|
|
190
236
|
ApprovalUserDetail.prototype['is_for_sign'] = undefined;
|
|
191
237
|
|
|
192
238
|
/**
|
|
193
|
-
*
|
|
239
|
+
* Additional information to show for the transaction approval.
|
|
240
|
+
* @member {String} show_info
|
|
194
241
|
*/
|
|
195
242
|
ApprovalUserDetail.prototype['show_info'] = undefined;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Language used for the transaction approval.
|
|
246
|
+
* @member {String} language
|
|
247
|
+
*/
|
|
248
|
+
ApprovalUserDetail.prototype['language'] = undefined;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Version of the message format used for the transaction approval.
|
|
252
|
+
* @member {String} message_version
|
|
253
|
+
*/
|
|
254
|
+
ApprovalUserDetail.prototype['message_version'] = undefined;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Message associated with the transaction approval.
|
|
258
|
+
* @member {String} message
|
|
259
|
+
*/
|
|
260
|
+
ApprovalUserDetail.prototype['message'] = undefined;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Any additional message or information related to the transaction approval.
|
|
264
|
+
* @member {String} extra_message
|
|
265
|
+
*/
|
|
266
|
+
ApprovalUserDetail.prototype['extra_message'] = undefined;
|
|
196
267
|
var _default = exports["default"] = ApprovalUserDetail;
|
|
@@ -0,0 +1,198 @@
|
|
|
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 _AutoSweepTaskStatus = _interopRequireDefault(require("./AutoSweepTaskStatus"));
|
|
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 AutoSweepTask model module.
|
|
30
|
+
* @module model/AutoSweepTask
|
|
31
|
+
*/
|
|
32
|
+
var AutoSweepTask = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>AutoSweepTask</code>.
|
|
35
|
+
* Auto-sweep task information.
|
|
36
|
+
* @alias module:model/AutoSweepTask
|
|
37
|
+
* @param task_id {String} Auto-sweep task ID.
|
|
38
|
+
* @param wallet_id {String} Wallet ID.
|
|
39
|
+
* @param token_id {String} Token ID of the swept token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
40
|
+
* @param status {module:model/AutoSweepTaskStatus}
|
|
41
|
+
* @param created_timestamp {Number} The time when the task was created, in Unix timestamp format, measured in milliseconds.
|
|
42
|
+
*/
|
|
43
|
+
function AutoSweepTask(task_id, wallet_id, token_id, status, created_timestamp) {
|
|
44
|
+
_classCallCheck(this, AutoSweepTask);
|
|
45
|
+
AutoSweepTask.initialize(this, task_id, wallet_id, token_id, status, created_timestamp);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Initializes the fields of this object.
|
|
50
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
51
|
+
* Only for internal use.
|
|
52
|
+
*/
|
|
53
|
+
return _createClass(AutoSweepTask, null, [{
|
|
54
|
+
key: "initialize",
|
|
55
|
+
value: function initialize(obj, task_id, wallet_id, token_id, status, created_timestamp) {
|
|
56
|
+
obj['task_id'] = task_id;
|
|
57
|
+
obj['wallet_id'] = wallet_id;
|
|
58
|
+
obj['token_id'] = token_id;
|
|
59
|
+
obj['status'] = status;
|
|
60
|
+
obj['created_timestamp'] = created_timestamp;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Constructs a <code>AutoSweepTask</code> from a plain JavaScript object, optionally creating a new instance.
|
|
65
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
66
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
67
|
+
* @param {module:model/AutoSweepTask} obj Optional instance to populate.
|
|
68
|
+
* @return {module:model/AutoSweepTask} The populated <code>AutoSweepTask</code> instance.
|
|
69
|
+
*/
|
|
70
|
+
}, {
|
|
71
|
+
key: "constructFromObject",
|
|
72
|
+
value: function constructFromObject(data, obj) {
|
|
73
|
+
if (data) {
|
|
74
|
+
obj = obj || new AutoSweepTask();
|
|
75
|
+
if (data.hasOwnProperty('task_id')) {
|
|
76
|
+
obj['task_id'] = _ApiClient["default"].convertToType(data['task_id'], 'String');
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('wallet_id')) {
|
|
79
|
+
obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('token_id')) {
|
|
82
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('status')) {
|
|
85
|
+
obj['status'] = _AutoSweepTaskStatus["default"].constructFromObject(data['status']);
|
|
86
|
+
}
|
|
87
|
+
if (data.hasOwnProperty('transaction_ids')) {
|
|
88
|
+
obj['transaction_ids'] = _ApiClient["default"].convertToType(data['transaction_ids'], ['String']);
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('failed_reasons')) {
|
|
91
|
+
obj['failed_reasons'] = _ApiClient["default"].convertToType(data['failed_reasons'], ['String']);
|
|
92
|
+
}
|
|
93
|
+
if (data.hasOwnProperty('created_timestamp')) {
|
|
94
|
+
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
95
|
+
}
|
|
96
|
+
if (data.hasOwnProperty('updated_timestamp')) {
|
|
97
|
+
obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return obj;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Validates the JSON data with respect to <code>AutoSweepTask</code>.
|
|
105
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
106
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AutoSweepTask</code>.
|
|
107
|
+
*/
|
|
108
|
+
}, {
|
|
109
|
+
key: "validateJSON",
|
|
110
|
+
value: function validateJSON(data) {
|
|
111
|
+
// check to make sure all required properties are present in the JSON string
|
|
112
|
+
var _iterator = _createForOfIteratorHelper(AutoSweepTask.RequiredProperties),
|
|
113
|
+
_step;
|
|
114
|
+
try {
|
|
115
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
116
|
+
var property = _step.value;
|
|
117
|
+
if (!data.hasOwnProperty(property)) {
|
|
118
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
// ensure the json data is a string
|
|
122
|
+
} catch (err) {
|
|
123
|
+
_iterator.e(err);
|
|
124
|
+
} finally {
|
|
125
|
+
_iterator.f();
|
|
126
|
+
}
|
|
127
|
+
if (data['task_id'] && !(typeof data['task_id'] === 'string' || data['task_id'] instanceof String)) {
|
|
128
|
+
throw new Error("Expected the field `task_id` to be a primitive type in the JSON string but got " + data['task_id']);
|
|
129
|
+
}
|
|
130
|
+
// ensure the json data is a string
|
|
131
|
+
if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
|
|
132
|
+
throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
|
|
133
|
+
}
|
|
134
|
+
// ensure the json data is a string
|
|
135
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
136
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
137
|
+
}
|
|
138
|
+
// ensure the json data is an array
|
|
139
|
+
if (!Array.isArray(data['transaction_ids'])) {
|
|
140
|
+
throw new Error("Expected the field `transaction_ids` to be an array in the JSON data but got " + data['transaction_ids']);
|
|
141
|
+
}
|
|
142
|
+
// ensure the json data is an array
|
|
143
|
+
if (!Array.isArray(data['failed_reasons'])) {
|
|
144
|
+
throw new Error("Expected the field `failed_reasons` to be an array in the JSON data but got " + data['failed_reasons']);
|
|
145
|
+
}
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
}]);
|
|
149
|
+
}();
|
|
150
|
+
AutoSweepTask.RequiredProperties = ["task_id", "wallet_id", "token_id", "status", "created_timestamp"];
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Auto-sweep task ID.
|
|
154
|
+
* @member {String} task_id
|
|
155
|
+
*/
|
|
156
|
+
AutoSweepTask.prototype['task_id'] = undefined;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Wallet ID.
|
|
160
|
+
* @member {String} wallet_id
|
|
161
|
+
*/
|
|
162
|
+
AutoSweepTask.prototype['wallet_id'] = undefined;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Token ID of the swept token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
166
|
+
* @member {String} token_id
|
|
167
|
+
*/
|
|
168
|
+
AutoSweepTask.prototype['token_id'] = undefined;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @member {module:model/AutoSweepTaskStatus} status
|
|
172
|
+
*/
|
|
173
|
+
AutoSweepTask.prototype['status'] = undefined;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* IDs of the transactions triggered by the task.
|
|
177
|
+
* @member {Array.<String>} transaction_ids
|
|
178
|
+
*/
|
|
179
|
+
AutoSweepTask.prototype['transaction_ids'] = undefined;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Reasons why the task creation failed.
|
|
183
|
+
* @member {Array.<String>} failed_reasons
|
|
184
|
+
*/
|
|
185
|
+
AutoSweepTask.prototype['failed_reasons'] = undefined;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The time when the task was created, in Unix timestamp format, measured in milliseconds.
|
|
189
|
+
* @member {Number} created_timestamp
|
|
190
|
+
*/
|
|
191
|
+
AutoSweepTask.prototype['created_timestamp'] = undefined;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The time when the task was updated, in Unix timestamp format, measured in milliseconds.
|
|
195
|
+
* @member {Number} updated_timestamp
|
|
196
|
+
*/
|
|
197
|
+
AutoSweepTask.prototype['updated_timestamp'] = undefined;
|
|
198
|
+
var _default = exports["default"] = AutoSweepTask;
|