@cobo/cobo-waas2 1.16.0 → 1.17.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 +13 -5
- package/dist/ApiClient.js +1 -1
- package/dist/PreRequestScript.js +27 -33
- package/dist/api/AppWorkflowsApi.js +22 -22
- package/dist/api/OAuthApi.js +93 -6
- package/dist/api/PaymentApi.js +91 -98
- package/dist/api/WalletsApi.js +6 -6
- package/dist/index.js +49 -7
- package/dist/model/AppWorkflow.js +7 -7
- package/dist/model/AppWorkflowField.js +5 -5
- package/dist/model/AppWorkflowPolicy.js +1 -1
- package/dist/model/ApprovalEntry.js +1 -1
- package/dist/model/ApprovalRequest.js +5 -3
- package/dist/model/ApprovalRequestDetail.js +2 -1
- package/dist/model/ApprovalUser.js +4 -4
- package/dist/model/ChainInfo.js +1 -1
- package/dist/model/CreateApprovalRequest201Response.js +2 -1
- package/dist/model/CreatePaymentOrderRequest.js +5 -5
- package/dist/model/CreateRefundRequest.js +35 -0
- package/dist/model/CreateSettlement.js +35 -0
- package/dist/model/CryptoAddress.js +171 -0
- package/dist/model/CustodialTransferDestination.js +137 -0
- package/dist/model/ExchangePermissionToken201Response.js +122 -0
- package/dist/model/{CreateBankAccountRequest.js → ExchangePermissionTokenRequest.js} +30 -28
- package/dist/model/Order.js +4 -4
- package/dist/model/PaymentOrderEventData.js +6 -6
- package/dist/model/PayoutChannel.js +61 -0
- package/dist/model/PolicyAction.js +1 -1
- package/dist/model/PolicyActionContent.js +6 -4
- package/dist/model/PolicyCondition.js +5 -5
- package/dist/model/RefreshPermissionTokenRequest.js +110 -0
- package/dist/model/RequestApproval.js +9 -9
- package/dist/model/RevokeApprovalRequest201Response.js +2 -1
- package/dist/model/RevokeApprovalRequestRequest.js +2 -2
- package/dist/model/SettlementDetail.js +9 -0
- package/dist/model/SupportedToken.js +222 -0
- package/dist/model/TransactionDestination.js +4 -0
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionTransferToWalletDestination.js +2 -2
- package/dist/model/TransferDestination.js +42 -14
- package/dist/model/TransferDestinationType.js +5 -0
- package/docs/AppWorkflow.md +3 -3
- package/docs/AppWorkflowField.md +2 -2
- package/docs/AppWorkflowsApi.md +12 -12
- package/docs/ApprovalRequest.md +2 -2
- package/docs/ApprovalRequestDetail.md +1 -1
- package/docs/ApprovalUser.md +2 -2
- package/docs/ChainInfo.md +1 -1
- package/docs/CreateApprovalRequest201Response.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +1 -1
- package/docs/CreateRefundRequest.md +3 -0
- package/docs/CreateSettlement.md +3 -0
- package/docs/CryptoAddress.md +14 -0
- package/docs/CustodialTransferDestination.md +11 -0
- package/docs/ExchangePermissionToken201Response.md +12 -0
- package/docs/ExchangePermissionTokenRequest.md +9 -0
- package/docs/OAuthApi.md +102 -0
- package/docs/Order.md +2 -2
- package/docs/PaymentApi.md +80 -86
- package/docs/PaymentOrderEventData.md +2 -2
- package/docs/PayoutChannel.md +12 -0
- package/docs/PolicyActionContent.md +4 -4
- package/docs/PolicyCondition.md +2 -2
- package/docs/RefreshPermissionTokenRequest.md +9 -0
- package/docs/RequestApproval.md +4 -4
- package/docs/RevokeApprovalRequest201Response.md +1 -1
- package/docs/RevokeApprovalRequestRequest.md +1 -1
- package/docs/SettlementDetail.md +1 -0
- package/docs/SupportedToken.md +17 -0
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionTransferToWalletDestination.md +1 -1
- package/docs/TransferDestination.md +1 -1
- package/docs/TransferDestinationType.md +2 -0
- package/docs/WalletsApi.md +3 -3
- package/package.json +1 -1
- package/docs/CreateBankAccountRequest.md +0 -9
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.17.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)
|
|
@@ -70,7 +70,7 @@ Class | Method | HTTP request | Description
|
|
|
70
70
|
*CoboWaas2.AddressBooksApi* | [**listAddressBooks**](docs/AddressBooksApi.md#listAddressBooks) | **GET** /address_books | List address book entries
|
|
71
71
|
*CoboWaas2.AppWorkflowsApi* | [**createApprovalRequest**](docs/AppWorkflowsApi.md#createApprovalRequest) | **POST** /app/workflows/approval_requests | Request workflow approval
|
|
72
72
|
*CoboWaas2.AppWorkflowsApi* | [**getApprovalRequestById**](docs/AppWorkflowsApi.md#getApprovalRequestById) | **GET** /app/workflows/approval_requests/{approval_id} | Get approval request details
|
|
73
|
-
*CoboWaas2.AppWorkflowsApi* | [**listAppWorkflows**](docs/AppWorkflowsApi.md#listAppWorkflows) | **GET** /app/workflows |
|
|
73
|
+
*CoboWaas2.AppWorkflowsApi* | [**listAppWorkflows**](docs/AppWorkflowsApi.md#listAppWorkflows) | **GET** /app/workflows | List app workflows
|
|
74
74
|
*CoboWaas2.AppWorkflowsApi* | [**listApprovalRequests**](docs/AppWorkflowsApi.md#listApprovalRequests) | **GET** /app/workflows/approval_requests | List approval requests
|
|
75
75
|
*CoboWaas2.AppWorkflowsApi* | [**revokeApprovalRequest**](docs/AppWorkflowsApi.md#revokeApprovalRequest) | **POST** /app/workflows/approval_requests/{approval_id}/revoke | Revoke approval request
|
|
76
76
|
*CoboWaas2.DevelopersApi* | [**getApiKeyInfo**](docs/DevelopersApi.md#getApiKeyInfo) | **GET** /developers/api_key_info | Get API key information
|
|
@@ -91,9 +91,10 @@ Class | Method | HTTP request | Description
|
|
|
91
91
|
*CoboWaas2.FeeStationApi* | [**listFeeStationAddresses**](docs/FeeStationApi.md#listFeeStationAddresses) | **GET** /fee_station/addresses | List Fee Station addresses
|
|
92
92
|
*CoboWaas2.FeeStationApi* | [**listFeeStationTransactions**](docs/FeeStationApi.md#listFeeStationTransactions) | **GET** /fee_station/transactions | List all Fee Station transactions
|
|
93
93
|
*CoboWaas2.FeeStationApi* | [**listTokenBalancesForFeeStation**](docs/FeeStationApi.md#listTokenBalancesForFeeStation) | **GET** /fee_station/tokens | List Fee Station token balances
|
|
94
|
+
*CoboWaas2.OAuthApi* | [**exchangePermissionToken**](docs/OAuthApi.md#exchangePermissionToken) | **POST** /oauth/permission_token/exchange | Exchange Permission Access Token by API Key
|
|
94
95
|
*CoboWaas2.OAuthApi* | [**getToken**](docs/OAuthApi.md#getToken) | **GET** /oauth/token | Get Org Access Token
|
|
96
|
+
*CoboWaas2.OAuthApi* | [**refreshPermissionToken**](docs/OAuthApi.md#refreshPermissionToken) | **POST** /oauth/permission_token/refresh | Refresh Permission Access Token by Permission Refresh Token
|
|
95
97
|
*CoboWaas2.OAuthApi* | [**refreshToken**](docs/OAuthApi.md#refreshToken) | **POST** /oauth/token | Refresh Org Access Token
|
|
96
|
-
*CoboWaas2.PaymentApi* | [**createBankAccount**](docs/PaymentApi.md#createBankAccount) | **POST** /payments/bank_accounts | Create bank account
|
|
97
98
|
*CoboWaas2.PaymentApi* | [**createMerchant**](docs/PaymentApi.md#createMerchant) | **POST** /payments/merchants | Create merchant
|
|
98
99
|
*CoboWaas2.PaymentApi* | [**createPaymentOrder**](docs/PaymentApi.md#createPaymentOrder) | **POST** /payments/orders | Create pay-in order
|
|
99
100
|
*CoboWaas2.PaymentApi* | [**createRefund**](docs/PaymentApi.md#createRefund) | **POST** /payments/refunds | Create refund order
|
|
@@ -105,10 +106,11 @@ Class | Method | HTTP request | Description
|
|
|
105
106
|
*CoboWaas2.PaymentApi* | [**getSettlementById**](docs/PaymentApi.md#getSettlementById) | **GET** /payments/settlement_requests/{settlement_request_id} | Get settlement request information
|
|
106
107
|
*CoboWaas2.PaymentApi* | [**getSettlementInfoByIds**](docs/PaymentApi.md#getSettlementInfoByIds) | **GET** /payments/settlement_info | Get withdrawable balances
|
|
107
108
|
*CoboWaas2.PaymentApi* | [**listBankAccounts**](docs/PaymentApi.md#listBankAccounts) | **GET** /payments/bank_accounts | List all bank accounts
|
|
109
|
+
*CoboWaas2.PaymentApi* | [**listCryptoAddresses**](docs/PaymentApi.md#listCryptoAddresses) | **GET** /payments/crypto_addresses | List crypto addresses
|
|
108
110
|
*CoboWaas2.PaymentApi* | [**listMerchants**](docs/PaymentApi.md#listMerchants) | **GET** /payments/merchants | List all merchants
|
|
109
111
|
*CoboWaas2.PaymentApi* | [**listPaymentOrders**](docs/PaymentApi.md#listPaymentOrders) | **GET** /payments/orders | List all pay-in orders
|
|
112
|
+
*CoboWaas2.PaymentApi* | [**listPaymentSupportedTokens**](docs/PaymentApi.md#listPaymentSupportedTokens) | **GET** /payments/supported_tokens | List all supported tokens
|
|
110
113
|
*CoboWaas2.PaymentApi* | [**listSettlementRequests**](docs/PaymentApi.md#listSettlementRequests) | **GET** /payments/settlement_requests | List all settlement requests
|
|
111
|
-
*CoboWaas2.PaymentApi* | [**updateBankAccountById**](docs/PaymentApi.md#updateBankAccountById) | **PUT** /payments/bank_accounts/{bank_account_id} | Update bank account
|
|
112
114
|
*CoboWaas2.PaymentApi* | [**updateMerchantById**](docs/PaymentApi.md#updateMerchantById) | **PUT** /payments/merchants/{merchant_id} | Update merchant
|
|
113
115
|
*CoboWaas2.PaymentApi* | [**updatePaymentOrder**](docs/PaymentApi.md#updatePaymentOrder) | **PUT** /payments/orders/{order_id} | Update pay-in order
|
|
114
116
|
*CoboWaas2.PrimeBrokerApi* | [**changeGuardPubkey**](docs/PrimeBrokerApi.md#changeGuardPubkey) | **PUT** /prime_broker/user/{user_id}/guard_pubkey | Change Guard pubkey binding
|
|
@@ -297,7 +299,6 @@ Class | Method | HTTP request | Description
|
|
|
297
299
|
- [CoboWaas2.CreateBabylonAirdropRegistrationRequest](docs/CreateBabylonAirdropRegistrationRequest.md)
|
|
298
300
|
- [CoboWaas2.CreateBabylonStakingRegistration201Response](docs/CreateBabylonStakingRegistration201Response.md)
|
|
299
301
|
- [CoboWaas2.CreateBabylonStakingRegistrationRequest](docs/CreateBabylonStakingRegistrationRequest.md)
|
|
300
|
-
- [CoboWaas2.CreateBankAccountRequest](docs/CreateBankAccountRequest.md)
|
|
301
302
|
- [CoboWaas2.CreateClaimActivity](docs/CreateClaimActivity.md)
|
|
302
303
|
- [CoboWaas2.CreateClaimActivityRequest](docs/CreateClaimActivityRequest.md)
|
|
303
304
|
- [CoboWaas2.CreateCustodialWalletParams](docs/CreateCustodialWalletParams.md)
|
|
@@ -332,7 +333,9 @@ Class | Method | HTTP request | Description
|
|
|
332
333
|
- [CoboWaas2.CreateWithdrawActivity](docs/CreateWithdrawActivity.md)
|
|
333
334
|
- [CoboWaas2.CreateWithdrawActivityRequest](docs/CreateWithdrawActivityRequest.md)
|
|
334
335
|
- [CoboWaas2.CreatedWalletInfo](docs/CreatedWalletInfo.md)
|
|
336
|
+
- [CoboWaas2.CryptoAddress](docs/CryptoAddress.md)
|
|
335
337
|
- [CoboWaas2.CurveType](docs/CurveType.md)
|
|
338
|
+
- [CoboWaas2.CustodialTransferDestination](docs/CustodialTransferDestination.md)
|
|
336
339
|
- [CoboWaas2.CustodialTransferSource](docs/CustodialTransferSource.md)
|
|
337
340
|
- [CoboWaas2.CustodialWalletInfo](docs/CustodialWalletInfo.md)
|
|
338
341
|
- [CoboWaas2.CustodialWeb3ContractCallSource](docs/CustodialWeb3ContractCallSource.md)
|
|
@@ -376,6 +379,8 @@ Class | Method | HTTP request | Description
|
|
|
376
379
|
- [CoboWaas2.EvmLegacyFeeBasePrice](docs/EvmLegacyFeeBasePrice.md)
|
|
377
380
|
- [CoboWaas2.EvmLegacyFeeRate](docs/EvmLegacyFeeRate.md)
|
|
378
381
|
- [CoboWaas2.ExchangeId](docs/ExchangeId.md)
|
|
382
|
+
- [CoboWaas2.ExchangePermissionToken201Response](docs/ExchangePermissionToken201Response.md)
|
|
383
|
+
- [CoboWaas2.ExchangePermissionTokenRequest](docs/ExchangePermissionTokenRequest.md)
|
|
379
384
|
- [CoboWaas2.ExchangeTransferDestination](docs/ExchangeTransferDestination.md)
|
|
380
385
|
- [CoboWaas2.ExchangeTransferSource](docs/ExchangeTransferSource.md)
|
|
381
386
|
- [CoboWaas2.ExchangeWalletInfo](docs/ExchangeWalletInfo.md)
|
|
@@ -474,6 +479,7 @@ Class | Method | HTTP request | Description
|
|
|
474
479
|
- [CoboWaas2.PaymentRefundEventData](docs/PaymentRefundEventData.md)
|
|
475
480
|
- [CoboWaas2.PaymentSettlementEvent](docs/PaymentSettlementEvent.md)
|
|
476
481
|
- [CoboWaas2.PaymentTransaction](docs/PaymentTransaction.md)
|
|
482
|
+
- [CoboWaas2.PayoutChannel](docs/PayoutChannel.md)
|
|
477
483
|
- [CoboWaas2.PolicyAction](docs/PolicyAction.md)
|
|
478
484
|
- [CoboWaas2.PolicyActionContent](docs/PolicyActionContent.md)
|
|
479
485
|
- [CoboWaas2.PolicyActionType](docs/PolicyActionType.md)
|
|
@@ -489,6 +495,7 @@ Class | Method | HTTP request | Description
|
|
|
489
495
|
- [CoboWaas2.RawMessageSignDestination](docs/RawMessageSignDestination.md)
|
|
490
496
|
- [CoboWaas2.RefreshAddressBalancesByToken200Response](docs/RefreshAddressBalancesByToken200Response.md)
|
|
491
497
|
- [CoboWaas2.RefreshAddressBalancesByTokenRequest](docs/RefreshAddressBalancesByTokenRequest.md)
|
|
498
|
+
- [CoboWaas2.RefreshPermissionTokenRequest](docs/RefreshPermissionTokenRequest.md)
|
|
492
499
|
- [CoboWaas2.RefreshToken2XXResponse](docs/RefreshToken2XXResponse.md)
|
|
493
500
|
- [CoboWaas2.RefreshTokenRequest](docs/RefreshTokenRequest.md)
|
|
494
501
|
- [CoboWaas2.Refund](docs/Refund.md)
|
|
@@ -537,6 +544,7 @@ Class | Method | HTTP request | Description
|
|
|
537
544
|
- [CoboWaas2.StakingsExtra](docs/StakingsExtra.md)
|
|
538
545
|
- [CoboWaas2.SubWalletAssetBalance](docs/SubWalletAssetBalance.md)
|
|
539
546
|
- [CoboWaas2.SubmitDepositTravelRuleInfo201Response](docs/SubmitDepositTravelRuleInfo201Response.md)
|
|
547
|
+
- [CoboWaas2.SupportedToken](docs/SupportedToken.md)
|
|
540
548
|
- [CoboWaas2.SwapActivity](docs/SwapActivity.md)
|
|
541
549
|
- [CoboWaas2.SwapActivityApprovers](docs/SwapActivityApprovers.md)
|
|
542
550
|
- [CoboWaas2.SwapActivityDetail](docs/SwapActivityDetail.md)
|
package/dist/ApiClient.js
CHANGED
package/dist/PreRequestScript.js
CHANGED
|
@@ -6,7 +6,8 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
6
6
|
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; }
|
|
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
|
-
function
|
|
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) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
|
|
10
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); }
|
|
11
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); }); }; }
|
|
12
13
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -390,24 +391,21 @@ var _sign = function _sign(e, t, n) {
|
|
|
390
391
|
};
|
|
391
392
|
},
|
|
392
393
|
signAsync = /*#__PURE__*/function () {
|
|
393
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/
|
|
394
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(e, t) {
|
|
394
395
|
var n, o, r;
|
|
395
|
-
return
|
|
396
|
-
while (1) switch (_context.
|
|
396
|
+
return _regenerator().w(function (_context) {
|
|
397
|
+
while (1) switch (_context.n) {
|
|
397
398
|
case 0:
|
|
398
399
|
n = toU8(e);
|
|
399
|
-
_context.
|
|
400
|
+
_context.n = 1;
|
|
400
401
|
return getExtendedPublicKeyAsync(t);
|
|
401
|
-
case
|
|
402
|
-
o = _context.
|
|
403
|
-
_context.
|
|
402
|
+
case 1:
|
|
403
|
+
o = _context.v;
|
|
404
|
+
_context.n = 2;
|
|
404
405
|
return sha512a(o.prefix, n);
|
|
405
|
-
case
|
|
406
|
-
r = _context.
|
|
407
|
-
return _context.
|
|
408
|
-
case 8:
|
|
409
|
-
case "end":
|
|
410
|
-
return _context.stop();
|
|
406
|
+
case 2:
|
|
407
|
+
r = _context.v;
|
|
408
|
+
return _context.a(2, hashFinish(!0, _sign(o, r, n)));
|
|
411
409
|
}
|
|
412
410
|
}, _callee);
|
|
413
411
|
}));
|
|
@@ -447,17 +445,14 @@ var _sign = function _sign(e, t, n) {
|
|
|
447
445
|
};
|
|
448
446
|
},
|
|
449
447
|
verifyAsync = /*#__PURE__*/function () {
|
|
450
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/
|
|
448
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(e, t, n) {
|
|
451
449
|
var o,
|
|
452
450
|
_args2 = arguments;
|
|
453
|
-
return
|
|
454
|
-
while (1) switch (_context2.
|
|
451
|
+
return _regenerator().w(function (_context2) {
|
|
452
|
+
while (1) switch (_context2.n) {
|
|
455
453
|
case 0:
|
|
456
454
|
o = _args2.length > 3 && _args2[3] !== undefined ? _args2[3] : dvo;
|
|
457
|
-
return _context2.
|
|
458
|
-
case 2:
|
|
459
|
-
case "end":
|
|
460
|
-
return _context2.stop();
|
|
455
|
+
return _context2.a(2, hashFinish(!0, _verify(e, t, n, o)));
|
|
461
456
|
}
|
|
462
457
|
}, _callee2);
|
|
463
458
|
}));
|
|
@@ -484,25 +479,24 @@ var _sign = function _sign(e, t, n) {
|
|
|
484
479
|
return t && t.getRandomValues || err("crypto.getRandomValues must be defined"), t.getRandomValues(u8n(e));
|
|
485
480
|
},
|
|
486
481
|
sha512Async: function () {
|
|
487
|
-
var _sha512Async = _asyncToGenerator(/*#__PURE__*/
|
|
482
|
+
var _sha512Async = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
|
|
488
483
|
var t,
|
|
489
484
|
n,
|
|
490
|
-
_args3 = arguments
|
|
491
|
-
|
|
492
|
-
|
|
485
|
+
_args3 = arguments,
|
|
486
|
+
_t3,
|
|
487
|
+
_t4;
|
|
488
|
+
return _regenerator().w(function (_context3) {
|
|
489
|
+
while (1) switch (_context3.n) {
|
|
493
490
|
case 0:
|
|
494
491
|
t = cr();
|
|
495
492
|
t && t.subtle || err("crypto.subtle or etc.sha512Async must be defined");
|
|
496
493
|
n = concatB.apply(void 0, _args3);
|
|
497
|
-
|
|
498
|
-
_context3.
|
|
494
|
+
_t3 = u8n;
|
|
495
|
+
_context3.n = 1;
|
|
499
496
|
return t.subtle.digest("SHA-512", n.buffer);
|
|
500
|
-
case
|
|
501
|
-
|
|
502
|
-
return _context3.
|
|
503
|
-
case 8:
|
|
504
|
-
case "end":
|
|
505
|
-
return _context3.stop();
|
|
497
|
+
case 1:
|
|
498
|
+
_t4 = _context3.v;
|
|
499
|
+
return _context3.a(2, _t3(_t4));
|
|
506
500
|
}
|
|
507
501
|
}, _callee3);
|
|
508
502
|
}));
|
|
@@ -48,9 +48,9 @@ var AppWorkflowsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Request workflow approval
|
|
51
|
-
* This operation
|
|
51
|
+
* This operation triggers a specified workflow and generates a new approval request. <Note>To use the approval workflow operations, you must use the Cobo OAuth authentication method ([Org Access Token](https://www.cobo.com/developers/v2/apps/org-access-tokens)).</Note>
|
|
52
52
|
* @param {Object} opts Optional parameters
|
|
53
|
-
* @param {module:model/RequestApproval} [RequestApproval] The request body to
|
|
53
|
+
* @param {module:model/RequestApproval} [RequestApproval] The request body to request workflow approval.
|
|
54
54
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateApprovalRequest201Response} and HTTP response
|
|
55
55
|
*/
|
|
56
56
|
return _createClass(AppWorkflowsApi, [{
|
|
@@ -74,9 +74,9 @@ var AppWorkflowsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* Request workflow approval
|
|
77
|
-
* This operation
|
|
77
|
+
* This operation triggers a specified workflow and generates a new approval request. <Note>To use the approval workflow operations, you must use the Cobo OAuth authentication method ([Org Access Token](https://www.cobo.com/developers/v2/apps/org-access-tokens)).</Note>
|
|
78
78
|
* @param {Object} opts Optional parameters
|
|
79
|
-
* @param {module:model/RequestApproval} opts.RequestApproval The request body to
|
|
79
|
+
* @param {module:model/RequestApproval} opts.RequestApproval The request body to request workflow approval.
|
|
80
80
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateApprovalRequest201Response}
|
|
81
81
|
*/
|
|
82
82
|
}, {
|
|
@@ -89,8 +89,8 @@ var AppWorkflowsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* Get approval request details
|
|
92
|
-
* This operation
|
|
93
|
-
* @param {String} approval_id The
|
|
92
|
+
* This operation retrieves the details of a specific approval request. <Note>To use the approval workflow operations, you must use the Cobo OAuth authentication method ([Org Access Token](https://www.cobo.com/developers/v2/apps/org-access-tokens)).</Note>
|
|
93
|
+
* @param {String} approval_id The system-generated unique ID of the approval request.
|
|
94
94
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApprovalRequestDetail} and HTTP response
|
|
95
95
|
*/
|
|
96
96
|
}, {
|
|
@@ -119,8 +119,8 @@ var AppWorkflowsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
121
|
* Get approval request details
|
|
122
|
-
* This operation
|
|
123
|
-
* @param {String} approval_id The
|
|
122
|
+
* This operation retrieves the details of a specific approval request. <Note>To use the approval workflow operations, you must use the Cobo OAuth authentication method ([Org Access Token](https://www.cobo.com/developers/v2/apps/org-access-tokens)).</Note>
|
|
123
|
+
* @param {String} approval_id The system-generated unique ID of the approval request.
|
|
124
124
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApprovalRequestDetail}
|
|
125
125
|
*/
|
|
126
126
|
}, {
|
|
@@ -132,8 +132,8 @@ var AppWorkflowsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
|
-
*
|
|
136
|
-
* This operation
|
|
135
|
+
* List app workflows
|
|
136
|
+
* This operation retrieves all approval workflows of an Cobo Portal App. <Note>You need to [configure approval workflow](https://www.cobo.com/developers/v2/apps/configure-workflow) in the app Manifest file first.</Note> <Note>To use the approval workflow operations, you must use the Cobo OAuth authentication method ([Org Access Token](https://www.cobo.com/developers/v2/apps/org-access-tokens)).</Note>
|
|
137
137
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/AppWorkflow>} and HTTP response
|
|
138
138
|
*/
|
|
139
139
|
}, {
|
|
@@ -155,8 +155,8 @@ var AppWorkflowsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
|
-
*
|
|
159
|
-
* This operation
|
|
158
|
+
* List app workflows
|
|
159
|
+
* This operation retrieves all approval workflows of an Cobo Portal App. <Note>You need to [configure approval workflow](https://www.cobo.com/developers/v2/apps/configure-workflow) in the app Manifest file first.</Note> <Note>To use the approval workflow operations, you must use the Cobo OAuth authentication method ([Org Access Token](https://www.cobo.com/developers/v2/apps/org-access-tokens)).</Note>
|
|
160
160
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/AppWorkflow>}
|
|
161
161
|
*/
|
|
162
162
|
}, {
|
|
@@ -169,8 +169,8 @@ var AppWorkflowsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
169
169
|
|
|
170
170
|
/**
|
|
171
171
|
* List approval requests
|
|
172
|
-
* This operation
|
|
173
|
-
* @param {String} operation_id The
|
|
172
|
+
* This operation retrieves a list of approval requests. <Note>To use the approval workflow operations, you must use the Cobo OAuth authentication method ([Org Access Token](https://www.cobo.com/developers/v2/apps/org-access-tokens)).</Note>
|
|
173
|
+
* @param {String} operation_id The unique ID of the approval workflow.
|
|
174
174
|
* @param {Object} opts Optional parameters
|
|
175
175
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
176
176
|
* @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
@@ -207,8 +207,8 @@ var AppWorkflowsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
209
|
* List approval requests
|
|
210
|
-
* This operation
|
|
211
|
-
* @param {String} operation_id The
|
|
210
|
+
* This operation retrieves a list of approval requests. <Note>To use the approval workflow operations, you must use the Cobo OAuth authentication method ([Org Access Token](https://www.cobo.com/developers/v2/apps/org-access-tokens)).</Note>
|
|
211
|
+
* @param {String} operation_id The unique ID of the approval workflow.
|
|
212
212
|
* @param {Object} opts Optional parameters
|
|
213
213
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
214
214
|
* @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
@@ -225,10 +225,10 @@ var AppWorkflowsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
225
225
|
|
|
226
226
|
/**
|
|
227
227
|
* Revoke approval request
|
|
228
|
-
* This operation
|
|
229
|
-
* @param {String} approval_id The
|
|
228
|
+
* This operation revokes a pending approval request. <Note>To use the approval workflow operations, you must use the Cobo OAuth authentication method ([Org Access Token](https://www.cobo.com/developers/v2/apps/org-access-tokens)).</Note>
|
|
229
|
+
* @param {String} approval_id The system-generated unique ID of the approval request.
|
|
230
230
|
* @param {Object} opts Optional parameters
|
|
231
|
-
* @param {module:model/RevokeApprovalRequestRequest} [RevokeApprovalRequestRequest] The
|
|
231
|
+
* @param {module:model/RevokeApprovalRequestRequest} [RevokeApprovalRequestRequest] The request body to revoke an approval request.
|
|
232
232
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RevokeApprovalRequest201Response} and HTTP response
|
|
233
233
|
*/
|
|
234
234
|
}, {
|
|
@@ -258,10 +258,10 @@ var AppWorkflowsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
258
258
|
|
|
259
259
|
/**
|
|
260
260
|
* Revoke approval request
|
|
261
|
-
* This operation
|
|
262
|
-
* @param {String} approval_id The
|
|
261
|
+
* This operation revokes a pending approval request. <Note>To use the approval workflow operations, you must use the Cobo OAuth authentication method ([Org Access Token](https://www.cobo.com/developers/v2/apps/org-access-tokens)).</Note>
|
|
262
|
+
* @param {String} approval_id The system-generated unique ID of the approval request.
|
|
263
263
|
* @param {Object} opts Optional parameters
|
|
264
|
-
* @param {module:model/RevokeApprovalRequestRequest} opts.RevokeApprovalRequestRequest The
|
|
264
|
+
* @param {module:model/RevokeApprovalRequestRequest} opts.RevokeApprovalRequestRequest The request body to revoke an approval request.
|
|
265
265
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RevokeApprovalRequest201Response}
|
|
266
266
|
*/
|
|
267
267
|
}, {
|
package/dist/api/OAuthApi.js
CHANGED
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
9
|
+
var _ExchangePermissionToken201Response = _interopRequireDefault(require("../model/ExchangePermissionToken201Response"));
|
|
10
|
+
var _ExchangePermissionTokenRequest = _interopRequireDefault(require("../model/ExchangePermissionTokenRequest"));
|
|
9
11
|
var _GetToken2XXResponse = _interopRequireDefault(require("../model/GetToken2XXResponse"));
|
|
10
12
|
var _GetToken4XXResponse = _interopRequireDefault(require("../model/GetToken4XXResponse"));
|
|
13
|
+
var _RefreshPermissionTokenRequest = _interopRequireDefault(require("../model/RefreshPermissionTokenRequest"));
|
|
11
14
|
var _RefreshToken2XXResponse = _interopRequireDefault(require("../model/RefreshToken2XXResponse"));
|
|
12
15
|
var _RefreshTokenRequest = _interopRequireDefault(require("../model/RefreshTokenRequest"));
|
|
13
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
@@ -44,14 +47,56 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
/**
|
|
47
|
-
*
|
|
48
|
-
* <Note>This operation is only applicable to Cobo Portal
|
|
49
|
-
* @param {
|
|
50
|
-
* @
|
|
51
|
-
* @param {String} grant_type The OAuth grant type. Set the value as `org_implicit`.
|
|
52
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetToken2XXResponse} and HTTP response
|
|
50
|
+
* Exchange Permission Access Token by API Key
|
|
51
|
+
* <Note>This operation is only applicable to Cobo Portal Checkout SDK developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an api key.</Note> This operation allows Portal Checkout SDK to obtain a new Permission Access Token with a specified client ID, grant type and a Permission Refresh Token. For security purposes, Permission Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Permission Access Token and a new Permission Refresh Token.
|
|
52
|
+
* @param {module:model/ExchangePermissionTokenRequest} ExchangePermissionTokenRequest The request body for exchanging an Permission Access Token.
|
|
53
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ExchangePermissionToken201Response} and HTTP response
|
|
53
54
|
*/
|
|
54
55
|
return _createClass(OAuthApi, [{
|
|
56
|
+
key: "exchangePermissionTokenWithHttpInfo",
|
|
57
|
+
value: function exchangePermissionTokenWithHttpInfo(ExchangePermissionTokenRequest) {
|
|
58
|
+
var postBody = ExchangePermissionTokenRequest;
|
|
59
|
+
if (postBody && postBody.toJSON) {
|
|
60
|
+
postBody = postBody.toJSON();
|
|
61
|
+
}
|
|
62
|
+
// verify the required parameter 'ExchangePermissionTokenRequest' is set
|
|
63
|
+
if (ExchangePermissionTokenRequest === undefined || ExchangePermissionTokenRequest === null) {
|
|
64
|
+
throw new Error("Missing the required parameter 'ExchangePermissionTokenRequest' when calling exchangePermissionToken");
|
|
65
|
+
}
|
|
66
|
+
var pathParams = {};
|
|
67
|
+
var queryParams = {};
|
|
68
|
+
var headerParams = {};
|
|
69
|
+
var formParams = {};
|
|
70
|
+
var authNames = ['CoboAuth'];
|
|
71
|
+
var contentTypes = ['application/json'];
|
|
72
|
+
var accepts = ['application/json'];
|
|
73
|
+
var returnType = _ExchangePermissionToken201Response["default"];
|
|
74
|
+
return this.apiClient.callApi('/oauth/permission_token/exchange', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Exchange Permission Access Token by API Key
|
|
79
|
+
* <Note>This operation is only applicable to Cobo Portal Checkout SDK developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an api key.</Note> This operation allows Portal Checkout SDK to obtain a new Permission Access Token with a specified client ID, grant type and a Permission Refresh Token. For security purposes, Permission Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Permission Access Token and a new Permission Refresh Token.
|
|
80
|
+
* @param {module:model/ExchangePermissionTokenRequest} ExchangePermissionTokenRequest The request body for exchanging an Permission Access Token.
|
|
81
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ExchangePermissionToken201Response}
|
|
82
|
+
*/
|
|
83
|
+
}, {
|
|
84
|
+
key: "exchangePermissionToken",
|
|
85
|
+
value: function exchangePermissionToken(ExchangePermissionTokenRequest) {
|
|
86
|
+
return this.exchangePermissionTokenWithHttpInfo(ExchangePermissionTokenRequest).then(function (response_and_data) {
|
|
87
|
+
return response_and_data.data;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Get Org Access Token
|
|
93
|
+
* <Note>This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to get an Org Access Token and a Refresh Token with a specified client ID, organization ID, and grant type. Access tokens allow the app to signal to the WaaS service that it has received permission to access specific resources of the app user's [organization](https://manuals.cobo.com/en/portal/organization/introduction). Once the app has been granted permission by the organization's admin, it can use this operation to obtain both an Org Access Token and a Refresh Token. For security purposes, Org Access Tokens expire after a certain period. Once they expire, the app needs to call [Refresh token](https://www.cobo.com/developers/v2/api-references/oauth/refresh-org-access-token) to get a new Org Access Token and a new Refresh Token.
|
|
94
|
+
* @param {String} client_id The client ID, a unique identifier to distinguish Cobo Portal Apps. You can get the client ID by retrieving the manifest file after publishing the app.
|
|
95
|
+
* @param {String} org_id Organization ID, a unique identifier to distinguish different organizations. You can get the organization ID from the callback message sent to the URL that was configured in the manifest file.
|
|
96
|
+
* @param {String} grant_type The OAuth grant type. Set the value as `org_implicit`.
|
|
97
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetToken2XXResponse} and HTTP response
|
|
98
|
+
*/
|
|
99
|
+
}, {
|
|
55
100
|
key: "getTokenWithHttpInfo",
|
|
56
101
|
value: function getTokenWithHttpInfo(client_id, org_id, grant_type) {
|
|
57
102
|
var postBody = null;
|
|
@@ -101,6 +146,48 @@ var OAuthApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
101
146
|
});
|
|
102
147
|
}
|
|
103
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Refresh Permission Access Token by Permission Refresh Token
|
|
151
|
+
* <Note>This operation is only applicable to Cobo Portal Checkout SDK developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an api key.</Note> This operation allows Portal Checkout SDK to refresh a new Permission Access Token with a specified client ID, grant type and a Permission Refresh Token. For security purposes, Permission Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Permission Access Token and a new Permission Refresh Token.
|
|
152
|
+
* @param {module:model/RefreshPermissionTokenRequest} RefreshPermissionTokenRequest The request body for refreshing an Permission Access Token.
|
|
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
|
+
*/
|
|
155
|
+
}, {
|
|
156
|
+
key: "refreshPermissionTokenWithHttpInfo",
|
|
157
|
+
value: function refreshPermissionTokenWithHttpInfo(RefreshPermissionTokenRequest) {
|
|
158
|
+
var postBody = RefreshPermissionTokenRequest;
|
|
159
|
+
if (postBody && postBody.toJSON) {
|
|
160
|
+
postBody = postBody.toJSON();
|
|
161
|
+
}
|
|
162
|
+
// verify the required parameter 'RefreshPermissionTokenRequest' is set
|
|
163
|
+
if (RefreshPermissionTokenRequest === undefined || RefreshPermissionTokenRequest === null) {
|
|
164
|
+
throw new Error("Missing the required parameter 'RefreshPermissionTokenRequest' when calling refreshPermissionToken");
|
|
165
|
+
}
|
|
166
|
+
var pathParams = {};
|
|
167
|
+
var queryParams = {};
|
|
168
|
+
var headerParams = {};
|
|
169
|
+
var formParams = {};
|
|
170
|
+
var authNames = ['CoboAuth'];
|
|
171
|
+
var contentTypes = ['application/json'];
|
|
172
|
+
var accepts = ['application/json'];
|
|
173
|
+
var returnType = _ExchangePermissionToken201Response["default"];
|
|
174
|
+
return this.apiClient.callApi('/oauth/permission_token/refresh', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Refresh Permission Access Token by Permission Refresh Token
|
|
179
|
+
* <Note>This operation is only applicable to Cobo Portal Checkout SDK developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an api key.</Note> This operation allows Portal Checkout SDK to refresh a new Permission Access Token with a specified client ID, grant type and a Permission Refresh Token. For security purposes, Permission Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Permission Access Token and a new Permission Refresh Token.
|
|
180
|
+
* @param {module:model/RefreshPermissionTokenRequest} RefreshPermissionTokenRequest The request body for refreshing an Permission Access Token.
|
|
181
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ExchangePermissionToken201Response}
|
|
182
|
+
*/
|
|
183
|
+
}, {
|
|
184
|
+
key: "refreshPermissionToken",
|
|
185
|
+
value: function refreshPermissionToken(RefreshPermissionTokenRequest) {
|
|
186
|
+
return this.refreshPermissionTokenWithHttpInfo(RefreshPermissionTokenRequest).then(function (response_and_data) {
|
|
187
|
+
return response_and_data.data;
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
|
|
104
191
|
/**
|
|
105
192
|
* Refresh Org Access Token
|
|
106
193
|
* <Note>This operation is only applicable to Cobo Portal Apps developers. To call this operation, you need to use the Cobo OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to obtain a new Org Access Token with a specified client ID, grant type and a Refresh Token. For security purposes, Org Access Tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new Org Access Token and a new Refresh Token.
|