@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,94 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FinancialStatementLineItem = void 0;
4
- const tslib_1 = require("tslib");
5
- const typeorm_1 = require("typeorm");
6
- const type_graphql_1 = require("type-graphql");
7
- const auth_base_1 = require("@things-factory/auth-base");
8
- const account_1 = require("../account/account");
9
- const financial_statement_1 = require("./financial-statement");
10
- let FinancialStatementLineItem = class FinancialStatementLineItem {
11
- };
12
- exports.FinancialStatementLineItem = FinancialStatementLineItem;
13
- tslib_1.__decorate([
14
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
15
- (0, type_graphql_1.Field)(type => type_graphql_1.ID),
16
- tslib_1.__metadata("design:type", String)
17
- ], FinancialStatementLineItem.prototype, "id", void 0);
18
- tslib_1.__decorate([
19
- (0, typeorm_1.ManyToOne)(type => financial_statement_1.FinancialStatement, statement => statement.lineItems),
20
- (0, type_graphql_1.Field)(type => financial_statement_1.FinancialStatement, { description: 'The financial statement this line item is associated with' }),
21
- tslib_1.__metadata("design:type", financial_statement_1.FinancialStatement // 연결된 재무제표
22
- )
23
- ], FinancialStatementLineItem.prototype, "statement", void 0);
24
- tslib_1.__decorate([
25
- (0, typeorm_1.RelationId)((lineItem) => lineItem.statement),
26
- tslib_1.__metadata("design:type", String)
27
- ], FinancialStatementLineItem.prototype, "statementId", void 0);
28
- tslib_1.__decorate([
29
- (0, typeorm_1.ManyToOne)(type => account_1.Account),
30
- (0, type_graphql_1.Field)(type => account_1.Account, { description: 'The financial account associated with this line item' }),
31
- tslib_1.__metadata("design:type", account_1.Account // 라인 아이템과 연결된 계정
32
- )
33
- ], FinancialStatementLineItem.prototype, "account", void 0);
34
- tslib_1.__decorate([
35
- (0, typeorm_1.RelationId)((lineItem) => lineItem.account),
36
- tslib_1.__metadata("design:type", String)
37
- ], FinancialStatementLineItem.prototype, "accountId", void 0);
38
- tslib_1.__decorate([
39
- (0, typeorm_1.Column)({ nullable: false }),
40
- (0, type_graphql_1.Field)({ nullable: false, description: 'The monetary amount related to the financial account for this line item' }),
41
- tslib_1.__metadata("design:type", Number)
42
- ], FinancialStatementLineItem.prototype, "amount", void 0);
43
- tslib_1.__decorate([
44
- (0, typeorm_1.Column)({ nullable: true }),
45
- (0, type_graphql_1.Field)({ nullable: true, description: 'Optional description or notes for this line item' }),
46
- tslib_1.__metadata("design:type", String)
47
- ], FinancialStatementLineItem.prototype, "description", void 0);
48
- tslib_1.__decorate([
49
- (0, typeorm_1.CreateDateColumn)(),
50
- (0, type_graphql_1.Field)({ nullable: true, description: 'The date and time when this line item was created' }),
51
- tslib_1.__metadata("design:type", Date // 라인 아이템이 생성된 날짜 및 시간
52
- )
53
- ], FinancialStatementLineItem.prototype, "createdAt", void 0);
54
- tslib_1.__decorate([
55
- (0, typeorm_1.UpdateDateColumn)(),
56
- (0, type_graphql_1.Field)({ nullable: true, description: 'The date and time when this line item was last updated' }),
57
- tslib_1.__metadata("design:type", Date // 라인 아이템이 마지막으로 업데이트된 날짜 및 시간
58
- )
59
- ], FinancialStatementLineItem.prototype, "updatedAt", void 0);
60
- tslib_1.__decorate([
61
- (0, typeorm_1.DeleteDateColumn)(),
62
- (0, type_graphql_1.Field)({ nullable: true, description: 'The date and time when this line item was deleted' }),
63
- tslib_1.__metadata("design:type", Date // 라인 아이템이 삭제된 날짜 및 시간
64
- )
65
- ], FinancialStatementLineItem.prototype, "deletedAt", void 0);
66
- tslib_1.__decorate([
67
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
68
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'The user who created this line item' }),
69
- tslib_1.__metadata("design:type", auth_base_1.User // 라인 아이템을 생성한 사용자
70
- )
71
- ], FinancialStatementLineItem.prototype, "creator", void 0);
72
- tslib_1.__decorate([
73
- (0, typeorm_1.RelationId)((lineItem) => lineItem.creator),
74
- tslib_1.__metadata("design:type", String)
75
- ], FinancialStatementLineItem.prototype, "creatorId", void 0);
76
- tslib_1.__decorate([
77
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
78
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'The user who last updated this line item' }),
79
- tslib_1.__metadata("design:type", auth_base_1.User // 라인 아이템을 마지막으로 업데이트한 사용자
80
- )
81
- ], FinancialStatementLineItem.prototype, "updater", void 0);
82
- tslib_1.__decorate([
83
- (0, typeorm_1.RelationId)((lineItem) => lineItem.updater),
84
- tslib_1.__metadata("design:type", String)
85
- ], FinancialStatementLineItem.prototype, "updaterId", void 0);
86
- exports.FinancialStatementLineItem = FinancialStatementLineItem = tslib_1.__decorate([
87
- (0, type_graphql_1.ObjectType)({ description: 'Line item for a financial statement, representing the breakdown of financial accounts' }),
88
- (0, typeorm_1.Entity)(),
89
- (0, typeorm_1.Index)('ix_financial_statement_line_item_0', (lineItem) => [lineItem.statement, lineItem.account], {
90
- unique: false,
91
- where: '"deleted_at" IS NULL'
92
- })
93
- ], FinancialStatementLineItem);
94
- //# sourceMappingURL=financial-statement-line-item.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"financial-statement-line-item.js","sourceRoot":"","sources":["../../../server/service/financial-statement/financial-statement-line-item.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAAoD;AAGpD,yDAAgD;AAChD,gDAA4C;AAC5C,+DAA0D;AAYnD,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;CAoDtC,CAAA;AApDY,gEAA0B;AAG5B;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;sDACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,wCAAkB,EAAE,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC;IACvE,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,wCAAkB,EAAE,EAAE,WAAW,EAAE,2DAA2D,EAAE,CAAC;sCACrG,wCAAkB,CAAC,WAAW;;6DAAZ;AAG7B;IADC,IAAA,oBAAU,EAAC,CAAC,QAAoC,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;;+DACtD;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAO,CAAC;IAC1B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,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AC;sCAClF,gBAAI,CAAC,kBAAkB;;2DAAnB;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,QAAoC,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;;6DACrD;AAIlB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,0CAA0C,EAAE,CAAC;sCACvF,gBAAI,CAAC,0BAA0B;;2DAA3B;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,QAAoC,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;;6DACrD;qCAnDP,0BAA0B;IAVtC,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,uFAAuF,EAAE,CAAC;IACpH,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,oCAAoC,EACpC,CAAC,QAAoC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,EAChF;QACE,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,sBAAsB;KAC9B,CACF;GACY,0BAA0B,CAoDtC","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn,\n VersionColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Account } from '../account/account'\nimport { FinancialStatement } from './financial-statement'\n\n@ObjectType({ description: 'Line item for a financial statement, representing the breakdown of financial accounts' })\n@Entity()\n@Index(\n 'ix_financial_statement_line_item_0',\n (lineItem: FinancialStatementLineItem) => [lineItem.statement, lineItem.account],\n {\n unique: false,\n where: '\"deleted_at\" IS NULL'\n }\n)\nexport class FinancialStatementLineItem {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string // 고유 식별자 (UUID)\n\n @ManyToOne(type => FinancialStatement, statement => statement.lineItems)\n @Field(type => FinancialStatement, { description: 'The financial statement this line item is associated with' })\n statement: FinancialStatement // 연결된 재무제표\n\n @RelationId((lineItem: FinancialStatementLineItem) => lineItem.statement)\n statementId: string // 재무제표의 ID\n\n @ManyToOne(type => Account)\n @Field(type => Account, { description: 'The financial account associated with this line item' })\n account: Account // 라인 아이템과 연결된 계정\n\n @RelationId((lineItem: FinancialStatementLineItem) => lineItem.account)\n accountId: string // 계정의 ID\n\n @Column({ nullable: false })\n @Field({ nullable: false, description: 'The monetary amount related to the financial account for this line item' })\n amount: number // 계정에 대한 금액\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Optional description or notes for this line item' })\n description?: string // 라인 아이템에 대한 선택적 설명 또는 메모\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'The date and time when this line item was created' })\n createdAt?: Date // 라인 아이템이 생성된 날짜 및 시간\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'The date and time when this line item was last updated' })\n updatedAt?: Date // 라인 아이템이 마지막으로 업데이트된 날짜 및 시간\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'The date and time when this line item was deleted' })\n deletedAt?: Date // 라인 아이템이 삭제된 날짜 및 시간\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who created this line item' })\n creator?: User // 라인 아이템을 생성한 사용자\n\n @RelationId((lineItem: FinancialStatementLineItem) => lineItem.creator)\n creatorId?: string // 생성자의 ID\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who last updated this line item' })\n updater?: User // 라인 아이템을 마지막으로 업데이트한 사용자\n\n @RelationId((lineItem: FinancialStatementLineItem) => lineItem.updater)\n updaterId?: string // 업데이트한 사용자의 ID\n}\n"]}
@@ -1,10 +0,0 @@
1
- import { FinancialStatement } from './financial-statement';
2
- import { NewFinancialStatement, FinancialStatementPatch } from './financial-statement-type';
3
- export declare class FinancialStatementMutation {
4
- createFinancialStatement(financialStatement: NewFinancialStatement, context: ResolverContext): Promise<FinancialStatement>;
5
- updateFinancialStatement(id: string, patch: FinancialStatementPatch, context: ResolverContext): Promise<FinancialStatement>;
6
- updateMultipleFinancialStatement(patches: FinancialStatementPatch[], context: ResolverContext): Promise<FinancialStatement[]>;
7
- deleteFinancialStatement(id: string, context: ResolverContext): Promise<boolean>;
8
- deleteFinancialStatements(ids: string[], context: ResolverContext): Promise<boolean>;
9
- importFinancialStatements(financialStatements: FinancialStatementPatch[], context: ResolverContext): Promise<boolean>;
10
- }
@@ -1,136 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FinancialStatementMutation = 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 financial_statement_1 = require("./financial-statement");
9
- const financial_statement_type_1 = require("./financial-statement-type");
10
- let FinancialStatementMutation = class FinancialStatementMutation {
11
- async createFinancialStatement(financialStatement, context) {
12
- const { domain, user, tx } = context.state;
13
- const result = await (0, shell_1.getRepository)(financial_statement_1.FinancialStatement, tx).save(Object.assign(Object.assign({}, financialStatement), { domain, creator: user, updater: user }));
14
- return result;
15
- }
16
- async updateFinancialStatement(id, patch, context) {
17
- const { domain, user, tx } = context.state;
18
- const repository = (0, shell_1.getRepository)(financial_statement_1.FinancialStatement, tx);
19
- const financialStatement = await repository.findOne({
20
- where: { domain: { id: domain.id }, id }
21
- });
22
- const result = await repository.save(Object.assign(Object.assign(Object.assign({}, financialStatement), patch), { updater: user }));
23
- return result;
24
- }
25
- async updateMultipleFinancialStatement(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 financialStatementRepo = (0, shell_1.getRepository)(financial_statement_1.FinancialStatement, tx);
31
- if (_createRecords.length > 0) {
32
- for (let i = 0; i < _createRecords.length; i++) {
33
- const newRecord = _createRecords[i];
34
- const result = await financialStatementRepo.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 financialStatement = await financialStatementRepo.findOneBy({ id: updateRecord.id });
42
- const result = await financialStatementRepo.save(Object.assign(Object.assign(Object.assign({}, financialStatement), updateRecord), { updater: user }));
43
- results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
44
- }
45
- }
46
- return results;
47
- }
48
- async deleteFinancialStatement(id, context) {
49
- const { domain, tx } = context.state;
50
- await (0, shell_1.getRepository)(financial_statement_1.FinancialStatement, tx).delete({ domain: { id: domain.id }, id });
51
- return true;
52
- }
53
- async deleteFinancialStatements(ids, context) {
54
- const { domain, tx } = context.state;
55
- await (0, shell_1.getRepository)(financial_statement_1.FinancialStatement, tx).delete({
56
- domain: { id: domain.id },
57
- id: (0, typeorm_1.In)(ids)
58
- });
59
- return true;
60
- }
61
- async importFinancialStatements(financialStatements, context) {
62
- const { domain, tx } = context.state;
63
- await Promise.all(financialStatements.map(async (financialStatement) => {
64
- const createdFinancialStatement = await tx
65
- .getRepository(financial_statement_1.FinancialStatement)
66
- .save(Object.assign({ domain }, financialStatement));
67
- }));
68
- return true;
69
- }
70
- };
71
- exports.FinancialStatementMutation = FinancialStatementMutation;
72
- tslib_1.__decorate([
73
- (0, type_graphql_1.Directive)('@transaction'),
74
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
75
- (0, type_graphql_1.Mutation)(returns => financial_statement_1.FinancialStatement, { description: 'To create new FinancialStatement' }),
76
- tslib_1.__param(0, (0, type_graphql_1.Arg)('financialStatement')),
77
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
78
- tslib_1.__metadata("design:type", Function),
79
- tslib_1.__metadata("design:paramtypes", [financial_statement_type_1.NewFinancialStatement, Object]),
80
- tslib_1.__metadata("design:returntype", Promise)
81
- ], FinancialStatementMutation.prototype, "createFinancialStatement", null);
82
- tslib_1.__decorate([
83
- (0, type_graphql_1.Directive)('@transaction'),
84
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
85
- (0, type_graphql_1.Mutation)(returns => financial_statement_1.FinancialStatement, { description: 'To modify FinancialStatement information' }),
86
- tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
87
- tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
88
- tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
89
- tslib_1.__metadata("design:type", Function),
90
- tslib_1.__metadata("design:paramtypes", [String, financial_statement_type_1.FinancialStatementPatch, Object]),
91
- tslib_1.__metadata("design:returntype", Promise)
92
- ], FinancialStatementMutation.prototype, "updateFinancialStatement", null);
93
- tslib_1.__decorate([
94
- (0, type_graphql_1.Directive)('@transaction'),
95
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
96
- (0, type_graphql_1.Mutation)(returns => [financial_statement_1.FinancialStatement], { description: "To modify multiple FinancialStatements' information" }),
97
- tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [financial_statement_type_1.FinancialStatementPatch])),
98
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
99
- tslib_1.__metadata("design:type", Function),
100
- tslib_1.__metadata("design:paramtypes", [Array, Object]),
101
- tslib_1.__metadata("design:returntype", Promise)
102
- ], FinancialStatementMutation.prototype, "updateMultipleFinancialStatement", null);
103
- tslib_1.__decorate([
104
- (0, type_graphql_1.Directive)('@transaction'),
105
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
106
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete FinancialStatement' }),
107
- tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
108
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
109
- tslib_1.__metadata("design:type", Function),
110
- tslib_1.__metadata("design:paramtypes", [String, Object]),
111
- tslib_1.__metadata("design:returntype", Promise)
112
- ], FinancialStatementMutation.prototype, "deleteFinancialStatement", null);
113
- tslib_1.__decorate([
114
- (0, type_graphql_1.Directive)('@transaction'),
115
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
116
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple FinancialStatements' }),
117
- tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
118
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
119
- tslib_1.__metadata("design:type", Function),
120
- tslib_1.__metadata("design:paramtypes", [Array, Object]),
121
- tslib_1.__metadata("design:returntype", Promise)
122
- ], FinancialStatementMutation.prototype, "deleteFinancialStatements", null);
123
- tslib_1.__decorate([
124
- (0, type_graphql_1.Directive)('@transaction'),
125
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "mutation")'),
126
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To import multiple FinancialStatements' }),
127
- tslib_1.__param(0, (0, type_graphql_1.Arg)('financialStatements', type => [financial_statement_type_1.FinancialStatementPatch])),
128
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
129
- tslib_1.__metadata("design:type", Function),
130
- tslib_1.__metadata("design:paramtypes", [Array, Object]),
131
- tslib_1.__metadata("design:returntype", Promise)
132
- ], FinancialStatementMutation.prototype, "importFinancialStatements", null);
133
- exports.FinancialStatementMutation = FinancialStatementMutation = tslib_1.__decorate([
134
- (0, type_graphql_1.Resolver)(financial_statement_1.FinancialStatement)
135
- ], FinancialStatementMutation);
136
- //# sourceMappingURL=financial-statement-mutation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"financial-statement-mutation.js","sourceRoot":"","sources":["../../../server/service/financial-statement/financial-statement-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,iDAAqD;AAErD,+DAA0D;AAC1D,yEAA2F;AAGpF,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAI/B,AAAN,KAAK,CAAC,wBAAwB,CACD,kBAAyC,EAC7D,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAa,EAAC,wCAAkB,EAAE,EAAE,CAAC,CAAC,IAAI,iCAC1D,kBAAkB,KACrB,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC;IAKK,AAAN,KAAK,CAAC,wBAAwB,CACjB,EAAU,EACP,KAA8B,EACrC,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,wCAAkB,EAAE,EAAE,CAAC,CAAA;QACxD,MAAM,kBAAkB,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YAClD,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,kBAAkB,GAClB,KAAK,KACR,OAAO,EAAE,IAAI,IACb,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC;IAKK,AAAN,KAAK,CAAC,gCAAgC,CACe,OAAkC,EAC9E,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE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C,2DAA2D,CAAC;IACtE,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;0EAM3D;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,wCAAwC,EAAE,CAAC;IAErF,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;2EAUP;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,wCAAwC,EAAE,CAAC;IAErF,mBAAA,IAAA,kBAAG,EAAC,qBAAqB,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,kDAAuB,CAAC,CAAC,CAAA;IAC7D,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;2EAaP;qCAzIU,0BAA0B;IADtC,IAAA,uBAAQ,EAAC,wCAAkB,CAAC;GAChB,0BAA0B,CA0ItC","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { getRepository } from '@things-factory/shell'\n\nimport { FinancialStatement } from './financial-statement'\nimport { NewFinancialStatement, FinancialStatementPatch } from './financial-statement-type'\n\n@Resolver(FinancialStatement)\nexport class FinancialStatementMutation {\n @Directive('@transaction')\n @Directive('@privilege(category: \"accounting\", privilege: \"mutation\")')\n @Mutation(returns => FinancialStatement, { description: 'To create new FinancialStatement' })\n async createFinancialStatement(\n @Arg('financialStatement') financialStatement: NewFinancialStatement,\n @Ctx() context: ResolverContext\n ): Promise<FinancialStatement> {\n const { domain, user, tx } = context.state\n\n const result = await getRepository(FinancialStatement, tx).save({\n ...financialStatement,\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 => FinancialStatement, { description: 'To modify FinancialStatement information' })\n async updateFinancialStatement(\n @Arg('id') id: string,\n @Arg('patch') patch: FinancialStatementPatch,\n @Ctx() context: ResolverContext\n ): Promise<FinancialStatement> {\n const { domain, user, tx } = context.state\n\n const repository = getRepository(FinancialStatement, tx)\n const financialStatement = await repository.findOne({\n where: { domain: { id: domain.id }, id }\n })\n\n const result = await repository.save({\n ...financialStatement,\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 => [FinancialStatement], { description: \"To modify multiple FinancialStatements' information\" })\n async updateMultipleFinancialStatement(\n @Arg('patches', type => [FinancialStatementPatch]) patches: FinancialStatementPatch[],\n @Ctx() context: ResolverContext\n ): Promise<FinancialStatement[]> {\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 financialStatementRepo = getRepository(FinancialStatement, 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 financialStatementRepo.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 financialStatement = await financialStatementRepo.findOneBy({ id: updateRecord.id })\n\n const result = await financialStatementRepo.save({\n ...financialStatement,\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 FinancialStatement' })\n async deleteFinancialStatement(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await getRepository(FinancialStatement, 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 FinancialStatements' })\n async deleteFinancialStatements(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await getRepository(FinancialStatement, 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 FinancialStatements' })\n async importFinancialStatements(\n @Arg('financialStatements', type => [FinancialStatementPatch]) financialStatements: FinancialStatementPatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await Promise.all(\n financialStatements.map(async (financialStatement: FinancialStatementPatch) => {\n const createdFinancialStatement: FinancialStatement = await tx\n .getRepository(FinancialStatement)\n .save({ domain, ...financialStatement })\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 { FinancialStatement } from './financial-statement';
4
- import { FinancialStatementList } from './financial-statement-type';
5
- export declare class FinancialStatementQuery {
6
- financialStatement(id: string, context: ResolverContext): Promise<FinancialStatement>;
7
- financialStatements(params: ListParam, context: ResolverContext): Promise<FinancialStatementList>;
8
- domain(financialStatement: FinancialStatement): Promise<Domain>;
9
- updater(financialStatement: FinancialStatement): Promise<User>;
10
- creator(financialStatement: FinancialStatement): Promise<User>;
11
- }
@@ -1,81 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FinancialStatementQuery = 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 financial_statement_1 = require("./financial-statement");
9
- const financial_statement_type_1 = require("./financial-statement-type");
10
- let FinancialStatementQuery = class FinancialStatementQuery {
11
- async financialStatement(id, context) {
12
- const { domain } = context.state;
13
- return await (0, shell_1.getRepository)(financial_statement_1.FinancialStatement).findOne({
14
- where: { domain: { id: domain.id }, id }
15
- });
16
- }
17
- async financialStatements(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)(financial_statement_1.FinancialStatement),
23
- searchables: ['name', 'description']
24
- });
25
- const [items, total] = await queryBuilder.getManyAndCount();
26
- return { items, total };
27
- }
28
- async domain(financialStatement) {
29
- return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: financialStatement.domainId });
30
- }
31
- async updater(financialStatement) {
32
- return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: financialStatement.updaterId });
33
- }
34
- async creator(financialStatement) {
35
- return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: financialStatement.creatorId });
36
- }
37
- };
38
- exports.FinancialStatementQuery = FinancialStatementQuery;
39
- tslib_1.__decorate([
40
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "query")'),
41
- (0, type_graphql_1.Query)(returns => financial_statement_1.FinancialStatement, { nullable: true, description: 'To fetch a FinancialStatement' }),
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
- ], FinancialStatementQuery.prototype, "financialStatement", null);
48
- tslib_1.__decorate([
49
- (0, type_graphql_1.Directive)('@privilege(category: "accounting", privilege: "query")'),
50
- (0, type_graphql_1.Query)(returns => financial_statement_type_1.FinancialStatementList, { description: 'To fetch multiple FinancialStatements' }),
51
- tslib_1.__param(0, (0, type_graphql_1.Args)()),
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
- ], FinancialStatementQuery.prototype, "financialStatements", 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", [financial_statement_1.FinancialStatement]),
62
- tslib_1.__metadata("design:returntype", Promise)
63
- ], FinancialStatementQuery.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", [financial_statement_1.FinancialStatement]),
69
- tslib_1.__metadata("design:returntype", Promise)
70
- ], FinancialStatementQuery.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", [financial_statement_1.FinancialStatement]),
76
- tslib_1.__metadata("design:returntype", Promise)
77
- ], FinancialStatementQuery.prototype, "creator", null);
78
- exports.FinancialStatementQuery = FinancialStatementQuery = tslib_1.__decorate([
79
- (0, type_graphql_1.Resolver)(financial_statement_1.FinancialStatement)
80
- ], FinancialStatementQuery);
81
- //# sourceMappingURL=financial-statement-query.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"financial-statement-query.js","sourceRoot":"","sources":["../../../server/service/financial-statement/financial-statement-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAgD;AAChD,+DAA0D;AAC1D,yEAAmE;AAG5D,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAG5B,AAAN,KAAK,CAAC,kBAAkB,CAAY,EAAU,EAAS,OAAwB;QAC7E,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,wCAAkB,CAAC,CAAC,OAAO,CAAC;YACrD,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,mBAAmB,CACf,MAAiB,EAClB,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,wCAAkB,CAAC;YACnD,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,kBAAsC;QACzD,OAAO,MAAM,IAAA,qBAAa,EAAC,cAAM,CAAC,CAAC,SAAS,CAAC,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B,wCAAkB;;sDAE3D;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAqB,wCAAkB;;sDAE3D;kCA5CU,uBAAuB;IADnC,IAAA,uBAAQ,EAAC,wCAAkB,CAAC;GAChB,uBAAuB,CA6CnC","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { FinancialStatement } from './financial-statement'\nimport { FinancialStatementList } from './financial-statement-type'\n\n@Resolver(FinancialStatement)\nexport class FinancialStatementQuery {\n @Directive('@privilege(category: \"accounting\", privilege: \"query\")')\n @Query(returns => FinancialStatement!, { nullable: true, description: 'To fetch a FinancialStatement' })\n async financialStatement(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<FinancialStatement> {\n const { domain } = context.state\n\n return await getRepository(FinancialStatement).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Directive('@privilege(category: \"accounting\", privilege: \"query\")')\n @Query(returns => FinancialStatementList, { description: 'To fetch multiple FinancialStatements' })\n async financialStatements(\n @Args() params: ListParam,\n @Ctx() context: ResolverContext\n ): Promise<FinancialStatementList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(FinancialStatement),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() financialStatement: FinancialStatement): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: financialStatement.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() financialStatement: FinancialStatement): Promise<User> {\n return await getRepository(User).findOneBy({ id: financialStatement.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() financialStatement: FinancialStatement): Promise<User> {\n return await getRepository(User).findOneBy({ id: financialStatement.creatorId })\n }\n}\n"]}
@@ -1,20 +0,0 @@
1
- import { FinancialStatement, FinancialStatementStatus } from './financial-statement';
2
- export declare class NewFinancialStatement {
3
- name: string;
4
- description?: string;
5
- state?: FinancialStatementStatus;
6
- active?: boolean;
7
- params?: string;
8
- }
9
- export declare class FinancialStatementPatch {
10
- id?: string;
11
- name?: string;
12
- description?: string;
13
- state?: FinancialStatementStatus;
14
- active?: boolean;
15
- cuFlag?: string;
16
- }
17
- export declare class FinancialStatementList {
18
- items: FinancialStatement[];
19
- total: number;
20
- }
@@ -1,77 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FinancialStatementList = exports.FinancialStatementPatch = exports.NewFinancialStatement = void 0;
4
- const tslib_1 = require("tslib");
5
- const type_graphql_1 = require("type-graphql");
6
- const financial_statement_1 = require("./financial-statement");
7
- let NewFinancialStatement = class NewFinancialStatement {
8
- };
9
- exports.NewFinancialStatement = NewFinancialStatement;
10
- tslib_1.__decorate([
11
- (0, type_graphql_1.Field)(),
12
- tslib_1.__metadata("design:type", String)
13
- ], NewFinancialStatement.prototype, "name", void 0);
14
- tslib_1.__decorate([
15
- (0, type_graphql_1.Field)({ nullable: true }),
16
- tslib_1.__metadata("design:type", String)
17
- ], NewFinancialStatement.prototype, "description", void 0);
18
- tslib_1.__decorate([
19
- (0, type_graphql_1.Field)(type => financial_statement_1.FinancialStatementStatus, { nullable: true }),
20
- tslib_1.__metadata("design:type", String)
21
- ], NewFinancialStatement.prototype, "state", void 0);
22
- tslib_1.__decorate([
23
- (0, type_graphql_1.Field)({ nullable: true }),
24
- tslib_1.__metadata("design:type", Boolean)
25
- ], NewFinancialStatement.prototype, "active", void 0);
26
- tslib_1.__decorate([
27
- (0, type_graphql_1.Field)({ nullable: true }),
28
- tslib_1.__metadata("design:type", String)
29
- ], NewFinancialStatement.prototype, "params", void 0);
30
- exports.NewFinancialStatement = NewFinancialStatement = tslib_1.__decorate([
31
- (0, type_graphql_1.InputType)()
32
- ], NewFinancialStatement);
33
- let FinancialStatementPatch = class FinancialStatementPatch {
34
- };
35
- exports.FinancialStatementPatch = FinancialStatementPatch;
36
- tslib_1.__decorate([
37
- (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
38
- tslib_1.__metadata("design:type", String)
39
- ], FinancialStatementPatch.prototype, "id", void 0);
40
- tslib_1.__decorate([
41
- (0, type_graphql_1.Field)({ nullable: true }),
42
- tslib_1.__metadata("design:type", String)
43
- ], FinancialStatementPatch.prototype, "name", void 0);
44
- tslib_1.__decorate([
45
- (0, type_graphql_1.Field)({ nullable: true }),
46
- tslib_1.__metadata("design:type", String)
47
- ], FinancialStatementPatch.prototype, "description", void 0);
48
- tslib_1.__decorate([
49
- (0, type_graphql_1.Field)(type => financial_statement_1.FinancialStatementStatus, { nullable: true }),
50
- tslib_1.__metadata("design:type", String)
51
- ], FinancialStatementPatch.prototype, "state", void 0);
52
- tslib_1.__decorate([
53
- (0, type_graphql_1.Field)({ nullable: true }),
54
- tslib_1.__metadata("design:type", Boolean)
55
- ], FinancialStatementPatch.prototype, "active", void 0);
56
- tslib_1.__decorate([
57
- (0, type_graphql_1.Field)({ nullable: true }),
58
- tslib_1.__metadata("design:type", String)
59
- ], FinancialStatementPatch.prototype, "cuFlag", void 0);
60
- exports.FinancialStatementPatch = FinancialStatementPatch = tslib_1.__decorate([
61
- (0, type_graphql_1.InputType)()
62
- ], FinancialStatementPatch);
63
- let FinancialStatementList = class FinancialStatementList {
64
- };
65
- exports.FinancialStatementList = FinancialStatementList;
66
- tslib_1.__decorate([
67
- (0, type_graphql_1.Field)(type => [financial_statement_1.FinancialStatement]),
68
- tslib_1.__metadata("design:type", Array)
69
- ], FinancialStatementList.prototype, "items", void 0);
70
- tslib_1.__decorate([
71
- (0, type_graphql_1.Field)(type => type_graphql_1.Int),
72
- tslib_1.__metadata("design:type", Number)
73
- ], FinancialStatementList.prototype, "total", void 0);
74
- exports.FinancialStatementList = FinancialStatementList = tslib_1.__decorate([
75
- (0, type_graphql_1.ObjectType)()
76
- ], FinancialStatementList);
77
- //# sourceMappingURL=financial-statement-type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"financial-statement-type.js","sourceRoot":"","sources":["../../../server/service/financial-statement/financial-statement-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAEtF,+DAAoF;AAG7E,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAejC,CAAA;AAfY,sDAAqB;AAEhC;IADC,IAAA,oBAAK,GAAE;;mDACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,8CAAwB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDAC5B;AAGhC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACX;gCAdJ,qBAAqB;IADjC,IAAA,wBAAS,GAAE;GACC,qBAAqB,CAejC;AAGM,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CAkBnC,CAAA;AAlBY,0DAAuB;AAElC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,8CAAwB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAC5B;AAGhC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACX;kCAjBJ,uBAAuB;IADnC,IAAA,wBAAS,GAAE;GACC,uBAAuB,CAkBnC;AAGM,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CAMlC,CAAA;AANY,wDAAsB;AAEjC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,wCAAkB,CAAC,CAAC;;qDACT;AAG3B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;qDACN;iCALF,sBAAsB;IADlC,IAAA,yBAAU,GAAE;GACA,sBAAsB,CAMlC","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { FinancialStatement, FinancialStatementStatus } from './financial-statement'\n\n@InputType()\nexport class NewFinancialStatement {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => FinancialStatementStatus, { nullable: true })\n state?: FinancialStatementStatus\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n params?: string\n}\n\n@InputType()\nexport class FinancialStatementPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => FinancialStatementStatus, { nullable: true })\n state?: FinancialStatementStatus\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class FinancialStatementList {\n @Field(type => [FinancialStatement])\n items: FinancialStatement[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -1,27 +0,0 @@
1
- import { Domain } from '@things-factory/shell';
2
- import { User } from '@things-factory/auth-base';
3
- import { FinancialStatementLineItem } from './financial-statement-line-item';
4
- export declare enum FinancialStatementStatus {
5
- STATUS_A = "STATUS_A",
6
- STATUS_B = "STATUS_B"
7
- }
8
- export declare class FinancialStatement {
9
- readonly id: string;
10
- version?: number;
11
- domain?: Domain;
12
- domainId?: string;
13
- year?: number;
14
- quarter?: number;
15
- month?: number;
16
- asset?: number;
17
- liability?: number;
18
- equity?: number;
19
- lineItems?: FinancialStatementLineItem[];
20
- createdAt?: Date;
21
- updatedAt?: Date;
22
- deletedAt?: Date;
23
- creator?: User;
24
- creatorId?: string;
25
- updater?: User;
26
- updaterId?: string;
27
- }