repro-nest 0.0.219 → 0.0.221
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.
- package/README.md +335 -0
- package/dist/index.d.ts +0 -3
- package/dist/index.js +33 -3
- package/dist/integrations/sendgrid.d.ts +0 -1
- package/dist/integrations/sendgrid.js +0 -1
- package/docs/tracing.md +0 -1
- package/package.json +2 -2
- package/src/index.ts +48 -25
- package/src/integrations/sendgrid.ts +1 -3
- package/back-end-node/.dockerignore +0 -59
- package/back-end-node/.github/pull_request_template.md +0 -11
- package/back-end-node/.github/workflows/dev-deploy.yaml +0 -21
- package/back-end-node/.github/workflows/node-format-check.yaml +0 -29
- package/back-end-node/.github/workflows/platform-deploy.yaml +0 -16
- package/back-end-node/.github/workflows/platform3-deploy.yaml +0 -21
- package/back-end-node/.github/workflows/pr.yaml +0 -22
- package/back-end-node/.github/workflows/prod-deploy.yaml +0 -19
- package/back-end-node/.github/workflows/prod3-deploy.yaml +0 -18
- package/back-end-node/.github/workflows/sandbox-deploy.yaml +0 -16
- package/back-end-node/.github/workflows/staging-deploy.yaml +0 -19
- package/back-end-node/.github/workflows/staging3-deploy.yaml +0 -18
- package/back-end-node/.github/workflows/test-deploy.yaml +0 -16
- package/back-end-node/.hooks/pre-commit +0 -3
- package/back-end-node/.husky/pre-commit +0 -1
- package/back-end-node/.prettierignore +0 -6
- package/back-end-node/.prettierrc +0 -30
- package/back-end-node/README.md +0 -172
- package/back-end-node/eslint.config.mjs +0 -31
- package/back-end-node/nest-cli.json +0 -20
- package/back-end-node/package-lock.json +0 -13101
- package/back-end-node/package.json +0 -118
- package/back-end-node/src/app.module.ts +0 -10
- package/back-end-node/src/app.ts +0 -75
- package/back-end-node/src/common/constants/collection-names.ts +0 -51
- package/back-end-node/src/common/constants/discriminators.ts +0 -65
- package/back-end-node/src/common/constants/email-templates.ts +0 -4
- package/back-end-node/src/common/constants/emailConstants.ts +0 -74
- package/back-end-node/src/common/constants/notification-trigger-actions.ts +0 -37
- package/back-end-node/src/common/constants/protocols.ts +0 -4
- package/back-end-node/src/common/constants/view-constants.ts +0 -31
- package/back-end-node/src/common/decorators/user.decorator.ts +0 -8
- package/back-end-node/src/common/dtos/activity-log.output.ts +0 -38
- package/back-end-node/src/common/dtos/base.dto.ts +0 -5
- package/back-end-node/src/common/dtos/column-config.output.ts +0 -89
- package/back-end-node/src/common/dtos/general-response.output.ts +0 -96
- package/back-end-node/src/common/dtos/generic-error.dto.ts +0 -18
- package/back-end-node/src/common/dtos/get-paginated-data.input.ts +0 -42
- package/back-end-node/src/common/dtos/paginated-result.output.ts +0 -24
- package/back-end-node/src/common/types/common.types.ts +0 -39
- package/back-end-node/src/common/types/environment.types.ts +0 -5
- package/back-end-node/src/common/types/listing-query.ts +0 -19
- package/back-end-node/src/common/utils/azureBlobStorage/fileUpload.ts +0 -42
- package/back-end-node/src/common/utils/azureBlobStorage/index.ts +0 -31
- package/back-end-node/src/common/utils/common.utils.ts +0 -215
- package/back-end-node/src/common/utils/discriminator-defaults.ts +0 -6
- package/back-end-node/src/common/utils/errorHandling.ts +0 -21
- package/back-end-node/src/common/utils/logger.ts +0 -21
- package/back-end-node/src/common/utils/mapper-manager.ts +0 -10
- package/back-end-node/src/common/utils/models.ts +0 -11
- package/back-end-node/src/common/utils/pipelineUtil.ts +0 -54
- package/back-end-node/src/common/utils/strings.ts +0 -41
- package/back-end-node/src/modules/config/config.module.ts +0 -18
- package/back-end-node/src/modules/config/config.service.ts +0 -50
- package/back-end-node/src/modules/config/config.ts +0 -45
- package/back-end-node/src/modules/core/auth/auth-module.ts +0 -19
- package/back-end-node/src/modules/core/auth/auth.controller.ts +0 -233
- package/back-end-node/src/modules/core/auth/auth.service.ts +0 -146
- package/back-end-node/src/modules/core/auth/dto/input/login.input.ts +0 -21
- package/back-end-node/src/modules/core/auth/dto/input/reset-password.input.ts +0 -33
- package/back-end-node/src/modules/core/auth/dto/input/sign-up.input.ts +0 -28
- package/back-end-node/src/modules/core/auth/dto/input/validate-pin.input.ts +0 -21
- package/back-end-node/src/modules/core/auth/dto/output/login.output.ts +0 -25
- package/back-end-node/src/modules/core/auth/dto/output/name.output.ts +0 -20
- package/back-end-node/src/modules/core/auth/guards/auth.guard.ts +0 -92
- package/back-end-node/src/modules/core/auth/guards/tenant-auth.guard.ts +0 -65
- package/back-end-node/src/modules/core/auth/strategies/bearer.strategy.ts +0 -53
- package/back-end-node/src/modules/core/auth/utils/user-roles.ts +0 -85
- package/back-end-node/src/modules/core/auth/utils/validate-pin-and-password.ts +0 -18
- package/back-end-node/src/modules/core/azure/azure-auth-provider.ts +0 -40
- package/back-end-node/src/modules/core/azure/azure.module.ts +0 -10
- package/back-end-node/src/modules/core/azure/azure.types.ts +0 -20
- package/back-end-node/src/modules/core/azure/services/azure-graph.service.ts +0 -118
- package/back-end-node/src/modules/core/blinding/blinding-module.ts +0 -40
- package/back-end-node/src/modules/core/blinding/dto/requestDto.ts +0 -26
- package/back-end-node/src/modules/core/blinding/interceptors/blinding.interceptor.ts +0 -67
- package/back-end-node/src/modules/core/blinding/interceptors/permission.interceptor.ts +0 -39
- package/back-end-node/src/modules/core/blinding/interceptors/reports.interceptor.ts +0 -34
- package/back-end-node/src/modules/core/blinding/mailer/blinding-mailer.service.ts +0 -125
- package/back-end-node/src/modules/core/blinding/mailer/constants.ts +0 -25
- package/back-end-node/src/modules/core/blinding/mailer/core/default.ts +0 -85
- package/back-end-node/src/modules/core/blinding/mailer/core/mail-data.service.ts +0 -97
- package/back-end-node/src/modules/core/blinding/mailer/handlers/blinded.handler.ts +0 -112
- package/back-end-node/src/modules/core/blinding/mailer/handlers/open-label.handler.ts +0 -90
- package/back-end-node/src/modules/core/blinding/mailer/handlers/unblinded.handler.ts +0 -122
- package/back-end-node/src/modules/core/blinding/mailer/interfaces/core.ts +0 -12
- package/back-end-node/src/modules/core/blinding/mailer/interfaces/data.service.ts +0 -58
- package/back-end-node/src/modules/core/blinding/mailer/interfaces/handler.ts +0 -14
- package/back-end-node/src/modules/core/blinding/mailer/types.ts +0 -59
- package/back-end-node/src/modules/core/blinding/services/blinding.util.ts +0 -30
- package/back-end-node/src/modules/core/blinding/services/general-blinding.service.ts +0 -38
- package/back-end-node/src/modules/core/blinding/submodules/global-data-module.ts +0 -28
- package/back-end-node/src/modules/core/blinding/submodules/tenant-data-module.ts +0 -168
- package/back-end-node/src/modules/core/core.module.ts +0 -14
- package/back-end-node/src/modules/core/database/database.module.ts +0 -14
- package/back-end-node/src/modules/core/database/factories/global-database-connection.factory.ts +0 -37
- package/back-end-node/src/modules/core/database/factories/tenant-database-connection.factory.ts +0 -118
- package/back-end-node/src/modules/core/database/modules/global/global-database.module.ts +0 -43
- package/back-end-node/src/modules/core/database/modules/global/schemas/global-info.schema.ts +0 -23
- package/back-end-node/src/modules/core/database/modules/global/schemas/global-protocol.schema.ts +0 -55
- package/back-end-node/src/modules/core/database/modules/global/schemas/global-resupply.schema.ts +0 -68
- package/back-end-node/src/modules/core/database/modules/global/schemas/global-sponsor.schema.ts +0 -173
- package/back-end-node/src/modules/core/database/modules/global/schemas/global-user-permission.schema.ts +0 -56
- package/back-end-node/src/modules/core/database/modules/global/schemas/global-users.schema.ts +0 -168
- package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/location-access.sub-schema.ts +0 -25
- package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/permissions.sub-schema.ts +0 -25
- package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/protocol-id-and-name.sub-schema.ts +0 -15
- package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/role-permission-detail.sub-schema.ts +0 -18
- package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/role-permission.sub-schema.ts +0 -20
- package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/user-depot-permission-detail.sub-schema.ts +0 -21
- package/back-end-node/src/modules/core/database/modules/global/schemas/sub-schemas/user-site-permission-detail.sub-schema.ts +0 -21
- package/back-end-node/src/modules/core/database/modules/tenant/base.repository.ts +0 -70
- package/back-end-node/src/modules/core/database/modules/tenant/database-multitenancy.utils.ts +0 -49
- package/back-end-node/src/modules/core/database/modules/tenant/inject-tenant-model.decorator.ts +0 -4
- package/back-end-node/src/modules/core/database/modules/tenant/tenant-database.module.ts +0 -84
- package/back-end-node/src/modules/core/database/modules/tenant/tenant-database.service.ts +0 -52
- package/back-end-node/src/modules/core/database/schemas/activity-log.schema.ts +0 -33
- package/back-end-node/src/modules/core/database/schemas/company.schema.ts +0 -53
- package/back-end-node/src/modules/core/database/schemas/contact-info.schema.ts +0 -24
- package/back-end-node/src/modules/core/database/schemas/site-details.schema.ts +0 -20
- package/back-end-node/src/modules/core/database/schemas/visit-info-base.schema.ts +0 -21
- package/back-end-node/src/modules/core/database/types/common-database.types.ts +0 -9
- package/back-end-node/src/modules/core/database/types/database-config.type.ts +0 -15
- package/back-end-node/src/modules/core/datetime/datetime.constants.ts +0 -19
- package/back-end-node/src/modules/core/datetime/datetime.errors.ts +0 -1
- package/back-end-node/src/modules/core/datetime/datetime.helpers.ts +0 -3
- package/back-end-node/src/modules/core/datetime/datetime.module.ts +0 -22
- package/back-end-node/src/modules/core/datetime/interface/datetime.interface.ts +0 -38
- package/back-end-node/src/modules/core/datetime/live/datetime.default.core.ts +0 -139
- package/back-end-node/src/modules/core/datetime/live/datetime.util.ts +0 -84
- package/back-end-node/src/modules/core/interceptors/fieldHeader.interceptor.ts +0 -33
- package/back-end-node/src/modules/core/mailer/README.md +0 -191
- package/back-end-node/src/modules/core/mailer/mailer.module.ts +0 -14
- package/back-end-node/src/modules/core/mailer/mailer.types.ts +0 -32
- package/back-end-node/src/modules/core/mailer/services/base-mailer.service.ts +0 -261
- package/back-end-node/src/modules/core/mailer/services/notification-template.service.ts +0 -113
- package/back-end-node/src/modules/core/mailer/templateSkeleton.html +0 -156
- package/back-end-node/src/modules/core/rabbitmq/interfaces/rabbitmq.interfaces.ts +0 -11
- package/back-end-node/src/modules/core/rabbitmq/rabbitmq.module.ts +0 -9
- package/back-end-node/src/modules/core/rabbitmq/rabbitmq.service.ts +0 -208
- package/back-end-node/src/modules/core/report/report-helper.service.ts +0 -111
- package/back-end-node/src/modules/core/report/report.module.ts +0 -12
- package/back-end-node/src/modules/core/token/token.module.ts +0 -9
- package/back-end-node/src/modules/core/token/token.service.ts +0 -22
- package/back-end-node/src/modules/core/token/token.types.ts +0 -3
- package/back-end-node/src/modules/domain/batch-release/batch-release.controller.ts +0 -624
- package/back-end-node/src/modules/domain/batch-release/batch-release.module.ts +0 -44
- package/back-end-node/src/modules/domain/batch-release/batch-release.repository.ts +0 -834
- package/back-end-node/src/modules/domain/batch-release/batch-release.utils.ts +0 -43
- package/back-end-node/src/modules/domain/batch-release/dto/input/approve-batch-release.input.ts +0 -17
- package/back-end-node/src/modules/domain/batch-release/dto/input/batch-release-report.input.ts +0 -18
- package/back-end-node/src/modules/domain/batch-release/dto/input/create-batch-release.input.ts +0 -56
- package/back-end-node/src/modules/domain/batch-release/dto/input/create-non-serialized-batch-release.input.ts +0 -63
- package/back-end-node/src/modules/domain/batch-release/dto/input/get-all-batch-release.input.ts +0 -119
- package/back-end-node/src/modules/domain/batch-release/dto/input/manage-batch-release-countries.input.ts +0 -15
- package/back-end-node/src/modules/domain/batch-release/dto/input/non-serialized-update-batch-release.input.ts +0 -48
- package/back-end-node/src/modules/domain/batch-release/dto/input/retain.input.ts +0 -11
- package/back-end-node/src/modules/domain/batch-release/dto/input/update-batch-release-label-groups.input.ts +0 -29
- package/back-end-node/src/modules/domain/batch-release/dto/input/update-batch-release.input.ts +0 -48
- package/back-end-node/src/modules/domain/batch-release/dto/input/validate-non-serialized-batch-release.input.ts +0 -18
- package/back-end-node/src/modules/domain/batch-release/dto/input/validate-serialized-batch-release.input.ts +0 -30
- package/back-end-node/src/modules/domain/batch-release/dto/output/batch-release-filters.output.ts +0 -63
- package/back-end-node/src/modules/domain/batch-release/dto/output/batch-release-item.output.ts +0 -213
- package/back-end-node/src/modules/domain/batch-release/dto/output/batch-release-light-item.output.ts +0 -205
- package/back-end-node/src/modules/domain/batch-release/dto/output/batch-release-report.output.ts +0 -262
- package/back-end-node/src/modules/domain/batch-release/dto/output/label-group-by-sub-sequence-range.output.ts +0 -39
- package/back-end-node/src/modules/domain/batch-release/dto/output/non-serialized-batch-release-validation.output.ts +0 -19
- package/back-end-node/src/modules/domain/batch-release/dto/output/paginated-batch-release-item.output.ts +0 -12
- package/back-end-node/src/modules/domain/batch-release/dto/output/sequence-range.output.ts +0 -21
- package/back-end-node/src/modules/domain/batch-release/dto/output/serialized-batch-release-validation.output.ts +0 -23
- package/back-end-node/src/modules/domain/batch-release/dto/output/subsequence-range.output.ts +0 -21
- package/back-end-node/src/modules/domain/batch-release/schemas/batch-release.schema.ts +0 -158
- package/back-end-node/src/modules/domain/batch-release/services/batch-release-helpers.service.ts +0 -514
- package/back-end-node/src/modules/domain/batch-release/services/batch-release-mailer.service.ts +0 -286
- package/back-end-node/src/modules/domain/batch-release/services/batch-release.service.ts +0 -1019
- package/back-end-node/src/modules/domain/batch-release/types/batch-release-common.types.ts +0 -104
- package/back-end-node/src/modules/domain/batch-release/types/batch-release.enums.ts +0 -5
- package/back-end-node/src/modules/domain/blinding-group/blinding-group.module.ts +0 -21
- package/back-end-node/src/modules/domain/blinding-group/blinding-group.repository.ts +0 -30
- package/back-end-node/src/modules/domain/blinding-group/schemas/blinding.group.schema.ts +0 -54
- package/back-end-node/src/modules/domain/cohort/cohort.module.ts +0 -12
- package/back-end-node/src/modules/domain/cohort/cohort.repository.ts +0 -91
- package/back-end-node/src/modules/domain/cohort/cohort.service.ts +0 -16
- package/back-end-node/src/modules/domain/cohort/schemas/cohort.schema.ts +0 -90
- package/back-end-node/src/modules/domain/config-actions/config-actions.module.ts +0 -30
- package/back-end-node/src/modules/domain/config-actions/repositories/config-actions.repository.ts +0 -36
- package/back-end-node/src/modules/domain/config-actions/schemas/config-actions.schema.ts +0 -66
- package/back-end-node/src/modules/domain/config-actions/schemas/site-status-config-actions.schema.ts +0 -27
- package/back-end-node/src/modules/domain/config-actions/types/config-actions.types.ts +0 -16
- package/back-end-node/src/modules/domain/country/country.controller.ts +0 -369
- package/back-end-node/src/modules/domain/country/country.module.ts +0 -68
- package/back-end-node/src/modules/domain/country/country.repository.ts +0 -390
- package/back-end-node/src/modules/domain/country/country.types.ts +0 -39
- package/back-end-node/src/modules/domain/country/dto/input/create-country.input.ts +0 -21
- package/back-end-node/src/modules/domain/country/dto/input/get-study-countries.input.ts +0 -75
- package/back-end-node/src/modules/domain/country/dto/input/update-country-depot-status.input.ts +0 -24
- package/back-end-node/src/modules/domain/country/dto/input/update-country-label-groups.input.ts +0 -14
- package/back-end-node/src/modules/domain/country/dto/input/update-country.input.ts +0 -11
- package/back-end-node/src/modules/domain/country/dto/output/country.output.ts +0 -26
- package/back-end-node/src/modules/domain/country/dto/output/create-country.output.ts +0 -103
- package/back-end-node/src/modules/domain/country/dto/output/deactivation-impact.output.ts +0 -12
- package/back-end-node/src/modules/domain/country/dto/output/filter-options.output.ts +0 -25
- package/back-end-node/src/modules/domain/country/dto/output/get-country.output.ts +0 -56
- package/back-end-node/src/modules/domain/country/dto/output/paginated-study-country.output.ts +0 -8
- package/back-end-node/src/modules/domain/country/dto/output/sponsor-country-item.output.ts +0 -16
- package/back-end-node/src/modules/domain/country/dto/output/study-country.output.ts +0 -112
- package/back-end-node/src/modules/domain/country/dto/output/update-country.output.ts +0 -111
- package/back-end-node/src/modules/domain/country/schemas/country.schema.ts +0 -98
- package/back-end-node/src/modules/domain/country/services/country-mailer.service.ts +0 -190
- package/back-end-node/src/modules/domain/country/services/country.service.ts +0 -510
- package/back-end-node/src/modules/domain/domain.module.ts +0 -52
- package/back-end-node/src/modules/domain/excursion-tracking/controllers/excursion-tracking.controller.ts +0 -262
- package/back-end-node/src/modules/domain/excursion-tracking/dto/input/create-non-serialized-te.input.ts +0 -100
- package/back-end-node/src/modules/domain/excursion-tracking/dto/input/create-serialized-te.input.ts +0 -83
- package/back-end-node/src/modules/domain/excursion-tracking/dto/input/te-report.input.ts +0 -64
- package/back-end-node/src/modules/domain/excursion-tracking/dto/input/update-te.input.ts +0 -28
- package/back-end-node/src/modules/domain/excursion-tracking/dto/output/excursion-tracking-log.output.ts +0 -98
- package/back-end-node/src/modules/domain/excursion-tracking/dto/output/excursion-tracking-report-filters.output.ts +0 -69
- package/back-end-node/src/modules/domain/excursion-tracking/dto/output/excursion-tracking-report.output.ts +0 -243
- package/back-end-node/src/modules/domain/excursion-tracking/excursion-tracking.module.ts +0 -65
- package/back-end-node/src/modules/domain/excursion-tracking/excursion-tracking.types.ts +0 -28
- package/back-end-node/src/modules/domain/excursion-tracking/repositories/excursion-tracking.repository.ts +0 -712
- package/back-end-node/src/modules/domain/excursion-tracking/repositories/program-group.repository.ts +0 -50
- package/back-end-node/src/modules/domain/excursion-tracking/repositories/status-tracking.repository.ts +0 -83
- package/back-end-node/src/modules/domain/excursion-tracking/schemas/excursion-tracking.schema.ts +0 -150
- package/back-end-node/src/modules/domain/excursion-tracking/schemas/program-group.schema.ts +0 -54
- package/back-end-node/src/modules/domain/excursion-tracking/schemas/status-tracking.schema.ts +0 -43
- package/back-end-node/src/modules/domain/excursion-tracking/services/excursion-tracking-helper.service.ts +0 -64
- package/back-end-node/src/modules/domain/excursion-tracking/services/excursion-tracking-mailer.service.ts +0 -415
- package/back-end-node/src/modules/domain/excursion-tracking/services/excursion-tracking.service.ts +0 -851
- package/back-end-node/src/modules/domain/excursion-tracking/services/status-tracking.service.ts +0 -40
- package/back-end-node/src/modules/domain/info/README.md +0 -77
- package/back-end-node/src/modules/domain/info/info.controller.ts +0 -76
- package/back-end-node/src/modules/domain/info/info.module.ts +0 -14
- package/back-end-node/src/modules/domain/info/repositories/info.repository.ts +0 -23
- package/back-end-node/src/modules/domain/info/services/info.service.ts +0 -21
- package/back-end-node/src/modules/domain/label/label.module.ts +0 -18
- package/back-end-node/src/modules/domain/label/label.repository.ts +0 -76
- package/back-end-node/src/modules/domain/label/label.service.ts +0 -32
- package/back-end-node/src/modules/domain/label/label.types.ts +0 -4
- package/back-end-node/src/modules/domain/label/schemas/label.schema.ts +0 -31
- package/back-end-node/src/modules/domain/protocol/protocol.module.ts +0 -18
- package/back-end-node/src/modules/domain/protocol/protocol.repository.ts +0 -44
- package/back-end-node/src/modules/domain/protocol/protocol.service.ts +0 -33
- package/back-end-node/src/modules/domain/protocol/schemas/protocol.schema.ts +0 -98
- package/back-end-node/src/modules/domain/returns/constants/index.ts +0 -25
- package/back-end-node/src/modules/domain/returns/dto/input/base-return-shipment.input.ts +0 -20
- package/back-end-node/src/modules/domain/returns/dto/input/common.input.ts +0 -46
- package/back-end-node/src/modules/domain/returns/dto/input/create-return-shipment.input.ts +0 -117
- package/back-end-node/src/modules/domain/returns/dto/input/destory-kits.input.ts +0 -63
- package/back-end-node/src/modules/domain/returns/dto/input/destroy-kits-filters.input.ts +0 -25
- package/back-end-node/src/modules/domain/returns/dto/input/get-all-returns.input.ts +0 -81
- package/back-end-node/src/modules/domain/returns/dto/input/inspectable-kits.input.ts +0 -107
- package/back-end-node/src/modules/domain/returns/dto/input/list-kits-to-destroy.input.ts +0 -252
- package/back-end-node/src/modules/domain/returns/dto/input/resolve-kits.input.ts +0 -114
- package/back-end-node/src/modules/domain/returns/dto/input/update-kits-status.input.ts +0 -111
- package/back-end-node/src/modules/domain/returns/dto/input/update-return-shipment.input.ts +0 -32
- package/back-end-node/src/modules/domain/returns/dto/output/destroy-kits-filters.output.ts +0 -116
- package/back-end-node/src/modules/domain/returns/dto/output/detailed-return-shipment.output.ts +0 -161
- package/back-end-node/src/modules/domain/returns/dto/output/generic-response.output.ts +0 -16
- package/back-end-node/src/modules/domain/returns/dto/output/inspectable-kits.output.ts +0 -201
- package/back-end-node/src/modules/domain/returns/dto/output/kit-return-status-report.output.ts +0 -147
- package/back-end-node/src/modules/domain/returns/dto/output/paginated-kit-returns.output.ts +0 -7
- package/back-end-node/src/modules/domain/returns/dto/output/resolve-kits.output.ts +0 -107
- package/back-end-node/src/modules/domain/returns/dto/output/return-kits-accountability-filters.output.ts +0 -83
- package/back-end-node/src/modules/domain/returns/dto/output/return-kits-inspect-filters.output.ts +0 -113
- package/back-end-node/src/modules/domain/returns/dto/output/return-kits-reconciliation-filters.output.ts +0 -93
- package/back-end-node/src/modules/domain/returns/dto/output/return-kits.output.ts +0 -244
- package/back-end-node/src/modules/domain/returns/dto/output/return-shipment.output.ts +0 -205
- package/back-end-node/src/modules/domain/returns/dto/output/returns-filters.output.ts +0 -97
- package/back-end-node/src/modules/domain/returns/pipes/form-type-validation.pipe.ts +0 -35
- package/back-end-node/src/modules/domain/returns/returns.controller.ts +0 -752
- package/back-end-node/src/modules/domain/returns/returns.mailer.service.ts +0 -1025
- package/back-end-node/src/modules/domain/returns/returns.module.ts +0 -53
- package/back-end-node/src/modules/domain/returns/returns.pipeline.ts +0 -1491
- package/back-end-node/src/modules/domain/returns/returns.repository.ts +0 -1695
- package/back-end-node/src/modules/domain/returns/returns.service.ts +0 -1481
- package/back-end-node/src/modules/domain/returns/returns.types.ts +0 -7
- package/back-end-node/src/modules/domain/returns/schemas/return-shipment.schema.ts +0 -183
- package/back-end-node/src/modules/domain/returns/types/returns-kit-status.ts +0 -6
- package/back-end-node/src/modules/domain/returns/types/returns-mailer.ts +0 -211
- package/back-end-node/src/modules/domain/shipment/dto/input/create-shipment-request.input.ts +0 -81
- package/back-end-node/src/modules/domain/shipment/dto/input/get-all-shipments.input.ts +0 -101
- package/back-end-node/src/modules/domain/shipment/dto/input/get-shipment-report-summary.input.ts +0 -73
- package/back-end-node/src/modules/domain/shipment/dto/input/shipment-dispatch.input.ts +0 -25
- package/back-end-node/src/modules/domain/shipment/dto/input/shipments-cancel.input.ts +0 -12
- package/back-end-node/src/modules/domain/shipment/dto/input/update-shipment-and-kits.input.ts +0 -51
- package/back-end-node/src/modules/domain/shipment/dto/input/update-shipment-details.input.ts +0 -17
- package/back-end-node/src/modules/domain/shipment/dto/output/paginated-shipment-item.output.ts +0 -357
- package/back-end-node/src/modules/domain/shipment/dto/output/shipment-details-report.output.ts +0 -154
- package/back-end-node/src/modules/domain/shipment/dto/output/shipment-filters.output.ts +0 -107
- package/back-end-node/src/modules/domain/shipment/dto/output/shipment-kits.output.ts +0 -125
- package/back-end-node/src/modules/domain/shipment/dto/output/shipment-summary-report.output.ts +0 -139
- package/back-end-node/src/modules/domain/shipment/dto/output/shipment.output.ts +0 -153
- package/back-end-node/src/modules/domain/shipment/repositories/shipment-group.repository.ts +0 -25
- package/back-end-node/src/modules/domain/shipment/repositories/shipment.repository.ts +0 -1967
- package/back-end-node/src/modules/domain/shipment/schemas/shipment-group.schema.ts +0 -53
- package/back-end-node/src/modules/domain/shipment/schemas/shipment.schema.ts +0 -197
- package/back-end-node/src/modules/domain/shipment/services/shipment-helper.service.ts +0 -422
- package/back-end-node/src/modules/domain/shipment/services/shipment-mailer.service.ts +0 -909
- package/back-end-node/src/modules/domain/shipment/services/shipment.service.ts +0 -1969
- package/back-end-node/src/modules/domain/shipment/shipment.controller.ts +0 -528
- package/back-end-node/src/modules/domain/shipment/shipment.module.ts +0 -57
- package/back-end-node/src/modules/domain/shipment/shipment.types.ts +0 -20
- package/back-end-node/src/modules/domain/shipment/shipment.utils.ts +0 -116
- package/back-end-node/src/modules/domain/shipment/types/shipment.types.ts +0 -80
- package/back-end-node/src/modules/domain/sites/dto/input/create-site.input.ts +0 -266
- package/back-end-node/src/modules/domain/sites/dto/input/get-ip-contacts-report.input.ts +0 -17
- package/back-end-node/src/modules/domain/sites/dto/input/get-sponsor-user-site-supplies-report-data.input.ts +0 -64
- package/back-end-node/src/modules/domain/sites/dto/input/site-sites.input.ts +0 -202
- package/back-end-node/src/modules/domain/sites/dto/input/update-site-status.input.ts +0 -11
- package/back-end-node/src/modules/domain/sites/dto/input/update-site.input.ts +0 -218
- package/back-end-node/src/modules/domain/sites/dto/output/site-filters.output.ts +0 -10
- package/back-end-node/src/modules/domain/sites/dto/output/site-report.output.ts +0 -9
- package/back-end-node/src/modules/domain/sites/dto/output/site-supply-strategy.output.ts +0 -25
- package/back-end-node/src/modules/domain/sites/dto/output/site.output.ts +0 -573
- package/back-end-node/src/modules/domain/sites/dto/output/sponsor-user-site-details-report.output.ts +0 -131
- package/back-end-node/src/modules/domain/sites/dto/output/sponsor-user-site-supplies-report-data.output.ts +0 -105
- package/back-end-node/src/modules/domain/sites/dto/output/sponsor-user-sites-summary-report-data.output.ts +0 -53
- package/back-end-node/src/modules/domain/sites/dto/output/visit-type-limits.output.ts +0 -42
- package/back-end-node/src/modules/domain/sites/repositories/pipelines/common.ts +0 -366
- package/back-end-node/src/modules/domain/sites/repositories/pipelines/sponsorUserSiteSuppliesReports.ts +0 -1008
- package/back-end-node/src/modules/domain/sites/repositories/sites.repository.ts +0 -937
- package/back-end-node/src/modules/domain/sites/schemas/address-hostory.schema.ts +0 -156
- package/back-end-node/src/modules/domain/sites/site-sites.controller.ts +0 -413
- package/back-end-node/src/modules/domain/sites/sites.controller.ts +0 -222
- package/back-end-node/src/modules/domain/sites/sites.mailer.service.ts +0 -248
- package/back-end-node/src/modules/domain/sites/sites.module.ts +0 -50
- package/back-end-node/src/modules/domain/sites/sites.service.ts +0 -2904
- package/back-end-node/src/modules/domain/sites/types/types.ts +0 -276
- package/back-end-node/src/modules/domain/sites-and-depots/controllers/depots.controller.ts +0 -520
- package/back-end-node/src/modules/domain/sites-and-depots/controllers/sites-and-depots.controller.ts +0 -21
- package/back-end-node/src/modules/domain/sites-and-depots/dto/input/create-depot.input.ts +0 -169
- package/back-end-node/src/modules/domain/sites-and-depots/dto/input/duplicate-depot-validation.input.ts +0 -11
- package/back-end-node/src/modules/domain/sites-and-depots/dto/input/get-depot-reports.input.ts +0 -38
- package/back-end-node/src/modules/domain/sites-and-depots/dto/input/search-depot.input.ts +0 -50
- package/back-end-node/src/modules/domain/sites-and-depots/dto/input/update-status.input.ts +0 -15
- package/back-end-node/src/modules/domain/sites-and-depots/dto/output/all-depots-report.output.ts +0 -43
- package/back-end-node/src/modules/domain/sites-and-depots/dto/output/create-depot.output.ts +0 -18
- package/back-end-node/src/modules/domain/sites-and-depots/dto/output/depot-name-list-item.output.ts +0 -31
- package/back-end-node/src/modules/domain/sites-and-depots/dto/output/depot.output.ts +0 -48
- package/back-end-node/src/modules/domain/sites-and-depots/dto/output/duplicate-depot-validation.input.ts +0 -3
- package/back-end-node/src/modules/domain/sites-and-depots/dto/output/get-depot-filters.output.ts +0 -63
- package/back-end-node/src/modules/domain/sites-and-depots/dto/output/kit-count.output.ts +0 -85
- package/back-end-node/src/modules/domain/sites-and-depots/dto/output/protocol-depots.output.ts +0 -27
- package/back-end-node/src/modules/domain/sites-and-depots/dto/output/receiving-locaitons.output.ts +0 -31
- package/back-end-node/src/modules/domain/sites-and-depots/dto/output/search-depots.output.ts +0 -267
- package/back-end-node/src/modules/domain/sites-and-depots/dto/output/ship-to-countries.output.ts +0 -16
- package/back-end-node/src/modules/domain/sites-and-depots/dto/output/shipping-details.output.ts +0 -54
- package/back-end-node/src/modules/domain/sites-and-depots/dto/output/sponsor-depot.output.ts +0 -61
- package/back-end-node/src/modules/domain/sites-and-depots/repositories/pipelines/get-protocol-depots.pipeline.ts +0 -41
- package/back-end-node/src/modules/domain/sites-and-depots/repositories/sites-and-depots.repository.ts +0 -652
- package/back-end-node/src/modules/domain/sites-and-depots/schemas/depot.schema.ts +0 -76
- package/back-end-node/src/modules/domain/sites-and-depots/schemas/site.schema.ts +0 -114
- package/back-end-node/src/modules/domain/sites-and-depots/schemas/sites-and-depots.schema.ts +0 -133
- package/back-end-node/src/modules/domain/sites-and-depots/services/depots-mailer.service.ts +0 -167
- package/back-end-node/src/modules/domain/sites-and-depots/services/depots.service.ts +0 -752
- package/back-end-node/src/modules/domain/sites-and-depots/services/sites-and-depots.service.ts +0 -230
- package/back-end-node/src/modules/domain/sites-and-depots/sites-and-depots.module.ts +0 -82
- package/back-end-node/src/modules/domain/sites-and-depots/types/sites-and-depots.types.ts +0 -242
- package/back-end-node/src/modules/domain/study/repositories/study-config.repository.ts +0 -297
- package/back-end-node/src/modules/domain/study/schemas/study-config-blinding-aggregation.schema.ts +0 -35
- package/back-end-node/src/modules/domain/study/schemas/study-config-blindingview.schema.ts +0 -61
- package/back-end-node/src/modules/domain/study/schemas/study-config-cohorts.schema.ts +0 -115
- package/back-end-node/src/modules/domain/study/schemas/study-config-fieldHeader.schema.ts +0 -48
- package/back-end-node/src/modules/domain/study/schemas/study-config-notification.schema.ts +0 -166
- package/back-end-node/src/modules/domain/study/schemas/study-config-product-returns.schema.ts +0 -82
- package/back-end-node/src/modules/domain/study/schemas/study-config-report.schema.ts +0 -77
- package/back-end-node/src/modules/domain/study/schemas/study-config-site.schema.ts +0 -95
- package/back-end-node/src/modules/domain/study/schemas/study-config-study.schema.ts +0 -161
- package/back-end-node/src/modules/domain/study/schemas/study-config-subject-details-config.schema.ts +0 -137
- package/back-end-node/src/modules/domain/study/schemas/study-config-subject.schema.ts +0 -239
- package/back-end-node/src/modules/domain/study/schemas/study-config-unblinded-event.schema.ts +0 -89
- package/back-end-node/src/modules/domain/study/schemas/study-config-user.schema.ts +0 -35
- package/back-end-node/src/modules/domain/study/schemas/study-config.schema.ts +0 -30
- package/back-end-node/src/modules/domain/study/study-config.service.ts +0 -189
- package/back-end-node/src/modules/domain/study/study-config.util.ts +0 -97
- package/back-end-node/src/modules/domain/study/study.module.ts +0 -140
- package/back-end-node/src/modules/domain/study/types/roles-and-permissions.ts +0 -220
- package/back-end-node/src/modules/domain/study/types/study-config-master.ts +0 -176
- package/back-end-node/src/modules/domain/study/types/study-config.interface.ts +0 -23
- package/back-end-node/src/modules/domain/study/types/study_config.ts +0 -120
- package/back-end-node/src/modules/domain/subject/dto/input/get-participants-for-batch-creation.input.ts +0 -6
- package/back-end-node/src/modules/domain/subject/dto/input/get-participants.input.ts +0 -12
- package/back-end-node/src/modules/domain/subject/dto/output/get-participants.output.ts +0 -22
- package/back-end-node/src/modules/domain/subject/dto/output/study-summary.output.ts +0 -121
- package/back-end-node/src/modules/domain/subject/dto/output/subject-info.output.ts +0 -13
- package/back-end-node/src/modules/domain/subject/dto/output/subject-trasnactions-grid.output.ts +0 -53
- package/back-end-node/src/modules/domain/subject/dto/output/subjects-by-cohort.output.ts +0 -43
- package/back-end-node/src/modules/domain/subject/repositories/limitsAndSwitches.repository.ts +0 -473
- package/back-end-node/src/modules/domain/subject/repositories/pipelines/subject.pipeline.ts +0 -674
- package/back-end-node/src/modules/domain/subject/repositories/subject-visits.repository.ts +0 -680
- package/back-end-node/src/modules/domain/subject/repositories/subjects.repository.ts +0 -283
- package/back-end-node/src/modules/domain/subject/schemas/limitsAndSwitches-protocol.schema.ts +0 -49
- package/back-end-node/src/modules/domain/subject/schemas/limitsAndSwithches.schema.ts +0 -67
- package/back-end-node/src/modules/domain/subject/schemas/reservation-request.schema.ts +0 -60
- package/back-end-node/src/modules/domain/subject/schemas/subject-events.schema.ts +0 -56
- package/back-end-node/src/modules/domain/subject/schemas/subject-visit-details.schema.ts +0 -55
- package/back-end-node/src/modules/domain/subject/schemas/subject-visit-events.schema.ts +0 -62
- package/back-end-node/src/modules/domain/subject/schemas/subject-visit.schema.ts +0 -79
- package/back-end-node/src/modules/domain/subject/schemas/subject.schema.ts +0 -152
- package/back-end-node/src/modules/domain/subject/services/limitAndSwitches.service.ts +0 -193
- package/back-end-node/src/modules/domain/subject/services/subject.service.ts +0 -556
- package/back-end-node/src/modules/domain/subject/subject.controller.ts +0 -191
- package/back-end-node/src/modules/domain/subject/subject.module.ts +0 -93
- package/back-end-node/src/modules/domain/subject/subject.types.ts +0 -59
- package/back-end-node/src/modules/domain/subject/types/limits.types.ts +0 -68
- package/back-end-node/src/modules/domain/supply/constants/index.ts +0 -9
- package/back-end-node/src/modules/domain/supply/controllers/inventory-monitoring.controller.ts +0 -105
- package/back-end-node/src/modules/domain/supply/controllers/supplyItem-lists.controller.ts +0 -874
- package/back-end-node/src/modules/domain/supply/controllers/supplyItem-types.controller.ts +0 -197
- package/back-end-node/src/modules/domain/supply/depot-country-supply.controller.ts +0 -112
- package/back-end-node/src/modules/domain/supply/dto/input/create-depot-country-params.input.ts +0 -40
- package/back-end-node/src/modules/domain/supply/dto/input/create-supply-strategy-supply-params.ts +0 -107
- package/back-end-node/src/modules/domain/supply/dto/input/get-supply-item-types.input.ts +0 -17
- package/back-end-node/src/modules/domain/supply/dto/input/get-supply-strategy-supply-params.input.ts +0 -41
- package/back-end-node/src/modules/domain/supply/dto/input/inventory-check-assignment.input.ts +0 -162
- package/back-end-node/src/modules/domain/supply/dto/input/inventory-monitoring.input.ts +0 -81
- package/back-end-node/src/modules/domain/supply/dto/input/kit-replacement.input.ts +0 -132
- package/back-end-node/src/modules/domain/supply/dto/input/list-filters.input.ts +0 -35
- package/back-end-node/src/modules/domain/supply/dto/input/list-supply-item-list-light.input.ts +0 -34
- package/back-end-node/src/modules/domain/supply/dto/input/list-supply-item-numbers.input.ts +0 -13
- package/back-end-node/src/modules/domain/supply/dto/input/list-supply-item-quantity.input.ts +0 -11
- package/back-end-node/src/modules/domain/supply/dto/input/list-supply-item-types.input.ts +0 -13
- package/back-end-node/src/modules/domain/supply/dto/input/list-supply-items.input.ts +0 -283
- package/back-end-node/src/modules/domain/supply/dto/input/non-serialized-bulk-expiry-update.input.ts +0 -44
- package/back-end-node/src/modules/domain/supply/dto/input/revert-assignment.input.ts +0 -31
- package/back-end-node/src/modules/domain/supply/dto/input/serialized-bulk-expiry-update.input.ts +0 -23
- package/back-end-node/src/modules/domain/supply/dto/input/shipment-kit-list.input.ts +0 -24
- package/back-end-node/src/modules/domain/supply/dto/input/update-bulk-status.input.ts +0 -34
- package/back-end-node/src/modules/domain/supply/dto/input/update-depot-country-params.input.ts +0 -18
- package/back-end-node/src/modules/domain/supply/dto/input/update-kit-type-country-params.input.ts +0 -9
- package/back-end-node/src/modules/domain/supply/dto/input/update-non-serialized-bulk-status.input.ts +0 -55
- package/back-end-node/src/modules/domain/supply/dto/input/update-supply-strategy-supply-params.input.ts +0 -62
- package/back-end-node/src/modules/domain/supply/dto/input/update-supply-threshold.input.ts +0 -26
- package/back-end-node/src/modules/domain/supply/dto/output/create-depot-country-params.output.ts +0 -196
- package/back-end-node/src/modules/domain/supply/dto/output/current-location.output.ts +0 -24
- package/back-end-node/src/modules/domain/supply/dto/output/drug-accountability-report.output.ts +0 -202
- package/back-end-node/src/modules/domain/supply/dto/output/environment-data.output.ts +0 -32
- package/back-end-node/src/modules/domain/supply/dto/output/filters.output.ts +0 -34
- package/back-end-node/src/modules/domain/supply/dto/output/get-supply-item-types.output.ts +0 -78
- package/back-end-node/src/modules/domain/supply/dto/output/inventory-check-assignment.output.ts +0 -229
- package/back-end-node/src/modules/domain/supply/dto/output/inventory-monitoring.output.ts +0 -182
- package/back-end-node/src/modules/domain/supply/dto/output/kit-comment.output.ts +0 -30
- package/back-end-node/src/modules/domain/supply/dto/output/kit-destruction.output.ts +0 -23
- package/back-end-node/src/modules/domain/supply/dto/output/kit-replacement.output.ts +0 -267
- package/back-end-node/src/modules/domain/supply/dto/output/list-filters.output.ts +0 -91
- package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-aggregate.output.ts +0 -41
- package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-list-light.output.ts +0 -54
- package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-numbers.output.ts +0 -20
- package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-quantity.output.ts +0 -22
- package/back-end-node/src/modules/domain/supply/dto/output/list-supply-item-types.output.ts +0 -35
- package/back-end-node/src/modules/domain/supply/dto/output/lot-number.output.ts +0 -17
- package/back-end-node/src/modules/domain/supply/dto/output/paginated-supply-item.output.ts +0 -62
- package/back-end-node/src/modules/domain/supply/dto/output/revert-assignment.output.ts +0 -26
- package/back-end-node/src/modules/domain/supply/dto/output/shipment-group-id.output.ts +0 -18
- package/back-end-node/src/modules/domain/supply/dto/output/shipment-info.output.ts +0 -35
- package/back-end-node/src/modules/domain/supply/dto/output/shipment-kit-list.output.ts +0 -53
- package/back-end-node/src/modules/domain/supply/dto/output/status-update.output.ts +0 -29
- package/back-end-node/src/modules/domain/supply/dto/output/supply-item-list-details.output.ts +0 -129
- package/back-end-node/src/modules/domain/supply/dto/output/supply-item-list.output.ts +0 -239
- package/back-end-node/src/modules/domain/supply/dto/output/supply-item-stretegy-type.output.ts +0 -50
- package/back-end-node/src/modules/domain/supply/dto/output/supply-item-type.output.ts +0 -74
- package/back-end-node/src/modules/domain/supply/dto/output/update-kit-type-params.output.ts +0 -102
- package/back-end-node/src/modules/domain/supply/dto/output/update-supply-strategy-supply-params.output.ts +0 -100
- package/back-end-node/src/modules/domain/supply/dto/output/volumetric-quantities.output.ts +0 -21
- package/back-end-node/src/modules/domain/supply/kit-type-country-supply.controller.ts +0 -73
- package/back-end-node/src/modules/domain/supply/repositories/pipelines/supplyItem-list.pipelines.ts +0 -1832
- package/back-end-node/src/modules/domain/supply/repositories/pipelines/supplyItem-lists-reports.pipelines.ts +0 -1279
- package/back-end-node/src/modules/domain/supply/repositories/supply-params.respository.ts +0 -420
- package/back-end-node/src/modules/domain/supply/repositories/supplyItem-lists.repository.ts +0 -2881
- package/back-end-node/src/modules/domain/supply/repositories/supplyItem-types.repository.ts +0 -147
- package/back-end-node/src/modules/domain/supply/schemas/supply-params-automated-resupply.schema.ts +0 -111
- package/back-end-node/src/modules/domain/supply/schemas/supply-params-country-kit-type.schema.ts +0 -49
- package/back-end-node/src/modules/domain/supply/schemas/supply-params-depot-country.schema.ts +0 -46
- package/back-end-node/src/modules/domain/supply/schemas/supply-params-manual-shipment.schema.ts +0 -42
- package/back-end-node/src/modules/domain/supply/schemas/supply-params.schema.ts +0 -42
- package/back-end-node/src/modules/domain/supply/schemas/supply-strategy-params.schema.ts +0 -53
- package/back-end-node/src/modules/domain/supply/schemas/supplyItem-lists-comment.schema.ts +0 -27
- package/back-end-node/src/modules/domain/supply/schemas/supplyItem-lists-destruction.schema.ts +0 -20
- package/back-end-node/src/modules/domain/supply/schemas/supplyItem-lists.schema.ts +0 -162
- package/back-end-node/src/modules/domain/supply/schemas/supplyItem-types.schema.ts +0 -214
- package/back-end-node/src/modules/domain/supply/services/inventory-monitoring.service.ts +0 -193
- package/back-end-node/src/modules/domain/supply/services/supply-item-type.service.ts +0 -212
- package/back-end-node/src/modules/domain/supply/services/supply-params.mailer.service.ts +0 -184
- package/back-end-node/src/modules/domain/supply/services/supply-params.service.ts +0 -536
- package/back-end-node/src/modules/domain/supply/services/supplyItem-lists-mailer.service.ts +0 -421
- package/back-end-node/src/modules/domain/supply/services/supplyItem-lists.service.ts +0 -3197
- package/back-end-node/src/modules/domain/supply/services/supplyItem-types.mailer.service.ts +0 -80
- package/back-end-node/src/modules/domain/supply/supply-strategy-supply-params.controller.ts +0 -192
- package/back-end-node/src/modules/domain/supply/supply.module.ts +0 -172
- package/back-end-node/src/modules/domain/supply/types/automated-resupply.types.ts +0 -18
- package/back-end-node/src/modules/domain/supply/types/common-supply-items.types.ts +0 -8
- package/back-end-node/src/modules/domain/supply/types/dto.ts +0 -63
- package/back-end-node/src/modules/domain/supply/types/excursion-tracking.ts +0 -4
- package/back-end-node/src/modules/domain/supply/types/shipment.types.ts +0 -131
- package/back-end-node/src/modules/domain/supply/types/supply-strategy.types.ts +0 -62
- package/back-end-node/src/modules/domain/supply/types/supply.types.ts +0 -513
- package/back-end-node/src/modules/domain/supply/types/transaction.types.ts +0 -7
- package/back-end-node/src/modules/domain/user/repositories/global-sponsor.repository.ts +0 -27
- package/back-end-node/src/modules/domain/user/repositories/global-user-permission.repository.ts +0 -61
- package/back-end-node/src/modules/domain/user/repositories/global-user.repository.ts +0 -165
- package/back-end-node/src/modules/domain/user/repositories/user-transaction.repository.ts +0 -74
- package/back-end-node/src/modules/domain/user/repositories/user.repository.ts +0 -161
- package/back-end-node/src/modules/domain/user/schemas/user-permissions.schema.ts +0 -103
- package/back-end-node/src/modules/domain/user/schemas/user-sessions.schema.ts +0 -31
- package/back-end-node/src/modules/domain/user/schemas/user-transactions.schema.ts +0 -111
- package/back-end-node/src/modules/domain/user/schemas/users.schema.ts +0 -146
- package/back-end-node/src/modules/domain/user/services/global-sponsor.service.ts +0 -12
- package/back-end-node/src/modules/domain/user/services/global-user-permission.service.ts +0 -24
- package/back-end-node/src/modules/domain/user/services/global-user.service.ts +0 -58
- package/back-end-node/src/modules/domain/user/services/user-mailer.service.ts +0 -196
- package/back-end-node/src/modules/domain/user/services/user-transaction.service.ts +0 -60
- package/back-end-node/src/modules/domain/user/services/user.service.ts +0 -72
- package/back-end-node/src/modules/domain/user/user.controller.ts +0 -53
- package/back-end-node/src/modules/domain/user/user.module.ts +0 -84
- package/back-end-node/src/modules/domain/user/user.types.ts +0 -31
- package/back-end-node/src/modules/domain/workflows/constants/workflows.constants.ts +0 -34
- package/back-end-node/src/modules/domain/workflows/constants/workflowsValidations.constants.ts +0 -15
- package/back-end-node/src/modules/domain/workflows/factories/execute.factory.ts +0 -96
- package/back-end-node/src/modules/domain/workflows/factories/options.factory.ts +0 -7
- package/back-end-node/src/modules/domain/workflows/factories/selectors.factory.ts +0 -33
- package/back-end-node/src/modules/domain/workflows/interface/workflowValidations.interface.ts +0 -45
- package/back-end-node/src/modules/domain/workflows/interface/workflows.interface.ts +0 -97
- package/back-end-node/src/modules/domain/workflows/live/workflowValidations.default.ts +0 -128
- package/back-end-node/src/modules/domain/workflows/live/workflowValidations.utils.ts +0 -107
- package/back-end-node/src/modules/domain/workflows/live/workflows.default.ts +0 -182
- package/back-end-node/src/modules/domain/workflows/mocks/workflows.test.ts +0 -160
- package/back-end-node/src/modules/domain/workflows/mocks/workflows.throwing.ts +0 -15
- package/back-end-node/src/modules/domain/workflows/modules/workflowValidations.module.ts +0 -26
- package/back-end-node/src/modules/domain/workflows/modules/workflows.module.ts +0 -33
- package/back-end-node/src/modules/domain/workflows/repositories/workflowValidations.repository.ts +0 -43
- package/back-end-node/src/modules/domain/workflows/repositories/workflows.repository.ts +0 -30
- package/back-end-node/src/modules/domain/workflows/schemas/workflowValidations.schema.ts +0 -23
- package/back-end-node/src/modules/domain/workflows/schemas/workflows.schema.ts +0 -102
- package/back-end-node/src/modules/domain/workflows/workflows.controller.ts +0 -70
- package/back-end-node/src/setup/api-doc.setup.ts +0 -34
- package/back-end-node/src/version.json +0 -5
- package/back-end-node/test/jest-e2e.json +0 -9
- package/back-end-node/test/sample.spec.ts +0 -16
- package/back-end-node/tsconfig.build.json +0 -4
- package/back-end-node/tsconfig.json +0 -22
- package/tmp/demo-dist/demo.js +0 -31
- package/tmp/demo.ts +0 -30
- package/tmp/dev-test.js +0 -67
- package/tmp/integration-unawaited.js +0 -184
- package/tmp/nest-app-events.json +0 -0
- package/tmp/nest-app.js +0 -90
- package/tmp/nest-trace-container-test.js +0 -50
- package/tmp/promise-map-debug.js +0 -45
- package/tmp/promise-map.test.js +0 -72
- package/tmp/tslike.js +0 -39
- 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.d.ts
CHANGED
|
@@ -195,7 +195,6 @@ export declare function initReproTracing(opts?: ReproTracingInitOptions): Tracer
|
|
|
195
195
|
export declare function isReproTracingEnabled(): boolean;
|
|
196
196
|
export type ReproMiddlewareConfig = {
|
|
197
197
|
appId: string;
|
|
198
|
-
tenantId: string;
|
|
199
198
|
appSecret: string;
|
|
200
199
|
/** Configure header capture/masking. Defaults to capturing with sensitive headers masked. */
|
|
201
200
|
captureHeaders?: boolean | HeaderCaptureOptions;
|
|
@@ -205,12 +204,10 @@ export type ReproMiddlewareConfig = {
|
|
|
205
204
|
export declare function reproMiddleware(cfg: ReproMiddlewareConfig): (req: Request, res: Response, next: NextFunction) => void;
|
|
206
205
|
export declare function reproMongoosePlugin(cfg: {
|
|
207
206
|
appId: string;
|
|
208
|
-
tenantId: string;
|
|
209
207
|
appSecret: string;
|
|
210
208
|
}): (schema: Schema) => void;
|
|
211
209
|
export type SendgridPatchConfig = {
|
|
212
210
|
appId: string;
|
|
213
|
-
tenantId: string;
|
|
214
211
|
appSecret: string;
|
|
215
212
|
resolveContext?: () => {
|
|
216
213
|
sid?: string;
|
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;
|
|
@@ -829,7 +856,6 @@ async function post(cfg, sessionId, body) {
|
|
|
829
856
|
'Content-Type': 'application/json',
|
|
830
857
|
'X-App-Id': cfg.appId,
|
|
831
858
|
'X-App-Secret': cfg.appSecret,
|
|
832
|
-
'X-Tenant-Id': cfg.tenantId,
|
|
833
859
|
},
|
|
834
860
|
body: JSON.stringify(body),
|
|
835
861
|
});
|
|
@@ -1689,7 +1715,11 @@ function reproMiddleware(cfg) {
|
|
|
1689
1715
|
evt.unawaited = ev.unawaited === true;
|
|
1690
1716
|
}
|
|
1691
1717
|
const dropEvent = shouldDropTraceEvent(candidate);
|
|
1718
|
+
const dropSpanTree = shouldPropagateUserDisabledFunctionTrace(candidate);
|
|
1692
1719
|
const spanKey = normalizeSpanId(evt.spanId);
|
|
1720
|
+
const parentSpanKey = normalizeSpanId(evt.parentSpanId);
|
|
1721
|
+
const isChildOfExcluded = parentSpanKey ? isExcludedSpanId(parentSpanKey) : false;
|
|
1722
|
+
const isExcluded = spanKey ? isExcludedSpanId(spanKey) : false;
|
|
1693
1723
|
if (evt.type === 'enter') {
|
|
1694
1724
|
lastEventAt = Date.now();
|
|
1695
1725
|
if (spanKey) {
|
|
@@ -1708,8 +1738,8 @@ function reproMiddleware(cfg) {
|
|
|
1708
1738
|
anonymousSpanDepth = Math.max(0, anonymousSpanDepth - 1);
|
|
1709
1739
|
}
|
|
1710
1740
|
}
|
|
1711
|
-
if (dropEvent) {
|
|
1712
|
-
if (evt.type === 'enter' && spanKey) {
|
|
1741
|
+
if (dropEvent || isChildOfExcluded || isExcluded) {
|
|
1742
|
+
if (evt.type === 'enter' && spanKey && (dropSpanTree || isChildOfExcluded || isExcluded)) {
|
|
1713
1743
|
try {
|
|
1714
1744
|
getCtx().excludedSpanIds?.add(spanKey);
|
|
1715
1745
|
}
|
package/docs/tracing.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repro-nest",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.221",
|
|
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;
|
|
@@ -1101,7 +1123,7 @@ function resolveCollectionOrWarn(source: any, type: 'doc' | 'query'): string {
|
|
|
1101
1123
|
}
|
|
1102
1124
|
|
|
1103
1125
|
async function post(
|
|
1104
|
-
cfg: {
|
|
1126
|
+
cfg: { appId: string; appSecret: string; apiBase?: string },
|
|
1105
1127
|
sessionId: string,
|
|
1106
1128
|
body: any,
|
|
1107
1129
|
) {
|
|
@@ -1115,7 +1137,6 @@ async function post(
|
|
|
1115
1137
|
'Content-Type': 'application/json',
|
|
1116
1138
|
'X-App-Id': cfg.appId,
|
|
1117
1139
|
'X-App-Secret': cfg.appSecret,
|
|
1118
|
-
'X-Tenant-Id': cfg.tenantId,
|
|
1119
1140
|
},
|
|
1120
1141
|
body: JSON.stringify(body),
|
|
1121
1142
|
});
|
|
@@ -1762,7 +1783,6 @@ function applyMasking(
|
|
|
1762
1783
|
// ===================================================================
|
|
1763
1784
|
export type ReproMiddlewareConfig = {
|
|
1764
1785
|
appId: string;
|
|
1765
|
-
tenantId: string;
|
|
1766
1786
|
appSecret: string;
|
|
1767
1787
|
/** Configure header capture/masking. Defaults to capturing with sensitive headers masked. */
|
|
1768
1788
|
captureHeaders?: boolean | HeaderCaptureOptions;
|
|
@@ -1977,16 +1997,20 @@ export function reproMiddleware(cfg: ReproMiddlewareConfig) {
|
|
|
1977
1997
|
if (ev.threw !== undefined) {
|
|
1978
1998
|
evt.threw = Boolean(ev.threw);
|
|
1979
1999
|
}
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
2000
|
+
if (ev.unawaited !== undefined) {
|
|
2001
|
+
evt.unawaited = ev.unawaited === true;
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
const dropEvent = shouldDropTraceEvent(candidate);
|
|
2005
|
+
const dropSpanTree = shouldPropagateUserDisabledFunctionTrace(candidate);
|
|
2006
|
+
const spanKey = normalizeSpanId(evt.spanId);
|
|
2007
|
+
const parentSpanKey = normalizeSpanId(evt.parentSpanId);
|
|
2008
|
+
const isChildOfExcluded = parentSpanKey ? isExcludedSpanId(parentSpanKey) : false;
|
|
2009
|
+
const isExcluded = spanKey ? isExcludedSpanId(spanKey) : false;
|
|
2010
|
+
if (evt.type === 'enter') {
|
|
2011
|
+
lastEventAt = Date.now();
|
|
2012
|
+
if (spanKey) {
|
|
2013
|
+
activeSpans.add(spanKey);
|
|
1990
2014
|
} else {
|
|
1991
2015
|
anonymousSpanDepth = Math.max(0, anonymousSpanDepth + 1);
|
|
1992
2016
|
}
|
|
@@ -1996,16 +2020,16 @@ export function reproMiddleware(cfg: ReproMiddlewareConfig) {
|
|
|
1996
2020
|
activeSpans.delete(spanKey);
|
|
1997
2021
|
} else if (!spanKey && anonymousSpanDepth > 0) {
|
|
1998
2022
|
anonymousSpanDepth = Math.max(0, anonymousSpanDepth - 1);
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
if (dropEvent || isChildOfExcluded || isExcluded) {
|
|
2027
|
+
if (evt.type === 'enter' && spanKey && (dropSpanTree || isChildOfExcluded || isExcluded)) {
|
|
2028
|
+
try { (getCtx() as Ctx).excludedSpanIds?.add(spanKey); } catch {}
|
|
2029
|
+
}
|
|
2030
|
+
if (finished) {
|
|
2031
|
+
scheduleIdleFlush();
|
|
2032
|
+
}
|
|
2009
2033
|
return;
|
|
2010
2034
|
}
|
|
2011
2035
|
|
|
@@ -2202,7 +2226,7 @@ export function reproMiddleware(cfg: ReproMiddlewareConfig) {
|
|
|
2202
2226
|
// - ONLY schema middleware (pre/post) for specific ops
|
|
2203
2227
|
// - keeps your existing doc-diff hooks
|
|
2204
2228
|
// ===================================================================
|
|
2205
|
-
export function reproMongoosePlugin(cfg: { appId: string;
|
|
2229
|
+
export function reproMongoosePlugin(cfg: { appId: string; appSecret: string }) {
|
|
2206
2230
|
return function (schema: Schema) {
|
|
2207
2231
|
// -------- pre/post save (unchanged) --------
|
|
2208
2232
|
schema.pre('save', { document: true }, async function (next) {
|
|
@@ -2697,7 +2721,6 @@ function buildMinimalUpdate(before: any, after: any) {
|
|
|
2697
2721
|
// ===================================================================
|
|
2698
2722
|
export type SendgridPatchConfig = {
|
|
2699
2723
|
appId: string;
|
|
2700
|
-
tenantId: string;
|
|
2701
2724
|
appSecret: string;
|
|
2702
2725
|
resolveContext?: () => { sid?: string; aid?: string } | undefined;
|
|
2703
2726
|
};
|
|
@@ -8,7 +8,7 @@ export const getCtx = () => als.getStore() || {};
|
|
|
8
8
|
// If you already export als/getCtx from repro-node, reuse that instead of re-declaring.
|
|
9
9
|
|
|
10
10
|
async function post(
|
|
11
|
-
cfg: {
|
|
11
|
+
cfg: { appId: string; appSecret: string; apiBase?: string },
|
|
12
12
|
sessionId: string,
|
|
13
13
|
body: any,
|
|
14
14
|
) {
|
|
@@ -22,7 +22,6 @@ async function post(
|
|
|
22
22
|
'Content-Type': 'application/json',
|
|
23
23
|
'X-App-Id': cfg.appId,
|
|
24
24
|
'X-App-Secret': cfg.appSecret,
|
|
25
|
-
'X-Tenant-Id': cfg.tenantId,
|
|
26
25
|
},
|
|
27
26
|
body: JSON.stringify(body),
|
|
28
27
|
});
|
|
@@ -31,7 +30,6 @@ async function post(
|
|
|
31
30
|
|
|
32
31
|
export type SendgridPatchConfig = {
|
|
33
32
|
appId: string;
|
|
34
|
-
tenantId: string;
|
|
35
33
|
appSecret: string;
|
|
36
34
|
// Optional: provide a function to resolve sid/aid if AsyncLocalStorage is not set
|
|
37
35
|
resolveContext?: () => { sid?: string; aid?: string } | undefined;
|
|
@@ -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
|