@carlonicora/nestjs-neo4jsonapi 1.115.1 → 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 +10 -7
- 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
|
@@ -14,6 +14,65 @@ export interface ContentRelationshipExtension {
|
|
|
14
14
|
/** Optional JSON:API key override (e.g., "topics" instead of "topic") */
|
|
15
15
|
dtoKey?: string;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Describes how the Content → owner edge is matched in Cypher.
|
|
19
|
+
*
|
|
20
|
+
* Default (omitted): the historical directed single-type match
|
|
21
|
+
* `MATCH (content)<-[:PUBLISHED]-(content_owner:User)`.
|
|
22
|
+
*/
|
|
23
|
+
export interface ContentOwnerMatchPattern {
|
|
24
|
+
/**
|
|
25
|
+
* Neo4j relationship types accepted for the owner edge. Joined with `|`,
|
|
26
|
+
* so `["PUBLISHED", "FROM"]` becomes `[:PUBLISHED|FROM]`.
|
|
27
|
+
*/
|
|
28
|
+
relationships: string[];
|
|
29
|
+
/**
|
|
30
|
+
* When true the pattern is undirected (`(content)-[:…]-(owner)`) instead of
|
|
31
|
+
* the default incoming direction (`(content)<-[:…]-(owner)`).
|
|
32
|
+
*
|
|
33
|
+
* Needed when the owner edge points different ways for different underlying
|
|
34
|
+
* labels — e.g. a360ai's Email rows, where the edge is
|
|
35
|
+
* `(email)-[:FROM]->(user)` while every other content type is
|
|
36
|
+
* `(user)-[:PUBLISHED]->(content)`.
|
|
37
|
+
*/
|
|
38
|
+
undirected?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Adds one config-driven computed meta field to Content, fed by an extra
|
|
42
|
+
* OPTIONAL MATCH appended to the Content RETURN statement.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* // a360ai: expose the proceeding a memo belongs to as meta.proceedingId
|
|
47
|
+
* {
|
|
48
|
+
* key: "proceedingId",
|
|
49
|
+
* optionalMatch: "OPTIONAL MATCH (memoProceeding:Proceeding)-[:HAS_MEMO]->(content)",
|
|
50
|
+
* returnAlias: "memoProceeding.id",
|
|
51
|
+
* }
|
|
52
|
+
* // → OPTIONAL MATCH (memoProceeding:Proceeding)-[:HAS_MEMO]->(content)
|
|
53
|
+
* // → RETURN …, memoProceeding.id AS proceedingId
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export interface ContentMetaFieldExtension {
|
|
57
|
+
/**
|
|
58
|
+
* JSON:API meta key AND the Cypher RETURN alias the value is read from
|
|
59
|
+
* (the descriptor's computed field reads `record.get(key)`).
|
|
60
|
+
*/
|
|
61
|
+
key: string;
|
|
62
|
+
/**
|
|
63
|
+
* A complete Cypher clause appended verbatim before the RETURN — normally an
|
|
64
|
+
* `OPTIONAL MATCH …` binding the variable projected by `returnAlias`. It runs
|
|
65
|
+
* after the company/owner matches, so `content` is in scope.
|
|
66
|
+
*/
|
|
67
|
+
optionalMatch: string;
|
|
68
|
+
/**
|
|
69
|
+
* The Cypher expression to project, WITHOUT the alias: it is emitted as
|
|
70
|
+
* `${returnAlias} AS ${key}`. For the example above, `"memoProceeding.id"`.
|
|
71
|
+
*/
|
|
72
|
+
returnAlias: string;
|
|
73
|
+
/** Optional human-readable description for the graph catalog / chatbot. */
|
|
74
|
+
description?: string;
|
|
75
|
+
}
|
|
17
76
|
/**
|
|
18
77
|
* Configuration for extending Content module with additional relationships.
|
|
19
78
|
*
|
|
@@ -22,6 +81,10 @@ export interface ContentRelationshipExtension {
|
|
|
22
81
|
* - Included in JSON:API serialization
|
|
23
82
|
* - Mapped in entity results
|
|
24
83
|
*
|
|
84
|
+
* Every key beyond `additionalRelationships` is optional and defaults to the
|
|
85
|
+
* package's historical behaviour, so omitting the config (or passing only
|
|
86
|
+
* `additionalRelationships`) leaves the Content wire and Cypher unchanged.
|
|
87
|
+
*
|
|
25
88
|
* @example
|
|
26
89
|
* ```typescript
|
|
27
90
|
* const contentExtension: ContentExtensionConfig = {
|
|
@@ -36,13 +99,76 @@ export interface ContentRelationshipExtension {
|
|
|
36
99
|
* ],
|
|
37
100
|
* };
|
|
38
101
|
* ```
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* // a360ai's configuration — every non-default knob in one place
|
|
106
|
+
* const contentExtension: ContentExtensionConfig = {
|
|
107
|
+
* additionalRelationships: [],
|
|
108
|
+
* ownerMatchPattern: { relationships: ["PUBLISHED", "FROM"], undirected: true },
|
|
109
|
+
* requireTldr: true,
|
|
110
|
+
* metaFields: [
|
|
111
|
+
* {
|
|
112
|
+
* key: "proceedingId",
|
|
113
|
+
* optionalMatch: "OPTIONAL MATCH (memoProceeding:Proceeding)-[:HAS_MEMO]->(content)",
|
|
114
|
+
* returnAlias: "memoProceeding.id",
|
|
115
|
+
* },
|
|
116
|
+
* ],
|
|
117
|
+
* serialiseAuthor: false,
|
|
118
|
+
* };
|
|
119
|
+
* ```
|
|
39
120
|
*/
|
|
40
121
|
export interface ContentExtensionConfig {
|
|
41
122
|
additionalRelationships: ContentRelationshipExtension[];
|
|
123
|
+
/**
|
|
124
|
+
* Overrides the Content → owner Cypher match.
|
|
125
|
+
*
|
|
126
|
+
* Default (omitted): `MATCH (content)<-[:PUBLISHED]-(content_owner:User)` —
|
|
127
|
+
* byte-identical to the pre-config behaviour.
|
|
128
|
+
*
|
|
129
|
+
* a360ai: `{ relationships: ["PUBLISHED", "FROM"], undirected: true }`.
|
|
130
|
+
*/
|
|
131
|
+
ownerMatchPattern?: ContentOwnerMatchPattern;
|
|
132
|
+
/**
|
|
133
|
+
* When true, only records carrying a non-empty `tldr` are returned. The
|
|
134
|
+
* filter is applied BOTH to the default list match and to the `findByIds`
|
|
135
|
+
* lookup.
|
|
136
|
+
*
|
|
137
|
+
* Default (omitted / false): no tldr filter — every content record is
|
|
138
|
+
* returned, exactly as before.
|
|
139
|
+
*
|
|
140
|
+
* a360ai: `true` (Content is a view over AI-summarised records only).
|
|
141
|
+
*/
|
|
142
|
+
requireTldr?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Extra computed meta fields hydrated by additional OPTIONAL MATCH clauses.
|
|
145
|
+
*
|
|
146
|
+
* Default (omitted): no extra clauses and no extra meta keys.
|
|
147
|
+
*
|
|
148
|
+
* a360ai: the `proceedingId` entry documented on
|
|
149
|
+
* {@link ContentMetaFieldExtension}.
|
|
150
|
+
*/
|
|
151
|
+
metaFields?: ContentMetaFieldExtension[];
|
|
152
|
+
/**
|
|
153
|
+
* Whether the `author` relationship is matched and serialised.
|
|
154
|
+
*
|
|
155
|
+
* Default (omitted / true): the `author` relationship is part of the wire and
|
|
156
|
+
* of the Cypher RETURN, as it has always been.
|
|
157
|
+
*
|
|
158
|
+
* a360ai: `false` — a360ai content has no author distinct from the owner and
|
|
159
|
+
* its wire contract pins relationships to `["owner"]`.
|
|
160
|
+
*/
|
|
161
|
+
serialiseAuthor?: boolean;
|
|
42
162
|
}
|
|
43
163
|
/**
|
|
44
164
|
* Injection token for Content extension configuration.
|
|
45
165
|
* Use with @Optional() @Inject(CONTENT_EXTENSION_CONFIG) to make it optional.
|
|
46
166
|
*/
|
|
47
167
|
export declare const CONTENT_EXTENSION_CONFIG: unique symbol;
|
|
168
|
+
/**
|
|
169
|
+
* Injection token carrying the descriptor that `ContentModule.forRoot()` built
|
|
170
|
+
* from the module configuration. The module registers `descriptor.model` in
|
|
171
|
+
* `modelRegistry` on init; read paths resolve it with `getContentModel()`.
|
|
172
|
+
*/
|
|
173
|
+
export declare const CONTENT_DESCRIPTOR: unique symbol;
|
|
48
174
|
//# sourceMappingURL=content.extension.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.extension.interface.d.ts","sourceRoot":"","sources":["../../../../src/foundations/content/interfaces/content.extension.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,8EAA8E;IAC9E,KAAK,EAAE,QAAQ,CAAC;IAEhB,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IAErB,6DAA6D;IAC7D,SAAS,EAAE,IAAI,GAAG,KAAK,CAAC;IAExB,+DAA+D;IAC/D,WAAW,EAAE,KAAK,GAAG,MAAM,CAAC;IAE5B,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED
|
|
1
|
+
{"version":3,"file":"content.extension.interface.d.ts","sourceRoot":"","sources":["../../../../src/foundations/content/interfaces/content.extension.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,8EAA8E;IAC9E,KAAK,EAAE,QAAQ,CAAC;IAEhB,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IAErB,6DAA6D;IAC7D,SAAS,EAAE,IAAI,GAAG,KAAK,CAAC;IAExB,+DAA+D;IAC/D,WAAW,EAAE,KAAK,GAAG,MAAM,CAAC;IAE5B,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,aAAa,EAAE,MAAM,EAAE,CAAC;IAExB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,WAAW,sBAAsB;IACrC,uBAAuB,EAAE,4BAA4B,EAAE,CAAC;IAExD;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,wBAAwB,CAAC;IAE7C;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAEzC;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,eAAqC,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,eAA+B,CAAC"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONTENT_EXTENSION_CONFIG = void 0;
|
|
3
|
+
exports.CONTENT_DESCRIPTOR = exports.CONTENT_EXTENSION_CONFIG = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Injection token for Content extension configuration.
|
|
6
6
|
* Use with @Optional() @Inject(CONTENT_EXTENSION_CONFIG) to make it optional.
|
|
7
7
|
*/
|
|
8
8
|
exports.CONTENT_EXTENSION_CONFIG = Symbol("CONTENT_EXTENSION_CONFIG");
|
|
9
|
+
/**
|
|
10
|
+
* Injection token carrying the descriptor that `ContentModule.forRoot()` built
|
|
11
|
+
* from the module configuration. The module registers `descriptor.model` in
|
|
12
|
+
* `modelRegistry` on init; read paths resolve it with `getContentModel()`.
|
|
13
|
+
*/
|
|
14
|
+
exports.CONTENT_DESCRIPTOR = Symbol("CONTENT_DESCRIPTOR");
|
|
9
15
|
//# sourceMappingURL=content.extension.interface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.extension.interface.js","sourceRoot":"","sources":["../../../../src/foundations/content/interfaces/content.extension.interface.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"content.extension.interface.js","sourceRoot":"","sources":["../../../../src/foundations/content/interfaces/content.extension.interface.ts"],"names":[],"mappings":";;;AAmLA;;;GAGG;AACU,QAAA,wBAAwB,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC;AAE3E;;;;GAIG;AACU,QAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import { Document } from "@langchain/core/documents";
|
|
2
1
|
import { ConfigService } from "@nestjs/config";
|
|
3
2
|
import { BaseConfigInterface } from "../../../config/interfaces";
|
|
4
3
|
import { JsonApiCursorInterface } from "../../../core/jsonapi/interfaces/jsonapi.cursor.interface";
|
|
5
4
|
import { Neo4jService } from "../../../core/neo4j/services/neo4j.service";
|
|
6
5
|
import { SecurityService } from "../../../core/security/services/security.service";
|
|
7
|
-
import { Content } from "../../content/entities/content
|
|
6
|
+
import { Content } from "../../content/entities/content";
|
|
8
7
|
import { ContentCypherService } from "../../content/services/content.cypher.service";
|
|
8
|
+
/**
|
|
9
|
+
* Content is a virtual, multi-label aggregate (the labels come from
|
|
10
|
+
* `baseConfig.contentTypes`) with no single Neo4j label of its own, so the
|
|
11
|
+
* inherited AbstractRepository query builders — which assume one
|
|
12
|
+
* `${labelName}` match — cannot express these reads. Every method below is
|
|
13
|
+
* genuinely custom and delegates its Cypher fragments to ContentCypherService.
|
|
14
|
+
*
|
|
15
|
+
* ContentCypherService is also handed, as an instance, to
|
|
16
|
+
* RelevancyService/RelevancyRepository by ContentController (duck-typed as
|
|
17
|
+
* `cypherService: any`, calling `.userHasAccess()` / `.returnStatement()`) for
|
|
18
|
+
* the `/contents/:id/relevance` endpoint. Do not delete it.
|
|
19
|
+
*/
|
|
9
20
|
export declare class ContentRepository {
|
|
10
21
|
private readonly neo4j;
|
|
11
22
|
private readonly contentCypherService;
|
|
@@ -13,10 +24,6 @@ export declare class ContentRepository {
|
|
|
13
24
|
private readonly configService;
|
|
14
25
|
constructor(neo4j: Neo4jService, contentCypherService: ContentCypherService, securityService: SecurityService, configService: ConfigService<BaseConfigInterface>);
|
|
15
26
|
private getContentTypes;
|
|
16
|
-
/**
|
|
17
|
-
* Get the ContentModel from registry (may be extended with additional childrenTokens)
|
|
18
|
-
*/
|
|
19
|
-
private getContentModel;
|
|
20
27
|
find(params: {
|
|
21
28
|
fetchAll?: boolean;
|
|
22
29
|
term?: string;
|
|
@@ -25,7 +32,7 @@ export declare class ContentRepository {
|
|
|
25
32
|
}): Promise<Content[]>;
|
|
26
33
|
findByIds(params: {
|
|
27
34
|
contentIds: string[];
|
|
28
|
-
}): Promise<
|
|
35
|
+
}): Promise<Content[]>;
|
|
29
36
|
findByOwner(params: {
|
|
30
37
|
ownerId: string;
|
|
31
38
|
term?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.repository.d.ts","sourceRoot":"","sources":["../../../../src/foundations/content/repositories/content.repository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"content.repository.d.ts","sourceRoot":"","sources":["../../../../src/foundations/content/repositories/content.repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAA+B,MAAM,4BAA4B,CAAC;AAC9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,2DAA2D,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,OAAO,EAAmB,MAAM,gCAAgC,CAAC;AAE1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAGrF;;;;;;;;;;;GAWG;AACH,qBACa,iBAAiB;IAE1B,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAHb,KAAK,EAAE,YAAY,EACnB,oBAAoB,EAAE,oBAAoB,EAC1C,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC;IAGpE,OAAO,CAAC,eAAe;IAKjB,IAAI,CAAC,MAAM,EAAE;QACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,sBAAsB,CAAC;KACjC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAyBhB,SAAS,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAkB/D,WAAW,CAAC,MAAM,EAAE;QACxB,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,sBAAsB,CAAC;KACjC;CA0BF"}
|
|
@@ -12,12 +12,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ContentRepository = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const config_1 = require("@nestjs/config");
|
|
15
|
-
const registry_1 = require("../../../common/registries/registry");
|
|
16
15
|
const neo4j_service_1 = require("../../../core/neo4j/services/neo4j.service");
|
|
17
16
|
const security_service_1 = require("../../../core/security/services/security.service");
|
|
17
|
+
const content_1 = require("../../content/entities/content");
|
|
18
18
|
const content_meta_1 = require("../../content/entities/content.meta");
|
|
19
19
|
const content_cypher_service_1 = require("../../content/services/content.cypher.service");
|
|
20
20
|
const user_meta_1 = require("../../user/entities/user.meta");
|
|
21
|
+
/**
|
|
22
|
+
* Content is a virtual, multi-label aggregate (the labels come from
|
|
23
|
+
* `baseConfig.contentTypes`) with no single Neo4j label of its own, so the
|
|
24
|
+
* inherited AbstractRepository query builders — which assume one
|
|
25
|
+
* `${labelName}` match — cannot express these reads. Every method below is
|
|
26
|
+
* genuinely custom and delegates its Cypher fragments to ContentCypherService.
|
|
27
|
+
*
|
|
28
|
+
* ContentCypherService is also handed, as an instance, to
|
|
29
|
+
* RelevancyService/RelevancyRepository by ContentController (duck-typed as
|
|
30
|
+
* `cypherService: any`, calling `.userHasAccess()` / `.returnStatement()`) for
|
|
31
|
+
* the `/contents/:id/relevance` endpoint. Do not delete it.
|
|
32
|
+
*/
|
|
21
33
|
let ContentRepository = class ContentRepository {
|
|
22
34
|
constructor(neo4j, contentCypherService, securityService, configService) {
|
|
23
35
|
this.neo4j = neo4j;
|
|
@@ -29,20 +41,10 @@ let ContentRepository = class ContentRepository {
|
|
|
29
41
|
const types = this.configService.get("contentTypes")?.types ?? [];
|
|
30
42
|
return types.length > 0 ? types : [content_meta_1.contentMeta.labelName];
|
|
31
43
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Get the ContentModel from registry (may be extended with additional childrenTokens)
|
|
34
|
-
*/
|
|
35
|
-
getContentModel() {
|
|
36
|
-
const model = registry_1.modelRegistry.get(content_meta_1.contentMeta.nodeName);
|
|
37
|
-
if (!model) {
|
|
38
|
-
throw new Error(`ContentModel not found in registry for nodeName: ${content_meta_1.contentMeta.nodeName}`);
|
|
39
|
-
}
|
|
40
|
-
return model;
|
|
41
|
-
}
|
|
42
44
|
async find(params) {
|
|
43
45
|
const query = this.neo4j.initQuery({
|
|
44
46
|
cursor: params.cursor,
|
|
45
|
-
serialiser:
|
|
47
|
+
serialiser: (0, content_1.getContentModel)(),
|
|
46
48
|
fetchAll: params.fetchAll,
|
|
47
49
|
});
|
|
48
50
|
query.queryParams = {
|
|
@@ -61,14 +63,14 @@ let ContentRepository = class ContentRepository {
|
|
|
61
63
|
return this.neo4j.readMany(query);
|
|
62
64
|
}
|
|
63
65
|
async findByIds(params) {
|
|
64
|
-
const query = this.neo4j.initQuery({ serialiser:
|
|
66
|
+
const query = this.neo4j.initQuery({ serialiser: (0, content_1.getContentModel)() });
|
|
65
67
|
query.queryParams = {
|
|
66
68
|
...query.queryParams,
|
|
67
69
|
ids: params.contentIds,
|
|
68
70
|
};
|
|
69
71
|
query.query += `
|
|
70
72
|
MATCH (${content_meta_1.contentMeta.nodeName}:${this.getContentTypes().join("|")})-[:BELONGS_TO]->(company)
|
|
71
|
-
WHERE ${content_meta_1.contentMeta.nodeName}.id IN $ids
|
|
73
|
+
WHERE ${content_meta_1.contentMeta.nodeName}.id IN $ids${this.contentCypherService.tldrFilter()}
|
|
72
74
|
${this.securityService.userHasAccess({ validator: this.contentCypherService.userHasAccess })}
|
|
73
75
|
${this.contentCypherService.returnStatement()}
|
|
74
76
|
`;
|
|
@@ -76,7 +78,7 @@ let ContentRepository = class ContentRepository {
|
|
|
76
78
|
}
|
|
77
79
|
async findByOwner(params) {
|
|
78
80
|
const query = this.neo4j.initQuery({
|
|
79
|
-
serialiser:
|
|
81
|
+
serialiser: (0, content_1.getContentModel)(),
|
|
80
82
|
cursor: params.cursor,
|
|
81
83
|
fetchAll: params.fetchAll,
|
|
82
84
|
});
|
|
@@ -88,7 +90,7 @@ let ContentRepository = class ContentRepository {
|
|
|
88
90
|
query.query += `
|
|
89
91
|
${this.contentCypherService.default()}
|
|
90
92
|
${this.securityService.userHasAccess({ validator: this.contentCypherService.userHasAccess })}
|
|
91
|
-
|
|
93
|
+
${this.contentCypherService.ownerMatch({ target: `:${user_meta_1.ownerMeta.labelName} {id: $ownerId}` })}
|
|
92
94
|
|
|
93
95
|
ORDER BY ${content_meta_1.contentMeta.nodeName}.${params.orderBy ? `${params.orderBy}` : `updatedAt DESC`}
|
|
94
96
|
{CURSOR}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.repository.js","sourceRoot":"","sources":["../../../../src/foundations/content/repositories/content.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"content.repository.js","sourceRoot":"","sources":["../../../../src/foundations/content/repositories/content.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAA+C;AAG/C,8EAA0E;AAC1E,uFAAmF;AACnF,4D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AAI,CAAC,oBAAoB,CAAC,OAAO,EAAE;QACnC,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,oBAAoB,CAAC,aAAa,EAAE,CAAC;QAC1F,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,IAAI,qBAAS,CAAC,SAAS,iBAAiB,EAAE,CAAC;;iBAEjF,0BAAW,CAAC,QAAQ,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,gBAAgB;;;QAGxF,IAAI,CAAC,oBAAoB,CAAC,eAAe,EAAE;KAC9C,CAAC;QAEF,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;CACF,CAAA;AA7FY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAGe,4BAAY;QACG,6CAAoB;QACzB,kCAAe;QACjB,sBAAa;GALpC,iBAAiB,CA6F7B"}
|
|
@@ -8,10 +8,29 @@ export declare class ContentCypherService {
|
|
|
8
8
|
private readonly extension?;
|
|
9
9
|
constructor(clsService: ClsService, configService: ConfigService<BaseConfigInterface>, extension?: ContentExtensionConfig);
|
|
10
10
|
private getContentTypes;
|
|
11
|
+
/** Whether the `author` relationship is matched and returned (default: yes). */
|
|
12
|
+
private get serialiseAuthor();
|
|
11
13
|
default(params?: {
|
|
12
14
|
searchField: string;
|
|
13
15
|
blockCompanyAndUser?: boolean;
|
|
14
16
|
}): string;
|
|
17
|
+
/**
|
|
18
|
+
* The `requireTldr` filter as trailing `AND` predicates, for callers that
|
|
19
|
+
* already opened a WHERE clause of their own (e.g. `ContentRepository.findByIds`).
|
|
20
|
+
* Returns an empty string when the filter is disabled (the default).
|
|
21
|
+
*/
|
|
22
|
+
tldrFilter(): string;
|
|
23
|
+
/**
|
|
24
|
+
* The Content → owner MATCH clause, driven by `ownerMatchPattern`.
|
|
25
|
+
*
|
|
26
|
+
* Default: `MATCH (content)<-[:PUBLISHED]-(<target>)`.
|
|
27
|
+
*
|
|
28
|
+
* @param params.target - The pattern's node body, e.g. `"content_owner:User"`
|
|
29
|
+
* (bind an alias) or `":User {id: $ownerId}"` (filter without binding).
|
|
30
|
+
*/
|
|
31
|
+
ownerMatch(params: {
|
|
32
|
+
target: string;
|
|
33
|
+
}): string;
|
|
15
34
|
userHasAccess: (params?: {
|
|
16
35
|
useTotalScore?: boolean;
|
|
17
36
|
}) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.cypher.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/content/services/content.cypher.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAA+B,MAAM,4BAA4B,CAAC;AAI9F,OAAO,EAAE,sBAAsB,EAA4B,MAAM,2CAA2C,CAAC;AAE7G,qBACa,oBAAoB;IAE7B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAG9B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAJV,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAGjD,SAAS,CAAC,EAAE,sBAAsB;IAGrD,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,MAAM,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,mBAAmB,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"content.cypher.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/content/services/content.cypher.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAA+B,MAAM,4BAA4B,CAAC;AAI9F,OAAO,EAAE,sBAAsB,EAA4B,MAAM,2CAA2C,CAAC;AAE7G,qBACa,oBAAoB;IAE7B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAG9B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAJV,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAGjD,SAAS,CAAC,EAAE,sBAAsB;IAGrD,OAAO,CAAC,eAAe;IAKvB,gFAAgF;IAChF,OAAO,KAAK,eAAe,GAE1B;IAED,OAAO,CAAC,MAAM,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,mBAAmB,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,MAAM;IAiBhF;;;;OAIG;IACH,UAAU,IAAI,MAAM;IAQpB;;;;;;;OAOG;IACH,UAAU,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;IAU9C,aAAa,GAAI,SAAS;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,KAAG,MAAM,CAO5D;IAEF,eAAe,GAAI,SAAS;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,YA0ErD;CACH"}
|
|
@@ -36,8 +36,16 @@ let ContentCypherService = class ContentCypherService {
|
|
|
36
36
|
// Base MATCH clauses for core relationships
|
|
37
37
|
let query = `
|
|
38
38
|
MATCH (${content_meta_1.contentMeta.nodeName})-[:BELONGS_TO]->(${content_meta_1.contentMeta.nodeName}_${company_meta_1.companyMeta.nodeName}:${company_meta_1.companyMeta.labelName})
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
${this.ownerMatch({ target: `${content_meta_1.contentMeta.nodeName}_${user_meta_1.ownerMeta.nodeName}:${user_meta_1.ownerMeta.labelName}` })}`;
|
|
40
|
+
// The author match is OPTIONAL: it traverses the SAME `PUBLISHED` edge as
|
|
41
|
+
// the owner match above, so on package data every row surviving the owner
|
|
42
|
+
// match already resolves it — the row set is unchanged by default. Making
|
|
43
|
+
// it optional stops it from silently dropping every row for apps whose
|
|
44
|
+
// owner edge is not `PUBLISHED` (see `ownerMatchPattern`).
|
|
45
|
+
if (this.serialiseAuthor) {
|
|
46
|
+
query += `
|
|
47
|
+
OPTIONAL MATCH (${content_meta_1.contentMeta.nodeName})<-[:PUBLISHED]-(${content_meta_1.contentMeta.nodeName}_${user_meta_1.authorMeta.nodeName}:${user_meta_1.authorMeta.labelName})`;
|
|
48
|
+
}
|
|
41
49
|
// Add OPTIONAL MATCH for extension relationships
|
|
42
50
|
if (this.extension?.additionalRelationships) {
|
|
43
51
|
for (const rel of this.extension.additionalRelationships) {
|
|
@@ -51,12 +59,22 @@ let ContentCypherService = class ContentCypherService {
|
|
|
51
59
|
OPTIONAL MATCH ${relPattern}`;
|
|
52
60
|
}
|
|
53
61
|
}
|
|
62
|
+
// Add the config-driven meta-field clauses (appended verbatim)
|
|
63
|
+
if (this.extension?.metaFields) {
|
|
64
|
+
for (const metaField of this.extension.metaFields) {
|
|
65
|
+
query += `
|
|
66
|
+
${metaField.optionalMatch}`;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
54
69
|
// Base RETURN clause
|
|
55
70
|
query += `
|
|
56
71
|
RETURN ${content_meta_1.contentMeta.nodeName},
|
|
57
72
|
${content_meta_1.contentMeta.nodeName}_${company_meta_1.companyMeta.nodeName},
|
|
58
|
-
${content_meta_1.contentMeta.nodeName}_${user_meta_1.ownerMeta.nodeName}
|
|
73
|
+
${content_meta_1.contentMeta.nodeName}_${user_meta_1.ownerMeta.nodeName}`;
|
|
74
|
+
if (this.serialiseAuthor) {
|
|
75
|
+
query += `,
|
|
59
76
|
${content_meta_1.contentMeta.nodeName}_${user_meta_1.authorMeta.nodeName}`;
|
|
77
|
+
}
|
|
60
78
|
// Add extension relationship nodes to RETURN
|
|
61
79
|
if (this.extension?.additionalRelationships) {
|
|
62
80
|
for (const rel of this.extension.additionalRelationships) {
|
|
@@ -64,6 +82,13 @@ let ContentCypherService = class ContentCypherService {
|
|
|
64
82
|
${content_meta_1.contentMeta.nodeName}_${rel.model.nodeName}`;
|
|
65
83
|
}
|
|
66
84
|
}
|
|
85
|
+
// Add the config-driven meta-field projections
|
|
86
|
+
if (this.extension?.metaFields) {
|
|
87
|
+
for (const metaField of this.extension.metaFields) {
|
|
88
|
+
query += `,
|
|
89
|
+
${metaField.returnAlias} AS ${metaField.key}`;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
67
92
|
// Add optional totalScore
|
|
68
93
|
if (params?.useTotalScore) {
|
|
69
94
|
query += `,
|
|
@@ -76,16 +101,52 @@ let ContentCypherService = class ContentCypherService {
|
|
|
76
101
|
const types = this.configService.get("contentTypes")?.types ?? [];
|
|
77
102
|
return types.length > 0 ? types : [content_meta_1.contentMeta.labelName];
|
|
78
103
|
}
|
|
104
|
+
/** Whether the `author` relationship is matched and returned (default: yes). */
|
|
105
|
+
get serialiseAuthor() {
|
|
106
|
+
return this.extension?.serialiseAuthor !== false;
|
|
107
|
+
}
|
|
79
108
|
default(params) {
|
|
80
109
|
return `
|
|
81
110
|
MATCH (${content_meta_1.contentMeta.nodeName}:${this.getContentTypes().join("|")} ${params ? ` {${params.searchField}: $searchValue}` : ``})
|
|
82
|
-
WHERE $
|
|
111
|
+
WHERE ${this.extension?.requireTldr
|
|
112
|
+
? `${content_meta_1.contentMeta.nodeName}.tldr IS NOT NULL
|
|
113
|
+
AND ${content_meta_1.contentMeta.nodeName}.tldr <> ""
|
|
114
|
+
AND `
|
|
115
|
+
: ``}$companyId IS NULL
|
|
83
116
|
OR EXISTS {
|
|
84
117
|
MATCH (${content_meta_1.contentMeta.nodeName})-[:BELONGS_TO]-(company)
|
|
85
118
|
}
|
|
86
119
|
WITH ${content_meta_1.contentMeta.nodeName}${params?.blockCompanyAndUser ? `` : `, company, currentUser`}
|
|
87
120
|
`;
|
|
88
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* The `requireTldr` filter as trailing `AND` predicates, for callers that
|
|
124
|
+
* already opened a WHERE clause of their own (e.g. `ContentRepository.findByIds`).
|
|
125
|
+
* Returns an empty string when the filter is disabled (the default).
|
|
126
|
+
*/
|
|
127
|
+
tldrFilter() {
|
|
128
|
+
if (!this.extension?.requireTldr)
|
|
129
|
+
return ``;
|
|
130
|
+
return `
|
|
131
|
+
AND ${content_meta_1.contentMeta.nodeName}.tldr IS NOT NULL
|
|
132
|
+
AND ${content_meta_1.contentMeta.nodeName}.tldr <> ""`;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* The Content → owner MATCH clause, driven by `ownerMatchPattern`.
|
|
136
|
+
*
|
|
137
|
+
* Default: `MATCH (content)<-[:PUBLISHED]-(<target>)`.
|
|
138
|
+
*
|
|
139
|
+
* @param params.target - The pattern's node body, e.g. `"content_owner:User"`
|
|
140
|
+
* (bind an alias) or `":User {id: $ownerId}"` (filter without binding).
|
|
141
|
+
*/
|
|
142
|
+
ownerMatch(params) {
|
|
143
|
+
const pattern = this.extension?.ownerMatchPattern;
|
|
144
|
+
const relationships = pattern?.relationships?.length ? pattern.relationships : ["PUBLISHED"];
|
|
145
|
+
const relationshipTypes = relationships.join("|");
|
|
146
|
+
return pattern?.undirected
|
|
147
|
+
? `MATCH (${content_meta_1.contentMeta.nodeName})-[:${relationshipTypes}]-(${params.target})`
|
|
148
|
+
: `MATCH (${content_meta_1.contentMeta.nodeName})<-[:${relationshipTypes}]-(${params.target})`;
|
|
149
|
+
}
|
|
89
150
|
};
|
|
90
151
|
exports.ContentCypherService = ContentCypherService;
|
|
91
152
|
exports.ContentCypherService = ContentCypherService = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.cypher.service.js","sourceRoot":"","sources":["../../../../src/foundations/content/services/content.cypher.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA8D;AAC9D,2CAA+C;AAC/C,2CAAwC;AAExC,sEAAkE;AAClE,sEAAkE;AAClE,6DAAsE;AACtE,2FAA6G;AAGtG,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,UAAsB,EACtB,aAAiD,EAGlE,SAAmD;QAJlC,eAAU,GAAV,UAAU,CAAY;QACtB,kBAAa,GAAb,aAAa,CAAoC;QAGjD,cAAS,GAAT,SAAS,CAAyB;
|
|
1
|
+
{"version":3,"file":"content.cypher.service.js","sourceRoot":"","sources":["../../../../src/foundations/content/services/content.cypher.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA8D;AAC9D,2CAA+C;AAC/C,2CAAwC;AAExC,sEAAkE;AAClE,sEAAkE;AAClE,6DAAsE;AACtE,2FAA6G;AAGtG,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,UAAsB,EACtB,aAAiD,EAGlE,SAAmD;QAJlC,eAAU,GAAV,UAAU,CAAY;QACtB,kBAAa,GAAb,aAAa,CAAoC;QAGjD,cAAS,GAAT,SAAS,CAAyB;QA6DrD,kBAAa,GAAG,CAAC,MAAoC,EAAU,EAAE;YAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YACnD,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAE7C,OAAO;aACE,0BAAW,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,KAAK,0BAAW,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;KACzJ,CAAC;QACJ,CAAC,CAAC;QAEF,o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AC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;QAC7F,MAAM,iBAAiB,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAElD,OAAO,OAAO,EAAE,UAAU;YACxB,CAAC,CAAC,UAAU,0BAAW,CAAC,QAAQ,OAAO,iBAAiB,MAAM,MAAM,CAAC,MAAM,GAAG;YAC9E,CAAC,CAAC,UAAU,0BAAW,CAAC,QAAQ,QAAQ,iBAAiB,MAAM,MAAM,CAAC,MAAM,GAAG,CAAC;IACpF,CAAC;CAsFF,CAAA;AAvJY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,iBAAQ,GAAE,CAAA;IACV,WAAA,IAAA,eAAM,EAAC,sDAAwB,CAAC,CAAA;qCAHJ,uBAAU;QACP,sBAAa;GAHpC,oBAAoB,CAuJhC"}
|
|
@@ -13,7 +13,7 @@ exports.ContentService = void 0;
|
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const jsonapi_paginator_1 = require("../../../core/jsonapi/serialisers/jsonapi.paginator");
|
|
15
15
|
const jsonapi_service_1 = require("../../../core/jsonapi/services/jsonapi.service");
|
|
16
|
-
const
|
|
16
|
+
const content_1 = require("../../content/entities/content");
|
|
17
17
|
const content_repository_1 = require("../../content/repositories/content.repository");
|
|
18
18
|
let ContentService = class ContentService {
|
|
19
19
|
constructor(builder, contentRepository) {
|
|
@@ -22,7 +22,7 @@ let ContentService = class ContentService {
|
|
|
22
22
|
}
|
|
23
23
|
async find(params) {
|
|
24
24
|
const paginator = new jsonapi_paginator_1.JsonApiPaginator(params.query);
|
|
25
|
-
return this.builder.buildList(
|
|
25
|
+
return this.builder.buildList((0, content_1.getContentModel)(), await this.contentRepository.find({
|
|
26
26
|
fetchAll: params.fetchAll,
|
|
27
27
|
term: params.term,
|
|
28
28
|
orderBy: params.orderBy,
|
|
@@ -30,13 +30,13 @@ let ContentService = class ContentService {
|
|
|
30
30
|
}), paginator);
|
|
31
31
|
}
|
|
32
32
|
async findByIds(params) {
|
|
33
|
-
return this.builder.buildList(
|
|
33
|
+
return this.builder.buildList((0, content_1.getContentModel)(), await this.contentRepository.findByIds({
|
|
34
34
|
contentIds: params.contentIds,
|
|
35
35
|
}));
|
|
36
36
|
}
|
|
37
37
|
async findByOwner(params) {
|
|
38
38
|
const paginator = new jsonapi_paginator_1.JsonApiPaginator(params.query);
|
|
39
|
-
return this.builder.buildList(
|
|
39
|
+
return this.builder.buildList((0, content_1.getContentModel)(), await this.contentRepository.findByOwner({
|
|
40
40
|
ownerId: params.ownerId,
|
|
41
41
|
fetchAll: params.fetchAll,
|
|
42
42
|
term: params.term,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.service.js","sourceRoot":"","sources":["../../../../src/foundations/content/services/content.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,2FAAuF;AACvF,oFAAgF;AAChF,
|
|
1
|
+
{"version":3,"file":"content.service.js","sourceRoot":"","sources":["../../../../src/foundations/content/services/content.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,2FAAuF;AACvF,oFAAgF;AAChF,4DAAiE;AACjE,sFAAkF;AAG3E,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YACmB,OAAuB,EACvB,iBAAoC;QADpC,YAAO,GAAP,OAAO,CAAgB;QACvB,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,IAAI,CAAC,MAKV;QACC,MAAM,SAAS,GAAqB,IAAI,oCAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAEvE,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAC3B,IAAA,yBAAe,GAAE,EACjB,MAAM,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC;YAChC,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,MAAM,EAAE,SAAS,CAAC,cAAc,EAAE;SACnC,CAAC,EACF,SAAS,CACV,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,MAAgC;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAC3B,IAAA,yBAAe,GAAE,EACjB,MAAM,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC;YACrC,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B,CAAC,CACH,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,MAA4F;QAC5G,MAAM,SAAS,GAAqB,IAAI,oCAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAEvE,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAC3B,IAAA,yBAAe,GAAE,EACjB,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC;YACvC,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,MAAM,EAAE,SAAS,CAAC,cAAc,EAAE;SACnC,CAAC,EACF,SAAS,CACV,CAAC;IACJ,CAAC;CACF,CAAA;AAlDY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAGiB,gCAAc;QACJ,sCAAiB;GAH5C,cAAc,CAkD1B"}
|
|
@@ -27,11 +27,11 @@ let DiscordUserService = class DiscordUserService {
|
|
|
27
27
|
async create(params) {
|
|
28
28
|
this.clsService.set("companyId", params.companyId);
|
|
29
29
|
this.clsService.set("userId", params.userId);
|
|
30
|
-
await this.companyRepository.
|
|
30
|
+
await this.companyRepository.createCompanyNode({
|
|
31
31
|
companyId: params.companyId,
|
|
32
32
|
name: `${params.userDetails.username}`,
|
|
33
33
|
});
|
|
34
|
-
await this.userRepository.
|
|
34
|
+
await this.userRepository.createUser({
|
|
35
35
|
userId: params.userId,
|
|
36
36
|
email: params.userDetails.email ?? params.userDetails.id,
|
|
37
37
|
name: params.userDetails.username,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discord-user.service.js","sourceRoot":"","sources":["../../../../src/foundations/discord-user/services/discord-user.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mCAAoC;AACpC,2CAAwC;AACxC,4CAAyC;AACzC,2CAAkD;AAClD,qCAA4C;AAC5C,qFAAgF;AAIzE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YACmB,qBAA4C,EAC5C,cAA8B,EAC9B,iBAAoC,EACpC,UAAsB;QAHtB,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,mBAAc,GAAd,cAAc,CAAgB;QAC9B,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,MAOZ;QACC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;QACnD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QAE7C,MAAM,IAAI,CAAC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"discord-user.service.js","sourceRoot":"","sources":["../../../../src/foundations/discord-user/services/discord-user.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mCAAoC;AACpC,2CAAwC;AACxC,4CAAyC;AACzC,2CAAkD;AAClD,qCAA4C;AAC5C,qFAAgF;AAIzE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YACmB,qBAA4C,EAC5C,cAA8B,EAC9B,iBAAoC,EACpC,UAAsB;QAHtB,0BAAq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AE,MAAM,CAAC,WAAW,CAAC,QAAQ;YACjC,IAAI,EAAE,MAAM,CAAC,MAAM;SACpB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA7CY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;qCAG+B,+CAAqB;QAC5B,qBAAc;QACX,2BAAiB;QACxB,uBAAU;GAL9B,kBAAkB,CA6C9B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Entity } from "../../../common/abstracts/entity";
|
|
2
|
+
import { Module } from "../../module/entities/module.entity";
|
|
3
|
+
/**
|
|
4
|
+
* Feature Entity Type
|
|
5
|
+
*/
|
|
6
|
+
export type Feature = Entity & {
|
|
7
|
+
name: string;
|
|
8
|
+
isCore: boolean;
|
|
9
|
+
module: Module[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Feature Entity Descriptor
|
|
13
|
+
*
|
|
14
|
+
* Single source of truth for the Feature entity configuration.
|
|
15
|
+
* Generates mapper, childrenTokens, and DataModelInterface automatically.
|
|
16
|
+
*/
|
|
17
|
+
export declare const FeatureDescriptor: import("../../..").EntityDescriptor<Feature, {
|
|
18
|
+
module: {
|
|
19
|
+
model: import("../../..").DataMeta;
|
|
20
|
+
direction: "in";
|
|
21
|
+
relationship: string;
|
|
22
|
+
cardinality: "many";
|
|
23
|
+
dtoKey: string;
|
|
24
|
+
description: string;
|
|
25
|
+
reverse: {
|
|
26
|
+
name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}>;
|
|
31
|
+
export type FeatureDescriptorType = typeof FeatureDescriptor;
|
|
32
|
+
//# sourceMappingURL=feature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../../src/foundations/feature/entities/feature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE1D,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAI7D;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAEhB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;EAyD5B,CAAC;AAGH,MAAM,MAAM,qBAAqB,GAAG,OAAO,iBAAiB,CAAC"}
|