@cobo/cobo-waas2 1.19.1 → 1.21.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 +16 -1
- package/dist/ApiClient.js +11 -2
- package/dist/PreRequestScript.js +1 -1
- package/dist/api/OAuthApi.js +4 -4
- package/dist/api/PaymentApi.js +297 -10
- package/dist/api/TransactionsApi.js +4 -4
- package/dist/api/WalletsApi.js +2 -2
- package/dist/crypto/ApiSigner.js +5 -1
- package/dist/index.js +63 -0
- package/dist/model/AddressesEventData.js +13 -3
- package/dist/model/BalanceUpdateInfoEventData.js +13 -3
- package/dist/model/ChainsEventData.js +13 -3
- package/dist/model/ContractCallDestination.js +1 -1
- package/dist/model/CreateCryptoAddressRequest.js +138 -0
- package/dist/model/CreatePaymentOrderRequest.js +9 -9
- package/dist/model/CreateRefundRequest.js +3 -3
- package/dist/model/CreateSettlement.js +1 -1
- package/dist/model/CryptoAddress.js +12 -12
- package/dist/model/CustodialWeb3TransferSource.js +2 -2
- package/dist/model/DeleteCryptoAddress201Response.js +110 -0
- package/dist/model/EstimateContractCallFeeParams.js +4 -6
- package/dist/model/EvmContractCallDestination.js +2 -2
- package/dist/model/ForcedSweep.js +193 -0
- package/dist/model/ForcedSweepRequest.js +155 -0
- package/dist/model/ForcedSweepStatus.js +66 -0
- package/dist/model/ListForcedSweepRequests200Response.js +123 -0
- package/dist/model/ListSettlementDetails200Response.js +123 -0
- package/dist/model/MPCVaultEventData.js +13 -3
- package/dist/model/MpcTransferSource.js +2 -2
- package/dist/model/Order.js +2 -2
- package/dist/model/PaymentAddressUpdateEventData.js +284 -0
- package/dist/model/PaymentOrderEventData.js +16 -6
- package/dist/model/PaymentRefundEventData.js +13 -3
- package/dist/model/PaymentSettlementEvent.js +52 -3
- package/dist/model/PaymentTransactionEventData.js +827 -0
- package/dist/model/SafeWalletDelegates.js +1 -1
- package/dist/model/SafeWalletDelegatesContractCall.js +1 -1
- package/dist/model/Settlement.js +27 -0
- package/dist/model/SettlementDetail.js +26 -0
- package/dist/model/SettlementInfo.js +31 -5
- package/dist/model/SuspendedTokenEventData.js +13 -3
- package/dist/model/TSSRequestWebhookEventData.js +13 -3
- package/dist/model/TokenListingEventData.js +13 -3
- package/dist/model/TokenizationContractCallParamsData.js +1 -1
- package/dist/model/TokenizationEvmContractCallParams.js +2 -2
- package/dist/model/TokensEventData.js +13 -3
- package/dist/model/TopUpAddress.js +0 -1
- package/dist/model/TransactionDestination.js +1 -1
- package/dist/model/TransactionEvmContractDestination.js +2 -2
- package/dist/model/TransactionRbfSource.js +1 -1
- package/dist/model/TransactionWebhookEventData.js +13 -3
- package/dist/model/UpdateTopUpAddress.js +5 -5
- package/dist/model/WalletInfoEventData.js +13 -3
- package/dist/model/WebhookEventData.js +127 -23
- package/dist/model/WebhookEventDataType.js +12 -2
- package/dist/model/WebhookEventType.js +5 -0
- package/docs/AddressesEventData.md +5 -1
- package/docs/BalanceUpdateInfoEventData.md +5 -1
- package/docs/ChainsEventData.md +5 -1
- package/docs/ContractCallDestination.md +1 -1
- package/docs/CreateCryptoAddressRequest.md +11 -0
- package/docs/CreatePaymentOrderRequest.md +4 -4
- package/docs/CreateRefundRequest.md +2 -2
- package/docs/CreateSettlement.md +1 -1
- package/docs/CryptoAddress.md +1 -1
- package/docs/CustodialWeb3TransferSource.md +1 -1
- package/docs/DeleteCryptoAddress201Response.md +9 -0
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EvmContractCallDestination.md +1 -1
- package/docs/ForcedSweep.md +16 -0
- package/docs/ForcedSweepRequest.md +12 -0
- package/docs/ForcedSweepStatus.md +14 -0
- package/docs/ListForcedSweepRequests200Response.md +10 -0
- package/docs/ListSettlementDetails200Response.md +10 -0
- package/docs/MPCVaultEventData.md +5 -1
- package/docs/MpcTransferSource.md +1 -1
- package/docs/OAuthApi.md +2 -2
- package/docs/Order.md +1 -1
- package/docs/PaymentAddressUpdateEventData.md +53 -0
- package/docs/PaymentApi.md +340 -6
- package/docs/PaymentOrderEventData.md +6 -2
- package/docs/PaymentRefundEventData.md +5 -1
- package/docs/PaymentSettlementEvent.md +8 -1
- package/docs/PaymentTransactionEventData.md +84 -0
- package/docs/SafeWalletDelegates.md +1 -1
- package/docs/SafeWalletDelegatesContractCall.md +1 -1
- package/docs/Settlement.md +3 -0
- package/docs/SettlementDetail.md +2 -0
- package/docs/SettlementInfo.md +6 -4
- package/docs/SuspendedTokenEventData.md +5 -1
- package/docs/TSSRequestWebhookEventData.md +5 -1
- package/docs/TokenListingEventData.md +5 -1
- package/docs/TokenizationContractCallParamsData.md +1 -1
- package/docs/TokenizationEvmContractCallParams.md +1 -1
- package/docs/TokensEventData.md +5 -1
- package/docs/TransactionDestination.md +1 -1
- package/docs/TransactionEvmContractDestination.md +1 -1
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionWebhookEventData.md +5 -1
- package/docs/TransactionsApi.md +2 -2
- package/docs/UpdateTopUpAddress.md +2 -2
- package/docs/WalletInfoEventData.md +5 -1
- package/docs/WalletsApi.md +1 -1
- package/docs/WebhookEventData.md +24 -12
- package/docs/WebhookEventDataType.md +5 -1
- package/docs/WebhookEventType.md +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](http
|
|
|
15
15
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
16
16
|
|
|
17
17
|
- API version: v2
|
|
18
|
-
- Package version: 1.
|
|
18
|
+
- Package version: 1.21.0
|
|
19
19
|
- Generator version: 7.6.0
|
|
20
20
|
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
|
|
21
21
|
For more information, please visit [https://www.cobo.com/waas](https://www.cobo.com/waas)
|
|
@@ -97,10 +97,13 @@ Class | Method | HTTP request | Description
|
|
|
97
97
|
*CoboWaas2.OAuthApi* | [**refreshToken**](docs/OAuthApi.md#refreshToken) | **POST** /oauth/token | Refresh Org Access Token
|
|
98
98
|
*CoboWaas2.OrganizationsApi* | [**getOrgInfo**](docs/OrganizationsApi.md#getOrgInfo) | **GET** /organizations/info | Get organization information
|
|
99
99
|
*CoboWaas2.PaymentApi* | [**cancelRefundById**](docs/PaymentApi.md#cancelRefundById) | **PUT** /payments/refunds/{refund_id}/cancel | Cancel refund order
|
|
100
|
+
*CoboWaas2.PaymentApi* | [**createCryptoAddress**](docs/PaymentApi.md#createCryptoAddress) | **POST** /payments/crypto_addresses | Create crypto address
|
|
101
|
+
*CoboWaas2.PaymentApi* | [**createForcedSweepRequest**](docs/PaymentApi.md#createForcedSweepRequest) | **POST** /payments/force_sweep_requests | Create forced sweep
|
|
100
102
|
*CoboWaas2.PaymentApi* | [**createMerchant**](docs/PaymentApi.md#createMerchant) | **POST** /payments/merchants | Create merchant
|
|
101
103
|
*CoboWaas2.PaymentApi* | [**createPaymentOrder**](docs/PaymentApi.md#createPaymentOrder) | **POST** /payments/orders | Create pay-in order
|
|
102
104
|
*CoboWaas2.PaymentApi* | [**createRefund**](docs/PaymentApi.md#createRefund) | **POST** /payments/refunds | Create refund order
|
|
103
105
|
*CoboWaas2.PaymentApi* | [**createSettlementRequest**](docs/PaymentApi.md#createSettlementRequest) | **POST** /payments/settlement_requests | Create settlement request
|
|
106
|
+
*CoboWaas2.PaymentApi* | [**deleteCryptoAddress**](docs/PaymentApi.md#deleteCryptoAddress) | **POST** /payments/crypto_addresses/{crypto_address_id}/delete | Delete crypto address
|
|
104
107
|
*CoboWaas2.PaymentApi* | [**getExchangeRate**](docs/PaymentApi.md#getExchangeRate) | **GET** /payments/exchange_rates/{token_id}/{currency} | Get exchange rate
|
|
105
108
|
*CoboWaas2.PaymentApi* | [**getPaymentOrderDetailById**](docs/PaymentApi.md#getPaymentOrderDetailById) | **GET** /payments/orders/{order_id} | Get pay-in order information
|
|
106
109
|
*CoboWaas2.PaymentApi* | [**getRefundDetailById**](docs/PaymentApi.md#getRefundDetailById) | **GET** /payments/refunds/{refund_id} | Get refund order information
|
|
@@ -110,14 +113,17 @@ Class | Method | HTTP request | Description
|
|
|
110
113
|
*CoboWaas2.PaymentApi* | [**getTopUpAddress**](docs/PaymentApi.md#getTopUpAddress) | **GET** /payments/topup/address | Get top-up address
|
|
111
114
|
*CoboWaas2.PaymentApi* | [**listBankAccounts**](docs/PaymentApi.md#listBankAccounts) | **GET** /payments/bank_accounts | List all bank accounts
|
|
112
115
|
*CoboWaas2.PaymentApi* | [**listCryptoAddresses**](docs/PaymentApi.md#listCryptoAddresses) | **GET** /payments/crypto_addresses | List crypto addresses
|
|
116
|
+
*CoboWaas2.PaymentApi* | [**listForcedSweepRequests**](docs/PaymentApi.md#listForcedSweepRequests) | **GET** /payments/force_sweep_requests | List forced sweeps
|
|
113
117
|
*CoboWaas2.PaymentApi* | [**listMerchants**](docs/PaymentApi.md#listMerchants) | **GET** /payments/merchants | List all merchants
|
|
114
118
|
*CoboWaas2.PaymentApi* | [**listPaymentOrders**](docs/PaymentApi.md#listPaymentOrders) | **GET** /payments/orders | List all pay-in orders
|
|
115
119
|
*CoboWaas2.PaymentApi* | [**listPaymentSupportedTokens**](docs/PaymentApi.md#listPaymentSupportedTokens) | **GET** /payments/supported_tokens | List all supported tokens
|
|
120
|
+
*CoboWaas2.PaymentApi* | [**listSettlementDetails**](docs/PaymentApi.md#listSettlementDetails) | **GET** /payments/settlement_details | List all settlement details
|
|
116
121
|
*CoboWaas2.PaymentApi* | [**listSettlementRequests**](docs/PaymentApi.md#listSettlementRequests) | **GET** /payments/settlement_requests | List all settlement requests
|
|
117
122
|
*CoboWaas2.PaymentApi* | [**listTopUpPayers**](docs/PaymentApi.md#listTopUpPayers) | **GET** /payments/topup/payers | List payers
|
|
118
123
|
*CoboWaas2.PaymentApi* | [**updateMerchantById**](docs/PaymentApi.md#updateMerchantById) | **PUT** /payments/merchants/{merchant_id} | Update merchant
|
|
119
124
|
*CoboWaas2.PaymentApi* | [**updatePaymentOrder**](docs/PaymentApi.md#updatePaymentOrder) | **PUT** /payments/orders/{order_id} | Update pay-in order
|
|
120
125
|
*CoboWaas2.PaymentApi* | [**updateRefundById**](docs/PaymentApi.md#updateRefundById) | **PUT** /payments/refunds/{refund_id} | Update refund order information
|
|
126
|
+
*CoboWaas2.PaymentApi* | [**updateTopUpAddress**](docs/PaymentApi.md#updateTopUpAddress) | **PUT** /payments/topup/address | Update top-up address
|
|
121
127
|
*CoboWaas2.PrimeBrokerApi* | [**changeGuardPubkey**](docs/PrimeBrokerApi.md#changeGuardPubkey) | **PUT** /prime_broker/user/{user_id}/guard_pubkey | Change Guard pubkey binding
|
|
122
128
|
*CoboWaas2.PrimeBrokerApi* | [**createGuardPubkey**](docs/PrimeBrokerApi.md#createGuardPubkey) | **POST** /prime_broker/user/{user_id}/guard_pubkey | Create Guard pubkey binding
|
|
123
129
|
*CoboWaas2.PrimeBrokerApi* | [**createPrimeBrokerAddress**](docs/PrimeBrokerApi.md#createPrimeBrokerAddress) | **POST** /prime_broker/user/{user_id}/addresses | Bind addresses to a broker user
|
|
@@ -317,6 +323,7 @@ Class | Method | HTTP request | Description
|
|
|
317
323
|
- [CoboWaas2.CreateBabylonStakingRegistrationRequest](docs/CreateBabylonStakingRegistrationRequest.md)
|
|
318
324
|
- [CoboWaas2.CreateClaimActivity](docs/CreateClaimActivity.md)
|
|
319
325
|
- [CoboWaas2.CreateClaimActivityRequest](docs/CreateClaimActivityRequest.md)
|
|
326
|
+
- [CoboWaas2.CreateCryptoAddressRequest](docs/CreateCryptoAddressRequest.md)
|
|
320
327
|
- [CoboWaas2.CreateCustodialWalletParams](docs/CreateCustodialWalletParams.md)
|
|
321
328
|
- [CoboWaas2.CreateExchangeWalletParams](docs/CreateExchangeWalletParams.md)
|
|
322
329
|
- [CoboWaas2.CreateKeyShareHolder](docs/CreateKeyShareHolder.md)
|
|
@@ -357,6 +364,7 @@ Class | Method | HTTP request | Description
|
|
|
357
364
|
- [CoboWaas2.CustodialWeb3ContractCallSource](docs/CustodialWeb3ContractCallSource.md)
|
|
358
365
|
- [CoboWaas2.CustodialWeb3MessageSignSource](docs/CustodialWeb3MessageSignSource.md)
|
|
359
366
|
- [CoboWaas2.CustodialWeb3TransferSource](docs/CustodialWeb3TransferSource.md)
|
|
367
|
+
- [CoboWaas2.DeleteCryptoAddress201Response](docs/DeleteCryptoAddress201Response.md)
|
|
360
368
|
- [CoboWaas2.DeleteGuardPubkey201Response](docs/DeleteGuardPubkey201Response.md)
|
|
361
369
|
- [CoboWaas2.DeleteKeyShareHolderGroupById201Response](docs/DeleteKeyShareHolderGroupById201Response.md)
|
|
362
370
|
- [CoboWaas2.DeleteWalletById201Response](docs/DeleteWalletById201Response.md)
|
|
@@ -416,6 +424,9 @@ Class | Method | HTTP request | Description
|
|
|
416
424
|
- [CoboWaas2.FeeStationTransfer](docs/FeeStationTransfer.md)
|
|
417
425
|
- [CoboWaas2.FeeType](docs/FeeType.md)
|
|
418
426
|
- [CoboWaas2.FixedFeeRate](docs/FixedFeeRate.md)
|
|
427
|
+
- [CoboWaas2.ForcedSweep](docs/ForcedSweep.md)
|
|
428
|
+
- [CoboWaas2.ForcedSweepRequest](docs/ForcedSweepRequest.md)
|
|
429
|
+
- [CoboWaas2.ForcedSweepStatus](docs/ForcedSweepStatus.md)
|
|
419
430
|
- [CoboWaas2.GetApiKeyInfo200Response](docs/GetApiKeyInfo200Response.md)
|
|
420
431
|
- [CoboWaas2.GetExchangeRate200Response](docs/GetExchangeRate200Response.md)
|
|
421
432
|
- [CoboWaas2.GetMaxTransferableValueWithFeeModelRequest](docs/GetMaxTransferableValueWithFeeModelRequest.md)
|
|
@@ -449,12 +460,14 @@ Class | Method | HTTP request | Description
|
|
|
449
460
|
- [CoboWaas2.ListBabylonStakingRegistrations200Response](docs/ListBabylonStakingRegistrations200Response.md)
|
|
450
461
|
- [CoboWaas2.ListCallbackMessages200Response](docs/ListCallbackMessages200Response.md)
|
|
451
462
|
- [CoboWaas2.ListExchanges200ResponseInner](docs/ListExchanges200ResponseInner.md)
|
|
463
|
+
- [CoboWaas2.ListForcedSweepRequests200Response](docs/ListForcedSweepRequests200Response.md)
|
|
452
464
|
- [CoboWaas2.ListKeyShareHolderGroups200Response](docs/ListKeyShareHolderGroups200Response.md)
|
|
453
465
|
- [CoboWaas2.ListKeyShareHolders200Response](docs/ListKeyShareHolders200Response.md)
|
|
454
466
|
- [CoboWaas2.ListMerchants200Response](docs/ListMerchants200Response.md)
|
|
455
467
|
- [CoboWaas2.ListMpcProjects200Response](docs/ListMpcProjects200Response.md)
|
|
456
468
|
- [CoboWaas2.ListMpcVaults200Response](docs/ListMpcVaults200Response.md)
|
|
457
469
|
- [CoboWaas2.ListPaymentOrders200Response](docs/ListPaymentOrders200Response.md)
|
|
470
|
+
- [CoboWaas2.ListSettlementDetails200Response](docs/ListSettlementDetails200Response.md)
|
|
458
471
|
- [CoboWaas2.ListSettlementRequests200Response](docs/ListSettlementRequests200Response.md)
|
|
459
472
|
- [CoboWaas2.ListStakingActivities200Response](docs/ListStakingActivities200Response.md)
|
|
460
473
|
- [CoboWaas2.ListStakingPools200Response](docs/ListStakingPools200Response.md)
|
|
@@ -505,10 +518,12 @@ Class | Method | HTTP request | Description
|
|
|
505
518
|
- [CoboWaas2.OrgInfo](docs/OrgInfo.md)
|
|
506
519
|
- [CoboWaas2.Pagination](docs/Pagination.md)
|
|
507
520
|
- [CoboWaas2.PayerAccount](docs/PayerAccount.md)
|
|
521
|
+
- [CoboWaas2.PaymentAddressUpdateEventData](docs/PaymentAddressUpdateEventData.md)
|
|
508
522
|
- [CoboWaas2.PaymentOrderEventData](docs/PaymentOrderEventData.md)
|
|
509
523
|
- [CoboWaas2.PaymentRefundEventData](docs/PaymentRefundEventData.md)
|
|
510
524
|
- [CoboWaas2.PaymentSettlementEvent](docs/PaymentSettlementEvent.md)
|
|
511
525
|
- [CoboWaas2.PaymentTransaction](docs/PaymentTransaction.md)
|
|
526
|
+
- [CoboWaas2.PaymentTransactionEventData](docs/PaymentTransactionEventData.md)
|
|
512
527
|
- [CoboWaas2.PayoutChannel](docs/PayoutChannel.md)
|
|
513
528
|
- [CoboWaas2.PolicyAction](docs/PolicyAction.md)
|
|
514
529
|
- [CoboWaas2.PolicyActionContent](docs/PolicyActionContent.md)
|
package/dist/ApiClient.js
CHANGED
|
@@ -52,6 +52,7 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
52
52
|
var privateKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
53
53
|
var curve_type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
|
54
54
|
var signer = arguments.length > 3 ? arguments[3] : undefined;
|
|
55
|
+
var is_debug = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
55
56
|
_classCallCheck(this, ApiClient);
|
|
56
57
|
/**
|
|
57
58
|
* The base URL against which to resolve every API call's (relative) path.
|
|
@@ -101,7 +102,7 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
101
102
|
* @default {}
|
|
102
103
|
*/
|
|
103
104
|
this.defaultHeaders = {
|
|
104
|
-
'User-Agent': 'cobo-waas2-js-sdk/1.
|
|
105
|
+
'User-Agent': 'cobo-waas2-js-sdk/1.21.0'
|
|
105
106
|
};
|
|
106
107
|
|
|
107
108
|
/**
|
|
@@ -143,6 +144,12 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
143
144
|
* Allow user to add superagent plugins
|
|
144
145
|
*/
|
|
145
146
|
this.plugins = null;
|
|
147
|
+
|
|
148
|
+
/*
|
|
149
|
+
* If set to true, the client will log debug information
|
|
150
|
+
* @default false
|
|
151
|
+
*/
|
|
152
|
+
this.isDebug = is_debug;
|
|
146
153
|
}
|
|
147
154
|
|
|
148
155
|
/***
|
|
@@ -494,7 +501,9 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
494
501
|
}).join('&');
|
|
495
502
|
var nonce = String(new Date().getTime());
|
|
496
503
|
var strToSign = [httpMethod, new URL(url).pathname, nonce, queryStr, bodyParam ? JSON.stringify(bodyParam) : ''].join('|');
|
|
497
|
-
|
|
504
|
+
if (this.isDebug) {
|
|
505
|
+
console.log("strToSign:", strToSign);
|
|
506
|
+
}
|
|
498
507
|
var hash2String = CryptoJS.SHA256(CryptoJS.SHA256(strToSign)).toString(CryptoJS.enc.Hex);
|
|
499
508
|
var headers = {
|
|
500
509
|
'BIZ-API-KEY': this.signer.getPublicKey(),
|
package/dist/PreRequestScript.js
CHANGED
|
@@ -7,7 +7,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
7
7
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
8
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
9
9
|
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
10
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) {
|
|
10
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
11
11
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
12
12
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
13
13
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
package/dist/api/OAuthApi.js
CHANGED
|
@@ -48,7 +48,7 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Get Access Token
|
|
51
|
-
* This operation acquires an Access Token and a Refresh Token for the Checkout SDK. For security purposes, an Access Token expires after a certain period. Once it expires, you need to call the [Refresh Access Token](https://www.cobo.com/developers/v2/api-references/oauth/refresh-access-token) operation to get a new Access Token and a new Refresh Token.
|
|
51
|
+
* This operation acquires an Access Token and a Refresh Token for the [Checkout SDK](https://www.cobo.com/developers/v2_cn/payments/checkout-sdk). For security purposes, an Access Token expires after a certain period. Once it expires, you need to call the [Refresh Access Token](https://www.cobo.com/developers/v2/api-references/oauth/refresh-access-token) operation to get a new Access Token and a new Refresh Token.
|
|
52
52
|
* @param {module:model/ExchangePermissionTokenRequest} ExchangePermissionTokenRequest The request body to acquire an Access Token.
|
|
53
53
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ExchangePermissionToken201Response} and HTTP response
|
|
54
54
|
*/
|
|
@@ -76,7 +76,7 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* Get Access Token
|
|
79
|
-
* This operation acquires an Access Token and a Refresh Token for the Checkout SDK. For security purposes, an Access Token expires after a certain period. Once it expires, you need to call the [Refresh Access Token](https://www.cobo.com/developers/v2/api-references/oauth/refresh-access-token) operation to get a new Access Token and a new Refresh Token.
|
|
79
|
+
* This operation acquires an Access Token and a Refresh Token for the [Checkout SDK](https://www.cobo.com/developers/v2_cn/payments/checkout-sdk). For security purposes, an Access Token expires after a certain period. Once it expires, you need to call the [Refresh Access Token](https://www.cobo.com/developers/v2/api-references/oauth/refresh-access-token) operation to get a new Access Token and a new Refresh Token.
|
|
80
80
|
* @param {module:model/ExchangePermissionTokenRequest} ExchangePermissionTokenRequest The request body to acquire an Access Token.
|
|
81
81
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ExchangePermissionToken201Response}
|
|
82
82
|
*/
|
|
@@ -148,7 +148,7 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
150
|
* Refresh Access Token
|
|
151
|
-
* This operation refreshes the Access Token and Refresh Token for the Checkout SDK. For security purposes, an Access Token expires after a certain period. Once it expires, you need to call this operation to get a new Access Token and Refresh Token.
|
|
151
|
+
* This operation refreshes the Access Token and Refresh Token for the [Checkout SDK](https://www.cobo.com/developers/v2_cn/payments/checkout-sdk). For security purposes, an Access Token expires after a certain period. Once it expires, you need to call this operation to get a new Access Token and Refresh Token.
|
|
152
152
|
* @param {module:model/RefreshPermissionTokenRequest} RefreshPermissionTokenRequest The request body to refresh the Access Token and the Refresh Token.
|
|
153
153
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ExchangePermissionToken201Response} and HTTP response
|
|
154
154
|
*/
|
|
@@ -176,7 +176,7 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
178
|
* Refresh Access Token
|
|
179
|
-
* This operation refreshes the Access Token and Refresh Token for the Checkout SDK. For security purposes, an Access Token expires after a certain period. Once it expires, you need to call this operation to get a new Access Token and Refresh Token.
|
|
179
|
+
* This operation refreshes the Access Token and Refresh Token for the [Checkout SDK](https://www.cobo.com/developers/v2_cn/payments/checkout-sdk). For security purposes, an Access Token expires after a certain period. Once it expires, you need to call this operation to get a new Access Token and Refresh Token.
|
|
180
180
|
* @param {module:model/RefreshPermissionTokenRequest} RefreshPermissionTokenRequest The request body to refresh the Access Token and the Refresh Token.
|
|
181
181
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ExchangePermissionToken201Response}
|
|
182
182
|
*/
|