repro-nest 0.0.218 โ†’ 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 (559) hide show
  1. package/README.md +335 -0
  2. package/dist/index.js +34 -3
  3. package/dist/integrations/sendgrid.js +1 -1
  4. package/package.json +2 -2
  5. package/src/index.ts +47 -21
  6. package/src/integrations/sendgrid.ts +1 -1
  7. package/back-end-node/.dockerignore +0 -59
  8. package/back-end-node/.github/pull_request_template.md +0 -11
  9. package/back-end-node/.github/workflows/dev-deploy.yaml +0 -21
  10. package/back-end-node/.github/workflows/node-format-check.yaml +0 -29
  11. package/back-end-node/.github/workflows/platform-deploy.yaml +0 -16
  12. package/back-end-node/.github/workflows/platform3-deploy.yaml +0 -21
  13. package/back-end-node/.github/workflows/pr.yaml +0 -22
  14. package/back-end-node/.github/workflows/prod-deploy.yaml +0 -19
  15. package/back-end-node/.github/workflows/prod3-deploy.yaml +0 -18
  16. package/back-end-node/.github/workflows/sandbox-deploy.yaml +0 -16
  17. package/back-end-node/.github/workflows/staging-deploy.yaml +0 -19
  18. package/back-end-node/.github/workflows/staging3-deploy.yaml +0 -18
  19. package/back-end-node/.github/workflows/test-deploy.yaml +0 -16
  20. package/back-end-node/.hooks/pre-commit +0 -3
  21. package/back-end-node/.husky/pre-commit +0 -1
  22. package/back-end-node/.prettierignore +0 -6
  23. package/back-end-node/.prettierrc +0 -30
  24. package/back-end-node/README.md +0 -172
  25. package/back-end-node/eslint.config.mjs +0 -31
  26. package/back-end-node/nest-cli.json +0 -20
  27. package/back-end-node/package-lock.json +0 -13101
  28. package/back-end-node/package.json +0 -118
  29. package/back-end-node/src/app.module.ts +0 -10
  30. package/back-end-node/src/app.ts +0 -75
  31. package/back-end-node/src/common/constants/collection-names.ts +0 -51
  32. package/back-end-node/src/common/constants/discriminators.ts +0 -65
  33. package/back-end-node/src/common/constants/email-templates.ts +0 -4
  34. package/back-end-node/src/common/constants/emailConstants.ts +0 -74
  35. package/back-end-node/src/common/constants/notification-trigger-actions.ts +0 -37
  36. package/back-end-node/src/common/constants/protocols.ts +0 -4
  37. package/back-end-node/src/common/constants/view-constants.ts +0 -31
  38. package/back-end-node/src/common/decorators/user.decorator.ts +0 -8
  39. package/back-end-node/src/common/dtos/activity-log.output.ts +0 -38
  40. package/back-end-node/src/common/dtos/base.dto.ts +0 -5
  41. package/back-end-node/src/common/dtos/column-config.output.ts +0 -89
  42. package/back-end-node/src/common/dtos/general-response.output.ts +0 -96
  43. package/back-end-node/src/common/dtos/generic-error.dto.ts +0 -18
  44. package/back-end-node/src/common/dtos/get-paginated-data.input.ts +0 -42
  45. package/back-end-node/src/common/dtos/paginated-result.output.ts +0 -24
  46. package/back-end-node/src/common/types/common.types.ts +0 -39
  47. package/back-end-node/src/common/types/environment.types.ts +0 -5
  48. package/back-end-node/src/common/types/listing-query.ts +0 -19
  49. package/back-end-node/src/common/utils/azureBlobStorage/fileUpload.ts +0 -42
  50. package/back-end-node/src/common/utils/azureBlobStorage/index.ts +0 -31
  51. package/back-end-node/src/common/utils/common.utils.ts +0 -215
  52. package/back-end-node/src/common/utils/discriminator-defaults.ts +0 -6
  53. package/back-end-node/src/common/utils/errorHandling.ts +0 -21
  54. package/back-end-node/src/common/utils/logger.ts +0 -21
  55. package/back-end-node/src/common/utils/mapper-manager.ts +0 -10
  56. package/back-end-node/src/common/utils/models.ts +0 -11
  57. package/back-end-node/src/common/utils/pipelineUtil.ts +0 -54
  58. package/back-end-node/src/common/utils/strings.ts +0 -41
  59. package/back-end-node/src/modules/config/config.module.ts +0 -18
  60. package/back-end-node/src/modules/config/config.service.ts +0 -50
  61. package/back-end-node/src/modules/config/config.ts +0 -45
  62. package/back-end-node/src/modules/core/auth/auth-module.ts +0 -19
  63. package/back-end-node/src/modules/core/auth/auth.controller.ts +0 -233
  64. package/back-end-node/src/modules/core/auth/auth.service.ts +0 -146
  65. package/back-end-node/src/modules/core/auth/dto/input/login.input.ts +0 -21
  66. package/back-end-node/src/modules/core/auth/dto/input/reset-password.input.ts +0 -33
  67. package/back-end-node/src/modules/core/auth/dto/input/sign-up.input.ts +0 -28
  68. package/back-end-node/src/modules/core/auth/dto/input/validate-pin.input.ts +0 -21
  69. package/back-end-node/src/modules/core/auth/dto/output/login.output.ts +0 -25
  70. package/back-end-node/src/modules/core/auth/dto/output/name.output.ts +0 -20
  71. package/back-end-node/src/modules/core/auth/guards/auth.guard.ts +0 -92
  72. package/back-end-node/src/modules/core/auth/guards/tenant-auth.guard.ts +0 -65
  73. package/back-end-node/src/modules/core/auth/strategies/bearer.strategy.ts +0 -53
  74. package/back-end-node/src/modules/core/auth/utils/user-roles.ts +0 -85
  75. package/back-end-node/src/modules/core/auth/utils/validate-pin-and-password.ts +0 -18
  76. package/back-end-node/src/modules/core/azure/azure-auth-provider.ts +0 -40
  77. package/back-end-node/src/modules/core/azure/azure.module.ts +0 -10
  78. package/back-end-node/src/modules/core/azure/azure.types.ts +0 -20
  79. package/back-end-node/src/modules/core/azure/services/azure-graph.service.ts +0 -118
  80. package/back-end-node/src/modules/core/blinding/blinding-module.ts +0 -40
  81. package/back-end-node/src/modules/core/blinding/dto/requestDto.ts +0 -26
  82. package/back-end-node/src/modules/core/blinding/interceptors/blinding.interceptor.ts +0 -67
  83. package/back-end-node/src/modules/core/blinding/interceptors/permission.interceptor.ts +0 -39
  84. package/back-end-node/src/modules/core/blinding/interceptors/reports.interceptor.ts +0 -34
  85. package/back-end-node/src/modules/core/blinding/mailer/blinding-mailer.service.ts +0 -125
  86. package/back-end-node/src/modules/core/blinding/mailer/constants.ts +0 -25
  87. package/back-end-node/src/modules/core/blinding/mailer/core/default.ts +0 -85
  88. package/back-end-node/src/modules/core/blinding/mailer/core/mail-data.service.ts +0 -97
  89. package/back-end-node/src/modules/core/blinding/mailer/handlers/blinded.handler.ts +0 -112
  90. package/back-end-node/src/modules/core/blinding/mailer/handlers/open-label.handler.ts +0 -90
  91. package/back-end-node/src/modules/core/blinding/mailer/handlers/unblinded.handler.ts +0 -122
  92. package/back-end-node/src/modules/core/blinding/mailer/interfaces/core.ts +0 -12
  93. package/back-end-node/src/modules/core/blinding/mailer/interfaces/data.service.ts +0 -58
  94. package/back-end-node/src/modules/core/blinding/mailer/interfaces/handler.ts +0 -14
  95. package/back-end-node/src/modules/core/blinding/mailer/types.ts +0 -59
  96. package/back-end-node/src/modules/core/blinding/services/blinding.util.ts +0 -30
  97. package/back-end-node/src/modules/core/blinding/services/general-blinding.service.ts +0 -38
  98. package/back-end-node/src/modules/core/blinding/submodules/global-data-module.ts +0 -28
  99. package/back-end-node/src/modules/core/blinding/submodules/tenant-data-module.ts +0 -168
  100. package/back-end-node/src/modules/core/core.module.ts +0 -14
  101. package/back-end-node/src/modules/core/database/database.module.ts +0 -14
  102. package/back-end-node/src/modules/core/database/factories/global-database-connection.factory.ts +0 -37
  103. package/back-end-node/src/modules/core/database/factories/tenant-database-connection.factory.ts +0 -118
  104. package/back-end-node/src/modules/core/database/modules/global/global-database.module.ts +0 -43
  105. package/back-end-node/src/modules/core/database/modules/global/schemas/global-info.schema.ts +0 -23
  106. package/back-end-node/src/modules/core/database/modules/global/schemas/global-protocol.schema.ts +0 -55
  107. package/back-end-node/src/modules/core/database/modules/global/schemas/global-resupply.schema.ts +0 -68
  108. package/back-end-node/src/modules/core/database/modules/global/schemas/global-sponsor.schema.ts +0 -173
  109. package/back-end-node/src/modules/core/database/modules/global/schemas/global-user-permission.schema.ts +0 -56
  110. package/back-end-node/src/modules/core/database/modules/global/schemas/global-users.schema.ts +0 -168
  111. package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/location-access.sub-schema.ts +0 -25
  112. package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/permissions.sub-schema.ts +0 -25
  113. package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/protocol-id-and-name.sub-schema.ts +0 -15
  114. package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/role-permission-detail.sub-schema.ts +0 -18
  115. package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/role-permission.sub-schema.ts +0 -20
  116. package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/user-depot-permission-detail.sub-schema.ts +0 -21
  117. package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/user-site-permission-detail.sub-schema.ts +0 -21
  118. package/back-end-node/src/modules/core/database/modules/tenant/base.repository.ts +0 -70
  119. package/back-end-node/src/modules/core/database/modules/tenant/database-multitenancy.utils.ts +0 -49
  120. package/back-end-node/src/modules/core/database/modules/tenant/inject-tenant-model.decorator.ts +0 -4
  121. package/back-end-node/src/modules/core/database/modules/tenant/tenant-database.module.ts +0 -84
  122. package/back-end-node/src/modules/core/database/modules/tenant/tenant-database.service.ts +0 -52
  123. package/back-end-node/src/modules/core/database/schemas/activity-log.schema.ts +0 -33
  124. package/back-end-node/src/modules/core/database/schemas/company.schema.ts +0 -53
  125. package/back-end-node/src/modules/core/database/schemas/contact-info.schema.ts +0 -24
  126. package/back-end-node/src/modules/core/database/schemas/site-details.schema.ts +0 -20
  127. package/back-end-node/src/modules/core/database/schemas/visit-info-base.schema.ts +0 -21
  128. package/back-end-node/src/modules/core/database/types/common-database.types.ts +0 -9
  129. package/back-end-node/src/modules/core/database/types/database-config.type.ts +0 -15
  130. package/back-end-node/src/modules/core/datetime/datetime.constants.ts +0 -19
  131. package/back-end-node/src/modules/core/datetime/datetime.errors.ts +0 -1
  132. package/back-end-node/src/modules/core/datetime/datetime.helpers.ts +0 -3
  133. package/back-end-node/src/modules/core/datetime/datetime.module.ts +0 -22
  134. package/back-end-node/src/modules/core/datetime/interface/datetime.interface.ts +0 -38
  135. package/back-end-node/src/modules/core/datetime/live/datetime.default.core.ts +0 -139
  136. package/back-end-node/src/modules/core/datetime/live/datetime.util.ts +0 -84
  137. package/back-end-node/src/modules/core/interceptors/fieldHeader.interceptor.ts +0 -33
  138. package/back-end-node/src/modules/core/mailer/README.md +0 -191
  139. package/back-end-node/src/modules/core/mailer/mailer.module.ts +0 -14
  140. package/back-end-node/src/modules/core/mailer/mailer.types.ts +0 -32
  141. package/back-end-node/src/modules/core/mailer/services/base-mailer.service.ts +0 -261
  142. package/back-end-node/src/modules/core/mailer/services/notification-template.service.ts +0 -113
  143. package/back-end-node/src/modules/core/mailer/templateSkeleton.html +0 -156
  144. package/back-end-node/src/modules/core/rabbitmq/interfaces/rabbitmq.interfaces.ts +0 -11
  145. package/back-end-node/src/modules/core/rabbitmq/rabbitmq.module.ts +0 -9
  146. package/back-end-node/src/modules/core/rabbitmq/rabbitmq.service.ts +0 -208
  147. package/back-end-node/src/modules/core/report/report-helper.service.ts +0 -111
  148. package/back-end-node/src/modules/core/report/report.module.ts +0 -12
  149. package/back-end-node/src/modules/core/token/token.module.ts +0 -9
  150. package/back-end-node/src/modules/core/token/token.service.ts +0 -22
  151. package/back-end-node/src/modules/core/token/token.types.ts +0 -3
  152. package/back-end-node/src/modules/domain/batch-release/batch-release.controller.ts +0 -624
  153. package/back-end-node/src/modules/domain/batch-release/batch-release.module.ts +0 -44
  154. package/back-end-node/src/modules/domain/batch-release/batch-release.repository.ts +0 -834
  155. package/back-end-node/src/modules/domain/batch-release/batch-release.utils.ts +0 -43
  156. package/back-end-node/src/modules/domain/batch-release/dto/input/approve-batch-release.input.ts +0 -17
  157. package/back-end-node/src/modules/domain/batch-release/dto/input/batch-release-report.input.ts +0 -18
  158. package/back-end-node/src/modules/domain/batch-release/dto/input/create-batch-release.input.ts +0 -56
  159. package/back-end-node/src/modules/domain/batch-release/dto/input/create-non-serialized-batch-release.input.ts +0 -63
  160. package/back-end-node/src/modules/domain/batch-release/dto/input/get-all-batch-release.input.ts +0 -119
  161. package/back-end-node/src/modules/domain/batch-release/dto/input/manage-batch-release-countries.input.ts +0 -15
  162. package/back-end-node/src/modules/domain/batch-release/dto/input/non-serialized-update-batch-release.input.ts +0 -48
  163. package/back-end-node/src/modules/domain/batch-release/dto/input/retain.input.ts +0 -11
  164. package/back-end-node/src/modules/domain/batch-release/dto/input/update-batch-release-label-groups.input.ts +0 -29
  165. package/back-end-node/src/modules/domain/batch-release/dto/input/update-batch-release.input.ts +0 -48
  166. package/back-end-node/src/modules/domain/batch-release/dto/input/validate-non-serialized-batch-release.input.ts +0 -18
  167. package/back-end-node/src/modules/domain/batch-release/dto/input/validate-serialized-batch-release.input.ts +0 -30
  168. package/back-end-node/src/modules/domain/batch-release/dto/output/batch-release-filters.output.ts +0 -63
  169. package/back-end-node/src/modules/domain/batch-release/dto/output/batch-release-item.output.ts +0 -213
  170. package/back-end-node/src/modules/domain/batch-release/dto/output/batch-release-light-item.output.ts +0 -205
  171. package/back-end-node/src/modules/domain/batch-release/dto/output/batch-release-report.output.ts +0 -262
  172. package/back-end-node/src/modules/domain/batch-release/dto/output/label-group-by-sub-sequence-range.output.ts +0 -39
  173. package/back-end-node/src/modules/domain/batch-release/dto/output/non-serialized-batch-release-validation.output.ts +0 -19
  174. package/back-end-node/src/modules/domain/batch-release/dto/output/paginated-batch-release-item.output.ts +0 -12
  175. package/back-end-node/src/modules/domain/batch-release/dto/output/sequence-range.output.ts +0 -21
  176. package/back-end-node/src/modules/domain/batch-release/dto/output/serialized-batch-release-validation.output.ts +0 -23
  177. package/back-end-node/src/modules/domain/batch-release/dto/output/subsequence-range.output.ts +0 -21
  178. package/back-end-node/src/modules/domain/batch-release/schemas/batch-release.schema.ts +0 -158
  179. package/back-end-node/src/modules/domain/batch-release/services/batch-release-helpers.service.ts +0 -514
  180. package/back-end-node/src/modules/domain/batch-release/services/batch-release-mailer.service.ts +0 -286
  181. package/back-end-node/src/modules/domain/batch-release/services/batch-release.service.ts +0 -1019
  182. package/back-end-node/src/modules/domain/batch-release/types/batch-release-common.types.ts +0 -104
  183. package/back-end-node/src/modules/domain/batch-release/types/batch-release.enums.ts +0 -5
  184. package/back-end-node/src/modules/domain/blinding-group/blinding-group.module.ts +0 -21
  185. package/back-end-node/src/modules/domain/blinding-group/blinding-group.repository.ts +0 -30
  186. package/back-end-node/src/modules/domain/blinding-group/schemas/blinding.group.schema.ts +0 -54
  187. package/back-end-node/src/modules/domain/cohort/cohort.module.ts +0 -12
  188. package/back-end-node/src/modules/domain/cohort/cohort.repository.ts +0 -91
  189. package/back-end-node/src/modules/domain/cohort/cohort.service.ts +0 -16
  190. package/back-end-node/src/modules/domain/cohort/schemas/cohort.schema.ts +0 -90
  191. package/back-end-node/src/modules/domain/config-actions/config-actions.module.ts +0 -30
  192. package/back-end-node/src/modules/domain/config-actions/repositories/config-actions.repository.ts +0 -36
  193. package/back-end-node/src/modules/domain/config-actions/schemas/config-actions.schema.ts +0 -66
  194. package/back-end-node/src/modules/domain/config-actions/schemas/site-status-config-actions.schema.ts +0 -27
  195. package/back-end-node/src/modules/domain/config-actions/types/config-actions.types.ts +0 -16
  196. package/back-end-node/src/modules/domain/country/country.controller.ts +0 -369
  197. package/back-end-node/src/modules/domain/country/country.module.ts +0 -68
  198. package/back-end-node/src/modules/domain/country/country.repository.ts +0 -390
  199. package/back-end-node/src/modules/domain/country/country.types.ts +0 -39
  200. package/back-end-node/src/modules/domain/country/dto/input/create-country.input.ts +0 -21
  201. package/back-end-node/src/modules/domain/country/dto/input/get-study-countries.input.ts +0 -75
  202. package/back-end-node/src/modules/domain/country/dto/input/update-country-depot-status.input.ts +0 -24
  203. package/back-end-node/src/modules/domain/country/dto/input/update-country-label-groups.input.ts +0 -14
  204. package/back-end-node/src/modules/domain/country/dto/input/update-country.input.ts +0 -11
  205. package/back-end-node/src/modules/domain/country/dto/output/country.output.ts +0 -26
  206. package/back-end-node/src/modules/domain/country/dto/output/create-country.output.ts +0 -103
  207. package/back-end-node/src/modules/domain/country/dto/output/deactivation-impact.output.ts +0 -12
  208. package/back-end-node/src/modules/domain/country/dto/output/filter-options.output.ts +0 -25
  209. package/back-end-node/src/modules/domain/country/dto/output/get-country.output.ts +0 -56
  210. package/back-end-node/src/modules/domain/country/dto/output/paginated-study-country.output.ts +0 -8
  211. package/back-end-node/src/modules/domain/country/dto/output/sponsor-country-item.output.ts +0 -16
  212. package/back-end-node/src/modules/domain/country/dto/output/study-country.output.ts +0 -112
  213. package/back-end-node/src/modules/domain/country/dto/output/update-country.output.ts +0 -111
  214. package/back-end-node/src/modules/domain/country/schemas/country.schema.ts +0 -98
  215. package/back-end-node/src/modules/domain/country/services/country-mailer.service.ts +0 -190
  216. package/back-end-node/src/modules/domain/country/services/country.service.ts +0 -510
  217. package/back-end-node/src/modules/domain/domain.module.ts +0 -52
  218. package/back-end-node/src/modules/domain/excursion-tracking/controllers/excursion-tracking.controller.ts +0 -262
  219. package/back-end-node/src/modules/domain/excursion-tracking/dto/input/create-non-serialized-te.input.ts +0 -100
  220. package/back-end-node/src/modules/domain/excursion-tracking/dto/input/create-serialized-te.input.ts +0 -83
  221. package/back-end-node/src/modules/domain/excursion-tracking/dto/input/te-report.input.ts +0 -64
  222. package/back-end-node/src/modules/domain/excursion-tracking/dto/input/update-te.input.ts +0 -28
  223. package/back-end-node/src/modules/domain/excursion-tracking/dto/output/excursion-tracking-log.output.ts +0 -98
  224. package/back-end-node/src/modules/domain/excursion-tracking/dto/output/excursion-tracking-report-filters.output.ts +0 -69
  225. package/back-end-node/src/modules/domain/excursion-tracking/dto/output/excursion-tracking-report.output.ts +0 -243
  226. package/back-end-node/src/modules/domain/excursion-tracking/excursion-tracking.module.ts +0 -65
  227. package/back-end-node/src/modules/domain/excursion-tracking/excursion-tracking.types.ts +0 -28
  228. package/back-end-node/src/modules/domain/excursion-tracking/repositories/excursion-tracking.repository.ts +0 -712
  229. package/back-end-node/src/modules/domain/excursion-tracking/repositories/program-group.repository.ts +0 -50
  230. package/back-end-node/src/modules/domain/excursion-tracking/repositories/status-tracking.repository.ts +0 -83
  231. package/back-end-node/src/modules/domain/excursion-tracking/schemas/excursion-tracking.schema.ts +0 -150
  232. package/back-end-node/src/modules/domain/excursion-tracking/schemas/program-group.schema.ts +0 -54
  233. package/back-end-node/src/modules/domain/excursion-tracking/schemas/status-tracking.schema.ts +0 -43
  234. package/back-end-node/src/modules/domain/excursion-tracking/services/excursion-tracking-helper.service.ts +0 -64
  235. package/back-end-node/src/modules/domain/excursion-tracking/services/excursion-tracking-mailer.service.ts +0 -415
  236. package/back-end-node/src/modules/domain/excursion-tracking/services/excursion-tracking.service.ts +0 -851
  237. package/back-end-node/src/modules/domain/excursion-tracking/services/status-tracking.service.ts +0 -40
  238. package/back-end-node/src/modules/domain/info/README.md +0 -77
  239. package/back-end-node/src/modules/domain/info/info.controller.ts +0 -76
  240. package/back-end-node/src/modules/domain/info/info.module.ts +0 -14
  241. package/back-end-node/src/modules/domain/info/repositories/info.repository.ts +0 -23
  242. package/back-end-node/src/modules/domain/info/services/info.service.ts +0 -21
  243. package/back-end-node/src/modules/domain/label/label.module.ts +0 -18
  244. package/back-end-node/src/modules/domain/label/label.repository.ts +0 -76
  245. package/back-end-node/src/modules/domain/label/label.service.ts +0 -32
  246. package/back-end-node/src/modules/domain/label/label.types.ts +0 -4
  247. package/back-end-node/src/modules/domain/label/schemas/label.schema.ts +0 -31
  248. package/back-end-node/src/modules/domain/protocol/protocol.module.ts +0 -18
  249. package/back-end-node/src/modules/domain/protocol/protocol.repository.ts +0 -44
  250. package/back-end-node/src/modules/domain/protocol/protocol.service.ts +0 -33
  251. package/back-end-node/src/modules/domain/protocol/schemas/protocol.schema.ts +0 -98
  252. package/back-end-node/src/modules/domain/returns/constants/index.ts +0 -25
  253. package/back-end-node/src/modules/domain/returns/dto/input/base-return-shipment.input.ts +0 -20
  254. package/back-end-node/src/modules/domain/returns/dto/input/common.input.ts +0 -46
  255. package/back-end-node/src/modules/domain/returns/dto/input/create-return-shipment.input.ts +0 -117
  256. package/back-end-node/src/modules/domain/returns/dto/input/destory-kits.input.ts +0 -63
  257. package/back-end-node/src/modules/domain/returns/dto/input/destroy-kits-filters.input.ts +0 -25
  258. package/back-end-node/src/modules/domain/returns/dto/input/get-all-returns.input.ts +0 -81
  259. package/back-end-node/src/modules/domain/returns/dto/input/inspectable-kits.input.ts +0 -107
  260. package/back-end-node/src/modules/domain/returns/dto/input/list-kits-to-destroy.input.ts +0 -252
  261. package/back-end-node/src/modules/domain/returns/dto/input/resolve-kits.input.ts +0 -114
  262. package/back-end-node/src/modules/domain/returns/dto/input/update-kits-status.input.ts +0 -111
  263. package/back-end-node/src/modules/domain/returns/dto/input/update-return-shipment.input.ts +0 -32
  264. package/back-end-node/src/modules/domain/returns/dto/output/destroy-kits-filters.output.ts +0 -116
  265. package/back-end-node/src/modules/domain/returns/dto/output/detailed-return-shipment.output.ts +0 -161
  266. package/back-end-node/src/modules/domain/returns/dto/output/generic-response.output.ts +0 -16
  267. package/back-end-node/src/modules/domain/returns/dto/output/inspectable-kits.output.ts +0 -201
  268. package/back-end-node/src/modules/domain/returns/dto/output/kit-return-status-report.output.ts +0 -147
  269. package/back-end-node/src/modules/domain/returns/dto/output/paginated-kit-returns.output.ts +0 -7
  270. package/back-end-node/src/modules/domain/returns/dto/output/resolve-kits.output.ts +0 -107
  271. package/back-end-node/src/modules/domain/returns/dto/output/return-kits-accountability-filters.output.ts +0 -83
  272. package/back-end-node/src/modules/domain/returns/dto/output/return-kits-inspect-filters.output.ts +0 -113
  273. package/back-end-node/src/modules/domain/returns/dto/output/return-kits-reconciliation-filters.output.ts +0 -93
  274. package/back-end-node/src/modules/domain/returns/dto/output/return-kits.output.ts +0 -244
  275. package/back-end-node/src/modules/domain/returns/dto/output/return-shipment.output.ts +0 -205
  276. package/back-end-node/src/modules/domain/returns/dto/output/returns-filters.output.ts +0 -97
  277. package/back-end-node/src/modules/domain/returns/pipes/form-type-validation.pipe.ts +0 -35
  278. package/back-end-node/src/modules/domain/returns/returns.controller.ts +0 -752
  279. package/back-end-node/src/modules/domain/returns/returns.mailer.service.ts +0 -1025
  280. package/back-end-node/src/modules/domain/returns/returns.module.ts +0 -53
  281. package/back-end-node/src/modules/domain/returns/returns.pipeline.ts +0 -1491
  282. package/back-end-node/src/modules/domain/returns/returns.repository.ts +0 -1695
  283. package/back-end-node/src/modules/domain/returns/returns.service.ts +0 -1481
  284. package/back-end-node/src/modules/domain/returns/returns.types.ts +0 -7
  285. package/back-end-node/src/modules/domain/returns/schemas/return-shipment.schema.ts +0 -183
  286. package/back-end-node/src/modules/domain/returns/types/returns-kit-status.ts +0 -6
  287. package/back-end-node/src/modules/domain/returns/types/returns-mailer.ts +0 -211
  288. package/back-end-node/src/modules/domain/shipment/dto/input/create-shipment-request.input.ts +0 -81
  289. package/back-end-node/src/modules/domain/shipment/dto/input/get-all-shipments.input.ts +0 -101
  290. package/back-end-node/src/modules/domain/shipment/dto/input/get-shipment-report-summary.input.ts +0 -73
  291. package/back-end-node/src/modules/domain/shipment/dto/input/shipment-dispatch.input.ts +0 -25
  292. package/back-end-node/src/modules/domain/shipment/dto/input/shipments-cancel.input.ts +0 -12
  293. package/back-end-node/src/modules/domain/shipment/dto/input/update-shipment-and-kits.input.ts +0 -51
  294. package/back-end-node/src/modules/domain/shipment/dto/input/update-shipment-details.input.ts +0 -17
  295. package/back-end-node/src/modules/domain/shipment/dto/output/paginated-shipment-item.output.ts +0 -357
  296. package/back-end-node/src/modules/domain/shipment/dto/output/shipment-details-report.output.ts +0 -154
  297. package/back-end-node/src/modules/domain/shipment/dto/output/shipment-filters.output.ts +0 -107
  298. package/back-end-node/src/modules/domain/shipment/dto/output/shipment-kits.output.ts +0 -125
  299. package/back-end-node/src/modules/domain/shipment/dto/output/shipment-summary-report.output.ts +0 -139
  300. package/back-end-node/src/modules/domain/shipment/dto/output/shipment.output.ts +0 -153
  301. package/back-end-node/src/modules/domain/shipment/repositories/shipment-group.repository.ts +0 -25
  302. package/back-end-node/src/modules/domain/shipment/repositories/shipment.repository.ts +0 -1967
  303. package/back-end-node/src/modules/domain/shipment/schemas/shipment-group.schema.ts +0 -53
  304. package/back-end-node/src/modules/domain/shipment/schemas/shipment.schema.ts +0 -197
  305. package/back-end-node/src/modules/domain/shipment/services/shipment-helper.service.ts +0 -422
  306. package/back-end-node/src/modules/domain/shipment/services/shipment-mailer.service.ts +0 -909
  307. package/back-end-node/src/modules/domain/shipment/services/shipment.service.ts +0 -1969
  308. package/back-end-node/src/modules/domain/shipment/shipment.controller.ts +0 -528
  309. package/back-end-node/src/modules/domain/shipment/shipment.module.ts +0 -57
  310. package/back-end-node/src/modules/domain/shipment/shipment.types.ts +0 -20
  311. package/back-end-node/src/modules/domain/shipment/shipment.utils.ts +0 -116
  312. package/back-end-node/src/modules/domain/shipment/types/shipment.types.ts +0 -80
  313. package/back-end-node/src/modules/domain/sites/dto/input/create-site.input.ts +0 -266
  314. package/back-end-node/src/modules/domain/sites/dto/input/get-ip-contacts-report.input.ts +0 -17
  315. package/back-end-node/src/modules/domain/sites/dto/input/get-sponsor-user-site-supplies-report-data.input.ts +0 -64
  316. package/back-end-node/src/modules/domain/sites/dto/input/site-sites.input.ts +0 -202
  317. package/back-end-node/src/modules/domain/sites/dto/input/update-site-status.input.ts +0 -11
  318. package/back-end-node/src/modules/domain/sites/dto/input/update-site.input.ts +0 -218
  319. package/back-end-node/src/modules/domain/sites/dto/output/site-filters.output.ts +0 -10
  320. package/back-end-node/src/modules/domain/sites/dto/output/site-report.output.ts +0 -9
  321. package/back-end-node/src/modules/domain/sites/dto/output/site-supply-strategy.output.ts +0 -25
  322. package/back-end-node/src/modules/domain/sites/dto/output/site.output.ts +0 -573
  323. package/back-end-node/src/modules/domain/sites/dto/output/sponsor-user-site-details-report.output.ts +0 -131
  324. package/back-end-node/src/modules/domain/sites/dto/output/sponsor-user-site-supplies-report-data.output.ts +0 -105
  325. package/back-end-node/src/modules/domain/sites/dto/output/sponsor-user-sites-summary-report-data.output.ts +0 -53
  326. package/back-end-node/src/modules/domain/sites/dto/output/visit-type-limits.output.ts +0 -42
  327. package/back-end-node/src/modules/domain/sites/repositories/pipelines/common.ts +0 -366
  328. package/back-end-node/src/modules/domain/sites/repositories/pipelines/sponsorUserSiteSuppliesReports.ts +0 -1008
  329. package/back-end-node/src/modules/domain/sites/repositories/sites.repository.ts +0 -937
  330. package/back-end-node/src/modules/domain/sites/schemas/address-hostory.schema.ts +0 -156
  331. package/back-end-node/src/modules/domain/sites/site-sites.controller.ts +0 -413
  332. package/back-end-node/src/modules/domain/sites/sites.controller.ts +0 -222
  333. package/back-end-node/src/modules/domain/sites/sites.mailer.service.ts +0 -248
  334. package/back-end-node/src/modules/domain/sites/sites.module.ts +0 -50
  335. package/back-end-node/src/modules/domain/sites/sites.service.ts +0 -2904
  336. package/back-end-node/src/modules/domain/sites/types/types.ts +0 -276
  337. package/back-end-node/src/modules/domain/sites-and-depots/controllers/depots.controller.ts +0 -520
  338. package/back-end-node/src/modules/domain/sites-and-depots/controllers/sites-and-depots.controller.ts +0 -21
  339. package/back-end-node/src/modules/domain/sites-and-depots/dto/input/create-depot.input.ts +0 -169
  340. package/back-end-node/src/modules/domain/sites-and-depots/dto/input/duplicate-depot-validation.input.ts +0 -11
  341. package/back-end-node/src/modules/domain/sites-and-depots/dto/input/get-depot-reports.input.ts +0 -38
  342. package/back-end-node/src/modules/domain/sites-and-depots/dto/input/search-depot.input.ts +0 -50
  343. package/back-end-node/src/modules/domain/sites-and-depots/dto/input/update-status.input.ts +0 -15
  344. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/all-depots-report.output.ts +0 -43
  345. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/create-depot.output.ts +0 -18
  346. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/depot-name-list-item.output.ts +0 -31
  347. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/depot.output.ts +0 -48
  348. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/duplicate-depot-validation.input.ts +0 -3
  349. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/get-depot-filters.output.ts +0 -63
  350. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/kit-count.output.ts +0 -85
  351. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/protocol-depots.output.ts +0 -27
  352. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/receiving-locaitons.output.ts +0 -31
  353. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/search-depots.output.ts +0 -267
  354. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/ship-to-countries.output.ts +0 -16
  355. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/shipping-details.output.ts +0 -54
  356. package/back-end-node/src/modules/domain/sites-and-depots/dto/output/sponsor-depot.output.ts +0 -61
  357. package/back-end-node/src/modules/domain/sites-and-depots/repositories/pipelines/get-protocol-depots.pipeline.ts +0 -41
  358. package/back-end-node/src/modules/domain/sites-and-depots/repositories/sites-and-depots.repository.ts +0 -652
  359. package/back-end-node/src/modules/domain/sites-and-depots/schemas/depot.schema.ts +0 -76
  360. package/back-end-node/src/modules/domain/sites-and-depots/schemas/site.schema.ts +0 -114
  361. package/back-end-node/src/modules/domain/sites-and-depots/schemas/sites-and-depots.schema.ts +0 -133
  362. package/back-end-node/src/modules/domain/sites-and-depots/services/depots-mailer.service.ts +0 -167
  363. package/back-end-node/src/modules/domain/sites-and-depots/services/depots.service.ts +0 -752
  364. package/back-end-node/src/modules/domain/sites-and-depots/services/sites-and-depots.service.ts +0 -230
  365. package/back-end-node/src/modules/domain/sites-and-depots/sites-and-depots.module.ts +0 -82
  366. package/back-end-node/src/modules/domain/sites-and-depots/types/sites-and-depots.types.ts +0 -242
  367. package/back-end-node/src/modules/domain/study/repositories/study-config.repository.ts +0 -297
  368. package/back-end-node/src/modules/domain/study/schemas/study-config-blinding-aggregation.schema.ts +0 -35
  369. package/back-end-node/src/modules/domain/study/schemas/study-config-blindingview.schema.ts +0 -61
  370. package/back-end-node/src/modules/domain/study/schemas/study-config-cohorts.schema.ts +0 -115
  371. package/back-end-node/src/modules/domain/study/schemas/study-config-fieldHeader.schema.ts +0 -48
  372. package/back-end-node/src/modules/domain/study/schemas/study-config-notification.schema.ts +0 -166
  373. package/back-end-node/src/modules/domain/study/schemas/study-config-product-returns.schema.ts +0 -82
  374. package/back-end-node/src/modules/domain/study/schemas/study-config-report.schema.ts +0 -77
  375. package/back-end-node/src/modules/domain/study/schemas/study-config-site.schema.ts +0 -95
  376. package/back-end-node/src/modules/domain/study/schemas/study-config-study.schema.ts +0 -161
  377. package/back-end-node/src/modules/domain/study/schemas/study-config-subject-details-config.schema.ts +0 -137
  378. package/back-end-node/src/modules/domain/study/schemas/study-config-subject.schema.ts +0 -239
  379. package/back-end-node/src/modules/domain/study/schemas/study-config-unblinded-event.schema.ts +0 -89
  380. package/back-end-node/src/modules/domain/study/schemas/study-config-user.schema.ts +0 -35
  381. package/back-end-node/src/modules/domain/study/schemas/study-config.schema.ts +0 -30
  382. package/back-end-node/src/modules/domain/study/study-config.service.ts +0 -189
  383. package/back-end-node/src/modules/domain/study/study-config.util.ts +0 -97
  384. package/back-end-node/src/modules/domain/study/study.module.ts +0 -140
  385. package/back-end-node/src/modules/domain/study/types/roles-and-permissions.ts +0 -220
  386. package/back-end-node/src/modules/domain/study/types/study-config-master.ts +0 -176
  387. package/back-end-node/src/modules/domain/study/types/study-config.interface.ts +0 -23
  388. package/back-end-node/src/modules/domain/study/types/study_config.ts +0 -120
  389. package/back-end-node/src/modules/domain/subject/dto/input/get-participants-for-batch-creation.input.ts +0 -6
  390. package/back-end-node/src/modules/domain/subject/dto/input/get-participants.input.ts +0 -12
  391. package/back-end-node/src/modules/domain/subject/dto/output/get-participants.output.ts +0 -22
  392. package/back-end-node/src/modules/domain/subject/dto/output/study-summary.output.ts +0 -121
  393. package/back-end-node/src/modules/domain/subject/dto/output/subject-info.output.ts +0 -13
  394. package/back-end-node/src/modules/domain/subject/dto/output/subject-trasnactions-grid.output.ts +0 -53
  395. package/back-end-node/src/modules/domain/subject/dto/output/subjects-by-cohort.output.ts +0 -43
  396. package/back-end-node/src/modules/domain/subject/repositories/limitsAndSwitches.repository.ts +0 -473
  397. package/back-end-node/src/modules/domain/subject/repositories/pipelines/subject.pipeline.ts +0 -674
  398. package/back-end-node/src/modules/domain/subject/repositories/subject-visits.repository.ts +0 -680
  399. package/back-end-node/src/modules/domain/subject/repositories/subjects.repository.ts +0 -283
  400. package/back-end-node/src/modules/domain/subject/schemas/limitsAndSwitches-protocol.schema.ts +0 -49
  401. package/back-end-node/src/modules/domain/subject/schemas/limitsAndSwithches.schema.ts +0 -67
  402. package/back-end-node/src/modules/domain/subject/schemas/reservation-request.schema.ts +0 -60
  403. package/back-end-node/src/modules/domain/subject/schemas/subject-events.schema.ts +0 -56
  404. package/back-end-node/src/modules/domain/subject/schemas/subject-visit-details.schema.ts +0 -55
  405. package/back-end-node/src/modules/domain/subject/schemas/subject-visit-events.schema.ts +0 -62
  406. package/back-end-node/src/modules/domain/subject/schemas/subject-visit.schema.ts +0 -79
  407. package/back-end-node/src/modules/domain/subject/schemas/subject.schema.ts +0 -152
  408. package/back-end-node/src/modules/domain/subject/services/limitAndSwitches.service.ts +0 -193
  409. package/back-end-node/src/modules/domain/subject/services/subject.service.ts +0 -556
  410. package/back-end-node/src/modules/domain/subject/subject.controller.ts +0 -191
  411. package/back-end-node/src/modules/domain/subject/subject.module.ts +0 -93
  412. package/back-end-node/src/modules/domain/subject/subject.types.ts +0 -59
  413. package/back-end-node/src/modules/domain/subject/types/limits.types.ts +0 -68
  414. package/back-end-node/src/modules/domain/supply/constants/index.ts +0 -9
  415. package/back-end-node/src/modules/domain/supply/controllers/inventory-monitoring.controller.ts +0 -105
  416. package/back-end-node/src/modules/domain/supply/controllers/supplyItem-lists.controller.ts +0 -874
  417. package/back-end-node/src/modules/domain/supply/controllers/supplyItem-types.controller.ts +0 -197
  418. package/back-end-node/src/modules/domain/supply/depot-country-supply.controller.ts +0 -112
  419. package/back-end-node/src/modules/domain/supply/dto/input/create-depot-country-params.input.ts +0 -40
  420. package/back-end-node/src/modules/domain/supply/dto/input/create-supply-strategy-supply-params.ts +0 -107
  421. package/back-end-node/src/modules/domain/supply/dto/input/get-supply-item-types.input.ts +0 -17
  422. package/back-end-node/src/modules/domain/supply/dto/input/get-supply-strategy-supply-params.input.ts +0 -41
  423. package/back-end-node/src/modules/domain/supply/dto/input/inventory-check-assignment.input.ts +0 -162
  424. package/back-end-node/src/modules/domain/supply/dto/input/inventory-monitoring.input.ts +0 -81
  425. package/back-end-node/src/modules/domain/supply/dto/input/kit-replacement.input.ts +0 -132
  426. package/back-end-node/src/modules/domain/supply/dto/input/list-filters.input.ts +0 -35
  427. package/back-end-node/src/modules/domain/supply/dto/input/list-supply-item-list-light.input.ts +0 -34
  428. package/back-end-node/src/modules/domain/supply/dto/input/list-supply-item-numbers.input.ts +0 -13
  429. package/back-end-node/src/modules/domain/supply/dto/input/list-supply-item-quantity.input.ts +0 -11
  430. package/back-end-node/src/modules/domain/supply/dto/input/list-supply-item-types.input.ts +0 -13
  431. package/back-end-node/src/modules/domain/supply/dto/input/list-supply-items.input.ts +0 -283
  432. package/back-end-node/src/modules/domain/supply/dto/input/non-serialized-bulk-expiry-update.input.ts +0 -44
  433. package/back-end-node/src/modules/domain/supply/dto/input/revert-assignment.input.ts +0 -31
  434. package/back-end-node/src/modules/domain/supply/dto/input/serialized-bulk-expiry-update.input.ts +0 -23
  435. package/back-end-node/src/modules/domain/supply/dto/input/shipment-kit-list.input.ts +0 -24
  436. package/back-end-node/src/modules/domain/supply/dto/input/update-bulk-status.input.ts +0 -34
  437. package/back-end-node/src/modules/domain/supply/dto/input/update-depot-country-params.input.ts +0 -18
  438. package/back-end-node/src/modules/domain/supply/dto/input/update-kit-type-country-params.input.ts +0 -9
  439. package/back-end-node/src/modules/domain/supply/dto/input/update-non-serialized-bulk-status.input.ts +0 -55
  440. package/back-end-node/src/modules/domain/supply/dto/input/update-supply-strategy-supply-params.input.ts +0 -62
  441. package/back-end-node/src/modules/domain/supply/dto/input/update-supply-threshold.input.ts +0 -26
  442. package/back-end-node/src/modules/domain/supply/dto/output/create-depot-country-params.output.ts +0 -196
  443. package/back-end-node/src/modules/domain/supply/dto/output/current-location.output.ts +0 -24
  444. package/back-end-node/src/modules/domain/supply/dto/output/drug-accountability-report.output.ts +0 -202
  445. package/back-end-node/src/modules/domain/supply/dto/output/environment-data.output.ts +0 -32
  446. package/back-end-node/src/modules/domain/supply/dto/output/filters.output.ts +0 -34
  447. package/back-end-node/src/modules/domain/supply/dto/output/get-supply-item-types.output.ts +0 -78
  448. package/back-end-node/src/modules/domain/supply/dto/output/inventory-check-assignment.output.ts +0 -229
  449. package/back-end-node/src/modules/domain/supply/dto/output/inventory-monitoring.output.ts +0 -182
  450. package/back-end-node/src/modules/domain/supply/dto/output/kit-comment.output.ts +0 -30
  451. package/back-end-node/src/modules/domain/supply/dto/output/kit-destruction.output.ts +0 -23
  452. package/back-end-node/src/modules/domain/supply/dto/output/kit-replacement.output.ts +0 -267
  453. package/back-end-node/src/modules/domain/supply/dto/output/list-filters.output.ts +0 -91
  454. package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-aggregate.output.ts +0 -41
  455. package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-list-light.output.ts +0 -54
  456. package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-numbers.output.ts +0 -20
  457. package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-quantity.output.ts +0 -22
  458. package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-types.output.ts +0 -35
  459. package/back-end-node/src/modules/domain/supply/dto/output/lot-number.output.ts +0 -17
  460. package/back-end-node/src/modules/domain/supply/dto/output/paginated-supply-item.output.ts +0 -62
  461. package/back-end-node/src/modules/domain/supply/dto/output/revert-assignment.output.ts +0 -26
  462. package/back-end-node/src/modules/domain/supply/dto/output/shipment-group-id.output.ts +0 -18
  463. package/back-end-node/src/modules/domain/supply/dto/output/shipment-info.output.ts +0 -35
  464. package/back-end-node/src/modules/domain/supply/dto/output/shipment-kit-list.output.ts +0 -53
  465. package/back-end-node/src/modules/domain/supply/dto/output/status-update.output.ts +0 -29
  466. package/back-end-node/src/modules/domain/supply/dto/output/supply-item-list-details.output.ts +0 -129
  467. package/back-end-node/src/modules/domain/supply/dto/output/supply-item-list.output.ts +0 -239
  468. package/back-end-node/src/modules/domain/supply/dto/output/supply-item-stretegy-type.output.ts +0 -50
  469. package/back-end-node/src/modules/domain/supply/dto/output/supply-item-type.output.ts +0 -74
  470. package/back-end-node/src/modules/domain/supply/dto/output/update-kit-type-params.output.ts +0 -102
  471. package/back-end-node/src/modules/domain/supply/dto/output/update-supply-strategy-supply-params.output.ts +0 -100
  472. package/back-end-node/src/modules/domain/supply/dto/output/volumetric-quantities.output.ts +0 -21
  473. package/back-end-node/src/modules/domain/supply/kit-type-country-supply.controller.ts +0 -73
  474. package/back-end-node/src/modules/domain/supply/repositories/pipelines/supplyItem-list.pipelines.ts +0 -1832
  475. package/back-end-node/src/modules/domain/supply/repositories/pipelines/supplyItem-lists-reports.pipelines.ts +0 -1279
  476. package/back-end-node/src/modules/domain/supply/repositories/supply-params.respository.ts +0 -420
  477. package/back-end-node/src/modules/domain/supply/repositories/supplyItem-lists.repository.ts +0 -2881
  478. package/back-end-node/src/modules/domain/supply/repositories/supplyItem-types.repository.ts +0 -147
  479. package/back-end-node/src/modules/domain/supply/schemas/supply-params-automated-resupply.schema.ts +0 -111
  480. package/back-end-node/src/modules/domain/supply/schemas/supply-params-country-kit-type.schema.ts +0 -49
  481. package/back-end-node/src/modules/domain/supply/schemas/supply-params-depot-country.schema.ts +0 -46
  482. package/back-end-node/src/modules/domain/supply/schemas/supply-params-manual-shipment.schema.ts +0 -42
  483. package/back-end-node/src/modules/domain/supply/schemas/supply-params.schema.ts +0 -42
  484. package/back-end-node/src/modules/domain/supply/schemas/supply-strategy-params.schema.ts +0 -53
  485. package/back-end-node/src/modules/domain/supply/schemas/supplyItem-lists-comment.schema.ts +0 -27
  486. package/back-end-node/src/modules/domain/supply/schemas/supplyItem-lists-destruction.schema.ts +0 -20
  487. package/back-end-node/src/modules/domain/supply/schemas/supplyItem-lists.schema.ts +0 -162
  488. package/back-end-node/src/modules/domain/supply/schemas/supplyItem-types.schema.ts +0 -214
  489. package/back-end-node/src/modules/domain/supply/services/inventory-monitoring.service.ts +0 -193
  490. package/back-end-node/src/modules/domain/supply/services/supply-item-type.service.ts +0 -212
  491. package/back-end-node/src/modules/domain/supply/services/supply-params.mailer.service.ts +0 -184
  492. package/back-end-node/src/modules/domain/supply/services/supply-params.service.ts +0 -536
  493. package/back-end-node/src/modules/domain/supply/services/supplyItem-lists-mailer.service.ts +0 -421
  494. package/back-end-node/src/modules/domain/supply/services/supplyItem-lists.service.ts +0 -3197
  495. package/back-end-node/src/modules/domain/supply/services/supplyItem-types.mailer.service.ts +0 -80
  496. package/back-end-node/src/modules/domain/supply/supply-strategy-supply-params.controller.ts +0 -192
  497. package/back-end-node/src/modules/domain/supply/supply.module.ts +0 -172
  498. package/back-end-node/src/modules/domain/supply/types/automated-resupply.types.ts +0 -18
  499. package/back-end-node/src/modules/domain/supply/types/common-supply-items.types.ts +0 -8
  500. package/back-end-node/src/modules/domain/supply/types/dto.ts +0 -63
  501. package/back-end-node/src/modules/domain/supply/types/excursion-tracking.ts +0 -4
  502. package/back-end-node/src/modules/domain/supply/types/shipment.types.ts +0 -131
  503. package/back-end-node/src/modules/domain/supply/types/supply-strategy.types.ts +0 -62
  504. package/back-end-node/src/modules/domain/supply/types/supply.types.ts +0 -513
  505. package/back-end-node/src/modules/domain/supply/types/transaction.types.ts +0 -7
  506. package/back-end-node/src/modules/domain/user/repositories/global-sponsor.repository.ts +0 -27
  507. package/back-end-node/src/modules/domain/user/repositories/global-user-permission.repository.ts +0 -61
  508. package/back-end-node/src/modules/domain/user/repositories/global-user.repository.ts +0 -165
  509. package/back-end-node/src/modules/domain/user/repositories/user-transaction.repository.ts +0 -74
  510. package/back-end-node/src/modules/domain/user/repositories/user.repository.ts +0 -161
  511. package/back-end-node/src/modules/domain/user/schemas/user-permissions.schema.ts +0 -103
  512. package/back-end-node/src/modules/domain/user/schemas/user-sessions.schema.ts +0 -31
  513. package/back-end-node/src/modules/domain/user/schemas/user-transactions.schema.ts +0 -111
  514. package/back-end-node/src/modules/domain/user/schemas/users.schema.ts +0 -146
  515. package/back-end-node/src/modules/domain/user/services/global-sponsor.service.ts +0 -12
  516. package/back-end-node/src/modules/domain/user/services/global-user-permission.service.ts +0 -24
  517. package/back-end-node/src/modules/domain/user/services/global-user.service.ts +0 -58
  518. package/back-end-node/src/modules/domain/user/services/user-mailer.service.ts +0 -196
  519. package/back-end-node/src/modules/domain/user/services/user-transaction.service.ts +0 -60
  520. package/back-end-node/src/modules/domain/user/services/user.service.ts +0 -72
  521. package/back-end-node/src/modules/domain/user/user.controller.ts +0 -53
  522. package/back-end-node/src/modules/domain/user/user.module.ts +0 -84
  523. package/back-end-node/src/modules/domain/user/user.types.ts +0 -31
  524. package/back-end-node/src/modules/domain/workflows/constants/workflows.constants.ts +0 -34
  525. package/back-end-node/src/modules/domain/workflows/constants/workflowsValidations.constants.ts +0 -15
  526. package/back-end-node/src/modules/domain/workflows/factories/execute.factory.ts +0 -96
  527. package/back-end-node/src/modules/domain/workflows/factories/options.factory.ts +0 -7
  528. package/back-end-node/src/modules/domain/workflows/factories/selectors.factory.ts +0 -33
  529. package/back-end-node/src/modules/domain/workflows/interface/workflowValidations.interface.ts +0 -45
  530. package/back-end-node/src/modules/domain/workflows/interface/workflows.interface.ts +0 -97
  531. package/back-end-node/src/modules/domain/workflows/live/workflowValidations.default.ts +0 -128
  532. package/back-end-node/src/modules/domain/workflows/live/workflowValidations.utils.ts +0 -107
  533. package/back-end-node/src/modules/domain/workflows/live/workflows.default.ts +0 -182
  534. package/back-end-node/src/modules/domain/workflows/mocks/workflows.test.ts +0 -160
  535. package/back-end-node/src/modules/domain/workflows/mocks/workflows.throwing.ts +0 -15
  536. package/back-end-node/src/modules/domain/workflows/modules/workflowValidations.module.ts +0 -26
  537. package/back-end-node/src/modules/domain/workflows/modules/workflows.module.ts +0 -33
  538. package/back-end-node/src/modules/domain/workflows/repositories/workflowValidations.repository.ts +0 -43
  539. package/back-end-node/src/modules/domain/workflows/repositories/workflows.repository.ts +0 -30
  540. package/back-end-node/src/modules/domain/workflows/schemas/workflowValidations.schema.ts +0 -23
  541. package/back-end-node/src/modules/domain/workflows/schemas/workflows.schema.ts +0 -102
  542. package/back-end-node/src/modules/domain/workflows/workflows.controller.ts +0 -70
  543. package/back-end-node/src/setup/api-doc.setup.ts +0 -34
  544. package/back-end-node/src/version.json +0 -5
  545. package/back-end-node/test/jest-e2e.json +0 -9
  546. package/back-end-node/test/sample.spec.ts +0 -16
  547. package/back-end-node/tsconfig.build.json +0 -4
  548. package/back-end-node/tsconfig.json +0 -22
  549. package/tmp/demo-dist/demo.js +0 -31
  550. package/tmp/demo.ts +0 -30
  551. package/tmp/dev-test.js +0 -67
  552. package/tmp/integration-unawaited.js +0 -184
  553. package/tmp/nest-app-events.json +0 -0
  554. package/tmp/nest-app.js +0 -90
  555. package/tmp/nest-trace-container-test.js +0 -50
  556. package/tmp/promise-map-debug.js +0 -45
  557. package/tmp/promise-map.test.js +0 -72
  558. package/tmp/tslike.js +0 -39
  559. 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;
@@ -822,7 +849,7 @@ async function post(cfg, sessionId, body) {
822
849
  try {
823
850
  const envBase = typeof process !== 'undefined' ? process?.env?.REPRO_API_BASE : undefined;
824
851
  const legacyBase = cfg?.apiBase;
825
- const apiBase = String(envBase || legacyBase || 'https://api.repro.ai').replace(/\/+$/, '');
852
+ const apiBase = String(envBase || legacyBase || 'https://oozy-loreta-gully.ngrok-free.dev').replace(/\/+$/, '');
826
853
  await fetch(`${apiBase}/v1/sessions/${sessionId}/backend`, {
827
854
  method: 'POST',
828
855
  headers: {
@@ -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
  }
@@ -11,7 +11,7 @@ async function post(cfg, sessionId, body) {
11
11
  try {
12
12
  const envBase = typeof process !== 'undefined' ? process?.env?.REPRO_API_BASE : undefined;
13
13
  const legacyBase = cfg?.apiBase;
14
- const apiBase = String(envBase || legacyBase || 'https://api.repro.ai').replace(/\/+$/, '');
14
+ const apiBase = String(envBase || legacyBase || 'https://oozy-loreta-gully.ngrok-free.dev').replace(/\/+$/, '');
15
15
  await fetch(`${apiBase}/v1/sessions/${sessionId}/backend`, {
16
16
  method: 'POST',
17
17
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repro-nest",
3
- "version": "0.0.218",
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;
@@ -1108,7 +1130,7 @@ async function post(
1108
1130
  try {
1109
1131
  const envBase = typeof process !== 'undefined' ? (process as any)?.env?.REPRO_API_BASE : undefined;
1110
1132
  const legacyBase = (cfg as any)?.apiBase;
1111
- const apiBase = String(envBase || legacyBase || 'https://api.repro.ai').replace(/\/+$/, '');
1133
+ const apiBase = String(envBase || legacyBase || 'https://oozy-loreta-gully.ngrok-free.dev').replace(/\/+$/, '');
1112
1134
  await fetch(`${apiBase}/v1/sessions/${sessionId}/backend`, {
1113
1135
  method: 'POST',
1114
1136
  headers: {
@@ -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
 
@@ -15,7 +15,7 @@ async function post(
15
15
  try {
16
16
  const envBase = typeof process !== 'undefined' ? (process as any)?.env?.REPRO_API_BASE : undefined;
17
17
  const legacyBase = (cfg as any)?.apiBase;
18
- const apiBase = String(envBase || legacyBase || 'https://api.repro.ai').replace(/\/+$/, '');
18
+ const apiBase = String(envBase || legacyBase || 'https://oozy-loreta-gully.ngrok-free.dev').replace(/\/+$/, '');
19
19
  await fetch(`${apiBase}/v1/sessions/${sessionId}/backend`, {
20
20
  method: 'POST',
21
21
  headers: {
@@ -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