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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { LabPodcast } from 'itlab-functions';
|
|
3
|
+
import { AuthenticationModuleOptions } from '../../authentication';
|
|
4
|
+
import { BaseHttpService } from '../base-http.service';
|
|
5
|
+
/**
|
|
6
|
+
* PodcastsService
|
|
7
|
+
*
|
|
8
|
+
* Service client for interacting with the Podcasts domain.
|
|
9
|
+
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
10
|
+
*/
|
|
11
|
+
export declare class PodcastsService extends BaseHttpService {
|
|
12
|
+
/**
|
|
13
|
+
* Constructs a Podcasts service client.
|
|
14
|
+
*
|
|
15
|
+
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
16
|
+
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
17
|
+
*/
|
|
18
|
+
constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves a single podcast entry by its MongoDB identifier.
|
|
21
|
+
*
|
|
22
|
+
* If the downstream call fails or the resource does not exist, the method
|
|
23
|
+
* will log the failure and return `undefined`.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} podcastId - Unique MongoDB identifier of the podcast item.
|
|
26
|
+
* @returns {Promise<LabPodcast | undefined>} Resolves to the podcast object if found, otherwise `undefined`.
|
|
27
|
+
*/
|
|
28
|
+
fetchPodcastById(podcastId: string): Promise<LabPodcast | undefined>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.PodcastsService = void 0;
|
|
16
|
+
const config_1 = require("@nestjs/config");
|
|
17
|
+
const authentication_1 = require("../../authentication");
|
|
18
|
+
const base_http_service_1 = require("../base-http.service");
|
|
19
|
+
const base_urls_1 = require("../base-urls");
|
|
20
|
+
/**
|
|
21
|
+
* PodcastsService
|
|
22
|
+
*
|
|
23
|
+
* Service client for interacting with the Podcasts domain.
|
|
24
|
+
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
25
|
+
*/
|
|
26
|
+
let PodcastsService = class PodcastsService extends base_http_service_1.BaseHttpService {
|
|
27
|
+
/**
|
|
28
|
+
* Constructs a Podcasts service client.
|
|
29
|
+
*
|
|
30
|
+
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
31
|
+
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
32
|
+
*/
|
|
33
|
+
constructor(authenticationOptions, configService) {
|
|
34
|
+
super('Podcasts', base_urls_1.BaseUrls.PodcastsService, authenticationOptions, configService);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves a single podcast entry by its MongoDB identifier.
|
|
38
|
+
*
|
|
39
|
+
* If the downstream call fails or the resource does not exist, the method
|
|
40
|
+
* will log the failure and return `undefined`.
|
|
41
|
+
*
|
|
42
|
+
* @param {string} podcastId - Unique MongoDB identifier of the podcast item.
|
|
43
|
+
* @returns {Promise<LabPodcast | undefined>} Resolves to the podcast object if found, otherwise `undefined`.
|
|
44
|
+
*/
|
|
45
|
+
async fetchPodcastById(podcastId) {
|
|
46
|
+
return this.fetchResource(`internal/podcast/${podcastId}`);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
exports.PodcastsService = PodcastsService;
|
|
50
|
+
exports.PodcastsService = PodcastsService = __decorate([
|
|
51
|
+
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
52
|
+
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
53
|
+
], PodcastsService);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./dtos"), exports);
|
|
18
|
+
__exportStar(require("./search.service"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FEATURE_SEARCH_SERVICE_TOKEN: unique symbol;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { DynamicModule } from '@nestjs/common';
|
|
2
|
+
import { ConfigService } from '@nestjs/config';
|
|
3
|
+
import { HubResource } from '../../../../hub-resource.enum';
|
|
4
|
+
import { SearchDocument } from '../../../../models';
|
|
5
|
+
import { AuthenticationModuleOptions } from '../../../authentication';
|
|
6
|
+
import { CacheService } from '../../../cache';
|
|
7
|
+
import { BaseHttpService } from '../../base-http.service';
|
|
8
|
+
import { ServicesModuleOptions } from '../../services-module-options.interface';
|
|
9
|
+
import { IndexSearchDocumentDto } from './dtos';
|
|
10
|
+
export declare function InjectFeatureSearchService(): ParameterDecorator;
|
|
11
|
+
/**
|
|
12
|
+
* SearchService
|
|
13
|
+
*
|
|
14
|
+
* Handles indexing, deindexing, and similarity search for specified resource types.
|
|
15
|
+
* Acts as a bridge to an internal search microservice (e.g., Meilisearch).
|
|
16
|
+
*/
|
|
17
|
+
export declare class SearchService extends BaseHttpService {
|
|
18
|
+
readonly options: ServicesModuleOptions;
|
|
19
|
+
private readonly cacheService?;
|
|
20
|
+
/**
|
|
21
|
+
* Creates a SearchService client for a specific resource.
|
|
22
|
+
*
|
|
23
|
+
* @param authenticationOptions Authentication options injected from the Auth module.
|
|
24
|
+
* @param options Options specifying the resource type this service operates on.
|
|
25
|
+
* @param configService NestJS configuration service for environment variables and URLs.
|
|
26
|
+
* @param cacheService Optional caching service for retrieving similar documents efficiently.
|
|
27
|
+
*/
|
|
28
|
+
constructor(authenticationOptions: AuthenticationModuleOptions, options: ServicesModuleOptions, configService: ConfigService, cacheService?: CacheService);
|
|
29
|
+
/**
|
|
30
|
+
* Factory method for creating a resource-specific SearchService module.
|
|
31
|
+
*
|
|
32
|
+
* @param resource - The resource type this module will provide services for.
|
|
33
|
+
* @returns A DynamicModule that provides a SearchService instance for the specified resource.
|
|
34
|
+
*/
|
|
35
|
+
static forResource(resource: HubResource): DynamicModule;
|
|
36
|
+
/**
|
|
37
|
+
* Indexes or updates a searchable document in the search index.
|
|
38
|
+
* Useful for ensuring resource changes are discoverable via search.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} resourceId - Unique identifier of the resource.
|
|
41
|
+
* @param {IndexSearchDocumentDto} document - Document containing searchable content.
|
|
42
|
+
*/
|
|
43
|
+
indexDocument(resourceId: string, document: IndexSearchDocumentDto): void;
|
|
44
|
+
/**
|
|
45
|
+
* Removes a resource from the search index.
|
|
46
|
+
* Ideal when the resource is deleted or should no longer be discoverable.
|
|
47
|
+
*
|
|
48
|
+
* @param {string} resourceId - Identifier of the resource to be deindexed.
|
|
49
|
+
*/
|
|
50
|
+
deleteDocument(resourceId: string): void;
|
|
51
|
+
/**
|
|
52
|
+
* Retrieves documents similar to the provided resource from the search index.
|
|
53
|
+
* Helps with content discovery and recommendations.
|
|
54
|
+
*
|
|
55
|
+
* @param {string} resourceId - Identifier of the base resource for similarity matching.
|
|
56
|
+
* @returns {Promise<SearchDocument[]>} - Array of documents similar to the given resource.
|
|
57
|
+
*/
|
|
58
|
+
getSimilarDocuments(resourceId: string): Promise<SearchDocument[]>;
|
|
59
|
+
/**
|
|
60
|
+
* Retrieves similar documents from the cache if available; otherwise fetches from the backend.
|
|
61
|
+
*
|
|
62
|
+
* @param resourceId Unique identifier of the resource.
|
|
63
|
+
* @returns Cached or freshly retrieved similar documents.
|
|
64
|
+
*/
|
|
65
|
+
getCachedSimilarDocuments(resourceId: string): Promise<SearchDocument[]>;
|
|
66
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var SearchService_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SearchService = void 0;
|
|
17
|
+
exports.InjectFeatureSearchService = InjectFeatureSearchService;
|
|
18
|
+
const common_1 = require("@nestjs/common");
|
|
19
|
+
const config_1 = require("@nestjs/config");
|
|
20
|
+
const authentication_1 = require("../../../authentication");
|
|
21
|
+
const authentication_module_definition_1 = require("../../../authentication/authentication.module-definition");
|
|
22
|
+
const cache_1 = require("../../../cache");
|
|
23
|
+
const base_http_service_1 = require("../../base-http.service");
|
|
24
|
+
const base_urls_1 = require("../../base-urls");
|
|
25
|
+
const services_options_parameter_1 = require("../../services-options.parameter");
|
|
26
|
+
const search_service_definition_1 = require("./search.service-definition");
|
|
27
|
+
function InjectFeatureSearchService() {
|
|
28
|
+
return (0, common_1.Inject)(search_service_definition_1.FEATURE_SEARCH_SERVICE_TOKEN);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* SearchService
|
|
32
|
+
*
|
|
33
|
+
* Handles indexing, deindexing, and similarity search for specified resource types.
|
|
34
|
+
* Acts as a bridge to an internal search microservice (e.g., Meilisearch).
|
|
35
|
+
*/
|
|
36
|
+
let SearchService = SearchService_1 = class SearchService extends base_http_service_1.BaseHttpService {
|
|
37
|
+
/**
|
|
38
|
+
* Creates a SearchService client for a specific resource.
|
|
39
|
+
*
|
|
40
|
+
* @param authenticationOptions Authentication options injected from the Auth module.
|
|
41
|
+
* @param options Options specifying the resource type this service operates on.
|
|
42
|
+
* @param configService NestJS configuration service for environment variables and URLs.
|
|
43
|
+
* @param cacheService Optional caching service for retrieving similar documents efficiently.
|
|
44
|
+
*/
|
|
45
|
+
constructor(authenticationOptions, options, configService, cacheService) {
|
|
46
|
+
super('Search', base_urls_1.BaseUrls.SearchService, authenticationOptions, configService);
|
|
47
|
+
this.options = options;
|
|
48
|
+
this.cacheService = cacheService;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Factory method for creating a resource-specific SearchService module.
|
|
52
|
+
*
|
|
53
|
+
* @param resource - The resource type this module will provide services for.
|
|
54
|
+
* @returns A DynamicModule that provides a SearchService instance for the specified resource.
|
|
55
|
+
*/
|
|
56
|
+
static forResource(resource) {
|
|
57
|
+
let SearchModule = class SearchModule {
|
|
58
|
+
};
|
|
59
|
+
SearchModule = __decorate([
|
|
60
|
+
(0, common_1.Module)({})
|
|
61
|
+
], SearchModule);
|
|
62
|
+
return {
|
|
63
|
+
module: SearchModule,
|
|
64
|
+
exports: [search_service_definition_1.FEATURE_SEARCH_SERVICE_TOKEN],
|
|
65
|
+
providers: [
|
|
66
|
+
{
|
|
67
|
+
provide: search_service_definition_1.FEATURE_SEARCH_SERVICE_TOKEN,
|
|
68
|
+
inject: [authentication_module_definition_1.AUTHENTICATION_MODULE_OPTIONS_TOKEN, config_1.ConfigService],
|
|
69
|
+
useFactory: (authenticationOptions, configService) => {
|
|
70
|
+
return new SearchService_1(authenticationOptions, { resource }, configService);
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Indexes or updates a searchable document in the search index.
|
|
78
|
+
* Useful for ensuring resource changes are discoverable via search.
|
|
79
|
+
*
|
|
80
|
+
* @param {string} resourceId - Unique identifier of the resource.
|
|
81
|
+
* @param {IndexSearchDocumentDto} document - Document containing searchable content.
|
|
82
|
+
*/
|
|
83
|
+
indexDocument(resourceId, document) {
|
|
84
|
+
if (!this.options.resource) {
|
|
85
|
+
this.logger.error('Cannot index document: Resource type not provided.');
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const endpoint = `internal/${this.options.resource}/${resourceId}`;
|
|
89
|
+
this.logger.log(`Indexing document for ${this.options.resource} ${resourceId}...`);
|
|
90
|
+
this.client
|
|
91
|
+
.post(endpoint, document)
|
|
92
|
+
.then(() => {
|
|
93
|
+
this.logger.log(`Document sucessfully indexed for ${this.options.resource} ${resourceId}.`);
|
|
94
|
+
})
|
|
95
|
+
.catch((error) => {
|
|
96
|
+
const { message } = this.parseError(error);
|
|
97
|
+
this.logger.error(`Document indexing failed for ${this.options.resource} ${resourceId}: ${message}`);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Removes a resource from the search index.
|
|
102
|
+
* Ideal when the resource is deleted or should no longer be discoverable.
|
|
103
|
+
*
|
|
104
|
+
* @param {string} resourceId - Identifier of the resource to be deindexed.
|
|
105
|
+
*/
|
|
106
|
+
deleteDocument(resourceId) {
|
|
107
|
+
if (!this.options.resource) {
|
|
108
|
+
this.logger.error('Cannot remove document: Resource type not provided.');
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const endpoint = `internal/${this.options.resource}/${resourceId}`;
|
|
112
|
+
this.logger.log(`Removing document for ${this.options.resource} ${resourceId}...`);
|
|
113
|
+
this.client
|
|
114
|
+
.delete(endpoint)
|
|
115
|
+
.then(() => {
|
|
116
|
+
this.logger.log(`Document removed sucessfully for ${this.options.resource} ${resourceId}.`);
|
|
117
|
+
})
|
|
118
|
+
.catch((error) => {
|
|
119
|
+
const { message } = this.parseError(error);
|
|
120
|
+
this.logger.error(`Document removal failed for ${this.options.resource} ${resourceId}: ${message}`);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Retrieves documents similar to the provided resource from the search index.
|
|
125
|
+
* Helps with content discovery and recommendations.
|
|
126
|
+
*
|
|
127
|
+
* @param {string} resourceId - Identifier of the base resource for similarity matching.
|
|
128
|
+
* @returns {Promise<SearchDocument[]>} - Array of documents similar to the given resource.
|
|
129
|
+
*/
|
|
130
|
+
async getSimilarDocuments(resourceId) {
|
|
131
|
+
if (!this.options.resource) {
|
|
132
|
+
this.logger.error('Cannot search for similar documents: Resource type not provided.');
|
|
133
|
+
return [];
|
|
134
|
+
}
|
|
135
|
+
const endpoint = `internal/${this.options.resource}/${resourceId}/similar`;
|
|
136
|
+
this.logger.log(`Fetching similar documents for ${this.options.resource} ${resourceId}...`);
|
|
137
|
+
try {
|
|
138
|
+
const { data } = await this.client.get(endpoint);
|
|
139
|
+
this.logger.log(`Successfully retrieved similar documents for ${this.options.resource} ${resourceId}.`);
|
|
140
|
+
return data;
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
const { message } = this.parseError(error);
|
|
144
|
+
this.logger.error(`Failed to fetch similar documents for ${this.options.resource} ${resourceId}: ${message}`);
|
|
145
|
+
return [];
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Retrieves similar documents from the cache if available; otherwise fetches from the backend.
|
|
150
|
+
*
|
|
151
|
+
* @param resourceId Unique identifier of the resource.
|
|
152
|
+
* @returns Cached or freshly retrieved similar documents.
|
|
153
|
+
*/
|
|
154
|
+
async getCachedSimilarDocuments(resourceId) {
|
|
155
|
+
const fetchSimilarDocuments = () => this.getSimilarDocuments(resourceId);
|
|
156
|
+
if (this.cacheService) {
|
|
157
|
+
const cacheKey = `${this.options.resource}.${resourceId}.similarDocuments`;
|
|
158
|
+
return this.cacheService.fetchOrStore(cacheKey, fetchSimilarDocuments, 600000);
|
|
159
|
+
}
|
|
160
|
+
return fetchSimilarDocuments();
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
exports.SearchService = SearchService;
|
|
164
|
+
exports.SearchService = SearchService = SearchService_1 = __decorate([
|
|
165
|
+
(0, common_1.Injectable)(),
|
|
166
|
+
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
167
|
+
__param(1, (0, services_options_parameter_1.InjectServicesOptions)()),
|
|
168
|
+
__param(3, (0, common_1.Optional)()),
|
|
169
|
+
__metadata("design:paramtypes", [Object, Object, config_1.ConfigService,
|
|
170
|
+
cache_1.CacheService])
|
|
171
|
+
], SearchService);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { LabTeamMember } from 'itlab-functions';
|
|
3
|
+
import { AuthenticationModuleOptions } from '../../authentication';
|
|
4
|
+
import { BaseHttpService } from '../base-http.service';
|
|
5
|
+
/**
|
|
6
|
+
* TeamService
|
|
7
|
+
*
|
|
8
|
+
* Service client for interacting with the Team domain.
|
|
9
|
+
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
10
|
+
*/
|
|
11
|
+
export declare class TeamService extends BaseHttpService {
|
|
12
|
+
/**
|
|
13
|
+
* Constructs a Team service client.
|
|
14
|
+
*
|
|
15
|
+
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
16
|
+
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
17
|
+
*/
|
|
18
|
+
constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves a single member entry by its MongoDB identifier.
|
|
21
|
+
*
|
|
22
|
+
* If the downstream call fails or the resource does not exist, the method
|
|
23
|
+
* will log the failure and return `undefined`.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} memberId - Unique MongoDB identifier of the member item.
|
|
26
|
+
* @returns {Promise<LabTeamMember | undefined>} Resolves to the member object if found, otherwise `undefined`.
|
|
27
|
+
*/
|
|
28
|
+
fetchMemberById(memberId: string): Promise<LabTeamMember | undefined>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.TeamService = void 0;
|
|
16
|
+
const config_1 = require("@nestjs/config");
|
|
17
|
+
const authentication_1 = require("../../authentication");
|
|
18
|
+
const base_http_service_1 = require("../base-http.service");
|
|
19
|
+
const base_urls_1 = require("../base-urls");
|
|
20
|
+
/**
|
|
21
|
+
* TeamService
|
|
22
|
+
*
|
|
23
|
+
* Service client for interacting with the Team domain.
|
|
24
|
+
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
25
|
+
*/
|
|
26
|
+
let TeamService = class TeamService extends base_http_service_1.BaseHttpService {
|
|
27
|
+
/**
|
|
28
|
+
* Constructs a Team service client.
|
|
29
|
+
*
|
|
30
|
+
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
31
|
+
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
32
|
+
*/
|
|
33
|
+
constructor(authenticationOptions, configService) {
|
|
34
|
+
super('Team', base_urls_1.BaseUrls.TeamService, authenticationOptions, configService);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves a single member entry by its MongoDB identifier.
|
|
38
|
+
*
|
|
39
|
+
* If the downstream call fails or the resource does not exist, the method
|
|
40
|
+
* will log the failure and return `undefined`.
|
|
41
|
+
*
|
|
42
|
+
* @param {string} memberId - Unique MongoDB identifier of the member item.
|
|
43
|
+
* @returns {Promise<LabTeamMember | undefined>} Resolves to the member object if found, otherwise `undefined`.
|
|
44
|
+
*/
|
|
45
|
+
async fetchMemberById(memberId) {
|
|
46
|
+
return this.fetchResource(`internal/member/${memberId}`);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
exports.TeamService = TeamService;
|
|
50
|
+
exports.TeamService = TeamService = __decorate([
|
|
51
|
+
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
52
|
+
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
53
|
+
], TeamService);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { LabTechRadarBlip, LabTechRadarEdition } from 'itlab-functions';
|
|
3
|
+
import { AuthenticationModuleOptions } from '../../authentication';
|
|
4
|
+
import { BaseHttpService } from '../base-http.service';
|
|
5
|
+
/**
|
|
6
|
+
* TechRadarService
|
|
7
|
+
*
|
|
8
|
+
* Service client for interacting with the TechRadar domain.
|
|
9
|
+
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
10
|
+
*/
|
|
11
|
+
export declare class TechRadarService extends BaseHttpService {
|
|
12
|
+
/**
|
|
13
|
+
* Constructs a TechRadar service client.
|
|
14
|
+
*
|
|
15
|
+
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
16
|
+
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
17
|
+
*/
|
|
18
|
+
constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves a single blip entry by its MongoDB identifier.
|
|
21
|
+
*
|
|
22
|
+
* If the downstream call fails or the resource does not exist, the method
|
|
23
|
+
* will log the failure and return `undefined`.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} blipId - Unique MongoDB identifier of the blip item.
|
|
26
|
+
* @returns {Promise<LabTechRadarBlip | undefined>} Resolves to the blip object if found, otherwise `undefined`.
|
|
27
|
+
*/
|
|
28
|
+
fetchBlipById(blipId: string): Promise<LabTechRadarBlip | undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* Retrieves a single edition entry by its MongoDB identifier.
|
|
31
|
+
*
|
|
32
|
+
* If the downstream call fails or the resource does not exist, the method
|
|
33
|
+
* will log the failure and return `undefined`.
|
|
34
|
+
*
|
|
35
|
+
* @param {string} editionId - Unique MongoDB identifier of the edition item.
|
|
36
|
+
* @returns {Promise<LabTechRadarEdition | undefined>} Resolves to the edition object if found, otherwise `undefined`.
|
|
37
|
+
*/
|
|
38
|
+
fetchEditionById(editionId: string): Promise<LabTechRadarEdition | undefined>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.TechRadarService = void 0;
|
|
16
|
+
const config_1 = require("@nestjs/config");
|
|
17
|
+
const authentication_1 = require("../../authentication");
|
|
18
|
+
const base_http_service_1 = require("../base-http.service");
|
|
19
|
+
const base_urls_1 = require("../base-urls");
|
|
20
|
+
/**
|
|
21
|
+
* TechRadarService
|
|
22
|
+
*
|
|
23
|
+
* Service client for interacting with the TechRadar domain.
|
|
24
|
+
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
25
|
+
*/
|
|
26
|
+
let TechRadarService = class TechRadarService extends base_http_service_1.BaseHttpService {
|
|
27
|
+
/**
|
|
28
|
+
* Constructs a TechRadar service client.
|
|
29
|
+
*
|
|
30
|
+
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
31
|
+
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
32
|
+
*/
|
|
33
|
+
constructor(authenticationOptions, configService) {
|
|
34
|
+
super('TechRadar', base_urls_1.BaseUrls.TechRadarService, authenticationOptions, configService);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves a single blip entry by its MongoDB identifier.
|
|
38
|
+
*
|
|
39
|
+
* If the downstream call fails or the resource does not exist, the method
|
|
40
|
+
* will log the failure and return `undefined`.
|
|
41
|
+
*
|
|
42
|
+
* @param {string} blipId - Unique MongoDB identifier of the blip item.
|
|
43
|
+
* @returns {Promise<LabTechRadarBlip | undefined>} Resolves to the blip object if found, otherwise `undefined`.
|
|
44
|
+
*/
|
|
45
|
+
async fetchBlipById(blipId) {
|
|
46
|
+
return this.fetchResource(`internal/blip/${blipId}`);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Retrieves a single edition entry by its MongoDB identifier.
|
|
50
|
+
*
|
|
51
|
+
* If the downstream call fails or the resource does not exist, the method
|
|
52
|
+
* will log the failure and return `undefined`.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} editionId - Unique MongoDB identifier of the edition item.
|
|
55
|
+
* @returns {Promise<LabTechRadarEdition | undefined>} Resolves to the edition object if found, otherwise `undefined`.
|
|
56
|
+
*/
|
|
57
|
+
async fetchEditionById(editionId) {
|
|
58
|
+
return this.fetchResource(`internal/edition/${editionId}`);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
exports.TechRadarService = TechRadarService;
|
|
62
|
+
exports.TechRadarService = TechRadarService = __decorate([
|
|
63
|
+
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
64
|
+
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
65
|
+
], TechRadarService);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function InjectServicesOptions(): ParameterDecorator;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InjectServicesOptions = InjectServicesOptions;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const services_module_definition_1 = require("./services.module-definition");
|
|
6
|
+
function InjectServicesOptions() {
|
|
7
|
+
return (0, common_1.Inject)(services_module_definition_1.SERVICES_MODULE_OPTIONS_TOKEN);
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ServicesModuleOptions } from './services-module-options.interface';
|
|
2
|
+
/**
|
|
3
|
+
* Builds a configurable ServicesModule base class and an injection token for module options.
|
|
4
|
+
*
|
|
5
|
+
* This leverages NestJS's ConfigurableModuleBuilder to create a base class that
|
|
6
|
+
* supports a `forRoot` static method for synchronous configuration,
|
|
7
|
+
* with global scope enabled by default.
|
|
8
|
+
*
|
|
9
|
+
* - `ServicesModuleClass` is the generated base class to extend for creating
|
|
10
|
+
* services modules with configurable options.
|
|
11
|
+
* - `SERVICES_MODULE_OPTIONS_TOKEN` is the injection token used to provide and inject
|
|
12
|
+
* service configuration options throughout the module.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ServicesModuleClass: import("@nestjs/common").ConfigurableModuleCls<ServicesModuleOptions, "forRoot", "create", {
|
|
15
|
+
isGlobal: boolean;
|
|
16
|
+
}>, SERVICES_MODULE_OPTIONS_TOKEN: string | symbol;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SERVICES_MODULE_OPTIONS_TOKEN = exports.ServicesModuleClass = void 0;
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
/**
|
|
7
|
+
* Builds a configurable ServicesModule base class and an injection token for module options.
|
|
8
|
+
*
|
|
9
|
+
* This leverages NestJS's ConfigurableModuleBuilder to create a base class that
|
|
10
|
+
* supports a `forRoot` static method for synchronous configuration,
|
|
11
|
+
* with global scope enabled by default.
|
|
12
|
+
*
|
|
13
|
+
* - `ServicesModuleClass` is the generated base class to extend for creating
|
|
14
|
+
* services modules with configurable options.
|
|
15
|
+
* - `SERVICES_MODULE_OPTIONS_TOKEN` is the injection token used to provide and inject
|
|
16
|
+
* service configuration options throughout the module.
|
|
17
|
+
*/
|
|
18
|
+
_a = new common_1.ConfigurableModuleBuilder()
|
|
19
|
+
.setClassMethodName('forRoot')
|
|
20
|
+
.setExtras({ isGlobal: true }, (definition, extras) => (Object.assign(Object.assign({}, definition), { global: extras.isGlobal })))
|
|
21
|
+
.build(), exports.ServicesModuleClass = _a.ConfigurableModuleClass, exports.SERVICES_MODULE_OPTIONS_TOKEN = _a.MODULE_OPTIONS_TOKEN;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DynamicModule } from '@nestjs/common';
|
|
2
|
+
import { ServicesModuleOptions } from './services-module-options.interface';
|
|
3
|
+
import { ServicesModuleClass } from './services.module-definition';
|
|
4
|
+
/**
|
|
5
|
+
* ServicesModule
|
|
6
|
+
*/
|
|
7
|
+
export declare class ServicesModule extends ServicesModuleClass {
|
|
8
|
+
/**
|
|
9
|
+
* Synchronously configures the ServicesModule with provided options.
|
|
10
|
+
*
|
|
11
|
+
* Extends the base ServicesModuleClass `forRoot` method by exporting the options token.
|
|
12
|
+
*
|
|
13
|
+
* @param {ServicesModuleOptions} options - Configuration options for ServicesModule setup.
|
|
14
|
+
* @returns {DynamicModule} Configured dynamic module.
|
|
15
|
+
*/
|
|
16
|
+
static forRoot(options?: ServicesModuleOptions): DynamicModule;
|
|
17
|
+
}
|