@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,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.partsOf = exports.deletePart = exports.loadPart = exports.createLeafWithPart = exports.createPartOnLeaf = 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 load_documents_queries_1 = require("../document/load-documents.queries");
|
|
10
|
+
const leaf_item_queries_1 = require("../leaf-item/leaf-item.queries");
|
|
11
|
+
const leaf_model_1 = require("../leaf/leaf.model");
|
|
12
|
+
const leaf_queries_1 = require("../leaf/leaf.queries");
|
|
13
|
+
const section_model_1 = require("../section/section.model");
|
|
14
|
+
const section_queries_1 = require("../section/section.queries");
|
|
15
|
+
async function createPartOnLeaf(siteContext, sectionId) {
|
|
16
|
+
const newId = await siteContext.mainCn.transaction(async (cn) => {
|
|
17
|
+
return await createPartOnLeafWithManager(sectionId, { cn });
|
|
18
|
+
});
|
|
19
|
+
await (0, text_cache_1.invalidateDocumentInCache)(siteContext, { parentOf: sectionId });
|
|
20
|
+
return newId;
|
|
21
|
+
}
|
|
22
|
+
exports.createPartOnLeaf = createPartOnLeaf;
|
|
23
|
+
async function createLeafWithPart(siteContext, { parentSectionId, listName, leafType, }) {
|
|
24
|
+
const { lang, leafId: parentLeafId } = parentSectionId;
|
|
25
|
+
const parentLeafType = await (0, leaf_queries_1.getLeafTypeOf)(siteContext, parentLeafId);
|
|
26
|
+
const parentDocumentType = (0, anywhere_lib_1.getDocumentTypeByLeafType)(siteContext.siteSchema, parentLeafType);
|
|
27
|
+
const listType = parentDocumentType.partLists?.find((l) => l.listName === listName);
|
|
28
|
+
if (!listType) {
|
|
29
|
+
throw new common_1.BadRequestException(`listName '${listName}' not found in document '${parentLeafType}'`);
|
|
30
|
+
}
|
|
31
|
+
if (listType.partLimit !== undefined) {
|
|
32
|
+
const count = await countLeafItemsOfList(siteContext, {
|
|
33
|
+
listName: listType.listName,
|
|
34
|
+
parentLeafId,
|
|
35
|
+
});
|
|
36
|
+
if (count >= listType.partLimit)
|
|
37
|
+
throw new common_1.BadRequestException("maximum parts reached");
|
|
38
|
+
}
|
|
39
|
+
if (!listType.partLeafTypes.includes(leafType)) {
|
|
40
|
+
throw new common_1.BadRequestException({
|
|
41
|
+
code: "invalid_section_type_for_this_list_name",
|
|
42
|
+
message: `Invalid sectionType leafType: '${leafType}' for listName '${listType.listName}'`,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const newId = await siteContext.mainCn.transaction(async (cn) => {
|
|
46
|
+
const leaf = await (0, leaf_queries_1.createLeaf)(siteContext.siteSchema, cn, { parentId: parentLeafId, leafType });
|
|
47
|
+
await (0, leaf_item_queries_1.createLeafItem)(siteContext, {
|
|
48
|
+
leafId: leaf.id,
|
|
49
|
+
listName: listType.listName,
|
|
50
|
+
parentId: parentLeafId,
|
|
51
|
+
});
|
|
52
|
+
if (!leaf)
|
|
53
|
+
throw new Error("PartService, createLeafWithPart: Unexpected error");
|
|
54
|
+
const { id: leafId } = leaf;
|
|
55
|
+
return await createPartOnLeafWithManager({ lang, leafId }, { cn });
|
|
56
|
+
});
|
|
57
|
+
await (0, text_cache_1.invalidateDocumentInCache)(siteContext, { documentId: parentSectionId });
|
|
58
|
+
return newId;
|
|
59
|
+
}
|
|
60
|
+
exports.createLeafWithPart = createLeafWithPart;
|
|
61
|
+
async function loadPart(siteContext, sectionId) {
|
|
62
|
+
const row = await siteContext.mainCn
|
|
63
|
+
.createQueryBuilder()
|
|
64
|
+
.select("l.leafType", "leafType")
|
|
65
|
+
.from("PaLeaf", "l")
|
|
66
|
+
.innerJoin("PaSection", "s", "s.leafId = l.id and s.lang = :lang", { lang: sectionId.lang })
|
|
67
|
+
.where("l.id = :leafId", { leafId: sectionId.leafId })
|
|
68
|
+
.andWhere("not exists (select 1 from PaDocument d where d.leafId = l.id)")
|
|
69
|
+
.getRawOne();
|
|
70
|
+
if (!row)
|
|
71
|
+
throw new common_1.NotFoundException(`cannot find part '${sectionId.lang}:${sectionId.leafId}'`);
|
|
72
|
+
return {
|
|
73
|
+
leafType: (0, data_formatters_lib_1.strVal)(row.leafType),
|
|
74
|
+
leafId: sectionId.leafId,
|
|
75
|
+
lang: sectionId.lang,
|
|
76
|
+
sectionId: (0, anywhere_lib_1.encodeSectionId)(sectionId),
|
|
77
|
+
featuredImageHandle: (0, media_handles_helpers_1.getHandleOfFeaturedImage)(sectionId.leafId),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
exports.loadPart = loadPart;
|
|
81
|
+
async function deletePart(siteContext, sectionId) {
|
|
82
|
+
const parentId = await (0, load_documents_queries_1.getParentSectionIdOf)(siteContext, sectionId);
|
|
83
|
+
if (!parentId) {
|
|
84
|
+
throw new Error(`part '${sectionId.lang}:${sectionId.leafId}' should have a parent`);
|
|
85
|
+
}
|
|
86
|
+
const { shouldDeleteLeaf } = await siteContext.mainCn.transaction(async (cn) => {
|
|
87
|
+
const sectionRepo = cn.getRepository(section_model_1.SectionEntity);
|
|
88
|
+
await sectionRepo.delete(sectionId);
|
|
89
|
+
const shouldDeleteLeaf = await (0, section_queries_1.isOrphanLeaf)(cn, sectionId.leafId);
|
|
90
|
+
if (shouldDeleteLeaf) {
|
|
91
|
+
await (0, leaf_item_queries_1.updatePartsItemNumAfterDeletetion)(siteContext, sectionId.leafId);
|
|
92
|
+
await cn
|
|
93
|
+
.createQueryBuilder()
|
|
94
|
+
.delete()
|
|
95
|
+
.from("PaFieldVarchar")
|
|
96
|
+
.where("leafId = :leafId", { leafId: sectionId.leafId })
|
|
97
|
+
.execute();
|
|
98
|
+
await cn.getRepository(leaf_model_1.LeafEntity).delete({ id: sectionId.leafId });
|
|
99
|
+
}
|
|
100
|
+
return { shouldDeleteLeaf };
|
|
101
|
+
});
|
|
102
|
+
await (0, text_cache_1.invalidateDocumentInCache)(siteContext, { documentId: parentId });
|
|
103
|
+
if (shouldDeleteLeaf) {
|
|
104
|
+
const deletedUids = await siteContext.mediaStorage.deleteMedia({
|
|
105
|
+
handle: (0, media_handles_helpers_1.getHandleOfFeaturedImage)(sectionId.leafId),
|
|
106
|
+
});
|
|
107
|
+
await siteContext.imageCache.invalidate({ imageUids: deletedUids });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.deletePart = deletePart;
|
|
111
|
+
async function partsOf({ mainCn }, { listNames, parentId, }) {
|
|
112
|
+
const parts = await mainCn
|
|
113
|
+
.createQueryBuilder()
|
|
114
|
+
.select("i.itemNum", "itemNum")
|
|
115
|
+
.addSelect("i.leafId", "leafId")
|
|
116
|
+
.addSelect("s.lang", "lang")
|
|
117
|
+
.addSelect("s.leafId", "sectionLeafId")
|
|
118
|
+
.addSelect("l.leafType", "leafType")
|
|
119
|
+
.from("PaLeaf", "l")
|
|
120
|
+
.innerJoin("PaLeafItem", "i", "i.leafId = l.id and i.listName in (:...listNames)", {
|
|
121
|
+
listNames,
|
|
122
|
+
})
|
|
123
|
+
.leftJoin("PaSection", "s", "s.leafId = l.id and s.lang = :lang", {
|
|
124
|
+
lang: parentId.lang,
|
|
125
|
+
})
|
|
126
|
+
.where("l.parentId = :parentId", { parentId: parentId.leafId })
|
|
127
|
+
.andWhere("not exists (select 1 from PaDocument d where d.leafId = l.id)")
|
|
128
|
+
.orderBy("i.itemNum", "ASC")
|
|
129
|
+
.getRawMany();
|
|
130
|
+
return parts.map((item) => {
|
|
131
|
+
if ((0, data_formatters_lib_1.strValOrUndef)(item.sectionLeafId) === undefined) {
|
|
132
|
+
return {
|
|
133
|
+
leafId: (0, data_formatters_lib_1.strVal)(item.leafId),
|
|
134
|
+
leafType: (0, data_formatters_lib_1.strVal)(item.leafType),
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
const leafId = (0, data_formatters_lib_1.strVal)(item.leafId);
|
|
138
|
+
return {
|
|
139
|
+
sectionId: (0, anywhere_lib_1.encodeSectionId)({
|
|
140
|
+
lang: (0, data_formatters_lib_1.strVal)(parentId.lang),
|
|
141
|
+
leafId: (0, data_formatters_lib_1.strVal)(item.leafId),
|
|
142
|
+
}),
|
|
143
|
+
lang: (0, data_formatters_lib_1.strVal)(parentId.lang),
|
|
144
|
+
leafId,
|
|
145
|
+
leafType: (0, data_formatters_lib_1.strVal)(item.leafType),
|
|
146
|
+
featuredImageHandle: (0, media_handles_helpers_1.getHandleOfFeaturedImage)(leafId),
|
|
147
|
+
};
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
exports.partsOf = partsOf;
|
|
151
|
+
async function createPartOnLeafWithManager({ lang, leafId }, { cn, }) {
|
|
152
|
+
await cn.getRepository(section_model_1.SectionEntity).save({ lang, leafId, ready: true });
|
|
153
|
+
return { lang, leafId };
|
|
154
|
+
}
|
|
155
|
+
async function countLeafItemsOfList({ mainCn }, { listName, parentLeafId, }) {
|
|
156
|
+
const row = await mainCn
|
|
157
|
+
.createQueryBuilder()
|
|
158
|
+
.addSelect("count(1)", "cnt")
|
|
159
|
+
.from("PaLeaf", "l")
|
|
160
|
+
.innerJoin("PaLeafItem", "i", "i.leafId = l.id and i.listName = :listName", {
|
|
161
|
+
listName,
|
|
162
|
+
})
|
|
163
|
+
.where("l.parentId = :parentId", { parentId: parentLeafId })
|
|
164
|
+
.getRawOne();
|
|
165
|
+
return (0, data_formatters_lib_1.nbVal)(row?.cnt);
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=part.queries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part.queries.js","sourceRoot":"","sources":["../../../../src/modules/core/part/part.queries.ts"],"names":[],"mappings":";;;AAAA,2CAAwE;AACxE,oEAA0E;AAC1E,yDAKgC;AAEhC,iFAAiF;AACjF,2DAAuE;AAEvE,+EAA0E;AAC1E,sEAAmG;AACnG,mDAAgD;AAChD,uDAAiE;AACjE,4DAAyD;AACzD,gEAA0D;AAGnD,KAAK,UAAU,gBAAgB,CAAC,WAAwB,EAAE,SA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M,CAAC;SACtD,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAjDD,0BAiDC;AAED,KAAK,UAAU,2BAA2B,CACxC,EAAE,IAAI,EAAE,MAAM,EAAmB,EACjC,EACE,EAAE,GAGH;IAED,MAAM,EAAE,CAAC,aAAa,CAAC,6BAAa,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,oBAAoB,CACjC,EAAE,MAAM,EAAe,EACvB,EACE,QAAQ,EACR,YAAY,GAIb;IAED,MAAM,GAAG,GAAG,MAAM,MAAM;SACrB,kBAAkB,EAAE;SACpB,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC;SAC5B,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC;SACnB,SAAS,CAAC,YAAY,EAAE,GAAG,EAAE,4CAA4C,EAAE;QAC1E,QAAQ;KACT,CAAC;SACD,KAAK,CAAC,wBAAwB,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;SAC3D,SAAS,EAAO,CAAC;IACpB,OAAO,IAAA,2BAAK,EAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GraphqlContext } from "../../graphql.types";
|
|
2
|
+
import { MediaObjectType } from "../media/media.schema";
|
|
3
|
+
import { PartObjectType, PartPlaceholderObjectType } from "./part.schema";
|
|
4
|
+
export declare class PartPlaceholderResolver {
|
|
5
|
+
itemNum({ fqdn }: GraphqlContext, { leafId }: PartPlaceholderObjectType): Promise<number | undefined>;
|
|
6
|
+
}
|
|
7
|
+
export declare class PartResolver {
|
|
8
|
+
part({ fqdn }: GraphqlContext, sectionId: string): Promise<PartObjectType>;
|
|
9
|
+
createPartOnLeaf({ fqdn }: GraphqlContext, lang: string, leafId: string): Promise<PartObjectType>;
|
|
10
|
+
createLeafWithPart({ fqdn }: GraphqlContext, parentSectionId: string, listName: string, leafType: string): Promise<PartObjectType>;
|
|
11
|
+
deletePart({ fqdn }: GraphqlContext, sectionId: string): Promise<boolean>;
|
|
12
|
+
itemNum({ fqdn }: GraphqlContext, { leafId }: PartObjectType | PartPlaceholderObjectType): Promise<number | undefined>;
|
|
13
|
+
featuredImage({ fqdn }: GraphqlContext, { featuredImageHandle }: PartObjectType): Promise<MediaObjectType | undefined>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GraphqlContext } from "../../graphql.types";
|
|
2
|
+
import { SectionWrapObjectType } from "../section/section.schema";
|
|
3
|
+
export declare class ExtendSectionWrapWithPartResolver {
|
|
4
|
+
parts({ fqdn }: GraphqlContext, { leafId, lang }: SectionWrapObjectType): Promise<(import("./part.schema").PartObjectType | import("./part.schema").PartPlaceholderObjectType)[]>;
|
|
5
|
+
}
|
|
@@ -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,QA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,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,cAAc;IAEzB,SAAS,CAAU;IAGnB,MAAM,CAAU;IAGhB,IAAI,CAAU;IAGd,QAAQ,CAAU;IAGlB,mBAAmB,CAAU;CAC9B,CAAA;AAfY,wCAAc;AAEzB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;iDACG;AAGnB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;8CACA;AAGhB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;4CACN;AAGd;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;gDACF;AAGlB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;2DACS;yBAdlB,cAAc;IAD1B,IAAA,oBAAU,EAAC,MAAM,CAAC;GACN,cAAc,CAe1B;AAEY,QAAA,2BAA2B,GAAG,IAAA,yBAAe,EAAC;IACzD,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,cAAc,EAAE,yBAAyB,CAAU;IACjE,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,yBAAyB,CAAC;CACvF,CAAC,CAAC;AAGI,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAEpC,MAAM,CAAU;IAGhB,QAAQ,CAAU;CACnB,CAAA;AANY,8DAAyB;AAEpC;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;yDACA;AAGhB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;2DACF;oCALP,yBAAyB;IADrC,IAAA,oBAAU,EAAC,iBAAiB,CAAC;GACjB,yBAAyB,CAMrC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GraphqlContext } from "../../graphql.types";
|
|
2
|
+
import { BreadcrumbItemObjectType, 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
|
+
}
|