@cobo/cobo-waas2 1.17.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 (174) hide show
  1. package/README.md +36 -4
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/FeeStationApi.js +2 -2
  4. package/dist/api/OAuthApi.js +12 -12
  5. package/dist/api/OrganizationsApi.js +79 -0
  6. package/dist/api/PaymentApi.js +233 -16
  7. package/dist/api/TransactionsApi.js +2 -2
  8. package/dist/api/WalletsApi.js +5 -2
  9. package/dist/index.js +203 -7
  10. package/dist/model/Account.js +174 -0
  11. package/dist/model/AcquiringType.js +61 -0
  12. package/dist/model/AddressTransferDestination.js +2 -2
  13. package/dist/model/AddressesEventData.js +8 -3
  14. package/dist/model/BalanceUpdateInfo.js +170 -0
  15. package/dist/model/BalanceUpdateInfoEventData.js +297 -0
  16. package/dist/model/BankAccount.js +2 -2
  17. package/dist/model/ChainsEventData.js +8 -3
  18. package/dist/model/CreateMerchantRequest.js +13 -0
  19. package/dist/model/CreatePaymentOrderRequest.js +10 -1
  20. package/dist/model/CreateRefundRequest.js +9 -11
  21. package/dist/model/CreateSettlement.js +8 -27
  22. package/dist/model/CreateSettlementRequestRequest.js +27 -0
  23. package/dist/model/CryptoAddress.js +7 -7
  24. package/dist/model/CustodialTransferDestination.js +1 -1
  25. package/dist/model/EstimateContractCallFeeParams.js +2 -2
  26. package/dist/model/EstimateFeeParams.js +1 -1
  27. package/dist/model/EstimatedFILFee.js +170 -0
  28. package/dist/model/EstimatedFILFeeSlow.js +186 -0
  29. package/dist/model/EstimatedFee.js +68 -12
  30. package/dist/model/EstimatedSOLFee.js +170 -0
  31. package/dist/model/EstimatedSOLFeeSlow.js +184 -0
  32. package/dist/model/ExchangePermissionToken201Response.js +4 -4
  33. package/dist/model/ExchangePermissionTokenRequest.js +2 -2
  34. package/dist/model/FILBase.js +88 -0
  35. package/dist/model/FILPrice.js +114 -0
  36. package/dist/model/FeeType.js +10 -0
  37. package/dist/model/GetExchangeRate200Response.js +2 -2
  38. package/dist/model/GraphQLError.js +135 -0
  39. package/dist/model/GraphQLErrorLocationsInner.js +92 -0
  40. package/dist/model/{TransactionMessageSignBTCEIP191Destination.js → GraphQLRequest.js} +49 -36
  41. package/dist/model/GraphQLResponse.js +119 -0
  42. package/dist/model/ListTopUpPayers200Response.js +123 -0
  43. package/dist/model/ListTopUpPayers200ResponseDataInner.js +189 -0
  44. package/dist/model/MPCVaultEventData.js +8 -3
  45. package/dist/model/Merchant.js +15 -2
  46. package/dist/model/Order.js +12 -3
  47. package/dist/model/PayerAccount.js +189 -0
  48. package/dist/model/PaymentOrderEventData.js +27 -9
  49. package/dist/model/PaymentRefundEventData.js +66 -11
  50. package/dist/model/PaymentSettlementEvent.js +14 -9
  51. package/dist/model/RefreshPermissionTokenRequest.js +2 -2
  52. package/dist/model/Refund.js +39 -4
  53. package/dist/model/RefundStatus.js +5 -0
  54. package/dist/model/SOLBase.js +101 -0
  55. package/dist/model/SOLComputeUnit.js +101 -0
  56. package/dist/model/Settlement.js +3 -3
  57. package/dist/model/SettlementDetail.js +15 -6
  58. package/dist/model/SettlementInfo.js +11 -2
  59. package/dist/model/SwapActivityDetail.js +30 -0
  60. package/dist/model/SwapActivitySigners.js +110 -0
  61. package/dist/model/SwapQuote.js +17 -4
  62. package/dist/model/SwapSingingStatus.js +71 -0
  63. package/dist/model/TSSRequestWebhookEventData.js +8 -3
  64. package/dist/model/TokenListingEventData.js +8 -3
  65. package/dist/model/TokensEventData.js +8 -3
  66. package/dist/model/TopUpAddress.js +230 -0
  67. package/dist/model/TransactionCoboCategory.js +20 -0
  68. package/dist/model/TransactionDestination.js +10 -38
  69. package/dist/model/TransactionEvmCalldataInfo.js +1 -1
  70. package/dist/model/TransactionFILFee.js +229 -0
  71. package/dist/model/TransactionFee.js +107 -9
  72. package/dist/model/TransactionRequestFILFee.js +186 -0
  73. package/dist/model/TransactionRequestFee.js +89 -9
  74. package/dist/model/TransactionRequestSOLFee.js +168 -0
  75. package/dist/model/TransactionSOLFee.js +229 -0
  76. package/dist/model/TransactionTransferToAddressDestination.js +2 -2
  77. package/dist/model/TransactionTransferToWalletDestination.js +1 -1
  78. package/dist/model/TransactionWebhookEventData.js +8 -3
  79. package/dist/model/TransferDestination.js +2 -2
  80. package/dist/model/UpdateMerchantByIdRequest.js +13 -0
  81. package/dist/model/UpdateRefundByIdRequest.js +110 -0
  82. package/dist/model/UpdateTopUpAddress.js +141 -0
  83. package/dist/model/WalletInfoEventData.js +8 -3
  84. package/dist/model/WebhookEvent.js +2 -2
  85. package/dist/model/WebhookEventData.js +83 -13
  86. package/dist/model/WebhookEventDataType.js +7 -2
  87. package/dist/model/WebhookEventLog.js +2 -2
  88. package/dist/model/WebhookEventType.js +15 -0
  89. package/docs/Account.md +14 -0
  90. package/docs/AcquiringType.md +12 -0
  91. package/docs/AddressTransferDestination.md +2 -2
  92. package/docs/AddressesEventData.md +3 -1
  93. package/docs/BalanceUpdateInfo.md +13 -0
  94. package/docs/BalanceUpdateInfoEventData.md +47 -0
  95. package/docs/BankAccount.md +2 -2
  96. package/docs/ChainsEventData.md +3 -1
  97. package/docs/CreateMerchantRequest.md +1 -0
  98. package/docs/CreatePaymentOrderRequest.md +2 -1
  99. package/docs/CreateRefundRequest.md +5 -5
  100. package/docs/CreateSettlement.md +7 -9
  101. package/docs/CreateSettlementRequestRequest.md +3 -0
  102. package/docs/CryptoAddress.md +5 -5
  103. package/docs/EstimateContractCallFeeParams.md +1 -1
  104. package/docs/EstimateFeeParams.md +1 -1
  105. package/docs/EstimatedFILFee.md +13 -0
  106. package/docs/EstimatedFILFeeSlow.md +12 -0
  107. package/docs/EstimatedFee.md +3 -3
  108. package/docs/EstimatedSOLFee.md +13 -0
  109. package/docs/EstimatedSOLFeeSlow.md +12 -0
  110. package/docs/ExchangePermissionToken201Response.md +4 -4
  111. package/docs/ExchangePermissionTokenRequest.md +1 -1
  112. package/docs/FILBase.md +9 -0
  113. package/docs/FILPrice.md +11 -0
  114. package/docs/FeeStationApi.md +1 -1
  115. package/docs/FeeType.md +4 -0
  116. package/docs/GetExchangeRate200Response.md +1 -1
  117. package/docs/GraphQLError.md +11 -0
  118. package/docs/GraphQLErrorLocationsInner.md +10 -0
  119. package/docs/GraphQLRequest.md +11 -0
  120. package/docs/GraphQLResponse.md +10 -0
  121. package/docs/ListTopUpPayers200Response.md +10 -0
  122. package/docs/ListTopUpPayers200ResponseDataInner.md +14 -0
  123. package/docs/MPCVaultEventData.md +3 -1
  124. package/docs/Merchant.md +3 -2
  125. package/docs/OAuthApi.md +8 -8
  126. package/docs/Order.md +4 -3
  127. package/docs/OrganizationsApi.md +55 -0
  128. package/docs/PayerAccount.md +14 -0
  129. package/docs/PaymentApi.md +230 -6
  130. package/docs/PaymentOrderEventData.md +7 -4
  131. package/docs/PaymentRefundEventData.md +10 -5
  132. package/docs/PaymentSettlementEvent.md +6 -4
  133. package/docs/RefreshPermissionTokenRequest.md +1 -1
  134. package/docs/Refund.md +7 -4
  135. package/docs/RefundStatus.md +2 -0
  136. package/docs/SOLBase.md +10 -0
  137. package/docs/SOLComputeUnit.md +10 -0
  138. package/docs/Settlement.md +3 -3
  139. package/docs/SettlementDetail.md +7 -6
  140. package/docs/SettlementInfo.md +3 -2
  141. package/docs/SwapActivityDetail.md +1 -0
  142. package/docs/SwapActivitySigners.md +11 -0
  143. package/docs/SwapQuote.md +3 -2
  144. package/docs/SwapSingingStatus.md +16 -0
  145. package/docs/TSSRequestWebhookEventData.md +3 -1
  146. package/docs/TokenListingEventData.md +3 -1
  147. package/docs/TokensEventData.md +3 -1
  148. package/docs/TopUpAddress.md +18 -0
  149. package/docs/TransactionCoboCategory.md +8 -0
  150. package/docs/TransactionDestination.md +2 -2
  151. package/docs/TransactionEvmCalldataInfo.md +1 -1
  152. package/docs/TransactionFILFee.md +16 -0
  153. package/docs/TransactionFee.md +8 -1
  154. package/docs/TransactionRequestFILFee.md +13 -0
  155. package/docs/TransactionRequestFee.md +5 -1
  156. package/docs/TransactionRequestSOLFee.md +12 -0
  157. package/docs/TransactionSOLFee.md +16 -0
  158. package/docs/TransactionTransferToAddressDestination.md +2 -2
  159. package/docs/TransactionTransferToWalletDestination.md +1 -1
  160. package/docs/TransactionWebhookEventData.md +3 -1
  161. package/docs/TransactionsApi.md +1 -1
  162. package/docs/TransferDestination.md +2 -2
  163. package/docs/UpdateMerchantByIdRequest.md +1 -0
  164. package/docs/UpdateRefundByIdRequest.md +9 -0
  165. package/docs/UpdateTopUpAddress.md +11 -0
  166. package/docs/WalletInfoEventData.md +3 -1
  167. package/docs/WalletsApi.md +3 -1
  168. package/docs/WebhookEvent.md +1 -1
  169. package/docs/WebhookEventData.md +14 -5
  170. package/docs/WebhookEventDataType.md +3 -1
  171. package/docs/WebhookEventLog.md +1 -1
  172. package/docs/WebhookEventType.md +6 -0
  173. package/package.json +1 -1
  174. package/docs/TransactionMessageSignBTCEIP191Destination.md +0 -10
@@ -0,0 +1,184 @@
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 _SOLBase = _interopRequireDefault(require("./SOLBase"));
9
+ var _SOLComputeUnit = _interopRequireDefault(require("./SOLComputeUnit"));
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 _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ 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; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ 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); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ 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); } /**
20
+ * Cobo Wallet as a Service 2.0
21
+ *
22
+ * Contact: help@cobo.com
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The EstimatedSOLFeeSlow model module.
31
+ * @module model/EstimatedSOLFeeSlow
32
+ */
33
+ var EstimatedSOLFeeSlow = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>EstimatedSOLFeeSlow</code>.
36
+ * @alias module:model/EstimatedSOLFeeSlow
37
+ * @implements module:model/SOLComputeUnit
38
+ * @implements module:model/SOLBase
39
+ * @param compute_unit_price {String} The cost per compute unit. Transactions consume computational resources measured in compute units, and this price helps determine the cost of executing transactions, especially complex ones involving smart contracts.
40
+ * @param compute_unit_limit {String} The maximum number of compute units allowed for a transaction. This limits the resources any single transaction can consume, preventing excessive resource usage that could impact network performance negatively.
41
+ * @param base_fee {String} The fundamental fee required for each transaction. It is charged to prevent spam transactions and network congestion, ensuring that only meaningful transactions consume network resources.
42
+ */
43
+ function EstimatedSOLFeeSlow(compute_unit_price, compute_unit_limit, base_fee) {
44
+ _classCallCheck(this, EstimatedSOLFeeSlow);
45
+ _SOLComputeUnit["default"].initialize(this);
46
+ _SOLBase["default"].initialize(this);
47
+ EstimatedSOLFeeSlow.initialize(this, compute_unit_price, compute_unit_limit, base_fee);
48
+ }
49
+
50
+ /**
51
+ * Initializes the fields of this object.
52
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
53
+ * Only for internal use.
54
+ */
55
+ return _createClass(EstimatedSOLFeeSlow, null, [{
56
+ key: "initialize",
57
+ value: function initialize(obj, compute_unit_price, compute_unit_limit, base_fee) {
58
+ obj['compute_unit_price'] = compute_unit_price;
59
+ obj['compute_unit_limit'] = compute_unit_limit;
60
+ obj['base_fee'] = base_fee;
61
+ }
62
+
63
+ /**
64
+ * Constructs a <code>EstimatedSOLFeeSlow</code> from a plain JavaScript object, optionally creating a new instance.
65
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
66
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
67
+ * @param {module:model/EstimatedSOLFeeSlow} obj Optional instance to populate.
68
+ * @return {module:model/EstimatedSOLFeeSlow} The populated <code>EstimatedSOLFeeSlow</code> instance.
69
+ */
70
+ }, {
71
+ key: "constructFromObject",
72
+ value: function constructFromObject(data, obj) {
73
+ if (data) {
74
+ obj = obj || new EstimatedSOLFeeSlow();
75
+ _SOLComputeUnit["default"].constructFromObject(data, obj);
76
+ _SOLBase["default"].constructFromObject(data, obj);
77
+ if (data.hasOwnProperty('compute_unit_price')) {
78
+ obj['compute_unit_price'] = _ApiClient["default"].convertToType(data['compute_unit_price'], 'String');
79
+ }
80
+ if (data.hasOwnProperty('compute_unit_limit')) {
81
+ obj['compute_unit_limit'] = _ApiClient["default"].convertToType(data['compute_unit_limit'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('base_fee')) {
84
+ obj['base_fee'] = _ApiClient["default"].convertToType(data['base_fee'], 'String');
85
+ }
86
+ if (data.hasOwnProperty('rent_amount')) {
87
+ obj['rent_amount'] = _ApiClient["default"].convertToType(data['rent_amount'], 'String');
88
+ }
89
+ }
90
+ return obj;
91
+ }
92
+
93
+ /**
94
+ * Validates the JSON data with respect to <code>EstimatedSOLFeeSlow</code>.
95
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
96
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>EstimatedSOLFeeSlow</code>.
97
+ */
98
+ }, {
99
+ key: "validateJSON",
100
+ value: function validateJSON(data) {
101
+ // check to make sure all required properties are present in the JSON string
102
+ var _iterator = _createForOfIteratorHelper(EstimatedSOLFeeSlow.RequiredProperties),
103
+ _step;
104
+ try {
105
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
106
+ var property = _step.value;
107
+ if (!data.hasOwnProperty(property)) {
108
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
109
+ }
110
+ }
111
+ // ensure the json data is a string
112
+ } catch (err) {
113
+ _iterator.e(err);
114
+ } finally {
115
+ _iterator.f();
116
+ }
117
+ if (data['compute_unit_price'] && !(typeof data['compute_unit_price'] === 'string' || data['compute_unit_price'] instanceof String)) {
118
+ throw new Error("Expected the field `compute_unit_price` to be a primitive type in the JSON string but got " + data['compute_unit_price']);
119
+ }
120
+ // ensure the json data is a string
121
+ if (data['compute_unit_limit'] && !(typeof data['compute_unit_limit'] === 'string' || data['compute_unit_limit'] instanceof String)) {
122
+ throw new Error("Expected the field `compute_unit_limit` to be a primitive type in the JSON string but got " + data['compute_unit_limit']);
123
+ }
124
+ // ensure the json data is a string
125
+ if (data['base_fee'] && !(typeof data['base_fee'] === 'string' || data['base_fee'] instanceof String)) {
126
+ throw new Error("Expected the field `base_fee` to be a primitive type in the JSON string but got " + data['base_fee']);
127
+ }
128
+ // ensure the json data is a string
129
+ if (data['rent_amount'] && !(typeof data['rent_amount'] === 'string' || data['rent_amount'] instanceof String)) {
130
+ throw new Error("Expected the field `rent_amount` to be a primitive type in the JSON string but got " + data['rent_amount']);
131
+ }
132
+ return true;
133
+ }
134
+ }]);
135
+ }();
136
+ EstimatedSOLFeeSlow.RequiredProperties = ["compute_unit_price", "compute_unit_limit", "base_fee"];
137
+
138
+ /**
139
+ * The cost per compute unit. Transactions consume computational resources measured in compute units, and this price helps determine the cost of executing transactions, especially complex ones involving smart contracts.
140
+ * @member {String} compute_unit_price
141
+ */
142
+ EstimatedSOLFeeSlow.prototype['compute_unit_price'] = undefined;
143
+
144
+ /**
145
+ * The maximum number of compute units allowed for a transaction. This limits the resources any single transaction can consume, preventing excessive resource usage that could impact network performance negatively.
146
+ * @member {String} compute_unit_limit
147
+ */
148
+ EstimatedSOLFeeSlow.prototype['compute_unit_limit'] = undefined;
149
+
150
+ /**
151
+ * The fundamental fee required for each transaction. It is charged to prevent spam transactions and network congestion, ensuring that only meaningful transactions consume network resources.
152
+ * @member {String} base_fee
153
+ */
154
+ EstimatedSOLFeeSlow.prototype['base_fee'] = undefined;
155
+
156
+ /**
157
+ * The fee charged as rent for maintaining the state of accounts on the blockchain. This rent ensures accounts are stored on-chain over the long term and that there's sufficient balance to sustain the account state.
158
+ * @member {String} rent_amount
159
+ */
160
+ EstimatedSOLFeeSlow.prototype['rent_amount'] = undefined;
161
+
162
+ // Implement SOLComputeUnit interface:
163
+ /**
164
+ * The cost per compute unit. Transactions consume computational resources measured in compute units, and this price helps determine the cost of executing transactions, especially complex ones involving smart contracts.
165
+ * @member {String} compute_unit_price
166
+ */
167
+ _SOLComputeUnit["default"].prototype['compute_unit_price'] = undefined;
168
+ /**
169
+ * The maximum number of compute units allowed for a transaction. This limits the resources any single transaction can consume, preventing excessive resource usage that could impact network performance negatively.
170
+ * @member {String} compute_unit_limit
171
+ */
172
+ _SOLComputeUnit["default"].prototype['compute_unit_limit'] = undefined;
173
+ // Implement SOLBase interface:
174
+ /**
175
+ * The fundamental fee required for each transaction. It is charged to prevent spam transactions and network congestion, ensuring that only meaningful transactions consume network resources.
176
+ * @member {String} base_fee
177
+ */
178
+ _SOLBase["default"].prototype['base_fee'] = undefined;
179
+ /**
180
+ * The fee charged as rent for maintaining the state of accounts on the blockchain. This rent ensures accounts are stored on-chain over the long term and that there's sufficient balance to sustain the account state.
181
+ * @member {String} rent_amount
182
+ */
183
+ _SOLBase["default"].prototype['rent_amount'] = undefined;
184
+ var _default = exports["default"] = EstimatedSOLFeeSlow;
@@ -97,25 +97,25 @@ var ExchangePermissionToken201Response = /*#__PURE__*/function () {
97
97
  }]);
98
98
  }();
99
99
  /**
100
- * The new Permission Access Token.
100
+ * The Access Token.
101
101
  * @member {String} access_token
102
102
  */
103
103
  ExchangePermissionToken201Response.prototype['access_token'] = undefined;
104
104
 
105
105
  /**
106
- * The type of the tokens, which is Bearer.
106
+ * The token type. This is always `Bearer`.
107
107
  * @member {String} token_type
108
108
  */
109
109
  ExchangePermissionToken201Response.prototype['token_type'] = undefined;
110
110
 
111
111
  /**
112
- * The time in seconds in which the new Permission Access Token expires.
112
+ * The time in seconds until the Access Token expires. This is always `3600`, indicating the token expires 1 hour after issuance.
113
113
  * @member {Number} expires_in
114
114
  */
115
115
  ExchangePermissionToken201Response.prototype['expires_in'] = undefined;
116
116
 
117
117
  /**
118
- * The Refresh Token, used to obtain another Org Access Token when the new Permission Access Token expires. The expiration time for Refresh Tokens is currently set to 7 days and is subject to change.
118
+ * The Refresh Token. Use it to obtain a new Access Token when the current one expires. The Refresh Token is valid for 7 days.
119
119
  * @member {String} refresh_token
120
120
  */
121
121
  ExchangePermissionToken201Response.prototype['refresh_token'] = undefined;
@@ -32,7 +32,7 @@ var ExchangePermissionTokenRequest = /*#__PURE__*/function () {
32
32
  /**
33
33
  * Constructs a new <code>ExchangePermissionTokenRequest</code>.
34
34
  * @alias module:model/ExchangePermissionTokenRequest
35
- * @param permission_type {String} The OAuth permission type. Set the value as `payment_orders_payin`.
35
+ * @param permission_type {String} Set the value to `payment_orders_payin`.
36
36
  */
37
37
  function ExchangePermissionTokenRequest(permission_type) {
38
38
  _classCallCheck(this, ExchangePermissionTokenRequest);
@@ -103,7 +103,7 @@ var ExchangePermissionTokenRequest = /*#__PURE__*/function () {
103
103
  ExchangePermissionTokenRequest.RequiredProperties = ["permission_type"];
104
104
 
105
105
  /**
106
- * The OAuth permission type. Set the value as `payment_orders_payin`.
106
+ * Set the value to `payment_orders_payin`.
107
107
  * @member {String} permission_type
108
108
  */
109
109
  ExchangePermissionTokenRequest.prototype['permission_type'] = undefined;
@@ -0,0 +1,88 @@
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
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ 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); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ 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); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ 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); } /**
15
+ * Cobo Wallet as a Service 2.0
16
+ *
17
+ * Contact: help@cobo.com
18
+ *
19
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20
+ * https://openapi-generator.tech
21
+ * Do not edit the class manually.
22
+ *
23
+ */
24
+ /**
25
+ * The FILBase model module.
26
+ * @module model/FILBase
27
+ */
28
+ var FILBase = /*#__PURE__*/function () {
29
+ /**
30
+ * Constructs a new <code>FILBase</code>.
31
+ * The transaction gas base based on the FIL fee model.
32
+ * @alias module:model/FILBase
33
+ */
34
+ function FILBase() {
35
+ _classCallCheck(this, FILBase);
36
+ FILBase.initialize(this);
37
+ }
38
+
39
+ /**
40
+ * Initializes the fields of this object.
41
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
42
+ * Only for internal use.
43
+ */
44
+ return _createClass(FILBase, null, [{
45
+ key: "initialize",
46
+ value: function initialize(obj) {}
47
+
48
+ /**
49
+ * Constructs a <code>FILBase</code> from a plain JavaScript object, optionally creating a new instance.
50
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
51
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
52
+ * @param {module:model/FILBase} obj Optional instance to populate.
53
+ * @return {module:model/FILBase} The populated <code>FILBase</code> instance.
54
+ */
55
+ }, {
56
+ key: "constructFromObject",
57
+ value: function constructFromObject(data, obj) {
58
+ if (data) {
59
+ obj = obj || new FILBase();
60
+ if (data.hasOwnProperty('gas_base')) {
61
+ obj['gas_base'] = _ApiClient["default"].convertToType(data['gas_base'], 'String');
62
+ }
63
+ }
64
+ return obj;
65
+ }
66
+
67
+ /**
68
+ * Validates the JSON data with respect to <code>FILBase</code>.
69
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
70
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>FILBase</code>.
71
+ */
72
+ }, {
73
+ key: "validateJSON",
74
+ value: function validateJSON(data) {
75
+ // ensure the json data is a string
76
+ if (data['gas_base'] && !(typeof data['gas_base'] === 'string' || data['gas_base'] instanceof String)) {
77
+ throw new Error("Expected the field `gas_base` to be a primitive type in the JSON string but got " + data['gas_base']);
78
+ }
79
+ return true;
80
+ }
81
+ }]);
82
+ }();
83
+ /**
84
+ * This is the minimum fee required to include a transaction in a block. It is determined by the network's congestion level, which adjusts to maintain a target block utilization rate. The base fee is burned, reducing the total supply of Filecoin over time.
85
+ * @member {String} gas_base
86
+ */
87
+ FILBase.prototype['gas_base'] = undefined;
88
+ var _default = exports["default"] = FILBase;
@@ -0,0 +1,114 @@
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
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ 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); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ 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); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ 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); } /**
15
+ * Cobo Wallet as a Service 2.0
16
+ *
17
+ * Contact: help@cobo.com
18
+ *
19
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20
+ * https://openapi-generator.tech
21
+ * Do not edit the class manually.
22
+ *
23
+ */
24
+ /**
25
+ * The FILPrice model module.
26
+ * @module model/FILPrice
27
+ */
28
+ var FILPrice = /*#__PURE__*/function () {
29
+ /**
30
+ * Constructs a new <code>FILPrice</code>.
31
+ * The transaction gas price based on the FIL fee model.
32
+ * @alias module:model/FILPrice
33
+ */
34
+ function FILPrice() {
35
+ _classCallCheck(this, FILPrice);
36
+ FILPrice.initialize(this);
37
+ }
38
+
39
+ /**
40
+ * Initializes the fields of this object.
41
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
42
+ * Only for internal use.
43
+ */
44
+ return _createClass(FILPrice, null, [{
45
+ key: "initialize",
46
+ value: function initialize(obj) {}
47
+
48
+ /**
49
+ * Constructs a <code>FILPrice</code> from a plain JavaScript object, optionally creating a new instance.
50
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
51
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
52
+ * @param {module:model/FILPrice} obj Optional instance to populate.
53
+ * @return {module:model/FILPrice} The populated <code>FILPrice</code> instance.
54
+ */
55
+ }, {
56
+ key: "constructFromObject",
57
+ value: function constructFromObject(data, obj) {
58
+ if (data) {
59
+ obj = obj || new FILPrice();
60
+ if (data.hasOwnProperty('gas_premium')) {
61
+ obj['gas_premium'] = _ApiClient["default"].convertToType(data['gas_premium'], 'String');
62
+ }
63
+ if (data.hasOwnProperty('gas_fee_cap')) {
64
+ obj['gas_fee_cap'] = _ApiClient["default"].convertToType(data['gas_fee_cap'], 'String');
65
+ }
66
+ if (data.hasOwnProperty('gas_limit')) {
67
+ obj['gas_limit'] = _ApiClient["default"].convertToType(data['gas_limit'], 'String');
68
+ }
69
+ }
70
+ return obj;
71
+ }
72
+
73
+ /**
74
+ * Validates the JSON data with respect to <code>FILPrice</code>.
75
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
76
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>FILPrice</code>.
77
+ */
78
+ }, {
79
+ key: "validateJSON",
80
+ value: function validateJSON(data) {
81
+ // ensure the json data is a string
82
+ if (data['gas_premium'] && !(typeof data['gas_premium'] === 'string' || data['gas_premium'] instanceof String)) {
83
+ throw new Error("Expected the field `gas_premium` to be a primitive type in the JSON string but got " + data['gas_premium']);
84
+ }
85
+ // ensure the json data is a string
86
+ if (data['gas_fee_cap'] && !(typeof data['gas_fee_cap'] === 'string' || data['gas_fee_cap'] instanceof String)) {
87
+ throw new Error("Expected the field `gas_fee_cap` to be a primitive type in the JSON string but got " + data['gas_fee_cap']);
88
+ }
89
+ // ensure the json data is a string
90
+ if (data['gas_limit'] && !(typeof data['gas_limit'] === 'string' || data['gas_limit'] instanceof String)) {
91
+ throw new Error("Expected the field `gas_limit` to be a primitive type in the JSON string but got " + data['gas_limit']);
92
+ }
93
+ return true;
94
+ }
95
+ }]);
96
+ }();
97
+ /**
98
+ * An optional additional fee that users can include to prioritize their transactions over others. It acts like a tip to incentivize miners to select and include your transaction over transactions with only the base fee.
99
+ * @member {String} gas_premium
100
+ */
101
+ FILPrice.prototype['gas_premium'] = undefined;
102
+
103
+ /**
104
+ * The gas_fee_cap is a user-defined limit on how much they are willing to pay per unit of gas.
105
+ * @member {String} gas_fee_cap
106
+ */
107
+ FILPrice.prototype['gas_fee_cap'] = undefined;
108
+
109
+ /**
110
+ * This defines the maximum amount of computational effort that a transaction is allowed to consume. It's a way to cap the resources that a transaction can use, ensuring it doesn't consume excessive network resources.
111
+ * @member {String} gas_limit
112
+ */
113
+ FILPrice.prototype['gas_limit'] = undefined;
114
+ var _default = exports["default"] = FILPrice;
@@ -50,6 +50,16 @@ var FeeType = exports["default"] = /*#__PURE__*/function () {
50
50
  * @const
51
51
  */
52
52
  _defineProperty(this, "UTXO", "UTXO");
53
+ /**
54
+ * value: "SOL"
55
+ * @const
56
+ */
57
+ _defineProperty(this, "SOL", "SOL");
58
+ /**
59
+ * value: "FIL"
60
+ * @const
61
+ */
62
+ _defineProperty(this, "FIL", "FIL");
53
63
  /**
54
64
  * value: "unknown_default_open_api"
55
65
  * @const
@@ -32,7 +32,7 @@ var GetExchangeRate200Response = /*#__PURE__*/function () {
32
32
  /**
33
33
  * Constructs a new <code>GetExchangeRate200Response</code>.
34
34
  * @alias module:model/GetExchangeRate200Response
35
- * @param token_id {String} The token ID, which identifies the cryptocurrency.
35
+ * @param token_id {String} The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`.
36
36
  * @param currency {String} The fiat currency.
37
37
  * @param rate {String} The current exchange rate between the specified currency pair. Expressed as the amount of fiat currency per one unit of cryptocurrency. For example, if the cryptocurrency is USDT and the fiat currency is USD, a rate of \"0.99\" means 1 USDT = 0.99 USD.
38
38
  */
@@ -121,7 +121,7 @@ var GetExchangeRate200Response = /*#__PURE__*/function () {
121
121
  GetExchangeRate200Response.RequiredProperties = ["token_id", "currency", "rate"];
122
122
 
123
123
  /**
124
- * The token ID, which identifies the cryptocurrency.
124
+ * The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`.
125
125
  * @member {String} token_id
126
126
  */
127
127
  GetExchangeRate200Response.prototype['token_id'] = undefined;
@@ -0,0 +1,135 @@
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 _GraphQLErrorLocationsInner = _interopRequireDefault(require("./GraphQLErrorLocationsInner"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
12
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
13
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
+ * Cobo Wallet as a Service 2.0
20
+ *
21
+ * Contact: help@cobo.com
22
+ *
23
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
+ * https://openapi-generator.tech
25
+ * Do not edit the class manually.
26
+ *
27
+ */
28
+ /**
29
+ * The GraphQLError model module.
30
+ * @module model/GraphQLError
31
+ */
32
+ var GraphQLError = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>GraphQLError</code>.
35
+ * Details of an error in the GraphQL operation.
36
+ * @alias module:model/GraphQLError
37
+ */
38
+ function GraphQLError() {
39
+ _classCallCheck(this, GraphQLError);
40
+ GraphQLError.initialize(this);
41
+ }
42
+
43
+ /**
44
+ * Initializes the fields of this object.
45
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
+ * Only for internal use.
47
+ */
48
+ return _createClass(GraphQLError, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>GraphQLError</code> from a plain JavaScript object, optionally creating a new instance.
54
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
56
+ * @param {module:model/GraphQLError} obj Optional instance to populate.
57
+ * @return {module:model/GraphQLError} The populated <code>GraphQLError</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new GraphQLError();
64
+ if (data.hasOwnProperty('message')) {
65
+ obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String');
66
+ }
67
+ if (data.hasOwnProperty('locations')) {
68
+ obj['locations'] = _ApiClient["default"].convertToType(data['locations'], [_GraphQLErrorLocationsInner["default"]]);
69
+ }
70
+ if (data.hasOwnProperty('path')) {
71
+ obj['path'] = _ApiClient["default"].convertToType(data['path'], ['String']);
72
+ }
73
+ }
74
+ return obj;
75
+ }
76
+
77
+ /**
78
+ * Validates the JSON data with respect to <code>GraphQLError</code>.
79
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
80
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>GraphQLError</code>.
81
+ */
82
+ }, {
83
+ key: "validateJSON",
84
+ value: function validateJSON(data) {
85
+ // ensure the json data is a string
86
+ if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
87
+ throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
88
+ }
89
+ if (data['locations']) {
90
+ // data not null
91
+ // ensure the json data is an array
92
+ if (!Array.isArray(data['locations'])) {
93
+ throw new Error("Expected the field `locations` to be an array in the JSON data but got " + data['locations']);
94
+ }
95
+ // validate the optional field `locations` (array)
96
+ var _iterator = _createForOfIteratorHelper(data['locations']),
97
+ _step;
98
+ try {
99
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
100
+ var item = _step.value;
101
+ _GraphQLErrorLocationsInner["default"].validateJSON(item);
102
+ }
103
+ } catch (err) {
104
+ _iterator.e(err);
105
+ } finally {
106
+ _iterator.f();
107
+ }
108
+ ;
109
+ }
110
+ // ensure the json data is an array
111
+ if (!Array.isArray(data['path'])) {
112
+ throw new Error("Expected the field `path` to be an array in the JSON data but got " + data['path']);
113
+ }
114
+ return true;
115
+ }
116
+ }]);
117
+ }();
118
+ /**
119
+ * The error message.
120
+ * @member {String} message
121
+ */
122
+ GraphQLError.prototype['message'] = undefined;
123
+
124
+ /**
125
+ * The locations in the query where the error occurred.
126
+ * @member {Array.<module:model/GraphQLErrorLocationsInner>} locations
127
+ */
128
+ GraphQLError.prototype['locations'] = undefined;
129
+
130
+ /**
131
+ * The path in the response where the error occurred.
132
+ * @member {Array.<String>} path
133
+ */
134
+ GraphQLError.prototype['path'] = undefined;
135
+ var _default = exports["default"] = GraphQLError;