@lenne.tech/nest-server 10.2.7 → 10.2.8
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/dist/config.env.js +75 -75
- package/dist/config.env.js.map +1 -1
- package/dist/core/common/args/filter.args.js +1 -1
- package/dist/core/common/args/filter.args.js.map +1 -1
- package/dist/core/common/args/pagination.args.js.map +1 -1
- package/dist/core/common/decorators/current-user.decorator.js.map +1 -1
- package/dist/core/common/decorators/graphql-populate.decorator.js.map +1 -1
- package/dist/core/common/decorators/graphql-service-options.decorator.js.map +1 -1
- package/dist/core/common/decorators/restricted.decorator.d.ts +4 -4
- package/dist/core/common/decorators/restricted.decorator.js +2 -2
- package/dist/core/common/decorators/restricted.decorator.js.map +1 -1
- package/dist/core/common/enums/comparison-operator.enum.js +1 -1
- package/dist/core/common/enums/comparison-operator.enum.js.map +1 -1
- package/dist/core/common/enums/logical-operator.enum.js +1 -1
- package/dist/core/common/enums/logical-operator.enum.js.map +1 -1
- package/dist/core/common/enums/role.enum.d.ts +3 -3
- package/dist/core/common/enums/role.enum.js +2 -2
- package/dist/core/common/enums/role.enum.js.map +1 -1
- package/dist/core/common/enums/sort-order.emum.js +1 -1
- package/dist/core/common/enums/sort-order.emum.js.map +1 -1
- package/dist/core/common/filters/http-exception-log.filter.js.map +1 -1
- package/dist/core/common/helpers/config.helper.js.map +1 -1
- package/dist/core/common/helpers/context.helper.js +1 -1
- package/dist/core/common/helpers/context.helper.js.map +1 -1
- package/dist/core/common/helpers/db.helper.d.ts +28 -4
- package/dist/core/common/helpers/db.helper.js +4 -4
- package/dist/core/common/helpers/db.helper.js.map +1 -1
- package/dist/core/common/helpers/decorator.helper.d.ts +24 -0
- package/dist/core/common/helpers/decorator.helper.js.map +1 -1
- package/dist/core/common/helpers/file.helper.js +1 -1
- package/dist/core/common/helpers/file.helper.js.map +1 -1
- package/dist/core/common/helpers/filter.helper.d.ts +26 -2
- package/dist/core/common/helpers/filter.helper.js +3 -3
- package/dist/core/common/helpers/filter.helper.js.map +1 -1
- package/dist/core/common/helpers/graphql.helper.d.ts +2 -2
- package/dist/core/common/helpers/graphql.helper.js +1 -1
- package/dist/core/common/helpers/graphql.helper.js.map +1 -1
- package/dist/core/common/helpers/input.helper.d.ts +3 -3
- package/dist/core/common/helpers/input.helper.js +5 -5
- package/dist/core/common/helpers/input.helper.js.map +1 -1
- package/dist/core/common/helpers/model.helper.d.ts +2 -2
- package/dist/core/common/helpers/model.helper.js +3 -3
- package/dist/core/common/helpers/model.helper.js.map +1 -1
- package/dist/core/common/helpers/service.helper.d.ts +6 -6
- package/dist/core/common/helpers/service.helper.js +5 -5
- package/dist/core/common/helpers/service.helper.js.map +1 -1
- package/dist/core/common/helpers/table.helper.d.ts +3 -3
- package/dist/core/common/helpers/table.helper.js +7 -7
- package/dist/core/common/helpers/table.helper.js.map +1 -1
- package/dist/core/common/inputs/combined-filter.input.js.map +1 -1
- package/dist/core/common/inputs/filter.input.js.map +1 -1
- package/dist/core/common/inputs/single-filter.input.js.map +1 -1
- package/dist/core/common/inputs/sort.input.js.map +1 -1
- package/dist/core/common/interceptors/check-response.interceptor.js.map +1 -1
- package/dist/core/common/interceptors/check-security.interceptor.js.map +1 -1
- package/dist/core/common/interfaces/core-persistence-model.interface.d.ts +3 -3
- package/dist/core/common/interfaces/mailjet-options.interface.d.ts +1 -1
- package/dist/core/common/interfaces/prepare-input-options.interface.d.ts +1 -1
- package/dist/core/common/interfaces/server-options.interface.d.ts +12 -8
- package/dist/core/common/interfaces/service-options.interface.d.ts +31 -5
- package/dist/core/common/models/core-model.model.js.map +1 -1
- package/dist/core/common/models/core-persistence.model.d.ts +24 -0
- package/dist/core/common/models/core-persistence.model.js.map +1 -1
- package/dist/core/common/pipes/check-input.pipe.js.map +1 -1
- package/dist/core/common/pipes/map-and-validate.pipe.js.map +1 -1
- package/dist/core/common/plugins/complexity.plugin.js +4 -4
- package/dist/core/common/plugins/complexity.plugin.js.map +1 -1
- package/dist/core/common/plugins/mongoose-id.plugin.js.map +1 -1
- package/dist/core/common/scalars/any.scalar.js.map +1 -1
- package/dist/core/common/scalars/date-timestamp.scalar.js.map +1 -1
- package/dist/core/common/scalars/date.scalar.js.map +1 -1
- package/dist/core/common/scalars/json.scalar.js.map +1 -1
- package/dist/core/common/services/brevo.service.d.ts +4 -0
- package/dist/core/common/services/brevo.service.js +27 -4
- package/dist/core/common/services/brevo.service.js.map +1 -1
- package/dist/core/common/services/config.service.js +1 -1
- package/dist/core/common/services/config.service.js.map +1 -1
- package/dist/core/common/services/core-cron-jobs.service.d.ts +2 -2
- package/dist/core/common/services/core-cron-jobs.service.js.map +1 -1
- package/dist/core/common/services/crud.service.d.ts +58 -32
- package/dist/core/common/services/crud.service.js +40 -23
- package/dist/core/common/services/crud.service.js.map +1 -1
- package/dist/core/common/services/email.service.js +5 -5
- package/dist/core/common/services/email.service.js.map +1 -1
- package/dist/core/common/services/mailjet.service.d.ts +4 -4
- package/dist/core/common/services/mailjet.service.js +8 -8
- package/dist/core/common/services/mailjet.service.js.map +1 -1
- package/dist/core/common/services/model-doc.service.d.ts +24 -0
- package/dist/core/common/services/model-doc.service.js +1 -1
- package/dist/core/common/services/model-doc.service.js.map +1 -1
- package/dist/core/common/services/module.service.d.ts +28 -4
- package/dist/core/common/services/module.service.js +8 -4
- package/dist/core/common/services/module.service.js.map +1 -1
- package/dist/core/common/services/template.service.js +3 -3
- package/dist/core/common/services/template.service.js.map +1 -1
- package/dist/core/common/types/core-model-constructor.type.d.ts +1 -1
- package/dist/core/common/types/falsy.type.d.ts +1 -1
- package/dist/core/common/types/field-selection.type.d.ts +25 -1
- package/dist/core/common/types/ids.type.d.ts +31 -7
- package/dist/core/common/types/maybe-promise.type.d.ts +1 -1
- package/dist/core/common/types/plain-input.type.d.ts +1 -1
- package/dist/core/common/types/populate-config.type.d.ts +25 -1
- package/dist/core/common/types/string-or-object-id.type.d.ts +25 -1
- package/dist/core/modules/auth/core-auth.controller.js +1 -1
- package/dist/core/modules/auth/core-auth.controller.js.map +1 -1
- package/dist/core/modules/auth/core-auth.model.js.map +1 -1
- package/dist/core/modules/auth/core-auth.module.d.ts +5 -5
- package/dist/core/modules/auth/core-auth.module.js +5 -5
- package/dist/core/modules/auth/core-auth.module.js.map +1 -1
- package/dist/core/modules/auth/core-auth.resolver.js +1 -1
- package/dist/core/modules/auth/core-auth.resolver.js.map +1 -1
- package/dist/core/modules/auth/guards/auth.guard.d.ts +1 -1
- package/dist/core/modules/auth/guards/auth.guard.js +1 -1
- package/dist/core/modules/auth/guards/auth.guard.js.map +1 -1
- package/dist/core/modules/auth/guards/refresh-token.guard.js.map +1 -1
- package/dist/core/modules/auth/guards/roles.guard.js.map +1 -1
- package/dist/core/modules/auth/inputs/core-auth-sign-in.input.js.map +1 -1
- package/dist/core/modules/auth/inputs/core-auth-sign-up.input.js.map +1 -1
- package/dist/core/modules/auth/interfaces/core-auth-user.interface.d.ts +1 -1
- package/dist/core/modules/auth/interfaces/core-token-data.interface.d.ts +1 -1
- package/dist/core/modules/auth/interfaces/jwt-payload.interface.d.ts +1 -1
- package/dist/core/modules/auth/services/core-auth.service.d.ts +1 -1
- package/dist/core/modules/auth/services/core-auth.service.js +10 -10
- package/dist/core/modules/auth/services/core-auth.service.js.map +1 -1
- package/dist/core/modules/auth/strategies/jwt-refresh.strategy.js +1 -1
- package/dist/core/modules/auth/strategies/jwt-refresh.strategy.js.map +1 -1
- package/dist/core/modules/auth/strategies/jwt.strategy.js.map +1 -1
- package/dist/core/modules/auth/tokens.decorator.js +1 -1
- package/dist/core/modules/auth/tokens.decorator.js.map +1 -1
- package/dist/core/modules/file/core-file-info.model.d.ts +24 -0
- package/dist/core/modules/file/core-file-info.model.js +5 -5
- package/dist/core/modules/file/core-file-info.model.js.map +1 -1
- package/dist/core/modules/file/core-file.controller.js.map +1 -1
- package/dist/core/modules/file/core-file.resolver.js +1 -1
- package/dist/core/modules/file/core-file.resolver.js.map +1 -1
- package/dist/core/modules/file/core-file.service.d.ts +30 -6
- package/dist/core/modules/file/core-file.service.js +3 -3
- package/dist/core/modules/file/core-file.service.js.map +1 -1
- package/dist/core/modules/file/interfaces/file-service-options.interface.d.ts +1 -1
- package/dist/core/modules/file/interfaces/file-upload.interface.d.ts +2 -2
- package/dist/core/modules/health-check/core-health-check-result.model.js.map +1 -1
- package/dist/core/modules/health-check/core-health-check.controller.js.map +1 -1
- package/dist/core/modules/health-check/core-health-check.module.js +1 -1
- package/dist/core/modules/health-check/core-health-check.module.js.map +1 -1
- package/dist/core/modules/health-check/core-health-check.resolver.js +2 -2
- package/dist/core/modules/health-check/core-health-check.resolver.js.map +1 -1
- package/dist/core/modules/health-check/core-health-check.service.js +1 -1
- package/dist/core/modules/health-check/core-health-check.service.js.map +1 -1
- package/dist/core/modules/user/core-user.model.d.ts +24 -0
- package/dist/core/modules/user/core-user.model.js +1 -1
- package/dist/core/modules/user/core-user.model.js.map +1 -1
- package/dist/core/modules/user/core-user.service.d.ts +25 -1
- package/dist/core/modules/user/core-user.service.js +3 -3
- package/dist/core/modules/user/core-user.service.js.map +1 -1
- package/dist/core/modules/user/inputs/core-user-create.input.js +1 -1
- package/dist/core/modules/user/inputs/core-user-create.input.js.map +1 -1
- package/dist/core/modules/user/inputs/core-user.input.js +1 -1
- package/dist/core/modules/user/inputs/core-user.input.js.map +1 -1
- package/dist/core.module.js +20 -20
- package/dist/core.module.js.map +1 -1
- package/dist/main.js +3 -3
- package/dist/main.js.map +1 -1
- package/dist/server/common/models/persistence.model.d.ts +24 -0
- package/dist/server/common/models/persistence.model.js +4 -4
- package/dist/server/common/models/persistence.model.js.map +1 -1
- package/dist/server/common/services/cron-jobs.service.js.map +1 -1
- package/dist/server/modules/auth/auth.controller.js.map +1 -1
- package/dist/server/modules/auth/auth.model.js.map +1 -1
- package/dist/server/modules/auth/auth.module.js +2 -2
- package/dist/server/modules/auth/auth.module.js.map +1 -1
- package/dist/server/modules/auth/auth.resolver.js.map +1 -1
- package/dist/server/modules/auth/auth.service.js +1 -1
- package/dist/server/modules/auth/auth.service.js.map +1 -1
- package/dist/server/modules/auth/inputs/auth-sign-in.input.js.map +1 -1
- package/dist/server/modules/auth/inputs/auth-sign-up.input.js.map +1 -1
- package/dist/server/modules/file/file-info.model.js.map +1 -1
- package/dist/server/modules/file/file.controller.js.map +1 -1
- package/dist/server/modules/file/file.module.js +2 -2
- package/dist/server/modules/file/file.module.js.map +1 -1
- package/dist/server/modules/file/file.resolver.js +5 -5
- package/dist/server/modules/file/file.resolver.js.map +1 -1
- package/dist/server/modules/file/file.service.d.ts +24 -0
- package/dist/server/modules/file/file.service.js.map +1 -1
- package/dist/server/modules/file/multer-config.service.js +2 -2
- package/dist/server/modules/file/multer-config.service.js.map +1 -1
- package/dist/server/modules/user/avatar.controller.js.map +1 -1
- package/dist/server/modules/user/inputs/user-create.input.js.map +1 -1
- package/dist/server/modules/user/inputs/user.input.js.map +1 -1
- package/dist/server/modules/user/outputs/find-and-count-users-result.output.js.map +1 -1
- package/dist/server/modules/user/user.model.js +2 -2
- package/dist/server/modules/user/user.model.js.map +1 -1
- package/dist/server/modules/user/user.module.js +2 -2
- package/dist/server/modules/user/user.module.js.map +1 -1
- package/dist/server/modules/user/user.resolver.d.ts +1 -1
- package/dist/server/modules/user/user.resolver.js +1 -1
- package/dist/server/modules/user/user.resolver.js.map +1 -1
- package/dist/server/modules/user/user.service.d.ts +25 -1
- package/dist/server/modules/user/user.service.js +2 -2
- package/dist/server/modules/user/user.service.js.map +1 -1
- package/dist/server/server.controller.js.map +1 -1
- package/dist/server/server.module.js +2 -2
- package/dist/server/server.module.js.map +1 -1
- package/dist/test/test.helper.d.ts +13 -13
- package/dist/test/test.helper.js +15 -15
- package/dist/test/test.helper.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +34 -34
- package/src/config.env.ts +79 -78
- package/src/core/common/args/filter.args.ts +2 -1
- package/src/core/common/args/pagination.args.ts +1 -0
- package/src/core/common/decorators/current-user.decorator.ts +1 -0
- package/src/core/common/decorators/graphql-populate.decorator.ts +1 -0
- package/src/core/common/decorators/graphql-service-options.decorator.ts +1 -0
- package/src/core/common/decorators/restricted.decorator.ts +7 -5
- package/src/core/common/enums/comparison-operator.enum.ts +1 -1
- package/src/core/common/enums/logical-operator.enum.ts +1 -1
- package/src/core/common/enums/role.enum.ts +6 -6
- package/src/core/common/enums/sort-order.emum.ts +1 -1
- package/src/core/common/helpers/context.helper.ts +1 -1
- package/src/core/common/helpers/db.helper.ts +14 -12
- package/src/core/common/helpers/decorator.helper.ts +1 -0
- package/src/core/common/helpers/file.helper.ts +1 -1
- package/src/core/common/helpers/filter.helper.ts +6 -5
- package/src/core/common/helpers/graphql.helper.ts +7 -6
- package/src/core/common/helpers/input.helper.ts +10 -8
- package/src/core/common/helpers/model.helper.ts +6 -5
- package/src/core/common/helpers/service.helper.ts +13 -11
- package/src/core/common/helpers/table.helper.ts +12 -10
- package/src/core/common/inputs/combined-filter.input.ts +1 -0
- package/src/core/common/inputs/filter.input.ts +1 -0
- package/src/core/common/inputs/single-filter.input.ts +1 -0
- package/src/core/common/inputs/sort.input.ts +1 -0
- package/src/core/common/interceptors/check-response.interceptor.ts +1 -0
- package/src/core/common/interceptors/check-security.interceptor.ts +1 -0
- package/src/core/common/interfaces/core-persistence-model.interface.ts +3 -3
- package/src/core/common/interfaces/cron-job-config-with-time-zone.interface.ts +1 -0
- package/src/core/common/interfaces/cron-job-config-with-utc-offset.interface.ts +1 -0
- package/src/core/common/interfaces/mailjet-options.interface.ts +1 -1
- package/src/core/common/interfaces/prepare-input-options.interface.ts +1 -1
- package/src/core/common/interfaces/server-options.interface.ts +33 -24
- package/src/core/common/interfaces/service-options.interface.ts +31 -16
- package/src/core/common/models/core-persistence.model.ts +1 -0
- package/src/core/common/pipes/check-input.pipe.ts +1 -0
- package/src/core/common/pipes/map-and-validate.pipe.ts +1 -0
- package/src/core/common/plugins/complexity.plugin.ts +5 -4
- package/src/core/common/scalars/date-timestamp.scalar.ts +1 -0
- package/src/core/common/scalars/date.scalar.ts +1 -0
- package/src/core/common/services/brevo.service.ts +50 -5
- package/src/core/common/services/config.service.ts +3 -1
- package/src/core/common/services/core-cron-jobs.service.ts +3 -2
- package/src/core/common/services/crud.service.ts +70 -43
- package/src/core/common/services/email.service.ts +7 -5
- package/src/core/common/services/mailjet.service.ts +14 -13
- package/src/core/common/services/model-doc.service.ts +2 -1
- package/src/core/common/services/module.service.ts +18 -10
- package/src/core/common/services/template.service.ts +5 -3
- package/src/core/common/types/core-model-constructor.type.ts +1 -1
- package/src/core/common/types/falsy.type.ts +1 -1
- package/src/core/common/types/field-selection.type.ts +4 -3
- package/src/core/common/types/ids.type.ts +3 -3
- package/src/core/common/types/maybe-promise.type.ts +1 -1
- package/src/core/common/types/plain-input.type.ts +1 -1
- package/src/core/common/types/populate-config.type.ts +1 -1
- package/src/core/common/types/string-or-object-id.type.ts +1 -1
- package/src/core/modules/auth/core-auth.controller.ts +2 -1
- package/src/core/modules/auth/core-auth.model.ts +1 -0
- package/src/core/modules/auth/core-auth.module.ts +8 -7
- package/src/core/modules/auth/core-auth.resolver.ts +2 -1
- package/src/core/modules/auth/guards/auth.guard.ts +4 -2
- package/src/core/modules/auth/guards/refresh-token.guard.ts +1 -0
- package/src/core/modules/auth/guards/roles.guard.ts +1 -0
- package/src/core/modules/auth/inputs/core-auth-sign-in.input.ts +1 -0
- package/src/core/modules/auth/inputs/core-auth-sign-up.input.ts +1 -0
- package/src/core/modules/auth/interfaces/core-auth-user.interface.ts +4 -4
- package/src/core/modules/auth/interfaces/core-token-data.interface.ts +4 -4
- package/src/core/modules/auth/interfaces/jwt-payload.interface.ts +1 -1
- package/src/core/modules/auth/services/core-auth.service.ts +13 -11
- package/src/core/modules/auth/strategies/jwt-refresh.strategy.ts +3 -2
- package/src/core/modules/auth/strategies/jwt.strategy.ts +3 -2
- package/src/core/modules/auth/tokens.decorator.ts +4 -3
- package/src/core/modules/file/core-file-info.model.ts +6 -5
- package/src/core/modules/file/core-file.controller.ts +1 -0
- package/src/core/modules/file/core-file.resolver.ts +2 -1
- package/src/core/modules/file/core-file.service.ts +9 -8
- package/src/core/modules/file/interfaces/file-service-options.interface.ts +1 -1
- package/src/core/modules/file/interfaces/file-upload.interface.ts +2 -2
- package/src/core/modules/health-check/core-health-check-result.model.ts +1 -0
- package/src/core/modules/health-check/core-health-check.controller.ts +1 -0
- package/src/core/modules/health-check/core-health-check.module.ts +2 -1
- package/src/core/modules/health-check/core-health-check.resolver.ts +3 -2
- package/src/core/modules/health-check/core-health-check.service.ts +2 -1
- package/src/core/modules/user/core-user.model.ts +2 -1
- package/src/core/modules/user/core-user.service.ts +6 -4
- package/src/core/modules/user/inputs/core-user-create.input.ts +2 -1
- package/src/core/modules/user/inputs/core-user.input.ts +2 -1
- package/src/core.module.ts +24 -22
- package/src/main.ts +5 -3
- package/src/server/common/models/persistence.model.ts +7 -5
- package/src/server/common/services/cron-jobs.service.ts +1 -0
- package/src/server/modules/auth/auth.controller.ts +1 -0
- package/src/server/modules/auth/auth.model.ts +1 -0
- package/src/server/modules/auth/auth.module.ts +3 -2
- package/src/server/modules/auth/auth.resolver.ts +1 -0
- package/src/server/modules/auth/auth.service.ts +2 -1
- package/src/server/modules/auth/inputs/auth-sign-in.input.ts +1 -0
- package/src/server/modules/auth/inputs/auth-sign-up.input.ts +1 -0
- package/src/server/modules/file/file-info.model.ts +1 -0
- package/src/server/modules/file/file.controller.ts +1 -0
- package/src/server/modules/file/file.module.ts +3 -2
- package/src/server/modules/file/file.resolver.ts +7 -5
- package/src/server/modules/file/file.service.ts +1 -0
- package/src/server/modules/file/multer-config.service.ts +3 -2
- package/src/server/modules/user/avatar.controller.ts +1 -0
- package/src/server/modules/user/inputs/user-create.input.ts +1 -0
- package/src/server/modules/user/inputs/user.input.ts +1 -0
- package/src/server/modules/user/outputs/find-and-count-users-result.output.ts +1 -0
- package/src/server/modules/user/user.model.ts +3 -2
- package/src/server/modules/user/user.module.ts +3 -2
- package/src/server/modules/user/user.resolver.ts +2 -1
- package/src/server/modules/user/user.service.ts +5 -3
- package/src/server/server.controller.ts +1 -0
- package/src/server/server.module.ts +7 -6
- package/src/test/test.helper.ts +28 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-doc.service.js","sourceRoot":"","sources":["../../../../src/core/common/services/model-doc.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"model-doc.service.js","sourceRoot":"","sources":["../../../../src/core/common/services/model-doc.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,+CAAoD;AACpD,uCAAsC;AAEtC,yBAA0B;AAC1B,4CAA6C;AAgBtC,IAAM,eAAe,GAArB,MAAM,eAAe;IAE1B,YACuC,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAE7D,CAAC;IAKD,KAAK,CAAC,sBAAsB;QAC1B,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QACxC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAMS,aAAa;QAGrB,MAAM,OAAO,GAAyD,EAAE,CAAC;QAGzE,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;QAC5C,KAAK,MAAM,SAAS,IAAI,MAAM,EAAE,CAAC;YAC/B,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;YAGxB,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC;YACvD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBACxC,MAAM,GAAG,GAAQ,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI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QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE;YAC/C,IAAI,GAAG,EAAE,CAAC;gBACR,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC;QACH,CAAC,CAAC,CAAC;QAGH,EAAE,CAAC,SAAS,CAAC,qBAAqB,EAAE,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE;YACtD,IAAI,GAAG,EAAE,CAAC;gBACR,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC;QACH,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,SAAS,CAAC,oBAAoB,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE;YACpD,IAAI,GAAG,EAAE,CAAC;gBACR,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA9HY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;IAIR,WAAA,IAAA,2BAAgB,GAAE,CAAA;qCAA8B,qBAAU;GAHlD,eAAe,CA8H3B"}
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
25
|
import { Document, Model, Types } from 'mongoose';
|
|
2
26
|
import { ProcessType } from '../enums/process-type.enum';
|
|
3
27
|
import { ServiceOptions } from '../interfaces/service-options.interface';
|
|
@@ -14,8 +38,8 @@ export declare abstract class ModuleService<T extends CoreModel = any> {
|
|
|
14
38
|
mainModelConstructor?: new (...args: any[]) => T;
|
|
15
39
|
});
|
|
16
40
|
checkRights(input: any, currentUser: {
|
|
17
|
-
id: any;
|
|
18
41
|
hasRole: (roles: string[]) => boolean;
|
|
42
|
+
id: any;
|
|
19
43
|
}, options?: {
|
|
20
44
|
dbObject?: any;
|
|
21
45
|
metatype?: any;
|
|
@@ -30,16 +54,16 @@ export declare abstract class ModuleService<T extends CoreModel = any> {
|
|
|
30
54
|
serviceOptions?: ServiceOptions;
|
|
31
55
|
}) => any, options?: {
|
|
32
56
|
[key: string]: any;
|
|
33
|
-
dbObject?:
|
|
34
|
-
outputPath?: string | string[];
|
|
57
|
+
dbObject?: Types.ObjectId | any | string;
|
|
35
58
|
input?: any;
|
|
59
|
+
outputPath?: string | string[];
|
|
36
60
|
serviceOptions?: ServiceOptions;
|
|
37
61
|
}): Promise<any>;
|
|
38
62
|
prepareInput(input: Record<string, any>, options?: ServiceOptions): Promise<any>;
|
|
39
63
|
prepareOutput(output: any, options?: ServiceOptions): Promise<any>;
|
|
40
64
|
processFieldSelection(data: any, fieldsSelection: FieldSelection, options?: {
|
|
41
|
-
model?: new (...args: any[]) => T;
|
|
42
65
|
dbModel?: Model<T & Document>;
|
|
43
66
|
ignoreSelections?: boolean;
|
|
67
|
+
model?: new (...args: any[]) => T;
|
|
44
68
|
}): Promise<T | T[]>;
|
|
45
69
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ModuleService = void 0;
|
|
4
|
-
const _ = require("lodash");
|
|
5
4
|
const mongoose_1 = require("mongoose");
|
|
6
5
|
const process_type_enum_1 = require("../enums/process-type.enum");
|
|
7
6
|
const db_helper_1 = require("../helpers/db.helper");
|
|
8
7
|
const input_helper_1 = require("../helpers/input.helper");
|
|
9
8
|
const service_helper_1 = require("../helpers/service.helper");
|
|
9
|
+
const _ = require("lodash");
|
|
10
10
|
class ModuleService {
|
|
11
11
|
constructor(options) {
|
|
12
12
|
this.configService = options?.configService;
|
|
@@ -23,16 +23,20 @@ class ModuleService {
|
|
|
23
23
|
const config = {
|
|
24
24
|
checkRights: true,
|
|
25
25
|
dbObject: options?.dbObject,
|
|
26
|
-
outputPath: options?.outputPath,
|
|
27
26
|
force: false,
|
|
28
27
|
input: options?.input,
|
|
29
|
-
|
|
28
|
+
outputPath: options?.outputPath,
|
|
30
29
|
prepareInput: {},
|
|
31
30
|
prepareOutput: {},
|
|
31
|
+
processFieldSelection: {},
|
|
32
32
|
pubSub: true,
|
|
33
33
|
setCreateOrUpdateUserId: true,
|
|
34
34
|
...options?.serviceOptions,
|
|
35
35
|
};
|
|
36
|
+
if (config.raw) {
|
|
37
|
+
config.prepareInput = null;
|
|
38
|
+
config.prepareOutput = null;
|
|
39
|
+
}
|
|
36
40
|
const ignoreSelections = this.configService?.getFastButReadOnly('ignoreSelectionsForPopulate', true);
|
|
37
41
|
if (ignoreSelections) {
|
|
38
42
|
if (config.processFieldSelection.ignoreSelections === undefined) {
|
|
@@ -151,8 +155,8 @@ class ModuleService {
|
|
|
151
155
|
}
|
|
152
156
|
async processFieldSelection(data, fieldsSelection, options = {}) {
|
|
153
157
|
const config = {
|
|
154
|
-
model: this.mainModelConstructor,
|
|
155
158
|
dbModel: this.mainDbModel,
|
|
159
|
+
model: this.mainModelConstructor,
|
|
156
160
|
...options,
|
|
157
161
|
};
|
|
158
162
|
return (0, db_helper_1.popAndMap)(data, fieldsSelection, config.model, config.dbModel, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.service.js","sourceRoot":"","sources":["../../../../src/core/common/services/module.service.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"module.service.js","sourceRoot":"","sources":["../../../../src/core/common/services/module.service.ts"],"names":[],"mappings":";;;AAAA,uCAAkD;AAElD,kEAAyD;AACzD,oDAA+D;AAC/D,0DAAgD;AAChD,8DAAwE;AAMxE,4BAA6B;AAK7B,MAAsB,aAAa;IAmBjC,YAAsB,OAIrB;QACC,IAAI,CAAC,aAAa,GAAG,OAAO,EAAE,aAAa,CAAC;QAC5C,IAAI,CAAC,WAAW,GAAG,OAAO,EAAE,WAAW,CAAC;QACxC,IAAI,CAAC,oBAAoB,GAAG,OAAO,EAAE,oBAAoB,CAAC;IAC5D,CAAC;IAKD,WAAW,CACT,KAAU,EACV,WAA+D,EAC/D,OAMC;QAED,MAAM,MAAM,GAAG;YACb,GAAG,OAAO;SACX,CAAC;QACF,OAAO,IAAA,oBAAK,EAAC,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;IAUD,KAAK,CAAC,OAAO,CACX,WAAoG,EACpG,OAMC;QAGD,MAAM,MAAM,GAIS;YACnB,WAAW,EAAE,IAAI;YACjB,QAAQ,EAAE,OAAO,EAAE,QAAQ;YAC3B,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,OAAO,EAAE,KAAK;YACrB,UAAU,EAAE,OAAO,EAAE,UAAU;YAC/B,YAAY,EAAE,EAAE;YAChB,aAAa,EAAE,EAAE;YACjB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W;YACzB,KAAK,EAAE,IAAI,CAAC,oBAAoB;YAChC,GAAG,OAAO;SACX,CAAC;QACF,OAAO,IAAA,qBAAS,EAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE;YACpE,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;SAC1C,CAAC,CAAC;IACL,CAAC;CACF;AAxQD,sCAwQC"}
|
|
@@ -10,11 +10,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.TemplateService = void 0;
|
|
13
|
-
const fs = require("fs");
|
|
14
|
-
const path_1 = require("path");
|
|
15
13
|
const common_1 = require("@nestjs/common");
|
|
16
|
-
const
|
|
14
|
+
const path_1 = require("path");
|
|
17
15
|
const config_service_1 = require("./config.service");
|
|
16
|
+
const ejs = require("ejs");
|
|
17
|
+
const fs = require("fs");
|
|
18
18
|
let TemplateService = class TemplateService {
|
|
19
19
|
constructor(configService) {
|
|
20
20
|
this.configService = configService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.service.js","sourceRoot":"","sources":["../../../../src/core/common/services/template.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"template.service.js","sourceRoot":"","sources":["../../../../src/core/common/services/template.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,+BAA4B;AAE5B,qDAAiD;AAEjD,2BAA4B;AAC5B,yBAA0B;AAMnB,IAAM,eAAe,GAArB,MAAM,eAAe;IAS1B,YAA+B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QALjD,cAAS,GAAwC,EAAE,CAAC;IAKA,CAAC;IAOxD,KAAK,CAAC,cAAc,CAAC,QAAgB,EAAE,YAAoC;QAChF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAClD,OAAO,QAAQ,CAAC,YAAY,CAAC,CAAC;IAChC,CAAC;IAMS,KAAK,CAAC,WAAW,CAAC,QAAgB;QAC1C,OAAO,IAAI,OAAO,CAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAEvD,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC7B,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAClC,OAAO;YACT,CAAC;YAGD,EAAE,CAAC,QAAQ,CACT,GAAG,IAAA,WAAI,EAAC,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,MAAM,EAChF,EAAE,QAAQ,EAAE,MAAM,EAAE,EACpB,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;gBACZ,IAAI,GAAG,EAAE,CAAC;oBACR,MAAM,CAAC,GAAG,CAAC,CAAC;gBACd,CAAC;qBAAM,CAAC;oBAEN,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;oBAC7C,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACpC,CAAC;YACH,CAAC,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAjDY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAUmC,8BAAa;GAThD,eAAe,CAiD3B"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CoreModel } from '../models/core-model.model';
|
|
2
2
|
export interface CoreModelConstructor<T extends CoreModel> {
|
|
3
|
-
new (): T;
|
|
4
3
|
init(this: new (...args: any[]) => T, ...args: any[]): T;
|
|
5
4
|
map(this: new (...args: any[]) => T, data: Partial<T> | Record<string, any>, options?: {
|
|
6
5
|
[key: string]: any;
|
|
@@ -18,4 +17,5 @@ export interface CoreModelConstructor<T extends CoreModel> {
|
|
|
18
17
|
item?: T;
|
|
19
18
|
mapId?: boolean;
|
|
20
19
|
}): T;
|
|
20
|
+
new (): T;
|
|
21
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type Falsy =
|
|
1
|
+
export type Falsy = '' | 0 | false | null | undefined;
|
|
@@ -1,4 +1,28 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
25
|
import { SelectionNode } from 'graphql';
|
|
2
26
|
import { PopulateOptions } from 'mongoose';
|
|
3
27
|
import { ResolveSelector } from '../interfaces/resolve-selector.interface';
|
|
4
|
-
export type FieldSelection =
|
|
28
|
+
export type FieldSelection = (PopulateOptions | string)[] | PopulateOptions | ResolveSelector | SelectionNode[] | string;
|
|
@@ -1,8 +1,32 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
25
|
import { Types } from 'mongoose';
|
|
2
|
-
export type IdsType =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} |
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
26
|
+
export type IdsType = ({
|
|
27
|
+
_id?: Types.ObjectId | string;
|
|
28
|
+
id?: Types.ObjectId | string;
|
|
29
|
+
} | Types.ObjectId | string)[] | {
|
|
30
|
+
_id?: Types.ObjectId | string;
|
|
31
|
+
id?: Types.ObjectId | string;
|
|
32
|
+
} | Types.ObjectId | string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type MaybePromise<T = any> = T |
|
|
1
|
+
export type MaybePromise<T = any> = Promise<T> | T;
|
|
@@ -1,2 +1,26 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
25
|
import { PopulateOptions } from 'mongoose';
|
|
2
|
-
export type PopulateConfig =
|
|
26
|
+
export type PopulateConfig = (PopulateOptions | string)[] | PopulateOptions | string | string[];
|
|
@@ -1,2 +1,26 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
25
|
import { Types } from 'mongoose';
|
|
2
|
-
export type StringOrObjectId<T = any> =
|
|
26
|
+
export type StringOrObjectId<T = any> = T | Types.ObjectId | string;
|
|
@@ -29,7 +29,7 @@ let CoreAuthController = class CoreAuthController {
|
|
|
29
29
|
this.configService = configService;
|
|
30
30
|
}
|
|
31
31
|
async logout(currentUser, token, res, allDevices) {
|
|
32
|
-
const result = await this.authService.logout(token, {
|
|
32
|
+
const result = await this.authService.logout(token, { allDevices, currentUser });
|
|
33
33
|
return this.processCookies(res, result);
|
|
34
34
|
}
|
|
35
35
|
async refreshToken(user, refreshToken, res) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-auth.controller.js","sourceRoot":"","sources":["../../../../src/core/modules/auth/core-auth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAmG;AACnG,6CAAuC;
|
|
1
|
+
{"version":3,"file":"core-auth.controller.js","sourceRoot":"","sources":["../../../../src/core/modules/auth/core-auth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAmG;AACnG,6CAAuC;AAGvC,2FAA6E;AAC7E,yEAAqE;AACrE,yEAA+D;AAE/D,oDAAgD;AAChD,8EAAuE;AACvE,8EAAuE;AAEvE,oEAA+D;AAC/D,yDAA4C;AAGrC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAI7B,YAA+B,WAA4B,EAAqB,aAA4B;QAA7E,gBAAW,GAAX,WAAW,CAAiB;QAAqB,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAO1G,AAAN,KAAK,CAAC,MAAM,CACK,WAA0B,EACxB,KAAa,EACvB,GAAiB,EACY,UAAoB;QAExD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,CAAC;QACjF,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAOK,AAAN,KAAK,CAAC,YAAY,CACD,IAAmB,EACV,YAAoB,EACrC,GAAiB;QAExB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QACxE,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAMK,AAAN,KAAK,CAAC,MAAM,CAAQ,GAAiB,EAAiB,KAA0B;QAC9E,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,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,gDAAkB;AAWvB;IAFL,IAAA,kBAAS,EAAC,IAAA,sBAAS,EAAC,4CAAiB,CAAC,GAAG,CAAC,CAAC;IAC3C,IAAA,YAAG,GAAE;IAEH,WAAA,IAAA,oCAAW,GAAE,CAAA;IACb,WAAA,IAAA,yBAAM,EAAC,OAAO,CAAC,CAAA;IACf,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAK,EAAC,YAAY,EAAE,sBAAa,CAAC,CAAA;;;;gDAIpC;AAOK;IAFL,IAAA,kBAAS,EAAC,IAAA,sBAAS,EAAC,4CAAiB,CAAC,WAAW,CAAC,CAAC;IACnD,IAAA,YAAG,GAAE;IAEH,WAAA,IAAA,oCAAW,GAAE,CAAA;IACb,WAAA,IAAA,yBAAM,EAAC,cAAc,CAAC,CAAA;IACtB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;sDAIP;AAMK;IADL,IAAA,aAAI,GAAE;IACO,WAAA,IAAA,YAAG,GAAE,CAAA;IAAqB,WAAA,IAAA,aAAI,EAAC,OAAO,CAAC,CAAA;;6CAAQ,6CAAmB;;gDAG/E;AAMK;IADL,IAAA,aAAI,GAAE;IACO,WAAA,IAAA,YAAG,GAAE,CAAA;IAAqB,WAAA,IAAA,cAAI,EAAC,OAAO,CAAC,CAAA;;6CAAQ,6CAAmB;;gDAG/E;6BAnDU,kBAAkB;IAD9B,IAAA,mBAAU,EAAC,MAAM,CAAC;qCAK2B,mCAAe,EAAoC,8BAAa;GAJjG,kBAAkB,CAoF9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-auth.model.js","sourceRoot":"","sources":["../../../../src/core/modules/auth/core-auth.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAoD;
|
|
1
|
+
{"version":3,"file":"core-auth.model.js","sourceRoot":"","sources":["../../../../src/core/modules/auth/core-auth.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAoD;AAEpD,2EAAiE;AACjE,6DAAwD;AAMjD,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,4BAAS;IAArC;;QASL,UAAK,GAAY,SAAS,CAAC;QAM3B,iBAAY,GAAY,SAAS,CAAC;QAMlC,SAAI,GAAkB,SAAS,CAAC;IAwBlC,CAAC;IAfU,IAAI;QACX,KAAK,CAAC,IAAI,EAAE,CAAC;QAEb,OAAO,IAAI,CAAC;IACd,CAAC;IAKQ,GAAG,CAAC,KAAK;QAChB,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAGjB,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AA7CY,sCAAa;AASxB;IADC,IAAA,eAAK,EAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC1C;AAM3B;IADC,IAAA,eAAK,EAAC,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACtB;AAMlC;IADC,IAAA,eAAK,EAAC,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;8BACjC,+BAAa;2CAAa;wBArBrB,aAAa;IADzB,IAAA,oBAAU,EAAC,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;GAC7C,aAAa,CA6CzB"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { DynamicModule, ForwardReference, Provider, Type } from '@nestjs/common';
|
|
2
2
|
import { JwtModuleOptions } from '@nestjs/jwt';
|
|
3
|
-
import { JwtRefreshStrategy } from './strategies/jwt-refresh.strategy';
|
|
4
|
-
import { JwtStrategy } from './strategies/jwt.strategy';
|
|
5
|
-
import { CoreAuthUserService } from './services/core-auth-user.service';
|
|
6
3
|
import { CoreAuthService } from './services/core-auth.service';
|
|
4
|
+
import { CoreAuthUserService } from './services/core-auth-user.service';
|
|
5
|
+
import { JwtStrategy } from './strategies/jwt.strategy';
|
|
6
|
+
import { JwtRefreshStrategy } from './strategies/jwt-refresh.strategy';
|
|
7
7
|
export declare class CoreAuthModule {
|
|
8
8
|
static forRoot(UserModule: Type<any>, UserService: Type<CoreAuthUserService>, options: JwtModuleOptions & {
|
|
9
9
|
authService?: Type<CoreAuthService>;
|
|
10
|
-
|
|
10
|
+
imports?: Array<DynamicModule | ForwardReference | Promise<DynamicModule> | Type<any>>;
|
|
11
11
|
jwtRefreshStrategy?: Type<JwtRefreshStrategy>;
|
|
12
|
-
|
|
12
|
+
jwtStrategy?: Type<JwtStrategy>;
|
|
13
13
|
providers?: Provider[];
|
|
14
14
|
}): DynamicModule;
|
|
15
15
|
}
|
|
@@ -15,10 +15,10 @@ const passport_1 = require("@nestjs/passport");
|
|
|
15
15
|
const graphql_subscriptions_1 = require("graphql-subscriptions");
|
|
16
16
|
const auth_guard_strategy_enum_1 = require("./auth-guard-strategy.enum");
|
|
17
17
|
const roles_guard_1 = require("./guards/roles.guard");
|
|
18
|
-
const jwt_refresh_strategy_1 = require("./strategies/jwt-refresh.strategy");
|
|
19
|
-
const jwt_strategy_1 = require("./strategies/jwt.strategy");
|
|
20
|
-
const core_auth_user_service_1 = require("./services/core-auth-user.service");
|
|
21
18
|
const core_auth_service_1 = require("./services/core-auth.service");
|
|
19
|
+
const core_auth_user_service_1 = require("./services/core-auth-user.service");
|
|
20
|
+
const jwt_strategy_1 = require("./strategies/jwt.strategy");
|
|
21
|
+
const jwt_refresh_strategy_1 = require("./strategies/jwt-refresh.strategy");
|
|
22
22
|
let CoreAuthModule = CoreAuthModule_1 = class CoreAuthModule {
|
|
23
23
|
static forRoot(UserModule, UserService, options) {
|
|
24
24
|
let imports = [
|
|
@@ -59,10 +59,10 @@ let CoreAuthModule = CoreAuthModule_1 = class CoreAuthModule {
|
|
|
59
59
|
providers = imports.concat(options.providers);
|
|
60
60
|
}
|
|
61
61
|
return {
|
|
62
|
-
|
|
62
|
+
exports: [core_auth_service_1.CoreAuthService, jwt_1.JwtModule, jwt_strategy_1.JwtStrategy, jwt_refresh_strategy_1.JwtRefreshStrategy, passport_1.PassportModule, UserModule],
|
|
63
63
|
imports,
|
|
64
|
+
module: CoreAuthModule_1,
|
|
64
65
|
providers,
|
|
65
|
-
exports: [core_auth_service_1.CoreAuthService, jwt_1.JwtModule, jwt_strategy_1.JwtStrategy, jwt_refresh_strategy_1.JwtRefreshStrategy, passport_1.PassportModule, UserModule],
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-auth.module.js","sourceRoot":"","sources":["../../../../src/core/modules/auth/core-auth.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAyF;AACzF,uCAAyC;AACzC,qCAA0D;AAC1D,+CAAkD;AAClD,iEAA+C;
|
|
1
|
+
{"version":3,"file":"core-auth.module.js","sourceRoot":"","sources":["../../../../src/core/modules/auth/core-auth.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAyF;AACzF,uCAAyC;AACzC,qCAA0D;AAC1D,+CAAkD;AAClD,iEAA+C;AAE/C,yEAA+D;AAC/D,sDAAkD;AAClD,oEAA+D;AAC/D,8EAAwE;AACxE,4DAAwD;AACxD,4EAAuE;AAMhE,IAAM,cAAc,sBAApB,MAAM,cAAc;IAKzB,MAAM,CAAC,OAAO,CACZ,UAAqB,EACrB,WAAsC,EACtC,OAMC;QAGD,IAAI,OAAO,GAAU;YACnB,UAAU;YACV,yBAAc,CAAC,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC,4CAAiB,CAAC,GAAG,EAAE,4CAAiB,CAAC,WAAW,CAAC,EAAE,CAAC;YACpG,eAAS,CAAC,QAAQ,CAAC,OAAO,CAAC;SAC5B,CAAC;QACF,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC;YACpC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC5C,CAAC;QAGD,IAAI,SAAS,GAAG;YAEd;gBACE,OAAO,EAAE,gBAAS;gBAClB,QAAQ,EAAE,wBAAU;aACrB;YACD;gBACE,OAAO,EAAE,4CAAmB;gBAC5B,QAAQ,EAAE,WAAW;aACtB;YACD;gBACE,OAAO,EAAE,SAAS;gBAClB,QAAQ,EAAE,IAAI,8BAAM,EAAE;aACvB;YACD;gBACE,OAAO,EAAE,mCAAe;gBACxB,QAAQ,EAAE,OAAO,CAAC,WAAW,IAAI,mCAAe;aACjD;YACD;gBACE,OAAO,EAAE,0BAAW;gBACpB,QAAQ,EAAE,OAAO,CAAC,WAAW,IAAI,0BAAW;aAC7C;YACD;gBACE,OAAO,EAAE,yCAAkB;gBAC3B,QAAQ,EAAE,OAAO,CAAC,kBAAkB,IAAI,yCAAkB;aAC3D;SACF,CAAC;QACF,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC;YACtC,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAChD,CAAC;QAGD,OAAO;YACL,OAAO,EAAE,CAAC,mCAAe,EAAE,eAAS,EAAE,0BAAW,EAAE,yCAAkB,EAAE,yBAAc,EAAE,UAAU,CAAC;YAClG,OAAO;YACP,MAAM,EAAE,gBAAc;YACtB,SAAS;SACV,CAAC;IACJ,CAAC;CACF,CAAA;AAlEY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,cAAc,CAkE1B"}
|
|
@@ -31,7 +31,7 @@ let CoreAuthResolver = class CoreAuthResolver {
|
|
|
31
31
|
this.configService = configService;
|
|
32
32
|
}
|
|
33
33
|
async logout(currentUser, ctx, token, allDevices) {
|
|
34
|
-
const result = await this.authService.logout(token, {
|
|
34
|
+
const result = await this.authService.logout(token, { allDevices, currentUser });
|
|
35
35
|
return this.processCookies(ctx, result);
|
|
36
36
|
}
|
|
37
37
|
async refreshToken(user, refreshToken, ctx) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-auth.resolver.js","sourceRoot":"","sources":["../../../../src/core/modules/auth/core-auth.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA2C;AAC3C,6CAAoE;
|
|
1
|
+
{"version":3,"file":"core-auth.resolver.js","sourceRoot":"","sources":["../../../../src/core/modules/auth/core-auth.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA2C;AAC3C,6CAAoE;AAGpE,2FAA6E;AAC7E,iHAAkG;AAElG,yEAAqE;AACrE,yEAA+D;AAC/D,uDAAkD;AAClD,oDAAgD;AAChD,8EAAuE;AACvE,8EAAuE;AAEvE,oEAA+D;AAC/D,yDAA4C;AAMrC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAI3B,YAA+B,WAA4B,EAAqB,aAA4B;QAA7E,gBAAW,GAAX,WAAW,CAAiB;QAAqB,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAW1G,AAAN,KAAK,CAAC,MAAM,CACK,WAA0B,EAC9B,GAA0B,EACpB,KAAa,EACU,UAAoB;QAE5D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,CAAC;QACjF,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAOK,AAAN,KAAK,CAAC,YAAY,CACD,IAAmB,EACV,YAAoB,EACjC,GAA0B;QAErC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QACxE,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAQK,AAAN,KAAK,CAAC,MAAM,CACyC,cAA8B,EACtE,GAA0B,EACtB,KAA0B;QAEzC,MAAM,MAAM,GAAG,MAAM,IAAI,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EAAE,CAAC;IAErG,WAAA,IAAA,yDAAqB,EAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAA;IACjD,WAAA,IAAA,iBAAO,GAAE,CAAA;IACT,WAAA,IAAA,cAAI,EAAC,OAAO,CAAC,CAAA;;qDAAQ,6CAAmB;;8CAI1C;2BAjEU,gBAAgB;IAD5B,IAAA,kBAAQ,EAAC,EAAE,CAAC,EAAE,CAAC,+BAAa,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;qCAKN,mCAAe,EAAoC,8BAAa;GAJjG,gBAAgB,CAkG5B"}
|
|
@@ -4,4 +4,4 @@ import { AuthGuardStrategy } from '../auth-guard-strategy.enum';
|
|
|
4
4
|
export type IAuthGuard = CanActivate & {
|
|
5
5
|
handleRequest<TUser = any>(err: any, user: any, info: any, context: any): TUser;
|
|
6
6
|
};
|
|
7
|
-
export declare const AuthGuard: (type?: string | string[]
|
|
7
|
+
export declare const AuthGuard: (type?: AuthGuardStrategy | string | string[]) => Type<IAuthGuard>;
|
|
@@ -18,11 +18,11 @@ const graphql_1 = require("@nestjs/graphql");
|
|
|
18
18
|
const passport_1 = require("@nestjs/passport");
|
|
19
19
|
const options_1 = require("@nestjs/passport/dist/options");
|
|
20
20
|
const memoize_util_1 = require("@nestjs/passport/dist/utils/memoize.util");
|
|
21
|
-
const passport = require("passport");
|
|
22
21
|
const auth_guard_strategy_enum_1 = require("../auth-guard-strategy.enum");
|
|
23
22
|
const expired_refresh_token_exception_1 = require("../exceptions/expired-refresh-token.exception");
|
|
24
23
|
const expired_token_exception_1 = require("../exceptions/expired-token.exception");
|
|
25
24
|
const invalid_token_exception_1 = require("../exceptions/invalid-token.exception");
|
|
25
|
+
const passport = require("passport");
|
|
26
26
|
const NO_STRATEGY_ERROR = 'In order to use "defaultStrategy", please, ensure to import PassportModule in each '
|
|
27
27
|
+ 'place where AuthGuard() is being used. Otherwise, passport won\'t work correctly.';
|
|
28
28
|
const createPassportContext = (request, response) => (type, options, callback) => new Promise((resolve, reject) => passport.authenticate(type, options, (err, user, info) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.guard.js","sourceRoot":"","sources":["../../../../../src/core/modules/auth/guards/auth.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwF;AACxF,6CAAsD;AACtD,+CAA2D;AAC3D,2DAA+D;AAC/D,2EAAmE;
|
|
1
|
+
{"version":3,"file":"auth.guard.js","sourceRoot":"","sources":["../../../../../src/core/modules/auth/guards/auth.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwF;AACxF,6CAAsD;AACtD,+CAA2D;AAC3D,2DAA+D;AAC/D,2EAAmE;AAEnE,0EAAgE;AAChE,mGAA6F;AAC7F,mFAA8E;AAC9E,mFAA8E;AAE9E,qCAAsC;AAKtC,MAAM,iBAAiB,GACnB,qFAAqF;MACrF,mFAAmF,CAAC;AAcxF,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,QAA4B,EAAE,EAAE,CACnG,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAC9B,QAAQ,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IACvD,IAAI,CAAC;QACH,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;QACxB,OAAO,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,CAAC,GAAG,CAAC,CAAC;IACd,CAAC;AACH,CAAC,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,C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AAM,IAAI,8DAA4B,EAAE,CAAC;oBAC3C,CAAC;yBAAM,CAAC;wBACN,MAAM,IAAI,+CAAqB,EAAE,CAAC;oBACpC,CAAC;gBACH,CAAC;gBACD,MAAM,IAAI,+CAAqB,EAAE,CAAC;YACpC,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAA;IA3EK,cAAc;QAIL,WAAA,IAAA,iBAAQ,GAAE,CAAA;yCAA8B,4BAAiB;OAJlE,cAAc,CA2EnB;IAED,MAAM,KAAK,GAAG,IAAA,cAAK,EAAC,cAAc,CAAC,CAAC;IACpC,OAAO,KAAK,CAAC;AACf,CAAC;AAKY,QAAA,SAAS,GAAuE,IAAA,sBAAO,EAAC,eAAe,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-token.guard.js","sourceRoot":"","sources":["../../../../../src/core/modules/auth/guards/refresh-token.guard.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;
|
|
1
|
+
{"version":3,"file":"refresh-token.guard.js","sourceRoot":"","sources":["../../../../../src/core/modules/auth/guards/refresh-token.guard.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAE5C,6CAAyC;AAGlC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,IAAA,sBAAS,EAAC,aAAa,CAAC;CAAG,CAAA;AAArD,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAAoC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.guard.js","sourceRoot":"","sources":["../../../../../src/core/modules/auth/guards/roles.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAqF;AACrF,uCAAyC;AACzC,6CAAsD;
|
|
1
|
+
{"version":3,"file":"roles.guard.js","sourceRoot":"","sources":["../../../../../src/core/modules/auth/guards/roles.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAq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,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,oBAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;gBACrF,OAAO,IAAI,CAAC;YACd,CAAC;YAGD,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,IAAI,GAAG,EAAE,CAAC;oBACR,MAAM,IAAI,+CAAqB,EAAE,CAAC;gBACpC,CAAC;gBACD,IAAI,IAAI,EAAE,IAAI,KAAK,mBAAmB,EAAE,CAAC;oBACvC,MAAM,IAAI,+CAAqB,EAAE,CAAC;gBACpC,CAAC;gBACD,MAAM,IAAI,8BAAqB,CAAC,cAAc,CAAC,CAAC;YAClD,CAAC;YAGD,MAAM,IAAI,8BAAqB,CAAC,cAAc,CAAC,CAAC;QAClD,CAAC;QAGD,OAAO,IAAI,CAAC;IACd,CAAC;IAKD,UAAU,CAAC,OAAyB;QAClC,MAAM,GAAG,GAAG,6BAAmB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAChD,OAAO,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;IACvF,CAAC;CACF,CAAA;AA/DY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;qCAK+B,gBAAS;GAJxC,UAAU,CA+DtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-auth-sign-in.input.js","sourceRoot":"","sources":["../../../../../src/core/modules/auth/inputs/core-auth-sign-in.input.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmD;
|
|
1
|
+
{"version":3,"file":"core-auth-sign-in.input.js","sourceRoot":"","sources":["../../../../../src/core/modules/auth/inputs/core-auth-sign-in.input.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmD;AAEnD,8EAAoE;AAM7D,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,4BAAS;IAA3C;;QAML,aAAQ,GAAY,SAAS,CAAC;QAG9B,sBAAiB,GAAY,SAAS,CAAC;QAGvC,UAAK,GAAW,SAAS,CAAC;QAG1B,aAAQ,GAAW,SAAS,CAAC;IAC/B,CAAC;CAAA,CAAA;AAhBY,kDAAmB;AAM9B;IADC,IAAA,eAAK,EAAC,EAAE,WAAW,EAAE,uDAAuD,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDAClE;AAG9B;IADC,IAAA,eAAK,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACtB;AAGvC;IADC,IAAA,eAAK,EAAC,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;kDACvB;AAG1B;IADC,IAAA,eAAK,EAAC,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;qDACvB;8BAflB,mBAAmB;IAD/B,IAAA,mBAAS,EAAC,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;GAC/B,mBAAmB,CAgB/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-auth-sign-up.input.js","sourceRoot":"","sources":["../../../../../src/core/modules/auth/inputs/core-auth-sign-up.input.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6CAA4C;
|
|
1
|
+
{"version":3,"file":"core-auth-sign-up.input.js","sourceRoot":"","sources":["../../../../../src/core/modules/auth/inputs/core-auth-sign-up.input.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6CAA4C;AAE5C,uEAAgE;AAMzD,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,6CAAmB;CAAG,CAAA;AAAlD,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAS,EAAC,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;GAC/B,mBAAmB,CAA+B"}
|
|
@@ -29,8 +29,8 @@ export declare class CoreAuthService {
|
|
|
29
29
|
[key: string]: any;
|
|
30
30
|
deviceId?: string;
|
|
31
31
|
}): Promise<{
|
|
32
|
-
token: string;
|
|
33
32
|
refreshToken: string;
|
|
33
|
+
token: string;
|
|
34
34
|
}>;
|
|
35
35
|
protected updateRefreshToken(user: ICoreAuthUser, currentRefreshToken: string, newRefreshToken: string, data?: Record<string, any>): Promise<string>;
|
|
36
36
|
}
|