@openforis/arena-server 2.4.2

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 (1110) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +74 -0
  3. package/dist/api/api.d.ts +2 -0
  4. package/dist/api/api.js +22 -0
  5. package/dist/api/api.js.map +1 -0
  6. package/dist/api/auth/authApiCommon.d.ts +11 -0
  7. package/dist/api/auth/authApiCommon.js +30 -0
  8. package/dist/api/auth/authApiCommon.js.map +1 -0
  9. package/dist/api/auth/authTempToken.d.ts +2 -0
  10. package/dist/api/auth/authTempToken.js +24 -0
  11. package/dist/api/auth/authTempToken.js.map +1 -0
  12. package/dist/api/auth/authTokenRefresh.d.ts +2 -0
  13. package/dist/api/auth/authTokenRefresh.js +32 -0
  14. package/dist/api/auth/authTokenRefresh.js.map +1 -0
  15. package/dist/api/auth/index.d.ts +2 -0
  16. package/dist/api/auth/index.js +14 -0
  17. package/dist/api/auth/index.js.map +1 -0
  18. package/dist/api/auth/login.d.ts +4 -0
  19. package/dist/api/auth/login.js +164 -0
  20. package/dist/api/auth/login.js.map +1 -0
  21. package/dist/api/chain/index.d.ts +2 -0
  22. package/dist/api/chain/index.js +10 -0
  23. package/dist/api/chain/index.js.map +1 -0
  24. package/dist/api/chain/read.d.ts +2 -0
  25. package/dist/api/chain/read.js +11 -0
  26. package/dist/api/chain/read.js.map +1 -0
  27. package/dist/api/dataQuery/create.d.ts +2 -0
  28. package/dist/api/dataQuery/create.js +25 -0
  29. package/dist/api/dataQuery/create.js.map +1 -0
  30. package/dist/api/dataQuery/delete.d.ts +2 -0
  31. package/dist/api/dataQuery/delete.js +24 -0
  32. package/dist/api/dataQuery/delete.js.map +1 -0
  33. package/dist/api/dataQuery/index.d.ts +2 -0
  34. package/dist/api/dataQuery/index.js +16 -0
  35. package/dist/api/dataQuery/index.js.map +1 -0
  36. package/dist/api/dataQuery/read.d.ts +2 -0
  37. package/dist/api/dataQuery/read.js +46 -0
  38. package/dist/api/dataQuery/read.js.map +1 -0
  39. package/dist/api/dataQuery/update.d.ts +2 -0
  40. package/dist/api/dataQuery/update.js +25 -0
  41. package/dist/api/dataQuery/update.js.map +1 -0
  42. package/dist/api/endpoint/auth.d.ts +8 -0
  43. package/dist/api/endpoint/auth.js +11 -0
  44. package/dist/api/endpoint/auth.js.map +1 -0
  45. package/dist/api/endpoint/chain.d.ts +5 -0
  46. package/dist/api/endpoint/chain.js +10 -0
  47. package/dist/api/endpoint/chain.js.map +1 -0
  48. package/dist/api/endpoint/common.d.ts +3 -0
  49. package/dist/api/endpoint/common.js +10 -0
  50. package/dist/api/endpoint/common.js.map +1 -0
  51. package/dist/api/endpoint/dataQuery.d.ts +5 -0
  52. package/dist/api/endpoint/dataQuery.js +11 -0
  53. package/dist/api/endpoint/dataQuery.js.map +1 -0
  54. package/dist/api/endpoint/index.d.ts +47 -0
  55. package/dist/api/endpoint/index.js +20 -0
  56. package/dist/api/endpoint/index.js.map +1 -0
  57. package/dist/api/endpoint/info.d.ts +3 -0
  58. package/dist/api/endpoint/info.js +8 -0
  59. package/dist/api/endpoint/info.js.map +1 -0
  60. package/dist/api/endpoint/message.d.ts +7 -0
  61. package/dist/api/endpoint/message.js +12 -0
  62. package/dist/api/endpoint/message.js.map +1 -0
  63. package/dist/api/endpoint/user2FA.d.ts +10 -0
  64. package/dist/api/endpoint/user2FA.js +15 -0
  65. package/dist/api/endpoint/user2FA.js.map +1 -0
  66. package/dist/api/endpoint/userGroup.d.ts +7 -0
  67. package/dist/api/endpoint/userGroup.js +13 -0
  68. package/dist/api/endpoint/userGroup.js.map +1 -0
  69. package/dist/api/index.d.ts +3 -0
  70. package/dist/api/index.js +10 -0
  71. package/dist/api/index.js.map +1 -0
  72. package/dist/api/info/index.d.ts +2 -0
  73. package/dist/api/info/index.js +10 -0
  74. package/dist/api/info/index.js.map +1 -0
  75. package/dist/api/info/read.d.ts +2 -0
  76. package/dist/api/info/read.js +23 -0
  77. package/dist/api/info/read.js.map +1 -0
  78. package/dist/api/message/create.d.ts +2 -0
  79. package/dist/api/message/create.js +25 -0
  80. package/dist/api/message/create.js.map +1 -0
  81. package/dist/api/message/delete.d.ts +2 -0
  82. package/dist/api/message/delete.js +26 -0
  83. package/dist/api/message/delete.js.map +1 -0
  84. package/dist/api/message/index.d.ts +2 -0
  85. package/dist/api/message/index.js +16 -0
  86. package/dist/api/message/index.js.map +1 -0
  87. package/dist/api/message/read.d.ts +2 -0
  88. package/dist/api/message/read.js +68 -0
  89. package/dist/api/message/read.js.map +1 -0
  90. package/dist/api/message/update.d.ts +2 -0
  91. package/dist/api/message/update.js +31 -0
  92. package/dist/api/message/update.js.map +1 -0
  93. package/dist/api/middleware/auth.d.ts +34 -0
  94. package/dist/api/middleware/auth.js +169 -0
  95. package/dist/api/middleware/auth.js.map +1 -0
  96. package/dist/api/middleware/index.d.ts +1 -0
  97. package/dist/api/middleware/index.js +6 -0
  98. package/dist/api/middleware/index.js.map +1 -0
  99. package/dist/api/user2FAAuth/index.d.ts +2 -0
  100. package/dist/api/user2FAAuth/index.js +136 -0
  101. package/dist/api/user2FAAuth/index.js.map +1 -0
  102. package/dist/api/userGroup/common.d.ts +11 -0
  103. package/dist/api/userGroup/common.js +26 -0
  104. package/dist/api/userGroup/common.js.map +1 -0
  105. package/dist/api/userGroup/create.d.ts +2 -0
  106. package/dist/api/userGroup/create.js +39 -0
  107. package/dist/api/userGroup/create.js.map +1 -0
  108. package/dist/api/userGroup/delete.d.ts +2 -0
  109. package/dist/api/userGroup/delete.js +37 -0
  110. package/dist/api/userGroup/delete.js.map +1 -0
  111. package/dist/api/userGroup/index.d.ts +2 -0
  112. package/dist/api/userGroup/index.js +16 -0
  113. package/dist/api/userGroup/index.js.map +1 -0
  114. package/dist/api/userGroup/read.d.ts +2 -0
  115. package/dist/api/userGroup/read.js +59 -0
  116. package/dist/api/userGroup/read.js.map +1 -0
  117. package/dist/api/userGroup/update.d.ts +2 -0
  118. package/dist/api/userGroup/update.js +26 -0
  119. package/dist/api/userGroup/update.js.map +1 -0
  120. package/dist/clusterBus/clusterBus.d.ts +12 -0
  121. package/dist/clusterBus/clusterBus.js +82 -0
  122. package/dist/clusterBus/clusterBus.js.map +1 -0
  123. package/dist/clusterBus/clusterLock.d.ts +4 -0
  124. package/dist/clusterBus/clusterLock.js +29 -0
  125. package/dist/clusterBus/clusterLock.js.map +1 -0
  126. package/dist/clusterBus/index.d.ts +3 -0
  127. package/dist/clusterBus/index.js +8 -0
  128. package/dist/clusterBus/index.js.map +1 -0
  129. package/dist/clusterBus/types.d.ts +7 -0
  130. package/dist/clusterBus/types.js +3 -0
  131. package/dist/clusterBus/types.js.map +1 -0
  132. package/dist/db/column/column.d.ts +9 -0
  133. package/dist/db/column/column.js +18 -0
  134. package/dist/db/column/column.js.map +1 -0
  135. package/dist/db/column/index.d.ts +2 -0
  136. package/dist/db/column/index.js +8 -0
  137. package/dist/db/column/index.js.map +1 -0
  138. package/dist/db/column/type.d.ts +14 -0
  139. package/dist/db/column/type.js +19 -0
  140. package/dist/db/column/type.js.map +1 -0
  141. package/dist/db/db.d.ts +4 -0
  142. package/dist/db/db.js +47 -0
  143. package/dist/db/db.js.map +1 -0
  144. package/dist/db/dbMigrator/dbMigrate.d.ts +4 -0
  145. package/dist/db/dbMigrator/dbMigrate.js +50 -0
  146. package/dist/db/dbMigrator/dbMigrate.js.map +1 -0
  147. package/dist/db/dbMigrator/dbMigrator.d.ts +19 -0
  148. package/dist/db/dbMigrator/dbMigrator.js +66 -0
  149. package/dist/db/dbMigrator/dbMigrator.js.map +1 -0
  150. package/dist/db/dbMigrator/index.d.ts +2 -0
  151. package/dist/db/dbMigrator/index.js +6 -0
  152. package/dist/db/dbMigrator/index.js.map +1 -0
  153. package/dist/db/dbMigrator/migration/create.d.ts +1 -0
  154. package/dist/db/dbMigrator/migration/create.js +33 -0
  155. package/dist/db/dbMigrator/migration/create.js.map +1 -0
  156. package/dist/db/dbMigrator/migration/public/migrations/20180709092931-create-user-table.d.ts +6 -0
  157. package/dist/db/dbMigrator/migration/public/migrations/20180709092931-create-user-table.js +43 -0
  158. package/dist/db/dbMigrator/migration/public/migrations/20180709092931-create-user-table.js.map +1 -0
  159. package/dist/db/dbMigrator/migration/public/migrations/20180726092435-create-survey-def-tables.d.ts +6 -0
  160. package/dist/db/dbMigrator/migration/public/migrations/20180726092435-create-survey-def-tables.js +43 -0
  161. package/dist/db/dbMigrator/migration/public/migrations/20180726092435-create-survey-def-tables.js.map +1 -0
  162. package/dist/db/dbMigrator/migration/public/migrations/20181130124534-create-auth-tables.d.ts +6 -0
  163. package/dist/db/dbMigrator/migration/public/migrations/20181130124534-create-auth-tables.js +43 -0
  164. package/dist/db/dbMigrator/migration/public/migrations/20181130124534-create-auth-tables.js.map +1 -0
  165. package/dist/db/dbMigrator/migration/public/migrations/20200820141045-custom-agg.d.ts +6 -0
  166. package/dist/db/dbMigrator/migration/public/migrations/20200820141045-custom-agg.js +43 -0
  167. package/dist/db/dbMigrator/migration/public/migrations/20200820141045-custom-agg.js.map +1 -0
  168. package/dist/db/dbMigrator/migration/public/migrations/20210329113834-add-table-user-invitation.d.ts +6 -0
  169. package/dist/db/dbMigrator/migration/public/migrations/20210329113834-add-table-user-invitation.js +43 -0
  170. package/dist/db/dbMigrator/migration/public/migrations/20210329113834-add-table-user-invitation.js.map +1 -0
  171. package/dist/db/dbMigrator/migration/public/migrations/20210618122453-add-table-user-access-request.d.ts +6 -0
  172. package/dist/db/dbMigrator/migration/public/migrations/20210618122453-add-table-user-access-request.js +43 -0
  173. package/dist/db/dbMigrator/migration/public/migrations/20210618122453-add-table-user-access-request.js.map +1 -0
  174. package/dist/db/dbMigrator/migration/public/migrations/20221130214733-insert-auth-group-survey-manager.d.ts +6 -0
  175. package/dist/db/dbMigrator/migration/public/migrations/20221130214733-insert-auth-group-survey-manager.js +43 -0
  176. package/dist/db/dbMigrator/migration/public/migrations/20221130214733-insert-auth-group-survey-manager.js.map +1 -0
  177. package/dist/db/dbMigrator/migration/public/migrations/20231026094839-add-column-survey-date-published.d.ts +6 -0
  178. package/dist/db/dbMigrator/migration/public/migrations/20231026094839-add-column-survey-date-published.js +43 -0
  179. package/dist/db/dbMigrator/migration/public/migrations/20231026094839-add-column-survey-date-published.js.map +1 -0
  180. package/dist/db/dbMigrator/migration/public/migrations/20240927095011-add-column-survey-config.d.ts +6 -0
  181. package/dist/db/dbMigrator/migration/public/migrations/20240927095011-add-column-survey-config.js +43 -0
  182. package/dist/db/dbMigrator/migration/public/migrations/20240927095011-add-column-survey-config.js.map +1 -0
  183. package/dist/db/dbMigrator/migration/public/migrations/20241009091444-add-column-auth-group-user-props.d.ts +6 -0
  184. package/dist/db/dbMigrator/migration/public/migrations/20241009091444-add-column-auth-group-user-props.js +43 -0
  185. package/dist/db/dbMigrator/migration/public/migrations/20241009091444-add-column-auth-group-user-props.js.map +1 -0
  186. package/dist/db/dbMigrator/migration/public/migrations/20241223212935-add-user-tables-indexes.d.ts +6 -0
  187. package/dist/db/dbMigrator/migration/public/migrations/20241223212935-add-user-tables-indexes.js +43 -0
  188. package/dist/db/dbMigrator/migration/public/migrations/20241223212935-add-user-tables-indexes.js.map +1 -0
  189. package/dist/db/dbMigrator/migration/public/migrations/20251030103141-add-table-user-refresh-token.d.ts +6 -0
  190. package/dist/db/dbMigrator/migration/public/migrations/20251030103141-add-table-user-refresh-token.js +43 -0
  191. package/dist/db/dbMigrator/migration/public/migrations/20251030103141-add-table-user-refresh-token.js.map +1 -0
  192. package/dist/db/dbMigrator/migration/public/migrations/20251113085000-create-table-info.d.ts +6 -0
  193. package/dist/db/dbMigrator/migration/public/migrations/20251113085000-create-table-info.js +43 -0
  194. package/dist/db/dbMigrator/migration/public/migrations/20251113085000-create-table-info.js.map +1 -0
  195. package/dist/db/dbMigrator/migration/public/migrations/20251222213811-create-table-message.d.ts +6 -0
  196. package/dist/db/dbMigrator/migration/public/migrations/20251222213811-create-table-message.js +43 -0
  197. package/dist/db/dbMigrator/migration/public/migrations/20251222213811-create-table-message.js.map +1 -0
  198. package/dist/db/dbMigrator/migration/public/migrations/20260118215307-add-table-user-temp-auth-token.d.ts +6 -0
  199. package/dist/db/dbMigrator/migration/public/migrations/20260118215307-add-table-user-temp-auth-token.js +43 -0
  200. package/dist/db/dbMigrator/migration/public/migrations/20260118215307-add-table-user-temp-auth-token.js.map +1 -0
  201. package/dist/db/dbMigrator/migration/public/migrations/20260123092621-add-column-user-temp-auth-token-hash.d.ts +6 -0
  202. package/dist/db/dbMigrator/migration/public/migrations/20260123092621-add-column-user-temp-auth-token-hash.js +43 -0
  203. package/dist/db/dbMigrator/migration/public/migrations/20260123092621-add-column-user-temp-auth-token-hash.js.map +1 -0
  204. package/dist/db/dbMigrator/migration/public/migrations/20260203121201-create-user-two-factor-table.d.ts +6 -0
  205. package/dist/db/dbMigrator/migration/public/migrations/20260203121201-create-user-two-factor-table.js +43 -0
  206. package/dist/db/dbMigrator/migration/public/migrations/20260203121201-create-user-two-factor-table.js.map +1 -0
  207. package/dist/db/dbMigrator/migration/public/migrations/20260713124754-create-user-group-tables.d.ts +6 -0
  208. package/dist/db/dbMigrator/migration/public/migrations/20260713124754-create-user-group-tables.js +43 -0
  209. package/dist/db/dbMigrator/migration/public/migrations/20260713124754-create-user-group-tables.js.map +1 -0
  210. package/dist/db/dbMigrator/migration/public/migrations/20260730150034-add-column-survey-app-version.d.ts +6 -0
  211. package/dist/db/dbMigrator/migration/public/migrations/20260730150034-add-column-survey-app-version.js +43 -0
  212. package/dist/db/dbMigrator/migration/public/migrations/20260730150034-add-column-survey-app-version.js.map +1 -0
  213. package/dist/db/dbMigrator/migration/public/migrations/20260806120000-add-tables-cluster-bus.d.ts +6 -0
  214. package/dist/db/dbMigrator/migration/public/migrations/20260806120000-add-tables-cluster-bus.js +43 -0
  215. package/dist/db/dbMigrator/migration/public/migrations/20260806120000-add-tables-cluster-bus.js.map +1 -0
  216. package/dist/db/dbMigrator/migration/public/migrations/20260819100000-create-table-job.d.ts +6 -0
  217. package/dist/db/dbMigrator/migration/public/migrations/20260819100000-create-table-job.js +43 -0
  218. package/dist/db/dbMigrator/migration/public/migrations/20260819100000-create-table-job.js.map +1 -0
  219. package/dist/db/dbMigrator/migration/public/migrations/20260819100100-create-table-record-socket-association.d.ts +6 -0
  220. package/dist/db/dbMigrator/migration/public/migrations/20260819100100-create-table-record-socket-association.js +43 -0
  221. package/dist/db/dbMigrator/migration/public/migrations/20260819100100-create-table-record-socket-association.js.map +1 -0
  222. package/dist/db/dbMigrator/migration/public/migrations/20260825120000-add-column-job-instance-id.d.ts +6 -0
  223. package/dist/db/dbMigrator/migration/public/migrations/20260825120000-add-column-job-instance-id.js +43 -0
  224. package/dist/db/dbMigrator/migration/public/migrations/20260825120000-add-column-job-instance-id.js.map +1 -0
  225. package/dist/db/dbMigrator/migration/public/migrations/20260915160000-create-table-record-printable-export-share.d.ts +6 -0
  226. package/dist/db/dbMigrator/migration/public/migrations/20260915160000-create-table-record-printable-export-share.js +43 -0
  227. package/dist/db/dbMigrator/migration/public/migrations/20260915160000-create-table-record-printable-export-share.js.map +1 -0
  228. package/dist/db/dbMigrator/migration/public/migrations/sqls/20180709092931-create-user-table-down.sql +1 -0
  229. package/dist/db/dbMigrator/migration/public/migrations/sqls/20180709092931-create-user-table-up.sql +45 -0
  230. package/dist/db/dbMigrator/migration/public/migrations/sqls/20180726092435-create-survey-def-tables-down.sql +1 -0
  231. package/dist/db/dbMigrator/migration/public/migrations/sqls/20180726092435-create-survey-def-tables-up.sql +25 -0
  232. package/dist/db/dbMigrator/migration/public/migrations/sqls/20181130124534-create-auth-tables-down.sql +1 -0
  233. package/dist/db/dbMigrator/migration/public/migrations/sqls/20181130124534-create-auth-tables-up.sql +21 -0
  234. package/dist/db/dbMigrator/migration/public/migrations/sqls/20200820141045-custom-agg-down.sql +1 -0
  235. package/dist/db/dbMigrator/migration/public/migrations/sqls/20200820141045-custom-agg-up.sql +20 -0
  236. package/dist/db/dbMigrator/migration/public/migrations/sqls/20210329113834-add-table-user-invitation-down.sql +1 -0
  237. package/dist/db/dbMigrator/migration/public/migrations/sqls/20210329113834-add-table-user-invitation-up.sql +20 -0
  238. package/dist/db/dbMigrator/migration/public/migrations/sqls/20210618122453-add-table-user-access-request-down.sql +1 -0
  239. package/dist/db/dbMigrator/migration/public/migrations/sqls/20210618122453-add-table-user-access-request-up.sql +17 -0
  240. package/dist/db/dbMigrator/migration/public/migrations/sqls/20221130214733-insert-auth-group-survey-manager-down.sql +1 -0
  241. package/dist/db/dbMigrator/migration/public/migrations/sqls/20221130214733-insert-auth-group-survey-manager-up.sql +11 -0
  242. package/dist/db/dbMigrator/migration/public/migrations/sqls/20231026094839-add-column-survey-date-published-down.sql +1 -0
  243. package/dist/db/dbMigrator/migration/public/migrations/sqls/20231026094839-add-column-survey-date-published-up.sql +2 -0
  244. package/dist/db/dbMigrator/migration/public/migrations/sqls/20240927095011-add-column-survey-config-down.sql +1 -0
  245. package/dist/db/dbMigrator/migration/public/migrations/sqls/20240927095011-add-column-survey-config-up.sql +2 -0
  246. package/dist/db/dbMigrator/migration/public/migrations/sqls/20241009091444-add-column-auth-group-user-props-down.sql +1 -0
  247. package/dist/db/dbMigrator/migration/public/migrations/sqls/20241009091444-add-column-auth-group-user-props-up.sql +2 -0
  248. package/dist/db/dbMigrator/migration/public/migrations/sqls/20241223212935-add-user-tables-indexes-down.sql +1 -0
  249. package/dist/db/dbMigrator/migration/public/migrations/sqls/20241223212935-add-user-tables-indexes-up.sql +10 -0
  250. package/dist/db/dbMigrator/migration/public/migrations/sqls/20251030103141-add-table-user-refresh-token-down.sql +2 -0
  251. package/dist/db/dbMigrator/migration/public/migrations/sqls/20251030103141-add-table-user-refresh-token-up.sql +15 -0
  252. package/dist/db/dbMigrator/migration/public/migrations/sqls/20251113085000-create-table-info-down.sql +1 -0
  253. package/dist/db/dbMigrator/migration/public/migrations/sqls/20251113085000-create-table-info-up.sql +8 -0
  254. package/dist/db/dbMigrator/migration/public/migrations/sqls/20251222213811-create-table-message-down.sql +1 -0
  255. package/dist/db/dbMigrator/migration/public/migrations/sqls/20251222213811-create-table-message-up.sql +12 -0
  256. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260118215307-add-table-user-temp-auth-token-down.sql +1 -0
  257. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260118215307-add-table-user-temp-auth-token-up.sql +10 -0
  258. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260123092621-add-column-user-temp-auth-token-hash-down.sql +1 -0
  259. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260123092621-add-column-user-temp-auth-token-hash-up.sql +18 -0
  260. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260203121201-create-user-two-factor-table-down.sql +1 -0
  261. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260203121201-create-user-two-factor-table-up.sql +16 -0
  262. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260713124754-create-user-group-tables-down.sql +2 -0
  263. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260713124754-create-user-group-tables-up.sql +25 -0
  264. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260730150034-add-column-survey-app-version-down.sql +2 -0
  265. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260730150034-add-column-survey-app-version-up.sql +2 -0
  266. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260806120000-add-tables-cluster-bus-down.sql +6 -0
  267. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260806120000-add-tables-cluster-bus-up.sql +26 -0
  268. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260819100000-create-table-job-down.sql +1 -0
  269. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260819100000-create-table-job-up.sql +21 -0
  270. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260819100100-create-table-record-socket-association-down.sql +1 -0
  271. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260819100100-create-table-record-socket-association-up.sql +13 -0
  272. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260825120000-add-column-job-instance-id-down.sql +2 -0
  273. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260825120000-add-column-job-instance-id-up.sql +4 -0
  274. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260915160000-create-table-record-printable-export-share-down.sql +1 -0
  275. package/dist/db/dbMigrator/migration/public/migrations/sqls/20260915160000-create-table-record-printable-export-share-up.sql +22 -0
  276. package/dist/db/dbMigrator/migration/survey/migrations/20180814141148-create-record-tables.d.ts +6 -0
  277. package/dist/db/dbMigrator/migration/survey/migrations/20180814141148-create-record-tables.js +45 -0
  278. package/dist/db/dbMigrator/migration/survey/migrations/20180814141148-create-record-tables.js.map +1 -0
  279. package/dist/db/dbMigrator/migration/survey/migrations/20180914073047-create-category-tables.d.ts +6 -0
  280. package/dist/db/dbMigrator/migration/survey/migrations/20180914073047-create-category-tables.js +45 -0
  281. package/dist/db/dbMigrator/migration/survey/migrations/20180914073047-create-category-tables.js.map +1 -0
  282. package/dist/db/dbMigrator/migration/survey/migrations/20181004072545-create-taxonomy-tables.d.ts +6 -0
  283. package/dist/db/dbMigrator/migration/survey/migrations/20181004072545-create-taxonomy-tables.js +45 -0
  284. package/dist/db/dbMigrator/migration/survey/migrations/20181004072545-create-taxonomy-tables.js.map +1 -0
  285. package/dist/db/dbMigrator/migration/survey/migrations/20181204101541-create-history-log-table.d.ts +6 -0
  286. package/dist/db/dbMigrator/migration/survey/migrations/20181204101541-create-history-log-table.js +45 -0
  287. package/dist/db/dbMigrator/migration/survey/migrations/20181204101541-create-history-log-table.js.map +1 -0
  288. package/dist/db/dbMigrator/migration/survey/migrations/20181204141100-create-file-table.d.ts +6 -0
  289. package/dist/db/dbMigrator/migration/survey/migrations/20181204141100-create-file-table.js +45 -0
  290. package/dist/db/dbMigrator/migration/survey/migrations/20181204141100-create-file-table.js.map +1 -0
  291. package/dist/db/dbMigrator/migration/survey/migrations/20190315100007-add-table-collect-import-report.d.ts +6 -0
  292. package/dist/db/dbMigrator/migration/survey/migrations/20190315100007-add-table-collect-import-report.js +45 -0
  293. package/dist/db/dbMigrator/migration/survey/migrations/20190315100007-add-table-collect-import-report.js.map +1 -0
  294. package/dist/db/dbMigrator/migration/survey/migrations/20191004132253-create-analysis-table.d.ts +6 -0
  295. package/dist/db/dbMigrator/migration/survey/migrations/20191004132253-create-analysis-table.js +45 -0
  296. package/dist/db/dbMigrator/migration/survey/migrations/20191004132253-create-analysis-table.js.map +1 -0
  297. package/dist/db/dbMigrator/migration/survey/migrations/20230329091753-alter-table-chain-add-column-scriptend.d.ts +6 -0
  298. package/dist/db/dbMigrator/migration/survey/migrations/20230329091753-alter-table-chain-add-column-scriptend.js +45 -0
  299. package/dist/db/dbMigrator/migration/survey/migrations/20230329091753-alter-table-chain-add-column-scriptend.js.map +1 -0
  300. package/dist/db/dbMigrator/migration/survey/migrations/20230619080858-alter-table-file-drop-content-null-costraint.d.ts +6 -0
  301. package/dist/db/dbMigrator/migration/survey/migrations/20230619080858-alter-table-file-drop-content-null-costraint.js +43 -0
  302. package/dist/db/dbMigrator/migration/survey/migrations/20230619080858-alter-table-file-drop-content-null-costraint.js.map +1 -0
  303. package/dist/db/dbMigrator/migration/survey/migrations/20230802195435-alter-table-record-add-column-date-modified.d.ts +6 -0
  304. package/dist/db/dbMigrator/migration/survey/migrations/20230802195435-alter-table-record-add-column-date-modified.js +43 -0
  305. package/dist/db/dbMigrator/migration/survey/migrations/20230802195435-alter-table-record-add-column-date-modified.js.map +1 -0
  306. package/dist/db/dbMigrator/migration/survey/migrations/20231123083354-alter-table-record-add-column-info.d.ts +6 -0
  307. package/dist/db/dbMigrator/migration/survey/migrations/20231123083354-alter-table-record-add-column-info.js +43 -0
  308. package/dist/db/dbMigrator/migration/survey/migrations/20231123083354-alter-table-record-add-column-info.js.map +1 -0
  309. package/dist/db/dbMigrator/migration/survey/migrations/20240403130324-add-table-data-query.d.ts +6 -0
  310. package/dist/db/dbMigrator/migration/survey/migrations/20240403130324-add-table-data-query.js +43 -0
  311. package/dist/db/dbMigrator/migration/survey/migrations/20240403130324-add-table-data-query.js.map +1 -0
  312. package/dist/db/dbMigrator/migration/survey/migrations/20240813121444-alter-table-record-add-column-merged-into.d.ts +6 -0
  313. package/dist/db/dbMigrator/migration/survey/migrations/20240813121444-alter-table-record-add-column-merged-into.js +43 -0
  314. package/dist/db/dbMigrator/migration/survey/migrations/20240813121444-alter-table-record-add-column-merged-into.js.map +1 -0
  315. package/dist/db/dbMigrator/migration/survey/migrations/20241223212900-activity-log-add-user-indexes.d.ts +6 -0
  316. package/dist/db/dbMigrator/migration/survey/migrations/20241223212900-activity-log-add-user-indexes.js +43 -0
  317. package/dist/db/dbMigrator/migration/survey/migrations/20241223212900-activity-log-add-user-indexes.js.map +1 -0
  318. package/dist/db/dbMigrator/migration/survey/migrations/20260125223049-alter-table-node-create-value-indexes.d.ts +6 -0
  319. package/dist/db/dbMigrator/migration/survey/migrations/20260125223049-alter-table-node-create-value-indexes.js +43 -0
  320. package/dist/db/dbMigrator/migration/survey/migrations/20260125223049-alter-table-node-create-value-indexes.js.map +1 -0
  321. package/dist/db/dbMigrator/migration/survey/migrations/20260319111424-alter-table-node-create-value-file-indexes.d.ts +6 -0
  322. package/dist/db/dbMigrator/migration/survey/migrations/20260319111424-alter-table-node-create-value-file-indexes.js +43 -0
  323. package/dist/db/dbMigrator/migration/survey/migrations/20260319111424-alter-table-node-create-value-file-indexes.js.map +1 -0
  324. package/dist/db/dbMigrator/migration/survey/migrations/20260911194436-generalize-collect-import-report-to-import-report.d.ts +6 -0
  325. package/dist/db/dbMigrator/migration/survey/migrations/20260911194436-generalize-collect-import-report-to-import-report.js +43 -0
  326. package/dist/db/dbMigrator/migration/survey/migrations/20260911194436-generalize-collect-import-report-to-import-report.js.map +1 -0
  327. package/dist/db/dbMigrator/migration/survey/migrations/20260916140657-alter-table-file-create-uuid-index.d.ts +6 -0
  328. package/dist/db/dbMigrator/migration/survey/migrations/20260916140657-alter-table-file-create-uuid-index.js +43 -0
  329. package/dist/db/dbMigrator/migration/survey/migrations/20260916140657-alter-table-file-create-uuid-index.js.map +1 -0
  330. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20180814141148-create-record-tables-down.sql +1 -0
  331. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20180814141148-create-record-tables-up.sql +63 -0
  332. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20180914073047-create-category-tables-down.sql +1 -0
  333. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20180914073047-create-category-tables-up.sql +52 -0
  334. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20181004072545-create-taxonomy-tables-down.sql +1 -0
  335. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20181004072545-create-taxonomy-tables-up.sql +59 -0
  336. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20181204101541-create-history-log-table-down.sql +1 -0
  337. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20181204101541-create-history-log-table-up.sql +70 -0
  338. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20181204141100-create-file-table-down.sql +1 -0
  339. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20181204141100-create-file-table-up.sql +11 -0
  340. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20190315100007-add-table-collect-import-report-down.sql +1 -0
  341. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20190315100007-add-table-collect-import-report-up.sql +16 -0
  342. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20191004132253-create-analysis-table-down.sql +1 -0
  343. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20191004132253-create-analysis-table-up.sql +41 -0
  344. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20230329091753-alter-table-chain-add-column-scriptend-down.sql +1 -0
  345. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20230329091753-alter-table-chain-add-column-scriptend-up.sql +2 -0
  346. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20230619080858-alter-table-file-drop-content-null-costraint-down.sql +1 -0
  347. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20230619080858-alter-table-file-drop-content-null-costraint-up.sql +2 -0
  348. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20230802195435-alter-table-record-add-column-date-modified-down.sql +1 -0
  349. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20230802195435-alter-table-record-add-column-date-modified-up.sql +24 -0
  350. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20231123083354-alter-table-record-add-column-info-down.sql +1 -0
  351. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20231123083354-alter-table-record-add-column-info-up.sql +2 -0
  352. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20240403130324-add-table-data-query-down.sql +1 -0
  353. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20240403130324-add-table-data-query-up.sql +14 -0
  354. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20240813121444-alter-table-record-add-column-merged-into-down.sql +1 -0
  355. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20240813121444-alter-table-record-add-column-merged-into-up.sql +3 -0
  356. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20241223212900-activity-log-add-user-indexes-down.sql +1 -0
  357. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20241223212900-activity-log-add-user-indexes-up.sql +2 -0
  358. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20260125223049-alter-table-node-create-value-indexes-down.sql +1 -0
  359. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20260125223049-alter-table-node-create-value-indexes-up.sql +11 -0
  360. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20260319111424-alter-table-node-create-value-file-indexes-down.sql +1 -0
  361. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20260319111424-alter-table-node-create-value-file-indexes-up.sql +3 -0
  362. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20260911194436-generalize-collect-import-report-to-import-report-down.sql +4 -0
  363. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20260911194436-generalize-collect-import-report-to-import-report-up.sql +8 -0
  364. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20260916140657-alter-table-file-create-uuid-index-down.sql +1 -0
  365. package/dist/db/dbMigrator/migration/survey/migrations/sqls/20260916140657-alter-table-file-create-uuid-index-up.sql +4 -0
  366. package/dist/db/dbs/getPropColCombined.d.ts +10 -0
  367. package/dist/db/dbs/getPropColCombined.js +20 -0
  368. package/dist/db/dbs/getPropColCombined.js.map +1 -0
  369. package/dist/db/dbs/index.d.ts +22 -0
  370. package/dist/db/dbs/index.js +16 -0
  371. package/dist/db/dbs/index.js.map +1 -0
  372. package/dist/db/dbs/selectDate.d.ts +1 -0
  373. package/dist/db/dbs/selectDate.js +6 -0
  374. package/dist/db/dbs/selectDate.js.map +1 -0
  375. package/dist/db/dbs/toChar.d.ts +2 -0
  376. package/dist/db/dbs/toChar.js +10 -0
  377. package/dist/db/dbs/toChar.js.map +1 -0
  378. package/dist/db/dbs/transformCallback.d.ts +8 -0
  379. package/dist/db/dbs/transformCallback.js +42 -0
  380. package/dist/db/dbs/transformCallback.js.map +1 -0
  381. package/dist/db/index.d.ts +8 -0
  382. package/dist/db/index.js +45 -0
  383. package/dist/db/index.js.map +1 -0
  384. package/dist/db/schemata/index.d.ts +5 -0
  385. package/dist/db/schemata/index.js +11 -0
  386. package/dist/db/schemata/index.js.map +1 -0
  387. package/dist/db/sql/index.d.ts +7 -0
  388. package/dist/db/sql/index.js +18 -0
  389. package/dist/db/sql/index.js.map +1 -0
  390. package/dist/db/sql/sqlBuilder.d.ts +6 -0
  391. package/dist/db/sql/sqlBuilder.js +8 -0
  392. package/dist/db/sql/sqlBuilder.js.map +1 -0
  393. package/dist/db/sql/sqlDeleteBuilder.d.ts +18 -0
  394. package/dist/db/sql/sqlDeleteBuilder.js +49 -0
  395. package/dist/db/sql/sqlDeleteBuilder.js.map +1 -0
  396. package/dist/db/sql/sqlInsertBuilder.d.ts +16 -0
  397. package/dist/db/sql/sqlInsertBuilder.js +39 -0
  398. package/dist/db/sql/sqlInsertBuilder.js.map +1 -0
  399. package/dist/db/sql/sqlJoinBuilder.d.ts +9 -0
  400. package/dist/db/sql/sqlJoinBuilder.js +24 -0
  401. package/dist/db/sql/sqlJoinBuilder.js.map +1 -0
  402. package/dist/db/sql/sqlSelectBuilder.d.ts +23 -0
  403. package/dist/db/sql/sqlSelectBuilder.js +73 -0
  404. package/dist/db/sql/sqlSelectBuilder.js.map +1 -0
  405. package/dist/db/sql/sqlSelectCountBuilder.d.ts +13 -0
  406. package/dist/db/sql/sqlSelectCountBuilder.js +28 -0
  407. package/dist/db/sql/sqlSelectCountBuilder.js.map +1 -0
  408. package/dist/db/sql/sqlUpdateBuilder.d.ts +15 -0
  409. package/dist/db/sql/sqlUpdateBuilder.js +52 -0
  410. package/dist/db/sql/sqlUpdateBuilder.js.map +1 -0
  411. package/dist/db/sql/sqls.d.ts +3 -0
  412. package/dist/db/sql/sqls.js +10 -0
  413. package/dist/db/sql/sqls.js.map +1 -0
  414. package/dist/db/table/index.d.ts +4 -0
  415. package/dist/db/table/index.js +34 -0
  416. package/dist/db/table/index.js.map +1 -0
  417. package/dist/db/table/schemaPublic/authGroup.d.ts +10 -0
  418. package/dist/db/table/schemaPublic/authGroup.js +17 -0
  419. package/dist/db/table/schemaPublic/authGroup.js.map +1 -0
  420. package/dist/db/table/schemaPublic/authGroupUser.d.ts +8 -0
  421. package/dist/db/table/schemaPublic/authGroupUser.js +15 -0
  422. package/dist/db/table/schemaPublic/authGroupUser.js.map +1 -0
  423. package/dist/db/table/schemaPublic/connectedSocket.d.ts +10 -0
  424. package/dist/db/table/schemaPublic/connectedSocket.js +19 -0
  425. package/dist/db/table/schemaPublic/connectedSocket.js.map +1 -0
  426. package/dist/db/table/schemaPublic/index.d.ts +17 -0
  427. package/dist/db/table/schemaPublic/index.js +38 -0
  428. package/dist/db/table/schemaPublic/index.js.map +1 -0
  429. package/dist/db/table/schemaPublic/info.d.ts +8 -0
  430. package/dist/db/table/schemaPublic/info.js +15 -0
  431. package/dist/db/table/schemaPublic/info.js.map +1 -0
  432. package/dist/db/table/schemaPublic/job.d.ts +17 -0
  433. package/dist/db/table/schemaPublic/job.js +38 -0
  434. package/dist/db/table/schemaPublic/job.js.map +1 -0
  435. package/dist/db/table/schemaPublic/message.d.ts +11 -0
  436. package/dist/db/table/schemaPublic/message.js +18 -0
  437. package/dist/db/table/schemaPublic/message.js.map +1 -0
  438. package/dist/db/table/schemaPublic/recordSocketAssociation.d.ts +9 -0
  439. package/dist/db/table/schemaPublic/recordSocketAssociation.js +18 -0
  440. package/dist/db/table/schemaPublic/recordSocketAssociation.js.map +1 -0
  441. package/dist/db/table/schemaPublic/survey.d.ts +16 -0
  442. package/dist/db/table/schemaPublic/survey.js +23 -0
  443. package/dist/db/table/schemaPublic/survey.js.map +1 -0
  444. package/dist/db/table/schemaPublic/tableSchemaPublic.d.ts +4 -0
  445. package/dist/db/table/schemaPublic/tableSchemaPublic.js +12 -0
  446. package/dist/db/table/schemaPublic/tableSchemaPublic.js.map +1 -0
  447. package/dist/db/table/schemaPublic/user.d.ts +13 -0
  448. package/dist/db/table/schemaPublic/user.js +20 -0
  449. package/dist/db/table/schemaPublic/user.js.map +1 -0
  450. package/dist/db/table/schemaPublic/user2FADevice.d.ts +14 -0
  451. package/dist/db/table/schemaPublic/user2FADevice.js +32 -0
  452. package/dist/db/table/schemaPublic/user2FADevice.js.map +1 -0
  453. package/dist/db/table/schemaPublic/userGroup.d.ts +11 -0
  454. package/dist/db/table/schemaPublic/userGroup.js +20 -0
  455. package/dist/db/table/schemaPublic/userGroup.js.map +1 -0
  456. package/dist/db/table/schemaPublic/userGroupUser.d.ts +11 -0
  457. package/dist/db/table/schemaPublic/userGroupUser.js +20 -0
  458. package/dist/db/table/schemaPublic/userGroupUser.js.map +1 -0
  459. package/dist/db/table/schemaPublic/userRefreshToken.d.ts +12 -0
  460. package/dist/db/table/schemaPublic/userRefreshToken.js +21 -0
  461. package/dist/db/table/schemaPublic/userRefreshToken.js.map +1 -0
  462. package/dist/db/table/schemaPublic/userResetPassword.d.ts +8 -0
  463. package/dist/db/table/schemaPublic/userResetPassword.js +15 -0
  464. package/dist/db/table/schemaPublic/userResetPassword.js.map +1 -0
  465. package/dist/db/table/schemaPublic/userTempAuthToken.d.ts +10 -0
  466. package/dist/db/table/schemaPublic/userTempAuthToken.js +19 -0
  467. package/dist/db/table/schemaPublic/userTempAuthToken.js.map +1 -0
  468. package/dist/db/table/schemaPublic/wsRelayMessage.d.ts +9 -0
  469. package/dist/db/table/schemaPublic/wsRelayMessage.js +18 -0
  470. package/dist/db/table/schemaPublic/wsRelayMessage.js.map +1 -0
  471. package/dist/db/table/schemaSurvey/chain.d.ts +14 -0
  472. package/dist/db/table/schemaSurvey/chain.js +21 -0
  473. package/dist/db/table/schemaSurvey/chain.js.map +1 -0
  474. package/dist/db/table/schemaSurvey/chainNodeDef.d.ts +11 -0
  475. package/dist/db/table/schemaSurvey/chainNodeDef.js +18 -0
  476. package/dist/db/table/schemaSurvey/chainNodeDef.js.map +1 -0
  477. package/dist/db/table/schemaSurvey/chainNodeDefAggregate.d.ts +10 -0
  478. package/dist/db/table/schemaSurvey/chainNodeDefAggregate.js +17 -0
  479. package/dist/db/table/schemaSurvey/chainNodeDefAggregate.js.map +1 -0
  480. package/dist/db/table/schemaSurvey/dataQuery.d.ts +12 -0
  481. package/dist/db/table/schemaSurvey/dataQuery.js +21 -0
  482. package/dist/db/table/schemaSurvey/dataQuery.js.map +1 -0
  483. package/dist/db/table/schemaSurvey/index.d.ts +7 -0
  484. package/dist/db/table/schemaSurvey/index.js +18 -0
  485. package/dist/db/table/schemaSurvey/index.js.map +1 -0
  486. package/dist/db/table/schemaSurvey/nodeDef.d.ts +19 -0
  487. package/dist/db/table/schemaSurvey/nodeDef.js +26 -0
  488. package/dist/db/table/schemaSurvey/nodeDef.js.map +1 -0
  489. package/dist/db/table/schemaSurvey/record.d.ts +13 -0
  490. package/dist/db/table/schemaSurvey/record.js +20 -0
  491. package/dist/db/table/schemaSurvey/record.js.map +1 -0
  492. package/dist/db/table/schemaSurvey/tableSchemaSurvey.d.ts +5 -0
  493. package/dist/db/table/schemaSurvey/tableSchemaSurvey.js +14 -0
  494. package/dist/db/table/schemaSurvey/tableSchemaSurvey.js.map +1 -0
  495. package/dist/db/table/schemaSurveyRdb/index.d.ts +2 -0
  496. package/dist/db/table/schemaSurveyRdb/index.js +8 -0
  497. package/dist/db/table/schemaSurveyRdb/index.js.map +1 -0
  498. package/dist/db/table/schemaSurveyRdb/tableResultSchemaSurveyRdb.d.ts +4 -0
  499. package/dist/db/table/schemaSurveyRdb/tableResultSchemaSurveyRdb.js +11 -0
  500. package/dist/db/table/schemaSurveyRdb/tableResultSchemaSurveyRdb.js.map +1 -0
  501. package/dist/db/table/schemaSurveyRdb/tableSchemaSurveyRdb.d.ts +5 -0
  502. package/dist/db/table/schemaSurveyRdb/tableSchemaSurveyRdb.js +14 -0
  503. package/dist/db/table/schemaSurveyRdb/tableSchemaSurveyRdb.js.map +1 -0
  504. package/dist/db/table/table.d.ts +9 -0
  505. package/dist/db/table/table.js +25 -0
  506. package/dist/db/table/table.js.map +1 -0
  507. package/dist/fileStorage/s3Storage.d.ts +22 -0
  508. package/dist/fileStorage/s3Storage.js +75 -0
  509. package/dist/fileStorage/s3Storage.js.map +1 -0
  510. package/dist/index.d.ts +21 -0
  511. package/dist/index.js +71 -0
  512. package/dist/index.js.map +1 -0
  513. package/dist/job/index.d.ts +7 -0
  514. package/dist/job/index.js +13 -0
  515. package/dist/job/index.js.map +1 -0
  516. package/dist/job/job.d.ts +11 -0
  517. package/dist/job/job.js +12 -0
  518. package/dist/job/job.js.map +1 -0
  519. package/dist/job/jobContext.d.ts +7 -0
  520. package/dist/job/jobContext.js +3 -0
  521. package/dist/job/jobContext.js.map +1 -0
  522. package/dist/job/jobManager.d.ts +8 -0
  523. package/dist/job/jobManager.js +42 -0
  524. package/dist/job/jobManager.js.map +1 -0
  525. package/dist/job/jobMessage.d.ts +13 -0
  526. package/dist/job/jobMessage.js +13 -0
  527. package/dist/job/jobMessage.js.map +1 -0
  528. package/dist/job/jobRegistry.d.ts +5 -0
  529. package/dist/job/jobRegistry.js +20 -0
  530. package/dist/job/jobRegistry.js.map +1 -0
  531. package/dist/job/jobThread.d.ts +9 -0
  532. package/dist/job/jobThread.js +42 -0
  533. package/dist/job/jobThread.js.map +1 -0
  534. package/dist/job/tests/testJobs.d.ts +16 -0
  535. package/dist/job/tests/testJobs.js +28 -0
  536. package/dist/job/tests/testJobs.js.map +1 -0
  537. package/dist/log/index.d.ts +1 -0
  538. package/dist/log/index.js +6 -0
  539. package/dist/log/index.js.map +1 -0
  540. package/dist/log/log4js.d.ts +2 -0
  541. package/dist/log/log4js.js +37 -0
  542. package/dist/log/log4js.js.map +1 -0
  543. package/dist/log/logFileConstants.d.ts +1 -0
  544. package/dist/log/logFileConstants.js +5 -0
  545. package/dist/log/logFileConstants.js.map +1 -0
  546. package/dist/log/logFileS3Upload.d.ts +2 -0
  547. package/dist/log/logFileS3Upload.js +102 -0
  548. package/dist/log/logFileS3Upload.js.map +1 -0
  549. package/dist/log/logLevel.d.ts +6 -0
  550. package/dist/log/logLevel.js +11 -0
  551. package/dist/log/logLevel.js.map +1 -0
  552. package/dist/log/logger.d.ts +15 -0
  553. package/dist/log/logger.js +48 -0
  554. package/dist/log/logger.js.map +1 -0
  555. package/dist/model/ArenaServerConstants.d.ts +3 -0
  556. package/dist/model/ArenaServerConstants.js +7 -0
  557. package/dist/model/ArenaServerConstants.js.map +1 -0
  558. package/dist/model/index.d.ts +3 -0
  559. package/dist/model/index.js +6 -0
  560. package/dist/model/index.js.map +1 -0
  561. package/dist/model/user2FADevice/index.d.ts +1 -0
  562. package/dist/model/user2FADevice/index.js +3 -0
  563. package/dist/model/user2FADevice/index.js.map +1 -0
  564. package/dist/model/user2FADevice/user2FADevice.d.ts +16 -0
  565. package/dist/model/user2FADevice/user2FADevice.js +3 -0
  566. package/dist/model/user2FADevice/user2FADevice.js.map +1 -0
  567. package/dist/model/userTempAuthToken/index.d.ts +1 -0
  568. package/dist/model/userTempAuthToken/index.js +3 -0
  569. package/dist/model/userTempAuthToken/index.js.map +1 -0
  570. package/dist/model/userTempAuthToken/userTempAuthToken.d.ts +11 -0
  571. package/dist/model/userTempAuthToken/userTempAuthToken.js +3 -0
  572. package/dist/model/userTempAuthToken/userTempAuthToken.js.map +1 -0
  573. package/dist/processEnv/index.d.ts +153 -0
  574. package/dist/processEnv/index.js +159 -0
  575. package/dist/processEnv/index.js.map +1 -0
  576. package/dist/repository/authGroup/getMany.d.ts +5 -0
  577. package/dist/repository/authGroup/getMany.js +24 -0
  578. package/dist/repository/authGroup/getMany.js.map +1 -0
  579. package/dist/repository/authGroup/index.d.ts +5 -0
  580. package/dist/repository/authGroup/index.js +8 -0
  581. package/dist/repository/authGroup/index.js.map +1 -0
  582. package/dist/repository/chain/count.d.ts +3 -0
  583. package/dist/repository/chain/count.js +12 -0
  584. package/dist/repository/chain/count.js.map +1 -0
  585. package/dist/repository/chain/create.d.ts +1 -0
  586. package/dist/repository/chain/create.js +7 -0
  587. package/dist/repository/chain/create.js.map +1 -0
  588. package/dist/repository/chain/delete.d.ts +1 -0
  589. package/dist/repository/chain/delete.js +7 -0
  590. package/dist/repository/chain/delete.js.map +1 -0
  591. package/dist/repository/chain/get.d.ts +1 -0
  592. package/dist/repository/chain/get.js +7 -0
  593. package/dist/repository/chain/get.js.map +1 -0
  594. package/dist/repository/chain/getMany.d.ts +1 -0
  595. package/dist/repository/chain/getMany.js +7 -0
  596. package/dist/repository/chain/getMany.js.map +1 -0
  597. package/dist/repository/chain/index.d.ts +1 -0
  598. package/dist/repository/chain/index.js +5 -0
  599. package/dist/repository/chain/index.js.map +1 -0
  600. package/dist/repository/chain/update.d.ts +1 -0
  601. package/dist/repository/chain/update.js +7 -0
  602. package/dist/repository/chain/update.js.map +1 -0
  603. package/dist/repository/connectedSocket/deleteStale.d.ts +2 -0
  604. package/dist/repository/connectedSocket/deleteStale.js +15 -0
  605. package/dist/repository/connectedSocket/deleteStale.js.map +1 -0
  606. package/dist/repository/connectedSocket/exists.d.ts +2 -0
  607. package/dist/repository/connectedSocket/exists.js +12 -0
  608. package/dist/repository/connectedSocket/exists.js.map +1 -0
  609. package/dist/repository/connectedSocket/index.d.ts +11 -0
  610. package/dist/repository/connectedSocket/index.js +18 -0
  611. package/dist/repository/connectedSocket/index.js.map +1 -0
  612. package/dist/repository/connectedSocket/remove.d.ts +2 -0
  613. package/dist/repository/connectedSocket/remove.js +12 -0
  614. package/dist/repository/connectedSocket/remove.js.map +1 -0
  615. package/dist/repository/connectedSocket/removeMany.d.ts +2 -0
  616. package/dist/repository/connectedSocket/removeMany.js +13 -0
  617. package/dist/repository/connectedSocket/removeMany.js.map +1 -0
  618. package/dist/repository/connectedSocket/touchMany.d.ts +2 -0
  619. package/dist/repository/connectedSocket/touchMany.js +13 -0
  620. package/dist/repository/connectedSocket/touchMany.js.map +1 -0
  621. package/dist/repository/connectedSocket/upsert.d.ts +5 -0
  622. package/dist/repository/connectedSocket/upsert.js +21 -0
  623. package/dist/repository/connectedSocket/upsert.js.map +1 -0
  624. package/dist/repository/dataQuery/delete.d.ts +6 -0
  625. package/dist/repository/dataQuery/delete.js +21 -0
  626. package/dist/repository/dataQuery/delete.js.map +1 -0
  627. package/dist/repository/dataQuery/index.d.ts +24 -0
  628. package/dist/repository/dataQuery/index.js +16 -0
  629. package/dist/repository/dataQuery/index.js.map +1 -0
  630. package/dist/repository/dataQuery/insert.d.ts +6 -0
  631. package/dist/repository/dataQuery/insert.js +24 -0
  632. package/dist/repository/dataQuery/insert.js.map +1 -0
  633. package/dist/repository/dataQuery/read.d.ts +12 -0
  634. package/dist/repository/dataQuery/read.js +36 -0
  635. package/dist/repository/dataQuery/read.js.map +1 -0
  636. package/dist/repository/dataQuery/update.d.ts +6 -0
  637. package/dist/repository/dataQuery/update.js +19 -0
  638. package/dist/repository/dataQuery/update.js.map +1 -0
  639. package/dist/repository/index.d.ts +18 -0
  640. package/dist/repository/index.js +36 -0
  641. package/dist/repository/index.js.map +1 -0
  642. package/dist/repository/info/delete.d.ts +3 -0
  643. package/dist/repository/info/delete.js +19 -0
  644. package/dist/repository/info/delete.js.map +1 -0
  645. package/dist/repository/info/index.d.ts +7 -0
  646. package/dist/repository/info/index.js +13 -0
  647. package/dist/repository/info/index.js.map +1 -0
  648. package/dist/repository/info/read.d.ts +4 -0
  649. package/dist/repository/info/read.js +22 -0
  650. package/dist/repository/info/read.js.map +1 -0
  651. package/dist/repository/info/types.d.ts +8 -0
  652. package/dist/repository/info/types.js +8 -0
  653. package/dist/repository/info/types.js.map +1 -0
  654. package/dist/repository/info/upsert.d.ts +3 -0
  655. package/dist/repository/info/upsert.js +26 -0
  656. package/dist/repository/info/upsert.js.map +1 -0
  657. package/dist/repository/info/utils.d.ts +3 -0
  658. package/dist/repository/info/utils.js +16 -0
  659. package/dist/repository/info/utils.js.map +1 -0
  660. package/dist/repository/job/failOrphanedByInstanceId.d.ts +2 -0
  661. package/dist/repository/job/failOrphanedByInstanceId.js +28 -0
  662. package/dist/repository/job/failOrphanedByInstanceId.js.map +1 -0
  663. package/dist/repository/job/getActiveBySurveyId.d.ts +3 -0
  664. package/dist/repository/job/getActiveBySurveyId.js +21 -0
  665. package/dist/repository/job/getActiveBySurveyId.js.map +1 -0
  666. package/dist/repository/job/getActiveByUserUuid.d.ts +3 -0
  667. package/dist/repository/job/getActiveByUserUuid.js +21 -0
  668. package/dist/repository/job/getActiveByUserUuid.js.map +1 -0
  669. package/dist/repository/job/getByUuid.d.ts +3 -0
  670. package/dist/repository/job/getByUuid.js +17 -0
  671. package/dist/repository/job/getByUuid.js.map +1 -0
  672. package/dist/repository/job/index.d.ts +23 -0
  673. package/dist/repository/job/index.js +20 -0
  674. package/dist/repository/job/index.js.map +1 -0
  675. package/dist/repository/job/insert.d.ts +8 -0
  676. package/dist/repository/job/insert.js +27 -0
  677. package/dist/repository/job/insert.js.map +1 -0
  678. package/dist/repository/job/updateProgress.d.ts +6 -0
  679. package/dist/repository/job/updateProgress.js +18 -0
  680. package/dist/repository/job/updateProgress.js.map +1 -0
  681. package/dist/repository/job/updateStatus.d.ts +8 -0
  682. package/dist/repository/job/updateStatus.js +21 -0
  683. package/dist/repository/job/updateStatus.js.map +1 -0
  684. package/dist/repository/job/utils.d.ts +16 -0
  685. package/dist/repository/job/utils.js +24 -0
  686. package/dist/repository/job/utils.js.map +1 -0
  687. package/dist/repository/message/create.d.ts +3 -0
  688. package/dist/repository/message/create.js +25 -0
  689. package/dist/repository/message/create.js.map +1 -0
  690. package/dist/repository/message/delete.d.ts +3 -0
  691. package/dist/repository/message/delete.js +18 -0
  692. package/dist/repository/message/delete.js.map +1 -0
  693. package/dist/repository/message/index.d.ts +9 -0
  694. package/dist/repository/message/index.js +17 -0
  695. package/dist/repository/message/index.js.map +1 -0
  696. package/dist/repository/message/read.d.ts +6 -0
  697. package/dist/repository/message/read.js +43 -0
  698. package/dist/repository/message/read.js.map +1 -0
  699. package/dist/repository/message/update.d.ts +3 -0
  700. package/dist/repository/message/update.js +25 -0
  701. package/dist/repository/message/update.js.map +1 -0
  702. package/dist/repository/message/utils.d.ts +3 -0
  703. package/dist/repository/message/utils.js +19 -0
  704. package/dist/repository/message/utils.js.map +1 -0
  705. package/dist/repository/nodeDef/index.d.ts +5 -0
  706. package/dist/repository/nodeDef/index.js +9 -0
  707. package/dist/repository/nodeDef/index.js.map +1 -0
  708. package/dist/repository/nodeDef/read.d.ts +13 -0
  709. package/dist/repository/nodeDef/read.js +70 -0
  710. package/dist/repository/nodeDef/read.js.map +1 -0
  711. package/dist/repository/record/get.d.ts +10 -0
  712. package/dist/repository/record/get.js +41 -0
  713. package/dist/repository/record/get.js.map +1 -0
  714. package/dist/repository/record/index.d.ts +10 -0
  715. package/dist/repository/record/index.js +9 -0
  716. package/dist/repository/record/index.js.map +1 -0
  717. package/dist/repository/record/transformCallback.d.ts +6 -0
  718. package/dist/repository/record/transformCallback.js +21 -0
  719. package/dist/repository/record/transformCallback.js.map +1 -0
  720. package/dist/repository/recordSocketAssociation/assocSocket.d.ts +5 -0
  721. package/dist/repository/recordSocketAssociation/assocSocket.js +19 -0
  722. package/dist/repository/recordSocketAssociation/assocSocket.js.map +1 -0
  723. package/dist/repository/recordSocketAssociation/dissocSocket.d.ts +5 -0
  724. package/dist/repository/recordSocketAssociation/dissocSocket.js +16 -0
  725. package/dist/repository/recordSocketAssociation/dissocSocket.js.map +1 -0
  726. package/dist/repository/recordSocketAssociation/dissocSocketBySocketId.d.ts +2 -0
  727. package/dist/repository/recordSocketAssociation/dissocSocketBySocketId.js +11 -0
  728. package/dist/repository/recordSocketAssociation/dissocSocketBySocketId.js.map +1 -0
  729. package/dist/repository/recordSocketAssociation/dissocSocketsByRecordUuid.d.ts +2 -0
  730. package/dist/repository/recordSocketAssociation/dissocSocketsByRecordUuid.js +11 -0
  731. package/dist/repository/recordSocketAssociation/dissocSocketsByRecordUuid.js.map +1 -0
  732. package/dist/repository/recordSocketAssociation/getSocketIdsByRecordUuid.d.ts +2 -0
  733. package/dist/repository/recordSocketAssociation/getSocketIdsByRecordUuid.js +12 -0
  734. package/dist/repository/recordSocketAssociation/getSocketIdsByRecordUuid.js.map +1 -0
  735. package/dist/repository/recordSocketAssociation/index.d.ts +13 -0
  736. package/dist/repository/recordSocketAssociation/index.js +16 -0
  737. package/dist/repository/recordSocketAssociation/index.js.map +1 -0
  738. package/dist/repository/survey/get.d.ts +7 -0
  739. package/dist/repository/survey/get.js +16 -0
  740. package/dist/repository/survey/get.js.map +1 -0
  741. package/dist/repository/survey/getAllIds.d.ts +2 -0
  742. package/dist/repository/survey/getAllIds.js +11 -0
  743. package/dist/repository/survey/getAllIds.js.map +1 -0
  744. package/dist/repository/survey/getAllIdsAndAppVersions.d.ts +6 -0
  745. package/dist/repository/survey/getAllIdsAndAppVersions.js +11 -0
  746. package/dist/repository/survey/getAllIdsAndAppVersions.js.map +1 -0
  747. package/dist/repository/survey/index.d.ts +9 -0
  748. package/dist/repository/survey/index.js +12 -0
  749. package/dist/repository/survey/index.js.map +1 -0
  750. package/dist/repository/user/get.d.ts +12 -0
  751. package/dist/repository/user/get.js +50 -0
  752. package/dist/repository/user/get.js.map +1 -0
  753. package/dist/repository/user/index.d.ts +13 -0
  754. package/dist/repository/user/index.js +10 -0
  755. package/dist/repository/user/index.js.map +1 -0
  756. package/dist/repository/user/updateUserPrefs.d.ts +5 -0
  757. package/dist/repository/user/updateUserPrefs.js +20 -0
  758. package/dist/repository/user/updateUserPrefs.js.map +1 -0
  759. package/dist/repository/user2FADevice/countByUserUuid.d.ts +2 -0
  760. package/dist/repository/user2FADevice/countByUserUuid.js +16 -0
  761. package/dist/repository/user2FADevice/countByUserUuid.js.map +1 -0
  762. package/dist/repository/user2FADevice/delete.d.ts +6 -0
  763. package/dist/repository/user2FADevice/delete.js +22 -0
  764. package/dist/repository/user2FADevice/delete.js.map +1 -0
  765. package/dist/repository/user2FADevice/getByDeviceUuid.d.ts +6 -0
  766. package/dist/repository/user2FADevice/getByDeviceUuid.js +16 -0
  767. package/dist/repository/user2FADevice/getByDeviceUuid.js.map +1 -0
  768. package/dist/repository/user2FADevice/getByUserUuid.d.ts +4 -0
  769. package/dist/repository/user2FADevice/getByUserUuid.js +25 -0
  770. package/dist/repository/user2FADevice/getByUserUuid.js.map +1 -0
  771. package/dist/repository/user2FADevice/index.d.ts +20 -0
  772. package/dist/repository/user2FADevice/index.js +20 -0
  773. package/dist/repository/user2FADevice/index.js.map +1 -0
  774. package/dist/repository/user2FADevice/insert.d.ts +5 -0
  775. package/dist/repository/user2FADevice/insert.js +29 -0
  776. package/dist/repository/user2FADevice/insert.js.map +1 -0
  777. package/dist/repository/user2FADevice/update.d.ts +5 -0
  778. package/dist/repository/user2FADevice/update.js +34 -0
  779. package/dist/repository/user2FADevice/update.js.map +1 -0
  780. package/dist/repository/userGroup/delete.d.ts +5 -0
  781. package/dist/repository/userGroup/delete.js +17 -0
  782. package/dist/repository/userGroup/delete.js.map +1 -0
  783. package/dist/repository/userGroup/getUserGroupsByUser.d.ts +6 -0
  784. package/dist/repository/userGroup/getUserGroupsByUser.js +29 -0
  785. package/dist/repository/userGroup/getUserGroupsByUser.js.map +1 -0
  786. package/dist/repository/userGroup/index.d.ts +42 -0
  787. package/dist/repository/userGroup/index.js +23 -0
  788. package/dist/repository/userGroup/index.js.map +1 -0
  789. package/dist/repository/userGroup/insert.d.ts +6 -0
  790. package/dist/repository/userGroup/insert.js +22 -0
  791. package/dist/repository/userGroup/insert.js.map +1 -0
  792. package/dist/repository/userGroup/members.d.ts +17 -0
  793. package/dist/repository/userGroup/members.js +42 -0
  794. package/dist/repository/userGroup/members.js.map +1 -0
  795. package/dist/repository/userGroup/read.d.ts +11 -0
  796. package/dist/repository/userGroup/read.js +38 -0
  797. package/dist/repository/userGroup/read.js.map +1 -0
  798. package/dist/repository/userGroup/update.d.ts +10 -0
  799. package/dist/repository/userGroup/update.js +33 -0
  800. package/dist/repository/userGroup/update.js.map +1 -0
  801. package/dist/repository/userRefreshToken/deleteExpired.d.ts +2 -0
  802. package/dist/repository/userRefreshToken/deleteExpired.js +15 -0
  803. package/dist/repository/userRefreshToken/deleteExpired.js.map +1 -0
  804. package/dist/repository/userRefreshToken/getByUuid.d.ts +5 -0
  805. package/dist/repository/userRefreshToken/getByUuid.js +18 -0
  806. package/dist/repository/userRefreshToken/getByUuid.js.map +1 -0
  807. package/dist/repository/userRefreshToken/index.d.ts +11 -0
  808. package/dist/repository/userRefreshToken/index.js +16 -0
  809. package/dist/repository/userRefreshToken/index.js.map +1 -0
  810. package/dist/repository/userRefreshToken/insert.d.ts +3 -0
  811. package/dist/repository/userRefreshToken/insert.js +24 -0
  812. package/dist/repository/userRefreshToken/insert.js.map +1 -0
  813. package/dist/repository/userRefreshToken/revoke.d.ts +2 -0
  814. package/dist/repository/userRefreshToken/revoke.js +11 -0
  815. package/dist/repository/userRefreshToken/revoke.js.map +1 -0
  816. package/dist/repository/userRefreshToken/revokeAll.d.ts +4 -0
  817. package/dist/repository/userRefreshToken/revokeAll.js +12 -0
  818. package/dist/repository/userRefreshToken/revokeAll.js.map +1 -0
  819. package/dist/repository/userResetPassword/hasValidResetPassword.d.ts +4 -0
  820. package/dist/repository/userResetPassword/hasValidResetPassword.js +19 -0
  821. package/dist/repository/userResetPassword/hasValidResetPassword.js.map +1 -0
  822. package/dist/repository/userResetPassword/index.d.ts +5 -0
  823. package/dist/repository/userResetPassword/index.js +8 -0
  824. package/dist/repository/userResetPassword/index.js.map +1 -0
  825. package/dist/repository/userTempAuthToken/deleteByTokenHash.d.ts +3 -0
  826. package/dist/repository/userTempAuthToken/deleteByTokenHash.js +16 -0
  827. package/dist/repository/userTempAuthToken/deleteByTokenHash.js.map +1 -0
  828. package/dist/repository/userTempAuthToken/deleteExpired.d.ts +2 -0
  829. package/dist/repository/userTempAuthToken/deleteExpired.js +12 -0
  830. package/dist/repository/userTempAuthToken/deleteExpired.js.map +1 -0
  831. package/dist/repository/userTempAuthToken/getByTokenHash.d.ts +3 -0
  832. package/dist/repository/userTempAuthToken/getByTokenHash.js +15 -0
  833. package/dist/repository/userTempAuthToken/getByTokenHash.js.map +1 -0
  834. package/dist/repository/userTempAuthToken/getByUserUuid.d.ts +5 -0
  835. package/dist/repository/userTempAuthToken/getByUserUuid.js +20 -0
  836. package/dist/repository/userTempAuthToken/getByUserUuid.js.map +1 -0
  837. package/dist/repository/userTempAuthToken/index.d.ts +9 -0
  838. package/dist/repository/userTempAuthToken/index.js +16 -0
  839. package/dist/repository/userTempAuthToken/index.js.map +1 -0
  840. package/dist/repository/userTempAuthToken/insert.d.ts +3 -0
  841. package/dist/repository/userTempAuthToken/insert.js +22 -0
  842. package/dist/repository/userTempAuthToken/insert.js.map +1 -0
  843. package/dist/repository/wsRelayMessage/deleteExpired.d.ts +2 -0
  844. package/dist/repository/wsRelayMessage/deleteExpired.js +15 -0
  845. package/dist/repository/wsRelayMessage/deleteExpired.js.map +1 -0
  846. package/dist/repository/wsRelayMessage/getById.d.ts +2 -0
  847. package/dist/repository/wsRelayMessage/getById.js +12 -0
  848. package/dist/repository/wsRelayMessage/getById.js.map +1 -0
  849. package/dist/repository/wsRelayMessage/index.d.ts +5 -0
  850. package/dist/repository/wsRelayMessage/index.js +12 -0
  851. package/dist/repository/wsRelayMessage/index.js.map +1 -0
  852. package/dist/repository/wsRelayMessage/insert.d.ts +2 -0
  853. package/dist/repository/wsRelayMessage/insert.js +13 -0
  854. package/dist/repository/wsRelayMessage/insert.js.map +1 -0
  855. package/dist/server/arenaApp.d.ts +15 -0
  856. package/dist/server/arenaApp.js +3 -0
  857. package/dist/server/arenaApp.js.map +1 -0
  858. package/dist/server/arenaServer/index.d.ts +10 -0
  859. package/dist/server/arenaServer/index.js +53 -0
  860. package/dist/server/arenaServer/index.js.map +1 -0
  861. package/dist/server/arenaServer/initApp.d.ts +8 -0
  862. package/dist/server/arenaServer/initApp.js +42 -0
  863. package/dist/server/arenaServer/initApp.js.map +1 -0
  864. package/dist/server/arenaServer/registerServices.d.ts +2 -0
  865. package/dist/server/arenaServer/registerServices.js +19 -0
  866. package/dist/server/arenaServer/registerServices.js.map +1 -0
  867. package/dist/server/arenaServer/serverServiceType.d.ts +7 -0
  868. package/dist/server/arenaServer/serverServiceType.js +12 -0
  869. package/dist/server/arenaServer/serverServiceType.js.map +1 -0
  870. package/dist/server/arenaServer/start.d.ts +3 -0
  871. package/dist/server/arenaServer/start.js +45 -0
  872. package/dist/server/arenaServer/start.js.map +1 -0
  873. package/dist/server/arenaServer/stop.d.ts +3 -0
  874. package/dist/server/arenaServer/stop.js +27 -0
  875. package/dist/server/arenaServer/stop.js.map +1 -0
  876. package/dist/server/error.d.ts +26 -0
  877. package/dist/server/error.js +45 -0
  878. package/dist/server/error.js.map +1 -0
  879. package/dist/server/expressInitializer.d.ts +4 -0
  880. package/dist/server/expressInitializer.js +3 -0
  881. package/dist/server/expressInitializer.js.map +1 -0
  882. package/dist/server/index.d.ts +4 -0
  883. package/dist/server/index.js +11 -0
  884. package/dist/server/index.js.map +1 -0
  885. package/dist/server/middleware/authentication.d.ts +2 -0
  886. package/dist/server/middleware/authentication.js +111 -0
  887. package/dist/server/middleware/authentication.js.map +1 -0
  888. package/dist/server/middleware/error.d.ts +2 -0
  889. package/dist/server/middleware/error.js +16 -0
  890. package/dist/server/middleware/error.js.map +1 -0
  891. package/dist/server/middleware/header.d.ts +2 -0
  892. package/dist/server/middleware/header.js +27 -0
  893. package/dist/server/middleware/header.js.map +1 -0
  894. package/dist/server/middleware/https.d.ts +2 -0
  895. package/dist/server/middleware/https.js +21 -0
  896. package/dist/server/middleware/https.js.map +1 -0
  897. package/dist/server/middleware/index.d.ts +5 -0
  898. package/dist/server/middleware/index.js +14 -0
  899. package/dist/server/middleware/index.js.map +1 -0
  900. package/dist/server/middleware/rateLimit.d.ts +2 -0
  901. package/dist/server/middleware/rateLimit.js +43 -0
  902. package/dist/server/middleware/rateLimit.js.map +1 -0
  903. package/dist/service/SurveyItemService.d.ts +26 -0
  904. package/dist/service/SurveyItemService.js +3 -0
  905. package/dist/service/SurveyItemService.js.map +1 -0
  906. package/dist/service/chain/index.d.ts +1 -0
  907. package/dist/service/chain/index.js +5 -0
  908. package/dist/service/chain/index.js.map +1 -0
  909. package/dist/service/dataQuery/index.d.ts +5 -0
  910. package/dist/service/dataQuery/index.js +14 -0
  911. package/dist/service/dataQuery/index.js.map +1 -0
  912. package/dist/service/index.d.ts +19 -0
  913. package/dist/service/index.js +28 -0
  914. package/dist/service/index.js.map +1 -0
  915. package/dist/service/info/index.d.ts +9 -0
  916. package/dist/service/info/index.js +21 -0
  917. package/dist/service/info/index.js.map +1 -0
  918. package/dist/service/message/index.d.ts +13 -0
  919. package/dist/service/message/index.js +23 -0
  920. package/dist/service/message/index.js.map +1 -0
  921. package/dist/service/record/get.d.ts +3 -0
  922. package/dist/service/record/get.js +7 -0
  923. package/dist/service/record/get.js.map +1 -0
  924. package/dist/service/record/index.d.ts +2 -0
  925. package/dist/service/record/index.js +30 -0
  926. package/dist/service/record/index.js.map +1 -0
  927. package/dist/service/survey/docExport/SurveyDocRenderer.d.ts +17 -0
  928. package/dist/service/survey/docExport/SurveyDocRenderer.js +3 -0
  929. package/dist/service/survey/docExport/SurveyDocRenderer.js.map +1 -0
  930. package/dist/service/survey/docExport/SurveyDocWalker.d.ts +24 -0
  931. package/dist/service/survey/docExport/SurveyDocWalker.js +326 -0
  932. package/dist/service/survey/docExport/SurveyDocWalker.js.map +1 -0
  933. package/dist/service/survey/docExport/common.d.ts +14 -0
  934. package/dist/service/survey/docExport/common.js +98 -0
  935. package/dist/service/survey/docExport/common.js.map +1 -0
  936. package/dist/service/survey/docExport/index.d.ts +5 -0
  937. package/dist/service/survey/docExport/index.js +24 -0
  938. package/dist/service/survey/docExport/index.js.map +1 -0
  939. package/dist/service/survey/docExport/printOrientation.d.ts +4 -0
  940. package/dist/service/survey/docExport/printOrientation.js +10 -0
  941. package/dist/service/survey/docExport/printOrientation.js.map +1 -0
  942. package/dist/service/survey/docExport/surveyDocImages.d.ts +27 -0
  943. package/dist/service/survey/docExport/surveyDocImages.js +69 -0
  944. package/dist/service/survey/docExport/surveyDocImages.js.map +1 -0
  945. package/dist/service/survey/docExport/types.d.ts +43 -0
  946. package/dist/service/survey/docExport/types.js +3 -0
  947. package/dist/service/survey/docExport/types.js.map +1 -0
  948. package/dist/service/survey/docxExport/DocxSurveyDocRenderer.d.ts +13 -0
  949. package/dist/service/survey/docxExport/DocxSurveyDocRenderer.js +122 -0
  950. package/dist/service/survey/docxExport/DocxSurveyDocRenderer.js.map +1 -0
  951. package/dist/service/survey/docxExport/ImageUtils.d.ts +11 -0
  952. package/dist/service/survey/docxExport/ImageUtils.js +37 -0
  953. package/dist/service/survey/docxExport/ImageUtils.js.map +1 -0
  954. package/dist/service/survey/docxExport/SurveyDocxGenerator.d.ts +11 -0
  955. package/dist/service/survey/docxExport/SurveyDocxGenerator.js +145 -0
  956. package/dist/service/survey/docxExport/SurveyDocxGenerator.js.map +1 -0
  957. package/dist/service/survey/docxExport/docxReadOnlyConverter.d.ts +1 -0
  958. package/dist/service/survey/docxExport/docxReadOnlyConverter.js +27 -0
  959. package/dist/service/survey/docxExport/docxReadOnlyConverter.js.map +1 -0
  960. package/dist/service/survey/docxExport/index.d.ts +3 -0
  961. package/dist/service/survey/docxExport/index.js +8 -0
  962. package/dist/service/survey/docxExport/index.js.map +1 -0
  963. package/dist/service/survey/docxExport/renderers/attribute/common.d.ts +24 -0
  964. package/dist/service/survey/docxExport/renderers/attribute/common.js +76 -0
  965. package/dist/service/survey/docxExport/renderers/attribute/common.js.map +1 -0
  966. package/dist/service/survey/docxExport/renderers/attribute/index.d.ts +3 -0
  967. package/dist/service/survey/docxExport/renderers/attribute/index.js +35 -0
  968. package/dist/service/survey/docxExport/renderers/attribute/index.js.map +1 -0
  969. package/dist/service/survey/docxExport/renderers/attribute/renderBoolean.d.ts +2 -0
  970. package/dist/service/survey/docxExport/renderers/attribute/renderBoolean.js +25 -0
  971. package/dist/service/survey/docxExport/renderers/attribute/renderBoolean.js.map +1 -0
  972. package/dist/service/survey/docxExport/renderers/attribute/renderCode.d.ts +2 -0
  973. package/dist/service/survey/docxExport/renderers/attribute/renderCode.js +39 -0
  974. package/dist/service/survey/docxExport/renderers/attribute/renderCode.js.map +1 -0
  975. package/dist/service/survey/docxExport/renderers/attribute/renderCoordinate.d.ts +2 -0
  976. package/dist/service/survey/docxExport/renderers/attribute/renderCoordinate.js +28 -0
  977. package/dist/service/survey/docxExport/renderers/attribute/renderCoordinate.js.map +1 -0
  978. package/dist/service/survey/docxExport/renderers/attribute/renderDate.d.ts +2 -0
  979. package/dist/service/survey/docxExport/renderers/attribute/renderDate.js +27 -0
  980. package/dist/service/survey/docxExport/renderers/attribute/renderDate.js.map +1 -0
  981. package/dist/service/survey/docxExport/renderers/attribute/renderFile.d.ts +2 -0
  982. package/dist/service/survey/docxExport/renderers/attribute/renderFile.js +58 -0
  983. package/dist/service/survey/docxExport/renderers/attribute/renderFile.js.map +1 -0
  984. package/dist/service/survey/docxExport/renderers/attribute/renderFormHeader.d.ts +2 -0
  985. package/dist/service/survey/docxExport/renderers/attribute/renderFormHeader.js +14 -0
  986. package/dist/service/survey/docxExport/renderers/attribute/renderFormHeader.js.map +1 -0
  987. package/dist/service/survey/docxExport/renderers/attribute/renderGeo.d.ts +2 -0
  988. package/dist/service/survey/docxExport/renderers/attribute/renderGeo.js +23 -0
  989. package/dist/service/survey/docxExport/renderers/attribute/renderGeo.js.map +1 -0
  990. package/dist/service/survey/docxExport/renderers/attribute/renderImage.d.ts +3 -0
  991. package/dist/service/survey/docxExport/renderers/attribute/renderImage.js +48 -0
  992. package/dist/service/survey/docxExport/renderers/attribute/renderImage.js.map +1 -0
  993. package/dist/service/survey/docxExport/renderers/attribute/renderNumber.d.ts +2 -0
  994. package/dist/service/survey/docxExport/renderers/attribute/renderNumber.js +13 -0
  995. package/dist/service/survey/docxExport/renderers/attribute/renderNumber.js.map +1 -0
  996. package/dist/service/survey/docxExport/renderers/attribute/renderTaxon.d.ts +2 -0
  997. package/dist/service/survey/docxExport/renderers/attribute/renderTaxon.js +46 -0
  998. package/dist/service/survey/docxExport/renderers/attribute/renderTaxon.js.map +1 -0
  999. package/dist/service/survey/docxExport/renderers/attribute/renderText.d.ts +2 -0
  1000. package/dist/service/survey/docxExport/renderers/attribute/renderText.js +13 -0
  1001. package/dist/service/survey/docxExport/renderers/attribute/renderText.js.map +1 -0
  1002. package/dist/service/survey/docxExport/renderers/attribute/renderTime.d.ts +2 -0
  1003. package/dist/service/survey/docxExport/renderers/attribute/renderTime.js +25 -0
  1004. package/dist/service/survey/docxExport/renderers/attribute/renderTime.js.map +1 -0
  1005. package/dist/service/survey/docxExport/renderers/attribute/types.d.ts +4 -0
  1006. package/dist/service/survey/docxExport/renderers/attribute/types.js +3 -0
  1007. package/dist/service/survey/docxExport/renderers/attribute/types.js.map +1 -0
  1008. package/dist/service/survey/docxExport/renderers/entity/index.d.ts +1 -0
  1009. package/dist/service/survey/docxExport/renderers/entity/index.js +3 -0
  1010. package/dist/service/survey/docxExport/renderers/entity/index.js.map +1 -0
  1011. package/dist/service/survey/get.d.ts +10 -0
  1012. package/dist/service/survey/get.js +38 -0
  1013. package/dist/service/survey/get.js.map +1 -0
  1014. package/dist/service/survey/getAllIds.d.ts +2 -0
  1015. package/dist/service/survey/getAllIds.js +6 -0
  1016. package/dist/service/survey/getAllIds.js.map +1 -0
  1017. package/dist/service/survey/index.d.ts +8 -0
  1018. package/dist/service/survey/index.js +41 -0
  1019. package/dist/service/survey/index.js.map +1 -0
  1020. package/dist/service/survey/pdfExport/PdfElement.d.ts +53 -0
  1021. package/dist/service/survey/pdfExport/PdfElement.js +3 -0
  1022. package/dist/service/survey/pdfExport/PdfElement.js.map +1 -0
  1023. package/dist/service/survey/pdfExport/PdfSurveyDocRenderer.d.ts +19 -0
  1024. package/dist/service/survey/pdfExport/PdfSurveyDocRenderer.js +197 -0
  1025. package/dist/service/survey/pdfExport/PdfSurveyDocRenderer.js.map +1 -0
  1026. package/dist/service/survey/pdfExport/SurveyPdfGenerator.d.ts +9 -0
  1027. package/dist/service/survey/pdfExport/SurveyPdfGenerator.js +342 -0
  1028. package/dist/service/survey/pdfExport/SurveyPdfGenerator.js.map +1 -0
  1029. package/dist/service/survey/pdfExport/index.d.ts +4 -0
  1030. package/dist/service/survey/pdfExport/index.js +8 -0
  1031. package/dist/service/survey/pdfExport/index.js.map +1 -0
  1032. package/dist/service/user/get.d.ts +2 -0
  1033. package/dist/service/user/get.js +29 -0
  1034. package/dist/service/user/get.js.map +1 -0
  1035. package/dist/service/user/index.d.ts +2 -0
  1036. package/dist/service/user/index.js +29 -0
  1037. package/dist/service/user/index.js.map +1 -0
  1038. package/dist/service/user/updateUserPrefs.d.ts +2 -0
  1039. package/dist/service/user/updateUserPrefs.js +14 -0
  1040. package/dist/service/user/updateUserPrefs.js.map +1 -0
  1041. package/dist/service/user2FA/index.d.ts +3 -0
  1042. package/dist/service/user2FA/index.js +8 -0
  1043. package/dist/service/user2FA/index.js.map +1 -0
  1044. package/dist/service/user2FA/user2FAService.d.ts +59 -0
  1045. package/dist/service/user2FA/user2FAService.js +253 -0
  1046. package/dist/service/user2FA/user2FAService.js.map +1 -0
  1047. package/dist/service/userAuthToken/index.d.ts +3 -0
  1048. package/dist/service/userAuthToken/index.js +104 -0
  1049. package/dist/service/userAuthToken/index.js.map +1 -0
  1050. package/dist/service/userAuthToken/userAuthTokenServiceConstants.d.ts +6 -0
  1051. package/dist/service/userAuthToken/userAuthTokenServiceConstants.js +9 -0
  1052. package/dist/service/userAuthToken/userAuthTokenServiceConstants.js.map +1 -0
  1053. package/dist/service/userGroup/index.d.ts +45 -0
  1054. package/dist/service/userGroup/index.js +19 -0
  1055. package/dist/service/userGroup/index.js.map +1 -0
  1056. package/dist/service/userTempAuthToken/cleanupExpired.d.ts +2 -0
  1057. package/dist/service/userTempAuthToken/cleanupExpired.js +10 -0
  1058. package/dist/service/userTempAuthToken/cleanupExpired.js.map +1 -0
  1059. package/dist/service/userTempAuthToken/create.d.ts +6 -0
  1060. package/dist/service/userTempAuthToken/create.js +57 -0
  1061. package/dist/service/userTempAuthToken/create.js.map +1 -0
  1062. package/dist/service/userTempAuthToken/getByTokenHash.d.ts +3 -0
  1063. package/dist/service/userTempAuthToken/getByTokenHash.js +12 -0
  1064. package/dist/service/userTempAuthToken/getByTokenHash.js.map +1 -0
  1065. package/dist/service/userTempAuthToken/getByUserUuid.d.ts +6 -0
  1066. package/dist/service/userTempAuthToken/getByUserUuid.js +11 -0
  1067. package/dist/service/userTempAuthToken/getByUserUuid.js.map +1 -0
  1068. package/dist/service/userTempAuthToken/index.d.ts +13 -0
  1069. package/dist/service/userTempAuthToken/index.js +16 -0
  1070. package/dist/service/userTempAuthToken/index.js.map +1 -0
  1071. package/dist/service/userTempAuthToken/revoke.d.ts +3 -0
  1072. package/dist/service/userTempAuthToken/revoke.js +12 -0
  1073. package/dist/service/userTempAuthToken/revoke.js.map +1 -0
  1074. package/dist/service/userTempAuthToken/utils.d.ts +3 -0
  1075. package/dist/service/userTempAuthToken/utils.js +18 -0
  1076. package/dist/service/userTempAuthToken/utils.js.map +1 -0
  1077. package/dist/thread/index.d.ts +5 -0
  1078. package/dist/thread/index.js +12 -0
  1079. package/dist/thread/index.js.map +1 -0
  1080. package/dist/thread/thread.d.ts +10 -0
  1081. package/dist/thread/thread.js +34 -0
  1082. package/dist/thread/thread.js.map +1 -0
  1083. package/dist/thread/worker.d.ts +6 -0
  1084. package/dist/thread/worker.js +19 -0
  1085. package/dist/thread/worker.js.map +1 -0
  1086. package/dist/thread/workerCache.d.ts +7 -0
  1087. package/dist/thread/workerCache.js +18 -0
  1088. package/dist/thread/workerCache.js.map +1 -0
  1089. package/dist/thread/workerMessage.d.ts +9 -0
  1090. package/dist/thread/workerMessage.js +8 -0
  1091. package/dist/thread/workerMessage.js.map +1 -0
  1092. package/dist/utils/index.d.ts +2 -0
  1093. package/dist/utils/index.js +8 -0
  1094. package/dist/utils/index.js.map +1 -0
  1095. package/dist/utils/requests.d.ts +15 -0
  1096. package/dist/utils/requests.js +66 -0
  1097. package/dist/utils/requests.js.map +1 -0
  1098. package/dist/utils/responses.d.ts +5 -0
  1099. package/dist/utils/responses.js +32 -0
  1100. package/dist/utils/responses.js.map +1 -0
  1101. package/dist/webSocket/event.d.ts +16 -0
  1102. package/dist/webSocket/event.js +21 -0
  1103. package/dist/webSocket/event.js.map +1 -0
  1104. package/dist/webSocket/index.d.ts +2 -0
  1105. package/dist/webSocket/index.js +8 -0
  1106. package/dist/webSocket/index.js.map +1 -0
  1107. package/dist/webSocket/server.d.ts +19 -0
  1108. package/dist/webSocket/server.js +162 -0
  1109. package/dist/webSocket/server.js.map +1 -0
  1110. package/package.json +105 -0
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SurveyDocxGenerator = void 0;
4
+ const docx_1 = require("docx");
5
+ const surveyDocImages_1 = require("../docExport/surveyDocImages");
6
+ const printOrientation_1 = require("../docExport/printOrientation");
7
+ const SurveyDocWalker_1 = require("../docExport/SurveyDocWalker");
8
+ const DocxSurveyDocRenderer_1 = require("./DocxSurveyDocRenderer");
9
+ const docxReadOnlyConverter_1 = require("./docxReadOnlyConverter");
10
+ const PAGE_NUMBER_ROW_TWIPS = 240;
11
+ const QR_CODE_SIZE_PX = 96;
12
+ const buildDocxImageParagraph = (image, spacingAfter) => new docx_1.Paragraph({
13
+ alignment: docx_1.AlignmentType.CENTER,
14
+ ...(spacingAfter === undefined ? {} : { spacing: { after: spacingAfter } }),
15
+ children: [
16
+ new docx_1.ImageRun({
17
+ data: image.buffer,
18
+ type: image.docxType,
19
+ transformation: {
20
+ width: image.width,
21
+ height: image.height,
22
+ },
23
+ }),
24
+ ],
25
+ });
26
+ const buildQrCodeParagraph = (qrCodeImage) => {
27
+ if (!qrCodeImage?.length) {
28
+ return null;
29
+ }
30
+ return new docx_1.Paragraph({
31
+ alignment: docx_1.AlignmentType.RIGHT,
32
+ children: [
33
+ new docx_1.ImageRun({
34
+ data: qrCodeImage,
35
+ type: 'png',
36
+ transformation: {
37
+ width: QR_CODE_SIZE_PX,
38
+ height: QR_CODE_SIZE_PX,
39
+ },
40
+ }),
41
+ ],
42
+ });
43
+ };
44
+ const buildPageNumberParagraph = () => new docx_1.Paragraph({
45
+ tabStops: [{ type: docx_1.TabStopType.RIGHT, position: docx_1.TabStopPosition.MAX }],
46
+ children: [new docx_1.TextRun({ children: [new docx_1.Tab(), docx_1.PageNumber.CURRENT, ' of ', docx_1.PageNumber.TOTAL_PAGES] })],
47
+ });
48
+ const buildDocxImageHeader = (image) => new docx_1.Header({ children: [buildDocxImageParagraph(image)] });
49
+ const buildDocxImageFooter = (image) => new docx_1.Footer({ children: [buildDocxImageParagraph(image)] });
50
+ const buildDocxPageNumberFooter = () => new docx_1.Footer({ children: [buildPageNumberParagraph()] });
51
+ const buildDocxImageAndPageNumberFooter = (image) => new docx_1.Footer({ children: [buildDocxImageParagraph(image), buildPageNumberParagraph()] });
52
+ const calcFooterMarginTwips = (footerImage, pageNumbering) => {
53
+ const imageHeight = footerImage ? (0, surveyDocImages_1.imageHeightToTwips)(footerImage.height) + surveyDocImages_1.DOCX_MARGIN_GAP_TWIPS : 0;
54
+ return imageHeight + (pageNumbering ? PAGE_NUMBER_ROW_TWIPS : 0);
55
+ };
56
+ const toDocxOrientation = (orientation) => orientation === 'landscape' ? docx_1.PageOrientation.LANDSCAPE : docx_1.PageOrientation.PORTRAIT;
57
+ const buildHeadersConfig = (headerImage, allPagesImageInHeader) => {
58
+ if (!allPagesImageInHeader || !headerImage)
59
+ return {};
60
+ return { default: buildDocxImageHeader(headerImage) };
61
+ };
62
+ const buildFootersConfig = (footerImage, pageNumbering, isFirstSection) => {
63
+ if (pageNumbering) {
64
+ if (footerImage) {
65
+ return {
66
+ ...(isFirstSection ? { first: buildDocxImageFooter(footerImage) } : {}),
67
+ default: buildDocxImageAndPageNumberFooter(footerImage),
68
+ };
69
+ }
70
+ return { default: buildDocxPageNumberFooter() };
71
+ }
72
+ if (footerImage) {
73
+ return { default: buildDocxImageFooter(footerImage) };
74
+ }
75
+ return {};
76
+ };
77
+ const generateSurveyDocx = async (options) => {
78
+ const { readOnly } = options;
79
+ const pageNumbering = (0, surveyDocImages_1.isPageNumberingEnabled)(options);
80
+ const renderer = new DocxSurveyDocRenderer_1.DocxSurveyDocRenderer();
81
+ const { sections, surveyName } = await (0, SurveyDocWalker_1.walkSurvey)(options, renderer);
82
+ const documentDefault = options.orientation ?? printOrientation_1.DEFAULT_PRINT_ORIENTATION;
83
+ const docSections = sections.length > 0 ? sections : [{ orientation: documentDefault, elements: [] }];
84
+ const { headerImage, footerImage } = await (0, surveyDocImages_1.fetchSurveyDocImages)(options);
85
+ const headerOnFirstPageOnly = (0, surveyDocImages_1.isHeaderOnFirstPageOnly)(options);
86
+ const allPagesImageInHeader = Boolean(headerImage && !headerOnFirstPageOnly);
87
+ const headerMarginTwips = allPagesImageInHeader ? (0, surveyDocImages_1.imageHeightToTwips)(headerImage.height) + surveyDocImages_1.DOCX_MARGIN_GAP_TWIPS : 0;
88
+ const footerMarginTwips = calcFooterMarginTwips(footerImage, pageNumbering);
89
+ const headersConfig = buildHeadersConfig(headerImage, allPagesImageInHeader);
90
+ const doc = new docx_1.Document({
91
+ styles: {
92
+ paragraphStyles: [
93
+ {
94
+ id: 'Normal',
95
+ name: 'Normal',
96
+ run: { font: 'Calibri', size: 22 },
97
+ },
98
+ ],
99
+ },
100
+ sections: docSections.map((section, index) => {
101
+ const isFirstSection = index === 0;
102
+ const footersConfig = buildFootersConfig(footerImage, pageNumbering, isFirstSection);
103
+ const topMargin = surveyDocImages_1.DOCX_BASE_MARGIN_TWIPS + (isFirstSection || !headerOnFirstPageOnly ? headerMarginTwips : 0);
104
+ const firstSectionDecorations = [];
105
+ if (isFirstSection && headerImage && headerOnFirstPageOnly) {
106
+ firstSectionDecorations.push(buildDocxImageParagraph(headerImage, surveyDocImages_1.DOCX_MARGIN_GAP_TWIPS));
107
+ }
108
+ if (isFirstSection && options.qrCodeImage) {
109
+ const qrParagraph = buildQrCodeParagraph(options.qrCodeImage);
110
+ if (qrParagraph) {
111
+ firstSectionDecorations.push(qrParagraph);
112
+ }
113
+ }
114
+ const sectionChildren = [...firstSectionDecorations, ...section.elements];
115
+ return {
116
+ properties: {
117
+ page: {
118
+ size: {
119
+ orientation: toDocxOrientation(section.orientation),
120
+ },
121
+ margin: {
122
+ top: topMargin,
123
+ bottom: surveyDocImages_1.DOCX_BASE_MARGIN_TWIPS + footerMarginTwips,
124
+ left: 1080,
125
+ right: 1080,
126
+ },
127
+ },
128
+ ...(pageNumbering && isFirstSection ? { titlePage: true } : {}),
129
+ },
130
+ ...(Object.keys(headersConfig).length > 0 ? { headers: headersConfig } : {}),
131
+ ...(Object.keys(footersConfig).length > 0 ? { footers: footersConfig } : {}),
132
+ children: sectionChildren,
133
+ };
134
+ }),
135
+ });
136
+ let buffer = await docx_1.Packer.toBuffer(doc);
137
+ if (readOnly) {
138
+ buffer = await (0, docxReadOnlyConverter_1.convertDocxToReadOnly)(buffer);
139
+ }
140
+ return { buffer, surveyName };
141
+ };
142
+ exports.SurveyDocxGenerator = {
143
+ generateSurveyDocx,
144
+ };
145
+ //# sourceMappingURL=SurveyDocxGenerator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SurveyDocxGenerator.js","sourceRoot":"","sources":["../../../../src/service/survey/docxExport/SurveyDocxGenerator.ts"],"names":[],"mappings":";;;AAAA,+BAca;AAEb,kEAQqC;AACrC,oEAAyE;AAEzE,kEAAyD;AACzD,mEAA+D;AAE/D,mEAA+D;AAc/D,MAAM,qBAAqB,GAAG,GAAG,CAAA;AACjC,MAAM,eAAe,GAAG,EAAE,CAAA;AAE1B,MAAM,uBAAuB,GAAG,CAAC,KAAyB,EAAE,YAAqB,EAAa,EAAE,CAC9F,IAAI,gBAAS,CAAC;IACZ,SAAS,EAAE,oBAAa,CAAC,MAAM;IAC/B,GAAG,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,CAAC;IAC3E,QAAQ,EAAE;QACR,IAAI,eAAQ,CAAC;YACX,IAAI,EAAE,KAAK,CAAC,MAAM;YAClB,IAAI,EAAE,KAAK,CAAC,QAAQ;YACpB,cAAc,EAAE;gBACd,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB;SACF,CAAC;KACH;CACF,CAAC,CAAA;AAEJ,MAAM,oBAAoB,GAAG,CAAC,WAAmB,EAAoB,EAAE;IACrE,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;QACzB,OAAO,IAAI,CAAA;IACb,CAAC;IACD,OAAO,IAAI,gBAAS,CAAC;QACnB,SAAS,EAAE,oBAAa,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,CAAC,aAAa,IAAI,cAAc,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBAChE;gBACD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC5E,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC5E,QAAQ,EAAE,eAAe;aAC1B,CAAA;QACH,CAAC,CAAC;KACH,CAAC,CAAA;IAEF,IAAI,MAAM,GAAG,MAAM,aAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;IACvC,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,GAAG,MAAM,IAAA,6CAAqB,EAAC,MAAM,CAAC,CAAA;IAC9C,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAA;AAC/B,CAAC,CAAA;AAEY,QAAA,mBAAmB,GAAG;IACjC,kBAAkB;CACnB,CAAA"}
@@ -0,0 +1 @@
1
+ export declare const convertDocxToReadOnly: (docBuffer: Buffer) => Promise<Buffer>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.convertDocxToReadOnly = void 0;
7
+ const jszip_1 = __importDefault(require("jszip"));
8
+ const settingsFilePath = 'word/settings.xml';
9
+ const settingsBlockCloseTag = '</w:settings>';
10
+ const documentProtectionTag = '<w:documentProtection w:edit="readOnly" w:enforcement="1"/>';
11
+ const convertDocxToReadOnly = async (docBuffer) => {
12
+ const zip = await jszip_1.default.loadAsync(docBuffer);
13
+ let settingsXml = await zip.file(settingsFilePath)?.async('string');
14
+ if (!settingsXml) {
15
+ throw new Error('settings.xml not found in the DOCX file');
16
+ }
17
+ if (settingsXml.includes(settingsBlockCloseTag)) {
18
+ settingsXml = settingsXml.replace(settingsBlockCloseTag, `${documentProtectionTag}${settingsBlockCloseTag}`);
19
+ }
20
+ else {
21
+ settingsXml = settingsXml.replace('>', `>${documentProtectionTag}`);
22
+ }
23
+ zip.file(settingsFilePath, settingsXml);
24
+ return zip.generateAsync({ type: 'nodebuffer' });
25
+ };
26
+ exports.convertDocxToReadOnly = convertDocxToReadOnly;
27
+ //# sourceMappingURL=docxReadOnlyConverter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docxReadOnlyConverter.js","sourceRoot":"","sources":["../../../../src/service/survey/docxExport/docxReadOnlyConverter.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,MAAM,gBAAgB,GAAG,mBAAmB,CAAA;AAC5C,MAAM,qBAAqB,GAAG,eAAe,CAAA;AAC7C,MAAM,qBAAqB,GAAG,6DAA6D,CAAA;AAEpF,MAAM,qBAAqB,GAAG,KAAK,EAAE,SAAiB,EAAmB,EAAE;IAChF,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;IAE5C,IAAI,WAAW,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;IAEnE,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAA;IAC5D,CAAC;IAED,IAAI,WAAW,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,CAAC;QAChD,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,qBAAqB,EAAE,GAAG,qBAAqB,GAAG,qBAAqB,EAAE,CAAC,CAAA;IAC9G,CAAC;SAAM,CAAC;QAEN,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,qBAAqB,EAAE,CAAC,CAAA;IACrE,CAAC;IAED,GAAG,CAAC,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAA;IAEvC,OAAO,GAAG,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAA;AAClD,CAAC,CAAA;AAnBY,QAAA,qBAAqB,yBAmBjC"}
@@ -0,0 +1,3 @@
1
+ export { SurveyDocxGenerator } from './SurveyDocxGenerator';
2
+ export type { SurveyDocxOptions, SurveyDocxResult } from './SurveyDocxGenerator';
3
+ export { DocxSurveyDocRenderer } from './DocxSurveyDocRenderer';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DocxSurveyDocRenderer = exports.SurveyDocxGenerator = void 0;
4
+ var SurveyDocxGenerator_1 = require("./SurveyDocxGenerator");
5
+ Object.defineProperty(exports, "SurveyDocxGenerator", { enumerable: true, get: function () { return SurveyDocxGenerator_1.SurveyDocxGenerator; } });
6
+ var DocxSurveyDocRenderer_1 = require("./DocxSurveyDocRenderer");
7
+ Object.defineProperty(exports, "DocxSurveyDocRenderer", { enumerable: true, get: function () { return DocxSurveyDocRenderer_1.DocxSurveyDocRenderer; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/service/survey/docxExport/index.ts"],"names":[],"mappings":";;;AAAA,6DAA2D;AAAlD,0HAAA,mBAAmB,OAAA;AAE5B,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA"}
@@ -0,0 +1,24 @@
1
+ import { CheckBox, HeadingLevel, Paragraph, TextRun, type IParagraphOptions } from 'docx';
2
+ import type { NodeDef, NodeDefCoordinate, NodeDefEntity, NodeDefType } from '@openforis/arena-core';
3
+ import type { RenderContext } from './types';
4
+ export { EMPTY_FIELD, EMPTY_SHORT, label, getCategoryItemLabel, getCommonLabel, getBooleanValueLabel, formatNodeValue, getCoordinateLabelByField, getValueFields, getIsTableLayout, isNodeBlank, isNodeFilled, } from '../../../docExport/common';
5
+ export declare const SPACING_FIELD_ROW: {
6
+ before: number;
7
+ after: number;
8
+ };
9
+ export declare const SPACING_COMPOSITE_LABEL_ROW: {
10
+ before: number;
11
+ after: number;
12
+ };
13
+ export declare const headingForDepth: (depth: number) => (typeof HeadingLevel)[keyof typeof HeadingLevel];
14
+ export declare const getFormHeaderLevelByDepth: (depth: number) => (typeof HeadingLevel)[keyof typeof HeadingLevel];
15
+ export declare const formItemLabelRun: (labelText: string, trailingSpace?: boolean) => TextRun;
16
+ export declare const nodeDefFormItemLabelRun: (nodeDef: NodeDef<NodeDefType>, context: RenderContext) => TextRun;
17
+ export declare const inputLine: (text: string) => TextRun;
18
+ export declare const fieldRow: (fieldLabel: string, fieldPlaceholder?: string) => Paragraph;
19
+ export declare const valueRow: (fieldLabel: string, value: string) => Paragraph;
20
+ export declare const checkboxRun: (text: string, checked?: boolean) => [CheckBox, TextRun];
21
+ export declare const getTaxonFieldCommonProps: () => IParagraphOptions;
22
+ export declare const getHeadingText: (nodeDef: NodeDef<NodeDefType>, context: RenderContext) => string;
23
+ export declare const isEntityInDifferentPage: (cycle: string, currentPageUuid: string | undefined) => (def: NodeDefEntity) => boolean;
24
+ export declare const getCoordinateValueFieldLabel: (nodeDef: NodeDefCoordinate, context: RenderContext) => string;
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCoordinateValueFieldLabel = exports.isEntityInDifferentPage = exports.getHeadingText = exports.getTaxonFieldCommonProps = exports.checkboxRun = exports.valueRow = exports.fieldRow = exports.inputLine = exports.nodeDefFormItemLabelRun = exports.formItemLabelRun = exports.getFormHeaderLevelByDepth = exports.headingForDepth = exports.SPACING_COMPOSITE_LABEL_ROW = exports.SPACING_FIELD_ROW = exports.isNodeFilled = exports.isNodeBlank = exports.getIsTableLayout = exports.getValueFields = exports.getCoordinateLabelByField = exports.formatNodeValue = exports.getBooleanValueLabel = exports.getCommonLabel = exports.getCategoryItemLabel = exports.label = exports.EMPTY_SHORT = exports.EMPTY_FIELD = void 0;
4
+ const docx_1 = require("docx");
5
+ const arena_core_1 = require("@openforis/arena-core");
6
+ const common_1 = require("../../../docExport/common");
7
+ var common_2 = require("../../../docExport/common");
8
+ Object.defineProperty(exports, "EMPTY_FIELD", { enumerable: true, get: function () { return common_2.EMPTY_FIELD; } });
9
+ Object.defineProperty(exports, "EMPTY_SHORT", { enumerable: true, get: function () { return common_2.EMPTY_SHORT; } });
10
+ Object.defineProperty(exports, "label", { enumerable: true, get: function () { return common_2.label; } });
11
+ Object.defineProperty(exports, "getCategoryItemLabel", { enumerable: true, get: function () { return common_2.getCategoryItemLabel; } });
12
+ Object.defineProperty(exports, "getCommonLabel", { enumerable: true, get: function () { return common_2.getCommonLabel; } });
13
+ Object.defineProperty(exports, "getBooleanValueLabel", { enumerable: true, get: function () { return common_2.getBooleanValueLabel; } });
14
+ Object.defineProperty(exports, "formatNodeValue", { enumerable: true, get: function () { return common_2.formatNodeValue; } });
15
+ Object.defineProperty(exports, "getCoordinateLabelByField", { enumerable: true, get: function () { return common_2.getCoordinateLabelByField; } });
16
+ Object.defineProperty(exports, "getValueFields", { enumerable: true, get: function () { return common_2.getValueFields; } });
17
+ Object.defineProperty(exports, "getIsTableLayout", { enumerable: true, get: function () { return common_2.getIsTableLayout; } });
18
+ Object.defineProperty(exports, "isNodeBlank", { enumerable: true, get: function () { return common_2.isNodeBlank; } });
19
+ Object.defineProperty(exports, "isNodeFilled", { enumerable: true, get: function () { return common_2.isNodeFilled; } });
20
+ exports.SPACING_FIELD_ROW = { before: 80, after: 80 };
21
+ exports.SPACING_COMPOSITE_LABEL_ROW = { before: 80, after: 40 };
22
+ const HEADING_LEVELS = [
23
+ docx_1.HeadingLevel.HEADING_1,
24
+ docx_1.HeadingLevel.HEADING_2,
25
+ docx_1.HeadingLevel.HEADING_3,
26
+ docx_1.HeadingLevel.HEADING_4,
27
+ docx_1.HeadingLevel.HEADING_5,
28
+ docx_1.HeadingLevel.HEADING_6,
29
+ ];
30
+ const headingForDepth = (depth) => HEADING_LEVELS[Math.min(depth, HEADING_LEVELS.length - 1)];
31
+ exports.headingForDepth = headingForDepth;
32
+ const getFormHeaderLevelByDepth = (depth) => {
33
+ const headingMap = {
34
+ 0: docx_1.HeadingLevel.HEADING_3,
35
+ 1: docx_1.HeadingLevel.HEADING_4,
36
+ 2: docx_1.HeadingLevel.HEADING_5,
37
+ };
38
+ return headingMap[Math.min(depth, 2)] ?? docx_1.HeadingLevel.HEADING_5;
39
+ };
40
+ exports.getFormHeaderLevelByDepth = getFormHeaderLevelByDepth;
41
+ const formItemLabelRun = (labelText, trailingSpace = true) => new docx_1.TextRun({ text: `${labelText}:${trailingSpace ? ' ' : ''}`, bold: true });
42
+ exports.formItemLabelRun = formItemLabelRun;
43
+ const nodeDefFormItemLabelRun = (nodeDef, context) => (0, exports.formItemLabelRun)(arena_core_1.NodeDefs.getLabelOrName(nodeDef, context.lang));
44
+ exports.nodeDefFormItemLabelRun = nodeDefFormItemLabelRun;
45
+ const inputLine = (text) => new docx_1.TextRun({ text, underline: {} });
46
+ exports.inputLine = inputLine;
47
+ const fieldRow = (fieldLabel, fieldPlaceholder = common_1.EMPTY_FIELD) => new docx_1.Paragraph({
48
+ spacing: exports.SPACING_FIELD_ROW,
49
+ keepLines: true,
50
+ children: [(0, exports.formItemLabelRun)(fieldLabel), (0, exports.inputLine)(fieldPlaceholder)],
51
+ });
52
+ exports.fieldRow = fieldRow;
53
+ const valueRow = (fieldLabel, value) => new docx_1.Paragraph({
54
+ spacing: exports.SPACING_FIELD_ROW,
55
+ keepLines: true,
56
+ children: [(0, exports.formItemLabelRun)(fieldLabel), new docx_1.TextRun({ text: value })],
57
+ });
58
+ exports.valueRow = valueRow;
59
+ const checkboxRun = (text, checked = false) => [
60
+ new docx_1.CheckBox({ checked }),
61
+ new docx_1.TextRun({ text: ` ${text} ` }),
62
+ ];
63
+ exports.checkboxRun = checkboxRun;
64
+ const getTaxonFieldCommonProps = () => ({
65
+ spacing: { before: 0, after: 0 },
66
+ indent: { left: 360 },
67
+ keepLines: true,
68
+ });
69
+ exports.getTaxonFieldCommonProps = getTaxonFieldCommonProps;
70
+ const getHeadingText = (nodeDef, context) => arena_core_1.NodeDefs.getLabelOrName(nodeDef, context.lang);
71
+ exports.getHeadingText = getHeadingText;
72
+ const isEntityInDifferentPage = (cycle, currentPageUuid) => (def) => arena_core_1.NodeDefs.getPageUuid(cycle)(def) !== currentPageUuid;
73
+ exports.isEntityInDifferentPage = isEntityInDifferentPage;
74
+ const getCoordinateValueFieldLabel = (nodeDef, context) => arena_core_1.NodeDefs.getLabelOrName(nodeDef, context.lang);
75
+ exports.getCoordinateValueFieldLabel = getCoordinateValueFieldLabel;
76
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../src/service/survey/docxExport/renderers/attribute/common.ts"],"names":[],"mappings":";;;AAAA,+BAAyF;AAGzF,sDAAgD;AAEhD,sDAAuD;AAIvD,oDAakC;AAZhC,qGAAA,WAAW,OAAA;AACX,qGAAA,WAAW,OAAA;AACX,+FAAA,KAAK,OAAA;AACL,8GAAA,oBAAoB,OAAA;AACpB,wGAAA,cAAc,OAAA;AACd,8GAAA,oBAAoB,OAAA;AACpB,yGAAA,eAAe,OAAA;AACf,mHAAA,yBAAyB,OAAA;AACzB,wGAAA,cAAc,OAAA;AACd,0GAAA,gBAAgB,OAAA;AAChB,qGAAA,WAAW,OAAA;AACX,sGAAA,YAAY,OAAA;AAKD,QAAA,iBAAiB,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;AAC7C,QAAA,2BAA2B,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,E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AAc,GAAG,CAAC,OAA6B,EAAE,OAAsB,EAAU,EAAE,CAC9F,qBAAQ,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;AADnC,QAAA,cAAc,kBACqB;AAEzC,MAAM,uBAAuB,GAAG,CAAC,KAAa,EAAE,eAAmC,EAAE,EAAE,CAAC,CAAC,GAAkB,EAAE,EAAE,CACpH,qBAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,KAAK,eAAe,CAAA;AADzC,QAAA,uBAAuB,2BACkB;AAE/C,MAAM,4BAA4B,GAAG,CAAC,OAA0B,EAAE,OAAsB,EAAU,EAAE,CACzG,qBAAQ,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;AADnC,QAAA,4BAA4B,gCACO"}
@@ -0,0 +1,3 @@
1
+ import type { AttributeRendererArgs } from './types';
2
+ export declare const renderAttributeByType: (args: AttributeRendererArgs) => Promise<import("./types").DocChild[]>;
3
+ export type { RenderContext, DocChild, RenderLimits } from './types';
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderAttributeByType = void 0;
4
+ const arena_core_1 = require("@openforis/arena-core");
5
+ const renderBoolean_1 = require("./renderBoolean");
6
+ const renderCode_1 = require("./renderCode");
7
+ const renderCoordinate_1 = require("./renderCoordinate");
8
+ const renderDate_1 = require("./renderDate");
9
+ const renderFile_1 = require("./renderFile");
10
+ const renderFormHeader_1 = require("./renderFormHeader");
11
+ const renderGeo_1 = require("./renderGeo");
12
+ const renderNumber_1 = require("./renderNumber");
13
+ const renderTaxon_1 = require("./renderTaxon");
14
+ const renderText_1 = require("./renderText");
15
+ const renderTime_1 = require("./renderTime");
16
+ const rendererByNodeDefType = {
17
+ [arena_core_1.NodeDefType.boolean]: renderBoolean_1.renderBoolean,
18
+ [arena_core_1.NodeDefType.code]: renderCode_1.renderCode,
19
+ [arena_core_1.NodeDefType.coordinate]: renderCoordinate_1.renderCoordinate,
20
+ [arena_core_1.NodeDefType.date]: renderDate_1.renderDate,
21
+ [arena_core_1.NodeDefType.time]: renderTime_1.renderTime,
22
+ [arena_core_1.NodeDefType.taxon]: renderTaxon_1.renderTaxon,
23
+ [arena_core_1.NodeDefType.file]: renderFile_1.renderFile,
24
+ [arena_core_1.NodeDefType.geo]: renderGeo_1.renderGeo,
25
+ [arena_core_1.NodeDefType.formHeader]: renderFormHeader_1.renderFormHeader,
26
+ [arena_core_1.NodeDefType.integer]: renderNumber_1.renderNumber,
27
+ [arena_core_1.NodeDefType.decimal]: renderNumber_1.renderNumber,
28
+ [arena_core_1.NodeDefType.text]: renderText_1.renderText,
29
+ };
30
+ const renderAttributeByType = async (args) => {
31
+ const renderer = rendererByNodeDefType[args.nodeDef.type] ?? renderText_1.renderText;
32
+ return renderer(args);
33
+ };
34
+ exports.renderAttributeByType = renderAttributeByType;
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/service/survey/docxExport/renderers/attribute/index.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AAEnD,mDAA+C;AAC/C,6CAAyC;AACzC,yDAAqD;AACrD,6CAAyC;AACzC,6CAAyC;AACzC,yDAAqD;AACrD,2CAAuC;AACvC,iDAA6C;AAC7C,+CAA2C;AAC3C,6CAAyC;AACzC,6CAAyC;AAGzC,MAAM,qBAAqB,GAAoD;IAC7E,CAAC,wBAAW,CAAC,OAAO,CAAC,EAAE,6BAAa;IACpC,CAAC,wBAAW,CAAC,IAAI,CAAC,EAAE,uBAAU;IAC9B,CAAC,wBAAW,CAAC,UAAU,CAAC,EAAE,mCAAgB;IAC1C,CAAC,wBAAW,CAAC,IAAI,CAAC,EAAE,uBAAU;IAC9B,CAAC,wBAAW,CAAC,IAAI,CAAC,EAAE,uBAAU;IAC9B,CAAC,wBAAW,CAAC,KAAK,CAAC,EAAE,yBAAW;IAChC,CAAC,wBAAW,CAAC,IAAI,CAAC,EAAE,uBAAU;IAC9B,CAAC,wBAAW,CAAC,GAAG,CAAC,EAAE,qBAAS;IAC5B,CAAC,wBAAW,CAAC,UAAU,CAAC,EAAE,mCAAgB;IAC1C,CAAC,wBAAW,CAAC,OAAO,CAAC,EAAE,2BAAY;IACnC,CAAC,wBAAW,CAAC,OAAO,CAAC,EAAE,2BAAY;IACnC,CAAC,wBAAW,CAAC,IAAI,CAAC,EAAE,uBAAU;CAC/B,CAAA;AAEM,MAAM,qBAAqB,GAAG,KAAK,EAAE,IAA2B,EAAE,EAAE;IACzE,MAAM,QAAQ,GAAG,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,uBAAU,CAAA;IACvE,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAA;AACvB,CAAC,CAAA;AAHY,QAAA,qBAAqB,yBAGjC"}
@@ -0,0 +1,2 @@
1
+ import type { AttributeRenderer } from './types';
2
+ export declare const renderBoolean: AttributeRenderer;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderBoolean = void 0;
4
+ const docx_1 = require("docx");
5
+ const common_1 = require("./common");
6
+ const renderBoolean = async ({ nodeDef, context, node }) => {
7
+ const boolDef = nodeDef;
8
+ const hasValue = (0, common_1.isNodeFilled)(node);
9
+ const isTrue = hasValue && (node.value === true || node.value === 'true');
10
+ const yesLabel = (0, common_1.getBooleanValueLabel)(context, boolDef, true);
11
+ const noLabel = (0, common_1.getBooleanValueLabel)(context, boolDef, false);
12
+ return [
13
+ new docx_1.Paragraph({
14
+ spacing: common_1.SPACING_FIELD_ROW,
15
+ keepLines: true,
16
+ children: [
17
+ (0, common_1.nodeDefFormItemLabelRun)(nodeDef, context),
18
+ ...(0, common_1.checkboxRun)(yesLabel, hasValue ? isTrue : false),
19
+ ...(0, common_1.checkboxRun)(noLabel, hasValue ? !isTrue : false),
20
+ ],
21
+ }),
22
+ ];
23
+ };
24
+ exports.renderBoolean = renderBoolean;
25
+ //# sourceMappingURL=renderBoolean.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderBoolean.js","sourceRoot":"","sources":["../../../../../../src/service/survey/docxExport/renderers/attribute/renderBoolean.ts"],"names":[],"mappings":";;;AAAA,+BAAgC;AAIhC,qCAAsH;AAG/G,MAAM,aAAa,GAAsB,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IACnF,MAAM,OAAO,GAAG,OAAyB,CAAA;IACzC,MAAM,QAAQ,GAAG,IAAA,qBAAY,EAAC,IAAI,CAAC,CAAA;IACnC,MAAM,MAAM,GAAG,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC,CAAA;IACzE,MAAM,QAAQ,GAAG,IAAA,6BAAoB,EAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;IAC7D,MAAM,OAAO,GAAG,IAAA,6BAAoB,EAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;IAE7D,OAAO;QACL,IAAI,gBAAS,CAAC;YACZ,OAAO,EAAE,0BAAiB;YAC1B,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE;gBACR,IAAA,gCAAuB,EAAC,OAAO,EAAE,OAAO,CAAC;gBACzC,GAAG,IAAA,oBAAW,EAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;gBACnD,GAAG,IAAA,oBAAW,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;aACpD;SACF,CAAC;KACH,CAAA;AACH,CAAC,CAAA;AAlBY,QAAA,aAAa,iBAkBzB"}
@@ -0,0 +1,2 @@
1
+ import type { AttributeRenderer } from './types';
2
+ export declare const renderCode: AttributeRenderer;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderCode = void 0;
4
+ const docx_1 = require("docx");
5
+ const arena_core_1 = require("@openforis/arena-core");
6
+ const common_1 = require("./common");
7
+ const renderCode = async ({ nodeDef, context, node }) => {
8
+ const codeDef = nodeDef;
9
+ const { survey, lang } = context;
10
+ const items = survey.refData ? arena_core_1.Surveys.getCategoryItemsByNodeDef({ survey, nodeDef: codeDef }) : [];
11
+ const lbl = (0, common_1.label)(codeDef, lang);
12
+ const isCheckboxLayout = codeDef.props?.layout && Object.values(codeDef.props.layout).some((l) => l?.renderType === 'checkbox');
13
+ const selectedItemUuid = node ? arena_core_1.NodeValues.getItemUuid(node) : undefined;
14
+ const showAsCheckboxes = (isCheckboxLayout || items.length <= 8) && items.length > 0;
15
+ if (showAsCheckboxes) {
16
+ const optionRuns = items.flatMap((item) => {
17
+ const checked = selectedItemUuid !== undefined && item.uuid === selectedItemUuid;
18
+ return (0, common_1.checkboxRun)((0, common_1.getCategoryItemLabel)(item, lang), checked);
19
+ });
20
+ return [
21
+ new docx_1.Paragraph({
22
+ spacing: common_1.SPACING_FIELD_ROW,
23
+ keepLines: true,
24
+ children: [(0, common_1.nodeDefFormItemLabelRun)(codeDef, context), ...optionRuns],
25
+ }),
26
+ ];
27
+ }
28
+ if (selectedItemUuid !== undefined) {
29
+ const selectedItem = node?.refData?.categoryItem;
30
+ const displayValue = selectedItem
31
+ ? (0, common_1.getCategoryItemLabel)(selectedItem, lang)
32
+ : (node?.value?.code ?? selectedItemUuid);
33
+ return [(0, common_1.valueRow)(lbl, String(displayValue))];
34
+ }
35
+ const sizeLabel = items.length > 0 ? ` (${items.length} options)` : '';
36
+ return [(0, common_1.fieldRow)(lbl, `[select${sizeLabel}]`)];
37
+ };
38
+ exports.renderCode = renderCode;
39
+ //# sourceMappingURL=renderCode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderCode.js","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AAA,6BAAoB,EAAC,IAAI,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,CAAA;QAC/D,CAAC,CAAC,CAAA;QACF,OAAO;YACL,IAAI,gBAAS,CAAC;gBACZ,OAAO,EAAE,0BAAiB;gBAC1B,SAAS,EAAE,IAAI;gBACf,QAAQ,EAAE,CAAC,IAAA,gCAAuB,EAAC,OAAO,EAAE,OAAO,CAAC,EAAE,GAAG,UAAU,CAAC;aACrE,CAAC;SACH,CAAA;IACH,CAAC;IAED,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACnC,MAAM,YAAY,GAAG,IAAI,EAAE,OAAO,EAAE,YAAY,CAAA;QAChD,MAAM,YAAY,GAAG,YAAY;YAC/B,CAAC,CAAC,IAAA,6BAAoB,EAAC,YAAY,EAAE,IAAI,CAAC;YAC1C,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,IAAI,gBAAgB,CAAC,CAAA;QAC3C,OAAO,CAAC,IAAA,iBAAQ,EAAC,GAAG,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;IAC9C,CAAC;IAED,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,MAAM,WAAW,CAAC,CAAC,CAAC,EAAE,CAAA;IACtE,OAAO,CAAC,IAAA,iBAAQ,EAAC,GAAG,EAAE,UAAU,SAAS,GAAG,CAAC,CAAC,CAAA;AAChD,CAAC,CAAA;AAnCY,QAAA,UAAU,cAmCtB"}
@@ -0,0 +1,2 @@
1
+ import type { AttributeRenderer } from './types';
2
+ export declare const renderCoordinate: AttributeRenderer;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderCoordinate = void 0;
4
+ const docx_1 = require("docx");
5
+ const common_1 = require("./common");
6
+ const renderCoordinate = async ({ nodeDef, context, node }) => {
7
+ const coordinateDef = nodeDef;
8
+ const lbl = (0, common_1.label)(coordinateDef, context.lang);
9
+ const hasValue = (0, common_1.isNodeFilled)(node);
10
+ const val = hasValue ? (node.value ?? {}) : null;
11
+ const valueFields = (0, common_1.getValueFields)(coordinateDef);
12
+ const labelByField = (0, common_1.getCoordinateLabelByField)(coordinateDef, context);
13
+ return [
14
+ new docx_1.Paragraph({ spacing: common_1.SPACING_COMPOSITE_LABEL_ROW, keepNext: true, children: [(0, common_1.formItemLabelRun)(lbl, false)] }),
15
+ ...valueFields.map((valueField) => {
16
+ const fieldLabel = labelByField[valueField];
17
+ const fieldValue = String(val?.[valueField] ?? common_1.EMPTY_SHORT);
18
+ return new docx_1.Paragraph({
19
+ spacing: { before: 0, after: 0 },
20
+ indent: { left: 360 },
21
+ keepLines: true,
22
+ children: [(0, common_1.formItemLabelRun)(fieldLabel), hasValue ? new docx_1.TextRun({ text: fieldValue }) : (0, common_1.inputLine)(fieldValue)],
23
+ });
24
+ }),
25
+ ];
26
+ };
27
+ exports.renderCoordinate = renderCoordinate;
28
+ //# sourceMappingURL=renderCoordinate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderCoordinate.js","sourceRoot":"","sources":["../../../../../../src/service/survey/docxExport/renderers/attribute/renderCoordinate.ts"],"names":[],"mappings":";;;AAAA,+BAAyC;AAIzC,qCASiB;AAGV,MAAM,gBAAgB,GAAsB,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IACtF,MAAM,aAAa,GAAG,OAA4B,CAAA;IAClD,MAAM,GAAG,GAAG,IAAA,cAAK,EAAC,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9C,MAAM,QAAQ,GAAG,IAAA,qBAAY,EAAC,IAAI,CAAC,CAAA;IACnC,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IAChD,MAAM,WAAW,GAAG,IAAA,uBAAc,EAAC,aAAa,CAAC,CAAA;IACjD,MAAM,YAAY,GAAG,IAAA,kCAAyB,EAAC,aAAa,EAAE,OAAO,CAAC,CAAA;IAEtE,OAAO;QACL,IAAI,gBAAS,CAAC,EAAE,OAAO,EAAE,oCAA2B,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,IAAA,yBAAgB,EAAC,GAAG,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC;QACjH,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE;YAChC,MAAM,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,CAAA;YAC3C,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,oBAAW,CAAC,CAAA;YAC3D,OAAO,IAAI,gBAAS,CAAC;gBACnB,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;gBAChC,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE;gBACrB,SAAS,EAAE,IAAI;gBACf,QAAQ,EAAE,CAAC,IAAA,yBAAgB,EAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,cAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,IAAA,kBAAS,EAAC,UAAU,CAAC,CAAC;aAC/G,CAAC,CAAA;QACJ,CAAC,CAAC;KACH,CAAA;AACH,CAAC,CAAA;AArBY,QAAA,gBAAgB,oBAqB5B"}
@@ -0,0 +1,2 @@
1
+ import type { AttributeRenderer } from './types';
2
+ export declare const renderDate: AttributeRenderer;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderDate = void 0;
4
+ const docx_1 = require("docx");
5
+ const common_1 = require("./common");
6
+ const renderDate = async ({ nodeDef, context, node }) => {
7
+ const lbl = (0, common_1.label)(nodeDef, context.lang);
8
+ if ((0, common_1.isNodeFilled)(node)) {
9
+ return [(0, common_1.valueRow)(lbl, (0, common_1.formatNodeValue)(nodeDef, context, node))];
10
+ }
11
+ return [
12
+ new docx_1.Paragraph({
13
+ spacing: common_1.SPACING_FIELD_ROW,
14
+ keepLines: true,
15
+ children: [
16
+ (0, common_1.nodeDefFormItemLabelRun)(nodeDef, context),
17
+ new docx_1.TextRun({ text: 'DD', underline: {} }),
18
+ new docx_1.TextRun({ text: ' / ' }),
19
+ new docx_1.TextRun({ text: 'MM', underline: {} }),
20
+ new docx_1.TextRun({ text: ' / ' }),
21
+ new docx_1.TextRun({ text: 'YYYY', underline: {} }),
22
+ ],
23
+ }),
24
+ ];
25
+ };
26
+ exports.renderDate = renderDate;
27
+ //# sourceMappingURL=renderDate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderDate.js","sourceRoot":"","sources":["../../../../../../src/service/survey/docxExport/renderers/attribute/renderDate.ts"],"names":[],"mappings":";;;AAAA,+BAAyC;AAEzC,qCAAqH;AAG9G,MAAM,UAAU,GAAsB,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IAChF,MAAM,GAAG,GAAG,IAAA,cAAK,EAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;IACxC,IAAI,IAAA,qBAAY,EAAC,IAAI,CAAC,EAAE,CAAC;QACvB,OAAO,CAAC,IAAA,iBAAQ,EAAC,GAAG,EAAE,IAAA,wBAAe,EAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACjE,CAAC;IAED,OAAO;QACL,IAAI,gBAAS,CAAC;YACZ,OAAO,EAAE,0BAAiB;YAC1B,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE;gBACR,IAAA,gCAAuB,EAAC,OAAO,EAAE,OAAO,CAAC;gBACzC,IAAI,cAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;gBAC1C,IAAI,cAAO,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gBAC5B,IAAI,cAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;gBAC1C,IAAI,cAAO,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gBAC5B,IAAI,cAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;aAC7C;SACF,CAAC;KACH,CAAA;AACH,CAAC,CAAA;AApBY,QAAA,UAAU,cAoBtB"}
@@ -0,0 +1,2 @@
1
+ import type { AttributeRenderer } from './types';
2
+ export declare const renderFile: AttributeRenderer;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderFile = void 0;
4
+ const docx_1 = require("docx");
5
+ const arena_core_1 = require("@openforis/arena-core");
6
+ const common_1 = require("./common");
7
+ const renderImage_1 = require("./renderImage");
8
+ const getFileNameToDisplay = (node) => node
9
+ ? (arena_core_1.NodeValues.getFileNameCalculated(node) ?? arena_core_1.NodeValues.getFileName(node) ?? '[attached file]')
10
+ : '[attached file]';
11
+ const renderFilePlaceholder = (nodeDef, context) => [
12
+ new docx_1.Paragraph({
13
+ spacing: common_1.SPACING_FIELD_ROW,
14
+ keepLines: true,
15
+ children: [
16
+ (0, common_1.nodeDefFormItemLabelRun)(nodeDef, context),
17
+ new docx_1.TextRun({ text: '[file attachment]', italics: true, color: '888888' }),
18
+ ],
19
+ }),
20
+ ];
21
+ const tryRenderImageFile = async ({ context, nodeDef, node, limits, }) => {
22
+ const { fileProvider, lang } = context;
23
+ const lbl = (0, common_1.label)(nodeDef, lang);
24
+ const fileNameToDisplay = getFileNameToDisplay(node);
25
+ if (!fileProvider)
26
+ return null;
27
+ const fileUuid = arena_core_1.NodeValues.getFileUuid(node);
28
+ if (!fileUuid)
29
+ return null;
30
+ try {
31
+ const fileData = await fileProvider(fileUuid);
32
+ const fileName = arena_core_1.NodeValues.getFileName(node) ?? fileUuid;
33
+ const imageParagraphs = (0, renderImage_1.renderImage)(fileName, lbl, fileData, limits);
34
+ return imageParagraphs ?? [(0, common_1.valueRow)(lbl, fileNameToDisplay)];
35
+ }
36
+ catch {
37
+ return [(0, common_1.valueRow)(lbl, fileNameToDisplay)];
38
+ }
39
+ };
40
+ const renderFile = async ({ nodeDef, context, node, limits }) => {
41
+ const lbl = (0, common_1.label)(nodeDef, context.lang);
42
+ if ((0, common_1.isNodeBlank)(node)) {
43
+ if (context.record) {
44
+ return [(0, common_1.valueRow)(lbl, '')];
45
+ }
46
+ return renderFilePlaceholder(nodeDef, context);
47
+ }
48
+ const nodeDefFile = nodeDef;
49
+ if (nodeDefFile.props?.fileType === 'image') {
50
+ const imageParagraphs = await tryRenderImageFile({ nodeDef, context, node: node, limits });
51
+ if (imageParagraphs) {
52
+ return imageParagraphs;
53
+ }
54
+ }
55
+ return [(0, common_1.valueRow)(lbl, getFileNameToDisplay(node))];
56
+ };
57
+ exports.renderFile = renderFile;
58
+ //# sourceMappingURL=renderFile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderFile.js","sourceRoot":"","sources":["../../../../../../src/service/survey/docxExport/renderers/attribute/renderFile.ts"],"names":[],"mappings":";;;AAAA,+BAAyC;AAEzC,sDAAkD;AAElD,qCAAmG;AACnG,+CAA2C;AAG3C,MAAM,oBAAoB,GAAG,CAAC,IAA+C,EAAU,EAAE,CACvF,IAAI;IACF,CAAC,CAAC,CAAC,uBAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,uBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC;IAC/F,CAAC,CAAC,iBAAiB,CAAA;AAEvB,MAAM,qBAAqB,GAAG,CAC5B,OAAoD,EACpD,OAAoD,EACvC,EAAE,CAAC;IAChB,IAAI,gBAAS,CAAC;QACZ,O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AAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE;IACxF,MAAM,GAAG,GAAG,IAAA,cAAK,EAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;IAExC,IAAI,IAAA,oBAAW,EAAC,IAAI,CAAC,EAAE,CAAC;QACtB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACnB,OAAO,CAAC,IAAA,iBAAQ,EAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAA;QAC5B,CAAC;QACD,OAAO,qBAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IAChD,CAAC;IAED,MAAM,WAAW,GAAG,OAA6D,CAAA;IACjF,IAAI,WAAW,CAAC,KAAK,EAAE,QAAQ,KAAK,OAAO,EAAE,CAAC;QAC5C,MAAM,eAAe,GAAG,MAAM,kBAAkB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QAC3F,IAAI,eAAe,EAAE,CAAC;YACpB,OAAO,eAAe,CAAA;QACxB,CAAC;IACH,CAAC;IAED,OAAO,CAAC,IAAA,iBAAQ,EAAC,GAAG,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACpD,CAAC,CAAA;AAnBY,QAAA,UAAU,cAmBtB"}
@@ -0,0 +1,2 @@
1
+ import type { AttributeRenderer } from './types';
2
+ export declare const renderFormHeader: AttributeRenderer;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderFormHeader = void 0;
4
+ const docx_1 = require("docx");
5
+ const common_1 = require("./common");
6
+ const renderFormHeader = async ({ nodeDef, context, depth }) => [
7
+ new docx_1.Paragraph({
8
+ text: (0, common_1.getHeadingText)(nodeDef, context),
9
+ heading: (0, common_1.getFormHeaderLevelByDepth)(depth),
10
+ spacing: { before: 200, after: 100 },
11
+ }),
12
+ ];
13
+ exports.renderFormHeader = renderFormHeader;
14
+ //# sourceMappingURL=renderFormHeader.js.map