@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,105 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AccountingCategory = void 0;
4
- const tslib_1 = require("tslib");
5
- const typeorm_1 = require("typeorm");
6
- const type_graphql_1 = require("type-graphql");
7
- const shell_1 = require("@things-factory/shell");
8
- const auth_base_1 = require("@things-factory/auth-base");
9
- let AccountingCategory = class AccountingCategory {
10
- };
11
- exports.AccountingCategory = AccountingCategory;
12
- tslib_1.__decorate([
13
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
14
- (0, type_graphql_1.Field)(type => type_graphql_1.ID),
15
- tslib_1.__metadata("design:type", String)
16
- ], AccountingCategory.prototype, "id", void 0);
17
- tslib_1.__decorate([
18
- (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
19
- (0, type_graphql_1.Field)({ nullable: true }),
20
- tslib_1.__metadata("design:type", shell_1.Domain)
21
- ], AccountingCategory.prototype, "domain", void 0);
22
- tslib_1.__decorate([
23
- (0, typeorm_1.RelationId)((accountingCategory) => accountingCategory.domain),
24
- tslib_1.__metadata("design:type", String)
25
- ], AccountingCategory.prototype, "domainId", void 0);
26
- tslib_1.__decorate([
27
- (0, typeorm_1.Column)(),
28
- (0, type_graphql_1.Field)({ nullable: true, description: 'Account category code' }),
29
- tslib_1.__metadata("design:type", String)
30
- ], AccountingCategory.prototype, "code", void 0);
31
- tslib_1.__decorate([
32
- (0, typeorm_1.Column)(),
33
- (0, type_graphql_1.Field)({ nullable: true }),
34
- tslib_1.__metadata("design:type", String)
35
- ], AccountingCategory.prototype, "name", void 0);
36
- tslib_1.__decorate([
37
- (0, typeorm_1.Column)({ nullable: true }),
38
- (0, type_graphql_1.Field)({ nullable: true }),
39
- tslib_1.__metadata("design:type", String)
40
- ], AccountingCategory.prototype, "description", void 0);
41
- tslib_1.__decorate([
42
- (0, typeorm_1.Column)({ nullable: true }),
43
- (0, type_graphql_1.Field)({ nullable: true }),
44
- tslib_1.__metadata("design:type", Boolean)
45
- ], AccountingCategory.prototype, "active", void 0);
46
- tslib_1.__decorate([
47
- (0, typeorm_1.ManyToOne)(type => AccountingCategory, accountingCategory => accountingCategory.children, { nullable: true }),
48
- (0, type_graphql_1.Field)({ nullable: true }),
49
- tslib_1.__metadata("design:type", AccountingCategory)
50
- ], AccountingCategory.prototype, "parent", void 0);
51
- tslib_1.__decorate([
52
- (0, typeorm_1.RelationId)((accountingCategory) => accountingCategory.parent),
53
- tslib_1.__metadata("design:type", String)
54
- ], AccountingCategory.prototype, "parentId", void 0);
55
- tslib_1.__decorate([
56
- (0, typeorm_1.OneToMany)(type => AccountingCategory, accountingCategory => accountingCategory.parent),
57
- (0, type_graphql_1.Field)(type => [AccountingCategory], { nullable: true }),
58
- tslib_1.__metadata("design:type", Array)
59
- ], AccountingCategory.prototype, "children", void 0);
60
- tslib_1.__decorate([
61
- (0, typeorm_1.CreateDateColumn)(),
62
- (0, type_graphql_1.Field)({ nullable: true }),
63
- tslib_1.__metadata("design:type", Date)
64
- ], AccountingCategory.prototype, "createdAt", void 0);
65
- tslib_1.__decorate([
66
- (0, typeorm_1.UpdateDateColumn)(),
67
- (0, type_graphql_1.Field)({ nullable: true }),
68
- tslib_1.__metadata("design:type", Date)
69
- ], AccountingCategory.prototype, "updatedAt", void 0);
70
- tslib_1.__decorate([
71
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
72
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
73
- tslib_1.__metadata("design:type", auth_base_1.User)
74
- ], AccountingCategory.prototype, "creator", void 0);
75
- tslib_1.__decorate([
76
- (0, typeorm_1.RelationId)((accountingCategory) => accountingCategory.creator),
77
- tslib_1.__metadata("design:type", String)
78
- ], AccountingCategory.prototype, "creatorId", void 0);
79
- tslib_1.__decorate([
80
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
81
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
82
- tslib_1.__metadata("design:type", auth_base_1.User)
83
- ], AccountingCategory.prototype, "updater", void 0);
84
- tslib_1.__decorate([
85
- (0, typeorm_1.RelationId)((accountingCategory) => accountingCategory.updater),
86
- tslib_1.__metadata("design:type", String)
87
- ], AccountingCategory.prototype, "updaterId", void 0);
88
- tslib_1.__decorate([
89
- (0, typeorm_1.DeleteDateColumn)(),
90
- (0, type_graphql_1.Field)({ nullable: true }),
91
- tslib_1.__metadata("design:type", Date)
92
- ], AccountingCategory.prototype, "deletedAt", void 0);
93
- exports.AccountingCategory = AccountingCategory = tslib_1.__decorate([
94
- (0, typeorm_1.Entity)(),
95
- (0, typeorm_1.Index)('ix_accounting_category_0', (accountingCategory) => [accountingCategory.domain, accountingCategory.name], {
96
- unique: true,
97
- where: '"deleted_at" IS NULL'
98
- }),
99
- (0, typeorm_1.Index)('ix_accounting_category_1', (accountingCategory) => [accountingCategory.domain, accountingCategory.code], {
100
- unique: true,
101
- where: '"deleted_at" IS NULL'
102
- }),
103
- (0, type_graphql_1.ObjectType)({ description: 'Entity for AccountingCategory' })
104
- ], AccountingCategory);
105
- //# sourceMappingURL=accounting-category.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accounting-category.js","sourceRoot":"","sources":["../../../server/service/accounting-category/accounting-category.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAAyD;AAEzD,iDAA8C;AAC9C,yDAAgD;AAoBzC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAgE9B,CAAA;AAhEY,gDAAkB;AAGpB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;8CACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjB,cAAM;kDAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,kBAAsC,EAAE,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC;;oDACjE;AAIjB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;gDACnD;AAIb;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE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ateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\n@Entity()\n@Index(\n 'ix_accounting_category_0',\n (accountingCategory: AccountingCategory) => [accountingCategory.domain, accountingCategory.name],\n {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n }\n)\n@Index(\n 'ix_accounting_category_1',\n (accountingCategory: AccountingCategory) => [accountingCategory.domain, accountingCategory.code],\n {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n }\n)\n@ObjectType({ description: 'Entity for AccountingCategory' })\nexport class AccountingCategory {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((accountingCategory: AccountingCategory) => accountingCategory.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true, description: 'Account category code' })\n code?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active?: boolean\n\n @ManyToOne(type => AccountingCategory, accountingCategory => accountingCategory.children, { nullable: true })\n @Field({ nullable: true })\n parent?: AccountingCategory\n\n @RelationId((accountingCategory: AccountingCategory) => accountingCategory.parent)\n parentId?: string\n\n @OneToMany(type => AccountingCategory, accountingCategory => accountingCategory.parent)\n @Field(type => [AccountingCategory], { nullable: true })\n children?: AccountingCategory[]\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((accountingCategory: AccountingCategory) => accountingCategory.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((accountingCategory: AccountingCategory) => accountingCategory.updater)\n updaterId?: string\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n}\n"]}
@@ -1,7 +0,0 @@
1
- import { HistoryEntitySubscriber } from '@operato/typeorm-history';
2
- import { AccountingCategory } from './accounting-category';
3
- import { AccountingCategoryHistory } from './accounting-category-history';
4
- export declare class AccountingCategoryHistoryEntitySubscriber extends HistoryEntitySubscriber<AccountingCategory, AccountingCategoryHistory> {
5
- get entity(): typeof AccountingCategory;
6
- get historyEntity(): typeof AccountingCategoryHistory;
7
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AccountingCategoryHistoryEntitySubscriber = void 0;
4
- const tslib_1 = require("tslib");
5
- const typeorm_1 = require("typeorm");
6
- const typeorm_history_1 = require("@operato/typeorm-history");
7
- const accounting_category_1 = require("./accounting-category");
8
- const accounting_category_history_1 = require("./accounting-category-history");
9
- let AccountingCategoryHistoryEntitySubscriber = class AccountingCategoryHistoryEntitySubscriber extends typeorm_history_1.HistoryEntitySubscriber {
10
- get entity() {
11
- return accounting_category_1.AccountingCategory;
12
- }
13
- get historyEntity() {
14
- return accounting_category_history_1.AccountingCategoryHistory;
15
- }
16
- };
17
- exports.AccountingCategoryHistoryEntitySubscriber = AccountingCategoryHistoryEntitySubscriber;
18
- exports.AccountingCategoryHistoryEntitySubscriber = AccountingCategoryHistoryEntitySubscriber = tslib_1.__decorate([
19
- (0, typeorm_1.EventSubscriber)()
20
- ], AccountingCategoryHistoryEntitySubscriber);
21
- //# sourceMappingURL=event-subscriber.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-subscriber.js","sourceRoot":"","sources":["../../../server/service/accounting-category/event-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAAyC;AAEzC,8DAAkE;AAElE,+DAA0D;AAC1D,+EAAyE;AAGlE,IAAM,yCAAyC,GAA/C,MAAM,yCAA0C,SAAQ,yCAG9D;IACC,IAAW,MAAM;QACf,OAAO,wCAAkB,CAAA;IAC3B,CAAC;IAED,IAAW,aAAa;QACtB,OAAO,uDAAyB,CAAA;IAClC,CAAC;CACF,CAAA;AAXY,8FAAyC;oDAAzC,yCAAyC;IADrD,IAAA,yBAAe,GAAE;GACL,yCAAyC,CAWrD","sourcesContent":["import { EventSubscriber } from 'typeorm'\n\nimport { HistoryEntitySubscriber } from '@operato/typeorm-history'\n\nimport { AccountingCategory } from './accounting-category'\nimport { AccountingCategoryHistory } from './accounting-category-history'\n\n@EventSubscriber()\nexport class AccountingCategoryHistoryEntitySubscriber extends HistoryEntitySubscriber<\n AccountingCategory,\n AccountingCategoryHistory\n> {\n public get entity() {\n return AccountingCategory\n }\n\n public get historyEntity() {\n return AccountingCategoryHistory\n }\n}\n"]}
@@ -1,7 +0,0 @@
1
- import { AccountingCategory } from './accounting-category';
2
- import { AccountingCategoryQuery } from './accounting-category-query';
3
- import { AccountingCategoryMutation } from './accounting-category-mutation';
4
- import { AccountingCategoryHistoryEntitySubscriber } from './event-subscriber';
5
- export declare const entities: (typeof AccountingCategory)[];
6
- export declare const resolvers: (typeof AccountingCategoryQuery | typeof AccountingCategoryMutation)[];
7
- export declare const subscribers: (typeof AccountingCategoryHistoryEntitySubscriber)[];
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.subscribers = exports.resolvers = exports.entities = void 0;
4
- const accounting_category_1 = require("./accounting-category");
5
- const accounting_category_query_1 = require("./accounting-category-query");
6
- const accounting_category_mutation_1 = require("./accounting-category-mutation");
7
- const accounting_category_history_1 = require("./accounting-category-history");
8
- const event_subscriber_1 = require("./event-subscriber");
9
- exports.entities = [accounting_category_1.AccountingCategory, accounting_category_history_1.AccountingCategoryHistory];
10
- exports.resolvers = [accounting_category_query_1.AccountingCategoryQuery, accounting_category_mutation_1.AccountingCategoryMutation];
11
- exports.subscribers = [event_subscriber_1.AccountingCategoryHistoryEntitySubscriber];
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/accounting-category/index.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAC1D,2EAAqE;AACrE,iFAA2E;AAC3E,+EAAyE;AACzE,yDAA8E;AAEjE,QAAA,QAAQ,GAAG,CAAC,wCAAkB,EAAE,uDAAyB,CAAC,CAAA;AAC1D,QAAA,SAAS,GAAG,CAAC,mDAAuB,EAAE,yDAA0B,CAAC,CAAA;AACjE,QAAA,WAAW,GAAG,CAAC,4DAAyC,CAAC,CAAA","sourcesContent":["import { AccountingCategory } from './accounting-category'\nimport { AccountingCategoryQuery } from './accounting-category-query'\nimport { AccountingCategoryMutation } from './accounting-category-mutation'\nimport { AccountingCategoryHistory } from './accounting-category-history'\nimport { AccountingCategoryHistoryEntitySubscriber } from './event-subscriber'\n\nexport const entities = [AccountingCategory, AccountingCategoryHistory]\nexport const resolvers = [AccountingCategoryQuery, AccountingCategoryMutation]\nexport const subscribers = [AccountingCategoryHistoryEntitySubscriber]\n"]}
@@ -1,26 +0,0 @@
1
- import { HistoryActionType, HistoryEntityInterface } from '@operato/typeorm-history';
2
- import { User } from '@things-factory/auth-base';
3
- import { Domain } from '@things-factory/shell';
4
- import { Transaction } from '../transaction/transaction';
5
- import { AccountingDocument } from './accounting-document';
6
- export declare class AccountingDocumentHistory implements HistoryEntityInterface<AccountingDocument> {
7
- readonly id: string;
8
- version?: number;
9
- domain?: Domain;
10
- domainId?: string;
11
- transaction: Transaction;
12
- transactionId: string;
13
- documentType: string;
14
- documentUrl: string;
15
- description?: string;
16
- createdAt?: Date;
17
- updatedAt?: Date;
18
- deletedAt?: Date;
19
- creator?: User;
20
- creatorId?: string;
21
- updater?: User;
22
- updaterId?: string;
23
- thumbnail?: string;
24
- originalId: string;
25
- action: HistoryActionType;
26
- }
@@ -1,134 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AccountingDocumentHistory = 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 ORMCONFIG = env_1.config.get('ormconfig', {});
13
- const DATABASE_TYPE = ORMCONFIG.type;
14
- let AccountingDocumentHistory = class AccountingDocumentHistory {
15
- constructor() {
16
- this.version = 1;
17
- }
18
- };
19
- exports.AccountingDocumentHistory = AccountingDocumentHistory;
20
- tslib_1.__decorate([
21
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
22
- (0, type_graphql_1.Field)(type => type_graphql_1.ID),
23
- tslib_1.__metadata("design:type", String)
24
- ], AccountingDocumentHistory.prototype, "id", void 0);
25
- tslib_1.__decorate([
26
- (0, typeorm_1.Column)({ nullable: true, default: 1 }),
27
- (0, type_graphql_1.Field)({ nullable: true }),
28
- tslib_1.__metadata("design:type", Number)
29
- ], AccountingDocumentHistory.prototype, "version", void 0);
30
- tslib_1.__decorate([
31
- (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
32
- (0, type_graphql_1.Field)({ nullable: true }),
33
- tslib_1.__metadata("design:type", shell_1.Domain)
34
- ], AccountingDocumentHistory.prototype, "domain", void 0);
35
- tslib_1.__decorate([
36
- (0, typeorm_1.RelationId)((accountingDocument) => accountingDocument.domain),
37
- tslib_1.__metadata("design:type", String)
38
- ], AccountingDocumentHistory.prototype, "domainId", void 0);
39
- tslib_1.__decorate([
40
- (0, typeorm_1.ManyToOne)(type => transaction_1.Transaction, transaction => transaction.documents),
41
- (0, type_graphql_1.Field)(type => transaction_1.Transaction),
42
- tslib_1.__metadata("design:type", transaction_1.Transaction)
43
- ], AccountingDocumentHistory.prototype, "transaction", void 0);
44
- tslib_1.__decorate([
45
- (0, typeorm_1.RelationId)((accountingDocument) => accountingDocument.transaction),
46
- tslib_1.__metadata("design:type", String)
47
- ], AccountingDocumentHistory.prototype, "transactionId", void 0);
48
- tslib_1.__decorate([
49
- (0, typeorm_1.Column)(),
50
- (0, type_graphql_1.Field)({ nullable: false }),
51
- tslib_1.__metadata("design:type", String)
52
- ], AccountingDocumentHistory.prototype, "documentType", void 0);
53
- tslib_1.__decorate([
54
- (0, typeorm_1.Column)(),
55
- (0, type_graphql_1.Field)({ nullable: false }),
56
- tslib_1.__metadata("design:type", String)
57
- ], AccountingDocumentHistory.prototype, "documentUrl", void 0);
58
- tslib_1.__decorate([
59
- (0, typeorm_1.Column)({ nullable: true }),
60
- (0, type_graphql_1.Field)({ nullable: true }),
61
- tslib_1.__metadata("design:type", String)
62
- ], AccountingDocumentHistory.prototype, "description", void 0);
63
- tslib_1.__decorate([
64
- (0, typeorm_1.Column)({ nullable: true }),
65
- (0, type_graphql_1.Field)({ nullable: true }),
66
- tslib_1.__metadata("design:type", Date)
67
- ], AccountingDocumentHistory.prototype, "createdAt", void 0);
68
- tslib_1.__decorate([
69
- (0, typeorm_1.Column)({ nullable: true }),
70
- (0, type_graphql_1.Field)({ nullable: true }),
71
- tslib_1.__metadata("design:type", Date)
72
- ], AccountingDocumentHistory.prototype, "updatedAt", void 0);
73
- tslib_1.__decorate([
74
- (0, typeorm_1.Column)({ nullable: true }),
75
- (0, type_graphql_1.Field)({ nullable: true }),
76
- tslib_1.__metadata("design:type", Date)
77
- ], AccountingDocumentHistory.prototype, "deletedAt", void 0);
78
- tslib_1.__decorate([
79
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
80
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
81
- tslib_1.__metadata("design:type", auth_base_1.User)
82
- ], AccountingDocumentHistory.prototype, "creator", void 0);
83
- tslib_1.__decorate([
84
- (0, typeorm_1.RelationId)((accountingDocument) => accountingDocument.creator),
85
- tslib_1.__metadata("design:type", String)
86
- ], AccountingDocumentHistory.prototype, "creatorId", void 0);
87
- tslib_1.__decorate([
88
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
89
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
90
- tslib_1.__metadata("design:type", auth_base_1.User)
91
- ], AccountingDocumentHistory.prototype, "updater", void 0);
92
- tslib_1.__decorate([
93
- (0, typeorm_1.RelationId)((accountingDocument) => accountingDocument.updater),
94
- tslib_1.__metadata("design:type", String)
95
- ], AccountingDocumentHistory.prototype, "updaterId", void 0);
96
- tslib_1.__decorate([
97
- (0, type_graphql_1.Field)(type => String, { nullable: true }),
98
- tslib_1.__metadata("design:type", String)
99
- ], AccountingDocumentHistory.prototype, "thumbnail", void 0);
100
- tslib_1.__decorate([
101
- (0, typeorm_history_1.HistoryOriginalIdColumn)(),
102
- tslib_1.__metadata("design:type", String)
103
- ], AccountingDocumentHistory.prototype, "originalId", void 0);
104
- tslib_1.__decorate([
105
- (0, typeorm_history_1.HistoryActionColumn)({
106
- nullable: false,
107
- type: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
108
- ? 'enum'
109
- : DATABASE_TYPE == 'oracle'
110
- ? 'varchar2'
111
- : DATABASE_TYPE == 'mssql'
112
- ? 'nvarchar'
113
- : 'varchar',
114
- enum: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
115
- ? typeorm_history_1.HistoryActionType
116
- : undefined,
117
- length: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? undefined : 10
118
- }),
119
- tslib_1.__metadata("design:type", String)
120
- ], AccountingDocumentHistory.prototype, "action", void 0);
121
- exports.AccountingDocumentHistory = AccountingDocumentHistory = tslib_1.__decorate([
122
- (0, typeorm_1.Entity)(),
123
- (0, typeorm_1.Index)('ix_accounting-document_history_0', (accountingDocumentHistory) => [
124
- accountingDocumentHistory.originalId,
125
- accountingDocumentHistory.version
126
- ], { unique: true }),
127
- (0, typeorm_1.Index)('ix_accounting-document_history_1', (accountingDocumentHistory) => [
128
- accountingDocumentHistory.domain,
129
- accountingDocumentHistory.originalId,
130
- accountingDocumentHistory.version
131
- ], { unique: true }),
132
- (0, type_graphql_1.ObjectType)({ description: 'History Entity of AccountingDocument' })
133
- ], AccountingDocumentHistory);
134
- //# sourceMappingURL=accounting-document-history.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accounting-document-history.js","sourceRoot":"","sources":["../../../server/service/accounting-document/accounting-document-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAA8F;AAE9F,8DAKiC;AACjC,yDAAsD;AACtD,6CAA4C;AAC5C,iDAA8C;AAE9C,4DAAwD;AAGxD,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAqB7B,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAA/B;QAOL,YAAO,GAAY,CAAC,CAAA;IA6EtB,CAAC;CAAA,CAAA;AApFY,8DAAyB;AAG3B;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;qDACC;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;;0DACN;AAIpB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjB,cAAM;yDAAA;AAGf;IADC,IAAA,oBAAU,EAAC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AI,aAAa,IAAI,OAAO,IAAI,aAAa,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;KAC/G,CAAC;;yDAC+B;oCAnFtB,yBAAyB;IAnBrC,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,kCAAkC,EAClC,CAAC,yBAAoD,EAAE,EAAE,CAAC;QACxD,yBAAyB,CAAC,UAAU;QACpC,yBAAyB,CAAC,OAAO;KAClC,EACD,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,eAAK,EACJ,kCAAkC,EAClC,CAAC,yBAAoD,EAAE,EAAE,CAAC;QACxD,yBAAyB,CAAC,MAAM;QAChC,yBAAyB,CAAC,UAAU;QACpC,yBAAyB,CAAC,OAAO;KAClC,EACD,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;GACvD,yBAAyB,CAoFrC","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 { AccountingDocument } from './accounting-document'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index(\n 'ix_accounting-document_history_0',\n (accountingDocumentHistory: AccountingDocumentHistory) => [\n accountingDocumentHistory.originalId,\n accountingDocumentHistory.version\n ],\n { unique: true }\n)\n@Index(\n 'ix_accounting-document_history_1',\n (accountingDocumentHistory: AccountingDocumentHistory) => [\n accountingDocumentHistory.domain,\n accountingDocumentHistory.originalId,\n accountingDocumentHistory.version\n ],\n { unique: true }\n)\n@ObjectType({ description: 'History Entity of AccountingDocument' })\nexport class AccountingDocumentHistory implements HistoryEntityInterface<AccountingDocument> {\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((accountingDocument: AccountingDocument) => accountingDocument.domain)\n domainId?: string\n\n @ManyToOne(type => Transaction, transaction => transaction.documents)\n @Field(type => Transaction)\n transaction: Transaction\n\n @RelationId((accountingDocument: AccountingDocument) => accountingDocument.transaction)\n transactionId: string\n\n @Column()\n @Field({ nullable: false })\n documentType: string // 문서의 유형 (예: 계약서, 인보이스 등)\n\n @Column()\n @Field({ nullable: false })\n documentUrl: string // 문서의 URL 또는 파일 경로\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: 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((accountingDocument: AccountingDocument) => accountingDocument.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((accountingDocument: AccountingDocument) => accountingDocument.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 { AccountingDocument } from './accounting-document';
2
- import { NewAccountingDocument, AccountingDocumentPatch } from './accounting-document-type';
3
- export declare class AccountingDocumentMutation {
4
- createAccountingDocument(accountingDocument: NewAccountingDocument, context: ResolverContext): Promise<AccountingDocument>;
5
- updateAccountingDocument(id: string, patch: AccountingDocumentPatch, context: ResolverContext): Promise<AccountingDocument>;
6
- updateMultipleAccountingDocument(patches: AccountingDocumentPatch[], context: ResolverContext): Promise<AccountingDocument[]>;
7
- deleteAccountingDocument(id: string, context: ResolverContext): Promise<boolean>;
8
- deleteAccountingDocuments(ids: string[], context: ResolverContext): Promise<boolean>;
9
- importAccountingDocuments(accountingDocuments: AccountingDocumentPatch[], context: ResolverContext): Promise<boolean>;
10
- }
@@ -1,128 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AccountingDocumentMutation = 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 accounting_document_1 = require("./accounting-document");
9
- const accounting_document_type_1 = require("./accounting-document-type");
10
- let AccountingDocumentMutation = class AccountingDocumentMutation {
11
- async createAccountingDocument(accountingDocument, context) {
12
- const { domain, user, tx } = context.state;
13
- const result = await (0, shell_1.getRepository)(accounting_document_1.AccountingDocument, tx).save(Object.assign(Object.assign({}, accountingDocument), { domain, creator: user, updater: user }));
14
- return result;
15
- }
16
- async updateAccountingDocument(id, patch, context) {
17
- const { domain, user, tx } = context.state;
18
- const repository = (0, shell_1.getRepository)(accounting_document_1.AccountingDocument, tx);
19
- const accountingDocument = await repository.findOne({
20
- where: { domain: { id: domain.id }, id }
21
- });
22
- const result = await repository.save(Object.assign(Object.assign(Object.assign({}, accountingDocument), patch), { updater: user }));
23
- return result;
24
- }
25
- async updateMultipleAccountingDocument(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 accountingDocumentRepo = (0, shell_1.getRepository)(accounting_document_1.AccountingDocument, tx);
31
- if (_createRecords.length > 0) {
32
- for (let i = 0; i < _createRecords.length; i++) {
33
- const newRecord = _createRecords[i];
34
- const result = await accountingDocumentRepo.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 accountingDocument = await accountingDocumentRepo.findOneBy({ id: updateRecord.id });
42
- const result = await accountingDocumentRepo.save(Object.assign(Object.assign(Object.assign({}, accountingDocument), updateRecord), { updater: user }));
43
- results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
44
- }
45
- }
46
- return results;
47
- }
48
- async deleteAccountingDocument(id, context) {
49
- const { domain, tx } = context.state;
50
- await (0, shell_1.getRepository)(accounting_document_1.AccountingDocument, tx).delete({ domain: { id: domain.id }, id });
51
- return true;
52
- }
53
- async deleteAccountingDocuments(ids, context) {
54
- const { domain, tx } = context.state;
55
- await (0, shell_1.getRepository)(accounting_document_1.AccountingDocument, tx).delete({
56
- domain: { id: domain.id },
57
- id: (0, typeorm_1.In)(ids)
58
- });
59
- return true;
60
- }
61
- async importAccountingDocuments(accountingDocuments, context) {
62
- const { domain, tx } = context.state;
63
- await Promise.all(accountingDocuments.map(async (accountingDocument) => {
64
- const createdAccountingDocument = await (0, shell_1.getRepository)(accounting_document_1.AccountingDocument, tx).save(Object.assign({ domain }, accountingDocument));
65
- }));
66
- return true;
67
- }
68
- };
69
- exports.AccountingDocumentMutation = AccountingDocumentMutation;
70
- tslib_1.__decorate([
71
- (0, type_graphql_1.Directive)('@transaction'),
72
- (0, type_graphql_1.Mutation)(returns => accounting_document_1.AccountingDocument, { description: 'To create new AccountingDocument' }),
73
- tslib_1.__param(0, (0, type_graphql_1.Arg)('accountingDocument')),
74
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
75
- tslib_1.__metadata("design:type", Function),
76
- tslib_1.__metadata("design:paramtypes", [accounting_document_type_1.NewAccountingDocument, Object]),
77
- tslib_1.__metadata("design:returntype", Promise)
78
- ], AccountingDocumentMutation.prototype, "createAccountingDocument", null);
79
- tslib_1.__decorate([
80
- (0, type_graphql_1.Directive)('@transaction'),
81
- (0, type_graphql_1.Mutation)(returns => accounting_document_1.AccountingDocument, { description: 'To modify AccountingDocument information' }),
82
- tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
83
- tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
84
- tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
85
- tslib_1.__metadata("design:type", Function),
86
- tslib_1.__metadata("design:paramtypes", [String, accounting_document_type_1.AccountingDocumentPatch, Object]),
87
- tslib_1.__metadata("design:returntype", Promise)
88
- ], AccountingDocumentMutation.prototype, "updateAccountingDocument", null);
89
- tslib_1.__decorate([
90
- (0, type_graphql_1.Directive)('@transaction'),
91
- (0, type_graphql_1.Mutation)(returns => [accounting_document_1.AccountingDocument], { description: "To modify multiple AccountingDocuments' information" }),
92
- tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [accounting_document_type_1.AccountingDocumentPatch])),
93
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
94
- tslib_1.__metadata("design:type", Function),
95
- tslib_1.__metadata("design:paramtypes", [Array, Object]),
96
- tslib_1.__metadata("design:returntype", Promise)
97
- ], AccountingDocumentMutation.prototype, "updateMultipleAccountingDocument", null);
98
- tslib_1.__decorate([
99
- (0, type_graphql_1.Directive)('@transaction'),
100
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete AccountingDocument' }),
101
- tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
102
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
103
- tslib_1.__metadata("design:type", Function),
104
- tslib_1.__metadata("design:paramtypes", [String, Object]),
105
- tslib_1.__metadata("design:returntype", Promise)
106
- ], AccountingDocumentMutation.prototype, "deleteAccountingDocument", null);
107
- tslib_1.__decorate([
108
- (0, type_graphql_1.Directive)('@transaction'),
109
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple AccountingDocuments' }),
110
- tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
111
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
112
- tslib_1.__metadata("design:type", Function),
113
- tslib_1.__metadata("design:paramtypes", [Array, Object]),
114
- tslib_1.__metadata("design:returntype", Promise)
115
- ], AccountingDocumentMutation.prototype, "deleteAccountingDocuments", null);
116
- tslib_1.__decorate([
117
- (0, type_graphql_1.Directive)('@transaction'),
118
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To import multiple AccountingDocuments' }),
119
- tslib_1.__param(0, (0, type_graphql_1.Arg)('accountingDocuments', type => [accounting_document_type_1.AccountingDocumentPatch])),
120
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
121
- tslib_1.__metadata("design:type", Function),
122
- tslib_1.__metadata("design:paramtypes", [Array, Object]),
123
- tslib_1.__metadata("design:returntype", Promise)
124
- ], AccountingDocumentMutation.prototype, "importAccountingDocuments", null);
125
- exports.AccountingDocumentMutation = AccountingDocumentMutation = tslib_1.__decorate([
126
- (0, type_graphql_1.Resolver)(accounting_document_1.AccountingDocument)
127
- ], AccountingDocumentMutation);
128
- //# sourceMappingURL=accounting-document-mutation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accounting-document-mutation.js","s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;;;0EAM3D;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,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;;;;2EAWP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,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;;;;2EAWP;qCA/HU,0BAA0B;IADtC,IAAA,uBAAQ,EAAC,wCAAkB,CAAC;GAChB,0BAA0B,CAgItC","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { getRepository } from '@things-factory/shell'\n\nimport { AccountingDocument } from './accounting-document'\nimport { NewAccountingDocument, AccountingDocumentPatch } from './accounting-document-type'\n\n@Resolver(AccountingDocument)\nexport class AccountingDocumentMutation {\n @Directive('@transaction')\n @Mutation(returns => AccountingDocument, { description: 'To create new AccountingDocument' })\n async createAccountingDocument(@Arg('accountingDocument') accountingDocument: NewAccountingDocument, @Ctx() context: ResolverContext): Promise<AccountingDocument> {\n const { domain, user, tx } = context.state\n\n const result = await getRepository(AccountingDocument, tx).save({\n ...accountingDocument,\n domain,\n creator: user,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => AccountingDocument, { description: 'To modify AccountingDocument information' })\n async updateAccountingDocument(\n @Arg('id') id: string,\n @Arg('patch') patch: AccountingDocumentPatch,\n @Ctx() context: ResolverContext\n ): Promise<AccountingDocument> {\n const { domain, user, tx } = context.state\n\n const repository = getRepository(AccountingDocument, tx)\n const accountingDocument = await repository.findOne({\n where: { domain: { id: domain.id }, id }\n })\n\n const result = await repository.save({\n ...accountingDocument,\n ...patch,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => [AccountingDocument], { description: \"To modify multiple AccountingDocuments' information\" })\n async updateMultipleAccountingDocument(\n @Arg('patches', type => [AccountingDocumentPatch]) patches: AccountingDocumentPatch[],\n @Ctx() context: ResolverContext\n ): Promise<AccountingDocument[]> {\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 accountingDocumentRepo = getRepository(AccountingDocument, 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 accountingDocumentRepo.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 accountingDocument = await accountingDocumentRepo.findOneBy({ id: updateRecord.id })\n\n const result = await accountingDocumentRepo.save({\n ...accountingDocument,\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 @Mutation(returns => Boolean, { description: 'To delete AccountingDocument' })\n async deleteAccountingDocument(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await getRepository(AccountingDocument, tx).delete({ domain: { id: domain.id }, id })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple AccountingDocuments' })\n async deleteAccountingDocuments(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await getRepository(AccountingDocument, tx).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To import multiple AccountingDocuments' })\n async importAccountingDocuments(\n @Arg('accountingDocuments', type => [AccountingDocumentPatch]) accountingDocuments: AccountingDocumentPatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await Promise.all(\n accountingDocuments.map(async (accountingDocument: AccountingDocumentPatch) => {\n const createdAccountingDocument: AccountingDocument = await getRepository(AccountingDocument, tx).save({ domain, ...accountingDocument })\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 { AccountingDocument } from './accounting-document';
4
- import { AccountingDocumentList } from './accounting-document-type';
5
- export declare class AccountingDocumentQuery {
6
- accountingDocument(id: string, context: ResolverContext): Promise<AccountingDocument>;
7
- accountingDocuments(params: ListParam, context: ResolverContext): Promise<AccountingDocumentList>;
8
- domain(accountingDocument: AccountingDocument): Promise<Domain>;
9
- updater(accountingDocument: AccountingDocument): Promise<User>;
10
- creator(accountingDocument: AccountingDocument): Promise<User>;
11
- }
@@ -1,79 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AccountingDocumentQuery = 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 accounting_document_1 = require("./accounting-document");
9
- const accounting_document_type_1 = require("./accounting-document-type");
10
- let AccountingDocumentQuery = class AccountingDocumentQuery {
11
- async accountingDocument(id, context) {
12
- const { domain } = context.state;
13
- return await (0, shell_1.getRepository)(accounting_document_1.AccountingDocument).findOne({
14
- where: { domain: { id: domain.id }, id }
15
- });
16
- }
17
- async accountingDocuments(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)(accounting_document_1.AccountingDocument),
23
- searchables: ['name', 'description']
24
- });
25
- const [items, total] = await queryBuilder.getManyAndCount();
26
- return { items, total };
27
- }
28
- async domain(accountingDocument) {
29
- return accountingDocument.domainId && (await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: accountingDocument.domainId }));
30
- }
31
- async updater(accountingDocument) {
32
- return accountingDocument.updaterId && (await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: accountingDocument.updaterId }));
33
- }
34
- async creator(accountingDocument) {
35
- return accountingDocument.creatorId && (await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: accountingDocument.creatorId }));
36
- }
37
- };
38
- exports.AccountingDocumentQuery = AccountingDocumentQuery;
39
- tslib_1.__decorate([
40
- (0, type_graphql_1.Query)(returns => accounting_document_1.AccountingDocument, { nullable: true, description: 'To fetch a AccountingDocument' }),
41
- tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
42
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
43
- tslib_1.__metadata("design:type", Function),
44
- tslib_1.__metadata("design:paramtypes", [String, Object]),
45
- tslib_1.__metadata("design:returntype", Promise)
46
- ], AccountingDocumentQuery.prototype, "accountingDocument", null);
47
- tslib_1.__decorate([
48
- (0, type_graphql_1.Query)(returns => accounting_document_type_1.AccountingDocumentList, { description: 'To fetch multiple AccountingDocuments' }),
49
- tslib_1.__param(0, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
50
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
51
- tslib_1.__metadata("design:type", Function),
52
- tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
53
- tslib_1.__metadata("design:returntype", Promise)
54
- ], AccountingDocumentQuery.prototype, "accountingDocuments", null);
55
- tslib_1.__decorate([
56
- (0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
57
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
58
- tslib_1.__metadata("design:type", Function),
59
- tslib_1.__metadata("design:paramtypes", [accounting_document_1.AccountingDocument]),
60
- tslib_1.__metadata("design:returntype", Promise)
61
- ], AccountingDocumentQuery.prototype, "domain", null);
62
- tslib_1.__decorate([
63
- (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
64
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
65
- tslib_1.__metadata("design:type", Function),
66
- tslib_1.__metadata("design:paramtypes", [accounting_document_1.AccountingDocument]),
67
- tslib_1.__metadata("design:returntype", Promise)
68
- ], AccountingDocumentQuery.prototype, "updater", null);
69
- tslib_1.__decorate([
70
- (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
71
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
72
- tslib_1.__metadata("design:type", Function),
73
- tslib_1.__metadata("design:paramtypes", [accounting_document_1.AccountingDocument]),
74
- tslib_1.__metadata("design:returntype", Promise)
75
- ], AccountingDocumentQuery.prototype, "creator", null);
76
- exports.AccountingDocumentQuery = AccountingDocumentQuery = tslib_1.__decorate([
77
- (0, type_graphql_1.Resolver)(accounting_document_1.AccountingDocument)
78
- ], AccountingDocumentQuery);
79
- //# sourceMappingURL=accounting-document-query.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accounting-document-query.js","sourceRoot":"","sources":["../../../server/service/accounting-document/accounting-document-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAgD;AAChD,+DAA0D;AAC1D,yEAAmE;AAG5D,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAE5B,AAAN,KAAK,CAAC,kBAAkB,CAAY,EAAU,EAAS,OAAwB;QAC7E,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAA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,EAAE,kBAAkB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;IACpH,CAAC;CACF,CAAA;AAxCY,0DAAuB;AAE5B;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,wCAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;IAC9E,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iEAMrD;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,iDAAsB,EAAE,EAAE,WAAW,EAAE,uCAAuC,EAAE,CAAC;IACxE,mBAAA,IAAA,mBAAI,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,CAAC,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;kEAanE;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAqB,wCAAkB;;qDAE1D;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAqB,wCAAkB;;sDAE3D;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAqB,wCAAkB;;sDAE3D;kCAvCU,uBAAuB;IADnC,IAAA,uBAAQ,EAAC,wCAAkB,CAAC;GAChB,uBAAuB,CAwCnC","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 { AccountingDocument } from './accounting-document'\nimport { AccountingDocumentList } from './accounting-document-type'\n\n@Resolver(AccountingDocument)\nexport class AccountingDocumentQuery {\n @Query(returns => AccountingDocument!, { nullable: true, description: 'To fetch a AccountingDocument' })\n async accountingDocument(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<AccountingDocument> {\n const { domain } = context.state\n\n return await getRepository(AccountingDocument).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => AccountingDocumentList, { description: 'To fetch multiple AccountingDocuments' })\n async accountingDocuments(@Args(type => ListParam) params: ListParam, @Ctx() context: ResolverContext): Promise<AccountingDocumentList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(AccountingDocument),\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() accountingDocument: AccountingDocument): Promise<Domain> {\n return accountingDocument.domainId && (await getRepository(Domain).findOneBy({ id: accountingDocument.domainId }))\n }\n\n @FieldResolver(type => User)\n async updater(@Root() accountingDocument: AccountingDocument): Promise<User> {\n return accountingDocument.updaterId && (await getRepository(User).findOneBy({ id: accountingDocument.updaterId }))\n }\n\n @FieldResolver(type => User)\n async creator(@Root() accountingDocument: AccountingDocument): Promise<User> {\n return accountingDocument.creatorId && (await getRepository(User).findOneBy({ id: accountingDocument.creatorId }))\n }\n}\n"]}