@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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/validators/transactions/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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("./term"), exports);
|
|
18
|
+
__exportStar(require("./post"), exports);
|
|
19
|
+
__exportStar(require("./meta"), exports);
|
|
20
|
+
__exportStar(require("./user"), exports);
|
|
21
|
+
__exportStar(require("./comment"), exports);
|
|
22
|
+
__exportStar(require("./signup"), exports);
|
|
23
|
+
__exportStar(require("./blog"), exports);
|
|
24
|
+
__exportStar(require("./link"), exports);
|
|
25
|
+
__exportStar(require("./site"), exports);
|
|
26
|
+
__exportStar(require("./roles"), exports);
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const linkUpsert: z.ZodObject<{
|
|
3
|
+
link_url: z.ZodString;
|
|
4
|
+
link_name: z.ZodString;
|
|
5
|
+
link_image: z.ZodDefault<z.ZodString>;
|
|
6
|
+
link_description: z.ZodDefault<z.ZodString>;
|
|
7
|
+
link_owner: z.ZodDefault<z.ZodNumber>;
|
|
8
|
+
link_rating: z.ZodDefault<z.ZodNumber>;
|
|
9
|
+
link_rel: z.ZodDefault<z.ZodString>;
|
|
10
|
+
link_notes: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
11
|
+
link_rss: z.ZodUnion<[z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>]>;
|
|
12
|
+
} & {
|
|
13
|
+
link_id: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
link_category: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
15
|
+
link_target: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodString>>, "" | "_top" | "_blank", string | undefined>;
|
|
16
|
+
link_visible: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodString>>, string, string | undefined>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
link_url: string;
|
|
19
|
+
link_name: string;
|
|
20
|
+
link_image: string;
|
|
21
|
+
link_target: "" | "_top" | "_blank";
|
|
22
|
+
link_description: string;
|
|
23
|
+
link_visible: string;
|
|
24
|
+
link_owner: number;
|
|
25
|
+
link_rating: number;
|
|
26
|
+
link_rel: string;
|
|
27
|
+
link_notes: string;
|
|
28
|
+
link_rss: string;
|
|
29
|
+
link_category?: number[] | undefined;
|
|
30
|
+
link_id?: number | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
link_url: string;
|
|
33
|
+
link_name: string;
|
|
34
|
+
link_category?: number[] | undefined;
|
|
35
|
+
link_id?: number | undefined;
|
|
36
|
+
link_image?: string | undefined;
|
|
37
|
+
link_target?: string | undefined;
|
|
38
|
+
link_description?: string | undefined;
|
|
39
|
+
link_visible?: string | undefined;
|
|
40
|
+
link_owner?: number | undefined;
|
|
41
|
+
link_rating?: number | undefined;
|
|
42
|
+
link_rel?: string | undefined;
|
|
43
|
+
link_notes?: string | undefined;
|
|
44
|
+
link_rss?: string | undefined;
|
|
45
|
+
}>;
|
|
46
|
+
export declare const linkInsert: z.ZodObject<Omit<{
|
|
47
|
+
link_id: z.ZodNumber;
|
|
48
|
+
link_url: z.ZodString;
|
|
49
|
+
link_name: z.ZodString;
|
|
50
|
+
link_image: z.ZodDefault<z.ZodString>;
|
|
51
|
+
link_target: z.ZodDefault<z.ZodString>;
|
|
52
|
+
link_description: z.ZodDefault<z.ZodString>;
|
|
53
|
+
link_visible: z.ZodDefault<z.ZodString>;
|
|
54
|
+
link_owner: z.ZodDefault<z.ZodNumber>;
|
|
55
|
+
link_rating: z.ZodDefault<z.ZodNumber>;
|
|
56
|
+
link_updated: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
57
|
+
link_rel: z.ZodDefault<z.ZodString>;
|
|
58
|
+
link_notes: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
59
|
+
link_rss: z.ZodUnion<[z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>]>;
|
|
60
|
+
}, "link_id">, "strip", z.ZodTypeAny, {
|
|
61
|
+
link_url: string;
|
|
62
|
+
link_name: string;
|
|
63
|
+
link_image: string;
|
|
64
|
+
link_target: string;
|
|
65
|
+
link_description: string;
|
|
66
|
+
link_visible: string;
|
|
67
|
+
link_owner: number;
|
|
68
|
+
link_rating: number;
|
|
69
|
+
link_rel: string;
|
|
70
|
+
link_notes: string;
|
|
71
|
+
link_rss: string;
|
|
72
|
+
link_updated?: string | undefined;
|
|
73
|
+
}, {
|
|
74
|
+
link_url: string;
|
|
75
|
+
link_name: string;
|
|
76
|
+
link_image?: string | undefined;
|
|
77
|
+
link_target?: string | undefined;
|
|
78
|
+
link_description?: string | undefined;
|
|
79
|
+
link_visible?: string | undefined;
|
|
80
|
+
link_owner?: number | undefined;
|
|
81
|
+
link_rating?: number | undefined;
|
|
82
|
+
link_updated?: unknown;
|
|
83
|
+
link_rel?: string | undefined;
|
|
84
|
+
link_notes?: string | undefined;
|
|
85
|
+
link_rss?: string | undefined;
|
|
86
|
+
}>;
|
|
87
|
+
export declare const linkUpdate: z.ZodObject<Omit<{
|
|
88
|
+
link_id: z.ZodNumber;
|
|
89
|
+
link_url: z.ZodString;
|
|
90
|
+
link_name: z.ZodString;
|
|
91
|
+
link_image: z.ZodDefault<z.ZodString>;
|
|
92
|
+
link_target: z.ZodDefault<z.ZodString>;
|
|
93
|
+
link_description: z.ZodDefault<z.ZodString>;
|
|
94
|
+
link_visible: z.ZodDefault<z.ZodString>;
|
|
95
|
+
link_owner: z.ZodDefault<z.ZodNumber>;
|
|
96
|
+
link_rating: z.ZodDefault<z.ZodNumber>;
|
|
97
|
+
link_updated: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
98
|
+
link_rel: z.ZodDefault<z.ZodString>;
|
|
99
|
+
link_notes: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
100
|
+
link_rss: z.ZodUnion<[z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>]>;
|
|
101
|
+
}, "link_id">, "strip", z.ZodTypeAny, {
|
|
102
|
+
link_url: string;
|
|
103
|
+
link_name: string;
|
|
104
|
+
link_image: string;
|
|
105
|
+
link_target: string;
|
|
106
|
+
link_description: string;
|
|
107
|
+
link_visible: string;
|
|
108
|
+
link_owner: number;
|
|
109
|
+
link_rating: number;
|
|
110
|
+
link_rel: string;
|
|
111
|
+
link_notes: string;
|
|
112
|
+
link_rss: string;
|
|
113
|
+
link_updated?: string | undefined;
|
|
114
|
+
}, {
|
|
115
|
+
link_url: string;
|
|
116
|
+
link_name: string;
|
|
117
|
+
link_image?: string | undefined;
|
|
118
|
+
link_target?: string | undefined;
|
|
119
|
+
link_description?: string | undefined;
|
|
120
|
+
link_visible?: string | undefined;
|
|
121
|
+
link_owner?: number | undefined;
|
|
122
|
+
link_rating?: number | undefined;
|
|
123
|
+
link_updated?: unknown;
|
|
124
|
+
link_rel?: string | undefined;
|
|
125
|
+
link_notes?: string | undefined;
|
|
126
|
+
link_rss?: string | undefined;
|
|
127
|
+
}>;
|
|
128
|
+
//# sourceMappingURL=link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/validators/transactions/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBpB,CAAC;AAEJ,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAErB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAa,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.linkUpdate = exports.linkInsert = exports.linkUpsert = void 0;
|
|
37
|
+
const zod_1 = require("zod");
|
|
38
|
+
const database = __importStar(require("../database"));
|
|
39
|
+
exports.linkUpsert = database.wpLinks
|
|
40
|
+
.omit({
|
|
41
|
+
link_updated: true,
|
|
42
|
+
})
|
|
43
|
+
.merge(zod_1.z.object({
|
|
44
|
+
link_id: zod_1.z.number().int().nonnegative().optional(),
|
|
45
|
+
link_category: zod_1.z.array(zod_1.z.number()).optional(),
|
|
46
|
+
link_target: zod_1.z
|
|
47
|
+
.string()
|
|
48
|
+
.optional()
|
|
49
|
+
.default("")
|
|
50
|
+
.transform((v) => (v !== "_top" && v !== "_blank" ? "" : v)),
|
|
51
|
+
link_visible: zod_1.z
|
|
52
|
+
.string()
|
|
53
|
+
.optional()
|
|
54
|
+
.default("Y")
|
|
55
|
+
.transform((v) => v.replace(/[^YNyn]/g, "")),
|
|
56
|
+
}));
|
|
57
|
+
exports.linkInsert = database.wpLinks.omit({
|
|
58
|
+
link_id: true,
|
|
59
|
+
});
|
|
60
|
+
exports.linkUpdate = exports.linkInsert;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type * as types from "../../types";
|
|
3
|
+
export declare const metaUpdate: z.ZodObject<{
|
|
4
|
+
meta_value: z.ZodEffects<z.ZodAny, string, any>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
meta_value: string;
|
|
7
|
+
}, {
|
|
8
|
+
meta_value?: any;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const metaInsert: (table: types.MetaTable) => z.ZodObject<{
|
|
11
|
+
[x: string]: z.ZodString | z.ZodNumber | z.ZodUnion<[z.ZodNullable<z.ZodString>, z.ZodEffects<z.ZodAny, any, any>]>;
|
|
12
|
+
meta_key: z.ZodString;
|
|
13
|
+
meta_value: z.ZodUnion<[z.ZodNullable<z.ZodString>, z.ZodEffects<z.ZodAny, any, any>]>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
meta_key?: unknown;
|
|
17
|
+
meta_value?: unknown;
|
|
18
|
+
}, {
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
meta_key?: unknown;
|
|
21
|
+
meta_value?: unknown;
|
|
22
|
+
}>;
|
|
23
|
+
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/validators/transactions/meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,KAAK,KAAK,MAAM,aAAa,CAAC;AAC1C,eAAO,MAAM,UAAU;;;;;;EAMrB,CAAC;AAEH,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,CAAC,SAAS;;;;;;;;;;;;EAQ7C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.metaInsert = exports.metaUpdate = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.metaUpdate = zod_1.z.object({
|
|
6
|
+
meta_value: zod_1.z
|
|
7
|
+
.any()
|
|
8
|
+
.transform((v) => typeof v == "undefined" ? "" : new String(v).toString()),
|
|
9
|
+
});
|
|
10
|
+
const metaInsert = (table) => zod_1.z.object({
|
|
11
|
+
[`${table}_id`]: zod_1.z.number().int().nonnegative(),
|
|
12
|
+
meta_key: zod_1.z.string().max(255).trim(),
|
|
13
|
+
meta_value: zod_1.z.union([
|
|
14
|
+
zod_1.z.string().trim().nullable(),
|
|
15
|
+
zod_1.z.any().transform((v) => v.toString()),
|
|
16
|
+
]),
|
|
17
|
+
});
|
|
18
|
+
exports.metaInsert = metaInsert;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const postUpsert: z.ZodObject<{
|
|
3
|
+
file: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
4
|
+
ID: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
post_author: z.ZodDefault<z.ZodNumber>;
|
|
6
|
+
post_date: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
7
|
+
post_date_gmt: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
8
|
+
post_content: z.ZodDefault<z.ZodString>;
|
|
9
|
+
post_title: z.ZodDefault<z.ZodString>;
|
|
10
|
+
post_excerpt: z.ZodDefault<z.ZodString>;
|
|
11
|
+
post_status: z.ZodDefault<z.ZodString>;
|
|
12
|
+
comment_status: z.ZodDefault<z.ZodOptional<z.ZodEnum<["open", "closed"]>>>;
|
|
13
|
+
ping_status: z.ZodDefault<z.ZodEnum<["open", "closed"]>>;
|
|
14
|
+
post_password: z.ZodDefault<z.ZodString>;
|
|
15
|
+
post_name: z.ZodDefault<z.ZodString>;
|
|
16
|
+
to_ping: z.ZodDefault<z.ZodString>;
|
|
17
|
+
pinged: z.ZodDefault<z.ZodString>;
|
|
18
|
+
post_modified: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
19
|
+
post_modified_gmt: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
20
|
+
post_content_filtered: z.ZodDefault<z.ZodString>;
|
|
21
|
+
post_parent: z.ZodDefault<z.ZodNumber>;
|
|
22
|
+
guid: z.ZodDefault<z.ZodString>;
|
|
23
|
+
menu_order: z.ZodDefault<z.ZodNumber>;
|
|
24
|
+
post_type: z.ZodDefault<z.ZodString>;
|
|
25
|
+
post_mime_type: z.ZodDefault<z.ZodString>;
|
|
26
|
+
comment_count: z.ZodDefault<z.ZodNumber>;
|
|
27
|
+
import_id: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
28
|
+
post_categeory: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
29
|
+
tags_input: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString]>, "many">]>>>;
|
|
30
|
+
tax_input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">]>>>;
|
|
31
|
+
meta_input: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">, z.ZodRecord<z.ZodString, z.ZodAny>]>>>>;
|
|
32
|
+
context: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
file: string;
|
|
35
|
+
post_author: number;
|
|
36
|
+
post_content: string;
|
|
37
|
+
post_title: string;
|
|
38
|
+
post_excerpt: string;
|
|
39
|
+
post_status: string;
|
|
40
|
+
comment_status: "closed" | "open";
|
|
41
|
+
ping_status: "closed" | "open";
|
|
42
|
+
post_password: string;
|
|
43
|
+
post_name: string;
|
|
44
|
+
to_ping: string;
|
|
45
|
+
pinged: string;
|
|
46
|
+
post_content_filtered: string;
|
|
47
|
+
post_parent: number;
|
|
48
|
+
guid: string;
|
|
49
|
+
menu_order: number;
|
|
50
|
+
post_type: string;
|
|
51
|
+
post_mime_type: string;
|
|
52
|
+
comment_count: number;
|
|
53
|
+
import_id: number;
|
|
54
|
+
tags_input: string[] | number[] | (string | number)[];
|
|
55
|
+
context: string;
|
|
56
|
+
ID?: number | undefined;
|
|
57
|
+
post_date?: string | undefined;
|
|
58
|
+
post_date_gmt?: string | undefined;
|
|
59
|
+
post_modified?: string | undefined;
|
|
60
|
+
post_modified_gmt?: string | undefined;
|
|
61
|
+
post_categeory?: number[] | undefined;
|
|
62
|
+
tax_input?: Record<string, string[] | number[] | (string | number)[]> | undefined;
|
|
63
|
+
meta_input?: Record<string, string | number | (string | number)[] | Record<string, any>> | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
file?: string | undefined;
|
|
66
|
+
ID?: number | undefined;
|
|
67
|
+
post_author?: number | undefined;
|
|
68
|
+
post_date?: unknown;
|
|
69
|
+
post_date_gmt?: unknown;
|
|
70
|
+
post_content?: string | undefined;
|
|
71
|
+
post_title?: string | undefined;
|
|
72
|
+
post_excerpt?: string | undefined;
|
|
73
|
+
post_status?: string | undefined;
|
|
74
|
+
comment_status?: "closed" | "open" | undefined;
|
|
75
|
+
ping_status?: "closed" | "open" | undefined;
|
|
76
|
+
post_password?: string | undefined;
|
|
77
|
+
post_name?: string | undefined;
|
|
78
|
+
to_ping?: string | undefined;
|
|
79
|
+
pinged?: string | undefined;
|
|
80
|
+
post_modified?: unknown;
|
|
81
|
+
post_modified_gmt?: unknown;
|
|
82
|
+
post_content_filtered?: string | undefined;
|
|
83
|
+
post_parent?: number | undefined;
|
|
84
|
+
guid?: string | undefined;
|
|
85
|
+
menu_order?: number | undefined;
|
|
86
|
+
post_type?: string | undefined;
|
|
87
|
+
post_mime_type?: string | undefined;
|
|
88
|
+
comment_count?: number | undefined;
|
|
89
|
+
import_id?: number | undefined;
|
|
90
|
+
post_categeory?: number[] | undefined;
|
|
91
|
+
tags_input?: string[] | number[] | (string | number)[] | undefined;
|
|
92
|
+
tax_input?: Record<string, string[] | number[] | (string | number)[]> | undefined;
|
|
93
|
+
meta_input?: Record<string, string | number | (string | number)[] | Record<string, any>> | undefined;
|
|
94
|
+
context?: string | undefined;
|
|
95
|
+
}>;
|
|
96
|
+
export declare const postInsert: z.ZodObject<Pick<{
|
|
97
|
+
ID: z.ZodNumber;
|
|
98
|
+
post_author: z.ZodDefault<z.ZodNumber>;
|
|
99
|
+
post_date: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
100
|
+
post_date_gmt: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
101
|
+
post_content: z.ZodDefault<z.ZodString>;
|
|
102
|
+
post_title: z.ZodDefault<z.ZodString>;
|
|
103
|
+
post_excerpt: z.ZodDefault<z.ZodString>;
|
|
104
|
+
post_status: z.ZodDefault<z.ZodString>;
|
|
105
|
+
comment_status: z.ZodDefault<z.ZodString>;
|
|
106
|
+
ping_status: z.ZodDefault<z.ZodString>;
|
|
107
|
+
post_password: z.ZodDefault<z.ZodString>;
|
|
108
|
+
post_name: z.ZodDefault<z.ZodString>;
|
|
109
|
+
to_ping: z.ZodDefault<z.ZodString>;
|
|
110
|
+
pinged: z.ZodDefault<z.ZodString>;
|
|
111
|
+
post_modified: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
112
|
+
post_modified_gmt: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
113
|
+
post_content_filtered: z.ZodDefault<z.ZodString>;
|
|
114
|
+
post_parent: z.ZodDefault<z.ZodNumber>;
|
|
115
|
+
guid: z.ZodDefault<z.ZodString>;
|
|
116
|
+
menu_order: z.ZodDefault<z.ZodNumber>;
|
|
117
|
+
post_type: z.ZodDefault<z.ZodString>;
|
|
118
|
+
post_mime_type: z.ZodDefault<z.ZodString>;
|
|
119
|
+
comment_count: z.ZodDefault<z.ZodNumber>;
|
|
120
|
+
}, "post_author" | "post_date" | "post_date_gmt" | "post_content" | "post_title" | "post_excerpt" | "post_status" | "comment_status" | "ping_status" | "post_password" | "post_name" | "to_ping" | "pinged" | "post_modified" | "post_modified_gmt" | "post_content_filtered" | "post_parent" | "guid" | "menu_order" | "post_type" | "post_mime_type">, "strip", z.ZodTypeAny, {
|
|
121
|
+
post_author: number;
|
|
122
|
+
post_content: string;
|
|
123
|
+
post_title: string;
|
|
124
|
+
post_excerpt: string;
|
|
125
|
+
post_status: string;
|
|
126
|
+
comment_status: string;
|
|
127
|
+
ping_status: string;
|
|
128
|
+
post_password: string;
|
|
129
|
+
post_name: string;
|
|
130
|
+
to_ping: string;
|
|
131
|
+
pinged: string;
|
|
132
|
+
post_content_filtered: string;
|
|
133
|
+
post_parent: number;
|
|
134
|
+
guid: string;
|
|
135
|
+
menu_order: number;
|
|
136
|
+
post_type: string;
|
|
137
|
+
post_mime_type: string;
|
|
138
|
+
post_date?: string | undefined;
|
|
139
|
+
post_date_gmt?: string | undefined;
|
|
140
|
+
post_modified?: string | undefined;
|
|
141
|
+
post_modified_gmt?: string | undefined;
|
|
142
|
+
}, {
|
|
143
|
+
post_author?: number | undefined;
|
|
144
|
+
post_date?: unknown;
|
|
145
|
+
post_date_gmt?: unknown;
|
|
146
|
+
post_content?: string | undefined;
|
|
147
|
+
post_title?: string | undefined;
|
|
148
|
+
post_excerpt?: string | undefined;
|
|
149
|
+
post_status?: string | undefined;
|
|
150
|
+
comment_status?: string | undefined;
|
|
151
|
+
ping_status?: string | undefined;
|
|
152
|
+
post_password?: string | undefined;
|
|
153
|
+
post_name?: string | undefined;
|
|
154
|
+
to_ping?: string | undefined;
|
|
155
|
+
pinged?: string | undefined;
|
|
156
|
+
post_modified?: unknown;
|
|
157
|
+
post_modified_gmt?: unknown;
|
|
158
|
+
post_content_filtered?: string | undefined;
|
|
159
|
+
post_parent?: number | undefined;
|
|
160
|
+
guid?: string | undefined;
|
|
161
|
+
menu_order?: number | undefined;
|
|
162
|
+
post_type?: string | undefined;
|
|
163
|
+
post_mime_type?: string | undefined;
|
|
164
|
+
}>;
|
|
165
|
+
export declare const postUpdate: z.ZodObject<Pick<{
|
|
166
|
+
ID: z.ZodNumber;
|
|
167
|
+
post_author: z.ZodDefault<z.ZodNumber>;
|
|
168
|
+
post_date: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
169
|
+
post_date_gmt: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
170
|
+
post_content: z.ZodDefault<z.ZodString>;
|
|
171
|
+
post_title: z.ZodDefault<z.ZodString>;
|
|
172
|
+
post_excerpt: z.ZodDefault<z.ZodString>;
|
|
173
|
+
post_status: z.ZodDefault<z.ZodString>;
|
|
174
|
+
comment_status: z.ZodDefault<z.ZodString>;
|
|
175
|
+
ping_status: z.ZodDefault<z.ZodString>;
|
|
176
|
+
post_password: z.ZodDefault<z.ZodString>;
|
|
177
|
+
post_name: z.ZodDefault<z.ZodString>;
|
|
178
|
+
to_ping: z.ZodDefault<z.ZodString>;
|
|
179
|
+
pinged: z.ZodDefault<z.ZodString>;
|
|
180
|
+
post_modified: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
181
|
+
post_modified_gmt: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
182
|
+
post_content_filtered: z.ZodDefault<z.ZodString>;
|
|
183
|
+
post_parent: z.ZodDefault<z.ZodNumber>;
|
|
184
|
+
guid: z.ZodDefault<z.ZodString>;
|
|
185
|
+
menu_order: z.ZodDefault<z.ZodNumber>;
|
|
186
|
+
post_type: z.ZodDefault<z.ZodString>;
|
|
187
|
+
post_mime_type: z.ZodDefault<z.ZodString>;
|
|
188
|
+
comment_count: z.ZodDefault<z.ZodNumber>;
|
|
189
|
+
}, "post_author" | "post_date" | "post_date_gmt" | "post_content" | "post_title" | "post_excerpt" | "post_status" | "comment_status" | "ping_status" | "post_password" | "post_name" | "to_ping" | "pinged" | "post_modified" | "post_modified_gmt" | "post_content_filtered" | "post_parent" | "guid" | "menu_order" | "post_type" | "post_mime_type">, "strip", z.ZodTypeAny, {
|
|
190
|
+
post_author: number;
|
|
191
|
+
post_content: string;
|
|
192
|
+
post_title: string;
|
|
193
|
+
post_excerpt: string;
|
|
194
|
+
post_status: string;
|
|
195
|
+
comment_status: string;
|
|
196
|
+
ping_status: string;
|
|
197
|
+
post_password: string;
|
|
198
|
+
post_name: string;
|
|
199
|
+
to_ping: string;
|
|
200
|
+
pinged: string;
|
|
201
|
+
post_content_filtered: string;
|
|
202
|
+
post_parent: number;
|
|
203
|
+
guid: string;
|
|
204
|
+
menu_order: number;
|
|
205
|
+
post_type: string;
|
|
206
|
+
post_mime_type: string;
|
|
207
|
+
post_date?: string | undefined;
|
|
208
|
+
post_date_gmt?: string | undefined;
|
|
209
|
+
post_modified?: string | undefined;
|
|
210
|
+
post_modified_gmt?: string | undefined;
|
|
211
|
+
}, {
|
|
212
|
+
post_author?: number | undefined;
|
|
213
|
+
post_date?: unknown;
|
|
214
|
+
post_date_gmt?: unknown;
|
|
215
|
+
post_content?: string | undefined;
|
|
216
|
+
post_title?: string | undefined;
|
|
217
|
+
post_excerpt?: string | undefined;
|
|
218
|
+
post_status?: string | undefined;
|
|
219
|
+
comment_status?: string | undefined;
|
|
220
|
+
ping_status?: string | undefined;
|
|
221
|
+
post_password?: string | undefined;
|
|
222
|
+
post_name?: string | undefined;
|
|
223
|
+
to_ping?: string | undefined;
|
|
224
|
+
pinged?: string | undefined;
|
|
225
|
+
post_modified?: unknown;
|
|
226
|
+
post_modified_gmt?: unknown;
|
|
227
|
+
post_content_filtered?: string | undefined;
|
|
228
|
+
post_parent?: number | undefined;
|
|
229
|
+
guid?: string | undefined;
|
|
230
|
+
menu_order?: number | undefined;
|
|
231
|
+
post_type?: string | undefined;
|
|
232
|
+
post_mime_type?: string | undefined;
|
|
233
|
+
}>;
|
|
234
|
+
//# sourceMappingURL=post.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post.d.ts","sourceRoot":"","sources":["../../../src/validators/transactions/post.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCnB,CAAC;AAEL,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBrB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAa,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
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 __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.postUpdate = exports.postInsert = exports.postUpsert = void 0;
|
|
37
|
+
const zod_1 = require("zod");
|
|
38
|
+
const database = __importStar(require("../database"));
|
|
39
|
+
const metaValue = zod_1.z.union([
|
|
40
|
+
zod_1.z.string(),
|
|
41
|
+
zod_1.z.number(),
|
|
42
|
+
zod_1.z.array(zod_1.z.union([zod_1.z.string(), zod_1.z.number()])),
|
|
43
|
+
zod_1.z.record(zod_1.z.any()),
|
|
44
|
+
]);
|
|
45
|
+
exports.postUpsert = database.wpPosts
|
|
46
|
+
.merge(zod_1.z.object({
|
|
47
|
+
ID: zod_1.z.number().nonnegative().optional(),
|
|
48
|
+
import_id: zod_1.z.number().nonnegative().optional().default(0),
|
|
49
|
+
post_status: zod_1.z.string().default("draft"),
|
|
50
|
+
post_categeory: zod_1.z.array(zod_1.z.number()).optional(),
|
|
51
|
+
comment_status: zod_1.z.enum(["open", "closed"]).optional().default("open"),
|
|
52
|
+
ping_status: zod_1.z.enum(["open", "closed"]).default("open"),
|
|
53
|
+
tags_input: zod_1.z
|
|
54
|
+
.union([
|
|
55
|
+
zod_1.z.array(zod_1.z.number()),
|
|
56
|
+
zod_1.z.array(zod_1.z.string().trim()),
|
|
57
|
+
zod_1.z.array(zod_1.z.union([zod_1.z.number(), zod_1.z.string().trim()])),
|
|
58
|
+
])
|
|
59
|
+
.optional()
|
|
60
|
+
.default([]),
|
|
61
|
+
tax_input: zod_1.z
|
|
62
|
+
.record(zod_1.z.string(), zod_1.z.union([
|
|
63
|
+
zod_1.z.array(zod_1.z.string()), // For non-hierarchical taxonomy (names or slugs)
|
|
64
|
+
zod_1.z.array(zod_1.z.number()), // For hierarchical taxonomy (term IDs)
|
|
65
|
+
zod_1.z.array(zod_1.z.union([zod_1.z.string(), zod_1.z.number()])),
|
|
66
|
+
//z.string(), // For non-hierarchical taxonomy (comma-separated string of names or slugs)
|
|
67
|
+
//z.string(), // For hierarchical taxonomy (comma-separated string of IDs)
|
|
68
|
+
]))
|
|
69
|
+
.optional(),
|
|
70
|
+
meta_input: zod_1.z.record(metaValue).default({}).optional(),
|
|
71
|
+
file: zod_1.z.string().optional().default(""),
|
|
72
|
+
context: zod_1.z.string().optional().default(""),
|
|
73
|
+
}))
|
|
74
|
+
.required({
|
|
75
|
+
post_author: true,
|
|
76
|
+
});
|
|
77
|
+
exports.postInsert = database.wpPosts.pick({
|
|
78
|
+
post_author: true,
|
|
79
|
+
post_date: true,
|
|
80
|
+
post_date_gmt: true,
|
|
81
|
+
post_content: true,
|
|
82
|
+
post_content_filtered: true,
|
|
83
|
+
post_title: true,
|
|
84
|
+
post_excerpt: true,
|
|
85
|
+
post_status: true,
|
|
86
|
+
post_type: true,
|
|
87
|
+
comment_status: true,
|
|
88
|
+
ping_status: true,
|
|
89
|
+
post_password: true,
|
|
90
|
+
post_name: true,
|
|
91
|
+
to_ping: true,
|
|
92
|
+
pinged: true,
|
|
93
|
+
post_modified: true,
|
|
94
|
+
post_modified_gmt: true,
|
|
95
|
+
post_parent: true,
|
|
96
|
+
menu_order: true,
|
|
97
|
+
post_mime_type: true,
|
|
98
|
+
guid: true,
|
|
99
|
+
});
|
|
100
|
+
exports.postUpdate = exports.postInsert;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const rolesUpsert: z.ZodObject<{
|
|
3
|
+
name: z.ZodOptional<z.ZodString>;
|
|
4
|
+
role: z.ZodEffects<z.ZodString, string, string>;
|
|
5
|
+
new_role: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
6
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
role: string;
|
|
9
|
+
name?: string | undefined;
|
|
10
|
+
capabilities?: string[] | undefined;
|
|
11
|
+
new_role?: string | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
role: string;
|
|
14
|
+
name?: string | undefined;
|
|
15
|
+
capabilities?: string[] | undefined;
|
|
16
|
+
new_role?: string | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
//# sourceMappingURL=roles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../../src/validators/transactions/roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;EAKtB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rolesUpsert = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const roleString = zod_1.z
|
|
6
|
+
.string()
|
|
7
|
+
.refine((v) => v.match(/^[a-z0-9]+[a-z0-9_]*[a-z0-9]+$/));
|
|
8
|
+
exports.rolesUpsert = zod_1.z.object({
|
|
9
|
+
name: zod_1.z.string().optional(),
|
|
10
|
+
role: roleString,
|
|
11
|
+
new_role: roleString.optional(),
|
|
12
|
+
capabilities: zod_1.z.array(roleString).optional(),
|
|
13
|
+
});
|