@cobo/cobo-waas2 1.36.0 → 1.37.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 (74) hide show
  1. package/README.md +8 -1
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/PaymentApi.js +77 -0
  4. package/dist/index.js +42 -0
  5. package/dist/model/AddressesEventData.js +13 -3
  6. package/dist/model/BalanceUpdateInfoEventData.js +13 -3
  7. package/dist/model/ChainsEventData.js +13 -3
  8. package/dist/model/ComplianceDispositionUpdateEventData.js +13 -3
  9. package/dist/model/ComplianceKyaScreeningsUpdateEventData.js +13 -3
  10. package/dist/model/ComplianceKytScreeningsUpdateEventData.js +13 -3
  11. package/dist/model/FiatTransactionEventData.js +431 -0
  12. package/dist/model/MPCVaultEventData.js +13 -3
  13. package/dist/model/OrganizationEventData.js +270 -0
  14. package/dist/model/PaymentAddressUpdateEventData.js +13 -3
  15. package/dist/model/PaymentBalanceChange.js +248 -0
  16. package/dist/model/PaymentBalanceChangeResponse.js +125 -0
  17. package/dist/model/PaymentBalanceChangeSourceType.js +106 -0
  18. package/dist/model/PaymentBalanceFlowDirection.js +61 -0
  19. package/dist/model/PaymentBulkSend.js +17 -0
  20. package/dist/model/PaymentBulkSendEvent.js +35 -3
  21. package/dist/model/PaymentBulkSendItem.js +13 -0
  22. package/dist/model/PaymentOrderEventData.js +13 -3
  23. package/dist/model/PaymentPayout.js +1 -1
  24. package/dist/model/PaymentPayoutDetail.js +2 -2
  25. package/dist/model/PaymentPayoutEvent.js +15 -5
  26. package/dist/model/PaymentRefundEventData.js +16 -4
  27. package/dist/model/PaymentSettlementEvent.js +13 -3
  28. package/dist/model/PaymentTransactionEventData.js +13 -3
  29. package/dist/model/Refund.js +2 -1
  30. package/dist/model/SuspendedTokenEventData.js +13 -3
  31. package/dist/model/TSSRequestWebhookEventData.js +13 -3
  32. package/dist/model/TokenListingEventData.js +13 -3
  33. package/dist/model/TokensEventData.js +13 -3
  34. package/dist/model/TransactionWebhookEventData.js +13 -3
  35. package/dist/model/WalletInfoEventData.js +13 -3
  36. package/dist/model/WebhookEventData.js +99 -18
  37. package/dist/model/WebhookEventDataType.js +12 -2
  38. package/dist/model/WebhookEventType.js +20 -0
  39. package/docs/AddressesEventData.md +5 -1
  40. package/docs/BalanceUpdateInfoEventData.md +5 -1
  41. package/docs/ChainsEventData.md +5 -1
  42. package/docs/ComplianceDispositionUpdateEventData.md +5 -1
  43. package/docs/ComplianceKyaScreeningsUpdateEventData.md +5 -1
  44. package/docs/ComplianceKytScreeningsUpdateEventData.md +5 -1
  45. package/docs/FiatTransactionEventData.md +84 -0
  46. package/docs/MPCVaultEventData.md +5 -1
  47. package/docs/OrganizationEventData.md +64 -0
  48. package/docs/PaymentAddressUpdateEventData.md +5 -1
  49. package/docs/PaymentApi.md +71 -0
  50. package/docs/PaymentBalanceChange.md +19 -0
  51. package/docs/PaymentBalanceChangeResponse.md +10 -0
  52. package/docs/PaymentBalanceChangeSourceType.md +30 -0
  53. package/docs/PaymentBalanceFlowDirection.md +12 -0
  54. package/docs/PaymentBulkSend.md +1 -0
  55. package/docs/PaymentBulkSendEvent.md +6 -1
  56. package/docs/PaymentBulkSendItem.md +1 -0
  57. package/docs/PaymentOrderEventData.md +5 -1
  58. package/docs/PaymentPayout.md +1 -1
  59. package/docs/PaymentPayoutDetail.md +1 -1
  60. package/docs/PaymentPayoutEvent.md +6 -2
  61. package/docs/PaymentRefundEventData.md +6 -2
  62. package/docs/PaymentSettlementEvent.md +5 -1
  63. package/docs/PaymentTransactionEventData.md +5 -1
  64. package/docs/Refund.md +1 -1
  65. package/docs/SuspendedTokenEventData.md +5 -1
  66. package/docs/TSSRequestWebhookEventData.md +5 -1
  67. package/docs/TokenListingEventData.md +5 -1
  68. package/docs/TokensEventData.md +5 -1
  69. package/docs/TransactionWebhookEventData.md +5 -1
  70. package/docs/WalletInfoEventData.md +5 -1
  71. package/docs/WebhookEventData.md +30 -9
  72. package/docs/WebhookEventDataType.md +5 -1
  73. package/docs/WebhookEventType.md +8 -0
  74. package/package.json +1 -1
@@ -0,0 +1,270 @@
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 _WebhookEventDataType = _interopRequireDefault(require("./WebhookEventDataType"));
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 OrganizationEventData model module.
30
+ * @module model/OrganizationEventData
31
+ */
32
+ var OrganizationEventData = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>OrganizationEventData</code>.
35
+ * @alias module:model/OrganizationEventData
36
+ * @implements module:model/WebhookEventDataType
37
+ * @param data_type {module:model/OrganizationEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data. - `Organization`: The organization event data. - `FiatTransaction`: The fiat transaction event data.
38
+ */
39
+ function OrganizationEventData(data_type) {
40
+ _classCallCheck(this, OrganizationEventData);
41
+ _WebhookEventDataType["default"].initialize(this, data_type);
42
+ OrganizationEventData.initialize(this, data_type);
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(OrganizationEventData, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, data_type) {
53
+ obj['data_type'] = data_type;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>OrganizationEventData</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
59
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
60
+ * @param {module:model/OrganizationEventData} obj Optional instance to populate.
61
+ * @return {module:model/OrganizationEventData} The populated <code>OrganizationEventData</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new OrganizationEventData();
68
+ _WebhookEventDataType["default"].constructFromObject(data, obj);
69
+ if (data.hasOwnProperty('data_type')) {
70
+ obj['data_type'] = _ApiClient["default"].convertToType(data['data_type'], 'String');
71
+ }
72
+ if (data.hasOwnProperty('org_id')) {
73
+ obj['org_id'] = _ApiClient["default"].convertToType(data['org_id'], 'String');
74
+ }
75
+ if (data.hasOwnProperty('name')) {
76
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
77
+ }
78
+ }
79
+ return obj;
80
+ }
81
+
82
+ /**
83
+ * Validates the JSON data with respect to <code>OrganizationEventData</code>.
84
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
85
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>OrganizationEventData</code>.
86
+ */
87
+ }, {
88
+ key: "validateJSON",
89
+ value: function validateJSON(data) {
90
+ // check to make sure all required properties are present in the JSON string
91
+ var _iterator = _createForOfIteratorHelper(OrganizationEventData.RequiredProperties),
92
+ _step;
93
+ try {
94
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
95
+ var property = _step.value;
96
+ if (!data.hasOwnProperty(property)) {
97
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
98
+ }
99
+ }
100
+ // ensure the json data is a string
101
+ } catch (err) {
102
+ _iterator.e(err);
103
+ } finally {
104
+ _iterator.f();
105
+ }
106
+ if (data['data_type'] && !(typeof data['data_type'] === 'string' || data['data_type'] instanceof String)) {
107
+ throw new Error("Expected the field `data_type` to be a primitive type in the JSON string but got " + data['data_type']);
108
+ }
109
+ // ensure the json data is a string
110
+ if (data['org_id'] && !(typeof data['org_id'] === 'string' || data['org_id'] instanceof String)) {
111
+ throw new Error("Expected the field `org_id` to be a primitive type in the JSON string but got " + data['org_id']);
112
+ }
113
+ // ensure the json data is a string
114
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
115
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
116
+ }
117
+ return true;
118
+ }
119
+ }]);
120
+ }();
121
+ OrganizationEventData.RequiredProperties = ["data_type"];
122
+
123
+ /**
124
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data. - `Organization`: The organization event data. - `FiatTransaction`: The fiat transaction event data.
125
+ * @member {module:model/OrganizationEventData.DataTypeEnum} data_type
126
+ */
127
+ OrganizationEventData.prototype['data_type'] = undefined;
128
+
129
+ /**
130
+ * The organization ID.
131
+ * @member {String} org_id
132
+ */
133
+ OrganizationEventData.prototype['org_id'] = undefined;
134
+
135
+ /**
136
+ * The organization name.
137
+ * @member {String} name
138
+ */
139
+ OrganizationEventData.prototype['name'] = undefined;
140
+
141
+ // Implement WebhookEventDataType interface:
142
+ /**
143
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data. - `Organization`: The organization event data. - `FiatTransaction`: The fiat transaction event data.
144
+ * @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
145
+ */
146
+ _WebhookEventDataType["default"].prototype['data_type'] = undefined;
147
+
148
+ /**
149
+ * Allowed values for the <code>data_type</code> property.
150
+ * @enum {String}
151
+ * @readonly
152
+ */
153
+ OrganizationEventData['DataTypeEnum'] = {
154
+ /**
155
+ * value: "Transaction"
156
+ * @const
157
+ */
158
+ "Transaction": "Transaction",
159
+ /**
160
+ * value: "TSSRequest"
161
+ * @const
162
+ */
163
+ "TSSRequest": "TSSRequest",
164
+ /**
165
+ * value: "Addresses"
166
+ * @const
167
+ */
168
+ "Addresses": "Addresses",
169
+ /**
170
+ * value: "WalletInfo"
171
+ * @const
172
+ */
173
+ "WalletInfo": "WalletInfo",
174
+ /**
175
+ * value: "MPCVault"
176
+ * @const
177
+ */
178
+ "MPCVault": "MPCVault",
179
+ /**
180
+ * value: "Chains"
181
+ * @const
182
+ */
183
+ "Chains": "Chains",
184
+ /**
185
+ * value: "Tokens"
186
+ * @const
187
+ */
188
+ "Tokens": "Tokens",
189
+ /**
190
+ * value: "TokenListing"
191
+ * @const
192
+ */
193
+ "TokenListing": "TokenListing",
194
+ /**
195
+ * value: "PaymentOrder"
196
+ * @const
197
+ */
198
+ "PaymentOrder": "PaymentOrder",
199
+ /**
200
+ * value: "PaymentRefund"
201
+ * @const
202
+ */
203
+ "PaymentRefund": "PaymentRefund",
204
+ /**
205
+ * value: "PaymentSettlement"
206
+ * @const
207
+ */
208
+ "PaymentSettlement": "PaymentSettlement",
209
+ /**
210
+ * value: "PaymentTransaction"
211
+ * @const
212
+ */
213
+ "PaymentTransaction": "PaymentTransaction",
214
+ /**
215
+ * value: "PaymentAddressUpdate"
216
+ * @const
217
+ */
218
+ "PaymentAddressUpdate": "PaymentAddressUpdate",
219
+ /**
220
+ * value: "PaymentPayout"
221
+ * @const
222
+ */
223
+ "PaymentPayout": "PaymentPayout",
224
+ /**
225
+ * value: "PaymentBulkSend"
226
+ * @const
227
+ */
228
+ "PaymentBulkSend": "PaymentBulkSend",
229
+ /**
230
+ * value: "BalanceUpdateInfo"
231
+ * @const
232
+ */
233
+ "BalanceUpdateInfo": "BalanceUpdateInfo",
234
+ /**
235
+ * value: "SuspendedToken"
236
+ * @const
237
+ */
238
+ "SuspendedToken": "SuspendedToken",
239
+ /**
240
+ * value: "ComplianceDisposition"
241
+ * @const
242
+ */
243
+ "ComplianceDisposition": "ComplianceDisposition",
244
+ /**
245
+ * value: "ComplianceKytScreenings"
246
+ * @const
247
+ */
248
+ "ComplianceKytScreenings": "ComplianceKytScreenings",
249
+ /**
250
+ * value: "ComplianceKyaScreenings"
251
+ * @const
252
+ */
253
+ "ComplianceKyaScreenings": "ComplianceKyaScreenings",
254
+ /**
255
+ * value: "Organization"
256
+ * @const
257
+ */
258
+ "Organization": "Organization",
259
+ /**
260
+ * value: "FiatTransaction"
261
+ * @const
262
+ */
263
+ "FiatTransaction": "FiatTransaction",
264
+ /**
265
+ * value: "unknown_default_open_api"
266
+ * @const
267
+ */
268
+ "unknown_default_open_api": "unknown_default_open_api"
269
+ };
270
+ var _default = exports["default"] = OrganizationEventData;
@@ -34,7 +34,7 @@ var PaymentAddressUpdateEventData = /*#__PURE__*/function () {
34
34
  * Constructs a new <code>PaymentAddressUpdateEventData</code>.
35
35
  * @alias module:model/PaymentAddressUpdateEventData
36
36
  * @implements module:model/WebhookEventDataType
37
- * @param data_type {module:model/PaymentAddressUpdateEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data.
37
+ * @param data_type {module:model/PaymentAddressUpdateEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data. - `Organization`: The organization event data. - `FiatTransaction`: The fiat transaction event data.
38
38
  * @param custom_payer_id {String} A unique identifier assigned by the developer to track and identify individual payers in their system.
39
39
  * @param payer_id {String} A unique identifier assigned by Cobo to track and identify individual payers.
40
40
  * @param chain {String} The chain ID.
@@ -152,7 +152,7 @@ var PaymentAddressUpdateEventData = /*#__PURE__*/function () {
152
152
  PaymentAddressUpdateEventData.RequiredProperties = ["data_type", "custom_payer_id", "payer_id", "chain", "previous_address", "updated_address"];
153
153
 
154
154
  /**
155
- * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data.
155
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data. - `Organization`: The organization event data. - `FiatTransaction`: The fiat transaction event data.
156
156
  * @member {module:model/PaymentAddressUpdateEventData.DataTypeEnum} data_type
157
157
  */
158
158
  PaymentAddressUpdateEventData.prototype['data_type'] = undefined;
@@ -189,7 +189,7 @@ PaymentAddressUpdateEventData.prototype['updated_address'] = undefined;
189
189
 
190
190
  // Implement WebhookEventDataType interface:
191
191
  /**
192
- * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data.
192
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data. - `Organization`: The organization event data. - `FiatTransaction`: The fiat transaction event data.
193
193
  * @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
194
194
  */
195
195
  _WebhookEventDataType["default"].prototype['data_type'] = undefined;
@@ -300,6 +300,16 @@ PaymentAddressUpdateEventData['DataTypeEnum'] = {
300
300
  * @const
301
301
  */
302
302
  "ComplianceKyaScreenings": "ComplianceKyaScreenings",
303
+ /**
304
+ * value: "Organization"
305
+ * @const
306
+ */
307
+ "Organization": "Organization",
308
+ /**
309
+ * value: "FiatTransaction"
310
+ * @const
311
+ */
312
+ "FiatTransaction": "FiatTransaction",
303
313
  /**
304
314
  * value: "unknown_default_open_api"
305
315
  * @const
@@ -0,0 +1,248 @@
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 _PaymentBalanceChangeSourceType = _interopRequireDefault(require("./PaymentBalanceChangeSourceType"));
9
+ var _PaymentBalanceFlowDirection = _interopRequireDefault(require("./PaymentBalanceFlowDirection"));
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 PaymentBalanceChange model module.
31
+ * @module model/PaymentBalanceChange
32
+ */
33
+ var PaymentBalanceChange = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>PaymentBalanceChange</code>.
36
+ * @alias module:model/PaymentBalanceChange
37
+ * @param source_id {String} The source ID of the balance change.
38
+ * @param source_type {module:model/PaymentBalanceChangeSourceType}
39
+ * @param token_id {String} The token ID of the balance change.
40
+ * @param amount {String} The balance change amount, truncated to two decimal places and represented as a numeric string.
41
+ * @param amount_raw {String} The balance change amount in the token's decimal precision, represented as a numeric string.
42
+ * @param balance_before {String} The account balance before the balance change, truncated to two decimal places and represented as a numeric string.
43
+ * @param balance_before_raw {String} The account balance before the balance change in the token's decimal precision, represented as a numeric string.
44
+ * @param balance_after {String} The account balance after the balance change, truncated to two decimal places and represented as a numeric string.
45
+ * @param balance_after_raw {String} The account balance after the balance change in the token's decimal precision, represented as a numeric string.
46
+ * @param flow_direction {module:model/PaymentBalanceFlowDirection}
47
+ * @param created_timestamp {Number} The time when the balance change was created, represented as a UNIX timestamp in seconds.
48
+ */
49
+ function PaymentBalanceChange(source_id, source_type, token_id, amount, amount_raw, balance_before, balance_before_raw, balance_after, balance_after_raw, flow_direction, created_timestamp) {
50
+ _classCallCheck(this, PaymentBalanceChange);
51
+ PaymentBalanceChange.initialize(this, source_id, source_type, token_id, amount, amount_raw, balance_before, balance_before_raw, balance_after, balance_after_raw, flow_direction, created_timestamp);
52
+ }
53
+
54
+ /**
55
+ * Initializes the fields of this object.
56
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
57
+ * Only for internal use.
58
+ */
59
+ return _createClass(PaymentBalanceChange, null, [{
60
+ key: "initialize",
61
+ value: function initialize(obj, source_id, source_type, token_id, amount, amount_raw, balance_before, balance_before_raw, balance_after, balance_after_raw, flow_direction, created_timestamp) {
62
+ obj['source_id'] = source_id;
63
+ obj['source_type'] = source_type;
64
+ obj['token_id'] = token_id;
65
+ obj['amount'] = amount;
66
+ obj['amount_raw'] = amount_raw;
67
+ obj['balance_before'] = balance_before;
68
+ obj['balance_before_raw'] = balance_before_raw;
69
+ obj['balance_after'] = balance_after;
70
+ obj['balance_after_raw'] = balance_after_raw;
71
+ obj['flow_direction'] = flow_direction;
72
+ obj['created_timestamp'] = created_timestamp;
73
+ }
74
+
75
+ /**
76
+ * Constructs a <code>PaymentBalanceChange</code> from a plain JavaScript object, optionally creating a new instance.
77
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
78
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
79
+ * @param {module:model/PaymentBalanceChange} obj Optional instance to populate.
80
+ * @return {module:model/PaymentBalanceChange} The populated <code>PaymentBalanceChange</code> instance.
81
+ */
82
+ }, {
83
+ key: "constructFromObject",
84
+ value: function constructFromObject(data, obj) {
85
+ if (data) {
86
+ obj = obj || new PaymentBalanceChange();
87
+ if (data.hasOwnProperty('source_id')) {
88
+ obj['source_id'] = _ApiClient["default"].convertToType(data['source_id'], 'String');
89
+ }
90
+ if (data.hasOwnProperty('source_type')) {
91
+ obj['source_type'] = _PaymentBalanceChangeSourceType["default"].constructFromObject(data['source_type']);
92
+ }
93
+ if (data.hasOwnProperty('token_id')) {
94
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
95
+ }
96
+ if (data.hasOwnProperty('amount')) {
97
+ obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
98
+ }
99
+ if (data.hasOwnProperty('amount_raw')) {
100
+ obj['amount_raw'] = _ApiClient["default"].convertToType(data['amount_raw'], 'String');
101
+ }
102
+ if (data.hasOwnProperty('balance_before')) {
103
+ obj['balance_before'] = _ApiClient["default"].convertToType(data['balance_before'], 'String');
104
+ }
105
+ if (data.hasOwnProperty('balance_before_raw')) {
106
+ obj['balance_before_raw'] = _ApiClient["default"].convertToType(data['balance_before_raw'], 'String');
107
+ }
108
+ if (data.hasOwnProperty('balance_after')) {
109
+ obj['balance_after'] = _ApiClient["default"].convertToType(data['balance_after'], 'String');
110
+ }
111
+ if (data.hasOwnProperty('balance_after_raw')) {
112
+ obj['balance_after_raw'] = _ApiClient["default"].convertToType(data['balance_after_raw'], 'String');
113
+ }
114
+ if (data.hasOwnProperty('flow_direction')) {
115
+ obj['flow_direction'] = _PaymentBalanceFlowDirection["default"].constructFromObject(data['flow_direction']);
116
+ }
117
+ if (data.hasOwnProperty('created_timestamp')) {
118
+ obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
119
+ }
120
+ }
121
+ return obj;
122
+ }
123
+
124
+ /**
125
+ * Validates the JSON data with respect to <code>PaymentBalanceChange</code>.
126
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
127
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>PaymentBalanceChange</code>.
128
+ */
129
+ }, {
130
+ key: "validateJSON",
131
+ value: function validateJSON(data) {
132
+ // check to make sure all required properties are present in the JSON string
133
+ var _iterator = _createForOfIteratorHelper(PaymentBalanceChange.RequiredProperties),
134
+ _step;
135
+ try {
136
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
137
+ var property = _step.value;
138
+ if (!data.hasOwnProperty(property)) {
139
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
140
+ }
141
+ }
142
+ // ensure the json data is a string
143
+ } catch (err) {
144
+ _iterator.e(err);
145
+ } finally {
146
+ _iterator.f();
147
+ }
148
+ if (data['source_id'] && !(typeof data['source_id'] === 'string' || data['source_id'] instanceof String)) {
149
+ throw new Error("Expected the field `source_id` to be a primitive type in the JSON string but got " + data['source_id']);
150
+ }
151
+ // ensure the json data is a string
152
+ if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
153
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
154
+ }
155
+ // ensure the json data is a string
156
+ if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
157
+ throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
158
+ }
159
+ // ensure the json data is a string
160
+ if (data['amount_raw'] && !(typeof data['amount_raw'] === 'string' || data['amount_raw'] instanceof String)) {
161
+ throw new Error("Expected the field `amount_raw` to be a primitive type in the JSON string but got " + data['amount_raw']);
162
+ }
163
+ // ensure the json data is a string
164
+ if (data['balance_before'] && !(typeof data['balance_before'] === 'string' || data['balance_before'] instanceof String)) {
165
+ throw new Error("Expected the field `balance_before` to be a primitive type in the JSON string but got " + data['balance_before']);
166
+ }
167
+ // ensure the json data is a string
168
+ if (data['balance_before_raw'] && !(typeof data['balance_before_raw'] === 'string' || data['balance_before_raw'] instanceof String)) {
169
+ throw new Error("Expected the field `balance_before_raw` to be a primitive type in the JSON string but got " + data['balance_before_raw']);
170
+ }
171
+ // ensure the json data is a string
172
+ if (data['balance_after'] && !(typeof data['balance_after'] === 'string' || data['balance_after'] instanceof String)) {
173
+ throw new Error("Expected the field `balance_after` to be a primitive type in the JSON string but got " + data['balance_after']);
174
+ }
175
+ // ensure the json data is a string
176
+ if (data['balance_after_raw'] && !(typeof data['balance_after_raw'] === 'string' || data['balance_after_raw'] instanceof String)) {
177
+ throw new Error("Expected the field `balance_after_raw` to be a primitive type in the JSON string but got " + data['balance_after_raw']);
178
+ }
179
+ return true;
180
+ }
181
+ }]);
182
+ }();
183
+ PaymentBalanceChange.RequiredProperties = ["source_id", "source_type", "token_id", "amount", "amount_raw", "balance_before", "balance_before_raw", "balance_after", "balance_after_raw", "flow_direction", "created_timestamp"];
184
+
185
+ /**
186
+ * The source ID of the balance change.
187
+ * @member {String} source_id
188
+ */
189
+ PaymentBalanceChange.prototype['source_id'] = undefined;
190
+
191
+ /**
192
+ * @member {module:model/PaymentBalanceChangeSourceType} source_type
193
+ */
194
+ PaymentBalanceChange.prototype['source_type'] = undefined;
195
+
196
+ /**
197
+ * The token ID of the balance change.
198
+ * @member {String} token_id
199
+ */
200
+ PaymentBalanceChange.prototype['token_id'] = undefined;
201
+
202
+ /**
203
+ * The balance change amount, truncated to two decimal places and represented as a numeric string.
204
+ * @member {String} amount
205
+ */
206
+ PaymentBalanceChange.prototype['amount'] = undefined;
207
+
208
+ /**
209
+ * The balance change amount in the token's decimal precision, represented as a numeric string.
210
+ * @member {String} amount_raw
211
+ */
212
+ PaymentBalanceChange.prototype['amount_raw'] = undefined;
213
+
214
+ /**
215
+ * The account balance before the balance change, truncated to two decimal places and represented as a numeric string.
216
+ * @member {String} balance_before
217
+ */
218
+ PaymentBalanceChange.prototype['balance_before'] = undefined;
219
+
220
+ /**
221
+ * The account balance before the balance change in the token's decimal precision, represented as a numeric string.
222
+ * @member {String} balance_before_raw
223
+ */
224
+ PaymentBalanceChange.prototype['balance_before_raw'] = undefined;
225
+
226
+ /**
227
+ * The account balance after the balance change, truncated to two decimal places and represented as a numeric string.
228
+ * @member {String} balance_after
229
+ */
230
+ PaymentBalanceChange.prototype['balance_after'] = undefined;
231
+
232
+ /**
233
+ * The account balance after the balance change in the token's decimal precision, represented as a numeric string.
234
+ * @member {String} balance_after_raw
235
+ */
236
+ PaymentBalanceChange.prototype['balance_after_raw'] = undefined;
237
+
238
+ /**
239
+ * @member {module:model/PaymentBalanceFlowDirection} flow_direction
240
+ */
241
+ PaymentBalanceChange.prototype['flow_direction'] = undefined;
242
+
243
+ /**
244
+ * The time when the balance change was created, represented as a UNIX timestamp in seconds.
245
+ * @member {Number} created_timestamp
246
+ */
247
+ PaymentBalanceChange.prototype['created_timestamp'] = undefined;
248
+ var _default = exports["default"] = PaymentBalanceChange;