@paroicms/server 0.146.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 +3 -0
- package/ddl/main.ddl.sql +84 -0
- package/dist/backup/site/archiver.helper.d.ts +12 -0
- package/dist/backup/site/archiver.helper.js +46 -0
- package/dist/backup/site/archiver.helper.js.map +1 -0
- package/dist/backup/site/backup.d.ts +5 -0
- package/dist/backup/site/backup.js +118 -0
- package/dist/backup/site/backup.js.map +1 -0
- 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/excerpt.helpers.spec.d.ts +1 -0
- package/dist/helpers/excerpt.helpers.spec.js +133 -0
- package/dist/helpers/excerpt.helpers.spec.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/search-text-helper.d.ts +7 -0
- package/dist/helpers/search-text-helper.js +27 -0
- package/dist/helpers/search-text-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 +67 -0
- package/dist/index.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.controller.d.ts +5 -0
- package/dist/modules/core/account-auth/account-auth.controller.js +46 -0
- package/dist/modules/core/account-auth/account-auth.controller.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 +49 -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 +164 -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 +61 -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 +54 -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/document/search-document-item.resolver.d.ts +7 -0
- package/dist/modules/core/document/search-document-item.resolver.js +58 -0
- package/dist/modules/core/document/search-document-item.resolver.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 +143 -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 +54 -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.model.d.ts +6 -0
- package/dist/modules/core/part/part.model.js +44 -0
- package/dist/modules/core/part/part.model.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-fields/site-fields.model.d.ts +4 -0
- package/dist/modules/core/site-fields/site-fields.model.js +30 -0
- package/dist/modules/core/site-fields/site-fields.model.js.map +1 -0
- package/dist/modules/core/site-fields/site-fields.module.d.ts +2 -0
- package/dist/modules/core/site-fields/site-fields.module.js +20 -0
- package/dist/modules/core/site-fields/site-fields.module.js.map +1 -0
- package/dist/modules/core/site-fields/site-fields.queries.d.ts +9 -0
- package/dist/modules/core/site-fields/site-fields.queries.js +123 -0
- package/dist/modules/core/site-fields/site-fields.queries.js.map +1 -0
- package/dist/modules/core/site-fields/site-fields.resolver.d.ts +5 -0
- package/dist/modules/core/site-fields/site-fields.resolver.js +56 -0
- package/dist/modules/core/site-fields/site-fields.resolver.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/term-flag/term-flag.service.d.ts +9 -0
- package/dist/modules/core/term-flag/term-flag.service.js +50 -0
- package/dist/modules/core/term-flag/term-flag.service.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 +59 -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 +198 -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/google-auth.controller.d.ts +10 -0
- package/dist/modules/public-site/google-auth.controller.js +127 -0
- package/dist/modules/public-site/google-auth.controller.js.map +1 -0
- package/dist/modules/public-site/helpers/format-date.helper.d.ts +3 -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/format-date.helper.spec.d.ts +1 -0
- package/dist/modules/public-site/helpers/format-date.helper.spec.js +37 -0
- package/dist/modules/public-site/helpers/format-date.helper.spec.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/helpers/public-field-values.d.ts +10 -0
- package/dist/modules/public-site/helpers/public-field-values.js +76 -0
- package/dist/modules/public-site/helpers/public-field-values.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/format-date.d.ts +2 -0
- package/dist/modules/public-site/liquidjs-filters/format-date.js +14 -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 +2 -0
- package/dist/modules/public-site/liquidjs-filters/format-number.js +18 -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 +2 -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 +2 -0
- package/dist/modules/public-site/liquidjs-filters/inject-facebook-chat.js +38 -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 +3 -0
- package/dist/modules/public-site/liquidjs-filters/inject-menu-items-data.js +21 -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 +2 -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 +3 -0
- package/dist/modules/public-site/liquidjs-filters/obfuscate.js +15 -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 +4 -0
- package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js +39 -0
- package/dist/modules/public-site/liquidjs-filters/open-graph-filter.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.1.d.ts +3 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.1.js +12 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.1.js.map +1 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.d.ts +3 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.js +12 -0
- package/dist/modules/public-site/liquidjs-filters/translate-filter.js.map +1 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/collection.d.ts +1 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/collection.js +18 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/collection.js.map +1 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/forloop-drop.d.ts +15 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/forloop-drop.js +40 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/forloop-drop.js.map +1 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/render.d.ts +13 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/render.js +108 -0
- package/dist/modules/public-site/liquidjs-rendering/render-clone/render.js.map +1 -0
- package/dist/modules/public-site/liquidjs-rendering/render-liquidjs.d.ts +6 -0
- package/dist/modules/public-site/liquidjs-rendering/render-liquidjs.js +40 -0
- package/dist/modules/public-site/liquidjs-rendering/render-liquidjs.js.map +1 -0
- package/dist/modules/public-site/liquidjs-rendering/rendering-context.d.ts +27 -0
- package/dist/modules/public-site/liquidjs-rendering/rendering-context.js +46 -0
- package/dist/modules/public-site/liquidjs-rendering/rendering-context.js.map +1 -0
- package/dist/modules/public-site/liquidjs-tags/get-breadcrumb-liquidjs-tag.d.ts +13 -0
- package/dist/modules/public-site/liquidjs-tags/get-breadcrumb-liquidjs-tag.js +49 -0
- package/dist/modules/public-site/liquidjs-tags/get-breadcrumb-liquidjs-tag.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 +68 -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 +94 -0
- package/dist/modules/public-site/liquidjs-tags/get-pages-tag.js.map +1 -0
- package/dist/modules/public-site/liquidjs-tags/get-siblings-liquidjs-tag.d.ts +13 -0
- package/dist/modules/public-site/liquidjs-tags/get-siblings-liquidjs-tag.js +61 -0
- package/dist/modules/public-site/liquidjs-tags/get-siblings-liquidjs-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 +53 -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 +144 -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 +46 -0
- package/dist/modules/security/complexity-plugin.js.map +1 -0
- package/dist/modules/security/gqlThrottlerGuard.d.ts +8 -0
- package/dist/modules/security/gqlThrottlerGuard.js +24 -0
- package/dist/modules/security/gqlThrottlerGuard.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/create-page-payload-drop.d.ts +10 -0
- package/dist/public-payload/create-page-payload-drop.js +143 -0
- package/dist/public-payload/create-page-payload-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/liquidjs-drop.d.ts +31 -0
- package/dist/public-payload/liquidjs-drop.js +45 -0
- package/dist/public-payload/liquidjs-drop.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 +11 -0
- package/dist/site-backup/backup-tasks.js +98 -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 +34 -0
- package/dist/site-backup/backup.js.map +1 -0
- package/dist/site-backup/default-data/default-config.d.ts +1 -0
- package/dist/site-backup/default-data/default-config.js +50 -0
- package/dist/site-backup/default-data/default-config.js.map +1 -0
- package/dist/site-backup/default-data/default-readme.d.ts +1 -0
- package/dist/site-backup/default-data/default-readme.js +8 -0
- package/dist/site-backup/default-data/default-readme.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 +37 -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 +4 -0
- package/dist/site-context/db-init/init-routing-points.js +147 -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 +11 -0
- package/dist/site-context/site-context.js +234 -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 +382 -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/locales/en.json +18 -0
- package/locales/fr.json +18 -0
- package/package.json +99 -0
- package/schema.gql +293 -0
- package/site-schema-lib/common-schema.json +36 -0
- package/site-schema-lib/common-schema.l10n.en.json +10 -0
- package/site-schema-lib/common-schema.l10n.fr.json +10 -0
- package/site-schema-lib/fields.site-schema.json +79 -0
- package/site-schema-lib/fields.site-schema.l10n.en.json +26 -0
- package/site-schema-lib/fields.site-schema.l10n.fr.json +26 -0
- package/site-schema-lib/gallery-page.site-schema.json +19 -0
- package/site-schema-lib/gallery-page.site-schema.l10n.en.json +11 -0
- package/site-schema-lib/gallery-page.site-schema.l10n.fr.json +11 -0
- package/site-schema-lib/lowcost.site-schema.json +84 -0
- package/site-schema-lib/lowcost.site-schema.l10n.en.json +30 -0
- package/site-schema-lib/lowcost.site-schema.l10n.fr.json +30 -0
- package/site-schema-lib/media-policies.site-schema.json +26 -0
- package/site-schema-lib/portfolio.site-schema.json +28 -0
- package/site-schema-lib/portfolio.site-schema.l10n.en.json +16 -0
- package/site-schema-lib/portfolio.site-schema.l10n.fr.json +16 -0
- package/site-schema-lib/post.site-schema.json +48 -0
- package/site-schema-lib/post.site-schema.l10n.en.json +28 -0
- package/site-schema-lib/post.site-schema.l10n.fr.json +27 -0
- package/site-schema-lib/simple-pages.site-schema.json +19 -0
- package/site-schema-lib/simple-pages.site-schema.l10n.en.json +11 -0
- package/site-schema-lib/simple-pages.site-schema.l10n.fr.json +11 -0
- package/site-schema-lib/special-page.site-schema.json +42 -0
- package/site-schema-lib/special-page.site-schema.l10n.en.json +16 -0
- package/site-schema-lib/special-page.site-schema.l10n.fr.json +16 -0
- package/site-schema-lib/tour.site-schema.json +70 -0
- package/site-schema-lib/tour.site-schema.l10n.en.json +37 -0
- package/site-schema-lib/tour.site-schema.l10n.fr.json +37 -0
|
@@ -0,0 +1,181 @@
|
|
|
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.UpdateDocumentMetaValuesInput = exports.UpdateDocumentTitleValuesInput = exports.CreateLeafWithDocumentValuesInput = exports.CreateDocumentValuesInput = exports.TermDocumentObjectType = exports.SearchDocumentItemObjectType = exports.DocumentObjectType = void 0;
|
|
13
|
+
const graphql_1 = require("@nestjs/graphql");
|
|
14
|
+
let DocumentObjectType = class DocumentObjectType {
|
|
15
|
+
sectionId;
|
|
16
|
+
leafId;
|
|
17
|
+
lang;
|
|
18
|
+
title;
|
|
19
|
+
slug;
|
|
20
|
+
metaDescription;
|
|
21
|
+
metaKeywords;
|
|
22
|
+
featuredImageHandle;
|
|
23
|
+
};
|
|
24
|
+
exports.DocumentObjectType = DocumentObjectType;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, graphql_1.Field)(() => graphql_1.ID),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], DocumentObjectType.prototype, "sectionId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, graphql_1.Field)(() => graphql_1.ID),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], DocumentObjectType.prototype, "leafId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, graphql_1.Field)(() => String),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], DocumentObjectType.prototype, "lang", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], DocumentObjectType.prototype, "title", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], DocumentObjectType.prototype, "slug", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], DocumentObjectType.prototype, "metaDescription", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], DocumentObjectType.prototype, "metaKeywords", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, graphql_1.Field)(() => String),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], DocumentObjectType.prototype, "featuredImageHandle", void 0);
|
|
57
|
+
exports.DocumentObjectType = DocumentObjectType = __decorate([
|
|
58
|
+
(0, graphql_1.ObjectType)("Document")
|
|
59
|
+
], DocumentObjectType);
|
|
60
|
+
let SearchDocumentItemObjectType = class SearchDocumentItemObjectType {
|
|
61
|
+
lang;
|
|
62
|
+
leafId;
|
|
63
|
+
sectionId;
|
|
64
|
+
title;
|
|
65
|
+
};
|
|
66
|
+
exports.SearchDocumentItemObjectType = SearchDocumentItemObjectType;
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, graphql_1.Field)(() => String),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], SearchDocumentItemObjectType.prototype, "lang", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, graphql_1.Field)(() => graphql_1.ID),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], SearchDocumentItemObjectType.prototype, "leafId", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, graphql_1.Field)(() => graphql_1.ID),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], SearchDocumentItemObjectType.prototype, "sectionId", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], SearchDocumentItemObjectType.prototype, "title", void 0);
|
|
83
|
+
exports.SearchDocumentItemObjectType = SearchDocumentItemObjectType = __decorate([
|
|
84
|
+
(0, graphql_1.ObjectType)("SearchDocumentItem")
|
|
85
|
+
], SearchDocumentItemObjectType);
|
|
86
|
+
let TermDocumentObjectType = class TermDocumentObjectType {
|
|
87
|
+
title;
|
|
88
|
+
lang;
|
|
89
|
+
};
|
|
90
|
+
exports.TermDocumentObjectType = TermDocumentObjectType;
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], TermDocumentObjectType.prototype, "title", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, graphql_1.Field)(() => String),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], TermDocumentObjectType.prototype, "lang", void 0);
|
|
99
|
+
exports.TermDocumentObjectType = TermDocumentObjectType = __decorate([
|
|
100
|
+
(0, graphql_1.ObjectType)("TermDocument")
|
|
101
|
+
], TermDocumentObjectType);
|
|
102
|
+
let CreateDocumentValuesInput = class CreateDocumentValuesInput {
|
|
103
|
+
slug;
|
|
104
|
+
title;
|
|
105
|
+
};
|
|
106
|
+
exports.CreateDocumentValuesInput = CreateDocumentValuesInput;
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
109
|
+
__metadata("design:type", String)
|
|
110
|
+
], CreateDocumentValuesInput.prototype, "slug", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
113
|
+
__metadata("design:type", String)
|
|
114
|
+
], CreateDocumentValuesInput.prototype, "title", void 0);
|
|
115
|
+
exports.CreateDocumentValuesInput = CreateDocumentValuesInput = __decorate([
|
|
116
|
+
(0, graphql_1.InputType)("CreateDocumentValues")
|
|
117
|
+
], CreateDocumentValuesInput);
|
|
118
|
+
let CreateLeafWithDocumentValuesInput = class CreateLeafWithDocumentValuesInput {
|
|
119
|
+
slug;
|
|
120
|
+
title;
|
|
121
|
+
leafType;
|
|
122
|
+
};
|
|
123
|
+
exports.CreateLeafWithDocumentValuesInput = CreateLeafWithDocumentValuesInput;
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
126
|
+
__metadata("design:type", String)
|
|
127
|
+
], CreateLeafWithDocumentValuesInput.prototype, "slug", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
130
|
+
__metadata("design:type", String)
|
|
131
|
+
], CreateLeafWithDocumentValuesInput.prototype, "title", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, graphql_1.Field)(() => String),
|
|
134
|
+
__metadata("design:type", String)
|
|
135
|
+
], CreateLeafWithDocumentValuesInput.prototype, "leafType", void 0);
|
|
136
|
+
exports.CreateLeafWithDocumentValuesInput = CreateLeafWithDocumentValuesInput = __decorate([
|
|
137
|
+
(0, graphql_1.InputType)("CreateLeafWithDocumentValues")
|
|
138
|
+
], CreateLeafWithDocumentValuesInput);
|
|
139
|
+
let UpdateDocumentTitleValuesInput = class UpdateDocumentTitleValuesInput {
|
|
140
|
+
title;
|
|
141
|
+
slug;
|
|
142
|
+
};
|
|
143
|
+
exports.UpdateDocumentTitleValuesInput = UpdateDocumentTitleValuesInput;
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
146
|
+
__metadata("design:type", String)
|
|
147
|
+
], UpdateDocumentTitleValuesInput.prototype, "title", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
150
|
+
__metadata("design:type", String)
|
|
151
|
+
], UpdateDocumentTitleValuesInput.prototype, "slug", void 0);
|
|
152
|
+
exports.UpdateDocumentTitleValuesInput = UpdateDocumentTitleValuesInput = __decorate([
|
|
153
|
+
(0, graphql_1.InputType)("UpdateDocumentTitleValues")
|
|
154
|
+
], UpdateDocumentTitleValuesInput);
|
|
155
|
+
let UpdateDocumentMetaValuesInput = class UpdateDocumentMetaValuesInput {
|
|
156
|
+
title;
|
|
157
|
+
slug;
|
|
158
|
+
metaDescription;
|
|
159
|
+
metaKeywords;
|
|
160
|
+
};
|
|
161
|
+
exports.UpdateDocumentMetaValuesInput = UpdateDocumentMetaValuesInput;
|
|
162
|
+
__decorate([
|
|
163
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
164
|
+
__metadata("design:type", String)
|
|
165
|
+
], UpdateDocumentMetaValuesInput.prototype, "title", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
168
|
+
__metadata("design:type", String)
|
|
169
|
+
], UpdateDocumentMetaValuesInput.prototype, "slug", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
172
|
+
__metadata("design:type", String)
|
|
173
|
+
], UpdateDocumentMetaValuesInput.prototype, "metaDescription", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
176
|
+
__metadata("design:type", String)
|
|
177
|
+
], UpdateDocumentMetaValuesInput.prototype, "metaKeywords", void 0);
|
|
178
|
+
exports.UpdateDocumentMetaValuesInput = UpdateDocumentMetaValuesInput = __decorate([
|
|
179
|
+
(0, graphql_1.InputType)("UpdateDocumentMetaValues")
|
|
180
|
+
], UpdateDocumentMetaValuesInput);
|
|
181
|
+
//# sourceMappingURL=document.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.schema.js","sourceRoot":"","sources":["../../../../src/modules/core/document/document.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AAG5D,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAE7B,SAAS,CAAU;IAGnB,MAAM,CAAU;IAGhB,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,IAAI,CAAU;IAGd,eAAe,CAAU;IAGzB,YAAY,CAAU;IAGtB,mBAAmB,CAAU;CAC9B,CAAA;AAxBY,gDAAkB;AAE7B;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;qDACG;AAGnB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;kDACA;AAGhB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;gDACN;AAGd;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACzB;AAGf;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDAC1B;AAGd;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DACf;AAGzB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDAClB;AAGtB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;+DACS;6BAvBlB,kBAAkB;IAD9B,IAAA,oBAAU,EAAC,UAAU,CAAC;GACV,kBAAkB,CAwB9B;AAGM,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAEvC,IAAI,CAAU;IAGd,MAAM,CAAU;IAGhB,SAAS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AAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sEACf;AAGzB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mEAClB;wCAXX,6BAA6B;IADzC,IAAA,mBAAS,EAAC,0BAA0B,CAAC;GACzB,6BAA6B,CAYzC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ParsedSectionId } from "@paroicms/anywhere-lib";
|
|
2
|
+
import { SiteContext } from "../../../site-context/site-context.types";
|
|
3
|
+
import { DocumentEntity } from "./document.model";
|
|
4
|
+
import { TermDocumentObjectType } from "./document.schema";
|
|
5
|
+
export declare function document({ mainCn }: SiteContext, id: {
|
|
6
|
+
leafId: string;
|
|
7
|
+
lang: string;
|
|
8
|
+
}): Promise<DocumentEntity>;
|
|
9
|
+
export declare function getOneDocument(siteContext: SiteContext, id: ParsedSectionId): Promise<DocumentEntity>;
|
|
10
|
+
export declare function findOneDocument(siteContext: SiteContext, id: ParsedSectionId): Promise<DocumentEntity | undefined>;
|
|
11
|
+
export declare function findOneTermDocument({ mainCn }: SiteContext, { lang, leafId }: ParsedSectionId): Promise<TermDocumentObjectType | undefined>;
|
|
12
|
+
export declare function getParentSectionIdOf(siteContext: Pick<SiteContext, "mainCn">, { lang, leafId }: ParsedSectionId): Promise<ParsedSectionId | undefined>;
|
|
13
|
+
export declare function getParentLeafIdOf(siteContext: Pick<SiteContext, "mainCn">, leafId: string): Promise<string | undefined>;
|
|
14
|
+
export declare function getParentDocumentIdsOf(siteContext: Pick<SiteContext, "mainCn" | "siteSchema">, options: {
|
|
15
|
+
langs?: string[];
|
|
16
|
+
leafId: string;
|
|
17
|
+
}): Promise<ParsedSectionId[]>;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getParentDocumentIdsOf = exports.getParentLeafIdOf = exports.getParentSectionIdOf = exports.findOneTermDocument = exports.findOneDocument = exports.getOneDocument = exports.document = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const data_formatters_lib_1 = require("@paroi/data-formatters-lib");
|
|
6
|
+
const document_model_1 = require("./document.model");
|
|
7
|
+
async function document({ mainCn }, id) {
|
|
8
|
+
return await mainCn.getRepository(document_model_1.DocumentEntity).findOneOrFail({ where: id });
|
|
9
|
+
}
|
|
10
|
+
exports.document = document;
|
|
11
|
+
async function getOneDocument(siteContext, id) {
|
|
12
|
+
const document = await siteContext.mainCn.getRepository(document_model_1.DocumentEntity).findOne({ where: id });
|
|
13
|
+
if (!document)
|
|
14
|
+
throw new common_1.NotFoundException(`can't find document '${id.lang}:${id.leafId}'`);
|
|
15
|
+
return document;
|
|
16
|
+
}
|
|
17
|
+
exports.getOneDocument = getOneDocument;
|
|
18
|
+
async function findOneDocument(siteContext, id) {
|
|
19
|
+
return ((await siteContext.mainCn.getRepository(document_model_1.DocumentEntity).findOne({ where: id })) ?? undefined);
|
|
20
|
+
}
|
|
21
|
+
exports.findOneDocument = findOneDocument;
|
|
22
|
+
async function findOneTermDocument({ mainCn }, { lang, leafId }) {
|
|
23
|
+
const rows = await mainCn
|
|
24
|
+
.createQueryBuilder()
|
|
25
|
+
.select("d.title", "title")
|
|
26
|
+
.addSelect("d.lang", "lang")
|
|
27
|
+
.from("PaLeaf", "l")
|
|
28
|
+
.leftJoin("PaDocument", "d", "d.leafId = l.id")
|
|
29
|
+
.where("l.id = :leafId", { leafId })
|
|
30
|
+
.getRawMany();
|
|
31
|
+
const candidates = rows.map((row) => ({
|
|
32
|
+
lang: (0, data_formatters_lib_1.strVal)(row.lang),
|
|
33
|
+
title: (0, data_formatters_lib_1.strValOrUndef)(row.title),
|
|
34
|
+
}));
|
|
35
|
+
let found = candidates.find((row) => (0, data_formatters_lib_1.strVal)(row.lang) === lang);
|
|
36
|
+
if (!found) {
|
|
37
|
+
found = candidates[0];
|
|
38
|
+
}
|
|
39
|
+
return found;
|
|
40
|
+
}
|
|
41
|
+
exports.findOneTermDocument = findOneTermDocument;
|
|
42
|
+
function getSearchedItems(rows, lang) {
|
|
43
|
+
const formatedRowsMap = new Map();
|
|
44
|
+
rows.forEach((row) => {
|
|
45
|
+
const leafId = (0, data_formatters_lib_1.strVal)(row.leafId);
|
|
46
|
+
const newVal = {
|
|
47
|
+
lang: (0, data_formatters_lib_1.strVal)(row.lang),
|
|
48
|
+
title: (0, data_formatters_lib_1.strValOrUndef)(row.title),
|
|
49
|
+
leafId,
|
|
50
|
+
};
|
|
51
|
+
const oldVal = formatedRowsMap.get(leafId);
|
|
52
|
+
if (oldVal) {
|
|
53
|
+
formatedRowsMap.set(leafId, [...oldVal, newVal]);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
formatedRowsMap.set(leafId, [newVal]);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
const result = [];
|
|
60
|
+
formatedRowsMap.forEach((row) => {
|
|
61
|
+
let found = row.find((row) => row.lang === lang);
|
|
62
|
+
if (!found) {
|
|
63
|
+
found = row[0];
|
|
64
|
+
}
|
|
65
|
+
result.push(found);
|
|
66
|
+
});
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
async function getParentSectionIdOf(siteContext, { lang, leafId }) {
|
|
70
|
+
const row = await siteContext.mainCn
|
|
71
|
+
.createQueryBuilder()
|
|
72
|
+
.select("l2.id", "parentId")
|
|
73
|
+
.from("PaLeaf", "l")
|
|
74
|
+
.innerJoin("PaSection", "s", "s.leafId = l.id")
|
|
75
|
+
.innerJoin("PaLeaf", "l2", "l2.id = l.parentId")
|
|
76
|
+
.innerJoin("PaSection", "s2", "s2.leafId = l2.id")
|
|
77
|
+
.where("l.id = :leafId", { leafId })
|
|
78
|
+
.andWhere("s.lang = :lang", { lang })
|
|
79
|
+
.andWhere("s2.lang = :lang", { lang })
|
|
80
|
+
.getRawOne();
|
|
81
|
+
if (!row)
|
|
82
|
+
return undefined;
|
|
83
|
+
return {
|
|
84
|
+
lang,
|
|
85
|
+
leafId: (0, data_formatters_lib_1.strVal)(row.parentId),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
exports.getParentSectionIdOf = getParentSectionIdOf;
|
|
89
|
+
async function getParentLeafIdOf(siteContext, leafId) {
|
|
90
|
+
const row = await siteContext.mainCn
|
|
91
|
+
.createQueryBuilder()
|
|
92
|
+
.select("l.parentId", "id")
|
|
93
|
+
.from("PaLeaf", "l")
|
|
94
|
+
.where("l.id = :leafId", { leafId })
|
|
95
|
+
.getRawOne();
|
|
96
|
+
if (!row)
|
|
97
|
+
throw new Error(`cannot find parent leaf of '${leafId}'`);
|
|
98
|
+
return (0, data_formatters_lib_1.strValOrUndef)(row.id);
|
|
99
|
+
}
|
|
100
|
+
exports.getParentLeafIdOf = getParentLeafIdOf;
|
|
101
|
+
async function getParentDocumentIdsOf(siteContext, options) {
|
|
102
|
+
const langs = options.langs ?? siteContext.siteSchema.langs;
|
|
103
|
+
const rows = await siteContext.mainCn
|
|
104
|
+
.createQueryBuilder()
|
|
105
|
+
.select("l.parentId", "parentId")
|
|
106
|
+
.addSelect("d.lang", "lang")
|
|
107
|
+
.from("PaLeaf", "l")
|
|
108
|
+
.innerJoin("PaDocument", "d", "d.leafId = l.id")
|
|
109
|
+
.where("l.id = :leafId", { leafId: options.leafId })
|
|
110
|
+
.andWhere("d.lang in (:...langs)", { langs })
|
|
111
|
+
.andWhere("l.parentId is not null")
|
|
112
|
+
.getRawMany();
|
|
113
|
+
return rows.map((row) => ({
|
|
114
|
+
lang: (0, data_formatters_lib_1.strVal)(row.lang),
|
|
115
|
+
leafId: (0, data_formatters_lib_1.strVal)(row.parentId),
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
exports.getParentDocumentIdsOf = getParentDocumentIdsOf;
|
|
119
|
+
//# sourceMappingURL=load-documents.queries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-docum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AC,GAAG,CAAC,IAAI,CAAC;QACtB,MAAM,EAAE,IAAA,4BAAM,EAAC,GAAG,CAAC,QAAQ,CAAC;KAC7B,CAAC,CAAC,CAAC;AACN,CAAC;AAnBD,wDAmBC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ParsedSectionId } from "@paroicms/anywhere-lib";
|
|
2
|
+
import { SiteContext } from "../../../site-context/site-context.types";
|
|
3
|
+
import { CreateDocumentValuesInput, CreateLeafWithDocumentValuesInput, UpdateDocumentMetaValuesInput, UpdateDocumentTitleValuesInput } from "./document.schema";
|
|
4
|
+
export declare function updateDocument(siteContext: SiteContext, documentId: ParsedSectionId, values: UpdateDocumentTitleValuesInput | UpdateDocumentMetaValuesInput): Promise<void>;
|
|
5
|
+
export declare function createDocumentOnLeaf(siteContext: SiteContext, { lang, leafId, values }: {
|
|
6
|
+
lang: string;
|
|
7
|
+
leafId: string;
|
|
8
|
+
values?: CreateDocumentValuesInput;
|
|
9
|
+
}): Promise<ParsedSectionId>;
|
|
10
|
+
export declare function createLeafWithDocument(siteContext: SiteContext, { parentId, values, }: {
|
|
11
|
+
parentId: ParsedSectionId;
|
|
12
|
+
values: CreateLeafWithDocumentValuesInput;
|
|
13
|
+
}): Promise<ParsedSectionId>;
|
|
14
|
+
export declare function deleteLeafAndDocuments(siteContext: SiteContext, leafId: string): Promise<void>;
|
|
15
|
+
export declare function deleteDocument(siteContext: SiteContext, documentId: {
|
|
16
|
+
lang: string;
|
|
17
|
+
leafId: string;
|
|
18
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteDocument = exports.deleteLeafAndDocuments = exports.createLeafWithDocument = exports.createDocumentOnLeaf = exports.updateDocument = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const data_formatters_lib_1 = require("@paroi/data-formatters-lib");
|
|
6
|
+
const anywhere_lib_1 = require("@paroicms/anywhere-lib");
|
|
7
|
+
const media_handles_helpers_1 = require("../../../common/media-handles.helpers");
|
|
8
|
+
const text_cache_1 = require("../../../common/text-cache");
|
|
9
|
+
const fields_model_1 = require("../fields/fields.model");
|
|
10
|
+
const leaf_model_1 = require("../leaf/leaf.model");
|
|
11
|
+
const leaf_queries_1 = require("../leaf/leaf.queries");
|
|
12
|
+
const section_model_1 = require("../section/section.model");
|
|
13
|
+
const document_helper_1 = require("./document.helper");
|
|
14
|
+
const document_model_1 = require("./document.model");
|
|
15
|
+
const load_documents_queries_1 = require("./load-documents.queries");
|
|
16
|
+
async function updateDocument(siteContext, documentId, values) {
|
|
17
|
+
const { mainCn } = siteContext;
|
|
18
|
+
const documentRepository = mainCn.getRepository(document_model_1.DocumentEntity);
|
|
19
|
+
await documentRepository.update(documentId, values);
|
|
20
|
+
await (0, text_cache_1.invalidateDocumentInCache)(siteContext, {
|
|
21
|
+
documentId,
|
|
22
|
+
perimeter: values.slug !== undefined ? "slug" : undefined,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
exports.updateDocument = updateDocument;
|
|
26
|
+
async function createDocumentOnLeaf(siteContext, { lang, leafId, values }) {
|
|
27
|
+
const { mainCn } = siteContext;
|
|
28
|
+
const documentId = await mainCn.transaction(async (cn) => {
|
|
29
|
+
const leafType = await (0, leaf_queries_1.getLeafTypeOf)({ mainCn: siteContext.mainCn }, leafId);
|
|
30
|
+
return await createDocumentWithManager({
|
|
31
|
+
lang,
|
|
32
|
+
leafId,
|
|
33
|
+
cn,
|
|
34
|
+
values,
|
|
35
|
+
autoPublish: (0, document_helper_1.isAutoPublishDocument)(siteContext.siteSchema, leafType),
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
return documentId;
|
|
39
|
+
}
|
|
40
|
+
exports.createDocumentOnLeaf = createDocumentOnLeaf;
|
|
41
|
+
async function createLeafWithDocument(siteContext, { parentId, values, }) {
|
|
42
|
+
const { lang, leafId: parentLeafId } = parentId;
|
|
43
|
+
const parentLeafType = await (0, leaf_queries_1.getLeafTypeOf)(siteContext, parentLeafId);
|
|
44
|
+
const parentDocumentType = (0, anywhere_lib_1.getDocumentTypeByLeafType)(siteContext.siteSchema, parentLeafType);
|
|
45
|
+
if (parentDocumentType.childLimit !== undefined) {
|
|
46
|
+
const count = await (0, leaf_queries_1.countLeafChildrenOf)(siteContext, parentLeafId);
|
|
47
|
+
if (count >= parentDocumentType.childLimit)
|
|
48
|
+
throw new common_1.BadRequestException("maximum children reached");
|
|
49
|
+
}
|
|
50
|
+
const documentId = await siteContext.mainCn.transaction(async (cn) => {
|
|
51
|
+
const { id: leafId } = await (0, leaf_queries_1.createLeaf)(siteContext.siteSchema, cn, {
|
|
52
|
+
parentId: parentLeafId,
|
|
53
|
+
leafType: values.leafType,
|
|
54
|
+
});
|
|
55
|
+
const newId = await createDocumentWithManager({
|
|
56
|
+
lang,
|
|
57
|
+
leafId,
|
|
58
|
+
values,
|
|
59
|
+
cn,
|
|
60
|
+
autoPublish: (0, document_helper_1.isAutoPublishDocument)(siteContext.siteSchema, values.leafType),
|
|
61
|
+
});
|
|
62
|
+
return newId;
|
|
63
|
+
});
|
|
64
|
+
await (0, text_cache_1.invalidateDocumentRelationCache)(siteContext, {
|
|
65
|
+
documentId: parentId,
|
|
66
|
+
relation: "children",
|
|
67
|
+
});
|
|
68
|
+
return documentId;
|
|
69
|
+
}
|
|
70
|
+
exports.createLeafWithDocument = createLeafWithDocument;
|
|
71
|
+
async function deleteLeafAndDocuments(siteContext, leafId) {
|
|
72
|
+
const { mainCn, mediaStorage } = siteContext;
|
|
73
|
+
const parentDocumentIds = await (0, load_documents_queries_1.getParentDocumentIdsOf)(siteContext, { leafId });
|
|
74
|
+
const { partLeafIds } = await mainCn.transaction(async (cn) => {
|
|
75
|
+
const leafRows = await cn
|
|
76
|
+
.createQueryBuilder()
|
|
77
|
+
.select("l.id", "id")
|
|
78
|
+
.from("PaLeaf", "l")
|
|
79
|
+
.where("l.parentId = :leafId", { leafId })
|
|
80
|
+
.andWhere("not exists (select 1 from PaDocument d where d.leafId = l.id)")
|
|
81
|
+
.getRawMany();
|
|
82
|
+
const partLeafIds = leafRows.map((r) => (0, data_formatters_lib_1.strVal)(r.id));
|
|
83
|
+
await fullDeleteParts(partLeafIds, cn);
|
|
84
|
+
await cn.getRepository(fields_model_1.PaFieldVarcharEntity).delete({ leafId });
|
|
85
|
+
await cn.getRepository(fields_model_1.PaFieldTextEntity).delete({ leafId });
|
|
86
|
+
await cn.getRepository(document_model_1.DocumentEntity).delete({ leafId });
|
|
87
|
+
await cn.getRepository(section_model_1.SectionEntity).delete({ leafId });
|
|
88
|
+
await cn.getRepository(leaf_model_1.LeafEntity).delete({ id: leafId });
|
|
89
|
+
return { partLeafIds };
|
|
90
|
+
});
|
|
91
|
+
await mediaStorage.deleteMedias({
|
|
92
|
+
handles: [...partLeafIds.map(media_handles_helpers_1.getHandleOfFeaturedImage), (0, media_handles_helpers_1.getHandleOfFeaturedImage)(leafId)],
|
|
93
|
+
});
|
|
94
|
+
await (0, text_cache_1.invalidateMultipleDocumentsInCache)(siteContext, {
|
|
95
|
+
leafId,
|
|
96
|
+
parentIds: parentDocumentIds,
|
|
97
|
+
fully: true,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
exports.deleteLeafAndDocuments = deleteLeafAndDocuments;
|
|
101
|
+
async function deleteDocument(siteContext, documentId) {
|
|
102
|
+
const { mainCn, mediaStorage } = siteContext;
|
|
103
|
+
const { leafId, lang } = documentId;
|
|
104
|
+
const parentId = await (0, load_documents_queries_1.getParentSectionIdOf)(siteContext, documentId);
|
|
105
|
+
const { partLeafIds, shouldDeleteLeaf } = await mainCn.transaction(async (cn) => {
|
|
106
|
+
const leafRows = await cn
|
|
107
|
+
.createQueryBuilder()
|
|
108
|
+
.select("l.id", "id")
|
|
109
|
+
.from("PaLeaf", "l")
|
|
110
|
+
.where("l.parentId = :leafId", { leafId })
|
|
111
|
+
.andWhere("not exists (select 1 from PaDocument d where d.leafId = l.id)")
|
|
112
|
+
.getRawMany();
|
|
113
|
+
const partLeafIds = leafRows.map((r) => (0, data_formatters_lib_1.strVal)(r.id));
|
|
114
|
+
await deleteParts({
|
|
115
|
+
lang,
|
|
116
|
+
leafIdList: partLeafIds,
|
|
117
|
+
cn,
|
|
118
|
+
});
|
|
119
|
+
await cn.getRepository(fields_model_1.PaFieldVarcharEntity).delete(documentId);
|
|
120
|
+
await cn.getRepository(fields_model_1.PaFieldTextEntity).delete(documentId);
|
|
121
|
+
await cn.getRepository(document_model_1.DocumentEntity).delete(documentId);
|
|
122
|
+
const sectionRepository = cn.getRepository(section_model_1.SectionEntity);
|
|
123
|
+
await sectionRepository.delete(documentId);
|
|
124
|
+
const remainingSectionCount = await sectionRepository.count({
|
|
125
|
+
where: { leafId },
|
|
126
|
+
});
|
|
127
|
+
const shouldDeleteLeaf = remainingSectionCount === 0;
|
|
128
|
+
if (shouldDeleteLeaf) {
|
|
129
|
+
await cn.getRepository(fields_model_1.PaFieldVarcharEntity).delete({ leafId });
|
|
130
|
+
await cn.getRepository(fields_model_1.PaFieldTextEntity).delete({ leafId });
|
|
131
|
+
await cn.getRepository(leaf_model_1.LeafEntity).delete({ id: leafId });
|
|
132
|
+
}
|
|
133
|
+
return { partLeafIds, shouldDeleteLeaf };
|
|
134
|
+
});
|
|
135
|
+
await (0, text_cache_1.invalidateDocumentInCache)(siteContext, { documentId, fully: true, parentId });
|
|
136
|
+
if (shouldDeleteLeaf) {
|
|
137
|
+
const handles = partLeafIds.map(media_handles_helpers_1.getHandleOfFeaturedImage);
|
|
138
|
+
handles.push((0, media_handles_helpers_1.getHandleOfFeaturedImage)(leafId));
|
|
139
|
+
const deletedUids = await mediaStorage.deleteMedias({ handles });
|
|
140
|
+
await siteContext.imageCache.invalidate({ imageUids: deletedUids });
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
exports.deleteDocument = deleteDocument;
|
|
144
|
+
async function deleteParts({ leafIdList, cn, lang, }) {
|
|
145
|
+
await cn
|
|
146
|
+
.createQueryBuilder()
|
|
147
|
+
.delete()
|
|
148
|
+
.from("PaSection")
|
|
149
|
+
.where("leafId in (:...leafIdList)", { leafIdList })
|
|
150
|
+
.andWhere("lang = :lang", { lang })
|
|
151
|
+
.execute();
|
|
152
|
+
for (const leafId of leafIdList) {
|
|
153
|
+
const countRow = await cn
|
|
154
|
+
.createQueryBuilder()
|
|
155
|
+
.select("count(section.leafId) as cnt")
|
|
156
|
+
.from("PaSection", "section")
|
|
157
|
+
.where("section.leafId = :leafId", { leafId })
|
|
158
|
+
.getRawOne();
|
|
159
|
+
if (!countRow)
|
|
160
|
+
continue;
|
|
161
|
+
if ((0, data_formatters_lib_1.nbVal)(countRow.cnt) === 0) {
|
|
162
|
+
await cn.getRepository(fields_model_1.PaFieldVarcharEntity).delete({ leafId });
|
|
163
|
+
await cn.getRepository(fields_model_1.PaFieldTextEntity).delete({ leafId });
|
|
164
|
+
await cn.getRepository(leaf_model_1.LeafEntity).delete({ id: leafId });
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
async function fullDeleteParts(leafIdList, cn) {
|
|
169
|
+
await cn
|
|
170
|
+
.createQueryBuilder()
|
|
171
|
+
.delete()
|
|
172
|
+
.from("PaFieldText")
|
|
173
|
+
.where("leafId in (:...leafIdList)", { leafIdList })
|
|
174
|
+
.execute();
|
|
175
|
+
await cn
|
|
176
|
+
.createQueryBuilder()
|
|
177
|
+
.delete()
|
|
178
|
+
.from("PaFieldVarchar")
|
|
179
|
+
.where("leafId in (:...leafIdList)", { leafIdList })
|
|
180
|
+
.execute();
|
|
181
|
+
await cn
|
|
182
|
+
.createQueryBuilder()
|
|
183
|
+
.delete()
|
|
184
|
+
.from("PaSection")
|
|
185
|
+
.where("leafId in (:...leafIdList)", { leafIdList })
|
|
186
|
+
.execute();
|
|
187
|
+
await cn
|
|
188
|
+
.createQueryBuilder()
|
|
189
|
+
.delete()
|
|
190
|
+
.from("PaLeaf")
|
|
191
|
+
.where("id in (:...leafIdList)", { leafIdList })
|
|
192
|
+
.execute();
|
|
193
|
+
}
|
|
194
|
+
async function createDocumentWithManager({ lang, leafId, values, autoPublish, cn, }) {
|
|
195
|
+
await cn.getRepository(section_model_1.SectionEntity).save({ lang, leafId, ready: autoPublish });
|
|
196
|
+
await cn.getRepository(document_model_1.DocumentEntity).save({ lang, leafId, ...values });
|
|
197
|
+
return { lang, leafId };
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=save-documents.queries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save-documents.queries.js","sourceRoot":"","sources":["../../../../src/modules/core/document/save-documents.queries.ts"],"names":[],"mappings":";;;AAAA,2CAAqD;AACrD,oEAA2D;AAC3D,yDAAyF;AAEzF,iFAAiF;AACjF,2DAIoC;AAEpC,yDAAiF;AACjF,mDAAgD;AAChD,uDAAsF;AACtF,4DAAyD;AACzD,uDAA0D;AAC1D,qDAAkD;AAOlD,qEAAwF;AAEjF,KAAK,UAAU,cAAc,CAClC,WAAwB,EACxB,UAA2B,EAC3B,MAAsE;IAEtE,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC;IAE/B,MAAM,kBAAkB,GAAG,MAAM,CAAC,aAAa,CAAC,+BAAc,CAAC,CAAC;IAChE,MAAM,kBAAkB,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAEpD,MAAM,IAAA,sCAAyB,EAAC,WAAW,EAAE;QAC3C,UAAU;QACV,SAAS,EAAE,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;KAC1D,CAAC,CAAC;AACL,CAAC;AAdD,wCAcC;AAEM,KAAK,UAAU,oBAAoB,CACxC,WAAwB,EACxB,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAwE;IAE9F,MAAM,EAAE,MAAM,EAAE,GAAG,W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,EAAE,CAAC;SAC/C,OAAO,EAAE,CAAC;AACf,CAAC;AAED,KAAK,UAAU,yBAAyB,CAAC,EACvC,IAAI,EACJ,MAAM,EACN,MAAM,EACN,WAAW,EACX,EAAE,GAOH;IACC,MAAM,EAAE,CAAC,aAAa,CAAC,6BAAa,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;IACjF,MAAM,EAAE,CAAC,aAAa,CAAC,+BAAc,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IACzE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GraphqlContext } from "../../graphql.types";
|
|
2
|
+
import { SectionWrapObjectType } from "../section/section.schema";
|
|
3
|
+
import { SearchDocumentItemObjectType } from "./document.schema";
|
|
4
|
+
export declare class SearchDocumentItemResolver {
|
|
5
|
+
searchDocuments({ fqdn }: GraphqlContext, parentSectionId: string, queryString: string, anyLang?: boolean): Promise<SearchDocumentItemObjectType[]>;
|
|
6
|
+
sectionWrap({ lang, leafId }: SearchDocumentItemObjectType): Promise<SectionWrapObjectType>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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.SearchDocumentItemResolver = 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 section_schema_1 = require("../section/section.schema");
|
|
22
|
+
const document_schema_1 = require("./document.schema");
|
|
23
|
+
const load_documents_queries_1 = require("./load-documents.queries");
|
|
24
|
+
let SearchDocumentItemResolver = class SearchDocumentItemResolver {
|
|
25
|
+
async searchDocuments({ fqdn }, parentSectionId, queryString, anyLang) {
|
|
26
|
+
return await (0, load_documents_queries_1.searchDocuments)(await (0, site_context_1.getSiteContext)(fqdn), {
|
|
27
|
+
parentSectionId: (0, anywhere_lib_1.parseSectionId)(parentSectionId),
|
|
28
|
+
queryString,
|
|
29
|
+
anyLang,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
async sectionWrap({ lang, leafId }) {
|
|
33
|
+
return { leafId, lang, sectionId: (0, anywhere_lib_1.encodeSectionId)({ leafId, lang }) };
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.SearchDocumentItemResolver = SearchDocumentItemResolver;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, graphql_1.Query)(() => [document_schema_1.SearchDocumentItemObjectType]),
|
|
39
|
+
__param(0, (0, graphql_1.Context)()),
|
|
40
|
+
__param(1, (0, graphql_1.Args)("parentSectionId", { type: () => graphql_1.ID })),
|
|
41
|
+
__param(2, (0, graphql_1.Args)("queryString", { type: () => String })),
|
|
42
|
+
__param(3, (0, graphql_1.Args)("anyLang", { type: () => Boolean, nullable: true })),
|
|
43
|
+
__metadata("design:type", Function),
|
|
44
|
+
__metadata("design:paramtypes", [Object, String, String, Boolean]),
|
|
45
|
+
__metadata("design:returntype", Promise)
|
|
46
|
+
], SearchDocumentItemResolver.prototype, "searchDocuments", null);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, graphql_1.ResolveField)(() => section_schema_1.SectionWrapObjectType),
|
|
49
|
+
__param(0, (0, graphql_1.Parent)()),
|
|
50
|
+
__metadata("design:type", Function),
|
|
51
|
+
__metadata("design:paramtypes", [document_schema_1.SearchDocumentItemObjectType]),
|
|
52
|
+
__metadata("design:returntype", Promise)
|
|
53
|
+
], SearchDocumentItemResolver.prototype, "sectionWrap", null);
|
|
54
|
+
exports.SearchDocumentItemResolver = SearchDocumentItemResolver = __decorate([
|
|
55
|
+
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
56
|
+
(0, graphql_1.Resolver)(() => document_schema_1.SearchDocumentItemObjectType)
|
|
57
|
+
], SearchDocumentItemResolver);
|
|
58
|
+
//# sourceMappingURL=search-document-item.resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-document-item.resolver.js","sourceRoot":"","sources":["../../../../src/modules/core/document/search-document-item.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA2C;AAC3C,6CAA2F;AAC3F,yDAAyE;AACzE,qEAAoE;AAEpE,2DAAsD;AACtD,8DAAkE;AAClE,uDAAiE;AACjE,qEAA2D;AAIpD,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAE/B,AAAN,KAAK,CAAC,eAAe,CACR,EAAE,IAAI,EAAkB,EAEnC,eAAuB,EAEvB,WAAmB,EAEnB,OAAiB;QAEjB,OAAO,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