@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,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;