@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
@@ -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;
@@ -0,0 +1,92 @@
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 GraphQLErrorLocationsInner model module.
26
+ * @module model/GraphQLErrorLocationsInner
27
+ */
28
+ var GraphQLErrorLocationsInner = /*#__PURE__*/function () {
29
+ /**
30
+ * Constructs a new <code>GraphQLErrorLocationsInner</code>.
31
+ * @alias module:model/GraphQLErrorLocationsInner
32
+ */
33
+ function GraphQLErrorLocationsInner() {
34
+ _classCallCheck(this, GraphQLErrorLocationsInner);
35
+ GraphQLErrorLocationsInner.initialize(this);
36
+ }
37
+
38
+ /**
39
+ * Initializes the fields of this object.
40
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
41
+ * Only for internal use.
42
+ */
43
+ return _createClass(GraphQLErrorLocationsInner, null, [{
44
+ key: "initialize",
45
+ value: function initialize(obj) {}
46
+
47
+ /**
48
+ * Constructs a <code>GraphQLErrorLocationsInner</code> from a plain JavaScript object, optionally creating a new instance.
49
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
50
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
51
+ * @param {module:model/GraphQLErrorLocationsInner} obj Optional instance to populate.
52
+ * @return {module:model/GraphQLErrorLocationsInner} The populated <code>GraphQLErrorLocationsInner</code> instance.
53
+ */
54
+ }, {
55
+ key: "constructFromObject",
56
+ value: function constructFromObject(data, obj) {
57
+ if (data) {
58
+ obj = obj || new GraphQLErrorLocationsInner();
59
+ if (data.hasOwnProperty('line')) {
60
+ obj['line'] = _ApiClient["default"].convertToType(data['line'], 'Number');
61
+ }
62
+ if (data.hasOwnProperty('column')) {
63
+ obj['column'] = _ApiClient["default"].convertToType(data['column'], 'Number');
64
+ }
65
+ }
66
+ return obj;
67
+ }
68
+
69
+ /**
70
+ * Validates the JSON data with respect to <code>GraphQLErrorLocationsInner</code>.
71
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
72
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>GraphQLErrorLocationsInner</code>.
73
+ */
74
+ }, {
75
+ key: "validateJSON",
76
+ value: function validateJSON(data) {
77
+ return true;
78
+ }
79
+ }]);
80
+ }();
81
+ /**
82
+ * The line number in the query where the error occurred.
83
+ * @member {Number} line
84
+ */
85
+ GraphQLErrorLocationsInner.prototype['line'] = undefined;
86
+
87
+ /**
88
+ * The column number in the query where the error occurred.
89
+ * @member {Number} column
90
+ */
91
+ GraphQLErrorLocationsInner.prototype['column'] = undefined;
92
+ var _default = exports["default"] = GraphQLErrorLocationsInner;
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
- var _TransactionDestinationType = _interopRequireDefault(require("./TransactionDestinationType"));
9
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
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); }
11
10
  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; } } }; }
@@ -26,20 +25,19 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
25
  *
27
26
  */
28
27
  /**
29
- * The TransactionMessageSignBTCEIP191Destination model module.
30
- * @module model/TransactionMessageSignBTCEIP191Destination
28
+ * The GraphQLRequest model module.
29
+ * @module model/GraphQLRequest
31
30
  */
32
- var TransactionMessageSignBTCEIP191Destination = /*#__PURE__*/function () {
31
+ var GraphQLRequest = /*#__PURE__*/function () {
33
32
  /**
34
- * Constructs a new <code>TransactionMessageSignBTCEIP191Destination</code>.
35
- * The information about the destination &#x60;BTC_EIP_191_Signature&#x60;. Refer to [Transaction sources and destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. Switch between the tabs to display the properties for different transaction destinations.
36
- * @alias module:model/TransactionMessageSignBTCEIP191Destination
37
- * @param destination_type {module:model/TransactionDestinationType}
38
- * @param message {String} The raw data of the message to be signed, encoded in Base64 format.
33
+ * Constructs a new <code>GraphQLRequest</code>.
34
+ * The request body for a GraphQL query or mutation.
35
+ * @alias module:model/GraphQLRequest
36
+ * @param query {String} The GraphQL query or mutation as a string.
39
37
  */
40
- function TransactionMessageSignBTCEIP191Destination(destination_type, message) {
41
- _classCallCheck(this, TransactionMessageSignBTCEIP191Destination);
42
- TransactionMessageSignBTCEIP191Destination.initialize(this, destination_type, message);
38
+ function GraphQLRequest(query) {
39
+ _classCallCheck(this, GraphQLRequest);
40
+ GraphQLRequest.initialize(this, query);
43
41
  }
44
42
 
45
43
  /**
@@ -47,45 +45,49 @@ var TransactionMessageSignBTCEIP191Destination = /*#__PURE__*/function () {
47
45
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
46
  * Only for internal use.
49
47
  */
50
- return _createClass(TransactionMessageSignBTCEIP191Destination, null, [{
48
+ return _createClass(GraphQLRequest, null, [{
51
49
  key: "initialize",
52
- value: function initialize(obj, destination_type, message) {
53
- obj['destination_type'] = destination_type;
54
- obj['message'] = message;
50
+ value: function initialize(obj, query) {
51
+ obj['query'] = query;
55
52
  }
56
53
 
57
54
  /**
58
- * Constructs a <code>TransactionMessageSignBTCEIP191Destination</code> from a plain JavaScript object, optionally creating a new instance.
55
+ * Constructs a <code>GraphQLRequest</code> from a plain JavaScript object, optionally creating a new instance.
59
56
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
57
  * @param {Object} data The plain JavaScript object bearing properties of interest.
61
- * @param {module:model/TransactionMessageSignBTCEIP191Destination} obj Optional instance to populate.
62
- * @return {module:model/TransactionMessageSignBTCEIP191Destination} The populated <code>TransactionMessageSignBTCEIP191Destination</code> instance.
58
+ * @param {module:model/GraphQLRequest} obj Optional instance to populate.
59
+ * @return {module:model/GraphQLRequest} The populated <code>GraphQLRequest</code> instance.
63
60
  */
64
61
  }, {
65
62
  key: "constructFromObject",
66
63
  value: function constructFromObject(data, obj) {
67
64
  if (data) {
68
- obj = obj || new TransactionMessageSignBTCEIP191Destination();
69
- if (data.hasOwnProperty('destination_type')) {
70
- obj['destination_type'] = _TransactionDestinationType["default"].constructFromObject(data['destination_type']);
65
+ obj = obj || new GraphQLRequest();
66
+ if (data.hasOwnProperty('query')) {
67
+ obj['query'] = _ApiClient["default"].convertToType(data['query'], 'String');
71
68
  }
72
- if (data.hasOwnProperty('message')) {
73
- obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String');
69
+ if (data.hasOwnProperty('variables')) {
70
+ obj['variables'] = _ApiClient["default"].convertToType(data['variables'], {
71
+ 'String': Object
72
+ });
73
+ }
74
+ if (data.hasOwnProperty('operationName')) {
75
+ obj['operationName'] = _ApiClient["default"].convertToType(data['operationName'], 'String');
74
76
  }
75
77
  }
76
78
  return obj;
77
79
  }
78
80
 
79
81
  /**
80
- * Validates the JSON data with respect to <code>TransactionMessageSignBTCEIP191Destination</code>.
82
+ * Validates the JSON data with respect to <code>GraphQLRequest</code>.
81
83
  * @param {Object} data The plain JavaScript object bearing properties of interest.
82
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TransactionMessageSignBTCEIP191Destination</code>.
84
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>GraphQLRequest</code>.
83
85
  */
84
86
  }, {
85
87
  key: "validateJSON",
86
88
  value: function validateJSON(data) {
87
89
  // check to make sure all required properties are present in the JSON string
88
- var _iterator = _createForOfIteratorHelper(TransactionMessageSignBTCEIP191Destination.RequiredProperties),
90
+ var _iterator = _createForOfIteratorHelper(GraphQLRequest.RequiredProperties),
89
91
  _step;
90
92
  try {
91
93
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -100,23 +102,34 @@ var TransactionMessageSignBTCEIP191Destination = /*#__PURE__*/function () {
100
102
  } finally {
101
103
  _iterator.f();
102
104
  }
103
- if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
104
- throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
105
+ if (data['query'] && !(typeof data['query'] === 'string' || data['query'] instanceof String)) {
106
+ throw new Error("Expected the field `query` to be a primitive type in the JSON string but got " + data['query']);
107
+ }
108
+ // ensure the json data is a string
109
+ if (data['operationName'] && !(typeof data['operationName'] === 'string' || data['operationName'] instanceof String)) {
110
+ throw new Error("Expected the field `operationName` to be a primitive type in the JSON string but got " + data['operationName']);
105
111
  }
106
112
  return true;
107
113
  }
108
114
  }]);
109
115
  }();
110
- TransactionMessageSignBTCEIP191Destination.RequiredProperties = ["destination_type", "message"];
116
+ GraphQLRequest.RequiredProperties = ["query"];
117
+
118
+ /**
119
+ * The GraphQL query or mutation as a string.
120
+ * @member {String} query
121
+ */
122
+ GraphQLRequest.prototype['query'] = undefined;
111
123
 
112
124
  /**
113
- * @member {module:model/TransactionDestinationType} destination_type
125
+ * Variables to use in the GraphQL operation. Can include dynamic values required for the query or mutation.
126
+ * @member {Object.<String, Object>} variables
114
127
  */
115
- TransactionMessageSignBTCEIP191Destination.prototype['destination_type'] = undefined;
128
+ GraphQLRequest.prototype['variables'] = undefined;
116
129
 
117
130
  /**
118
- * The raw data of the message to be signed, encoded in Base64 format.
119
- * @member {String} message
131
+ * The operation name in case of multiple operations in the same query or mutation.
132
+ * @member {String} operationName
120
133
  */
121
- TransactionMessageSignBTCEIP191Destination.prototype['message'] = undefined;
122
- var _default = exports["default"] = TransactionMessageSignBTCEIP191Destination;
134
+ GraphQLRequest.prototype['operationName'] = undefined;
135
+ var _default = exports["default"] = GraphQLRequest;
@@ -0,0 +1,119 @@
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 _GraphQLError = _interopRequireDefault(require("./GraphQLError"));
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 GraphQLResponse model module.
30
+ * @module model/GraphQLResponse
31
+ */
32
+ var GraphQLResponse = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>GraphQLResponse</code>.
35
+ * @alias module:model/GraphQLResponse
36
+ */
37
+ function GraphQLResponse() {
38
+ _classCallCheck(this, GraphQLResponse);
39
+ GraphQLResponse.initialize(this);
40
+ }
41
+
42
+ /**
43
+ * Initializes the fields of this object.
44
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
45
+ * Only for internal use.
46
+ */
47
+ return _createClass(GraphQLResponse, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj) {}
50
+
51
+ /**
52
+ * Constructs a <code>GraphQLResponse</code> from a plain JavaScript object, optionally creating a new instance.
53
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
54
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
55
+ * @param {module:model/GraphQLResponse} obj Optional instance to populate.
56
+ * @return {module:model/GraphQLResponse} The populated <code>GraphQLResponse</code> instance.
57
+ */
58
+ }, {
59
+ key: "constructFromObject",
60
+ value: function constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new GraphQLResponse();
63
+ if (data.hasOwnProperty('data')) {
64
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], {
65
+ 'String': Object
66
+ });
67
+ }
68
+ if (data.hasOwnProperty('errors')) {
69
+ obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_GraphQLError["default"]]);
70
+ }
71
+ }
72
+ return obj;
73
+ }
74
+
75
+ /**
76
+ * Validates the JSON data with respect to <code>GraphQLResponse</code>.
77
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
78
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>GraphQLResponse</code>.
79
+ */
80
+ }, {
81
+ key: "validateJSON",
82
+ value: function validateJSON(data) {
83
+ if (data['errors']) {
84
+ // data not null
85
+ // ensure the json data is an array
86
+ if (!Array.isArray(data['errors'])) {
87
+ throw new Error("Expected the field `errors` to be an array in the JSON data but got " + data['errors']);
88
+ }
89
+ // validate the optional field `errors` (array)
90
+ var _iterator = _createForOfIteratorHelper(data['errors']),
91
+ _step;
92
+ try {
93
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
94
+ var item = _step.value;
95
+ _GraphQLError["default"].validateJSON(item);
96
+ }
97
+ } catch (err) {
98
+ _iterator.e(err);
99
+ } finally {
100
+ _iterator.f();
101
+ }
102
+ ;
103
+ }
104
+ return true;
105
+ }
106
+ }]);
107
+ }();
108
+ /**
109
+ * The response data for the GraphQL operation.
110
+ * @member {Object.<String, Object>} data
111
+ */
112
+ GraphQLResponse.prototype['data'] = undefined;
113
+
114
+ /**
115
+ * Any errors that occurred during the GraphQL operation.
116
+ * @member {Array.<module:model/GraphQLError>} errors
117
+ */
118
+ GraphQLResponse.prototype['errors'] = undefined;
119
+ var _default = exports["default"] = GraphQLResponse;
@@ -0,0 +1,123 @@
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 _ListTopUpPayers200ResponseDataInner = _interopRequireDefault(require("./ListTopUpPayers200ResponseDataInner"));
9
+ var _Pagination = _interopRequireDefault(require("./Pagination"));
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 ListTopUpPayers200Response model module.
31
+ * @module model/ListTopUpPayers200Response
32
+ */
33
+ var ListTopUpPayers200Response = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>ListTopUpPayers200Response</code>.
36
+ * @alias module:model/ListTopUpPayers200Response
37
+ */
38
+ function ListTopUpPayers200Response() {
39
+ _classCallCheck(this, ListTopUpPayers200Response);
40
+ ListTopUpPayers200Response.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(ListTopUpPayers200Response, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>ListTopUpPayers200Response</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/ListTopUpPayers200Response} obj Optional instance to populate.
57
+ * @return {module:model/ListTopUpPayers200Response} The populated <code>ListTopUpPayers200Response</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new ListTopUpPayers200Response();
64
+ if (data.hasOwnProperty('data')) {
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_ListTopUpPayers200ResponseDataInner["default"]]);
66
+ }
67
+ if (data.hasOwnProperty('pagination')) {
68
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>ListTopUpPayers200Response</code>.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListTopUpPayers200Response</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ if (data['data']) {
83
+ // data not null
84
+ // ensure the json data is an array
85
+ if (!Array.isArray(data['data'])) {
86
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
87
+ }
88
+ // validate the optional field `data` (array)
89
+ var _iterator = _createForOfIteratorHelper(data['data']),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var item = _step.value;
94
+ _ListTopUpPayers200ResponseDataInner["default"].validateJSON(item);
95
+ }
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ ;
102
+ }
103
+ // validate the optional field `pagination`
104
+ if (data['pagination']) {
105
+ // data not null
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
109
+ }
110
+ return true;
111
+ }
112
+ }]);
113
+ }();
114
+ /**
115
+ * @member {Array.<module:model/ListTopUpPayers200ResponseDataInner>} data
116
+ */
117
+ ListTopUpPayers200Response.prototype['data'] = undefined;
118
+
119
+ /**
120
+ * @member {module:model/Pagination} pagination
121
+ */
122
+ ListTopUpPayers200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = ListTopUpPayers200Response;