itlab-internal-services 2.15.7 → 2.16.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/README.md +1 -187
- package/dist/classes/document-merger.class.js +3 -5
- package/dist/classes/index.d.ts +1 -0
- package/dist/classes/index.js +3 -1
- package/dist/classes/report-category.class.d.ts +55 -0
- package/dist/classes/report-category.class.js +120 -0
- package/dist/decorators/{account.decorator.d.ts → authenticated-account.decorator.d.ts} +4 -4
- package/dist/decorators/{account.decorator.js → authenticated-account.decorator.js} +8 -10
- package/dist/decorators/index.d.ts +1 -1
- package/dist/decorators/index.js +1 -1
- package/dist/exceptions/authenticated-user-required.exception.d.ts +34 -0
- package/dist/exceptions/authenticated-user-required.exception.js +51 -0
- package/dist/exceptions/bad-body.exception.d.ts +19 -8
- package/dist/exceptions/bad-body.exception.js +26 -10
- package/dist/exceptions/bad-parameter.exception.d.ts +23 -8
- package/dist/exceptions/bad-parameter.exception.js +41 -19
- package/dist/exceptions/duplicate.exception.d.ts +20 -8
- package/dist/exceptions/duplicate.exception.js +27 -10
- package/dist/exceptions/index.d.ts +1 -0
- package/dist/exceptions/index.js +1 -0
- package/dist/functions/add-views-likes-virtuals.function.d.ts +15 -0
- package/dist/functions/add-views-likes-virtuals.function.js +43 -0
- package/dist/functions/create-internal-axios-client.function.js +2 -2
- package/dist/functions/index.d.ts +1 -0
- package/dist/functions/index.js +3 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/likeable.interface.d.ts +1 -1
- package/dist/likeable.interface.js +2 -2
- package/dist/models/account.model.d.ts +23 -0
- package/dist/models/account.model.js +59 -0
- package/dist/models/index.d.ts +3 -1
- package/dist/models/index.js +7 -3
- package/dist/{modules/search/models → models}/search-document.model.d.ts +1 -1
- package/dist/{modules/search/models → models}/search-document.model.js +1 -1
- package/dist/models/{account-entity.model.d.ts → user.model.d.ts} +8 -21
- package/dist/models/{account-entity.model.js → user.model.js} +11 -25
- package/dist/modules/authentication/authentication-module-options.interface.d.ts +2 -8
- package/dist/modules/authentication/authentication-options.parameter.d.ts +4 -0
- package/dist/modules/authentication/{inject-auth-options.decorator.js → authentication-options.parameter.js} +5 -2
- package/dist/modules/authentication/authentication.module.d.ts +23 -0
- package/dist/modules/authentication/authentication.module.js +24 -1
- package/dist/modules/authentication/guards/index.d.ts +2 -2
- package/dist/modules/authentication/guards/index.js +7 -7
- package/dist/modules/authentication/guards/jwt-auth.guard.d.ts +17 -0
- package/dist/modules/authentication/guards/jwt-auth.guard.js +73 -0
- package/dist/modules/authentication/guards/permissions.guard.d.ts +5 -27
- package/dist/modules/authentication/guards/permissions.guard.js +26 -59
- package/dist/modules/authentication/guards/public.guard.d.ts +7 -13
- package/dist/modules/authentication/guards/public.guard.js +10 -24
- package/dist/modules/authentication/guards/service-auth.guard.d.ts +22 -0
- package/dist/modules/authentication/guards/service-auth.guard.js +65 -0
- package/dist/modules/authentication/index.d.ts +3 -3
- package/dist/modules/authentication/index.js +3 -5
- package/dist/modules/cache/cache-response.interceptor.d.ts +2 -2
- package/dist/modules/cache/cache-response.interceptor.js +2 -2
- package/dist/modules/cache/index.d.ts +1 -0
- package/dist/modules/cache/index.js +1 -0
- package/dist/modules/comment/comment-module-options.interface.d.ts +38 -0
- package/dist/modules/comment/comment.controller.d.ts +24 -30
- package/dist/modules/comment/comment.controller.js +59 -61
- package/dist/modules/comment/comment.module-definition.d.ts +1 -42
- package/dist/modules/comment/comment.module-definition.js +1 -2
- package/dist/modules/comment/comment.module.d.ts +13 -13
- package/dist/modules/comment/comment.module.js +15 -42
- package/dist/modules/comment/comment.service.d.ts +27 -37
- package/dist/modules/comment/comment.service.js +50 -84
- package/dist/modules/comment/index.d.ts +2 -3
- package/dist/modules/comment/index.js +16 -7
- package/dist/modules/database/database.module.js +2 -5
- package/dist/modules/database/index.d.ts +2 -5
- package/dist/modules/database/index.js +17 -9
- package/dist/modules/index.d.ts +2 -6
- package/dist/modules/index.js +2 -6
- package/dist/modules/like/index.d.ts +2 -1
- package/dist/modules/like/index.js +16 -3
- package/dist/modules/like/like-module-options.interface.d.ts +21 -0
- package/dist/modules/like/like.controller.d.ts +45 -37
- package/dist/modules/like/like.controller.js +117 -102
- package/dist/modules/like/like.module-definition.d.ts +1 -17
- package/dist/modules/like/like.module-definition.js +1 -2
- package/dist/modules/like/like.module.d.ts +12 -12
- package/dist/modules/like/like.module.js +14 -37
- package/dist/modules/like/like.service.d.ts +31 -27
- package/dist/modules/like/like.service.js +42 -35
- package/dist/modules/merge/index.d.ts +3 -0
- package/dist/modules/merge/index.js +19 -0
- package/dist/modules/merge/merge-module-options.interface.d.ts +21 -0
- package/dist/modules/merge/merge.controller.d.ts +30 -0
- package/dist/modules/merge/merge.controller.js +76 -0
- package/dist/modules/merge/merge.module.d.ts +18 -0
- package/dist/modules/merge/merge.module.js +41 -0
- package/dist/modules/merge/merge.service.interface.d.ts +17 -0
- package/dist/modules/services/base-http.service.d.ts +83 -0
- package/dist/modules/services/base-http.service.js +124 -0
- package/dist/modules/services/base-urls.d.ts +22 -0
- package/dist/modules/services/base-urls.js +121 -0
- package/dist/modules/services/index.d.ts +4 -0
- package/dist/modules/services/index.js +20 -0
- package/dist/modules/services/providers/accounts.service.d.ts +52 -0
- package/dist/modules/services/providers/accounts.service.js +82 -0
- package/dist/modules/services/providers/books.service.d.ts +29 -0
- package/dist/modules/services/providers/books.service.js +53 -0
- package/dist/modules/services/providers/changelog.service.d.ts +18 -0
- package/dist/modules/services/providers/changelog.service.js +41 -0
- package/dist/modules/services/providers/comments/comments.service-definition.d.ts +1 -0
- package/dist/modules/services/providers/comments/comments.service-definition.js +4 -0
- package/dist/modules/services/providers/comments/comments.service.d.ts +60 -0
- package/dist/modules/services/providers/comments/comments.service.js +138 -0
- package/dist/modules/services/providers/comments/index.d.ts +1 -0
- package/dist/{factories → modules/services/providers/comments}/index.js +1 -1
- package/dist/modules/services/providers/content/content-types.d.ts +20 -0
- package/dist/modules/services/providers/content/content-types.js +7 -0
- package/dist/modules/services/providers/content/content.service-definition.d.ts +1 -0
- package/dist/modules/services/providers/content/content.service-definition.js +4 -0
- package/dist/modules/services/providers/content/content.service.d.ts +94 -0
- package/dist/modules/services/providers/content/content.service.js +214 -0
- package/dist/modules/services/providers/content/index.d.ts +1 -0
- package/dist/modules/{search/models → services/providers/content}/index.js +1 -1
- package/dist/modules/services/providers/demo-hive.service.d.ts +29 -0
- package/dist/modules/services/providers/demo-hive.service.js +53 -0
- package/dist/modules/services/providers/events.service.d.ts +29 -0
- package/dist/modules/services/providers/events.service.js +53 -0
- package/dist/modules/services/providers/hackschool.service.d.ts +49 -0
- package/dist/modules/services/providers/hackschool.service.js +77 -0
- package/dist/modules/services/providers/ideas.service.d.ts +18 -0
- package/dist/modules/services/providers/ideas.service.js +41 -0
- package/dist/modules/services/providers/index.d.ts +19 -0
- package/dist/modules/services/providers/index.js +35 -0
- package/dist/modules/services/providers/lunch-roulette.service.d.ts +18 -0
- package/dist/modules/services/providers/lunch-roulette.service.js +41 -0
- package/dist/modules/services/providers/mail/index.d.ts +3 -0
- package/dist/modules/services/providers/mail/index.js +19 -0
- package/dist/modules/services/providers/mail/mail-types.d.ts +30 -0
- package/dist/modules/services/providers/mail/mail-types.js +22 -0
- package/dist/modules/services/providers/mail/mail.service.d.ts +99 -0
- package/dist/modules/{mail → services/providers/mail}/mail.service.js +54 -91
- package/dist/modules/services/providers/newletter.service.d.ts +29 -0
- package/dist/modules/services/providers/newletter.service.js +53 -0
- package/dist/modules/services/providers/newsroom.service.d.ts +47 -0
- package/dist/modules/services/providers/newsroom.service.js +71 -0
- package/dist/modules/services/providers/notification/dtos/schedule-notification.dto.js +2 -0
- package/dist/modules/services/providers/notification/index.d.ts +2 -0
- package/dist/modules/services/providers/notification/index.js +18 -0
- package/dist/modules/services/providers/notification/notification.service-definition.d.ts +1 -0
- package/dist/modules/services/providers/notification/notification.service-definition.js +4 -0
- package/dist/modules/services/providers/notification/notification.service.d.ts +50 -0
- package/dist/modules/services/providers/notification/notification.service.js +130 -0
- package/dist/modules/services/providers/pass/dtos/create-guild-member-pass.dto.js +2 -0
- package/dist/modules/services/providers/pass/dtos/create-team-member-pass.dto.js +2 -0
- package/dist/modules/services/providers/pass/index.d.ts +2 -0
- package/dist/modules/services/providers/pass/index.js +18 -0
- package/dist/modules/services/providers/pass/pass-types.d.ts +18 -0
- package/dist/modules/services/providers/pass/pass-types.js +7 -0
- package/dist/modules/{pass → services/providers/pass}/pass.service.d.ts +15 -39
- package/dist/modules/{pass → services/providers/pass}/pass.service.js +46 -61
- package/dist/modules/services/providers/podcasts.service.d.ts +29 -0
- package/dist/modules/services/providers/podcasts.service.js +53 -0
- package/dist/modules/services/providers/search/dtos/index-search-document.dto.js +2 -0
- package/dist/modules/services/providers/search/index.d.ts +2 -0
- package/dist/modules/services/providers/search/index.js +18 -0
- package/dist/modules/services/providers/search/search.service-definition.d.ts +1 -0
- package/dist/modules/services/providers/search/search.service-definition.js +4 -0
- package/dist/modules/services/providers/search/search.service.d.ts +66 -0
- package/dist/modules/services/providers/search/search.service.js +171 -0
- package/dist/modules/services/providers/team.service.d.ts +29 -0
- package/dist/modules/services/providers/team.service.js +53 -0
- package/dist/modules/services/providers/tech-radar.service.d.ts +39 -0
- package/dist/modules/services/providers/tech-radar.service.js +65 -0
- package/dist/modules/services/services-module-options.interface.d.ts +4 -0
- package/dist/modules/services/services-module-options.interface.js +2 -0
- package/dist/modules/services/services-options.parameter.d.ts +1 -0
- package/dist/modules/services/services-options.parameter.js +8 -0
- package/dist/modules/services/services.module-definition.d.ts +16 -0
- package/dist/modules/services/services.module-definition.js +21 -0
- package/dist/modules/services/services.module.d.ts +17 -0
- package/dist/modules/services/services.module.js +63 -0
- package/dist/pipes/index.d.ts +2 -3
- package/dist/pipes/index.js +2 -3
- package/dist/pipes/params/hub-id.pipe.d.ts +22 -0
- package/dist/pipes/{hub-id.pipe.js → params/hub-id.pipe.js} +14 -17
- package/dist/pipes/params/hub-resource.pipe.d.ts +22 -0
- package/dist/pipes/{hub-resource.pipe.js → params/hub-resource.pipe.js} +19 -20
- package/dist/pipes/params/index.d.ts +3 -0
- package/dist/pipes/params/index.js +19 -0
- package/dist/pipes/params/mongo-id.pipe.d.ts +15 -0
- package/dist/pipes/params/mongo-id.pipe.js +52 -0
- package/dist/pipes/queries/index.d.ts +3 -0
- package/dist/pipes/queries/index.js +19 -0
- package/dist/pipes/queries/mongo-ids.pipe.d.ts +22 -0
- package/dist/pipes/queries/mongo-ids.pipe.js +60 -0
- package/dist/pipes/queries/optional-boolean.pipe.d.ts +29 -0
- package/dist/pipes/queries/optional-boolean.pipe.js +72 -0
- package/dist/pipes/queries/optional-include-drafts.pipe.d.ts +28 -0
- package/dist/pipes/queries/optional-include-drafts.pipe.js +38 -0
- package/dist/properties/index.d.ts +1 -0
- package/dist/properties/index.js +5 -0
- package/dist/swagger/index.d.ts +1 -0
- package/dist/swagger/index.js +5 -0
- package/dist/swagger/remove-public-route-auth.plugin.d.ts +9 -0
- package/dist/swagger/remove-public-route-auth.plugin.js +25 -0
- package/dist/swagger/swagger-options.interface.d.ts +14 -0
- package/dist/swagger/swagger-options.interface.js +2 -0
- package/dist/swagger/swagger.function.d.ts +11 -0
- package/dist/swagger/swagger.function.js +47 -0
- package/dist/transform/boolean.transform.js +3 -3
- package/dist/viewable.interface.js +1 -1
- package/package.json +2 -2
- package/dist/factories/index.d.ts +0 -1
- package/dist/factories/virtuals.factory.d.ts +0 -79
- package/dist/factories/virtuals.factory.js +0 -171
- package/dist/modules/authentication/guards/auth.guard.d.ts +0 -36
- package/dist/modules/authentication/guards/auth.guard.js +0 -107
- package/dist/modules/authentication/guards/internal.guard.d.ts +0 -33
- package/dist/modules/authentication/guards/internal.guard.js +0 -72
- package/dist/modules/authentication/inject-auth-options.decorator.d.ts +0 -1
- package/dist/modules/comment/comment.model.d.ts +0 -29
- package/dist/modules/comment/comment.model.js +0 -43
- package/dist/modules/content/content.module-definition.d.ts +0 -5
- package/dist/modules/content/content.module-definition.js +0 -8
- package/dist/modules/content/content.module.d.ts +0 -31
- package/dist/modules/content/content.module.js +0 -60
- package/dist/modules/content/content.service.d.ts +0 -50
- package/dist/modules/content/content.service.js +0 -145
- package/dist/modules/content/index.d.ts +0 -3
- package/dist/modules/content/index.js +0 -9
- package/dist/modules/database/model-service/dbs/hub-account.db.d.ts +0 -28
- package/dist/modules/database/model-service/dbs/hub-account.db.js +0 -44
- package/dist/modules/database/model-service/dbs/hub-books.db.d.ts +0 -23
- package/dist/modules/database/model-service/dbs/hub-books.db.js +0 -45
- package/dist/modules/database/model-service/dbs/hub-comments.db.d.ts +0 -29
- package/dist/modules/database/model-service/dbs/hub-comments.db.js +0 -68
- package/dist/modules/database/model-service/dbs/hub-content.db.d.ts +0 -24
- package/dist/modules/database/model-service/dbs/hub-content.db.js +0 -49
- package/dist/modules/database/model-service/dbs/hub-demo-hive.db.d.ts +0 -23
- package/dist/modules/database/model-service/dbs/hub-demo-hive.db.js +0 -45
- package/dist/modules/database/model-service/dbs/hub-events.db.d.ts +0 -24
- package/dist/modules/database/model-service/dbs/hub-events.db.js +0 -49
- package/dist/modules/database/model-service/dbs/hub-hackschool.db.d.ts +0 -60
- package/dist/modules/database/model-service/dbs/hub-hackschool.db.js +0 -106
- package/dist/modules/database/model-service/dbs/hub-newsroom.db.d.ts +0 -25
- package/dist/modules/database/model-service/dbs/hub-newsroom.db.js +0 -53
- package/dist/modules/database/model-service/dbs/hub-podcasts.db.d.ts +0 -23
- package/dist/modules/database/model-service/dbs/hub-podcasts.db.js +0 -45
- package/dist/modules/database/model-service/dbs/hub-team.db.d.ts +0 -22
- package/dist/modules/database/model-service/dbs/hub-team.db.js +0 -41
- package/dist/modules/database/model-service/dbs/hub-tech-radar.db.d.ts +0 -42
- package/dist/modules/database/model-service/dbs/hub-tech-radar.db.js +0 -81
- package/dist/modules/database/model-service/model.service.d.ts +0 -6407
- package/dist/modules/database/model-service/model.service.js +0 -136
- package/dist/modules/database/populate-service/populate.service.d.ts +0 -73
- package/dist/modules/database/populate-service/populate.service.js +0 -163
- package/dist/modules/database/service-mapper-service/service-mapper.service.d.ts +0 -32
- package/dist/modules/database/service-mapper-service/service-mapper.service.js +0 -73
- package/dist/modules/fetch/fetch.module.d.ts +0 -31
- package/dist/modules/fetch/fetch.module.js +0 -60
- package/dist/modules/fetch/fetch.service.d.ts +0 -153
- package/dist/modules/fetch/fetch.service.js +0 -274
- package/dist/modules/fetch/index.d.ts +0 -2
- package/dist/modules/fetch/index.js +0 -7
- package/dist/modules/mail/index.d.ts +0 -4
- package/dist/modules/mail/index.js +0 -23
- package/dist/modules/mail/mail.module.d.ts +0 -31
- package/dist/modules/mail/mail.module.js +0 -60
- package/dist/modules/mail/mail.service.d.ts +0 -136
- package/dist/modules/notification/index.d.ts +0 -3
- package/dist/modules/notification/index.js +0 -22
- package/dist/modules/notification/notification.module-definition.d.ts +0 -5
- package/dist/modules/notification/notification.module-definition.js +0 -8
- package/dist/modules/notification/notification.module.d.ts +0 -34
- package/dist/modules/notification/notification.module.js +0 -63
- package/dist/modules/notification/notification.service.d.ts +0 -42
- package/dist/modules/notification/notification.service.js +0 -100
- package/dist/modules/pass/index.d.ts +0 -3
- package/dist/modules/pass/index.js +0 -22
- package/dist/modules/pass/pass.module.d.ts +0 -32
- package/dist/modules/pass/pass.module.js +0 -61
- package/dist/modules/search/index.d.ts +0 -4
- package/dist/modules/search/index.js +0 -23
- package/dist/modules/search/models/index.d.ts +0 -1
- package/dist/modules/search/search.module-definition.d.ts +0 -5
- package/dist/modules/search/search.module-definition.js +0 -8
- package/dist/modules/search/search.module.d.ts +0 -33
- package/dist/modules/search/search.module.js +0 -62
- package/dist/modules/search/search.service.d.ts +0 -49
- package/dist/modules/search/search.service.js +0 -120
- package/dist/pipes/hub-id.pipe.d.ts +0 -22
- package/dist/pipes/hub-resource.pipe.d.ts +0 -22
- package/dist/pipes/mongo-id.pipe.d.ts +0 -14
- package/dist/pipes/mongo-id.pipe.js +0 -52
- package/dist/swagger.config.d.ts +0 -36
- package/dist/swagger.config.js +0 -76
- /package/dist/modules/{mail/dtos/auth-login-token-mail.dto.js → comment/comment-module-options.interface.js} +0 -0
- /package/dist/modules/{mail/dtos/auth-password-reset-mail.dto.js → like/like-module-options.interface.js} +0 -0
- /package/dist/modules/{mail/dtos/event-cancel-mail.dto.js → merge/merge-module-options.interface.js} +0 -0
- /package/dist/modules/{mail/dtos/event-invite-mail.dto.js → merge/merge.service.interface.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/auth-login-token-mail.dto.d.ts +0 -0
- /package/dist/modules/{mail/dtos/idea-status-updated-mail.dto.js → services/providers/mail/dtos/auth-login-token-mail.dto.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/auth-password-reset-mail.dto.d.ts +0 -0
- /package/dist/modules/{mail/dtos/idea-submitted-mail.dto.js → services/providers/mail/dtos/auth-password-reset-mail.dto.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/event-cancel-mail.dto.d.ts +0 -0
- /package/dist/modules/{mail/dtos/lunch-roulette-cancel-mail.dto.js → services/providers/mail/dtos/event-cancel-mail.dto.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/event-invite-mail.dto.d.ts +0 -0
- /package/dist/modules/{mail/dtos/lunch-roulette-matched-mail.dto.js → services/providers/mail/dtos/event-invite-mail.dto.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/idea-status-updated-mail.dto.d.ts +0 -0
- /package/dist/modules/{mail/dtos/lunch-roulette-submitted-mail.dto.js → services/providers/mail/dtos/idea-status-updated-mail.dto.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/idea-submitted-mail.dto.d.ts +0 -0
- /package/dist/modules/{mail/dtos/lunch-roulette-unmatched-mail.dto.js → services/providers/mail/dtos/idea-submitted-mail.dto.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/index.d.ts +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/index.js +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/lunch-roulette-cancel-mail.dto.d.ts +0 -0
- /package/dist/modules/{mail/dtos/newsletter-issue-mail.dto.js → services/providers/mail/dtos/lunch-roulette-cancel-mail.dto.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/lunch-roulette-matched-mail.dto.d.ts +0 -0
- /package/dist/modules/{mail/dtos/newsletter-subscribed-mail.dto.js → services/providers/mail/dtos/lunch-roulette-matched-mail.dto.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/lunch-roulette-submitted-mail.dto.d.ts +0 -0
- /package/dist/modules/{mail/dtos/newsletter-unsubscribed-mail.dto.js → services/providers/mail/dtos/lunch-roulette-submitted-mail.dto.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/lunch-roulette-unmatched-mail.dto.d.ts +0 -0
- /package/dist/modules/{mail/dtos/notification-mail.dto.js → services/providers/mail/dtos/lunch-roulette-unmatched-mail.dto.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/newsletter-issue-mail.dto.d.ts +0 -0
- /package/dist/modules/{notification/dtos/schedule-notification.dto.js → services/providers/mail/dtos/newsletter-issue-mail.dto.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/newsletter-subscribed-mail.dto.d.ts +0 -0
- /package/dist/modules/{pass/dtos/create-guild-member-pass.dto.js → services/providers/mail/dtos/newsletter-subscribed-mail.dto.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/newsletter-unsubscribed-mail.dto.d.ts +0 -0
- /package/dist/modules/{pass/dtos/create-team-member-pass.dto.js → services/providers/mail/dtos/newsletter-unsubscribed-mail.dto.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/dtos/notification-mail.dto.d.ts +0 -0
- /package/dist/modules/{search/dtos/index-search-document.dto.js → services/providers/mail/dtos/notification-mail.dto.js} +0 -0
- /package/dist/modules/{mail → services/providers/mail}/models/index.d.ts +0 -0
- /package/dist/modules/{mail → services/providers/mail}/models/index.js +0 -0
- /package/dist/modules/{mail → services/providers/mail}/models/mail-recipient.model.d.ts +0 -0
- /package/dist/modules/{mail → services/providers/mail}/models/mail-recipient.model.js +0 -0
- /package/dist/modules/{notification → services/providers/notification}/dtos/index.d.ts +0 -0
- /package/dist/modules/{notification → services/providers/notification}/dtos/index.js +0 -0
- /package/dist/modules/{notification → services/providers/notification}/dtos/schedule-notification.dto.d.ts +0 -0
- /package/dist/modules/{pass → services/providers/pass}/dtos/create-guild-member-pass.dto.d.ts +0 -0
- /package/dist/modules/{pass → services/providers/pass}/dtos/create-team-member-pass.dto.d.ts +0 -0
- /package/dist/modules/{pass → services/providers/pass}/dtos/index.d.ts +0 -0
- /package/dist/modules/{pass → services/providers/pass}/dtos/index.js +0 -0
- /package/dist/modules/{search → services/providers/search}/dtos/index-search-document.dto.d.ts +0 -0
- /package/dist/modules/{search → services/providers/search}/dtos/index.d.ts +0 -0
- /package/dist/modules/{search → services/providers/search}/dtos/index.js +0 -0
- /package/dist/{modules/content → properties}/content.property.d.ts +0 -0
- /package/dist/{modules/content → properties}/content.property.js +0 -0
|
@@ -4,36 +4,52 @@ exports.BadBodyException = void 0;
|
|
|
4
4
|
exports.ApiBadBodyResponse = ApiBadBodyResponse;
|
|
5
5
|
const common_1 = require("@nestjs/common");
|
|
6
6
|
const swagger_1 = require("@nestjs/swagger");
|
|
7
|
+
/**
|
|
8
|
+
* Default error message returned when the request body cannot be processed.
|
|
9
|
+
* This ensures consistency across thrown exceptions and documented responses.
|
|
10
|
+
*/
|
|
11
|
+
const defaultBadBodyErrorMessage = 'The request body is invalid or malformed.';
|
|
7
12
|
/**
|
|
8
13
|
* BadBodyException
|
|
9
14
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* or
|
|
15
|
+
* Custom exception extending NestJS's `UnprocessableEntityException`.
|
|
16
|
+
* This exception should be thrown when the request body fails validation
|
|
17
|
+
* or cannot be interpreted correctly by the server.
|
|
18
|
+
*
|
|
19
|
+
* Typical scenarios include:
|
|
20
|
+
* - Missing required fields
|
|
21
|
+
* - Incorrect or unexpected data types
|
|
22
|
+
* - Values violating schema constraints or business rules
|
|
13
23
|
*
|
|
14
|
-
*
|
|
24
|
+
* By encapsulating this exception, we provide a clear and consistent
|
|
25
|
+
* mechanism for handling client input errors across the application.
|
|
15
26
|
*/
|
|
16
27
|
class BadBodyException extends common_1.UnprocessableEntityException {
|
|
17
28
|
/**
|
|
18
|
-
*
|
|
29
|
+
* Constructs a new `BadBodyException`.
|
|
19
30
|
*
|
|
20
|
-
* @param {string} [message] - Optional error message
|
|
31
|
+
* @param {string} [message] - Optional custom error message for additional context.
|
|
32
|
+
* Defaults to a standardized message if not provided.
|
|
21
33
|
*/
|
|
22
34
|
constructor(message) {
|
|
23
|
-
super(message ||
|
|
35
|
+
super(message || defaultBadBodyErrorMessage);
|
|
24
36
|
}
|
|
25
37
|
}
|
|
26
38
|
exports.BadBodyException = BadBodyException;
|
|
27
39
|
/**
|
|
28
40
|
* ApiBadBodyResponse
|
|
29
41
|
*
|
|
30
|
-
* Swagger decorator for
|
|
42
|
+
* Swagger documentation decorator for `422 Unprocessable Entity` responses.
|
|
43
|
+
* Apply this to routes that may reject invalid or malformed request bodies.
|
|
44
|
+
* This ensures the generated API documentation communicates the validation
|
|
45
|
+
* expectations and error conditions to API consumers.
|
|
31
46
|
*
|
|
32
47
|
* @param {string} [description] - Optional custom description for the response.
|
|
33
|
-
*
|
|
48
|
+
* Defaults to a standardized message if not provided.
|
|
49
|
+
* @returns {MethodDecorator} - Swagger method decorator marking the response.
|
|
34
50
|
*/
|
|
35
51
|
function ApiBadBodyResponse(description) {
|
|
36
52
|
return (0, swagger_1.ApiUnprocessableEntityResponse)({
|
|
37
|
-
description: description ||
|
|
53
|
+
description: description || defaultBadBodyErrorMessage,
|
|
38
54
|
});
|
|
39
55
|
}
|
|
@@ -2,25 +2,40 @@ import { BadRequestException } from '@nestjs/common';
|
|
|
2
2
|
/**
|
|
3
3
|
* BadParameterException
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Custom exception extending NestJS's `BadRequestException`.
|
|
6
|
+
* This exception is thrown when one or more request parameters (query,
|
|
7
|
+
* route, or body) are invalid or malformed.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
+
* Common scenarios:
|
|
10
|
+
* - Query string contains unexpected or invalid values
|
|
11
|
+
* - Route parameters fail validation
|
|
12
|
+
* - Request body includes fields that do not conform to expected types
|
|
13
|
+
*
|
|
14
|
+
* By encapsulating this exception, we standardize error responses for
|
|
15
|
+
* invalid parameters and provide consistent error messaging across the API.
|
|
9
16
|
*/
|
|
10
17
|
export declare class BadParameterException extends BadRequestException {
|
|
11
18
|
/**
|
|
12
|
-
* Constructs a BadParameterException
|
|
19
|
+
* Constructs a new `BadParameterException`.
|
|
13
20
|
*
|
|
14
|
-
* @param {string} [parameter] -
|
|
21
|
+
* @param {string} [parameter] - Optional name of the invalid parameter.
|
|
22
|
+
* If provided, the message will reference that parameter directly.
|
|
15
23
|
*/
|
|
16
24
|
constructor(parameter?: string);
|
|
17
25
|
}
|
|
18
26
|
/**
|
|
19
27
|
* ApiBadParameterResponse
|
|
20
28
|
*
|
|
21
|
-
* Swagger decorator for
|
|
29
|
+
* Swagger documentation decorator for `400 Bad Request` responses caused
|
|
30
|
+
* by invalid request parameters. This makes it explicit in API docs that
|
|
31
|
+
* certain routes may reject requests with malformed or unsupported input.
|
|
32
|
+
*
|
|
33
|
+
* The decorator dynamically adjusts the description based on the provided
|
|
34
|
+
* parameter names, making documentation precise and self-explanatory.
|
|
22
35
|
*
|
|
23
|
-
* @param {string
|
|
24
|
-
*
|
|
36
|
+
* @param {...string} params - One or more invalid parameter names to
|
|
37
|
+
* include in the response description. If none are provided, a generic
|
|
38
|
+
* description is used instead.
|
|
39
|
+
* @returns {MethodDecorator} - Swagger method decorator for a 400 response.
|
|
25
40
|
*/
|
|
26
41
|
export declare function ApiBadParameterResponse(...params: string[]): MethodDecorator;
|
|
@@ -4,42 +4,64 @@ exports.BadParameterException = void 0;
|
|
|
4
4
|
exports.ApiBadParameterResponse = ApiBadParameterResponse;
|
|
5
5
|
const common_1 = require("@nestjs/common");
|
|
6
6
|
const swagger_1 = require("@nestjs/swagger");
|
|
7
|
-
const itlab_functions_1 = require("itlab-functions");
|
|
8
7
|
/**
|
|
9
8
|
* BadParameterException
|
|
10
9
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* Custom exception extending NestJS's `BadRequestException`.
|
|
11
|
+
* This exception is thrown when one or more request parameters (query,
|
|
12
|
+
* route, or body) are invalid or malformed.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
14
|
+
* Common scenarios:
|
|
15
|
+
* - Query string contains unexpected or invalid values
|
|
16
|
+
* - Route parameters fail validation
|
|
17
|
+
* - Request body includes fields that do not conform to expected types
|
|
18
|
+
*
|
|
19
|
+
* By encapsulating this exception, we standardize error responses for
|
|
20
|
+
* invalid parameters and provide consistent error messaging across the API.
|
|
15
21
|
*/
|
|
16
22
|
class BadParameterException extends common_1.BadRequestException {
|
|
17
23
|
/**
|
|
18
|
-
* Constructs a BadParameterException
|
|
24
|
+
* Constructs a new `BadParameterException`.
|
|
19
25
|
*
|
|
20
|
-
* @param {string} [parameter] -
|
|
26
|
+
* @param {string} [parameter] - Optional name of the invalid parameter.
|
|
27
|
+
* If provided, the message will reference that parameter directly.
|
|
21
28
|
*/
|
|
22
29
|
constructor(parameter) {
|
|
23
|
-
super(parameter ? `Invalid parameter: ${parameter}` : 'One or more parameters are invalid.');
|
|
30
|
+
super(parameter ? `Invalid parameter: ${parameter}` : 'One or more request parameters are invalid.');
|
|
24
31
|
}
|
|
25
32
|
}
|
|
26
33
|
exports.BadParameterException = BadParameterException;
|
|
27
34
|
/**
|
|
28
35
|
* ApiBadParameterResponse
|
|
29
36
|
*
|
|
30
|
-
* Swagger decorator for
|
|
37
|
+
* Swagger documentation decorator for `400 Bad Request` responses caused
|
|
38
|
+
* by invalid request parameters. This makes it explicit in API docs that
|
|
39
|
+
* certain routes may reject requests with malformed or unsupported input.
|
|
40
|
+
*
|
|
41
|
+
* The decorator dynamically adjusts the description based on the provided
|
|
42
|
+
* parameter names, making documentation precise and self-explanatory.
|
|
31
43
|
*
|
|
32
|
-
* @param {string
|
|
33
|
-
*
|
|
44
|
+
* @param {...string} params - One or more invalid parameter names to
|
|
45
|
+
* include in the response description. If none are provided, a generic
|
|
46
|
+
* description is used instead.
|
|
47
|
+
* @returns {MethodDecorator} - Swagger method decorator for a 400 response.
|
|
34
48
|
*/
|
|
35
49
|
function ApiBadParameterResponse(...params) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
const decorator = (target, propertyKey, descriptor) => {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
// Extract existing Swagger metadata for this method (if any).
|
|
53
|
+
const existingResponses = Reflect.getMetadata('swagger/apiResponse', (descriptor === null || descriptor === void 0 ? void 0 : descriptor.value) || target) || {};
|
|
54
|
+
// Collect any already-registered bad request description.
|
|
55
|
+
const existingDescription = (_b = (_a = existingResponses === null || existingResponses === void 0 ? void 0 : existingResponses[400]) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : '';
|
|
56
|
+
// Format description with proper pluralization.
|
|
57
|
+
const pluralized = params.length > 1 ? 's' : '';
|
|
58
|
+
const newDescription = params.length
|
|
59
|
+
? `Invalid parameter${pluralized}: ${params.join(', ')}`
|
|
60
|
+
: 'One or more request parameters are invalid.';
|
|
61
|
+
// Merge with existing description if needed.
|
|
62
|
+
const mergedDescription = existingDescription ? `${existingDescription}<br />${newDescription}` : newDescription;
|
|
63
|
+
// Apply merged Swagger metadata.
|
|
64
|
+
(0, swagger_1.ApiBadRequestResponse)({ description: mergedDescription })(target, propertyKey, descriptor);
|
|
65
|
+
};
|
|
66
|
+
return decorator;
|
|
45
67
|
}
|
|
@@ -2,25 +2,37 @@ import { ConflictException } from '@nestjs/common';
|
|
|
2
2
|
/**
|
|
3
3
|
* DuplicateException
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Custom exception extending NestJS's `ConflictException`.
|
|
6
|
+
* This should be thrown when an operation attempts to create or register
|
|
7
|
+
* an entity that violates a uniqueness constraint or already exists in the system.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
+
* Typical scenarios include:
|
|
10
|
+
* - Attempting to register a username or email already in use
|
|
11
|
+
* - Inserting database records that violate unique constraints
|
|
12
|
+
* - Uploading or creating resources with duplicate identifiers
|
|
13
|
+
*
|
|
14
|
+
* Returning a standardized `409 Conflict` response helps API consumers
|
|
15
|
+
* distinguish duplication errors from other kinds of client-side mistakes.
|
|
9
16
|
*/
|
|
10
17
|
export declare class DuplicateException extends ConflictException {
|
|
11
18
|
/**
|
|
12
|
-
*
|
|
19
|
+
* Creates a new `DuplicateException`.
|
|
13
20
|
*
|
|
14
|
-
* @param {string} [message] - Optional
|
|
21
|
+
* @param {string} [message] - Optional custom error message describing
|
|
22
|
+
* the specific duplication issue. Defaults to a standardized message if omitted.
|
|
15
23
|
*/
|
|
16
24
|
constructor(message?: string);
|
|
17
25
|
}
|
|
18
26
|
/**
|
|
19
27
|
* ApiDuplicateResponse
|
|
20
28
|
*
|
|
21
|
-
* Swagger decorator for
|
|
29
|
+
* Swagger documentation decorator for `409 Conflict` responses caused
|
|
30
|
+
* by duplicate resource creation attempts. Applying this decorator
|
|
31
|
+
* ensures that the generated API docs communicate uniqueness constraints
|
|
32
|
+
* and possible error conditions clearly to consumers.
|
|
22
33
|
*
|
|
23
|
-
* @param {string} [description] - Optional description
|
|
24
|
-
*
|
|
34
|
+
* @param {string} [description] - Optional custom description of the duplication error.
|
|
35
|
+
* Defaults to a standardized message if omitted.
|
|
36
|
+
* @returns {MethodDecorator} - Swagger method decorator for documenting conflict responses.
|
|
25
37
|
*/
|
|
26
38
|
export declare function ApiDuplicateResponse(description?: string): MethodDecorator;
|
|
@@ -4,35 +4,52 @@ exports.DuplicateException = void 0;
|
|
|
4
4
|
exports.ApiDuplicateResponse = ApiDuplicateResponse;
|
|
5
5
|
const common_1 = require("@nestjs/common");
|
|
6
6
|
const swagger_1 = require("@nestjs/swagger");
|
|
7
|
+
/**
|
|
8
|
+
* Default error message used when a duplicate resource is encountered.
|
|
9
|
+
* This ensures consistent error responses and simplifies reuse across the app.
|
|
10
|
+
*/
|
|
11
|
+
const defaultDuplicateResourceMessage = 'A resource with the same value already exists.';
|
|
7
12
|
/**
|
|
8
13
|
* DuplicateException
|
|
9
14
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
15
|
+
* Custom exception extending NestJS's `ConflictException`.
|
|
16
|
+
* This should be thrown when an operation attempts to create or register
|
|
17
|
+
* an entity that violates a uniqueness constraint or already exists in the system.
|
|
18
|
+
*
|
|
19
|
+
* Typical scenarios include:
|
|
20
|
+
* - Attempting to register a username or email already in use
|
|
21
|
+
* - Inserting database records that violate unique constraints
|
|
22
|
+
* - Uploading or creating resources with duplicate identifiers
|
|
12
23
|
*
|
|
13
|
-
*
|
|
24
|
+
* Returning a standardized `409 Conflict` response helps API consumers
|
|
25
|
+
* distinguish duplication errors from other kinds of client-side mistakes.
|
|
14
26
|
*/
|
|
15
27
|
class DuplicateException extends common_1.ConflictException {
|
|
16
28
|
/**
|
|
17
|
-
*
|
|
29
|
+
* Creates a new `DuplicateException`.
|
|
18
30
|
*
|
|
19
|
-
* @param {string} [message] - Optional
|
|
31
|
+
* @param {string} [message] - Optional custom error message describing
|
|
32
|
+
* the specific duplication issue. Defaults to a standardized message if omitted.
|
|
20
33
|
*/
|
|
21
34
|
constructor(message) {
|
|
22
|
-
super(message ||
|
|
35
|
+
super(message || defaultDuplicateResourceMessage);
|
|
23
36
|
}
|
|
24
37
|
}
|
|
25
38
|
exports.DuplicateException = DuplicateException;
|
|
26
39
|
/**
|
|
27
40
|
* ApiDuplicateResponse
|
|
28
41
|
*
|
|
29
|
-
* Swagger decorator for
|
|
42
|
+
* Swagger documentation decorator for `409 Conflict` responses caused
|
|
43
|
+
* by duplicate resource creation attempts. Applying this decorator
|
|
44
|
+
* ensures that the generated API docs communicate uniqueness constraints
|
|
45
|
+
* and possible error conditions clearly to consumers.
|
|
30
46
|
*
|
|
31
|
-
* @param {string} [description] - Optional description
|
|
32
|
-
*
|
|
47
|
+
* @param {string} [description] - Optional custom description of the duplication error.
|
|
48
|
+
* Defaults to a standardized message if omitted.
|
|
49
|
+
* @returns {MethodDecorator} - Swagger method decorator for documenting conflict responses.
|
|
33
50
|
*/
|
|
34
51
|
function ApiDuplicateResponse(description) {
|
|
35
52
|
return (0, swagger_1.ApiConflictResponse)({
|
|
36
|
-
description: description ||
|
|
53
|
+
description: description || defaultDuplicateResourceMessage,
|
|
37
54
|
});
|
|
38
55
|
}
|
package/dist/exceptions/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./authenticated-user-required.exception"), exports);
|
|
17
18
|
__exportStar(require("./bad-body.exception"), exports);
|
|
18
19
|
__exportStar(require("./bad-parameter.exception"), exports);
|
|
19
20
|
__exportStar(require("./duplicate.exception"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Document, Schema } from 'mongoose';
|
|
2
|
+
/**
|
|
3
|
+
* Enhances a Mongoose schema by adding virtual fields for computed values.
|
|
4
|
+
*
|
|
5
|
+
* This function inspects the schema's definition for special tracking arrays
|
|
6
|
+
* (such as `_viewedBy` or `_likedBy`). If those arrays exist, it adds
|
|
7
|
+
* corresponding virtual properties (`views` and `likes`) to the schema.
|
|
8
|
+
* These virtuals provide a clean way to access the number of views or likes
|
|
9
|
+
* without needing to calculate them manually each time.
|
|
10
|
+
*
|
|
11
|
+
* @template T - A type extending the Mongoose Document interface.
|
|
12
|
+
* @param {Schema<T>} schema - The Mongoose schema to augment with virtuals.
|
|
13
|
+
* @returns {void} - Modifies the schema in place; no return value.
|
|
14
|
+
*/
|
|
15
|
+
export declare function addViewsLikesVirtuals<T extends Document>(schema: Schema<T>): void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addViewsLikesVirtuals = addViewsLikesVirtuals;
|
|
4
|
+
const class_validator_1 = require("class-validator");
|
|
5
|
+
/**
|
|
6
|
+
* Enhances a Mongoose schema by adding virtual fields for computed values.
|
|
7
|
+
*
|
|
8
|
+
* This function inspects the schema's definition for special tracking arrays
|
|
9
|
+
* (such as `_viewedBy` or `_likedBy`). If those arrays exist, it adds
|
|
10
|
+
* corresponding virtual properties (`views` and `likes`) to the schema.
|
|
11
|
+
* These virtuals provide a clean way to access the number of views or likes
|
|
12
|
+
* without needing to calculate them manually each time.
|
|
13
|
+
*
|
|
14
|
+
* @template T - A type extending the Mongoose Document interface.
|
|
15
|
+
* @param {Schema<T>} schema - The Mongoose schema to augment with virtuals.
|
|
16
|
+
* @returns {void} - Modifies the schema in place; no return value.
|
|
17
|
+
*/
|
|
18
|
+
function addViewsLikesVirtuals(schema) {
|
|
19
|
+
/**
|
|
20
|
+
* Add a `views` virtual property if the schema tracks viewers.
|
|
21
|
+
*
|
|
22
|
+
* The virtual computes the number of users who viewed the document
|
|
23
|
+
* by returning the length of the `_viewedBy` array.
|
|
24
|
+
*/
|
|
25
|
+
if ('_viewedBy' in schema.obj) {
|
|
26
|
+
schema.virtual('views').get(function () {
|
|
27
|
+
// Ensure `_viewedBy` exists and is an array before counting
|
|
28
|
+
return '_viewedBy' in this && (0, class_validator_1.isArray)(this._viewedBy) ? this._viewedBy.length : 0;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Add a `likes` virtual property if the schema tracks likes.
|
|
33
|
+
*
|
|
34
|
+
* The virtual computes the number of users who liked the document
|
|
35
|
+
* by returning the length of the `_likedBy` array.
|
|
36
|
+
*/
|
|
37
|
+
if ('_likedBy' in schema.obj) {
|
|
38
|
+
schema.virtual('likes').get(function () {
|
|
39
|
+
// Ensure `_likedBy` exists and is an array before counting
|
|
40
|
+
return '_likedBy' in this && (0, class_validator_1.isArray)(this._likedBy) ? this._likedBy.length : 0;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.createInternalAxiosClient = createInternalAxiosClient;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const
|
|
8
|
+
const service_auth_guard_1 = require("../modules/authentication/guards/service-auth.guard");
|
|
9
9
|
/**
|
|
10
10
|
* Creates a pre-configured Axios instance for internal service communication.
|
|
11
11
|
*
|
|
@@ -24,7 +24,7 @@ function createInternalAxiosClient(options) {
|
|
|
24
24
|
return axios_1.default.create({
|
|
25
25
|
baseURL: baseUrl,
|
|
26
26
|
headers: {
|
|
27
|
-
[
|
|
27
|
+
[service_auth_guard_1.SERVICE_AUTH_HEADER_KEY]: k8sToken, // Inject internal authentication token
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { addViewsLikesVirtuals } from './add-views-likes-virtuals.function';
|
|
1
2
|
export { createDuplicateChecker } from './create-duplicate-checker.function';
|
|
2
3
|
export { createInternalAxiosClient } from './create-internal-axios-client.function';
|
|
3
4
|
export { createSchemaTransformer } from './create-schema-transformer.function';
|
package/dist/functions/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createSchemaTransformer = exports.createInternalAxiosClient = exports.createDuplicateChecker = void 0;
|
|
3
|
+
exports.createSchemaTransformer = exports.createInternalAxiosClient = exports.createDuplicateChecker = exports.addViewsLikesVirtuals = void 0;
|
|
4
|
+
var add_views_likes_virtuals_function_1 = require("./add-views-likes-virtuals.function");
|
|
5
|
+
Object.defineProperty(exports, "addViewsLikesVirtuals", { enumerable: true, get: function () { return add_views_likes_virtuals_function_1.addViewsLikesVirtuals; } });
|
|
4
6
|
var create_duplicate_checker_function_1 = require("./create-duplicate-checker.function");
|
|
5
7
|
Object.defineProperty(exports, "createDuplicateChecker", { enumerable: true, get: function () { return create_duplicate_checker_function_1.createDuplicateChecker; } });
|
|
6
8
|
var create_internal_axios_client_function_1 = require("./create-internal-axios-client.function");
|
package/dist/index.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ export * from './classes';
|
|
|
2
2
|
export * from './controllers';
|
|
3
3
|
export * from './decorators';
|
|
4
4
|
export * from './exceptions';
|
|
5
|
-
export * from './factories';
|
|
6
5
|
export * from './functions';
|
|
7
6
|
export * from './models';
|
|
8
7
|
export * from './modules';
|
|
9
8
|
export * from './pipes';
|
|
9
|
+
export * from './properties';
|
|
10
|
+
export * from './swagger';
|
|
10
11
|
export * from './transform';
|
|
11
12
|
export * from './http-logger.middleware';
|
|
12
13
|
export * from './hub-resource.enum';
|
|
13
14
|
export * from './likeable.interface';
|
|
14
|
-
export * from './swagger.config';
|
|
15
15
|
export * from './viewable.interface';
|
package/dist/index.js
CHANGED
|
@@ -18,14 +18,14 @@ __exportStar(require("./classes"), exports);
|
|
|
18
18
|
__exportStar(require("./controllers"), exports);
|
|
19
19
|
__exportStar(require("./decorators"), exports);
|
|
20
20
|
__exportStar(require("./exceptions"), exports);
|
|
21
|
-
__exportStar(require("./factories"), exports);
|
|
22
21
|
__exportStar(require("./functions"), exports);
|
|
23
22
|
__exportStar(require("./models"), exports);
|
|
24
23
|
__exportStar(require("./modules"), exports);
|
|
25
24
|
__exportStar(require("./pipes"), exports);
|
|
25
|
+
__exportStar(require("./properties"), exports);
|
|
26
|
+
__exportStar(require("./swagger"), exports);
|
|
26
27
|
__exportStar(require("./transform"), exports);
|
|
27
28
|
__exportStar(require("./http-logger.middleware"), exports);
|
|
28
29
|
__exportStar(require("./hub-resource.enum"), exports);
|
|
29
30
|
__exportStar(require("./likeable.interface"), exports);
|
|
30
|
-
__exportStar(require("./swagger.config"), exports);
|
|
31
31
|
__exportStar(require("./viewable.interface"), exports);
|
|
@@ -25,7 +25,7 @@ export interface Likeable {
|
|
|
25
25
|
export declare function PropertyLikedBy(): PropertyDecorator;
|
|
26
26
|
/**
|
|
27
27
|
* Swagger property decorator for documenting the `_likedBy` field in API specs.
|
|
28
|
-
* Describes the field as an array of `
|
|
28
|
+
* Describes the field as an array of `Account` and documents its usage.
|
|
29
29
|
*
|
|
30
30
|
* This improves visibility in auto-generated API docs for consumers of likeable entities.
|
|
31
31
|
*
|
|
@@ -19,7 +19,7 @@ function PropertyLikedBy() {
|
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Swagger property decorator for documenting the `_likedBy` field in API specs.
|
|
22
|
-
* Describes the field as an array of `
|
|
22
|
+
* Describes the field as an array of `Account` and documents its usage.
|
|
23
23
|
*
|
|
24
24
|
* This improves visibility in auto-generated API docs for consumers of likeable entities.
|
|
25
25
|
*
|
|
@@ -28,7 +28,7 @@ function PropertyLikedBy() {
|
|
|
28
28
|
function ApiLikedBy() {
|
|
29
29
|
return (0, swagger_1.ApiProperty)({
|
|
30
30
|
name: 'likedBy',
|
|
31
|
-
type: [models_1.
|
|
31
|
+
type: [models_1.Account],
|
|
32
32
|
default: [],
|
|
33
33
|
description: 'The accounts who have liked the entity.',
|
|
34
34
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { User } from './user.model';
|
|
2
|
+
/**
|
|
3
|
+
* Represents the identity and authorization details of a user account.
|
|
4
|
+
*
|
|
5
|
+
* This class is used in API responses to expose user metadata, including core profile
|
|
6
|
+
* information (email, username, avatar) and permission scopes granted to the user.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Account extends User {
|
|
9
|
+
/**
|
|
10
|
+
* List of permission keys assigned to this user.
|
|
11
|
+
* These are used to control access to features via role-based access control.
|
|
12
|
+
*
|
|
13
|
+
* @example ["news.publish", "dashboard.view"]
|
|
14
|
+
*/
|
|
15
|
+
perms: string[];
|
|
16
|
+
password: boolean;
|
|
17
|
+
disabledNotificationTypes: string[];
|
|
18
|
+
createdAt: string;
|
|
19
|
+
updatedAt: string;
|
|
20
|
+
signedUpAt?: string;
|
|
21
|
+
signedInAt?: string;
|
|
22
|
+
lastSeenAt?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Account = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const user_model_1 = require("./user.model");
|
|
15
|
+
/**
|
|
16
|
+
* Represents the identity and authorization details of a user account.
|
|
17
|
+
*
|
|
18
|
+
* This class is used in API responses to expose user metadata, including core profile
|
|
19
|
+
* information (email, username, avatar) and permission scopes granted to the user.
|
|
20
|
+
*/
|
|
21
|
+
class Account extends user_model_1.User {
|
|
22
|
+
}
|
|
23
|
+
exports.Account = Account;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, swagger_1.ApiProperty)({
|
|
26
|
+
description: 'Permission strings assigned to the account',
|
|
27
|
+
example: ['news.publish', 'dashboard.view'],
|
|
28
|
+
type: [String],
|
|
29
|
+
}),
|
|
30
|
+
__metadata("design:type", Array)
|
|
31
|
+
], Account.prototype, "perms", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, swagger_1.ApiProperty)({ description: 'Can the account sign in to the cms portal', example: false, type: Boolean }),
|
|
34
|
+
__metadata("design:type", Boolean)
|
|
35
|
+
], Account.prototype, "password", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiProperty)({ description: 'Disabled notifications' }),
|
|
38
|
+
__metadata("design:type", Array)
|
|
39
|
+
], Account.prototype, "disabledNotificationTypes", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, swagger_1.ApiProperty)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Account.prototype, "createdAt", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, swagger_1.ApiProperty)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], Account.prototype, "updatedAt", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], Account.prototype, "signedUpAt", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], Account.prototype, "signedInAt", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], Account.prototype, "lastSeenAt", void 0);
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from './filter';
|
|
2
2
|
export * from './thumbnail';
|
|
3
|
-
export {
|
|
3
|
+
export { Account } from './account.model';
|
|
4
|
+
export { SearchDocument } from './search-document.model';
|
|
4
5
|
export { ApiSearchResultResponse, SearchResult } from './search-result.model';
|
|
6
|
+
export { User } from './user.model';
|
package/dist/models/index.js
CHANGED
|
@@ -14,11 +14,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.SearchResult = exports.ApiSearchResultResponse = exports.
|
|
17
|
+
exports.User = exports.SearchResult = exports.ApiSearchResultResponse = exports.SearchDocument = exports.Account = void 0;
|
|
18
18
|
__exportStar(require("./filter"), exports);
|
|
19
19
|
__exportStar(require("./thumbnail"), exports);
|
|
20
|
-
var
|
|
21
|
-
Object.defineProperty(exports, "
|
|
20
|
+
var account_model_1 = require("./account.model");
|
|
21
|
+
Object.defineProperty(exports, "Account", { enumerable: true, get: function () { return account_model_1.Account; } });
|
|
22
|
+
var search_document_model_1 = require("./search-document.model");
|
|
23
|
+
Object.defineProperty(exports, "SearchDocument", { enumerable: true, get: function () { return search_document_model_1.SearchDocument; } });
|
|
22
24
|
var search_result_model_1 = require("./search-result.model");
|
|
23
25
|
Object.defineProperty(exports, "ApiSearchResultResponse", { enumerable: true, get: function () { return search_result_model_1.ApiSearchResultResponse; } });
|
|
24
26
|
Object.defineProperty(exports, "SearchResult", { enumerable: true, get: function () { return search_result_model_1.SearchResult; } });
|
|
27
|
+
var user_model_1 = require("./user.model");
|
|
28
|
+
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return user_model_1.User; } });
|
|
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SearchDocument = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const hub_resource_enum_1 = require("
|
|
14
|
+
const hub_resource_enum_1 = require("../hub-resource.enum");
|
|
15
15
|
/**
|
|
16
16
|
* SearchDocument
|
|
17
17
|
*
|