@carlonicora/nestjs-neo4jsonapi 1.115.0 → 1.116.0
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/bootstrap/app.module.factory.d.ts.map +1 -1
- package/dist/bootstrap/app.module.factory.js +1 -0
- package/dist/bootstrap/app.module.factory.js.map +1 -1
- package/dist/bootstrap/bootstrap.options.d.ts +17 -0
- package/dist/bootstrap/bootstrap.options.d.ts.map +1 -1
- package/dist/common/guards/jwt.auth.guard.d.ts +3 -2
- package/dist/common/guards/jwt.auth.guard.d.ts.map +1 -1
- package/dist/common/guards/jwt.auth.guard.js +7 -2
- package/dist/common/guards/jwt.auth.guard.js.map +1 -1
- package/dist/common/interfaces/entity.schema.interface.d.ts +2 -0
- package/dist/common/interfaces/entity.schema.interface.d.ts.map +1 -1
- package/dist/common/tokens.d.ts +64 -0
- package/dist/common/tokens.d.ts.map +1 -1
- package/dist/common/tokens.js +37 -2
- package/dist/common/tokens.js.map +1 -1
- package/dist/config/base.config.d.ts.map +1 -1
- package/dist/config/base.config.js +1 -0
- package/dist/config/base.config.js.map +1 -1
- package/dist/config/enums/queue.id.d.ts +2 -1
- package/dist/config/enums/queue.id.d.ts.map +1 -1
- package/dist/config/enums/queue.id.js +1 -0
- package/dist/config/enums/queue.id.js.map +1 -1
- package/dist/config/interfaces/config.auth.interface.d.ts +7 -0
- package/dist/config/interfaces/config.auth.interface.d.ts.map +1 -1
- package/dist/config/interfaces/config.email.interface.d.ts +6 -0
- package/dist/config/interfaces/config.email.interface.d.ts.map +1 -1
- package/dist/core/email/services/email.service.d.ts +1 -0
- package/dist/core/email/services/email.service.d.ts.map +1 -1
- package/dist/core/email/services/email.service.js +22 -18
- package/dist/core/email/services/email.service.js.map +1 -1
- package/dist/core/llm/services/llm.service.d.ts +9 -1
- package/dist/core/llm/services/llm.service.d.ts.map +1 -1
- package/dist/core/llm/services/llm.service.js +13 -3
- package/dist/core/llm/services/llm.service.js.map +1 -1
- package/dist/core/neo4j/abstracts/abstract.repository.d.ts.map +1 -1
- package/dist/core/neo4j/abstracts/abstract.repository.js +33 -2
- package/dist/core/neo4j/abstracts/abstract.repository.js.map +1 -1
- package/dist/foundations/auth/auth.module.d.ts.map +1 -1
- package/dist/foundations/auth/auth.module.js +9 -10
- package/dist/foundations/auth/auth.module.js.map +1 -1
- package/dist/foundations/auth/controllers/auth.controller.d.ts.map +1 -1
- package/dist/foundations/auth/controllers/auth.controller.js +5 -0
- package/dist/foundations/auth/controllers/auth.controller.js.map +1 -1
- package/dist/foundations/auth/controllers/auth.discord.controller.d.ts.map +1 -1
- package/dist/foundations/auth/controllers/auth.discord.controller.js +6 -3
- package/dist/foundations/auth/controllers/auth.discord.controller.js.map +1 -1
- package/dist/foundations/auth/controllers/auth.google.controller.d.ts.map +1 -1
- package/dist/foundations/auth/controllers/auth.google.controller.js +7 -3
- package/dist/foundations/auth/controllers/auth.google.controller.js.map +1 -1
- package/dist/foundations/auth/entities/auth.code.d.ts +34 -0
- package/dist/foundations/auth/entities/auth.code.d.ts.map +1 -0
- package/dist/foundations/auth/entities/auth.code.js +53 -0
- package/dist/foundations/auth/entities/auth.code.js.map +1 -0
- package/dist/foundations/auth/entities/auth.d.ts +41 -0
- package/dist/foundations/auth/entities/auth.d.ts.map +1 -0
- package/dist/foundations/auth/entities/auth.js +68 -0
- package/dist/foundations/auth/entities/auth.js.map +1 -0
- package/dist/foundations/auth/entities/pending-auth.d.ts +39 -0
- package/dist/foundations/auth/entities/pending-auth.d.ts.map +1 -0
- package/dist/foundations/auth/entities/pending-auth.js +41 -0
- package/dist/foundations/auth/entities/pending-auth.js.map +1 -0
- package/dist/foundations/auth/index.d.ts +13 -0
- package/dist/foundations/auth/index.d.ts.map +1 -1
- package/dist/foundations/auth/index.js +31 -1
- package/dist/foundations/auth/index.js.map +1 -1
- package/dist/foundations/auth/repositories/auth.repository.d.ts +49 -9
- package/dist/foundations/auth/repositories/auth.repository.d.ts.map +1 -1
- package/dist/foundations/auth/repositories/auth.repository.js +115 -63
- package/dist/foundations/auth/repositories/auth.repository.js.map +1 -1
- package/dist/foundations/auth/services/auth.discord.service.d.ts +1 -1
- package/dist/foundations/auth/services/auth.discord.service.d.ts.map +1 -1
- package/dist/foundations/auth/services/auth.discord.service.js +5 -2
- package/dist/foundations/auth/services/auth.discord.service.js.map +1 -1
- package/dist/foundations/auth/services/auth.google.service.d.ts +1 -1
- package/dist/foundations/auth/services/auth.google.service.d.ts.map +1 -1
- package/dist/foundations/auth/services/auth.google.service.js +6 -2
- package/dist/foundations/auth/services/auth.google.service.js.map +1 -1
- package/dist/foundations/auth/services/auth.service.d.ts +42 -7
- package/dist/foundations/auth/services/auth.service.d.ts.map +1 -1
- package/dist/foundations/auth/services/auth.service.js +140 -77
- package/dist/foundations/auth/services/auth.service.js.map +1 -1
- package/dist/foundations/company/entities/company.d.ts +1 -1
- package/dist/foundations/company/entities/company.d.ts.map +1 -1
- package/dist/foundations/company/entities/company.js +15 -1
- package/dist/foundations/company/entities/company.js.map +1 -1
- package/dist/foundations/company/index.d.ts +5 -0
- package/dist/foundations/company/index.d.ts.map +1 -1
- package/dist/foundations/company/index.js +16 -1
- package/dist/foundations/company/index.js.map +1 -1
- package/dist/foundations/company/processors/company.processor.js +1 -1
- package/dist/foundations/company/processors/company.processor.js.map +1 -1
- package/dist/foundations/company/repositories/company.repository.d.ts +65 -9
- package/dist/foundations/company/repositories/company.repository.d.ts.map +1 -1
- package/dist/foundations/company/repositories/company.repository.js +59 -18
- package/dist/foundations/company/repositories/company.repository.js.map +1 -1
- package/dist/foundations/company/services/company.service.d.ts +44 -4
- package/dist/foundations/company/services/company.service.d.ts.map +1 -1
- package/dist/foundations/company/services/company.service.js +33 -7
- package/dist/foundations/company/services/company.service.js.map +1 -1
- package/dist/foundations/content/content.module.d.ts +20 -8
- package/dist/foundations/content/content.module.d.ts.map +1 -1
- package/dist/foundations/content/content.module.js +40 -24
- package/dist/foundations/content/content.module.js.map +1 -1
- package/dist/foundations/content/controllers/content.controller.d.ts +1 -1
- package/dist/foundations/content/controllers/content.controller.d.ts.map +1 -1
- package/dist/foundations/content/controllers/content.controller.js +2 -2
- package/dist/foundations/content/controllers/content.controller.js.map +1 -1
- package/dist/foundations/content/entities/content.d.ts +74 -0
- package/dist/foundations/content/entities/content.d.ts.map +1 -0
- package/dist/foundations/content/entities/content.js +141 -0
- package/dist/foundations/content/entities/content.js.map +1 -0
- package/dist/foundations/content/index.d.ts +2 -4
- package/dist/foundations/content/index.d.ts.map +1 -1
- package/dist/foundations/content/index.js +6 -5
- package/dist/foundations/content/index.js.map +1 -1
- package/dist/foundations/content/interfaces/content.extension.interface.d.ts +126 -0
- package/dist/foundations/content/interfaces/content.extension.interface.d.ts.map +1 -1
- package/dist/foundations/content/interfaces/content.extension.interface.js +7 -1
- package/dist/foundations/content/interfaces/content.extension.interface.js.map +1 -1
- package/dist/foundations/content/repositories/content.repository.d.ts +14 -7
- package/dist/foundations/content/repositories/content.repository.d.ts.map +1 -1
- package/dist/foundations/content/repositories/content.repository.js +18 -16
- package/dist/foundations/content/repositories/content.repository.js.map +1 -1
- package/dist/foundations/content/services/content.cypher.service.d.ts +19 -0
- package/dist/foundations/content/services/content.cypher.service.d.ts.map +1 -1
- package/dist/foundations/content/services/content.cypher.service.js +65 -4
- package/dist/foundations/content/services/content.cypher.service.js.map +1 -1
- package/dist/foundations/content/services/content.service.js +4 -4
- package/dist/foundations/content/services/content.service.js.map +1 -1
- package/dist/foundations/discord-user/services/discord-user.service.js +2 -2
- package/dist/foundations/discord-user/services/discord-user.service.js.map +1 -1
- package/dist/foundations/feature/entities/feature.d.ts +32 -0
- package/dist/foundations/feature/entities/feature.d.ts.map +1 -0
- package/dist/foundations/feature/entities/feature.js +64 -0
- package/dist/foundations/feature/entities/feature.js.map +1 -0
- package/dist/foundations/feature/entities/feature.model.d.ts +1 -3
- package/dist/foundations/feature/entities/feature.model.d.ts.map +1 -1
- package/dist/foundations/feature/entities/feature.model.js +3 -11
- package/dist/foundations/feature/entities/feature.model.js.map +1 -1
- package/dist/foundations/feature/feature.module.d.ts.map +1 -1
- package/dist/foundations/feature/feature.module.js +4 -5
- package/dist/foundations/feature/feature.module.js.map +1 -1
- package/dist/foundations/feature/index.d.ts +12 -0
- package/dist/foundations/feature/index.d.ts.map +1 -1
- package/dist/foundations/feature/index.js +22 -1
- package/dist/foundations/feature/index.js.map +1 -1
- package/dist/foundations/feature/repositories/feature.repository.d.ts +37 -13
- package/dist/foundations/feature/repositories/feature.repository.d.ts.map +1 -1
- package/dist/foundations/feature/repositories/feature.repository.js +41 -35
- package/dist/foundations/feature/repositories/feature.repository.js.map +1 -1
- package/dist/foundations/feature/services/feature.service.d.ts +31 -4
- package/dist/foundations/feature/services/feature.service.d.ts.map +1 -1
- package/dist/foundations/feature/services/feature.service.js +20 -12
- package/dist/foundations/feature/services/feature.service.js.map +1 -1
- package/dist/foundations/foundations.modules.d.ts +6 -0
- package/dist/foundations/foundations.modules.d.ts.map +1 -1
- package/dist/foundations/foundations.modules.js +14 -3
- package/dist/foundations/foundations.modules.js.map +1 -1
- package/dist/foundations/google-user/services/google-user.service.js +2 -2
- package/dist/foundations/google-user/services/google-user.service.js.map +1 -1
- package/dist/foundations/index.d.ts +3 -0
- package/dist/foundations/index.d.ts.map +1 -1
- package/dist/foundations/index.js +3 -0
- package/dist/foundations/index.js.map +1 -1
- package/dist/foundations/membership/entities/membership.d.ts.map +1 -1
- package/dist/foundations/membership/entities/membership.js +4 -0
- package/dist/foundations/membership/entities/membership.js.map +1 -1
- package/dist/foundations/notification/controllers/notification.controller.js +2 -2
- package/dist/foundations/notification/controllers/notification.controller.js.map +1 -1
- package/dist/foundations/notification/entities/notification.d.ts +75 -0
- package/dist/foundations/notification/entities/notification.d.ts.map +1 -0
- package/dist/foundations/notification/entities/notification.js +73 -0
- package/dist/foundations/notification/entities/notification.js.map +1 -0
- package/dist/foundations/notification/index.d.ts +6 -2
- package/dist/foundations/notification/index.d.ts.map +1 -1
- package/dist/foundations/notification/index.js +17 -3
- package/dist/foundations/notification/index.js.map +1 -1
- package/dist/foundations/notification/notification.module.d.ts.map +1 -1
- package/dist/foundations/notification/notification.module.js +3 -4
- package/dist/foundations/notification/notification.module.js.map +1 -1
- package/dist/foundations/notification/repositories/notification.repository.d.ts +125 -8
- package/dist/foundations/notification/repositories/notification.repository.d.ts.map +1 -1
- package/dist/foundations/notification/repositories/notification.repository.js +219 -20
- package/dist/foundations/notification/repositories/notification.repository.js.map +1 -1
- package/dist/foundations/notification/services/notification.service.d.ts +31 -5
- package/dist/foundations/notification/services/notification.service.d.ts.map +1 -1
- package/dist/foundations/notification/services/notification.service.js +26 -9
- package/dist/foundations/notification/services/notification.service.js.map +1 -1
- package/dist/foundations/rbac/dump.d.ts +48 -4
- package/dist/foundations/rbac/dump.d.ts.map +1 -1
- package/dist/foundations/rbac/dump.js +28 -4
- package/dist/foundations/rbac/dump.js.map +1 -1
- package/dist/foundations/rbac/serializer/matrix-to-ts.d.ts +14 -0
- package/dist/foundations/rbac/serializer/matrix-to-ts.d.ts.map +1 -1
- package/dist/foundations/rbac/serializer/matrix-to-ts.js +13 -3
- package/dist/foundations/rbac/serializer/matrix-to-ts.js.map +1 -1
- package/dist/foundations/relevancy/repositories/relevancy.repository.d.ts.map +1 -1
- package/dist/foundations/relevancy/repositories/relevancy.repository.js +13 -1
- package/dist/foundations/relevancy/repositories/relevancy.repository.js.map +1 -1
- package/dist/foundations/role/entities/role.d.ts +1 -1
- package/dist/foundations/role/entities/role.d.ts.map +1 -1
- package/dist/foundations/stripe/index.d.ts +3 -0
- package/dist/foundations/stripe/index.d.ts.map +1 -1
- package/dist/foundations/stripe/index.js +6 -0
- package/dist/foundations/stripe/index.js.map +1 -1
- package/dist/foundations/stripe-price/entities/stripe-price.entity.d.ts +1 -1
- package/dist/foundations/stripe-price/entities/stripe-price.entity.d.ts.map +1 -1
- package/dist/foundations/tokenusage/entities/tokenusage.d.ts +49 -0
- package/dist/foundations/tokenusage/entities/tokenusage.d.ts.map +1 -0
- package/dist/foundations/tokenusage/entities/tokenusage.js +64 -0
- package/dist/foundations/tokenusage/entities/tokenusage.js.map +1 -0
- package/dist/foundations/tokenusage/index.d.ts +2 -2
- package/dist/foundations/tokenusage/index.d.ts.map +1 -1
- package/dist/foundations/tokenusage/index.js +5 -3
- package/dist/foundations/tokenusage/index.js.map +1 -1
- package/dist/foundations/tokenusage/repositories/tokenusage.repository.d.ts +33 -5
- package/dist/foundations/tokenusage/repositories/tokenusage.repository.d.ts.map +1 -1
- package/dist/foundations/tokenusage/repositories/tokenusage.repository.js +40 -14
- package/dist/foundations/tokenusage/repositories/tokenusage.repository.js.map +1 -1
- package/dist/foundations/tokenusage/services/tokenusage.service.d.ts +36 -9
- package/dist/foundations/tokenusage/services/tokenusage.service.d.ts.map +1 -1
- package/dist/foundations/tokenusage/services/tokenusage.service.js +32 -3
- package/dist/foundations/tokenusage/services/tokenusage.service.js.map +1 -1
- package/dist/foundations/tokenusage/tokenusage.module.js +3 -3
- package/dist/foundations/tokenusage/tokenusage.module.js.map +1 -1
- package/dist/foundations/user/controllers/user.controller.js +4 -4
- package/dist/foundations/user/controllers/user.controller.js.map +1 -1
- package/dist/foundations/user/dtos/user.put.dto.d.ts +1 -1
- package/dist/foundations/user/dtos/user.put.dto.d.ts.map +1 -1
- package/dist/foundations/user/dtos/user.put.dto.js +1 -1
- package/dist/foundations/user/dtos/user.put.dto.js.map +1 -1
- package/dist/foundations/user/entities/user.d.ts +4 -0
- package/dist/foundations/user/entities/user.d.ts.map +1 -1
- package/dist/foundations/user/entities/user.js +18 -4
- package/dist/foundations/user/entities/user.js.map +1 -1
- package/dist/foundations/user/index.d.ts +6 -1
- package/dist/foundations/user/index.d.ts.map +1 -1
- package/dist/foundations/user/index.js +13 -1
- package/dist/foundations/user/index.js.map +1 -1
- package/dist/foundations/user/repositories/user.repository.d.ts +56 -11
- package/dist/foundations/user/repositories/user.repository.d.ts.map +1 -1
- package/dist/foundations/user/repositories/user.repository.js +55 -35
- package/dist/foundations/user/repositories/user.repository.js.map +1 -1
- package/dist/foundations/user/services/user.service.d.ts +48 -9
- package/dist/foundations/user/services/user.service.d.ts.map +1 -1
- package/dist/foundations/user/services/user.service.js +50 -32
- package/dist/foundations/user/services/user.service.js.map +1 -1
- package/dist/foundations/user-activity/entities/user-activity.d.ts +36 -0
- package/dist/foundations/user-activity/entities/user-activity.d.ts.map +1 -0
- package/dist/foundations/user-activity/entities/user-activity.js +86 -0
- package/dist/foundations/user-activity/entities/user-activity.js.map +1 -0
- package/dist/foundations/user-activity/entities/user-activity.meta.d.ts +3 -0
- package/dist/foundations/user-activity/entities/user-activity.meta.d.ts.map +1 -0
- package/dist/foundations/user-activity/entities/user-activity.meta.js +10 -0
- package/dist/foundations/user-activity/entities/user-activity.meta.js.map +1 -0
- package/dist/foundations/user-activity/index.d.ts +10 -0
- package/dist/foundations/user-activity/index.d.ts.map +1 -0
- package/dist/foundations/user-activity/index.js +22 -0
- package/dist/foundations/user-activity/index.js.map +1 -0
- package/dist/foundations/user-activity/interceptors/user-activity.interceptor.d.ts +29 -0
- package/dist/foundations/user-activity/interceptors/user-activity.interceptor.d.ts.map +1 -0
- package/dist/foundations/user-activity/interceptors/user-activity.interceptor.js +98 -0
- package/dist/foundations/user-activity/interceptors/user-activity.interceptor.js.map +1 -0
- package/dist/foundations/user-activity/interfaces/user-activity.config.interface.d.ts +67 -0
- package/dist/foundations/user-activity/interfaces/user-activity.config.interface.d.ts.map +1 -0
- package/dist/foundations/user-activity/interfaces/user-activity.config.interface.js +26 -0
- package/dist/foundations/user-activity/interfaces/user-activity.config.interface.js.map +1 -0
- package/dist/foundations/user-activity/interfaces/user-activity.record.input.d.ts +18 -0
- package/dist/foundations/user-activity/interfaces/user-activity.record.input.d.ts.map +1 -0
- package/dist/foundations/{auth/entities/auth.entity.js → user-activity/interfaces/user-activity.record.input.js} +1 -1
- package/dist/foundations/user-activity/interfaces/user-activity.record.input.js.map +1 -0
- package/dist/foundations/user-activity/processors/user-activity.processor.d.ts +25 -0
- package/dist/foundations/user-activity/processors/user-activity.processor.d.ts.map +1 -0
- package/dist/foundations/user-activity/processors/user-activity.processor.js +74 -0
- package/dist/foundations/user-activity/processors/user-activity.processor.js.map +1 -0
- package/dist/foundations/user-activity/repositories/user-activity.repository.d.ts +47 -0
- package/dist/foundations/user-activity/repositories/user-activity.repository.d.ts.map +1 -0
- package/dist/foundations/user-activity/repositories/user-activity.repository.js +124 -0
- package/dist/foundations/user-activity/repositories/user-activity.repository.js.map +1 -0
- package/dist/foundations/user-activity/services/user-activity.service.d.ts +29 -0
- package/dist/foundations/user-activity/services/user-activity.service.d.ts.map +1 -0
- package/dist/foundations/user-activity/services/user-activity.service.js +61 -0
- package/dist/foundations/user-activity/services/user-activity.service.js.map +1 -0
- package/dist/foundations/user-activity/user-activity.module.d.ts +40 -0
- package/dist/foundations/user-activity/user-activity.module.d.ts.map +1 -0
- package/dist/foundations/user-activity/user-activity.module.js +99 -0
- package/dist/foundations/user-activity/user-activity.module.js.map +1 -0
- package/package.json +1 -1
- package/dist/foundations/auth/entities/auth.code.entity.d.ts +0 -7
- package/dist/foundations/auth/entities/auth.code.entity.d.ts.map +0 -1
- package/dist/foundations/auth/entities/auth.code.entity.js +0 -3
- package/dist/foundations/auth/entities/auth.code.entity.js.map +0 -1
- package/dist/foundations/auth/entities/auth.code.map.d.ts +0 -8
- package/dist/foundations/auth/entities/auth.code.map.d.ts.map +0 -1
- package/dist/foundations/auth/entities/auth.code.map.js +0 -13
- package/dist/foundations/auth/entities/auth.code.map.js.map +0 -1
- package/dist/foundations/auth/entities/auth.code.model.d.ts +0 -4
- package/dist/foundations/auth/entities/auth.code.model.d.ts.map +0 -1
- package/dist/foundations/auth/entities/auth.code.model.js +0 -13
- package/dist/foundations/auth/entities/auth.code.model.js.map +0 -1
- package/dist/foundations/auth/entities/auth.entity.d.ts +0 -18
- package/dist/foundations/auth/entities/auth.entity.d.ts.map +0 -1
- package/dist/foundations/auth/entities/auth.entity.js.map +0 -1
- package/dist/foundations/auth/entities/auth.map.d.ts +0 -8
- package/dist/foundations/auth/entities/auth.map.d.ts.map +0 -1
- package/dist/foundations/auth/entities/auth.map.js +0 -14
- package/dist/foundations/auth/entities/auth.map.js.map +0 -1
- package/dist/foundations/auth/entities/auth.model.d.ts +0 -4
- package/dist/foundations/auth/entities/auth.model.d.ts.map +0 -1
- package/dist/foundations/auth/entities/auth.model.js +0 -15
- package/dist/foundations/auth/entities/auth.model.js.map +0 -1
- package/dist/foundations/auth/entities/pending-auth.entity.d.ts +0 -16
- package/dist/foundations/auth/entities/pending-auth.entity.d.ts.map +0 -1
- package/dist/foundations/auth/entities/pending-auth.entity.js +0 -3
- package/dist/foundations/auth/entities/pending-auth.entity.js.map +0 -1
- package/dist/foundations/auth/entities/pending-auth.map.d.ts +0 -6
- package/dist/foundations/auth/entities/pending-auth.map.d.ts.map +0 -1
- package/dist/foundations/auth/entities/pending-auth.map.js +0 -20
- package/dist/foundations/auth/entities/pending-auth.map.js.map +0 -1
- package/dist/foundations/auth/entities/pending-auth.model.d.ts +0 -9
- package/dist/foundations/auth/entities/pending-auth.model.d.ts.map +0 -1
- package/dist/foundations/auth/entities/pending-auth.model.js +0 -19
- package/dist/foundations/auth/entities/pending-auth.model.js.map +0 -1
- package/dist/foundations/auth/serialisers/auth.serialiser.d.ts +0 -13
- package/dist/foundations/auth/serialisers/auth.serialiser.d.ts.map +0 -1
- package/dist/foundations/auth/serialisers/auth.serialiser.js +0 -52
- package/dist/foundations/auth/serialisers/auth.serialiser.js.map +0 -1
- package/dist/foundations/auth/serialisers/pending-auth.serialiser.d.ts +0 -18
- package/dist/foundations/auth/serialisers/pending-auth.serialiser.d.ts.map +0 -1
- package/dist/foundations/auth/serialisers/pending-auth.serialiser.js +0 -49
- package/dist/foundations/auth/serialisers/pending-auth.serialiser.js.map +0 -1
- package/dist/foundations/content/entities/content.entity.d.ts +0 -31
- package/dist/foundations/content/entities/content.entity.d.ts.map +0 -1
- package/dist/foundations/content/entities/content.entity.js +0 -3
- package/dist/foundations/content/entities/content.entity.js.map +0 -1
- package/dist/foundations/content/entities/content.map.d.ts +0 -8
- package/dist/foundations/content/entities/content.map.d.ts.map +0 -1
- package/dist/foundations/content/entities/content.map.js +0 -19
- package/dist/foundations/content/entities/content.map.js.map +0 -1
- package/dist/foundations/content/entities/content.model.d.ts +0 -4
- package/dist/foundations/content/entities/content.model.d.ts.map +0 -1
- package/dist/foundations/content/entities/content.model.js +0 -16
- package/dist/foundations/content/entities/content.model.js.map +0 -1
- package/dist/foundations/content/factories/content.model.factory.d.ts +0 -17
- package/dist/foundations/content/factories/content.model.factory.d.ts.map +0 -1
- package/dist/foundations/content/factories/content.model.factory.js +0 -65
- package/dist/foundations/content/factories/content.model.factory.js.map +0 -1
- package/dist/foundations/content/serialisers/content.serialiser.d.ts +0 -14
- package/dist/foundations/content/serialisers/content.serialiser.d.ts.map +0 -1
- package/dist/foundations/content/serialisers/content.serialiser.js +0 -78
- package/dist/foundations/content/serialisers/content.serialiser.js.map +0 -1
- package/dist/foundations/feature/entities/feature.entity.d.ts +0 -8
- package/dist/foundations/feature/entities/feature.entity.d.ts.map +0 -1
- package/dist/foundations/feature/entities/feature.entity.js +0 -3
- package/dist/foundations/feature/entities/feature.entity.js.map +0 -1
- package/dist/foundations/feature/entities/feature.map.d.ts +0 -8
- package/dist/foundations/feature/entities/feature.map.d.ts.map +0 -1
- package/dist/foundations/feature/entities/feature.map.js +0 -14
- package/dist/foundations/feature/entities/feature.map.js.map +0 -1
- package/dist/foundations/feature/serialisers/feature.serialiser.d.ts +0 -12
- package/dist/foundations/feature/serialisers/feature.serialiser.d.ts.map +0 -1
- package/dist/foundations/feature/serialisers/feature.serialiser.js +0 -45
- package/dist/foundations/feature/serialisers/feature.serialiser.js.map +0 -1
- package/dist/foundations/notification/entities/notification.entity.d.ts +0 -10
- package/dist/foundations/notification/entities/notification.entity.d.ts.map +0 -1
- package/dist/foundations/notification/entities/notification.entity.js +0 -3
- package/dist/foundations/notification/entities/notification.entity.js.map +0 -1
- package/dist/foundations/notification/entities/notification.map.d.ts +0 -8
- package/dist/foundations/notification/entities/notification.map.d.ts.map +0 -1
- package/dist/foundations/notification/entities/notification.map.js +0 -16
- package/dist/foundations/notification/entities/notification.map.js.map +0 -1
- package/dist/foundations/notification/entities/notification.model.d.ts +0 -4
- package/dist/foundations/notification/entities/notification.model.d.ts.map +0 -1
- package/dist/foundations/notification/entities/notification.model.js +0 -15
- package/dist/foundations/notification/entities/notification.model.js.map +0 -1
- package/dist/foundations/notification/interfaces/notification.service.interface.d.ts +0 -4
- package/dist/foundations/notification/interfaces/notification.service.interface.d.ts.map +0 -1
- package/dist/foundations/notification/interfaces/notification.service.interface.js +0 -3
- package/dist/foundations/notification/interfaces/notification.service.interface.js.map +0 -1
- package/dist/foundations/notification/serialisers/notifications.serialiser.d.ts +0 -12
- package/dist/foundations/notification/serialisers/notifications.serialiser.d.ts.map +0 -1
- package/dist/foundations/notification/serialisers/notifications.serialiser.js +0 -47
- package/dist/foundations/notification/serialisers/notifications.serialiser.js.map +0 -1
- package/dist/foundations/tokenusage/entities/tokenusage.entity.d.ts +0 -11
- package/dist/foundations/tokenusage/entities/tokenusage.entity.d.ts.map +0 -1
- package/dist/foundations/tokenusage/entities/tokenusage.entity.js +0 -3
- package/dist/foundations/tokenusage/entities/tokenusage.entity.js.map +0 -1
- package/dist/foundations/tokenusage/entities/tokenusage.map.d.ts +0 -8
- package/dist/foundations/tokenusage/entities/tokenusage.map.d.ts.map +0 -1
- package/dist/foundations/tokenusage/entities/tokenusage.map.js +0 -17
- package/dist/foundations/tokenusage/entities/tokenusage.map.js.map +0 -1
- package/dist/foundations/tokenusage/entities/tokenusage.model.d.ts +0 -4
- package/dist/foundations/tokenusage/entities/tokenusage.model.d.ts.map +0 -1
- package/dist/foundations/tokenusage/entities/tokenusage.model.js +0 -15
- package/dist/foundations/tokenusage/entities/tokenusage.model.js.map +0 -1
|
@@ -15,6 +15,7 @@ export * from "./content";
|
|
|
15
15
|
export * from "./discord";
|
|
16
16
|
export * from "./discord-user";
|
|
17
17
|
export * from "./feature";
|
|
18
|
+
export * from "./google-user";
|
|
18
19
|
export * from "./how-to";
|
|
19
20
|
export * from "./keyconcept";
|
|
20
21
|
export * from "./membership";
|
|
@@ -30,5 +31,7 @@ export * from "./stripe";
|
|
|
30
31
|
export * from "./tokenusage";
|
|
31
32
|
export * from "./two-factor";
|
|
32
33
|
export * from "./user";
|
|
34
|
+
export * from "./user-activity";
|
|
35
|
+
export * from "./waitlist";
|
|
33
36
|
export * from "./rbac";
|
|
34
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,uBAAuB,CAAC;AAGtC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,uBAAuB,CAAC;AAGtC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC"}
|
|
@@ -33,6 +33,7 @@ __exportStar(require("./content"), exports);
|
|
|
33
33
|
__exportStar(require("./discord"), exports);
|
|
34
34
|
__exportStar(require("./discord-user"), exports);
|
|
35
35
|
__exportStar(require("./feature"), exports);
|
|
36
|
+
__exportStar(require("./google-user"), exports);
|
|
36
37
|
__exportStar(require("./how-to"), exports);
|
|
37
38
|
__exportStar(require("./keyconcept"), exports);
|
|
38
39
|
__exportStar(require("./membership"), exports);
|
|
@@ -48,5 +49,7 @@ __exportStar(require("./stripe"), exports);
|
|
|
48
49
|
__exportStar(require("./tokenusage"), exports);
|
|
49
50
|
__exportStar(require("./two-factor"), exports);
|
|
50
51
|
__exportStar(require("./user"), exports);
|
|
52
|
+
__exportStar(require("./user-activity"), exports);
|
|
53
|
+
__exportStar(require("./waitlist"), exports);
|
|
51
54
|
__exportStar(require("./rbac"), exports);
|
|
52
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,sFAAsF;AACtF,wDAAsC;AAEtC,iFAAiF;AACjF,8CAA4B;AAC5B,qDAAmC;AACnC,sDAAoC;AACpC,+CAA6B;AAC7B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,iDAA+B;AAC/B,4CAA0B;AAC1B,2CAAyB;AACzB,+CAA6B;AAC7B,+CAA6B;AAC7B,2CAAyB;AACzB,iDAA+B;AAC/B,0CAAwB;AACxB,yCAAuB;AACvB,6CAA2B;AAC3B,8CAA4B;AAC5B,yCAAuB;AACvB,uCAAqB;AACrB,2CAAyB;AACzB,+CAA6B;AAC7B,+CAA6B;AAC7B,yCAAuB;AACvB,yCAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,sFAAsF;AACtF,wDAAsC;AAEtC,iFAAiF;AACjF,8CAA4B;AAC5B,qDAAmC;AACnC,sDAAoC;AACpC,+CAA6B;AAC7B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,iDAA+B;AAC/B,4CAA0B;AAC1B,gDAA8B;AAC9B,2CAAyB;AACzB,+CAA6B;AAC7B,+CAA6B;AAC7B,2CAAyB;AACzB,iDAA+B;AAC/B,0CAAwB;AACxB,yCAAuB;AACvB,6CAA2B;AAC3B,8CAA4B;AAC5B,yCAAuB;AACvB,uCAAqB;AACrB,2CAAyB;AACzB,+CAA6B;AAC7B,+CAA6B;AAC7B,yCAAuB;AACvB,kDAAgC;AAChC,6CAA2B;AAC3B,yCAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"membership.d.ts","sourceRoot":"","sources":["../../../../src/foundations/membership/entities/membership.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,iBAAiB,CAAC;AAMvD;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"membership.d.ts","sourceRoot":"","sources":["../../../../src/foundations/membership/entities/membership.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,iBAAiB,CAAC;AAMvD;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;EAqB/B,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,OAAO,oBAAoB,CAAC"}
|
|
@@ -8,6 +8,10 @@ const user_meta_1 = require("../../user/entities/user.meta");
|
|
|
8
8
|
const membership_meta_1 = require("./membership.meta");
|
|
9
9
|
exports.MembershipDescriptor = (0, common_1.defineEntity)()({
|
|
10
10
|
...membership_meta_1.membershipMeta,
|
|
11
|
+
// Platform-level memberships have NO IN_COMPANY edge (global Administrator).
|
|
12
|
+
// A company-scoped default would BELONGS_TO-filter any future generic read
|
|
13
|
+
// and silently hide platform memberships.
|
|
14
|
+
isCompanyScoped: false,
|
|
11
15
|
fields: {},
|
|
12
16
|
relationships: {
|
|
13
17
|
user: { model: user_meta_1.userMeta, direction: "in", relationship: "HAS_MEMBERSHIP", cardinality: "one", dtoKey: "user" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"membership.js","sourceRoot":"","sources":["../../../../src/foundations/membership/entities/membership.ts"],"names":[],"mappings":";;;AAAA,4CAAuD;AACvD,sEAAkE;AAClE,6DAAyD;AACzD,6DAAyD;AACzD,uDAAmD;AAWtC,QAAA,oBAAoB,GAAG,IAAA,qBAAY,GAAc,CAAC;IAC7D,GAAG,gCAAc;IAEjB,MAAM,EAAE,EAAE;IAEV,aAAa,EAAE;QACb,IAAI,EAAE,EAAE,KAAK,EAAE,oBAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE;QAC9G,OAAO,EAAE;YACP,KAAK,EAAE,0BAAW;YAClB,SAAS,EAAE,KAAK;YAChB,YAAY,EAAE,YAAY;YAC1B,WAAW,EAAE,KAAK;YAClB,MAAM,EAAE,SAAS;SAClB;QACD,IAAI,EAAE,EAAE,KAAK,EAAE,oBAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE;KAC5G;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"membership.js","sourceRoot":"","sources":["../../../../src/foundations/membership/entities/membership.ts"],"names":[],"mappings":";;;AAAA,4CAAuD;AACvD,sEAAkE;AAClE,6DAAyD;AACzD,6DAAyD;AACzD,uDAAmD;AAWtC,QAAA,oBAAoB,GAAG,IAAA,qBAAY,GAAc,CAAC;IAC7D,GAAG,gCAAc;IAEjB,6EAA6E;IAC7E,2EAA2E;IAC3E,0CAA0C;IAC1C,eAAe,EAAE,KAAK;IAEtB,MAAM,EAAE,EAAE;IAEV,aAAa,EAAE;QACb,IAAI,EAAE,EAAE,KAAK,EAAE,oBAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE;QAC9G,OAAO,EAAE;YACP,KAAK,EAAE,0BAAW;YAClB,SAAS,EAAE,KAAK;YAChB,YAAY,EAAE,YAAY;YAC1B,WAAW,EAAE,KAAK;YAClB,MAAM,EAAE,SAAS;SAClB;QACD,IAAI,EAAE,EAAE,KAAK,EAAE,oBAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE;KAC5G;CACF,CAAC,CAAC"}
|
|
@@ -26,10 +26,10 @@ let NotificationController = class NotificationController {
|
|
|
26
26
|
this.cacheService = cacheService;
|
|
27
27
|
}
|
|
28
28
|
async findList(request, query, isArchived) {
|
|
29
|
-
return await this.service.
|
|
29
|
+
return await this.service.findForUser({ query: query, userId: request.user.userId, isArchived: isArchived });
|
|
30
30
|
}
|
|
31
31
|
async findById(request, notificationId) {
|
|
32
|
-
return await this.service.
|
|
32
|
+
return await this.service.findByIdForUser({ notificationId: notificationId, userId: request.user.id });
|
|
33
33
|
}
|
|
34
34
|
async markAsRead(request, query, body) {
|
|
35
35
|
return await this.service.markAsRead({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.controller.js","sourceRoot":"","sources":["../../../../src/foundations/notification/controllers/notification.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwH;AAExH,sGAAwF;AACxF,0EAAqE;AACrE,8EAA0E;AAC1E,2FAAoH;AACpH,qFAAiF;AACjF,2FAAwF;AAIjF,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YACmB,OAA6B,EAC7B,YAA0B;QAD1B,YAAO,GAAP,OAAO,CAAsB;QAC7B,iBAAY,GAAZ,YAAY,CAAc;IAC1C,CAAC;IAGE,AAAN,KAAK,CAAC,QAAQ,CAAQ,OAAY,EAAW,KAAU,EAAuB,UAAoB;QAChG,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"notification.controller.js","sourceRoot":"","sources":["../../../../src/foundations/notification/controllers/notification.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwH;AAExH,sGAAwF;AACxF,0EAAqE;AACrE,8EAA0E;AAC1E,2FAAoH;AACpH,qFAAiF;AACjF,2FAAwF;AAIjF,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YACmB,OAA6B,EAC7B,YAA0B;QAD1B,YAAO,GAAP,OAAO,CAAsB;QAC7B,iBAAY,GAAZ,YAAY,CAAc;IAC1C,CAAC;IAGE,AAAN,KAAK,CAAC,QAAQ,CAAQ,OAAY,EAAW,KAAU,EAAuB,UAAoB;QAChG,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC;IAC/G,CAAC;IAGK,AAAN,KAAK,CAAC,QAAQ,CAAQ,OAAY,EAA2B,cAAsB;QACjF,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IACzG,CAAC;IAKK,AAAN,KAAK,CAAC,UAAU,CAAQ,OAAY,EAAW,KAAU,EAAU,IAA8B;QAC/F,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;YACnC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM;YAC3B,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,YAAsC,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;SAC5F,CAAC,CAAC;IACL,CAAC;IAKK,AAAN,KAAK,CAAC,OAAO,CAAQ,OAAY,EAAW,KAAU,EAA2B,cAAsB;QACrG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;YACzB,cAAc,EAAE,cAAc;SAC/B,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAlCY,wDAAsB;AAO3B;IADL,IAAA,YAAG,EAAC,oCAAgB,CAAC,QAAQ,CAAC;IACf,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgB,WAAA,IAAA,cAAK,GAAE,CAAA;IAAc,WAAA,IAAA,cAAK,EAAC,YAAY,CAAC,CAAA;;;;sDAE5E;AAGK;IADL,IAAA,YAAG,EAAC,GAAG,oCAAgB,CAAC,QAAQ,kBAAkB,CAAC;IACpC,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgB,WAAA,IAAA,cAAK,EAAC,gBAAgB,CAAC,CAAA;;;;sDAE3D;AAKK;IAHL,IAAA,cAAK,EAAC,oCAAgB,CAAC,QAAQ,CAAC;IAChC,IAAA,iBAAQ,EAAC,mBAAU,CAAC,UAAU,CAAC;IAC/B,IAAA,4CAAe,EAAC,oCAAgB,EAAE,gBAAgB,CAAC;IAClC,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgB,WAAA,IAAA,cAAK,GAAE,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;qDAAO,iDAAwB;;wDAKhG;AAKK;IAHL,IAAA,aAAI,EAAC,GAAG,oCAAgB,CAAC,QAAQ,0BAA0B,CAAC;IAC5D,IAAA,iBAAQ,EAAC,mBAAU,CAAC,UAAU,CAAC;IAC/B,IAAA,4CAAe,EAAC,oCAAgB,EAAE,gBAAgB,CAAC;IACrC,WAAA,IAAA,YAAG,GAAE,CAAA;IAAgB,WAAA,IAAA,cAAK,GAAE,CAAA;IAAc,WAAA,IAAA,cAAK,EAAC,gBAAgB,CAAC,CAAA;;;;qDAI/E;iCAjCU,sBAAsB;IAFlC,IAAA,kBAAS,EAAC,6BAAY,CAAC;IACvB,IAAA,mBAAU,GAAE;qCAGiB,2CAAoB;QACf,4BAAY;GAHlC,sBAAsB,CAkClC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Entity } from "../../../common/abstracts/entity";
|
|
2
|
+
import { User } from "../../user/entities/user";
|
|
3
|
+
/**
|
|
4
|
+
* Notification Entity Type
|
|
5
|
+
*
|
|
6
|
+
* An in-app notification raised for a single recipient user. The graph shape is
|
|
7
|
+
* `(notification)-[:TRIGGERED_FOR]->(:User)` for the recipient,
|
|
8
|
+
* `(notification)-[:TRIGGERED_BY]->(:User)` for the actor, and
|
|
9
|
+
* `(notification)-[:REFERS_TO]->(subject)` for whatever the notification is
|
|
10
|
+
* about (the "subject"). The list query REQUIRES at least one REFERS_TO edge —
|
|
11
|
+
* see `NotificationRepository.findForUser` — so a notification created without
|
|
12
|
+
* a subject is invisible to the very list it was created for.
|
|
13
|
+
*
|
|
14
|
+
* Replaces the hand-written quartet (`notification.entity.ts`,
|
|
15
|
+
* `notification.map.ts`, `notification.model.ts`,
|
|
16
|
+
* `serialisers/notifications.serialiser.ts` — all deleted). The attribute and
|
|
17
|
+
* relationship surface below reproduces the old `NotificationSerialiser.create()`
|
|
18
|
+
* byte for byte: attributes `notificationType`, `isRead`, `message`,
|
|
19
|
+
* `actionUrl`; a single to-one `actor` relationship pointing at the User model
|
|
20
|
+
* (the old serialiser declared it under key `user` with `name: "actor"`, which
|
|
21
|
+
* put `actor` on the wire — the descriptor reaches the same wire key with key
|
|
22
|
+
* `actor` + `dtoKey: "actor"`).
|
|
23
|
+
*/
|
|
24
|
+
export type Notification = Entity & {
|
|
25
|
+
notificationType: string;
|
|
26
|
+
isRead: boolean;
|
|
27
|
+
message?: string;
|
|
28
|
+
actionUrl?: string;
|
|
29
|
+
actor?: User;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Notification Entity Descriptor
|
|
33
|
+
*
|
|
34
|
+
* Single source of truth for the Notification entity configuration. Generates
|
|
35
|
+
* the mapper, the children tokens and the DataModelInterface automatically.
|
|
36
|
+
*
|
|
37
|
+
* `isCompanyScoped` is left at its default (`true`): every notification is
|
|
38
|
+
* written with a `(notification)-[:BELONGS_TO]->(company)` edge and every query
|
|
39
|
+
* in the repository joins `company`. The old hand-written model declared
|
|
40
|
+
* `singleChildrenTokens: [userMeta.nodeName]`; the descriptor derives
|
|
41
|
+
* `["company", "user"]` — the extra `company` token is inert on the wire (the
|
|
42
|
+
* serialiser only emits `relationships` declared below) and inert in entity
|
|
43
|
+
* mapping (no query RETURNs a `notification_company` column).
|
|
44
|
+
*
|
|
45
|
+
* No top-level `description`/`chat` block: the chatbot copy for a notification
|
|
46
|
+
* is application-specific (it describes each app's own notification types and
|
|
47
|
+
* subjects) and is supplied by the consuming app's extended descriptor. The
|
|
48
|
+
* per-field `description`s live here so an extended descriptor can spread
|
|
49
|
+
* `NotificationDescriptor.fields` and inherit them.
|
|
50
|
+
*
|
|
51
|
+
* Consuming apps that need more attributes, more subjects or a polymorphic
|
|
52
|
+
* actor register an EXTENDED descriptor (`modelRegistry`, last write wins) and
|
|
53
|
+
* subclass `NotificationRepository` — the narrowed-extend pattern used for
|
|
54
|
+
* user/auth/company/tokenusage. The package default stays User-only actor +
|
|
55
|
+
* `message`/`actionUrl`.
|
|
56
|
+
*/
|
|
57
|
+
export declare const NotificationDescriptor: import("../../..").EntityDescriptor<Notification, {
|
|
58
|
+
actor: {
|
|
59
|
+
model: import("../../..").DataMeta;
|
|
60
|
+
direction: "out";
|
|
61
|
+
relationship: string;
|
|
62
|
+
cardinality: "one";
|
|
63
|
+
required: false;
|
|
64
|
+
dtoKey: string;
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
}>;
|
|
68
|
+
export type NotificationDescriptorType = typeof NotificationDescriptor;
|
|
69
|
+
/**
|
|
70
|
+
* Back-compat alias for the pre-descriptor `NotificationModel` export (the
|
|
71
|
+
* `entities/notification.model.ts` file it used to live in is deleted). Mirrors
|
|
72
|
+
* `FeatureModel` in `foundations/feature/entities/feature.model.ts`.
|
|
73
|
+
*/
|
|
74
|
+
export declare const NotificationModel: import("../../..").DataModelInterface<Notification>;
|
|
75
|
+
//# sourceMappingURL=notification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../../src/foundations/notification/entities/notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAIhD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAClC,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,KAAK,CAAC,EAAE,IAAI,CAAC;CACd,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;EAoCjC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,OAAO,sBAAsB,CAAC;AAEvE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,qDAA+B,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationModel = exports.NotificationDescriptor = void 0;
|
|
4
|
+
const define_entity_1 = require("../../../common/helpers/define-entity");
|
|
5
|
+
const user_meta_1 = require("../../user/entities/user.meta");
|
|
6
|
+
const notification_meta_1 = require("./notification.meta");
|
|
7
|
+
/**
|
|
8
|
+
* Notification Entity Descriptor
|
|
9
|
+
*
|
|
10
|
+
* Single source of truth for the Notification entity configuration. Generates
|
|
11
|
+
* the mapper, the children tokens and the DataModelInterface automatically.
|
|
12
|
+
*
|
|
13
|
+
* `isCompanyScoped` is left at its default (`true`): every notification is
|
|
14
|
+
* written with a `(notification)-[:BELONGS_TO]->(company)` edge and every query
|
|
15
|
+
* in the repository joins `company`. The old hand-written model declared
|
|
16
|
+
* `singleChildrenTokens: [userMeta.nodeName]`; the descriptor derives
|
|
17
|
+
* `["company", "user"]` — the extra `company` token is inert on the wire (the
|
|
18
|
+
* serialiser only emits `relationships` declared below) and inert in entity
|
|
19
|
+
* mapping (no query RETURNs a `notification_company` column).
|
|
20
|
+
*
|
|
21
|
+
* No top-level `description`/`chat` block: the chatbot copy for a notification
|
|
22
|
+
* is application-specific (it describes each app's own notification types and
|
|
23
|
+
* subjects) and is supplied by the consuming app's extended descriptor. The
|
|
24
|
+
* per-field `description`s live here so an extended descriptor can spread
|
|
25
|
+
* `NotificationDescriptor.fields` and inherit them.
|
|
26
|
+
*
|
|
27
|
+
* Consuming apps that need more attributes, more subjects or a polymorphic
|
|
28
|
+
* actor register an EXTENDED descriptor (`modelRegistry`, last write wins) and
|
|
29
|
+
* subclass `NotificationRepository` — the narrowed-extend pattern used for
|
|
30
|
+
* user/auth/company/tokenusage. The package default stays User-only actor +
|
|
31
|
+
* `message`/`actionUrl`.
|
|
32
|
+
*/
|
|
33
|
+
exports.NotificationDescriptor = (0, define_entity_1.defineEntity)()({
|
|
34
|
+
...notification_meta_1.notificationMeta,
|
|
35
|
+
fields: {
|
|
36
|
+
notificationType: {
|
|
37
|
+
type: "string",
|
|
38
|
+
required: true,
|
|
39
|
+
description: 'The event that triggered the notification (e.g. "MENTION", "TASK_ASSIGNED"). Drives the message text and icon shown to the recipient.',
|
|
40
|
+
},
|
|
41
|
+
isRead: {
|
|
42
|
+
type: "boolean",
|
|
43
|
+
required: true,
|
|
44
|
+
description: "Whether the recipient has opened/acknowledged this notification.",
|
|
45
|
+
},
|
|
46
|
+
message: {
|
|
47
|
+
type: "string",
|
|
48
|
+
description: "Pre-rendered message text shown to the recipient.",
|
|
49
|
+
},
|
|
50
|
+
actionUrl: {
|
|
51
|
+
type: "string",
|
|
52
|
+
description: "URL the recipient is sent to when acting on the notification.",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
relationships: {
|
|
56
|
+
actor: {
|
|
57
|
+
model: user_meta_1.userMeta,
|
|
58
|
+
direction: "out",
|
|
59
|
+
relationship: "TRIGGERED_BY",
|
|
60
|
+
cardinality: "one",
|
|
61
|
+
required: false,
|
|
62
|
+
dtoKey: "actor",
|
|
63
|
+
description: "The user whose action triggered this notification.",
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
/**
|
|
68
|
+
* Back-compat alias for the pre-descriptor `NotificationModel` export (the
|
|
69
|
+
* `entities/notification.model.ts` file it used to live in is deleted). Mirrors
|
|
70
|
+
* `FeatureModel` in `foundations/feature/entities/feature.model.ts`.
|
|
71
|
+
*/
|
|
72
|
+
exports.NotificationModel = exports.NotificationDescriptor.model;
|
|
73
|
+
//# sourceMappingURL=notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../../../src/foundations/notification/entities/notification.ts"],"names":[],"mappings":";;;AACA,yEAAqE;AAErE,6DAAyD;AACzD,2DAAuD;AAgCvD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACU,QAAA,sBAAsB,GAAG,IAAA,4BAAY,GAAgB,CAAC;IACjE,GAAG,oCAAgB;IAEnB,MAAM,EAAE;QACN,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EACT,uIAAuI;SAC1I;QACD,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,kEAAkE;SAChF;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,mDAAmD;SACjE;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,+DAA+D;SAC7E;KACF;IAED,aAAa,EAAE;QACb,KAAK,EAAE;YACL,KAAK,EAAE,oBAAQ;YACf,SAAS,EAAE,KAAK;YAChB,YAAY,EAAE,cAAc;YAC5B,WAAW,EAAE,KAAK;YAClB,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,OAAO;YACf,WAAW,EAAE,oDAAoD;SAClE;KACF;CACF,CAAC,CAAC;AAIH;;;;GAIG;AACU,QAAA,iBAAiB,GAAG,8BAAsB,CAAC,KAAK,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export { NotificationModule } from "./notification.module";
|
|
2
|
-
export { NotificationModel } from "./entities/notification
|
|
3
|
-
export {
|
|
2
|
+
export { Notification, NotificationDescriptor, NotificationDescriptorType, NotificationModel, } from "./entities/notification";
|
|
3
|
+
export { notificationMeta } from "./entities/notification.meta";
|
|
4
|
+
export { NotificationController } from "./controllers/notification.controller";
|
|
5
|
+
export { NotificationDataPatchDTO, NotificationPatchAttributesDTO, NotificationPatchDTO, NotificationPatchListDTO, } from "./dtos/notification.patch.dto";
|
|
6
|
+
export { NotificationRepository, NotificationTarget } from "./repositories/notification.repository";
|
|
7
|
+
export { NotificationServices } from "./services/notification.service";
|
|
4
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/foundations/notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/foundations/notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,0BAA0B,EAC1B,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EACL,wBAAwB,EACxB,8BAA8B,EAC9B,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NotificationModel = exports.NotificationModule = void 0;
|
|
3
|
+
exports.NotificationServices = exports.NotificationRepository = exports.NotificationPatchListDTO = exports.NotificationPatchDTO = exports.NotificationPatchAttributesDTO = exports.NotificationDataPatchDTO = exports.NotificationController = exports.notificationMeta = exports.NotificationModel = exports.NotificationDescriptor = exports.NotificationModule = void 0;
|
|
4
4
|
var notification_module_1 = require("./notification.module");
|
|
5
5
|
Object.defineProperty(exports, "NotificationModule", { enumerable: true, get: function () { return notification_module_1.NotificationModule; } });
|
|
6
|
-
var
|
|
7
|
-
Object.defineProperty(exports, "
|
|
6
|
+
var notification_1 = require("./entities/notification");
|
|
7
|
+
Object.defineProperty(exports, "NotificationDescriptor", { enumerable: true, get: function () { return notification_1.NotificationDescriptor; } });
|
|
8
|
+
Object.defineProperty(exports, "NotificationModel", { enumerable: true, get: function () { return notification_1.NotificationModel; } });
|
|
9
|
+
var notification_meta_1 = require("./entities/notification.meta");
|
|
10
|
+
Object.defineProperty(exports, "notificationMeta", { enumerable: true, get: function () { return notification_meta_1.notificationMeta; } });
|
|
11
|
+
var notification_controller_1 = require("./controllers/notification.controller");
|
|
12
|
+
Object.defineProperty(exports, "NotificationController", { enumerable: true, get: function () { return notification_controller_1.NotificationController; } });
|
|
13
|
+
var notification_patch_dto_1 = require("./dtos/notification.patch.dto");
|
|
14
|
+
Object.defineProperty(exports, "NotificationDataPatchDTO", { enumerable: true, get: function () { return notification_patch_dto_1.NotificationDataPatchDTO; } });
|
|
15
|
+
Object.defineProperty(exports, "NotificationPatchAttributesDTO", { enumerable: true, get: function () { return notification_patch_dto_1.NotificationPatchAttributesDTO; } });
|
|
16
|
+
Object.defineProperty(exports, "NotificationPatchDTO", { enumerable: true, get: function () { return notification_patch_dto_1.NotificationPatchDTO; } });
|
|
17
|
+
Object.defineProperty(exports, "NotificationPatchListDTO", { enumerable: true, get: function () { return notification_patch_dto_1.NotificationPatchListDTO; } });
|
|
18
|
+
var notification_repository_1 = require("./repositories/notification.repository");
|
|
19
|
+
Object.defineProperty(exports, "NotificationRepository", { enumerable: true, get: function () { return notification_repository_1.NotificationRepository; } });
|
|
20
|
+
var notification_service_1 = require("./services/notification.service");
|
|
21
|
+
Object.defineProperty(exports, "NotificationServices", { enumerable: true, get: function () { return notification_service_1.NotificationServices; } });
|
|
8
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/foundations/notification/index.ts"],"names":[],"mappings":";;;AAAA,6DAA2D;AAAlD,yHAAA,kBAAkB,OAAA;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/foundations/notification/index.ts"],"names":[],"mappings":";;;AAAA,6DAA2D;AAAlD,yHAAA,kBAAkB,OAAA;AAC3B,wDAKiC;AAH/B,sHAAA,sBAAsB,OAAA;AAEtB,iHAAA,iBAAiB,OAAA;AAEnB,kEAAgE;AAAvD,qHAAA,gBAAgB,OAAA;AACzB,iFAA+E;AAAtE,iIAAA,sBAAsB,OAAA;AAC/B,wEAKuC;AAJrC,kIAAA,wBAAwB,OAAA;AACxB,wIAAA,8BAA8B,OAAA;AAC9B,8HAAA,oBAAoB,OAAA;AACpB,kIAAA,wBAAwB,OAAA;AAE1B,kFAAoG;AAA3F,iIAAA,sBAAsB,OAAA;AAC/B,wEAAuE;AAA9D,4HAAA,oBAAoB,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.module.d.ts","sourceRoot":"","sources":["../../../src/foundations/notification/notification.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"notification.module.d.ts","sourceRoot":"","sources":["../../../src/foundations/notification/notification.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAOtD,qBAMa,kBAAmB,YAAW,YAAY;IACrD,YAAY;CAGb"}
|
|
@@ -10,20 +10,19 @@ exports.NotificationModule = void 0;
|
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
11
|
const registry_1 = require("../../common/registries/registry");
|
|
12
12
|
const notification_controller_1 = require("./controllers/notification.controller");
|
|
13
|
-
const
|
|
13
|
+
const notification_1 = require("./entities/notification");
|
|
14
14
|
const notification_repository_1 = require("./repositories/notification.repository");
|
|
15
|
-
const notifications_serialiser_1 = require("./serialisers/notifications.serialiser");
|
|
16
15
|
const notification_service_1 = require("./services/notification.service");
|
|
17
16
|
let NotificationModule = class NotificationModule {
|
|
18
17
|
onModuleInit() {
|
|
19
|
-
registry_1.modelRegistry.register(
|
|
18
|
+
registry_1.modelRegistry.register(notification_1.NotificationDescriptor.model);
|
|
20
19
|
}
|
|
21
20
|
};
|
|
22
21
|
exports.NotificationModule = NotificationModule;
|
|
23
22
|
exports.NotificationModule = NotificationModule = __decorate([
|
|
24
23
|
(0, common_1.Module)({
|
|
25
24
|
controllers: [notification_controller_1.NotificationController],
|
|
26
|
-
providers: [notification_repository_1.NotificationRepository, notification_service_1.NotificationServices,
|
|
25
|
+
providers: [notification_repository_1.NotificationRepository, notification_service_1.NotificationServices, notification_1.NotificationDescriptor.model.serialiser],
|
|
27
26
|
exports: [notification_repository_1.NotificationRepository],
|
|
28
27
|
imports: [],
|
|
29
28
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.module.js","sourceRoot":"","sources":["../../../src/foundations/notification/notification.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAsD;AACtD,+DAAiE;AACjE,mFAA+E;AAC/E,
|
|
1
|
+
{"version":3,"file":"notification.module.js","sourceRoot":"","sources":["../../../src/foundations/notification/notification.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAsD;AACtD,+DAAiE;AACjE,mFAA+E;AAC/E,0DAAiE;AACjE,oFAAgF;AAChF,0EAAuE;AAQhE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAAY;QACV,wBAAa,CAAC,QAAQ,CAAC,qCAAsB,CAAC,KAAK,CAAC,CAAC;IACvD,CAAC;CACF,CAAA;AAJY,gDAAkB;6BAAlB,kBAAkB;IAN9B,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,gDAAsB,CAAC;QACrC,SAAS,EAAE,CAAC,gDAAsB,EAAE,2CAAoB,EAAE,qCAAsB,CAAC,KAAK,CAAC,UAAU,CAAC;QAClG,OAAO,EAAE,CAAC,gDAAsB,CAAC;QACjC,OAAO,EAAE,EAAE;KACZ,CAAC;GACW,kBAAkB,CAI9B"}
|
|
@@ -1,17 +1,97 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ClsService } from "nestjs-cls";
|
|
2
|
+
import { DataModelInterface } from "../../../common/interfaces/datamodel.interface";
|
|
2
3
|
import { JsonApiCursorInterface } from "../../../core/jsonapi/interfaces/jsonapi.cursor.interface";
|
|
4
|
+
import { AbstractRepository } from "../../../core/neo4j/abstracts/abstract.repository";
|
|
3
5
|
import { Neo4jService } from "../../../core/neo4j/services/neo4j.service";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { SecurityService } from "../../../core/security/services/security.service";
|
|
7
|
+
import { Notification, NotificationDescriptor } from "../../notification/entities/notification";
|
|
8
|
+
/** A node a notification refers to (its "subject"), written as `-[:REFERS_TO]->`. */
|
|
9
|
+
export type NotificationTarget = {
|
|
10
|
+
/** `id` property of an EXISTING node. */
|
|
11
|
+
id: string;
|
|
12
|
+
/** Neo4j label of that node (e.g. "Task", "Document"). */
|
|
13
|
+
label: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Every method below is fully custom Cypher: the bell list/detail queries scope
|
|
17
|
+
* by TRIGGERED_FOR user and require a REFERS_TO edge to exist (see
|
|
18
|
+
* `findForUser`), and `createNotification`/`createIdempotent` write a bespoke
|
|
19
|
+
* subject graph. The generic descriptor-driven `create`/`put`/`patch`/`delete`/
|
|
20
|
+
* `find`/`findById` are INHERITED from `AbstractRepository` unchanged.
|
|
21
|
+
*
|
|
22
|
+
* NAMING — `find`/`findById` are named `findForUser`/`findByIdForUser`: their
|
|
23
|
+
* required `userId`/`notificationId` params are incompatible overrides of
|
|
24
|
+
* `AbstractRepository.find(params: {...all optional})` /
|
|
25
|
+
* `findById(params: { id })`. The bespoke creator is named `createNotification`
|
|
26
|
+
* for the same reason: `AbstractRepository.create(params: { id: string;
|
|
27
|
+
* [key: string]: any }): Promise<void>` cannot be narrowed to a param without
|
|
28
|
+
* `id` returning `Promise<Notification>` (TS2416). Both names mirror the proven
|
|
29
|
+
* naming of the application repository this port is derived from.
|
|
30
|
+
*
|
|
31
|
+
* COMPANY SCOPING — why `buildDefaultMatch()` is deliberately not used here:
|
|
32
|
+
* every query in this file is hand-written for the reasons above, so none can
|
|
33
|
+
* call the framework helper. Scoping is achieved instead by matching the
|
|
34
|
+
* CLS-bound `company` variable that `initQuery()` seeds:
|
|
35
|
+
* `MATCH (notification:Notification)-[:BELONGS_TO]->(company)`.
|
|
36
|
+
*
|
|
37
|
+
* Be precise about the two read methods — they are NOT equally scoped:
|
|
38
|
+
* - `findForUser` is company- AND user-scoped: it additionally matches
|
|
39
|
+
* `-[:TRIGGERED_FOR]->(user:User {id: $userId})-[:BELONGS_TO]->(company)`.
|
|
40
|
+
* - `findByIdForUser` is company-scoped ONLY. It takes a `userId` param and
|
|
41
|
+
* binds it as a query param, but its Cypher never references `$userId`, so
|
|
42
|
+
* any user of the same company can read any other user's notification by
|
|
43
|
+
* id. Pre-existing behaviour, preserved verbatim by this port; tightening it
|
|
44
|
+
* is a behavioural change outside the port's scope.
|
|
45
|
+
*
|
|
46
|
+
* Any new query added to this file MUST join `company` the same way —
|
|
47
|
+
* dropping that join is a cross-tenant read.
|
|
48
|
+
* (This note also clears nja-lint's file-level `manual-query-no-company-scope`
|
|
49
|
+
* rule, which fires on any repository whose file never mentions
|
|
50
|
+
* `buildDefaultMatch`; per-line `nja-lint-ignore` comments cannot clear it
|
|
51
|
+
* because the rule simply advances to the next unignored MATCH.)
|
|
52
|
+
*/
|
|
53
|
+
export declare class NotificationRepository extends AbstractRepository<Notification, typeof NotificationDescriptor.relationships> {
|
|
54
|
+
protected readonly descriptor: import("../../..").EntityDescriptor<Notification, {
|
|
55
|
+
actor: {
|
|
56
|
+
model: import("../../../common/interfaces/datamodel.interface").DataMeta;
|
|
57
|
+
direction: "out";
|
|
58
|
+
relationship: string;
|
|
59
|
+
cardinality: "one";
|
|
60
|
+
required: false;
|
|
61
|
+
dtoKey: string;
|
|
62
|
+
description: string;
|
|
63
|
+
};
|
|
64
|
+
}>;
|
|
65
|
+
constructor(neo4j: Neo4jService, securityService: SecurityService, clsService: ClsService);
|
|
66
|
+
/**
|
|
67
|
+
* Fully custom (NOT calling `super.onModuleInit()`): adds the
|
|
68
|
+
* `idempotencyKey` uniqueness constraint that backs `createIdempotent` on top
|
|
69
|
+
* of the descriptor's `id` constraint, and deliberately creates NO FULLTEXT
|
|
70
|
+
* index. The base implementation would derive one from the descriptor's
|
|
71
|
+
* string fields (`notificationType`, `message`, `actionUrl`); notifications
|
|
72
|
+
* have never been full-text searchable and adding the index would change the
|
|
73
|
+
* shipped index set of every consuming application.
|
|
74
|
+
*/
|
|
8
75
|
onModuleInit(): Promise<void>;
|
|
9
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Resolve the model used to map/serialise notification rows.
|
|
78
|
+
*
|
|
79
|
+
* Registry first (mirrors `ContentRepository.getContentModel()`): an
|
|
80
|
+
* application that registers an EXTENDED notification model — more
|
|
81
|
+
* attributes, more subjects, a polymorphic actor — wins here without having
|
|
82
|
+
* to override every query method. Falls back to `this.descriptor.model`, so a
|
|
83
|
+
* subclass that overrides `descriptor` still resolves its own model and unit
|
|
84
|
+
* tests that never run `onModuleInit` still work.
|
|
85
|
+
*/
|
|
86
|
+
protected getNotificationModel(): DataModelInterface<Notification>;
|
|
87
|
+
/** Guards a caller-supplied Neo4j label before it is interpolated into Cypher. */
|
|
88
|
+
protected assertSafeLabel(label: string): string;
|
|
89
|
+
findForUser(params: {
|
|
10
90
|
userId: string;
|
|
11
91
|
cursor?: JsonApiCursorInterface;
|
|
12
92
|
isArchived?: boolean;
|
|
13
93
|
}): Promise<Notification[]>;
|
|
14
|
-
|
|
94
|
+
findByIdForUser(params: {
|
|
15
95
|
notificationId: string;
|
|
16
96
|
userId: string;
|
|
17
97
|
}): Promise<Notification>;
|
|
@@ -22,10 +102,47 @@ export declare class NotificationRepository implements OnModuleInit {
|
|
|
22
102
|
archive(params: {
|
|
23
103
|
notificationId: string;
|
|
24
104
|
}): Promise<void>;
|
|
25
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Create a notification for a recipient, optionally attributed to an actor
|
|
107
|
+
* and pointing at one or more subjects.
|
|
108
|
+
*
|
|
109
|
+
* `targets` is what makes the notification VISIBLE: `findForUser` filters on
|
|
110
|
+
* `EXISTS { MATCH (notification)-[:REFERS_TO]->() }`, so a notification
|
|
111
|
+
* created without a target never appears in the recipient's list. Every
|
|
112
|
+
* target is validated (`validateExistingNodes`) before the write and then
|
|
113
|
+
* written as `(notification)-[:REFERS_TO]->(target)`, grouped per label.
|
|
114
|
+
*
|
|
115
|
+
* Named `createNotification` rather than `create` because
|
|
116
|
+
* `AbstractRepository.create` is inherited with an incompatible signature —
|
|
117
|
+
* see the class JSDoc.
|
|
118
|
+
*/
|
|
119
|
+
createNotification(params: {
|
|
26
120
|
notificationType: string;
|
|
27
121
|
userId: string;
|
|
28
122
|
actorId?: string;
|
|
123
|
+
targets?: NotificationTarget[];
|
|
29
124
|
}): Promise<Notification>;
|
|
125
|
+
/**
|
|
126
|
+
* Create a notification at most once for a given `idempotencyKey`.
|
|
127
|
+
*
|
|
128
|
+
* Backed by the `notification_idempotency_key` uniqueness constraint created
|
|
129
|
+
* in `onModuleInit`. The MERGE is the atomic find-or-create; the follow-up
|
|
130
|
+
* read compares the stored id with the id this call generated to decide
|
|
131
|
+
* whether THIS call created the record (`{ created: true }`) or a previous
|
|
132
|
+
* call with the same key won (`{ created: false }`).
|
|
133
|
+
*
|
|
134
|
+
* Every related node is matched through `company`, so a node that does not
|
|
135
|
+
* belong to the current company is simply not linked.
|
|
136
|
+
*/
|
|
137
|
+
createIdempotent(params: {
|
|
138
|
+
notificationType: string;
|
|
139
|
+
userId: string;
|
|
140
|
+
actorId?: string;
|
|
141
|
+
actorLabel?: string;
|
|
142
|
+
targets?: NotificationTarget[];
|
|
143
|
+
idempotencyKey: string;
|
|
144
|
+
}): Promise<{
|
|
145
|
+
created: boolean;
|
|
146
|
+
}>;
|
|
30
147
|
}
|
|
31
148
|
//# sourceMappingURL=notification.repository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.repository.d.ts","sourceRoot":"","sources":["../../../../src/foundations/notification/repositories/notification.repository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notification.repository.d.ts","sourceRoot":"","sources":["../../../../src/foundations/notification/repositories/notification.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,2DAA2D,CAAC;AACnG,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAEvF,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAIhG,qFAAqF;AACrF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AASF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,qBACa,sBAAuB,SAAQ,kBAAkB,CAC5D,YAAY,EACZ,OAAO,sBAAsB,CAAC,aAAa,CAC5C;IACC,SAAS,CAAC,QAAQ,CAAC,UAAU;;;;;;;;;;OAA0B;gBAE3C,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU;IAIzF;;;;;;;;OAQG;IACG,YAAY;IASlB;;;;;;;;;OASG;IACH,SAAS,CAAC,oBAAoB,IAAI,kBAAkB,CAAC,YAAY,CAAC;IAIlE,kFAAkF;IAClF,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAK1C,WAAW,CAAC,MAAM,EAAE;QACxB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,sBAAsB,CAAC;QAChC,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IA2BrB,eAAe,CAAC,MAAM,EAAE;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,CAAC;IAoB1F,UAAU,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,EAAE,CAAA;KAAE;IAmBhE,OAAO,CAAC,MAAM,EAAE;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE;IAgBhD;;;;;;;;;;;;;OAaG;IACG,kBAAkB,CAAC,MAAM,EAAE;QAC/B,gBAAgB,EAAE,MAAM,CAAC;QACzB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAC;KAChC,GAAG,OAAO,CAAC,YAAY,CAAC;IAkGzB;;;;;;;;;;;OAWG;IACG,gBAAgB,CAAC,MAAM,EAAE;QAC7B,gBAAgB,EAAE,MAAM,CAAC;QACzB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAC;QAC/B,cAAc,EAAE,MAAM,CAAC;KACxB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;CA2ElC"}
|