@cobo/cobo-waas2 1.15.0 → 1.17.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 (140) hide show
  1. package/README.md +42 -6
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/PreRequestScript.js +27 -33
  4. package/dist/api/AddressBooksApi.js +4 -4
  5. package/dist/api/AppWorkflowsApi.js +275 -0
  6. package/dist/api/DevelopersApi.js +4 -4
  7. package/dist/api/DevelopersWebhooksApi.js +12 -12
  8. package/dist/api/FeeStationApi.js +12 -12
  9. package/dist/api/OAuthApi.js +93 -6
  10. package/dist/api/PaymentApi.js +107 -161
  11. package/dist/api/StakingsApi.js +28 -28
  12. package/dist/api/TransactionsApi.js +4 -4
  13. package/dist/api/WalletsApi.js +102 -51
  14. package/dist/api/WalletsExchangeWalletApi.js +8 -8
  15. package/dist/api/WalletsMPCWalletsApi.js +20 -20
  16. package/dist/index.js +224 -14
  17. package/dist/model/AppWorkflow.js +173 -0
  18. package/dist/model/AppWorkflowField.js +137 -0
  19. package/dist/model/AppWorkflowPolicy.js +144 -0
  20. package/dist/model/ApprovalEntry.js +148 -0
  21. package/dist/model/ApprovalRequest.js +180 -0
  22. package/dist/model/ApprovalRequestDetail.js +177 -0
  23. package/dist/model/ApprovalStatus.js +71 -0
  24. package/dist/model/ApprovalUser.js +146 -0
  25. package/dist/model/BabylonStakeExtra.js +16 -0
  26. package/dist/model/BatchCheckUtxo201Response.js +107 -0
  27. package/dist/model/BatchCheckUtxoRequest.js +142 -0
  28. package/dist/model/{CreateBankAccountRequest.js → BatchUTXOParam.js} +43 -28
  29. package/dist/model/ChainInfo.js +9 -0
  30. package/dist/model/CreateApprovalRequest201Response.js +110 -0
  31. package/dist/model/CreatePaymentOrderRequest.js +5 -5
  32. package/dist/model/CreateRefundRequest.js +35 -0
  33. package/dist/model/CreateSettlement.js +39 -29
  34. package/dist/model/CreateStakeActivityExtra.js +6 -0
  35. package/dist/model/CryptoAddress.js +171 -0
  36. package/dist/model/{OrderAddressInfo.js → CustodialTransferDestination.js} +36 -46
  37. package/dist/model/CustodialWeb3TransferSource.js +1 -1
  38. package/dist/model/EstimateContractCallFeeParams.js +13 -0
  39. package/dist/model/EstimateFeeParams.js +6 -0
  40. package/dist/model/EstimateTransferFeeParams.js +13 -0
  41. package/dist/model/ExchangePermissionToken201Response.js +122 -0
  42. package/dist/model/ExchangePermissionTokenRequest.js +110 -0
  43. package/dist/model/ListApprovalRequests200Response.js +123 -0
  44. package/dist/model/MpcTransferSource.js +1 -1
  45. package/dist/model/Order.js +4 -4
  46. package/dist/model/PaymentOrderEventData.js +6 -6
  47. package/dist/model/PayoutChannel.js +61 -0
  48. package/dist/model/PolicyAction.js +123 -0
  49. package/dist/model/PolicyActionContent.js +169 -0
  50. package/dist/model/PolicyActionType.js +66 -0
  51. package/dist/model/PolicyCondition.js +148 -0
  52. package/dist/model/PolicyFieldOperator.js +76 -0
  53. package/dist/model/PolicyFieldValueType.js +61 -0
  54. package/dist/model/RefreshPermissionTokenRequest.js +110 -0
  55. package/dist/model/RequestApproval.js +188 -0
  56. package/dist/model/RevokeApprovalRequest201Response.js +119 -0
  57. package/dist/model/RevokeApprovalRequestRequest.js +110 -0
  58. package/dist/model/SettlementDetail.js +22 -0
  59. package/dist/model/SupportedToken.js +222 -0
  60. package/dist/model/SwapActivityApprovers.js +122 -0
  61. package/dist/model/SwapActivityDetail.js +30 -0
  62. package/dist/model/SwapApproversStatus.js +66 -0
  63. package/dist/model/TransactionCoboCategory.js +102 -7
  64. package/dist/model/TransactionDestination.js +4 -0
  65. package/dist/model/TransactionDestinationType.js +5 -0
  66. package/dist/model/TransactionRbfSource.js +1 -1
  67. package/dist/model/TransactionSubStatus.js +10 -0
  68. package/dist/model/TransactionTransferToWalletDestination.js +2 -2
  69. package/dist/model/TransferDestination.js +42 -14
  70. package/dist/model/TransferDestinationType.js +5 -0
  71. package/dist/model/UTXO.js +9 -0
  72. package/docs/AddressBooksApi.md +2 -2
  73. package/docs/AppWorkflow.md +12 -0
  74. package/docs/AppWorkflowField.md +11 -0
  75. package/docs/AppWorkflowPolicy.md +10 -0
  76. package/docs/AppWorkflowsApi.md +273 -0
  77. package/docs/ApprovalEntry.md +11 -0
  78. package/docs/ApprovalRequest.md +13 -0
  79. package/docs/ApprovalRequestDetail.md +13 -0
  80. package/docs/ApprovalStatus.md +16 -0
  81. package/docs/ApprovalUser.md +12 -0
  82. package/docs/BabylonStakeExtra.md +1 -0
  83. package/docs/BatchCheckUtxo201Response.md +9 -0
  84. package/docs/BatchCheckUtxoRequest.md +10 -0
  85. package/docs/BatchUTXOParam.md +10 -0
  86. package/docs/ChainInfo.md +1 -0
  87. package/docs/CreateApprovalRequest201Response.md +9 -0
  88. package/docs/CreatePaymentOrderRequest.md +1 -1
  89. package/docs/CreateRefundRequest.md +3 -0
  90. package/docs/CreateSettlement.md +5 -2
  91. package/docs/CreateStakeActivityExtra.md +1 -0
  92. package/docs/CryptoAddress.md +14 -0
  93. package/docs/CustodialTransferDestination.md +11 -0
  94. package/docs/CustodialWeb3TransferSource.md +1 -1
  95. package/docs/DevelopersApi.md +2 -2
  96. package/docs/DevelopersWebhooksApi.md +6 -6
  97. package/docs/EstimateContractCallFeeParams.md +1 -0
  98. package/docs/EstimateFeeParams.md +1 -0
  99. package/docs/EstimateTransferFeeParams.md +1 -0
  100. package/docs/ExchangePermissionToken201Response.md +12 -0
  101. package/docs/ExchangePermissionTokenRequest.md +9 -0
  102. package/docs/FeeStationApi.md +6 -6
  103. package/docs/ListApprovalRequests200Response.md +10 -0
  104. package/docs/MpcTransferSource.md +1 -1
  105. package/docs/OAuthApi.md +102 -0
  106. package/docs/Order.md +2 -2
  107. package/docs/PaymentApi.md +86 -147
  108. package/docs/PaymentOrderEventData.md +2 -2
  109. package/docs/PayoutChannel.md +12 -0
  110. package/docs/PolicyAction.md +10 -0
  111. package/docs/PolicyActionContent.md +25 -0
  112. package/docs/PolicyActionType.md +14 -0
  113. package/docs/PolicyCondition.md +12 -0
  114. package/docs/PolicyFieldOperator.md +18 -0
  115. package/docs/PolicyFieldValueType.md +12 -0
  116. package/docs/RefreshPermissionTokenRequest.md +9 -0
  117. package/docs/RequestApproval.md +13 -0
  118. package/docs/RevokeApprovalRequest201Response.md +10 -0
  119. package/docs/RevokeApprovalRequestRequest.md +9 -0
  120. package/docs/SettlementDetail.md +2 -0
  121. package/docs/StakingsApi.md +14 -14
  122. package/docs/SupportedToken.md +17 -0
  123. package/docs/SwapActivityApprovers.md +10 -0
  124. package/docs/SwapActivityDetail.md +1 -0
  125. package/docs/SwapApproversStatus.md +14 -0
  126. package/docs/TransactionCoboCategory.md +41 -3
  127. package/docs/TransactionDestinationType.md +2 -0
  128. package/docs/TransactionRbfSource.md +1 -1
  129. package/docs/TransactionSubStatus.md +4 -0
  130. package/docs/TransactionTransferToWalletDestination.md +1 -1
  131. package/docs/TransactionsApi.md +2 -2
  132. package/docs/TransferDestination.md +1 -1
  133. package/docs/TransferDestinationType.md +2 -0
  134. package/docs/UTXO.md +1 -0
  135. package/docs/WalletsApi.md +78 -23
  136. package/docs/WalletsExchangeWalletApi.md +4 -4
  137. package/docs/WalletsMPCWalletsApi.md +10 -10
  138. package/package.json +1 -1
  139. package/docs/CreateBankAccountRequest.md +0 -9
  140. package/docs/OrderAddressInfo.md +0 -12
@@ -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 _ApprovalStatus = _interopRequireDefault(require("./ApprovalStatus"));
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 RevokeApprovalRequest201Response model module.
30
+ * @module model/RevokeApprovalRequest201Response
31
+ */
32
+ var RevokeApprovalRequest201Response = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>RevokeApprovalRequest201Response</code>.
35
+ * @alias module:model/RevokeApprovalRequest201Response
36
+ * @param approval_id {String} The system-generated unique ID of the approval request.
37
+ */
38
+ function RevokeApprovalRequest201Response(approval_id) {
39
+ _classCallCheck(this, RevokeApprovalRequest201Response);
40
+ RevokeApprovalRequest201Response.initialize(this, approval_id);
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(RevokeApprovalRequest201Response, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj, approval_id) {
51
+ obj['approval_id'] = approval_id;
52
+ }
53
+
54
+ /**
55
+ * Constructs a <code>RevokeApprovalRequest201Response</code> from a plain JavaScript object, optionally creating a new instance.
56
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
57
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
58
+ * @param {module:model/RevokeApprovalRequest201Response} obj Optional instance to populate.
59
+ * @return {module:model/RevokeApprovalRequest201Response} The populated <code>RevokeApprovalRequest201Response</code> instance.
60
+ */
61
+ }, {
62
+ key: "constructFromObject",
63
+ value: function constructFromObject(data, obj) {
64
+ if (data) {
65
+ obj = obj || new RevokeApprovalRequest201Response();
66
+ if (data.hasOwnProperty('approval_id')) {
67
+ obj['approval_id'] = _ApiClient["default"].convertToType(data['approval_id'], 'String');
68
+ }
69
+ if (data.hasOwnProperty('status')) {
70
+ obj['status'] = _ApprovalStatus["default"].constructFromObject(data['status']);
71
+ }
72
+ }
73
+ return obj;
74
+ }
75
+
76
+ /**
77
+ * Validates the JSON data with respect to <code>RevokeApprovalRequest201Response</code>.
78
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
79
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>RevokeApprovalRequest201Response</code>.
80
+ */
81
+ }, {
82
+ key: "validateJSON",
83
+ value: function validateJSON(data) {
84
+ // check to make sure all required properties are present in the JSON string
85
+ var _iterator = _createForOfIteratorHelper(RevokeApprovalRequest201Response.RequiredProperties),
86
+ _step;
87
+ try {
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ var property = _step.value;
90
+ if (!data.hasOwnProperty(property)) {
91
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
92
+ }
93
+ }
94
+ // ensure the json data is a string
95
+ } catch (err) {
96
+ _iterator.e(err);
97
+ } finally {
98
+ _iterator.f();
99
+ }
100
+ if (data['approval_id'] && !(typeof data['approval_id'] === 'string' || data['approval_id'] instanceof String)) {
101
+ throw new Error("Expected the field `approval_id` to be a primitive type in the JSON string but got " + data['approval_id']);
102
+ }
103
+ return true;
104
+ }
105
+ }]);
106
+ }();
107
+ RevokeApprovalRequest201Response.RequiredProperties = ["approval_id"];
108
+
109
+ /**
110
+ * The system-generated unique ID of the approval request.
111
+ * @member {String} approval_id
112
+ */
113
+ RevokeApprovalRequest201Response.prototype['approval_id'] = undefined;
114
+
115
+ /**
116
+ * @member {module:model/ApprovalStatus} status
117
+ */
118
+ RevokeApprovalRequest201Response.prototype['status'] = undefined;
119
+ var _default = exports["default"] = RevokeApprovalRequest201Response;
@@ -0,0 +1,110 @@
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 _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; } } }; }
11
+ 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; } }
12
+ 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; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ 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); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ 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); } /**
18
+ * Cobo Wallet as a Service 2.0
19
+ *
20
+ * Contact: help@cobo.com
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * The RevokeApprovalRequestRequest model module.
29
+ * @module model/RevokeApprovalRequestRequest
30
+ */
31
+ var RevokeApprovalRequestRequest = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>RevokeApprovalRequestRequest</code>.
34
+ * @alias module:model/RevokeApprovalRequestRequest
35
+ * @param initiator_email {String} The email of the user who requested the approval.
36
+ */
37
+ function RevokeApprovalRequestRequest(initiator_email) {
38
+ _classCallCheck(this, RevokeApprovalRequestRequest);
39
+ RevokeApprovalRequestRequest.initialize(this, initiator_email);
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(RevokeApprovalRequestRequest, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj, initiator_email) {
50
+ obj['initiator_email'] = initiator_email;
51
+ }
52
+
53
+ /**
54
+ * Constructs a <code>RevokeApprovalRequestRequest</code> from a plain JavaScript object, optionally creating a new instance.
55
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
56
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
57
+ * @param {module:model/RevokeApprovalRequestRequest} obj Optional instance to populate.
58
+ * @return {module:model/RevokeApprovalRequestRequest} The populated <code>RevokeApprovalRequestRequest</code> instance.
59
+ */
60
+ }, {
61
+ key: "constructFromObject",
62
+ value: function constructFromObject(data, obj) {
63
+ if (data) {
64
+ obj = obj || new RevokeApprovalRequestRequest();
65
+ if (data.hasOwnProperty('initiator_email')) {
66
+ obj['initiator_email'] = _ApiClient["default"].convertToType(data['initiator_email'], 'String');
67
+ }
68
+ }
69
+ return obj;
70
+ }
71
+
72
+ /**
73
+ * Validates the JSON data with respect to <code>RevokeApprovalRequestRequest</code>.
74
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
75
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>RevokeApprovalRequestRequest</code>.
76
+ */
77
+ }, {
78
+ key: "validateJSON",
79
+ value: function validateJSON(data) {
80
+ // check to make sure all required properties are present in the JSON string
81
+ var _iterator = _createForOfIteratorHelper(RevokeApprovalRequestRequest.RequiredProperties),
82
+ _step;
83
+ try {
84
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
85
+ var property = _step.value;
86
+ if (!data.hasOwnProperty(property)) {
87
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
88
+ }
89
+ }
90
+ // ensure the json data is a string
91
+ } catch (err) {
92
+ _iterator.e(err);
93
+ } finally {
94
+ _iterator.f();
95
+ }
96
+ if (data['initiator_email'] && !(typeof data['initiator_email'] === 'string' || data['initiator_email'] instanceof String)) {
97
+ throw new Error("Expected the field `initiator_email` to be a primitive type in the JSON string but got " + data['initiator_email']);
98
+ }
99
+ return true;
100
+ }
101
+ }]);
102
+ }();
103
+ RevokeApprovalRequestRequest.RequiredProperties = ["initiator_email"];
104
+
105
+ /**
106
+ * The email of the user who requested the approval.
107
+ * @member {String} initiator_email
108
+ */
109
+ RevokeApprovalRequestRequest.prototype['initiator_email'] = undefined;
110
+ var _default = exports["default"] = RevokeApprovalRequestRequest;
@@ -7,6 +7,7 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _BankAccount = _interopRequireDefault(require("./BankAccount"));
9
9
  var _PaymentTransaction = _interopRequireDefault(require("./PaymentTransaction"));
10
+ var _PayoutChannel = _interopRequireDefault(require("./PayoutChannel"));
10
11
  var _SettleStatus = _interopRequireDefault(require("./SettleStatus"));
11
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
13
  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); }
@@ -95,6 +96,12 @@ var SettlementDetail = /*#__PURE__*/function () {
95
96
  if (data.hasOwnProperty('updated_timestamp')) {
96
97
  obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
97
98
  }
99
+ if (data.hasOwnProperty('crypto_address_id')) {
100
+ obj['crypto_address_id'] = _ApiClient["default"].convertToType(data['crypto_address_id'], 'String');
101
+ }
102
+ if (data.hasOwnProperty('payout_channel')) {
103
+ obj['payout_channel'] = _PayoutChannel["default"].constructFromObject(data['payout_channel']);
104
+ }
98
105
  }
99
106
  return obj;
100
107
  }
@@ -159,6 +166,10 @@ var SettlementDetail = /*#__PURE__*/function () {
159
166
  }
160
167
  ;
161
168
  }
169
+ // ensure the json data is a string
170
+ if (data['crypto_address_id'] && !(typeof data['crypto_address_id'] === 'string' || data['crypto_address_id'] instanceof String)) {
171
+ throw new Error("Expected the field `crypto_address_id` to be a primitive type in the JSON string but got " + data['crypto_address_id']);
172
+ }
162
173
  return true;
163
174
  }
164
175
  }]);
@@ -226,4 +237,15 @@ SettlementDetail.prototype['created_timestamp'] = undefined;
226
237
  * @member {Number} updated_timestamp
227
238
  */
228
239
  SettlementDetail.prototype['updated_timestamp'] = undefined;
240
+
241
+ /**
242
+ * Unique identifier for the pre-approved crypto address, used to reference the address securely in requests.
243
+ * @member {String} crypto_address_id
244
+ */
245
+ SettlementDetail.prototype['crypto_address_id'] = undefined;
246
+
247
+ /**
248
+ * @member {module:model/PayoutChannel} payout_channel
249
+ */
250
+ SettlementDetail.prototype['payout_channel'] = undefined;
229
251
  var _default = exports["default"] = SettlementDetail;
@@ -0,0 +1,222 @@
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 _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; } } }; }
11
+ 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; } }
12
+ 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; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ 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); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ 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); } /**
18
+ * Cobo Wallet as a Service 2.0
19
+ *
20
+ * Contact: help@cobo.com
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * The SupportedToken model module.
29
+ * @module model/SupportedToken
30
+ */
31
+ var SupportedToken = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>SupportedToken</code>.
34
+ * @alias module:model/SupportedToken
35
+ * @param token_id {String} Unique identifier of the token
36
+ * @param name {String} Full name of the token
37
+ * @param symbol {String} Symbol representation of the token
38
+ * @param decimal {Number} Number of decimal places for the token
39
+ * @param token_address {String} Contract address of the token (may be null for native coins)
40
+ * @param chain_id {String} Identifier of the blockchain where the token exists
41
+ * @param chain_symbol {String} Symbol of the underlying blockchain
42
+ */
43
+ function SupportedToken(token_id, name, symbol, decimal, token_address, chain_id, chain_symbol) {
44
+ _classCallCheck(this, SupportedToken);
45
+ SupportedToken.initialize(this, token_id, name, symbol, decimal, token_address, chain_id, chain_symbol);
46
+ }
47
+
48
+ /**
49
+ * Initializes the fields of this object.
50
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
51
+ * Only for internal use.
52
+ */
53
+ return _createClass(SupportedToken, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, token_id, name, symbol, decimal, token_address, chain_id, chain_symbol) {
56
+ obj['token_id'] = token_id;
57
+ obj['name'] = name;
58
+ obj['symbol'] = symbol;
59
+ obj['decimal'] = decimal;
60
+ obj['token_address'] = token_address;
61
+ obj['chain_id'] = chain_id;
62
+ obj['chain_symbol'] = chain_symbol;
63
+ }
64
+
65
+ /**
66
+ * Constructs a <code>SupportedToken</code> from a plain JavaScript object, optionally creating a new instance.
67
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
68
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
69
+ * @param {module:model/SupportedToken} obj Optional instance to populate.
70
+ * @return {module:model/SupportedToken} The populated <code>SupportedToken</code> instance.
71
+ */
72
+ }, {
73
+ key: "constructFromObject",
74
+ value: function constructFromObject(data, obj) {
75
+ if (data) {
76
+ obj = obj || new SupportedToken();
77
+ if (data.hasOwnProperty('token_id')) {
78
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
79
+ }
80
+ if (data.hasOwnProperty('name')) {
81
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('symbol')) {
84
+ obj['symbol'] = _ApiClient["default"].convertToType(data['symbol'], 'String');
85
+ }
86
+ if (data.hasOwnProperty('decimal')) {
87
+ obj['decimal'] = _ApiClient["default"].convertToType(data['decimal'], 'Number');
88
+ }
89
+ if (data.hasOwnProperty('token_address')) {
90
+ obj['token_address'] = _ApiClient["default"].convertToType(data['token_address'], 'String');
91
+ }
92
+ if (data.hasOwnProperty('chain_id')) {
93
+ obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
94
+ }
95
+ if (data.hasOwnProperty('chain_symbol')) {
96
+ obj['chain_symbol'] = _ApiClient["default"].convertToType(data['chain_symbol'], 'String');
97
+ }
98
+ if (data.hasOwnProperty('chain_icon_url')) {
99
+ obj['chain_icon_url'] = _ApiClient["default"].convertToType(data['chain_icon_url'], 'String');
100
+ }
101
+ if (data.hasOwnProperty('token_icon_url')) {
102
+ obj['token_icon_url'] = _ApiClient["default"].convertToType(data['token_icon_url'], 'String');
103
+ }
104
+ }
105
+ return obj;
106
+ }
107
+
108
+ /**
109
+ * Validates the JSON data with respect to <code>SupportedToken</code>.
110
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
111
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SupportedToken</code>.
112
+ */
113
+ }, {
114
+ key: "validateJSON",
115
+ value: function validateJSON(data) {
116
+ // check to make sure all required properties are present in the JSON string
117
+ var _iterator = _createForOfIteratorHelper(SupportedToken.RequiredProperties),
118
+ _step;
119
+ try {
120
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
121
+ var property = _step.value;
122
+ if (!data.hasOwnProperty(property)) {
123
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
124
+ }
125
+ }
126
+ // ensure the json data is a string
127
+ } catch (err) {
128
+ _iterator.e(err);
129
+ } finally {
130
+ _iterator.f();
131
+ }
132
+ if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
133
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
134
+ }
135
+ // ensure the json data is a string
136
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
137
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
138
+ }
139
+ // ensure the json data is a string
140
+ if (data['symbol'] && !(typeof data['symbol'] === 'string' || data['symbol'] instanceof String)) {
141
+ throw new Error("Expected the field `symbol` to be a primitive type in the JSON string but got " + data['symbol']);
142
+ }
143
+ // ensure the json data is a string
144
+ if (data['token_address'] && !(typeof data['token_address'] === 'string' || data['token_address'] instanceof String)) {
145
+ throw new Error("Expected the field `token_address` to be a primitive type in the JSON string but got " + data['token_address']);
146
+ }
147
+ // ensure the json data is a string
148
+ if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
149
+ throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
150
+ }
151
+ // ensure the json data is a string
152
+ if (data['chain_symbol'] && !(typeof data['chain_symbol'] === 'string' || data['chain_symbol'] instanceof String)) {
153
+ throw new Error("Expected the field `chain_symbol` to be a primitive type in the JSON string but got " + data['chain_symbol']);
154
+ }
155
+ // ensure the json data is a string
156
+ if (data['chain_icon_url'] && !(typeof data['chain_icon_url'] === 'string' || data['chain_icon_url'] instanceof String)) {
157
+ throw new Error("Expected the field `chain_icon_url` to be a primitive type in the JSON string but got " + data['chain_icon_url']);
158
+ }
159
+ // ensure the json data is a string
160
+ if (data['token_icon_url'] && !(typeof data['token_icon_url'] === 'string' || data['token_icon_url'] instanceof String)) {
161
+ throw new Error("Expected the field `token_icon_url` to be a primitive type in the JSON string but got " + data['token_icon_url']);
162
+ }
163
+ return true;
164
+ }
165
+ }]);
166
+ }();
167
+ SupportedToken.RequiredProperties = ["token_id", "name", "symbol", "decimal", "token_address", "chain_id", "chain_symbol"];
168
+
169
+ /**
170
+ * Unique identifier of the token
171
+ * @member {String} token_id
172
+ */
173
+ SupportedToken.prototype['token_id'] = undefined;
174
+
175
+ /**
176
+ * Full name of the token
177
+ * @member {String} name
178
+ */
179
+ SupportedToken.prototype['name'] = undefined;
180
+
181
+ /**
182
+ * Symbol representation of the token
183
+ * @member {String} symbol
184
+ */
185
+ SupportedToken.prototype['symbol'] = undefined;
186
+
187
+ /**
188
+ * Number of decimal places for the token
189
+ * @member {Number} decimal
190
+ */
191
+ SupportedToken.prototype['decimal'] = undefined;
192
+
193
+ /**
194
+ * Contract address of the token (may be null for native coins)
195
+ * @member {String} token_address
196
+ */
197
+ SupportedToken.prototype['token_address'] = undefined;
198
+
199
+ /**
200
+ * Identifier of the blockchain where the token exists
201
+ * @member {String} chain_id
202
+ */
203
+ SupportedToken.prototype['chain_id'] = undefined;
204
+
205
+ /**
206
+ * Symbol of the underlying blockchain
207
+ * @member {String} chain_symbol
208
+ */
209
+ SupportedToken.prototype['chain_symbol'] = undefined;
210
+
211
+ /**
212
+ * URL to the blockchain's icon image
213
+ * @member {String} chain_icon_url
214
+ */
215
+ SupportedToken.prototype['chain_icon_url'] = undefined;
216
+
217
+ /**
218
+ * URL to the token's icon image
219
+ * @member {String} token_icon_url
220
+ */
221
+ SupportedToken.prototype['token_icon_url'] = undefined;
222
+ var _default = exports["default"] = SupportedToken;
@@ -0,0 +1,122 @@
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 _SwapApproversStatus = _interopRequireDefault(require("./SwapApproversStatus"));
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 SwapActivityApprovers model module.
30
+ * @module model/SwapActivityApprovers
31
+ */
32
+ var SwapActivityApprovers = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>SwapActivityApprovers</code>.
35
+ * The approvers data for swap activity.
36
+ * @alias module:model/SwapActivityApprovers
37
+ * @param name {String} The approver name of the swap activity.
38
+ * @param status {module:model/SwapApproversStatus}
39
+ */
40
+ function SwapActivityApprovers(name, status) {
41
+ _classCallCheck(this, SwapActivityApprovers);
42
+ SwapActivityApprovers.initialize(this, name, status);
43
+ }
44
+
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+ return _createClass(SwapActivityApprovers, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, name, status) {
53
+ obj['name'] = name;
54
+ obj['status'] = status;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>SwapActivityApprovers</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/SwapActivityApprovers} obj Optional instance to populate.
62
+ * @return {module:model/SwapActivityApprovers} The populated <code>SwapActivityApprovers</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new SwapActivityApprovers();
69
+ if (data.hasOwnProperty('name')) {
70
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
71
+ }
72
+ if (data.hasOwnProperty('status')) {
73
+ obj['status'] = _SwapApproversStatus["default"].constructFromObject(data['status']);
74
+ }
75
+ }
76
+ return obj;
77
+ }
78
+
79
+ /**
80
+ * Validates the JSON data with respect to <code>SwapActivityApprovers</code>.
81
+ * @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>SwapActivityApprovers</code>.
83
+ */
84
+ }, {
85
+ key: "validateJSON",
86
+ value: function validateJSON(data) {
87
+ // check to make sure all required properties are present in the JSON string
88
+ var _iterator = _createForOfIteratorHelper(SwapActivityApprovers.RequiredProperties),
89
+ _step;
90
+ try {
91
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
92
+ var property = _step.value;
93
+ if (!data.hasOwnProperty(property)) {
94
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
95
+ }
96
+ }
97
+ // ensure the json data is a string
98
+ } catch (err) {
99
+ _iterator.e(err);
100
+ } finally {
101
+ _iterator.f();
102
+ }
103
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
104
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
105
+ }
106
+ return true;
107
+ }
108
+ }]);
109
+ }();
110
+ SwapActivityApprovers.RequiredProperties = ["name", "status"];
111
+
112
+ /**
113
+ * The approver name of the swap activity.
114
+ * @member {String} name
115
+ */
116
+ SwapActivityApprovers.prototype['name'] = undefined;
117
+
118
+ /**
119
+ * @member {module:model/SwapApproversStatus} status
120
+ */
121
+ SwapActivityApprovers.prototype['status'] = undefined;
122
+ var _default = exports["default"] = SwapActivityApprovers;