@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,527 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.users = exports.userMeta = exports.termTaxonomy = exports.termRelationships = exports.terms = exports.termMeta = exports.siteMeta = exports.site = exports.signups = exports.registrationLog = exports.posts = exports.postMeta = exports.options = exports.links = exports.comments = exports.commentMeta = exports.blogs = exports.blogMeta = void 0;
|
|
4
|
+
const collate = "utf8mb4_unicode_520_ci";
|
|
5
|
+
exports.blogMeta = {
|
|
6
|
+
name: "blogmeta",
|
|
7
|
+
columns: (table) => ({
|
|
8
|
+
meta_id: table.bigIncrements("meta_id").unsigned().notNullable().primary(),
|
|
9
|
+
blog_id: table.bigint("blog_id").notNullable().defaultTo(0),
|
|
10
|
+
meta_key: table.string("meta_key", 255).collate(collate),
|
|
11
|
+
meta_value: table.text("meta_value", "longtext").collate(collate),
|
|
12
|
+
}),
|
|
13
|
+
indexes: (table, columns) => {
|
|
14
|
+
columns.includes("blog_id") && table.index(["blog_id"], "blog_id");
|
|
15
|
+
},
|
|
16
|
+
raw: (builder, tables, columns) => columns.includes("meta_key") &&
|
|
17
|
+
builder("ALTER TABLE ?? ADD KEY ?? (??(191))", [
|
|
18
|
+
tables.get("blogmeta"),
|
|
19
|
+
"meta_key",
|
|
20
|
+
"meta_key",
|
|
21
|
+
]),
|
|
22
|
+
};
|
|
23
|
+
exports.blogs = {
|
|
24
|
+
name: "blogs",
|
|
25
|
+
columns: (table) => ({
|
|
26
|
+
blog_id: table.bigIncrements("blog_id").primary(),
|
|
27
|
+
site_id: table.bigint("site_id").notNullable().defaultTo(0),
|
|
28
|
+
domain: table.string("domain", 200).notNullable().defaultTo(""),
|
|
29
|
+
path: table.string("path", 100).notNullable().defaultTo(""),
|
|
30
|
+
registered: table
|
|
31
|
+
.datetime("registered")
|
|
32
|
+
.notNullable()
|
|
33
|
+
.defaultTo("0000-00-00 00:00:00"),
|
|
34
|
+
last_updated: table
|
|
35
|
+
.datetime("last_updated")
|
|
36
|
+
.notNullable()
|
|
37
|
+
.defaultTo("0000-00-00 00:00:00"),
|
|
38
|
+
public: table.boolean("public").notNullable().defaultTo(true),
|
|
39
|
+
archived: table.boolean("archived").notNullable().defaultTo(false),
|
|
40
|
+
mature: table.boolean("mature").notNullable().defaultTo(false),
|
|
41
|
+
spam: table.boolean("spam").notNullable().defaultTo(false),
|
|
42
|
+
deleted: table.boolean("deleted").notNullable().defaultTo(false),
|
|
43
|
+
lang_id: table.integer("lang_id").notNullable().defaultTo(0),
|
|
44
|
+
}),
|
|
45
|
+
indexes: (table, columns) => {
|
|
46
|
+
columns.includes("land_id") && table.index("lang_id", "lang_id");
|
|
47
|
+
},
|
|
48
|
+
raw: (builder, tables, columns) => columns.includes("domain") &&
|
|
49
|
+
builder("ALTER TABLE ?? ADD KEY ?? (??(50), ??(5))", [
|
|
50
|
+
tables.get("blogs"),
|
|
51
|
+
"domain",
|
|
52
|
+
"domain",
|
|
53
|
+
"path",
|
|
54
|
+
]),
|
|
55
|
+
};
|
|
56
|
+
exports.commentMeta = {
|
|
57
|
+
name: "commentmeta",
|
|
58
|
+
columns: (table) => ({
|
|
59
|
+
meta_id: table.bigIncrements("meta_id").unsigned().notNullable().primary(),
|
|
60
|
+
comment_id: table
|
|
61
|
+
.bigint("comment_id")
|
|
62
|
+
.unsigned()
|
|
63
|
+
.notNullable()
|
|
64
|
+
.defaultTo(0),
|
|
65
|
+
meta_key: table.string("meta_key", 255).collate(collate),
|
|
66
|
+
meta_value: table.text("meta_value", "longtext").collate(collate),
|
|
67
|
+
}),
|
|
68
|
+
indexes: (table, columns) => {
|
|
69
|
+
columns.includes("comment_id") && table.index(["comment_id"], "comment_id");
|
|
70
|
+
},
|
|
71
|
+
raw: (builder, tables, columns) => columns.includes("meta_key") &&
|
|
72
|
+
builder("ALTER TABLE ?? ADD KEY ?? (??(191))", [
|
|
73
|
+
tables.get("commentmeta"),
|
|
74
|
+
"meta_key",
|
|
75
|
+
"meta_key",
|
|
76
|
+
]),
|
|
77
|
+
};
|
|
78
|
+
exports.comments = {
|
|
79
|
+
name: "comments",
|
|
80
|
+
columns: (table) => ({
|
|
81
|
+
comment_ID: table
|
|
82
|
+
.bigIncrements("comment_ID")
|
|
83
|
+
.unsigned()
|
|
84
|
+
.notNullable()
|
|
85
|
+
.primary(),
|
|
86
|
+
comment_post_ID: table
|
|
87
|
+
.bigint("comment_post_ID")
|
|
88
|
+
.unsigned()
|
|
89
|
+
.notNullable()
|
|
90
|
+
.defaultTo(0),
|
|
91
|
+
comment_author: table.text("comment_author", "tinytext").notNullable(),
|
|
92
|
+
comment_author_email: table
|
|
93
|
+
.string("comment_author_email", 100)
|
|
94
|
+
.notNullable()
|
|
95
|
+
.defaultTo(""),
|
|
96
|
+
comment_author_url: table
|
|
97
|
+
.string("comment_author_url", 200)
|
|
98
|
+
.notNullable()
|
|
99
|
+
.defaultTo(""),
|
|
100
|
+
comment_author_IP: table
|
|
101
|
+
.string("comment_author_IP", 100)
|
|
102
|
+
.notNullable()
|
|
103
|
+
.defaultTo(""),
|
|
104
|
+
comment_date: table
|
|
105
|
+
.datetime("comment_date")
|
|
106
|
+
.notNullable()
|
|
107
|
+
.defaultTo("0000-00-00 00:00:00"),
|
|
108
|
+
comment_date_gmt: table
|
|
109
|
+
.datetime("comment_date_gmt")
|
|
110
|
+
.notNullable()
|
|
111
|
+
.defaultTo("0000-00-00 00:00:00"),
|
|
112
|
+
comment_content: table.text("comment_content").notNullable(),
|
|
113
|
+
comment_karma: table.integer("comment_karma").notNullable().defaultTo(0),
|
|
114
|
+
comment_approved: table
|
|
115
|
+
.string("comment_approved", 20)
|
|
116
|
+
.notNullable()
|
|
117
|
+
.defaultTo("1"),
|
|
118
|
+
comment_agent: table
|
|
119
|
+
.string("comment_agent", 255)
|
|
120
|
+
.notNullable()
|
|
121
|
+
.defaultTo(""),
|
|
122
|
+
comment_type: table
|
|
123
|
+
.string("comment_type", 20)
|
|
124
|
+
.notNullable()
|
|
125
|
+
.defaultTo("comment"),
|
|
126
|
+
comment_parent: table
|
|
127
|
+
.bigint("comment_parent")
|
|
128
|
+
.unsigned()
|
|
129
|
+
.notNullable()
|
|
130
|
+
.defaultTo(0),
|
|
131
|
+
user_id: table.bigint("user_id").unsigned().notNullable().defaultTo(0),
|
|
132
|
+
}),
|
|
133
|
+
indexes: (table, columns) => {
|
|
134
|
+
columns.includes("comment_post_ID") &&
|
|
135
|
+
table.index(["comment_post_ID"], "comment_post_ID");
|
|
136
|
+
columns.includes("comment_approved") &&
|
|
137
|
+
columns.includes("comment_date_gmt") &&
|
|
138
|
+
table.index(["comment_approved", "comment_date_gmt"], "comment_approved_date_gmt");
|
|
139
|
+
columns.includes("comment_date_gmt") &&
|
|
140
|
+
table.index(["comment_date_gmt"], "comment_date_gmt");
|
|
141
|
+
columns.includes("comment_parent") &&
|
|
142
|
+
table.index(["comment_parent"], "comment_parent");
|
|
143
|
+
},
|
|
144
|
+
raw: (builder, tables, columns) => columns.includes("comment_author_email") &&
|
|
145
|
+
builder("ALTER TABLE ?? ADD KEY ?? (??(10))", [
|
|
146
|
+
tables.get("comments"),
|
|
147
|
+
"comment_author_email",
|
|
148
|
+
"comment_author_email",
|
|
149
|
+
]),
|
|
150
|
+
};
|
|
151
|
+
exports.links = {
|
|
152
|
+
name: "links",
|
|
153
|
+
columns: (table) => ({
|
|
154
|
+
link_id: table.bigIncrements("link_id").unsigned().notNullable().primary(),
|
|
155
|
+
link_url: table.string("link_url", 255).notNullable().defaultTo(""),
|
|
156
|
+
link_name: table.string("link_name", 255).notNullable().defaultTo(""),
|
|
157
|
+
link_image: table.string("link_image", 255).notNullable().defaultTo(""),
|
|
158
|
+
link_target: table.string("link_target", 25).notNullable().defaultTo(""),
|
|
159
|
+
link_description: table
|
|
160
|
+
.string("link_description", 255)
|
|
161
|
+
.notNullable()
|
|
162
|
+
.defaultTo(""),
|
|
163
|
+
link_visible: table.string("link_visible", 20).notNullable().defaultTo("Y"),
|
|
164
|
+
link_owner: table
|
|
165
|
+
.bigint("link_owner")
|
|
166
|
+
.unsigned()
|
|
167
|
+
.notNullable()
|
|
168
|
+
.defaultTo(1),
|
|
169
|
+
link_rating: table.integer("link_rating").notNullable().defaultTo(0),
|
|
170
|
+
link_updated: table
|
|
171
|
+
.datetime("link_updated")
|
|
172
|
+
.notNullable()
|
|
173
|
+
.defaultTo("0000-00-00 00:00:00"),
|
|
174
|
+
link_rel: table.string("link_rel", 255).notNullable().defaultTo(""),
|
|
175
|
+
link_notes: table.text("link_notes", "mediumtext").notNullable(),
|
|
176
|
+
link_rss: table.string("link_rss", 255).notNullable().defaultTo(""),
|
|
177
|
+
}),
|
|
178
|
+
indexes: (table, columns) => {
|
|
179
|
+
columns.includes("link_visible") &&
|
|
180
|
+
table.index(["link_visible"], "link_visible");
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
exports.options = {
|
|
184
|
+
name: "options",
|
|
185
|
+
columns: (table) => ({
|
|
186
|
+
option_id: table
|
|
187
|
+
.bigIncrements("option_id")
|
|
188
|
+
.unsigned()
|
|
189
|
+
.notNullable()
|
|
190
|
+
.primary(),
|
|
191
|
+
option_name: table.string("option_name", 191).notNullable().defaultTo(""),
|
|
192
|
+
option_value: table.text("option_value", "longtext").notNullable(),
|
|
193
|
+
autoload: table.string("autoload", 20).notNullable().defaultTo("yes"),
|
|
194
|
+
}),
|
|
195
|
+
indexes: (table, columns) => {
|
|
196
|
+
columns.includes("option_name") &&
|
|
197
|
+
table.unique(["option_name"], {
|
|
198
|
+
indexName: "option_name",
|
|
199
|
+
});
|
|
200
|
+
columns.includes("autoload") && table.index(["autoload"], "autoload");
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
exports.postMeta = {
|
|
204
|
+
name: "postmeta",
|
|
205
|
+
columns: (table) => ({
|
|
206
|
+
meta_id: table.bigIncrements("meta_id").unsigned().notNullable().primary(),
|
|
207
|
+
post_id: table.bigint("post_id").unsigned().notNullable().defaultTo(0),
|
|
208
|
+
meta_key: table.string("meta_key", 255).collate(collate),
|
|
209
|
+
meta_value: table.text("meta_value", "longtext").collate(collate),
|
|
210
|
+
}),
|
|
211
|
+
indexes: (table, columns) => {
|
|
212
|
+
columns.includes("post_id") && table.index(["post_id"], "post_id");
|
|
213
|
+
},
|
|
214
|
+
raw: (builder, tables, columns) => columns.includes("meta_key") &&
|
|
215
|
+
builder("ALTER TABLE ?? ADD KEY ?? (??(191))", [
|
|
216
|
+
tables.get("postmeta"),
|
|
217
|
+
"meta_key",
|
|
218
|
+
"meta_key",
|
|
219
|
+
]),
|
|
220
|
+
};
|
|
221
|
+
exports.posts = {
|
|
222
|
+
name: "posts",
|
|
223
|
+
columns: (table) => ({
|
|
224
|
+
ID: table.bigIncrements("ID").unsigned().notNullable().primary(),
|
|
225
|
+
post_author: table
|
|
226
|
+
.bigint("post_author")
|
|
227
|
+
.unsigned()
|
|
228
|
+
.notNullable()
|
|
229
|
+
.defaultTo(0),
|
|
230
|
+
post_date: table
|
|
231
|
+
.datetime("post_date")
|
|
232
|
+
.notNullable()
|
|
233
|
+
.defaultTo("0000-00-00 00:00:00"),
|
|
234
|
+
post_date_gmt: table
|
|
235
|
+
.datetime("post_date_gmt")
|
|
236
|
+
.notNullable()
|
|
237
|
+
.defaultTo("0000-00-00 00:00:00"),
|
|
238
|
+
post_content: table.text("post_content", "longtext").notNullable(),
|
|
239
|
+
post_title: table.text("post_title").notNullable(),
|
|
240
|
+
post_excerpt: table.text("post_excerpt").notNullable(),
|
|
241
|
+
post_status: table
|
|
242
|
+
.string("post_status", 20)
|
|
243
|
+
.notNullable()
|
|
244
|
+
.defaultTo("publish"),
|
|
245
|
+
comment_status: table
|
|
246
|
+
.string("comment_status", 20)
|
|
247
|
+
.notNullable()
|
|
248
|
+
.defaultTo("open"),
|
|
249
|
+
ping_status: table
|
|
250
|
+
.string("ping_status", 20)
|
|
251
|
+
.notNullable()
|
|
252
|
+
.defaultTo("open"),
|
|
253
|
+
post_password: table
|
|
254
|
+
.string("post_password", 255)
|
|
255
|
+
.notNullable()
|
|
256
|
+
.defaultTo(""),
|
|
257
|
+
post_name: table.string("post_name", 200).notNullable().defaultTo(""),
|
|
258
|
+
to_ping: table.text("to_ping").notNullable(),
|
|
259
|
+
pinged: table.text("pinged").notNullable(),
|
|
260
|
+
post_modified: table
|
|
261
|
+
.datetime("post_modified")
|
|
262
|
+
.notNullable()
|
|
263
|
+
.defaultTo("0000-00-00 00:00:00"),
|
|
264
|
+
post_modified_gmt: table
|
|
265
|
+
.datetime("post_modified_gmt")
|
|
266
|
+
.notNullable()
|
|
267
|
+
.defaultTo("0000-00-00 00:00:00"),
|
|
268
|
+
post_content_filtered: table
|
|
269
|
+
.text("post_content_filtered", "longtext")
|
|
270
|
+
.notNullable(),
|
|
271
|
+
post_parent: table
|
|
272
|
+
.bigint("post_parent")
|
|
273
|
+
.unsigned()
|
|
274
|
+
.notNullable()
|
|
275
|
+
.defaultTo(0),
|
|
276
|
+
guid: table.string("guid", 255).notNullable().defaultTo(""),
|
|
277
|
+
menu_order: table.integer("menu_order").notNullable().defaultTo(0),
|
|
278
|
+
post_type: table.string("post_type", 20).notNullable().defaultTo("post"),
|
|
279
|
+
post_mime_type: table
|
|
280
|
+
.string("post_mime_type", 100)
|
|
281
|
+
.notNullable()
|
|
282
|
+
.defaultTo(""),
|
|
283
|
+
comment_count: table.bigint("comment_count").notNullable().defaultTo(0),
|
|
284
|
+
}),
|
|
285
|
+
indexes: (table, columns) => {
|
|
286
|
+
columns.includes("ID") &&
|
|
287
|
+
table.index(["post_type", "post_status", "post_date", "ID"], "type_status_date");
|
|
288
|
+
table.index(["post_parent"], "post_parent");
|
|
289
|
+
table.index(["post_author"], "post_author");
|
|
290
|
+
},
|
|
291
|
+
raw: (builder, tables, columns) => columns.includes("post_name") &&
|
|
292
|
+
builder("ALTER TABLE ?? ADD KEY ?? (??(191))", [
|
|
293
|
+
tables.get("posts"),
|
|
294
|
+
"post_name",
|
|
295
|
+
"post_name",
|
|
296
|
+
]),
|
|
297
|
+
};
|
|
298
|
+
exports.registrationLog = {
|
|
299
|
+
name: "registration_log",
|
|
300
|
+
columns: (table) => ({
|
|
301
|
+
ID: table.bigIncrements("ID").notNullable().primary(),
|
|
302
|
+
email: table.string("email", 255).notNullable().defaultTo(""),
|
|
303
|
+
IP: table.string("IP", 30).notNullable().defaultTo(""),
|
|
304
|
+
blog_id: table.bigint("blog_id").notNullable().defaultTo(0),
|
|
305
|
+
date_registered: table
|
|
306
|
+
.datetime("date_registered")
|
|
307
|
+
.notNullable()
|
|
308
|
+
.defaultTo("0000-00-00 00:00:00"),
|
|
309
|
+
}),
|
|
310
|
+
indexes: (table, columns) => {
|
|
311
|
+
columns.includes("IP") && table.index(["IP"], "IP");
|
|
312
|
+
},
|
|
313
|
+
};
|
|
314
|
+
exports.signups = {
|
|
315
|
+
name: "signups",
|
|
316
|
+
columns: (table) => ({
|
|
317
|
+
signup_id: table.bigIncrements("signup_id").notNullable().primary(),
|
|
318
|
+
domain: table.string("domain", 200).notNullable().defaultTo(""),
|
|
319
|
+
path: table.string("path", 100).notNullable().defaultTo(""),
|
|
320
|
+
title: table.text("title", "longtext").notNullable(),
|
|
321
|
+
user_login: table.string("user_login", 60).notNullable().defaultTo(""),
|
|
322
|
+
user_email: table.string("user_email", 100).notNullable().defaultTo(""),
|
|
323
|
+
registered: table
|
|
324
|
+
.datetime("registered")
|
|
325
|
+
.notNullable()
|
|
326
|
+
.defaultTo("0000-00-00 00:00:00"),
|
|
327
|
+
activated: table
|
|
328
|
+
.datetime("activated")
|
|
329
|
+
.notNullable()
|
|
330
|
+
.defaultTo("0000-00-00 00:00:00"),
|
|
331
|
+
active: table.boolean("active").notNullable().defaultTo(false),
|
|
332
|
+
activation_key: table
|
|
333
|
+
.string("activation_key", 50)
|
|
334
|
+
.notNullable()
|
|
335
|
+
.defaultTo(""),
|
|
336
|
+
meta: table.text("meta", "longtext"),
|
|
337
|
+
}),
|
|
338
|
+
indexes: (table, columns) => {
|
|
339
|
+
columns.includes("activation_key") &&
|
|
340
|
+
table.index(["activation_key"], "activation_key");
|
|
341
|
+
columns.includes("user_email") && table.index(["user_email"], "user_email");
|
|
342
|
+
columns.includes("user_login") &&
|
|
343
|
+
columns.includes("user_email") &&
|
|
344
|
+
table.index(["user_login", "user_email"], "user_login_email");
|
|
345
|
+
},
|
|
346
|
+
raw: (builder, tables) => builder("ALTER TABLE ?? ADD KEY ?? (??(140), ??(51))", [
|
|
347
|
+
tables.get("signups"),
|
|
348
|
+
"domain_path",
|
|
349
|
+
"domain",
|
|
350
|
+
"path",
|
|
351
|
+
]),
|
|
352
|
+
};
|
|
353
|
+
exports.site = {
|
|
354
|
+
name: "site",
|
|
355
|
+
columns: (table) => ({
|
|
356
|
+
id: table.bigIncrements("id").notNullable().primary(),
|
|
357
|
+
domain: table.string("domain", 200).notNullable().defaultTo(""),
|
|
358
|
+
path: table.string("path", 100).notNullable().defaultTo(""),
|
|
359
|
+
}),
|
|
360
|
+
raw: (builder, tables, columns) => columns.includes("domain") &&
|
|
361
|
+
columns.includes("path") &&
|
|
362
|
+
builder("ALTER TABLE ?? ADD KEY ?? (??(140), ??(51))", [
|
|
363
|
+
tables.get("site"),
|
|
364
|
+
"domain",
|
|
365
|
+
"domain",
|
|
366
|
+
"path",
|
|
367
|
+
]),
|
|
368
|
+
};
|
|
369
|
+
exports.siteMeta = {
|
|
370
|
+
name: "sitemeta",
|
|
371
|
+
columns: (table) => ({
|
|
372
|
+
meta_id: table.bigIncrements("meta_id").notNullable().primary(),
|
|
373
|
+
site_id: table.bigint("site_id").notNullable().defaultTo(0),
|
|
374
|
+
meta_key: table.string("meta_key", 255).collate(collate),
|
|
375
|
+
meta_value: table.text("meta_value", "longtext").collate(collate),
|
|
376
|
+
}),
|
|
377
|
+
indexes: (table, columns) => {
|
|
378
|
+
columns.includes("site_id") && table.index(["site_id"], "site_id");
|
|
379
|
+
},
|
|
380
|
+
raw: (builder, tables, columns) => columns.includes("meta_key") &&
|
|
381
|
+
builder("ALTER TABLE ?? ADD KEY ?? (??(191))", [
|
|
382
|
+
tables.get("sitemeta"),
|
|
383
|
+
"meta_key",
|
|
384
|
+
"meta_key",
|
|
385
|
+
]),
|
|
386
|
+
};
|
|
387
|
+
exports.termMeta = {
|
|
388
|
+
name: "termmeta",
|
|
389
|
+
columns: (table) => ({
|
|
390
|
+
meta_id: table.bigIncrements("meta_id").unsigned().notNullable().primary(),
|
|
391
|
+
term_id: table.bigint("term_id").unsigned().notNullable().defaultTo(0),
|
|
392
|
+
meta_key: table.string("meta_key", 255).collate(collate),
|
|
393
|
+
meta_value: table.text("meta_value", "longtext").collate(collate),
|
|
394
|
+
}),
|
|
395
|
+
indexes: (table, columns) => {
|
|
396
|
+
columns.includes("term_id") && table.index(["term_id"], "term_id");
|
|
397
|
+
},
|
|
398
|
+
raw: (builder, tables, columns) => columns.includes("meta_key") &&
|
|
399
|
+
builder("ALTER TABLE ?? ADD KEY ?? (??(191))", [
|
|
400
|
+
tables.get("termmeta"),
|
|
401
|
+
"meta_key",
|
|
402
|
+
"meta_key",
|
|
403
|
+
]),
|
|
404
|
+
};
|
|
405
|
+
exports.terms = {
|
|
406
|
+
name: "terms",
|
|
407
|
+
columns: (table) => ({
|
|
408
|
+
term_id: table.bigIncrements("term_id").unsigned().notNullable().primary(),
|
|
409
|
+
name: table.string("name", 200).notNullable().defaultTo(""),
|
|
410
|
+
slug: table.string("slug", 200).notNullable().defaultTo(""),
|
|
411
|
+
term_group: table.bigint("term_group").notNullable().defaultTo(0),
|
|
412
|
+
}),
|
|
413
|
+
raw: (builder, tables, columns) => columns.includes("slug") &&
|
|
414
|
+
columns.includes("name") &&
|
|
415
|
+
builder("ALTER TABLE ?? ADD KEY ?? (??(191)), ADD KEY ?? (??(191))", [
|
|
416
|
+
tables.get("terms"),
|
|
417
|
+
"slug",
|
|
418
|
+
"slug",
|
|
419
|
+
"name",
|
|
420
|
+
"name",
|
|
421
|
+
]),
|
|
422
|
+
};
|
|
423
|
+
exports.termRelationships = {
|
|
424
|
+
name: "term_relationships",
|
|
425
|
+
columns: (table) => ({
|
|
426
|
+
object_id: table.bigint("object_id").unsigned().notNullable().defaultTo(0),
|
|
427
|
+
term_taxonomy_id: table
|
|
428
|
+
.bigint("term_taxonomy_id")
|
|
429
|
+
.unsigned()
|
|
430
|
+
.notNullable()
|
|
431
|
+
.defaultTo(0),
|
|
432
|
+
term_order: table.integer("term_order").notNullable().defaultTo(0),
|
|
433
|
+
}),
|
|
434
|
+
indexes: (table, columns) => {
|
|
435
|
+
// Note: The primary key is a composite key, which is defined in the table structure below
|
|
436
|
+
columns.includes("term_taxonomy_id") &&
|
|
437
|
+
table.index(["term_taxonomy_id"], "term_taxonomy_id");
|
|
438
|
+
columns.includes("object_id") &&
|
|
439
|
+
columns.includes("term_taxonomy_id") &&
|
|
440
|
+
table.primary(["object_id", "term_taxonomy_id"], {
|
|
441
|
+
constraintName: "term_taxonomy_id",
|
|
442
|
+
});
|
|
443
|
+
},
|
|
444
|
+
};
|
|
445
|
+
exports.termTaxonomy = {
|
|
446
|
+
name: "term_taxonomy",
|
|
447
|
+
columns: (table) => ({
|
|
448
|
+
term_taxonomy_id: table
|
|
449
|
+
.bigIncrements("term_taxonomy_id")
|
|
450
|
+
.unsigned()
|
|
451
|
+
.notNullable()
|
|
452
|
+
.primary(),
|
|
453
|
+
term_id: table.bigint("term_id").unsigned().notNullable().defaultTo(0),
|
|
454
|
+
taxonomy: table.string("taxonomy", 32).notNullable().defaultTo(""),
|
|
455
|
+
description: table.text("description", "longtext").notNullable(),
|
|
456
|
+
parent: table.bigint("parent").unsigned().notNullable().defaultTo(0),
|
|
457
|
+
count: table.bigint("count").notNullable().defaultTo(0),
|
|
458
|
+
}),
|
|
459
|
+
indexes: (table, columns) => {
|
|
460
|
+
// Since 'term_id_taxonomy' is a unique key, it's handled differently from a regular index
|
|
461
|
+
columns.includes("term_id") &&
|
|
462
|
+
columns.includes("taxonomy") &&
|
|
463
|
+
table.unique(["term_id", "taxonomy"], {
|
|
464
|
+
indexName: "term_id_taxonomy",
|
|
465
|
+
});
|
|
466
|
+
columns.includes("taxonomy") && table.index(["taxonomy"], "taxonomy");
|
|
467
|
+
},
|
|
468
|
+
};
|
|
469
|
+
exports.userMeta = {
|
|
470
|
+
name: "usermeta",
|
|
471
|
+
columns: (table) => ({
|
|
472
|
+
umeta_id: table
|
|
473
|
+
.bigIncrements("umeta_id")
|
|
474
|
+
.unsigned()
|
|
475
|
+
.notNullable()
|
|
476
|
+
.primary(),
|
|
477
|
+
user_id: table.bigint("user_id").unsigned().notNullable().defaultTo(0),
|
|
478
|
+
meta_key: table.string("meta_key", 255).collate(collate),
|
|
479
|
+
meta_value: table.text("meta_value", "longtext").collate(collate),
|
|
480
|
+
}),
|
|
481
|
+
indexes: (table, columns) => {
|
|
482
|
+
columns.includes("user_id") && table.index(["user_id"], "user_id");
|
|
483
|
+
},
|
|
484
|
+
raw: (builder, tables, columns) => columns.includes("meta_key") &&
|
|
485
|
+
builder("ALTER TABLE ?? ADD KEY ?? (??(191))", [
|
|
486
|
+
tables.get("usermeta"),
|
|
487
|
+
"meta_key",
|
|
488
|
+
"meta_key",
|
|
489
|
+
]),
|
|
490
|
+
};
|
|
491
|
+
exports.users = {
|
|
492
|
+
name: "users",
|
|
493
|
+
columns: (table, config) => ({
|
|
494
|
+
ID: table.bigIncrements("ID").unsigned().notNullable().primary(),
|
|
495
|
+
user_login: table.string("user_login", 60).notNullable().defaultTo(""),
|
|
496
|
+
user_pass: table.string("user_pass", 255).notNullable().defaultTo(""),
|
|
497
|
+
user_nicename: table
|
|
498
|
+
.string("user_nicename", 50)
|
|
499
|
+
.notNullable()
|
|
500
|
+
.defaultTo(""),
|
|
501
|
+
user_email: table.string("user_email", 100).notNullable().defaultTo(""),
|
|
502
|
+
user_url: table.string("user_url", 100).notNullable().defaultTo(""),
|
|
503
|
+
user_registered: table
|
|
504
|
+
.datetime("user_registered")
|
|
505
|
+
.notNullable()
|
|
506
|
+
.defaultTo("0000-00-00 00:00:00"),
|
|
507
|
+
user_activation_key: table
|
|
508
|
+
.string("user_activation_key", 255)
|
|
509
|
+
.notNullable()
|
|
510
|
+
.defaultTo(""),
|
|
511
|
+
user_status: table.integer("user_status").notNullable().defaultTo(0),
|
|
512
|
+
display_name: table.string("display_name", 250).notNullable().defaultTo(""),
|
|
513
|
+
spam: config?.isMultiSite()
|
|
514
|
+
? table.tinyint("spam").notNullable().defaultTo(0)
|
|
515
|
+
: undefined,
|
|
516
|
+
deleted: config?.isMultiSite()
|
|
517
|
+
? table.tinyint("deleted").notNullable().defaultTo(0)
|
|
518
|
+
: undefined,
|
|
519
|
+
}),
|
|
520
|
+
indexes: (table, columns) => {
|
|
521
|
+
columns.includes("user_login") &&
|
|
522
|
+
table.index(["user_login"], "user_login_key");
|
|
523
|
+
columns.includes("user_nicename") &&
|
|
524
|
+
table.index(["user_nicename"], "user_nicename");
|
|
525
|
+
columns.includes("user_email") && table.index(["user_email"], "user_email");
|
|
526
|
+
},
|
|
527
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Blog } from "../core/blog";
|
|
3
|
+
import { Components } from "../core/components";
|
|
4
|
+
import { Logger } from "../core/logger";
|
|
5
|
+
import { BlogUtil } from "../core/utils/blog.util";
|
|
6
|
+
import { Validator } from "../core/validator";
|
|
7
|
+
import Database from "../database";
|
|
8
|
+
import * as val from "../validators";
|
|
9
|
+
import { Trx } from "./trx";
|
|
10
|
+
import { UserTrx } from "./user.trx";
|
|
11
|
+
import type * as types from "../types";
|
|
12
|
+
type DataUpsert = z.infer<typeof val.trx.blogUpsert>;
|
|
13
|
+
export declare class BlogTrx extends Trx {
|
|
14
|
+
private database;
|
|
15
|
+
private logger;
|
|
16
|
+
private components;
|
|
17
|
+
private blogUtil;
|
|
18
|
+
private validator;
|
|
19
|
+
constructor(database: Database, logger: Logger, components: Components, blogUtil: BlogUtil, validator: Validator);
|
|
20
|
+
changeSite(blogId: number, newSiteId: number, options?: {
|
|
21
|
+
domain?: string;
|
|
22
|
+
path?: string;
|
|
23
|
+
}): Promise<number | undefined>;
|
|
24
|
+
upsert(input: Partial<DataUpsert>, options?: {
|
|
25
|
+
dontInitialize?: boolean;
|
|
26
|
+
}): Promise<number>;
|
|
27
|
+
remove(blogId: number): Promise<Blog>;
|
|
28
|
+
addUser(blogId: number, userId: number, roleName?: types.UpsertRoleName, options?: Partial<{
|
|
29
|
+
superAdmin: boolean;
|
|
30
|
+
}>): Promise<boolean>;
|
|
31
|
+
addUser(blogId: number, userId: number, roleName?: Parameters<UserTrx["upsertRole"]>[1], options?: Partial<{
|
|
32
|
+
superAdmin: boolean;
|
|
33
|
+
}>): Promise<boolean>;
|
|
34
|
+
removeUser(blogId: number, userId: number, userIdToReassign?: number): Promise<boolean>;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=blog.trx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog.trx.d.ts","sourceRoot":"","sources":["../../src/transactions/blog.trx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGnD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AAIrC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,KAAK,KAAK,KAAK,MAAM,UAAU,CAAC;AACvC,KAAK,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAErD,qBACa,OAAQ,SAAQ,GAAG;IAE5B,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,SAAS;gBAJT,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS;IAMxB,UAAU,CACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;IAiCG,MAAM,CACV,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,EAC1B,OAAO,CAAC,EAAE;QACR,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B;IA6FG,MAAM,CAAC,MAAM,EAAE,MAAM;IA6BrB,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,KAAK,CAAC,cAAc,EAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;QAChB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC,GACD,OAAO,CAAC,OAAO,CAAC;IACb,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,EAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;QAChB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC,GACD,OAAO,CAAC,OAAO,CAAC;IA8Db,UAAU,CACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,gBAAgB,GAAE,MAAU;CA6D/B"}
|