@things-factory/accounting 10.1.124 → 10.1.135

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 (257) hide show
  1. package/dist-client/route.d.ts +1 -1
  2. package/dist-client/route.js +0 -12
  3. package/dist-client/route.js.map +1 -1
  4. package/dist-client/tsconfig.tsbuildinfo +1 -1
  5. package/dist-server/index.d.ts +0 -1
  6. package/dist-server/index.js +0 -1
  7. package/dist-server/index.js.map +1 -1
  8. package/dist-server/service/account/account-history.d.ts +13 -6
  9. package/dist-server/service/account/account-history.js +44 -17
  10. package/dist-server/service/account/account-history.js.map +1 -1
  11. package/dist-server/service/account/account-mutation.js +8 -8
  12. package/dist-server/service/account/account-mutation.js.map +1 -1
  13. package/dist-server/service/account/account-query.js +2 -2
  14. package/dist-server/service/account/account-query.js.map +1 -1
  15. package/dist-server/service/account/account-type.d.ts +16 -0
  16. package/dist-server/service/account/account-type.js +71 -13
  17. package/dist-server/service/account/account-type.js.map +1 -1
  18. package/dist-server/service/account/account.d.ts +9 -3
  19. package/dist-server/service/account/account.js +34 -8
  20. package/dist-server/service/account/account.js.map +1 -1
  21. package/dist-server/service/account/index.d.ts +1 -1
  22. package/dist-server/service/accounting-category/accounting-category-mutation.js +8 -8
  23. package/dist-server/service/accounting-category/accounting-category-mutation.js.map +1 -1
  24. package/dist-server/service/accounting-category/accounting-category-query.js +2 -2
  25. package/dist-server/service/accounting-category/accounting-category-query.js.map +1 -1
  26. package/dist-server/service/accounting-category/index.d.ts +1 -1
  27. package/dist-server/service/accounting-document/accounting-document-mutation.js +12 -3
  28. package/dist-server/service/accounting-document/accounting-document-mutation.js.map +1 -1
  29. package/dist-server/service/accounting-document/accounting-document-query.js +2 -0
  30. package/dist-server/service/accounting-document/accounting-document-query.js.map +1 -1
  31. package/dist-server/service/accounting-document/index.d.ts +1 -1
  32. package/dist-server/service/bank-account/bank-account-history.d.ts +11 -14
  33. package/dist-server/service/bank-account/bank-account-history.js +46 -59
  34. package/dist-server/service/bank-account/bank-account-history.js.map +1 -1
  35. package/dist-server/service/bank-account/bank-account-mutation.d.ts +1 -2
  36. package/dist-server/service/bank-account/bank-account-mutation.js +25 -69
  37. package/dist-server/service/bank-account/bank-account-mutation.js.map +1 -1
  38. package/dist-server/service/bank-account/bank-account-query.js +2 -0
  39. package/dist-server/service/bank-account/bank-account-query.js.map +1 -1
  40. package/dist-server/service/bank-account/bank-account-service.d.ts +5 -0
  41. package/dist-server/service/bank-account/bank-account-service.js +21 -0
  42. package/dist-server/service/bank-account/bank-account-service.js.map +1 -0
  43. package/dist-server/service/bank-account/bank-account-type.d.ts +13 -19
  44. package/dist-server/service/bank-account/bank-account-type.js +45 -69
  45. package/dist-server/service/bank-account/bank-account-type.js.map +1 -1
  46. package/dist-server/service/bank-account/bank-account.d.ts +14 -17
  47. package/dist-server/service/bank-account/bank-account.js +45 -57
  48. package/dist-server/service/bank-account/bank-account.js.map +1 -1
  49. package/dist-server/service/bank-account/index.d.ts +1 -1
  50. package/dist-server/service/bank-statement/bank-statement-query.d.ts +14 -0
  51. package/dist-server/service/bank-statement/bank-statement-query.js +92 -0
  52. package/dist-server/service/bank-statement/bank-statement-query.js.map +1 -0
  53. package/dist-server/service/bank-statement/bank-statement.d.ts +26 -0
  54. package/dist-server/service/bank-statement/bank-statement.js +109 -0
  55. package/dist-server/service/bank-statement/bank-statement.js.map +1 -0
  56. package/dist-server/service/bank-statement/index.d.ts +5 -0
  57. package/dist-server/service/bank-statement/index.js +9 -0
  58. package/dist-server/service/bank-statement/index.js.map +1 -0
  59. package/dist-server/service/cash-flow-type.d.ts +5 -0
  60. package/dist-server/service/cash-flow-type.js +15 -0
  61. package/dist-server/service/cash-flow-type.js.map +1 -0
  62. package/dist-server/service/financial-institution/financial-institution-mutation.js +10 -1
  63. package/dist-server/service/financial-institution/financial-institution-mutation.js.map +1 -1
  64. package/dist-server/service/financial-institution/financial-institution-query.js +14 -6
  65. package/dist-server/service/financial-institution/financial-institution-query.js.map +1 -1
  66. package/dist-server/service/financial-statement/financial-statement-history.d.ts +11 -9
  67. package/dist-server/service/financial-statement/financial-statement-history.js +44 -33
  68. package/dist-server/service/financial-statement/financial-statement-history.js.map +1 -1
  69. package/dist-server/service/financial-statement/financial-statement-line.d.ts +24 -0
  70. package/dist-server/service/financial-statement/financial-statement-line.js +108 -0
  71. package/dist-server/service/financial-statement/financial-statement-line.js.map +1 -0
  72. package/dist-server/service/financial-statement/financial-statement-mutation.d.ts +1 -8
  73. package/dist-server/service/financial-statement/financial-statement-mutation.js +11 -136
  74. package/dist-server/service/financial-statement/financial-statement-mutation.js.map +1 -1
  75. package/dist-server/service/financial-statement/financial-statement-query.d.ts +8 -7
  76. package/dist-server/service/financial-statement/financial-statement-query.js +42 -32
  77. package/dist-server/service/financial-statement/financial-statement-query.js.map +1 -1
  78. package/dist-server/service/financial-statement/financial-statement-service.d.ts +33 -0
  79. package/dist-server/service/financial-statement/financial-statement-service.js +44 -0
  80. package/dist-server/service/financial-statement/financial-statement-service.js.map +1 -0
  81. package/dist-server/service/financial-statement/financial-statement.d.ts +19 -11
  82. package/dist-server/service/financial-statement/financial-statement.js +70 -62
  83. package/dist-server/service/financial-statement/financial-statement.js.map +1 -1
  84. package/dist-server/service/financial-statement/index.d.ts +4 -3
  85. package/dist-server/service/financial-statement/index.js +2 -2
  86. package/dist-server/service/financial-statement/index.js.map +1 -1
  87. package/dist-server/service/fiscal-month/fiscal-month-mutation.js +6 -6
  88. package/dist-server/service/fiscal-month/fiscal-month-mutation.js.map +1 -1
  89. package/dist-server/service/fiscal-month/fiscal-month-query.js +2 -2
  90. package/dist-server/service/fiscal-month/fiscal-month-query.js.map +1 -1
  91. package/dist-server/service/fiscal-month/index.d.ts +1 -1
  92. package/dist-server/service/fiscal-quarter/fiscal-quarter-mutation.js +6 -6
  93. package/dist-server/service/fiscal-quarter/fiscal-quarter-mutation.js.map +1 -1
  94. package/dist-server/service/fiscal-quarter/fiscal-quarter-query.js +2 -2
  95. package/dist-server/service/fiscal-quarter/fiscal-quarter-query.js.map +1 -1
  96. package/dist-server/service/fiscal-quarter/index.d.ts +1 -1
  97. package/dist-server/service/fiscal-year/fiscal-year-mutation.js +6 -6
  98. package/dist-server/service/fiscal-year/fiscal-year-mutation.js.map +1 -1
  99. package/dist-server/service/fiscal-year/fiscal-year-query.js +2 -2
  100. package/dist-server/service/fiscal-year/fiscal-year-query.js.map +1 -1
  101. package/dist-server/service/fiscal-year/index.d.ts +1 -1
  102. package/dist-server/service/index.d.ts +15 -3
  103. package/dist-server/service/index.js +30 -13
  104. package/dist-server/service/index.js.map +1 -1
  105. package/dist-server/service/payment/index.d.ts +2 -1
  106. package/dist-server/service/payment/index.js +1 -0
  107. package/dist-server/service/payment/index.js.map +1 -1
  108. package/dist-server/service/payment/payment-history.d.ts +9 -16
  109. package/dist-server/service/payment/payment-history.js +36 -70
  110. package/dist-server/service/payment/payment-history.js.map +1 -1
  111. package/dist-server/service/payment/payment-mutation.d.ts +0 -1
  112. package/dist-server/service/payment/payment-mutation.js +19 -84
  113. package/dist-server/service/payment/payment-mutation.js.map +1 -1
  114. package/dist-server/service/payment/payment-query.d.ts +3 -0
  115. package/dist-server/service/payment/payment-query.js +32 -3
  116. package/dist-server/service/payment/payment-query.js.map +1 -1
  117. package/dist-server/service/payment/payment-service.d.ts +16 -0
  118. package/dist-server/service/payment/payment-service.js +140 -0
  119. package/dist-server/service/payment/payment-service.js.map +1 -0
  120. package/dist-server/service/payment/payment-targets.d.ts +31 -0
  121. package/dist-server/service/payment/payment-targets.js +19 -0
  122. package/dist-server/service/payment/payment-targets.js.map +1 -0
  123. package/dist-server/service/payment/payment-type.d.ts +13 -17
  124. package/dist-server/service/payment/payment-type.js +35 -51
  125. package/dist-server/service/payment/payment-type.js.map +1 -1
  126. package/dist-server/service/payment/payment.d.ts +23 -22
  127. package/dist-server/service/payment/payment.js +65 -95
  128. package/dist-server/service/payment/payment.js.map +1 -1
  129. package/dist-server/service/payment/transfer-target.d.ts +1 -0
  130. package/dist-server/service/payment/transfer-target.js +43 -0
  131. package/dist-server/service/payment/transfer-target.js.map +1 -0
  132. package/dist-server/service/recurring-cash-item/index.d.ts +6 -0
  133. package/dist-server/service/recurring-cash-item/index.js +10 -0
  134. package/dist-server/service/recurring-cash-item/index.js.map +1 -0
  135. package/dist-server/service/recurring-cash-item/recurring-cash-item-mutation.d.ts +7 -0
  136. package/dist-server/service/recurring-cash-item/recurring-cash-item-mutation.js +63 -0
  137. package/dist-server/service/recurring-cash-item/recurring-cash-item-mutation.js.map +1 -0
  138. package/dist-server/service/recurring-cash-item/recurring-cash-item-query.d.ts +15 -0
  139. package/dist-server/service/recurring-cash-item/recurring-cash-item-query.js +101 -0
  140. package/dist-server/service/recurring-cash-item/recurring-cash-item-query.js.map +1 -0
  141. package/dist-server/service/recurring-cash-item/recurring-cash-item-service.d.ts +23 -0
  142. package/dist-server/service/recurring-cash-item/recurring-cash-item-service.js +91 -0
  143. package/dist-server/service/recurring-cash-item/recurring-cash-item-service.js.map +1 -0
  144. package/dist-server/service/recurring-cash-item/recurring-cash-item-type.d.ts +23 -0
  145. package/dist-server/service/recurring-cash-item/recurring-cash-item-type.js +85 -0
  146. package/dist-server/service/recurring-cash-item/recurring-cash-item-type.js.map +1 -0
  147. package/dist-server/service/recurring-cash-item/recurring-cash-item.d.ts +35 -0
  148. package/dist-server/service/recurring-cash-item/recurring-cash-item.js +142 -0
  149. package/dist-server/service/recurring-cash-item/recurring-cash-item.js.map +1 -0
  150. package/dist-server/service/recurring-cash-item/recurring-schedule.d.ts +36 -0
  151. package/dist-server/service/recurring-cash-item/recurring-schedule.js +41 -0
  152. package/dist-server/service/recurring-cash-item/recurring-schedule.js.map +1 -0
  153. package/dist-server/service/transaction/index.d.ts +2 -2
  154. package/dist-server/service/transaction/transaction-history.d.ts +42 -15
  155. package/dist-server/service/transaction/transaction-history.js +160 -54
  156. package/dist-server/service/transaction/transaction-history.js.map +1 -1
  157. package/dist-server/service/transaction/transaction-mutation.d.ts +0 -1
  158. package/dist-server/service/transaction/transaction-mutation.js +18 -83
  159. package/dist-server/service/transaction/transaction-mutation.js.map +1 -1
  160. package/dist-server/service/transaction/transaction-period.d.ts +16 -0
  161. package/dist-server/service/transaction/transaction-period.js +49 -0
  162. package/dist-server/service/transaction/transaction-period.js.map +1 -0
  163. package/dist-server/service/transaction/transaction-query.d.ts +12 -0
  164. package/dist-server/service/transaction/transaction-query.js +86 -4
  165. package/dist-server/service/transaction/transaction-query.js.map +1 -1
  166. package/dist-server/service/transaction/transaction-service.d.ts +30 -0
  167. package/dist-server/service/transaction/transaction-service.js +130 -0
  168. package/dist-server/service/transaction/transaction-service.js.map +1 -0
  169. package/dist-server/service/transaction/transaction-type.d.ts +39 -7
  170. package/dist-server/service/transaction/transaction-type.js +145 -23
  171. package/dist-server/service/transaction/transaction-type.js.map +1 -1
  172. package/dist-server/service/transaction/transaction.d.ts +58 -31
  173. package/dist-server/service/transaction/transaction.js +213 -111
  174. package/dist-server/service/transaction/transaction.js.map +1 -1
  175. package/dist-server/tsconfig.tsbuildinfo +1 -1
  176. package/package.json +8 -4
  177. package/things-factory.config.js +0 -4
  178. package/translations/en.json +34 -2
  179. package/translations/ja.json +0 -1
  180. package/translations/ko.json +34 -2
  181. package/translations/ms.json +0 -1
  182. package/translations/zh.json +0 -1
  183. package/dist-client/pages/account/account-importer.d.ts +0 -22
  184. package/dist-client/pages/account/account-importer.js +0 -99
  185. package/dist-client/pages/account/account-importer.js.map +0 -1
  186. package/dist-client/pages/account/account-list-page.d.ts +0 -57
  187. package/dist-client/pages/account/account-list-page.js +0 -306
  188. package/dist-client/pages/account/account-list-page.js.map +0 -1
  189. package/dist-client/pages/bank-account/bank-account-importer.d.ts +0 -23
  190. package/dist-client/pages/bank-account/bank-account-importer.js +0 -92
  191. package/dist-client/pages/bank-account/bank-account-importer.js.map +0 -1
  192. package/dist-client/pages/bank-account/bank-account-list-page.d.ts +0 -60
  193. package/dist-client/pages/bank-account/bank-account-list-page.js +0 -317
  194. package/dist-client/pages/bank-account/bank-account-list-page.js.map +0 -1
  195. package/dist-client/pages/financial-statement/financial-statement-importer.d.ts +0 -22
  196. package/dist-client/pages/financial-statement/financial-statement-importer.js +0 -99
  197. package/dist-client/pages/financial-statement/financial-statement-importer.js.map +0 -1
  198. package/dist-client/pages/financial-statement/financial-statement-list-page.d.ts +0 -57
  199. package/dist-client/pages/financial-statement/financial-statement-list-page.js +0 -280
  200. package/dist-client/pages/financial-statement/financial-statement-list-page.js.map +0 -1
  201. package/dist-client/pages/income-statement/income-statement-importer.d.ts +0 -22
  202. package/dist-client/pages/income-statement/income-statement-importer.js +0 -99
  203. package/dist-client/pages/income-statement/income-statement-importer.js.map +0 -1
  204. package/dist-client/pages/income-statement/income-statement-list-page.d.ts +0 -57
  205. package/dist-client/pages/income-statement/income-statement-list-page.js +0 -280
  206. package/dist-client/pages/income-statement/income-statement-list-page.js.map +0 -1
  207. package/dist-client/pages/payment/payment-importer.d.ts +0 -23
  208. package/dist-client/pages/payment/payment-importer.js +0 -92
  209. package/dist-client/pages/payment/payment-importer.js.map +0 -1
  210. package/dist-client/pages/payment/payment-list-page.d.ts +0 -60
  211. package/dist-client/pages/payment/payment-list-page.js +0 -317
  212. package/dist-client/pages/payment/payment-list-page.js.map +0 -1
  213. package/dist-client/pages/transaction/transaction-importer.d.ts +0 -22
  214. package/dist-client/pages/transaction/transaction-importer.js +0 -99
  215. package/dist-client/pages/transaction/transaction-importer.js.map +0 -1
  216. package/dist-client/pages/transaction/transaction-list-page.d.ts +0 -57
  217. package/dist-client/pages/transaction/transaction-list-page.js +0 -280
  218. package/dist-client/pages/transaction/transaction-list-page.js.map +0 -1
  219. package/dist-server/controllers/index.d.ts +0 -1
  220. package/dist-server/controllers/index.js +0 -5
  221. package/dist-server/controllers/index.js.map +0 -1
  222. package/dist-server/controllers/summary-statements.d.ts +0 -4
  223. package/dist-server/controllers/summary-statements.js +0 -149
  224. package/dist-server/controllers/summary-statements.js.map +0 -1
  225. package/dist-server/migrations/1725201567284-seed-country-codes.d.ts +0 -5
  226. package/dist-server/migrations/1725201567284-seed-country-codes.js +0 -255
  227. package/dist-server/migrations/1725201567284-seed-country-codes.js.map +0 -1
  228. package/dist-server/service/financial-statement/financial-statement-line-item.d.ts +0 -19
  229. package/dist-server/service/financial-statement/financial-statement-line-item.js +0 -94
  230. package/dist-server/service/financial-statement/financial-statement-line-item.js.map +0 -1
  231. package/dist-server/service/financial-statement/financial-statement-type.d.ts +0 -20
  232. package/dist-server/service/financial-statement/financial-statement-type.js +0 -77
  233. package/dist-server/service/financial-statement/financial-statement-type.js.map +0 -1
  234. package/dist-server/service/income-statement/event-subscriber.d.ts +0 -7
  235. package/dist-server/service/income-statement/event-subscriber.js +0 -21
  236. package/dist-server/service/income-statement/event-subscriber.js.map +0 -1
  237. package/dist-server/service/income-statement/income-statement-history.d.ts +0 -28
  238. package/dist-server/service/income-statement/income-statement-history.js +0 -146
  239. package/dist-server/service/income-statement/income-statement-history.js.map +0 -1
  240. package/dist-server/service/income-statement/income-statement-line-item.d.ts +0 -19
  241. package/dist-server/service/income-statement/income-statement-line-item.js +0 -96
  242. package/dist-server/service/income-statement/income-statement-line-item.js.map +0 -1
  243. package/dist-server/service/income-statement/income-statement-mutation.d.ts +0 -10
  244. package/dist-server/service/income-statement/income-statement-mutation.js +0 -159
  245. package/dist-server/service/income-statement/income-statement-mutation.js.map +0 -1
  246. package/dist-server/service/income-statement/income-statement-query.d.ts +0 -11
  247. package/dist-server/service/income-statement/income-statement-query.js +0 -81
  248. package/dist-server/service/income-statement/income-statement-query.js.map +0 -1
  249. package/dist-server/service/income-statement/income-statement-type.d.ts +0 -20
  250. package/dist-server/service/income-statement/income-statement-type.js +0 -77
  251. package/dist-server/service/income-statement/income-statement-type.js.map +0 -1
  252. package/dist-server/service/income-statement/income-statement.d.ts +0 -28
  253. package/dist-server/service/income-statement/income-statement.js +0 -137
  254. package/dist-server/service/income-statement/income-statement.js.map +0 -1
  255. package/dist-server/service/income-statement/index.d.ts +0 -8
  256. package/dist-server/service/income-statement/index.js +0 -13
  257. package/dist-server/service/income-statement/index.js.map +0 -1
@@ -3,69 +3,86 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.subscribers = exports.entities = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  /* EXPORT ENTITY TYPES */
6
- tslib_1.__exportStar(require("./income-statement/income-statement"), exports);
6
+ tslib_1.__exportStar(require("./cash-flow-type"), exports);
7
7
  tslib_1.__exportStar(require("./financial-statement/financial-statement"), exports);
8
8
  tslib_1.__exportStar(require("./accounting-category/accounting-category"), exports);
9
9
  tslib_1.__exportStar(require("./transaction/transaction"), exports);
10
10
  tslib_1.__exportStar(require("./bank-account/bank-account"), exports);
11
+ tslib_1.__exportStar(require("./bank-statement/bank-statement"), exports);
11
12
  tslib_1.__exportStar(require("./payment/payment"), exports);
12
13
  tslib_1.__exportStar(require("./account/account"), exports);
13
14
  tslib_1.__exportStar(require("./accounting-document/accounting-document"), exports);
15
+ tslib_1.__exportStar(require("./recurring-cash-item/recurring-cash-item"), exports);
16
+ tslib_1.__exportStar(require("./financial-institution/financial-institution"), exports);
14
17
  tslib_1.__exportStar(require("./fiscal-month/fiscal-month"), exports);
15
18
  tslib_1.__exportStar(require("./fiscal-quarter/fiscal-quarter"), exports);
16
19
  tslib_1.__exportStar(require("./fiscal-year/fiscal-year"), exports);
20
+ /* EXPORT SERVICES */
21
+ tslib_1.__exportStar(require("./transaction/transaction-period"), exports);
22
+ tslib_1.__exportStar(require("./transaction/transaction-service"), exports);
23
+ tslib_1.__exportStar(require("./bank-account/bank-account-service"), exports);
24
+ tslib_1.__exportStar(require("./payment/payment-targets"), exports);
25
+ tslib_1.__exportStar(require("./payment/payment-service"), exports);
26
+ tslib_1.__exportStar(require("./financial-statement/financial-statement-line"), exports);
27
+ tslib_1.__exportStar(require("./financial-statement/financial-statement-service"), exports);
28
+ tslib_1.__exportStar(require("./recurring-cash-item/recurring-schedule"), exports);
29
+ tslib_1.__exportStar(require("./recurring-cash-item/recurring-cash-item-service"), exports);
17
30
  /* IMPORT ENTITIES AND RESOLVERS */
18
- const income_statement_1 = require("./income-statement");
19
31
  const financial_statement_1 = require("./financial-statement");
20
32
  const accounting_category_1 = require("./accounting-category");
21
33
  const transaction_1 = require("./transaction");
22
34
  const bank_account_1 = require("./bank-account");
35
+ const bank_statement_1 = require("./bank-statement");
23
36
  const payment_1 = require("./payment");
24
37
  const account_1 = require("./account");
25
38
  const accounting_document_1 = require("./accounting-document");
39
+ const recurring_cash_item_1 = require("./recurring-cash-item");
40
+ const financial_institution_1 = require("./financial-institution");
26
41
  const fiscal_month_1 = require("./fiscal-month");
27
42
  const fiscal_quarter_1 = require("./fiscal-quarter");
28
43
  const fiscal_year_1 = require("./fiscal-year");
29
44
  exports.entities = [
30
- /* ENTITIES */
31
- ...income_statement_1.entities,
32
45
  ...financial_statement_1.entities,
33
46
  ...accounting_category_1.entities,
34
47
  ...transaction_1.entities,
35
- ...account_1.entities,
36
- ...accounting_document_1.entities,
37
48
  ...bank_account_1.entities,
49
+ ...bank_statement_1.entities,
38
50
  ...payment_1.entities,
51
+ ...account_1.entities,
52
+ ...accounting_document_1.entities,
53
+ ...recurring_cash_item_1.entities,
54
+ ...financial_institution_1.entities,
39
55
  ...fiscal_month_1.entities,
40
56
  ...fiscal_quarter_1.entities,
41
57
  ...fiscal_year_1.entities
42
58
  ];
43
59
  exports.subscribers = [
44
- /* SUBSCRIBERS */
45
- ...income_statement_1.subscribers,
46
60
  ...financial_statement_1.subscribers,
47
61
  ...accounting_category_1.subscribers,
48
62
  ...transaction_1.subscribers,
49
- ...payment_1.subscribers,
50
63
  ...bank_account_1.subscribers,
64
+ ...bank_statement_1.subscribers,
65
+ ...payment_1.subscribers,
51
66
  ...account_1.subscribers,
52
67
  ...accounting_document_1.subscribers,
53
- ...fiscal_year_1.subscribers,
68
+ ...recurring_cash_item_1.subscribers,
69
+ ...financial_institution_1.subscribers,
54
70
  ...fiscal_month_1.subscribers,
55
71
  ...fiscal_quarter_1.subscribers,
56
72
  ...fiscal_year_1.subscribers
57
73
  ];
58
74
  exports.schema = {
59
75
  resolverClasses: [
60
- /* RESOLVER CLASSES */
61
- ...income_statement_1.resolvers,
62
76
  ...financial_statement_1.resolvers,
63
77
  ...accounting_category_1.resolvers,
64
78
  ...transaction_1.resolvers,
65
- ...payment_1.resolvers,
66
79
  ...bank_account_1.resolvers,
80
+ ...bank_statement_1.resolvers,
81
+ ...payment_1.resolvers,
67
82
  ...account_1.resolvers,
68
83
  ...accounting_document_1.resolvers,
84
+ ...recurring_cash_item_1.resolvers,
85
+ ...financial_institution_1.resolvers,
69
86
  ...fiscal_month_1.resolvers,
70
87
  ...fiscal_quarter_1.resolvers,
71
88
  ...fiscal_year_1.resolvers
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,8EAAmD;AACnD,oFAAyD;AACzD,oFAAyD;AACzD,oEAAyC;AACzC,sEAA2C;AAC3C,4DAAiC;AACjC,4DAAiC;AACjC,oFAAyD;AACzD,sEAA2C;AAC3C,0EAA+C;AAC/C,oEAAyC;AAEzC,mCAAmC;AACnC,yDAI2B;AAC3B,+DAI8B;AAC9B,+DAI8B;AAC9B,+CAIsB;AACtB,iDAIuB;AACvB,uCAIkB;AAClB,uCAIkB;AAClB,+DAI8B;AAC9B,iDAIuB;AACvB,qDAIyB;AACzB,+CAIsB;AAET,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,GAAG,2BAAuB;IAC1B,GAAG,8BAA0B;IAC7B,GAAG,8BAA0B;IAC7B,GAAG,sBAAmB;IACtB,GAAG,kBAAe;IAClB,GAAG,8BAA0B;IAC7B,GAAG,uBAAmB;IACtB,GAAG,kBAAe;IAClB,GAAG,uBAAmB;IACtB,GAAG,yBAAqB;IACxB,GAAG,sBAAkB;CACtB,CAAA;AAEY,QAAA,WAAW,GAAG;IACzB,iBAAiB;IACjB,GAAG,8BAA0B;IAC7B,GAAG,iCAA6B;IAChC,GAAG,iCAA6B;IAChC,GAAG,yBAAsB;IACzB,GAAG,qBAAkB;IACrB,GAAG,0BAAsB;IACzB,GAAG,qBAAkB;IACrB,GAAG,iCAA6B;IAChC,GAAG,yBAAqB;IACxB,GAAG,0BAAsB;IACzB,GAAG,4BAAwB;IAC3B,GAAG,yBAAqB;CACzB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,sBAAsB;QACtB,GAAG,4BAAwB;QAC3B,GAAG,+BAA2B;QAC9B,GAAG,+BAA2B;QAC9B,GAAG,uBAAoB;QACvB,GAAG,mBAAgB;QACnB,GAAG,wBAAoB;QACvB,GAAG,mBAAgB;QACnB,GAAG,+BAA2B;QAC9B,GAAG,wBAAoB;QACvB,GAAG,0BAAsB;QACzB,GAAG,uBAAmB;KACvB;CACF,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './income-statement/income-statement'\nexport * from './financial-statement/financial-statement'\nexport * from './accounting-category/accounting-category'\nexport * from './transaction/transaction'\nexport * from './bank-account/bank-account'\nexport * from './payment/payment'\nexport * from './account/account'\nexport * from './accounting-document/accounting-document'\nexport * from './fiscal-month/fiscal-month'\nexport * from './fiscal-quarter/fiscal-quarter'\nexport * from './fiscal-year/fiscal-year'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport {\n entities as IncomeStatementEntities,\n resolvers as IncomeStatementResolvers,\n subscribers as IncomeStatementSubscribers\n} from './income-statement'\nimport {\n entities as FinancialStatementEntities,\n resolvers as FinancialStatementResolvers,\n subscribers as FinancialStatementSubscribers\n} from './financial-statement'\nimport {\n entities as AccountingCategoryEntities,\n resolvers as AccountingCategoryResolvers,\n subscribers as AccountingCategorySubscribers\n} from './accounting-category'\nimport {\n entities as TransactionEntities,\n resolvers as TransactionResolvers,\n subscribers as TransactionSubscribers\n} from './transaction'\nimport {\n entities as BankAccountEntities,\n resolvers as BankAccountResolvers,\n subscribers as BankAccountSubscribers\n} from './bank-account'\nimport {\n entities as PaymentEntities,\n resolvers as PaymentResolvers,\n subscribers as PaymentSubscribers\n} from './payment'\nimport {\n entities as AccountEntities,\n resolvers as AccountResolvers,\n subscribers as AccountSubscribers\n} from './account'\nimport {\n entities as AccountingDocumentEntities,\n resolvers as AccountingDocumentResolvers,\n subscribers as AccountingDocumentSubscribers\n} from './accounting-document'\nimport {\n entities as FiscalMonthEntities,\n resolvers as FiscalMonthResolvers,\n subscribers as FiscalMonthSubscribers\n} from './fiscal-month'\nimport {\n entities as FiscalQuarterEntities,\n resolvers as FiscalQuarterResolvers,\n subscribers as FiscalQuarterSubscribers\n} from './fiscal-quarter'\nimport {\n entities as FiscalYearEntities,\n resolvers as FiscalYearResolvers,\n subscribers as FiscalYearSubscribers\n} from './fiscal-year'\n\nexport const entities = [\n /* ENTITIES */\n ...IncomeStatementEntities,\n ...FinancialStatementEntities,\n ...AccountingCategoryEntities,\n ...TransactionEntities,\n ...AccountEntities,\n ...AccountingDocumentEntities,\n ...BankAccountEntities,\n ...PaymentEntities,\n ...FiscalMonthEntities,\n ...FiscalQuarterEntities,\n ...FiscalYearEntities\n]\n\nexport const subscribers = [\n /* SUBSCRIBERS */\n ...IncomeStatementSubscribers,\n ...FinancialStatementSubscribers,\n ...AccountingCategorySubscribers,\n ...TransactionSubscribers,\n ...PaymentSubscribers,\n ...BankAccountSubscribers,\n ...AccountSubscribers,\n ...AccountingDocumentSubscribers,\n ...FiscalYearSubscribers,\n ...FiscalMonthSubscribers,\n ...FiscalQuarterSubscribers,\n ...FiscalYearSubscribers\n]\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n ...IncomeStatementResolvers,\n ...FinancialStatementResolvers,\n ...AccountingCategoryResolvers,\n ...TransactionResolvers,\n ...PaymentResolvers,\n ...BankAccountResolvers,\n ...AccountResolvers,\n ...AccountingDocumentResolvers,\n ...FiscalMonthResolvers,\n ...FiscalQuarterResolvers,\n ...FiscalYearResolvers\n ]\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,2DAAgC;AAChC,oFAAyD;AACzD,oFAAyD;AACzD,oEAAyC;AACzC,sEAA2C;AAC3C,0EAA+C;AAC/C,4DAAiC;AACjC,4DAAiC;AACjC,oFAAyD;AACzD,oFAAyD;AACzD,wFAA6D;AAC7D,sEAA2C;AAC3C,0EAA+C;AAC/C,oEAAyC;AAEzC,qBAAqB;AACrB,2EAAgD;AAChD,4EAAiD;AACjD,8EAAmD;AACnD,oEAAyC;AACzC,oEAAyC;AACzC,yFAA8D;AAC9D,4FAAiE;AACjE,mFAAwD;AACxD,4FAAiE;AAEjE,mCAAmC;AACnC,+DAI8B;AAC9B,+DAI8B;AAC9B,+CAIsB;AACtB,iDAIuB;AACvB,qDAIyB;AACzB,uCAIkB;AAClB,uCAIkB;AAClB,+DAI8B;AAC9B,+DAI8B;AAC9B,mEAIgC;AAChC,iDAIuB;AACvB,qDAIyB;AACzB,+CAIsB;AAET,QAAA,QAAQ,GAAG;IACtB,GAAG,8BAA0B;IAC7B,GAAG,8BAA0B;IAC7B,GAAG,sBAAmB;IACtB,GAAG,uBAAmB;IACtB,GAAG,yBAAqB;IACxB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,8BAA0B;IAC7B,GAAG,8BAAyB;IAC5B,GAAG,gCAA4B;IAC/B,GAAG,uBAAmB;IACtB,GAAG,yBAAqB;IACxB,GAAG,sBAAkB;CACtB,CAAA;AAEY,QAAA,WAAW,GAAG;IACzB,GAAG,iCAA6B;IAChC,GAAG,iCAA6B;IAChC,GAAG,yBAAsB;IACzB,GAAG,0BAAsB;IACzB,GAAG,4BAAwB;IAC3B,GAAG,qBAAkB;IACrB,GAAG,qBAAkB;IACrB,GAAG,iCAA6B;IAChC,GAAG,iCAA4B;IAC/B,GAAG,mCAA+B;IAClC,GAAG,0BAAsB;IACzB,GAAG,4BAAwB;IAC3B,GAAG,yBAAqB;CACzB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,GAAG,+BAA2B;QAC9B,GAAG,+BAA2B;QAC9B,GAAG,uBAAoB;QACvB,GAAG,wBAAoB;QACvB,GAAG,0BAAsB;QACzB,GAAG,mBAAgB;QACnB,GAAG,mBAAgB;QACnB,GAAG,+BAA2B;QAC9B,GAAG,+BAA0B;QAC7B,GAAG,iCAA6B;QAChC,GAAG,wBAAoB;QACvB,GAAG,0BAAsB;QACzB,GAAG,uBAAmB;KACvB;CACF,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './cash-flow-type'\nexport * from './financial-statement/financial-statement'\nexport * from './accounting-category/accounting-category'\nexport * from './transaction/transaction'\nexport * from './bank-account/bank-account'\nexport * from './bank-statement/bank-statement'\nexport * from './payment/payment'\nexport * from './account/account'\nexport * from './accounting-document/accounting-document'\nexport * from './recurring-cash-item/recurring-cash-item'\nexport * from './financial-institution/financial-institution'\nexport * from './fiscal-month/fiscal-month'\nexport * from './fiscal-quarter/fiscal-quarter'\nexport * from './fiscal-year/fiscal-year'\n\n/* EXPORT SERVICES */\nexport * from './transaction/transaction-period'\nexport * from './transaction/transaction-service'\nexport * from './bank-account/bank-account-service'\nexport * from './payment/payment-targets'\nexport * from './payment/payment-service'\nexport * from './financial-statement/financial-statement-line'\nexport * from './financial-statement/financial-statement-service'\nexport * from './recurring-cash-item/recurring-schedule'\nexport * from './recurring-cash-item/recurring-cash-item-service'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport {\n entities as FinancialStatementEntities,\n resolvers as FinancialStatementResolvers,\n subscribers as FinancialStatementSubscribers\n} from './financial-statement'\nimport {\n entities as AccountingCategoryEntities,\n resolvers as AccountingCategoryResolvers,\n subscribers as AccountingCategorySubscribers\n} from './accounting-category'\nimport {\n entities as TransactionEntities,\n resolvers as TransactionResolvers,\n subscribers as TransactionSubscribers\n} from './transaction'\nimport {\n entities as BankAccountEntities,\n resolvers as BankAccountResolvers,\n subscribers as BankAccountSubscribers\n} from './bank-account'\nimport {\n entities as BankStatementEntities,\n resolvers as BankStatementResolvers,\n subscribers as BankStatementSubscribers\n} from './bank-statement'\nimport {\n entities as PaymentEntities,\n resolvers as PaymentResolvers,\n subscribers as PaymentSubscribers\n} from './payment'\nimport {\n entities as AccountEntities,\n resolvers as AccountResolvers,\n subscribers as AccountSubscribers\n} from './account'\nimport {\n entities as AccountingDocumentEntities,\n resolvers as AccountingDocumentResolvers,\n subscribers as AccountingDocumentSubscribers\n} from './accounting-document'\nimport {\n entities as RecurringCashItemEntities,\n resolvers as RecurringCashItemResolvers,\n subscribers as RecurringCashItemSubscribers\n} from './recurring-cash-item'\nimport {\n entities as FinancialInstitutionEntities,\n resolvers as FinancialInstitutionResolvers,\n subscribers as FinancialInstitutionSubscribers\n} from './financial-institution'\nimport {\n entities as FiscalMonthEntities,\n resolvers as FiscalMonthResolvers,\n subscribers as FiscalMonthSubscribers\n} from './fiscal-month'\nimport {\n entities as FiscalQuarterEntities,\n resolvers as FiscalQuarterResolvers,\n subscribers as FiscalQuarterSubscribers\n} from './fiscal-quarter'\nimport {\n entities as FiscalYearEntities,\n resolvers as FiscalYearResolvers,\n subscribers as FiscalYearSubscribers\n} from './fiscal-year'\n\nexport const entities = [\n ...FinancialStatementEntities,\n ...AccountingCategoryEntities,\n ...TransactionEntities,\n ...BankAccountEntities,\n ...BankStatementEntities,\n ...PaymentEntities,\n ...AccountEntities,\n ...AccountingDocumentEntities,\n ...RecurringCashItemEntities,\n ...FinancialInstitutionEntities,\n ...FiscalMonthEntities,\n ...FiscalQuarterEntities,\n ...FiscalYearEntities\n]\n\nexport const subscribers = [\n ...FinancialStatementSubscribers,\n ...AccountingCategorySubscribers,\n ...TransactionSubscribers,\n ...BankAccountSubscribers,\n ...BankStatementSubscribers,\n ...PaymentSubscribers,\n ...AccountSubscribers,\n ...AccountingDocumentSubscribers,\n ...RecurringCashItemSubscribers,\n ...FinancialInstitutionSubscribers,\n ...FiscalMonthSubscribers,\n ...FiscalQuarterSubscribers,\n ...FiscalYearSubscribers\n]\n\nexport const schema = {\n resolverClasses: [\n ...FinancialStatementResolvers,\n ...AccountingCategoryResolvers,\n ...TransactionResolvers,\n ...BankAccountResolvers,\n ...BankStatementResolvers,\n ...PaymentResolvers,\n ...AccountResolvers,\n ...AccountingDocumentResolvers,\n ...RecurringCashItemResolvers,\n ...FinancialInstitutionResolvers,\n ...FiscalMonthResolvers,\n ...FiscalQuarterResolvers,\n ...FiscalYearResolvers\n ]\n}\n"]}
@@ -2,6 +2,7 @@ import { Payment } from './payment';
2
2
  import { PaymentHistoryEntitySubscriber } from './event-subscriber';
3
3
  import { PaymentQuery } from './payment-query';
4
4
  import { PaymentMutation } from './payment-mutation';
5
+ import './transfer-target';
5
6
  export declare const entities: (typeof Payment)[];
6
- export declare const resolvers: (typeof PaymentMutation | typeof PaymentQuery)[];
7
+ export declare const resolvers: (typeof PaymentQuery | typeof PaymentMutation)[];
7
8
  export declare const subscribers: (typeof PaymentHistoryEntitySubscriber)[];
@@ -6,6 +6,7 @@ const payment_history_1 = require("./payment-history");
6
6
  const event_subscriber_1 = require("./event-subscriber");
7
7
  const payment_query_1 = require("./payment-query");
8
8
  const payment_mutation_1 = require("./payment-mutation");
9
+ require("./transfer-target");
9
10
  exports.entities = [payment_1.Payment, payment_history_1.PaymentHistory];
10
11
  exports.resolvers = [payment_query_1.PaymentQuery, payment_mutation_1.PaymentMutation];
11
12
  exports.subscribers = [event_subscriber_1.PaymentHistoryEntitySubscriber];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/payment/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AACnC,uDAAkD;AAClD,yDAAmE;AACnE,mDAA8C;AAC9C,yDAAoD;AAEvC,QAAA,QAAQ,GAAG,CAAC,iBAAO,EAAE,gCAAc,CAAC,CAAA;AACpC,QAAA,SAAS,GAAG,CAAC,4BAAY,EAAE,kCAAe,CAAC,CAAA;AAC3C,QAAA,WAAW,GAAG,CAAC,iDAA8B,CAAC,CAAA","sourcesContent":["import { Payment } from './payment'\nimport { PaymentHistory } from './payment-history'\nimport { PaymentHistoryEntitySubscriber } from './event-subscriber'\nimport { PaymentQuery } from './payment-query'\nimport { PaymentMutation } from './payment-mutation'\n\nexport const entities = [Payment, PaymentHistory]\nexport const resolvers = [PaymentQuery, PaymentMutation]\nexport const subscribers = [PaymentHistoryEntitySubscriber]\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/payment/index.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AACnC,uDAAkD;AAClD,yDAAmE;AACnE,mDAA8C;AAC9C,yDAAoD;AACpD,6BAA0B;AAEb,QAAA,QAAQ,GAAG,CAAC,iBAAO,EAAE,gCAAc,CAAC,CAAA;AACpC,QAAA,SAAS,GAAG,CAAC,4BAAY,EAAE,kCAAe,CAAC,CAAA;AAC3C,QAAA,WAAW,GAAG,CAAC,iDAA8B,CAAC,CAAA","sourcesContent":["import { Payment } from './payment'\nimport { PaymentHistory } from './payment-history'\nimport { PaymentHistoryEntitySubscriber } from './event-subscriber'\nimport { PaymentQuery } from './payment-query'\nimport { PaymentMutation } from './payment-mutation'\nimport './transfer-target'\n\nexport const entities = [Payment, PaymentHistory]\nexport const resolvers = [PaymentQuery, PaymentMutation]\nexport const subscribers = [PaymentHistoryEntitySubscriber]\n"]}
@@ -2,28 +2,22 @@ import { HistoryActionType, HistoryEntityInterface } from '@operato/typeorm-hist
2
2
  import { User } from '@things-factory/auth-base';
3
3
  import { Domain } from '@things-factory/shell';
4
4
  import { Transaction } from '../transaction/transaction';
5
- import { Payment, PaymentDirection, PaymentType } from './payment';
6
- import { BankAccount } from '../bank-account/bank-account';
5
+ import { Payment, PaymentMethod, PaymentPurpose } from './payment';
6
+ /** Each version of a payment, written when it changes. */
7
7
  export declare class PaymentHistory implements HistoryEntityInterface<Payment> {
8
8
  readonly id: string;
9
9
  version?: number;
10
10
  domain?: Domain;
11
11
  domainId?: string;
12
12
  transaction: Transaction;
13
- transactionId: string;
14
- currency?: string;
13
+ transactionId?: string;
14
+ targetType: string;
15
+ targetId: string;
15
16
  amount: number;
16
- paymentType: PaymentType;
17
- sourceBankAccount?: BankAccount;
18
- sourceBankAccountId?: string;
19
- destinationBankAccount?: BankAccount;
20
- destinationBankAccountId?: string;
21
- year?: number;
22
- quarter?: number;
23
- month?: number;
24
- paidAt: Date;
25
- direction: PaymentDirection;
26
- note?: string;
17
+ purpose: PaymentPurpose;
18
+ method: PaymentMethod;
19
+ basis: string;
20
+ notes: string;
27
21
  createdAt?: Date;
28
22
  updatedAt?: Date;
29
23
  deletedAt?: Date;
@@ -31,7 +25,6 @@ export declare class PaymentHistory implements HistoryEntityInterface<Payment> {
31
25
  creatorId?: string;
32
26
  updater?: User;
33
27
  updaterId?: string;
34
- thumbnail?: string;
35
28
  originalId: string;
36
29
  action: HistoryActionType;
37
30
  }
@@ -10,9 +10,9 @@ const env_1 = require("@things-factory/env");
10
10
  const shell_1 = require("@things-factory/shell");
11
11
  const transaction_1 = require("../transaction/transaction");
12
12
  const payment_1 = require("./payment");
13
- const bank_account_1 = require("../bank-account/bank-account");
14
13
  const ORMCONFIG = env_1.config.get('ormconfig', {});
15
14
  const DATABASE_TYPE = ORMCONFIG.type;
15
+ /** Each version of a payment, written when it changes. */
16
16
  let PaymentHistory = class PaymentHistory {
17
17
  constructor() {
18
18
  this.version = 1;
@@ -21,134 +21,100 @@ let PaymentHistory = class PaymentHistory {
21
21
  exports.PaymentHistory = PaymentHistory;
22
22
  tslib_1.__decorate([
23
23
  (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
24
- (0, type_graphql_1.Field)(type => type_graphql_1.ID),
24
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Unique identifier of the version' }),
25
25
  tslib_1.__metadata("design:type", String)
26
26
  ], PaymentHistory.prototype, "id", void 0);
27
27
  tslib_1.__decorate([
28
28
  (0, typeorm_1.Column)({ nullable: true, default: 1 }),
29
- (0, type_graphql_1.Field)({ nullable: true }),
29
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Version number' }),
30
30
  tslib_1.__metadata("design:type", Number)
31
31
  ], PaymentHistory.prototype, "version", void 0);
32
32
  tslib_1.__decorate([
33
33
  (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
34
- (0, type_graphql_1.Field)({ nullable: true }),
34
+ (0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true, description: 'The domain' }),
35
35
  tslib_1.__metadata("design:type", shell_1.Domain)
36
36
  ], PaymentHistory.prototype, "domain", void 0);
37
37
  tslib_1.__decorate([
38
- (0, typeorm_1.RelationId)((payment) => payment.domain),
38
+ (0, typeorm_1.RelationId)((paymentHistory) => paymentHistory.domain),
39
39
  tslib_1.__metadata("design:type", String)
40
40
  ], PaymentHistory.prototype, "domainId", void 0);
41
41
  tslib_1.__decorate([
42
- (0, typeorm_1.ManyToOne)(type => transaction_1.Transaction, transaction => transaction.payments),
43
- (0, type_graphql_1.Field)(type => transaction_1.Transaction, { description: 'The transaction associated with this payment' }),
44
- tslib_1.__metadata("design:type", transaction_1.Transaction // 결제와 연결된 트랜잭션
45
- )
42
+ (0, typeorm_1.ManyToOne)(type => transaction_1.Transaction, { nullable: true, createForeignKeyConstraints: false }),
43
+ (0, type_graphql_1.Field)(type => transaction_1.Transaction, { nullable: true, description: 'transaction at this version' }),
44
+ tslib_1.__metadata("design:type", transaction_1.Transaction)
46
45
  ], PaymentHistory.prototype, "transaction", void 0);
47
46
  tslib_1.__decorate([
48
- (0, typeorm_1.RelationId)((payment) => payment.transaction),
47
+ (0, typeorm_1.RelationId)((paymentHistory) => paymentHistory.transaction),
49
48
  tslib_1.__metadata("design:type", String)
50
49
  ], PaymentHistory.prototype, "transactionId", void 0);
51
50
  tslib_1.__decorate([
52
51
  (0, typeorm_1.Column)({ nullable: true }),
53
- (0, type_graphql_1.Field)({ nullable: true, description: 'The currency used in the payment' }),
52
+ (0, type_graphql_1.Field)({ nullable: true, description: 'targetType at this version' }),
54
53
  tslib_1.__metadata("design:type", String)
55
- ], PaymentHistory.prototype, "currency", void 0);
54
+ ], PaymentHistory.prototype, "targetType", void 0);
56
55
  tslib_1.__decorate([
57
- (0, typeorm_1.Column)({ nullable: false }),
58
- (0, type_graphql_1.Field)({ nullable: false, description: 'The amount of money involved in the payment' }),
59
- tslib_1.__metadata("design:type", Number)
60
- ], PaymentHistory.prototype, "amount", void 0);
61
- tslib_1.__decorate([
62
- (0, typeorm_1.Column)(),
63
- (0, type_graphql_1.Field)(type => payment_1.PaymentType, { description: 'Type of the payment' }),
64
- tslib_1.__metadata("design:type", String)
65
- ], PaymentHistory.prototype, "paymentType", void 0);
66
- tslib_1.__decorate([
67
- (0, typeorm_1.ManyToOne)(type => bank_account_1.BankAccount, { nullable: true }),
68
- (0, type_graphql_1.Field)(type => bank_account_1.BankAccount, { nullable: true, description: 'Source bank account for the payment' }),
69
- tslib_1.__metadata("design:type", bank_account_1.BankAccount)
70
- ], PaymentHistory.prototype, "sourceBankAccount", void 0);
71
- tslib_1.__decorate([
72
- (0, typeorm_1.RelationId)((payment) => payment.sourceBankAccount),
73
- tslib_1.__metadata("design:type", String)
74
- ], PaymentHistory.prototype, "sourceBankAccountId", void 0);
75
- tslib_1.__decorate([
76
- (0, typeorm_1.ManyToOne)(type => bank_account_1.BankAccount, { nullable: true }),
77
- (0, type_graphql_1.Field)(type => bank_account_1.BankAccount, { nullable: true, description: 'Destination bank account for the payment' }),
78
- tslib_1.__metadata("design:type", bank_account_1.BankAccount)
79
- ], PaymentHistory.prototype, "destinationBankAccount", void 0);
80
- tslib_1.__decorate([
81
- (0, typeorm_1.RelationId)((payment) => payment.destinationBankAccount),
56
+ (0, typeorm_1.Column)({ nullable: true }),
57
+ (0, type_graphql_1.Field)({ nullable: true, description: 'targetId at this version' }),
82
58
  tslib_1.__metadata("design:type", String)
83
- ], PaymentHistory.prototype, "destinationBankAccountId", void 0);
59
+ ], PaymentHistory.prototype, "targetId", void 0);
84
60
  tslib_1.__decorate([
85
- (0, typeorm_1.Column)({ nullable: true }),
86
- (0, type_graphql_1.Field)({ nullable: true, description: 'Fiscal year in which the payment was made' }),
61
+ (0, typeorm_1.Column)((0, shell_1.moneyColumn)({ nullable: true })),
62
+ (0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true, description: 'amount at this version' }),
87
63
  tslib_1.__metadata("design:type", Number)
88
- ], PaymentHistory.prototype, "year", void 0);
64
+ ], PaymentHistory.prototype, "amount", void 0);
89
65
  tslib_1.__decorate([
90
66
  (0, typeorm_1.Column)({ nullable: true }),
91
- (0, type_graphql_1.Field)({ nullable: true, description: 'Fiscal quarter in which the payment was made' }),
92
- tslib_1.__metadata("design:type", Number)
93
- ], PaymentHistory.prototype, "quarter", void 0);
67
+ (0, type_graphql_1.Field)(type => payment_1.PaymentPurpose, { nullable: true, description: 'purpose at this version' }),
68
+ tslib_1.__metadata("design:type", String)
69
+ ], PaymentHistory.prototype, "purpose", void 0);
94
70
  tslib_1.__decorate([
95
71
  (0, typeorm_1.Column)({ nullable: true }),
96
- (0, type_graphql_1.Field)({ nullable: true, description: 'Fiscal month in which the payment was made' }),
97
- tslib_1.__metadata("design:type", Number)
98
- ], PaymentHistory.prototype, "month", void 0);
99
- tslib_1.__decorate([
100
- (0, typeorm_1.Column)({ nullable: false }),
101
- (0, type_graphql_1.Field)({ nullable: false, description: 'The date and time when the payment was made' }),
102
- tslib_1.__metadata("design:type", Date // 결제가 이루어진 날짜 및 시간
103
- )
104
- ], PaymentHistory.prototype, "paidAt", void 0);
72
+ (0, type_graphql_1.Field)(type => payment_1.PaymentMethod, { nullable: true, description: 'method at this version' }),
73
+ tslib_1.__metadata("design:type", String)
74
+ ], PaymentHistory.prototype, "method", void 0);
105
75
  tslib_1.__decorate([
106
- (0, typeorm_1.Column)({ nullable: false }),
107
- (0, type_graphql_1.Field)(type => payment_1.PaymentDirection, { description: 'Direction of the payment (Incoming or Outgoing)' }),
76
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
77
+ (0, type_graphql_1.Field)({ nullable: true, description: 'basis at this version' }),
108
78
  tslib_1.__metadata("design:type", String)
109
- ], PaymentHistory.prototype, "direction", void 0);
79
+ ], PaymentHistory.prototype, "basis", void 0);
110
80
  tslib_1.__decorate([
111
- (0, typeorm_1.Column)({ nullable: true }),
112
- (0, type_graphql_1.Field)({ nullable: true, description: 'Additional notes or comments about the payment' }),
81
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
82
+ (0, type_graphql_1.Field)({ nullable: true, description: 'notes at this version' }),
113
83
  tslib_1.__metadata("design:type", String)
114
- ], PaymentHistory.prototype, "note", void 0);
84
+ ], PaymentHistory.prototype, "notes", void 0);
115
85
  tslib_1.__decorate([
116
86
  (0, typeorm_1.Column)({ nullable: true }),
117
- (0, type_graphql_1.Field)({ nullable: true }),
87
+ (0, type_graphql_1.Field)({ nullable: true, description: 'When it was created' }),
118
88
  tslib_1.__metadata("design:type", Date)
119
89
  ], PaymentHistory.prototype, "createdAt", void 0);
120
90
  tslib_1.__decorate([
121
91
  (0, typeorm_1.Column)({ nullable: true }),
122
- (0, type_graphql_1.Field)({ nullable: true }),
92
+ (0, type_graphql_1.Field)({ nullable: true, description: 'When this version was written' }),
123
93
  tslib_1.__metadata("design:type", Date)
124
94
  ], PaymentHistory.prototype, "updatedAt", void 0);
125
95
  tslib_1.__decorate([
126
96
  (0, typeorm_1.Column)({ nullable: true }),
127
- (0, type_graphql_1.Field)({ nullable: true }),
97
+ (0, type_graphql_1.Field)({ nullable: true, description: 'When it was deleted' }),
128
98
  tslib_1.__metadata("design:type", Date)
129
99
  ], PaymentHistory.prototype, "deletedAt", void 0);
130
100
  tslib_1.__decorate([
131
101
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
132
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
102
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who created it' }),
133
103
  tslib_1.__metadata("design:type", auth_base_1.User)
134
104
  ], PaymentHistory.prototype, "creator", void 0);
135
105
  tslib_1.__decorate([
136
- (0, typeorm_1.RelationId)((payment) => payment.creator),
106
+ (0, typeorm_1.RelationId)((paymentHistory) => paymentHistory.creator),
137
107
  tslib_1.__metadata("design:type", String)
138
108
  ], PaymentHistory.prototype, "creatorId", void 0);
139
109
  tslib_1.__decorate([
140
110
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
141
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
111
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who wrote this version' }),
142
112
  tslib_1.__metadata("design:type", auth_base_1.User)
143
113
  ], PaymentHistory.prototype, "updater", void 0);
144
114
  tslib_1.__decorate([
145
- (0, typeorm_1.RelationId)((payment) => payment.updater),
115
+ (0, typeorm_1.RelationId)((paymentHistory) => paymentHistory.updater),
146
116
  tslib_1.__metadata("design:type", String)
147
117
  ], PaymentHistory.prototype, "updaterId", void 0);
148
- tslib_1.__decorate([
149
- (0, type_graphql_1.Field)(type => String, { nullable: true }),
150
- tslib_1.__metadata("design:type", String)
151
- ], PaymentHistory.prototype, "thumbnail", void 0);
152
118
  tslib_1.__decorate([
153
119
  (0, typeorm_history_1.HistoryOriginalIdColumn)(),
154
120
  tslib_1.__metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"payment-history.js","sourceRoot":"","sources":["../../../server/service/payment/payment-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAA8F;AAE9F,8DAKiC;AACjC,yDAAsD;AACtD,6CAA4C;AAC5C,iDAA8C;AAE9C,4DAAwD;AACxD,uCAAkE;AAClE,+DAA0D;AAE1D,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAA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a,IAAI,SAAS;YACnF,CAAC,CAAC,mCAAiB;YACnB,CAAC,CAAC,SAAS;QACf,MAAM,EAAE,aAAa,IAAI,UAAU,IAAI,aAAa,IAAI,OAAO,IAAI,aAAa,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;KAC/G,CAAC;;8CAC+B;yBAzHtB,cAAc;IAZ1B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,sBAAsB,EACtB,CAAC,cAA8B,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC,EACvF,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,eAAK,EACJ,sBAAsB,EACtB,CAAC,cAA8B,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC,EAC9G,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;GAC5C,cAAc,CA0H1B","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport { Column, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId } from 'typeorm'\n\nimport {\n HistoryActionColumn,\n HistoryActionType,\n HistoryEntityInterface,\n HistoryOriginalIdColumn\n} from '@operato/typeorm-history'\nimport { Role, User } from '@things-factory/auth-base'\nimport { config } from '@things-factory/env'\nimport { Domain } from '@things-factory/shell'\n\nimport { Transaction } from '../transaction/transaction'\nimport { Payment, PaymentDirection, PaymentType } from './payment'\nimport { BankAccount } from '../bank-account/bank-account'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index(\n 'ix_payment_history_0',\n (paymentHistory: PaymentHistory) => [paymentHistory.originalId, paymentHistory.version],\n { unique: true }\n)\n@Index(\n 'ix_payment_history_1',\n (paymentHistory: PaymentHistory) => [paymentHistory.domain, paymentHistory.originalId, paymentHistory.version],\n { unique: true }\n)\n@ObjectType({ description: 'History Entity of Payment' })\nexport class PaymentHistory implements HistoryEntityInterface<Payment> {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: true, default: 1 })\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((payment: Payment) => payment.domain)\n domainId?: string\n\n @ManyToOne(type => Transaction, transaction => transaction.payments)\n @Field(type => Transaction, { description: 'The transaction associated with this payment' })\n transaction: Transaction // 결제와 연결된 트랜잭션\n\n @RelationId((payment: Payment) => payment.transaction)\n transactionId: string // 연결된 트랜잭션의 ID\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The currency used in the payment' })\n currency?: string // 결제에 사용된 통화\n\n @Column({ nullable: false })\n @Field({ nullable: false, description: 'The amount of money involved in the payment' })\n amount: number // 결제된 금액\n\n @Column()\n @Field(type => PaymentType, { description: 'Type of the payment' })\n paymentType: PaymentType // 결제 유형\n\n @ManyToOne(type => BankAccount, { nullable: true })\n @Field(type => BankAccount, { nullable: true, description: 'Source bank account for the payment' })\n sourceBankAccount?: BankAccount\n\n @RelationId((payment: Payment) => payment.sourceBankAccount)\n sourceBankAccountId?: string\n\n @ManyToOne(type => BankAccount, { nullable: true })\n @Field(type => BankAccount, { nullable: true, description: 'Destination bank account for the payment' })\n destinationBankAccount?: BankAccount\n\n @RelationId((payment: Payment) => payment.destinationBankAccount)\n destinationBankAccountId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal year in which the payment was made' })\n year?: number // 결제가 발생한 회계 연도\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal quarter in which the payment was made' })\n quarter?: number // 결제가 발생한 회계 분기\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Fiscal month in which the payment was made' })\n month?: number // 결제가 발생한 회계 월\n\n @Column({ nullable: false })\n @Field({ nullable: false, description: 'The date and time when the payment was made' })\n paidAt: Date // 결제가 이루어진 날짜 및 시간\n\n @Column({ nullable: false })\n @Field(type => PaymentDirection, { description: 'Direction of the payment (Incoming or Outgoing)' })\n direction: PaymentDirection // 결제 방향 (수금 또는 지출)\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Additional notes or comments about the payment' })\n note?: string // 결제에 대한 추가 설명 또는 메모\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n createdAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n updatedAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((payment: Payment) => payment.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((payment: Payment) => payment.updater)\n updaterId?: string\n\n @Field(type => String, { nullable: true })\n thumbnail?: string\n\n @HistoryOriginalIdColumn()\n public originalId!: string\n\n @HistoryActionColumn({\n nullable: false,\n type:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'enum'\n : DATABASE_TYPE == 'oracle'\n ? 'varchar2'\n : DATABASE_TYPE == 'mssql'\n ? 'nvarchar'\n : 'varchar',\n enum:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? HistoryActionType\n : undefined,\n length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10\n })\n public action!: HistoryActionType\n}\n"]}
1
+ {"version":3,"file":"payment-history.js","sourceRoot":"","sources":["../../../server/service/payment/payment-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAChE,qCAA8F;AAE9F,8DAKiC;AACjC,yDAAgD;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AC,OAAO,CAAC,EAC9G,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;GAC5C,cAAc,CAiG1B","sourcesContent":["import { Field, Float, ID, Int, ObjectType } from 'type-graphql'\nimport { Column, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId } from 'typeorm'\n\nimport {\n HistoryActionColumn,\n HistoryActionType,\n HistoryEntityInterface,\n HistoryOriginalIdColumn\n} from '@operato/typeorm-history'\nimport { User } from '@things-factory/auth-base'\nimport { config } from '@things-factory/env'\nimport { Domain, moneyColumn } from '@things-factory/shell'\n\nimport { Transaction } from '../transaction/transaction'\nimport { Payment, PaymentMethod, PaymentPurpose } from './payment'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n/** Each version of a payment, written when it changes. */\n@Entity()\n@Index(\n 'ix_payment_history_0',\n (paymentHistory: PaymentHistory) => [paymentHistory.originalId, paymentHistory.version],\n { unique: true }\n)\n@Index(\n 'ix_payment_history_1',\n (paymentHistory: PaymentHistory) => [paymentHistory.domain, paymentHistory.originalId, paymentHistory.version],\n { unique: true }\n)\n@ObjectType({ description: 'History Entity of Payment' })\nexport class PaymentHistory implements HistoryEntityInterface<Payment> {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier of the version' })\n readonly id: string\n\n @Column({ nullable: true, default: 1 })\n @Field({ nullable: true, description: 'Version number' })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true, description: 'The domain' })\n domain?: Domain\n\n @RelationId((paymentHistory: PaymentHistory) => paymentHistory.domain)\n domainId?: string\n\n @ManyToOne(type => Transaction, { nullable: true, createForeignKeyConstraints: false })\n @Field(type => Transaction, { nullable: true, description: 'transaction at this version' })\n transaction: Transaction\n\n @RelationId((paymentHistory: PaymentHistory) => paymentHistory.transaction)\n transactionId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'targetType at this version' })\n targetType: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'targetId at this version' })\n targetId: string\n\n @Column(moneyColumn({ nullable: true }))\n @Field(type => Float, { nullable: true, description: 'amount at this version' })\n amount: number\n\n @Column({ nullable: true })\n @Field(type => PaymentPurpose, { nullable: true, description: 'purpose at this version' })\n purpose: PaymentPurpose\n\n @Column({ nullable: true })\n @Field(type => PaymentMethod, { nullable: true, description: 'method at this version' })\n method: PaymentMethod\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true, description: 'basis at this version' })\n basis: string\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true, description: 'notes at this version' })\n notes: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When it was created' })\n createdAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When this version was written' })\n updatedAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When it was deleted' })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who created it' })\n creator?: User\n\n @RelationId((paymentHistory: PaymentHistory) => paymentHistory.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who wrote this version' })\n updater?: User\n\n @RelationId((paymentHistory: PaymentHistory) => paymentHistory.updater)\n updaterId?: string\n\n @HistoryOriginalIdColumn()\n public originalId!: string\n\n @HistoryActionColumn({\n nullable: false,\n type:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'enum'\n : DATABASE_TYPE == 'oracle'\n ? 'varchar2'\n : DATABASE_TYPE == 'mssql'\n ? 'nvarchar'\n : 'varchar',\n enum:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? HistoryActionType\n : undefined,\n length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10\n })\n public action!: HistoryActionType\n}\n"]}
@@ -6,5 +6,4 @@ export declare class PaymentMutation {
6
6
  updateMultiplePayment(patches: PaymentPatch[], context: ResolverContext): Promise<Payment[]>;
7
7
  deletePayment(id: string, context: ResolverContext): Promise<boolean>;
8
8
  deletePayments(ids: string[], context: ResolverContext): Promise<boolean>;
9
- importPayments(payments: PaymentPatch[], context: ResolverContext): Promise<boolean>;
10
9
  }
@@ -3,97 +3,41 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PaymentMutation = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const type_graphql_1 = require("type-graphql");
6
- const typeorm_1 = require("typeorm");
7
6
  const shell_1 = require("@things-factory/shell");
8
7
  const payment_1 = require("./payment");
8
+ const payment_service_1 = require("./payment-service");
9
9
  const payment_type_1 = require("./payment-type");
10
10
  let PaymentMutation = class PaymentMutation {
11
11
  async createPayment(payment, context) {
12
12
  const { domain, user, tx } = context.state;
13
- const result = await (0, shell_1.getRepository)(payment_1.Payment, tx).save({
14
- ...payment,
15
- domain,
16
- creator: user,
17
- updater: user
18
- });
19
- return result;
13
+ const [saved] = await (0, payment_service_1.savePayments)(tx, domain, user, [{ ...payment, cuFlag: '+' }]);
14
+ return saved;
20
15
  }
21
16
  async updatePayment(id, patch, context) {
22
17
  const { domain, user, tx } = context.state;
23
- const repository = (0, shell_1.getRepository)(payment_1.Payment, tx);
24
- const payment = await repository.findOne({
25
- where: { domain: { id: domain.id }, id }
26
- });
27
- const result = await repository.save({
28
- ...payment,
29
- ...patch,
30
- updater: user
31
- });
32
- return result;
18
+ const [saved] = await (0, payment_service_1.savePayments)(tx, domain, user, [{ ...patch, id, cuFlag: 'M' }]);
19
+ return saved;
33
20
  }
34
21
  async updateMultiplePayment(patches, context) {
35
22
  const { domain, user, tx } = context.state;
36
- let results = [];
37
- const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
38
- const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
39
- const paymentRepo = (0, shell_1.getRepository)(payment_1.Payment, tx);
40
- if (_createRecords.length > 0) {
41
- for (let i = 0; i < _createRecords.length; i++) {
42
- const newRecord = _createRecords[i];
43
- const result = await paymentRepo.save({
44
- ...newRecord,
45
- domain,
46
- creator: user,
47
- updater: user
48
- });
49
- results.push({ ...result, cuFlag: '+' });
50
- }
51
- }
52
- if (_updateRecords.length > 0) {
53
- for (let i = 0; i < _updateRecords.length; i++) {
54
- const updateRecord = _updateRecords[i];
55
- const payment = await paymentRepo.findOne({
56
- where: { domain: { id: domain.id }, id: updateRecord.id }
57
- });
58
- if (!payment) {
59
- throw new Error(`failed to find payment to update: ${updateRecord.id}`);
60
- }
61
- const result = await paymentRepo.save({
62
- ...payment,
63
- ...updateRecord,
64
- updater: user
65
- });
66
- results.push({ ...result, cuFlag: 'M' });
67
- }
68
- }
69
- return results;
23
+ return await (0, payment_service_1.savePayments)(tx, domain, user, patches);
70
24
  }
71
25
  async deletePayment(id, context) {
72
- const { domain, tx } = context.state;
73
- await (0, shell_1.getRepository)(payment_1.Payment, tx).delete({ domain: { id: domain.id }, id });
26
+ const { domain, user, tx } = context.state;
27
+ await (0, payment_service_1.savePayments)(tx, domain, user, [{ id, cuFlag: '-' }]);
74
28
  return true;
75
29
  }
76
30
  async deletePayments(ids, context) {
77
- const { domain, tx } = context.state;
78
- await (0, shell_1.getRepository)(payment_1.Payment, tx).delete({
79
- domain: { id: domain.id },
80
- id: (0, typeorm_1.In)(ids)
81
- });
82
- return true;
83
- }
84
- async importPayments(payments, context) {
85
- const { domain, tx } = context.state;
86
- await Promise.all(payments.map(async (payment) => {
87
- const createdPayment = await (0, shell_1.getRepository)(payment_1.Payment, tx).save({ domain, ...payment });
88
- }));
31
+ const { domain, user, tx } = context.state;
32
+ await (0, payment_service_1.savePayments)(tx, domain, user, ids.map(id => ({ id, cuFlag: '-' })));
89
33
  return true;
90
34
  }
91
35
  };
92
36
  exports.PaymentMutation = PaymentMutation;
93
37
  tslib_1.__decorate([
94
38
  (0, type_graphql_1.Directive)('@transaction'),
95
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
96
- (0, type_graphql_1.Mutation)(returns => payment_1.Payment, { description: 'To create new Payment' }),
39
+ (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation", domainOwnerGranted: true)'),
40
+ (0, type_graphql_1.Mutation)(returns => payment_1.Payment, { description: 'To put a part of a transaction on what it paid' }),
97
41
  tslib_1.__param(0, (0, type_graphql_1.Arg)('payment')),
98
42
  tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
99
43
  tslib_1.__metadata("design:type", Function),
@@ -102,7 +46,7 @@ tslib_1.__decorate([
102
46
  ], PaymentMutation.prototype, "createPayment", null);
103
47
  tslib_1.__decorate([
104
48
  (0, type_graphql_1.Directive)('@transaction'),
105
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
49
+ (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation", domainOwnerGranted: true)'),
106
50
  (0, type_graphql_1.Mutation)(returns => payment_1.Payment, { description: 'To modify Payment information' }),
107
51
  tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
108
52
  tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
@@ -113,8 +57,8 @@ tslib_1.__decorate([
113
57
  ], PaymentMutation.prototype, "updatePayment", null);
114
58
  tslib_1.__decorate([
115
59
  (0, type_graphql_1.Directive)('@transaction'),
116
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
117
- (0, type_graphql_1.Mutation)(returns => [payment_1.Payment], { description: "To modify multiple Payments' information" }),
60
+ (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation", domainOwnerGranted: true)'),
61
+ (0, type_graphql_1.Mutation)(returns => [payment_1.Payment], { description: 'To add, modify and delete multiple Payments' }),
118
62
  tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [payment_type_1.PaymentPatch])),
119
63
  tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
120
64
  tslib_1.__metadata("design:type", Function),
@@ -123,7 +67,7 @@ tslib_1.__decorate([
123
67
  ], PaymentMutation.prototype, "updateMultiplePayment", null);
124
68
  tslib_1.__decorate([
125
69
  (0, type_graphql_1.Directive)('@transaction'),
126
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
70
+ (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation", domainOwnerGranted: true)'),
127
71
  (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete Payment' }),
128
72
  tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
129
73
  tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
@@ -133,7 +77,7 @@ tslib_1.__decorate([
133
77
  ], PaymentMutation.prototype, "deletePayment", null);
134
78
  tslib_1.__decorate([
135
79
  (0, type_graphql_1.Directive)('@transaction'),
136
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
80
+ (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation", domainOwnerGranted: true)'),
137
81
  (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple Payments' }),
138
82
  tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
139
83
  tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
@@ -141,17 +85,8 @@ tslib_1.__decorate([
141
85
  tslib_1.__metadata("design:paramtypes", [Array, Object]),
142
86
  tslib_1.__metadata("design:returntype", Promise)
143
87
  ], PaymentMutation.prototype, "deletePayments", null);
144
- tslib_1.__decorate([
145
- (0, type_graphql_1.Directive)('@transaction'),
146
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
147
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To import multiple Payments' }),
148
- tslib_1.__param(0, (0, type_graphql_1.Arg)('payments', type => [payment_type_1.PaymentPatch])),
149
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
150
- tslib_1.__metadata("design:type", Function),
151
- tslib_1.__metadata("design:paramtypes", [Array, Object]),
152
- tslib_1.__metadata("design:returntype", Promise)
153
- ], PaymentMutation.prototype, "importPayments", null);
154
88
  exports.PaymentMutation = PaymentMutation = tslib_1.__decorate([
155
- (0, type_graphql_1.Resolver)(payment_1.Payment)
89
+ (0, type_graphql_1.Resolver)(payment_1.Payment),
90
+ (0, type_graphql_1.UseMiddleware)(shell_1.SpeakRefusals)
156
91
  ], PaymentMutation);
157
92
  //# sourceMappingURL=payment-mutation.js.map