@strapi/types 5.0.0-beta.0 → 5.0.0-beta.10
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/dist/core/api.d.ts +3 -0
- package/dist/core/api.d.ts.map +1 -0
- package/dist/{types/core → core}/commands/index.d.ts +1 -1
- package/dist/core/commands/index.d.ts.map +1 -0
- package/dist/core/config/admin.d.ts.map +1 -0
- package/dist/core/config/api.d.ts.map +1 -0
- package/dist/{types/core → core}/config/database.d.ts +2 -2
- package/dist/core/config/database.d.ts.map +1 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/{types/core → core}/config/middlewares.d.ts +1 -1
- package/dist/core/config/middlewares.d.ts.map +1 -0
- package/dist/core/config/plugin.d.ts.map +1 -0
- package/dist/{types/core → core}/config/server.d.ts +0 -4
- package/dist/core/config/server.d.ts.map +1 -0
- package/dist/core/config/shared.d.ts.map +1 -0
- package/dist/core/container.d.ts.map +1 -0
- package/dist/{types/core/common → core}/controller.d.ts +1 -1
- package/dist/core/controller.d.ts.map +1 -0
- package/dist/{types → core}/core-api/controller.d.ts +16 -14
- package/dist/core/core-api/controller.d.ts.map +1 -0
- package/dist/core/core-api/index.d.ts.map +1 -0
- package/dist/{types → core}/core-api/router.d.ts +7 -6
- package/dist/core/core-api/router.d.ts.map +1 -0
- package/dist/{types → core}/core-api/service.d.ts +7 -6
- package/dist/core/core-api/service.d.ts.map +1 -0
- package/dist/core/index.d.ts +14 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/{types/core/common → core}/middleware.d.ts +3 -2
- package/dist/core/middleware.d.ts.map +1 -0
- package/dist/core/module.d.ts +26 -0
- package/dist/core/module.d.ts.map +1 -0
- package/dist/core/plugin.d.ts +6 -0
- package/dist/core/plugin.d.ts.map +1 -0
- package/dist/core/policy.d.ts +15 -0
- package/dist/core/policy.d.ts.map +1 -0
- package/dist/core/router.d.ts.map +1 -0
- package/dist/core/service.d.ts.map +1 -0
- package/dist/core/strapi.d.ts +143 -0
- package/dist/core/strapi.d.ts.map +1 -0
- package/dist/data/component.d.ts +21 -0
- package/dist/data/component.d.ts.map +1 -0
- package/dist/data/constants.d.ts +5 -0
- package/dist/data/constants.d.ts.map +1 -0
- package/dist/data/content-type.d.ts +26 -0
- package/dist/data/content-type.d.ts.map +1 -0
- package/dist/data/entity.d.ts +15 -0
- package/dist/data/entity.d.ts.map +1 -0
- package/dist/data/index.d.ts +5 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/index.d.ts +13 -152
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/index.d.ts +13 -0
- package/dist/internal/index.d.ts.map +1 -0
- package/dist/{types/core → internal}/namespace.d.ts +6 -6
- package/dist/internal/namespace.d.ts.map +1 -0
- package/dist/internal/registry.d.ts +8 -0
- package/dist/internal/registry.d.ts.map +1 -0
- package/dist/{types/core → internal}/uid.d.ts +20 -13
- package/dist/internal/uid.d.ts.map +1 -0
- package/dist/modules/auth.d.ts +4 -4
- package/dist/modules/auth.d.ts.map +1 -1
- package/dist/modules/content-api.d.ts +5 -3
- package/dist/modules/content-api.d.ts.map +1 -1
- package/dist/modules/core-store.d.ts +3 -3
- package/dist/modules/core-store.d.ts.map +1 -1
- package/dist/modules/cron.d.ts +1 -1
- package/dist/modules/cron.d.ts.map +1 -1
- package/dist/modules/documents/component-extension.d.ts +22 -0
- package/dist/modules/documents/component-extension.d.ts.map +1 -0
- package/dist/modules/documents/document-engine.d.ts +1 -0
- package/dist/modules/documents/document-engine.d.ts.map +1 -0
- package/dist/modules/documents/draft-and-publish.d.ts +7 -7
- package/dist/modules/documents/draft-and-publish.d.ts.map +1 -1
- package/dist/modules/documents/index.d.ts +10 -4
- package/dist/modules/documents/index.d.ts.map +1 -1
- package/dist/modules/documents/middleware.d.ts +13 -8
- package/dist/modules/documents/middleware.d.ts.map +1 -1
- package/dist/modules/documents/params/attributes.d.ts +33 -30
- package/dist/modules/documents/params/attributes.d.ts.map +1 -1
- package/dist/modules/documents/params/data.d.ts +2 -2
- package/dist/modules/documents/params/data.d.ts.map +1 -1
- package/dist/modules/documents/params/document-engine.d.ts +27 -14
- package/dist/modules/documents/params/document-engine.d.ts.map +1 -1
- package/dist/modules/documents/params/fields.d.ts +7 -5
- package/dist/modules/documents/params/fields.d.ts.map +1 -1
- package/dist/modules/documents/params/filters/index.d.ts +11 -9
- package/dist/modules/documents/params/filters/index.d.ts.map +1 -1
- package/dist/modules/documents/params/index.d.ts +21 -8
- package/dist/modules/documents/params/index.d.ts.map +1 -1
- package/dist/modules/documents/params/locale.d.ts +4 -0
- package/dist/modules/documents/params/locale.d.ts.map +1 -0
- package/dist/modules/documents/params/pagination.d.ts +2 -2
- package/dist/modules/documents/params/pagination.d.ts.map +1 -1
- package/dist/modules/documents/params/populate.d.ts +18 -18
- package/dist/modules/documents/params/populate.d.ts.map +1 -1
- package/dist/modules/documents/params/sort.d.ts +10 -8
- package/dist/modules/documents/params/sort.d.ts.map +1 -1
- package/dist/modules/documents/plugin.d.ts +8 -5
- package/dist/modules/documents/plugin.d.ts.map +1 -1
- package/dist/modules/documents/result/document-engine.d.ts +34 -0
- package/dist/modules/documents/result/document-engine.d.ts.map +1 -0
- package/dist/modules/documents/result/index.d.ts +38 -35
- package/dist/modules/documents/result/index.d.ts.map +1 -1
- package/dist/modules/documents/service-instance.d.ts +41 -16
- package/dist/modules/documents/service-instance.d.ts.map +1 -1
- package/dist/modules/entity-service/index.d.ts +22 -22
- package/dist/modules/entity-service/index.d.ts.map +1 -1
- package/dist/modules/entity-service/params/attributes/id.d.ts +2 -2
- package/dist/modules/entity-service/params/attributes/id.d.ts.map +1 -1
- package/dist/modules/entity-service/params/attributes/index.d.ts +21 -19
- package/dist/modules/entity-service/params/attributes/index.d.ts.map +1 -1
- package/dist/modules/entity-service/params/attributes/literals.d.ts +1 -1
- package/dist/modules/entity-service/params/attributes/literals.d.ts.map +1 -1
- package/dist/modules/entity-service/params/attributes/relation.d.ts +7 -5
- package/dist/modules/entity-service/params/attributes/relation.d.ts.map +1 -1
- package/dist/modules/entity-service/params/attributes/utils.d.ts +8 -6
- package/dist/modules/entity-service/params/attributes/utils.d.ts.map +1 -1
- package/dist/modules/entity-service/params/data.d.ts +2 -2
- package/dist/modules/entity-service/params/data.d.ts.map +1 -1
- package/dist/modules/entity-service/params/fields.d.ts +7 -5
- package/dist/modules/entity-service/params/fields.d.ts.map +1 -1
- package/dist/modules/entity-service/params/filters/index.d.ts +17 -15
- package/dist/modules/entity-service/params/filters/index.d.ts.map +1 -1
- package/dist/modules/entity-service/params/index.d.ts +4 -3
- package/dist/modules/entity-service/params/index.d.ts.map +1 -1
- package/dist/modules/entity-service/params/pagination.d.ts +1 -2
- package/dist/modules/entity-service/params/pagination.d.ts.map +1 -1
- package/dist/modules/entity-service/params/populate.d.ts +19 -19
- package/dist/modules/entity-service/params/populate.d.ts.map +1 -1
- package/dist/modules/entity-service/params/sort.d.ts +11 -9
- package/dist/modules/entity-service/params/sort.d.ts.map +1 -1
- package/dist/modules/entity-service/plugin.d.ts +8 -5
- package/dist/modules/entity-service/plugin.d.ts.map +1 -1
- package/dist/modules/entity-service/result.d.ts +34 -45
- package/dist/modules/entity-service/result.d.ts.map +1 -1
- package/dist/modules/entity-validator.d.ts +5 -4
- package/dist/modules/entity-validator.d.ts.map +1 -1
- package/dist/modules/event-hub.d.ts +1 -0
- package/dist/modules/event-hub.d.ts.map +1 -1
- package/dist/modules/features.d.ts +0 -1
- package/dist/modules/features.d.ts.map +1 -1
- package/dist/modules/index.d.ts +20 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/permissions.d.ts +14 -0
- package/dist/modules/permissions.d.ts.map +1 -0
- package/dist/modules/sanitizers.d.ts +4 -5
- package/dist/modules/sanitizers.d.ts.map +1 -1
- package/dist/modules/server.d.ts +3 -3
- package/dist/modules/server.d.ts.map +1 -1
- package/dist/modules/validators.d.ts +4 -5
- package/dist/modules/validators.d.ts.map +1 -1
- package/dist/plugin/config/index.d.ts.map +1 -0
- package/dist/plugin/config/strapi-admin/index.d.ts.map +1 -0
- package/dist/plugin/config/strapi-server/config.d.ts.map +1 -0
- package/dist/{types/core/plugins → plugin}/config/strapi-server/content-types.d.ts +2 -2
- package/dist/plugin/config/strapi-server/content-types.d.ts.map +1 -0
- package/dist/plugin/config/strapi-server/controllers.d.ts +8 -0
- package/dist/plugin/config/strapi-server/controllers.d.ts.map +1 -0
- package/dist/plugin/config/strapi-server/index.d.ts.map +1 -0
- package/dist/{types/core/plugins → plugin}/config/strapi-server/lifecycle.d.ts +1 -1
- package/dist/plugin/config/strapi-server/lifecycle.d.ts.map +1 -0
- package/dist/plugin/config/strapi-server/routes.d.ts +11 -0
- package/dist/plugin/config/strapi-server/routes.d.ts.map +1 -0
- package/dist/plugin/index.d.ts +37 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/public/index.d.ts +6 -0
- package/dist/public/index.d.ts.map +1 -0
- package/dist/public/registries.d.ts +72 -0
- package/dist/public/registries.d.ts.map +1 -0
- package/dist/public/shared.d.ts +61 -0
- package/dist/public/shared.d.ts.map +1 -0
- package/dist/schema/attribute/base.d.ts +65 -0
- package/dist/schema/attribute/base.d.ts.map +1 -0
- package/dist/schema/attribute/common.d.ts +13 -0
- package/dist/schema/attribute/common.d.ts.map +1 -0
- package/dist/schema/attribute/constants.d.ts +12 -0
- package/dist/schema/attribute/constants.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/biginteger.d.ts +19 -0
- package/dist/schema/attribute/definitions/biginteger.d.ts.map +1 -0
- package/dist/{types/core/attributes → schema/attribute/definitions}/blocks.d.ts +21 -13
- package/dist/schema/attribute/definitions/blocks.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/boolean.d.ts +19 -0
- package/dist/schema/attribute/definitions/boolean.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/component.d.ts +25 -0
- package/dist/schema/attribute/definitions/component.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/date-time.d.ts +18 -0
- package/dist/schema/attribute/definitions/date-time.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/date.d.ts +18 -0
- package/dist/schema/attribute/definitions/date.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/decimal.d.ts +19 -0
- package/dist/schema/attribute/definitions/decimal.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/dynamic-zone.d.ts +25 -0
- package/dist/schema/attribute/definitions/dynamic-zone.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/email.d.ts +19 -0
- package/dist/schema/attribute/definitions/email.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/enumeration.d.ts +22 -0
- package/dist/schema/attribute/definitions/enumeration.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/float.d.ts +19 -0
- package/dist/schema/attribute/definitions/float.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/index.d.ts +23 -0
- package/dist/schema/attribute/definitions/index.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/integer.d.ts +19 -0
- package/dist/schema/attribute/definitions/integer.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/json.d.ts +17 -0
- package/dist/schema/attribute/definitions/json.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/media.d.ts +24 -0
- package/dist/schema/attribute/definitions/media.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/password.d.ts +18 -0
- package/dist/schema/attribute/definitions/password.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/relation.d.ts +168 -0
- package/dist/schema/attribute/definitions/relation.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/richtext.d.ts +18 -0
- package/dist/schema/attribute/definitions/richtext.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/string.d.ts +28 -0
- package/dist/schema/attribute/definitions/string.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/text.d.ts +23 -0
- package/dist/schema/attribute/definitions/text.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/time.d.ts +18 -0
- package/dist/schema/attribute/definitions/time.d.ts.map +1 -0
- package/dist/schema/attribute/definitions/timestamp.d.ts +18 -0
- package/dist/schema/attribute/definitions/timestamp.d.ts.map +1 -0
- package/dist/{types/core/attributes → schema/attribute/definitions}/uid.d.ts +16 -2
- package/dist/schema/attribute/definitions/uid.d.ts.map +1 -0
- package/dist/schema/attribute/index.d.ts +7 -0
- package/dist/schema/attribute/index.d.ts.map +1 -0
- package/dist/schema/attribute/options.d.ts +221 -0
- package/dist/schema/attribute/options.d.ts.map +1 -0
- package/dist/schema/attribute/utils.d.ts +101 -0
- package/dist/schema/attribute/utils.d.ts.map +1 -0
- package/dist/schema/index.d.ts +144 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/struct/index.d.ts +3 -0
- package/dist/struct/index.d.ts.map +1 -0
- package/dist/struct/schema-definition.d.ts +10 -0
- package/dist/struct/schema-definition.d.ts.map +1 -0
- package/dist/struct/schema.d.ts +248 -0
- package/dist/struct/schema.d.ts.map +1 -0
- package/dist/uid/index.d.ts +168 -0
- package/dist/uid/index.d.ts.map +1 -0
- package/dist/utils/array.d.ts +80 -0
- package/dist/utils/array.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +67 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/expression.d.ts +490 -0
- package/dist/utils/expression.d.ts.map +1 -0
- package/dist/utils/function.d.ts +21 -0
- package/dist/utils/function.d.ts.map +1 -0
- package/dist/utils/guard.d.ts +90 -0
- package/dist/utils/guard.d.ts.map +1 -0
- package/dist/utils/index.d.ts +180 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/json.d.ts +119 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/object.d.ts +180 -0
- package/dist/utils/object.d.ts.map +1 -0
- package/dist/utils/string.d.ts +154 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/tuple.d.ts +19 -0
- package/dist/utils/tuple.d.ts.map +1 -0
- package/package.json +19 -15
- package/dist/container.d.ts.map +0 -1
- package/dist/modules/documents/result/document-enigne.d.ts +0 -30
- package/dist/modules/documents/result/document-enigne.d.ts.map +0 -1
- package/dist/types/core/attributes/base.d.ts +0 -52
- package/dist/types/core/attributes/base.d.ts.map +0 -1
- package/dist/types/core/attributes/biginteger.d.ts +0 -5
- package/dist/types/core/attributes/biginteger.d.ts.map +0 -1
- package/dist/types/core/attributes/blocks.d.ts.map +0 -1
- package/dist/types/core/attributes/boolean.d.ts +0 -7
- package/dist/types/core/attributes/boolean.d.ts.map +0 -1
- package/dist/types/core/attributes/common.d.ts +0 -59
- package/dist/types/core/attributes/common.d.ts.map +0 -1
- package/dist/types/core/attributes/component.d.ts +0 -20
- package/dist/types/core/attributes/component.d.ts.map +0 -1
- package/dist/types/core/attributes/date-time.d.ts +0 -5
- package/dist/types/core/attributes/date-time.d.ts.map +0 -1
- package/dist/types/core/attributes/date.d.ts +0 -5
- package/dist/types/core/attributes/date.d.ts.map +0 -1
- package/dist/types/core/attributes/decimal.d.ts +0 -5
- package/dist/types/core/attributes/decimal.d.ts.map +0 -1
- package/dist/types/core/attributes/dynamic-zone.d.ts +0 -13
- package/dist/types/core/attributes/dynamic-zone.d.ts.map +0 -1
- package/dist/types/core/attributes/email.d.ts +0 -5
- package/dist/types/core/attributes/email.d.ts.map +0 -1
- package/dist/types/core/attributes/enumeration.d.ts +0 -10
- package/dist/types/core/attributes/enumeration.d.ts.map +0 -1
- package/dist/types/core/attributes/float.d.ts +0 -5
- package/dist/types/core/attributes/float.d.ts.map +0 -1
- package/dist/types/core/attributes/index.d.ts +0 -26
- package/dist/types/core/attributes/index.d.ts.map +0 -1
- package/dist/types/core/attributes/integer.d.ts +0 -5
- package/dist/types/core/attributes/integer.d.ts.map +0 -1
- package/dist/types/core/attributes/json.d.ts +0 -6
- package/dist/types/core/attributes/json.d.ts.map +0 -1
- package/dist/types/core/attributes/media.d.ts +0 -13
- package/dist/types/core/attributes/media.d.ts.map +0 -1
- package/dist/types/core/attributes/password.d.ts +0 -5
- package/dist/types/core/attributes/password.d.ts.map +0 -1
- package/dist/types/core/attributes/relation.d.ts +0 -85
- package/dist/types/core/attributes/relation.d.ts.map +0 -1
- package/dist/types/core/attributes/richtext.d.ts +0 -5
- package/dist/types/core/attributes/richtext.d.ts.map +0 -1
- package/dist/types/core/attributes/string.d.ts +0 -10
- package/dist/types/core/attributes/string.d.ts.map +0 -1
- package/dist/types/core/attributes/text.d.ts +0 -8
- package/dist/types/core/attributes/text.d.ts.map +0 -1
- package/dist/types/core/attributes/time.d.ts +0 -5
- package/dist/types/core/attributes/time.d.ts.map +0 -1
- package/dist/types/core/attributes/timestamp.d.ts +0 -5
- package/dist/types/core/attributes/timestamp.d.ts.map +0 -1
- package/dist/types/core/attributes/uid.d.ts.map +0 -1
- package/dist/types/core/attributes/utils.d.ts +0 -28
- package/dist/types/core/attributes/utils.d.ts.map +0 -1
- package/dist/types/core/commands/index.d.ts.map +0 -1
- package/dist/types/core/common/api.d.ts +0 -4
- package/dist/types/core/common/api.d.ts.map +0 -1
- package/dist/types/core/common/controller.d.ts.map +0 -1
- package/dist/types/core/common/index.d.ts +0 -15
- package/dist/types/core/common/index.d.ts.map +0 -1
- package/dist/types/core/common/middleware.d.ts.map +0 -1
- package/dist/types/core/common/module.d.ts +0 -25
- package/dist/types/core/common/module.d.ts.map +0 -1
- package/dist/types/core/common/plugin.d.ts +0 -6
- package/dist/types/core/common/plugin.d.ts.map +0 -1
- package/dist/types/core/common/policy.d.ts +0 -10
- package/dist/types/core/common/policy.d.ts.map +0 -1
- package/dist/types/core/common/router.d.ts.map +0 -1
- package/dist/types/core/common/schema.d.ts +0 -3
- package/dist/types/core/common/schema.d.ts.map +0 -1
- package/dist/types/core/common/service.d.ts.map +0 -1
- package/dist/types/core/common/uid.d.ts +0 -16
- package/dist/types/core/common/uid.d.ts.map +0 -1
- package/dist/types/core/config/admin.d.ts.map +0 -1
- package/dist/types/core/config/api.d.ts.map +0 -1
- package/dist/types/core/config/database.d.ts.map +0 -1
- package/dist/types/core/config/index.d.ts.map +0 -1
- package/dist/types/core/config/middlewares.d.ts.map +0 -1
- package/dist/types/core/config/plugin.d.ts.map +0 -1
- package/dist/types/core/config/server.d.ts.map +0 -1
- package/dist/types/core/config/shared.d.ts.map +0 -1
- package/dist/types/core/entity/index.d.ts +0 -2
- package/dist/types/core/entity/index.d.ts.map +0 -1
- package/dist/types/core/index.d.ts +0 -11
- package/dist/types/core/index.d.ts.map +0 -1
- package/dist/types/core/namespace.d.ts.map +0 -1
- package/dist/types/core/permissions/index.d.ts +0 -5
- package/dist/types/core/permissions/index.d.ts.map +0 -1
- package/dist/types/core/plugins/config/index.d.ts.map +0 -1
- package/dist/types/core/plugins/config/strapi-admin/index.d.ts.map +0 -1
- package/dist/types/core/plugins/config/strapi-server/config.d.ts.map +0 -1
- package/dist/types/core/plugins/config/strapi-server/content-types.d.ts.map +0 -1
- package/dist/types/core/plugins/config/strapi-server/controllers.d.ts +0 -8
- package/dist/types/core/plugins/config/strapi-server/controllers.d.ts.map +0 -1
- package/dist/types/core/plugins/config/strapi-server/index.d.ts.map +0 -1
- package/dist/types/core/plugins/config/strapi-server/lifecycle.d.ts.map +0 -1
- package/dist/types/core/plugins/config/strapi-server/routes.d.ts +0 -11
- package/dist/types/core/plugins/config/strapi-server/routes.d.ts.map +0 -1
- package/dist/types/core/plugins/index.d.ts +0 -33
- package/dist/types/core/plugins/index.d.ts.map +0 -1
- package/dist/types/core/registry.d.ts +0 -58
- package/dist/types/core/registry.d.ts.map +0 -1
- package/dist/types/core/schemas/index.d.ts +0 -134
- package/dist/types/core/schemas/index.d.ts.map +0 -1
- package/dist/types/core/strapi/index.d.ts +0 -26
- package/dist/types/core/strapi/index.d.ts.map +0 -1
- package/dist/types/core/uid.d.ts.map +0 -1
- package/dist/types/core-api/controller.d.ts.map +0 -1
- package/dist/types/core-api/index.d.ts.map +0 -1
- package/dist/types/core-api/router.d.ts.map +0 -1
- package/dist/types/core-api/service.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/shared/index.d.ts +0 -5
- package/dist/types/shared/index.d.ts.map +0 -1
- package/dist/types/shared/registries.d.ts +0 -38
- package/dist/types/shared/registries.d.ts.map +0 -1
- package/dist/types/utils/array.d.ts +0 -16
- package/dist/types/utils/array.d.ts.map +0 -1
- package/dist/types/utils/expression.d.ts +0 -44
- package/dist/types/utils/expression.d.ts.map +0 -1
- package/dist/types/utils/function.d.ts +0 -3
- package/dist/types/utils/function.d.ts.map +0 -1
- package/dist/types/utils/guard.d.ts +0 -20
- package/dist/types/utils/guard.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -27
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/types/utils/json.d.ts +0 -7
- package/dist/types/utils/json.d.ts.map +0 -1
- package/dist/types/utils/object.d.ts +0 -69
- package/dist/types/utils/object.d.ts.map +0 -1
- package/dist/types/utils/string.d.ts +0 -40
- package/dist/types/utils/string.d.ts.map +0 -1
- package/dist/types/utils/tuple.d.ts +0 -9
- package/dist/types/utils/tuple.d.ts.map +0 -1
- /package/dist/{types/core → core}/config/admin.d.ts +0 -0
- /package/dist/{types/core → core}/config/api.d.ts +0 -0
- /package/dist/{types/core → core}/config/index.d.ts +0 -0
- /package/dist/{types/core → core}/config/plugin.d.ts +0 -0
- /package/dist/{types/core → core}/config/shared.d.ts +0 -0
- /package/dist/{container.d.ts → core/container.d.ts} +0 -0
- /package/dist/{types → core}/core-api/index.d.ts +0 -0
- /package/dist/{types/core/common → core}/router.d.ts +0 -0
- /package/dist/{types/core/common → core}/service.d.ts +0 -0
- /package/dist/{types/core/plugins → plugin}/config/index.d.ts +0 -0
- /package/dist/{types/core/plugins → plugin}/config/strapi-admin/index.d.ts +0 -0
- /package/dist/{types/core/plugins → plugin}/config/strapi-server/config.d.ts +0 -0
- /package/dist/{types/core/plugins → plugin}/config/strapi-server/index.d.ts +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Intersect, JSONValue, JSONPrimitive } from '../../../utils';
|
|
2
|
+
import type { Attribute } from '../..';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a JSON Strapi attribute along with its options
|
|
5
|
+
*/
|
|
6
|
+
export type JSON = Intersect<[
|
|
7
|
+
Attribute.OfType<'json'>,
|
|
8
|
+
Attribute.ConfigurableOption,
|
|
9
|
+
Attribute.RequiredOption,
|
|
10
|
+
Attribute.PrivateOption,
|
|
11
|
+
Attribute.WritableOption,
|
|
12
|
+
Attribute.VisibleOption,
|
|
13
|
+
Attribute.DefaultOption<JSONPrimitive>
|
|
14
|
+
]>;
|
|
15
|
+
export type JsonValue = JSONValue;
|
|
16
|
+
export type GetJsonValue<T extends Attribute.Attribute> = T extends JSON ? JsonValue : never;
|
|
17
|
+
//# sourceMappingURL=json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../src/schema/attribute/definitions/json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,SAAS,CAC1B;IACE,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;IAExB,SAAS,CAAC,kBAAkB;IAC5B,SAAS,CAAC,cAAc;IACxB,SAAS,CAAC,aAAa;IACvB,SAAS,CAAC,cAAc;IACxB,SAAS,CAAC,aAAa;IAGvB,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC;CACvC,CACF,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC;AAElC,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,IAAI,GAAG,SAAS,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Constants, If, Intersect } from '../../../utils';
|
|
2
|
+
import type { Attribute } from '../..';
|
|
3
|
+
export type MediaTargetUID = 'plugin::upload.file';
|
|
4
|
+
export type MediaKind = 'images' | 'videos' | 'files' | 'audios';
|
|
5
|
+
export interface MediaProperties<TKind extends MediaKind | undefined = undefined, TMultiple extends Constants.BooleanValue = Constants.False> {
|
|
6
|
+
allowedTypes?: TKind | TKind[];
|
|
7
|
+
multiple?: TMultiple;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Represents a media Strapi attribute along with its options
|
|
11
|
+
*/
|
|
12
|
+
export type Media<TKind extends MediaKind | undefined = undefined, TMultiple extends Constants.BooleanValue = Constants.False> = Intersect<[
|
|
13
|
+
Attribute.OfType<'media'>,
|
|
14
|
+
MediaProperties<TKind, TMultiple>,
|
|
15
|
+
Attribute.ConfigurableOption,
|
|
16
|
+
Attribute.RequiredOption,
|
|
17
|
+
Attribute.PrivateOption,
|
|
18
|
+
Attribute.WritableOption,
|
|
19
|
+
Attribute.VisibleOption
|
|
20
|
+
]>;
|
|
21
|
+
export type MediaValue<TMultiple extends Constants.BooleanValue = Constants.False> = If<TMultiple, any[], any>;
|
|
22
|
+
export type GetMediaValue<TAttribute extends Attribute.Attribute> = TAttribute extends Media<infer _TKind, infer TMultiple> ? MediaValue<TMultiple> : never;
|
|
23
|
+
export type MediaTarget<TAttribute extends Attribute.Attribute> = TAttribute extends Media ? MediaTargetUID : never;
|
|
24
|
+
//# sourceMappingURL=media.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../../src/schema/attribute/definitions/media.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,cAAc,GAAG,qBAAqB,CAAC;AACnD,MAAM,MAAM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
|
4
|
+
* Represents a password Strapi attribute along with its options
|
|
5
|
+
*/
|
|
6
|
+
export type Password = Intersect<[
|
|
7
|
+
Attribute.OfType<'password'>,
|
|
8
|
+
Attribute.ConfigurableOption,
|
|
9
|
+
Attribute.DefaultOption<PasswordValue>,
|
|
10
|
+
Attribute.MinMaxLengthOption,
|
|
11
|
+
Attribute.PrivateOption,
|
|
12
|
+
Attribute.RequiredOption,
|
|
13
|
+
Attribute.WritableOption,
|
|
14
|
+
Attribute.VisibleOption
|
|
15
|
+
]>;
|
|
16
|
+
export type PasswordValue = string;
|
|
17
|
+
export type GetPasswordValue<T extends Attribute.Attribute> = T extends Password ? PasswordValue : never;
|
|
18
|
+
//# sourceMappingURL=password.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../../../src/schema/attribute/definitions/password.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,CAC9B;IACE,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC;IAE5B,SAAS,CAAC,kBAAkB;IAC5B,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC;IACtC,SAAS,CAAC,kBAAkB;IAC5B,SAAS,CAAC,aAAa;IACvB,SAAS,CAAC,cAAc;IACxB,SAAS,CAAC,cAAc;IACxB,SAAS,CAAC,aAAa;CACxB,CACF,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,QAAQ,GAC5E,aAAa,GACb,KAAK,CAAC"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type { AttributeNamesByType, Attribute } from '../..';
|
|
2
|
+
import type { ContentType } from '../../../data';
|
|
3
|
+
import type { Guard, String, Extends, If, Intersect } from '../../../utils';
|
|
4
|
+
import type * as UID from '../../../uid';
|
|
5
|
+
/**
|
|
6
|
+
* Represents a relation Strapi attribute along with its options
|
|
7
|
+
*/
|
|
8
|
+
export type Relation<TRelationKind extends RelationKind.Any = RelationKind.Any, TTargetUID extends UID.ContentType = UID.ContentType> = RelationWithTarget<Extract<TRelationKind, RelationKind.WithTarget>, TTargetUID> | RelationWithoutTarget<Extract<TRelationKind, RelationKind.WithoutTarget>>;
|
|
9
|
+
export type RelationWithTarget<TRelationKind extends RelationKind.WithTarget = RelationKind.WithTarget, TTargetUID extends UID.ContentType = UID.ContentType> = {
|
|
10
|
+
oneToOne: OneToOne<TTargetUID>;
|
|
11
|
+
oneToMany: OneToMany<TTargetUID>;
|
|
12
|
+
manyToOne: ManyToOne<TTargetUID>;
|
|
13
|
+
manyToMany: ManyToMany<TTargetUID>;
|
|
14
|
+
oneWay: OneWay<TTargetUID>;
|
|
15
|
+
manyWay: ManyWay<TTargetUID>;
|
|
16
|
+
morphOne: MorphOne<TTargetUID>;
|
|
17
|
+
morphMany: MorphMany<TTargetUID>;
|
|
18
|
+
}[TRelationKind];
|
|
19
|
+
type RelationWithoutTarget<TRelationKind extends RelationKind.WithoutTarget = RelationKind.WithoutTarget> = {
|
|
20
|
+
morphToOne: MorphToOne;
|
|
21
|
+
morphToMany: MorphToMany;
|
|
22
|
+
}[TRelationKind];
|
|
23
|
+
export type Bidirectional<TRelationKind extends RelationKind.BiDirectional = RelationKind.BiDirectional, TTargetUID extends UID.ContentType = UID.ContentType> = Relation<TRelationKind, TTargetUID>;
|
|
24
|
+
export type XWay<TRelationKind extends RelationKind.XWay = RelationKind.XWay, TTargetUID extends UID.ContentType = UID.ContentType> = Relation<TRelationKind, TTargetUID>;
|
|
25
|
+
export type MorphReference<TRelationKind extends RelationKind.MorphReference = RelationKind.MorphReference, TTargetUID extends UID.ContentType = UID.ContentType> = Relation<TRelationKind, TTargetUID>;
|
|
26
|
+
export type MorphOwner<TRelationKind extends RelationKind.MorphOwner = RelationKind.MorphOwner> = Relation<TRelationKind>;
|
|
27
|
+
export type RelationOptions = Intersect<[
|
|
28
|
+
Attribute.ConfigurableOption,
|
|
29
|
+
Attribute.PrivateOption,
|
|
30
|
+
Attribute.WritableOption,
|
|
31
|
+
Attribute.VisibleOption,
|
|
32
|
+
Attribute.RequiredOption,
|
|
33
|
+
{
|
|
34
|
+
useJoinTable?: boolean;
|
|
35
|
+
}
|
|
36
|
+
]>;
|
|
37
|
+
export type CommonBidirectionalProperties<TTargetUID extends UID.ContentType = UID.ContentType> = {
|
|
38
|
+
target: TTargetUID;
|
|
39
|
+
inversedBy?: string;
|
|
40
|
+
mappedBy?: string;
|
|
41
|
+
};
|
|
42
|
+
export type OneToOne<TTargetUID extends UID.ContentType = UID.ContentType> = Intersect<[
|
|
43
|
+
Attribute.OfType<'relation'>,
|
|
44
|
+
CommonBidirectionalProperties<TTargetUID>,
|
|
45
|
+
RelationOptions,
|
|
46
|
+
{
|
|
47
|
+
relation: 'oneToOne';
|
|
48
|
+
}
|
|
49
|
+
]>;
|
|
50
|
+
export type OneToMany<TTargetUID extends UID.ContentType = UID.ContentType> = Intersect<[
|
|
51
|
+
Attribute.OfType<'relation'>,
|
|
52
|
+
CommonBidirectionalProperties<TTargetUID>,
|
|
53
|
+
RelationOptions,
|
|
54
|
+
{
|
|
55
|
+
relation: 'oneToMany';
|
|
56
|
+
}
|
|
57
|
+
]>;
|
|
58
|
+
export type ManyToOne<TTargetUID extends UID.ContentType = UID.ContentType> = Intersect<[
|
|
59
|
+
Attribute.OfType<'relation'>,
|
|
60
|
+
CommonBidirectionalProperties<TTargetUID>,
|
|
61
|
+
RelationOptions,
|
|
62
|
+
{
|
|
63
|
+
relation: 'manyToOne';
|
|
64
|
+
}
|
|
65
|
+
]>;
|
|
66
|
+
export type ManyToMany<TTargetUID extends UID.ContentType = UID.ContentType> = Intersect<[
|
|
67
|
+
Attribute.OfType<'relation'>,
|
|
68
|
+
CommonBidirectionalProperties<TTargetUID>,
|
|
69
|
+
RelationOptions,
|
|
70
|
+
{
|
|
71
|
+
relation: 'manyToMany';
|
|
72
|
+
}
|
|
73
|
+
]>;
|
|
74
|
+
export type XWayCommonProperties<TTargetUID extends UID.ContentType = UID.ContentType> = {
|
|
75
|
+
target: TTargetUID;
|
|
76
|
+
};
|
|
77
|
+
export type OneWay<TTargetUID extends UID.ContentType = UID.ContentType> = Intersect<[
|
|
78
|
+
Attribute.OfType<'relation'>,
|
|
79
|
+
XWayCommonProperties<TTargetUID>,
|
|
80
|
+
RelationOptions,
|
|
81
|
+
{
|
|
82
|
+
relation: 'oneWay';
|
|
83
|
+
}
|
|
84
|
+
]>;
|
|
85
|
+
export type ManyWay<TTargetUID extends UID.ContentType = UID.ContentType> = Intersect<[
|
|
86
|
+
Attribute.OfType<'relation'>,
|
|
87
|
+
XWayCommonProperties<TTargetUID>,
|
|
88
|
+
RelationOptions,
|
|
89
|
+
{
|
|
90
|
+
relation: 'manyWay';
|
|
91
|
+
}
|
|
92
|
+
]>;
|
|
93
|
+
export type MorphReferenceCommonProperties<TTargetUID extends UID.ContentType = UID.ContentType> = {
|
|
94
|
+
target: TTargetUID;
|
|
95
|
+
morphBy?: Guard.Never<AttributeNamesByType<TTargetUID, 'relation', {
|
|
96
|
+
relation: RelationKind.MorphOwner;
|
|
97
|
+
}>, string>;
|
|
98
|
+
};
|
|
99
|
+
export type MorphOne<TTargetUID extends UID.ContentType = UID.ContentType> = Intersect<[
|
|
100
|
+
Attribute.OfType<'relation'>,
|
|
101
|
+
MorphReferenceCommonProperties<TTargetUID>,
|
|
102
|
+
RelationOptions,
|
|
103
|
+
{
|
|
104
|
+
relation: 'morphOne';
|
|
105
|
+
}
|
|
106
|
+
]>;
|
|
107
|
+
export type MorphMany<TTargetUID extends UID.ContentType = UID.ContentType> = Intersect<[
|
|
108
|
+
Attribute.OfType<'relation'>,
|
|
109
|
+
MorphReferenceCommonProperties<TTargetUID>,
|
|
110
|
+
RelationOptions,
|
|
111
|
+
{
|
|
112
|
+
relation: 'morphMany';
|
|
113
|
+
}
|
|
114
|
+
]>;
|
|
115
|
+
export type MorphToOne = Intersect<[
|
|
116
|
+
Attribute.OfType<'relation'>,
|
|
117
|
+
RelationOptions,
|
|
118
|
+
{
|
|
119
|
+
relation: 'morphToOne';
|
|
120
|
+
}
|
|
121
|
+
]>;
|
|
122
|
+
export type MorphToMany = Intersect<[
|
|
123
|
+
Attribute.OfType<'relation'>,
|
|
124
|
+
RelationOptions,
|
|
125
|
+
{
|
|
126
|
+
relation: 'morphToMany';
|
|
127
|
+
}
|
|
128
|
+
]>;
|
|
129
|
+
export type RelationPluralityModifier<TRelationKind extends RelationKind.Any, TValue> = If<IsManyRelation<TRelationKind>, TValue[], TValue>;
|
|
130
|
+
export type IsManyRelation<TRelationKind extends RelationKind.Any> = String.EndsWith<TRelationKind, 'Many'>;
|
|
131
|
+
export type RelationTarget<TAttribute extends Attribute.Attribute> = TAttribute extends Relation<RelationKind.WithTarget, infer TTarget> ? TTarget : never;
|
|
132
|
+
export type RelationValue<TRelationKind extends RelationKind.Any, TTargetUID extends UID.ContentType = never> = {
|
|
133
|
+
oneToOne: ContentType<TTargetUID>;
|
|
134
|
+
oneToMany: ContentType<TTargetUID>[];
|
|
135
|
+
manyToOne: ContentType<TTargetUID>;
|
|
136
|
+
manyToMany: ContentType<TTargetUID>[];
|
|
137
|
+
oneWay: ContentType<TTargetUID>;
|
|
138
|
+
manyWay: ContentType<TTargetUID>[];
|
|
139
|
+
morphOne: ContentType<TTargetUID>;
|
|
140
|
+
morphMany: ContentType<TTargetUID>[];
|
|
141
|
+
morphToOne: ContentType;
|
|
142
|
+
morphToMany: ContentType[];
|
|
143
|
+
}[TRelationKind];
|
|
144
|
+
export type GetRelationValue<TAttribute extends Attribute.Attribute> = TAttribute extends Relation<RelationKind.WithoutTarget> ? RelationValue<TAttribute['relation']> : TAttribute extends Relation<RelationKind.WithTarget, UID.ContentType> ? RelationValue<TAttribute['relation'], TAttribute['target']> : never;
|
|
145
|
+
export declare namespace RelationKind {
|
|
146
|
+
type GetOppositePlurality<TPlurality extends RelationKind.Left | RelationKind.Right> = {
|
|
147
|
+
one: 'many';
|
|
148
|
+
One: 'Many';
|
|
149
|
+
many: 'one';
|
|
150
|
+
Many: 'One';
|
|
151
|
+
}[TPlurality];
|
|
152
|
+
export type Plurality = 'one' | 'many';
|
|
153
|
+
export type Left = Lowercase<RelationKind.Plurality>;
|
|
154
|
+
export type Right = Capitalize<RelationKind.Plurality>;
|
|
155
|
+
export type MorphOwner = `morphTo${RelationKind.Right}`;
|
|
156
|
+
export type MorphReference = `morph${RelationKind.Right}`;
|
|
157
|
+
export type Morph = RelationKind.MorphOwner | RelationKind.MorphReference;
|
|
158
|
+
export type XWay = `${RelationKind.Left}Way`;
|
|
159
|
+
export type BiDirectional = `${RelationKind.Left}To${RelationKind.Right}`;
|
|
160
|
+
export type UniDirectional = RelationKind.MorphReference | RelationKind.XWay;
|
|
161
|
+
export type Any = RelationKind.BiDirectional | RelationKind.Morph | RelationKind.XWay;
|
|
162
|
+
export type WithTarget = RelationKind.BiDirectional | RelationKind.XWay | RelationKind.MorphReference;
|
|
163
|
+
export type WithoutTarget = RelationKind.MorphOwner;
|
|
164
|
+
export type Reverse<TRelationKind extends RelationKind.Any> = TRelationKind extends `${infer TLeft extends RelationKind.Left}To${infer TRight extends RelationKind.Right}` ? If<Extends<Uppercase<TLeft>, Uppercase<TRight>>, TRelationKind, `${GetOppositePlurality<TLeft>}To${GetOppositePlurality<TRight>}`> : TRelationKind;
|
|
165
|
+
export {};
|
|
166
|
+
}
|
|
167
|
+
export {};
|
|
168
|
+
//# sourceMappingURL=relation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relation.d.ts","sourceRoot":"","sources":["../../../../src/schema/attribute/definitions/relation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,E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AAC;IAE7C,MAAM,MAAM,aAAa,GAAG,GAAG,YAAY,CAAC,IAAI,KAAK,YAAY,CAAC,KAAK,EAAE,CAAC;IAC1E,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,cAAc,GAAG,YAAY,CAAC,IAAI,CAAC;IAE7E,MAAM,MAAM,GAAG,GAAG,YAAY,CAAC,aAAa,GAAG,YAAY,CAAC,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC;IAEtF,MAAM,MAAM,UAAU,GAClB,YAAY,CAAC,aAAa,GAC1B,YAAY,CAAC,IAAI,GACjB,YAAY,CAAC,cAAc,CAAC;IAEhC,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,UAAU,CAAC;IAEpD,MAAM,MAAM,OAAO,CAAC,aAAa,SAAS,YAAY,CAAC,GAAG,IACxD,aAAa,SAAS,GAAG,MAAM,KAAK,SAAS,YAAY,CAAC,IAAI,KAAK,MAAM,MAAM,SAAS,YAAY,CAAC,KAAK,EAAE,GACxG,EAAE,CACA,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,EAC5C,aAAa,EACb,GAAG,oBAAoB,CAAC,KAAK,CAAC,KAAK,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAClE,GACD,aAAa,CAAC;;CACrB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Intersect } from '../../../utils';
|
|
2
|
+
import type { Attribute } from '../..';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a rich-text Strapi attribute along with its options
|
|
5
|
+
*/
|
|
6
|
+
export type RichText = Intersect<[
|
|
7
|
+
Attribute.OfType<'richtext'>,
|
|
8
|
+
Attribute.ConfigurableOption,
|
|
9
|
+
Attribute.DefaultOption<RichTextValue>,
|
|
10
|
+
Attribute.MinMaxLengthOption,
|
|
11
|
+
Attribute.PrivateOption,
|
|
12
|
+
Attribute.RequiredOption,
|
|
13
|
+
Attribute.WritableOption,
|
|
14
|
+
Attribute.VisibleOption
|
|
15
|
+
]>;
|
|
16
|
+
export type RichTextValue = string;
|
|
17
|
+
export type GetRichTextValue<T extends Attribute.Attribute> = T extends RichText ? RichTextValue : never;
|
|
18
|
+
//# sourceMappingURL=richtext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"richtext.d.ts","sourceRoot":"","sources":["../../../../src/schema/attribute/definitions/richtext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,CAC9B;IACE,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC;IAE5B,SAAS,CAAC,kBAAkB;IAC5B,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC;IACtC,SAAS,CAAC,kBAAkB;IAC5B,SAAS,CAAC,aAAa;IACvB,SAAS,CAAC,cAAc;IACxB,SAAS,CAAC,cAAc;IACxB,SAAS,CAAC,aAAa;CACxB,CACF,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,QAAQ,GAC5E,aAAa,GACb,KAAK,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Intersect } from '../../../utils';
|
|
2
|
+
import type { Attribute } from '../..';
|
|
3
|
+
export interface StringProperties {
|
|
4
|
+
regex?: RegExp;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Represents a string Strapi attribute along with its options
|
|
8
|
+
*/
|
|
9
|
+
type StringAttribute = Intersect<[
|
|
10
|
+
Attribute.OfType<'string'>,
|
|
11
|
+
StringProperties,
|
|
12
|
+
Attribute.ConfigurableOption,
|
|
13
|
+
Attribute.DefaultOption<StringValue>,
|
|
14
|
+
Attribute.MinMaxLengthOption,
|
|
15
|
+
Attribute.PrivateOption,
|
|
16
|
+
Attribute.UniqueOption,
|
|
17
|
+
Attribute.RequiredOption,
|
|
18
|
+
Attribute.WritableOption,
|
|
19
|
+
Attribute.VisibleOption
|
|
20
|
+
]>;
|
|
21
|
+
export type StringValue = string;
|
|
22
|
+
export type GetStringValue<T extends Attribute.Attribute> = T extends StringAttribute ? StringValue : never;
|
|
23
|
+
/**
|
|
24
|
+
* Represents a string Strapi attribute along with its options
|
|
25
|
+
*/
|
|
26
|
+
export type String = StringAttribute;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=string.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../src/schema/attribute/definitions/string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,KAAK,eAAe,GAAG,SAAS,CAC9B;IACE,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC;IAE1B,gBAAgB;IAEhB,SAAS,CAAC,kBAAkB;IAC5B,SAAS,CAAC,aAAa,CAAC,WAAW,CAAC;IACpC,SAAS,CAAC,kBAAkB;IAC5B,SAAS,CAAC,aAAa;IACvB,SAAS,CAAC,YAAY;IACtB,SAAS,CAAC,cAAc;IACxB,SAAS,CAAC,cAAc;IACxB,SAAS,CAAC,aAAa;CACxB,CACF,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,eAAe,GACjF,WAAW,GACX,KAAK,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Intersect } from '../../../utils';
|
|
2
|
+
import type { Attribute } from '../..';
|
|
3
|
+
export interface TextProperties {
|
|
4
|
+
regex?: RegExp;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Represents a text Strapi attribute along with its options
|
|
8
|
+
*/
|
|
9
|
+
export type Text = Intersect<[
|
|
10
|
+
Attribute.OfType<'text'>,
|
|
11
|
+
TextProperties,
|
|
12
|
+
Attribute.ConfigurableOption,
|
|
13
|
+
Attribute.DefaultOption<TextValue>,
|
|
14
|
+
Attribute.MinMaxLengthOption,
|
|
15
|
+
Attribute.PrivateOption,
|
|
16
|
+
Attribute.UniqueOption,
|
|
17
|
+
Attribute.RequiredOption,
|
|
18
|
+
Attribute.WritableOption,
|
|
19
|
+
Attribute.VisibleOption
|
|
20
|
+
]>;
|
|
21
|
+
export type TextValue = string;
|
|
22
|
+
export type GetTextValue<T extends Attribute.Attribute> = T extends Text ? TextValue : never;
|
|
23
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../src/schema/attribute/definitions/text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,SAAS,CAC1B;IACE,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;IAExB,cAAc;IAEd,SAAS,CAAC,kBAAkB;IAC5B,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC;IAClC,SAAS,CAAC,kBAAkB;IAC5B,SAAS,CAAC,aAAa;IACvB,SAAS,CAAC,YAAY;IACtB,SAAS,CAAC,cAAc;IACxB,SAAS,CAAC,cAAc;IACxB,SAAS,CAAC,aAAa;CACxB,CACF,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,IAAI,GAAG,SAAS,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Intersect } from '../../../utils';
|
|
2
|
+
import type { Attribute } from '../..';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a time Strapi attribute along with its options
|
|
5
|
+
*/
|
|
6
|
+
export type Time = Intersect<[
|
|
7
|
+
Attribute.OfType<'time'>,
|
|
8
|
+
Attribute.ConfigurableOption,
|
|
9
|
+
Attribute.DefaultOption<TimeValue>,
|
|
10
|
+
Attribute.PrivateOption,
|
|
11
|
+
Attribute.RequiredOption,
|
|
12
|
+
Attribute.UniqueOption,
|
|
13
|
+
Attribute.WritableOption,
|
|
14
|
+
Attribute.VisibleOption
|
|
15
|
+
]>;
|
|
16
|
+
export type TimeValue = globalThis.Date | string;
|
|
17
|
+
export type GetTimeValue<T extends Attribute.Attribute> = T extends Time ? TimeValue : never;
|
|
18
|
+
//# sourceMappingURL=time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../../src/schema/attribute/definitions/time.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,SAAS,CAC1B;IACE,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;IAExB,SAAS,CAAC,kBAAkB;IAC5B,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC;IAClC,SAAS,CAAC,aAAa;IACvB,SAAS,CAAC,cAAc;IACxB,SAAS,CAAC,YAAY;IACtB,SAAS,CAAC,cAAc;IACxB,SAAS,CAAC,aAAa;CACxB,CACF,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,GAAG,MAAM,CAAC;AAEjD,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,IAAI,GAAG,SAAS,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Intersect } from '../../../utils';
|
|
2
|
+
import type { Attribute } from '../..';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a timestamp Strapi attribute along with its options
|
|
5
|
+
*/
|
|
6
|
+
export type Timestamp = Intersect<[
|
|
7
|
+
Attribute.OfType<'timestamp'>,
|
|
8
|
+
Attribute.ConfigurableOption,
|
|
9
|
+
Attribute.DefaultOption<TimestampValue>,
|
|
10
|
+
Attribute.PrivateOption,
|
|
11
|
+
Attribute.RequiredOption,
|
|
12
|
+
Attribute.UniqueOption,
|
|
13
|
+
Attribute.WritableOption,
|
|
14
|
+
Attribute.VisibleOption
|
|
15
|
+
]>;
|
|
16
|
+
export type TimestampValue = globalThis.Date | number | string;
|
|
17
|
+
export type GetTimestampValue<T extends Attribute.Attribute> = T extends Timestamp ? TimestampValue : never;
|
|
18
|
+
//# sourceMappingURL=timestamp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timestamp.d.ts","sourceRoot":"","sources":["../../../../src/schema/attribute/definitions/timestamp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,CAC/B;IACE,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC;IAE7B,SAAS,CAAC,kBAAkB;IAC5B,SAAS,CAAC,aAAa,CAAC,cAAc,CAAC;IACvC,SAAS,CAAC,aAAa;IACvB,SAAS,CAAC,cAAc;IACxB,SAAS,CAAC,YAAY;IACtB,SAAS,CAAC,cAAc;IACxB,SAAS,CAAC,aAAa;CACxB,CACF,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/D,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,SAAS,GAC9E,cAAc,GACd,KAAK,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Intersect } from '../../../utils';
|
|
2
|
+
import type { Attribute } from '../..';
|
|
2
3
|
export interface UIDOptions {
|
|
3
4
|
separator?: string;
|
|
4
5
|
lowercase?: boolean;
|
|
@@ -10,7 +11,20 @@ export interface UIDProperties<TTargetAttribute extends string = string, TOption
|
|
|
10
11
|
targetField?: TTargetAttribute;
|
|
11
12
|
options?: UIDOptions & TOptions;
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Represents a UID Strapi attribute along with its options
|
|
16
|
+
*/
|
|
17
|
+
export type UID<TTargetAttribute extends string = string, TOptions extends UIDOptions = UIDOptions> = Intersect<[
|
|
18
|
+
Attribute.OfType<'uid'>,
|
|
19
|
+
UIDProperties<TTargetAttribute, TOptions>,
|
|
20
|
+
Attribute.ConfigurableOption,
|
|
21
|
+
Attribute.DefaultOption<UIDValue>,
|
|
22
|
+
Attribute.MinMaxLengthOption,
|
|
23
|
+
Attribute.PrivateOption,
|
|
24
|
+
Attribute.RequiredOption,
|
|
25
|
+
Attribute.WritableOption,
|
|
26
|
+
Attribute.VisibleOption
|
|
27
|
+
]>;
|
|
14
28
|
export type UIDValue = string;
|
|
15
29
|
export type GetUIDValue<TAttribute extends Attribute.Attribute> = TAttribute extends UID ? UIDValue : never;
|
|
16
30
|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,SAAS,IAAI,UAAU,SAAS,GAAG,GACpF,QAAQ,GACR,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schema/attribute/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interfaces and types designed for managing attribute options.
|
|
3
|
+
*
|
|
4
|
+
* It includes (but is not limited to) settings for requirements, privacy, uniqueness, default values, configurability,
|
|
5
|
+
* constraints, visibility, and writability of an attribute as well as the provision for custom fields.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Specifies whether an attribute is required to be filled.
|
|
9
|
+
*
|
|
10
|
+
* If not defined, it defaults to false.
|
|
11
|
+
*/
|
|
12
|
+
export interface RequiredOption {
|
|
13
|
+
required?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Specifies whether an attribute is private and should be included in the content API entries.
|
|
17
|
+
*
|
|
18
|
+
* If not defined, it defaults to false.
|
|
19
|
+
*/
|
|
20
|
+
export interface PrivateOption {
|
|
21
|
+
private?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Specifies whether an attribute must have unique values for each entry.
|
|
25
|
+
*
|
|
26
|
+
* If not defined, it defaults to false.
|
|
27
|
+
*/
|
|
28
|
+
export interface UniqueOption {
|
|
29
|
+
unique?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Allow declaring a default value for an attribute's value.
|
|
33
|
+
*
|
|
34
|
+
* If not defined, there is no default value and the field will default to `null`.
|
|
35
|
+
*/
|
|
36
|
+
export interface DefaultOption<T> {
|
|
37
|
+
default?: T | (() => T);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Specifies whether an attribute can be configured from the admin panel.
|
|
41
|
+
*
|
|
42
|
+
* If not defined, it defaults to false.
|
|
43
|
+
*/
|
|
44
|
+
export interface ConfigurableOption {
|
|
45
|
+
configurable?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Sets a minimum and/or maximum constraint for an attribute.
|
|
49
|
+
*
|
|
50
|
+
* If any of the property is undefined, there won't be any limit.
|
|
51
|
+
*
|
|
52
|
+
* @template T - The min/max type
|
|
53
|
+
*/
|
|
54
|
+
export interface MinMaxOption<T = number> {
|
|
55
|
+
min?: T;
|
|
56
|
+
max?: T;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Sets a minimum length and/or maximum length constraint for the total length for a text based field.
|
|
60
|
+
*
|
|
61
|
+
* If any of the property is undefined, there won't be any limit.
|
|
62
|
+
*/
|
|
63
|
+
export interface MinMaxLengthOption {
|
|
64
|
+
minLength?: number;
|
|
65
|
+
maxLength?: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Specified whether an attribute's value can be filled using the content API (REST or GraphQL)
|
|
69
|
+
*
|
|
70
|
+
* If not defined, the attribute is considered writable.
|
|
71
|
+
*/
|
|
72
|
+
export interface WritableOption {
|
|
73
|
+
writable?: boolean;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Specifies whether an attribute should be visible in the content-manager.
|
|
77
|
+
*
|
|
78
|
+
* If not defined, the attribute is considered visible.
|
|
79
|
+
*/
|
|
80
|
+
export interface VisibleOption {
|
|
81
|
+
visible?: boolean;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Setters for the attributes options
|
|
85
|
+
*/
|
|
86
|
+
/**
|
|
87
|
+
* Forces the attribute to be required.
|
|
88
|
+
*
|
|
89
|
+
* @see RequiredOption
|
|
90
|
+
*/
|
|
91
|
+
export type Required = {
|
|
92
|
+
required: true;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Forces the attribute to be optional
|
|
96
|
+
*
|
|
97
|
+
* @see RequiredOption
|
|
98
|
+
*/
|
|
99
|
+
export type NonRequired = {
|
|
100
|
+
required: false;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Forces the attribute to be private
|
|
104
|
+
*
|
|
105
|
+
* @see PrivateOption
|
|
106
|
+
*/
|
|
107
|
+
export type Private = {
|
|
108
|
+
private: true;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Forces the attribute to not be private
|
|
112
|
+
*
|
|
113
|
+
* @see PrivateOption
|
|
114
|
+
*/
|
|
115
|
+
export type NonPrivate = {
|
|
116
|
+
private: false;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Forces the attribute to be unique
|
|
120
|
+
*
|
|
121
|
+
* @see UniqueOption
|
|
122
|
+
*/
|
|
123
|
+
export type Unique = {
|
|
124
|
+
unique: true;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Forces the attribute not to be unique
|
|
128
|
+
*
|
|
129
|
+
* @see UniqueOption
|
|
130
|
+
*/
|
|
131
|
+
export type NonUnique = {
|
|
132
|
+
unique: false;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Forces the attribute not to be configurable
|
|
136
|
+
*
|
|
137
|
+
* @see ConfigurableOption
|
|
138
|
+
*/
|
|
139
|
+
export type Configurable = {
|
|
140
|
+
configurable: true;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Forces the attribute not to be configurable
|
|
144
|
+
*
|
|
145
|
+
* @see ConfigurableOption
|
|
146
|
+
*/
|
|
147
|
+
export type NonConfigurable = {
|
|
148
|
+
configurable: false;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Forces the attribute to be writable
|
|
152
|
+
*
|
|
153
|
+
* @see WritableOption
|
|
154
|
+
*/
|
|
155
|
+
export type Writable = {
|
|
156
|
+
writable: true;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Forces the attribute not to be writable
|
|
160
|
+
*
|
|
161
|
+
* @see WritableOption
|
|
162
|
+
*/
|
|
163
|
+
export type NonWritable = {
|
|
164
|
+
writable: false;
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Forces the attribute to be visible
|
|
168
|
+
*
|
|
169
|
+
* @see VisibleOption
|
|
170
|
+
*/
|
|
171
|
+
export type Visible = {
|
|
172
|
+
visible: true;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Forces the attribute to be invisible
|
|
176
|
+
*
|
|
177
|
+
* @see VisibleOption
|
|
178
|
+
*/
|
|
179
|
+
export type NonVisible = {
|
|
180
|
+
visible: false;
|
|
181
|
+
};
|
|
182
|
+
export type CustomField<TKind extends string, TOptions extends object | undefined = undefined> = {
|
|
183
|
+
customField: TKind;
|
|
184
|
+
options?: TOptions;
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Creates a {@link MinMaxOption} configuration object with the given values.
|
|
188
|
+
*
|
|
189
|
+
* @template TConfig The min/max configuration
|
|
190
|
+
* @template TType The type of the values.
|
|
191
|
+
*
|
|
192
|
+
* @see MinMaxOption
|
|
193
|
+
*/
|
|
194
|
+
export type SetMinMax<TConfig extends MinMaxOption<TType>, TType = number> = TConfig;
|
|
195
|
+
/**
|
|
196
|
+
* Creates a {@link MinMaxLengthOption} configuration object with the given values.
|
|
197
|
+
*
|
|
198
|
+
* @template TConfig The minLength/maxLength configuration
|
|
199
|
+
*
|
|
200
|
+
* @see MinMaxLengthOption
|
|
201
|
+
*/
|
|
202
|
+
export type SetMinMaxLength<TConfig extends MinMaxLengthOption> = TConfig;
|
|
203
|
+
/**
|
|
204
|
+
* Creates a plugin options' configuration object with the given values.
|
|
205
|
+
*
|
|
206
|
+
* @template TConfig The plugin options
|
|
207
|
+
*/
|
|
208
|
+
export type SetPluginOptions<TConfig extends object = object> = {
|
|
209
|
+
pluginOptions?: TConfig;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Sets a default value for a {@link DefaultOption}
|
|
213
|
+
*
|
|
214
|
+
* @template T
|
|
215
|
+
*
|
|
216
|
+
* @see DefaultOption
|
|
217
|
+
*/
|
|
218
|
+
export type DefaultTo<T> = {
|
|
219
|
+
default: T;
|
|
220
|
+
};
|
|
221
|
+
//# sourceMappingURL=options.d.ts.map
|