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
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { ConfigService } from '@nestjs/config';
|
|
2
|
-
import { LabBook, LabDemo, LabEvent, LabHackschoolCourse, LabHackschoolDoc, LabHackschoolThread, LabNews, LabNewsletter, LabPodcast, LabTeamMember, LabTechRadarBlip, LabTechRadarEdition } from 'itlab-functions';
|
|
3
|
-
import { FetchableHubResource } from '../../hub-resource.enum';
|
|
4
|
-
import { AccountEntity } from '../../models';
|
|
5
|
-
import { AuthenticationModuleOptions } from '../authentication';
|
|
6
|
-
/**
|
|
7
|
-
* Maps each fetchable resource type to its corresponding interface, and endpoint.
|
|
8
|
-
* This enables type-safe payload handling when fetching resources.
|
|
9
|
-
*/
|
|
10
|
-
type ResourceInterfaceMap = {
|
|
11
|
-
[FetchableHubResource.NEWSROOM_NEWS]: LabNews;
|
|
12
|
-
[FetchableHubResource.EVENTS_EVENT]: LabEvent;
|
|
13
|
-
[FetchableHubResource.DEMO_HIVE_DEMO]: LabDemo;
|
|
14
|
-
[FetchableHubResource.TECH_RADAR_BLIP]: LabTechRadarBlip;
|
|
15
|
-
[FetchableHubResource.TECH_RADAR_EDITION]: LabTechRadarEdition;
|
|
16
|
-
[FetchableHubResource.PODCASTS_PODCAST]: LabPodcast;
|
|
17
|
-
[FetchableHubResource.BOOKS_BOOK]: LabBook;
|
|
18
|
-
[FetchableHubResource.HACKSCHOOL_COURSE]: LabHackschoolCourse;
|
|
19
|
-
[FetchableHubResource.HACKSCHOOL_THREAD]: LabHackschoolThread;
|
|
20
|
-
[FetchableHubResource.HACKSCHOOL_DOC]: LabHackschoolDoc;
|
|
21
|
-
[FetchableHubResource.TEAM_MEMBER]: LabTeamMember;
|
|
22
|
-
[FetchableHubResource.NEWSLETTER_ISSUE]: LabNewsletter;
|
|
23
|
-
[FetchableHubResource.HUB_USER]: AccountEntity;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* FetchService
|
|
27
|
-
*
|
|
28
|
-
* Provides a unified API for retrieving internal hub resources using a configured
|
|
29
|
-
* Axios instance. Responses are strongly typed and logged for observability.
|
|
30
|
-
*/
|
|
31
|
-
export declare class FetchService {
|
|
32
|
-
private readonly authOptions;
|
|
33
|
-
private readonly configService;
|
|
34
|
-
private readonly logger;
|
|
35
|
-
private readonly axiosInstance;
|
|
36
|
-
private readonly isProduction;
|
|
37
|
-
/**
|
|
38
|
-
* Initializes the FetchService with appropriate API client and settings.
|
|
39
|
-
*
|
|
40
|
-
* @param {AuthenticationModuleOptions} authOptions - Contains Kubernetes service account token
|
|
41
|
-
* @param {ConfigService} configService - Configuration service for environment checks
|
|
42
|
-
*/
|
|
43
|
-
constructor(authOptions: AuthenticationModuleOptions, configService: ConfigService);
|
|
44
|
-
/**
|
|
45
|
-
* Generic resource fetcher based on resource type and ID.
|
|
46
|
-
*
|
|
47
|
-
* @template Resource
|
|
48
|
-
* @param {Resource} resource - Resource identifier enum.
|
|
49
|
-
* @param {string} resourceId - Unique ID for the resource.
|
|
50
|
-
* @returns {Promise<ResourceInterfaceMap[Resource] | undefined>} - Fetched data or undefined on failure.
|
|
51
|
-
*/
|
|
52
|
-
fetch<Resource extends FetchableHubResource>(resource: Resource, resourceId: string): Promise<ResourceInterfaceMap[Resource]>;
|
|
53
|
-
/**
|
|
54
|
-
* Checks if a given resource ID exists on the server.
|
|
55
|
-
*
|
|
56
|
-
* @param {string} resource - The resource type (enum key).
|
|
57
|
-
* @param {string} resourceId - The ID to check for existence.
|
|
58
|
-
* @returns {Promise<boolean>} - Whether the resource exists.
|
|
59
|
-
*/
|
|
60
|
-
exists(resource: string, resourceId: string): Promise<boolean>;
|
|
61
|
-
/**
|
|
62
|
-
* Fetches a news item by ID.
|
|
63
|
-
*
|
|
64
|
-
* @param {string} newsId - The ID of the news resource to fetch.
|
|
65
|
-
* @returns {Promise<LabNews | undefined>} - The fetched news item or undefined if not found.
|
|
66
|
-
*/
|
|
67
|
-
fetchNews(newsId: string): Promise<LabNews | undefined>;
|
|
68
|
-
/**
|
|
69
|
-
* Fetches an event by ID.
|
|
70
|
-
*
|
|
71
|
-
* @param {string} eventId - The ID of the event resource to fetch.
|
|
72
|
-
* @returns {Promise<LabEvent | undefined>} - The fetched event or undefined if not found.
|
|
73
|
-
*/
|
|
74
|
-
fetchEvent(eventId: string): Promise<LabEvent | undefined>;
|
|
75
|
-
/**
|
|
76
|
-
* Fetches a demo by ID.
|
|
77
|
-
*
|
|
78
|
-
* @param {string} demoId - The ID of the demo resource to fetch.
|
|
79
|
-
* @returns {Promise<LabDemo | undefined>} - The fetched demo or undefined if not found.
|
|
80
|
-
*/
|
|
81
|
-
fetchDemo(demoId: string): Promise<LabDemo | undefined>;
|
|
82
|
-
/**
|
|
83
|
-
* Fetches a technology radar blip by ID.
|
|
84
|
-
*
|
|
85
|
-
* @param {string} blipId - The ID of the blip to fetch.
|
|
86
|
-
* @returns {Promise<LabTechRadarBlip | undefined>} - The fetched blip or undefined if not found.
|
|
87
|
-
*/
|
|
88
|
-
fetchTechRadarBlip(blipId: string): Promise<LabTechRadarBlip | undefined>;
|
|
89
|
-
/**
|
|
90
|
-
* Fetches a technology radar edition by ID.
|
|
91
|
-
*
|
|
92
|
-
* @param {string} editionId - The ID of the edition to fetch.
|
|
93
|
-
* @returns {Promise<LabTechRadarEdition | undefined>} - The fetched edition or undefined if not found.
|
|
94
|
-
*/
|
|
95
|
-
fetchTechRadarEdition(editionId: string): Promise<LabTechRadarEdition | undefined>;
|
|
96
|
-
/**
|
|
97
|
-
* Fetches a podcast by ID.
|
|
98
|
-
*
|
|
99
|
-
* @param {string} podcastId - The ID of the podcast resource to fetch.
|
|
100
|
-
* @returns {Promise<LabPodcast | undefined>} - The fetched podcast or undefined if not found.
|
|
101
|
-
*/
|
|
102
|
-
fetchPodcast(podcastId: string): Promise<LabPodcast | undefined>;
|
|
103
|
-
/**
|
|
104
|
-
* Fetches a book by ID.
|
|
105
|
-
*
|
|
106
|
-
* @param {string} bookId - The ID of the book resource to fetch.
|
|
107
|
-
* @returns {Promise<LabBook | undefined>} - The fetched book or undefined if not found.
|
|
108
|
-
*/
|
|
109
|
-
fetchBook(bookId: string): Promise<LabBook | undefined>;
|
|
110
|
-
/**
|
|
111
|
-
* Fetches a Hackschool course by ID.
|
|
112
|
-
*
|
|
113
|
-
* @param {string} courseId - The ID of the course to fetch.
|
|
114
|
-
* @returns {Promise<LabHackschoolCourse | undefined>} - The fetched course or undefined if not found.
|
|
115
|
-
*/
|
|
116
|
-
fetchHackschoolCourse(courseId: string): Promise<LabHackschoolCourse | undefined>;
|
|
117
|
-
/**
|
|
118
|
-
* Fetches a Hackschool thread by ID.
|
|
119
|
-
*
|
|
120
|
-
* @param {string} threadId - The ID of the thread to fetch.
|
|
121
|
-
* @returns {Promise<LabHackschoolThread | undefined>} - The fetched thread or undefined if not found.
|
|
122
|
-
*/
|
|
123
|
-
fetchHackschoolThread(threadId: string): Promise<LabHackschoolThread | undefined>;
|
|
124
|
-
/**
|
|
125
|
-
* Fetches a Hackschool document by ID.
|
|
126
|
-
*
|
|
127
|
-
* @param {string} docId - The ID of the document to fetch.
|
|
128
|
-
* @returns {Promise<LabHackschoolDoc | undefined>} - The fetched document or undefined if not found.
|
|
129
|
-
*/
|
|
130
|
-
fetchHackschoolDoc(docId: string): Promise<LabHackschoolDoc | undefined>;
|
|
131
|
-
/**
|
|
132
|
-
* Fetches a team member by ID.
|
|
133
|
-
*
|
|
134
|
-
* @param {string} memberId - The ID of the member to fetch.
|
|
135
|
-
* @returns {Promise<LabTeamMember | undefined>} - The fetched member or undefined if not found.
|
|
136
|
-
*/
|
|
137
|
-
fetchTeamMember(memberId: string): Promise<LabTeamMember | undefined>;
|
|
138
|
-
/**
|
|
139
|
-
* Fetches a newsletter issue by ID.
|
|
140
|
-
*
|
|
141
|
-
* @param {string} newsletterId - The ID of the newsletter issue to fetch.
|
|
142
|
-
* @returns {Promise<LabNewsletter | undefined>} - The fetched newsletter or undefined if not found.
|
|
143
|
-
*/
|
|
144
|
-
fetchNewsletter(newsletterId: string): Promise<LabNewsletter | undefined>;
|
|
145
|
-
/**
|
|
146
|
-
* Fetches a user account by ID.
|
|
147
|
-
*
|
|
148
|
-
* @param {string} userId - The ID of the user account to fetch.
|
|
149
|
-
* @returns {Promise<AccountEntity | undefined>} - The fetched user or undefined if not found.
|
|
150
|
-
*/
|
|
151
|
-
fetchUser(userId: string): Promise<AccountEntity | undefined>;
|
|
152
|
-
}
|
|
153
|
-
export {};
|
|
@@ -1,274 +0,0 @@
|
|
|
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 FetchService_1;
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.FetchService = void 0;
|
|
17
|
-
const common_1 = require("@nestjs/common");
|
|
18
|
-
const config_1 = require("@nestjs/config");
|
|
19
|
-
const create_internal_axios_client_function_1 = require("../../functions/create-internal-axios-client.function");
|
|
20
|
-
const hub_resource_enum_1 = require("../../hub-resource.enum");
|
|
21
|
-
const authentication_1 = require("../authentication");
|
|
22
|
-
/**
|
|
23
|
-
* A centralized routing table mapping resources to their respective
|
|
24
|
-
* internal backend endpoints (production and non-production).
|
|
25
|
-
*/
|
|
26
|
-
const resourceEndpoints = {
|
|
27
|
-
[hub_resource_enum_1.FetchableHubResource.NEWSROOM_NEWS]: [
|
|
28
|
-
'http://organisation-hub-newsroom-backend.organisation-hub-services.svc.cluster.local:3000/internal/news/%id%',
|
|
29
|
-
'newsroom/internal/news/%id%',
|
|
30
|
-
],
|
|
31
|
-
[hub_resource_enum_1.FetchableHubResource.EVENTS_EVENT]: [
|
|
32
|
-
'http://organisation-hub-events-backend.organisation-hub-services.svc.cluster.local:3000/internal/event/%id%',
|
|
33
|
-
'events/internal/event/%id%',
|
|
34
|
-
],
|
|
35
|
-
[hub_resource_enum_1.FetchableHubResource.DEMO_HIVE_DEMO]: [
|
|
36
|
-
'http://organisation-hub-demo-hive-backend.organisation-hub-services.svc.cluster.local:3000/internal/demo/%id%',
|
|
37
|
-
'demo-hive/internal/demo/%id%',
|
|
38
|
-
],
|
|
39
|
-
[hub_resource_enum_1.FetchableHubResource.TECH_RADAR_BLIP]: [
|
|
40
|
-
'http://organisation-hub-tech-radar-backend.organisation-hub-services.svc.cluster.local:3000/internal/blip/%id%',
|
|
41
|
-
'tech-radar/internal/blip/%id%',
|
|
42
|
-
],
|
|
43
|
-
[hub_resource_enum_1.FetchableHubResource.TECH_RADAR_EDITION]: [
|
|
44
|
-
'http://organisation-hub-tech-radar-backend.organisation-hub-services.svc.cluster.local:3000/internal/edition/%id%',
|
|
45
|
-
'tech-radar/internal/edition/%id%',
|
|
46
|
-
],
|
|
47
|
-
[hub_resource_enum_1.FetchableHubResource.PODCASTS_PODCAST]: [
|
|
48
|
-
'http://organisation-hub-podcasts-backend.organisation-hub-services.svc.cluster.local:3000/internal/podcast/%id%',
|
|
49
|
-
'podcasts/internal/podcast/%id%',
|
|
50
|
-
],
|
|
51
|
-
[hub_resource_enum_1.FetchableHubResource.BOOKS_BOOK]: [
|
|
52
|
-
'http://organisation-hub-books-backend.organisation-hub-services.svc.cluster.local:3000/internal/book/%id%',
|
|
53
|
-
'books/internal/book/%id%',
|
|
54
|
-
],
|
|
55
|
-
[hub_resource_enum_1.FetchableHubResource.HACKSCHOOL_COURSE]: [
|
|
56
|
-
'http://organisation-hub-hackschool-backend.organisation-hub-services.svc.cluster.local:3000/internal/course/%id%',
|
|
57
|
-
'hackschool/internal/course/%id%',
|
|
58
|
-
],
|
|
59
|
-
[hub_resource_enum_1.FetchableHubResource.HACKSCHOOL_THREAD]: [
|
|
60
|
-
'http://organisation-hub-hackschool-backend.organisation-hub-services.svc.cluster.local:3000/internal/thread/%id%',
|
|
61
|
-
'hackschool/internal/thread/%id%',
|
|
62
|
-
],
|
|
63
|
-
[hub_resource_enum_1.FetchableHubResource.HACKSCHOOL_DOC]: [
|
|
64
|
-
'http://organisation-hub-hackschool-backend.organisation-hub-services.svc.cluster.local:3000/internal/doc/%id%',
|
|
65
|
-
'hackschool/internal/doc/%id%',
|
|
66
|
-
],
|
|
67
|
-
[hub_resource_enum_1.FetchableHubResource.TEAM_MEMBER]: [
|
|
68
|
-
'http://organisation-hub-team-backend.organisation-hub-services.svc.cluster.local:3000/internal/member/%id%',
|
|
69
|
-
'team/internal/member/%id%',
|
|
70
|
-
],
|
|
71
|
-
[hub_resource_enum_1.FetchableHubResource.NEWSLETTER_ISSUE]: [
|
|
72
|
-
'http://organisation-hub-newsletter-backend.organisation-hub-services.svc.cluster.local:3000/internal/issue/%id%',
|
|
73
|
-
'newsletter/internal/issue/%id%',
|
|
74
|
-
],
|
|
75
|
-
[hub_resource_enum_1.FetchableHubResource.HUB_USER]: [
|
|
76
|
-
'http://organisation-hub-accounts-service.organisation-hub-services.svc.cluster.local:3000/internal/account/%id%',
|
|
77
|
-
'accounts/internal/account/%id%',
|
|
78
|
-
],
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* FetchService
|
|
82
|
-
*
|
|
83
|
-
* Provides a unified API for retrieving internal hub resources using a configured
|
|
84
|
-
* Axios instance. Responses are strongly typed and logged for observability.
|
|
85
|
-
*/
|
|
86
|
-
let FetchService = FetchService_1 = class FetchService {
|
|
87
|
-
/**
|
|
88
|
-
* Initializes the FetchService with appropriate API client and settings.
|
|
89
|
-
*
|
|
90
|
-
* @param {AuthenticationModuleOptions} authOptions - Contains Kubernetes service account token
|
|
91
|
-
* @param {ConfigService} configService - Configuration service for environment checks
|
|
92
|
-
*/
|
|
93
|
-
constructor(authOptions, configService) {
|
|
94
|
-
this.authOptions = authOptions;
|
|
95
|
-
this.configService = configService;
|
|
96
|
-
this.logger = new common_1.Logger(FetchService_1.name);
|
|
97
|
-
this.isProduction = this.configService.get('NODE_ENV') === 'production';
|
|
98
|
-
// Initialize axios instance with k8s token.
|
|
99
|
-
this.axiosInstance = (0, create_internal_axios_client_function_1.createInternalAxiosClient)({
|
|
100
|
-
baseUrl: 'https://services.svi-itlab.com/',
|
|
101
|
-
k8sToken: this.authOptions.k8sToken,
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Generic resource fetcher based on resource type and ID.
|
|
106
|
-
*
|
|
107
|
-
* @template Resource
|
|
108
|
-
* @param {Resource} resource - Resource identifier enum.
|
|
109
|
-
* @param {string} resourceId - Unique ID for the resource.
|
|
110
|
-
* @returns {Promise<ResourceInterfaceMap[Resource] | undefined>} - Fetched data or undefined on failure.
|
|
111
|
-
*/
|
|
112
|
-
async fetch(resource, resourceId) {
|
|
113
|
-
const endpointTemplate = resourceEndpoints[resource][this.isProduction ? 0 : 1];
|
|
114
|
-
const resolvedUrl = endpointTemplate.replace('%id%', resourceId);
|
|
115
|
-
this.logger.log(`Fetching ${resource} with ID ${resourceId}`);
|
|
116
|
-
try {
|
|
117
|
-
const response = await this.axiosInstance.get(resolvedUrl);
|
|
118
|
-
this.logger.log(`Successfully fetched ${resource} with ID ${resourceId}`);
|
|
119
|
-
return response.data;
|
|
120
|
-
}
|
|
121
|
-
catch (error) {
|
|
122
|
-
this.logger.error(`Failed to fetch ${resource} with ID ${resourceId}: ${error.message}`);
|
|
123
|
-
return undefined;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Checks if a given resource ID exists on the server.
|
|
128
|
-
*
|
|
129
|
-
* @param {string} resource - The resource type (enum key).
|
|
130
|
-
* @param {string} resourceId - The ID to check for existence.
|
|
131
|
-
* @returns {Promise<boolean>} - Whether the resource exists.
|
|
132
|
-
*/
|
|
133
|
-
async exists(resource, resourceId) {
|
|
134
|
-
const endpoints = resourceEndpoints[resource];
|
|
135
|
-
if (!endpoints)
|
|
136
|
-
return false;
|
|
137
|
-
const endpointTemplate = endpoints[this.isProduction ? 0 : 1];
|
|
138
|
-
const resolvedUrl = endpointTemplate.replace('%id%', resourceId);
|
|
139
|
-
this.logger.log(`Checking existence of ${resource} with ID ${resourceId}`);
|
|
140
|
-
try {
|
|
141
|
-
await this.axiosInstance.get(resolvedUrl);
|
|
142
|
-
this.logger.log(`Confirmed existence of ${resource} with ID ${resourceId}`);
|
|
143
|
-
return true;
|
|
144
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
145
|
-
}
|
|
146
|
-
catch (error) {
|
|
147
|
-
this.logger.error(`Resource ${resource} with ID ${resourceId} not found`);
|
|
148
|
-
return false;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Fetches a news item by ID.
|
|
153
|
-
*
|
|
154
|
-
* @param {string} newsId - The ID of the news resource to fetch.
|
|
155
|
-
* @returns {Promise<LabNews | undefined>} - The fetched news item or undefined if not found.
|
|
156
|
-
*/
|
|
157
|
-
async fetchNews(newsId) {
|
|
158
|
-
return this.fetch(hub_resource_enum_1.FetchableHubResource.NEWSROOM_NEWS, newsId);
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Fetches an event by ID.
|
|
162
|
-
*
|
|
163
|
-
* @param {string} eventId - The ID of the event resource to fetch.
|
|
164
|
-
* @returns {Promise<LabEvent | undefined>} - The fetched event or undefined if not found.
|
|
165
|
-
*/
|
|
166
|
-
async fetchEvent(eventId) {
|
|
167
|
-
return this.fetch(hub_resource_enum_1.FetchableHubResource.EVENTS_EVENT, eventId);
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Fetches a demo by ID.
|
|
171
|
-
*
|
|
172
|
-
* @param {string} demoId - The ID of the demo resource to fetch.
|
|
173
|
-
* @returns {Promise<LabDemo | undefined>} - The fetched demo or undefined if not found.
|
|
174
|
-
*/
|
|
175
|
-
async fetchDemo(demoId) {
|
|
176
|
-
return this.fetch(hub_resource_enum_1.FetchableHubResource.DEMO_HIVE_DEMO, demoId);
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Fetches a technology radar blip by ID.
|
|
180
|
-
*
|
|
181
|
-
* @param {string} blipId - The ID of the blip to fetch.
|
|
182
|
-
* @returns {Promise<LabTechRadarBlip | undefined>} - The fetched blip or undefined if not found.
|
|
183
|
-
*/
|
|
184
|
-
async fetchTechRadarBlip(blipId) {
|
|
185
|
-
return this.fetch(hub_resource_enum_1.FetchableHubResource.TECH_RADAR_BLIP, blipId);
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Fetches a technology radar edition by ID.
|
|
189
|
-
*
|
|
190
|
-
* @param {string} editionId - The ID of the edition to fetch.
|
|
191
|
-
* @returns {Promise<LabTechRadarEdition | undefined>} - The fetched edition or undefined if not found.
|
|
192
|
-
*/
|
|
193
|
-
async fetchTechRadarEdition(editionId) {
|
|
194
|
-
return this.fetch(hub_resource_enum_1.FetchableHubResource.TECH_RADAR_EDITION, editionId);
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Fetches a podcast by ID.
|
|
198
|
-
*
|
|
199
|
-
* @param {string} podcastId - The ID of the podcast resource to fetch.
|
|
200
|
-
* @returns {Promise<LabPodcast | undefined>} - The fetched podcast or undefined if not found.
|
|
201
|
-
*/
|
|
202
|
-
async fetchPodcast(podcastId) {
|
|
203
|
-
return this.fetch(hub_resource_enum_1.FetchableHubResource.PODCASTS_PODCAST, podcastId);
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Fetches a book by ID.
|
|
207
|
-
*
|
|
208
|
-
* @param {string} bookId - The ID of the book resource to fetch.
|
|
209
|
-
* @returns {Promise<LabBook | undefined>} - The fetched book or undefined if not found.
|
|
210
|
-
*/
|
|
211
|
-
async fetchBook(bookId) {
|
|
212
|
-
return this.fetch(hub_resource_enum_1.FetchableHubResource.BOOKS_BOOK, bookId);
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Fetches a Hackschool course by ID.
|
|
216
|
-
*
|
|
217
|
-
* @param {string} courseId - The ID of the course to fetch.
|
|
218
|
-
* @returns {Promise<LabHackschoolCourse | undefined>} - The fetched course or undefined if not found.
|
|
219
|
-
*/
|
|
220
|
-
async fetchHackschoolCourse(courseId) {
|
|
221
|
-
return this.fetch(hub_resource_enum_1.FetchableHubResource.HACKSCHOOL_COURSE, courseId);
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Fetches a Hackschool thread by ID.
|
|
225
|
-
*
|
|
226
|
-
* @param {string} threadId - The ID of the thread to fetch.
|
|
227
|
-
* @returns {Promise<LabHackschoolThread | undefined>} - The fetched thread or undefined if not found.
|
|
228
|
-
*/
|
|
229
|
-
async fetchHackschoolThread(threadId) {
|
|
230
|
-
return this.fetch(hub_resource_enum_1.FetchableHubResource.HACKSCHOOL_THREAD, threadId);
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Fetches a Hackschool document by ID.
|
|
234
|
-
*
|
|
235
|
-
* @param {string} docId - The ID of the document to fetch.
|
|
236
|
-
* @returns {Promise<LabHackschoolDoc | undefined>} - The fetched document or undefined if not found.
|
|
237
|
-
*/
|
|
238
|
-
async fetchHackschoolDoc(docId) {
|
|
239
|
-
return this.fetch(hub_resource_enum_1.FetchableHubResource.HACKSCHOOL_DOC, docId);
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Fetches a team member by ID.
|
|
243
|
-
*
|
|
244
|
-
* @param {string} memberId - The ID of the member to fetch.
|
|
245
|
-
* @returns {Promise<LabTeamMember | undefined>} - The fetched member or undefined if not found.
|
|
246
|
-
*/
|
|
247
|
-
async fetchTeamMember(memberId) {
|
|
248
|
-
return this.fetch(hub_resource_enum_1.FetchableHubResource.TEAM_MEMBER, memberId);
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Fetches a newsletter issue by ID.
|
|
252
|
-
*
|
|
253
|
-
* @param {string} newsletterId - The ID of the newsletter issue to fetch.
|
|
254
|
-
* @returns {Promise<LabNewsletter | undefined>} - The fetched newsletter or undefined if not found.
|
|
255
|
-
*/
|
|
256
|
-
async fetchNewsletter(newsletterId) {
|
|
257
|
-
return this.fetch(hub_resource_enum_1.FetchableHubResource.NEWSLETTER_ISSUE, newsletterId);
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* Fetches a user account by ID.
|
|
261
|
-
*
|
|
262
|
-
* @param {string} userId - The ID of the user account to fetch.
|
|
263
|
-
* @returns {Promise<AccountEntity | undefined>} - The fetched user or undefined if not found.
|
|
264
|
-
*/
|
|
265
|
-
async fetchUser(userId) {
|
|
266
|
-
return this.fetch(hub_resource_enum_1.FetchableHubResource.HUB_USER, userId);
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
exports.FetchService = FetchService;
|
|
270
|
-
exports.FetchService = FetchService = FetchService_1 = __decorate([
|
|
271
|
-
(0, common_1.Injectable)(),
|
|
272
|
-
__param(0, (0, authentication_1.InjectAuthOptions)()),
|
|
273
|
-
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
274
|
-
], FetchService);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FetchService = exports.FetchModule = void 0;
|
|
4
|
-
var fetch_module_1 = require("./fetch.module");
|
|
5
|
-
Object.defineProperty(exports, "FetchModule", { enumerable: true, get: function () { return fetch_module_1.FetchModule; } });
|
|
6
|
-
var fetch_service_1 = require("./fetch.service");
|
|
7
|
-
Object.defineProperty(exports, "FetchService", { enumerable: true, get: function () { return fetch_service_1.FetchService; } });
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
exports.MailService = exports.MailModule = void 0;
|
|
18
|
-
__exportStar(require("./dtos"), exports);
|
|
19
|
-
__exportStar(require("./models"), exports);
|
|
20
|
-
var mail_module_1 = require("./mail.module");
|
|
21
|
-
Object.defineProperty(exports, "MailModule", { enumerable: true, get: function () { return mail_module_1.MailModule; } });
|
|
22
|
-
var mail_service_1 = require("./mail.service");
|
|
23
|
-
Object.defineProperty(exports, "MailService", { enumerable: true, get: function () { return mail_service_1.MailService; } });
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { DynamicModule } from '@nestjs/common';
|
|
2
|
-
/**
|
|
3
|
-
* MailModule
|
|
4
|
-
*
|
|
5
|
-
* Provides functionality for sending emails across the application.
|
|
6
|
-
*
|
|
7
|
-
* - Use `MailModule.forRoot()` to make the module globally available across the application.
|
|
8
|
-
* - Use `MailModule.register()` for feature-scoped usage in specific modules.
|
|
9
|
-
*/
|
|
10
|
-
export declare class MailModule {
|
|
11
|
-
/**
|
|
12
|
-
* Internal utility to generate the module configuration.
|
|
13
|
-
*
|
|
14
|
-
* @param {boolean} isGlobal - Whether the module should be globally scoped.
|
|
15
|
-
* @returns {DynamicModule} - Configured dynamic module.
|
|
16
|
-
*/
|
|
17
|
-
private static createModule;
|
|
18
|
-
/**
|
|
19
|
-
* Registers the module globally, making MailService accessible application-wide.
|
|
20
|
-
*
|
|
21
|
-
* @returns {DynamicModule} - Global dynamic module instance.
|
|
22
|
-
*/
|
|
23
|
-
static forRoot(): DynamicModule;
|
|
24
|
-
/**
|
|
25
|
-
* Registers the module locally (non-global), restricting MailService
|
|
26
|
-
* to the importing module's scope.
|
|
27
|
-
*
|
|
28
|
-
* @returns {DynamicModule} - Local dynamic module instance.
|
|
29
|
-
*/
|
|
30
|
-
static register(): DynamicModule;
|
|
31
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
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 MailModule_1;
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.MailModule = void 0;
|
|
11
|
-
const common_1 = require("@nestjs/common");
|
|
12
|
-
const mail_service_1 = require("./mail.service");
|
|
13
|
-
/**
|
|
14
|
-
* MailModule
|
|
15
|
-
*
|
|
16
|
-
* Provides functionality for sending emails across the application.
|
|
17
|
-
*
|
|
18
|
-
* - Use `MailModule.forRoot()` to make the module globally available across the application.
|
|
19
|
-
* - Use `MailModule.register()` for feature-scoped usage in specific modules.
|
|
20
|
-
*/
|
|
21
|
-
let MailModule = MailModule_1 = class MailModule {
|
|
22
|
-
/**
|
|
23
|
-
* Internal utility to generate the module configuration.
|
|
24
|
-
*
|
|
25
|
-
* @param {boolean} isGlobal - Whether the module should be globally scoped.
|
|
26
|
-
* @returns {DynamicModule} - Configured dynamic module.
|
|
27
|
-
*/
|
|
28
|
-
static createModule(isGlobal) {
|
|
29
|
-
return {
|
|
30
|
-
global: isGlobal,
|
|
31
|
-
module: MailModule_1,
|
|
32
|
-
providers: [mail_service_1.MailService],
|
|
33
|
-
exports: [mail_service_1.MailService],
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Registers the module globally, making MailService accessible application-wide.
|
|
38
|
-
*
|
|
39
|
-
* @returns {DynamicModule} - Global dynamic module instance.
|
|
40
|
-
*/
|
|
41
|
-
static forRoot() {
|
|
42
|
-
return this.createModule(true);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Registers the module locally (non-global), restricting MailService
|
|
46
|
-
* to the importing module's scope.
|
|
47
|
-
*
|
|
48
|
-
* @returns {DynamicModule} - Local dynamic module instance.
|
|
49
|
-
*/
|
|
50
|
-
static register() {
|
|
51
|
-
return this.createModule(false);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
exports.MailModule = MailModule;
|
|
55
|
-
exports.MailModule = MailModule = MailModule_1 = __decorate([
|
|
56
|
-
(0, common_1.Module)({
|
|
57
|
-
providers: [mail_service_1.MailService],
|
|
58
|
-
exports: [mail_service_1.MailService],
|
|
59
|
-
})
|
|
60
|
-
], MailModule);
|