@monorise/core 1.0.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/configs/service.config.ts +14 -0
- package/constants/table.ts +3 -0
- package/controllers/entity/create-entity.controller.ts +51 -0
- package/controllers/entity/delete-entity.controller.ts +35 -0
- package/controllers/entity/entity.http +62 -0
- package/controllers/entity/get-entity.controller.ts +33 -0
- package/controllers/entity/list-entities.controller.ts +69 -0
- package/controllers/entity/update-entity.controller.ts +56 -0
- package/controllers/entity/upsert-entity.controller.ts +97 -0
- package/controllers/mutual/create-mutual.controller.ts +89 -0
- package/controllers/mutual/delete-mutual.controller.ts +40 -0
- package/controllers/mutual/get-mutual.controller.ts +38 -0
- package/controllers/mutual/list-entities-by-entity.controller.ts +76 -0
- package/controllers/mutual/mutual.http +88 -0
- package/controllers/mutual/update-mutual.controller.ts +50 -0
- package/controllers/setupRoutes.ts +73 -0
- package/controllers/tag/list-tags.controller.ts +57 -0
- package/data/DbUtils.ts +40 -0
- package/data/Entity.ts +499 -0
- package/data/EventUtils.ts +47 -0
- package/data/FileObject.ts +16 -0
- package/data/Mutual.ts +779 -0
- package/data/ProjectionExpression.ts +8 -0
- package/data/Tag.ts +470 -0
- package/data/abstract/Item.base.ts +19 -0
- package/data/abstract/Repository.base.ts +92 -0
- package/dist/configs/service.config.d.ts +5 -0
- package/dist/configs/service.config.d.ts.map +1 -0
- package/dist/configs/service.config.js +5 -0
- package/dist/configs/service.config.js.map +1 -0
- package/dist/constants/table.d.ts +4 -0
- package/dist/constants/table.d.ts.map +1 -0
- package/dist/constants/table.js +4 -0
- package/dist/constants/table.js.map +1 -0
- package/dist/controllers/entity/create-entity.controller.d.ts +8 -0
- package/dist/controllers/entity/create-entity.controller.d.ts.map +1 -0
- package/dist/controllers/entity/create-entity.controller.js +44 -0
- package/dist/controllers/entity/create-entity.controller.js.map +1 -0
- package/dist/controllers/entity/delete-entity.controller.d.ts +8 -0
- package/dist/controllers/entity/delete-entity.controller.d.ts.map +1 -0
- package/dist/controllers/entity/delete-entity.controller.js +29 -0
- package/dist/controllers/entity/delete-entity.controller.js.map +1 -0
- package/dist/controllers/entity/get-entity.controller.d.ts +8 -0
- package/dist/controllers/entity/get-entity.controller.d.ts.map +1 -0
- package/dist/controllers/entity/get-entity.controller.js +24 -0
- package/dist/controllers/entity/get-entity.controller.js.map +1 -0
- package/dist/controllers/entity/list-entities.controller.d.ts +8 -0
- package/dist/controllers/entity/list-entities.controller.d.ts.map +1 -0
- package/dist/controllers/entity/list-entities.controller.js +56 -0
- package/dist/controllers/entity/list-entities.controller.js.map +1 -0
- package/dist/controllers/entity/update-entity.controller.d.ts +8 -0
- package/dist/controllers/entity/update-entity.controller.d.ts.map +1 -0
- package/dist/controllers/entity/update-entity.controller.js +45 -0
- package/dist/controllers/entity/update-entity.controller.js.map +1 -0
- package/dist/controllers/entity/upsert-entity.controller.d.ts +10 -0
- package/dist/controllers/entity/upsert-entity.controller.d.ts.map +1 -0
- package/dist/controllers/entity/upsert-entity.controller.js +73 -0
- package/dist/controllers/entity/upsert-entity.controller.js.map +1 -0
- package/dist/controllers/mutual/create-mutual.controller.d.ts +10 -0
- package/dist/controllers/mutual/create-mutual.controller.d.ts.map +1 -0
- package/dist/controllers/mutual/create-mutual.controller.js +70 -0
- package/dist/controllers/mutual/create-mutual.controller.js.map +1 -0
- package/dist/controllers/mutual/delete-mutual.controller.d.ts +8 -0
- package/dist/controllers/mutual/delete-mutual.controller.d.ts.map +1 -0
- package/dist/controllers/mutual/delete-mutual.controller.js +31 -0
- package/dist/controllers/mutual/delete-mutual.controller.js.map +1 -0
- package/dist/controllers/mutual/get-mutual.controller.d.ts +8 -0
- package/dist/controllers/mutual/get-mutual.controller.d.ts.map +1 -0
- package/dist/controllers/mutual/get-mutual.controller.js +24 -0
- package/dist/controllers/mutual/get-mutual.controller.js.map +1 -0
- package/dist/controllers/mutual/list-entities-by-entity.controller.d.ts +8 -0
- package/dist/controllers/mutual/list-entities-by-entity.controller.d.ts.map +1 -0
- package/dist/controllers/mutual/list-entities-by-entity.controller.js +56 -0
- package/dist/controllers/mutual/list-entities-by-entity.controller.js.map +1 -0
- package/dist/controllers/mutual/update-mutual.controller.d.ts +8 -0
- package/dist/controllers/mutual/update-mutual.controller.d.ts.map +1 -0
- package/dist/controllers/mutual/update-mutual.controller.js +40 -0
- package/dist/controllers/mutual/update-mutual.controller.js.map +1 -0
- package/dist/controllers/setupRoutes.d.ts +4 -0
- package/dist/controllers/setupRoutes.d.ts.map +1 -0
- package/dist/controllers/setupRoutes.js +31 -0
- package/dist/controllers/setupRoutes.js.map +1 -0
- package/dist/controllers/tag/list-tags.controller.d.ts +8 -0
- package/dist/controllers/tag/list-tags.controller.d.ts.map +1 -0
- package/dist/controllers/tag/list-tags.controller.js +48 -0
- package/dist/controllers/tag/list-tags.controller.js.map +1 -0
- package/dist/data/DbUtils.d.ts +7 -0
- package/dist/data/DbUtils.d.ts.map +1 -0
- package/dist/data/DbUtils.js +23 -0
- package/dist/data/DbUtils.js.map +1 -0
- package/dist/data/Entity.d.ts +71 -0
- package/dist/data/Entity.d.ts.map +1 -0
- package/dist/data/Entity.js +358 -0
- package/dist/data/Entity.js.map +1 -0
- package/dist/data/EventUtils.d.ts +14 -0
- package/dist/data/EventUtils.d.ts.map +1 -0
- package/dist/data/EventUtils.js +34 -0
- package/dist/data/EventUtils.js.map +1 -0
- package/dist/data/FileObject.d.ts +62 -0
- package/dist/data/FileObject.d.ts.map +1 -0
- package/dist/data/FileObject.js +13 -0
- package/dist/data/FileObject.js.map +1 -0
- package/dist/data/Mutual.d.ts +94 -0
- package/dist/data/Mutual.d.ts.map +1 -0
- package/dist/data/Mutual.js +492 -0
- package/dist/data/Mutual.js.map +1 -0
- package/dist/data/ProjectionExpression.d.ts +6 -0
- package/dist/data/ProjectionExpression.d.ts.map +1 -0
- package/dist/data/ProjectionExpression.js +5 -0
- package/dist/data/ProjectionExpression.js.map +1 -0
- package/dist/data/Tag.d.ts +77 -0
- package/dist/data/Tag.d.ts.map +1 -0
- package/dist/data/Tag.js +330 -0
- package/dist/data/Tag.js.map +1 -0
- package/dist/data/abstract/Item.base.d.ts +11 -0
- package/dist/data/abstract/Item.base.d.ts.map +1 -0
- package/dist/data/abstract/Item.base.js +9 -0
- package/dist/data/abstract/Item.base.js.map +1 -0
- package/dist/data/abstract/Repository.base.d.ts +11 -0
- package/dist/data/abstract/Repository.base.d.ts.map +1 -0
- package/dist/data/abstract/Repository.base.js +54 -0
- package/dist/data/abstract/Repository.base.js.map +1 -0
- package/dist/errors/api-error.d.ts +23 -0
- package/dist/errors/api-error.d.ts.map +1 -0
- package/dist/errors/api-error.js +26 -0
- package/dist/errors/api-error.js.map +1 -0
- package/dist/errors/extendable-error.d.ts +18 -0
- package/dist/errors/extendable-error.d.ts.map +1 -0
- package/dist/errors/extendable-error.js +22 -0
- package/dist/errors/extendable-error.js.map +1 -0
- package/dist/errors/standard-error.d.ts +11 -0
- package/dist/errors/standard-error.d.ts.map +1 -0
- package/dist/errors/standard-error.js +21 -0
- package/dist/errors/standard-error.js.map +1 -0
- package/dist/helpers/dependencies.d.ts +8 -0
- package/dist/helpers/dependencies.d.ts.map +1 -0
- package/dist/helpers/dependencies.js +10 -0
- package/dist/helpers/dependencies.js.map +1 -0
- package/dist/helpers/event.d.ts +22 -0
- package/dist/helpers/event.d.ts.map +1 -0
- package/dist/helpers/event.js +47 -0
- package/dist/helpers/event.js.map +1 -0
- package/dist/helpers/fromLastKeyQuery.d.ts +3 -0
- package/dist/helpers/fromLastKeyQuery.d.ts.map +1 -0
- package/dist/helpers/fromLastKeyQuery.js +7 -0
- package/dist/helpers/fromLastKeyQuery.js.map +1 -0
- package/dist/helpers/sleep.d.ts +2 -0
- package/dist/helpers/sleep.d.ts.map +1 -0
- package/dist/helpers/sleep.js +2 -0
- package/dist/helpers/sleep.js.map +1 -0
- package/dist/helpers/toLastKeyResponse.d.ts +3 -0
- package/dist/helpers/toLastKeyResponse.d.ts.map +1 -0
- package/dist/helpers/toLastKeyResponse.js +7 -0
- package/dist/helpers/toLastKeyResponse.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/middlewares/entity-type-check.d.ts +3 -0
- package/dist/middlewares/entity-type-check.d.ts.map +1 -0
- package/dist/middlewares/entity-type-check.js +12 -0
- package/dist/middlewares/entity-type-check.js.map +1 -0
- package/dist/middlewares/mutual-type-check.d.ts +3 -0
- package/dist/middlewares/mutual-type-check.d.ts.map +1 -0
- package/dist/middlewares/mutual-type-check.js +13 -0
- package/dist/middlewares/mutual-type-check.js.map +1 -0
- package/dist/mock/container.d.ts +3 -0
- package/dist/mock/container.d.ts.map +1 -0
- package/dist/mock/container.js +3 -0
- package/dist/mock/container.js.map +1 -0
- package/dist/mock/entity.d.ts +13 -0
- package/dist/mock/entity.d.ts.map +1 -0
- package/dist/mock/entity.js +14 -0
- package/dist/mock/entity.js.map +1 -0
- package/dist/mock/monorise/admin.d.ts +127 -0
- package/dist/mock/monorise/admin.d.ts.map +1 -0
- package/dist/mock/monorise/admin.js +29 -0
- package/dist/mock/monorise/admin.js.map +1 -0
- package/dist/mock/monorise/chapter.d.ts +457 -0
- package/dist/mock/monorise/chapter.d.ts.map +1 -0
- package/dist/mock/monorise/chapter.js +81 -0
- package/dist/mock/monorise/chapter.js.map +1 -0
- package/dist/mock/monorise/course.d.ts +311 -0
- package/dist/mock/monorise/course.d.ts.map +1 -0
- package/dist/mock/monorise/course.js +128 -0
- package/dist/mock/monorise/course.js.map +1 -0
- package/dist/mock/monorise/index.d.ts +3599 -0
- package/dist/mock/monorise/index.d.ts.map +1 -0
- package/dist/mock/monorise/index.js +62 -0
- package/dist/mock/monorise/index.js.map +1 -0
- package/dist/mock/monorise/learner.d.ts +390 -0
- package/dist/mock/monorise/learner.d.ts.map +1 -0
- package/dist/mock/monorise/learner.js +59 -0
- package/dist/mock/monorise/learner.js.map +1 -0
- package/dist/mock/monorise/learning-activity.d.ts +266 -0
- package/dist/mock/monorise/learning-activity.d.ts.map +1 -0
- package/dist/mock/monorise/learning-activity.js +50 -0
- package/dist/mock/monorise/learning-activity.js.map +1 -0
- package/dist/mock/monorise/learning-journey-config.d.ts +84 -0
- package/dist/mock/monorise/learning-journey-config.d.ts.map +1 -0
- package/dist/mock/monorise/learning-journey-config.js +27 -0
- package/dist/mock/monorise/learning-journey-config.js.map +1 -0
- package/dist/mock/monorise/module.d.ts +211 -0
- package/dist/mock/monorise/module.d.ts.map +1 -0
- package/dist/mock/monorise/module.js +91 -0
- package/dist/mock/monorise/module.js.map +1 -0
- package/dist/mock/monorise/organization.d.ts +346 -0
- package/dist/mock/monorise/organization.d.ts.map +1 -0
- package/dist/mock/monorise/organization.js +54 -0
- package/dist/mock/monorise/organization.js.map +1 -0
- package/dist/mock/monorise/reference.d.ts +171 -0
- package/dist/mock/monorise/reference.d.ts.map +1 -0
- package/dist/mock/monorise/reference.js +25 -0
- package/dist/mock/monorise/reference.js.map +1 -0
- package/dist/mock/monorise/video.d.ts +346 -0
- package/dist/mock/monorise/video.d.ts.map +1 -0
- package/dist/mock/monorise/video.js +33 -0
- package/dist/mock/monorise/video.js.map +1 -0
- package/dist/packages/core/configs/service.config.d.ts +5 -0
- package/dist/packages/core/configs/service.config.d.ts.map +1 -0
- package/dist/packages/core/configs/service.config.js +5 -0
- package/dist/packages/core/configs/service.config.js.map +1 -0
- package/dist/packages/core/constants/table.d.ts +4 -0
- package/dist/packages/core/constants/table.d.ts.map +1 -0
- package/dist/packages/core/constants/table.js +4 -0
- package/dist/packages/core/constants/table.js.map +1 -0
- package/dist/packages/core/controllers/entity/create-entity.controller.d.ts +8 -0
- package/dist/packages/core/controllers/entity/create-entity.controller.d.ts.map +1 -0
- package/dist/packages/core/controllers/entity/create-entity.controller.js +44 -0
- package/dist/packages/core/controllers/entity/create-entity.controller.js.map +1 -0
- package/dist/packages/core/controllers/entity/delete-entity.controller.d.ts +8 -0
- package/dist/packages/core/controllers/entity/delete-entity.controller.d.ts.map +1 -0
- package/dist/packages/core/controllers/entity/delete-entity.controller.js +29 -0
- package/dist/packages/core/controllers/entity/delete-entity.controller.js.map +1 -0
- package/dist/packages/core/controllers/entity/get-entity.controller.d.ts +8 -0
- package/dist/packages/core/controllers/entity/get-entity.controller.d.ts.map +1 -0
- package/dist/packages/core/controllers/entity/get-entity.controller.js +24 -0
- package/dist/packages/core/controllers/entity/get-entity.controller.js.map +1 -0
- package/dist/packages/core/controllers/entity/list-entities.controller.d.ts +8 -0
- package/dist/packages/core/controllers/entity/list-entities.controller.d.ts.map +1 -0
- package/dist/packages/core/controllers/entity/list-entities.controller.js +56 -0
- package/dist/packages/core/controllers/entity/list-entities.controller.js.map +1 -0
- package/dist/packages/core/controllers/entity/update-entity.controller.d.ts +8 -0
- package/dist/packages/core/controllers/entity/update-entity.controller.d.ts.map +1 -0
- package/dist/packages/core/controllers/entity/update-entity.controller.js +45 -0
- package/dist/packages/core/controllers/entity/update-entity.controller.js.map +1 -0
- package/dist/packages/core/controllers/entity/upsert-entity.controller.d.ts +10 -0
- package/dist/packages/core/controllers/entity/upsert-entity.controller.d.ts.map +1 -0
- package/dist/packages/core/controllers/entity/upsert-entity.controller.js +73 -0
- package/dist/packages/core/controllers/entity/upsert-entity.controller.js.map +1 -0
- package/dist/packages/core/controllers/mutual/create-mutual.controller.d.ts +10 -0
- package/dist/packages/core/controllers/mutual/create-mutual.controller.d.ts.map +1 -0
- package/dist/packages/core/controllers/mutual/create-mutual.controller.js +70 -0
- package/dist/packages/core/controllers/mutual/create-mutual.controller.js.map +1 -0
- package/dist/packages/core/controllers/mutual/delete-mutual.controller.d.ts +8 -0
- package/dist/packages/core/controllers/mutual/delete-mutual.controller.d.ts.map +1 -0
- package/dist/packages/core/controllers/mutual/delete-mutual.controller.js +31 -0
- package/dist/packages/core/controllers/mutual/delete-mutual.controller.js.map +1 -0
- package/dist/packages/core/controllers/mutual/get-mutual.controller.d.ts +8 -0
- package/dist/packages/core/controllers/mutual/get-mutual.controller.d.ts.map +1 -0
- package/dist/packages/core/controllers/mutual/get-mutual.controller.js +24 -0
- package/dist/packages/core/controllers/mutual/get-mutual.controller.js.map +1 -0
- package/dist/packages/core/controllers/mutual/list-entities-by-entity.controller.d.ts +8 -0
- package/dist/packages/core/controllers/mutual/list-entities-by-entity.controller.d.ts.map +1 -0
- package/dist/packages/core/controllers/mutual/list-entities-by-entity.controller.js +56 -0
- package/dist/packages/core/controllers/mutual/list-entities-by-entity.controller.js.map +1 -0
- package/dist/packages/core/controllers/mutual/update-mutual.controller.d.ts +8 -0
- package/dist/packages/core/controllers/mutual/update-mutual.controller.d.ts.map +1 -0
- package/dist/packages/core/controllers/mutual/update-mutual.controller.js +40 -0
- package/dist/packages/core/controllers/mutual/update-mutual.controller.js.map +1 -0
- package/dist/packages/core/controllers/setupRoutes.d.ts +3 -0
- package/dist/packages/core/controllers/setupRoutes.d.ts.map +1 -0
- package/dist/packages/core/controllers/setupRoutes.js +33 -0
- package/dist/packages/core/controllers/setupRoutes.js.map +1 -0
- package/dist/packages/core/controllers/tag/list-tags.controller.d.ts +8 -0
- package/dist/packages/core/controllers/tag/list-tags.controller.d.ts.map +1 -0
- package/dist/packages/core/controllers/tag/list-tags.controller.js +48 -0
- package/dist/packages/core/controllers/tag/list-tags.controller.js.map +1 -0
- package/dist/packages/core/data/DbUtils.d.ts +7 -0
- package/dist/packages/core/data/DbUtils.d.ts.map +1 -0
- package/dist/packages/core/data/DbUtils.js +23 -0
- package/dist/packages/core/data/DbUtils.js.map +1 -0
- package/dist/packages/core/data/Entity.d.ts +71 -0
- package/dist/packages/core/data/Entity.d.ts.map +1 -0
- package/dist/packages/core/data/Entity.js +358 -0
- package/dist/packages/core/data/Entity.js.map +1 -0
- package/dist/packages/core/data/EventUtils.d.ts +14 -0
- package/dist/packages/core/data/EventUtils.d.ts.map +1 -0
- package/dist/packages/core/data/EventUtils.js +34 -0
- package/dist/packages/core/data/EventUtils.js.map +1 -0
- package/dist/packages/core/data/FileObject.d.ts +62 -0
- package/dist/packages/core/data/FileObject.d.ts.map +1 -0
- package/dist/packages/core/data/FileObject.js +13 -0
- package/dist/packages/core/data/FileObject.js.map +1 -0
- package/dist/packages/core/data/Mutual.d.ts +94 -0
- package/dist/packages/core/data/Mutual.d.ts.map +1 -0
- package/dist/packages/core/data/Mutual.js +492 -0
- package/dist/packages/core/data/Mutual.js.map +1 -0
- package/dist/packages/core/data/ProjectionExpression.d.ts +6 -0
- package/dist/packages/core/data/ProjectionExpression.d.ts.map +1 -0
- package/dist/packages/core/data/ProjectionExpression.js +5 -0
- package/dist/packages/core/data/ProjectionExpression.js.map +1 -0
- package/dist/packages/core/data/Tag.d.ts +77 -0
- package/dist/packages/core/data/Tag.d.ts.map +1 -0
- package/dist/packages/core/data/Tag.js +330 -0
- package/dist/packages/core/data/Tag.js.map +1 -0
- package/dist/packages/core/data/abstract/Item.base.d.ts +11 -0
- package/dist/packages/core/data/abstract/Item.base.d.ts.map +1 -0
- package/dist/packages/core/data/abstract/Item.base.js +9 -0
- package/dist/packages/core/data/abstract/Item.base.js.map +1 -0
- package/dist/packages/core/data/abstract/Repository.base.d.ts +11 -0
- package/dist/packages/core/data/abstract/Repository.base.d.ts.map +1 -0
- package/dist/packages/core/data/abstract/Repository.base.js +54 -0
- package/dist/packages/core/data/abstract/Repository.base.js.map +1 -0
- package/dist/packages/core/errors/api-error.d.ts +23 -0
- package/dist/packages/core/errors/api-error.d.ts.map +1 -0
- package/dist/packages/core/errors/api-error.js +26 -0
- package/dist/packages/core/errors/api-error.js.map +1 -0
- package/dist/packages/core/errors/extendable-error.d.ts +18 -0
- package/dist/packages/core/errors/extendable-error.d.ts.map +1 -0
- package/dist/packages/core/errors/extendable-error.js +22 -0
- package/dist/packages/core/errors/extendable-error.js.map +1 -0
- package/dist/packages/core/errors/standard-error.d.ts +11 -0
- package/dist/packages/core/errors/standard-error.d.ts.map +1 -0
- package/dist/packages/core/errors/standard-error.js +21 -0
- package/dist/packages/core/errors/standard-error.js.map +1 -0
- package/dist/packages/core/helpers/dependencies.d.ts +8 -0
- package/dist/packages/core/helpers/dependencies.d.ts.map +1 -0
- package/dist/packages/core/helpers/dependencies.js +10 -0
- package/dist/packages/core/helpers/dependencies.js.map +1 -0
- package/dist/packages/core/helpers/event.d.ts +22 -0
- package/dist/packages/core/helpers/event.d.ts.map +1 -0
- package/dist/packages/core/helpers/event.js +47 -0
- package/dist/packages/core/helpers/event.js.map +1 -0
- package/dist/packages/core/helpers/fromLastKeyQuery.d.ts +3 -0
- package/dist/packages/core/helpers/fromLastKeyQuery.d.ts.map +1 -0
- package/dist/packages/core/helpers/fromLastKeyQuery.js +7 -0
- package/dist/packages/core/helpers/fromLastKeyQuery.js.map +1 -0
- package/dist/packages/core/helpers/sleep.d.ts +2 -0
- package/dist/packages/core/helpers/sleep.d.ts.map +1 -0
- package/dist/packages/core/helpers/sleep.js +2 -0
- package/dist/packages/core/helpers/sleep.js.map +1 -0
- package/dist/packages/core/helpers/toLastKeyResponse.d.ts +3 -0
- package/dist/packages/core/helpers/toLastKeyResponse.d.ts.map +1 -0
- package/dist/packages/core/helpers/toLastKeyResponse.js +7 -0
- package/dist/packages/core/helpers/toLastKeyResponse.js.map +1 -0
- package/dist/packages/core/index.d.ts +12 -0
- package/dist/packages/core/index.d.ts.map +1 -0
- package/dist/packages/core/index.js +12 -0
- package/dist/packages/core/index.js.map +1 -0
- package/dist/packages/core/middlewares/entity-type-check.d.ts +3 -0
- package/dist/packages/core/middlewares/entity-type-check.d.ts.map +1 -0
- package/dist/packages/core/middlewares/entity-type-check.js +12 -0
- package/dist/packages/core/middlewares/entity-type-check.js.map +1 -0
- package/dist/packages/core/middlewares/mutual-type-check.d.ts +3 -0
- package/dist/packages/core/middlewares/mutual-type-check.d.ts.map +1 -0
- package/dist/packages/core/middlewares/mutual-type-check.js +13 -0
- package/dist/packages/core/middlewares/mutual-type-check.js.map +1 -0
- package/dist/packages/core/mock/container.d.ts +3 -0
- package/dist/packages/core/mock/container.d.ts.map +1 -0
- package/dist/packages/core/mock/container.js +3 -0
- package/dist/packages/core/mock/container.js.map +1 -0
- package/dist/packages/core/mock/entity.d.ts +13 -0
- package/dist/packages/core/mock/entity.d.ts.map +1 -0
- package/dist/packages/core/mock/entity.js +14 -0
- package/dist/packages/core/mock/entity.js.map +1 -0
- package/dist/packages/core/mock/monorise/admin.d.ts +127 -0
- package/dist/packages/core/mock/monorise/admin.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/admin.js +29 -0
- package/dist/packages/core/mock/monorise/admin.js.map +1 -0
- package/dist/packages/core/mock/monorise/audio.d.ts +324 -0
- package/dist/packages/core/mock/monorise/audio.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/audio.js +32 -0
- package/dist/packages/core/mock/monorise/audio.js.map +1 -0
- package/dist/packages/core/mock/monorise/chapter.d.ts +457 -0
- package/dist/packages/core/mock/monorise/chapter.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/chapter.js +81 -0
- package/dist/packages/core/mock/monorise/chapter.js.map +1 -0
- package/dist/packages/core/mock/monorise/cohort-track.d.ts +118 -0
- package/dist/packages/core/mock/monorise/cohort-track.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/cohort-track.js +38 -0
- package/dist/packages/core/mock/monorise/cohort-track.js.map +1 -0
- package/dist/packages/core/mock/monorise/course-banner.d.ts +149 -0
- package/dist/packages/core/mock/monorise/course-banner.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/course-banner.js +24 -0
- package/dist/packages/core/mock/monorise/course-banner.js.map +1 -0
- package/dist/packages/core/mock/monorise/course.d.ts +311 -0
- package/dist/packages/core/mock/monorise/course.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/course.js +128 -0
- package/dist/packages/core/mock/monorise/course.js.map +1 -0
- package/dist/packages/core/mock/monorise/expert.d.ts +380 -0
- package/dist/packages/core/mock/monorise/expert.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/expert.js +32 -0
- package/dist/packages/core/mock/monorise/expert.js.map +1 -0
- package/dist/packages/core/mock/monorise/index.d.ts +3599 -0
- package/dist/packages/core/mock/monorise/index.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/index.js +62 -0
- package/dist/packages/core/mock/monorise/index.js.map +1 -0
- package/dist/packages/core/mock/monorise/learner-video-progress.d.ts +198 -0
- package/dist/packages/core/mock/monorise/learner-video-progress.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/learner-video-progress.js +21 -0
- package/dist/packages/core/mock/monorise/learner-video-progress.js.map +1 -0
- package/dist/packages/core/mock/monorise/learner.d.ts +390 -0
- package/dist/packages/core/mock/monorise/learner.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/learner.js +59 -0
- package/dist/packages/core/mock/monorise/learner.js.map +1 -0
- package/dist/packages/core/mock/monorise/learning-activity-submission.d.ts +160 -0
- package/dist/packages/core/mock/monorise/learning-activity-submission.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/learning-activity-submission.js +17 -0
- package/dist/packages/core/mock/monorise/learning-activity-submission.js.map +1 -0
- package/dist/packages/core/mock/monorise/learning-activity.d.ts +266 -0
- package/dist/packages/core/mock/monorise/learning-activity.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/learning-activity.js +50 -0
- package/dist/packages/core/mock/monorise/learning-activity.js.map +1 -0
- package/dist/packages/core/mock/monorise/learning-journey-config.d.ts +84 -0
- package/dist/packages/core/mock/monorise/learning-journey-config.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/learning-journey-config.js +27 -0
- package/dist/packages/core/mock/monorise/learning-journey-config.js.map +1 -0
- package/dist/packages/core/mock/monorise/learning-journey-progress.d.ts +290 -0
- package/dist/packages/core/mock/monorise/learning-journey-progress.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/learning-journey-progress.js +46 -0
- package/dist/packages/core/mock/monorise/learning-journey-progress.js.map +1 -0
- package/dist/packages/core/mock/monorise/module.d.ts +211 -0
- package/dist/packages/core/mock/monorise/module.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/module.js +91 -0
- package/dist/packages/core/mock/monorise/module.js.map +1 -0
- package/dist/packages/core/mock/monorise/organization.d.ts +346 -0
- package/dist/packages/core/mock/monorise/organization.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/organization.js +54 -0
- package/dist/packages/core/mock/monorise/organization.js.map +1 -0
- package/dist/packages/core/mock/monorise/pathway.d.ts +267 -0
- package/dist/packages/core/mock/monorise/pathway.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/pathway.js +221 -0
- package/dist/packages/core/mock/monorise/pathway.js.map +1 -0
- package/dist/packages/core/mock/monorise/phase.d.ts +580 -0
- package/dist/packages/core/mock/monorise/phase.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/phase.js +166 -0
- package/dist/packages/core/mock/monorise/phase.js.map +1 -0
- package/dist/packages/core/mock/monorise/reference.d.ts +171 -0
- package/dist/packages/core/mock/monorise/reference.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/reference.js +25 -0
- package/dist/packages/core/mock/monorise/reference.js.map +1 -0
- package/dist/packages/core/mock/monorise/track.d.ts +617 -0
- package/dist/packages/core/mock/monorise/track.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/track.js +270 -0
- package/dist/packages/core/mock/monorise/track.js.map +1 -0
- package/dist/packages/core/mock/monorise/video.d.ts +346 -0
- package/dist/packages/core/mock/monorise/video.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise/video.js +33 -0
- package/dist/packages/core/mock/monorise/video.js.map +1 -0
- package/dist/packages/core/mock/monorise.d.ts +6 -0
- package/dist/packages/core/mock/monorise.d.ts.map +1 -0
- package/dist/packages/core/mock/monorise.js +5 -0
- package/dist/packages/core/mock/monorise.js.map +1 -0
- package/dist/packages/core/processors/create-entity-processor.d.ts +5 -0
- package/dist/packages/core/processors/create-entity-processor.d.ts.map +1 -0
- package/dist/packages/core/processors/create-entity-processor.js +32 -0
- package/dist/packages/core/processors/create-entity-processor.js.map +1 -0
- package/dist/packages/core/processors/mutual-processor.d.ts +15 -0
- package/dist/packages/core/processors/mutual-processor.d.ts.map +1 -0
- package/dist/packages/core/processors/mutual-processor.js +128 -0
- package/dist/packages/core/processors/mutual-processor.js.map +1 -0
- package/dist/packages/core/processors/prejoin-processor.d.ts +12 -0
- package/dist/packages/core/processors/prejoin-processor.d.ts.map +1 -0
- package/dist/packages/core/processors/prejoin-processor.js +150 -0
- package/dist/packages/core/processors/prejoin-processor.js.map +1 -0
- package/dist/packages/core/processors/replication-processor.d.ts +8 -0
- package/dist/packages/core/processors/replication-processor.d.ts.map +1 -0
- package/dist/packages/core/processors/replication-processor.js +180 -0
- package/dist/packages/core/processors/replication-processor.js.map +1 -0
- package/dist/packages/core/processors/tag-processor.d.ts +11 -0
- package/dist/packages/core/processors/tag-processor.d.ts.map +1 -0
- package/dist/packages/core/processors/tag-processor.js +106 -0
- package/dist/packages/core/processors/tag-processor.js.map +1 -0
- package/dist/packages/core/services/DependencyContainer.d.ts +51 -0
- package/dist/packages/core/services/DependencyContainer.d.ts.map +1 -0
- package/dist/packages/core/services/DependencyContainer.js +115 -0
- package/dist/packages/core/services/DependencyContainer.js.map +1 -0
- package/dist/packages/core/services/entity-service-lifecycle.d.ts +12 -0
- package/dist/packages/core/services/entity-service-lifecycle.d.ts.map +1 -0
- package/dist/packages/core/services/entity-service-lifecycle.js +23 -0
- package/dist/packages/core/services/entity-service-lifecycle.js.map +1 -0
- package/dist/packages/core/services/entity.service.d.ts +32 -0
- package/dist/packages/core/services/entity.service.d.ts.map +1 -0
- package/dist/packages/core/services/entity.service.js +121 -0
- package/dist/packages/core/services/entity.service.js.map +1 -0
- package/dist/packages/core/services/mutual.service.d.ts +64 -0
- package/dist/packages/core/services/mutual.service.d.ts.map +1 -0
- package/dist/packages/core/services/mutual.service.js +144 -0
- package/dist/packages/core/services/mutual.service.js.map +1 -0
- package/dist/packages/core/types/entity.type.d.ts +20 -0
- package/dist/packages/core/types/entity.type.d.ts.map +1 -0
- package/dist/packages/core/types/entity.type.js +2 -0
- package/dist/packages/core/types/entity.type.js.map +1 -0
- package/dist/processors/create-entity-processor.d.ts +5 -0
- package/dist/processors/create-entity-processor.d.ts.map +1 -0
- package/dist/processors/create-entity-processor.js +33 -0
- package/dist/processors/create-entity-processor.js.map +1 -0
- package/dist/processors/mutual-processor.d.ts +15 -0
- package/dist/processors/mutual-processor.d.ts.map +1 -0
- package/dist/processors/mutual-processor.js +129 -0
- package/dist/processors/mutual-processor.js.map +1 -0
- package/dist/processors/prejoin-processor.d.ts +12 -0
- package/dist/processors/prejoin-processor.d.ts.map +1 -0
- package/dist/processors/prejoin-processor.js +151 -0
- package/dist/processors/prejoin-processor.js.map +1 -0
- package/dist/processors/replication-processor.d.ts +8 -0
- package/dist/processors/replication-processor.d.ts.map +1 -0
- package/dist/processors/replication-processor.js +181 -0
- package/dist/processors/replication-processor.js.map +1 -0
- package/dist/processors/tag-processor.d.ts +11 -0
- package/dist/processors/tag-processor.d.ts.map +1 -0
- package/dist/processors/tag-processor.js +107 -0
- package/dist/processors/tag-processor.js.map +1 -0
- package/dist/services/DependencyContainer.d.ts +51 -0
- package/dist/services/DependencyContainer.d.ts.map +1 -0
- package/dist/services/DependencyContainer.js +115 -0
- package/dist/services/DependencyContainer.js.map +1 -0
- package/dist/services/entity-service-lifecycle.d.ts +12 -0
- package/dist/services/entity-service-lifecycle.d.ts.map +1 -0
- package/dist/services/entity-service-lifecycle.js +23 -0
- package/dist/services/entity-service-lifecycle.js.map +1 -0
- package/dist/services/entity.service.d.ts +32 -0
- package/dist/services/entity.service.d.ts.map +1 -0
- package/dist/services/entity.service.js +121 -0
- package/dist/services/entity.service.js.map +1 -0
- package/dist/services/mutual.service.d.ts +64 -0
- package/dist/services/mutual.service.d.ts.map +1 -0
- package/dist/services/mutual.service.js +144 -0
- package/dist/services/mutual.service.js.map +1 -0
- package/dist/shared/types/event.d.ts +72 -0
- package/dist/shared/types/event.d.ts.map +1 -0
- package/dist/shared/types/event.js +74 -0
- package/dist/shared/types/event.js.map +1 -0
- package/dist/types/entity.type.d.ts +20 -0
- package/dist/types/entity.type.d.ts.map +1 -0
- package/dist/types/entity.type.js +2 -0
- package/dist/types/entity.type.js.map +1 -0
- package/dist/types/event.d.ts +72 -0
- package/dist/types/event.d.ts.map +1 -0
- package/dist/types/event.js +74 -0
- package/dist/types/event.js.map +1 -0
- package/errors/api-error.ts +39 -0
- package/errors/extendable-error.ts +35 -0
- package/errors/standard-error.ts +29 -0
- package/helpers/dependencies.ts +10 -0
- package/helpers/event.ts +85 -0
- package/helpers/fromLastKeyQuery.ts +11 -0
- package/helpers/sleep.ts +1 -0
- package/helpers/toLastKeyResponse.ts +11 -0
- package/index.ts +23 -0
- package/middlewares/entity-type-check.ts +20 -0
- package/middlewares/mutual-type-check.ts +26 -0
- package/mock/entity.ts +12 -0
- package/mock/monorise/admin.ts +35 -0
- package/mock/monorise/chapter.ts +94 -0
- package/mock/monorise/course.ts +149 -0
- package/mock/monorise/index.ts +143 -0
- package/mock/monorise/learner.ts +66 -0
- package/mock/monorise/learning-activity.ts +62 -0
- package/mock/monorise/learning-journey-config.ts +34 -0
- package/mock/monorise/module.ts +108 -0
- package/mock/monorise/organization.ts +63 -0
- package/mock/monorise/reference.ts +28 -0
- package/mock/monorise/video.ts +36 -0
- package/package.json +31 -0
- package/processors/create-entity-processor.ts +55 -0
- package/processors/mutual-processor.ts +262 -0
- package/processors/prejoin-processor.ts +264 -0
- package/processors/replication-processor.ts +261 -0
- package/processors/tag-processor.ts +174 -0
- package/services/DependencyContainer.ts +208 -0
- package/services/entity-service-lifecycle.ts +41 -0
- package/services/entity.service.ts +201 -0
- package/services/mutual.service.ts +285 -0
- package/tsconfig.json +118 -0
- package/types/entity.type.ts +62 -0
- package/types/event.ts +84 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type ProjectionExpressionValues =
|
|
2
|
+
(typeof PROJECTION_EXPRESSION)[keyof typeof PROJECTION_EXPRESSION];
|
|
3
|
+
|
|
4
|
+
export const PROJECTION_EXPRESSION = {
|
|
5
|
+
NO_DATA: 'byEntityType, byEntityId, entityType, entityId, mutualId',
|
|
6
|
+
MUTUAL_DATA_ONLY:
|
|
7
|
+
'byEntityType, byEntityId, entityType, entityId, mutualId, mutualData',
|
|
8
|
+
} as const;
|
package/data/Tag.ts
ADDED
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AttributeValue,
|
|
3
|
+
DynamoDB,
|
|
4
|
+
QueryCommandInput,
|
|
5
|
+
} from '@aws-sdk/client-dynamodb';
|
|
6
|
+
import { marshall, unmarshall } from '@aws-sdk/util-dynamodb';
|
|
7
|
+
import type { EntitySchemaMap, Entity as EntityType } from '@monorise/base';
|
|
8
|
+
import { StandardError } from '#/errors/standard-error';
|
|
9
|
+
import { Entity } from './Entity';
|
|
10
|
+
import type { ProjectionExpressionValues } from './ProjectionExpression';
|
|
11
|
+
import { Repository } from './abstract/Repository.base';
|
|
12
|
+
|
|
13
|
+
export class TaggedEntity<T extends EntityType> extends Entity<T> {
|
|
14
|
+
public tagName: string;
|
|
15
|
+
public group?: string;
|
|
16
|
+
public sortValue?: string;
|
|
17
|
+
|
|
18
|
+
constructor({
|
|
19
|
+
tagName,
|
|
20
|
+
group,
|
|
21
|
+
sortValue,
|
|
22
|
+
entityType,
|
|
23
|
+
entityId,
|
|
24
|
+
data,
|
|
25
|
+
createdAt,
|
|
26
|
+
updatedAt,
|
|
27
|
+
}: {
|
|
28
|
+
tagName: string;
|
|
29
|
+
group?: string;
|
|
30
|
+
sortValue?: string;
|
|
31
|
+
entityType: T;
|
|
32
|
+
entityId: string;
|
|
33
|
+
data?: Partial<EntitySchemaMap[T]>;
|
|
34
|
+
createdAt?: Date;
|
|
35
|
+
updatedAt?: Date;
|
|
36
|
+
}) {
|
|
37
|
+
super(entityType, entityId, data, createdAt, updatedAt);
|
|
38
|
+
|
|
39
|
+
this.tagName = tagName;
|
|
40
|
+
this.group = group;
|
|
41
|
+
this.sortValue = sortValue;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static fromItem<T extends EntityType>(
|
|
45
|
+
item?: Record<string, AttributeValue>,
|
|
46
|
+
): TaggedEntity<T> {
|
|
47
|
+
if (!item) throw new StandardError('TAG_IS_UNDEFINED', 'Tag item empty');
|
|
48
|
+
|
|
49
|
+
const parsedItem = unmarshall(item);
|
|
50
|
+
|
|
51
|
+
return new TaggedEntity<T>({
|
|
52
|
+
tagName: parsedItem.tagName,
|
|
53
|
+
group: parsedItem.group,
|
|
54
|
+
sortValue: parsedItem.sortValue,
|
|
55
|
+
entityType: parsedItem.entityType,
|
|
56
|
+
entityId: parsedItem.entityId,
|
|
57
|
+
data: parsedItem.data,
|
|
58
|
+
createdAt: parsedItem.createdAt
|
|
59
|
+
? new Date(parsedItem.createdAt)
|
|
60
|
+
: undefined,
|
|
61
|
+
updatedAt: parsedItem.updatedAt
|
|
62
|
+
? new Date(parsedItem.updatedAt)
|
|
63
|
+
: undefined,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
get pk(): string {
|
|
68
|
+
return `TAG#${this.entityType}#${this.tagName}${this.group ? `#${this.group}` : ''}`;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
get sk(): string {
|
|
72
|
+
return `${this.sortValue ? `${this.sortValue}#` : ''}${this.entityType}#${this.entityId}`;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
reversedKeys(): Record<string, AttributeValue> {
|
|
76
|
+
return {
|
|
77
|
+
PK: { S: `${this.entityType}#${this.entityId}` },
|
|
78
|
+
SK: {
|
|
79
|
+
S: this.pk,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
replicationKeys(): Record<string, AttributeValue> {
|
|
85
|
+
const keys = this.reversedKeys();
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
R1PK: keys.PK,
|
|
89
|
+
R1SK: keys.SK,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
toItem(): Record<string, AttributeValue> {
|
|
94
|
+
return {
|
|
95
|
+
...marshall(this.toJSON(), { removeUndefinedValues: true }),
|
|
96
|
+
...this.keys(),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
toJSON(): Record<string, unknown> {
|
|
101
|
+
return {
|
|
102
|
+
tagName: this.tagName,
|
|
103
|
+
group: this.group,
|
|
104
|
+
sortValue: this.sortValue,
|
|
105
|
+
entityType: this.entityType,
|
|
106
|
+
entityId: this.entityId,
|
|
107
|
+
data: this.data,
|
|
108
|
+
createdAt: this.createdAt,
|
|
109
|
+
updatedAt: this.updatedAt,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export class TagRepository extends Repository {
|
|
115
|
+
constructor(
|
|
116
|
+
private readonly TABLE_NAME: string,
|
|
117
|
+
private readonly dynamodbClient: DynamoDB,
|
|
118
|
+
) {
|
|
119
|
+
super();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
async getExistingTags<T extends EntityType>({
|
|
123
|
+
entityType,
|
|
124
|
+
entityId,
|
|
125
|
+
tagName,
|
|
126
|
+
}: {
|
|
127
|
+
entityType: T;
|
|
128
|
+
entityId: string;
|
|
129
|
+
tagName: string;
|
|
130
|
+
}): Promise<TaggedEntity<T>[]> {
|
|
131
|
+
const PK = `${entityType}#${entityId}`;
|
|
132
|
+
const SK = `TAG#${entityType}#${tagName}`;
|
|
133
|
+
|
|
134
|
+
const results = await this.dynamodbClient.query({
|
|
135
|
+
TableName: this.TABLE_NAME,
|
|
136
|
+
KeyConditionExpression: '#PK = :PK and begins_with(#SK, :SK)',
|
|
137
|
+
ExpressionAttributeNames: {
|
|
138
|
+
'#PK': 'PK',
|
|
139
|
+
'#SK': 'SK',
|
|
140
|
+
},
|
|
141
|
+
ExpressionAttributeValues: {
|
|
142
|
+
':PK': { S: PK },
|
|
143
|
+
':SK': { S: SK },
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
return (results.Items || []).map((item: any) => {
|
|
148
|
+
return TaggedEntity.fromItem(item);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
async deleteTag({
|
|
153
|
+
tagName,
|
|
154
|
+
group,
|
|
155
|
+
sortValue,
|
|
156
|
+
entityType,
|
|
157
|
+
entityId,
|
|
158
|
+
}: {
|
|
159
|
+
tagName: string;
|
|
160
|
+
group?: string;
|
|
161
|
+
sortValue?: string;
|
|
162
|
+
entityType: EntityType;
|
|
163
|
+
entityId: string;
|
|
164
|
+
}): Promise<void> {
|
|
165
|
+
const tag = new TaggedEntity({
|
|
166
|
+
tagName,
|
|
167
|
+
group,
|
|
168
|
+
sortValue,
|
|
169
|
+
entityType,
|
|
170
|
+
entityId,
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
await Promise.all([
|
|
174
|
+
this.dynamodbClient.deleteItem({
|
|
175
|
+
TableName: this.TABLE_NAME,
|
|
176
|
+
Key: tag.keys(),
|
|
177
|
+
}),
|
|
178
|
+
this.dynamodbClient.deleteItem({
|
|
179
|
+
TableName: this.TABLE_NAME,
|
|
180
|
+
Key: tag.reversedKeys(),
|
|
181
|
+
}),
|
|
182
|
+
]);
|
|
183
|
+
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
async createTag<T extends EntityType>({
|
|
188
|
+
tagName,
|
|
189
|
+
group,
|
|
190
|
+
sortValue,
|
|
191
|
+
entity,
|
|
192
|
+
}: {
|
|
193
|
+
tagName: string;
|
|
194
|
+
group?: string;
|
|
195
|
+
sortValue?: string;
|
|
196
|
+
entity: Entity<T>;
|
|
197
|
+
}): Promise<TaggedEntity<T>> {
|
|
198
|
+
if (!entity.entityId) {
|
|
199
|
+
throw new StandardError(
|
|
200
|
+
'ENTITY_ID_IS_UNDEFINED',
|
|
201
|
+
'entityId is undefined',
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const tag = new TaggedEntity({
|
|
206
|
+
tagName,
|
|
207
|
+
group,
|
|
208
|
+
sortValue,
|
|
209
|
+
entityType: entity.entityType,
|
|
210
|
+
entityId: entity.entityId,
|
|
211
|
+
data: entity.data,
|
|
212
|
+
createdAt: entity.createdAt ? new Date(entity.createdAt) : new Date(),
|
|
213
|
+
updatedAt: entity.updatedAt ? new Date(entity.updatedAt) : new Date(),
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
await Promise.all([
|
|
217
|
+
this.dynamodbClient.putItem({
|
|
218
|
+
TableName: this.TABLE_NAME,
|
|
219
|
+
Item: {
|
|
220
|
+
...tag.toItem(),
|
|
221
|
+
...tag.replicationKeys(),
|
|
222
|
+
},
|
|
223
|
+
}),
|
|
224
|
+
this.dynamodbClient.putItem({
|
|
225
|
+
TableName: this.TABLE_NAME,
|
|
226
|
+
Item: {
|
|
227
|
+
...marshall(
|
|
228
|
+
{
|
|
229
|
+
tagName,
|
|
230
|
+
group,
|
|
231
|
+
sortValue,
|
|
232
|
+
},
|
|
233
|
+
{ removeUndefinedValues: true },
|
|
234
|
+
),
|
|
235
|
+
...tag.reversedKeys(),
|
|
236
|
+
...tag.replicationKeys(),
|
|
237
|
+
},
|
|
238
|
+
}),
|
|
239
|
+
]);
|
|
240
|
+
|
|
241
|
+
return tag;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
async listTags<T extends EntityType>({
|
|
245
|
+
entityType,
|
|
246
|
+
tagName,
|
|
247
|
+
limit, // if this is not set, it will return all items
|
|
248
|
+
query,
|
|
249
|
+
group,
|
|
250
|
+
start,
|
|
251
|
+
end,
|
|
252
|
+
options = {},
|
|
253
|
+
}: {
|
|
254
|
+
entityType: T;
|
|
255
|
+
tagName: string;
|
|
256
|
+
limit?: number;
|
|
257
|
+
start?: string;
|
|
258
|
+
end?: string;
|
|
259
|
+
query?: string;
|
|
260
|
+
group?: string;
|
|
261
|
+
options?: {
|
|
262
|
+
lastKey?: Record<string, AttributeValue>;
|
|
263
|
+
ProjectionExpression?: ProjectionExpressionValues;
|
|
264
|
+
};
|
|
265
|
+
}): Promise<{
|
|
266
|
+
items: Entity<T>[];
|
|
267
|
+
totalCount?: number;
|
|
268
|
+
lastKey?: Record<string, AttributeValue>;
|
|
269
|
+
}> {
|
|
270
|
+
const errorContext: Record<string, unknown> = {
|
|
271
|
+
entityType,
|
|
272
|
+
tagName,
|
|
273
|
+
limit,
|
|
274
|
+
query,
|
|
275
|
+
group,
|
|
276
|
+
start,
|
|
277
|
+
end,
|
|
278
|
+
options,
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
const tag = new TaggedEntity({
|
|
282
|
+
tagName,
|
|
283
|
+
entityType,
|
|
284
|
+
entityId: '',
|
|
285
|
+
group,
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
let expression: Pick<
|
|
289
|
+
QueryCommandInput,
|
|
290
|
+
| 'KeyConditionExpression'
|
|
291
|
+
| 'ExpressionAttributeNames'
|
|
292
|
+
| 'ExpressionAttributeValues'
|
|
293
|
+
> | null = null;
|
|
294
|
+
|
|
295
|
+
if (query && !start && !end) {
|
|
296
|
+
expression = {
|
|
297
|
+
KeyConditionExpression: '#PK = :PK and begins_with(#SK, :SK)',
|
|
298
|
+
ExpressionAttributeNames: {
|
|
299
|
+
'#PK': 'PK',
|
|
300
|
+
'#SK': 'SK',
|
|
301
|
+
},
|
|
302
|
+
ExpressionAttributeValues: {
|
|
303
|
+
':PK': {
|
|
304
|
+
S: tag.pk,
|
|
305
|
+
},
|
|
306
|
+
':SK': {
|
|
307
|
+
S: `${query}#`,
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
};
|
|
311
|
+
} else if (start && end) {
|
|
312
|
+
expression = {
|
|
313
|
+
KeyConditionExpression: '#PK = :PK and #SK between :SKStart and :SKEnd',
|
|
314
|
+
ExpressionAttributeNames: {
|
|
315
|
+
'#PK': 'PK',
|
|
316
|
+
'#SK': 'SK',
|
|
317
|
+
},
|
|
318
|
+
ExpressionAttributeValues: {
|
|
319
|
+
':PK': {
|
|
320
|
+
S: tag.pk,
|
|
321
|
+
},
|
|
322
|
+
':SKStart': {
|
|
323
|
+
S: `${start}#`,
|
|
324
|
+
},
|
|
325
|
+
':SKEnd': {
|
|
326
|
+
S: `${end}#`,
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
};
|
|
330
|
+
} else if (start && !end) {
|
|
331
|
+
expression = {
|
|
332
|
+
KeyConditionExpression: '#PK = :PK and #SK >= :SK',
|
|
333
|
+
ExpressionAttributeNames: {
|
|
334
|
+
'#PK': 'PK',
|
|
335
|
+
'#SK': 'SK',
|
|
336
|
+
},
|
|
337
|
+
ExpressionAttributeValues: {
|
|
338
|
+
':PK': {
|
|
339
|
+
S: tag.pk,
|
|
340
|
+
},
|
|
341
|
+
':SK': {
|
|
342
|
+
S: `${start}#`,
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
};
|
|
346
|
+
} else if (!start && end) {
|
|
347
|
+
expression = {
|
|
348
|
+
KeyConditionExpression: '#PK = :PK and #SK <= :SK',
|
|
349
|
+
ExpressionAttributeNames: {
|
|
350
|
+
'#PK': 'PK',
|
|
351
|
+
'#SK': 'SK',
|
|
352
|
+
},
|
|
353
|
+
ExpressionAttributeValues: {
|
|
354
|
+
':PK': {
|
|
355
|
+
S: tag.pk,
|
|
356
|
+
},
|
|
357
|
+
':SK': {
|
|
358
|
+
S: `${end}#`,
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
};
|
|
362
|
+
} else if (group && !query && !start && !end) {
|
|
363
|
+
expression = {
|
|
364
|
+
KeyConditionExpression: '#PK = :PK',
|
|
365
|
+
ExpressionAttributeNames: {
|
|
366
|
+
'#PK': 'PK',
|
|
367
|
+
},
|
|
368
|
+
ExpressionAttributeValues: {
|
|
369
|
+
':PK': {
|
|
370
|
+
S: tag.pk,
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
if (!expression) {
|
|
377
|
+
throw new StandardError(
|
|
378
|
+
'INVALID_QUERY',
|
|
379
|
+
'Invalid query. Please provide a valid query',
|
|
380
|
+
null,
|
|
381
|
+
errorContext,
|
|
382
|
+
);
|
|
383
|
+
}
|
|
384
|
+
const defaultListQuery: QueryCommandInput = {
|
|
385
|
+
TableName: this.TABLE_NAME,
|
|
386
|
+
Limit: limit,
|
|
387
|
+
ScanIndexForward: false,
|
|
388
|
+
ProjectionExpression: options?.ProjectionExpression,
|
|
389
|
+
...expression,
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
let lastKey = options.lastKey;
|
|
393
|
+
let items: Record<string, AttributeValue>[] = [];
|
|
394
|
+
let remainingCount = limit ?? 0;
|
|
395
|
+
do {
|
|
396
|
+
const resp = await this.dynamodbClient.query({
|
|
397
|
+
...defaultListQuery,
|
|
398
|
+
...(remainingCount && { Limit: remainingCount }),
|
|
399
|
+
...(lastKey && {
|
|
400
|
+
ExclusiveStartKey: lastKey,
|
|
401
|
+
}),
|
|
402
|
+
});
|
|
403
|
+
items = items.concat(resp.Items ?? []);
|
|
404
|
+
|
|
405
|
+
lastKey = resp.LastEvaluatedKey;
|
|
406
|
+
|
|
407
|
+
if (limit) {
|
|
408
|
+
remainingCount = remainingCount - (resp.Items?.length ?? 0);
|
|
409
|
+
}
|
|
410
|
+
} while (
|
|
411
|
+
// limit is given, haven't reach limit, and there are still items to retrieve
|
|
412
|
+
(limit && remainingCount && lastKey) ||
|
|
413
|
+
// no limit is given and there are still items to retrieve
|
|
414
|
+
(!limit && lastKey)
|
|
415
|
+
);
|
|
416
|
+
|
|
417
|
+
return {
|
|
418
|
+
items: (items || []).map(Entity.fromItem<T>),
|
|
419
|
+
totalCount: items.length,
|
|
420
|
+
lastKey,
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
async createLock({
|
|
425
|
+
entityType,
|
|
426
|
+
entityId,
|
|
427
|
+
}: {
|
|
428
|
+
entityType: EntityType;
|
|
429
|
+
entityId: string;
|
|
430
|
+
}): Promise<void> {
|
|
431
|
+
const oneMinuteLater = Math.floor(new Date().getTime() / 1000 + 1 * 60);
|
|
432
|
+
|
|
433
|
+
await this.dynamodbClient.putItem({
|
|
434
|
+
TableName: this.TABLE_NAME,
|
|
435
|
+
Item: {
|
|
436
|
+
PK: { S: `TAG#${entityType}#${entityId}` },
|
|
437
|
+
SK: { S: '#LOCK#' },
|
|
438
|
+
expiresAt: {
|
|
439
|
+
// auto delete lock after 1 minute
|
|
440
|
+
N: `${oneMinuteLater}`,
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
ConditionExpression: 'attribute_not_exists(PK)',
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
async deleteLock({
|
|
450
|
+
entityType,
|
|
451
|
+
entityId,
|
|
452
|
+
}: {
|
|
453
|
+
entityType: EntityType;
|
|
454
|
+
entityId: string;
|
|
455
|
+
}): Promise<void> {
|
|
456
|
+
try {
|
|
457
|
+
await this.dynamodbClient.deleteItem({
|
|
458
|
+
TableName: this.TABLE_NAME,
|
|
459
|
+
Key: {
|
|
460
|
+
PK: { S: `TAG#${entityType}#${entityId}` },
|
|
461
|
+
SK: { S: '#LOCK#' },
|
|
462
|
+
},
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
return;
|
|
466
|
+
} catch (error) {
|
|
467
|
+
// if lock is not found, it's okay
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AttributeValue } from '@aws-sdk/client-dynamodb';
|
|
2
|
+
|
|
3
|
+
export abstract class Item {
|
|
4
|
+
abstract get pk(): string;
|
|
5
|
+
abstract get sk(): string;
|
|
6
|
+
abstract get createdAt(): string | undefined;
|
|
7
|
+
abstract get updatedAt(): string | undefined;
|
|
8
|
+
|
|
9
|
+
public keys(): Record<string, AttributeValue> {
|
|
10
|
+
return {
|
|
11
|
+
PK: { S: this.pk },
|
|
12
|
+
SK: { S: this.sk },
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
abstract toItem(): Record<string, AttributeValue>;
|
|
17
|
+
|
|
18
|
+
abstract toJSON(): Record<string, unknown>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { AttributeValue } from '@aws-sdk/client-dynamodb';
|
|
2
|
+
import { marshall } from '@aws-sdk/util-dynamodb';
|
|
3
|
+
|
|
4
|
+
function flattenObject(
|
|
5
|
+
obj: Record<string, unknown>,
|
|
6
|
+
parentKey = '',
|
|
7
|
+
result: Record<string, unknown> = {},
|
|
8
|
+
level = 1,
|
|
9
|
+
opts?: {
|
|
10
|
+
maxLevel?: number;
|
|
11
|
+
},
|
|
12
|
+
): Record<string, unknown> {
|
|
13
|
+
const MAX_LEVEL = opts?.maxLevel ?? 2;
|
|
14
|
+
|
|
15
|
+
for (const key in obj) {
|
|
16
|
+
if (obj.hasOwnProperty(key)) {
|
|
17
|
+
const propName = parentKey ? `${parentKey}.${key}` : key;
|
|
18
|
+
if (
|
|
19
|
+
typeof obj[key] === 'object' &&
|
|
20
|
+
obj[key] !== null &&
|
|
21
|
+
!Array.isArray(obj[key]) &&
|
|
22
|
+
level < MAX_LEVEL
|
|
23
|
+
) {
|
|
24
|
+
flattenObject(
|
|
25
|
+
obj[key] as Record<string, unknown>,
|
|
26
|
+
propName,
|
|
27
|
+
result,
|
|
28
|
+
level + 1,
|
|
29
|
+
opts,
|
|
30
|
+
);
|
|
31
|
+
} else {
|
|
32
|
+
result[propName] = obj[key];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export abstract class Repository {
|
|
40
|
+
toUpdate(
|
|
41
|
+
parsedUpdateData: Record<string, unknown>,
|
|
42
|
+
opts?: {
|
|
43
|
+
// to limit the partial update depth for an object
|
|
44
|
+
// in some scenario, we have to ensure the object to be written must be an object instead of undefined/null
|
|
45
|
+
// eg, writing to data.cover.name must ensure data.cover is an object already else we will get error
|
|
46
|
+
maxLevel?: number;
|
|
47
|
+
},
|
|
48
|
+
): {
|
|
49
|
+
UpdateExpression: string;
|
|
50
|
+
ExpressionAttributeNames: Record<string, string>;
|
|
51
|
+
ExpressionAttributeValues: Record<string, AttributeValue>;
|
|
52
|
+
} {
|
|
53
|
+
const flattenedData = flattenObject(parsedUpdateData, '', {}, 1, opts);
|
|
54
|
+
|
|
55
|
+
let updateExpression = '';
|
|
56
|
+
const expressionAttributeNames: Record<string, string> = {};
|
|
57
|
+
const expressionAttributeValues: Record<string, unknown> = {};
|
|
58
|
+
|
|
59
|
+
for (const key in flattenedData) {
|
|
60
|
+
if (updateExpression.length > 0) {
|
|
61
|
+
updateExpression += ', ';
|
|
62
|
+
}
|
|
63
|
+
const attributePath = key
|
|
64
|
+
.split('.')
|
|
65
|
+
.map((part) => `#${part}`)
|
|
66
|
+
.join('.');
|
|
67
|
+
const valuePlaceholder = `:${key.replace(/\./g, '_')}`;
|
|
68
|
+
|
|
69
|
+
updateExpression += `${attributePath} = ${valuePlaceholder}`;
|
|
70
|
+
|
|
71
|
+
key.split('.').forEach((part) => {
|
|
72
|
+
expressionAttributeNames[`#${part}`] = part;
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
expressionAttributeValues[valuePlaceholder] = flattenedData[key];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
updateExpression = `SET ${updateExpression}`;
|
|
79
|
+
|
|
80
|
+
const updateAttributes = {
|
|
81
|
+
UpdateExpression: updateExpression,
|
|
82
|
+
ExpressionAttributeNames: {
|
|
83
|
+
...expressionAttributeNames,
|
|
84
|
+
},
|
|
85
|
+
ExpressionAttributeValues: {
|
|
86
|
+
...marshall(expressionAttributeValues),
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
return updateAttributes;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ENTITY_REPLICATION_INDEX, MUTUAL_REPLICATION_INDEX } from '../constants/table';
|
|
2
|
+
declare const CORE_TABLE: string;
|
|
3
|
+
declare const CORE_EVENT_BUS: string;
|
|
4
|
+
export { CORE_TABLE, CORE_EVENT_BUS, ENTITY_REPLICATION_INDEX, MUTUAL_REPLICATION_INDEX, };
|
|
5
|
+
//# sourceMappingURL=service.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.config.d.ts","sourceRoot":"","sources":["../../configs/service.config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,oBAAoB,CAAC;AAE5B,QAAA,MAAM,UAAU,QAA+B,CAAC;AAChD,QAAA,MAAM,cAAc,QAAmC,CAAC;AAExD,OAAO,EACL,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,wBAAwB,GACzB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ENTITY_REPLICATION_INDEX, MUTUAL_REPLICATION_INDEX, } from '../constants/table';
|
|
2
|
+
const CORE_TABLE = process.env.CORE_TABLE || '';
|
|
3
|
+
const CORE_EVENT_BUS = process.env.CORE_EVENT_BUS || '';
|
|
4
|
+
export { CORE_TABLE, CORE_EVENT_BUS, ENTITY_REPLICATION_INDEX, MUTUAL_REPLICATION_INDEX, };
|
|
5
|
+
//# sourceMappingURL=service.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.config.js","sourceRoot":"","sources":["../../configs/service.config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC;AAChD,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC;AAExD,OAAO,EACL,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,wBAAwB,GACzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../constants/table.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AACrD,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AACnE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../constants/table.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AACrD,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AACnE,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Request, Response } from 'express';
|
|
2
|
+
import type { EntityService } from '#/services/entity.service';
|
|
3
|
+
export declare class CreateEntityController {
|
|
4
|
+
private entityService;
|
|
5
|
+
constructor(entityService: EntityService);
|
|
6
|
+
controller: (req: Request, res: Response) => void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=create-entity.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-entity.controller.d.ts","sourceRoot":"","sources":["../../../controllers/entity/create-entity.controller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,qBAAa,sBAAsB;IACrB,OAAO,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAEhD,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,KAAK,IAAI,CAuC/C;CACH"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import httpStatus from 'http-status';
|
|
2
|
+
import { ZodError } from 'zod';
|
|
3
|
+
import { StandardError } from '#/errors/standard-error';
|
|
4
|
+
export class CreateEntityController {
|
|
5
|
+
entityService;
|
|
6
|
+
constructor(entityService) {
|
|
7
|
+
this.entityService = entityService;
|
|
8
|
+
}
|
|
9
|
+
controller = async (req, res) => {
|
|
10
|
+
const accountId = req.headers['account-id'];
|
|
11
|
+
const { entityType } = req.params;
|
|
12
|
+
try {
|
|
13
|
+
const entity = await this.entityService.createEntity({
|
|
14
|
+
entityType,
|
|
15
|
+
entityPayload: req.body,
|
|
16
|
+
accountId,
|
|
17
|
+
options: {
|
|
18
|
+
createAndUpdateDatetime: req.body.createdAt,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
return res.status(httpStatus.OK).json(entity);
|
|
22
|
+
}
|
|
23
|
+
catch (err) {
|
|
24
|
+
if (err instanceof ZodError) {
|
|
25
|
+
return res.status(httpStatus.BAD_REQUEST).json({
|
|
26
|
+
code: 'API_VALIDATION_ERROR',
|
|
27
|
+
message: 'API validation failed',
|
|
28
|
+
details: err.flatten(),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
if (err instanceof StandardError && err.code === 'EMAIL_EXISTS') {
|
|
32
|
+
return res.status(httpStatus.BAD_REQUEST).json({
|
|
33
|
+
...err.toJSON(),
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
console.log('===create-entity error:', {
|
|
37
|
+
err,
|
|
38
|
+
errorContext: JSON.stringify({ body: req.body, headers: req.headers }),
|
|
39
|
+
});
|
|
40
|
+
throw err;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=create-entity.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-entity.controller.js","sourceRoot":"","sources":["../../../controllers/entity/create-entity.controller.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD,MAAM,OAAO,sBAAsB;IACb;IAApB,YAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAEpD,UAAU,GAA0C,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;QACrE,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC5C,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC,MAE1B,CAAC;QAEF,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC;gBACnD,UAAU;gBACV,aAAa,EAAE,GAAG,CAAC,IAAI;gBACvB,SAAS;gBACT,OAAO,EAAE;oBACP,uBAAuB,EAAE,GAAG,CAAC,IAAI,CAAC,SAAS;iBAC5C;aACF,CAAC,CAAC;YAEH,OAAO,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,GAAG,YAAY,QAAQ,EAAE,CAAC;gBAC5B,OAAO,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;oBAC7C,IAAI,EAAE,sBAAsB;oBAC5B,OAAO,EAAE,uBAAuB;oBAChC,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE;iBACvB,CAAC,CAAC;YACL,CAAC;YAED,IAAI,GAAG,YAAY,aAAa,IAAI,GAAG,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;gBAChE,OAAO,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;oBAC7C,GAAG,GAAG,CAAC,MAAM,EAAE;iBAChB,CAAC,CAAC;YACL,CAAC;YAED,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE;gBACrC,GAAG;gBACH,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;aACvE,CAAC,CAAC;YAEH,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC,CAAC;CACH"}
|