@things-factory/accounting 9.0.0-beta.24 → 9.0.0-beta.27

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 (402) hide show
  1. package/package.json +5 -5
  2. package/dist-client/activities/activity-book-edit.d.ts +0 -14
  3. package/dist-client/activities/activity-book-edit.js +0 -85
  4. package/dist-client/activities/activity-book-edit.js.map +0 -1
  5. package/dist-client/activities/activity-book-view.d.ts +0 -14
  6. package/dist-client/activities/activity-book-view.js +0 -85
  7. package/dist-client/activities/activity-book-view.js.map +0 -1
  8. package/dist-client/activities/activity-expense-edit.d.ts +0 -14
  9. package/dist-client/activities/activity-expense-edit.js +0 -85
  10. package/dist-client/activities/activity-expense-edit.js.map +0 -1
  11. package/dist-client/activities/activity-expense-view.d.ts +0 -14
  12. package/dist-client/activities/activity-expense-view.js +0 -85
  13. package/dist-client/activities/activity-expense-view.js.map +0 -1
  14. package/dist-client/bootstrap.d.ts +0 -1
  15. package/dist-client/bootstrap.js +0 -8
  16. package/dist-client/bootstrap.js.map +0 -1
  17. package/dist-client/components/accounting-category-selector.d.ts +0 -16
  18. package/dist-client/components/accounting-category-selector.js +0 -134
  19. package/dist-client/components/accounting-category-selector.js.map +0 -1
  20. package/dist-client/components/accounting-category-view.d.ts +0 -14
  21. package/dist-client/components/accounting-category-view.js +0 -81
  22. package/dist-client/components/accounting-category-view.js.map +0 -1
  23. package/dist-client/grist-editors/grist-editor-accounting-category-object.d.ts +0 -11
  24. package/dist-client/grist-editors/grist-editor-accounting-category-object.js +0 -71
  25. package/dist-client/grist-editors/grist-editor-accounting-category-object.js.map +0 -1
  26. package/dist-client/grist-editors/grist-renderer-accounting-category-object.d.ts +0 -2
  27. package/dist-client/grist-editors/grist-renderer-accounting-category-object.js +0 -9
  28. package/dist-client/grist-editors/grist-renderer-accounting-category-object.js.map +0 -1
  29. package/dist-client/index.d.ts +0 -0
  30. package/dist-client/index.js +0 -2
  31. package/dist-client/index.js.map +0 -1
  32. package/dist-client/pages/account/account-importer.d.ts +0 -22
  33. package/dist-client/pages/account/account-importer.js +0 -100
  34. package/dist-client/pages/account/account-importer.js.map +0 -1
  35. package/dist-client/pages/account/account-list-page.d.ts +0 -63
  36. package/dist-client/pages/account/account-list-page.js +0 -350
  37. package/dist-client/pages/account/account-list-page.js.map +0 -1
  38. package/dist-client/pages/accounting-category/accounting-category-importer.d.ts +0 -22
  39. package/dist-client/pages/accounting-category/accounting-category-importer.js +0 -100
  40. package/dist-client/pages/accounting-category/accounting-category-importer.js.map +0 -1
  41. package/dist-client/pages/accounting-category/accounting-category-list-page.d.ts +0 -63
  42. package/dist-client/pages/accounting-category/accounting-category-list-page.js +0 -354
  43. package/dist-client/pages/accounting-category/accounting-category-list-page.js.map +0 -1
  44. package/dist-client/pages/accounting-category/accounting-category-tree-page.d.ts +0 -46
  45. package/dist-client/pages/accounting-category/accounting-category-tree-page.js +0 -329
  46. package/dist-client/pages/accounting-category/accounting-category-tree-page.js.map +0 -1
  47. package/dist-client/pages/accounting-document/accounting-document-importer.d.ts +0 -23
  48. package/dist-client/pages/accounting-document/accounting-document-importer.js +0 -93
  49. package/dist-client/pages/accounting-document/accounting-document-importer.js.map +0 -1
  50. package/dist-client/pages/accounting-document/accounting-document-list-page.d.ts +0 -66
  51. package/dist-client/pages/accounting-document/accounting-document-list-page.js +0 -370
  52. package/dist-client/pages/accounting-document/accounting-document-list-page.js.map +0 -1
  53. package/dist-client/pages/bank/bank-importer.d.ts +0 -23
  54. package/dist-client/pages/bank/bank-importer.js +0 -93
  55. package/dist-client/pages/bank/bank-importer.js.map +0 -1
  56. package/dist-client/pages/bank/bank-list-page.d.ts +0 -66
  57. package/dist-client/pages/bank/bank-list-page.js +0 -370
  58. package/dist-client/pages/bank/bank-list-page.js.map +0 -1
  59. package/dist-client/pages/bank-account/bank-account-importer.d.ts +0 -23
  60. package/dist-client/pages/bank-account/bank-account-importer.js +0 -93
  61. package/dist-client/pages/bank-account/bank-account-importer.js.map +0 -1
  62. package/dist-client/pages/bank-account/bank-account-list-page.d.ts +0 -66
  63. package/dist-client/pages/bank-account/bank-account-list-page.js +0 -370
  64. package/dist-client/pages/bank-account/bank-account-list-page.js.map +0 -1
  65. package/dist-client/pages/financial-institution/financial-institution-importer.d.ts +0 -23
  66. package/dist-client/pages/financial-institution/financial-institution-importer.js +0 -93
  67. package/dist-client/pages/financial-institution/financial-institution-importer.js.map +0 -1
  68. package/dist-client/pages/financial-institution/financial-institution-list-page.d.ts +0 -66
  69. package/dist-client/pages/financial-institution/financial-institution-list-page.js +0 -370
  70. package/dist-client/pages/financial-institution/financial-institution-list-page.js.map +0 -1
  71. package/dist-client/pages/financial-statement/financial-statement-importer.d.ts +0 -22
  72. package/dist-client/pages/financial-statement/financial-statement-importer.js +0 -100
  73. package/dist-client/pages/financial-statement/financial-statement-importer.js.map +0 -1
  74. package/dist-client/pages/financial-statement/financial-statement-list-page.d.ts +0 -63
  75. package/dist-client/pages/financial-statement/financial-statement-list-page.js +0 -324
  76. package/dist-client/pages/financial-statement/financial-statement-list-page.js.map +0 -1
  77. package/dist-client/pages/fiscal-month/fiscal-month-importer.d.ts +0 -23
  78. package/dist-client/pages/fiscal-month/fiscal-month-importer.js +0 -93
  79. package/dist-client/pages/fiscal-month/fiscal-month-importer.js.map +0 -1
  80. package/dist-client/pages/fiscal-month/fiscal-month-list-page.d.ts +0 -66
  81. package/dist-client/pages/fiscal-month/fiscal-month-list-page.js +0 -370
  82. package/dist-client/pages/fiscal-month/fiscal-month-list-page.js.map +0 -1
  83. package/dist-client/pages/fiscal-quarter/fiscal-quarter-importer.d.ts +0 -23
  84. package/dist-client/pages/fiscal-quarter/fiscal-quarter-importer.js +0 -93
  85. package/dist-client/pages/fiscal-quarter/fiscal-quarter-importer.js.map +0 -1
  86. package/dist-client/pages/fiscal-quarter/fiscal-quarter-list-page.d.ts +0 -66
  87. package/dist-client/pages/fiscal-quarter/fiscal-quarter-list-page.js +0 -370
  88. package/dist-client/pages/fiscal-quarter/fiscal-quarter-list-page.js.map +0 -1
  89. package/dist-client/pages/fiscal-year/fiscal-year-importer.d.ts +0 -23
  90. package/dist-client/pages/fiscal-year/fiscal-year-importer.js +0 -93
  91. package/dist-client/pages/fiscal-year/fiscal-year-importer.js.map +0 -1
  92. package/dist-client/pages/fiscal-year/fiscal-year-list-page.d.ts +0 -66
  93. package/dist-client/pages/fiscal-year/fiscal-year-list-page.js +0 -370
  94. package/dist-client/pages/fiscal-year/fiscal-year-list-page.js.map +0 -1
  95. package/dist-client/pages/income-statement/income-statement-importer.d.ts +0 -22
  96. package/dist-client/pages/income-statement/income-statement-importer.js +0 -100
  97. package/dist-client/pages/income-statement/income-statement-importer.js.map +0 -1
  98. package/dist-client/pages/income-statement/income-statement-list-page.d.ts +0 -63
  99. package/dist-client/pages/income-statement/income-statement-list-page.js +0 -324
  100. package/dist-client/pages/income-statement/income-statement-list-page.js.map +0 -1
  101. package/dist-client/pages/payment/payment-importer.d.ts +0 -23
  102. package/dist-client/pages/payment/payment-importer.js +0 -93
  103. package/dist-client/pages/payment/payment-importer.js.map +0 -1
  104. package/dist-client/pages/payment/payment-list-page.d.ts +0 -66
  105. package/dist-client/pages/payment/payment-list-page.js +0 -370
  106. package/dist-client/pages/payment/payment-list-page.js.map +0 -1
  107. package/dist-client/pages/transaction/transaction-importer.d.ts +0 -22
  108. package/dist-client/pages/transaction/transaction-importer.js +0 -100
  109. package/dist-client/pages/transaction/transaction-importer.js.map +0 -1
  110. package/dist-client/pages/transaction/transaction-list-page.d.ts +0 -63
  111. package/dist-client/pages/transaction/transaction-list-page.js +0 -324
  112. package/dist-client/pages/transaction/transaction-list-page.js.map +0 -1
  113. package/dist-client/route.d.ts +0 -1
  114. package/dist-client/route.js +0 -29
  115. package/dist-client/route.js.map +0 -1
  116. package/dist-client/tsconfig.tsbuildinfo +0 -1
  117. package/dist-client/types/accounting-category.d.ts +0 -16
  118. package/dist-client/types/accounting-category.js +0 -3
  119. package/dist-client/types/accounting-category.js.map +0 -1
  120. package/dist-client/types/index.d.ts +0 -1
  121. package/dist-client/types/index.js +0 -2
  122. package/dist-client/types/index.js.map +0 -1
  123. package/dist-server/activities/activity-book.d.ts +0 -58
  124. package/dist-server/activities/activity-book.js +0 -163
  125. package/dist-server/activities/activity-book.js.map +0 -1
  126. package/dist-server/activities/activity-expense.d.ts +0 -58
  127. package/dist-server/activities/activity-expense.js +0 -150
  128. package/dist-server/activities/activity-expense.js.map +0 -1
  129. package/dist-server/activities/index.d.ts +0 -1
  130. package/dist-server/activities/index.js +0 -19
  131. package/dist-server/activities/index.js.map +0 -1
  132. package/dist-server/controllers/index.d.ts +0 -1
  133. package/dist-server/controllers/index.js +0 -5
  134. package/dist-server/controllers/index.js.map +0 -1
  135. package/dist-server/controllers/summary-statements.d.ts +0 -4
  136. package/dist-server/controllers/summary-statements.js +0 -149
  137. package/dist-server/controllers/summary-statements.js.map +0 -1
  138. package/dist-server/index.d.ts +0 -5
  139. package/dist-server/index.js +0 -9
  140. package/dist-server/index.js.map +0 -1
  141. package/dist-server/middlewares/index.d.ts +0 -1
  142. package/dist-server/middlewares/index.js +0 -7
  143. package/dist-server/middlewares/index.js.map +0 -1
  144. package/dist-server/migrations/1725200507196-seed-fiscal-entities.d.ts +0 -5
  145. package/dist-server/migrations/1725200507196-seed-fiscal-entities.js +0 -95
  146. package/dist-server/migrations/1725200507196-seed-fiscal-entities.js.map +0 -1
  147. package/dist-server/migrations/1725201467183-seed-accounts.d.ts +0 -5
  148. package/dist-server/migrations/1725201467183-seed-accounts.js +0 -318
  149. package/dist-server/migrations/1725201467183-seed-accounts.js.map +0 -1
  150. package/dist-server/migrations/1725201567284-seed-country-codes.d.ts +0 -5
  151. package/dist-server/migrations/1725201567284-seed-country-codes.js +0 -248
  152. package/dist-server/migrations/1725201567284-seed-country-codes.js.map +0 -1
  153. package/dist-server/migrations/1725201667385-seed-financial-institutions.d.ts +0 -5
  154. package/dist-server/migrations/1725201667385-seed-financial-institutions.js +0 -348
  155. package/dist-server/migrations/1725201667385-seed-financial-institutions.js.map +0 -1
  156. package/dist-server/migrations/index.d.ts +0 -1
  157. package/dist-server/migrations/index.js +0 -12
  158. package/dist-server/migrations/index.js.map +0 -1
  159. package/dist-server/routes.d.ts +0 -0
  160. package/dist-server/routes.js +0 -24
  161. package/dist-server/routes.js.map +0 -1
  162. package/dist-server/service/account/account-history.d.ts +0 -26
  163. package/dist-server/service/account/account-history.js +0 -128
  164. package/dist-server/service/account/account-history.js.map +0 -1
  165. package/dist-server/service/account/account-mutation.d.ts +0 -10
  166. package/dist-server/service/account/account-mutation.js +0 -134
  167. package/dist-server/service/account/account-mutation.js.map +0 -1
  168. package/dist-server/service/account/account-query.d.ts +0 -11
  169. package/dist-server/service/account/account-query.js +0 -81
  170. package/dist-server/service/account/account-query.js.map +0 -1
  171. package/dist-server/service/account/account-type.d.ts +0 -17
  172. package/dist-server/service/account/account-type.js +0 -65
  173. package/dist-server/service/account/account-type.js.map +0 -1
  174. package/dist-server/service/account/account.d.ts +0 -22
  175. package/dist-server/service/account/account.js +0 -113
  176. package/dist-server/service/account/account.js.map +0 -1
  177. package/dist-server/service/account/event-subscriber.d.ts +0 -7
  178. package/dist-server/service/account/event-subscriber.js +0 -21
  179. package/dist-server/service/account/event-subscriber.js.map +0 -1
  180. package/dist-server/service/account/index.d.ts +0 -7
  181. package/dist-server/service/account/index.js +0 -12
  182. package/dist-server/service/account/index.js.map +0 -1
  183. package/dist-server/service/accounting-category/accounting-category-history.d.ts +0 -26
  184. package/dist-server/service/accounting-category/accounting-category-history.js +0 -141
  185. package/dist-server/service/accounting-category/accounting-category-history.js.map +0 -1
  186. package/dist-server/service/accounting-category/accounting-category-mutation.d.ts +0 -10
  187. package/dist-server/service/accounting-category/accounting-category-mutation.js +0 -136
  188. package/dist-server/service/accounting-category/accounting-category-mutation.js.map +0 -1
  189. package/dist-server/service/accounting-category/accounting-category-query.d.ts +0 -12
  190. package/dist-server/service/accounting-category/accounting-category-query.js +0 -102
  191. package/dist-server/service/accounting-category/accounting-category-query.js.map +0 -1
  192. package/dist-server/service/accounting-category/accounting-category-type.d.ts +0 -19
  193. package/dist-server/service/accounting-category/accounting-category-type.js +0 -73
  194. package/dist-server/service/accounting-category/accounting-category-type.js.map +0 -1
  195. package/dist-server/service/accounting-category/accounting-category.d.ts +0 -21
  196. package/dist-server/service/accounting-category/accounting-category.js +0 -105
  197. package/dist-server/service/accounting-category/accounting-category.js.map +0 -1
  198. package/dist-server/service/accounting-category/event-subscriber.d.ts +0 -7
  199. package/dist-server/service/accounting-category/event-subscriber.js +0 -21
  200. package/dist-server/service/accounting-category/event-subscriber.js.map +0 -1
  201. package/dist-server/service/accounting-category/index.d.ts +0 -7
  202. package/dist-server/service/accounting-category/index.js +0 -12
  203. package/dist-server/service/accounting-category/index.js.map +0 -1
  204. package/dist-server/service/accounting-document/accounting-document-history.d.ts +0 -26
  205. package/dist-server/service/accounting-document/accounting-document-history.js +0 -134
  206. package/dist-server/service/accounting-document/accounting-document-history.js.map +0 -1
  207. package/dist-server/service/accounting-document/accounting-document-mutation.d.ts +0 -10
  208. package/dist-server/service/accounting-document/accounting-document-mutation.js +0 -128
  209. package/dist-server/service/accounting-document/accounting-document-mutation.js.map +0 -1
  210. package/dist-server/service/accounting-document/accounting-document-query.d.ts +0 -11
  211. package/dist-server/service/accounting-document/accounting-document-query.js +0 -79
  212. package/dist-server/service/accounting-document/accounting-document-query.js.map +0 -1
  213. package/dist-server/service/accounting-document/accounting-document-type.d.ts +0 -20
  214. package/dist-server/service/accounting-document/accounting-document-type.js +0 -74
  215. package/dist-server/service/accounting-document/accounting-document-type.js.map +0 -1
  216. package/dist-server/service/accounting-document/accounting-document.d.ts +0 -21
  217. package/dist-server/service/accounting-document/accounting-document.js +0 -104
  218. package/dist-server/service/accounting-document/accounting-document.js.map +0 -1
  219. package/dist-server/service/accounting-document/event-subscriber.d.ts +0 -7
  220. package/dist-server/service/accounting-document/event-subscriber.js +0 -21
  221. package/dist-server/service/accounting-document/event-subscriber.js.map +0 -1
  222. package/dist-server/service/accounting-document/index.d.ts +0 -7
  223. package/dist-server/service/accounting-document/index.js +0 -12
  224. package/dist-server/service/accounting-document/index.js.map +0 -1
  225. package/dist-server/service/bank-account/bank-account-history.d.ts +0 -34
  226. package/dist-server/service/bank-account/bank-account-history.js +0 -172
  227. package/dist-server/service/bank-account/bank-account-history.js.map +0 -1
  228. package/dist-server/service/bank-account/bank-account-mutation.d.ts +0 -10
  229. package/dist-server/service/bank-account/bank-account-mutation.js +0 -128
  230. package/dist-server/service/bank-account/bank-account-mutation.js.map +0 -1
  231. package/dist-server/service/bank-account/bank-account-query.d.ts +0 -11
  232. package/dist-server/service/bank-account/bank-account-query.js +0 -79
  233. package/dist-server/service/bank-account/bank-account-query.js.map +0 -1
  234. package/dist-server/service/bank-account/bank-account-type.d.ts +0 -39
  235. package/dist-server/service/bank-account/bank-account-type.js +0 -153
  236. package/dist-server/service/bank-account/bank-account-type.js.map +0 -1
  237. package/dist-server/service/bank-account/bank-account.d.ts +0 -38
  238. package/dist-server/service/bank-account/bank-account.js +0 -164
  239. package/dist-server/service/bank-account/bank-account.js.map +0 -1
  240. package/dist-server/service/bank-account/event-subscriber.d.ts +0 -7
  241. package/dist-server/service/bank-account/event-subscriber.js +0 -21
  242. package/dist-server/service/bank-account/event-subscriber.js.map +0 -1
  243. package/dist-server/service/bank-account/index.d.ts +0 -7
  244. package/dist-server/service/bank-account/index.js +0 -12
  245. package/dist-server/service/bank-account/index.js.map +0 -1
  246. package/dist-server/service/common-type.d.ts +0 -5
  247. package/dist-server/service/common-type.js +0 -15
  248. package/dist-server/service/common-type.js.map +0 -1
  249. package/dist-server/service/financial-institution/financial-institution-mutation.d.ts +0 -10
  250. package/dist-server/service/financial-institution/financial-institution-mutation.js +0 -169
  251. package/dist-server/service/financial-institution/financial-institution-mutation.js.map +0 -1
  252. package/dist-server/service/financial-institution/financial-institution-query.d.ts +0 -12
  253. package/dist-server/service/financial-institution/financial-institution-query.js +0 -97
  254. package/dist-server/service/financial-institution/financial-institution-query.js.map +0 -1
  255. package/dist-server/service/financial-institution/financial-institution-type.d.ts +0 -32
  256. package/dist-server/service/financial-institution/financial-institution-type.js +0 -126
  257. package/dist-server/service/financial-institution/financial-institution-type.js.map +0 -1
  258. package/dist-server/service/financial-institution/financial-institution.d.ts +0 -34
  259. package/dist-server/service/financial-institution/financial-institution.js +0 -137
  260. package/dist-server/service/financial-institution/financial-institution.js.map +0 -1
  261. package/dist-server/service/financial-institution/index.d.ts +0 -6
  262. package/dist-server/service/financial-institution/index.js +0 -10
  263. package/dist-server/service/financial-institution/index.js.map +0 -1
  264. package/dist-server/service/financial-statement/event-subscriber.d.ts +0 -7
  265. package/dist-server/service/financial-statement/event-subscriber.js +0 -21
  266. package/dist-server/service/financial-statement/event-subscriber.js.map +0 -1
  267. package/dist-server/service/financial-statement/financial-statement-history.d.ts +0 -27
  268. package/dist-server/service/financial-statement/financial-statement-history.js +0 -141
  269. package/dist-server/service/financial-statement/financial-statement-history.js.map +0 -1
  270. package/dist-server/service/financial-statement/financial-statement-line-item.d.ts +0 -19
  271. package/dist-server/service/financial-statement/financial-statement-line-item.js +0 -94
  272. package/dist-server/service/financial-statement/financial-statement-line-item.js.map +0 -1
  273. package/dist-server/service/financial-statement/financial-statement-mutation.d.ts +0 -10
  274. package/dist-server/service/financial-statement/financial-statement-mutation.js +0 -136
  275. package/dist-server/service/financial-statement/financial-statement-mutation.js.map +0 -1
  276. package/dist-server/service/financial-statement/financial-statement-query.d.ts +0 -11
  277. package/dist-server/service/financial-statement/financial-statement-query.js +0 -81
  278. package/dist-server/service/financial-statement/financial-statement-query.js.map +0 -1
  279. package/dist-server/service/financial-statement/financial-statement-type.d.ts +0 -20
  280. package/dist-server/service/financial-statement/financial-statement-type.js +0 -77
  281. package/dist-server/service/financial-statement/financial-statement-type.js.map +0 -1
  282. package/dist-server/service/financial-statement/financial-statement.d.ts +0 -27
  283. package/dist-server/service/financial-statement/financial-statement.js +0 -132
  284. package/dist-server/service/financial-statement/financial-statement.js.map +0 -1
  285. package/dist-server/service/financial-statement/index.d.ts +0 -8
  286. package/dist-server/service/financial-statement/index.js +0 -13
  287. package/dist-server/service/financial-statement/index.js.map +0 -1
  288. package/dist-server/service/fiscal-month/fiscal-month-mutation.d.ts +0 -10
  289. package/dist-server/service/fiscal-month/fiscal-month-mutation.js +0 -134
  290. package/dist-server/service/fiscal-month/fiscal-month-mutation.js.map +0 -1
  291. package/dist-server/service/fiscal-month/fiscal-month-query.d.ts +0 -11
  292. package/dist-server/service/fiscal-month/fiscal-month-query.js +0 -83
  293. package/dist-server/service/fiscal-month/fiscal-month-query.js.map +0 -1
  294. package/dist-server/service/fiscal-month/fiscal-month-type.d.ts +0 -26
  295. package/dist-server/service/fiscal-month/fiscal-month-type.js +0 -98
  296. package/dist-server/service/fiscal-month/fiscal-month-type.js.map +0 -1
  297. package/dist-server/service/fiscal-month/fiscal-month.d.ts +0 -22
  298. package/dist-server/service/fiscal-month/fiscal-month.js +0 -99
  299. package/dist-server/service/fiscal-month/fiscal-month.js.map +0 -1
  300. package/dist-server/service/fiscal-month/index.d.ts +0 -6
  301. package/dist-server/service/fiscal-month/index.js +0 -10
  302. package/dist-server/service/fiscal-month/index.js.map +0 -1
  303. package/dist-server/service/fiscal-quarter/fiscal-quarter-mutation.d.ts +0 -10
  304. package/dist-server/service/fiscal-quarter/fiscal-quarter-mutation.js +0 -134
  305. package/dist-server/service/fiscal-quarter/fiscal-quarter-mutation.js.map +0 -1
  306. package/dist-server/service/fiscal-quarter/fiscal-quarter-query.d.ts +0 -11
  307. package/dist-server/service/fiscal-quarter/fiscal-quarter-query.js +0 -85
  308. package/dist-server/service/fiscal-quarter/fiscal-quarter-query.js.map +0 -1
  309. package/dist-server/service/fiscal-quarter/fiscal-quarter-type.d.ts +0 -24
  310. package/dist-server/service/fiscal-quarter/fiscal-quarter-type.js +0 -90
  311. package/dist-server/service/fiscal-quarter/fiscal-quarter-type.js.map +0 -1
  312. package/dist-server/service/fiscal-quarter/fiscal-quarter.d.ts +0 -21
  313. package/dist-server/service/fiscal-quarter/fiscal-quarter.js +0 -94
  314. package/dist-server/service/fiscal-quarter/fiscal-quarter.js.map +0 -1
  315. package/dist-server/service/fiscal-quarter/index.d.ts +0 -6
  316. package/dist-server/service/fiscal-quarter/index.js +0 -10
  317. package/dist-server/service/fiscal-quarter/index.js.map +0 -1
  318. package/dist-server/service/fiscal-year/fiscal-year-mutation.d.ts +0 -10
  319. package/dist-server/service/fiscal-year/fiscal-year-mutation.js +0 -134
  320. package/dist-server/service/fiscal-year/fiscal-year-mutation.js.map +0 -1
  321. package/dist-server/service/fiscal-year/fiscal-year-query.d.ts +0 -11
  322. package/dist-server/service/fiscal-year/fiscal-year-query.js +0 -81
  323. package/dist-server/service/fiscal-year/fiscal-year-query.js.map +0 -1
  324. package/dist-server/service/fiscal-year/fiscal-year-type.d.ts +0 -22
  325. package/dist-server/service/fiscal-year/fiscal-year-type.js +0 -82
  326. package/dist-server/service/fiscal-year/fiscal-year-type.js.map +0 -1
  327. package/dist-server/service/fiscal-year/fiscal-year.d.ts +0 -20
  328. package/dist-server/service/fiscal-year/fiscal-year.js +0 -89
  329. package/dist-server/service/fiscal-year/fiscal-year.js.map +0 -1
  330. package/dist-server/service/fiscal-year/index.d.ts +0 -6
  331. package/dist-server/service/fiscal-year/index.js +0 -10
  332. package/dist-server/service/fiscal-year/index.js.map +0 -1
  333. package/dist-server/service/income-statement/event-subscriber.d.ts +0 -7
  334. package/dist-server/service/income-statement/event-subscriber.js +0 -21
  335. package/dist-server/service/income-statement/event-subscriber.js.map +0 -1
  336. package/dist-server/service/income-statement/income-statement-history.d.ts +0 -28
  337. package/dist-server/service/income-statement/income-statement-history.js +0 -146
  338. package/dist-server/service/income-statement/income-statement-history.js.map +0 -1
  339. package/dist-server/service/income-statement/income-statement-line-item.d.ts +0 -19
  340. package/dist-server/service/income-statement/income-statement-line-item.js +0 -96
  341. package/dist-server/service/income-statement/income-statement-line-item.js.map +0 -1
  342. package/dist-server/service/income-statement/income-statement-mutation.d.ts +0 -10
  343. package/dist-server/service/income-statement/income-statement-mutation.js +0 -136
  344. package/dist-server/service/income-statement/income-statement-mutation.js.map +0 -1
  345. package/dist-server/service/income-statement/income-statement-query.d.ts +0 -11
  346. package/dist-server/service/income-statement/income-statement-query.js +0 -81
  347. package/dist-server/service/income-statement/income-statement-query.js.map +0 -1
  348. package/dist-server/service/income-statement/income-statement-type.d.ts +0 -20
  349. package/dist-server/service/income-statement/income-statement-type.js +0 -77
  350. package/dist-server/service/income-statement/income-statement-type.js.map +0 -1
  351. package/dist-server/service/income-statement/income-statement.d.ts +0 -28
  352. package/dist-server/service/income-statement/income-statement.js +0 -137
  353. package/dist-server/service/income-statement/income-statement.js.map +0 -1
  354. package/dist-server/service/income-statement/index.d.ts +0 -8
  355. package/dist-server/service/income-statement/index.js +0 -13
  356. package/dist-server/service/income-statement/index.js.map +0 -1
  357. package/dist-server/service/index.d.ts +0 -16
  358. package/dist-server/service/index.js +0 -74
  359. package/dist-server/service/index.js.map +0 -1
  360. package/dist-server/service/payment/event-subscriber.d.ts +0 -7
  361. package/dist-server/service/payment/event-subscriber.js +0 -21
  362. package/dist-server/service/payment/event-subscriber.js.map +0 -1
  363. package/dist-server/service/payment/index.d.ts +0 -7
  364. package/dist-server/service/payment/index.js +0 -12
  365. package/dist-server/service/payment/index.js.map +0 -1
  366. package/dist-server/service/payment/payment-history.d.ts +0 -37
  367. package/dist-server/service/payment/payment-history.js +0 -179
  368. package/dist-server/service/payment/payment-history.js.map +0 -1
  369. package/dist-server/service/payment/payment-mutation.d.ts +0 -10
  370. package/dist-server/service/payment/payment-mutation.js +0 -134
  371. package/dist-server/service/payment/payment-mutation.js.map +0 -1
  372. package/dist-server/service/payment/payment-query.d.ts +0 -11
  373. package/dist-server/service/payment/payment-query.js +0 -81
  374. package/dist-server/service/payment/payment-query.js.map +0 -1
  375. package/dist-server/service/payment/payment-type.d.ts +0 -30
  376. package/dist-server/service/payment/payment-type.js +0 -114
  377. package/dist-server/service/payment/payment-type.js.map +0 -1
  378. package/dist-server/service/payment/payment.d.ts +0 -42
  379. package/dist-server/service/payment/payment.js +0 -181
  380. package/dist-server/service/payment/payment.js.map +0 -1
  381. package/dist-server/service/transaction/event-subscriber.d.ts +0 -7
  382. package/dist-server/service/transaction/event-subscriber.js +0 -21
  383. package/dist-server/service/transaction/event-subscriber.js.map +0 -1
  384. package/dist-server/service/transaction/index.d.ts +0 -8
  385. package/dist-server/service/transaction/index.js +0 -12
  386. package/dist-server/service/transaction/index.js.map +0 -1
  387. package/dist-server/service/transaction/transaction-history.d.ts +0 -36
  388. package/dist-server/service/transaction/transaction-history.js +0 -184
  389. package/dist-server/service/transaction/transaction-history.js.map +0 -1
  390. package/dist-server/service/transaction/transaction-mutation.d.ts +0 -10
  391. package/dist-server/service/transaction/transaction-mutation.js +0 -134
  392. package/dist-server/service/transaction/transaction-mutation.js.map +0 -1
  393. package/dist-server/service/transaction/transaction-query.d.ts +0 -11
  394. package/dist-server/service/transaction/transaction-query.js +0 -81
  395. package/dist-server/service/transaction/transaction-query.js.map +0 -1
  396. package/dist-server/service/transaction/transaction-type.d.ts +0 -19
  397. package/dist-server/service/transaction/transaction-type.js +0 -73
  398. package/dist-server/service/transaction/transaction-type.js.map +0 -1
  399. package/dist-server/service/transaction/transaction.d.ts +0 -57
  400. package/dist-server/service/transaction/transaction.js +0 -241
  401. package/dist-server/service/transaction/transaction.js.map +0 -1
  402. package/dist-server/tsconfig.tsbuildinfo +0 -1
@@ -1,179 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentHistory = void 0;
4
- const tslib_1 = require("tslib");
5
- const type_graphql_1 = require("type-graphql");
6
- const typeorm_1 = require("typeorm");
7
- const typeorm_history_1 = require("@operato/typeorm-history");
8
- const auth_base_1 = require("@things-factory/auth-base");
9
- const env_1 = require("@things-factory/env");
10
- const shell_1 = require("@things-factory/shell");
11
- const transaction_1 = require("../transaction/transaction");
12
- const payment_1 = require("./payment");
13
- const bank_account_1 = require("../bank-account/bank-account");
14
- const ORMCONFIG = env_1.config.get('ormconfig', {});
15
- const DATABASE_TYPE = ORMCONFIG.type;
16
- let PaymentHistory = class PaymentHistory {
17
- constructor() {
18
- this.version = 1;
19
- }
20
- };
21
- exports.PaymentHistory = PaymentHistory;
22
- tslib_1.__decorate([
23
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
24
- (0, type_graphql_1.Field)(type => type_graphql_1.ID),
25
- tslib_1.__metadata("design:type", String)
26
- ], PaymentHistory.prototype, "id", void 0);
27
- tslib_1.__decorate([
28
- (0, typeorm_1.Column)({ nullable: true, default: 1 }),
29
- (0, type_graphql_1.Field)({ nullable: true }),
30
- tslib_1.__metadata("design:type", Number)
31
- ], PaymentHistory.prototype, "version", void 0);
32
- tslib_1.__decorate([
33
- (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
34
- (0, type_graphql_1.Field)({ nullable: true }),
35
- tslib_1.__metadata("design:type", shell_1.Domain)
36
- ], PaymentHistory.prototype, "domain", void 0);
37
- tslib_1.__decorate([
38
- (0, typeorm_1.RelationId)((payment) => payment.domain),
39
- tslib_1.__metadata("design:type", String)
40
- ], PaymentHistory.prototype, "domainId", void 0);
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
- )
46
- ], PaymentHistory.prototype, "transaction", void 0);
47
- tslib_1.__decorate([
48
- (0, typeorm_1.RelationId)((payment) => payment.transaction),
49
- tslib_1.__metadata("design:type", String)
50
- ], PaymentHistory.prototype, "transactionId", void 0);
51
- tslib_1.__decorate([
52
- (0, typeorm_1.Column)({ nullable: true }),
53
- (0, type_graphql_1.Field)({ nullable: true, description: 'The currency used in the payment' }),
54
- tslib_1.__metadata("design:type", String)
55
- ], PaymentHistory.prototype, "currency", void 0);
56
- 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),
82
- tslib_1.__metadata("design:type", String)
83
- ], PaymentHistory.prototype, "destinationBankAccountId", void 0);
84
- 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' }),
87
- tslib_1.__metadata("design:type", Number)
88
- ], PaymentHistory.prototype, "year", void 0);
89
- tslib_1.__decorate([
90
- (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);
94
- tslib_1.__decorate([
95
- (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);
105
- 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)' }),
108
- tslib_1.__metadata("design:type", String)
109
- ], PaymentHistory.prototype, "direction", void 0);
110
- 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' }),
113
- tslib_1.__metadata("design:type", String)
114
- ], PaymentHistory.prototype, "note", void 0);
115
- tslib_1.__decorate([
116
- (0, typeorm_1.Column)({ nullable: true }),
117
- (0, type_graphql_1.Field)({ nullable: true }),
118
- tslib_1.__metadata("design:type", Date)
119
- ], PaymentHistory.prototype, "createdAt", void 0);
120
- tslib_1.__decorate([
121
- (0, typeorm_1.Column)({ nullable: true }),
122
- (0, type_graphql_1.Field)({ nullable: true }),
123
- tslib_1.__metadata("design:type", Date)
124
- ], PaymentHistory.prototype, "updatedAt", void 0);
125
- tslib_1.__decorate([
126
- (0, typeorm_1.Column)({ nullable: true }),
127
- (0, type_graphql_1.Field)({ nullable: true }),
128
- tslib_1.__metadata("design:type", Date)
129
- ], PaymentHistory.prototype, "deletedAt", void 0);
130
- tslib_1.__decorate([
131
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
132
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
133
- tslib_1.__metadata("design:type", auth_base_1.User)
134
- ], PaymentHistory.prototype, "creator", void 0);
135
- tslib_1.__decorate([
136
- (0, typeorm_1.RelationId)((payment) => payment.creator),
137
- tslib_1.__metadata("design:type", String)
138
- ], PaymentHistory.prototype, "creatorId", void 0);
139
- tslib_1.__decorate([
140
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
141
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
142
- tslib_1.__metadata("design:type", auth_base_1.User)
143
- ], PaymentHistory.prototype, "updater", void 0);
144
- tslib_1.__decorate([
145
- (0, typeorm_1.RelationId)((payment) => payment.updater),
146
- tslib_1.__metadata("design:type", String)
147
- ], 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
- tslib_1.__decorate([
153
- (0, typeorm_history_1.HistoryOriginalIdColumn)(),
154
- tslib_1.__metadata("design:type", String)
155
- ], PaymentHistory.prototype, "originalId", void 0);
156
- tslib_1.__decorate([
157
- (0, typeorm_history_1.HistoryActionColumn)({
158
- nullable: false,
159
- type: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
160
- ? 'enum'
161
- : DATABASE_TYPE == 'oracle'
162
- ? 'varchar2'
163
- : DATABASE_TYPE == 'mssql'
164
- ? 'nvarchar'
165
- : 'varchar',
166
- enum: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
167
- ? typeorm_history_1.HistoryActionType
168
- : undefined,
169
- length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10
170
- }),
171
- tslib_1.__metadata("design:type", String)
172
- ], PaymentHistory.prototype, "action", void 0);
173
- exports.PaymentHistory = PaymentHistory = tslib_1.__decorate([
174
- (0, typeorm_1.Entity)(),
175
- (0, typeorm_1.Index)('ix_payment_history_0', (paymentHistory) => [paymentHistory.originalId, paymentHistory.version], { unique: true }),
176
- (0, typeorm_1.Index)('ix_payment_history_1', (paymentHistory) => [paymentHistory.domain, paymentHistory.originalId, paymentHistory.version], { unique: true }),
177
- (0, type_graphql_1.ObjectType)({ description: 'History Entity of Payment' })
178
- ], PaymentHistory);
179
- //# sourceMappingURL=payment-history.js.map
@@ -1 +0,0 @@
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,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAc7B,IAAM,cAAc,GAApB,MAAM,cAAc;IAApB;QAOL,YAAO,GAAY,CAAC,CAAA;IAmHtB,CAAC;CAAA,CAAA;AA1HY,wCAAc;AAGhB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;0CACC;AAInB;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACtC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACN;AAIpB;IAFC,IAAA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,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,10 +0,0 @@
1
- import { Payment } from './payment';
2
- import { NewPayment, PaymentPatch } from './payment-type';
3
- export declare class PaymentMutation {
4
- createPayment(payment: NewPayment, context: ResolverContext): Promise<Payment>;
5
- updatePayment(id: string, patch: PaymentPatch, context: ResolverContext): Promise<Payment>;
6
- updateMultiplePayment(patches: PaymentPatch[], context: ResolverContext): Promise<Payment[]>;
7
- deletePayment(id: string, context: ResolverContext): Promise<boolean>;
8
- deletePayments(ids: string[], context: ResolverContext): Promise<boolean>;
9
- importPayments(payments: PaymentPatch[], context: ResolverContext): Promise<boolean>;
10
- }
@@ -1,134 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentMutation = void 0;
4
- const tslib_1 = require("tslib");
5
- const type_graphql_1 = require("type-graphql");
6
- const typeorm_1 = require("typeorm");
7
- const shell_1 = require("@things-factory/shell");
8
- const payment_1 = require("./payment");
9
- const payment_type_1 = require("./payment-type");
10
- let PaymentMutation = class PaymentMutation {
11
- async createPayment(payment, context) {
12
- const { domain, user, tx } = context.state;
13
- const result = await (0, shell_1.getRepository)(payment_1.Payment, tx).save(Object.assign(Object.assign({}, payment), { domain, creator: user, updater: user }));
14
- return result;
15
- }
16
- async updatePayment(id, patch, context) {
17
- const { domain, user, tx } = context.state;
18
- const repository = (0, shell_1.getRepository)(payment_1.Payment, tx);
19
- const payment = await repository.findOne({
20
- where: { domain: { id: domain.id }, id }
21
- });
22
- const result = await repository.save(Object.assign(Object.assign(Object.assign({}, payment), patch), { updater: user }));
23
- return result;
24
- }
25
- async updateMultiplePayment(patches, context) {
26
- const { domain, user, tx } = context.state;
27
- let results = [];
28
- const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
29
- const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
30
- const paymentRepo = (0, shell_1.getRepository)(payment_1.Payment, tx);
31
- if (_createRecords.length > 0) {
32
- for (let i = 0; i < _createRecords.length; i++) {
33
- const newRecord = _createRecords[i];
34
- const result = await paymentRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
35
- results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
36
- }
37
- }
38
- if (_updateRecords.length > 0) {
39
- for (let i = 0; i < _updateRecords.length; i++) {
40
- const updateRecord = _updateRecords[i];
41
- const payment = await paymentRepo.findOneBy({ id: updateRecord.id });
42
- const result = await paymentRepo.save(Object.assign(Object.assign(Object.assign({}, payment), updateRecord), { updater: user }));
43
- results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
44
- }
45
- }
46
- return results;
47
- }
48
- async deletePayment(id, context) {
49
- const { domain, tx } = context.state;
50
- await (0, shell_1.getRepository)(payment_1.Payment, tx).delete({ domain: { id: domain.id }, id });
51
- return true;
52
- }
53
- async deletePayments(ids, context) {
54
- const { domain, tx } = context.state;
55
- await (0, shell_1.getRepository)(payment_1.Payment, tx).delete({
56
- domain: { id: domain.id },
57
- id: (0, typeorm_1.In)(ids)
58
- });
59
- return true;
60
- }
61
- async importPayments(payments, context) {
62
- const { domain, tx } = context.state;
63
- await Promise.all(payments.map(async (payment) => {
64
- const createdPayment = await (0, shell_1.getRepository)(payment_1.Payment, tx).save(Object.assign({ domain }, payment));
65
- }));
66
- return true;
67
- }
68
- };
69
- exports.PaymentMutation = PaymentMutation;
70
- tslib_1.__decorate([
71
- (0, type_graphql_1.Directive)('@transaction'),
72
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
73
- (0, type_graphql_1.Mutation)(returns => payment_1.Payment, { description: 'To create new Payment' }),
74
- tslib_1.__param(0, (0, type_graphql_1.Arg)('payment')),
75
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
76
- tslib_1.__metadata("design:type", Function),
77
- tslib_1.__metadata("design:paramtypes", [payment_type_1.NewPayment, Object]),
78
- tslib_1.__metadata("design:returntype", Promise)
79
- ], PaymentMutation.prototype, "createPayment", null);
80
- tslib_1.__decorate([
81
- (0, type_graphql_1.Directive)('@transaction'),
82
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
83
- (0, type_graphql_1.Mutation)(returns => payment_1.Payment, { description: 'To modify Payment information' }),
84
- tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
85
- tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
86
- tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
87
- tslib_1.__metadata("design:type", Function),
88
- tslib_1.__metadata("design:paramtypes", [String, payment_type_1.PaymentPatch, Object]),
89
- tslib_1.__metadata("design:returntype", Promise)
90
- ], PaymentMutation.prototype, "updatePayment", null);
91
- tslib_1.__decorate([
92
- (0, type_graphql_1.Directive)('@transaction'),
93
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
94
- (0, type_graphql_1.Mutation)(returns => [payment_1.Payment], { description: "To modify multiple Payments' information" }),
95
- tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [payment_type_1.PaymentPatch])),
96
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
97
- tslib_1.__metadata("design:type", Function),
98
- tslib_1.__metadata("design:paramtypes", [Array, Object]),
99
- tslib_1.__metadata("design:returntype", Promise)
100
- ], PaymentMutation.prototype, "updateMultiplePayment", null);
101
- tslib_1.__decorate([
102
- (0, type_graphql_1.Directive)('@transaction'),
103
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
104
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete Payment' }),
105
- tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
106
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
107
- tslib_1.__metadata("design:type", Function),
108
- tslib_1.__metadata("design:paramtypes", [String, Object]),
109
- tslib_1.__metadata("design:returntype", Promise)
110
- ], PaymentMutation.prototype, "deletePayment", null);
111
- tslib_1.__decorate([
112
- (0, type_graphql_1.Directive)('@transaction'),
113
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
114
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple Payments' }),
115
- tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
116
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
117
- tslib_1.__metadata("design:type", Function),
118
- tslib_1.__metadata("design:paramtypes", [Array, Object]),
119
- tslib_1.__metadata("design:returntype", Promise)
120
- ], PaymentMutation.prototype, "deletePayments", null);
121
- tslib_1.__decorate([
122
- (0, type_graphql_1.Directive)('@transaction'),
123
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
124
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To import multiple Payments' }),
125
- tslib_1.__param(0, (0, type_graphql_1.Arg)('payments', type => [payment_type_1.PaymentPatch])),
126
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
127
- tslib_1.__metadata("design:type", Function),
128
- tslib_1.__metadata("design:paramtypes", [Array, Object]),
129
- tslib_1.__metadata("design:returntype", Promise)
130
- ], PaymentMutation.prototype, "importPayments", null);
131
- exports.PaymentMutation = PaymentMutation = tslib_1.__decorate([
132
- (0, type_graphql_1.Resolver)(payment_1.Payment)
133
- ], PaymentMutation);
134
- //# sourceMappingURL=payment-mutation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-mutation.js","sourceRoot":"","sources":["../../../server/service/payment/payment-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,iDAAqD;AAErD,uCAAmC;AACnC,iDAAyD;AAGlD,IAAM,eAAe,GAArB,MAAM,eAAe;IAIpB,AAAN,KAAK,CAAC,aAAa,CAAiB,OAAmB,EAAS,OAAwB;QACtF,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAa,EAAC,iBAAO,EAAE,EAAE,CAAC,CAAC,IAAI,iCAC/C,OAAO,KACV,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC;IAKK,AAAN,KAAK,CAAC,aAAa,CACN,EAAU,EACP,KAAmB,EAC1B,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,iBAAO,EAAE,EAAE,CAAC,CAAA;QAC7C,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACvC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;QAEF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,IAAI,+CAC/B,OAAO,GACP,KAA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AA;IACtC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;4DAwCP;AAKK;IAHL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,wBAAS,EAAC,2DAA2D,CAAC;IACtE,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;oDAMhD;AAKK;IAHL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,wBAAS,EAAC,2DAA2D,CAAC;IACtE,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IACvD,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;qDASvE;AAKK;IAHL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,wBAAS,EAAC,2DAA2D,CAAC;IACtE,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IAE1E,mBAAA,IAAA,kBAAG,EAAC,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,2BAAY,CAAC,CAAC,CAAA;IACvC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;qDAWP;0BAjIU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,iBAAO,CAAC;GACL,eAAe,CAkI3B","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { getRepository } from '@things-factory/shell'\n\nimport { Payment } from './payment'\nimport { NewPayment, PaymentPatch } from './payment-type'\n\n@Resolver(Payment)\nexport class PaymentMutation {\n @Directive('@transaction')\n @Directive('@privilege(category: \"accounting\", privilege: \"mutation\")')\n @Mutation(returns => Payment, { description: 'To create new Payment' })\n async createPayment(@Arg('payment') payment: NewPayment, @Ctx() context: ResolverContext): Promise<Payment> {\n const { domain, user, tx } = context.state\n\n const result = await getRepository(Payment, tx).save({\n ...payment,\n domain,\n creator: user,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Directive('@privilege(category: \"accounting\", privilege: \"mutation\")')\n @Mutation(returns => Payment, { description: 'To modify Payment information' })\n async updatePayment(\n @Arg('id') id: string,\n @Arg('patch') patch: PaymentPatch,\n @Ctx() context: ResolverContext\n ): Promise<Payment> {\n const { domain, user, tx } = context.state\n\n const repository = getRepository(Payment, tx)\n const payment = await repository.findOne({\n where: { domain: { id: domain.id }, id }\n })\n\n const result = await repository.save({\n ...payment,\n ...patch,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Directive('@privilege(category: \"accounting\", privilege: \"mutation\")')\n @Mutation(returns => [Payment], { description: \"To modify multiple Payments' information\" })\n async updateMultiplePayment(\n @Arg('patches', type => [PaymentPatch]) patches: PaymentPatch[],\n @Ctx() context: ResolverContext\n ): Promise<Payment[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const paymentRepo = getRepository(Payment, tx)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await paymentRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const payment = await paymentRepo.findOneBy({ id: updateRecord.id })\n\n const result = await paymentRepo.save({\n ...payment,\n ...updateRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Directive('@privilege(category: \"accounting\", privilege: \"mutation\")')\n @Mutation(returns => Boolean, { description: 'To delete Payment' })\n async deletePayment(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await getRepository(Payment, tx).delete({ domain: { id: domain.id }, id })\n\n return true\n }\n\n @Directive('@transaction')\n @Directive('@privilege(category: \"accounting\", privilege: \"mutation\")')\n @Mutation(returns => Boolean, { description: 'To delete multiple Payments' })\n async deletePayments(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await getRepository(Payment, tx).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n return true\n }\n\n @Directive('@transaction')\n @Directive('@privilege(category: \"accounting\", privilege: \"mutation\")')\n @Mutation(returns => Boolean, { description: 'To import multiple Payments' })\n async importPayments(\n @Arg('payments', type => [PaymentPatch]) payments: PaymentPatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await Promise.all(\n payments.map(async (payment: PaymentPatch) => {\n const createdPayment: Payment = await getRepository(Payment, tx).save({ domain, ...payment })\n })\n )\n\n return true\n }\n}\n"]}
@@ -1,11 +0,0 @@
1
- import { Domain, ListParam } from '@things-factory/shell';
2
- import { User } from '@things-factory/auth-base';
3
- import { Payment } from './payment';
4
- import { PaymentList } from './payment-type';
5
- export declare class PaymentQuery {
6
- payment(id: string, context: ResolverContext): Promise<Payment>;
7
- payments(params: ListParam, context: ResolverContext): Promise<PaymentList>;
8
- domain(payment: Payment): Promise<Domain>;
9
- updater(payment: Payment): Promise<User>;
10
- creator(payment: Payment): Promise<User>;
11
- }
@@ -1,81 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentQuery = void 0;
4
- const tslib_1 = require("tslib");
5
- const type_graphql_1 = require("type-graphql");
6
- const shell_1 = require("@things-factory/shell");
7
- const auth_base_1 = require("@things-factory/auth-base");
8
- const payment_1 = require("./payment");
9
- const payment_type_1 = require("./payment-type");
10
- let PaymentQuery = class PaymentQuery {
11
- async payment(id, context) {
12
- const { domain } = context.state;
13
- return await (0, shell_1.getRepository)(payment_1.Payment).findOne({
14
- where: { domain: { id: domain.id }, id }
15
- });
16
- }
17
- async payments(params, context) {
18
- const { domain } = context.state;
19
- const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
20
- domain,
21
- params,
22
- repository: await (0, shell_1.getRepository)(payment_1.Payment),
23
- searchables: []
24
- });
25
- const [items, total] = await queryBuilder.getManyAndCount();
26
- return { items, total };
27
- }
28
- async domain(payment) {
29
- return payment.domainId && (await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: payment.domainId }));
30
- }
31
- async updater(payment) {
32
- return payment.updaterId && (await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: payment.updaterId }));
33
- }
34
- async creator(payment) {
35
- return payment.creatorId && (await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: payment.creatorId }));
36
- }
37
- };
38
- exports.PaymentQuery = PaymentQuery;
39
- tslib_1.__decorate([
40
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "query")'),
41
- (0, type_graphql_1.Query)(returns => payment_1.Payment, { nullable: true, description: 'To fetch a Payment' }),
42
- tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
43
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
44
- tslib_1.__metadata("design:type", Function),
45
- tslib_1.__metadata("design:paramtypes", [String, Object]),
46
- tslib_1.__metadata("design:returntype", Promise)
47
- ], PaymentQuery.prototype, "payment", null);
48
- tslib_1.__decorate([
49
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "query")'),
50
- (0, type_graphql_1.Query)(returns => payment_type_1.PaymentList, { description: 'To fetch multiple Payments' }),
51
- tslib_1.__param(0, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
52
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
53
- tslib_1.__metadata("design:type", Function),
54
- tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
55
- tslib_1.__metadata("design:returntype", Promise)
56
- ], PaymentQuery.prototype, "payments", null);
57
- tslib_1.__decorate([
58
- (0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
59
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
60
- tslib_1.__metadata("design:type", Function),
61
- tslib_1.__metadata("design:paramtypes", [payment_1.Payment]),
62
- tslib_1.__metadata("design:returntype", Promise)
63
- ], PaymentQuery.prototype, "domain", null);
64
- tslib_1.__decorate([
65
- (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
66
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
67
- tslib_1.__metadata("design:type", Function),
68
- tslib_1.__metadata("design:paramtypes", [payment_1.Payment]),
69
- tslib_1.__metadata("design:returntype", Promise)
70
- ], PaymentQuery.prototype, "updater", null);
71
- tslib_1.__decorate([
72
- (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
73
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
74
- tslib_1.__metadata("design:type", Function),
75
- tslib_1.__metadata("design:paramtypes", [payment_1.Payment]),
76
- tslib_1.__metadata("design:returntype", Promise)
77
- ], PaymentQuery.prototype, "creator", null);
78
- exports.PaymentQuery = PaymentQuery = tslib_1.__decorate([
79
- (0, type_graphql_1.Resolver)(payment_1.Payment)
80
- ], PaymentQuery);
81
- //# sourceMappingURL=payment-query.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-query.js","sourceRoot":"","sources":["../../../server/service/payment/payment-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAgD;AAChD,uCAAmC;AACnC,iDAA4C;AAGrC,IAAM,YAAY,GAAlB,MAAM,YAAY;IAGjB,AAAN,KAA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Arg, Ctx, Directive } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Payment } from './payment'\nimport { PaymentList } from './payment-type'\n\n@Resolver(Payment)\nexport class PaymentQuery {\n @Directive('@privilege(category: \"accounting\", privilege: \"query\")')\n @Query(returns => Payment!, { nullable: true, description: 'To fetch a Payment' })\n async payment(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Payment> {\n const { domain } = context.state\n\n return await getRepository(Payment).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Directive('@privilege(category: \"accounting\", privilege: \"query\")')\n @Query(returns => PaymentList, { description: 'To fetch multiple Payments' })\n async payments(@Args(type => ListParam) params: ListParam, @Ctx() context: ResolverContext): Promise<PaymentList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(Payment),\n searchables: []\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() payment: Payment): Promise<Domain> {\n return payment.domainId && (await getRepository(Domain).findOneBy({ id: payment.domainId }))\n }\n\n @FieldResolver(type => User)\n async updater(@Root() payment: Payment): Promise<User> {\n return payment.updaterId && (await getRepository(User).findOneBy({ id: payment.updaterId }))\n }\n\n @FieldResolver(type => User)\n async creator(@Root() payment: Payment): Promise<User> {\n return payment.creatorId && (await getRepository(User).findOneBy({ id: payment.creatorId }))\n }\n}\n"]}
@@ -1,30 +0,0 @@
1
- import { ObjectRef } from '@things-factory/shell';
2
- import { Payment, PaymentDirection, PaymentType } from './payment';
3
- export declare class NewPayment {
4
- transaction: ObjectRef;
5
- currency?: string;
6
- amount: number;
7
- paidAt: Date;
8
- direction: PaymentDirection;
9
- paymentType: PaymentType;
10
- sourceBankAccount?: ObjectRef;
11
- destinationBankAccount?: ObjectRef;
12
- note?: string;
13
- }
14
- export declare class PaymentPatch {
15
- id?: string;
16
- transaction: ObjectRef;
17
- currency?: string;
18
- amount: number;
19
- paidAt: Date;
20
- direction: PaymentDirection;
21
- paymentType: PaymentType;
22
- sourceBankAccount?: ObjectRef;
23
- destinationBankAccount?: ObjectRef;
24
- note?: string;
25
- cuFlag?: string;
26
- }
27
- export declare class PaymentList {
28
- items: Payment[];
29
- total: number;
30
- }
@@ -1,114 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentList = exports.PaymentPatch = exports.NewPayment = void 0;
4
- const tslib_1 = require("tslib");
5
- const type_graphql_1 = require("type-graphql");
6
- const shell_1 = require("@things-factory/shell");
7
- const payment_1 = require("./payment");
8
- let NewPayment = class NewPayment {
9
- };
10
- exports.NewPayment = NewPayment;
11
- tslib_1.__decorate([
12
- (0, type_graphql_1.Field)(type => shell_1.ObjectRef),
13
- tslib_1.__metadata("design:type", shell_1.ObjectRef)
14
- ], NewPayment.prototype, "transaction", void 0);
15
- tslib_1.__decorate([
16
- (0, type_graphql_1.Field)({ nullable: true }),
17
- tslib_1.__metadata("design:type", String)
18
- ], NewPayment.prototype, "currency", void 0);
19
- tslib_1.__decorate([
20
- (0, type_graphql_1.Field)({ nullable: false }),
21
- tslib_1.__metadata("design:type", Number)
22
- ], NewPayment.prototype, "amount", void 0);
23
- tslib_1.__decorate([
24
- (0, type_graphql_1.Field)({ nullable: false }),
25
- tslib_1.__metadata("design:type", Date)
26
- ], NewPayment.prototype, "paidAt", void 0);
27
- tslib_1.__decorate([
28
- (0, type_graphql_1.Field)(type => payment_1.PaymentDirection),
29
- tslib_1.__metadata("design:type", String)
30
- ], NewPayment.prototype, "direction", void 0);
31
- tslib_1.__decorate([
32
- (0, type_graphql_1.Field)(type => payment_1.PaymentType, { description: 'Type of the payment' }),
33
- tslib_1.__metadata("design:type", String)
34
- ], NewPayment.prototype, "paymentType", void 0);
35
- tslib_1.__decorate([
36
- (0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true, description: 'Source bank account for the payment' }),
37
- tslib_1.__metadata("design:type", shell_1.ObjectRef)
38
- ], NewPayment.prototype, "sourceBankAccount", void 0);
39
- tslib_1.__decorate([
40
- (0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true, description: 'Destination bank account for the payment' }),
41
- tslib_1.__metadata("design:type", shell_1.ObjectRef)
42
- ], NewPayment.prototype, "destinationBankAccount", void 0);
43
- tslib_1.__decorate([
44
- (0, type_graphql_1.Field)({ nullable: true }),
45
- tslib_1.__metadata("design:type", String)
46
- ], NewPayment.prototype, "note", void 0);
47
- exports.NewPayment = NewPayment = tslib_1.__decorate([
48
- (0, type_graphql_1.InputType)()
49
- ], NewPayment);
50
- let PaymentPatch = class PaymentPatch {
51
- };
52
- exports.PaymentPatch = PaymentPatch;
53
- tslib_1.__decorate([
54
- (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
55
- tslib_1.__metadata("design:type", String)
56
- ], PaymentPatch.prototype, "id", void 0);
57
- tslib_1.__decorate([
58
- (0, type_graphql_1.Field)(type => shell_1.ObjectRef),
59
- tslib_1.__metadata("design:type", shell_1.ObjectRef)
60
- ], PaymentPatch.prototype, "transaction", void 0);
61
- tslib_1.__decorate([
62
- (0, type_graphql_1.Field)({ nullable: true }),
63
- tslib_1.__metadata("design:type", String)
64
- ], PaymentPatch.prototype, "currency", void 0);
65
- tslib_1.__decorate([
66
- (0, type_graphql_1.Field)({ nullable: false }),
67
- tslib_1.__metadata("design:type", Number)
68
- ], PaymentPatch.prototype, "amount", void 0);
69
- tslib_1.__decorate([
70
- (0, type_graphql_1.Field)({ nullable: false }),
71
- tslib_1.__metadata("design:type", Date)
72
- ], PaymentPatch.prototype, "paidAt", void 0);
73
- tslib_1.__decorate([
74
- (0, type_graphql_1.Field)(type => payment_1.PaymentDirection),
75
- tslib_1.__metadata("design:type", String)
76
- ], PaymentPatch.prototype, "direction", void 0);
77
- tslib_1.__decorate([
78
- (0, type_graphql_1.Field)(type => payment_1.PaymentType, { description: 'Type of the payment' }),
79
- tslib_1.__metadata("design:type", String)
80
- ], PaymentPatch.prototype, "paymentType", void 0);
81
- tslib_1.__decorate([
82
- (0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true, description: 'Source bank account for the payment' }),
83
- tslib_1.__metadata("design:type", shell_1.ObjectRef)
84
- ], PaymentPatch.prototype, "sourceBankAccount", void 0);
85
- tslib_1.__decorate([
86
- (0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true, description: 'Destination bank account for the payment' }),
87
- tslib_1.__metadata("design:type", shell_1.ObjectRef)
88
- ], PaymentPatch.prototype, "destinationBankAccount", void 0);
89
- tslib_1.__decorate([
90
- (0, type_graphql_1.Field)({ nullable: true }),
91
- tslib_1.__metadata("design:type", String)
92
- ], PaymentPatch.prototype, "note", void 0);
93
- tslib_1.__decorate([
94
- (0, type_graphql_1.Field)({ nullable: true }),
95
- tslib_1.__metadata("design:type", String)
96
- ], PaymentPatch.prototype, "cuFlag", void 0);
97
- exports.PaymentPatch = PaymentPatch = tslib_1.__decorate([
98
- (0, type_graphql_1.InputType)()
99
- ], PaymentPatch);
100
- let PaymentList = class PaymentList {
101
- };
102
- exports.PaymentList = PaymentList;
103
- tslib_1.__decorate([
104
- (0, type_graphql_1.Field)(type => [payment_1.Payment]),
105
- tslib_1.__metadata("design:type", Array)
106
- ], PaymentList.prototype, "items", void 0);
107
- tslib_1.__decorate([
108
- (0, type_graphql_1.Field)(type => type_graphql_1.Int),
109
- tslib_1.__metadata("design:type", Number)
110
- ], PaymentList.prototype, "total", void 0);
111
- exports.PaymentList = PaymentList = tslib_1.__decorate([
112
- (0, type_graphql_1.ObjectType)()
113
- ], PaymentList);
114
- //# sourceMappingURL=payment-type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-type.js","sourceRoot":"","sources":["../../../server/service/payment/payment-type.ts"],"names":[],"mappings":";;;;AAEA,+CAAsF;AAEtF,iDAA+D;AAE/D,uCAAkE;AAG3D,IA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AAC;;0CACN;sBALF,WAAW;IADvB,IAAA,yBAAU,GAAE;GACA,WAAW,CAMvB","sourcesContent":["import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'\nimport GraphQLUpload from 'graphql-upload/GraphQLUpload.js'\nimport { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { ObjectRef, ScalarObject } from '@things-factory/shell'\n\nimport { Payment, PaymentDirection, PaymentType } from './payment'\n\n@InputType()\nexport class NewPayment {\n @Field(type => ObjectRef)\n transaction: ObjectRef\n\n @Field({ nullable: true })\n currency?: string\n\n @Field({ nullable: false })\n amount: number\n\n @Field({ nullable: false })\n paidAt: Date\n\n @Field(type => PaymentDirection)\n direction: PaymentDirection\n\n @Field(type => PaymentType, { description: 'Type of the payment' })\n paymentType: PaymentType // 결제 유형\n\n @Field(type => ObjectRef, { nullable: true, description: 'Source bank account for the payment' })\n sourceBankAccount?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true, description: 'Destination bank account for the payment' })\n destinationBankAccount?: ObjectRef\n\n @Field({ nullable: true })\n note?: string\n}\n\n@InputType()\nexport class PaymentPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field(type => ObjectRef)\n transaction: ObjectRef\n\n @Field({ nullable: true })\n currency?: string\n\n @Field({ nullable: false })\n amount: number\n\n @Field({ nullable: false })\n paidAt: Date\n\n @Field(type => PaymentDirection)\n direction: PaymentDirection\n\n @Field(type => PaymentType, { description: 'Type of the payment' })\n paymentType: PaymentType // 결제 유형\n\n @Field(type => ObjectRef, { nullable: true, description: 'Source bank account for the payment' })\n sourceBankAccount?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true, description: 'Destination bank account for the payment' })\n destinationBankAccount?: ObjectRef\n\n @Field({ nullable: true })\n note?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class PaymentList {\n @Field(type => [Payment])\n items: Payment[]\n\n @Field(type => Int)\n total: number\n}\n"]}