@cobo/cobo-waas2 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/README.md +31 -3
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/PreRequestScript.js +1 -1
  4. package/dist/api/AddressBooksApi.js +4 -4
  5. package/dist/api/AppWorkflowsApi.js +275 -0
  6. package/dist/api/DevelopersApi.js +4 -4
  7. package/dist/api/DevelopersWebhooksApi.js +12 -12
  8. package/dist/api/FeeStationApi.js +12 -12
  9. package/dist/api/PaymentApi.js +16 -63
  10. package/dist/api/StakingsApi.js +28 -28
  11. package/dist/api/TransactionsApi.js +4 -4
  12. package/dist/api/WalletsApi.js +102 -51
  13. package/dist/api/WalletsExchangeWalletApi.js +8 -8
  14. package/dist/api/WalletsMPCWalletsApi.js +20 -20
  15. package/dist/index.js +175 -7
  16. package/dist/model/AppWorkflow.js +173 -0
  17. package/dist/model/AppWorkflowField.js +137 -0
  18. package/dist/model/AppWorkflowPolicy.js +144 -0
  19. package/dist/model/ApprovalEntry.js +148 -0
  20. package/dist/model/ApprovalRequest.js +178 -0
  21. package/dist/model/ApprovalRequestDetail.js +176 -0
  22. package/dist/model/ApprovalStatus.js +71 -0
  23. package/dist/model/{OrderAddressInfo.js → ApprovalUser.js} +48 -49
  24. package/dist/model/BabylonStakeExtra.js +16 -0
  25. package/dist/model/BatchCheckUtxo201Response.js +107 -0
  26. package/dist/model/BatchCheckUtxoRequest.js +142 -0
  27. package/dist/model/BatchUTXOParam.js +123 -0
  28. package/dist/model/ChainInfo.js +9 -0
  29. package/dist/model/CreateApprovalRequest201Response.js +109 -0
  30. package/dist/model/CreateSettlement.js +4 -29
  31. package/dist/model/CreateStakeActivityExtra.js +6 -0
  32. package/dist/model/CustodialWeb3TransferSource.js +1 -1
  33. package/dist/model/EstimateContractCallFeeParams.js +13 -0
  34. package/dist/model/EstimateFeeParams.js +6 -0
  35. package/dist/model/EstimateTransferFeeParams.js +13 -0
  36. package/dist/model/ListApprovalRequests200Response.js +123 -0
  37. package/dist/model/MpcTransferSource.js +1 -1
  38. package/dist/model/PolicyAction.js +123 -0
  39. package/dist/model/PolicyActionContent.js +167 -0
  40. package/dist/model/PolicyActionType.js +66 -0
  41. package/dist/model/PolicyCondition.js +148 -0
  42. package/dist/model/PolicyFieldOperator.js +76 -0
  43. package/dist/model/PolicyFieldValueType.js +61 -0
  44. package/dist/model/RequestApproval.js +188 -0
  45. package/dist/model/RevokeApprovalRequest201Response.js +118 -0
  46. package/dist/model/RevokeApprovalRequestRequest.js +110 -0
  47. package/dist/model/SettlementDetail.js +13 -0
  48. package/dist/model/SwapActivityApprovers.js +122 -0
  49. package/dist/model/SwapActivityDetail.js +30 -0
  50. package/dist/model/SwapApproversStatus.js +66 -0
  51. package/dist/model/TransactionCoboCategory.js +102 -7
  52. package/dist/model/TransactionRbfSource.js +1 -1
  53. package/dist/model/TransactionSubStatus.js +10 -0
  54. package/dist/model/UTXO.js +9 -0
  55. package/docs/AddressBooksApi.md +2 -2
  56. package/docs/AppWorkflow.md +12 -0
  57. package/docs/AppWorkflowField.md +11 -0
  58. package/docs/AppWorkflowPolicy.md +10 -0
  59. package/docs/AppWorkflowsApi.md +273 -0
  60. package/docs/ApprovalEntry.md +11 -0
  61. package/docs/ApprovalRequest.md +13 -0
  62. package/docs/ApprovalRequestDetail.md +13 -0
  63. package/docs/ApprovalStatus.md +16 -0
  64. package/docs/ApprovalUser.md +12 -0
  65. package/docs/BabylonStakeExtra.md +1 -0
  66. package/docs/BatchCheckUtxo201Response.md +9 -0
  67. package/docs/BatchCheckUtxoRequest.md +10 -0
  68. package/docs/BatchUTXOParam.md +10 -0
  69. package/docs/ChainInfo.md +1 -0
  70. package/docs/CreateApprovalRequest201Response.md +9 -0
  71. package/docs/CreateSettlement.md +2 -2
  72. package/docs/CreateStakeActivityExtra.md +1 -0
  73. package/docs/CustodialWeb3TransferSource.md +1 -1
  74. package/docs/DevelopersApi.md +2 -2
  75. package/docs/DevelopersWebhooksApi.md +6 -6
  76. package/docs/EstimateContractCallFeeParams.md +1 -0
  77. package/docs/EstimateFeeParams.md +1 -0
  78. package/docs/EstimateTransferFeeParams.md +1 -0
  79. package/docs/FeeStationApi.md +6 -6
  80. package/docs/ListApprovalRequests200Response.md +10 -0
  81. package/docs/MpcTransferSource.md +1 -1
  82. package/docs/PaymentApi.md +8 -63
  83. package/docs/PolicyAction.md +10 -0
  84. package/docs/PolicyActionContent.md +25 -0
  85. package/docs/PolicyActionType.md +14 -0
  86. package/docs/PolicyCondition.md +12 -0
  87. package/docs/PolicyFieldOperator.md +18 -0
  88. package/docs/PolicyFieldValueType.md +12 -0
  89. package/docs/RequestApproval.md +13 -0
  90. package/docs/RevokeApprovalRequest201Response.md +10 -0
  91. package/docs/RevokeApprovalRequestRequest.md +9 -0
  92. package/docs/SettlementDetail.md +1 -0
  93. package/docs/StakingsApi.md +14 -14
  94. package/docs/SwapActivityApprovers.md +10 -0
  95. package/docs/SwapActivityDetail.md +1 -0
  96. package/docs/SwapApproversStatus.md +14 -0
  97. package/docs/TransactionCoboCategory.md +41 -3
  98. package/docs/TransactionRbfSource.md +1 -1
  99. package/docs/TransactionSubStatus.md +4 -0
  100. package/docs/TransactionsApi.md +2 -2
  101. package/docs/UTXO.md +1 -0
  102. package/docs/WalletsApi.md +78 -23
  103. package/docs/WalletsExchangeWalletApi.md +4 -4
  104. package/docs/WalletsMPCWalletsApi.md +10 -10
  105. package/package.json +1 -1
  106. package/docs/OrderAddressInfo.md +0 -12
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.15.0
18
+ - Package version: 1.16.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)
@@ -68,6 +68,11 @@ All URIs are relative to *https://api.dev.cobo.com/v2*
68
68
  Class | Method | HTTP request | Description
69
69
  ------------ | ------------- | ------------- | -------------
70
70
  *CoboWaas2.AddressBooksApi* | [**listAddressBooks**](docs/AddressBooksApi.md#listAddressBooks) | **GET** /address_books | List address book entries
71
+ *CoboWaas2.AppWorkflowsApi* | [**createApprovalRequest**](docs/AppWorkflowsApi.md#createApprovalRequest) | **POST** /app/workflows/approval_requests | Request workflow approval
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 | list app workflows
74
+ *CoboWaas2.AppWorkflowsApi* | [**listApprovalRequests**](docs/AppWorkflowsApi.md#listApprovalRequests) | **GET** /app/workflows/approval_requests | List approval requests
75
+ *CoboWaas2.AppWorkflowsApi* | [**revokeApprovalRequest**](docs/AppWorkflowsApi.md#revokeApprovalRequest) | **POST** /app/workflows/approval_requests/{approval_id}/revoke | Revoke approval request
71
76
  *CoboWaas2.DevelopersApi* | [**getApiKeyInfo**](docs/DevelopersApi.md#getApiKeyInfo) | **GET** /developers/api_key_info | Get API key information
72
77
  *CoboWaas2.DevelopersApi* | [**listCallbackMessages**](docs/DevelopersApi.md#listCallbackMessages) | **GET** /developers/callback_messages | List all callback messages
73
78
  *CoboWaas2.DevelopersApi* | [**retryCallbackMessage**](docs/DevelopersApi.md#retryCallbackMessage) | **POST** /developers/callback_messages/{message_id}/retry | Retry callback message
@@ -94,7 +99,6 @@ Class | Method | HTTP request | Description
94
99
  *CoboWaas2.PaymentApi* | [**createRefund**](docs/PaymentApi.md#createRefund) | **POST** /payments/refunds | Create refund order
95
100
  *CoboWaas2.PaymentApi* | [**createSettlementRequest**](docs/PaymentApi.md#createSettlementRequest) | **POST** /payments/settlement_requests | Create settlement request
96
101
  *CoboWaas2.PaymentApi* | [**getExchangeRate**](docs/PaymentApi.md#getExchangeRate) | **GET** /payments/exchange_rates/{token_id}/{currency} | Get exchange rate
97
- *CoboWaas2.PaymentApi* | [**getPaymentOrderAddressInfo**](docs/PaymentApi.md#getPaymentOrderAddressInfo) | **GET** /payments/orders/address_info | Get pay-in order's receiving address info
98
102
  *CoboWaas2.PaymentApi* | [**getPaymentOrderDetailById**](docs/PaymentApi.md#getPaymentOrderDetailById) | **GET** /payments/orders/{order_id} | Get pay-in order information
99
103
  *CoboWaas2.PaymentApi* | [**getRefundDetailById**](docs/PaymentApi.md#getRefundDetailById) | **GET** /payments/refunds/{refund_id} | Get refund order information
100
104
  *CoboWaas2.PaymentApi* | [**getRefunds**](docs/PaymentApi.md#getRefunds) | **GET** /payments/refunds | List all refund orders
@@ -152,6 +156,7 @@ Class | Method | HTTP request | Description
152
156
  *CoboWaas2.TravelRuleApi* | [**listSupportedCountries**](docs/TravelRuleApi.md#listSupportedCountries) | **GET** /travel_rule/transaction/countries | List supported countries
153
157
  *CoboWaas2.TravelRuleApi* | [**submitDepositTravelRuleInfo**](docs/TravelRuleApi.md#submitDepositTravelRuleInfo) | **POST** /travel_rule/transaction/deposit/travel_rule_info | Submit Travel Rule information for deposits
154
158
  *CoboWaas2.TravelRuleApi* | [**submitWithdrawTravelRuleInfo**](docs/TravelRuleApi.md#submitWithdrawTravelRuleInfo) | **POST** /travel_rule/transaction/withdraw/travel_rule_info | Submit Travel Rule information for withdrawals
159
+ *CoboWaas2.WalletsApi* | [**batchCheckUtxo**](docs/WalletsApi.md#batchCheckUtxo) | **POST** /wallets/{wallet_id}/utxos/batch_check | Batch check UTXOs
155
160
  *CoboWaas2.WalletsApi* | [**checkAddressChainsValidity**](docs/WalletsApi.md#checkAddressChainsValidity) | **GET** /wallets/check_address_chains_validity | Check address validity across chains
156
161
  *CoboWaas2.WalletsApi* | [**checkAddressValidity**](docs/WalletsApi.md#checkAddressValidity) | **GET** /wallets/check_address_validity | Check address validity
157
162
  *CoboWaas2.WalletsApi* | [**checkAddressesValidity**](docs/WalletsApi.md#checkAddressesValidity) | **GET** /wallets/check_addresses_validity | Check addresses validity
@@ -228,7 +233,15 @@ Class | Method | HTTP request | Description
228
233
  - [CoboWaas2.AmountStatus](docs/AmountStatus.md)
229
234
  - [CoboWaas2.ApiLogDetails](docs/ApiLogDetails.md)
230
235
  - [CoboWaas2.ApiLogSummary](docs/ApiLogSummary.md)
236
+ - [CoboWaas2.AppWorkflow](docs/AppWorkflow.md)
237
+ - [CoboWaas2.AppWorkflowField](docs/AppWorkflowField.md)
238
+ - [CoboWaas2.AppWorkflowPolicy](docs/AppWorkflowPolicy.md)
239
+ - [CoboWaas2.ApprovalEntry](docs/ApprovalEntry.md)
240
+ - [CoboWaas2.ApprovalRequest](docs/ApprovalRequest.md)
241
+ - [CoboWaas2.ApprovalRequestDetail](docs/ApprovalRequestDetail.md)
231
242
  - [CoboWaas2.ApprovalStatementStatus](docs/ApprovalStatementStatus.md)
243
+ - [CoboWaas2.ApprovalStatus](docs/ApprovalStatus.md)
244
+ - [CoboWaas2.ApprovalUser](docs/ApprovalUser.md)
232
245
  - [CoboWaas2.AssetBalance](docs/AssetBalance.md)
233
246
  - [CoboWaas2.AssetInfo](docs/AssetInfo.md)
234
247
  - [CoboWaas2.AutoFuelType](docs/AutoFuelType.md)
@@ -252,6 +265,9 @@ Class | Method | HTTP request | Description
252
265
  - [CoboWaas2.BaseEstimateStakingFee](docs/BaseEstimateStakingFee.md)
253
266
  - [CoboWaas2.BaseStakeExtra](docs/BaseStakeExtra.md)
254
267
  - [CoboWaas2.BaseStakeSource](docs/BaseStakeSource.md)
268
+ - [CoboWaas2.BatchCheckUtxo201Response](docs/BatchCheckUtxo201Response.md)
269
+ - [CoboWaas2.BatchCheckUtxoRequest](docs/BatchCheckUtxoRequest.md)
270
+ - [CoboWaas2.BatchUTXOParam](docs/BatchUTXOParam.md)
255
271
  - [CoboWaas2.BroadcastSignedTransactions201ResponseInner](docs/BroadcastSignedTransactions201ResponseInner.md)
256
272
  - [CoboWaas2.BroadcastSignedTransactionsRequest](docs/BroadcastSignedTransactionsRequest.md)
257
273
  - [CoboWaas2.CallbackMessage](docs/CallbackMessage.md)
@@ -276,6 +292,7 @@ Class | Method | HTTP request | Description
276
292
  - [CoboWaas2.CosmosContractCallDestination](docs/CosmosContractCallDestination.md)
277
293
  - [CoboWaas2.CosmosContractCallMessage](docs/CosmosContractCallMessage.md)
278
294
  - [CoboWaas2.CreateAddressRequest](docs/CreateAddressRequest.md)
295
+ - [CoboWaas2.CreateApprovalRequest201Response](docs/CreateApprovalRequest201Response.md)
279
296
  - [CoboWaas2.CreateBabylonAirdropRegistration201Response](docs/CreateBabylonAirdropRegistration201Response.md)
280
297
  - [CoboWaas2.CreateBabylonAirdropRegistrationRequest](docs/CreateBabylonAirdropRegistrationRequest.md)
281
298
  - [CoboWaas2.CreateBabylonStakingRegistration201Response](docs/CreateBabylonStakingRegistration201Response.md)
@@ -391,6 +408,7 @@ Class | Method | HTTP request | Description
391
408
  - [CoboWaas2.ListAddressBalancesByToken200Response](docs/ListAddressBalancesByToken200Response.md)
392
409
  - [CoboWaas2.ListAddressBooks200Response](docs/ListAddressBooks200Response.md)
393
410
  - [CoboWaas2.ListAddresses200Response](docs/ListAddresses200Response.md)
411
+ - [CoboWaas2.ListApprovalRequests200Response](docs/ListApprovalRequests200Response.md)
394
412
  - [CoboWaas2.ListAssetBalancesForExchangeWallet200Response](docs/ListAssetBalancesForExchangeWallet200Response.md)
395
413
  - [CoboWaas2.ListBabylonAirdropRegistrations200Response](docs/ListBabylonAirdropRegistrations200Response.md)
396
414
  - [CoboWaas2.ListBabylonEligibleAirdrops200Response](docs/ListBabylonEligibleAirdrops200Response.md)
@@ -449,7 +467,6 @@ Class | Method | HTTP request | Description
449
467
  - [CoboWaas2.MpcStakeSource](docs/MpcStakeSource.md)
450
468
  - [CoboWaas2.MpcTransferSource](docs/MpcTransferSource.md)
451
469
  - [CoboWaas2.Order](docs/Order.md)
452
- - [CoboWaas2.OrderAddressInfo](docs/OrderAddressInfo.md)
453
470
  - [CoboWaas2.OrderStatus](docs/OrderStatus.md)
454
471
  - [CoboWaas2.OrgInfo](docs/OrgInfo.md)
455
472
  - [CoboWaas2.Pagination](docs/Pagination.md)
@@ -457,6 +474,12 @@ Class | Method | HTTP request | Description
457
474
  - [CoboWaas2.PaymentRefundEventData](docs/PaymentRefundEventData.md)
458
475
  - [CoboWaas2.PaymentSettlementEvent](docs/PaymentSettlementEvent.md)
459
476
  - [CoboWaas2.PaymentTransaction](docs/PaymentTransaction.md)
477
+ - [CoboWaas2.PolicyAction](docs/PolicyAction.md)
478
+ - [CoboWaas2.PolicyActionContent](docs/PolicyActionContent.md)
479
+ - [CoboWaas2.PolicyActionType](docs/PolicyActionType.md)
480
+ - [CoboWaas2.PolicyCondition](docs/PolicyCondition.md)
481
+ - [CoboWaas2.PolicyFieldOperator](docs/PolicyFieldOperator.md)
482
+ - [CoboWaas2.PolicyFieldValueType](docs/PolicyFieldValueType.md)
460
483
  - [CoboWaas2.PoolDetails](docs/PoolDetails.md)
461
484
  - [CoboWaas2.PoolDetailsAllOfValidatorsInfo](docs/PoolDetailsAllOfValidatorsInfo.md)
462
485
  - [CoboWaas2.PoolSummary](docs/PoolSummary.md)
@@ -472,8 +495,11 @@ Class | Method | HTTP request | Description
472
495
  - [CoboWaas2.RefundStatus](docs/RefundStatus.md)
473
496
  - [CoboWaas2.RefundType](docs/RefundType.md)
474
497
  - [CoboWaas2.ReplaceType](docs/ReplaceType.md)
498
+ - [CoboWaas2.RequestApproval](docs/RequestApproval.md)
475
499
  - [CoboWaas2.RetryCallbackMessage201Response](docs/RetryCallbackMessage201Response.md)
476
500
  - [CoboWaas2.RetryWebhookEventById201Response](docs/RetryWebhookEventById201Response.md)
501
+ - [CoboWaas2.RevokeApprovalRequest201Response](docs/RevokeApprovalRequest201Response.md)
502
+ - [CoboWaas2.RevokeApprovalRequestRequest](docs/RevokeApprovalRequestRequest.md)
477
503
  - [CoboWaas2.RoleScopes](docs/RoleScopes.md)
478
504
  - [CoboWaas2.RootPubkey](docs/RootPubkey.md)
479
505
  - [CoboWaas2.SafeContractCallSource](docs/SafeContractCallSource.md)
@@ -512,9 +538,11 @@ Class | Method | HTTP request | Description
512
538
  - [CoboWaas2.SubWalletAssetBalance](docs/SubWalletAssetBalance.md)
513
539
  - [CoboWaas2.SubmitDepositTravelRuleInfo201Response](docs/SubmitDepositTravelRuleInfo201Response.md)
514
540
  - [CoboWaas2.SwapActivity](docs/SwapActivity.md)
541
+ - [CoboWaas2.SwapActivityApprovers](docs/SwapActivityApprovers.md)
515
542
  - [CoboWaas2.SwapActivityDetail](docs/SwapActivityDetail.md)
516
543
  - [CoboWaas2.SwapActivityStatus](docs/SwapActivityStatus.md)
517
544
  - [CoboWaas2.SwapActivityTimeline](docs/SwapActivityTimeline.md)
545
+ - [CoboWaas2.SwapApproversStatus](docs/SwapApproversStatus.md)
518
546
  - [CoboWaas2.SwapQuote](docs/SwapQuote.md)
519
547
  - [CoboWaas2.SwapToken](docs/SwapToken.md)
520
548
  - [CoboWaas2.SwapType](docs/SwapType.md)
package/dist/ApiClient.js CHANGED
@@ -101,7 +101,7 @@ var ApiClient = /*#__PURE__*/function () {
101
101
  * @default {}
102
102
  */
103
103
  this.defaultHeaders = {
104
- 'User-Agent': 'cobo-waas2-js-sdk/1.15.0'
104
+ 'User-Agent': 'cobo-waas2-js-sdk/1.16.0'
105
105
  };
106
106
 
107
107
  /**
@@ -6,7 +6,7 @@ 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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return r; }; var t, r = {}, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof Symbol ? Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag"; function c(t, r, e, n) { return Object.defineProperty(t, r, { value: e, enumerable: !n, configurable: !n, writable: !n }); } try { c({}, ""); } catch (t) { c = function c(t, r, e) { return t[r] = e; }; } function h(r, e, n, o) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype); return c(a, "_invoke", function (r, e, n) { var o = 1; return function (i, a) { if (3 === o) throw Error("Generator is already running"); if (4 === o) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var u = n.delegate; if (u) { var c = d(u, n); if (c) { if (c === f) continue; return c; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (1 === o) throw o = 4, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = 3; var h = s(r, e, n); if ("normal" === h.type) { if (o = n.done ? 4 : 2, h.arg === f) continue; return { value: h.arg, done: n.done }; } "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg); } }; }(r, n, new Context(o || [])), !0), a; } function s(t, r, e) { try { return { type: "normal", arg: t.call(r, e) }; } catch (t) { return { type: "throw", arg: t }; } } r.wrap = h; var f = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var l = {}; c(l, i, function () { return this; }); var p = Object.getPrototypeOf, y = p && p(p(x([]))); y && y !== e && n.call(y, i) && (l = y); var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l); function g(t) { ["next", "throw", "return"].forEach(function (r) { c(t, r, function (t) { return this._invoke(r, t); }); }); } function AsyncIterator(t, r) { function e(o, i, a, u) { var c = s(t[o], t, i); if ("throw" !== c.type) { var h = c.arg, f = h.value; return f && "object" == _typeof(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) { e("next", t, a, u); }, function (t) { e("throw", t, a, u); }) : r.resolve(f).then(function (t) { h.value = t, a(h); }, function (t) { return e("throw", t, a, u); }); } u(c.arg); } var o; c(this, "_invoke", function (t, n) { function i() { return new r(function (r, o) { e(t, n, r, o); }); } return o = o ? o.then(i, i) : i(); }, !0); } function d(r, e) { var n = e.method, o = r.i[n]; if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f; var i = s(o, r.i, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f; var a = i.arg; return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f); } function w(t) { this.tryEntries.push(t); } function m(r) { var e = r[4] || {}; e.type = "normal", e.arg = t, r[4] = e; } function Context(t) { this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0); } function x(r) { if (null != r) { var e = r[i]; if (e) return e.call(r); if ("function" == typeof r.next) return r; if (!isNaN(r.length)) { var o = -1, a = function e() { for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e; return e.value = t, e.done = !0, e; }; return a.next = a; } } throw new TypeError(_typeof(r) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) { var r = "function" == typeof t && t.constructor; return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name)); }, r.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t; }, r.awrap = function (t) { return { __await: t }; }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () { return this; }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(h(t, e, n, o), i); return r.isGeneratorFunction(e) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, g(v), c(v, u, "Generator"), c(v, i, function () { return this; }), c(v, "toString", function () { return "[object Generator]"; }), r.keys = function (t) { var r = Object(t), e = []; for (var n in r) e.unshift(n); return function t() { for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t; return t.done = !0, t; }; }, r.values = x, Context.prototype = { constructor: Context, reset: function reset(r) { if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0][4]; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(r) { if (this.done) throw r; var e = this; function n(t) { a.type = "throw", a.arg = r, e.next = t; } for (var o = e.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i[4], u = this.prev, c = i[1], h = i[2]; if (-1 === i[0]) return n("end"), !1; if (!c && !h) throw Error("try statement without catch or finally"); if (null != i[0] && i[0] <= u) { if (u < c) return this.method = "next", this.arg = t, n(c), !0; if (u < h) return n(h), !1; } } }, abrupt: function abrupt(t, r) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) { var o = n; break; } } o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null); var i = o ? o[4] : {}; return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i); }, complete: function complete(t, r) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f; }, finish: function finish(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[2] === t) return this.complete(e[4], e[3]), m(e), f; } }, "catch": function _catch(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[0] === t) { var n = e[4]; if ("throw" === n.type) { var o = n.arg; m(e); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(r, e, n) { return this.delegate = { i: x(r), r: e, n: n }, "next" === this.method && (this.arg = t), f; } }, r; }
9
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return r; }; var t, r = {}, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof Symbol ? Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag"; function c(t, r, e, n) { Object.defineProperty(t, r, { value: e, enumerable: !n, configurable: !n, writable: !n }); } try { c({}, ""); } catch (t) { c = function c(t, r, e) { return t[r] = e; }; } function h(r, e, n, o) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype); return c(a, "_invoke", function (r, e, n) { var o = 1; return function (i, a) { if (3 === o) throw Error("Generator is already running"); if (4 === o) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var u = n.delegate; if (u) { var c = d(u, n); if (c) { if (c === f) continue; return c; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (1 === o) throw o = 4, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = 3; var h = s(r, e, n); if ("normal" === h.type) { if (o = n.done ? 4 : 2, h.arg === f) continue; return { value: h.arg, done: n.done }; } "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg); } }; }(r, n, new Context(o || [])), !0), a; } function s(t, r, e) { try { return { type: "normal", arg: t.call(r, e) }; } catch (t) { return { type: "throw", arg: t }; } } r.wrap = h; var f = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var l = {}; c(l, i, function () { return this; }); var p = Object.getPrototypeOf, y = p && p(p(x([]))); y && y !== e && n.call(y, i) && (l = y); var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l); function g(t) { ["next", "throw", "return"].forEach(function (r) { c(t, r, function (t) { return this._invoke(r, t); }); }); } function AsyncIterator(t, r) { function e(o, i, a, u) { var c = s(t[o], t, i); if ("throw" !== c.type) { var h = c.arg, f = h.value; return f && "object" == _typeof(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) { e("next", t, a, u); }, function (t) { e("throw", t, a, u); }) : r.resolve(f).then(function (t) { h.value = t, a(h); }, function (t) { return e("throw", t, a, u); }); } u(c.arg); } var o; c(this, "_invoke", function (t, n) { function i() { return new r(function (r, o) { e(t, n, r, o); }); } return o = o ? o.then(i, i) : i(); }, !0); } function d(r, e) { var n = e.method, o = r.i[n]; if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f; var i = s(o, r.i, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f; var a = i.arg; return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f); } function w(t) { this.tryEntries.push(t); } function m(r) { var e = r[4] || {}; e.type = "normal", e.arg = t, r[4] = e; } function Context(t) { this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0); } function x(r) { if (null != r) { var e = r[i]; if (e) return e.call(r); if ("function" == typeof r.next) return r; if (!isNaN(r.length)) { var o = -1, a = function e() { for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e; return e.value = t, e.done = !0, e; }; return a.next = a; } } throw new TypeError(_typeof(r) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), c(GeneratorFunctionPrototype, u, GeneratorFunction.displayName = "GeneratorFunction"), r.isGeneratorFunction = function (t) { var r = "function" == typeof t && t.constructor; return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name)); }, r.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t; }, r.awrap = function (t) { return { __await: t }; }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () { return this; }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(h(t, e, n, o), i); return r.isGeneratorFunction(e) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, g(v), c(v, u, "Generator"), c(v, i, function () { return this; }), c(v, "toString", function () { return "[object Generator]"; }), r.keys = function (t) { var r = Object(t), e = []; for (var n in r) e.unshift(n); return function t() { for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t; return t.done = !0, t; }; }, r.values = x, Context.prototype = { constructor: Context, reset: function reset(r) { if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0][4]; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(r) { if (this.done) throw r; var e = this; function n(t) { a.type = "throw", a.arg = r, e.next = t; } for (var o = e.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i[4], u = this.prev, c = i[1], h = i[2]; if (-1 === i[0]) return n("end"), !1; if (!c && !h) throw Error("try statement without catch or finally"); if (null != i[0] && i[0] <= u) { if (u < c) return this.method = "next", this.arg = t, n(c), !0; if (u < h) return n(h), !1; } } }, abrupt: function abrupt(t, r) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) { var o = n; break; } } o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null); var i = o ? o[4] : {}; return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i); }, complete: function complete(t, r) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f; }, finish: function finish(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[2] === t) return this.complete(e[4], e[3]), m(e), f; } }, "catch": function _catch(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[0] === t) { var n = e[4]; if ("throw" === n.type) { var o = n.arg; m(e); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(r, e, n) { return this.delegate = { i: x(r), r: e, n: n }, "next" === this.method && (this.arg = t), f; } }, r; }
10
10
  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
11
  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
12
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -48,8 +48,8 @@ var AddressBooksApi = exports["default"] = /*#__PURE__*/function () {
48
48
  * @param {String} [address] The wallet address.
49
49
  * @param {String} [label] The address label.
50
50
  * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
51
- * @param {String} [before] This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
52
- * @param {String} [after] This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
51
+ * @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.
52
+ * @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
53
53
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListAddressBooks200Response} and HTTP response
54
54
  */
55
55
  return _createClass(AddressBooksApi, [{
@@ -90,8 +90,8 @@ var AddressBooksApi = exports["default"] = /*#__PURE__*/function () {
90
90
  * @param {String} opts.address The wallet address.
91
91
  * @param {String} opts.label The address label.
92
92
  * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
93
- * @param {String} opts.before This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
94
- * @param {String} opts.after This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
93
+ * @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.
94
+ * @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
95
95
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListAddressBooks200Response}
96
96
  */
97
97
  }, {
@@ -0,0 +1,275 @@
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 _AppWorkflow = _interopRequireDefault(require("../model/AppWorkflow"));
9
+ var _ApprovalRequestDetail = _interopRequireDefault(require("../model/ApprovalRequestDetail"));
10
+ var _CreateApprovalRequest201Response = _interopRequireDefault(require("../model/CreateApprovalRequest201Response"));
11
+ var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
12
+ var _ListApprovalRequests200Response = _interopRequireDefault(require("../model/ListApprovalRequests200Response"));
13
+ var _RequestApproval = _interopRequireDefault(require("../model/RequestApproval"));
14
+ var _RevokeApprovalRequest201Response = _interopRequireDefault(require("../model/RevokeApprovalRequest201Response"));
15
+ var _RevokeApprovalRequestRequest = _interopRequireDefault(require("../model/RevokeApprovalRequestRequest"));
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
17
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
18
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
19
+ 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); } }
20
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
21
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
22
+ 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); } /**
23
+ * Cobo Wallet as a Service 2.0
24
+ *
25
+ * Contact: help@cobo.com
26
+ *
27
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
28
+ * https://openapi-generator.tech
29
+ * Do not edit the class manually.
30
+ *
31
+ */
32
+ /**
33
+ * AppWorkflows service.
34
+ * @module api/AppWorkflowsApi
35
+ */
36
+ var AppWorkflowsApi = exports["default"] = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new AppWorkflowsApi.
39
+ * @alias module:api/AppWorkflowsApi
40
+ * @class
41
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
42
+ * default to {@link module:ApiClient#instance} if unspecified.
43
+ */
44
+ function AppWorkflowsApi(apiClient) {
45
+ _classCallCheck(this, AppWorkflowsApi);
46
+ this.apiClient = apiClient || _ApiClient["default"].instance;
47
+ }
48
+
49
+ /**
50
+ * Request workflow approval
51
+ * This operation is request approval from app workflow with idempotency checks.
52
+ * @param {Object} opts Optional parameters
53
+ * @param {module:model/RequestApproval} [RequestApproval] The request body to app workflow approval.
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
+ */
56
+ return _createClass(AppWorkflowsApi, [{
57
+ key: "createApprovalRequestWithHttpInfo",
58
+ value: function createApprovalRequestWithHttpInfo(opts) {
59
+ opts = opts || {};
60
+ var postBody = opts['RequestApproval'];
61
+ if (postBody && postBody.toJSON) {
62
+ postBody = postBody.toJSON();
63
+ }
64
+ var pathParams = {};
65
+ var queryParams = {};
66
+ var headerParams = {};
67
+ var formParams = {};
68
+ var authNames = ['OAuth2', 'CoboAuth'];
69
+ var contentTypes = ['application/json'];
70
+ var accepts = ['application/json'];
71
+ var returnType = _CreateApprovalRequest201Response["default"];
72
+ return this.apiClient.callApi('/app/workflows/approval_requests', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
73
+ }
74
+
75
+ /**
76
+ * Request workflow approval
77
+ * This operation is request approval from app workflow with idempotency checks.
78
+ * @param {Object} opts Optional parameters
79
+ * @param {module:model/RequestApproval} opts.RequestApproval The request body to app workflow approval.
80
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateApprovalRequest201Response}
81
+ */
82
+ }, {
83
+ key: "createApprovalRequest",
84
+ value: function createApprovalRequest(opts) {
85
+ return this.createApprovalRequestWithHttpInfo(opts).then(function (response_and_data) {
86
+ return response_and_data.data;
87
+ });
88
+ }
89
+
90
+ /**
91
+ * Get approval request details
92
+ * This operation is retrieves approval request from app workflow.
93
+ * @param {String} approval_id The approval ID that is used to track a workflow approval request.
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
+ */
96
+ }, {
97
+ key: "getApprovalRequestByIdWithHttpInfo",
98
+ value: function getApprovalRequestByIdWithHttpInfo(approval_id) {
99
+ var postBody = null;
100
+ if (postBody && postBody.toJSON) {
101
+ postBody = postBody.toJSON();
102
+ }
103
+ // verify the required parameter 'approval_id' is set
104
+ if (approval_id === undefined || approval_id === null) {
105
+ throw new Error("Missing the required parameter 'approval_id' when calling getApprovalRequestById");
106
+ }
107
+ var pathParams = {
108
+ 'approval_id': approval_id
109
+ };
110
+ var queryParams = {};
111
+ var headerParams = {};
112
+ var formParams = {};
113
+ var authNames = ['OAuth2', 'CoboAuth'];
114
+ var contentTypes = [];
115
+ var accepts = ['application/json'];
116
+ var returnType = _ApprovalRequestDetail["default"];
117
+ return this.apiClient.callApi('/app/workflows/approval_requests/{approval_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
118
+ }
119
+
120
+ /**
121
+ * Get approval request details
122
+ * This operation is retrieves approval request from app workflow.
123
+ * @param {String} approval_id The approval ID that is used to track a workflow approval request.
124
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApprovalRequestDetail}
125
+ */
126
+ }, {
127
+ key: "getApprovalRequestById",
128
+ value: function getApprovalRequestById(approval_id) {
129
+ return this.getApprovalRequestByIdWithHttpInfo(approval_id).then(function (response_and_data) {
130
+ return response_and_data.data;
131
+ });
132
+ }
133
+
134
+ /**
135
+ * list app workflows
136
+ * This operation is list app workflows of app.
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
+ */
139
+ }, {
140
+ key: "listAppWorkflowsWithHttpInfo",
141
+ value: function listAppWorkflowsWithHttpInfo() {
142
+ var postBody = null;
143
+ if (postBody && postBody.toJSON) {
144
+ postBody = postBody.toJSON();
145
+ }
146
+ var pathParams = {};
147
+ var queryParams = {};
148
+ var headerParams = {};
149
+ var formParams = {};
150
+ var authNames = ['OAuth2', 'CoboAuth'];
151
+ var contentTypes = [];
152
+ var accepts = ['application/json'];
153
+ var returnType = [_AppWorkflow["default"]];
154
+ return this.apiClient.callApi('/app/workflows', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
155
+ }
156
+
157
+ /**
158
+ * list app workflows
159
+ * This operation is list app workflows of app.
160
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/AppWorkflow>}
161
+ */
162
+ }, {
163
+ key: "listAppWorkflows",
164
+ value: function listAppWorkflows() {
165
+ return this.listAppWorkflowsWithHttpInfo().then(function (response_and_data) {
166
+ return response_and_data.data;
167
+ });
168
+ }
169
+
170
+ /**
171
+ * List approval requests
172
+ * This operation is retrieves list approval requests from app workflow.
173
+ * @param {String} operation_id The operation ID that is used to track a workflow. The operation ID is provided by you and must be unique within your app.
174
+ * @param {Object} opts Optional parameters
175
+ * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
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.
177
+ * @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
178
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListApprovalRequests200Response} and HTTP response
179
+ */
180
+ }, {
181
+ key: "listApprovalRequestsWithHttpInfo",
182
+ value: function listApprovalRequestsWithHttpInfo(operation_id, opts) {
183
+ opts = opts || {};
184
+ var postBody = null;
185
+ if (postBody && postBody.toJSON) {
186
+ postBody = postBody.toJSON();
187
+ }
188
+ // verify the required parameter 'operation_id' is set
189
+ if (operation_id === undefined || operation_id === null) {
190
+ throw new Error("Missing the required parameter 'operation_id' when calling listApprovalRequests");
191
+ }
192
+ var pathParams = {};
193
+ var queryParams = {
194
+ 'operation_id': operation_id,
195
+ 'limit': opts['limit'],
196
+ 'before': opts['before'],
197
+ 'after': opts['after']
198
+ };
199
+ var headerParams = {};
200
+ var formParams = {};
201
+ var authNames = ['OAuth2', 'CoboAuth'];
202
+ var contentTypes = [];
203
+ var accepts = ['application/json'];
204
+ var returnType = _ListApprovalRequests200Response["default"];
205
+ return this.apiClient.callApi('/app/workflows/approval_requests', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
206
+ }
207
+
208
+ /**
209
+ * List approval requests
210
+ * This operation is retrieves list approval requests from app workflow.
211
+ * @param {String} operation_id The operation ID that is used to track a workflow. The operation ID is provided by you and must be unique within your app.
212
+ * @param {Object} opts Optional parameters
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
+ * @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.
215
+ * @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
216
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListApprovalRequests200Response}
217
+ */
218
+ }, {
219
+ key: "listApprovalRequests",
220
+ value: function listApprovalRequests(operation_id, opts) {
221
+ return this.listApprovalRequestsWithHttpInfo(operation_id, opts).then(function (response_and_data) {
222
+ return response_and_data.data;
223
+ });
224
+ }
225
+
226
+ /**
227
+ * Revoke approval request
228
+ * This operation is revoke approval request from app workflow.
229
+ * @param {String} approval_id The approval ID that is used to track a workflow approval request.
230
+ * @param {Object} opts Optional parameters
231
+ * @param {module:model/RevokeApprovalRequestRequest} [RevokeApprovalRequestRequest] The revoke request body to app workflow approval.
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
+ */
234
+ }, {
235
+ key: "revokeApprovalRequestWithHttpInfo",
236
+ value: function revokeApprovalRequestWithHttpInfo(approval_id, opts) {
237
+ opts = opts || {};
238
+ var postBody = opts['RevokeApprovalRequestRequest'];
239
+ if (postBody && postBody.toJSON) {
240
+ postBody = postBody.toJSON();
241
+ }
242
+ // verify the required parameter 'approval_id' is set
243
+ if (approval_id === undefined || approval_id === null) {
244
+ throw new Error("Missing the required parameter 'approval_id' when calling revokeApprovalRequest");
245
+ }
246
+ var pathParams = {
247
+ 'approval_id': approval_id
248
+ };
249
+ var queryParams = {};
250
+ var headerParams = {};
251
+ var formParams = {};
252
+ var authNames = ['OAuth2', 'CoboAuth'];
253
+ var contentTypes = ['application/json'];
254
+ var accepts = ['application/json'];
255
+ var returnType = _RevokeApprovalRequest201Response["default"];
256
+ return this.apiClient.callApi('/app/workflows/approval_requests/{approval_id}/revoke', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
257
+ }
258
+
259
+ /**
260
+ * Revoke approval request
261
+ * This operation is revoke approval request from app workflow.
262
+ * @param {String} approval_id The approval ID that is used to track a workflow approval request.
263
+ * @param {Object} opts Optional parameters
264
+ * @param {module:model/RevokeApprovalRequestRequest} opts.RevokeApprovalRequestRequest The revoke request body to app workflow approval.
265
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RevokeApprovalRequest201Response}
266
+ */
267
+ }, {
268
+ key: "revokeApprovalRequest",
269
+ value: function revokeApprovalRequest(approval_id, opts) {
270
+ return this.revokeApprovalRequestWithHttpInfo(approval_id, opts).then(function (response_and_data) {
271
+ return response_and_data.data;
272
+ });
273
+ }
274
+ }]);
275
+ }();
@@ -88,8 +88,8 @@ var DevelopersApi = exports["default"] = /*#__PURE__*/function () {
88
88
  * @param {String} [wallet_ids] A list of wallet IDs, separated by commas.
89
89
  * @param {module:model/String} [status] The callback message status. Possible values include `Approved`, `Denied`, and `Failed`.
90
90
  * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
91
- * @param {String} [before] This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
92
- * @param {String} [after] This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
91
+ * @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.
92
+ * @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
93
93
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListCallbackMessages200Response} and HTTP response
94
94
  */
95
95
  }, {
@@ -130,8 +130,8 @@ var DevelopersApi = exports["default"] = /*#__PURE__*/function () {
130
130
  * @param {String} opts.wallet_ids A list of wallet IDs, separated by commas.
131
131
  * @param {module:model/String} opts.status The callback message status. Possible values include `Approved`, `Denied`, and `Failed`.
132
132
  * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
133
- * @param {String} opts.before This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set it to `infinity`, the last page of data is returned.
134
- * @param {String} opts.after This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
133
+ * @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.
134
+ * @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
135
135
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCallbackMessages200Response}
136
136
  */
137
137
  }, {