@cobo/cobo-waas2 1.14.0 → 1.16.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 (216) hide show
  1. package/README.md +70 -5
  2. package/dist/ApiClient.js +2 -3
  3. package/dist/PreRequestScript.js +1 -1
  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 +26 -26
  9. package/dist/api/PaymentApi.js +16 -16
  10. package/dist/api/StakingsApi.js +28 -28
  11. package/dist/api/TransactionsApi.js +16 -8
  12. package/dist/api/WalletsApi.js +121 -70
  13. package/dist/api/WalletsExchangeWalletApi.js +8 -8
  14. package/dist/api/WalletsMPCWalletsApi.js +20 -20
  15. package/dist/crypto/ApiSigner.js +1 -2
  16. package/dist/index.js +420 -0
  17. package/dist/model/AddressBook.js +18 -0
  18. package/dist/model/AppWorkflow.js +173 -0
  19. package/dist/model/AppWorkflowField.js +137 -0
  20. package/dist/model/AppWorkflowPolicy.js +144 -0
  21. package/dist/model/ApprovalEntry.js +148 -0
  22. package/dist/model/ApprovalRequest.js +178 -0
  23. package/dist/model/ApprovalRequestDetail.js +176 -0
  24. package/dist/model/ApprovalStatus.js +71 -0
  25. package/dist/model/ApprovalUser.js +146 -0
  26. package/dist/model/BabylonStakeExtra.js +16 -0
  27. package/dist/model/BankAccount.js +18 -0
  28. package/dist/model/BatchCheckUtxo201Response.js +107 -0
  29. package/dist/model/BatchCheckUtxoRequest.js +142 -0
  30. package/dist/model/BatchUTXOParam.js +123 -0
  31. package/dist/model/ChainInfo.js +9 -0
  32. package/dist/model/CreateApprovalRequest201Response.js +109 -0
  33. package/dist/model/CreateSettlement.js +4 -29
  34. package/dist/model/CreateStakeActivityExtra.js +6 -0
  35. package/dist/model/CreateTokenListingRequest201Response.js +2 -2
  36. package/dist/model/CreateTokenListingRequestRequest.js +4 -4
  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/FeeStationTransfer.js +1 -1
  42. package/dist/model/ListApprovalRequests200Response.js +123 -0
  43. package/dist/model/Merchant.js +18 -0
  44. package/dist/model/MpcTransferSource.js +1 -1
  45. package/dist/model/Order.js +49 -0
  46. package/dist/model/PaymentOrderEventData.js +64 -0
  47. package/dist/model/PaymentRefundEventData.js +77 -0
  48. package/dist/model/PaymentSettlementEvent.js +46 -0
  49. package/dist/model/PaymentTransaction.js +13 -0
  50. package/dist/model/PolicyAction.js +123 -0
  51. package/dist/model/PolicyActionContent.js +167 -0
  52. package/dist/model/PolicyActionType.js +66 -0
  53. package/dist/model/PolicyCondition.js +148 -0
  54. package/dist/model/PolicyFieldOperator.js +76 -0
  55. package/dist/model/PolicyFieldValueType.js +61 -0
  56. package/dist/model/Refund.js +53 -0
  57. package/dist/model/RequestApproval.js +188 -0
  58. package/dist/model/RevokeApprovalRequest201Response.js +118 -0
  59. package/dist/model/RevokeApprovalRequestRequest.js +110 -0
  60. package/dist/model/Settlement.js +31 -0
  61. package/dist/model/SettlementDetail.js +57 -0
  62. package/dist/model/SettlementInfo.js +31 -0
  63. package/dist/model/SwapActivity.js +3 -3
  64. package/dist/model/SwapActivityApprovers.js +122 -0
  65. package/dist/model/SwapActivityDetail.js +36 -6
  66. package/dist/model/SwapApproversStatus.js +66 -0
  67. package/dist/model/SwapQuote.js +49 -4
  68. package/dist/model/SwapToken.js +2 -2
  69. package/dist/model/TSSBaseRequestEventData.js +163 -0
  70. package/dist/model/TSSCallbackActionType.js +61 -0
  71. package/dist/model/TSSCallbackRequest.js +122 -0
  72. package/dist/model/TSSCallbackRequestType.js +76 -0
  73. package/dist/model/TSSCallbackResponse.js +118 -0
  74. package/dist/model/TSSCurve.js +61 -0
  75. package/dist/model/TSSCurveType.js +61 -0
  76. package/dist/model/TSSEvent.js +158 -0
  77. package/dist/model/TSSEventData.js +278 -0
  78. package/dist/model/TSSEventDataType.js +71 -0
  79. package/dist/model/TSSEventType.js +136 -0
  80. package/dist/model/TSSGroup.js +221 -0
  81. package/dist/model/TSSGroupType.js +61 -0
  82. package/dist/model/TSSGroups.js +1 -1
  83. package/dist/model/TSSKeyGenEventData.js +228 -0
  84. package/dist/model/TSSKeyGenExtra.js +154 -0
  85. package/dist/model/TSSKeyGenRequest.js +130 -0
  86. package/dist/model/TSSKeyReshareEventData.js +228 -0
  87. package/dist/model/TSSKeyReshareExtra.js +169 -0
  88. package/dist/model/TSSKeyReshareRequest.js +177 -0
  89. package/dist/model/TSSKeyShareSignDetail.js +100 -0
  90. package/dist/model/TSSKeyShareSignEventData.js +228 -0
  91. package/dist/model/TSSKeyShareSignExtra.js +171 -0
  92. package/dist/model/TSSKeyShareSignRequest.js +146 -0
  93. package/dist/model/TSSKeyShareSignSignature.js +126 -0
  94. package/dist/model/TSSKeyShareSignSignatures.js +107 -0
  95. package/dist/model/TSSKeySignEventData.js +228 -0
  96. package/dist/model/TSSKeySignExtra.js +203 -0
  97. package/dist/model/TSSKeySignRequest.js +192 -0
  98. package/dist/model/TSSParticipant.js +113 -0
  99. package/dist/model/TSSProtocol.js +66 -0
  100. package/dist/model/TSSRequestTypeEenum.js +71 -0
  101. package/dist/model/TSSSignature.js +139 -0
  102. package/dist/model/TSSSignatureType.js +66 -0
  103. package/dist/model/TSSSignatures.js +125 -0
  104. package/dist/model/TSSStatus.js +96 -0
  105. package/dist/model/TokenListing.js +10 -10
  106. package/dist/model/TokenListingEventData.js +15 -15
  107. package/dist/model/TransactionCoboCategory.js +102 -7
  108. package/dist/model/TransactionRbfSource.js +1 -1
  109. package/dist/model/TransactionSubStatus.js +35 -0
  110. package/dist/model/UTXO.js +9 -0
  111. package/dist/model/WebhookEventData.js +15 -9
  112. package/docs/AddressBook.md +2 -0
  113. package/docs/AddressBooksApi.md +2 -2
  114. package/docs/AppWorkflow.md +12 -0
  115. package/docs/AppWorkflowField.md +11 -0
  116. package/docs/AppWorkflowPolicy.md +10 -0
  117. package/docs/AppWorkflowsApi.md +273 -0
  118. package/docs/ApprovalEntry.md +11 -0
  119. package/docs/ApprovalRequest.md +13 -0
  120. package/docs/ApprovalRequestDetail.md +13 -0
  121. package/docs/ApprovalStatus.md +16 -0
  122. package/docs/ApprovalUser.md +12 -0
  123. package/docs/BabylonStakeExtra.md +1 -0
  124. package/docs/BankAccount.md +2 -0
  125. package/docs/BatchCheckUtxo201Response.md +9 -0
  126. package/docs/BatchCheckUtxoRequest.md +10 -0
  127. package/docs/BatchUTXOParam.md +10 -0
  128. package/docs/ChainInfo.md +1 -0
  129. package/docs/CreateApprovalRequest201Response.md +9 -0
  130. package/docs/CreateSettlement.md +2 -2
  131. package/docs/CreateStakeActivityExtra.md +1 -0
  132. package/docs/CreateTokenListingRequest201Response.md +1 -1
  133. package/docs/CreateTokenListingRequestRequest.md +2 -2
  134. package/docs/CustodialWeb3TransferSource.md +1 -1
  135. package/docs/DevelopersApi.md +2 -2
  136. package/docs/DevelopersWebhooksApi.md +6 -6
  137. package/docs/EstimateContractCallFeeParams.md +1 -0
  138. package/docs/EstimateFeeParams.md +1 -0
  139. package/docs/EstimateTransferFeeParams.md +1 -0
  140. package/docs/FeeStationApi.md +14 -14
  141. package/docs/ListApprovalRequests200Response.md +10 -0
  142. package/docs/Merchant.md +2 -0
  143. package/docs/MpcTransferSource.md +1 -1
  144. package/docs/Order.md +3 -0
  145. package/docs/PaymentApi.md +8 -8
  146. package/docs/PaymentOrderEventData.md +3 -0
  147. package/docs/PaymentRefundEventData.md +5 -0
  148. package/docs/PaymentSettlementEvent.md +3 -0
  149. package/docs/PaymentTransaction.md +1 -0
  150. package/docs/PolicyAction.md +10 -0
  151. package/docs/PolicyActionContent.md +25 -0
  152. package/docs/PolicyActionType.md +14 -0
  153. package/docs/PolicyCondition.md +12 -0
  154. package/docs/PolicyFieldOperator.md +18 -0
  155. package/docs/PolicyFieldValueType.md +12 -0
  156. package/docs/Refund.md +5 -0
  157. package/docs/RequestApproval.md +13 -0
  158. package/docs/RevokeApprovalRequest201Response.md +10 -0
  159. package/docs/RevokeApprovalRequestRequest.md +9 -0
  160. package/docs/Settlement.md +3 -0
  161. package/docs/SettlementDetail.md +5 -0
  162. package/docs/SettlementInfo.md +3 -0
  163. package/docs/StakingsApi.md +14 -14
  164. package/docs/SwapActivity.md +3 -3
  165. package/docs/SwapActivityApprovers.md +10 -0
  166. package/docs/SwapActivityDetail.md +4 -3
  167. package/docs/SwapApproversStatus.md +14 -0
  168. package/docs/SwapQuote.md +3 -0
  169. package/docs/SwapToken.md +2 -2
  170. package/docs/TSSBaseRequestEventData.md +14 -0
  171. package/docs/TSSCallbackActionType.md +12 -0
  172. package/docs/TSSCallbackRequest.md +12 -0
  173. package/docs/TSSCallbackRequestType.md +18 -0
  174. package/docs/TSSCallbackResponse.md +12 -0
  175. package/docs/TSSCurve.md +12 -0
  176. package/docs/TSSCurveType.md +12 -0
  177. package/docs/TSSEvent.md +13 -0
  178. package/docs/TSSEventData.md +16 -0
  179. package/docs/TSSEventDataType.md +16 -0
  180. package/docs/TSSEventType.md +42 -0
  181. package/docs/TSSGroup.md +19 -0
  182. package/docs/TSSGroupType.md +12 -0
  183. package/docs/TSSKeyGenEventData.md +16 -0
  184. package/docs/TSSKeyGenExtra.md +13 -0
  185. package/docs/TSSKeyGenRequest.md +13 -0
  186. package/docs/TSSKeyReshareEventData.md +16 -0
  187. package/docs/TSSKeyReshareExtra.md +14 -0
  188. package/docs/TSSKeyReshareRequest.md +17 -0
  189. package/docs/TSSKeyShareSignDetail.md +10 -0
  190. package/docs/TSSKeyShareSignEventData.md +16 -0
  191. package/docs/TSSKeyShareSignExtra.md +13 -0
  192. package/docs/TSSKeyShareSignRequest.md +12 -0
  193. package/docs/TSSKeyShareSignSignature.md +12 -0
  194. package/docs/TSSKeyShareSignSignatures.md +9 -0
  195. package/docs/TSSKeySignEventData.md +16 -0
  196. package/docs/TSSKeySignExtra.md +15 -0
  197. package/docs/TSSKeySignRequest.md +18 -0
  198. package/docs/TSSParticipant.md +11 -0
  199. package/docs/TSSProtocol.md +14 -0
  200. package/docs/TSSRequestTypeEenum.md +16 -0
  201. package/docs/TSSSignature.md +13 -0
  202. package/docs/TSSSignatureType.md +14 -0
  203. package/docs/TSSSignatures.md +11 -0
  204. package/docs/TSSStatus.md +26 -0
  205. package/docs/TokenListing.md +6 -6
  206. package/docs/TokenListingEventData.md +6 -6
  207. package/docs/TransactionCoboCategory.md +41 -3
  208. package/docs/TransactionRbfSource.md +1 -1
  209. package/docs/TransactionSubStatus.md +14 -0
  210. package/docs/TransactionsApi.md +8 -4
  211. package/docs/UTXO.md +1 -0
  212. package/docs/WalletsApi.md +91 -36
  213. package/docs/WalletsExchangeWalletApi.md +4 -4
  214. package/docs/WalletsMPCWalletsApi.md +10 -10
  215. package/docs/WebhookEventData.md +8 -7
  216. package/package.json +1 -1
@@ -0,0 +1,61 @@
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 _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ 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); } /**
16
+ * Cobo Wallet as a Service 2.0
17
+ *
18
+ * Contact: help@cobo.com
19
+ *
20
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
+ * https://openapi-generator.tech
22
+ * Do not edit the class manually.
23
+ *
24
+ */
25
+ /**
26
+ * Enum class PolicyFieldValueType.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var PolicyFieldValueType = exports["default"] = /*#__PURE__*/function () {
31
+ function PolicyFieldValueType() {
32
+ _classCallCheck(this, PolicyFieldValueType);
33
+ /**
34
+ * value: "INT"
35
+ * @const
36
+ */
37
+ _defineProperty(this, "INT", "INT");
38
+ /**
39
+ * value: "Float2"
40
+ * @const
41
+ */
42
+ _defineProperty(this, "Float2", "Float2");
43
+ /**
44
+ * value: "unknown_default_open_api"
45
+ * @const
46
+ */
47
+ _defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
48
+ }
49
+ return _createClass(PolicyFieldValueType, null, [{
50
+ key: "constructFromObject",
51
+ value:
52
+ /**
53
+ * Returns a <code>PolicyFieldValueType</code> enum value from a Javascript object name.
54
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
55
+ * @return {module:model/PolicyFieldValueType} The enum <code>PolicyFieldValueType</code> value.
56
+ */
57
+ function constructFromObject(object) {
58
+ return object;
59
+ }
60
+ }]);
61
+ }();
@@ -7,6 +7,7 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _PaymentTransaction = _interopRequireDefault(require("./PaymentTransaction"));
9
9
  var _RefundStatus = _interopRequireDefault(require("./RefundStatus"));
10
+ var _RefundType = _interopRequireDefault(require("./RefundType"));
10
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
12
  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
13
  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; } } }; }
@@ -80,6 +81,9 @@ var Refund = /*#__PURE__*/function () {
80
81
  if (data.hasOwnProperty('refund_id')) {
81
82
  obj['refund_id'] = _ApiClient["default"].convertToType(data['refund_id'], 'String');
82
83
  }
84
+ if (data.hasOwnProperty('order_id')) {
85
+ obj['order_id'] = _ApiClient["default"].convertToType(data['order_id'], 'String');
86
+ }
83
87
  if (data.hasOwnProperty('merchant_id')) {
84
88
  obj['merchant_id'] = _ApiClient["default"].convertToType(data['merchant_id'], 'String');
85
89
  }
@@ -98,6 +102,18 @@ var Refund = /*#__PURE__*/function () {
98
102
  if (data.hasOwnProperty('status')) {
99
103
  obj['status'] = _RefundStatus["default"].constructFromObject(data['status']);
100
104
  }
105
+ if (data.hasOwnProperty('refund_type')) {
106
+ obj['refund_type'] = _RefundType["default"].constructFromObject(data['refund_type']);
107
+ }
108
+ if (data.hasOwnProperty('created_timestamp')) {
109
+ obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
110
+ }
111
+ if (data.hasOwnProperty('updated_timestamp')) {
112
+ obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
113
+ }
114
+ if (data.hasOwnProperty('initiator')) {
115
+ obj['initiator'] = _ApiClient["default"].convertToType(data['initiator'], 'String');
116
+ }
101
117
  if (data.hasOwnProperty('transactions')) {
102
118
  obj['transactions'] = _ApiClient["default"].convertToType(data['transactions'], [_PaymentTransaction["default"]]);
103
119
  }
@@ -137,6 +153,10 @@ var Refund = /*#__PURE__*/function () {
137
153
  throw new Error("Expected the field `refund_id` to be a primitive type in the JSON string but got " + data['refund_id']);
138
154
  }
139
155
  // ensure the json data is a string
156
+ if (data['order_id'] && !(typeof data['order_id'] === 'string' || data['order_id'] instanceof String)) {
157
+ throw new Error("Expected the field `order_id` to be a primitive type in the JSON string but got " + data['order_id']);
158
+ }
159
+ // ensure the json data is a string
140
160
  if (data['merchant_id'] && !(typeof data['merchant_id'] === 'string' || data['merchant_id'] instanceof String)) {
141
161
  throw new Error("Expected the field `merchant_id` to be a primitive type in the JSON string but got " + data['merchant_id']);
142
162
  }
@@ -156,6 +176,10 @@ var Refund = /*#__PURE__*/function () {
156
176
  if (data['to_address'] && !(typeof data['to_address'] === 'string' || data['to_address'] instanceof String)) {
157
177
  throw new Error("Expected the field `to_address` to be a primitive type in the JSON string but got " + data['to_address']);
158
178
  }
179
+ // ensure the json data is a string
180
+ if (data['initiator'] && !(typeof data['initiator'] === 'string' || data['initiator'] instanceof String)) {
181
+ throw new Error("Expected the field `initiator` to be a primitive type in the JSON string but got " + data['initiator']);
182
+ }
159
183
  if (data['transactions']) {
160
184
  // data not null
161
185
  // ensure the json data is an array
@@ -195,6 +219,12 @@ Refund.prototype['request_id'] = undefined;
195
219
  */
196
220
  Refund.prototype['refund_id'] = undefined;
197
221
 
222
+ /**
223
+ * The order ID corresponding to this refund.
224
+ * @member {String} order_id
225
+ */
226
+ Refund.prototype['order_id'] = undefined;
227
+
198
228
  /**
199
229
  * The merchant ID.
200
230
  * @member {String} merchant_id
@@ -230,6 +260,29 @@ Refund.prototype['to_address'] = undefined;
230
260
  */
231
261
  Refund.prototype['status'] = undefined;
232
262
 
263
+ /**
264
+ * @member {module:model/RefundType} refund_type
265
+ */
266
+ Refund.prototype['refund_type'] = undefined;
267
+
268
+ /**
269
+ * The created time of the refund order, represented as a UNIX timestamp in seconds.
270
+ * @member {Number} created_timestamp
271
+ */
272
+ Refund.prototype['created_timestamp'] = undefined;
273
+
274
+ /**
275
+ * The updated time of the refund order, represented as a UNIX timestamp in seconds.
276
+ * @member {Number} updated_timestamp
277
+ */
278
+ Refund.prototype['updated_timestamp'] = undefined;
279
+
280
+ /**
281
+ * The initiator of this refund order, usually the user's API key.
282
+ * @member {String} initiator
283
+ */
284
+ Refund.prototype['initiator'] = undefined;
285
+
233
286
  /**
234
287
  * An array of transactions associated with this refund order. Each transaction represents a separate blockchain operation related to the refund process.
235
288
  * @member {Array.<module:model/PaymentTransaction>} transactions
@@ -0,0 +1,188 @@
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 _AppWorkflowField = _interopRequireDefault(require("./AppWorkflowField"));
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 RequestApproval model module.
30
+ * @module model/RequestApproval
31
+ */
32
+ var RequestApproval = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>RequestApproval</code>.
35
+ * The information about a request that approve an operation.
36
+ * @alias module:model/RequestApproval
37
+ * @param operation_id {String} The operation id of workflow approval request.
38
+ * @param request_id {String} The request id of workflow approval request.
39
+ * @param initiator_email {String} The initiator email of workflow approval request.
40
+ * @param fields {Array.<module:model/AppWorkflowField>}
41
+ * @param guard_template {String} The guard template content of workflow approval request, need to connect cobo.
42
+ */
43
+ function RequestApproval(operation_id, request_id, initiator_email, fields, guard_template) {
44
+ _classCallCheck(this, RequestApproval);
45
+ RequestApproval.initialize(this, operation_id, request_id, initiator_email, fields, guard_template);
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(RequestApproval, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, operation_id, request_id, initiator_email, fields, guard_template) {
56
+ obj['operation_id'] = operation_id;
57
+ obj['request_id'] = request_id;
58
+ obj['initiator_email'] = initiator_email;
59
+ obj['fields'] = fields;
60
+ obj['guard_template'] = guard_template;
61
+ }
62
+
63
+ /**
64
+ * Constructs a <code>RequestApproval</code> from a plain JavaScript object, optionally creating a new instance.
65
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
66
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
67
+ * @param {module:model/RequestApproval} obj Optional instance to populate.
68
+ * @return {module:model/RequestApproval} The populated <code>RequestApproval</code> instance.
69
+ */
70
+ }, {
71
+ key: "constructFromObject",
72
+ value: function constructFromObject(data, obj) {
73
+ if (data) {
74
+ obj = obj || new RequestApproval();
75
+ if (data.hasOwnProperty('operation_id')) {
76
+ obj['operation_id'] = _ApiClient["default"].convertToType(data['operation_id'], 'String');
77
+ }
78
+ if (data.hasOwnProperty('request_id')) {
79
+ obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
80
+ }
81
+ if (data.hasOwnProperty('initiator_email')) {
82
+ obj['initiator_email'] = _ApiClient["default"].convertToType(data['initiator_email'], 'String');
83
+ }
84
+ if (data.hasOwnProperty('fields')) {
85
+ obj['fields'] = _ApiClient["default"].convertToType(data['fields'], [_AppWorkflowField["default"]]);
86
+ }
87
+ if (data.hasOwnProperty('guard_template')) {
88
+ obj['guard_template'] = _ApiClient["default"].convertToType(data['guard_template'], 'String');
89
+ }
90
+ }
91
+ return obj;
92
+ }
93
+
94
+ /**
95
+ * Validates the JSON data with respect to <code>RequestApproval</code>.
96
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
97
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>RequestApproval</code>.
98
+ */
99
+ }, {
100
+ key: "validateJSON",
101
+ value: function validateJSON(data) {
102
+ // check to make sure all required properties are present in the JSON string
103
+ var _iterator = _createForOfIteratorHelper(RequestApproval.RequiredProperties),
104
+ _step;
105
+ try {
106
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
107
+ var property = _step.value;
108
+ if (!data.hasOwnProperty(property)) {
109
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
110
+ }
111
+ }
112
+ // ensure the json data is a string
113
+ } catch (err) {
114
+ _iterator.e(err);
115
+ } finally {
116
+ _iterator.f();
117
+ }
118
+ if (data['operation_id'] && !(typeof data['operation_id'] === 'string' || data['operation_id'] instanceof String)) {
119
+ throw new Error("Expected the field `operation_id` to be a primitive type in the JSON string but got " + data['operation_id']);
120
+ }
121
+ // ensure the json data is a string
122
+ if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
123
+ throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
124
+ }
125
+ // ensure the json data is a string
126
+ if (data['initiator_email'] && !(typeof data['initiator_email'] === 'string' || data['initiator_email'] instanceof String)) {
127
+ throw new Error("Expected the field `initiator_email` to be a primitive type in the JSON string but got " + data['initiator_email']);
128
+ }
129
+ if (data['fields']) {
130
+ // data not null
131
+ // ensure the json data is an array
132
+ if (!Array.isArray(data['fields'])) {
133
+ throw new Error("Expected the field `fields` to be an array in the JSON data but got " + data['fields']);
134
+ }
135
+ // validate the optional field `fields` (array)
136
+ var _iterator2 = _createForOfIteratorHelper(data['fields']),
137
+ _step2;
138
+ try {
139
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
140
+ var item = _step2.value;
141
+ _AppWorkflowField["default"].validateJSON(item);
142
+ }
143
+ } catch (err) {
144
+ _iterator2.e(err);
145
+ } finally {
146
+ _iterator2.f();
147
+ }
148
+ ;
149
+ }
150
+ // ensure the json data is a string
151
+ if (data['guard_template'] && !(typeof data['guard_template'] === 'string' || data['guard_template'] instanceof String)) {
152
+ throw new Error("Expected the field `guard_template` to be a primitive type in the JSON string but got " + data['guard_template']);
153
+ }
154
+ return true;
155
+ }
156
+ }]);
157
+ }();
158
+ RequestApproval.RequiredProperties = ["operation_id", "request_id", "initiator_email", "fields", "guard_template"];
159
+
160
+ /**
161
+ * The operation id of workflow approval request.
162
+ * @member {String} operation_id
163
+ */
164
+ RequestApproval.prototype['operation_id'] = undefined;
165
+
166
+ /**
167
+ * The request id of workflow approval request.
168
+ * @member {String} request_id
169
+ */
170
+ RequestApproval.prototype['request_id'] = undefined;
171
+
172
+ /**
173
+ * The initiator email of workflow approval request.
174
+ * @member {String} initiator_email
175
+ */
176
+ RequestApproval.prototype['initiator_email'] = undefined;
177
+
178
+ /**
179
+ * @member {Array.<module:model/AppWorkflowField>} fields
180
+ */
181
+ RequestApproval.prototype['fields'] = undefined;
182
+
183
+ /**
184
+ * The guard template content of workflow approval request, need to connect cobo.
185
+ * @member {String} guard_template
186
+ */
187
+ RequestApproval.prototype['guard_template'] = undefined;
188
+ var _default = exports["default"] = RequestApproval;
@@ -0,0 +1,118 @@
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}
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
+ * @member {String} approval_id
111
+ */
112
+ RevokeApprovalRequest201Response.prototype['approval_id'] = undefined;
113
+
114
+ /**
115
+ * @member {module:model/ApprovalStatus} status
116
+ */
117
+ RevokeApprovalRequest201Response.prototype['status'] = undefined;
118
+ 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 initiator email of workflow approval request.
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 initiator email of workflow approval request.
107
+ * @member {String} initiator_email
108
+ */
109
+ RevokeApprovalRequestRequest.prototype['initiator_email'] = undefined;
110
+ var _default = exports["default"] = RevokeApprovalRequestRequest;
@@ -82,6 +82,15 @@ var Settlement = /*#__PURE__*/function () {
82
82
  if (data.hasOwnProperty('settlements')) {
83
83
  obj['settlements'] = _ApiClient["default"].convertToType(data['settlements'], [_SettlementDetail["default"]]);
84
84
  }
85
+ if (data.hasOwnProperty('created_timestamp')) {
86
+ obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
87
+ }
88
+ if (data.hasOwnProperty('updated_timestamp')) {
89
+ obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
90
+ }
91
+ if (data.hasOwnProperty('initiator')) {
92
+ obj['initiator'] = _ApiClient["default"].convertToType(data['initiator'], 'String');
93
+ }
85
94
  }
86
95
  return obj;
87
96
  }
@@ -138,6 +147,10 @@ var Settlement = /*#__PURE__*/function () {
138
147
  }
139
148
  ;
140
149
  }
150
+ // ensure the json data is a string
151
+ if (data['initiator'] && !(typeof data['initiator'] === 'string' || data['initiator'] instanceof String)) {
152
+ throw new Error("Expected the field `initiator` to be a primitive type in the JSON string but got " + data['initiator']);
153
+ }
141
154
  return true;
142
155
  }
143
156
  }]);
@@ -165,4 +178,22 @@ Settlement.prototype['status'] = undefined;
165
178
  * @member {Array.<module:model/SettlementDetail>} settlements
166
179
  */
167
180
  Settlement.prototype['settlements'] = undefined;
181
+
182
+ /**
183
+ * The created time of the settlement request, represented as a UNIX timestamp in seconds.
184
+ * @member {Number} created_timestamp
185
+ */
186
+ Settlement.prototype['created_timestamp'] = undefined;
187
+
188
+ /**
189
+ * The updated time of the settlement request, represented as a UNIX timestamp in seconds.
190
+ * @member {Number} updated_timestamp
191
+ */
192
+ Settlement.prototype['updated_timestamp'] = undefined;
193
+
194
+ /**
195
+ * The initiator of this settlement request, usually the user's API key.
196
+ * @member {String} initiator
197
+ */
198
+ Settlement.prototype['initiator'] = undefined;
168
199
  var _default = exports["default"] = Settlement;