@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,37 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Config } from "../config";
|
|
3
|
+
import { Components } from "../core/components";
|
|
4
|
+
import * as val from "../validators";
|
|
5
|
+
import { Crud } from "./crud";
|
|
6
|
+
declare const allowedOptions: {
|
|
7
|
+
general: readonly ["blogname", "blogdescription", "gmt_offset", "date_format", "time_format", "start_of_week", "timezone_string", "admin_email"];
|
|
8
|
+
discussion: readonly ["default_pingback_flag", "default_ping_status", "default_comment_status", "comments_notify", "moderation_notify", "comment_moderation", "require_name_email", "comment_previously_approved", "comment_max_links", "moderation_keys", "disallowed_keys", "show_avatars", "avatar_rating", "avatar_default", "close_comments_for_old_posts", "close_comments_days_old", "thread_comments", "thread_comments_depth", "page_comments", "comments_per_page", "default_comments_page", "comment_order", "comment_registration", "show_comments_cookies_opt_in"];
|
|
9
|
+
media: readonly ["thumbnail_size_w", "thumbnail_size_h", "thumbnail_crop", "medium_size_w", "medium_size_h", "large_size_w", "large_size_h", "image_default_size", "image_default_align", "image_default_link_type"];
|
|
10
|
+
reading: readonly ["posts_per_page", "posts_per_rss", "rss_use_excerpt", "show_on_front", "page_on_front", "page_for_posts", "blog_public"];
|
|
11
|
+
writing: readonly ["default_category", "default_email_category", "default_link_category", "default_post_format"];
|
|
12
|
+
};
|
|
13
|
+
type AllowedOptions = typeof allowedOptions;
|
|
14
|
+
type AllowedOptionKeys = AllowedOptions[keyof AllowedOptions][number][];
|
|
15
|
+
export declare class OptionsCrud extends Crud {
|
|
16
|
+
private config;
|
|
17
|
+
constructor(components: Components, config: Config);
|
|
18
|
+
private checkPermission;
|
|
19
|
+
getAll(options?: Parameters<OptionsCrud["get"]>[1]): Promise<{
|
|
20
|
+
data: Record<"blogname" | "blogdescription" | "admin_email" | "start_of_week" | "require_name_email" | "comments_notify" | "posts_per_rss" | "rss_use_excerpt" | "default_category" | "default_comment_status" | "default_ping_status" | "default_pingback_flag" | "posts_per_page" | "date_format" | "time_format" | "comment_moderation" | "moderation_notify" | "moderation_keys" | "comment_max_links" | "gmt_offset" | "default_email_category" | "comment_registration" | "blog_public" | "default_link_category" | "show_on_front" | "show_avatars" | "avatar_rating" | "thumbnail_size_w" | "thumbnail_size_h" | "thumbnail_crop" | "medium_size_w" | "medium_size_h" | "avatar_default" | "large_size_w" | "large_size_h" | "image_default_link_type" | "image_default_size" | "image_default_align" | "close_comments_for_old_posts" | "close_comments_days_old" | "thread_comments" | "thread_comments_depth" | "page_comments" | "comments_per_page" | "default_comments_page" | "comment_order" | "timezone_string" | "page_for_posts" | "page_on_front" | "default_post_format" | "show_comments_cookies_opt_in" | "disallowed_keys" | "comment_previously_approved", any>;
|
|
21
|
+
info: undefined;
|
|
22
|
+
}>;
|
|
23
|
+
get<T extends keyof AllowedOptions, K extends T extends keyof AllowedOptions ? AllowedOptions[T] : AllowedOptionKeys>(key?: T, options?: Partial<{
|
|
24
|
+
blogId: number;
|
|
25
|
+
}>): Promise<{
|
|
26
|
+
data: Record<K[number], any>;
|
|
27
|
+
info: undefined;
|
|
28
|
+
}>;
|
|
29
|
+
update(input: Partial<z.infer<typeof val.options>>, options?: Partial<{
|
|
30
|
+
blogId: number;
|
|
31
|
+
}>): Promise<{
|
|
32
|
+
data: boolean;
|
|
33
|
+
info: undefined;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=options.crud.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.crud.d.ts","sourceRoot":"","sources":["../../src/crud/options.crud.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIhD,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAM9B,QAAA,MAAM,cAAc;;;;;;CAgEnB,CAAC;AAEF,KAAK,cAAc,GAAG,OAAO,cAAc,CAAC;AAC5C,KAAK,iBAAiB,GAAG,cAAc,CAAC,MAAM,cAAc,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;AAExE,qBACa,WAAY,SAAQ,IAAI;IACC,OAAO,CAAC,MAAM;gBAAtC,UAAU,EAAE,UAAU,EAAU,MAAM,EAAE,MAAM;YAI5C,eAAe;IAYvB,MAAM,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;;;;IAIlD,GAAG,CACP,CAAC,SAAS,MAAM,cAAc,EAC9B,CAAC,SAAS,CAAC,SAAS,MAAM,cAAc,GACpC,cAAc,CAAC,CAAC,CAAC,GACjB,iBAAiB,EACrB,GAAG,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;;;;IA2B1C,MAAM,CACV,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC,EAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;;;;CAkBxC"}
|
|
@@ -0,0 +1,178 @@
|
|
|
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.OptionsCrud = void 0;
|
|
46
|
+
const zod_1 = require("zod");
|
|
47
|
+
const common_1 = require("../common");
|
|
48
|
+
const config_1 = require("../config");
|
|
49
|
+
const components_1 = require("../core/components");
|
|
50
|
+
const vars_1 = require("../core/vars");
|
|
51
|
+
const component_1 = require("../decorators/component");
|
|
52
|
+
const val = __importStar(require("../validators"));
|
|
53
|
+
const crud_1 = require("./crud");
|
|
54
|
+
const error_1 = require("./error");
|
|
55
|
+
//import type * as types from "../types";
|
|
56
|
+
// src/wp-admin/options.php
|
|
57
|
+
const allowedOptions = {
|
|
58
|
+
general: [
|
|
59
|
+
"blogname",
|
|
60
|
+
"blogdescription",
|
|
61
|
+
"gmt_offset",
|
|
62
|
+
"date_format",
|
|
63
|
+
"time_format",
|
|
64
|
+
"start_of_week",
|
|
65
|
+
"timezone_string",
|
|
66
|
+
"admin_email",
|
|
67
|
+
],
|
|
68
|
+
discussion: [
|
|
69
|
+
"default_pingback_flag",
|
|
70
|
+
"default_ping_status",
|
|
71
|
+
"default_comment_status",
|
|
72
|
+
"comments_notify",
|
|
73
|
+
"moderation_notify",
|
|
74
|
+
"comment_moderation",
|
|
75
|
+
"require_name_email",
|
|
76
|
+
"comment_previously_approved",
|
|
77
|
+
"comment_max_links",
|
|
78
|
+
"moderation_keys",
|
|
79
|
+
"disallowed_keys",
|
|
80
|
+
"show_avatars",
|
|
81
|
+
"avatar_rating",
|
|
82
|
+
"avatar_default",
|
|
83
|
+
"close_comments_for_old_posts",
|
|
84
|
+
"close_comments_days_old",
|
|
85
|
+
"thread_comments",
|
|
86
|
+
"thread_comments_depth",
|
|
87
|
+
"page_comments",
|
|
88
|
+
"comments_per_page",
|
|
89
|
+
"default_comments_page",
|
|
90
|
+
"comment_order",
|
|
91
|
+
"comment_registration",
|
|
92
|
+
"show_comments_cookies_opt_in",
|
|
93
|
+
],
|
|
94
|
+
media: [
|
|
95
|
+
"thumbnail_size_w",
|
|
96
|
+
"thumbnail_size_h",
|
|
97
|
+
"thumbnail_crop",
|
|
98
|
+
"medium_size_w",
|
|
99
|
+
"medium_size_h",
|
|
100
|
+
"large_size_w",
|
|
101
|
+
"large_size_h",
|
|
102
|
+
"image_default_size",
|
|
103
|
+
"image_default_align",
|
|
104
|
+
"image_default_link_type",
|
|
105
|
+
],
|
|
106
|
+
reading: [
|
|
107
|
+
"posts_per_page",
|
|
108
|
+
"posts_per_rss",
|
|
109
|
+
"rss_use_excerpt",
|
|
110
|
+
"show_on_front",
|
|
111
|
+
"page_on_front",
|
|
112
|
+
"page_for_posts",
|
|
113
|
+
"blog_public",
|
|
114
|
+
],
|
|
115
|
+
writing: [
|
|
116
|
+
"default_category",
|
|
117
|
+
"default_email_category",
|
|
118
|
+
"default_link_category",
|
|
119
|
+
"default_post_format",
|
|
120
|
+
],
|
|
121
|
+
};
|
|
122
|
+
let OptionsCrud = class OptionsCrud extends crud_1.Crud {
|
|
123
|
+
config;
|
|
124
|
+
constructor(components, config) {
|
|
125
|
+
super(components);
|
|
126
|
+
this.config = config;
|
|
127
|
+
}
|
|
128
|
+
async checkPermission(user) {
|
|
129
|
+
const { user: currentUser } = await this.getUser();
|
|
130
|
+
user = user ?? currentUser;
|
|
131
|
+
if (!(await user.can("manage_options")) ||
|
|
132
|
+
(this.config.isMultiSite() && !(await user.can("manage_network_options")))) {
|
|
133
|
+
throw new error_1.CrudError(error_1.StatusMessage.UNAUTHORIZED, "Not permitted");
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
async getAll(options) {
|
|
137
|
+
return this.get(undefined, options);
|
|
138
|
+
}
|
|
139
|
+
async get(key, options) {
|
|
140
|
+
await this.checkPermission();
|
|
141
|
+
const { blogId } = options ?? {};
|
|
142
|
+
const vars = this.components.get(vars_1.Vars);
|
|
143
|
+
const context = await vars.CONTEXT.clone();
|
|
144
|
+
if (blogId && this.config.isMultiSite()) {
|
|
145
|
+
await context.current.switchBlog(blogId);
|
|
146
|
+
}
|
|
147
|
+
const optionNames = key
|
|
148
|
+
? allowedOptions[key]
|
|
149
|
+
: Object.values(allowedOptions).flat(); //this.config.config.options.defaults;
|
|
150
|
+
const data = ((await context.utils.query.options((query) => {
|
|
151
|
+
query.whereIn(optionNames);
|
|
152
|
+
}, zod_1.z.array(val.query.optionsResult))) ?? [])
|
|
153
|
+
.map((option) => ({
|
|
154
|
+
[option.option_name]: common_1.formatting.primitive(option.option_value),
|
|
155
|
+
}))
|
|
156
|
+
.reduce((obj, item) => ({ ...obj, ...item }), {});
|
|
157
|
+
return this.returnValue(data);
|
|
158
|
+
}
|
|
159
|
+
async update(input, options) {
|
|
160
|
+
await this.checkPermission();
|
|
161
|
+
const { blogId } = options ?? {};
|
|
162
|
+
const data = val.options.partial().parse(input);
|
|
163
|
+
const vars = this.components.get(vars_1.Vars);
|
|
164
|
+
const context = await vars.CONTEXT.clone();
|
|
165
|
+
if (blogId && this.config.isMultiSite()) {
|
|
166
|
+
await context.current.switchBlog(blogId);
|
|
167
|
+
}
|
|
168
|
+
for (const [key, val] of Object.entries(data)) {
|
|
169
|
+
await context.utils.trx.options.update(key, val);
|
|
170
|
+
}
|
|
171
|
+
return this.returnValue(true);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
exports.OptionsCrud = OptionsCrud;
|
|
175
|
+
exports.OptionsCrud = OptionsCrud = __decorate([
|
|
176
|
+
(0, component_1.component)(),
|
|
177
|
+
__metadata("design:paramtypes", [components_1.Components, config_1.Config])
|
|
178
|
+
], OptionsCrud);
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Components } from "../core/components";
|
|
3
|
+
import * as val from "../validators";
|
|
4
|
+
import { Crud } from "./crud";
|
|
5
|
+
import type * as types from "../types";
|
|
6
|
+
type PostUpsert = z.infer<typeof val.trx.postUpsert>;
|
|
7
|
+
export declare class PostCrud extends Crud {
|
|
8
|
+
constructor(components: Components);
|
|
9
|
+
protected translate<T extends PostUpsert | Partial<PostUpsert>>(data: T): Promise<T>;
|
|
10
|
+
private formReturnData;
|
|
11
|
+
getAsUpsert(postId: number, defaultValue?: Partial<PostUpsert>): Promise<{
|
|
12
|
+
data: {
|
|
13
|
+
file: string;
|
|
14
|
+
post_author: number;
|
|
15
|
+
post_content: string;
|
|
16
|
+
post_title: string;
|
|
17
|
+
post_excerpt: string;
|
|
18
|
+
post_status: string;
|
|
19
|
+
comment_status: "closed" | "open";
|
|
20
|
+
ping_status: "closed" | "open";
|
|
21
|
+
post_password: string;
|
|
22
|
+
post_name: string;
|
|
23
|
+
to_ping: string;
|
|
24
|
+
pinged: string;
|
|
25
|
+
post_content_filtered: string;
|
|
26
|
+
post_parent: number;
|
|
27
|
+
guid: string;
|
|
28
|
+
menu_order: number;
|
|
29
|
+
post_type: string;
|
|
30
|
+
post_mime_type: string;
|
|
31
|
+
comment_count: number;
|
|
32
|
+
import_id: number;
|
|
33
|
+
tags_input: string[] | number[] | (string | number)[];
|
|
34
|
+
context: string;
|
|
35
|
+
ID?: number | undefined;
|
|
36
|
+
post_date?: string | undefined;
|
|
37
|
+
post_date_gmt?: string | undefined;
|
|
38
|
+
post_modified?: string | undefined;
|
|
39
|
+
post_modified_gmt?: string | undefined;
|
|
40
|
+
post_categeory?: number[] | undefined;
|
|
41
|
+
tax_input?: Record<string, string[] | number[] | (string | number)[]> | undefined;
|
|
42
|
+
meta_input?: Record<string, string | number | (string | number)[] | Record<string, any>> | undefined;
|
|
43
|
+
};
|
|
44
|
+
info: undefined;
|
|
45
|
+
}>;
|
|
46
|
+
private checkPermission;
|
|
47
|
+
get<T extends "view" | "edit" | "embed">(postIdOrSlug: number | string, options?: Partial<{
|
|
48
|
+
context: T;
|
|
49
|
+
password: string;
|
|
50
|
+
postType: types.PostType;
|
|
51
|
+
}>): Promise<{
|
|
52
|
+
data: {
|
|
53
|
+
metas: Record<string, any>;
|
|
54
|
+
author: {
|
|
55
|
+
ID: number | undefined;
|
|
56
|
+
display_name: string | undefined;
|
|
57
|
+
user_nicename: string | undefined;
|
|
58
|
+
};
|
|
59
|
+
tags: {
|
|
60
|
+
term_id: number;
|
|
61
|
+
name: string;
|
|
62
|
+
slug: string;
|
|
63
|
+
}[];
|
|
64
|
+
categories: {
|
|
65
|
+
term_id: number;
|
|
66
|
+
name: string;
|
|
67
|
+
slug: string;
|
|
68
|
+
}[];
|
|
69
|
+
ID: number;
|
|
70
|
+
post_author: number;
|
|
71
|
+
post_content: string;
|
|
72
|
+
post_title: string;
|
|
73
|
+
post_excerpt: string;
|
|
74
|
+
post_status: string;
|
|
75
|
+
comment_status: string;
|
|
76
|
+
ping_status: string;
|
|
77
|
+
post_password: string;
|
|
78
|
+
post_name: string;
|
|
79
|
+
to_ping: string;
|
|
80
|
+
pinged: string;
|
|
81
|
+
post_content_filtered: string;
|
|
82
|
+
post_parent: number;
|
|
83
|
+
guid: string;
|
|
84
|
+
menu_order: number;
|
|
85
|
+
post_type: string;
|
|
86
|
+
post_mime_type: string;
|
|
87
|
+
comment_count: number;
|
|
88
|
+
post_date?: string | undefined;
|
|
89
|
+
post_date_gmt?: string | undefined;
|
|
90
|
+
post_modified?: string | undefined;
|
|
91
|
+
post_modified_gmt?: string | undefined;
|
|
92
|
+
};
|
|
93
|
+
info: {
|
|
94
|
+
protected: boolean;
|
|
95
|
+
};
|
|
96
|
+
}>;
|
|
97
|
+
update(postId: number, data: Partial<PostUpsert>): Promise<{
|
|
98
|
+
data: number;
|
|
99
|
+
info: undefined;
|
|
100
|
+
}>;
|
|
101
|
+
create(data: Partial<PostUpsert>): Promise<{
|
|
102
|
+
data: number;
|
|
103
|
+
info: undefined;
|
|
104
|
+
}>;
|
|
105
|
+
delete(postId: number): Promise<{
|
|
106
|
+
data: boolean;
|
|
107
|
+
info: undefined;
|
|
108
|
+
}>;
|
|
109
|
+
private trashOrUntrash;
|
|
110
|
+
trash(postId: number): Promise<{
|
|
111
|
+
data: boolean;
|
|
112
|
+
info: undefined;
|
|
113
|
+
}>;
|
|
114
|
+
untrash(postId: number): Promise<{
|
|
115
|
+
data: boolean;
|
|
116
|
+
info: undefined;
|
|
117
|
+
}>;
|
|
118
|
+
private checkAutosavePermission;
|
|
119
|
+
autosave(parentId: number, data: Partial<PostUpsert>): Promise<{
|
|
120
|
+
data: types.WpPosts;
|
|
121
|
+
info: undefined;
|
|
122
|
+
}>;
|
|
123
|
+
getAutosave(parentId: number): Promise<{
|
|
124
|
+
data: {
|
|
125
|
+
file: string;
|
|
126
|
+
post_author: number;
|
|
127
|
+
post_content: string;
|
|
128
|
+
post_title: string;
|
|
129
|
+
post_excerpt: string;
|
|
130
|
+
post_status: string;
|
|
131
|
+
comment_status: "closed" | "open";
|
|
132
|
+
ping_status: "closed" | "open";
|
|
133
|
+
post_password: string;
|
|
134
|
+
post_name: string;
|
|
135
|
+
to_ping: string;
|
|
136
|
+
pinged: string;
|
|
137
|
+
post_content_filtered: string;
|
|
138
|
+
post_parent: number;
|
|
139
|
+
guid: string;
|
|
140
|
+
menu_order: number;
|
|
141
|
+
post_type: string;
|
|
142
|
+
post_mime_type: string;
|
|
143
|
+
comment_count: number;
|
|
144
|
+
import_id: number;
|
|
145
|
+
tags_input: string[] | number[] | (string | number)[];
|
|
146
|
+
context: string;
|
|
147
|
+
ID?: number | undefined;
|
|
148
|
+
post_date?: string | undefined;
|
|
149
|
+
post_date_gmt?: string | undefined;
|
|
150
|
+
post_modified?: string | undefined;
|
|
151
|
+
post_modified_gmt?: string | undefined;
|
|
152
|
+
post_categeory?: number[] | undefined;
|
|
153
|
+
tax_input?: Record<string, string[] | number[] | (string | number)[]> | undefined;
|
|
154
|
+
meta_input?: Record<string, string | number | (string | number)[] | Record<string, any>> | undefined;
|
|
155
|
+
};
|
|
156
|
+
info: undefined;
|
|
157
|
+
}>;
|
|
158
|
+
copy(postId: number): Promise<{
|
|
159
|
+
data: number;
|
|
160
|
+
info: undefined;
|
|
161
|
+
}>;
|
|
162
|
+
list<TCountGroupBy extends keyof types.WpPosts>(args: Partial<z.infer<typeof val.crud.postListParams>>, options?: Partial<{
|
|
163
|
+
password: string;
|
|
164
|
+
postTypes: types.PostType[];
|
|
165
|
+
mimeTypes: string[];
|
|
166
|
+
countGroupBy: TCountGroupBy;
|
|
167
|
+
context: "view" | "edit" | "embed";
|
|
168
|
+
}>): Promise<{
|
|
169
|
+
data: {
|
|
170
|
+
metas: Record<string, any>;
|
|
171
|
+
author: {
|
|
172
|
+
ID: number | undefined;
|
|
173
|
+
display_name: string | undefined;
|
|
174
|
+
user_nicename: string | undefined;
|
|
175
|
+
};
|
|
176
|
+
tags: {
|
|
177
|
+
term_id: number;
|
|
178
|
+
name: string;
|
|
179
|
+
slug: string;
|
|
180
|
+
}[];
|
|
181
|
+
categories: {
|
|
182
|
+
term_id: number;
|
|
183
|
+
name: string;
|
|
184
|
+
slug: string;
|
|
185
|
+
}[];
|
|
186
|
+
ID: number;
|
|
187
|
+
post_author: number;
|
|
188
|
+
post_content: string;
|
|
189
|
+
post_title: string;
|
|
190
|
+
post_excerpt: string;
|
|
191
|
+
post_status: string;
|
|
192
|
+
comment_status: string;
|
|
193
|
+
ping_status: string;
|
|
194
|
+
post_password: string;
|
|
195
|
+
post_name: string;
|
|
196
|
+
to_ping: string;
|
|
197
|
+
pinged: string;
|
|
198
|
+
post_content_filtered: string;
|
|
199
|
+
post_parent: number;
|
|
200
|
+
guid: string;
|
|
201
|
+
menu_order: number;
|
|
202
|
+
post_type: string;
|
|
203
|
+
post_mime_type: string;
|
|
204
|
+
comment_count: number;
|
|
205
|
+
post_date?: string | undefined;
|
|
206
|
+
post_date_gmt?: string | undefined;
|
|
207
|
+
post_modified?: string | undefined;
|
|
208
|
+
post_modified_gmt?: string | undefined;
|
|
209
|
+
}[];
|
|
210
|
+
info: {
|
|
211
|
+
pagination: {
|
|
212
|
+
page: number;
|
|
213
|
+
limit: number;
|
|
214
|
+
totalPage: number;
|
|
215
|
+
count: number;
|
|
216
|
+
};
|
|
217
|
+
protected: number[];
|
|
218
|
+
countGroupBy: ({ [K in TCountGroupBy]: string; } & {
|
|
219
|
+
count: number;
|
|
220
|
+
})[] | undefined;
|
|
221
|
+
};
|
|
222
|
+
}>;
|
|
223
|
+
}
|
|
224
|
+
export {};
|
|
225
|
+
//# sourceMappingURL=post.crud.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post.crud.d.ts","sourceRoot":"","sources":["../../src/crud/post.crud.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAUhD,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAI9B,OAAO,KAAK,KAAK,KAAK,MAAM,UAAU,CAAC;AAIvC,KAAK,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAErD,qBACa,QAAS,SAAQ,IAAI;gBACpB,UAAU,EAAE,UAAU;cAKlB,SAAS,CAAC,CAAC,SAAS,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,EAClE,IAAI,EAAE,CAAC,GACN,OAAO,CAAC,CAAC,CAAC;YAyFC,cAAc;IAyDtB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,GAAE,OAAO,CAAC,UAAU,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAmB1D,eAAe;IAiBvB,GAAG,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,OAAO,EAC3C,YAAY,EAAE,MAAM,GAAG,MAAM,EAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;QAChB,OAAO,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;KAC1B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgEE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC;;;;IAmChD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC;;;;IAuBhC,MAAM,CAAC,MAAM,EAAE,MAAM;;;;YAwBb,cAAc;IAwBtB,KAAK,CAAC,MAAM,EAAE,MAAM;;;;IAIpB,OAAO,CAAC,MAAM,EAAE,MAAM;;;;YAId,uBAAuB;IAkB/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC;;;;IA+CpD,WAAW,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiB5B,IAAI,CAAC,MAAM,EAAE,MAAM;;;;IAuDnB,IAAI,CAAC,aAAa,SAAS,MAAM,KAAK,CAAC,OAAO,EAClD,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,EACtD,OAAO,CAAC,EAAE,OAAO,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,YAAY,EAAE,aAAa,CAAC;QAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;KACpC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA4OO,CAAC;uBACS,MAAM;;;;CAgC5B"}
|