@emilgroup/payment-sdk 1.4.1-beta.8 → 1.5.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 (272) hide show
  1. package/.openapi-generator/FILES +55 -5
  2. package/README.md +2 -2
  3. package/api/bank-accounts-api.ts +508 -88
  4. package/api/bank-transaction-api.ts +95 -115
  5. package/api/{default-api.ts → health-check-api.ts} +22 -18
  6. package/api/payment-methods-api.ts +83 -256
  7. package/api/payment-reminders-api.ts +71 -105
  8. package/api/payment-setup-api.ts +53 -37
  9. package/api/payments-api.ts +80 -137
  10. package/api/refunds-api.ts +78 -112
  11. package/api/tenant-bank-account-api.ts +99 -101
  12. package/api/webhooks-api.ts +17 -13
  13. package/api.ts +3 -3
  14. package/base.ts +22 -10
  15. package/common.ts +2 -2
  16. package/configuration.ts +1 -1
  17. package/dist/api/bank-accounts-api.d.ts +298 -71
  18. package/dist/api/bank-accounts-api.js +432 -62
  19. package/dist/api/bank-transaction-api.d.ts +83 -98
  20. package/dist/api/bank-transaction-api.js +63 -74
  21. package/dist/api/health-check-api.d.ts +70 -0
  22. package/dist/api/{default-api.js → health-check-api.js} +31 -27
  23. package/dist/api/payment-methods-api.d.ts +66 -162
  24. package/dist/api/payment-methods-api.js +60 -190
  25. package/dist/api/payment-reminders-api.d.ts +66 -89
  26. package/dist/api/payment-reminders-api.js +44 -62
  27. package/dist/api/payment-setup-api.d.ts +39 -27
  28. package/dist/api/payment-setup-api.js +41 -33
  29. package/dist/api/payments-api.d.ts +70 -103
  30. package/dist/api/payments-api.js +55 -85
  31. package/dist/api/refunds-api.d.ts +68 -83
  32. package/dist/api/refunds-api.js +58 -68
  33. package/dist/api/tenant-bank-account-api.d.ts +93 -88
  34. package/dist/api/tenant-bank-account-api.js +71 -63
  35. package/dist/api/webhooks-api.d.ts +17 -13
  36. package/dist/api/webhooks-api.js +15 -11
  37. package/dist/api.d.ts +2 -2
  38. package/dist/api.js +2 -2
  39. package/dist/base.d.ts +6 -3
  40. package/dist/base.js +31 -22
  41. package/dist/common.d.ts +2 -2
  42. package/dist/common.js +1 -1
  43. package/dist/configuration.d.ts +1 -1
  44. package/dist/configuration.js +1 -1
  45. package/dist/index.d.ts +1 -1
  46. package/dist/index.js +1 -1
  47. package/dist/models/bank-account-class-without-expand-properties.d.ts +84 -0
  48. package/dist/models/{bank-transaction-response-class.js → bank-account-class-without-expand-properties.js} +1 -1
  49. package/dist/models/bank-account-class.d.ts +91 -0
  50. package/dist/models/{transaction-class.js → bank-account-class.js} +1 -1
  51. package/dist/models/bank-transaction-class-without-expand-properties.d.ts +126 -0
  52. package/dist/models/{get-request-dto.js → bank-transaction-class-without-expand-properties.js} +1 -1
  53. package/dist/models/{bank-transaction-response-class.d.ts → bank-transaction-class.d.ts} +41 -29
  54. package/dist/models/{tenant-bank-account-response-class.js → bank-transaction-class.js} +1 -1
  55. package/dist/models/billing-profile-dto.d.ts +38 -0
  56. package/dist/models/billing-profile-dto.js +15 -0
  57. package/dist/models/billing-profile-limited-response-dto.d.ts +54 -0
  58. package/dist/models/billing-profile-limited-response-dto.js +15 -0
  59. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
  60. package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
  61. package/dist/models/complete-payment-setup-request-dto.d.ts +32 -0
  62. package/dist/models/complete-payment-setup-request-dto.js +15 -0
  63. package/dist/models/complete-payment-setup-response-class.d.ts +25 -0
  64. package/dist/models/complete-payment-setup-response-class.js +15 -0
  65. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +77 -0
  66. package/dist/models/complete-stripe-payment-setup-request-dto.js +32 -0
  67. package/dist/models/create-bank-account-request-dto.d.ts +42 -0
  68. package/dist/models/create-bank-account-request-dto.js +15 -0
  69. package/dist/models/create-bank-account-response-class.d.ts +25 -0
  70. package/dist/models/create-bank-account-response-class.js +15 -0
  71. package/dist/models/create-payment-method-response-class.d.ts +25 -0
  72. package/dist/models/create-payment-method-response-class.js +15 -0
  73. package/dist/models/create-payment-reminder-request-dto.d.ts +1 -1
  74. package/dist/models/create-payment-reminder-request-dto.js +1 -1
  75. package/dist/models/create-payment-reminder-response-class.d.ts +25 -0
  76. package/dist/models/create-payment-reminder-response-class.js +15 -0
  77. package/dist/models/create-payment-request-dto.d.ts +4 -4
  78. package/dist/models/create-payment-request-dto.js +1 -1
  79. package/dist/models/create-payment-response-class.d.ts +25 -0
  80. package/dist/models/create-payment-response-class.js +15 -0
  81. package/dist/models/create-psp-payment-method-request-dto.d.ts +61 -0
  82. package/dist/models/create-psp-payment-method-request-dto.js +32 -0
  83. package/dist/models/create-refund-request-dto.d.ts +1 -1
  84. package/dist/models/create-refund-request-dto.js +1 -1
  85. package/dist/models/create-refund-response-class.d.ts +1 -1
  86. package/dist/models/create-refund-response-class.js +1 -1
  87. package/dist/models/create-tenant-bank-account-request-dto.d.ts +1 -1
  88. package/dist/models/create-tenant-bank-account-request-dto.js +1 -1
  89. package/dist/models/create-tenant-bank-account-response-class.d.ts +25 -0
  90. package/dist/models/create-tenant-bank-account-response-class.js +15 -0
  91. package/dist/models/deactivate-payment-reminder-request-dto.d.ts +1 -1
  92. package/dist/models/deactivate-payment-reminder-request-dto.js +1 -1
  93. package/dist/models/deactivate-payment-reminder-response-class.d.ts +25 -0
  94. package/dist/models/deactivate-payment-reminder-response-class.js +15 -0
  95. package/dist/models/deactivated-payment-reminder-class.d.ts +102 -0
  96. package/dist/models/deactivated-payment-reminder-class.js +15 -0
  97. package/dist/models/get-bank-account-response-class.d.ts +25 -0
  98. package/dist/models/get-bank-account-response-class.js +15 -0
  99. package/dist/models/get-bank-transactions-response-class.d.ts +4 -4
  100. package/dist/models/get-bank-transactions-response-class.js +1 -1
  101. package/dist/models/get-payment-method-response-class.d.ts +25 -0
  102. package/dist/models/get-payment-method-response-class.js +15 -0
  103. package/dist/models/get-payment-reminder-response-class.d.ts +25 -0
  104. package/dist/models/get-payment-reminder-response-class.js +15 -0
  105. package/dist/models/get-payment-response-class.d.ts +25 -0
  106. package/dist/models/get-payment-response-class.js +15 -0
  107. package/dist/models/get-refund-response-class.d.ts +1 -1
  108. package/dist/models/get-refund-response-class.js +1 -1
  109. package/dist/models/get-tenant-bank-account-response-class.d.ts +5 -5
  110. package/dist/models/get-tenant-bank-account-response-class.js +1 -1
  111. package/dist/models/import-bank-transactions-response-class.d.ts +25 -0
  112. package/dist/models/import-bank-transactions-response-class.js +15 -0
  113. package/dist/models/index.d.ts +54 -4
  114. package/dist/models/index.js +54 -4
  115. package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +30 -0
  116. package/dist/models/initiate-braintree-payment-setup-request-dto.js +15 -0
  117. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
  118. package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
  119. package/dist/models/initiate-payment-setup-request-dto.d.ts +44 -0
  120. package/dist/models/initiate-payment-setup-request-dto.js +15 -0
  121. package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
  122. package/dist/models/initiate-payment-setup-response-class.js +15 -0
  123. package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +30 -0
  124. package/dist/models/initiate-stripe-payment-setup-request-dto.js +15 -0
  125. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
  126. package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
  127. package/dist/models/inline-response200.d.ts +1 -1
  128. package/dist/models/inline-response200.js +1 -1
  129. package/dist/models/inline-response503.d.ts +1 -1
  130. package/dist/models/inline-response503.js +1 -1
  131. package/dist/models/link-bank-transaction-request-dto-rest.d.ts +1 -1
  132. package/dist/models/link-bank-transaction-request-dto-rest.js +1 -1
  133. package/dist/models/link-bank-transactions-response-class.d.ts +25 -0
  134. package/dist/models/link-bank-transactions-response-class.js +15 -0
  135. package/dist/models/list-bank-accounts-response-class.d.ts +31 -0
  136. package/dist/models/list-bank-accounts-response-class.js +15 -0
  137. package/dist/models/list-bank-transactions-response-class.d.ts +6 -6
  138. package/dist/models/list-bank-transactions-response-class.js +1 -1
  139. package/dist/models/list-payment-methods-response-class.d.ts +31 -0
  140. package/dist/models/list-payment-methods-response-class.js +15 -0
  141. package/dist/models/list-payment-reminders-response-class.d.ts +31 -0
  142. package/dist/models/list-payment-reminders-response-class.js +15 -0
  143. package/dist/models/list-payments-response-class.d.ts +31 -0
  144. package/dist/models/list-payments-response-class.js +15 -0
  145. package/dist/models/list-refunds-response-class.d.ts +3 -3
  146. package/dist/models/list-refunds-response-class.js +1 -1
  147. package/dist/models/list-tenant-bank-account-response-class.d.ts +31 -0
  148. package/dist/models/list-tenant-bank-account-response-class.js +15 -0
  149. package/dist/models/payment-class-without-expand-properties.d.ts +108 -0
  150. package/dist/models/payment-class-without-expand-properties.js +15 -0
  151. package/dist/models/payment-class.d.ts +115 -0
  152. package/dist/models/payment-class.js +15 -0
  153. package/dist/models/payment-method-class.d.ts +78 -0
  154. package/dist/models/payment-method-class.js +15 -0
  155. package/dist/models/payment-reminder-class.d.ts +102 -0
  156. package/dist/models/payment-reminder-class.js +15 -0
  157. package/dist/models/primary-bank-account-response-class.d.ts +54 -0
  158. package/dist/models/primary-bank-account-response-class.js +15 -0
  159. package/dist/models/refund-class.d.ts +18 -4
  160. package/dist/models/refund-class.js +3 -2
  161. package/dist/models/refund-item-class.d.ts +114 -0
  162. package/dist/models/refund-item-class.js +15 -0
  163. package/dist/models/sepa-direct-dto.d.ts +24 -0
  164. package/dist/models/sepa-direct-dto.js +15 -0
  165. package/dist/models/set-primary-bank-account-request-dto-rest.d.ts +24 -0
  166. package/dist/models/set-primary-bank-account-request-dto-rest.js +15 -0
  167. package/dist/models/shared-transaction-class.d.ts +72 -0
  168. package/dist/models/shared-transaction-class.js +15 -0
  169. package/dist/models/symphony-profile-limited-response-dto.d.ts +42 -0
  170. package/dist/models/symphony-profile-limited-response-dto.js +15 -0
  171. package/dist/models/{tenant-bank-account-response-class.d.ts → tenant-bank-account-class-without-expand-properties.d.ts} +23 -11
  172. package/dist/models/tenant-bank-account-class-without-expand-properties.js +15 -0
  173. package/dist/models/tenant-bank-account-class.d.ts +85 -0
  174. package/dist/models/tenant-bank-account-class.js +15 -0
  175. package/dist/models/unlink-bank-transaction-request-dto-rest.d.ts +2 -2
  176. package/dist/models/unlink-bank-transaction-request-dto-rest.js +1 -1
  177. package/dist/models/unlink-bank-transactions-response-class.d.ts +25 -0
  178. package/dist/models/unlink-bank-transactions-response-class.js +15 -0
  179. package/dist/models/unlinked-bank-transaction-response-class.d.ts +108 -0
  180. package/dist/models/unlinked-bank-transaction-response-class.js +15 -0
  181. package/dist/models/update-bank-account-request-dto-rest.d.ts +30 -0
  182. package/dist/models/update-bank-account-request-dto-rest.js +15 -0
  183. package/dist/models/update-bank-account-request-dto.d.ts +36 -0
  184. package/dist/models/update-bank-account-request-dto.js +15 -0
  185. package/dist/models/update-bank-account-response-class.d.ts +25 -0
  186. package/dist/models/update-bank-account-response-class.js +15 -0
  187. package/dist/models/update-tenant-bank-account-response-class.d.ts +25 -0
  188. package/dist/models/update-tenant-bank-account-response-class.js +15 -0
  189. package/dist/models/update-tenant-bank-account-rest-request-dto.d.ts +1 -1
  190. package/dist/models/update-tenant-bank-account-rest-request-dto.js +1 -1
  191. package/dist/models/validate-pspconfig-request-dto.d.ts +9 -2
  192. package/dist/models/validate-pspconfig-request-dto.js +8 -1
  193. package/index.ts +1 -1
  194. package/models/bank-account-class-without-expand-properties.ts +90 -0
  195. package/models/bank-account-class.ts +97 -0
  196. package/models/bank-transaction-class-without-expand-properties.ts +132 -0
  197. package/models/{bank-transaction-response-class.ts → bank-transaction-class.ts} +41 -29
  198. package/models/billing-profile-dto.ts +44 -0
  199. package/models/billing-profile-limited-response-dto.ts +60 -0
  200. package/models/complete-braintree-payment-setup-request-dto.ts +54 -0
  201. package/models/complete-payment-setup-request-dto.ts +38 -0
  202. package/models/complete-payment-setup-response-class.ts +31 -0
  203. package/models/complete-stripe-payment-setup-request-dto.ts +86 -0
  204. package/models/create-bank-account-request-dto.ts +48 -0
  205. package/models/create-bank-account-response-class.ts +31 -0
  206. package/models/create-payment-method-response-class.ts +31 -0
  207. package/models/create-payment-reminder-request-dto.ts +1 -1
  208. package/models/create-payment-reminder-response-class.ts +31 -0
  209. package/models/create-payment-request-dto.ts +4 -4
  210. package/models/create-payment-response-class.ts +31 -0
  211. package/models/create-psp-payment-method-request-dto.ts +70 -0
  212. package/models/create-refund-request-dto.ts +1 -1
  213. package/models/create-refund-response-class.ts +1 -1
  214. package/models/create-tenant-bank-account-request-dto.ts +1 -1
  215. package/models/create-tenant-bank-account-response-class.ts +31 -0
  216. package/models/deactivate-payment-reminder-request-dto.ts +1 -1
  217. package/models/deactivate-payment-reminder-response-class.ts +31 -0
  218. package/models/deactivated-payment-reminder-class.ts +108 -0
  219. package/models/get-bank-account-response-class.ts +31 -0
  220. package/models/get-bank-transactions-response-class.ts +4 -4
  221. package/models/get-payment-method-response-class.ts +31 -0
  222. package/models/get-payment-reminder-response-class.ts +31 -0
  223. package/models/get-payment-response-class.ts +31 -0
  224. package/models/get-refund-response-class.ts +1 -1
  225. package/models/get-tenant-bank-account-response-class.ts +5 -5
  226. package/models/import-bank-transactions-response-class.ts +31 -0
  227. package/models/index.ts +54 -4
  228. package/models/initiate-braintree-payment-setup-request-dto.ts +36 -0
  229. package/models/initiate-braintree-payment-setup-response-class.ts +30 -0
  230. package/models/initiate-payment-setup-request-dto.ts +50 -0
  231. package/models/initiate-payment-setup-response-class.ts +38 -0
  232. package/models/initiate-stripe-payment-setup-request-dto.ts +36 -0
  233. package/models/initiate-stripe-payment-setup-response-class.ts +36 -0
  234. package/models/inline-response200.ts +1 -1
  235. package/models/inline-response503.ts +1 -1
  236. package/models/link-bank-transaction-request-dto-rest.ts +1 -1
  237. package/models/link-bank-transactions-response-class.ts +31 -0
  238. package/models/list-bank-accounts-response-class.ts +37 -0
  239. package/models/list-bank-transactions-response-class.ts +6 -6
  240. package/models/list-payment-methods-response-class.ts +37 -0
  241. package/models/list-payment-reminders-response-class.ts +37 -0
  242. package/models/list-payments-response-class.ts +37 -0
  243. package/models/list-refunds-response-class.ts +3 -3
  244. package/models/list-tenant-bank-account-response-class.ts +37 -0
  245. package/models/payment-class-without-expand-properties.ts +114 -0
  246. package/models/payment-class.ts +121 -0
  247. package/models/payment-method-class.ts +84 -0
  248. package/models/payment-reminder-class.ts +108 -0
  249. package/models/primary-bank-account-response-class.ts +60 -0
  250. package/models/refund-class.ts +19 -5
  251. package/models/refund-item-class.ts +120 -0
  252. package/models/sepa-direct-dto.ts +30 -0
  253. package/models/set-primary-bank-account-request-dto-rest.ts +30 -0
  254. package/models/shared-transaction-class.ts +78 -0
  255. package/models/symphony-profile-limited-response-dto.ts +48 -0
  256. package/models/{tenant-bank-account-response-class.ts → tenant-bank-account-class-without-expand-properties.ts} +23 -11
  257. package/models/tenant-bank-account-class.ts +91 -0
  258. package/models/unlink-bank-transaction-request-dto-rest.ts +2 -2
  259. package/models/unlink-bank-transactions-response-class.ts +31 -0
  260. package/models/unlinked-bank-transaction-response-class.ts +114 -0
  261. package/models/update-bank-account-request-dto-rest.ts +36 -0
  262. package/models/update-bank-account-request-dto.ts +42 -0
  263. package/models/update-bank-account-response-class.ts +31 -0
  264. package/models/update-tenant-bank-account-response-class.ts +31 -0
  265. package/models/update-tenant-bank-account-rest-request-dto.ts +1 -1
  266. package/models/validate-pspconfig-request-dto.ts +12 -2
  267. package/package.json +1 -1
  268. package/dist/api/default-api.d.ts +0 -66
  269. package/dist/models/get-request-dto.d.ts +0 -30
  270. package/dist/models/transaction-class.d.ts +0 -54
  271. package/models/get-request-dto.ts +0 -36
  272. package/models/transaction-class.ts +0 -60
package/dist/base.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Emil Payment Service
6
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
6
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0
9
9
  * Contact: kontakt@emil.de
@@ -138,13 +138,19 @@ var BaseAPI = /** @class */ (function () {
138
138
  this.attachInterceptor(axios);
139
139
  }
140
140
  BaseAPI.prototype.selectEnvironment = function (env) {
141
- this.configuration.basePath = env;
141
+ this.selectBasePath(env);
142
+ };
143
+ BaseAPI.prototype.selectBasePath = function (path) {
144
+ this.configuration.basePath = path;
145
+ };
146
+ BaseAPI.prototype.getPermissions = function () {
147
+ return this.permissions.split(',');
142
148
  };
143
149
  BaseAPI.prototype.authorize = function (username, password) {
144
150
  return __awaiter(this, void 0, void 0, function () {
145
- var options, response, accessToken;
146
- return __generator(this, function (_a) {
147
- switch (_a.label) {
151
+ var options, response, _a, accessToken, permissions;
152
+ return __generator(this, function (_b) {
153
+ switch (_b.label) {
148
154
  case 0:
149
155
  options = {
150
156
  method: 'POST',
@@ -158,12 +164,13 @@ var BaseAPI = /** @class */ (function () {
158
164
  };
159
165
  return [4 /*yield*/, axios_1.default.request(options)];
160
166
  case 1:
161
- response = _a.sent();
162
- accessToken = response.data.accessToken;
167
+ response = _b.sent();
168
+ _a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
163
169
  this.configuration.username = username;
164
170
  this.configuration.accessToken = "Bearer ".concat(accessToken);
165
171
  this.tokenData.username = username;
166
172
  this.tokenData.accessToken = accessToken;
173
+ this.permissions = permissions;
167
174
  this.storeTokenData(__assign({}, this.tokenData));
168
175
  return [2 /*return*/];
169
176
  }
@@ -172,13 +179,13 @@ var BaseAPI = /** @class */ (function () {
172
179
  };
173
180
  BaseAPI.prototype.refreshTokenInternal = function () {
174
181
  return __awaiter(this, void 0, void 0, function () {
175
- var username, options, accessToken;
182
+ var username, options, response;
176
183
  return __generator(this, function (_a) {
177
184
  switch (_a.label) {
178
185
  case 0:
179
186
  username = this.configuration.username;
180
187
  if (!username) {
181
- return [2 /*return*/, ''];
188
+ throw new Error('Failed to refresh token.');
182
189
  }
183
190
  options = {
184
191
  method: 'POST',
@@ -191,8 +198,8 @@ var BaseAPI = /** @class */ (function () {
191
198
  };
192
199
  return [4 /*yield*/, axios_1.default.request(options)];
193
200
  case 1:
194
- accessToken = (_a.sent()).data.accessToken;
195
- return [2 /*return*/, accessToken];
201
+ response = _a.sent();
202
+ return [2 /*return*/, response.data];
196
203
  }
197
204
  });
198
205
  });
@@ -218,22 +225,23 @@ var BaseAPI = /** @class */ (function () {
218
225
  axios.interceptors.response.use(function (res) {
219
226
  return res;
220
227
  }, function (err) { return __awaiter(_this, void 0, void 0, function () {
221
- var originalConfig, tokenString, accessToken, _error_1, tokenString, accessToken, _error_2;
222
- return __generator(this, function (_a) {
223
- switch (_a.label) {
228
+ var originalConfig, _a, tokenString, permissions, accessToken, _error_1, _b, tokenString, permissions, accessToken, _error_2;
229
+ return __generator(this, function (_c) {
230
+ switch (_c.label) {
224
231
  case 0:
225
232
  originalConfig = err.config;
226
233
  if (!(err.response && !(err.response instanceof XMLHttpRequest))) return [3 /*break*/, 5];
227
234
  if (!((err.response.status === 401 || err.response.status === 403)
228
235
  && !originalConfig._retry)) return [3 /*break*/, 4];
229
236
  originalConfig._retry = true;
230
- _a.label = 1;
237
+ _c.label = 1;
231
238
  case 1:
232
- _a.trys.push([1, 3, , 4]);
239
+ _c.trys.push([1, 3, , 4]);
233
240
  return [4 /*yield*/, this.refreshTokenInternal()];
234
241
  case 2:
235
- tokenString = _a.sent();
242
+ _a = _c.sent(), tokenString = _a.accessToken, permissions = _a.permissions;
236
243
  accessToken = "Bearer ".concat(tokenString);
244
+ this.permissions = permissions;
237
245
  delete originalConfig.headers['Authorization'];
238
246
  originalConfig.headers['Authorization'] = accessToken;
239
247
  this.configuration.accessToken = accessToken;
@@ -241,7 +249,7 @@ var BaseAPI = /** @class */ (function () {
241
249
  this.storeTokenData(this.tokenData);
242
250
  return [2 /*return*/, axios(originalConfig)];
243
251
  case 3:
244
- _error_1 = _a.sent();
252
+ _error_1 = _c.sent();
245
253
  if (_error_1.response && _error_1.response.data) {
246
254
  return [2 /*return*/, Promise.reject(_error_1.response.data)];
247
255
  }
@@ -252,13 +260,14 @@ var BaseAPI = /** @class */ (function () {
252
260
  && originalConfig.headers.hasOwnProperty('Authorization')
253
261
  && _retry_count < 4)) return [3 /*break*/, 9];
254
262
  _retry_count++;
255
- _a.label = 6;
263
+ _c.label = 6;
256
264
  case 6:
257
- _a.trys.push([6, 8, , 9]);
265
+ _c.trys.push([6, 8, , 9]);
258
266
  return [4 /*yield*/, this.refreshTokenInternal()];
259
267
  case 7:
260
- tokenString = _a.sent();
268
+ _b = _c.sent(), tokenString = _b.accessToken, permissions = _b.permissions;
261
269
  accessToken = "Bearer ".concat(tokenString);
270
+ this.permissions = permissions;
262
271
  _retry = true;
263
272
  originalConfig.headers['Authorization'] = accessToken;
264
273
  this.configuration.accessToken = accessToken;
@@ -266,7 +275,7 @@ var BaseAPI = /** @class */ (function () {
266
275
  this.storeTokenData(this.tokenData);
267
276
  return [2 /*return*/, axios.request(__assign({}, originalConfig))];
268
277
  case 8:
269
- _error_2 = _a.sent();
278
+ _error_2 = _c.sent();
270
279
  if (_error_2.response && _error_2.response.data) {
271
280
  return [2 /*return*/, Promise.reject(_error_2.response.data)];
272
281
  }
package/dist/common.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Emil Payment Service
3
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
3
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
4
4
  *
5
5
  * The version of the OpenAPI document: 1.0
6
6
  * Contact: kontakt@emil.de
@@ -65,7 +65,7 @@ export declare const toPathString: (url: URL) => string;
65
65
  export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
66
66
  /**
67
67
  * Emil Payment Service
68
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
68
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
69
69
  *
70
70
  * The version of the OpenAPI document: 1.0
71
71
  * Contact: kontakt@emil.de
package/dist/common.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Emil Payment Service
6
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
6
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0
9
9
  * Contact: kontakt@emil.de
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Emil Payment Service
3
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
3
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
4
4
  *
5
5
  * The version of the OpenAPI document: 1.0
6
6
  * Contact: kontakt@emil.de
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Emil Payment Service
6
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
6
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0
9
9
  * Contact: kontakt@emil.de
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Emil Payment Service
3
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
3
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
4
4
  *
5
5
  * The version of the OpenAPI document: 1.0
6
6
  * Contact: kontakt@emil.de
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Emil Payment Service
6
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
6
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0
9
9
  * Contact: kontakt@emil.de
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Emil Payment Service
3
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface BankAccountClassWithoutExpandProperties
16
+ */
17
+ export interface BankAccountClassWithoutExpandProperties {
18
+ /**
19
+ * Internal unique identifier for the object. You should not have to use this, use code instead.
20
+ * @type {number}
21
+ * @memberof BankAccountClassWithoutExpandProperties
22
+ */
23
+ 'id': number;
24
+ /**
25
+ * Unique identifier for the object.
26
+ * @type {string}
27
+ * @memberof BankAccountClassWithoutExpandProperties
28
+ */
29
+ 'code': string;
30
+ /**
31
+ * User account code associated with bank account.
32
+ * @type {string}
33
+ * @memberof BankAccountClassWithoutExpandProperties
34
+ */
35
+ 'accountCode'?: string;
36
+ /**
37
+ * International bank account number with witch the bank account is created.
38
+ * @type {string}
39
+ * @memberof BankAccountClassWithoutExpandProperties
40
+ */
41
+ 'iban': string;
42
+ /**
43
+ * Business Identifier Codes.
44
+ * @type {string}
45
+ * @memberof BankAccountClassWithoutExpandProperties
46
+ */
47
+ 'bic': string;
48
+ /**
49
+ * Bank account holder.
50
+ * @type {string}
51
+ * @memberof BankAccountClassWithoutExpandProperties
52
+ */
53
+ 'accountHolder': string;
54
+ /**
55
+ * Time at which the object was created.
56
+ * @type {string}
57
+ * @memberof BankAccountClassWithoutExpandProperties
58
+ */
59
+ 'createdAt': string;
60
+ /**
61
+ * Time at which the object was updated.
62
+ * @type {string}
63
+ * @memberof BankAccountClassWithoutExpandProperties
64
+ */
65
+ 'updatedAt': string;
66
+ /**
67
+ * Partner code associated with bank account.
68
+ * @type {string}
69
+ * @memberof BankAccountClassWithoutExpandProperties
70
+ */
71
+ 'partnerCode'?: string;
72
+ /**
73
+ * Identifier of the user who created the record.
74
+ * @type {string}
75
+ * @memberof BankAccountClassWithoutExpandProperties
76
+ */
77
+ 'createdBy': string;
78
+ /**
79
+ * Identifier of the user who last updated the record.
80
+ * @type {string}
81
+ * @memberof BankAccountClassWithoutExpandProperties
82
+ */
83
+ 'updatedBy': string;
84
+ }
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Emil Payment Service
6
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
6
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0
9
9
  * Contact: kontakt@emil.de
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Emil Payment Service
3
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { PrimaryBankAccountResponseClass } from './primary-bank-account-response-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface BankAccountClass
17
+ */
18
+ export interface BankAccountClass {
19
+ /**
20
+ * Internal unique identifier for the object. You should not have to use this, use code instead.
21
+ * @type {number}
22
+ * @memberof BankAccountClass
23
+ */
24
+ 'id': number;
25
+ /**
26
+ * Unique identifier for the object.
27
+ * @type {string}
28
+ * @memberof BankAccountClass
29
+ */
30
+ 'code': string;
31
+ /**
32
+ * User account code associated with bank account.
33
+ * @type {string}
34
+ * @memberof BankAccountClass
35
+ */
36
+ 'accountCode'?: string;
37
+ /**
38
+ * International bank account number with witch the bank account is created.
39
+ * @type {string}
40
+ * @memberof BankAccountClass
41
+ */
42
+ 'iban': string;
43
+ /**
44
+ * Business Identifier Codes.
45
+ * @type {string}
46
+ * @memberof BankAccountClass
47
+ */
48
+ 'bic': string;
49
+ /**
50
+ * Bank account holder.
51
+ * @type {string}
52
+ * @memberof BankAccountClass
53
+ */
54
+ 'accountHolder': string;
55
+ /**
56
+ * Time at which the object was created.
57
+ * @type {string}
58
+ * @memberof BankAccountClass
59
+ */
60
+ 'createdAt': string;
61
+ /**
62
+ * Time at which the object was updated.
63
+ * @type {string}
64
+ * @memberof BankAccountClass
65
+ */
66
+ 'updatedAt': string;
67
+ /**
68
+ * Partner code associated with bank account.
69
+ * @type {string}
70
+ * @memberof BankAccountClass
71
+ */
72
+ 'partnerCode'?: string;
73
+ /**
74
+ * Primary bank account data
75
+ * @type {PrimaryBankAccountResponseClass}
76
+ * @memberof BankAccountClass
77
+ */
78
+ 'primaryBankAccount'?: PrimaryBankAccountResponseClass;
79
+ /**
80
+ * Identifier of the user who created the record.
81
+ * @type {string}
82
+ * @memberof BankAccountClass
83
+ */
84
+ 'createdBy': string;
85
+ /**
86
+ * Identifier of the user who last updated the record.
87
+ * @type {string}
88
+ * @memberof BankAccountClass
89
+ */
90
+ 'updatedBy': string;
91
+ }
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Emil Payment Service
6
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
6
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0
9
9
  * Contact: kontakt@emil.de
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Emil Payment Service
3
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface BankTransactionClassWithoutExpandProperties
16
+ */
17
+ export interface BankTransactionClassWithoutExpandProperties {
18
+ /**
19
+ * Internal unique identifier for the object. You should not have to use this, use code instead.
20
+ * @type {number}
21
+ * @memberof BankTransactionClassWithoutExpandProperties
22
+ */
23
+ 'id': number;
24
+ /**
25
+ * Unique identifier for the object.
26
+ * @type {string}
27
+ * @memberof BankTransactionClassWithoutExpandProperties
28
+ */
29
+ 'code': string;
30
+ /**
31
+ * bank account
32
+ * @type {number}
33
+ * @memberof BankTransactionClassWithoutExpandProperties
34
+ */
35
+ 'bankAccountId': number;
36
+ /**
37
+ * Account number of the bank account
38
+ * @type {string}
39
+ * @memberof BankTransactionClassWithoutExpandProperties
40
+ */
41
+ 'bankAccountNumber': string;
42
+ /**
43
+ * Reference number derived from the MT940 swift Insturctions
44
+ * @type {string}
45
+ * @memberof BankTransactionClassWithoutExpandProperties
46
+ */
47
+ 'swiftMessageReference'?: string;
48
+ /**
49
+ * Currency of the transaction.
50
+ * @type {string}
51
+ * @memberof BankTransactionClassWithoutExpandProperties
52
+ */
53
+ 'currency': string;
54
+ /**
55
+ * Amount of the transaction - can be negative or positive
56
+ * @type {string}
57
+ * @memberof BankTransactionClassWithoutExpandProperties
58
+ */
59
+ 'amount': string;
60
+ /**
61
+ * Date on which the transaction was executed. Also known as Value Date
62
+ * @type {string}
63
+ * @memberof BankTransactionClassWithoutExpandProperties
64
+ */
65
+ 'transactionDate': string;
66
+ /**
67
+ * Date on which the transaction entry was made in the system. Also known as Booking Date
68
+ * @type {string}
69
+ * @memberof BankTransactionClassWithoutExpandProperties
70
+ */
71
+ 'entryDate': string;
72
+ /**
73
+ * Optional reference number that can be given by the customer or bank to uniquely identify a transaction. If no transaction reference is provided the value is set to \'NONREF\'
74
+ * @type {string}
75
+ * @memberof BankTransactionClassWithoutExpandProperties
76
+ */
77
+ 'transactionReference': string;
78
+ /**
79
+ * Optional metadata that can be provided by the customer or bank to give more context to the transaction
80
+ * @type {object}
81
+ * @memberof BankTransactionClassWithoutExpandProperties
82
+ */
83
+ 'metadata'?: object;
84
+ /**
85
+ * The id of the PSP transaction that this bank transaction is linked to
86
+ * @type {number}
87
+ * @memberof BankTransactionClassWithoutExpandProperties
88
+ */
89
+ 'linkedTransactionId'?: number;
90
+ /**
91
+ * The code of the invoice that this bank transaction is linked to
92
+ * @type {string}
93
+ * @memberof BankTransactionClassWithoutExpandProperties
94
+ */
95
+ 'linkedInvoiceCode'?: string;
96
+ /**
97
+ * The identifying invoice number that this bank transaction is linked to
98
+ * @type {string}
99
+ * @memberof BankTransactionClassWithoutExpandProperties
100
+ */
101
+ 'linkedInvoiceNumber'?: string;
102
+ /**
103
+ * Boolean flag to indicate if the bank transaction is linked to an invoice - defaults to false
104
+ * @type {boolean}
105
+ * @memberof BankTransactionClassWithoutExpandProperties
106
+ */
107
+ 'isLinked': boolean;
108
+ /**
109
+ * Time at which the object was created.
110
+ * @type {string}
111
+ * @memberof BankTransactionClassWithoutExpandProperties
112
+ */
113
+ 'createdAt': string;
114
+ /**
115
+ * Identifier of the user who created the record.
116
+ * @type {string}
117
+ * @memberof BankTransactionClassWithoutExpandProperties
118
+ */
119
+ 'createdBy': string;
120
+ /**
121
+ * Identifier of the user who last updated the record.
122
+ * @type {string}
123
+ * @memberof BankTransactionClassWithoutExpandProperties
124
+ */
125
+ 'updatedBy': string;
126
+ }
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Emil Payment Service
6
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
6
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0
9
9
  * Contact: kontakt@emil.de