@rnaga/wp-node 1.1.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/application.d.ts +76 -0
- package/application.d.ts.map +1 -0
- package/application.js +132 -0
- package/common/async-constructor.d.ts +2 -0
- package/common/async-constructor.d.ts.map +1 -0
- package/common/async-constructor.js +7 -0
- package/common/config/define-post-status.config.d.ts +4 -0
- package/common/config/define-post-status.config.d.ts.map +1 -0
- package/common/config/define-post-status.config.js +26 -0
- package/common/config/define-post-type.config.d.ts +4 -0
- package/common/config/define-post-type.config.d.ts.map +1 -0
- package/common/config/define-post-type.config.js +39 -0
- package/common/config/define-taxonomies.config.d.ts +4 -0
- package/common/config/define-taxonomies.config.d.ts.map +1 -0
- package/common/config/define-taxonomies.config.js +26 -0
- package/common/config/define-wp.config..d.ts +12 -0
- package/common/config/define-wp.config..d.ts.map +1 -0
- package/common/config/define-wp.config..js +110 -0
- package/common/config/index.d.ts +5 -0
- package/common/config/index.d.ts.map +1 -0
- package/common/config/index.js +20 -0
- package/common/date.d.ts +19 -0
- package/common/date.d.ts.map +1 -0
- package/common/date.js +116 -0
- package/common/define-hooks.d.ts +4 -0
- package/common/define-hooks.d.ts.map +1 -0
- package/common/define-hooks.js +16 -0
- package/common/diff.d.ts +3 -0
- package/common/diff.d.ts.map +1 -0
- package/common/diff.js +23 -0
- package/common/files.d.ts +14 -0
- package/common/files.d.ts.map +1 -0
- package/common/files.js +160 -0
- package/common/formatting.d.ts +47 -0
- package/common/formatting.d.ts.map +1 -0
- package/common/formatting.js +218 -0
- package/common/hierarchy.d.ts +21 -0
- package/common/hierarchy.d.ts.map +1 -0
- package/common/hierarchy.js +78 -0
- package/common/hooks-command.d.ts +7 -0
- package/common/hooks-command.d.ts.map +1 -0
- package/common/hooks-command.js +21 -0
- package/common/index.d.ts +11 -0
- package/common/index.d.ts.map +1 -0
- package/common/index.js +49 -0
- package/common/password.d.ts +4 -0
- package/common/password.d.ts.map +1 -0
- package/common/password.js +224 -0
- package/common/php-serialize.d.ts +3 -0
- package/common/php-serialize.d.ts.map +1 -0
- package/common/php-serialize.js +17 -0
- package/common/validating.d.ts +10 -0
- package/common/validating.d.ts.map +1 -0
- package/common/validating.js +65 -0
- package/config.d.ts +99 -0
- package/config.d.ts.map +1 -0
- package/config.js +76 -0
- package/constants/async-init.d.ts +2 -0
- package/constants/async-init.d.ts.map +1 -0
- package/constants/async-init.js +4 -0
- package/constants/component.d.ts +3 -0
- package/constants/component.d.ts.map +1 -0
- package/constants/component.js +5 -0
- package/constants/database.d.ts +2 -0
- package/constants/database.d.ts.map +1 -0
- package/constants/database.js +9 -0
- package/constants/default-database-tables.d.ts +7 -0
- package/constants/default-database-tables.d.ts.map +1 -0
- package/constants/default-database-tables.js +26 -0
- package/constants/index.d.ts +9 -0
- package/constants/index.d.ts.map +1 -0
- package/constants/index.js +24 -0
- package/constants/role-capabilities.d.ts +3 -0
- package/constants/role-capabilities.d.ts.map +1 -0
- package/constants/role-capabilities.js +67 -0
- package/constants/role-capability-actions.d.ts +2 -0
- package/constants/role-capability-actions.d.ts.map +1 -0
- package/constants/role-capability-actions.js +90 -0
- package/constants/role-names.d.ts +2 -0
- package/constants/role-names.d.ts.map +1 -0
- package/constants/role-names.js +12 -0
- package/constants/scope.d.ts +6 -0
- package/constants/scope.d.ts.map +1 -0
- package/constants/scope.js +9 -0
- package/core/async-init-reflect.d.ts +5 -0
- package/core/async-init-reflect.d.ts.map +1 -0
- package/core/async-init-reflect.js +18 -0
- package/core/blog.d.ts +20 -0
- package/core/blog.d.ts.map +1 -0
- package/core/blog.js +123 -0
- package/core/capabilities.d.ts +12 -0
- package/core/capabilities.d.ts.map +1 -0
- package/core/capabilities.js +625 -0
- package/core/comment.d.ts +111 -0
- package/core/comment.d.ts.map +1 -0
- package/core/comment.js +173 -0
- package/core/components.d.ts +13 -0
- package/core/components.d.ts.map +1 -0
- package/core/components.js +129 -0
- package/core/context.d.ts +38 -0
- package/core/context.d.ts.map +1 -0
- package/core/context.js +77 -0
- package/core/current.d.ts +33 -0
- package/core/current.d.ts.map +1 -0
- package/core/current.js +229 -0
- package/core/date-time.d.ts +18 -0
- package/core/date-time.d.ts.map +1 -0
- package/core/date-time.js +71 -0
- package/core/hooks/action.d.ts +16 -0
- package/core/hooks/action.d.ts.map +1 -0
- package/core/hooks/action.js +44 -0
- package/core/hooks/actions/init.d.ts +5 -0
- package/core/hooks/actions/init.d.ts.map +1 -0
- package/core/hooks/actions/init.js +28 -0
- package/core/hooks/default-hooks.d.ts +7 -0
- package/core/hooks/default-hooks.d.ts.map +1 -0
- package/core/hooks/default-hooks.js +19 -0
- package/core/hooks/filter.d.ts +12 -0
- package/core/hooks/filter.d.ts.map +1 -0
- package/core/hooks/filter.js +76 -0
- package/core/hooks/filters/capabilities.d.ts +16 -0
- package/core/hooks/filters/capabilities.d.ts.map +1 -0
- package/core/hooks/filters/capabilities.js +395 -0
- package/core/hooks/hooks-command.d.ts +9 -0
- package/core/hooks/hooks-command.d.ts.map +1 -0
- package/core/hooks/hooks-command.js +28 -0
- package/core/hooks/hooks-reflect.d.ts +42 -0
- package/core/hooks/hooks-reflect.d.ts.map +1 -0
- package/core/hooks/hooks-reflect.js +73 -0
- package/core/hooks/hooks.d.ts +61 -0
- package/core/hooks/hooks.d.ts.map +1 -0
- package/core/hooks/hooks.js +82 -0
- package/core/hooks/index.d.ts +4 -0
- package/core/hooks/index.d.ts.map +1 -0
- package/core/hooks/index.js +19 -0
- package/core/installer.d.ts +56 -0
- package/core/installer.d.ts.map +1 -0
- package/core/installer.js +395 -0
- package/core/logger.d.ts +22 -0
- package/core/logger.d.ts.map +1 -0
- package/core/logger.js +65 -0
- package/core/meta.d.ts +20 -0
- package/core/meta.d.ts.map +1 -0
- package/core/meta.js +123 -0
- package/core/options.d.ts +20 -0
- package/core/options.d.ts.map +1 -0
- package/core/options.js +148 -0
- package/core/post.d.ts +39 -0
- package/core/post.d.ts.map +1 -0
- package/core/post.js +164 -0
- package/core/query.d.ts +14 -0
- package/core/query.d.ts.map +1 -0
- package/core/query.js +39 -0
- package/core/role.d.ts +21 -0
- package/core/role.d.ts.map +1 -0
- package/core/role.js +71 -0
- package/core/roles.d.ts +16 -0
- package/core/roles.d.ts.map +1 -0
- package/core/roles.js +84 -0
- package/core/schema.d.ts +13 -0
- package/core/schema.d.ts.map +1 -0
- package/core/schema.js +83 -0
- package/core/site.d.ts +28 -0
- package/core/site.d.ts.map +1 -0
- package/core/site.js +105 -0
- package/core/tables.d.ts +18 -0
- package/core/tables.d.ts.map +1 -0
- package/core/tables.js +64 -0
- package/core/taxonomy.d.ts +23 -0
- package/core/taxonomy.d.ts.map +1 -0
- package/core/taxonomy.js +83 -0
- package/core/term.d.ts +104 -0
- package/core/term.d.ts.map +1 -0
- package/core/term.js +136 -0
- package/core/user.d.ts +32 -0
- package/core/user.d.ts.map +1 -0
- package/core/user.js +273 -0
- package/core/utils/blog.util.d.ts +14 -0
- package/core/utils/blog.util.d.ts.map +1 -0
- package/core/utils/blog.util.js +97 -0
- package/core/utils/comment.util.d.ts +23 -0
- package/core/utils/comment.util.d.ts.map +1 -0
- package/core/utils/comment.util.js +312 -0
- package/core/utils/crud.util.d.ts +40 -0
- package/core/utils/crud.util.d.ts.map +1 -0
- package/core/utils/crud.util.js +97 -0
- package/core/utils/date-time.util.d.ts +9 -0
- package/core/utils/date-time.util.d.ts.map +1 -0
- package/core/utils/date-time.util.js +29 -0
- package/core/utils/link.util.d.ts +23 -0
- package/core/utils/link.util.d.ts.map +1 -0
- package/core/utils/link.util.js +148 -0
- package/core/utils/meta.util.d.ts +13 -0
- package/core/utils/meta.util.d.ts.map +1 -0
- package/core/utils/meta.util.js +73 -0
- package/core/utils/post.util.d.ts +34 -0
- package/core/utils/post.util.d.ts.map +1 -0
- package/core/utils/post.util.js +272 -0
- package/core/utils/query.util.d.ts +36 -0
- package/core/utils/query.util.d.ts.map +1 -0
- package/core/utils/query.util.js +168 -0
- package/core/utils/revision.util.d.ts +67 -0
- package/core/utils/revision.util.d.ts.map +1 -0
- package/core/utils/revision.util.js +105 -0
- package/core/utils/roles.util.d.ts +30 -0
- package/core/utils/roles.util.d.ts.map +1 -0
- package/core/utils/roles.util.js +189 -0
- package/core/utils/signup.util.d.ts +33 -0
- package/core/utils/signup.util.d.ts.map +1 -0
- package/core/utils/signup.util.js +227 -0
- package/core/utils/site.util.d.ts +22 -0
- package/core/utils/site.util.d.ts.map +1 -0
- package/core/utils/site.util.js +122 -0
- package/core/utils/taxonomy.util.d.ts +19 -0
- package/core/utils/taxonomy.util.d.ts.map +1 -0
- package/core/utils/taxonomy.util.js +52 -0
- package/core/utils/term.util.d.ts +13 -0
- package/core/utils/term.util.d.ts.map +1 -0
- package/core/utils/term.util.js +113 -0
- package/core/utils/trx.util.d.ts +24 -0
- package/core/utils/trx.util.d.ts.map +1 -0
- package/core/utils/trx.util.js +86 -0
- package/core/utils/user-self-registration.util.d.ts +46 -0
- package/core/utils/user-self-registration.util.d.ts.map +1 -0
- package/core/utils/user-self-registration.util.js +171 -0
- package/core/utils/user.util.d.ts +153 -0
- package/core/utils/user.util.d.ts.map +1 -0
- package/core/utils/user.util.js +550 -0
- package/core/utils/utils.d.ts +36 -0
- package/core/utils/utils.d.ts.map +1 -0
- package/core/utils/utils.js +85 -0
- package/core/validator.d.ts +11 -0
- package/core/validator.d.ts.map +1 -0
- package/core/validator.js +40 -0
- package/core/vars.d.ts +19 -0
- package/core/vars.d.ts.map +1 -0
- package/core/vars.js +54 -0
- package/crud/blog.crud.d.ts +56 -0
- package/crud/blog.crud.d.ts.map +1 -0
- package/crud/blog.crud.js +301 -0
- package/crud/comment.crud.d.ts +104 -0
- package/crud/comment.crud.d.ts.map +1 -0
- package/crud/comment.crud.js +431 -0
- package/crud/crud.d.ts +63 -0
- package/crud/crud.d.ts.map +1 -0
- package/crud/crud.js +278 -0
- package/crud/error.d.ts +23 -0
- package/crud/error.d.ts.map +1 -0
- package/crud/error.js +51 -0
- package/crud/meta.crud.d.ts +69 -0
- package/crud/meta.crud.d.ts.map +1 -0
- package/crud/meta.crud.js +244 -0
- package/crud/options.crud.d.ts +37 -0
- package/crud/options.crud.d.ts.map +1 -0
- package/crud/options.crud.js +178 -0
- package/crud/post.crud.d.ts +225 -0
- package/crud/post.crud.d.ts.map +1 -0
- package/crud/post.crud.js +589 -0
- package/crud/revision.crud.d.ts +76 -0
- package/crud/revision.crud.d.ts.map +1 -0
- package/crud/revision.crud.js +155 -0
- package/crud/roles.crud.d.ts +50 -0
- package/crud/roles.crud.d.ts.map +1 -0
- package/crud/roles.crud.js +198 -0
- package/crud/settings.crud.d.ts +50 -0
- package/crud/settings.crud.d.ts.map +1 -0
- package/crud/settings.crud.js +153 -0
- package/crud/site.crud.d.ts +62 -0
- package/crud/site.crud.d.ts.map +1 -0
- package/crud/site.crud.js +241 -0
- package/crud/sitemeta.crud.d.ts +55 -0
- package/crud/sitemeta.crud.d.ts.map +1 -0
- package/crud/sitemeta.crud.js +97 -0
- package/crud/term.crud.d.ts +85 -0
- package/crud/term.crud.d.ts.map +1 -0
- package/crud/term.crud.js +285 -0
- package/crud/user-self-registration.crud.d.ts +57 -0
- package/crud/user-self-registration.crud.d.ts.map +1 -0
- package/crud/user-self-registration.crud.js +173 -0
- package/crud/user.crud.d.ts +147 -0
- package/crud/user.crud.d.ts.map +1 -0
- package/crud/user.crud.js +626 -0
- package/database.d.ts +18 -0
- package/database.d.ts.map +1 -0
- package/database.js +80 -0
- package/decorators/async-init.d.ts +2 -0
- package/decorators/async-init.d.ts.map +1 -0
- package/decorators/async-init.js +7 -0
- package/decorators/component.d.ts +12 -0
- package/decorators/component.d.ts.map +1 -0
- package/decorators/component.js +47 -0
- package/decorators/hooks.d.ts +5 -0
- package/decorators/hooks.d.ts.map +1 -0
- package/decorators/hooks.js +30 -0
- package/defaults/extensions.d.ts +4 -0
- package/defaults/extensions.d.ts.map +1 -0
- package/defaults/extensions.js +34 -0
- package/defaults/index.d.ts +11 -0
- package/defaults/index.d.ts.map +1 -0
- package/defaults/index.js +49 -0
- package/defaults/options.d.ts +6 -0
- package/defaults/options.d.ts.map +1 -0
- package/defaults/options.js +267 -0
- package/defaults/post-status.d.ts +10 -0
- package/defaults/post-status.d.ts.map +1 -0
- package/defaults/post-status.js +83 -0
- package/defaults/post-types.d.ts +4 -0
- package/defaults/post-types.d.ts.map +1 -0
- package/defaults/post-types.js +72 -0
- package/defaults/roles.d.ts +31 -0
- package/defaults/roles.d.ts.map +1 -0
- package/defaults/roles.js +213 -0
- package/defaults/seeder.d.ts +34 -0
- package/defaults/seeder.d.ts.map +1 -0
- package/defaults/seeder.js +201 -0
- package/defaults/sitemeta.d.ts +2 -0
- package/defaults/sitemeta.d.ts.map +1 -0
- package/defaults/sitemeta.js +38 -0
- package/defaults/subdirectory-reserved-names.d.ts +2 -0
- package/defaults/subdirectory-reserved-names.d.ts.map +1 -0
- package/defaults/subdirectory-reserved-names.js +16 -0
- package/defaults/taxonomies.d.ts +5 -0
- package/defaults/taxonomies.d.ts.map +1 -0
- package/defaults/taxonomies.js +57 -0
- package/defaults/timezone.d.ts +2 -0
- package/defaults/timezone.d.ts.map +1 -0
- package/defaults/timezone.js +353 -0
- package/package.json +51 -0
- package/query-builder/alias.d.ts +24 -0
- package/query-builder/alias.d.ts.map +1 -0
- package/query-builder/alias.js +64 -0
- package/query-builder/blogs.query.d.ts +22 -0
- package/query-builder/blogs.query.d.ts.map +1 -0
- package/query-builder/blogs.query.js +85 -0
- package/query-builder/comments.query.d.ts +35 -0
- package/query-builder/comments.query.d.ts.map +1 -0
- package/query-builder/comments.query.js +211 -0
- package/query-builder/common.query.d.ts +18 -0
- package/query-builder/common.query.d.ts.map +1 -0
- package/query-builder/common.query.js +58 -0
- package/query-builder/index.d.ts +12 -0
- package/query-builder/index.d.ts.map +1 -0
- package/query-builder/index.js +27 -0
- package/query-builder/meta.query.d.ts +45 -0
- package/query-builder/meta.query.d.ts.map +1 -0
- package/query-builder/meta.query.js +188 -0
- package/query-builder/options.query.d.ts +19 -0
- package/query-builder/options.query.d.ts.map +1 -0
- package/query-builder/options.query.js +57 -0
- package/query-builder/posts.query.d.ts +30 -0
- package/query-builder/posts.query.d.ts.map +1 -0
- package/query-builder/posts.query.js +208 -0
- package/query-builder/query-builder.d.ts +21 -0
- package/query-builder/query-builder.d.ts.map +1 -0
- package/query-builder/query-builder.js +70 -0
- package/query-builder/query-builders.d.ts +18 -0
- package/query-builder/query-builders.d.ts.map +1 -0
- package/query-builder/query-builders.js +64 -0
- package/query-builder/site.query.d.ts +22 -0
- package/query-builder/site.query.d.ts.map +1 -0
- package/query-builder/site.query.js +85 -0
- package/query-builder/terms.query.d.ts +47 -0
- package/query-builder/terms.query.d.ts.map +1 -0
- package/query-builder/terms.query.js +233 -0
- package/query-builder/users.query.d.ts +37 -0
- package/query-builder/users.query.d.ts.map +1 -0
- package/query-builder/users.query.js +188 -0
- package/schema-builder/proxy.d.ts +10 -0
- package/schema-builder/proxy.d.ts.map +1 -0
- package/schema-builder/proxy.js +19 -0
- package/schema-builder/schema-builder.d.ts +21 -0
- package/schema-builder/schema-builder.d.ts.map +1 -0
- package/schema-builder/schema-builder.js +207 -0
- package/schema-builder/schema.d.ts +20 -0
- package/schema-builder/schema.d.ts.map +1 -0
- package/schema-builder/schema.js +527 -0
- package/transactions/blog.trx.d.ts +37 -0
- package/transactions/blog.trx.d.ts.map +1 -0
- package/transactions/blog.trx.js +296 -0
- package/transactions/comment.trx.d.ts +22 -0
- package/transactions/comment.trx.d.ts.map +1 -0
- package/transactions/comment.trx.js +311 -0
- package/transactions/index.d.ts +15 -0
- package/transactions/index.d.ts.map +1 -0
- package/transactions/index.js +30 -0
- package/transactions/link.trx.d.ts +22 -0
- package/transactions/link.trx.d.ts.map +1 -0
- package/transactions/link.trx.js +208 -0
- package/transactions/meta.trx.d.ts +30 -0
- package/transactions/meta.trx.d.ts.map +1 -0
- package/transactions/meta.trx.js +197 -0
- package/transactions/options.trx.d.ts +31 -0
- package/transactions/options.trx.d.ts.map +1 -0
- package/transactions/options.trx.js +192 -0
- package/transactions/post.trx.d.ts +48 -0
- package/transactions/post.trx.d.ts.map +1 -0
- package/transactions/post.trx.js +906 -0
- package/transactions/registration-log.trx.d.ts +14 -0
- package/transactions/registration-log.trx.d.ts.map +1 -0
- package/transactions/registration-log.trx.js +103 -0
- package/transactions/revision.trx.d.ts +32 -0
- package/transactions/revision.trx.d.ts.map +1 -0
- package/transactions/revision.trx.js +278 -0
- package/transactions/roles.trx.d.ts +20 -0
- package/transactions/roles.trx.d.ts.map +1 -0
- package/transactions/roles.trx.js +144 -0
- package/transactions/seeder.trx.d.ts +43 -0
- package/transactions/seeder.trx.d.ts.map +1 -0
- package/transactions/seeder.trx.js +530 -0
- package/transactions/signup.trx.d.ts +53 -0
- package/transactions/signup.trx.d.ts.map +1 -0
- package/transactions/signup.trx.js +305 -0
- package/transactions/site.trx.d.ts +21 -0
- package/transactions/site.trx.d.ts.map +1 -0
- package/transactions/site.trx.js +167 -0
- package/transactions/term.trx.d.ts +51 -0
- package/transactions/term.trx.d.ts.map +1 -0
- package/transactions/term.trx.js +838 -0
- package/transactions/trx.d.ts +9 -0
- package/transactions/trx.d.ts.map +1 -0
- package/transactions/trx.js +20 -0
- package/transactions/user.trx.d.ts +45 -0
- package/transactions/user.trx.d.ts.map +1 -0
- package/transactions/user.trx.js +535 -0
- package/types/capabilities.d.ts +71 -0
- package/types/common.d.ts +16 -0
- package/types/component.d.ts +3 -0
- package/types/config.d.ts +33 -0
- package/types/crud.d.ts +230 -0
- package/types/database.d.ts +50 -0
- package/types/hooks/actions.d.ts +67 -0
- package/types/hooks/command.d.ts +17 -0
- package/types/hooks/filters.d.ts +86 -0
- package/types/hooks/index.d.ts +11 -0
- package/types/index.d.ts +18 -0
- package/types/logging.d.ts +1 -0
- package/types/meta.d.ts +9 -0
- package/types/options.d.ts +3 -0
- package/types/post.d.ts +54 -0
- package/types/query-builder.d.ts +11 -0
- package/types/role.d.ts +34 -0
- package/types/schema.d.ts +11 -0
- package/types/schema.d.ts.map +1 -0
- package/types/schema.js +2 -0
- package/types/taxonomy.d.ts +29 -0
- package/types/timezone.d.ts +3 -0
- package/types/transactions.d.ts +32 -0
- package/types/user.d.ts +12 -0
- package/types/validating.d.ts +9 -0
- package/types/validating.d.ts.map +1 -0
- package/types/validating.js +2 -0
- package/validators/config.d.ts +948 -0
- package/validators/config.d.ts.map +1 -0
- package/validators/config.js +149 -0
- package/validators/crud.d.ts +571 -0
- package/validators/crud.d.ts.map +1 -0
- package/validators/crud.js +281 -0
- package/validators/database.d.ts +958 -0
- package/validators/database.d.ts.map +1 -0
- package/validators/database.js +245 -0
- package/validators/date.d.ts +4 -0
- package/validators/date.d.ts.map +1 -0
- package/validators/date.js +15 -0
- package/validators/helpers.d.ts +16 -0
- package/validators/helpers.d.ts.map +1 -0
- package/validators/helpers.js +86 -0
- package/validators/index.d.ts +10 -0
- package/validators/index.d.ts.map +1 -0
- package/validators/index.js +48 -0
- package/validators/options.d.ts +303 -0
- package/validators/options.d.ts.map +1 -0
- package/validators/options.js +106 -0
- package/validators/post-status.d.ts +42 -0
- package/validators/post-status.d.ts.map +1 -0
- package/validators/post-status.js +18 -0
- package/validators/query.d.ts +534 -0
- package/validators/query.d.ts.map +1 -0
- package/validators/query.js +110 -0
- package/validators/roles.d.ts +22 -0
- package/validators/roles.d.ts.map +1 -0
- package/validators/roles.js +9 -0
- package/validators/sitemeta.d.ts +105 -0
- package/validators/sitemeta.d.ts.map +1 -0
- package/validators/sitemeta.js +39 -0
- package/validators/transactions/blog.d.ts +225 -0
- package/validators/transactions/blog.d.ts.map +1 -0
- package/validators/transactions/blog.js +63 -0
- package/validators/transactions/comment.d.ts +155 -0
- package/validators/transactions/comment.d.ts.map +1 -0
- package/validators/transactions/comment.js +68 -0
- package/validators/transactions/index.d.ts +11 -0
- package/validators/transactions/index.d.ts.map +1 -0
- package/validators/transactions/index.js +26 -0
- package/validators/transactions/link.d.ts +128 -0
- package/validators/transactions/link.d.ts.map +1 -0
- package/validators/transactions/link.js +60 -0
- package/validators/transactions/meta.d.ts +23 -0
- package/validators/transactions/meta.d.ts.map +1 -0
- package/validators/transactions/meta.js +18 -0
- package/validators/transactions/post.d.ts +234 -0
- package/validators/transactions/post.d.ts.map +1 -0
- package/validators/transactions/post.js +100 -0
- package/validators/transactions/roles.d.ts +18 -0
- package/validators/transactions/roles.d.ts.map +1 -0
- package/validators/transactions/roles.js +13 -0
- package/validators/transactions/signup.d.ts +35 -0
- package/validators/transactions/signup.d.ts.map +1 -0
- package/validators/transactions/signup.js +51 -0
- package/validators/transactions/site.d.ts +36 -0
- package/validators/transactions/site.d.ts.map +1 -0
- package/validators/transactions/site.js +49 -0
- package/validators/transactions/term.d.ts +57 -0
- package/validators/transactions/term.d.ts.map +1 -0
- package/validators/transactions/term.js +44 -0
- package/validators/transactions/user.d.ts +182 -0
- package/validators/transactions/user.d.ts.map +1 -0
- package/validators/transactions/user.js +104 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./role-capabilities";
|
|
2
|
+
export * from "./role-names";
|
|
3
|
+
export * from "./component";
|
|
4
|
+
export * from "./default-database-tables";
|
|
5
|
+
export * from "./async-init";
|
|
6
|
+
export * from "./database";
|
|
7
|
+
export * from "./scope";
|
|
8
|
+
export * from "./role-capability-actions";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./role-capabilities"), exports);
|
|
18
|
+
__exportStar(require("./role-names"), exports);
|
|
19
|
+
__exportStar(require("./component"), exports);
|
|
20
|
+
__exportStar(require("./default-database-tables"), exports);
|
|
21
|
+
__exportStar(require("./async-init"), exports);
|
|
22
|
+
__exportStar(require("./database"), exports);
|
|
23
|
+
__exportStar(require("./scope"), exports);
|
|
24
|
+
__exportStar(require("./role-capability-actions"), exports);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const ROLE_CAPABILITIES: readonly ["switch_themes", "edit_themes", "activate_plugins", "edit_plugins", "edit_users", "edit_files", "manage_options", "moderate_comments", "manage_categories", "manage_links", "upload_files", "import", "unfiltered_html", "edit_posts", "edit_others_posts", "edit_published_posts", "publish_posts", "edit_pages", "read", "level_10", "level_9", "level_8", "level_7", "level_6", "level_5", "level_4", "level_3", "level_2", "level_1", "level_0", "edit_others_pages", "edit_published_pages", "publish_pages", "delete_pages", "delete_others_pages", "delete_published_pages", "delete_posts", "delete_others_posts", "delete_published_posts", "delete_private_posts", "edit_private_posts", "read_private_posts", "delete_private_pages", "edit_private_pages", "read_private_pages", "delete_users", "create_users", "unfiltered_upload", "edit_dashboard", "update_plugins", "delete_plugins", "install_plugins", "update_themes", "install_themes", "update_core", "list_users", "remove_users", "promote_users", "edit_theme_options", "delete_themes", "export"];
|
|
2
|
+
export declare const DO_NOT_ALLOW = "do_not_allow";
|
|
3
|
+
//# sourceMappingURL=role-capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role-capabilities.d.ts","sourceRoot":"","sources":["../../src/constants/role-capabilities.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,whCA8DpB,CAAC;AAEX,eAAO,MAAM,YAAY,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DO_NOT_ALLOW = exports.ROLE_CAPABILITIES = void 0;
|
|
4
|
+
exports.ROLE_CAPABILITIES = [
|
|
5
|
+
"switch_themes",
|
|
6
|
+
"edit_themes",
|
|
7
|
+
"activate_plugins",
|
|
8
|
+
"edit_plugins",
|
|
9
|
+
"edit_users",
|
|
10
|
+
"edit_files",
|
|
11
|
+
"manage_options",
|
|
12
|
+
"moderate_comments",
|
|
13
|
+
"manage_categories",
|
|
14
|
+
"manage_links",
|
|
15
|
+
"upload_files",
|
|
16
|
+
"import",
|
|
17
|
+
"unfiltered_html",
|
|
18
|
+
"edit_posts",
|
|
19
|
+
"edit_others_posts",
|
|
20
|
+
"edit_published_posts",
|
|
21
|
+
"publish_posts",
|
|
22
|
+
"edit_pages",
|
|
23
|
+
"read",
|
|
24
|
+
"level_10",
|
|
25
|
+
"level_9",
|
|
26
|
+
"level_8",
|
|
27
|
+
"level_7",
|
|
28
|
+
"level_6",
|
|
29
|
+
"level_5",
|
|
30
|
+
"level_4",
|
|
31
|
+
"level_3",
|
|
32
|
+
"level_2",
|
|
33
|
+
"level_1",
|
|
34
|
+
"level_0",
|
|
35
|
+
"edit_others_pages",
|
|
36
|
+
"edit_published_pages",
|
|
37
|
+
"publish_pages",
|
|
38
|
+
"delete_pages",
|
|
39
|
+
"delete_others_pages",
|
|
40
|
+
"delete_published_pages",
|
|
41
|
+
"delete_posts",
|
|
42
|
+
"delete_others_posts",
|
|
43
|
+
"delete_published_posts",
|
|
44
|
+
"delete_private_posts",
|
|
45
|
+
"edit_private_posts",
|
|
46
|
+
"read_private_posts",
|
|
47
|
+
"delete_private_pages",
|
|
48
|
+
"edit_private_pages",
|
|
49
|
+
"read_private_pages",
|
|
50
|
+
"delete_users",
|
|
51
|
+
"create_users",
|
|
52
|
+
"unfiltered_upload",
|
|
53
|
+
"edit_dashboard",
|
|
54
|
+
"update_plugins",
|
|
55
|
+
"delete_plugins",
|
|
56
|
+
"install_plugins",
|
|
57
|
+
"update_themes",
|
|
58
|
+
"install_themes",
|
|
59
|
+
"update_core",
|
|
60
|
+
"list_users",
|
|
61
|
+
"remove_users",
|
|
62
|
+
"promote_users",
|
|
63
|
+
"edit_theme_options",
|
|
64
|
+
"delete_themes",
|
|
65
|
+
"export",
|
|
66
|
+
];
|
|
67
|
+
exports.DO_NOT_ALLOW = "do_not_allow";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const ROLE_CAPABILITY_ACTIONS: readonly ["remove_user", "promote_user", "add_users", "edit_user", "edit_users", "delete_post", "delete_page", "edit_post", "edit_page", "read_post", "read_page", "publish_post", "edit_post_meta", "delete_post_meta", "add_post_meta", "edit_comment_meta", "delete_comment_meta", "add_comment_meta", "edit_term_meta", "delete_term_meta", "add_term_meta", "edit_user_meta", "delete_user_meta", "add_user_meta", "edit_comment", "unfiltered_upload", "edit_css", "unfiltered_html", "edit_files", "edit_plugins", "edit_themes", "update_plugins", "delete_plugins", "install_plugins", "upload_plugins", "update_themes", "delete_themes", "install_themes", "upload_themes", "update_core", "install_languages", "update_languages", "activate_plugins", "deactivate_plugins", "activate_plugin", "deactivate_plugin", "resume_plugin", "resume_theme", "delete_user", "delete_users", "create_users", "manage_links", "customize", "delete_site", "edit_term", "delete_term", "assign_term", "manage_post_tags", "edit_categories", "edit_post_tags", "delete_categories", "delete_post_tags", "assign_categories", "assign_post_tags", "create_sites", "delete_sites", "manage_network", "manage_sites", "manage_network_users", "manage_network_plugins", "manage_network_themes", "manage_network_options", "upgrade_network", "setup_network", "update_php", "update_https", "export_others_personal_data", "erase_others_personal_data", "manage_privacy_options", "create_app_password", "list_app_passwords", "read_app_password", "edit_app_password", "delete_app_passwords", "delete_app_password"];
|
|
2
|
+
//# sourceMappingURL=role-capability-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role-capability-actions.d.ts","sourceRoot":"","sources":["../../src/constants/role-capability-actions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,0hDAsF1B,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ROLE_CAPABILITY_ACTIONS = void 0;
|
|
4
|
+
exports.ROLE_CAPABILITY_ACTIONS = [
|
|
5
|
+
"remove_user",
|
|
6
|
+
"promote_user",
|
|
7
|
+
"add_users",
|
|
8
|
+
"edit_user",
|
|
9
|
+
"edit_users",
|
|
10
|
+
"delete_post",
|
|
11
|
+
"delete_page",
|
|
12
|
+
"edit_post",
|
|
13
|
+
"edit_page",
|
|
14
|
+
"read_post",
|
|
15
|
+
"read_page",
|
|
16
|
+
"publish_post",
|
|
17
|
+
"edit_post_meta",
|
|
18
|
+
"delete_post_meta",
|
|
19
|
+
"add_post_meta",
|
|
20
|
+
"edit_comment_meta",
|
|
21
|
+
"delete_comment_meta",
|
|
22
|
+
"add_comment_meta",
|
|
23
|
+
"edit_term_meta",
|
|
24
|
+
"delete_term_meta",
|
|
25
|
+
"add_term_meta",
|
|
26
|
+
"edit_user_meta",
|
|
27
|
+
"delete_user_meta",
|
|
28
|
+
"add_user_meta",
|
|
29
|
+
"edit_comment",
|
|
30
|
+
"unfiltered_upload",
|
|
31
|
+
"edit_css",
|
|
32
|
+
"unfiltered_html",
|
|
33
|
+
"edit_files",
|
|
34
|
+
"edit_plugins",
|
|
35
|
+
"edit_themes",
|
|
36
|
+
"update_plugins",
|
|
37
|
+
"delete_plugins",
|
|
38
|
+
"install_plugins",
|
|
39
|
+
"upload_plugins",
|
|
40
|
+
"update_themes",
|
|
41
|
+
"delete_themes",
|
|
42
|
+
"install_themes",
|
|
43
|
+
"upload_themes",
|
|
44
|
+
"update_core",
|
|
45
|
+
"install_languages",
|
|
46
|
+
"update_languages",
|
|
47
|
+
"activate_plugins",
|
|
48
|
+
"deactivate_plugins",
|
|
49
|
+
"activate_plugin",
|
|
50
|
+
"deactivate_plugin",
|
|
51
|
+
"resume_plugin",
|
|
52
|
+
"resume_theme",
|
|
53
|
+
"delete_user",
|
|
54
|
+
"delete_users",
|
|
55
|
+
"create_users",
|
|
56
|
+
"manage_links",
|
|
57
|
+
"customize",
|
|
58
|
+
"delete_site",
|
|
59
|
+
"edit_term",
|
|
60
|
+
"delete_term",
|
|
61
|
+
"assign_term",
|
|
62
|
+
"manage_post_tags",
|
|
63
|
+
"edit_categories",
|
|
64
|
+
"edit_post_tags",
|
|
65
|
+
"delete_categories",
|
|
66
|
+
"delete_post_tags",
|
|
67
|
+
"assign_categories",
|
|
68
|
+
"assign_post_tags",
|
|
69
|
+
"create_sites",
|
|
70
|
+
"delete_sites",
|
|
71
|
+
"manage_network",
|
|
72
|
+
"manage_sites",
|
|
73
|
+
"manage_network_users",
|
|
74
|
+
"manage_network_plugins",
|
|
75
|
+
"manage_network_themes",
|
|
76
|
+
"manage_network_options",
|
|
77
|
+
"upgrade_network",
|
|
78
|
+
"setup_network",
|
|
79
|
+
"update_php",
|
|
80
|
+
"update_https",
|
|
81
|
+
"export_others_personal_data",
|
|
82
|
+
"erase_others_personal_data",
|
|
83
|
+
"manage_privacy_options",
|
|
84
|
+
"create_app_password",
|
|
85
|
+
"list_app_passwords",
|
|
86
|
+
"read_app_password",
|
|
87
|
+
"edit_app_password",
|
|
88
|
+
"delete_app_passwords",
|
|
89
|
+
"delete_app_password",
|
|
90
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role-names.d.ts","sourceRoot":"","sources":["../../src/constants/role-names.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,wGAQb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/constants/scope.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK;IACf,SAAS,IAAI;IACb,OAAO,IAAI;IACX,SAAS,IAAI;CACd"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Scope = void 0;
|
|
4
|
+
var Scope;
|
|
5
|
+
(function (Scope) {
|
|
6
|
+
Scope[Scope["Singleton"] = 0] = "Singleton";
|
|
7
|
+
Scope[Scope["Context"] = 1] = "Context";
|
|
8
|
+
Scope[Scope["Transient"] = 2] = "Transient";
|
|
9
|
+
})(Scope || (exports.Scope = Scope = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-init-reflect.d.ts","sourceRoot":"","sources":["../../src/core/async-init-reflect.ts"],"names":[],"mappings":"AAEA,qBAAa,gBAAgB;IAC3B,MAAM,CAAC,MAAM,CACX,MAAM,EAAE,GAAG,EACX,WAAW,EAAE,MAAM,EAEnB,UAAU,EAAE,kBAAkB;IAShC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI;CAU5D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AsyncInitReflect = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
|
+
class AsyncInitReflect {
|
|
6
|
+
static define(target, propertyKey,
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
|
+
descriptor) {
|
|
9
|
+
Reflect.defineMetadata(constants_1.REFLECT_METADATA_KEY_ASYNC_INIT, propertyKey, target.constructor);
|
|
10
|
+
}
|
|
11
|
+
static get(instance, target) {
|
|
12
|
+
const propertyKey = Reflect.getMetadata(constants_1.REFLECT_METADATA_KEY_ASYNC_INIT, target);
|
|
13
|
+
return propertyKey && instance[propertyKey] instanceof Function
|
|
14
|
+
? instance[propertyKey].apply(instance)
|
|
15
|
+
: undefined;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.AsyncInitReflect = AsyncInitReflect;
|
package/core/blog.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type * as types from "../types";
|
|
2
|
+
import { Meta } from "./meta";
|
|
3
|
+
import { Components } from "./components";
|
|
4
|
+
import { Logger } from "./logger";
|
|
5
|
+
type Props = types.Tables["blogs"];
|
|
6
|
+
export declare class Blog {
|
|
7
|
+
private components;
|
|
8
|
+
private logger;
|
|
9
|
+
meta: Meta;
|
|
10
|
+
private blogRef;
|
|
11
|
+
private _props;
|
|
12
|
+
constructor(components: Components, logger: Logger, meta: Meta, blogRef: string | number, _props: Props);
|
|
13
|
+
get props(): types.WpBlogs | undefined;
|
|
14
|
+
options<T = string>(name: string, defaultValue?: T | undefined): Promise<T | undefined>;
|
|
15
|
+
name(): Promise<string | undefined>;
|
|
16
|
+
siteurl(): Promise<string | undefined>;
|
|
17
|
+
private init;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=blog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog.d.ts","sourceRoot":"","sources":["../../src/core/blog.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,KAAK,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,KAAK,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,qBACa,IAAI;IAEb,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,MAAM;IACP,IAAI,EAAE,IAAI;IACjB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,MAAM;gBAJN,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACf,IAAI,EAAE,IAAI,EACT,OAAO,EAAE,MAAM,GAAG,MAAM,EACxB,MAAM,EAAE,KAAK;IAGvB,IAAI,KAAK,8BAER;IAEK,OAAO,CAAC,CAAC,GAAG,MAAM,EACtB,IAAI,EAAE,MAAM,EACZ,YAAY,CAAC,EAAE,CAAC,GAAG,SAAS,GAC3B,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAyBnB,IAAI;IAIJ,OAAO;YAKC,IAAI;CAmBnB"}
|
package/core/blog.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
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;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.Blog = void 0;
|
|
46
|
+
const constants_1 = require("../constants");
|
|
47
|
+
const async_init_1 = require("../decorators/async-init");
|
|
48
|
+
const component_1 = require("../decorators/component");
|
|
49
|
+
const val = __importStar(require("../validators"));
|
|
50
|
+
const query_util_1 = require("./utils/query.util");
|
|
51
|
+
const meta_1 = require("./meta");
|
|
52
|
+
const components_1 = require("./components");
|
|
53
|
+
const logger_1 = require("./logger");
|
|
54
|
+
let Blog = class Blog {
|
|
55
|
+
components;
|
|
56
|
+
logger;
|
|
57
|
+
meta;
|
|
58
|
+
blogRef;
|
|
59
|
+
_props;
|
|
60
|
+
constructor(components, logger, meta, blogRef, _props) {
|
|
61
|
+
this.components = components;
|
|
62
|
+
this.logger = logger;
|
|
63
|
+
this.meta = meta;
|
|
64
|
+
this.blogRef = blogRef;
|
|
65
|
+
this._props = _props;
|
|
66
|
+
}
|
|
67
|
+
get props() {
|
|
68
|
+
return !this._props || 0 >= this._props?.blog_id ? undefined : this._props;
|
|
69
|
+
}
|
|
70
|
+
async options(name, defaultValue) {
|
|
71
|
+
const queryUtil = this.components.get(query_util_1.QueryUtil);
|
|
72
|
+
const props = this.props;
|
|
73
|
+
if (!props) {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
let value;
|
|
77
|
+
try {
|
|
78
|
+
value = (await queryUtil.usingBlog(props.blog_id).options((query) => {
|
|
79
|
+
query.get(name);
|
|
80
|
+
}))?.option_value;
|
|
81
|
+
}
|
|
82
|
+
catch (e) {
|
|
83
|
+
value = defaultValue;
|
|
84
|
+
}
|
|
85
|
+
value = value ?? defaultValue;
|
|
86
|
+
queryUtil.resetBlog();
|
|
87
|
+
return value;
|
|
88
|
+
}
|
|
89
|
+
async name() {
|
|
90
|
+
return await this.options("blogname");
|
|
91
|
+
}
|
|
92
|
+
async siteurl() {
|
|
93
|
+
return await this.options("siteurl");
|
|
94
|
+
}
|
|
95
|
+
async init() {
|
|
96
|
+
if (!this.blogRef) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const queryUtil = this.components.get(query_util_1.QueryUtil);
|
|
100
|
+
const blog = await queryUtil.blogs((query) => {
|
|
101
|
+
query.get(this.blogRef);
|
|
102
|
+
}, val.database.wpBlogs);
|
|
103
|
+
if (!blog) {
|
|
104
|
+
this.logger.info(`Blog not found: ${this.blogRef}`);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
this.meta.set("blog", blog.blog_id);
|
|
108
|
+
this._props = blog;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
exports.Blog = Blog;
|
|
112
|
+
__decorate([
|
|
113
|
+
async_init_1.asyncInit,
|
|
114
|
+
__metadata("design:type", Function),
|
|
115
|
+
__metadata("design:paramtypes", []),
|
|
116
|
+
__metadata("design:returntype", Promise)
|
|
117
|
+
], Blog.prototype, "init", null);
|
|
118
|
+
exports.Blog = Blog = __decorate([
|
|
119
|
+
(0, component_1.component)({ scope: constants_1.Scope.Transient }),
|
|
120
|
+
__metadata("design:paramtypes", [components_1.Components,
|
|
121
|
+
logger_1.Logger,
|
|
122
|
+
meta_1.Meta, Object, Object])
|
|
123
|
+
], Blog);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Config } from "../config";
|
|
2
|
+
import { Components } from "./components";
|
|
3
|
+
import { User } from "./user";
|
|
4
|
+
import type * as types from "../types";
|
|
5
|
+
export declare class Capabilities {
|
|
6
|
+
private config;
|
|
7
|
+
private components;
|
|
8
|
+
constructor(config: Config, components: Components);
|
|
9
|
+
private addCap;
|
|
10
|
+
check<T>(action: T | types.RoleCapabilityActions, user: User | number, ...args: any): Promise<string[]>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/core/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAInC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAS9B,OAAO,KAAK,KAAK,KAAK,MAAM,UAAU,CAAC;AAEvC,qBACa,YAAY;IACX,OAAO,CAAC,MAAM;IAAU,OAAO,CAAC,UAAU;gBAAlC,MAAM,EAAE,MAAM,EAAU,UAAU,EAAE,UAAU;IAElE,OAAO,CAAC,MAAM;IAaR,KAAK,CAAC,CAAC,EACX,MAAM,EAAE,CAAC,GAAG,KAAK,CAAC,qBAAqB,EACvC,IAAI,EAAE,IAAI,GAAG,MAAM,EACnB,GAAG,IAAI,EAAE,GAAG,GACX,OAAO,CAAC,MAAM,EAAE,CAAC;CAorBrB"}
|