repro-nest 0.0.219 โ†’ 0.0.220

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 (557) hide show
  1. package/README.md +335 -0
  2. package/dist/index.js +33 -2
  3. package/package.json +2 -2
  4. package/src/index.ts +46 -20
  5. package/back-end-node/.dockerignore +0 -59
  6. package/back-end-node/.github/pull_request_template.md +0 -11
  7. package/back-end-node/.github/workflows/dev-deploy.yaml +0 -21
  8. package/back-end-node/.github/workflows/node-format-check.yaml +0 -29
  9. package/back-end-node/.github/workflows/platform-deploy.yaml +0 -16
  10. package/back-end-node/.github/workflows/platform3-deploy.yaml +0 -21
  11. package/back-end-node/.github/workflows/pr.yaml +0 -22
  12. package/back-end-node/.github/workflows/prod-deploy.yaml +0 -19
  13. package/back-end-node/.github/workflows/prod3-deploy.yaml +0 -18
  14. package/back-end-node/.github/workflows/sandbox-deploy.yaml +0 -16
  15. package/back-end-node/.github/workflows/staging-deploy.yaml +0 -19
  16. package/back-end-node/.github/workflows/staging3-deploy.yaml +0 -18
  17. package/back-end-node/.github/workflows/test-deploy.yaml +0 -16
  18. package/back-end-node/.hooks/pre-commit +0 -3
  19. package/back-end-node/.husky/pre-commit +0 -1
  20. package/back-end-node/.prettierignore +0 -6
  21. package/back-end-node/.prettierrc +0 -30
  22. package/back-end-node/README.md +0 -172
  23. package/back-end-node/eslint.config.mjs +0 -31
  24. package/back-end-node/nest-cli.json +0 -20
  25. package/back-end-node/package-lock.json +0 -13101
  26. package/back-end-node/package.json +0 -118
  27. package/back-end-node/src/app.module.ts +0 -10
  28. package/back-end-node/src/app.ts +0 -75
  29. package/back-end-node/src/common/constants/collection-names.ts +0 -51
  30. package/back-end-node/src/common/constants/discriminators.ts +0 -65
  31. package/back-end-node/src/common/constants/email-templates.ts +0 -4
  32. package/back-end-node/src/common/constants/emailConstants.ts +0 -74
  33. package/back-end-node/src/common/constants/notification-trigger-actions.ts +0 -37
  34. package/back-end-node/src/common/constants/protocols.ts +0 -4
  35. package/back-end-node/src/common/constants/view-constants.ts +0 -31
  36. package/back-end-node/src/common/decorators/user.decorator.ts +0 -8
  37. package/back-end-node/src/common/dtos/activity-log.output.ts +0 -38
  38. package/back-end-node/src/common/dtos/base.dto.ts +0 -5
  39. package/back-end-node/src/common/dtos/column-config.output.ts +0 -89
  40. package/back-end-node/src/common/dtos/general-response.output.ts +0 -96
  41. package/back-end-node/src/common/dtos/generic-error.dto.ts +0 -18
  42. package/back-end-node/src/common/dtos/get-paginated-data.input.ts +0 -42
  43. package/back-end-node/src/common/dtos/paginated-result.output.ts +0 -24
  44. package/back-end-node/src/common/types/common.types.ts +0 -39
  45. package/back-end-node/src/common/types/environment.types.ts +0 -5
  46. package/back-end-node/src/common/types/listing-query.ts +0 -19
  47. package/back-end-node/src/common/utils/azureBlobStorage/fileUpload.ts +0 -42
  48. package/back-end-node/src/common/utils/azureBlobStorage/index.ts +0 -31
  49. package/back-end-node/src/common/utils/common.utils.ts +0 -215
  50. package/back-end-node/src/common/utils/discriminator-defaults.ts +0 -6
  51. package/back-end-node/src/common/utils/errorHandling.ts +0 -21
  52. package/back-end-node/src/common/utils/logger.ts +0 -21
  53. package/back-end-node/src/common/utils/mapper-manager.ts +0 -10
  54. package/back-end-node/src/common/utils/models.ts +0 -11
  55. package/back-end-node/src/common/utils/pipelineUtil.ts +0 -54
  56. package/back-end-node/src/common/utils/strings.ts +0 -41
  57. package/back-end-node/src/modules/config/config.module.ts +0 -18
  58. package/back-end-node/src/modules/config/config.service.ts +0 -50
  59. package/back-end-node/src/modules/config/config.ts +0 -45
  60. package/back-end-node/src/modules/core/auth/auth-module.ts +0 -19
  61. package/back-end-node/src/modules/core/auth/auth.controller.ts +0 -233
  62. package/back-end-node/src/modules/core/auth/auth.service.ts +0 -146
  63. package/back-end-node/src/modules/core/auth/dto/input/login.input.ts +0 -21
  64. package/back-end-node/src/modules/core/auth/dto/input/reset-password.input.ts +0 -33
  65. package/back-end-node/src/modules/core/auth/dto/input/sign-up.input.ts +0 -28
  66. package/back-end-node/src/modules/core/auth/dto/input/validate-pin.input.ts +0 -21
  67. package/back-end-node/src/modules/core/auth/dto/output/login.output.ts +0 -25
  68. package/back-end-node/src/modules/core/auth/dto/output/name.output.ts +0 -20
  69. package/back-end-node/src/modules/core/auth/guards/auth.guard.ts +0 -92
  70. package/back-end-node/src/modules/core/auth/guards/tenant-auth.guard.ts +0 -65
  71. package/back-end-node/src/modules/core/auth/strategies/bearer.strategy.ts +0 -53
  72. package/back-end-node/src/modules/core/auth/utils/user-roles.ts +0 -85
  73. package/back-end-node/src/modules/core/auth/utils/validate-pin-and-password.ts +0 -18
  74. package/back-end-node/src/modules/core/azure/azure-auth-provider.ts +0 -40
  75. package/back-end-node/src/modules/core/azure/azure.module.ts +0 -10
  76. package/back-end-node/src/modules/core/azure/azure.types.ts +0 -20
  77. package/back-end-node/src/modules/core/azure/services/azure-graph.service.ts +0 -118
  78. package/back-end-node/src/modules/core/blinding/blinding-module.ts +0 -40
  79. package/back-end-node/src/modules/core/blinding/dto/requestDto.ts +0 -26
  80. package/back-end-node/src/modules/core/blinding/interceptors/blinding.interceptor.ts +0 -67
  81. package/back-end-node/src/modules/core/blinding/interceptors/permission.interceptor.ts +0 -39
  82. package/back-end-node/src/modules/core/blinding/interceptors/reports.interceptor.ts +0 -34
  83. package/back-end-node/src/modules/core/blinding/mailer/blinding-mailer.service.ts +0 -125
  84. package/back-end-node/src/modules/core/blinding/mailer/constants.ts +0 -25
  85. package/back-end-node/src/modules/core/blinding/mailer/core/default.ts +0 -85
  86. package/back-end-node/src/modules/core/blinding/mailer/core/mail-data.service.ts +0 -97
  87. package/back-end-node/src/modules/core/blinding/mailer/handlers/blinded.handler.ts +0 -112
  88. package/back-end-node/src/modules/core/blinding/mailer/handlers/open-label.handler.ts +0 -90
  89. package/back-end-node/src/modules/core/blinding/mailer/handlers/unblinded.handler.ts +0 -122
  90. package/back-end-node/src/modules/core/blinding/mailer/interfaces/core.ts +0 -12
  91. package/back-end-node/src/modules/core/blinding/mailer/interfaces/data.service.ts +0 -58
  92. package/back-end-node/src/modules/core/blinding/mailer/interfaces/handler.ts +0 -14
  93. package/back-end-node/src/modules/core/blinding/mailer/types.ts +0 -59
  94. package/back-end-node/src/modules/core/blinding/services/blinding.util.ts +0 -30
  95. package/back-end-node/src/modules/core/blinding/services/general-blinding.service.ts +0 -38
  96. package/back-end-node/src/modules/core/blinding/submodules/global-data-module.ts +0 -28
  97. package/back-end-node/src/modules/core/blinding/submodules/tenant-data-module.ts +0 -168
  98. package/back-end-node/src/modules/core/core.module.ts +0 -14
  99. package/back-end-node/src/modules/core/database/database.module.ts +0 -14
  100. package/back-end-node/src/modules/core/database/factories/global-database-connection.factory.ts +0 -37
  101. package/back-end-node/src/modules/core/database/factories/tenant-database-connection.factory.ts +0 -118
  102. package/back-end-node/src/modules/core/database/modules/global/global-database.module.ts +0 -43
  103. package/back-end-node/src/modules/core/database/modules/global/schemas/global-info.schema.ts +0 -23
  104. package/back-end-node/src/modules/core/database/modules/global/schemas/global-protocol.schema.ts +0 -55
  105. package/back-end-node/src/modules/core/database/modules/global/schemas/global-resupply.schema.ts +0 -68
  106. package/back-end-node/src/modules/core/database/modules/global/schemas/global-sponsor.schema.ts +0 -173
  107. package/back-end-node/src/modules/core/database/modules/global/schemas/global-user-permission.schema.ts +0 -56
  108. package/back-end-node/src/modules/core/database/modules/global/schemas/global-users.schema.ts +0 -168
  109. package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/location-access.sub-schema.ts +0 -25
  110. package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/permissions.sub-schema.ts +0 -25
  111. package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/protocol-id-and-name.sub-schema.ts +0 -15
  112. package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/role-permission-detail.sub-schema.ts +0 -18
  113. package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/role-permission.sub-schema.ts +0 -20
  114. package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/user-depot-permission-detail.sub-schema.ts +0 -21
  115. package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/user-site-permission-detail.sub-schema.ts +0 -21
  116. package/back-end-node/src/modules/core/database/modules/tenant/base.repository.ts +0 -70
  117. package/back-end-node/src/modules/core/database/modules/tenant/database-multitenancy.utils.ts +0 -49
  118. package/back-end-node/src/modules/core/database/modules/tenant/inject-tenant-model.decorator.ts +0 -4
  119. package/back-end-node/src/modules/core/database/modules/tenant/tenant-database.module.ts +0 -84
  120. package/back-end-node/src/modules/core/database/modules/tenant/tenant-database.service.ts +0 -52
  121. package/back-end-node/src/modules/core/database/schemas/activity-log.schema.ts +0 -33
  122. package/back-end-node/src/modules/core/database/schemas/company.schema.ts +0 -53
  123. package/back-end-node/src/modules/core/database/schemas/contact-info.schema.ts +0 -24
  124. package/back-end-node/src/modules/core/database/schemas/site-details.schema.ts +0 -20
  125. package/back-end-node/src/modules/core/database/schemas/visit-info-base.schema.ts +0 -21
  126. package/back-end-node/src/modules/core/database/types/common-database.types.ts +0 -9
  127. package/back-end-node/src/modules/core/database/types/database-config.type.ts +0 -15
  128. package/back-end-node/src/modules/core/datetime/datetime.constants.ts +0 -19
  129. package/back-end-node/src/modules/core/datetime/datetime.errors.ts +0 -1
  130. package/back-end-node/src/modules/core/datetime/datetime.helpers.ts +0 -3
  131. package/back-end-node/src/modules/core/datetime/datetime.module.ts +0 -22
  132. package/back-end-node/src/modules/core/datetime/interface/datetime.interface.ts +0 -38
  133. package/back-end-node/src/modules/core/datetime/live/datetime.default.core.ts +0 -139
  134. package/back-end-node/src/modules/core/datetime/live/datetime.util.ts +0 -84
  135. package/back-end-node/src/modules/core/interceptors/fieldHeader.interceptor.ts +0 -33
  136. package/back-end-node/src/modules/core/mailer/README.md +0 -191
  137. package/back-end-node/src/modules/core/mailer/mailer.module.ts +0 -14
  138. package/back-end-node/src/modules/core/mailer/mailer.types.ts +0 -32
  139. package/back-end-node/src/modules/core/mailer/services/base-mailer.service.ts +0 -261
  140. package/back-end-node/src/modules/core/mailer/services/notification-template.service.ts +0 -113
  141. package/back-end-node/src/modules/core/mailer/templateSkeleton.html +0 -156
  142. package/back-end-node/src/modules/core/rabbitmq/interfaces/rabbitmq.interfaces.ts +0 -11
  143. package/back-end-node/src/modules/core/rabbitmq/rabbitmq.module.ts +0 -9
  144. package/back-end-node/src/modules/core/rabbitmq/rabbitmq.service.ts +0 -208
  145. package/back-end-node/src/modules/core/report/report-helper.service.ts +0 -111
  146. package/back-end-node/src/modules/core/report/report.module.ts +0 -12
  147. package/back-end-node/src/modules/core/token/token.module.ts +0 -9
  148. package/back-end-node/src/modules/core/token/token.service.ts +0 -22
  149. package/back-end-node/src/modules/core/token/token.types.ts +0 -3
  150. package/back-end-node/src/modules/domain/batch-release/batch-release.controller.ts +0 -624
  151. package/back-end-node/src/modules/domain/batch-release/batch-release.module.ts +0 -44
  152. package/back-end-node/src/modules/domain/batch-release/batch-release.repository.ts +0 -834
  153. package/back-end-node/src/modules/domain/batch-release/batch-release.utils.ts +0 -43
  154. package/back-end-node/src/modules/domain/batch-release/dto/input/approve-batch-release.input.ts +0 -17
  155. package/back-end-node/src/modules/domain/batch-release/dto/input/batch-release-report.input.ts +0 -18
  156. package/back-end-node/src/modules/domain/batch-release/dto/input/create-batch-release.input.ts +0 -56
  157. package/back-end-node/src/modules/domain/batch-release/dto/input/create-non-serialized-batch-release.input.ts +0 -63
  158. package/back-end-node/src/modules/domain/batch-release/dto/input/get-all-batch-release.input.ts +0 -119
  159. package/back-end-node/src/modules/domain/batch-release/dto/input/manage-batch-release-countries.input.ts +0 -15
  160. package/back-end-node/src/modules/domain/batch-release/dto/input/non-serialized-update-batch-release.input.ts +0 -48
  161. package/back-end-node/src/modules/domain/batch-release/dto/input/retain.input.ts +0 -11
  162. package/back-end-node/src/modules/domain/batch-release/dto/input/update-batch-release-label-groups.input.ts +0 -29
  163. package/back-end-node/src/modules/domain/batch-release/dto/input/update-batch-release.input.ts +0 -48
  164. package/back-end-node/src/modules/domain/batch-release/dto/input/validate-non-serialized-batch-release.input.ts +0 -18
  165. package/back-end-node/src/modules/domain/batch-release/dto/input/validate-serialized-batch-release.input.ts +0 -30
  166. package/back-end-node/src/modules/domain/batch-release/dto/output/batch-release-filters.output.ts +0 -63
  167. package/back-end-node/src/modules/domain/batch-release/dto/output/batch-release-item.output.ts +0 -213
  168. package/back-end-node/src/modules/domain/batch-release/dto/output/batch-release-light-item.output.ts +0 -205
  169. package/back-end-node/src/modules/domain/batch-release/dto/output/batch-release-report.output.ts +0 -262
  170. package/back-end-node/src/modules/domain/batch-release/dto/output/label-group-by-sub-sequence-range.output.ts +0 -39
  171. package/back-end-node/src/modules/domain/batch-release/dto/output/non-serialized-batch-release-validation.output.ts +0 -19
  172. package/back-end-node/src/modules/domain/batch-release/dto/output/paginated-batch-release-item.output.ts +0 -12
  173. package/back-end-node/src/modules/domain/batch-release/dto/output/sequence-range.output.ts +0 -21
  174. package/back-end-node/src/modules/domain/batch-release/dto/output/serialized-batch-release-validation.output.ts +0 -23
  175. package/back-end-node/src/modules/domain/batch-release/dto/output/subsequence-range.output.ts +0 -21
  176. package/back-end-node/src/modules/domain/batch-release/schemas/batch-release.schema.ts +0 -158
  177. package/back-end-node/src/modules/domain/batch-release/services/batch-release-helpers.service.ts +0 -514
  178. package/back-end-node/src/modules/domain/batch-release/services/batch-release-mailer.service.ts +0 -286
  179. package/back-end-node/src/modules/domain/batch-release/services/batch-release.service.ts +0 -1019
  180. package/back-end-node/src/modules/domain/batch-release/types/batch-release-common.types.ts +0 -104
  181. package/back-end-node/src/modules/domain/batch-release/types/batch-release.enums.ts +0 -5
  182. package/back-end-node/src/modules/domain/blinding-group/blinding-group.module.ts +0 -21
  183. package/back-end-node/src/modules/domain/blinding-group/blinding-group.repository.ts +0 -30
  184. package/back-end-node/src/modules/domain/blinding-group/schemas/blinding.group.schema.ts +0 -54
  185. package/back-end-node/src/modules/domain/cohort/cohort.module.ts +0 -12
  186. package/back-end-node/src/modules/domain/cohort/cohort.repository.ts +0 -91
  187. package/back-end-node/src/modules/domain/cohort/cohort.service.ts +0 -16
  188. package/back-end-node/src/modules/domain/cohort/schemas/cohort.schema.ts +0 -90
  189. package/back-end-node/src/modules/domain/config-actions/config-actions.module.ts +0 -30
  190. package/back-end-node/src/modules/domain/config-actions/repositories/config-actions.repository.ts +0 -36
  191. package/back-end-node/src/modules/domain/config-actions/schemas/config-actions.schema.ts +0 -66
  192. package/back-end-node/src/modules/domain/config-actions/schemas/site-status-config-actions.schema.ts +0 -27
  193. package/back-end-node/src/modules/domain/config-actions/types/config-actions.types.ts +0 -16
  194. package/back-end-node/src/modules/domain/country/country.controller.ts +0 -369
  195. package/back-end-node/src/modules/domain/country/country.module.ts +0 -68
  196. package/back-end-node/src/modules/domain/country/country.repository.ts +0 -390
  197. package/back-end-node/src/modules/domain/country/country.types.ts +0 -39
  198. package/back-end-node/src/modules/domain/country/dto/input/create-country.input.ts +0 -21
  199. package/back-end-node/src/modules/domain/country/dto/input/get-study-countries.input.ts +0 -75
  200. package/back-end-node/src/modules/domain/country/dto/input/update-country-depot-status.input.ts +0 -24
  201. package/back-end-node/src/modules/domain/country/dto/input/update-country-label-groups.input.ts +0 -14
  202. package/back-end-node/src/modules/domain/country/dto/input/update-country.input.ts +0 -11
  203. package/back-end-node/src/modules/domain/country/dto/output/country.output.ts +0 -26
  204. package/back-end-node/src/modules/domain/country/dto/output/create-country.output.ts +0 -103
  205. package/back-end-node/src/modules/domain/country/dto/output/deactivation-impact.output.ts +0 -12
  206. package/back-end-node/src/modules/domain/country/dto/output/filter-options.output.ts +0 -25
  207. package/back-end-node/src/modules/domain/country/dto/output/get-country.output.ts +0 -56
  208. package/back-end-node/src/modules/domain/country/dto/output/paginated-study-country.output.ts +0 -8
  209. package/back-end-node/src/modules/domain/country/dto/output/sponsor-country-item.output.ts +0 -16
  210. package/back-end-node/src/modules/domain/country/dto/output/study-country.output.ts +0 -112
  211. package/back-end-node/src/modules/domain/country/dto/output/update-country.output.ts +0 -111
  212. package/back-end-node/src/modules/domain/country/schemas/country.schema.ts +0 -98
  213. package/back-end-node/src/modules/domain/country/services/country-mailer.service.ts +0 -190
  214. package/back-end-node/src/modules/domain/country/services/country.service.ts +0 -510
  215. package/back-end-node/src/modules/domain/domain.module.ts +0 -52
  216. package/back-end-node/src/modules/domain/excursion-tracking/controllers/excursion-tracking.controller.ts +0 -262
  217. package/back-end-node/src/modules/domain/excursion-tracking/dto/input/create-non-serialized-te.input.ts +0 -100
  218. package/back-end-node/src/modules/domain/excursion-tracking/dto/input/create-serialized-te.input.ts +0 -83
  219. package/back-end-node/src/modules/domain/excursion-tracking/dto/input/te-report.input.ts +0 -64
  220. package/back-end-node/src/modules/domain/excursion-tracking/dto/input/update-te.input.ts +0 -28
  221. package/back-end-node/src/modules/domain/excursion-tracking/dto/output/excursion-tracking-log.output.ts +0 -98
  222. package/back-end-node/src/modules/domain/excursion-tracking/dto/output/excursion-tracking-report-filters.output.ts +0 -69
  223. package/back-end-node/src/modules/domain/excursion-tracking/dto/output/excursion-tracking-report.output.ts +0 -243
  224. package/back-end-node/src/modules/domain/excursion-tracking/excursion-tracking.module.ts +0 -65
  225. package/back-end-node/src/modules/domain/excursion-tracking/excursion-tracking.types.ts +0 -28
  226. package/back-end-node/src/modules/domain/excursion-tracking/repositories/excursion-tracking.repository.ts +0 -712
  227. package/back-end-node/src/modules/domain/excursion-tracking/repositories/program-group.repository.ts +0 -50
  228. package/back-end-node/src/modules/domain/excursion-tracking/repositories/status-tracking.repository.ts +0 -83
  229. package/back-end-node/src/modules/domain/excursion-tracking/schemas/excursion-tracking.schema.ts +0 -150
  230. package/back-end-node/src/modules/domain/excursion-tracking/schemas/program-group.schema.ts +0 -54
  231. package/back-end-node/src/modules/domain/excursion-tracking/schemas/status-tracking.schema.ts +0 -43
  232. package/back-end-node/src/modules/domain/excursion-tracking/services/excursion-tracking-helper.service.ts +0 -64
  233. package/back-end-node/src/modules/domain/excursion-tracking/services/excursion-tracking-mailer.service.ts +0 -415
  234. package/back-end-node/src/modules/domain/excursion-tracking/services/excursion-tracking.service.ts +0 -851
  235. package/back-end-node/src/modules/domain/excursion-tracking/services/status-tracking.service.ts +0 -40
  236. package/back-end-node/src/modules/domain/info/README.md +0 -77
  237. package/back-end-node/src/modules/domain/info/info.controller.ts +0 -76
  238. package/back-end-node/src/modules/domain/info/info.module.ts +0 -14
  239. package/back-end-node/src/modules/domain/info/repositories/info.repository.ts +0 -23
  240. package/back-end-node/src/modules/domain/info/services/info.service.ts +0 -21
  241. package/back-end-node/src/modules/domain/label/label.module.ts +0 -18
  242. package/back-end-node/src/modules/domain/label/label.repository.ts +0 -76
  243. package/back-end-node/src/modules/domain/label/label.service.ts +0 -32
  244. package/back-end-node/src/modules/domain/label/label.types.ts +0 -4
  245. package/back-end-node/src/modules/domain/label/schemas/label.schema.ts +0 -31
  246. package/back-end-node/src/modules/domain/protocol/protocol.module.ts +0 -18
  247. package/back-end-node/src/modules/domain/protocol/protocol.repository.ts +0 -44
  248. package/back-end-node/src/modules/domain/protocol/protocol.service.ts +0 -33
  249. package/back-end-node/src/modules/domain/protocol/schemas/protocol.schema.ts +0 -98
  250. package/back-end-node/src/modules/domain/returns/constants/index.ts +0 -25
  251. package/back-end-node/src/modules/domain/returns/dto/input/base-return-shipment.input.ts +0 -20
  252. package/back-end-node/src/modules/domain/returns/dto/input/common.input.ts +0 -46
  253. package/back-end-node/src/modules/domain/returns/dto/input/create-return-shipment.input.ts +0 -117
  254. package/back-end-node/src/modules/domain/returns/dto/input/destory-kits.input.ts +0 -63
  255. package/back-end-node/src/modules/domain/returns/dto/input/destroy-kits-filters.input.ts +0 -25
  256. package/back-end-node/src/modules/domain/returns/dto/input/get-all-returns.input.ts +0 -81
  257. package/back-end-node/src/modules/domain/returns/dto/input/inspectable-kits.input.ts +0 -107
  258. package/back-end-node/src/modules/domain/returns/dto/input/list-kits-to-destroy.input.ts +0 -252
  259. package/back-end-node/src/modules/domain/returns/dto/input/resolve-kits.input.ts +0 -114
  260. package/back-end-node/src/modules/domain/returns/dto/input/update-kits-status.input.ts +0 -111
  261. package/back-end-node/src/modules/domain/returns/dto/input/update-return-shipment.input.ts +0 -32
  262. package/back-end-node/src/modules/domain/returns/dto/output/destroy-kits-filters.output.ts +0 -116
  263. package/back-end-node/src/modules/domain/returns/dto/output/detailed-return-shipment.output.ts +0 -161
  264. package/back-end-node/src/modules/domain/returns/dto/output/generic-response.output.ts +0 -16
  265. package/back-end-node/src/modules/domain/returns/dto/output/inspectable-kits.output.ts +0 -201
  266. package/back-end-node/src/modules/domain/returns/dto/output/kit-return-status-report.output.ts +0 -147
  267. package/back-end-node/src/modules/domain/returns/dto/output/paginated-kit-returns.output.ts +0 -7
  268. package/back-end-node/src/modules/domain/returns/dto/output/resolve-kits.output.ts +0 -107
  269. package/back-end-node/src/modules/domain/returns/dto/output/return-kits-accountability-filters.output.ts +0 -83
  270. package/back-end-node/src/modules/domain/returns/dto/output/return-kits-inspect-filters.output.ts +0 -113
  271. package/back-end-node/src/modules/domain/returns/dto/output/return-kits-reconciliation-filters.output.ts +0 -93
  272. package/back-end-node/src/modules/domain/returns/dto/output/return-kits.output.ts +0 -244
  273. package/back-end-node/src/modules/domain/returns/dto/output/return-shipment.output.ts +0 -205
  274. package/back-end-node/src/modules/domain/returns/dto/output/returns-filters.output.ts +0 -97
  275. package/back-end-node/src/modules/domain/returns/pipes/form-type-validation.pipe.ts +0 -35
  276. package/back-end-node/src/modules/domain/returns/returns.controller.ts +0 -752
  277. package/back-end-node/src/modules/domain/returns/returns.mailer.service.ts +0 -1025
  278. package/back-end-node/src/modules/domain/returns/returns.module.ts +0 -53
  279. package/back-end-node/src/modules/domain/returns/returns.pipeline.ts +0 -1491
  280. package/back-end-node/src/modules/domain/returns/returns.repository.ts +0 -1695
  281. package/back-end-node/src/modules/domain/returns/returns.service.ts +0 -1481
  282. package/back-end-node/src/modules/domain/returns/returns.types.ts +0 -7
  283. package/back-end-node/src/modules/domain/returns/schemas/return-shipment.schema.ts +0 -183
  284. package/back-end-node/src/modules/domain/returns/types/returns-kit-status.ts +0 -6
  285. package/back-end-node/src/modules/domain/returns/types/returns-mailer.ts +0 -211
  286. package/back-end-node/src/modules/domain/shipment/dto/input/create-shipment-request.input.ts +0 -81
  287. package/back-end-node/src/modules/domain/shipment/dto/input/get-all-shipments.input.ts +0 -101
  288. package/back-end-node/src/modules/domain/shipment/dto/input/get-shipment-report-summary.input.ts +0 -73
  289. package/back-end-node/src/modules/domain/shipment/dto/input/shipment-dispatch.input.ts +0 -25
  290. package/back-end-node/src/modules/domain/shipment/dto/input/shipments-cancel.input.ts +0 -12
  291. package/back-end-node/src/modules/domain/shipment/dto/input/update-shipment-and-kits.input.ts +0 -51
  292. package/back-end-node/src/modules/domain/shipment/dto/input/update-shipment-details.input.ts +0 -17
  293. package/back-end-node/src/modules/domain/shipment/dto/output/paginated-shipment-item.output.ts +0 -357
  294. package/back-end-node/src/modules/domain/shipment/dto/output/shipment-details-report.output.ts +0 -154
  295. package/back-end-node/src/modules/domain/shipment/dto/output/shipment-filters.output.ts +0 -107
  296. package/back-end-node/src/modules/domain/shipment/dto/output/shipment-kits.output.ts +0 -125
  297. package/back-end-node/src/modules/domain/shipment/dto/output/shipment-summary-report.output.ts +0 -139
  298. package/back-end-node/src/modules/domain/shipment/dto/output/shipment.output.ts +0 -153
  299. package/back-end-node/src/modules/domain/shipment/repositories/shipment-group.repository.ts +0 -25
  300. package/back-end-node/src/modules/domain/shipment/repositories/shipment.repository.ts +0 -1967
  301. package/back-end-node/src/modules/domain/shipment/schemas/shipment-group.schema.ts +0 -53
  302. package/back-end-node/src/modules/domain/shipment/schemas/shipment.schema.ts +0 -197
  303. package/back-end-node/src/modules/domain/shipment/services/shipment-helper.service.ts +0 -422
  304. package/back-end-node/src/modules/domain/shipment/services/shipment-mailer.service.ts +0 -909
  305. package/back-end-node/src/modules/domain/shipment/services/shipment.service.ts +0 -1969
  306. package/back-end-node/src/modules/domain/shipment/shipment.controller.ts +0 -528
  307. package/back-end-node/src/modules/domain/shipment/shipment.module.ts +0 -57
  308. package/back-end-node/src/modules/domain/shipment/shipment.types.ts +0 -20
  309. package/back-end-node/src/modules/domain/shipment/shipment.utils.ts +0 -116
  310. package/back-end-node/src/modules/domain/shipment/types/shipment.types.ts +0 -80
  311. package/back-end-node/src/modules/domain/sites/dto/input/create-site.input.ts +0 -266
  312. package/back-end-node/src/modules/domain/sites/dto/input/get-ip-contacts-report.input.ts +0 -17
  313. package/back-end-node/src/modules/domain/sites/dto/input/get-sponsor-user-site-supplies-report-data.input.ts +0 -64
  314. package/back-end-node/src/modules/domain/sites/dto/input/site-sites.input.ts +0 -202
  315. package/back-end-node/src/modules/domain/sites/dto/input/update-site-status.input.ts +0 -11
  316. package/back-end-node/src/modules/domain/sites/dto/input/update-site.input.ts +0 -218
  317. package/back-end-node/src/modules/domain/sites/dto/output/site-filters.output.ts +0 -10
  318. package/back-end-node/src/modules/domain/sites/dto/output/site-report.output.ts +0 -9
  319. package/back-end-node/src/modules/domain/sites/dto/output/site-supply-strategy.output.ts +0 -25
  320. package/back-end-node/src/modules/domain/sites/dto/output/site.output.ts +0 -573
  321. package/back-end-node/src/modules/domain/sites/dto/output/sponsor-user-site-details-report.output.ts +0 -131
  322. package/back-end-node/src/modules/domain/sites/dto/output/sponsor-user-site-supplies-report-data.output.ts +0 -105
  323. package/back-end-node/src/modules/domain/sites/dto/output/sponsor-user-sites-summary-report-data.output.ts +0 -53
  324. package/back-end-node/src/modules/domain/sites/dto/output/visit-type-limits.output.ts +0 -42
  325. package/back-end-node/src/modules/domain/sites/repositories/pipelines/common.ts +0 -366
  326. package/back-end-node/src/modules/domain/sites/repositories/pipelines/sponsorUserSiteSuppliesReports.ts +0 -1008
  327. package/back-end-node/src/modules/domain/sites/repositories/sites.repository.ts +0 -937
  328. package/back-end-node/src/modules/domain/sites/schemas/address-hostory.schema.ts +0 -156
  329. package/back-end-node/src/modules/domain/sites/site-sites.controller.ts +0 -413
  330. package/back-end-node/src/modules/domain/sites/sites.controller.ts +0 -222
  331. package/back-end-node/src/modules/domain/sites/sites.mailer.service.ts +0 -248
  332. package/back-end-node/src/modules/domain/sites/sites.module.ts +0 -50
  333. package/back-end-node/src/modules/domain/sites/sites.service.ts +0 -2904
  334. package/back-end-node/src/modules/domain/sites/types/types.ts +0 -276
  335. package/back-end-node/src/modules/domain/sites-and-depots/controllers/depots.controller.ts +0 -520
  336. package/back-end-node/src/modules/domain/sites-and-depots/controllers/sites-and-depots.controller.ts +0 -21
  337. package/back-end-node/src/modules/domain/sites-and-depots/dto/input/create-depot.input.ts +0 -169
  338. package/back-end-node/src/modules/domain/sites-and-depots/dto/input/duplicate-depot-validation.input.ts +0 -11
  339. package/back-end-node/src/modules/domain/sites-and-depots/dto/input/get-depot-reports.input.ts +0 -38
  340. package/back-end-node/src/modules/domain/sites-and-depots/dto/input/search-depot.input.ts +0 -50
  341. package/back-end-node/src/modules/domain/sites-and-depots/dto/input/update-status.input.ts +0 -15
  342. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/all-depots-report.output.ts +0 -43
  343. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/create-depot.output.ts +0 -18
  344. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/depot-name-list-item.output.ts +0 -31
  345. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/depot.output.ts +0 -48
  346. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/duplicate-depot-validation.input.ts +0 -3
  347. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/get-depot-filters.output.ts +0 -63
  348. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/kit-count.output.ts +0 -85
  349. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/protocol-depots.output.ts +0 -27
  350. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/receiving-locaitons.output.ts +0 -31
  351. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/search-depots.output.ts +0 -267
  352. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/ship-to-countries.output.ts +0 -16
  353. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/shipping-details.output.ts +0 -54
  354. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/sponsor-depot.output.ts +0 -61
  355. package/back-end-node/src/modules/domain/sites-and-depots/repositories/pipelines/get-protocol-depots.pipeline.ts +0 -41
  356. package/back-end-node/src/modules/domain/sites-and-depots/repositories/sites-and-depots.repository.ts +0 -652
  357. package/back-end-node/src/modules/domain/sites-and-depots/schemas/depot.schema.ts +0 -76
  358. package/back-end-node/src/modules/domain/sites-and-depots/schemas/site.schema.ts +0 -114
  359. package/back-end-node/src/modules/domain/sites-and-depots/schemas/sites-and-depots.schema.ts +0 -133
  360. package/back-end-node/src/modules/domain/sites-and-depots/services/depots-mailer.service.ts +0 -167
  361. package/back-end-node/src/modules/domain/sites-and-depots/services/depots.service.ts +0 -752
  362. package/back-end-node/src/modules/domain/sites-and-depots/services/sites-and-depots.service.ts +0 -230
  363. package/back-end-node/src/modules/domain/sites-and-depots/sites-and-depots.module.ts +0 -82
  364. package/back-end-node/src/modules/domain/sites-and-depots/types/sites-and-depots.types.ts +0 -242
  365. package/back-end-node/src/modules/domain/study/repositories/study-config.repository.ts +0 -297
  366. package/back-end-node/src/modules/domain/study/schemas/study-config-blinding-aggregation.schema.ts +0 -35
  367. package/back-end-node/src/modules/domain/study/schemas/study-config-blindingview.schema.ts +0 -61
  368. package/back-end-node/src/modules/domain/study/schemas/study-config-cohorts.schema.ts +0 -115
  369. package/back-end-node/src/modules/domain/study/schemas/study-config-fieldHeader.schema.ts +0 -48
  370. package/back-end-node/src/modules/domain/study/schemas/study-config-notification.schema.ts +0 -166
  371. package/back-end-node/src/modules/domain/study/schemas/study-config-product-returns.schema.ts +0 -82
  372. package/back-end-node/src/modules/domain/study/schemas/study-config-report.schema.ts +0 -77
  373. package/back-end-node/src/modules/domain/study/schemas/study-config-site.schema.ts +0 -95
  374. package/back-end-node/src/modules/domain/study/schemas/study-config-study.schema.ts +0 -161
  375. package/back-end-node/src/modules/domain/study/schemas/study-config-subject-details-config.schema.ts +0 -137
  376. package/back-end-node/src/modules/domain/study/schemas/study-config-subject.schema.ts +0 -239
  377. package/back-end-node/src/modules/domain/study/schemas/study-config-unblinded-event.schema.ts +0 -89
  378. package/back-end-node/src/modules/domain/study/schemas/study-config-user.schema.ts +0 -35
  379. package/back-end-node/src/modules/domain/study/schemas/study-config.schema.ts +0 -30
  380. package/back-end-node/src/modules/domain/study/study-config.service.ts +0 -189
  381. package/back-end-node/src/modules/domain/study/study-config.util.ts +0 -97
  382. package/back-end-node/src/modules/domain/study/study.module.ts +0 -140
  383. package/back-end-node/src/modules/domain/study/types/roles-and-permissions.ts +0 -220
  384. package/back-end-node/src/modules/domain/study/types/study-config-master.ts +0 -176
  385. package/back-end-node/src/modules/domain/study/types/study-config.interface.ts +0 -23
  386. package/back-end-node/src/modules/domain/study/types/study_config.ts +0 -120
  387. package/back-end-node/src/modules/domain/subject/dto/input/get-participants-for-batch-creation.input.ts +0 -6
  388. package/back-end-node/src/modules/domain/subject/dto/input/get-participants.input.ts +0 -12
  389. package/back-end-node/src/modules/domain/subject/dto/output/get-participants.output.ts +0 -22
  390. package/back-end-node/src/modules/domain/subject/dto/output/study-summary.output.ts +0 -121
  391. package/back-end-node/src/modules/domain/subject/dto/output/subject-info.output.ts +0 -13
  392. package/back-end-node/src/modules/domain/subject/dto/output/subject-trasnactions-grid.output.ts +0 -53
  393. package/back-end-node/src/modules/domain/subject/dto/output/subjects-by-cohort.output.ts +0 -43
  394. package/back-end-node/src/modules/domain/subject/repositories/limitsAndSwitches.repository.ts +0 -473
  395. package/back-end-node/src/modules/domain/subject/repositories/pipelines/subject.pipeline.ts +0 -674
  396. package/back-end-node/src/modules/domain/subject/repositories/subject-visits.repository.ts +0 -680
  397. package/back-end-node/src/modules/domain/subject/repositories/subjects.repository.ts +0 -283
  398. package/back-end-node/src/modules/domain/subject/schemas/limitsAndSwitches-protocol.schema.ts +0 -49
  399. package/back-end-node/src/modules/domain/subject/schemas/limitsAndSwithches.schema.ts +0 -67
  400. package/back-end-node/src/modules/domain/subject/schemas/reservation-request.schema.ts +0 -60
  401. package/back-end-node/src/modules/domain/subject/schemas/subject-events.schema.ts +0 -56
  402. package/back-end-node/src/modules/domain/subject/schemas/subject-visit-details.schema.ts +0 -55
  403. package/back-end-node/src/modules/domain/subject/schemas/subject-visit-events.schema.ts +0 -62
  404. package/back-end-node/src/modules/domain/subject/schemas/subject-visit.schema.ts +0 -79
  405. package/back-end-node/src/modules/domain/subject/schemas/subject.schema.ts +0 -152
  406. package/back-end-node/src/modules/domain/subject/services/limitAndSwitches.service.ts +0 -193
  407. package/back-end-node/src/modules/domain/subject/services/subject.service.ts +0 -556
  408. package/back-end-node/src/modules/domain/subject/subject.controller.ts +0 -191
  409. package/back-end-node/src/modules/domain/subject/subject.module.ts +0 -93
  410. package/back-end-node/src/modules/domain/subject/subject.types.ts +0 -59
  411. package/back-end-node/src/modules/domain/subject/types/limits.types.ts +0 -68
  412. package/back-end-node/src/modules/domain/supply/constants/index.ts +0 -9
  413. package/back-end-node/src/modules/domain/supply/controllers/inventory-monitoring.controller.ts +0 -105
  414. package/back-end-node/src/modules/domain/supply/controllers/supplyItem-lists.controller.ts +0 -874
  415. package/back-end-node/src/modules/domain/supply/controllers/supplyItem-types.controller.ts +0 -197
  416. package/back-end-node/src/modules/domain/supply/depot-country-supply.controller.ts +0 -112
  417. package/back-end-node/src/modules/domain/supply/dto/input/create-depot-country-params.input.ts +0 -40
  418. package/back-end-node/src/modules/domain/supply/dto/input/create-supply-strategy-supply-params.ts +0 -107
  419. package/back-end-node/src/modules/domain/supply/dto/input/get-supply-item-types.input.ts +0 -17
  420. package/back-end-node/src/modules/domain/supply/dto/input/get-supply-strategy-supply-params.input.ts +0 -41
  421. package/back-end-node/src/modules/domain/supply/dto/input/inventory-check-assignment.input.ts +0 -162
  422. package/back-end-node/src/modules/domain/supply/dto/input/inventory-monitoring.input.ts +0 -81
  423. package/back-end-node/src/modules/domain/supply/dto/input/kit-replacement.input.ts +0 -132
  424. package/back-end-node/src/modules/domain/supply/dto/input/list-filters.input.ts +0 -35
  425. package/back-end-node/src/modules/domain/supply/dto/input/list-supply-item-list-light.input.ts +0 -34
  426. package/back-end-node/src/modules/domain/supply/dto/input/list-supply-item-numbers.input.ts +0 -13
  427. package/back-end-node/src/modules/domain/supply/dto/input/list-supply-item-quantity.input.ts +0 -11
  428. package/back-end-node/src/modules/domain/supply/dto/input/list-supply-item-types.input.ts +0 -13
  429. package/back-end-node/src/modules/domain/supply/dto/input/list-supply-items.input.ts +0 -283
  430. package/back-end-node/src/modules/domain/supply/dto/input/non-serialized-bulk-expiry-update.input.ts +0 -44
  431. package/back-end-node/src/modules/domain/supply/dto/input/revert-assignment.input.ts +0 -31
  432. package/back-end-node/src/modules/domain/supply/dto/input/serialized-bulk-expiry-update.input.ts +0 -23
  433. package/back-end-node/src/modules/domain/supply/dto/input/shipment-kit-list.input.ts +0 -24
  434. package/back-end-node/src/modules/domain/supply/dto/input/update-bulk-status.input.ts +0 -34
  435. package/back-end-node/src/modules/domain/supply/dto/input/update-depot-country-params.input.ts +0 -18
  436. package/back-end-node/src/modules/domain/supply/dto/input/update-kit-type-country-params.input.ts +0 -9
  437. package/back-end-node/src/modules/domain/supply/dto/input/update-non-serialized-bulk-status.input.ts +0 -55
  438. package/back-end-node/src/modules/domain/supply/dto/input/update-supply-strategy-supply-params.input.ts +0 -62
  439. package/back-end-node/src/modules/domain/supply/dto/input/update-supply-threshold.input.ts +0 -26
  440. package/back-end-node/src/modules/domain/supply/dto/output/create-depot-country-params.output.ts +0 -196
  441. package/back-end-node/src/modules/domain/supply/dto/output/current-location.output.ts +0 -24
  442. package/back-end-node/src/modules/domain/supply/dto/output/drug-accountability-report.output.ts +0 -202
  443. package/back-end-node/src/modules/domain/supply/dto/output/environment-data.output.ts +0 -32
  444. package/back-end-node/src/modules/domain/supply/dto/output/filters.output.ts +0 -34
  445. package/back-end-node/src/modules/domain/supply/dto/output/get-supply-item-types.output.ts +0 -78
  446. package/back-end-node/src/modules/domain/supply/dto/output/inventory-check-assignment.output.ts +0 -229
  447. package/back-end-node/src/modules/domain/supply/dto/output/inventory-monitoring.output.ts +0 -182
  448. package/back-end-node/src/modules/domain/supply/dto/output/kit-comment.output.ts +0 -30
  449. package/back-end-node/src/modules/domain/supply/dto/output/kit-destruction.output.ts +0 -23
  450. package/back-end-node/src/modules/domain/supply/dto/output/kit-replacement.output.ts +0 -267
  451. package/back-end-node/src/modules/domain/supply/dto/output/list-filters.output.ts +0 -91
  452. package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-aggregate.output.ts +0 -41
  453. package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-list-light.output.ts +0 -54
  454. package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-numbers.output.ts +0 -20
  455. package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-quantity.output.ts +0 -22
  456. package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-types.output.ts +0 -35
  457. package/back-end-node/src/modules/domain/supply/dto/output/lot-number.output.ts +0 -17
  458. package/back-end-node/src/modules/domain/supply/dto/output/paginated-supply-item.output.ts +0 -62
  459. package/back-end-node/src/modules/domain/supply/dto/output/revert-assignment.output.ts +0 -26
  460. package/back-end-node/src/modules/domain/supply/dto/output/shipment-group-id.output.ts +0 -18
  461. package/back-end-node/src/modules/domain/supply/dto/output/shipment-info.output.ts +0 -35
  462. package/back-end-node/src/modules/domain/supply/dto/output/shipment-kit-list.output.ts +0 -53
  463. package/back-end-node/src/modules/domain/supply/dto/output/status-update.output.ts +0 -29
  464. package/back-end-node/src/modules/domain/supply/dto/output/supply-item-list-details.output.ts +0 -129
  465. package/back-end-node/src/modules/domain/supply/dto/output/supply-item-list.output.ts +0 -239
  466. package/back-end-node/src/modules/domain/supply/dto/output/supply-item-stretegy-type.output.ts +0 -50
  467. package/back-end-node/src/modules/domain/supply/dto/output/supply-item-type.output.ts +0 -74
  468. package/back-end-node/src/modules/domain/supply/dto/output/update-kit-type-params.output.ts +0 -102
  469. package/back-end-node/src/modules/domain/supply/dto/output/update-supply-strategy-supply-params.output.ts +0 -100
  470. package/back-end-node/src/modules/domain/supply/dto/output/volumetric-quantities.output.ts +0 -21
  471. package/back-end-node/src/modules/domain/supply/kit-type-country-supply.controller.ts +0 -73
  472. package/back-end-node/src/modules/domain/supply/repositories/pipelines/supplyItem-list.pipelines.ts +0 -1832
  473. package/back-end-node/src/modules/domain/supply/repositories/pipelines/supplyItem-lists-reports.pipelines.ts +0 -1279
  474. package/back-end-node/src/modules/domain/supply/repositories/supply-params.respository.ts +0 -420
  475. package/back-end-node/src/modules/domain/supply/repositories/supplyItem-lists.repository.ts +0 -2881
  476. package/back-end-node/src/modules/domain/supply/repositories/supplyItem-types.repository.ts +0 -147
  477. package/back-end-node/src/modules/domain/supply/schemas/supply-params-automated-resupply.schema.ts +0 -111
  478. package/back-end-node/src/modules/domain/supply/schemas/supply-params-country-kit-type.schema.ts +0 -49
  479. package/back-end-node/src/modules/domain/supply/schemas/supply-params-depot-country.schema.ts +0 -46
  480. package/back-end-node/src/modules/domain/supply/schemas/supply-params-manual-shipment.schema.ts +0 -42
  481. package/back-end-node/src/modules/domain/supply/schemas/supply-params.schema.ts +0 -42
  482. package/back-end-node/src/modules/domain/supply/schemas/supply-strategy-params.schema.ts +0 -53
  483. package/back-end-node/src/modules/domain/supply/schemas/supplyItem-lists-comment.schema.ts +0 -27
  484. package/back-end-node/src/modules/domain/supply/schemas/supplyItem-lists-destruction.schema.ts +0 -20
  485. package/back-end-node/src/modules/domain/supply/schemas/supplyItem-lists.schema.ts +0 -162
  486. package/back-end-node/src/modules/domain/supply/schemas/supplyItem-types.schema.ts +0 -214
  487. package/back-end-node/src/modules/domain/supply/services/inventory-monitoring.service.ts +0 -193
  488. package/back-end-node/src/modules/domain/supply/services/supply-item-type.service.ts +0 -212
  489. package/back-end-node/src/modules/domain/supply/services/supply-params.mailer.service.ts +0 -184
  490. package/back-end-node/src/modules/domain/supply/services/supply-params.service.ts +0 -536
  491. package/back-end-node/src/modules/domain/supply/services/supplyItem-lists-mailer.service.ts +0 -421
  492. package/back-end-node/src/modules/domain/supply/services/supplyItem-lists.service.ts +0 -3197
  493. package/back-end-node/src/modules/domain/supply/services/supplyItem-types.mailer.service.ts +0 -80
  494. package/back-end-node/src/modules/domain/supply/supply-strategy-supply-params.controller.ts +0 -192
  495. package/back-end-node/src/modules/domain/supply/supply.module.ts +0 -172
  496. package/back-end-node/src/modules/domain/supply/types/automated-resupply.types.ts +0 -18
  497. package/back-end-node/src/modules/domain/supply/types/common-supply-items.types.ts +0 -8
  498. package/back-end-node/src/modules/domain/supply/types/dto.ts +0 -63
  499. package/back-end-node/src/modules/domain/supply/types/excursion-tracking.ts +0 -4
  500. package/back-end-node/src/modules/domain/supply/types/shipment.types.ts +0 -131
  501. package/back-end-node/src/modules/domain/supply/types/supply-strategy.types.ts +0 -62
  502. package/back-end-node/src/modules/domain/supply/types/supply.types.ts +0 -513
  503. package/back-end-node/src/modules/domain/supply/types/transaction.types.ts +0 -7
  504. package/back-end-node/src/modules/domain/user/repositories/global-sponsor.repository.ts +0 -27
  505. package/back-end-node/src/modules/domain/user/repositories/global-user-permission.repository.ts +0 -61
  506. package/back-end-node/src/modules/domain/user/repositories/global-user.repository.ts +0 -165
  507. package/back-end-node/src/modules/domain/user/repositories/user-transaction.repository.ts +0 -74
  508. package/back-end-node/src/modules/domain/user/repositories/user.repository.ts +0 -161
  509. package/back-end-node/src/modules/domain/user/schemas/user-permissions.schema.ts +0 -103
  510. package/back-end-node/src/modules/domain/user/schemas/user-sessions.schema.ts +0 -31
  511. package/back-end-node/src/modules/domain/user/schemas/user-transactions.schema.ts +0 -111
  512. package/back-end-node/src/modules/domain/user/schemas/users.schema.ts +0 -146
  513. package/back-end-node/src/modules/domain/user/services/global-sponsor.service.ts +0 -12
  514. package/back-end-node/src/modules/domain/user/services/global-user-permission.service.ts +0 -24
  515. package/back-end-node/src/modules/domain/user/services/global-user.service.ts +0 -58
  516. package/back-end-node/src/modules/domain/user/services/user-mailer.service.ts +0 -196
  517. package/back-end-node/src/modules/domain/user/services/user-transaction.service.ts +0 -60
  518. package/back-end-node/src/modules/domain/user/services/user.service.ts +0 -72
  519. package/back-end-node/src/modules/domain/user/user.controller.ts +0 -53
  520. package/back-end-node/src/modules/domain/user/user.module.ts +0 -84
  521. package/back-end-node/src/modules/domain/user/user.types.ts +0 -31
  522. package/back-end-node/src/modules/domain/workflows/constants/workflows.constants.ts +0 -34
  523. package/back-end-node/src/modules/domain/workflows/constants/workflowsValidations.constants.ts +0 -15
  524. package/back-end-node/src/modules/domain/workflows/factories/execute.factory.ts +0 -96
  525. package/back-end-node/src/modules/domain/workflows/factories/options.factory.ts +0 -7
  526. package/back-end-node/src/modules/domain/workflows/factories/selectors.factory.ts +0 -33
  527. package/back-end-node/src/modules/domain/workflows/interface/workflowValidations.interface.ts +0 -45
  528. package/back-end-node/src/modules/domain/workflows/interface/workflows.interface.ts +0 -97
  529. package/back-end-node/src/modules/domain/workflows/live/workflowValidations.default.ts +0 -128
  530. package/back-end-node/src/modules/domain/workflows/live/workflowValidations.utils.ts +0 -107
  531. package/back-end-node/src/modules/domain/workflows/live/workflows.default.ts +0 -182
  532. package/back-end-node/src/modules/domain/workflows/mocks/workflows.test.ts +0 -160
  533. package/back-end-node/src/modules/domain/workflows/mocks/workflows.throwing.ts +0 -15
  534. package/back-end-node/src/modules/domain/workflows/modules/workflowValidations.module.ts +0 -26
  535. package/back-end-node/src/modules/domain/workflows/modules/workflows.module.ts +0 -33
  536. package/back-end-node/src/modules/domain/workflows/repositories/workflowValidations.repository.ts +0 -43
  537. package/back-end-node/src/modules/domain/workflows/repositories/workflows.repository.ts +0 -30
  538. package/back-end-node/src/modules/domain/workflows/schemas/workflowValidations.schema.ts +0 -23
  539. package/back-end-node/src/modules/domain/workflows/schemas/workflows.schema.ts +0 -102
  540. package/back-end-node/src/modules/domain/workflows/workflows.controller.ts +0 -70
  541. package/back-end-node/src/setup/api-doc.setup.ts +0 -34
  542. package/back-end-node/src/version.json +0 -5
  543. package/back-end-node/test/jest-e2e.json +0 -9
  544. package/back-end-node/test/sample.spec.ts +0 -16
  545. package/back-end-node/tsconfig.build.json +0 -4
  546. package/back-end-node/tsconfig.json +0 -22
  547. package/tmp/demo-dist/demo.js +0 -31
  548. package/tmp/demo.ts +0 -30
  549. package/tmp/dev-test.js +0 -67
  550. package/tmp/integration-unawaited.js +0 -184
  551. package/tmp/nest-app-events.json +0 -0
  552. package/tmp/nest-app.js +0 -90
  553. package/tmp/nest-trace-container-test.js +0 -50
  554. package/tmp/promise-map-debug.js +0 -45
  555. package/tmp/promise-map.test.js +0 -72
  556. package/tmp/tslike.js +0 -39
  557. package/tmp/unawaited.test.js +0 -163
package/README.md ADDED
@@ -0,0 +1,335 @@
1
+ # Repro Nest SDK
2
+
3
+ Capture NestJS request/response data, function traces, and Mongoose activity for
4
+ Repro sessions. This SDK is designed for Nest apps running on Express, with
5
+ optional tracing and masking controls.
6
+
7
+ ## 1) Install
8
+
9
+ Requirements:
10
+ - Node.js 18+
11
+ - NestJS app using Express (default) and optionally Mongoose 6+
12
+
13
+ Install the package:
14
+
15
+ ```bash
16
+ npm install repro-nest
17
+ # or
18
+ yarn add repro-nest
19
+ # or
20
+ pnpm add repro-nest
21
+ ```
22
+
23
+ ## 2) Configure
24
+
25
+ At minimum, provide your Repro credentials and wire the middleware. If you want
26
+ function tracing, call `initReproTracing` before importing your `AppModule` so
27
+ Nest classes are instrumented at load time.
28
+
29
+ ```ts
30
+ import 'reflect-metadata';
31
+ import { NestFactory } from '@nestjs/core';
32
+ import mongoose from 'mongoose';
33
+ import {
34
+ initReproTracing,
35
+ reproMiddleware,
36
+ reproMongoosePlugin,
37
+ } from 'repro-nest';
38
+
39
+ const reproConfig = {
40
+ appId: process.env.REPRO_APP_ID as string,
41
+ tenantId: process.env.REPRO_TENANT_ID as string,
42
+ appSecret: process.env.REPRO_APP_SECRET as string,
43
+ };
44
+
45
+ async function bootstrap() {
46
+ // Enable function tracing before loading your modules.
47
+ initReproTracing({
48
+ disableFunctionTypes: ['constructor'],
49
+ logFunctionCalls: false,
50
+ });
51
+
52
+ // Optional: capture MongoDB queries + document diffs.
53
+ mongoose.plugin(reproMongoosePlugin(reproConfig));
54
+
55
+ const { AppModule } = await import('./app.module');
56
+ const app = await NestFactory.create(AppModule);
57
+
58
+ // Capture request/response payloads for tagged Repro sessions.
59
+ app.use(reproMiddleware(reproConfig));
60
+
61
+ await app.listen(3000);
62
+ }
63
+
64
+ bootstrap();
65
+ ```
66
+
67
+ Configuration notes:
68
+ - `REPRO_API_BASE` (optional) overrides the backend base URL used to send data.
69
+
70
+ ### initReproTracing
71
+
72
+ Enables function tracing. Call this before importing `AppModule` so Nest classes
73
+ are loaded through the tracer.
74
+
75
+ Options (type -> purpose):
76
+ - `instrument` (boolean): enable or disable instrumentation of loaded modules.
77
+ - `include` (RegExp[]): file path include patterns for instrumentation.
78
+ - `exclude` (RegExp[]): file path exclude patterns for instrumentation.
79
+ - `mode` (string): tracer mode (defaults to `TRACE_MODE` or `trace`).
80
+ - `samplingMs` (number): sampling interval in milliseconds.
81
+ - `disableFunctionTraces` (DisableFunctionTraceConfig[] | null): drop trace events
82
+ that match rule objects or predicates.
83
+ - `disableFunctionTypes` (TraceRulePattern | null): drop events for matching
84
+ function kinds (for example, constructors).
85
+ - `disableTraceFiles` (DisableTraceFileConfig | DisableTraceFileConfig[] | null):
86
+ drop events emitted from matching files.
87
+ - `traceInterceptors` (boolean): include Nest interceptors in traces (default false).
88
+ - `logFunctionCalls` (boolean): log enter/exit events to console.
89
+
90
+ Type reference:
91
+ - `TraceRulePattern`: `string | number | RegExp | Array<string | number | RegExp>`
92
+ - `DisableFunctionTraceConfig`: `DisableFunctionTraceRule | DisableFunctionTracePredicate`
93
+ - `DisableFunctionTracePredicate`: `(event: TraceEventForFilter) => boolean`
94
+ - `DisableFunctionTraceRule` fields (all accept `TraceRulePattern`):
95
+ - `fn` / `functionName`: function name substring/regex
96
+ - `wrapper` / `wrapperClass` / `className` / `owner`: wrapper/owner name
97
+ - `file`: source filename
98
+ - `line`: source line number
99
+ - `lib` / `library`: npm package name inferred from path
100
+ - `type` / `functionType`: function kind (`method`, `constructor`, etc.)
101
+ - `event` / `eventType`: trace phase (`enter` or `exit`)
102
+ - `DisableTraceByFilename`: `{ file: TraceRulePattern }`
103
+ - `DisableTraceFileConfig`: `TraceRulePattern | DisableTraceByFilename | null | undefined`
104
+
105
+ Full config example (shows every option; aliases are interchangeable, use one per group in real configs):
106
+
107
+ ```ts
108
+ import { initReproTracing } from 'repro-nest';
109
+
110
+ initReproTracing({
111
+ instrument: true,
112
+ include: [/^\/app\/src\//],
113
+ exclude: [/node_modules\//, /dist\//],
114
+ mode: process.env.TRACE_MODE || 'trace',
115
+ samplingMs: 10,
116
+ disableFunctionTraces: [
117
+ {
118
+ fn: 'findAll',
119
+ wrapper: 'TasksService',
120
+ file: 'src/tasks/tasks.service.ts',
121
+ line: 27,
122
+ lib: 'mongoose',
123
+ type: 'method',
124
+ event: 'exit',
125
+ },
126
+ {
127
+ functionName: 'formatSensitiveData',
128
+ wrapperClass: 'AuthService',
129
+ className: 'AuthService',
130
+ owner: 'AuthService',
131
+ library: 'bcrypt',
132
+ functionType: 'method',
133
+ eventType: 'enter',
134
+ },
135
+ (event) => event.fn?.startsWith('debug') ?? false,
136
+ ],
137
+ disableFunctionTypes: ['constructor', /getter/i],
138
+ disableTraceFiles: [
139
+ /node_modules\/some-logger\//,
140
+ { file: 'dist/health.check.js' },
141
+ 'dist/generated.js',
142
+ ],
143
+ traceInterceptors: true,
144
+ logFunctionCalls: false,
145
+ });
146
+ ```
147
+
148
+ ### reproMiddleware
149
+
150
+ Captures request/response payloads for active Repro sessions. Requests must
151
+ include `x-bug-session-id` and `x-bug-action-id` headers to be captured.
152
+
153
+ Options (type -> purpose):
154
+ - `appId` (string): Repro app id.
155
+ - `tenantId` (string): Repro tenant id.
156
+ - `appSecret` (string): Repro app secret.
157
+ - `captureHeaders` (boolean | HeaderCaptureOptions): enable/disable header capture
158
+ and masking.
159
+ - `masking` (ReproMaskingConfig): mask request/response bodies and trace args/returns.
160
+
161
+ Header capture options (`HeaderCaptureOptions`):
162
+ - `allowSensitiveHeaders` (boolean): keep default sensitive headers unmasked.
163
+ - `maskHeaders` (HeaderRule | HeaderRule[]): header names to mask.
164
+ - `dropHeaders` (HeaderRule | HeaderRule[]): alias for `maskHeaders`.
165
+ - `unmaskHeaders` (HeaderRule | HeaderRule[]): header names to keep unmasked.
166
+ - `keepHeaders` (HeaderRule | HeaderRule[]): alias for `unmaskHeaders`.
167
+ - `HeaderRule`: `string | RegExp`
168
+
169
+ Masking options (`ReproMaskingConfig`):
170
+ - `replacement` (any): default replacement value (defaults to `"[REDACTED]"`).
171
+ - `rules` (ReproMaskRule[] | null): list of masking rules.
172
+
173
+ Masking rule options (`ReproMaskRule`):
174
+ - `when` (ReproMaskWhen): scope rules by request or function trace fields.
175
+ - `target` (ReproMaskTarget | ReproMaskTarget[]): where to apply the mask.
176
+ - `paths` (string | string[]): dot/bracket paths to mask.
177
+ - `keys` (TraceRulePattern): mask keys anywhere in the payload.
178
+ - `replacement` (any): override replacement value for this rule.
179
+
180
+ `ReproMaskTarget` values:
181
+ - `request.headers`, `request.body`, `request.params`, `request.query`
182
+ - `response.body`, `trace.args`, `trace.returnValue`, `trace.error`
183
+
184
+ `ReproMaskWhen` fields (all accept `TraceRulePattern` unless noted):
185
+ - Request scope: `method`, `path`, `key`
186
+ - Function scope: `fn` / `functionName`, `wrapper` / `wrapperClass` / `className` / `owner`,
187
+ `file`, `line`, `lib` / `library`, `type` / `functionType`, `event` / `eventType`
188
+
189
+ Full config example (shows every option; aliases are interchangeable, use one per group in real configs):
190
+
191
+ ```ts
192
+ import { reproMiddleware } from 'repro-nest';
193
+
194
+ app.use(reproMiddleware({
195
+ appId: process.env.REPRO_APP_ID as string,
196
+ tenantId: process.env.REPRO_TENANT_ID as string,
197
+ appSecret: process.env.REPRO_APP_SECRET as string,
198
+ captureHeaders: {
199
+ allowSensitiveHeaders: false,
200
+ maskHeaders: [/authorization/i, /cookie/i],
201
+ dropHeaders: ['x-api-key'],
202
+ unmaskHeaders: ['x-request-id'],
203
+ keepHeaders: ['x-trace-id'],
204
+ },
205
+ masking: {
206
+ replacement: '[REDACTED]',
207
+ rules: [
208
+ {
209
+ when: { method: 'POST', path: '/api/auth/login', key: 'POST /api/auth/login' },
210
+ target: ['request.body', 'response.body'],
211
+ paths: ['password'],
212
+ keys: [/token/i],
213
+ replacement: '[FILTERED]',
214
+ },
215
+ {
216
+ when: {
217
+ functionName: 'findAll',
218
+ wrapperClass: 'TasksService',
219
+ file: 'src/tasks/tasks.service.ts',
220
+ line: 27,
221
+ library: 'mongoose',
222
+ functionType: 'method',
223
+ eventType: 'exit',
224
+ },
225
+ target: ['trace.args', 'trace.returnValue', 'trace.error'],
226
+ paths: ['0.user.token'],
227
+ keys: ['password'],
228
+ },
229
+ {
230
+ when: {
231
+ fn: 'create',
232
+ wrapper: 'UsersService',
233
+ className: 'UsersService',
234
+ owner: 'UsersService',
235
+ lib: 'mongoose',
236
+ type: 'method',
237
+ event: 'enter',
238
+ },
239
+ target: 'trace.args',
240
+ paths: ['0.password'],
241
+ },
242
+ ],
243
+ },
244
+ }));
245
+ ```
246
+
247
+ See `docs/tracing.md` for full masking and trace filtering details.
248
+
249
+ ### Mongoose plugin
250
+
251
+ `reproMongoosePlugin` attaches schema middleware to capture query activity and
252
+ document diffs. It emits data only when a Repro session is active (i.e., when
253
+ `reproMiddleware` has set the session context for the current request).
254
+
255
+ Arguments:
256
+ - `appId` (string): Repro app id
257
+ - `tenantId` (string): Repro tenant id
258
+ - `appSecret` (string): Repro app secret
259
+
260
+ Example: global plugin (all schemas)
261
+
262
+ ```ts
263
+ import mongoose from 'mongoose';
264
+ import { reproMongoosePlugin } from 'repro-nest';
265
+
266
+ mongoose.plugin(reproMongoosePlugin({
267
+ appId: process.env.REPRO_APP_ID as string,
268
+ tenantId: process.env.REPRO_TENANT_ID as string,
269
+ appSecret: process.env.REPRO_APP_SECRET as string,
270
+ }));
271
+ ```
272
+
273
+ Example: Nest `MongooseModule` connection factory
274
+
275
+ ```ts
276
+ import { MongooseModule } from '@nestjs/mongoose';
277
+ import { reproMongoosePlugin } from 'repro-nest';
278
+
279
+ MongooseModule.forRoot(process.env.MONGO_URL as string, {
280
+ connectionFactory: (connection) => {
281
+ connection.plugin(reproMongoosePlugin({
282
+ appId: process.env.REPRO_APP_ID as string,
283
+ tenantId: process.env.REPRO_TENANT_ID as string,
284
+ appSecret: process.env.REPRO_APP_SECRET as string,
285
+ }));
286
+ return connection;
287
+ },
288
+ });
289
+ ```
290
+
291
+ Example: schema-level plugin (single model)
292
+
293
+ ```ts
294
+ import { Schema } from 'mongoose';
295
+ import { reproMongoosePlugin } from 'repro-nest';
296
+
297
+ const userSchema = new Schema({ email: String });
298
+ userSchema.plugin(reproMongoosePlugin({
299
+ appId: process.env.REPRO_APP_ID as string,
300
+ tenantId: process.env.REPRO_TENANT_ID as string,
301
+ appSecret: process.env.REPRO_APP_SECRET as string,
302
+ }));
303
+ ```
304
+
305
+ ## 3) Run
306
+
307
+ Run your Nest app as usual after wiring the SDK:
308
+
309
+ ```bash
310
+ npm run start:dev
311
+ # or
312
+ node dist/main.js
313
+ ```
314
+
315
+ If you use `initReproTracing`, keep it at the top of your bootstrap so modules
316
+ load after instrumentation is enabled.
317
+
318
+ ## 4) Verify It Works
319
+
320
+ Send a request with Repro headers and confirm the session shows up in Repro.
321
+
322
+ ```bash
323
+ curl \
324
+ -H "x-bug-session-id: session-123" \
325
+ -H "x-bug-action-id: action-123" \
326
+ http://localhost:3000/health
327
+ ```
328
+
329
+ Verification tips:
330
+ - If the Repro UI does not show the session, confirm `REPRO_API_BASE` and
331
+ credentials are correct.
332
+ - Temporarily set `logFunctionCalls: true` in `initReproTracing` to see trace
333
+ enter/exit logs in your console.
334
+ - If you use Mongoose, exercise a query/mutation and verify DB entries appear
335
+ in the session trace.
package/dist/index.js CHANGED
@@ -367,6 +367,33 @@ function shouldDropTraceEvent(event) {
367
367
  }
368
368
  return false;
369
369
  }
370
+ function shouldPropagateUserDisabledFunctionTrace(event) {
371
+ const rules = userDisabledFunctionTraceRules;
372
+ if (!rules || rules.length === 0)
373
+ return false;
374
+ for (const rule of rules) {
375
+ try {
376
+ if (typeof rule === 'function') {
377
+ const enterEvent = { ...event, type: 'enter', eventType: 'enter' };
378
+ const exitEvent = { ...event, type: 'exit', eventType: 'exit' };
379
+ if (rule(enterEvent) && rule(exitEvent))
380
+ return true;
381
+ }
382
+ else if (matchesRule(rule, event)) {
383
+ const eventTypePattern = rule.eventType ?? rule.event;
384
+ if (!matchesPattern('enter', eventTypePattern))
385
+ continue;
386
+ if (!matchesPattern('exit', eventTypePattern))
387
+ continue;
388
+ return true;
389
+ }
390
+ }
391
+ catch {
392
+ // ignore user filter errors
393
+ }
394
+ }
395
+ return false;
396
+ }
370
397
  function setDisabledFunctionTraces(rules) {
371
398
  if (!rules || !Array.isArray(rules)) {
372
399
  userDisabledFunctionTraceRules = null;
@@ -1689,7 +1716,11 @@ function reproMiddleware(cfg) {
1689
1716
  evt.unawaited = ev.unawaited === true;
1690
1717
  }
1691
1718
  const dropEvent = shouldDropTraceEvent(candidate);
1719
+ const dropSpanTree = shouldPropagateUserDisabledFunctionTrace(candidate);
1692
1720
  const spanKey = normalizeSpanId(evt.spanId);
1721
+ const parentSpanKey = normalizeSpanId(evt.parentSpanId);
1722
+ const isChildOfExcluded = parentSpanKey ? isExcludedSpanId(parentSpanKey) : false;
1723
+ const isExcluded = spanKey ? isExcludedSpanId(spanKey) : false;
1693
1724
  if (evt.type === 'enter') {
1694
1725
  lastEventAt = Date.now();
1695
1726
  if (spanKey) {
@@ -1708,8 +1739,8 @@ function reproMiddleware(cfg) {
1708
1739
  anonymousSpanDepth = Math.max(0, anonymousSpanDepth - 1);
1709
1740
  }
1710
1741
  }
1711
- if (dropEvent) {
1712
- if (evt.type === 'enter' && spanKey) {
1742
+ if (dropEvent || isChildOfExcluded || isExcluded) {
1743
+ if (evt.type === 'enter' && spanKey && (dropSpanTree || isChildOfExcluded || isExcluded)) {
1713
1744
  try {
1714
1745
  getCtx().excludedSpanIds?.add(spanKey);
1715
1746
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repro-nest",
3
- "version": "0.0.219",
3
+ "version": "0.0.220",
4
4
  "description": "Repro Nest SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,7 +11,7 @@
11
11
  "scripts": {
12
12
  "build": "tsc -p tsconfig.json",
13
13
  "prepublishOnly": "npm run build",
14
- "test": "npm run build && node tmp/unawaited.test.js && node tmp/integration-unawaited.js && node -r ./tracer/register tmp/promise-map.test.js"
14
+ "test": "npm run build && node tmp/unawaited.test.js && node tmp/integration-unawaited.js && node -r ./tracer/register tmp/promise-map.test.js && node tmp/disable-subtree.test.js"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "express": "^5.1.0",
package/src/index.ts CHANGED
@@ -532,6 +532,28 @@ function shouldDropTraceEvent(event: TraceEventForFilter): boolean {
532
532
  return false;
533
533
  }
534
534
 
535
+ function shouldPropagateUserDisabledFunctionTrace(event: TraceEventForFilter): boolean {
536
+ const rules = userDisabledFunctionTraceRules;
537
+ if (!rules || rules.length === 0) return false;
538
+ for (const rule of rules) {
539
+ try {
540
+ if (typeof rule === 'function') {
541
+ const enterEvent = { ...event, type: 'enter', eventType: 'enter' } as TraceEventForFilter;
542
+ const exitEvent = { ...event, type: 'exit', eventType: 'exit' } as TraceEventForFilter;
543
+ if (rule(enterEvent) && rule(exitEvent)) return true;
544
+ } else if (matchesRule(rule, event)) {
545
+ const eventTypePattern = rule.eventType ?? rule.event;
546
+ if (!matchesPattern('enter', eventTypePattern)) continue;
547
+ if (!matchesPattern('exit', eventTypePattern)) continue;
548
+ return true;
549
+ }
550
+ } catch {
551
+ // ignore user filter errors
552
+ }
553
+ }
554
+ return false;
555
+ }
556
+
535
557
  export function setDisabledFunctionTraces(rules?: DisableFunctionTraceConfig[] | null) {
536
558
  if (!rules || !Array.isArray(rules)) {
537
559
  userDisabledFunctionTraceRules = null;
@@ -1977,16 +1999,20 @@ export function reproMiddleware(cfg: ReproMiddlewareConfig) {
1977
1999
  if (ev.threw !== undefined) {
1978
2000
  evt.threw = Boolean(ev.threw);
1979
2001
  }
1980
- if (ev.unawaited !== undefined) {
1981
- evt.unawaited = ev.unawaited === true;
1982
- }
1983
-
1984
- const dropEvent = shouldDropTraceEvent(candidate);
1985
- const spanKey = normalizeSpanId(evt.spanId);
1986
- if (evt.type === 'enter') {
1987
- lastEventAt = Date.now();
1988
- if (spanKey) {
1989
- activeSpans.add(spanKey);
2002
+ if (ev.unawaited !== undefined) {
2003
+ evt.unawaited = ev.unawaited === true;
2004
+ }
2005
+
2006
+ const dropEvent = shouldDropTraceEvent(candidate);
2007
+ const dropSpanTree = shouldPropagateUserDisabledFunctionTrace(candidate);
2008
+ const spanKey = normalizeSpanId(evt.spanId);
2009
+ const parentSpanKey = normalizeSpanId(evt.parentSpanId);
2010
+ const isChildOfExcluded = parentSpanKey ? isExcludedSpanId(parentSpanKey) : false;
2011
+ const isExcluded = spanKey ? isExcludedSpanId(spanKey) : false;
2012
+ if (evt.type === 'enter') {
2013
+ lastEventAt = Date.now();
2014
+ if (spanKey) {
2015
+ activeSpans.add(spanKey);
1990
2016
  } else {
1991
2017
  anonymousSpanDepth = Math.max(0, anonymousSpanDepth + 1);
1992
2018
  }
@@ -1996,16 +2022,16 @@ export function reproMiddleware(cfg: ReproMiddlewareConfig) {
1996
2022
  activeSpans.delete(spanKey);
1997
2023
  } else if (!spanKey && anonymousSpanDepth > 0) {
1998
2024
  anonymousSpanDepth = Math.max(0, anonymousSpanDepth - 1);
1999
- }
2000
- }
2001
-
2002
- if (dropEvent) {
2003
- if (evt.type === 'enter' && spanKey) {
2004
- try { (getCtx() as Ctx).excludedSpanIds?.add(spanKey); } catch {}
2005
- }
2006
- if (finished) {
2007
- scheduleIdleFlush();
2008
- }
2025
+ }
2026
+ }
2027
+
2028
+ if (dropEvent || isChildOfExcluded || isExcluded) {
2029
+ if (evt.type === 'enter' && spanKey && (dropSpanTree || isChildOfExcluded || isExcluded)) {
2030
+ try { (getCtx() as Ctx).excludedSpanIds?.add(spanKey); } catch {}
2031
+ }
2032
+ if (finished) {
2033
+ scheduleIdleFlush();
2034
+ }
2009
2035
  return;
2010
2036
  }
2011
2037
 
@@ -1,59 +0,0 @@
1
- # compiled output
2
- /dist
3
- /node_modules
4
- /build
5
-
6
- # Logs
7
- logs
8
- *.log
9
- npm-debug.log*
10
- pnpm-debug.log*
11
- yarn-debug.log*
12
- yarn-error.log*
13
- lerna-debug.log*
14
-
15
- # OS
16
- .DS_Store
17
-
18
- # Tests
19
- /coverage
20
- /.nyc_output
21
-
22
- # IDEs and editors
23
- /.idea
24
- .project
25
- .classpath
26
- .c9/
27
- *.launch
28
- .settings/
29
- *.sublime-workspace
30
-
31
- # IDE - VSCode
32
- .vscode/*
33
- !.vscode/settings.json
34
- !.vscode/tasks.json
35
- !.vscode/launch.json
36
- !.vscode/extensions.json
37
-
38
- # dotenv environment variable files
39
- .env
40
- .env.*
41
-
42
- # temp directory
43
- .temp
44
- .tmp
45
-
46
- # Runtime data
47
- pids
48
- *.pid
49
- *.seed
50
- *.pid.lock
51
-
52
- # Diagnostic reports (https://nodejs.org/api/report.html)
53
- report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
54
-
55
- # Temp/Scratch files
56
- tmp.*
57
- *.tmp
58
- **/tmp.*
59
- **/*.tmp
@@ -1,11 +0,0 @@
1
- ## ๐ŸŽŸ๏ธ Issue Reference
2
-
3
- [SL-123](https://korioclinical.atlassian.net/browse/SL-123)
4
-
5
- ## ๐Ÿ’ก Context
6
-
7
- [THIS SECTION IS REQUIRED. Provide a brief (or prolonged, if you prefer) description of this PR. What does it accomplish and how? Is new functionality introduced? Has existing code been refactored? If applicable, you may list individual changes as bullet points, create subsections with detailed specifications, or simply write a sentence or two explaining the result of this code.]
8
-
9
- ## ๐Ÿงช Testing Story
10
-
11
- [THIS SECTION IS REQUIRED. In many cases, a simple accounting of the development process will suffice here, e.g. "Opened the Subjects Management grid and confirmed that the detail tray could be opened." For complicated actions, you are of course welcome to provide as detailed of reproduction steps as you feel to be necessary.]
@@ -1,21 +0,0 @@
1
- ############################
2
- ### MANAGED BY TERRAFORM ###
3
- ############################
4
-
5
- # https://github.com/korio-clinical/terraform-infra/tree/main/org/github_workflows
6
- name: 'Dev Deploy'
7
-
8
- on:
9
- workflow_dispatch:
10
- push:
11
- branches:
12
- - main
13
- paths-ignore:
14
- - '.github/workflows/**'
15
-
16
- jobs:
17
- deploy:
18
- uses: korio-clinical/github-reusable-workflows/.github/workflows/deploy.yml@main
19
- with:
20
- environment: dev
21
- secrets: inherit
@@ -1,29 +0,0 @@
1
- # Tech Debt: This Workflow should be moved into the github-reusable-workflows pr.yaml workflow once we have formatting implemented on all repos.
2
- name: 'NodeJS Formatting Check'
3
-
4
- on:
5
- pull_request:
6
- branches:
7
- - main
8
- - release/*
9
-
10
- jobs:
11
- check-formatting:
12
- name: 'Check Formatting'
13
- continue-on-error: true
14
- runs-on: ubuntu-latest
15
- steps:
16
- - name: 'Checkout'
17
- uses: actions/checkout@v4.2.2
18
-
19
- - name: 'Setup Node'
20
- uses: actions/setup-node@v4.2.0
21
- with:
22
- node-version: 18.16
23
-
24
- - name: 'npm ci'
25
- run: npm ci
26
-
27
-
28
- - name: 'prettier --check'
29
- run: npm run format:check
@@ -1,16 +0,0 @@
1
- ############################
2
- ### MANAGED BY TERRAFORM ###
3
- ############################
4
-
5
- # https://github.com/korio-clinical/terraform-infra/tree/main/org/github_workflows
6
- name: 'Platform Deploy'
7
-
8
- on:
9
- workflow_dispatch:
10
-
11
- jobs:
12
- deploy:
13
- uses: korio-clinical/github-reusable-workflows/.github/workflows/deploy.yml@main
14
- with:
15
- environment: platform
16
- secrets: inherit
@@ -1,21 +0,0 @@
1
- ############################
2
- ### MANAGED BY TERRAFORM ###
3
- ############################
4
-
5
- # https://github.com/korio-clinical/terraform-infra/tree/main/org/github_workflows
6
- name: 'Platform3 Deploy'
7
-
8
- on:
9
- workflow_dispatch:
10
- inputs:
11
- force_build:
12
- description: Build image even if exists
13
- type: boolean
14
- default: false
15
-
16
- jobs:
17
- deploy:
18
- uses: korio-clinical/github-reusable-workflows/.github/workflows/deploy.yml@main
19
- with:
20
- environment: platform3
21
- secrets: inherit
@@ -1,22 +0,0 @@
1
- ############################
2
- ### MANAGED BY TERRAFORM ###
3
- ############################
4
-
5
- # https://github.com/korio-clinical/terraform-infra/tree/main/org/github_workflows
6
- name: PR
7
-
8
- on:
9
- pull_request:
10
- branches:
11
- - main
12
- - release/*
13
-
14
- concurrency:
15
- group: ${{ github.workflow }}-${{ github.ref }}
16
- cancel-in-progress: true
17
-
18
- jobs:
19
- pr:
20
- name: 'Checks'
21
- uses: korio-clinical/github-reusable-workflows/.github/workflows/pr.yml@main
22
- secrets: inherit