@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,168 @@
|
|
|
1
|
+
import type * as Internal from '../internal';
|
|
2
|
+
import type * as Struct from '../struct';
|
|
3
|
+
import type { Constants, Guard, Object, Extends, Or } from '../utils';
|
|
4
|
+
import type * as Public from '../public';
|
|
5
|
+
/**
|
|
6
|
+
* Combines ContentType and Component UID types in a single union type.
|
|
7
|
+
*
|
|
8
|
+
* `UID.Schema` provides the ability to deal with both content types and components through one streamlined type.
|
|
9
|
+
*
|
|
10
|
+
* It hinges on underlying schema registries, which aggregates and maps unique identifiers to their respective schemas.
|
|
11
|
+
*
|
|
12
|
+
* This type would typically be used where the context is not particular about dealing with content types or components exclusively but rather any kind of schema.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* Let's assume we need a function that processes schema irrespective of whether it's ContenType or Component.
|
|
16
|
+
*
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import type { UID } from '@strapi/types';
|
|
19
|
+
*
|
|
20
|
+
* function processSchema(schemaID: UID.Schema) {
|
|
21
|
+
* // Implementation goes here...
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* // Now, calling processSchema() with uid of content type
|
|
25
|
+
* processSchema('api::foo.foo');
|
|
26
|
+
*
|
|
27
|
+
* // And calling processSchema() with uid of component
|
|
28
|
+
* processSchema('default.foo');
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @see {@link ContentType} Identifier for content types based on the public registry.
|
|
32
|
+
* @see {@link Component} Identifier for components based on the public registry.
|
|
33
|
+
*/
|
|
34
|
+
export type Schema = ContentType | Component;
|
|
35
|
+
/**
|
|
36
|
+
* Unique identifiers for any content-type defined in the public content-type registry.
|
|
37
|
+
*
|
|
38
|
+
* Useful when it's required to work with data structures that can only be identified by the underlying content-type UID.
|
|
39
|
+
*
|
|
40
|
+
* When no content-types are declared in the registry, it uses the generic {@link Internal.UID.ContentType} instead.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* Here's an example of how to use the `UID.ContentType` type:
|
|
44
|
+
*
|
|
45
|
+
* ```typescript
|
|
46
|
+
* import type { UID } from '@strapi/types';
|
|
47
|
+
*
|
|
48
|
+
* // Assume we have a function that requires a ContentType UID
|
|
49
|
+
* function fetchSchema(uid: UID.ContentType) {
|
|
50
|
+
* // Implementation goes here...
|
|
51
|
+
* }
|
|
52
|
+
*
|
|
53
|
+
* // Now you can pass the unique identifier for a content type to fetch its schema
|
|
54
|
+
* fetchSchema('api::foo.foo');
|
|
55
|
+
* ```
|
|
56
|
+
* @see {@link Public.ContentTypeSchemas} Content-type public registry.
|
|
57
|
+
* @see {@link UID.ContentType} ContentType UID format definition.
|
|
58
|
+
*/
|
|
59
|
+
export type ContentType = Internal.Registry.Keys<Public.ContentTypeSchemas, Internal.UID.ContentType>;
|
|
60
|
+
/**
|
|
61
|
+
* Unique identifiers for any component defined in the public component registry.
|
|
62
|
+
*
|
|
63
|
+
* Useful when it's required to work with data structures that can only be identified by the underlying component UID.
|
|
64
|
+
*
|
|
65
|
+
* When no component are declared in the registry, it uses the generic {@link Internal.UID.Component} instead.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* Here's an example of how to use the `UID.Component` type:
|
|
69
|
+
*
|
|
70
|
+
* ```typescript
|
|
71
|
+
* import type { UID } from '@strapi/types';
|
|
72
|
+
*
|
|
73
|
+
* // Assume we have a function that requires a Component UID
|
|
74
|
+
* function fetchSchema(uid: UID.Component) {
|
|
75
|
+
* // Implementation goes here...
|
|
76
|
+
* }
|
|
77
|
+
*
|
|
78
|
+
* // Now you can pass the unique identifier for a component to fetch its schema
|
|
79
|
+
* fetchSchema('default.foo');
|
|
80
|
+
* ```
|
|
81
|
+
* @see {@link Public.ComponentSchemas} Component public registry.
|
|
82
|
+
* @see {@link UID.Component} Component UID format definition.
|
|
83
|
+
*/
|
|
84
|
+
export type Component = Internal.Registry.Keys<Public.ComponentSchemas, Internal.UID.Component>;
|
|
85
|
+
/**
|
|
86
|
+
* Obtains a union of every component's category from the public component registry.
|
|
87
|
+
*
|
|
88
|
+
* It utilizes [conditional types inference](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#inferring-within-conditional-types) to extract the category name from the components' UID.
|
|
89
|
+
*
|
|
90
|
+
* The component UID format is a string that follows a specific pattern defined by {@link Internal.UID.Component}.
|
|
91
|
+
* If a type extends `Internal.UID.Component`, it implies that it has a structure with `TCategory` string as the category name of the component.
|
|
92
|
+
*
|
|
93
|
+
* @see {@link Internal.UID.Component} for more details on how the component's unique identifier is structured.
|
|
94
|
+
*/
|
|
95
|
+
export type ComponentCategory = Component extends Internal.UID.Component<infer TCategory> ? TCategory : never;
|
|
96
|
+
/**
|
|
97
|
+
* Collection-Type UID based on the public content-type registry
|
|
98
|
+
*
|
|
99
|
+
* If no collection type is found, it fallbacks to a generic content-type UID.
|
|
100
|
+
*/
|
|
101
|
+
export type CollectionType = Guard.Never<Extract<Object.KeysBy<Public.ContentTypeSchemas, Struct.CollectionTypeSchema>, ContentType>, Internal.UID.ContentType>;
|
|
102
|
+
/**
|
|
103
|
+
* Single-Type UID based on the public content-type registry
|
|
104
|
+
*
|
|
105
|
+
* If no single type is found, it falls back to a generic content-type UID.
|
|
106
|
+
*/
|
|
107
|
+
export type SingleType = Guard.Never<Extract<Object.KeysBy<Public.ContentTypeSchemas, Struct.SingleTypeSchema>, ContentType>, Internal.UID.ContentType>;
|
|
108
|
+
/**
|
|
109
|
+
* Service UID based on the public service registry
|
|
110
|
+
*
|
|
111
|
+
* @see {Public.Services}
|
|
112
|
+
*/
|
|
113
|
+
export type Service = Internal.Registry.Keys<Public.Services, Internal.UID.Service>;
|
|
114
|
+
/**
|
|
115
|
+
* Controller UID based on the public service registry
|
|
116
|
+
*
|
|
117
|
+
* @see {Public.Controllers}
|
|
118
|
+
*/
|
|
119
|
+
export type Controller = Internal.Registry.Keys<Public.Controllers, Internal.UID.Controller>;
|
|
120
|
+
/**
|
|
121
|
+
* Policy UID based on the public service registry
|
|
122
|
+
*
|
|
123
|
+
* @see {Public.Policies}
|
|
124
|
+
*/
|
|
125
|
+
export type Policy = Internal.Registry.Keys<Public.Policies, Internal.UID.Policy>;
|
|
126
|
+
/**
|
|
127
|
+
* Middleware UID based on the public service registry
|
|
128
|
+
*
|
|
129
|
+
* @see {Public.Middlewares}
|
|
130
|
+
*/
|
|
131
|
+
export type Middleware = Internal.Registry.Keys<Public.Middlewares, Internal.UID.Middleware>;
|
|
132
|
+
/**
|
|
133
|
+
* Verifies if a certain schema UIDs correspond to a collection type.
|
|
134
|
+
*
|
|
135
|
+
* Given a schema UID, it checks if it matches the {@link CollectionType} UID type. Since {@link CollectionType}
|
|
136
|
+
* can resolve to the more generic {@link ContentType} type, we also need to check that the associated
|
|
137
|
+
* schema extends the {@link Struct.CollectionTypeSchema} data structure.
|
|
138
|
+
*
|
|
139
|
+
* @template TSchemaUID - The UID of the schema
|
|
140
|
+
*/
|
|
141
|
+
export type IsCollectionType<TSchemaUID extends Schema> = TSchemaUID extends CollectionType ? Extends<Public.ContentTypeSchemas[TSchemaUID], Struct.CollectionTypeSchema> : Constants.False;
|
|
142
|
+
/**
|
|
143
|
+
* Verifies if a certain schema UIDs correspond to a single type.
|
|
144
|
+
*
|
|
145
|
+
* Given a schema UID, it checks if it matches the {@link SingleType} UID type. Since {@link SingleType}
|
|
146
|
+
* can resolve to the more generic {@link ContentType} type, we also need to check that the associated
|
|
147
|
+
* schema extends the {@link Struct.CollectionTypeSchema} data structure.
|
|
148
|
+
*
|
|
149
|
+
* @template TSchemaUID - The UID of the schema
|
|
150
|
+
*/
|
|
151
|
+
export type IsSingleType<TSchemaUID extends Schema> = TSchemaUID extends SingleType ? Extends<Public.ContentTypeSchemas[TSchemaUID], Struct.SingleTypeSchema> : Constants.False;
|
|
152
|
+
/**
|
|
153
|
+
* Verifies if a certain schema UIDs correspond to a component.
|
|
154
|
+
*
|
|
155
|
+
* Given a schema UID, it checks if it matches the {@link Component} UID type.
|
|
156
|
+
*
|
|
157
|
+
* @template TSchemaUID - The UID of the schema
|
|
158
|
+
*/
|
|
159
|
+
export type IsComponent<TSchemaUID extends Schema> = TSchemaUID extends Component ? Extends<Public.ComponentSchemas[TSchemaUID], Struct.ComponentSchema> : Constants.False;
|
|
160
|
+
/**
|
|
161
|
+
* Verifies if a certain schema UIDs correspond to a content-type.
|
|
162
|
+
*
|
|
163
|
+
* Given a schema UID, it checks if it matches the {@link ContentType} UID type.
|
|
164
|
+
*
|
|
165
|
+
* @template TSchemaUID - The UID of the schema
|
|
166
|
+
*/
|
|
167
|
+
export type IsContentType<TSchemaUID extends Schema> = TSchemaUID extends ContentType ? Or<IsCollectionType<TSchemaUID>, IsSingleType<TSchemaUID>> : Constants.False;
|
|
168
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/uid/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { Extends, Not } from '.';
|
|
2
|
+
/**
|
|
3
|
+
* The `Values` type extracts the type of the values stored in arrays or tuples.
|
|
4
|
+
*
|
|
5
|
+
* @returns A union of every value contained in the array/tuple
|
|
6
|
+
*
|
|
7
|
+
* @template TCollection - The array-like structure from which the values' type will be extracted.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* Let's suppose we have an array of numbers, and we would like to extract the type its values
|
|
11
|
+
*
|
|
12
|
+
* ```typescript
|
|
13
|
+
* type MyTuple = [1, 2, 3, 4];
|
|
14
|
+
*
|
|
15
|
+
* type TupleValues = Values<MyTuple>; // TupleValues: 1 | 2 | 3 | 4
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* Now, let's suppose we have a regular TypeScript array, and we would like to extract its value
|
|
20
|
+
*
|
|
21
|
+
* ```typescript
|
|
22
|
+
* type MyArray = (string | number)[];
|
|
23
|
+
*
|
|
24
|
+
* type ArrayValues = Values<MyArray>; // ArrayValues: string | number
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export type Values<TCollection extends Array<unknown>> = TCollection extends Array<infer TValues> ? TValues : never;
|
|
28
|
+
/**
|
|
29
|
+
* Checks if a given array ({@link TCollection}) is empty.
|
|
30
|
+
*
|
|
31
|
+
* @template TCollection - The array to be checked. It should extend 'Array<unknown>'.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* Validate an array that is empty:
|
|
35
|
+
* ```typescript
|
|
36
|
+
* type EmptyArray = [];
|
|
37
|
+
*
|
|
38
|
+
* type IsEmptyCheck = IsEmpty<EmptyArray>;
|
|
39
|
+
* // Result: Constants.True
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* Validate an array that is not empty:
|
|
44
|
+
* ```typescript
|
|
45
|
+
* type NonEmptyArray = [1, 2, 3];
|
|
46
|
+
*
|
|
47
|
+
* type IsEmptyCheck = IsEmpty<NonEmptyArray>;
|
|
48
|
+
* // Result: Constants.False
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export type IsEmpty<TCollection extends Array<unknown>> = Extends<TCollection['length'], 0>;
|
|
52
|
+
/**
|
|
53
|
+
* Checks if a given array ({@link TCollection}) is not empty.
|
|
54
|
+
*
|
|
55
|
+
* @template TCollection - The collection (array) that needs to be checked if it's not empty. It must extend 'Array<unknown>'.
|
|
56
|
+
*
|
|
57
|
+
* @see {@link Not}
|
|
58
|
+
* @see {@link IsEmpty}
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* Checking non-empty array:
|
|
62
|
+
* ```typescript
|
|
63
|
+
* type NonEmptyArray = [1, 2, 3];
|
|
64
|
+
*
|
|
65
|
+
* // This type checks will result to True because
|
|
66
|
+
* // 'NonEmptyArray' is indeed not empty.
|
|
67
|
+
* type IsNotEmptyCheck = IsNotEmpty<NonEmptyArray>;
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* Checking empty array:
|
|
72
|
+
* ```typescript
|
|
73
|
+
* type EmptyArray = [];
|
|
74
|
+
*
|
|
75
|
+
* // This type checks will result to False because 'EmptyArray' is empty.
|
|
76
|
+
* type IsNotEmptyCheck = IsNotEmpty<EmptyArray>;
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export type IsNotEmpty<TCollection extends Array<unknown>> = Not<IsEmpty<TCollection>>;
|
|
80
|
+
//# sourceMappingURL=array.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/utils/array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,MAAM,CAAC,WAAW,SAAS,KAAK,CAAC,OAAO,CAAC,IACnD,WAAW,SAAS,KAAK,CAAC,MAAM,OAAO,CAAC,GAAG,OAAO,GAAG,KAAK,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,OAAO,CAAC,WAAW,SAAS,KAAK,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,MAAM,UAAU,CAAC,WAAW,SAAS,KAAK,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type * as Internal from '../internal';
|
|
2
|
+
import type * as UID from '../uid';
|
|
3
|
+
import type { NotStrictEqual, Or } from '.';
|
|
4
|
+
export type True = true;
|
|
5
|
+
export type False = false;
|
|
6
|
+
export type BooleanValue = True | False;
|
|
7
|
+
/**
|
|
8
|
+
* Determine if there's been an extension or change in either Component Registry or Content-Type Registry.
|
|
9
|
+
*
|
|
10
|
+
* It applies the compound boolean OR operation on the results derived from {@link IsComponentRegistryExtended} and {@link IsContentTypeRegistryExtended}.
|
|
11
|
+
*
|
|
12
|
+
* If either or both results are true (indicating a change or extension in the corresponding registry), it returns {@link True}; otherwise, it returns {@link False}.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // A change or extension in both the Component Registry and the Content-Type Registry
|
|
17
|
+
* type Example1 = AreSchemaRegistriesExtended; // Result: Constants.True
|
|
18
|
+
*
|
|
19
|
+
* // A change or extension only in the Component Registry
|
|
20
|
+
* type Example2 = IsComponentRegistryExtended; // Result: Constants.True
|
|
21
|
+
*
|
|
22
|
+
* // A change or extension only in the Content-Type Registry
|
|
23
|
+
* type Example3 = IsContentTypeRegistryExtended; // Result: Constants.True
|
|
24
|
+
|
|
25
|
+
* // No change or extension in either registries
|
|
26
|
+
* type Example4 = AreSchemaRegistriesExtended; // Result: Constants.False
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @see IsComponentRegistryExtended
|
|
30
|
+
* @see IsContentTypeRegistryExtended
|
|
31
|
+
*/
|
|
32
|
+
export type AreSchemaRegistriesExtended = Or<IsComponentRegistryExtended, IsContentTypeRegistryExtended>;
|
|
33
|
+
/**
|
|
34
|
+
* Evaluate if the internal UIDs ({@link Internal.UID.ContentType}) and public ones ({@link UID.ContentType}) are not identical.
|
|
35
|
+
*
|
|
36
|
+
* If these two types are not the same, it indicates an extension or change has occurred in the public Content-Type Registry.
|
|
37
|
+
*
|
|
38
|
+
* The type leverages {@link NotStrictEqual} to perform this comparison accurately. The result is a type-level
|
|
39
|
+
* boolean that denotes whether there is a deviation between the two Content-Type representations.
|
|
40
|
+
*
|
|
41
|
+
* @returns Either [Constants.True](@link Constants.True) if the Content-Type Registry has been extended, else [Constants.False](@link Constants.False).
|
|
42
|
+
*
|
|
43
|
+
* @remark
|
|
44
|
+
* This type is particularly useful when there is a need to verify whether there have been extensions or changes to the Content-Type Registry
|
|
45
|
+
* after initially creating it.
|
|
46
|
+
*
|
|
47
|
+
* It allows developers to perform this check at the type level and decide what type should be resolved depending on the context
|
|
48
|
+
*/
|
|
49
|
+
export type IsContentTypeRegistryExtended = NotStrictEqual<Internal.UID.ContentType, UID.ContentType>;
|
|
50
|
+
/**
|
|
51
|
+
* Evaluate if the internal UIDs ({@link Internal.UID.Component}) and public ones ({@link UID.Component}) are not identical.
|
|
52
|
+
*
|
|
53
|
+
* If these two types are not the same, it indicates an extension or change has occurred in the public Component Registry.
|
|
54
|
+
*
|
|
55
|
+
* The type leverages {@link NotStrictEqual} to perform this comparison accurately. The result is a type-level
|
|
56
|
+
* boolean that denotes whether there is a deviation between the two Content-Type representations.
|
|
57
|
+
*
|
|
58
|
+
* @return - Either {@link True} if the Component Registry has been extended, else {@link False}.
|
|
59
|
+
*
|
|
60
|
+
* @remark
|
|
61
|
+
* This type is particularly useful when there is a need to verify whether there have been extensions or changes to the Component Registry
|
|
62
|
+
* after initially creating it.
|
|
63
|
+
*
|
|
64
|
+
* It allows developers to perform this check at the type level and decide what type should be resolved depending on the context
|
|
65
|
+
*/
|
|
66
|
+
export type IsComponentRegistryExtended = NotStrictEqual<Internal.UID.Component, UID.Component>;
|
|
67
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,QAAQ,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,KAAK,GAAG,MAAM,QAAQ,CAAC;AAEnC,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,GAAG,CAAC;AAE5C,MAAM,MAAM,IAAI,GAAG,IAAI,CAAC;AAExB,MAAM,MAAM,KAAK,GAAG,KAAK,CAAC;AAE1B,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,KAAK,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,2BAA2B,GAAG,EAAE,CAC1C,2BAA2B,EAC3B,6BAA6B,CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,6BAA6B,GAAG,cAAc,CACxD,QAAQ,CAAC,GAAG,CAAC,WAAW,EACxB,GAAG,CAAC,WAAW,CAChB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC"}
|