@paroicms/server 0.151.0 → 0.151.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +5 -0
- package/dist/cli.js.map +1 -0
- package/dist/common/child-ordering-query.d.ts +13 -0
- package/dist/common/child-ordering-query.js +107 -0
- package/dist/common/child-ordering-query.js.map +1 -0
- package/dist/common/data-format.d.ts +19 -0
- package/dist/common/data-format.js +86 -0
- package/dist/common/data-format.js.map +1 -0
- package/dist/common/mail/html-helpers.d.ts +7 -0
- package/dist/common/mail/html-helpers.js +46 -0
- package/dist/common/mail/html-helpers.js.map +1 -0
- package/dist/common/mail/sendMail.helpers.d.ts +14 -0
- package/dist/common/mail/sendMail.helpers.js +51 -0
- package/dist/common/mail/sendMail.helpers.js.map +1 -0
- package/dist/common/media-handles.helpers.d.ts +19 -0
- package/dist/common/media-handles.helpers.js +52 -0
- package/dist/common/media-handles.helpers.js.map +1 -0
- package/dist/common/serve-html-or.d.ts +16 -0
- package/dist/common/serve-html-or.js +72 -0
- package/dist/common/serve-html-or.js.map +1 -0
- package/dist/common/text-cache.d.ts +57 -0
- package/dist/common/text-cache.js +87 -0
- package/dist/common/text-cache.js.map +1 -0
- package/dist/common/tracker-report.d.ts +2 -0
- package/dist/common/tracker-report.js +27 -0
- package/dist/common/tracker-report.js.map +1 -0
- package/dist/context.d.ts +29 -0
- package/dist/context.js +60 -0
- package/dist/context.js.map +1 -0
- package/dist/express/http-helpers.d.ts +16 -0
- package/dist/express/http-helpers.js +44 -0
- package/dist/express/http-helpers.js.map +1 -0
- package/dist/express/static-middlewares.d.ts +3 -0
- package/dist/express/static-middlewares.js +114 -0
- package/dist/express/static-middlewares.js.map +1 -0
- package/dist/helpers/configuration.helpers.d.ts +2 -0
- package/dist/helpers/configuration.helpers.js +8 -0
- package/dist/helpers/configuration.helpers.js.map +1 -0
- package/dist/helpers/excerpt.helpers.d.ts +2 -0
- package/dist/helpers/excerpt.helpers.js +31 -0
- package/dist/helpers/excerpt.helpers.js.map +1 -0
- package/dist/helpers/jwt-secret.helpers.d.ts +2 -0
- package/dist/helpers/jwt-secret.helpers.js +30 -0
- package/dist/helpers/jwt-secret.helpers.js.map +1 -0
- package/dist/helpers/label-translator.helper.d.ts +9 -0
- package/dist/helpers/label-translator.helper.js +14 -0
- package/dist/helpers/label-translator.helper.js.map +1 -0
- package/dist/helpers/passwordEncrypt-helper.d.ts +2 -0
- package/dist/helpers/passwordEncrypt-helper.js +37 -0
- package/dist/helpers/passwordEncrypt-helper.js.map +1 -0
- package/dist/helpers/relative-id-helper.d.ts +10 -0
- package/dist/helpers/relative-id-helper.js +37 -0
- package/dist/helpers/relative-id-helper.js.map +1 -0
- package/dist/helpers/simple-i18n.d.ts +14 -0
- package/dist/helpers/simple-i18n.js +82 -0
- package/dist/helpers/simple-i18n.js.map +1 -0
- package/dist/helpers/special-account.helpers.d.ts +9 -0
- package/dist/helpers/special-account.helpers.js +43 -0
- package/dist/helpers/special-account.helpers.js.map +1 -0
- package/dist/helpers/url.helpers.d.ts +2 -0
- package/dist/helpers/url.helpers.js +12 -0
- package/dist/helpers/url.helpers.js.map +1 -0
- package/dist/helpers/utils-helper.d.ts +4 -0
- package/dist/helpers/utils-helper.js +32 -0
- package/dist/helpers/utils-helper.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +69 -0
- package/dist/index.js.map +1 -0
- package/dist/liquidjs-tools/liquidjs-drop.d.ts +31 -0
- package/dist/liquidjs-tools/liquidjs-drop.js +45 -0
- package/dist/liquidjs-tools/liquidjs-drop.js.map +1 -0
- package/dist/liquidjs-tools/liquidjs-filter.d.ts +10 -0
- package/dist/liquidjs-tools/liquidjs-filter.js +23 -0
- package/dist/liquidjs-tools/liquidjs-filter.js.map +1 -0
- package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.d.ts +6 -0
- package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.js +40 -0
- package/dist/liquidjs-tools/liquidjs-rendering/render-liquidjs.js.map +1 -0
- package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.d.ts +25 -0
- package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.js +35 -0
- package/dist/liquidjs-tools/liquidjs-rendering/rendering-context.js.map +1 -0
- package/dist/liquidjs-tools/liquidjs-utils.d.ts +5 -0
- package/dist/liquidjs-tools/liquidjs-utils.js +22 -0
- package/dist/liquidjs-tools/liquidjs-utils.js.map +1 -0
- package/dist/liquidjs-tools/render-clone/collection.d.ts +1 -0
- package/dist/liquidjs-tools/render-clone/collection.js +18 -0
- package/dist/liquidjs-tools/render-clone/collection.js.map +1 -0
- package/dist/liquidjs-tools/render-clone/forloop-drop.d.ts +15 -0
- package/dist/liquidjs-tools/render-clone/forloop-drop.js +40 -0
- package/dist/liquidjs-tools/render-clone/forloop-drop.js.map +1 -0
- package/dist/liquidjs-tools/render-clone/render.d.ts +13 -0
- package/dist/liquidjs-tools/render-clone/render.js +108 -0
- package/dist/liquidjs-tools/render-clone/render.js.map +1 -0
- package/dist/maintenance/maintenance-task.d.ts +4 -0
- package/dist/maintenance/maintenance-task.js +27 -0
- package/dist/maintenance/maintenance-task.js.map +1 -0
- package/dist/maintenance/shutdown.d.ts +7 -0
- package/dist/maintenance/shutdown.js +51 -0
- package/dist/maintenance/shutdown.js.map +1 -0
- package/dist/modules/app.controller.d.ts +5 -0
- package/dist/modules/app.controller.js +89 -0
- package/dist/modules/app.controller.js.map +1 -0
- package/dist/modules/app.module.d.ts +2 -0
- package/dist/modules/app.module.js +48 -0
- package/dist/modules/app.module.js.map +1 -0
- package/dist/modules/core/account/account.model.d.ts +18 -0
- package/dist/modules/core/account/account.model.js +59 -0
- package/dist/modules/core/account/account.model.js.map +1 -0
- package/dist/modules/core/account/account.module.d.ts +2 -0
- package/dist/modules/core/account/account.module.js +20 -0
- package/dist/modules/core/account/account.module.js.map +1 -0
- package/dist/modules/core/account/account.queries.d.ts +18 -0
- package/dist/modules/core/account/account.queries.js +150 -0
- package/dist/modules/core/account/account.queries.js.map +1 -0
- package/dist/modules/core/account/account.resolver.d.ts +11 -0
- package/dist/modules/core/account/account.resolver.js +107 -0
- package/dist/modules/core/account/account.resolver.js.map +1 -0
- package/dist/modules/core/account/account.schema.d.ts +24 -0
- package/dist/modules/core/account/account.schema.js +114 -0
- package/dist/modules/core/account/account.schema.js.map +1 -0
- package/dist/modules/core/account-auth/account-auth.module.d.ts +2 -0
- package/dist/modules/core/account-auth/account-auth.module.js +24 -0
- package/dist/modules/core/account-auth/account-auth.module.js.map +1 -0
- package/dist/modules/core/account-auth/account-auth.service.d.ts +5 -0
- package/dist/modules/core/account-auth/account-auth.service.js +41 -0
- package/dist/modules/core/account-auth/account-auth.service.js.map +1 -0
- package/dist/modules/core/account-auth/account-auth.strategy.d.ts +10 -0
- package/dist/modules/core/account-auth/account-auth.strategy.js +48 -0
- package/dist/modules/core/account-auth/account-auth.strategy.js.map +1 -0
- package/dist/modules/core/auth/auth.module.d.ts +2 -0
- package/dist/modules/core/auth/auth.module.js +35 -0
- package/dist/modules/core/auth/auth.module.js.map +1 -0
- package/dist/modules/core/auth/auth.service.d.ts +11 -0
- package/dist/modules/core/auth/auth.service.js +163 -0
- package/dist/modules/core/auth/auth.service.js.map +1 -0
- package/dist/modules/core/auth/auth.types.d.ts +27 -0
- package/dist/modules/core/auth/auth.types.js +3 -0
- package/dist/modules/core/auth/auth.types.js.map +1 -0
- package/dist/modules/core/auth/jwt.auth.guard.d.ts +6 -0
- package/dist/modules/core/auth/jwt.auth.guard.js +23 -0
- package/dist/modules/core/auth/jwt.auth.guard.js.map +1 -0
- package/dist/modules/core/auth/jwt.strategy.d.ts +10 -0
- package/dist/modules/core/auth/jwt.strategy.js +35 -0
- package/dist/modules/core/auth/jwt.strategy.js.map +1 -0
- package/dist/modules/core/backup/backup.controller.d.ts +7 -0
- package/dist/modules/core/backup/backup.controller.js +60 -0
- package/dist/modules/core/backup/backup.controller.js.map +1 -0
- package/dist/modules/core/backup/backup.module.d.ts +2 -0
- package/dist/modules/core/backup/backup.module.js +22 -0
- package/dist/modules/core/backup/backup.module.js.map +1 -0
- package/dist/modules/core/backup/backup.resolver.d.ts +8 -0
- package/dist/modules/core/backup/backup.resolver.js +53 -0
- package/dist/modules/core/backup/backup.resolver.js.map +1 -0
- package/dist/modules/core/backup/backup.shema.d.ts +4 -0
- package/dist/modules/core/backup/backup.shema.js +30 -0
- package/dist/modules/core/backup/backup.shema.js.map +1 -0
- package/dist/modules/core/core.module.d.ts +2 -0
- package/dist/modules/core/core.module.js +50 -0
- package/dist/modules/core/core.module.js.map +1 -0
- package/dist/modules/core/document/document.helper.d.ts +2 -0
- package/dist/modules/core/document/document.helper.js +10 -0
- package/dist/modules/core/document/document.helper.js.map +1 -0
- package/dist/modules/core/document/document.model.d.ts +9 -0
- package/dist/modules/core/document/document.model.js +59 -0
- package/dist/modules/core/document/document.model.js.map +1 -0
- package/dist/modules/core/document/document.module.d.ts +2 -0
- package/dist/modules/core/document/document.module.js +25 -0
- package/dist/modules/core/document/document.module.js.map +1 -0
- package/dist/modules/core/document/document.resolver.d.ts +12 -0
- package/dist/modules/core/document/document.resolver.extend.d.ts +10 -0
- package/dist/modules/core/document/document.resolver.extend.js +69 -0
- package/dist/modules/core/document/document.resolver.extend.js.map +1 -0
- package/dist/modules/core/document/document.resolver.js +154 -0
- package/dist/modules/core/document/document.resolver.js.map +1 -0
- package/dist/modules/core/document/document.schema.d.ts +39 -0
- package/dist/modules/core/document/document.schema.js +181 -0
- package/dist/modules/core/document/document.schema.js.map +1 -0
- package/dist/modules/core/document/load-documents.queries.d.ts +17 -0
- package/dist/modules/core/document/load-documents.queries.js +119 -0
- package/dist/modules/core/document/load-documents.queries.js.map +1 -0
- package/dist/modules/core/document/save-documents.queries.d.ts +18 -0
- package/dist/modules/core/document/save-documents.queries.js +199 -0
- package/dist/modules/core/document/save-documents.queries.js.map +1 -0
- package/dist/modules/core/fields/_fields.helpers.d.ts +2 -0
- package/dist/modules/core/fields/_fields.helpers.js +12 -0
- package/dist/modules/core/fields/_fields.helpers.js.map +1 -0
- package/dist/modules/core/fields/fields.model.d.ts +17 -0
- package/dist/modules/core/fields/fields.model.js +99 -0
- package/dist/modules/core/fields/fields.model.js.map +1 -0
- package/dist/modules/core/fields/fields.module.d.ts +2 -0
- package/dist/modules/core/fields/fields.module.js +20 -0
- package/dist/modules/core/fields/fields.module.js.map +1 -0
- package/dist/modules/core/fields/fields.resolver.d.ts +14 -0
- package/dist/modules/core/fields/fields.resolver.js +165 -0
- package/dist/modules/core/fields/fields.resolver.js.map +1 -0
- package/dist/modules/core/fields/load-fields.queries.d.ts +20 -0
- package/dist/modules/core/fields/load-fields.queries.js +233 -0
- package/dist/modules/core/fields/load-fields.queries.js.map +1 -0
- package/dist/modules/core/fields/quill-delta.d.ts +1 -0
- package/dist/modules/core/fields/quill-delta.js +40 -0
- package/dist/modules/core/fields/quill-delta.js.map +1 -0
- package/dist/modules/core/fields/save-fields.queries.d.ts +9 -0
- package/dist/modules/core/fields/save-fields.queries.js +135 -0
- package/dist/modules/core/fields/save-fields.queries.js.map +1 -0
- package/dist/modules/core/leaf/leaf.model.d.ts +9 -0
- package/dist/modules/core/leaf/leaf.model.js +61 -0
- package/dist/modules/core/leaf/leaf.model.js.map +1 -0
- package/dist/modules/core/leaf/leaf.module.d.ts +2 -0
- package/dist/modules/core/leaf/leaf.module.js +21 -0
- package/dist/modules/core/leaf/leaf.module.js.map +1 -0
- package/dist/modules/core/leaf/leaf.queries.d.ts +21 -0
- package/dist/modules/core/leaf/leaf.queries.js +159 -0
- package/dist/modules/core/leaf/leaf.queries.js.map +1 -0
- package/dist/modules/core/leaf/leaf.resolver.d.ts +9 -0
- package/dist/modules/core/leaf/leaf.resolver.extend.d.ts +6 -0
- package/dist/modules/core/leaf/leaf.resolver.extend.js +42 -0
- package/dist/modules/core/leaf/leaf.resolver.extend.js.map +1 -0
- package/dist/modules/core/leaf/leaf.resolver.js +84 -0
- package/dist/modules/core/leaf/leaf.resolver.js.map +1 -0
- package/dist/modules/core/leaf/leaf.schema.d.ts +7 -0
- package/dist/modules/core/leaf/leaf.schema.js +45 -0
- package/dist/modules/core/leaf/leaf.schema.js.map +1 -0
- package/dist/modules/core/leaf-item/leaf-item.model.d.ts +6 -0
- package/dist/modules/core/leaf-item/leaf-item.model.js +44 -0
- package/dist/modules/core/leaf-item/leaf-item.model.js.map +1 -0
- package/dist/modules/core/leaf-item/leaf-item.queries.d.ts +9 -0
- package/dist/modules/core/leaf-item/leaf-item.queries.js +120 -0
- package/dist/modules/core/leaf-item/leaf-item.queries.js.map +1 -0
- package/dist/modules/core/login/login.controller.d.ts +8 -0
- package/dist/modules/core/login/login.controller.js +53 -0
- package/dist/modules/core/login/login.controller.js.map +1 -0
- package/dist/modules/core/login/login.module.d.ts +2 -0
- package/dist/modules/core/login/login.module.js +22 -0
- package/dist/modules/core/login/login.module.js.map +1 -0
- package/dist/modules/core/media/media-upload.controller.d.ts +21 -0
- package/dist/modules/core/media/media-upload.controller.js +160 -0
- package/dist/modules/core/media/media-upload.controller.js.map +1 -0
- package/dist/modules/core/media/media.d.ts +22 -0
- package/dist/modules/core/media/media.js +53 -0
- package/dist/modules/core/media/media.js.map +1 -0
- package/dist/modules/core/media/media.module.d.ts +2 -0
- package/dist/modules/core/media/media.module.js +22 -0
- package/dist/modules/core/media/media.module.js.map +1 -0
- package/dist/modules/core/media/media.resolver.d.ts +14 -0
- package/dist/modules/core/media/media.resolver.js +199 -0
- package/dist/modules/core/media/media.resolver.js.map +1 -0
- package/dist/modules/core/media/media.schema.d.ts +30 -0
- package/dist/modules/core/media/media.schema.js +144 -0
- package/dist/modules/core/media/media.schema.js.map +1 -0
- package/dist/modules/core/part/part.module.d.ts +2 -0
- package/dist/modules/core/part/part.module.js +21 -0
- package/dist/modules/core/part/part.module.js.map +1 -0
- package/dist/modules/core/part/part.queries.d.ts +22 -0
- package/dist/modules/core/part/part.queries.js +167 -0
- package/dist/modules/core/part/part.queries.js.map +1 -0
- package/dist/modules/core/part/part.resolver.d.ts +14 -0
- package/dist/modules/core/part/part.resolver.extend.d.ts +5 -0
- package/dist/modules/core/part/part.resolver.extend.js +49 -0
- package/dist/modules/core/part/part.resolver.extend.js.map +1 -0
- package/dist/modules/core/part/part.resolver.js +135 -0
- package/dist/modules/core/part/part.resolver.js.map +1 -0
- package/dist/modules/core/part/part.schema.d.ts +12 -0
- package/dist/modules/core/part/part.schema.js +66 -0
- package/dist/modules/core/part/part.schema.js.map +1 -0
- package/dist/modules/core/section/section-wrap.resolver.d.ts +11 -0
- package/dist/modules/core/section/section-wrap.resolver.js +168 -0
- package/dist/modules/core/section/section-wrap.resolver.js.map +1 -0
- package/dist/modules/core/section/section.model.d.ts +6 -0
- package/dist/modules/core/section/section.model.js +44 -0
- package/dist/modules/core/section/section.model.js.map +1 -0
- package/dist/modules/core/section/section.module.d.ts +2 -0
- package/dist/modules/core/section/section.module.js +21 -0
- package/dist/modules/core/section/section.module.js.map +1 -0
- package/dist/modules/core/section/section.queries.d.ts +51 -0
- package/dist/modules/core/section/section.queries.js +228 -0
- package/dist/modules/core/section/section.queries.js.map +1 -0
- package/dist/modules/core/section/section.resolver.d.ts +7 -0
- package/dist/modules/core/section/section.resolver.js +78 -0
- package/dist/modules/core/section/section.resolver.js.map +1 -0
- package/dist/modules/core/section/section.schema.d.ts +27 -0
- package/dist/modules/core/section/section.schema.js +129 -0
- package/dist/modules/core/section/section.schema.js.map +1 -0
- package/dist/modules/core/site-info/site-info.module.d.ts +2 -0
- package/dist/modules/core/site-info/site-info.module.js +20 -0
- package/dist/modules/core/site-info/site-info.module.js.map +1 -0
- package/dist/modules/core/site-info/site-info.resolver.d.ts +5 -0
- package/dist/modules/core/site-info/site-info.resolver.js +44 -0
- package/dist/modules/core/site-info/site-info.resolver.js.map +1 -0
- package/dist/modules/core/site-info/site-info.schema.d.ts +6 -0
- package/dist/modules/core/site-info/site-info.schema.js +36 -0
- package/dist/modules/core/site-info/site-info.schema.js.map +1 -0
- package/dist/modules/core/site-schema/site-schema.module.d.ts +2 -0
- package/dist/modules/core/site-schema/site-schema.module.js +20 -0
- package/dist/modules/core/site-schema/site-schema.module.js.map +1 -0
- package/dist/modules/core/site-schema/site-schema.resolver.d.ts +4 -0
- package/dist/modules/core/site-schema/site-schema.resolver.js +35 -0
- package/dist/modules/core/site-schema/site-schema.resolver.js.map +1 -0
- package/dist/modules/core/term-flag/term-flag.model.d.ts +6 -0
- package/dist/modules/core/term-flag/term-flag.model.js +45 -0
- package/dist/modules/core/term-flag/term-flag.model.js.map +1 -0
- package/dist/modules/core/term-flag/term-flag.module.d.ts +2 -0
- package/dist/modules/core/term-flag/term-flag.module.js +20 -0
- package/dist/modules/core/term-flag/term-flag.module.js.map +1 -0
- package/dist/modules/core/term-flag/term-flag.queries.d.ts +7 -0
- package/dist/modules/core/term-flag/term-flag.queries.js +44 -0
- package/dist/modules/core/term-flag/term-flag.queries.js.map +1 -0
- package/dist/modules/core/term-flag/term-flag.resolver.d.ts +5 -0
- package/dist/modules/core/term-flag/term-flag.resolver.js +47 -0
- package/dist/modules/core/term-flag/term-flag.resolver.js.map +1 -0
- package/dist/modules/core/term-flag/term-flag.schema.d.ts +9 -0
- package/dist/modules/core/term-flag/term-flag.schema.js +51 -0
- package/dist/modules/core/term-flag/term-flag.schema.js.map +1 -0
- package/dist/modules/core/unprotected/unprotected.module.d.ts +2 -0
- package/dist/modules/core/unprotected/unprotected.module.js +20 -0
- package/dist/modules/core/unprotected/unprotected.module.js.map +1 -0
- package/dist/modules/core/unprotected/unprotected.resolver.d.ts +8 -0
- package/dist/modules/core/unprotected/unprotected.resolver.js +106 -0
- package/dist/modules/core/unprotected/unprotected.resolver.js.map +1 -0
- package/dist/modules/core/unprotected/unprotected.schema.d.ts +19 -0
- package/dist/modules/core/unprotected/unprotected.schema.js +93 -0
- package/dist/modules/core/unprotected/unprotected.schema.js.map +1 -0
- package/dist/modules/graphql.types.d.ts +6 -0
- package/dist/modules/graphql.types.js +3 -0
- package/dist/modules/graphql.types.js.map +1 -0
- package/dist/modules/private-api.module.d.ts +2 -0
- package/dist/modules/private-api.module.js +50 -0
- package/dist/modules/private-api.module.js.map +1 -0
- package/dist/modules/public-api/class-validator-options.d.ts +7 -0
- package/dist/modules/public-api/class-validator-options.js +11 -0
- package/dist/modules/public-api/class-validator-options.js.map +1 -0
- package/dist/modules/public-api/mail/contact-form-mail.d.ts +8 -0
- package/dist/modules/public-api/mail/contact-form-mail.js +96 -0
- package/dist/modules/public-api/mail/contact-form-mail.js.map +1 -0
- package/dist/modules/public-api/mail/mail.dto.d.ts +8 -0
- package/dist/modules/public-api/mail/mail.dto.js +56 -0
- package/dist/modules/public-api/mail/mail.dto.js.map +1 -0
- package/dist/modules/public-api/partials/partials-params.dto.d.ts +6 -0
- package/dist/modules/public-api/partials/partials-params.dto.js +45 -0
- package/dist/modules/public-api/partials/partials-params.dto.js.map +1 -0
- package/dist/modules/public-api/password-reset/password-reset.controller.d.ts +11 -0
- package/dist/modules/public-api/password-reset/password-reset.controller.js +57 -0
- package/dist/modules/public-api/password-reset/password-reset.controller.js.map +1 -0
- package/dist/modules/public-api/password-reset/password-reset.dto.d.ts +9 -0
- package/dist/modules/public-api/password-reset/password-reset.dto.js +55 -0
- package/dist/modules/public-api/password-reset/password-reset.dto.js.map +1 -0
- package/dist/modules/public-api/password-reset/password-reset.module.d.ts +2 -0
- package/dist/modules/public-api/password-reset/password-reset.module.js +22 -0
- package/dist/modules/public-api/password-reset/password-reset.module.js.map +1 -0
- package/dist/modules/public-api/password-reset/password-reset.service.d.ts +14 -0
- package/dist/modules/public-api/password-reset/password-reset.service.js +56 -0
- package/dist/modules/public-api/password-reset/password-reset.service.js.map +1 -0
- package/dist/modules/public-api/public-api-controller.d.ts +32 -0
- package/dist/modules/public-api/public-api-controller.js +195 -0
- package/dist/modules/public-api/public-api-controller.js.map +1 -0
- package/dist/modules/public-api/public-api.module.d.ts +2 -0
- package/dist/modules/public-api/public-api.module.js +22 -0
- package/dist/modules/public-api/public-api.module.js.map +1 -0
- package/dist/modules/public-api/search-text/search-text.dto.d.ts +7 -0
- package/dist/modules/public-api/search-text/search-text.dto.js +50 -0
- package/dist/modules/public-api/search-text/search-text.dto.js.map +1 -0
- package/dist/modules/public-api/search-text/search-text.queries.d.ts +14 -0
- package/dist/modules/public-api/search-text/search-text.queries.js +58 -0
- package/dist/modules/public-api/search-text/search-text.queries.js.map +1 -0
- package/dist/modules/public-site/app-exception-filter.d.ts +4 -0
- package/dist/modules/public-site/app-exception-filter.js +41 -0
- package/dist/modules/public-site/app-exception-filter.js.map +1 -0
- package/dist/modules/public-site/helpers/format-date.helper.d.ts +4 -0
- package/dist/modules/public-site/helpers/format-date.helper.js +35 -0
- package/dist/modules/public-site/helpers/format-date.helper.js.map +1 -0
- package/dist/modules/public-site/helpers/medias.helpers.d.ts +3 -0
- package/dist/modules/public-site/helpers/medias.helpers.js +16 -0
- package/dist/modules/public-site/helpers/medias.helpers.js.map +1 -0
- package/dist/modules/public-site/helpers/obfuscate.helper.d.ts +2 -0
- package/dist/modules/public-site/helpers/obfuscate.helper.js +27 -0
- package/dist/modules/public-site/helpers/obfuscate.helper.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/format-date.d.ts +7 -0
- package/dist/modules/public-site/liquidjs-filters/format-date.js +15 -0
- package/dist/modules/public-site/liquidjs-filters/format-date.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/format-number.d.ts +6 -0
- package/dist/modules/public-site/liquidjs-filters/format-number.js +17 -0
- package/dist/modules/public-site/liquidjs-filters/format-number.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/info-filter.d.ts +1 -0
- package/dist/modules/public-site/liquidjs-filters/info-filter.js +144 -0
- package/dist/modules/public-site/liquidjs-filters/info-filter.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.d.ts +1 -0
- package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.js +40 -0
- package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.d.ts +6 -0
- package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.js +25 -0
- package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/make-excerpt.d.ts +3 -0
- package/dist/modules/public-site/liquidjs-filters/make-excerpt.js +10 -0
- package/dist/modules/public-site/liquidjs-filters/make-excerpt.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/obfuscate.d.ts +2 -0
- package/dist/modules/public-site/liquidjs-filters/obfuscate.js +18 -0
- package/dist/modules/public-site/liquidjs-filters/obfuscate.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/open-graph-filter.d.ts +6 -0
- package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js +41 -0
- package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.d.ts +7 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.js +23 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.js.map +1 -0
- package/dist/modules/public-site/liquidjs-tags/get-page-tag.d.ts +13 -0
- package/dist/modules/public-site/liquidjs-tags/get-page-tag.js +69 -0
- package/dist/modules/public-site/liquidjs-tags/get-page-tag.js.map +1 -0
- package/dist/modules/public-site/liquidjs-tags/get-pages-tag.d.ts +13 -0
- package/dist/modules/public-site/liquidjs-tags/get-pages-tag.js +95 -0
- package/dist/modules/public-site/liquidjs-tags/get-pages-tag.js.map +1 -0
- package/dist/modules/public-site/liquidjs-tags/use-image-tag.d.ts +13 -0
- package/dist/modules/public-site/liquidjs-tags/use-image-tag.js +54 -0
- package/dist/modules/public-site/liquidjs-tags/use-image-tag.js.map +1 -0
- package/dist/modules/public-site/media-serve/_media-serve-helpers.d.ts +11 -0
- package/dist/modules/public-site/media-serve/_media-serve-helpers.js +26 -0
- package/dist/modules/public-site/media-serve/_media-serve-helpers.js.map +1 -0
- package/dist/modules/public-site/media-serve/media-serve.controller.d.ts +4 -0
- package/dist/modules/public-site/media-serve/media-serve.controller.js +140 -0
- package/dist/modules/public-site/media-serve/media-serve.controller.js.map +1 -0
- package/dist/modules/public-site/media-serve/media-serve.module.d.ts +2 -0
- package/dist/modules/public-site/media-serve/media-serve.module.js +20 -0
- package/dist/modules/public-site/media-serve/media-serve.module.js.map +1 -0
- package/dist/modules/public-site/oauth2-client.controller.d.ts +10 -0
- package/dist/modules/public-site/oauth2-client.controller.js +143 -0
- package/dist/modules/public-site/oauth2-client.controller.js.map +1 -0
- package/dist/modules/public-site/public-route/make-url.d.ts +11 -0
- package/dist/modules/public-site/public-route/make-url.js +150 -0
- package/dist/modules/public-site/public-route/make-url.js.map +1 -0
- package/dist/modules/public-site/public-route/public-route-parser.d.ts +16 -0
- package/dist/modules/public-site/public-route/public-route-parser.js +154 -0
- package/dist/modules/public-site/public-route/public-route-parser.js.map +1 -0
- package/dist/modules/public-site/public-route/raw-document-payload.d.ts +8 -0
- package/dist/modules/public-site/public-route/raw-document-payload.js +86 -0
- package/dist/modules/public-site/public-route/raw-document-payload.js.map +1 -0
- package/dist/modules/public-site/public-site.controller.d.ts +7 -0
- package/dist/modules/public-site/public-site.controller.js +58 -0
- package/dist/modules/public-site/public-site.controller.js.map +1 -0
- package/dist/modules/public-site/public-site.middleware.d.ts +5 -0
- package/dist/modules/public-site/public-site.middleware.js +67 -0
- package/dist/modules/public-site/public-site.middleware.js.map +1 -0
- package/dist/modules/public-site/public-site.module.d.ts +4 -0
- package/dist/modules/public-site/public-site.module.js +27 -0
- package/dist/modules/public-site/public-site.module.js.map +1 -0
- package/dist/modules/public-site/serve-document/serve-document.d.ts +20 -0
- package/dist/modules/public-site/serve-document/serve-document.js +60 -0
- package/dist/modules/public-site/serve-document/serve-document.js.map +1 -0
- package/dist/modules/security/app-throttler-guard.d.ts +8 -0
- package/dist/modules/security/app-throttler-guard.js +18 -0
- package/dist/modules/security/app-throttler-guard.js.map +1 -0
- package/dist/modules/security/complexity-plugin.d.ts +8 -0
- package/dist/modules/security/complexity-plugin.js +45 -0
- package/dist/modules/security/complexity-plugin.js.map +1 -0
- package/dist/nest-custom-logger.d.ts +8 -0
- package/dist/nest-custom-logger.js +23 -0
- package/dist/nest-custom-logger.js.map +1 -0
- package/dist/public-payload/breadcrumb.queries.d.ts +5 -0
- package/dist/public-payload/breadcrumb.queries.js +26 -0
- package/dist/public-payload/breadcrumb.queries.js.map +1 -0
- package/dist/public-payload/create-page-drop.d.ts +11 -0
- package/dist/public-payload/create-page-drop.js +160 -0
- package/dist/public-payload/create-page-drop.js.map +1 -0
- package/dist/public-payload/create-page-part-drop.d.ts +7 -0
- package/dist/public-payload/create-page-part-drop.js +39 -0
- package/dist/public-payload/create-page-part-drop.js.map +1 -0
- package/dist/public-payload/excerpt.queries.d.ts +10 -0
- package/dist/public-payload/excerpt.queries.js +38 -0
- package/dist/public-payload/excerpt.queries.js.map +1 -0
- package/dist/public-payload/field-values.d.ts +9 -0
- package/dist/public-payload/field-values.js +99 -0
- package/dist/public-payload/field-values.js.map +1 -0
- package/dist/public-payload/get-siblings.queries.d.ts +5 -0
- package/dist/public-payload/get-siblings.queries.js +117 -0
- package/dist/public-payload/get-siblings.queries.js.map +1 -0
- package/dist/public-payload/load-default-image.d.ts +8 -0
- package/dist/public-payload/load-default-image.js +52 -0
- package/dist/public-payload/load-default-image.js.map +1 -0
- package/dist/public-payload/make-basic-payload.d.ts +6 -0
- package/dist/public-payload/make-basic-payload.js +19 -0
- package/dist/public-payload/make-basic-payload.js.map +1 -0
- package/dist/public-payload/make-image-available.d.ts +26 -0
- package/dist/public-payload/make-image-available.js +38 -0
- package/dist/public-payload/make-image-available.js.map +1 -0
- package/dist/public-payload/page-values.queries.d.ts +27 -0
- package/dist/public-payload/page-values.queries.js +110 -0
- package/dist/public-payload/page-values.queries.js.map +1 -0
- package/dist/public-payload/parts.queries.d.ts +6 -0
- package/dist/public-payload/parts.queries.js +123 -0
- package/dist/public-payload/parts.queries.js.map +1 -0
- package/dist/public-payload/public-payload.types.d.ts +130 -0
- package/dist/public-payload/public-payload.types.js +3 -0
- package/dist/public-payload/public-payload.types.js.map +1 -0
- package/dist/public-payload/site-payload.d.ts +4 -0
- package/dist/public-payload/site-payload.js +43 -0
- package/dist/public-payload/site-payload.js.map +1 -0
- package/dist/public-payload/taxonomies.queries.d.ts +13 -0
- package/dist/public-payload/taxonomies.queries.js +45 -0
- package/dist/public-payload/taxonomies.queries.js.map +1 -0
- package/dist/public-payload/translations.queries.d.ts +7 -0
- package/dist/public-payload/translations.queries.js +62 -0
- package/dist/public-payload/translations.queries.js.map +1 -0
- package/dist/public.types.d.ts +5 -0
- package/dist/public.types.js +3 -0
- package/dist/public.types.js.map +1 -0
- package/dist/share/pino-app-log.d.ts +26 -0
- package/dist/share/pino-app-log.js +138 -0
- package/dist/share/pino-app-log.js.map +1 -0
- package/dist/share/read-configuration.d.ts +7 -0
- package/dist/share/read-configuration.js +31 -0
- package/dist/share/read-configuration.js.map +1 -0
- package/dist/site-backup/archiver.helper.d.ts +12 -0
- package/dist/site-backup/archiver.helper.js +43 -0
- package/dist/site-backup/archiver.helper.js.map +1 -0
- package/dist/site-backup/backup-tasks.d.ts +10 -0
- package/dist/site-backup/backup-tasks.js +50 -0
- package/dist/site-backup/backup-tasks.js.map +1 -0
- package/dist/site-backup/backup.d.ts +11 -0
- package/dist/site-backup/backup.helper.d.ts +3 -0
- package/dist/site-backup/backup.helper.js +13 -0
- package/dist/site-backup/backup.helper.js.map +1 -0
- package/dist/site-backup/backup.js +35 -0
- package/dist/site-backup/backup.js.map +1 -0
- package/dist/site-context/create-site-context.d.ts +3 -0
- package/dist/site-context/create-site-context.js +183 -0
- package/dist/site-context/create-site-context.js.map +1 -0
- package/dist/site-context/db-init/db-init.d.ts +11 -0
- package/dist/site-context/db-init/db-init.js +38 -0
- package/dist/site-context/db-init/db-init.js.map +1 -0
- package/dist/site-context/db-init/ddl-migration.d.ts +13 -0
- package/dist/site-context/db-init/ddl-migration.js +26 -0
- package/dist/site-context/db-init/ddl-migration.js.map +1 -0
- package/dist/site-context/db-init/init-routing-points.d.ts +5 -0
- package/dist/site-context/db-init/init-routing-points.js +149 -0
- package/dist/site-context/db-init/init-routing-points.js.map +1 -0
- package/dist/site-context/site-conf.d.ts +17 -0
- package/dist/site-context/site-conf.js +103 -0
- package/dist/site-context/site-conf.js.map +1 -0
- package/dist/site-context/site-context.d.ts +12 -0
- package/dist/site-context/site-context.js +87 -0
- package/dist/site-context/site-context.js.map +1 -0
- package/dist/site-context/site-context.types.d.ts +46 -0
- package/dist/site-context/site-context.types.js +3 -0
- package/dist/site-context/site-context.types.js.map +1 -0
- package/dist/site-context/theme-conf-reader.d.ts +4 -0
- package/dist/site-context/theme-conf-reader.js +33 -0
- package/dist/site-context/theme-conf-reader.js.map +1 -0
- package/dist/site-context/theme-conf-types.d.ts +4 -0
- package/dist/site-context/theme-conf-types.js +3 -0
- package/dist/site-context/theme-conf-types.js.map +1 -0
- package/dist/site-schema/common-schema-reader.d.ts +6 -0
- package/dist/site-schema/common-schema-reader.js +29 -0
- package/dist/site-schema/common-schema-reader.js.map +1 -0
- package/dist/site-schema/merged-schema-lib.d.ts +30 -0
- package/dist/site-schema/merged-schema-lib.js +118 -0
- package/dist/site-schema/merged-schema-lib.js.map +1 -0
- package/dist/site-schema/read-locales.d.ts +24 -0
- package/dist/site-schema/read-locales.js +171 -0
- package/dist/site-schema/read-locales.js.map +1 -0
- package/dist/site-schema/site-schema-factory.d.ts +2 -0
- package/dist/site-schema/site-schema-factory.js +385 -0
- package/dist/site-schema/site-schema-factory.js.map +1 -0
- package/dist/site-schema/site-schema-helpers.d.ts +5 -0
- package/dist/site-schema/site-schema-helpers.js +27 -0
- package/dist/site-schema/site-schema-helpers.js.map +1 -0
- package/dist/site-schema/site-schema-lib-reader.d.ts +14 -0
- package/dist/site-schema/site-schema-lib-reader.js +48 -0
- package/dist/site-schema/site-schema-lib-reader.js.map +1 -0
- package/dist/start.d.ts +1 -0
- package/dist/start.js +5 -0
- package/dist/start.js.map +1 -0
- package/dist/types.to.json +1 -0
- package/package.json +9 -8
|
@@ -0,0 +1,49 @@
|
|
|
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.ExtendSectionWrapWithPartResolver = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const graphql_1 = require("@nestjs/graphql");
|
|
18
|
+
const anywhere_lib_1 = require("@paroicms/anywhere-lib");
|
|
19
|
+
const site_context_1 = require("../../../site-context/site-context");
|
|
20
|
+
const jwt_auth_guard_1 = require("../auth/jwt.auth.guard");
|
|
21
|
+
const leaf_queries_1 = require("../leaf/leaf.queries");
|
|
22
|
+
const section_schema_1 = require("../section/section.schema");
|
|
23
|
+
const part_queries_1 = require("./part.queries");
|
|
24
|
+
const part_schema_1 = require("./part.schema");
|
|
25
|
+
let ExtendSectionWrapWithPartResolver = class ExtendSectionWrapWithPartResolver {
|
|
26
|
+
async parts({ fqdn }, { leafId, lang }) {
|
|
27
|
+
const siteContext = await (0, site_context_1.getSiteContext)(fqdn);
|
|
28
|
+
const leafType = await (0, leaf_queries_1.getLeafTypeOf)(siteContext, leafId);
|
|
29
|
+
const documentType = (0, anywhere_lib_1.getDocumentTypeByLeafType)(siteContext.siteSchema, leafType);
|
|
30
|
+
return await (0, part_queries_1.partsOf)(siteContext, {
|
|
31
|
+
parentId: { lang, leafId },
|
|
32
|
+
listNames: documentType.partLists?.map((l) => l.listName) ?? [],
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.ExtendSectionWrapWithPartResolver = ExtendSectionWrapWithPartResolver;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, graphql_1.ResolveField)(() => [part_schema_1.PartOrPlaceholderObjectType]),
|
|
39
|
+
__param(0, (0, graphql_1.Context)()),
|
|
40
|
+
__param(1, (0, graphql_1.Parent)()),
|
|
41
|
+
__metadata("design:type", Function),
|
|
42
|
+
__metadata("design:paramtypes", [Object, section_schema_1.SectionWrapObjectType]),
|
|
43
|
+
__metadata("design:returntype", Promise)
|
|
44
|
+
], ExtendSectionWrapWithPartResolver.prototype, "parts", null);
|
|
45
|
+
exports.ExtendSectionWrapWithPartResolver = ExtendSectionWrapWithPartResolver = __decorate([
|
|
46
|
+
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
47
|
+
(0, graphql_1.Resolver)(() => section_schema_1.SectionWrapObjectType)
|
|
48
|
+
], ExtendSectionWrapWithPartResolver);
|
|
49
|
+
//# sourceMappingURL=part.resolver.extend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part.resolver.extend.js","sourceRoot":"","sources":["../../../../src/modules/core/part/part.resolver.extend.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA2C;AAC3C,6CAA0E;AAC1E,yDAAmE;AACnE,qEAAoE;AAEpE,2DAAsD;AACtD,uDAAqD;AACrD,8DAAkE;AAClE,iDAAyC;AACzC,+CAA4D;AAIrD,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IAEtC,AAAN,KAAK,CAAC,KAAK,CACE,EAAE,IAAI,EAAkB,EAEnC,EAAE,MAAM,EAAE,IAAI,EAAyB;QAEvC,MAAM,WAAW,GAAG,MAAM,IAAA,6BAAc,EAAC,IAAI,CAAC,CAAC;QAC/C,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAa,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAC1D,MAAM,YAAY,GAAG,IAAA,wCAAyB,EAAC,WAAW,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAEjF,OAAO,MAAM,IAAA,sBAAO,EAAC,WAAW,EAAE;YAChC,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YAC1B,SAAS,EAAE,YAAY,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE;SAChE,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAhBY,8EAAiC;AAEtC;IADL,IAAA,sBAAY,EAAC,GAAG,EAAE,CAAC,CAAC,yCAA2B,CAAC,CAAC;IAE/C,WAAA,IAAA,iBAAO,GAAE,CAAA;IACT,WAAA,IAAA,gBAAM,GAAE,CAAA;;6CACS,sCAAqB;;8DAUxC;4CAfU,iCAAiC;IAF7C,IAAA,kBAAS,EAAC,6BAAY,CAAC;IACvB,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,sCAAqB,CAAC;GACzB,iCAAiC,CAgB7C"}
|
|
@@ -0,0 +1,135 @@
|
|
|
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.PartResolver = exports.PartPlaceholderResolver = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const graphql_1 = require("@nestjs/graphql");
|
|
18
|
+
const anywhere_lib_1 = require("@paroicms/anywhere-lib");
|
|
19
|
+
const site_context_1 = require("../../../site-context/site-context");
|
|
20
|
+
const jwt_auth_guard_1 = require("../auth/jwt.auth.guard");
|
|
21
|
+
const leaf_item_queries_1 = require("../leaf-item/leaf-item.queries");
|
|
22
|
+
const media_schema_1 = require("../media/media.schema");
|
|
23
|
+
const part_queries_1 = require("./part.queries");
|
|
24
|
+
const part_schema_1 = require("./part.schema");
|
|
25
|
+
let PartPlaceholderResolver = class PartPlaceholderResolver {
|
|
26
|
+
async itemNum({ fqdn }, { leafId }) {
|
|
27
|
+
return await (0, leaf_item_queries_1.findOneLeafItemItemNum)(await (0, site_context_1.getSiteContext)(fqdn), leafId);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.PartPlaceholderResolver = PartPlaceholderResolver;
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, graphql_1.ResolveField)(() => graphql_1.Int, { nullable: true }),
|
|
33
|
+
__param(0, (0, graphql_1.Context)()),
|
|
34
|
+
__param(1, (0, graphql_1.Parent)()),
|
|
35
|
+
__metadata("design:type", Function),
|
|
36
|
+
__metadata("design:paramtypes", [Object, part_schema_1.PartPlaceholderObjectType]),
|
|
37
|
+
__metadata("design:returntype", Promise)
|
|
38
|
+
], PartPlaceholderResolver.prototype, "itemNum", null);
|
|
39
|
+
exports.PartPlaceholderResolver = PartPlaceholderResolver = __decorate([
|
|
40
|
+
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
41
|
+
(0, graphql_1.Resolver)(() => part_schema_1.PartPlaceholderObjectType)
|
|
42
|
+
], PartPlaceholderResolver);
|
|
43
|
+
let PartResolver = class PartResolver {
|
|
44
|
+
async part({ fqdn }, sectionId) {
|
|
45
|
+
const siteContext = await (0, site_context_1.getSiteContext)(fqdn);
|
|
46
|
+
return await (0, part_queries_1.loadPart)(siteContext, (0, anywhere_lib_1.parseSectionId)(sectionId));
|
|
47
|
+
}
|
|
48
|
+
async createPartOnLeaf({ fqdn }, lang, leafId) {
|
|
49
|
+
const siteContext = await (0, site_context_1.getSiteContext)(fqdn);
|
|
50
|
+
const newId = await (0, part_queries_1.createPartOnLeaf)(siteContext, {
|
|
51
|
+
lang,
|
|
52
|
+
leafId,
|
|
53
|
+
});
|
|
54
|
+
return await (0, part_queries_1.loadPart)(siteContext, newId);
|
|
55
|
+
}
|
|
56
|
+
async createLeafWithPart({ fqdn }, parentSectionId, listName, leafType) {
|
|
57
|
+
const siteContext = await (0, site_context_1.getSiteContext)(fqdn);
|
|
58
|
+
const newId = await (0, part_queries_1.createLeafWithPart)(siteContext, {
|
|
59
|
+
listName,
|
|
60
|
+
parentSectionId: (0, anywhere_lib_1.parseSectionId)(parentSectionId),
|
|
61
|
+
leafType,
|
|
62
|
+
});
|
|
63
|
+
return await (0, part_queries_1.loadPart)(siteContext, newId);
|
|
64
|
+
}
|
|
65
|
+
async deletePart({ fqdn }, sectionId) {
|
|
66
|
+
const siteContext = await (0, site_context_1.getSiteContext)(fqdn);
|
|
67
|
+
await (0, part_queries_1.deletePart)(siteContext, (0, anywhere_lib_1.parseSectionId)(sectionId));
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
async itemNum({ fqdn }, { leafId }) {
|
|
71
|
+
const siteContext = await (0, site_context_1.getSiteContext)(fqdn);
|
|
72
|
+
return await (0, leaf_item_queries_1.findOneLeafItemItemNum)(siteContext, leafId);
|
|
73
|
+
}
|
|
74
|
+
async featuredImage({ fqdn }, { featuredImageHandle }) {
|
|
75
|
+
const siteContext = await (0, site_context_1.getSiteContext)(fqdn);
|
|
76
|
+
return await siteContext.mediaStorage.getMedia({ handle: featuredImageHandle });
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
exports.PartResolver = PartResolver;
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, graphql_1.Query)(() => part_schema_1.PartObjectType),
|
|
82
|
+
__param(0, (0, graphql_1.Context)()),
|
|
83
|
+
__param(1, (0, graphql_1.Args)("sectionId", { type: () => graphql_1.ID })),
|
|
84
|
+
__metadata("design:type", Function),
|
|
85
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
86
|
+
__metadata("design:returntype", Promise)
|
|
87
|
+
], PartResolver.prototype, "part", null);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, graphql_1.Mutation)(() => part_schema_1.PartObjectType),
|
|
90
|
+
__param(0, (0, graphql_1.Context)()),
|
|
91
|
+
__param(1, (0, graphql_1.Args)("lang", { type: () => String })),
|
|
92
|
+
__param(2, (0, graphql_1.Args)("leafId", { type: () => graphql_1.ID })),
|
|
93
|
+
__metadata("design:type", Function),
|
|
94
|
+
__metadata("design:paramtypes", [Object, String, String]),
|
|
95
|
+
__metadata("design:returntype", Promise)
|
|
96
|
+
], PartResolver.prototype, "createPartOnLeaf", null);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, graphql_1.Mutation)(() => part_schema_1.PartObjectType),
|
|
99
|
+
__param(0, (0, graphql_1.Context)()),
|
|
100
|
+
__param(1, (0, graphql_1.Args)("parentSectionId", { type: () => String })),
|
|
101
|
+
__param(2, (0, graphql_1.Args)("listName", { type: () => String })),
|
|
102
|
+
__param(3, (0, graphql_1.Args)("leafType", { type: () => String })),
|
|
103
|
+
__metadata("design:type", Function),
|
|
104
|
+
__metadata("design:paramtypes", [Object, String, String, String]),
|
|
105
|
+
__metadata("design:returntype", Promise)
|
|
106
|
+
], PartResolver.prototype, "createLeafWithPart", null);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, graphql_1.Mutation)(() => Boolean),
|
|
109
|
+
__param(0, (0, graphql_1.Context)()),
|
|
110
|
+
__param(1, (0, graphql_1.Args)("sectionId", { type: () => graphql_1.ID, description: "lang:leafId" })),
|
|
111
|
+
__metadata("design:type", Function),
|
|
112
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
113
|
+
__metadata("design:returntype", Promise)
|
|
114
|
+
], PartResolver.prototype, "deletePart", null);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, graphql_1.ResolveField)(() => graphql_1.Int, { nullable: true }),
|
|
117
|
+
__param(0, (0, graphql_1.Context)()),
|
|
118
|
+
__param(1, (0, graphql_1.Parent)()),
|
|
119
|
+
__metadata("design:type", Function),
|
|
120
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
121
|
+
__metadata("design:returntype", Promise)
|
|
122
|
+
], PartResolver.prototype, "itemNum", null);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, graphql_1.ResolveField)(() => media_schema_1.MediaObjectType, { nullable: true }),
|
|
125
|
+
__param(0, (0, graphql_1.Context)()),
|
|
126
|
+
__param(1, (0, graphql_1.Parent)()),
|
|
127
|
+
__metadata("design:type", Function),
|
|
128
|
+
__metadata("design:paramtypes", [Object, part_schema_1.PartObjectType]),
|
|
129
|
+
__metadata("design:returntype", Promise)
|
|
130
|
+
], PartResolver.prototype, "featuredImage", null);
|
|
131
|
+
exports.PartResolver = PartResolver = __decorate([
|
|
132
|
+
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
133
|
+
(0, graphql_1.Resolver)(() => part_schema_1.PartObjectType)
|
|
134
|
+
], PartResolver);
|
|
135
|
+
//# sourceMappingURL=part.resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part.resolver.js","sourceRoot":"","sources":["../../../../src/modules/core/part/part.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA2C;AAC3C,6CAUyB;AACzB,yDAAwD;AACxD,qEAAoE;AAEpE,2DAAsD;AACtD,sEAAwE;AACxE,wDAAwD;AACxD,iDAA4F;AAC5F,+CAA0E;AAInE,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAE5B,AAAN,KAAK,CAAC,OAAO,CACA,EAAE,IAAI,EAAkB,EAEnC,EAAE,MAAM,EAA6B;QAErC,OAAO,MAAM,IAAA,0CAAsB,EAAC,MAAM,IAAA,6BAAc,EAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;IAC1E,CAAC;CACF,CAAA;AATY,0DAAuB;AAE5B;IADL,IAAA,sBAAY,EAAC,GAAG,EAAE,CAAC,aAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAEzC,WAAA,IAAA,iBAAO,GAAE,CAAA;IACT,WAAA,IAAA,gBAAM,GAAE,CAAA;;6CACG,uCAAyB;;sDAGtC;kCARU,uBAAuB;IAFnC,IAAA,kBAAS,EAAC,6BAAY,CAAC;IACvB,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,uCAAyB,CAAC;GAC7B,uBAAuB,CASnC;AAIM,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEjB,AAAN,KAAK,CAAC,IAAI,CACG,EAAE,IAAI,EAAkB,EAEnC,SAAiB;QAEjB,MAAM,WAAW,GAAG,MAAM,IAAA,6BAAc,EAAC,IAAI,CAAC,CAAC;QAC/C,OAAO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AA,IAAA,cAAI,EAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAA;;;;sDAU1C;AAGK;IADL,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;IAErB,WAAA,IAAA,iBAAO,GAAE,CAAA;IACT,WAAA,IAAA,cAAI,EAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,YAAE,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,CAAA;;;;8CAMnE;AAGK;IADL,IAAA,sBAAY,EAAC,GAAG,EAAE,CAAC,aAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAEzC,WAAA,IAAA,iBAAO,GAAE,CAAA;IACT,WAAA,IAAA,gBAAM,GAAE,CAAA;;;;2CAKV;AAGK;IADL,IAAA,sBAAY,EAAC,GAAG,EAAE,CAAC,8BAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAErD,WAAA,IAAA,iBAAO,GAAE,CAAA;IACT,WAAA,IAAA,gBAAM,GAAE,CAAA;;6CACgB,4BAAc;;iDAIxC;uBA3EU,YAAY;IAFxB,IAAA,kBAAS,EAAC,6BAAY,CAAC;IACvB,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,4BAAc,CAAC;GAClB,YAAY,CA4ExB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class PartObjectType {
|
|
2
|
+
sectionId: string;
|
|
3
|
+
leafId: string;
|
|
4
|
+
lang: string;
|
|
5
|
+
leafType: string;
|
|
6
|
+
featuredImageHandle: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const PartOrPlaceholderObjectType: PartObjectType | PartPlaceholderObjectType;
|
|
9
|
+
export declare class PartPlaceholderObjectType {
|
|
10
|
+
leafId: string;
|
|
11
|
+
leafType: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PartPlaceholderObjectType = exports.PartOrPlaceholderObjectType = exports.PartObjectType = void 0;
|
|
13
|
+
const graphql_1 = require("@nestjs/graphql");
|
|
14
|
+
let PartObjectType = class PartObjectType {
|
|
15
|
+
sectionId;
|
|
16
|
+
leafId;
|
|
17
|
+
lang;
|
|
18
|
+
leafType;
|
|
19
|
+
featuredImageHandle;
|
|
20
|
+
};
|
|
21
|
+
exports.PartObjectType = PartObjectType;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, graphql_1.Field)(() => graphql_1.ID),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], PartObjectType.prototype, "sectionId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, graphql_1.Field)(() => graphql_1.ID),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], PartObjectType.prototype, "leafId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, graphql_1.Field)(() => String),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], PartObjectType.prototype, "lang", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, graphql_1.Field)(() => String),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], PartObjectType.prototype, "leafType", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, graphql_1.Field)(() => String),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], PartObjectType.prototype, "featuredImageHandle", void 0);
|
|
42
|
+
exports.PartObjectType = PartObjectType = __decorate([
|
|
43
|
+
(0, graphql_1.ObjectType)("Part")
|
|
44
|
+
], PartObjectType);
|
|
45
|
+
exports.PartOrPlaceholderObjectType = (0, graphql_1.createUnionType)({
|
|
46
|
+
name: "PartOrPlaceholder",
|
|
47
|
+
types: () => [PartObjectType, PartPlaceholderObjectType],
|
|
48
|
+
resolveType: (value) => (value.sectionId ? PartObjectType : PartPlaceholderObjectType),
|
|
49
|
+
});
|
|
50
|
+
let PartPlaceholderObjectType = class PartPlaceholderObjectType {
|
|
51
|
+
leafId;
|
|
52
|
+
leafType;
|
|
53
|
+
};
|
|
54
|
+
exports.PartPlaceholderObjectType = PartPlaceholderObjectType;
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, graphql_1.Field)(() => graphql_1.ID),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], PartPlaceholderObjectType.prototype, "leafId", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, graphql_1.Field)(() => String),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], PartPlaceholderObjectType.prototype, "leafType", void 0);
|
|
63
|
+
exports.PartPlaceholderObjectType = PartPlaceholderObjectType = __decorate([
|
|
64
|
+
(0, graphql_1.ObjectType)("PartPlaceholder")
|
|
65
|
+
], PartPlaceholderObjectType);
|
|
66
|
+
//# sourceMappingURL=part.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part.schema.js","sourceRoot":"","sources":["../../../../src/modules/core/part/part.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAyE;AAGlE,IAAM,cAAc,GAApB,MAAM,c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ItemObjectType, PagedSectionWrapsObjectType, SectionObjectType, SectionTranslationObjectType, SectionWrapObjectType } from "./section.schema";
|
|
3
|
+
export declare class SectionWrapResolver {
|
|
4
|
+
sectionWrap(sectionId: string): Promise<SectionWrapObjectType>;
|
|
5
|
+
pagedSectionWraps({ fqdn }: GraphqlContext, parentSectionId: string, start: number, limit: number): Promise<PagedSectionWrapsObjectType>;
|
|
6
|
+
searchDocuments({ fqdn }: GraphqlContext, lang: string, queryString: string, start: number, limit: number): Promise<PagedSectionWrapsObjectType>;
|
|
7
|
+
sectionWraps({ fqdn }: GraphqlContext, parentSectionId: string): Promise<SectionWrapObjectType[]>;
|
|
8
|
+
section({ fqdn }: GraphqlContext, { lang, leafId }: SectionWrapObjectType): Promise<SectionObjectType>;
|
|
9
|
+
translations({ fqdn }: GraphqlContext, { leafId }: SectionWrapObjectType): Promise<SectionTranslationObjectType[]>;
|
|
10
|
+
breadcrumb({ fqdn }: GraphqlContext, { leafId, lang }: SectionWrapObjectType): Promise<BreadcrumbItemObjectType[]>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
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.SectionWrapResolver = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const graphql_1 = require("@nestjs/graphql");
|
|
18
|
+
const data_formatters_lib_1 = require("@paroi/data-formatters-lib");
|
|
19
|
+
const anywhere_lib_1 = require("@paroicms/anywhere-lib");
|
|
20
|
+
const server_lib_1 = require("@paroicms/server-lib");
|
|
21
|
+
const data_format_1 = require("../../../common/data-format");
|
|
22
|
+
const site_context_1 = require("../../../site-context/site-context");
|
|
23
|
+
const jwt_auth_guard_1 = require("../auth/jwt.auth.guard");
|
|
24
|
+
const section_queries_1 = require("./section.queries");
|
|
25
|
+
const section_schema_1 = require("./section.schema");
|
|
26
|
+
let SectionWrapResolver = class SectionWrapResolver {
|
|
27
|
+
async sectionWrap(sectionId) {
|
|
28
|
+
return { ...(0, anywhere_lib_1.parseSectionId)(sectionId), sectionId };
|
|
29
|
+
}
|
|
30
|
+
async pagedSectionWraps({ fqdn }, parentSectionId, start, limit) {
|
|
31
|
+
const siteContext = await (0, site_context_1.getSiteContext)(fqdn);
|
|
32
|
+
const parentId = (0, anywhere_lib_1.parseSectionId)(parentSectionId);
|
|
33
|
+
const result = await (0, section_queries_1.getSectionWraps)(siteContext, {
|
|
34
|
+
parentId,
|
|
35
|
+
pagination: {
|
|
36
|
+
limit,
|
|
37
|
+
start,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
if (result.total === undefined) {
|
|
41
|
+
throw new Error("property total not found");
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
items: result.sectionWraps,
|
|
45
|
+
total: result.total,
|
|
46
|
+
start,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
async searchDocuments({ fqdn }, lang, queryString, start, limit) {
|
|
50
|
+
const siteContext = await (0, site_context_1.getSiteContext)(fqdn);
|
|
51
|
+
return await (0, section_queries_1.searchDocuments)(siteContext, {
|
|
52
|
+
lang,
|
|
53
|
+
queryString,
|
|
54
|
+
start,
|
|
55
|
+
limit,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
async sectionWraps({ fqdn }, parentSectionId) {
|
|
59
|
+
const siteContext = await (0, site_context_1.getSiteContext)(fqdn);
|
|
60
|
+
const parentId = (0, anywhere_lib_1.parseSectionId)(parentSectionId);
|
|
61
|
+
return (await (0, section_queries_1.getSectionWraps)(siteContext, {
|
|
62
|
+
parentId,
|
|
63
|
+
})).sectionWraps;
|
|
64
|
+
}
|
|
65
|
+
async section({ fqdn }, { lang, leafId }) {
|
|
66
|
+
return (0, data_format_1.sectionEntityToObjectType)(await (0, section_queries_1.findOneSection)(await (0, site_context_1.getSiteContext)(fqdn), {
|
|
67
|
+
lang,
|
|
68
|
+
leafId,
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
async translations({ fqdn }, { leafId }) {
|
|
72
|
+
const { mainCn } = await (0, site_context_1.getSiteContext)(fqdn);
|
|
73
|
+
const rows = await mainCn
|
|
74
|
+
.createQueryBuilder()
|
|
75
|
+
.select("section.lang", "lang")
|
|
76
|
+
.from("PaSection", "section")
|
|
77
|
+
.where("section.leafId = :leafId", { leafId })
|
|
78
|
+
.getRawMany();
|
|
79
|
+
const translations = rows.map((row) => {
|
|
80
|
+
const lang = (0, data_formatters_lib_1.strVal)(row.lang);
|
|
81
|
+
return {
|
|
82
|
+
lang,
|
|
83
|
+
sectionId: (0, anywhere_lib_1.encodeSectionId)({
|
|
84
|
+
lang,
|
|
85
|
+
leafId,
|
|
86
|
+
}),
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
return translations;
|
|
90
|
+
}
|
|
91
|
+
async breadcrumb({ fqdn }, { leafId, lang }) {
|
|
92
|
+
const siteContext = await (0, site_context_1.getSiteContext)(fqdn);
|
|
93
|
+
const breadcrumb = await (0, section_queries_1.getBreadcrumb)(siteContext, (0, server_lib_1.createNoTracker)(), { leafId, lang });
|
|
94
|
+
return breadcrumb.map((item) => ({
|
|
95
|
+
lang: item.documentId.lang,
|
|
96
|
+
leafId: item.documentId.leafId,
|
|
97
|
+
leafType: item.leafType,
|
|
98
|
+
sectionId: (0, anywhere_lib_1.encodeSectionId)(item.documentId),
|
|
99
|
+
title: item.title,
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
exports.SectionWrapResolver = SectionWrapResolver;
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, graphql_1.Query)(() => section_schema_1.SectionWrapObjectType),
|
|
106
|
+
__param(0, (0, graphql_1.Args)("sectionId", { type: () => graphql_1.ID })),
|
|
107
|
+
__metadata("design:type", Function),
|
|
108
|
+
__metadata("design:paramtypes", [String]),
|
|
109
|
+
__metadata("design:returntype", Promise)
|
|
110
|
+
], SectionWrapResolver.prototype, "sectionWrap", null);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, graphql_1.Query)(() => section_schema_1.PagedSectionWrapsObjectType),
|
|
113
|
+
__param(0, (0, graphql_1.Context)()),
|
|
114
|
+
__param(1, (0, graphql_1.Args)("parentSectionId", { type: () => graphql_1.ID, description: "lang:leafId" })),
|
|
115
|
+
__param(2, (0, graphql_1.Args)("start", { type: () => graphql_1.Int })),
|
|
116
|
+
__param(3, (0, graphql_1.Args)("limit", { type: () => graphql_1.Int })),
|
|
117
|
+
__metadata("design:type", Function),
|
|
118
|
+
__metadata("design:paramtypes", [Object, String, Number, Number]),
|
|
119
|
+
__metadata("design:returntype", Promise)
|
|
120
|
+
], SectionWrapResolver.prototype, "pagedSectionWraps", null);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, graphql_1.Query)(() => section_schema_1.PagedSectionWrapsObjectType),
|
|
123
|
+
__param(0, (0, graphql_1.Context)()),
|
|
124
|
+
__param(1, (0, graphql_1.Args)("lang", { type: () => String })),
|
|
125
|
+
__param(2, (0, graphql_1.Args)("queryString", { type: () => String })),
|
|
126
|
+
__param(3, (0, graphql_1.Args)("start", { type: () => graphql_1.Int })),
|
|
127
|
+
__param(4, (0, graphql_1.Args)("limit", { type: () => graphql_1.Int })),
|
|
128
|
+
__metadata("design:type", Function),
|
|
129
|
+
__metadata("design:paramtypes", [Object, String, String, Number, Number]),
|
|
130
|
+
__metadata("design:returntype", Promise)
|
|
131
|
+
], SectionWrapResolver.prototype, "searchDocuments", null);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, graphql_1.Query)(() => [section_schema_1.SectionWrapObjectType]),
|
|
134
|
+
__param(0, (0, graphql_1.Context)()),
|
|
135
|
+
__param(1, (0, graphql_1.Args)("parentSectionId", { type: () => graphql_1.ID, description: "lang:leafId" })),
|
|
136
|
+
__metadata("design:type", Function),
|
|
137
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
138
|
+
__metadata("design:returntype", Promise)
|
|
139
|
+
], SectionWrapResolver.prototype, "sectionWraps", null);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, graphql_1.ResolveField)(() => section_schema_1.SectionObjectType),
|
|
142
|
+
__param(0, (0, graphql_1.Context)()),
|
|
143
|
+
__param(1, (0, graphql_1.Parent)()),
|
|
144
|
+
__metadata("design:type", Function),
|
|
145
|
+
__metadata("design:paramtypes", [Object, section_schema_1.SectionWrapObjectType]),
|
|
146
|
+
__metadata("design:returntype", Promise)
|
|
147
|
+
], SectionWrapResolver.prototype, "section", null);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, graphql_1.ResolveField)(() => [section_schema_1.SectionTranslationObjectType]),
|
|
150
|
+
__param(0, (0, graphql_1.Context)()),
|
|
151
|
+
__param(1, (0, graphql_1.Parent)()),
|
|
152
|
+
__metadata("design:type", Function),
|
|
153
|
+
__metadata("design:paramtypes", [Object, section_schema_1.SectionWrapObjectType]),
|
|
154
|
+
__metadata("design:returntype", Promise)
|
|
155
|
+
], SectionWrapResolver.prototype, "translations", null);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, graphql_1.ResolveField)(() => [section_schema_1.BreadcrumbItemObjectType]),
|
|
158
|
+
__param(0, (0, graphql_1.Context)()),
|
|
159
|
+
__param(1, (0, graphql_1.Parent)()),
|
|
160
|
+
__metadata("design:type", Function),
|
|
161
|
+
__metadata("design:paramtypes", [Object, section_schema_1.SectionWrapObjectType]),
|
|
162
|
+
__metadata("design:returntype", Promise)
|
|
163
|
+
], SectionWrapResolver.prototype, "breadcrumb", null);
|
|
164
|
+
exports.SectionWrapResolver = SectionWrapResolver = __decorate([
|
|
165
|
+
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
166
|
+
(0, graphql_1.Resolver)(() => section_schema_1.SectionWrapObjectType)
|
|
167
|
+
], SectionWrapResolver);
|
|
168
|
+
//# sourceMappingURL=section-wrap.resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-wrap.resolver.js","sourceRoot":"","sources":["../../../../src/modules/core/section/section-wrap.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA2C;AAC3C,6CAAgG;AAChG,oEAAoD;AACpD,yDAAmF;AACnF,qDAAuD;AACvD,6DAAwE;AACxE,qEAAoE;AAEpE,2DAAsD;AACtD,uDAAoG;AACpG,qDAM0B;AAInB,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAExB,AAAN,KAAK,CAAC,WAAW,CAEf,SAAiB;QAEjB,OAAO,EAAE,GAAG,IAAA,6BAAc,EAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC;IACrD,CAAC;IAGK,AAAN,KAAK,CAAC,iBAAiB,CACV,EAAE,IAAI,EAAkB,EAEnC,eAAuB,EAEvB,KAAa,EAEb,KAAa;QAEb,MAAM,WAAW,GAAG,MAAM,IAAA,6BAAc,EAAC,IAAI,CAAC,CAAC;QAC/C,MAAM,QAAQ,GAAG,IAAA,6BAAc,EAAC,eAAe,CAAC,CAAC;QACjD,MAAM,MAAM,GAAG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AG,EAAE,CAAC,CAAA;;;;0DAUpC;AAGK;IADL,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,sCAAqB,CAAC,CAAC;IAElC,WAAA,IAAA,iBAAO,GAAE,CAAA;IACT,WAAA,IAAA,cAAI,EAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,YAAE,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,CAAA;;;;uDAUzE;AAGK;IADL,IAAA,sBAAY,EAAC,GAAG,EAAE,CAAC,kCAAiB,CAAC;IAEnC,WAAA,IAAA,iBAAO,GAAE,CAAA;IACT,WAAA,IAAA,gBAAM,GAAE,CAAA;;6CACS,sCAAqB;;kDAQxC;AAGK;IADL,IAAA,sBAAY,EAAC,GAAG,EAAE,CAAC,CAAC,6CAA4B,CAAC,CAAC;IAEhD,WAAA,IAAA,iBAAO,GAAE,CAAA;IACT,WAAA,IAAA,gBAAM,GAAE,CAAA;;6CACG,sCAAqB;;uDAsBlC;AAGK;IADL,IAAA,sBAAY,EAAC,GAAG,EAAE,CAAC,CAAC,yCAAwB,CAAC,CAAC;IAE5C,WAAA,IAAA,iBAAO,GAAE,CAAA;IACT,WAAA,IAAA,gBAAM,GAAE,CAAA;;6CACS,sCAAqB;;qDAWxC;8BApIU,mBAAmB;IAF/B,IAAA,kBAAS,EAAC,6BAAY,CAAC;IACvB,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,sCAAqB,CAAC;GACzB,mBAAmB,CAqI/B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SectionEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let SectionEntity = class SectionEntity {
|
|
15
|
+
leafId;
|
|
16
|
+
lang;
|
|
17
|
+
ready;
|
|
18
|
+
idToString() {
|
|
19
|
+
this.leafId = this.leafId?.toString();
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.SectionEntity = SectionEntity;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ type: "bigint", primary: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], SectionEntity.prototype, "leafId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: "varchar", primary: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], SectionEntity.prototype, "lang", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: "boolean", default: false }),
|
|
33
|
+
__metadata("design:type", Boolean)
|
|
34
|
+
], SectionEntity.prototype, "ready", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.AfterLoad)(),
|
|
37
|
+
__metadata("design:type", Function),
|
|
38
|
+
__metadata("design:paramtypes", []),
|
|
39
|
+
__metadata("design:returntype", void 0)
|
|
40
|
+
], SectionEntity.prototype, "idToString", null);
|
|
41
|
+
exports.SectionEntity = SectionEntity = __decorate([
|
|
42
|
+
(0, typeorm_1.Entity)("PaSection")
|
|
43
|
+
], SectionEntity);
|
|
44
|
+
//# sourceMappingURL=section.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section.model.js","sourceRoot":"","sources":["../../../../src/modules/core/section/section.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AAG7C,IAAM,aAAa,GAAnB,MAAM,aAAa;IAExB,MAAM,CAAU;IAGhB,IAAI,CAAU;IAGd,KAAK,CAAW;IAGhB,UAAU;QACR,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC;IACxC,CAAC;CACF,CAAA;AAdY,sCAAa;AAExB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;6CAC1B;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;2CAC7B;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;4CAC5B;AAGhB;IADC,IAAA,mBAAS,GAAE;;;;+CAGX;wBAbU,aAAa;IADzB,IAAA,gBAAM,EAAC,WAAW,CAAC;GACP,aAAa,CAczB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SectionModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const section_wrap_resolver_1 = require("./section-wrap.resolver");
|
|
12
|
+
const section_resolver_1 = require("./section.resolver");
|
|
13
|
+
let SectionModule = class SectionModule {
|
|
14
|
+
};
|
|
15
|
+
exports.SectionModule = SectionModule;
|
|
16
|
+
exports.SectionModule = SectionModule = __decorate([
|
|
17
|
+
(0, common_1.Module)({
|
|
18
|
+
providers: [section_resolver_1.SectionResolver, section_wrap_resolver_1.SectionWrapResolver],
|
|
19
|
+
})
|
|
20
|
+
], SectionModule);
|
|
21
|
+
//# sourceMappingURL=section.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section.module.js","sourceRoot":"","sources":["../../../../src/modules/core/section/section.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,mEAA8D;AAC9D,yDAAqD;AAK9C,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAHzB,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,kCAAe,EAAE,2CAAmB,CAAC;KAClD,CAAC;GACW,aAAa,CAAG"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type ParsedSectionId } from "@paroicms/anywhere-lib";
|
|
2
|
+
import type { Tracker } from "@paroicms/server-lib";
|
|
3
|
+
import type { DataSource, EntityManager } from "typeorm";
|
|
4
|
+
import type { SiteContext } from "../../../site-context/site-context.types";
|
|
5
|
+
import { SectionEntity } from "./section.model";
|
|
6
|
+
import type { PagedSectionWrapsObjectType, SectionObjectType } from "./section.schema";
|
|
7
|
+
export interface ChildSectionsListWithTotal {
|
|
8
|
+
list: SectionEntity[];
|
|
9
|
+
total: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function leafSections({ mainCn }: SiteContext, leafId: string): Promise<SectionEntity[]>;
|
|
12
|
+
export declare function findOneSection({ mainCn }: SiteContext, sectionId: ParsedSectionId): Promise<SectionEntity>;
|
|
13
|
+
export declare function getSectionWraps(siteContext: Pick<SiteContext, "mainCn" | "siteSchema">, { parentId, pagination, }: {
|
|
14
|
+
parentId: ParsedSectionId;
|
|
15
|
+
pagination?: {
|
|
16
|
+
start: number;
|
|
17
|
+
limit: number;
|
|
18
|
+
};
|
|
19
|
+
}): Promise<{
|
|
20
|
+
total?: number;
|
|
21
|
+
sectionWraps: {
|
|
22
|
+
section: SectionObjectType;
|
|
23
|
+
sectionId: string;
|
|
24
|
+
lang: string;
|
|
25
|
+
leafId: string;
|
|
26
|
+
}[];
|
|
27
|
+
}>;
|
|
28
|
+
export interface PaginationOptions {
|
|
29
|
+
start: number;
|
|
30
|
+
limit: number;
|
|
31
|
+
}
|
|
32
|
+
export declare function setSectionReady(siteContext: SiteContext, { sectionId, ready }: {
|
|
33
|
+
sectionId: ParsedSectionId;
|
|
34
|
+
ready: boolean;
|
|
35
|
+
}): Promise<void>;
|
|
36
|
+
export interface BreadcrumbItem {
|
|
37
|
+
documentId: ParsedSectionId;
|
|
38
|
+
leafType: string;
|
|
39
|
+
title?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare function getBreadcrumb(siteContext: Pick<SiteContext, "mainCn" | "siteSchema">, tracker: Tracker, documentId: ParsedSectionId, options?: {
|
|
42
|
+
ensurePublished?: boolean;
|
|
43
|
+
skipHome?: boolean;
|
|
44
|
+
}): Promise<BreadcrumbItem[]>;
|
|
45
|
+
export declare function isOrphanLeaf(cn: EntityManager | DataSource, leafId: string): Promise<boolean>;
|
|
46
|
+
export declare function searchDocuments(siteContext: SiteContext, options: {
|
|
47
|
+
lang: string;
|
|
48
|
+
queryString: string;
|
|
49
|
+
start: number;
|
|
50
|
+
limit: number;
|
|
51
|
+
}): Promise<PagedSectionWrapsObjectType>;
|