@cobo/cobo-waas2 1.16.0 → 1.18.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 (214) hide show
  1. package/README.md +46 -6
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/PreRequestScript.js +27 -33
  4. package/dist/api/AppWorkflowsApi.js +22 -22
  5. package/dist/api/FeeStationApi.js +2 -2
  6. package/dist/api/OAuthApi.js +93 -6
  7. package/dist/api/OrganizationsApi.js +79 -0
  8. package/dist/api/PaymentApi.js +265 -55
  9. package/dist/api/TransactionsApi.js +2 -2
  10. package/dist/api/WalletsApi.js +11 -8
  11. package/dist/index.js +252 -14
  12. package/dist/model/Account.js +174 -0
  13. package/dist/model/AcquiringType.js +61 -0
  14. package/dist/model/AddressTransferDestination.js +2 -2
  15. package/dist/model/AddressesEventData.js +8 -3
  16. package/dist/model/AppWorkflow.js +7 -7
  17. package/dist/model/AppWorkflowField.js +5 -5
  18. package/dist/model/AppWorkflowPolicy.js +1 -1
  19. package/dist/model/ApprovalEntry.js +1 -1
  20. package/dist/model/ApprovalRequest.js +5 -3
  21. package/dist/model/ApprovalRequestDetail.js +2 -1
  22. package/dist/model/ApprovalUser.js +4 -4
  23. package/dist/model/BalanceUpdateInfo.js +170 -0
  24. package/dist/model/BalanceUpdateInfoEventData.js +297 -0
  25. package/dist/model/BankAccount.js +2 -2
  26. package/dist/model/ChainInfo.js +1 -1
  27. package/dist/model/ChainsEventData.js +8 -3
  28. package/dist/model/CreateApprovalRequest201Response.js +2 -1
  29. package/dist/model/CreateMerchantRequest.js +13 -0
  30. package/dist/model/CreatePaymentOrderRequest.js +14 -5
  31. package/dist/model/CreateRefundRequest.js +41 -8
  32. package/dist/model/CreateSettlement.js +28 -12
  33. package/dist/model/CreateSettlementRequestRequest.js +27 -0
  34. package/dist/model/CryptoAddress.js +171 -0
  35. package/dist/model/CustodialTransferDestination.js +137 -0
  36. package/dist/model/EstimateContractCallFeeParams.js +2 -2
  37. package/dist/model/EstimateFeeParams.js +1 -1
  38. package/dist/model/EstimatedFILFee.js +170 -0
  39. package/dist/model/EstimatedFILFeeSlow.js +186 -0
  40. package/dist/model/EstimatedFee.js +68 -12
  41. package/dist/model/EstimatedSOLFee.js +170 -0
  42. package/dist/model/EstimatedSOLFeeSlow.js +184 -0
  43. package/dist/model/ExchangePermissionToken201Response.js +122 -0
  44. package/dist/model/{CreateBankAccountRequest.js → ExchangePermissionTokenRequest.js} +30 -28
  45. package/dist/model/FILBase.js +88 -0
  46. package/dist/model/FILPrice.js +114 -0
  47. package/dist/model/FeeType.js +10 -0
  48. package/dist/model/GetExchangeRate200Response.js +2 -2
  49. package/dist/model/GraphQLError.js +135 -0
  50. package/dist/model/GraphQLErrorLocationsInner.js +92 -0
  51. package/dist/model/{TransactionMessageSignBTCEIP191Destination.js → GraphQLRequest.js} +49 -36
  52. package/dist/model/GraphQLResponse.js +119 -0
  53. package/dist/model/ListTopUpPayers200Response.js +123 -0
  54. package/dist/model/ListTopUpPayers200ResponseDataInner.js +189 -0
  55. package/dist/model/MPCVaultEventData.js +8 -3
  56. package/dist/model/Merchant.js +15 -2
  57. package/dist/model/Order.js +16 -7
  58. package/dist/model/PayerAccount.js +189 -0
  59. package/dist/model/PaymentOrderEventData.js +33 -15
  60. package/dist/model/PaymentRefundEventData.js +66 -11
  61. package/dist/model/PaymentSettlementEvent.js +14 -9
  62. package/dist/model/PayoutChannel.js +61 -0
  63. package/dist/model/PolicyAction.js +1 -1
  64. package/dist/model/PolicyActionContent.js +6 -4
  65. package/dist/model/PolicyCondition.js +5 -5
  66. package/dist/model/RefreshPermissionTokenRequest.js +110 -0
  67. package/dist/model/Refund.js +39 -4
  68. package/dist/model/RefundStatus.js +5 -0
  69. package/dist/model/RequestApproval.js +9 -9
  70. package/dist/model/RevokeApprovalRequest201Response.js +2 -1
  71. package/dist/model/RevokeApprovalRequestRequest.js +2 -2
  72. package/dist/model/SOLBase.js +101 -0
  73. package/dist/model/SOLComputeUnit.js +101 -0
  74. package/dist/model/Settlement.js +3 -3
  75. package/dist/model/SettlementDetail.js +24 -6
  76. package/dist/model/SettlementInfo.js +11 -2
  77. package/dist/model/SupportedToken.js +222 -0
  78. package/dist/model/SwapActivityDetail.js +30 -0
  79. package/dist/model/SwapActivitySigners.js +110 -0
  80. package/dist/model/SwapQuote.js +17 -4
  81. package/dist/model/SwapSingingStatus.js +71 -0
  82. package/dist/model/TSSRequestWebhookEventData.js +8 -3
  83. package/dist/model/TokenListingEventData.js +8 -3
  84. package/dist/model/TokensEventData.js +8 -3
  85. package/dist/model/TopUpAddress.js +230 -0
  86. package/dist/model/TransactionCoboCategory.js +20 -0
  87. package/dist/model/TransactionDestination.js +14 -38
  88. package/dist/model/TransactionDestinationType.js +5 -0
  89. package/dist/model/TransactionEvmCalldataInfo.js +1 -1
  90. package/dist/model/TransactionFILFee.js +229 -0
  91. package/dist/model/TransactionFee.js +107 -9
  92. package/dist/model/TransactionRequestFILFee.js +186 -0
  93. package/dist/model/TransactionRequestFee.js +89 -9
  94. package/dist/model/TransactionRequestSOLFee.js +168 -0
  95. package/dist/model/TransactionSOLFee.js +229 -0
  96. package/dist/model/TransactionTransferToAddressDestination.js +2 -2
  97. package/dist/model/TransactionTransferToWalletDestination.js +2 -2
  98. package/dist/model/TransactionWebhookEventData.js +8 -3
  99. package/dist/model/TransferDestination.js +44 -16
  100. package/dist/model/TransferDestinationType.js +5 -0
  101. package/dist/model/UpdateMerchantByIdRequest.js +13 -0
  102. package/dist/model/UpdateRefundByIdRequest.js +110 -0
  103. package/dist/model/UpdateTopUpAddress.js +141 -0
  104. package/dist/model/WalletInfoEventData.js +8 -3
  105. package/dist/model/WebhookEvent.js +2 -2
  106. package/dist/model/WebhookEventData.js +83 -13
  107. package/dist/model/WebhookEventDataType.js +7 -2
  108. package/dist/model/WebhookEventLog.js +2 -2
  109. package/dist/model/WebhookEventType.js +15 -0
  110. package/docs/Account.md +14 -0
  111. package/docs/AcquiringType.md +12 -0
  112. package/docs/AddressTransferDestination.md +2 -2
  113. package/docs/AddressesEventData.md +3 -1
  114. package/docs/AppWorkflow.md +3 -3
  115. package/docs/AppWorkflowField.md +2 -2
  116. package/docs/AppWorkflowsApi.md +12 -12
  117. package/docs/ApprovalRequest.md +2 -2
  118. package/docs/ApprovalRequestDetail.md +1 -1
  119. package/docs/ApprovalUser.md +2 -2
  120. package/docs/BalanceUpdateInfo.md +13 -0
  121. package/docs/BalanceUpdateInfoEventData.md +47 -0
  122. package/docs/BankAccount.md +2 -2
  123. package/docs/ChainInfo.md +1 -1
  124. package/docs/ChainsEventData.md +3 -1
  125. package/docs/CreateApprovalRequest201Response.md +1 -1
  126. package/docs/CreateMerchantRequest.md +1 -0
  127. package/docs/CreatePaymentOrderRequest.md +2 -1
  128. package/docs/CreateRefundRequest.md +5 -2
  129. package/docs/CreateSettlement.md +7 -6
  130. package/docs/CreateSettlementRequestRequest.md +3 -0
  131. package/docs/CryptoAddress.md +14 -0
  132. package/docs/CustodialTransferDestination.md +11 -0
  133. package/docs/EstimateContractCallFeeParams.md +1 -1
  134. package/docs/EstimateFeeParams.md +1 -1
  135. package/docs/EstimatedFILFee.md +13 -0
  136. package/docs/EstimatedFILFeeSlow.md +12 -0
  137. package/docs/EstimatedFee.md +3 -3
  138. package/docs/EstimatedSOLFee.md +13 -0
  139. package/docs/EstimatedSOLFeeSlow.md +12 -0
  140. package/docs/ExchangePermissionToken201Response.md +12 -0
  141. package/docs/ExchangePermissionTokenRequest.md +9 -0
  142. package/docs/FILBase.md +9 -0
  143. package/docs/FILPrice.md +11 -0
  144. package/docs/FeeStationApi.md +1 -1
  145. package/docs/FeeType.md +4 -0
  146. package/docs/GetExchangeRate200Response.md +1 -1
  147. package/docs/GraphQLError.md +11 -0
  148. package/docs/GraphQLErrorLocationsInner.md +10 -0
  149. package/docs/GraphQLRequest.md +11 -0
  150. package/docs/GraphQLResponse.md +10 -0
  151. package/docs/ListTopUpPayers200Response.md +10 -0
  152. package/docs/ListTopUpPayers200ResponseDataInner.md +14 -0
  153. package/docs/MPCVaultEventData.md +3 -1
  154. package/docs/Merchant.md +3 -2
  155. package/docs/OAuthApi.md +102 -0
  156. package/docs/Order.md +6 -5
  157. package/docs/OrganizationsApi.md +55 -0
  158. package/docs/PayerAccount.md +14 -0
  159. package/docs/PaymentApi.md +247 -29
  160. package/docs/PaymentOrderEventData.md +9 -6
  161. package/docs/PaymentRefundEventData.md +10 -5
  162. package/docs/PaymentSettlementEvent.md +6 -4
  163. package/docs/PayoutChannel.md +12 -0
  164. package/docs/PolicyActionContent.md +4 -4
  165. package/docs/PolicyCondition.md +2 -2
  166. package/docs/RefreshPermissionTokenRequest.md +9 -0
  167. package/docs/Refund.md +7 -4
  168. package/docs/RefundStatus.md +2 -0
  169. package/docs/RequestApproval.md +4 -4
  170. package/docs/RevokeApprovalRequest201Response.md +1 -1
  171. package/docs/RevokeApprovalRequestRequest.md +1 -1
  172. package/docs/SOLBase.md +10 -0
  173. package/docs/SOLComputeUnit.md +10 -0
  174. package/docs/Settlement.md +3 -3
  175. package/docs/SettlementDetail.md +8 -6
  176. package/docs/SettlementInfo.md +3 -2
  177. package/docs/SupportedToken.md +17 -0
  178. package/docs/SwapActivityDetail.md +1 -0
  179. package/docs/SwapActivitySigners.md +11 -0
  180. package/docs/SwapQuote.md +3 -2
  181. package/docs/SwapSingingStatus.md +16 -0
  182. package/docs/TSSRequestWebhookEventData.md +3 -1
  183. package/docs/TokenListingEventData.md +3 -1
  184. package/docs/TokensEventData.md +3 -1
  185. package/docs/TopUpAddress.md +18 -0
  186. package/docs/TransactionCoboCategory.md +8 -0
  187. package/docs/TransactionDestination.md +2 -2
  188. package/docs/TransactionDestinationType.md +2 -0
  189. package/docs/TransactionEvmCalldataInfo.md +1 -1
  190. package/docs/TransactionFILFee.md +16 -0
  191. package/docs/TransactionFee.md +8 -1
  192. package/docs/TransactionRequestFILFee.md +13 -0
  193. package/docs/TransactionRequestFee.md +5 -1
  194. package/docs/TransactionRequestSOLFee.md +12 -0
  195. package/docs/TransactionSOLFee.md +16 -0
  196. package/docs/TransactionTransferToAddressDestination.md +2 -2
  197. package/docs/TransactionTransferToWalletDestination.md +1 -1
  198. package/docs/TransactionWebhookEventData.md +3 -1
  199. package/docs/TransactionsApi.md +1 -1
  200. package/docs/TransferDestination.md +3 -3
  201. package/docs/TransferDestinationType.md +2 -0
  202. package/docs/UpdateMerchantByIdRequest.md +1 -0
  203. package/docs/UpdateRefundByIdRequest.md +9 -0
  204. package/docs/UpdateTopUpAddress.md +11 -0
  205. package/docs/WalletInfoEventData.md +3 -1
  206. package/docs/WalletsApi.md +6 -4
  207. package/docs/WebhookEvent.md +1 -1
  208. package/docs/WebhookEventData.md +14 -5
  209. package/docs/WebhookEventDataType.md +3 -1
  210. package/docs/WebhookEventLog.md +1 -1
  211. package/docs/WebhookEventType.md +6 -0
  212. package/package.json +1 -1
  213. package/docs/CreateBankAccountRequest.md +0 -9
  214. package/docs/TransactionMessageSignBTCEIP191Destination.md +0 -10
@@ -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
- * Get Org Access Token
48
- * <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.
49
- * @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.
50
- * @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.
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
+ * Get Access Token
51
+ * This operation acquires an Access Token and a Refresh Token for the Checkout SDK. For security purposes, an Access Token expires after a certain period. Once it expires, you need to call the [Refresh Access Token](/v2/api-references/oauth/refresh-access-token) operation to get a new Access Token and a new Refresh Token.
52
+ * @param {module:model/ExchangePermissionTokenRequest} ExchangePermissionTokenRequest The request body to acquire an 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
+ * Get Access Token
79
+ * This operation acquires an Access Token and a Refresh Token for the Checkout SDK. For security purposes, an Access Token expires after a certain period. Once it expires, you need to call the [Refresh Access Token](/v2/api-references/oauth/refresh-access-token) operation to get a new Access Token and a new Refresh Token.
80
+ * @param {module:model/ExchangePermissionTokenRequest} ExchangePermissionTokenRequest The request body to acquire an 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 Access Token
151
+ * This operation refreshes the Access Token and Refresh Token for the Checkout SDK. For security purposes, an Access Token expires after a certain period. Once it expires, you need to call this operation to get a new Access Token and Refresh Token.
152
+ * @param {module:model/RefreshPermissionTokenRequest} RefreshPermissionTokenRequest The request body to refresh the Access Token and the Refresh 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 Access Token
179
+ * This operation refreshes the Access Token and Refresh Token for the Checkout SDK. For security purposes, an Access Token expires after a certain period. Once it expires, you need to call this operation to get a new Access Token and Refresh Token.
180
+ * @param {module:model/RefreshPermissionTokenRequest} RefreshPermissionTokenRequest The request body to refresh the Access Token and the Refresh 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.
@@ -0,0 +1,79 @@
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 _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
9
+ var _OrgInfo = _interopRequireDefault(require("../model/OrgInfo"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
13
+ 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); } }
14
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
+ 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); } /**
17
+ * Cobo Wallet as a Service 2.0
18
+ *
19
+ * Contact: help@cobo.com
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * Organizations service.
28
+ * @module api/OrganizationsApi
29
+ */
30
+ var OrganizationsApi = exports["default"] = /*#__PURE__*/function () {
31
+ /**
32
+ * Constructs a new OrganizationsApi.
33
+ * @alias module:api/OrganizationsApi
34
+ * @class
35
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
36
+ * default to {@link module:ApiClient#instance} if unspecified.
37
+ */
38
+ function OrganizationsApi(apiClient) {
39
+ _classCallCheck(this, OrganizationsApi);
40
+ this.apiClient = apiClient || _ApiClient["default"].instance;
41
+ }
42
+
43
+ /**
44
+ * Get organization information
45
+ * This operation retrieves the detailed information about the organization associated with the current API key.
46
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OrgInfo} and HTTP response
47
+ */
48
+ return _createClass(OrganizationsApi, [{
49
+ key: "getOrgInfoWithHttpInfo",
50
+ value: function getOrgInfoWithHttpInfo() {
51
+ var postBody = null;
52
+ if (postBody && postBody.toJSON) {
53
+ postBody = postBody.toJSON();
54
+ }
55
+ var pathParams = {};
56
+ var queryParams = {};
57
+ var headerParams = {};
58
+ var formParams = {};
59
+ var authNames = ['CoboAuth'];
60
+ var contentTypes = [];
61
+ var accepts = ['application/json'];
62
+ var returnType = _OrgInfo["default"];
63
+ return this.apiClient.callApi('/organizations/info', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
64
+ }
65
+
66
+ /**
67
+ * Get organization information
68
+ * This operation retrieves the detailed information about the organization associated with the current API key.
69
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OrgInfo}
70
+ */
71
+ }, {
72
+ key: "getOrgInfo",
73
+ value: function getOrgInfo() {
74
+ return this.getOrgInfoWithHttpInfo().then(function (response_and_data) {
75
+ return response_and_data.data;
76
+ });
77
+ }
78
+ }]);
79
+ }();