@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,35 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const signupInsert: z.ZodObject<Pick<{
|
|
3
|
+
signup_id: z.ZodNumber;
|
|
4
|
+
domain: z.ZodDefault<z.ZodString>;
|
|
5
|
+
path: z.ZodDefault<z.ZodString>;
|
|
6
|
+
title: z.ZodString;
|
|
7
|
+
user_login: z.ZodDefault<z.ZodString>;
|
|
8
|
+
user_email: z.ZodDefault<z.ZodString>;
|
|
9
|
+
registered: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
10
|
+
activated: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
11
|
+
active: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
activation_key: z.ZodDefault<z.ZodString>;
|
|
13
|
+
meta: z.ZodEffects<z.ZodNullable<z.ZodString>, string | number | bigint | boolean | symbol | object | Function | null | undefined, string | null>;
|
|
14
|
+
}, "title" | "path" | "domain" | "registered" | "user_login" | "user_email" | "activation_key"> & {
|
|
15
|
+
meta: z.ZodDefault<z.ZodString>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
meta: string;
|
|
18
|
+
title: string;
|
|
19
|
+
path: string;
|
|
20
|
+
domain: string;
|
|
21
|
+
user_login: string;
|
|
22
|
+
user_email: string;
|
|
23
|
+
activation_key: string;
|
|
24
|
+
registered?: string | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
title: string;
|
|
27
|
+
meta?: string | undefined;
|
|
28
|
+
path?: string | undefined;
|
|
29
|
+
domain?: string | undefined;
|
|
30
|
+
registered?: unknown;
|
|
31
|
+
user_login?: string | undefined;
|
|
32
|
+
user_email?: string | undefined;
|
|
33
|
+
activation_key?: string | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
//# sourceMappingURL=signup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signup.d.ts","sourceRoot":"","sources":["../../../src/validators/transactions/signup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EActB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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.signupInsert = void 0;
|
|
37
|
+
const zod_1 = require("zod");
|
|
38
|
+
const database = __importStar(require("../database"));
|
|
39
|
+
exports.signupInsert = database.wpSignups
|
|
40
|
+
.pick({
|
|
41
|
+
domain: true,
|
|
42
|
+
path: true,
|
|
43
|
+
title: true,
|
|
44
|
+
user_login: true,
|
|
45
|
+
user_email: true,
|
|
46
|
+
activation_key: true,
|
|
47
|
+
registered: true,
|
|
48
|
+
})
|
|
49
|
+
.merge(zod_1.z.object({
|
|
50
|
+
meta: zod_1.z.string().default(""),
|
|
51
|
+
}));
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const siteUpsert: z.ZodObject<Omit<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
domain: z.ZodDefault<z.ZodString>;
|
|
5
|
+
path: z.ZodDefault<z.ZodString>;
|
|
6
|
+
}, "id"> & {
|
|
7
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
meta_input: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
path: string;
|
|
11
|
+
domain: string;
|
|
12
|
+
meta_input: Record<string, any>;
|
|
13
|
+
id?: number | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
id?: number | undefined;
|
|
16
|
+
path?: string | undefined;
|
|
17
|
+
domain?: string | undefined;
|
|
18
|
+
meta_input?: Record<string, any> | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const siteInsert: z.ZodObject<Omit<Omit<{
|
|
21
|
+
id: z.ZodNumber;
|
|
22
|
+
domain: z.ZodDefault<z.ZodString>;
|
|
23
|
+
path: z.ZodDefault<z.ZodString>;
|
|
24
|
+
}, "id"> & {
|
|
25
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
meta_input: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
27
|
+
}, "meta_input">, "strip", z.ZodTypeAny, {
|
|
28
|
+
path: string;
|
|
29
|
+
domain: string;
|
|
30
|
+
id?: number | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
id?: number | undefined;
|
|
33
|
+
path?: string | undefined;
|
|
34
|
+
domain?: string | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
//# sourceMappingURL=site.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site.d.ts","sourceRoot":"","sources":["../../../src/validators/transactions/site.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;EASpB,CAAC;AAEJ,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;EAErB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.siteInsert = exports.siteUpsert = void 0;
|
|
37
|
+
const zod_1 = require("zod");
|
|
38
|
+
const database = __importStar(require("../database"));
|
|
39
|
+
exports.siteUpsert = database.wpSite
|
|
40
|
+
.omit({
|
|
41
|
+
id: true,
|
|
42
|
+
})
|
|
43
|
+
.merge(zod_1.z.object({
|
|
44
|
+
id: zod_1.z.number().optional(),
|
|
45
|
+
meta_input: zod_1.z.record(zod_1.z.any()).optional().default({}),
|
|
46
|
+
}));
|
|
47
|
+
exports.siteInsert = exports.siteUpsert.omit({
|
|
48
|
+
meta_input: true,
|
|
49
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare const termUpdate: import("zod").ZodObject<Omit<{
|
|
2
|
+
name: import("zod").ZodString;
|
|
3
|
+
slug: import("zod").ZodEffects<import("zod").ZodString, string, string>;
|
|
4
|
+
term_group: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
5
|
+
} & {
|
|
6
|
+
term_taxonomy_id: import("zod").ZodNumber;
|
|
7
|
+
term_id: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
8
|
+
taxonomy: import("zod").ZodDefault<import("zod").ZodString>;
|
|
9
|
+
description: import("zod").ZodDefault<import("zod").ZodString>;
|
|
10
|
+
parent: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
11
|
+
count: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
12
|
+
}, "count">, "strip", import("zod").ZodTypeAny, {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
parent: number;
|
|
16
|
+
taxonomy: string;
|
|
17
|
+
term_id: number;
|
|
18
|
+
term_taxonomy_id: number;
|
|
19
|
+
slug: string;
|
|
20
|
+
term_group: number;
|
|
21
|
+
}, {
|
|
22
|
+
name: string;
|
|
23
|
+
term_taxonomy_id: number;
|
|
24
|
+
slug: string;
|
|
25
|
+
description?: string | undefined;
|
|
26
|
+
parent?: number | undefined;
|
|
27
|
+
taxonomy?: string | undefined;
|
|
28
|
+
term_id?: number | undefined;
|
|
29
|
+
term_group?: number | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const termInsert: import("zod").ZodObject<Omit<Omit<{
|
|
32
|
+
name: import("zod").ZodString;
|
|
33
|
+
slug: import("zod").ZodEffects<import("zod").ZodString, string, string>;
|
|
34
|
+
term_group: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
35
|
+
} & {
|
|
36
|
+
term_taxonomy_id: import("zod").ZodNumber;
|
|
37
|
+
term_id: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
38
|
+
taxonomy: import("zod").ZodDefault<import("zod").ZodString>;
|
|
39
|
+
description: import("zod").ZodDefault<import("zod").ZodString>;
|
|
40
|
+
parent: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
41
|
+
count: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
42
|
+
}, "count">, "term_id" | "term_taxonomy_id">, "strip", import("zod").ZodTypeAny, {
|
|
43
|
+
name: string;
|
|
44
|
+
description: string;
|
|
45
|
+
parent: number;
|
|
46
|
+
taxonomy: string;
|
|
47
|
+
slug: string;
|
|
48
|
+
term_group: number;
|
|
49
|
+
}, {
|
|
50
|
+
name: string;
|
|
51
|
+
slug: string;
|
|
52
|
+
description?: string | undefined;
|
|
53
|
+
parent?: number | undefined;
|
|
54
|
+
taxonomy?: string | undefined;
|
|
55
|
+
term_group?: number | undefined;
|
|
56
|
+
}>;
|
|
57
|
+
//# sourceMappingURL=term.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"term.d.ts","sourceRoot":"","sources":["../../../src/validators/transactions/term.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEC,CAAC;AAEzB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;EAGrB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.termInsert = exports.termUpdate = void 0;
|
|
37
|
+
const database = __importStar(require("../database"));
|
|
38
|
+
exports.termUpdate = database.wpTerms
|
|
39
|
+
.merge(database.wpTermTaxonomy)
|
|
40
|
+
.omit({ count: true });
|
|
41
|
+
exports.termInsert = exports.termUpdate.omit({
|
|
42
|
+
term_id: true,
|
|
43
|
+
term_taxonomy_id: true,
|
|
44
|
+
});
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const userUpsertMeta: z.ZodObject<{
|
|
3
|
+
nickname: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodAny, string, any>>>;
|
|
4
|
+
first_name: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodAny, string, any>>>;
|
|
5
|
+
last_name: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodAny, string, any>>>;
|
|
6
|
+
description: z.ZodDefault<z.ZodEffects<z.ZodAny, string, any>>;
|
|
7
|
+
rich_editing: z.ZodUnion<[z.ZodEffects<z.ZodBoolean, "false" | "true", boolean>, z.ZodDefault<z.ZodEnum<["true", "false"]>>, z.ZodNumber]>;
|
|
8
|
+
syntax_highlighting: z.ZodUnion<[z.ZodEffects<z.ZodBoolean, "false" | "true", boolean>, z.ZodDefault<z.ZodEnum<["true", "false"]>>, z.ZodNumber]>;
|
|
9
|
+
comment_shortcuts: z.ZodUnion<[z.ZodEffects<z.ZodBoolean, "false" | "true", boolean>, z.ZodDefault<z.ZodEnum<["true", "false"]>>, z.ZodNumber]>;
|
|
10
|
+
admin_color: z.ZodDefault<z.ZodEffects<z.ZodAny, string, any>>;
|
|
11
|
+
use_ssl: z.ZodUnion<[z.ZodDefault<z.ZodOptional<z.ZodEnum<["0", "1"]>>>, z.ZodEffects<z.ZodEffects<z.ZodNumber, 0 | 1, number>, string, number>, z.ZodEffects<z.ZodBoolean, "0" | "1", boolean>]>;
|
|
12
|
+
show_admin_bar_front: z.ZodUnion<[z.ZodEffects<z.ZodBoolean, "false" | "true", boolean>, z.ZodDefault<z.ZodEnum<["true", "false"]>>, z.ZodNumber]>;
|
|
13
|
+
locale: z.ZodOptional<z.ZodEffects<z.ZodAny, string, any>>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
description: string;
|
|
16
|
+
nickname: string;
|
|
17
|
+
first_name: string;
|
|
18
|
+
last_name: string;
|
|
19
|
+
rich_editing: number | "false" | "true";
|
|
20
|
+
syntax_highlighting: number | "false" | "true";
|
|
21
|
+
comment_shortcuts: number | "false" | "true";
|
|
22
|
+
admin_color: string;
|
|
23
|
+
use_ssl: string;
|
|
24
|
+
show_admin_bar_front: number | "false" | "true";
|
|
25
|
+
locale?: string | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
description?: any;
|
|
28
|
+
nickname?: any;
|
|
29
|
+
first_name?: any;
|
|
30
|
+
last_name?: any;
|
|
31
|
+
rich_editing?: number | boolean | "false" | "true" | undefined;
|
|
32
|
+
syntax_highlighting?: number | boolean | "false" | "true" | undefined;
|
|
33
|
+
comment_shortcuts?: number | boolean | "false" | "true" | undefined;
|
|
34
|
+
admin_color?: any;
|
|
35
|
+
use_ssl?: number | boolean | "0" | "1" | undefined;
|
|
36
|
+
show_admin_bar_front?: number | boolean | "false" | "true" | undefined;
|
|
37
|
+
locale?: any;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const userLogin: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
|
|
40
|
+
export declare const userUpsert: z.ZodObject<{
|
|
41
|
+
user_pass: z.ZodDefault<z.ZodString>;
|
|
42
|
+
user_nicename: z.ZodDefault<z.ZodString>;
|
|
43
|
+
user_email: z.ZodDefault<z.ZodString>;
|
|
44
|
+
user_url: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodOptional<z.ZodString>]>;
|
|
45
|
+
user_activation_key: z.ZodDefault<z.ZodString>;
|
|
46
|
+
user_status: z.ZodDefault<z.ZodNumber>;
|
|
47
|
+
display_name: z.ZodDefault<z.ZodString>;
|
|
48
|
+
spam: z.ZodDefault<z.ZodNumber>;
|
|
49
|
+
deleted: z.ZodDefault<z.ZodNumber>;
|
|
50
|
+
} & {
|
|
51
|
+
ID: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
user_login: z.ZodString;
|
|
53
|
+
user_registered: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
54
|
+
role: z.ZodUnion<[z.ZodDefault<z.ZodOptional<z.ZodEnum<["superadmin", "administrator", "editor", "author", "contributor", "subscriber", "anonymous"]>>>, z.ZodOptional<z.ZodArray<z.ZodEnum<["superadmin", "administrator", "editor", "author", "contributor", "subscriber", "anonymous"]>, "many">>, z.ZodOptional<z.ZodArray<z.ZodString, "many">>]>;
|
|
55
|
+
meta_input: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
56
|
+
nickname: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodAny, string, any>>>;
|
|
57
|
+
first_name: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodAny, string, any>>>;
|
|
58
|
+
last_name: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodAny, string, any>>>;
|
|
59
|
+
description: z.ZodDefault<z.ZodEffects<z.ZodAny, string, any>>;
|
|
60
|
+
rich_editing: z.ZodUnion<[z.ZodEffects<z.ZodBoolean, "false" | "true", boolean>, z.ZodDefault<z.ZodEnum<["true", "false"]>>, z.ZodNumber]>;
|
|
61
|
+
syntax_highlighting: z.ZodUnion<[z.ZodEffects<z.ZodBoolean, "false" | "true", boolean>, z.ZodDefault<z.ZodEnum<["true", "false"]>>, z.ZodNumber]>;
|
|
62
|
+
comment_shortcuts: z.ZodUnion<[z.ZodEffects<z.ZodBoolean, "false" | "true", boolean>, z.ZodDefault<z.ZodEnum<["true", "false"]>>, z.ZodNumber]>;
|
|
63
|
+
admin_color: z.ZodDefault<z.ZodEffects<z.ZodAny, string, any>>;
|
|
64
|
+
use_ssl: z.ZodUnion<[z.ZodDefault<z.ZodOptional<z.ZodEnum<["0", "1"]>>>, z.ZodEffects<z.ZodEffects<z.ZodNumber, 0 | 1, number>, string, number>, z.ZodEffects<z.ZodBoolean, "0" | "1", boolean>]>;
|
|
65
|
+
show_admin_bar_front: z.ZodUnion<[z.ZodEffects<z.ZodBoolean, "false" | "true", boolean>, z.ZodDefault<z.ZodEnum<["true", "false"]>>, z.ZodNumber]>;
|
|
66
|
+
locale: z.ZodOptional<z.ZodEffects<z.ZodAny, string, any>>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
description: string;
|
|
69
|
+
spam: number;
|
|
70
|
+
deleted: number;
|
|
71
|
+
user_login: string;
|
|
72
|
+
user_email: string;
|
|
73
|
+
user_pass: string;
|
|
74
|
+
user_nicename: string;
|
|
75
|
+
user_activation_key: string;
|
|
76
|
+
user_status: number;
|
|
77
|
+
display_name: string;
|
|
78
|
+
meta_input: Record<string, any>;
|
|
79
|
+
nickname: string;
|
|
80
|
+
first_name: string;
|
|
81
|
+
last_name: string;
|
|
82
|
+
rich_editing: number | "false" | "true";
|
|
83
|
+
syntax_highlighting: number | "false" | "true";
|
|
84
|
+
comment_shortcuts: number | "false" | "true";
|
|
85
|
+
admin_color: string;
|
|
86
|
+
use_ssl: string;
|
|
87
|
+
show_admin_bar_front: number | "false" | "true";
|
|
88
|
+
role?: string[] | "editor" | "author" | "superadmin" | "administrator" | "contributor" | "subscriber" | "anonymous" | ("editor" | "author" | "superadmin" | "administrator" | "contributor" | "subscriber" | "anonymous")[] | undefined;
|
|
89
|
+
ID?: number | undefined;
|
|
90
|
+
user_url?: string | undefined;
|
|
91
|
+
user_registered?: string | undefined;
|
|
92
|
+
locale?: string | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
user_login: string;
|
|
95
|
+
role?: string[] | "editor" | "author" | "superadmin" | "administrator" | "contributor" | "subscriber" | "anonymous" | ("editor" | "author" | "superadmin" | "administrator" | "contributor" | "subscriber" | "anonymous")[] | undefined;
|
|
96
|
+
description?: any;
|
|
97
|
+
spam?: number | undefined;
|
|
98
|
+
deleted?: number | undefined;
|
|
99
|
+
ID?: number | undefined;
|
|
100
|
+
user_email?: string | undefined;
|
|
101
|
+
user_pass?: string | undefined;
|
|
102
|
+
user_nicename?: string | undefined;
|
|
103
|
+
user_url?: string | undefined;
|
|
104
|
+
user_registered?: unknown;
|
|
105
|
+
user_activation_key?: string | undefined;
|
|
106
|
+
user_status?: number | undefined;
|
|
107
|
+
display_name?: string | undefined;
|
|
108
|
+
meta_input?: Record<string, any> | undefined;
|
|
109
|
+
nickname?: any;
|
|
110
|
+
first_name?: any;
|
|
111
|
+
last_name?: any;
|
|
112
|
+
rich_editing?: number | boolean | "false" | "true" | undefined;
|
|
113
|
+
syntax_highlighting?: number | boolean | "false" | "true" | undefined;
|
|
114
|
+
comment_shortcuts?: number | boolean | "false" | "true" | undefined;
|
|
115
|
+
admin_color?: any;
|
|
116
|
+
use_ssl?: number | boolean | "0" | "1" | undefined;
|
|
117
|
+
show_admin_bar_front?: number | boolean | "false" | "true" | undefined;
|
|
118
|
+
locale?: any;
|
|
119
|
+
}>;
|
|
120
|
+
export declare const userInsert: z.ZodObject<Pick<{
|
|
121
|
+
ID: z.ZodNumber;
|
|
122
|
+
user_login: z.ZodDefault<z.ZodString>;
|
|
123
|
+
user_pass: z.ZodDefault<z.ZodString>;
|
|
124
|
+
user_nicename: z.ZodDefault<z.ZodString>;
|
|
125
|
+
user_email: z.ZodDefault<z.ZodString>;
|
|
126
|
+
user_url: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodOptional<z.ZodString>]>;
|
|
127
|
+
user_registered: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
128
|
+
user_activation_key: z.ZodDefault<z.ZodString>;
|
|
129
|
+
user_status: z.ZodDefault<z.ZodNumber>;
|
|
130
|
+
display_name: z.ZodDefault<z.ZodString>;
|
|
131
|
+
spam: z.ZodDefault<z.ZodNumber>;
|
|
132
|
+
deleted: z.ZodDefault<z.ZodNumber>;
|
|
133
|
+
}, "user_login" | "user_email" | "user_pass" | "user_nicename" | "user_url" | "user_registered" | "user_activation_key" | "display_name">, "strip", z.ZodTypeAny, {
|
|
134
|
+
user_login: string;
|
|
135
|
+
user_email: string;
|
|
136
|
+
user_pass: string;
|
|
137
|
+
user_nicename: string;
|
|
138
|
+
user_activation_key: string;
|
|
139
|
+
display_name: string;
|
|
140
|
+
user_url?: string | undefined;
|
|
141
|
+
user_registered?: string | undefined;
|
|
142
|
+
}, {
|
|
143
|
+
user_login?: string | undefined;
|
|
144
|
+
user_email?: string | undefined;
|
|
145
|
+
user_pass?: string | undefined;
|
|
146
|
+
user_nicename?: string | undefined;
|
|
147
|
+
user_url?: string | undefined;
|
|
148
|
+
user_registered?: unknown;
|
|
149
|
+
user_activation_key?: string | undefined;
|
|
150
|
+
display_name?: string | undefined;
|
|
151
|
+
}>;
|
|
152
|
+
export declare const userUpdate: z.ZodObject<Omit<Pick<{
|
|
153
|
+
ID: z.ZodNumber;
|
|
154
|
+
user_login: z.ZodDefault<z.ZodString>;
|
|
155
|
+
user_pass: z.ZodDefault<z.ZodString>;
|
|
156
|
+
user_nicename: z.ZodDefault<z.ZodString>;
|
|
157
|
+
user_email: z.ZodDefault<z.ZodString>;
|
|
158
|
+
user_url: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodOptional<z.ZodString>]>;
|
|
159
|
+
user_registered: z.ZodUnion<[z.ZodDefault<z.ZodString>, z.ZodUndefined, z.ZodEffects<z.ZodUnknown, undefined, unknown>]>;
|
|
160
|
+
user_activation_key: z.ZodDefault<z.ZodString>;
|
|
161
|
+
user_status: z.ZodDefault<z.ZodNumber>;
|
|
162
|
+
display_name: z.ZodDefault<z.ZodString>;
|
|
163
|
+
spam: z.ZodDefault<z.ZodNumber>;
|
|
164
|
+
deleted: z.ZodDefault<z.ZodNumber>;
|
|
165
|
+
}, "user_login" | "user_email" | "user_pass" | "user_nicename" | "user_url" | "user_registered" | "user_activation_key" | "display_name">, "user_login">, "strip", z.ZodTypeAny, {
|
|
166
|
+
user_email: string;
|
|
167
|
+
user_pass: string;
|
|
168
|
+
user_nicename: string;
|
|
169
|
+
user_activation_key: string;
|
|
170
|
+
display_name: string;
|
|
171
|
+
user_url?: string | undefined;
|
|
172
|
+
user_registered?: string | undefined;
|
|
173
|
+
}, {
|
|
174
|
+
user_email?: string | undefined;
|
|
175
|
+
user_pass?: string | undefined;
|
|
176
|
+
user_nicename?: string | undefined;
|
|
177
|
+
user_url?: string | undefined;
|
|
178
|
+
user_registered?: unknown;
|
|
179
|
+
user_activation_key?: string | undefined;
|
|
180
|
+
display_name?: string | undefined;
|
|
181
|
+
}>;
|
|
182
|
+
//# sourceMappingURL=user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/validators/transactions/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYzB,CAAC;AAcH,eAAO,MAAM,SAAS,uGASoC,CAAC;AAE3D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBtB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASrB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAErB,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
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.userUpdate = exports.userInsert = exports.userUpsert = exports.userLogin = exports.userUpsertMeta = void 0;
|
|
37
|
+
const zod_1 = require("zod");
|
|
38
|
+
const database = __importStar(require("../database"));
|
|
39
|
+
const constants_1 = require("../../constants");
|
|
40
|
+
const helpers_1 = require("../helpers");
|
|
41
|
+
const date_1 = require("../date");
|
|
42
|
+
exports.userUpsertMeta = zod_1.z.object({
|
|
43
|
+
nickname: helpers_1.string.optional().default(""),
|
|
44
|
+
first_name: helpers_1.string.optional().default(""),
|
|
45
|
+
last_name: helpers_1.string.optional().default(""),
|
|
46
|
+
description: helpers_1.string.default(""),
|
|
47
|
+
rich_editing: (0, helpers_1.booleanWithDefault)("true"),
|
|
48
|
+
syntax_highlighting: (0, helpers_1.booleanWithDefault)("true"),
|
|
49
|
+
comment_shortcuts: (0, helpers_1.booleanWithDefault)("false"),
|
|
50
|
+
admin_color: helpers_1.string.default("fresh"),
|
|
51
|
+
use_ssl: helpers_1.stringZeroOrOne,
|
|
52
|
+
show_admin_bar_front: (0, helpers_1.booleanWithDefault)("true"),
|
|
53
|
+
locale: helpers_1.string.optional(),
|
|
54
|
+
});
|
|
55
|
+
// Define the forbidden words
|
|
56
|
+
const forbiddenUserLogins = [
|
|
57
|
+
"www",
|
|
58
|
+
"web",
|
|
59
|
+
"root",
|
|
60
|
+
"admin",
|
|
61
|
+
"main",
|
|
62
|
+
"invite",
|
|
63
|
+
"administrator",
|
|
64
|
+
];
|
|
65
|
+
// Apply when creating a new user
|
|
66
|
+
exports.userLogin = zod_1.z
|
|
67
|
+
.string()
|
|
68
|
+
.min(4)
|
|
69
|
+
.max(60)
|
|
70
|
+
.trim()
|
|
71
|
+
.toLowerCase()
|
|
72
|
+
.regex(/^[a-z0-9_-]*$/)
|
|
73
|
+
.refine((value) => /[a-z_-]/.test(value))
|
|
74
|
+
.refine((value) => !/^[-0-9]*$/.test(value))
|
|
75
|
+
.refine((value) => !forbiddenUserLogins.includes(value));
|
|
76
|
+
exports.userUpsert = database.wpUsers.merge(zod_1.z
|
|
77
|
+
.object({
|
|
78
|
+
ID: zod_1.z.number().int().nonnegative().optional(),
|
|
79
|
+
user_login: zod_1.z.string(),
|
|
80
|
+
user_registered: date_1.mySQLDate, //z.union([z.string(), z.date(), z.undefined()]),
|
|
81
|
+
role: zod_1.z.union([
|
|
82
|
+
zod_1.z
|
|
83
|
+
.enum([...constants_1.ROLE_NAMES])
|
|
84
|
+
.optional()
|
|
85
|
+
.default("subscriber"),
|
|
86
|
+
zod_1.z.array(zod_1.z.enum([...constants_1.ROLE_NAMES])).optional(),
|
|
87
|
+
zod_1.z.array(zod_1.z.string()).optional(),
|
|
88
|
+
]),
|
|
89
|
+
meta_input: zod_1.z.record(zod_1.z.any()).optional().default({}),
|
|
90
|
+
})
|
|
91
|
+
.merge(exports.userUpsertMeta));
|
|
92
|
+
exports.userInsert = database.wpUsers.pick({
|
|
93
|
+
user_pass: true,
|
|
94
|
+
user_login: true,
|
|
95
|
+
user_nicename: true,
|
|
96
|
+
user_email: true,
|
|
97
|
+
user_url: true,
|
|
98
|
+
user_registered: true,
|
|
99
|
+
user_activation_key: true,
|
|
100
|
+
display_name: true,
|
|
101
|
+
});
|
|
102
|
+
exports.userUpdate = exports.userInsert.omit({
|
|
103
|
+
user_login: true,
|
|
104
|
+
});
|