@akbarsafari00/bonyan-types 5.52.1-fa.4
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/LICENSE +37 -0
- package/README.md +9 -0
- package/dist/core/api.d.ts +3 -0
- package/dist/core/api.d.ts.map +1 -0
- package/dist/core/commands/index.d.ts +6 -0
- package/dist/core/commands/index.d.ts.map +1 -0
- package/dist/core/config/admin.d.ts +156 -0
- package/dist/core/config/admin.d.ts.map +1 -0
- package/dist/core/config/api.d.ts +38 -0
- package/dist/core/config/api.d.ts.map +1 -0
- package/dist/core/config/database.d.ts +78 -0
- package/dist/core/config/database.d.ts.map +1 -0
- package/dist/core/config/features.d.ts +14 -0
- package/dist/core/config/features.d.ts.map +1 -0
- package/dist/core/config/index.d.ts +11 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/middlewares.d.ts +3 -0
- package/dist/core/config/middlewares.d.ts.map +1 -0
- package/dist/core/config/openapi.d.ts +35 -0
- package/dist/core/config/openapi.d.ts.map +1 -0
- package/dist/core/config/plugin.d.ts +8 -0
- package/dist/core/config/plugin.d.ts.map +1 -0
- package/dist/core/config/server.d.ts +102 -0
- package/dist/core/config/server.d.ts.map +1 -0
- package/dist/core/config/shared.d.ts +8 -0
- package/dist/core/config/shared.d.ts.map +1 -0
- package/dist/core/config/typescript.d.ts +10 -0
- package/dist/core/config/typescript.d.ts.map +1 -0
- package/dist/core/container.d.ts +5 -0
- package/dist/core/container.d.ts.map +1 -0
- package/dist/core/controller.d.ts +7 -0
- package/dist/core/controller.d.ts.map +1 -0
- package/dist/core/core-api/controller.d.ts +47 -0
- package/dist/core/core-api/controller.d.ts.map +1 -0
- package/dist/core/core-api/index.d.ts +4 -0
- package/dist/core/core-api/index.d.ts.map +1 -0
- package/dist/core/core-api/router.d.ts +64 -0
- package/dist/core/core-api/router.d.ts.map +1 -0
- package/dist/core/core-api/service.d.ts +69 -0
- package/dist/core/core-api/service.d.ts.map +1 -0
- package/dist/core/index.d.ts +15 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/middleware.d.ts +15 -0
- 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/route.d.ts +54 -0
- package/dist/core/route.d.ts.map +1 -0
- package/dist/core/router.d.ts +15 -0
- package/dist/core/router.d.ts.map +1 -0
- package/dist/core/service.d.ts +4 -0
- package/dist/core/service.d.ts.map +1 -0
- package/dist/core/strapi.d.ts +162 -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 +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/internal/index.d.ts +13 -0
- package/dist/internal/index.d.ts.map +1 -0
- package/dist/internal/namespace.d.ts +78 -0
- 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/internal/uid.d.ts +116 -0
- package/dist/internal/uid.d.ts.map +1 -0
- package/dist/modules/ai.d.ts +34 -0
- package/dist/modules/ai.d.ts.map +1 -0
- package/dist/modules/audit-logs.d.ts +6 -0
- package/dist/modules/audit-logs.d.ts.map +1 -0
- package/dist/modules/auth.d.ts +25 -0
- package/dist/modules/auth.d.ts.map +1 -0
- package/dist/modules/content-api.d.ts +92 -0
- package/dist/modules/content-api.d.ts.map +1 -0
- package/dist/modules/core-store.d.ts +28 -0
- package/dist/modules/core-store.d.ts.map +1 -0
- package/dist/modules/cron.d.ts +27 -0
- package/dist/modules/cron.d.ts.map +1 -0
- package/dist/modules/custom-fields.d.ts +25 -0
- package/dist/modules/custom-fields.d.ts.map +1 -0
- package/dist/modules/documents/component-extension.d.ts +73 -0
- package/dist/modules/documents/component-extension.d.ts.map +1 -0
- package/dist/modules/documents/draft-and-publish.d.ts +12 -0
- package/dist/modules/documents/draft-and-publish.d.ts.map +1 -0
- package/dist/modules/documents/index.d.ts +27 -0
- package/dist/modules/documents/index.d.ts.map +1 -0
- package/dist/modules/documents/middleware.d.ts +14 -0
- package/dist/modules/documents/middleware.d.ts.map +1 -0
- package/dist/modules/documents/params/attributes/id.d.ts +4 -0
- package/dist/modules/documents/params/attributes/id.d.ts.map +1 -0
- package/dist/modules/documents/params/attributes/index.d.ts +79 -0
- package/dist/modules/documents/params/attributes/index.d.ts.map +1 -0
- package/dist/modules/documents/params/attributes/relations.d.ts +40 -0
- package/dist/modules/documents/params/attributes/relations.d.ts.map +1 -0
- package/dist/modules/documents/params/data.d.ts +67 -0
- package/dist/modules/documents/params/data.d.ts.map +1 -0
- package/dist/modules/documents/params/document-engine.d.ts +34 -0
- package/dist/modules/documents/params/document-engine.d.ts.map +1 -0
- package/dist/modules/documents/params/fields.d.ts +61 -0
- package/dist/modules/documents/params/fields.d.ts.map +1 -0
- package/dist/modules/documents/params/filters/index.d.ts +61 -0
- package/dist/modules/documents/params/filters/index.d.ts.map +1 -0
- package/dist/modules/documents/params/filters/operators.d.ts +9 -0
- package/dist/modules/documents/params/filters/operators.d.ts.map +1 -0
- package/dist/modules/documents/params/index.d.ts +162 -0
- package/dist/modules/documents/params/index.d.ts.map +1 -0
- 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 +11 -0
- package/dist/modules/documents/params/pagination.d.ts.map +1 -0
- package/dist/modules/documents/params/populate.d.ts +86 -0
- package/dist/modules/documents/params/populate.d.ts.map +1 -0
- package/dist/modules/documents/params/search.d.ts +2 -0
- package/dist/modules/documents/params/search.d.ts.map +1 -0
- package/dist/modules/documents/params/sort.d.ts +87 -0
- package/dist/modules/documents/params/sort.d.ts.map +1 -0
- package/dist/modules/documents/params/status.d.ts +12 -0
- package/dist/modules/documents/params/status.d.ts.map +1 -0
- package/dist/modules/documents/plugin.d.ts +11 -0
- package/dist/modules/documents/plugin.d.ts.map +1 -0
- 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 +93 -0
- package/dist/modules/documents/result/index.d.ts.map +1 -0
- package/dist/modules/documents/service-instance.d.ts +96 -0
- package/dist/modules/documents/service-instance.d.ts.map +1 -0
- package/dist/modules/entity-service/index.d.ts +87 -0
- package/dist/modules/entity-service/index.d.ts.map +1 -0
- package/dist/modules/entity-service/params/attributes/id.d.ts +3 -0
- package/dist/modules/entity-service/params/attributes/id.d.ts.map +1 -0
- package/dist/modules/entity-service/params/attributes/index.d.ts +71 -0
- package/dist/modules/entity-service/params/attributes/index.d.ts.map +1 -0
- package/dist/modules/entity-service/params/attributes/literals.d.ts +8 -0
- package/dist/modules/entity-service/params/attributes/literals.d.ts.map +1 -0
- package/dist/modules/entity-service/params/attributes/relation.d.ts +40 -0
- package/dist/modules/entity-service/params/attributes/relation.d.ts.map +1 -0
- package/dist/modules/entity-service/params/attributes/utils.d.ts +9 -0
- package/dist/modules/entity-service/params/attributes/utils.d.ts.map +1 -0
- package/dist/modules/entity-service/params/data.d.ts +52 -0
- package/dist/modules/entity-service/params/data.d.ts.map +1 -0
- package/dist/modules/entity-service/params/fields.d.ts +61 -0
- package/dist/modules/entity-service/params/fields.d.ts.map +1 -0
- package/dist/modules/entity-service/params/filters/index.d.ts +96 -0
- package/dist/modules/entity-service/params/filters/index.d.ts.map +1 -0
- package/dist/modules/entity-service/params/filters/operators.d.ts +9 -0
- package/dist/modules/entity-service/params/filters/operators.d.ts.map +1 -0
- package/dist/modules/entity-service/params/index.d.ts +123 -0
- package/dist/modules/entity-service/params/index.d.ts.map +1 -0
- package/dist/modules/entity-service/params/pagination.d.ts +10 -0
- package/dist/modules/entity-service/params/pagination.d.ts.map +1 -0
- package/dist/modules/entity-service/params/populate.d.ts +69 -0
- package/dist/modules/entity-service/params/populate.d.ts.map +1 -0
- package/dist/modules/entity-service/params/search.d.ts +2 -0
- package/dist/modules/entity-service/params/search.d.ts.map +1 -0
- package/dist/modules/entity-service/params/sort.d.ts +95 -0
- package/dist/modules/entity-service/params/sort.d.ts.map +1 -0
- package/dist/modules/entity-service/plugin.d.ts +11 -0
- package/dist/modules/entity-service/plugin.d.ts.map +1 -0
- package/dist/modules/entity-service/result.d.ts +78 -0
- package/dist/modules/entity-service/result.d.ts.map +1 -0
- package/dist/modules/entity-validator.d.ts +21 -0
- package/dist/modules/entity-validator.d.ts.map +1 -0
- package/dist/modules/event-hub.d.ts +16 -0
- package/dist/modules/event-hub.d.ts.map +1 -0
- package/dist/modules/features.d.ts +12 -0
- package/dist/modules/features.d.ts.map +1 -0
- package/dist/modules/fetch.d.ts +11 -0
- package/dist/modules/fetch.d.ts.map +1 -0
- package/dist/modules/index.d.ts +24 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/mcp.d.ts +216 -0
- package/dist/modules/mcp.d.ts.map +1 -0
- package/dist/modules/metrics.d.ts +8 -0
- package/dist/modules/metrics.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/request-context.d.ts +6 -0
- package/dist/modules/request-context.d.ts.map +1 -0
- package/dist/modules/sanitizers.d.ts +8 -0
- package/dist/modules/sanitizers.d.ts.map +1 -0
- package/dist/modules/server.d.ts +29 -0
- package/dist/modules/server.d.ts.map +1 -0
- package/dist/modules/session-manager.d.ts +70 -0
- package/dist/modules/session-manager.d.ts.map +1 -0
- package/dist/modules/validators.d.ts +8 -0
- package/dist/modules/validators.d.ts.map +1 -0
- package/dist/modules/webhook-runner.d.ts +19 -0
- package/dist/modules/webhook-runner.d.ts.map +1 -0
- package/dist/modules/webhook-store.d.ts +21 -0
- package/dist/modules/webhook-store.d.ts.map +1 -0
- package/dist/plugin/config/index.d.ts +3 -0
- package/dist/plugin/config/index.d.ts.map +1 -0
- package/dist/plugin/config/strapi-admin/index.d.ts +8 -0
- package/dist/plugin/config/strapi-admin/index.d.ts.map +1 -0
- package/dist/plugin/config/strapi-server/config.d.ts +8 -0
- package/dist/plugin/config/strapi-server/config.d.ts.map +1 -0
- package/dist/plugin/config/strapi-server/content-types.d.ts +11 -0
- 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 +21 -0
- package/dist/plugin/config/strapi-server/index.d.ts.map +1 -0
- package/dist/plugin/config/strapi-server/lifecycle.d.ts +8 -0
- 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 +40 -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 +68 -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 +92 -0
- package/dist/schema/attribute/base.d.ts.map +1 -0
- package/dist/schema/attribute/common.d.ts +29 -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/schema/attribute/definitions/blocks.d.ts +80 -0
- 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 +167 -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/schema/attribute/definitions/uid.d.ts +31 -0
- 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 +286 -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 +236 -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 +190 -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 +68 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-type.d.ts","sourceRoot":"","sources":["../../src/data/content-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,KAAK,GAAG,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,MAAM,WAAW,CACrB,eAAe,SAAS,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,EACzD,gBAAgB,SAAS,cAAc,CAAC,eAAe,CAAC,GAAG,cAAc,CAAC,eAAe,CAAC,IACxF,SAAS,CACX;IAAC;QAAE,EAAE,EAAE,EAAE,CAAC;QAAC,UAAU,EAAE,UAAU,CAAA;KAAE;IAAE,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,gBAAgB,CAAC;CAAC,CAC/F,CAAC;AAEF,KAAK,eAAe,CAAC,eAAe,SAAS,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,IAAI;KAC/E,cAAc,IAAI,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,oBAAoB,CACxE,eAAe,EACf,cAAc,CACf,GAAG,IAAI;CACT,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ContentType } from './content-type';
|
|
2
|
+
import type { Component } from './component';
|
|
3
|
+
import type * as UID from '../uid';
|
|
4
|
+
import type { ModelType, AttributeNames } from '../schema';
|
|
5
|
+
/**
|
|
6
|
+
* Represents any entry, either for a content-type or a component.
|
|
7
|
+
*
|
|
8
|
+
* @template TSchemaUID - The entry schema UID
|
|
9
|
+
* @template TKeys - A union of keys to be returned in the final object. If not specified, defaults to all the keys.
|
|
10
|
+
*/
|
|
11
|
+
export type Entity<TSchemaUID extends UID.Schema = UID.Schema, TKeys extends AttributeNames<TSchemaUID> = AttributeNames<TSchemaUID>> = {
|
|
12
|
+
contentType: ContentType<Extract<TSchemaUID, UID.ContentType>, TKeys>;
|
|
13
|
+
component: Component<Extract<TSchemaUID, UID.Component>, TKeys>;
|
|
14
|
+
}[ModelType<TSchemaUID>];
|
|
15
|
+
//# sourceMappingURL=entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/data/entity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,KAAK,KAAK,GAAG,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,MAAM,MAAM,CAChB,UAAU,SAAS,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,EAC1C,KAAK,SAAS,cAAc,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,UAAU,CAAC,IACnE;IACF,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC;IACtE,SAAS,EAAE,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,CAAC;CACjE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/data/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,UAAU,CAAC;AAC9B,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,aAAa,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Strapi } from './core';
|
|
2
|
+
export type * as Core from './core';
|
|
3
|
+
export type * as Data from './data';
|
|
4
|
+
export type * as Internal from './internal';
|
|
5
|
+
export type * as Modules from './modules';
|
|
6
|
+
export type * as Plugin from './plugin';
|
|
7
|
+
export type * as Public from './public';
|
|
8
|
+
export type * as Schema from './schema';
|
|
9
|
+
export type * as Utils from './utils';
|
|
10
|
+
export type * as Struct from './struct';
|
|
11
|
+
export type * as UID from './uid';
|
|
12
|
+
declare global {
|
|
13
|
+
var strapi: Strapi;
|
|
14
|
+
namespace NodeJS {
|
|
15
|
+
interface Global {
|
|
16
|
+
strapi: Strapi;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,YAAY,KAAK,IAAI,MAAM,QAAQ,CAAC;AACpC,YAAY,KAAK,IAAI,MAAM,QAAQ,CAAC;AACpC,YAAY,KAAK,QAAQ,MAAM,YAAY,CAAC;AAC5C,YAAY,KAAK,OAAO,MAAM,WAAW,CAAC;AAC1C,YAAY,KAAK,MAAM,MAAM,UAAU,CAAC;AACxC,YAAY,KAAK,MAAM,MAAM,UAAU,CAAC;AACxC,YAAY,KAAK,MAAM,MAAM,UAAU,CAAC;AACxC,YAAY,KAAK,KAAK,MAAM,SAAS,CAAC;AACtC,YAAY,KAAK,MAAM,MAAM,UAAU,CAAC;AACxC,YAAY,KAAK,GAAG,MAAM,OAAO,CAAC;AAElC,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,MAAM,EAAE,MAAM,CAAC;IAGnB,UAAU,MAAM,CAAC;QACf,UAAU,MAAM;YACd,MAAM,EAAE,MAAM,CAAC;SAChB;KACF;CACF"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static definitions of a namespace + utils
|
|
3
|
+
*/
|
|
4
|
+
export type * as Namespace from './namespace';
|
|
5
|
+
/**
|
|
6
|
+
* Static definitions of a UID
|
|
7
|
+
*/
|
|
8
|
+
export type * as UID from './uid';
|
|
9
|
+
/**
|
|
10
|
+
* Registry utilities (Keys, etc...)
|
|
11
|
+
*/
|
|
12
|
+
export type * as Registry from './registry';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,KAAK,SAAS,MAAM,aAAa,CAAC;AAE9C;;GAEG;AACH,YAAY,KAAK,GAAG,MAAM,OAAO,CAAC;AAElC;;GAEG;AACH,YAAY,KAAK,QAAQ,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { String } from '../utils';
|
|
2
|
+
/**
|
|
3
|
+
* Namespace for admin resources
|
|
4
|
+
*/
|
|
5
|
+
export type Admin = 'admin';
|
|
6
|
+
/**
|
|
7
|
+
* Namespace for strapi internal resources
|
|
8
|
+
*/
|
|
9
|
+
export type Strapi = 'strapi';
|
|
10
|
+
/**
|
|
11
|
+
* Namespace for scoped APIs resources
|
|
12
|
+
*/
|
|
13
|
+
export type API<T extends string = string> = `api${ColonsSeparator}${T}`;
|
|
14
|
+
/**
|
|
15
|
+
* Namespace for scoped plugins resources
|
|
16
|
+
*/
|
|
17
|
+
export type Plugin<T extends string = string> = `plugin${ColonsSeparator}${T}`;
|
|
18
|
+
/**
|
|
19
|
+
* Namespace for global resources
|
|
20
|
+
*/
|
|
21
|
+
export type Global = 'global';
|
|
22
|
+
/**
|
|
23
|
+
* Represents any namespace
|
|
24
|
+
*/
|
|
25
|
+
export type AnyNamespace = API | Plugin | Admin | Strapi | Global;
|
|
26
|
+
/**
|
|
27
|
+
* Return a {@link Separator} based on the given {@link AnyNamespace} ({@link DotSeparator} for {@link Scoped} and {@link ColonsSeparator} for regular ones)
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* type S = GetSeparator<Admin>
|
|
31
|
+
* // ^ '::'
|
|
32
|
+
*
|
|
33
|
+
* type S = GetSeparator<API>
|
|
34
|
+
* // ^ '.'
|
|
35
|
+
*
|
|
36
|
+
* type S = GetSeparator<Admin | API>
|
|
37
|
+
* // ^ '.' | '::'
|
|
38
|
+
*/
|
|
39
|
+
export type GetSeparator<TNamespace extends AnyNamespace = AnyNamespace> = TNamespace extends Scoped ? DotSeparator : ColonsSeparator;
|
|
40
|
+
/**
|
|
41
|
+
* Adds the corresponding separator (using {@link GetSeparator}) at the end of a namespace
|
|
42
|
+
*
|
|
43
|
+
* Warning: Using WithSeparator with a union type might produce undesired results as it'll distribute every matching suffix to every union member
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* type T = WithSeparator<Admin>
|
|
47
|
+
* // ^ 'admin::'
|
|
48
|
+
*
|
|
49
|
+
* type T = WithSeparator<API>
|
|
50
|
+
* // ^ 'api::{string}.'
|
|
51
|
+
*
|
|
52
|
+
* type T = WithSeparator<Admin | API>
|
|
53
|
+
* // ^ 'admin::' | 'admin.' | 'api::{string}.' | 'api::{string}::'
|
|
54
|
+
*
|
|
55
|
+
* type T = WithSeparator<Admin> | WithSeparator<API>
|
|
56
|
+
* // ^ 'admin::' | 'api::{string}.'
|
|
57
|
+
*/
|
|
58
|
+
export type WithSeparator<TNamespace extends AnyNamespace> = String.Suffix<TNamespace, GetSeparator<TNamespace>>;
|
|
59
|
+
/**
|
|
60
|
+
* Represents namespaces composed of an origin and a scope, separated by colons
|
|
61
|
+
*/
|
|
62
|
+
export type Scoped<TOrigin extends string = string, TScope extends string = string> = AnyNamespace & `${TOrigin}${ColonsSeparator}${TScope}`;
|
|
63
|
+
/**
|
|
64
|
+
* Extract the scope from the given scoped namespace
|
|
65
|
+
*/
|
|
66
|
+
export type ExtractScope<TNamespace> = TNamespace extends `${string}${ColonsSeparator}${infer TScope}` ? TScope : never;
|
|
67
|
+
/**
|
|
68
|
+
* Extract the origin from the given scoped namespace
|
|
69
|
+
*/
|
|
70
|
+
export type ExtractOrigin<TNamespace> = TNamespace extends `${infer TOrigin}${ColonsSeparator}${string}` ? TOrigin : never;
|
|
71
|
+
/**
|
|
72
|
+
* Separators used to join the different parts of a namespace (e.g. building a uid)
|
|
73
|
+
*/
|
|
74
|
+
export type Separator = ColonsSeparator | DotSeparator;
|
|
75
|
+
type ColonsSeparator = '::';
|
|
76
|
+
type DotSeparator = '.';
|
|
77
|
+
export {};
|
|
78
|
+
//# sourceMappingURL=namespace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespace.d.ts","sourceRoot":"","sources":["../../src/internal/namespace.ts"],"names":[],"mappings":"AAAA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SAAS,GAAG,MAAM,OAAO,GAAG,eAAe,GAAG,MAAM,EAAE,GAAG,OAAO,GAAG,KAAK,CAAC;AAErF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,YAAY,CAAC;AAEvD,KAAK,eAAe,GAAG,IAAI,CAAC;AAC5B,KAAK,YAAY,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts keys from a registry object based on a specified index type.
|
|
3
|
+
*
|
|
4
|
+
* @template TRegistry - The registry object.
|
|
5
|
+
* @template TIndexType - The type of the index used to filter the keys.
|
|
6
|
+
*/
|
|
7
|
+
export type Keys<TRegistry extends object, TIndexType extends string> = Extract<keyof TRegistry, TIndexType>;
|
|
8
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/internal/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,IAAI,CAAC,SAAS,SAAS,MAAM,EAAE,UAAU,SAAS,MAAM,IAAI,OAAO,CAC7E,MAAM,SAAS,EACf,UAAU,CACX,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { String } from '../utils';
|
|
2
|
+
import type * as Namespace from './namespace';
|
|
3
|
+
type StringSuffix<T extends string> = String.Suffix<T, string>;
|
|
4
|
+
/**
|
|
5
|
+
* Template for services' unique identifier
|
|
6
|
+
*/
|
|
7
|
+
export type Service = StringSuffix<Namespace.WithSeparator<Namespace.Admin> | Namespace.WithSeparator<Namespace.API> | Namespace.WithSeparator<Namespace.Plugin>>;
|
|
8
|
+
/**
|
|
9
|
+
* Template for controllers' unique identifier
|
|
10
|
+
*/
|
|
11
|
+
export type Controller = StringSuffix<Namespace.WithSeparator<Namespace.Admin> | Namespace.WithSeparator<Namespace.API> | Namespace.WithSeparator<Namespace.Plugin>>;
|
|
12
|
+
/**
|
|
13
|
+
* Template for policies' unique identifier
|
|
14
|
+
*/
|
|
15
|
+
export type Policy = StringSuffix<Namespace.WithSeparator<Namespace.Admin> | Namespace.WithSeparator<Namespace.Strapi> | Namespace.WithSeparator<Namespace.Global> | Namespace.WithSeparator<Namespace.API> | Namespace.WithSeparator<Namespace.Plugin>>;
|
|
16
|
+
/**
|
|
17
|
+
* Template for middlewares' unique identifier
|
|
18
|
+
*/
|
|
19
|
+
export type Middleware = StringSuffix<Namespace.WithSeparator<Namespace.Admin> | Namespace.WithSeparator<Namespace.Strapi> | Namespace.WithSeparator<Namespace.Global> | Namespace.WithSeparator<Namespace.API> | Namespace.WithSeparator<Namespace.Plugin>>;
|
|
20
|
+
/**
|
|
21
|
+
* Template for content-types' unique identifier
|
|
22
|
+
*/
|
|
23
|
+
export type ContentType = StringSuffix<Namespace.WithSeparator<Namespace.Admin> | Namespace.WithSeparator<Namespace.Strapi> | Namespace.WithSeparator<Namespace.API> | Namespace.WithSeparator<Namespace.Plugin>>;
|
|
24
|
+
/**
|
|
25
|
+
* Template for components' unique identifier
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* 'default.foo' extends Component => true (T = 'default', N = 'foo')
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* // /!\ Warning: Can cause overlap with other UID formats:
|
|
32
|
+
* // 'api::foo.bar' both extends ContentType and Component
|
|
33
|
+
* 'api::foo.bar' extends ContentType => true (N = 'api', S='::', T='foo')
|
|
34
|
+
* 'api::foo.bar' extends Component => true (T = 'api::foo', N = 'bar')
|
|
35
|
+
*/
|
|
36
|
+
export type Component<TCategory extends string = string, TName extends string = string> = `${TCategory}.${TName}`;
|
|
37
|
+
/**
|
|
38
|
+
* Represents a UID that can be used to reference a content-type or a component
|
|
39
|
+
*/
|
|
40
|
+
export type Schema = ContentType | Component;
|
|
41
|
+
/**
|
|
42
|
+
* Represents any UID
|
|
43
|
+
*/
|
|
44
|
+
export type AnyUID = Service | Controller | Policy | Middleware | ContentType | Component;
|
|
45
|
+
/**
|
|
46
|
+
* Type representation of every UID component.
|
|
47
|
+
*
|
|
48
|
+
* The separator type is automatically inferred from the given namespace
|
|
49
|
+
*/
|
|
50
|
+
export interface ParsedUID<TNamespace extends Namespace.AnyNamespace = Namespace.AnyNamespace, TName extends string = string> {
|
|
51
|
+
raw: `${TNamespace}${Namespace.GetSeparator<TNamespace>}${TName}`;
|
|
52
|
+
namespace: TNamespace;
|
|
53
|
+
origin: TNamespace extends Namespace.Scoped ? Namespace.ExtractOrigin<TNamespace> : TNamespace;
|
|
54
|
+
scope: TNamespace extends Namespace.Scoped ? Namespace.ExtractScope<TNamespace> : never;
|
|
55
|
+
separator: Namespace.GetSeparator<TNamespace>;
|
|
56
|
+
name: TName;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Parse a UID literal and returns a {@link ParsedUID} type.
|
|
60
|
+
*
|
|
61
|
+
* Warning: Using ParseUID with a union type might produce undesired results as it'll distribute every matching namespace parsing to every union member
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* type T = ParseUID<'admin::foo'>
|
|
65
|
+
* // ^ { namespace: 'admin'; separator: '::'; name: 'foo'; }
|
|
66
|
+
*
|
|
67
|
+
* type T = ParseUID<'api::foo.bar'>
|
|
68
|
+
* // ^ { namespace: 'api::foo'; separator: '.'; name: 'bar'; }
|
|
69
|
+
*
|
|
70
|
+
* type T = ParseUID<'admin::foo' | 'api::foo.bar'>
|
|
71
|
+
* // ^ { namespace: 'admin' | 'api::foo' ; separator: '.' | '::'; name: 'foo' | 'bar' | 'foo.bar'; }
|
|
72
|
+
*/
|
|
73
|
+
export type ParseUID<TUID extends AnyUID> = ExtractNamespace<TUID> extends infer TExtractedNamespace extends Namespace.AnyNamespace ? Namespace.GetSeparator<TExtractedNamespace> extends infer TSeparator extends Namespace.Separator ? TUID extends `${infer TInferredNamespace extends TExtractedNamespace}${TSeparator}${infer TName extends string}` ? ParsedUID<TInferredNamespace, TName> : never : never : never;
|
|
74
|
+
/**
|
|
75
|
+
* Determines if the UID's namespace matches the given one.
|
|
76
|
+
*
|
|
77
|
+
* It returns TNamespace (the {@link Namespace.Any} literal) if there is a match, never otherwise.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* type T = EnsureNamespaceMatches<'admin::foo', Namespace.Admin>
|
|
81
|
+
* // ^ Namespace.Admin
|
|
82
|
+
* @example
|
|
83
|
+
* type T = EnsureNamespaceMatches<'foo.bar', Namespace.API>
|
|
84
|
+
* // ^ never
|
|
85
|
+
* @example
|
|
86
|
+
* type T = EnsureNamespaceMatches<'api::foo.bar', Namespace.Plugin>
|
|
87
|
+
* // ^ never
|
|
88
|
+
*/
|
|
89
|
+
export type EnsureNamespaceMatches<TUID extends AnyUID, TNamespace extends Namespace.AnyNamespace> = TUID extends StringSuffix<Namespace.WithSeparator<TNamespace>> ? TNamespace : never;
|
|
90
|
+
/**
|
|
91
|
+
* Get parsed properties from a given raw UID
|
|
92
|
+
*/
|
|
93
|
+
export type GetUID<TUID extends AnyUID, TKey extends keyof ParsedUID> = ParseUID<TUID>[TKey];
|
|
94
|
+
/**
|
|
95
|
+
* Pick parsed properties from a given raw UID
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* type T = SelectUID<'admin::foo', 'namespace' | 'name'>
|
|
99
|
+
*/
|
|
100
|
+
export type SelectUID<TUID extends AnyUID, TKey extends keyof ParseUID<TUID>> = Pick<ParseUID<TUID>, TKey>;
|
|
101
|
+
/**
|
|
102
|
+
* Extract the namespace literal from a given UID.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* type T = ExtractNamespace<'admin::foo'>
|
|
106
|
+
* // ^ Namespace.Admin
|
|
107
|
+
* @example
|
|
108
|
+
* type T = ExtractNamespace<'api::foo.bar'>
|
|
109
|
+
* // ^ Namespace.API
|
|
110
|
+
* @example
|
|
111
|
+
* type T = ExtractNamespace<'admin::foo' | 'api::foo.bar'>
|
|
112
|
+
* // ^ Namespace.Admin | Namespace.API
|
|
113
|
+
*/
|
|
114
|
+
export type ExtractNamespace<TUID extends AnyUID> = EnsureNamespaceMatches<TUID, Namespace.Global> | EnsureNamespaceMatches<TUID, Namespace.Admin> | EnsureNamespaceMatches<TUID, Namespace.Strapi> | EnsureNamespaceMatches<TUID, Namespace.API> | EnsureNamespaceMatches<TUID, Namespace.Plugin>;
|
|
115
|
+
export {};
|
|
116
|
+
//# sourceMappingURL=uid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uid.d.ts","sourceRoot":"","sources":["../../src/internal/uid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,KAAK,KAAK,SAAS,MAAM,aAAa,CAAC;AAE9C,KAAK,YAAY,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,YAAY,CAC9B,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,GACxC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,GACtC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,CAC5C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,CACjC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,GACxC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,GACtC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,CAC5C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,YAAY,CAC7B,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,GACxC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,GACzC,SA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,CAAC,IAAI,CAAC,CAAC;AAE7F;;;;;GAKG;AACH,MAAM,MAAM,SAAS,CAAC,IAAI,SAAS,MAAM,EAAE,IAAI,SAAS,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,CAClF,QAAQ,CAAC,IAAI,CAAC,EACd,IAAI,CACL,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,gBAAgB,CAAC,IAAI,SAAS,MAAM,IAC5C,sBAAsB,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,GAC9C,sBAAsB,CAAC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,GAC7C,sBAAsB,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,GAC9C,sBAAsB,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,GAC3C,sBAAsB,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type * as MCP from './mcp';
|
|
2
|
+
/**
|
|
3
|
+
* AI service for the admin panel. Only present at runtime when EE + cms-ai feature is active
|
|
4
|
+
*/
|
|
5
|
+
export type AiAdminService = {
|
|
6
|
+
isEnabled(): boolean;
|
|
7
|
+
getAiToken(): Promise<{
|
|
8
|
+
token: string;
|
|
9
|
+
expiresAt?: string;
|
|
10
|
+
}>;
|
|
11
|
+
getAiUsage(): Promise<{
|
|
12
|
+
cmsAiCreditsUsed: number;
|
|
13
|
+
subscription: {
|
|
14
|
+
subscriptionId: string;
|
|
15
|
+
planPriceId: string;
|
|
16
|
+
subscriptionStatus: string;
|
|
17
|
+
isActiveSubscription: boolean;
|
|
18
|
+
cmsAiEnabled: boolean;
|
|
19
|
+
cmsAiCreditsBase: number;
|
|
20
|
+
cmsAiCreditsMaxUsage: number;
|
|
21
|
+
currentTermStart: string;
|
|
22
|
+
currentTermEnd: string;
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
25
|
+
getAiFeatureConfig(): Promise<{
|
|
26
|
+
isAiI18nConfigured: boolean;
|
|
27
|
+
isAiMediaLibraryConfigured: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
};
|
|
30
|
+
export type AiNamespace = {
|
|
31
|
+
admin: AiAdminService;
|
|
32
|
+
mcp: MCP.McpService;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=ai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/modules/ai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,OAAO,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,IAAI,OAAO,CAAC;IACrB,UAAU,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7D,UAAU,IAAI,OAAO,CAAC;QACpB,gBAAgB,EAAE,MAAM,CAAC;QACzB,YAAY,EAAE;YACZ,cAAc,EAAE,MAAM,CAAC;YACvB,WAAW,EAAE,MAAM,CAAC;YACpB,kBAAkB,EAAE,MAAM,CAAC;YAC3B,oBAAoB,EAAE,OAAO,CAAC;YAC9B,YAAY,EAAE,OAAO,CAAC;YACtB,gBAAgB,EAAE,MAAM,CAAC;YACzB,oBAAoB,EAAE,MAAM,CAAC;YAC7B,gBAAgB,EAAE,MAAM,CAAC;YACzB,cAAc,EAAE,MAAM,CAAC;SACxB,CAAC;KACH,CAAC,CAAC;IACH,kBAAkB,IAAI,OAAO,CAAC;QAC5B,kBAAkB,EAAE,OAAO,CAAC;QAC5B,0BAA0B,EAAE,OAAO,CAAC;KACrC,CAAC,CAAC;CACJ,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,cAAc,CAAC;IACtB,GAAG,EAAE,GAAG,CAAC,UAAU,CAAC;CACrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-logs.d.ts","sourceRoot":"","sources":["../../src/modules/audit-logs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ParameterizedContext } from 'koa';
|
|
2
|
+
import type { RouteConfig, MiddlewareHandler } from '../core';
|
|
3
|
+
interface AuthenticationResponse {
|
|
4
|
+
authenticated?: boolean;
|
|
5
|
+
credentials?: unknown;
|
|
6
|
+
ability?: unknown;
|
|
7
|
+
error?: Error | null;
|
|
8
|
+
}
|
|
9
|
+
interface AuthenticationInfo {
|
|
10
|
+
strategy: Strategy;
|
|
11
|
+
credentials: unknown;
|
|
12
|
+
ability: unknown;
|
|
13
|
+
}
|
|
14
|
+
interface Strategy {
|
|
15
|
+
name: string;
|
|
16
|
+
authenticate: (ctx: ParameterizedContext) => Promise<AuthenticationResponse>;
|
|
17
|
+
verify?: (auth: AuthenticationInfo, config: RouteConfig['auth']) => Promise<any>;
|
|
18
|
+
}
|
|
19
|
+
export interface AuthenticationService {
|
|
20
|
+
register: (type: string, strategy: Strategy) => AuthenticationService;
|
|
21
|
+
authenticate: MiddlewareHandler;
|
|
22
|
+
verify: (auth: AuthenticationInfo, config?: RouteConfig['auth']) => Promise<any>;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/modules/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,KAAK,CAAC;AAEhD,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE9D,UAAU,sBAAsB;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;CACtB;AAED,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,CAAC,GAAG,EAAE,oBAAoB,KAAK,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC7E,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CAClF;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,KAAK,qBAAqB,CAAC;IACtE,YAAY,EAAE,iBAAiB,CAAC;IAChC,MAAM,EAAE,CAAC,IAAI,EAAE,kBAAkB,EAAE,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CAClF"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { engine } from '@strapi/permissions';
|
|
2
|
+
import { providerFactory, sanitize, validate } from '@strapi/utils';
|
|
3
|
+
import type { z } from 'zod/v4';
|
|
4
|
+
import type { Route } from '../core';
|
|
5
|
+
/** Base Zod scalar types allowed for query params (no nested objects). */
|
|
6
|
+
type ZodScalarSchema = z.ZodString | z.ZodNumber | z.ZodBoolean | z.ZodEnum<Record<string, string>>;
|
|
7
|
+
/**
|
|
8
|
+
* Allowed Zod schema types for addQueryParams: scalars (string, number, boolean, enum) or arrays of scalars.
|
|
9
|
+
* Optional and default wrappers are allowed. Nested objects are not allowed for query params.
|
|
10
|
+
*/
|
|
11
|
+
export type ZodQueryParamSchema = ZodScalarSchema | z.ZodOptional<ZodScalarSchema | z.ZodArray<ZodScalarSchema>> | z.ZodDefault<ZodScalarSchema | z.ZodArray<ZodScalarSchema>> | z.ZodArray<ZodScalarSchema>;
|
|
12
|
+
/** Zod namespace type (e.g. from `import * as z from 'zod/v4'`) passed to schema factory. */
|
|
13
|
+
export type ZodSchemaFactory = typeof z;
|
|
14
|
+
/** Schema + optional matchRoute for one query param. Keys in addQueryParams are the param names. */
|
|
15
|
+
export type QueryParamEntry = {
|
|
16
|
+
/** Zod schema or factory. Must be scalar or array of scalars (no nested objects). */
|
|
17
|
+
schema: ZodQueryParamSchema | ((z: ZodSchemaFactory) => ZodQueryParamSchema);
|
|
18
|
+
/** If provided, the param is only merged into routes for which this returns true. */
|
|
19
|
+
matchRoute?: (route: Route) => boolean;
|
|
20
|
+
};
|
|
21
|
+
/** Schema + optional matchRoute for one input param (root-level body.data). Keys in addInputParams are the param names. */
|
|
22
|
+
export type InputParamEntry = {
|
|
23
|
+
/** Zod schema or factory. Any Zod type allowed (scalars, objects, arrays). */
|
|
24
|
+
schema: z.ZodType | ((z: ZodSchemaFactory) => z.ZodType);
|
|
25
|
+
/** If provided, the param is only merged into routes for which this returns true. */
|
|
26
|
+
matchRoute?: (route: Route) => boolean;
|
|
27
|
+
};
|
|
28
|
+
/** Options for addQueryParams: keys are param names, values are schema + optional matchRoute. */
|
|
29
|
+
export type AddQueryParamsOptions = Record<string, QueryParamEntry>;
|
|
30
|
+
/** Options for addInputParams: keys are param names, values are schema + optional matchRoute. */
|
|
31
|
+
export type AddInputParamsOptions = Record<string, InputParamEntry>;
|
|
32
|
+
export interface Condition {
|
|
33
|
+
name: string;
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
}
|
|
36
|
+
type ConditionProvider = {
|
|
37
|
+
register: (condition: Condition) => Promise<void>;
|
|
38
|
+
} & ReturnType<typeof providerFactory>;
|
|
39
|
+
type ActionProvider = {
|
|
40
|
+
register: (action: string, payload: Record<string, unknown>) => Promise<void>;
|
|
41
|
+
} & ReturnType<typeof providerFactory>;
|
|
42
|
+
export interface PermissionUtilities {
|
|
43
|
+
engine: ReturnType<typeof engine.new>;
|
|
44
|
+
providers: {
|
|
45
|
+
action: ActionProvider;
|
|
46
|
+
condition: ConditionProvider;
|
|
47
|
+
};
|
|
48
|
+
registerActions: () => Promise<void>;
|
|
49
|
+
getActionsMap: () => Record<string, {
|
|
50
|
+
controllers: Record<string, string[]>;
|
|
51
|
+
}>;
|
|
52
|
+
}
|
|
53
|
+
export interface ContentApi {
|
|
54
|
+
/** Permissions engine and action/condition providers for the content API. */
|
|
55
|
+
permissions: PermissionUtilities;
|
|
56
|
+
/** Returns a map of scope → {@link Route}[] for all content-api routes. */
|
|
57
|
+
getRoutesMap: () => Promise<Record<string, Route[]>>;
|
|
58
|
+
/** Sanitizers for content-api input. */
|
|
59
|
+
sanitize: sanitize.APISanitiers;
|
|
60
|
+
/** Validators for content-api input. */
|
|
61
|
+
validate: validate.APIValidators;
|
|
62
|
+
/**
|
|
63
|
+
* Register extra query params to be merged into content-api route schemas.
|
|
64
|
+
* Query params accept only Zod scalar or array-of-scalar schemas (no nested objects); enforced at runtime. Use {@link ContentApi.addInputParams} for nested structures.
|
|
65
|
+
* Use `z` from `@strapi/utils` or `zod/v4` for compatibility.
|
|
66
|
+
*
|
|
67
|
+
* @param options - {@link AddQueryParamsOptions}: record of param name → {@link QueryParamEntry}. Each entry has:
|
|
68
|
+
* @param options.[paramName] - {@link QueryParamEntry} (key is the param name, e.g. `"search"`).
|
|
69
|
+
* @param options.[paramName].schema - {@link ZodQueryParamSchema} or `(z: {@link ZodSchemaFactory}) => {@link ZodQueryParamSchema}`. Must be scalar or array of scalars. No nested objects.
|
|
70
|
+
* @param options.[paramName].matchRoute - Optional. `(route: {@link Route}) => boolean`; if provided, this param is only added to routes for which it returns true.
|
|
71
|
+
*/
|
|
72
|
+
addQueryParams: (options: AddQueryParamsOptions) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Register extra input params (root-level body.data) to be merged into content-api route schemas.
|
|
75
|
+
* Any Zod type is allowed (scalars, objects, arrays). Enforced at runtime.
|
|
76
|
+
*
|
|
77
|
+
* @param options - {@link AddInputParamsOptions}: record of param name → {@link InputParamEntry}. Each entry has:
|
|
78
|
+
* @param options.[paramName] - {@link InputParamEntry} (key is the root-level key in body.data, e.g. `"metadata"`).
|
|
79
|
+
* @param options.[paramName].schema - `z.ZodType` or `(z: {@link ZodSchemaFactory}) => z.ZodType`. Any Zod type (e.g. z.object(), z.array(), scalars).
|
|
80
|
+
* @param options.[paramName].matchRoute - Optional. `(route: {@link Route}) => boolean`; if provided, this param is only added to routes for which it returns true.
|
|
81
|
+
*/
|
|
82
|
+
addInputParams: (options: AddInputParamsOptions) => void;
|
|
83
|
+
/**
|
|
84
|
+
* Merge all registered extra params into the given routes (mutates in place). Used at route registration.
|
|
85
|
+
*
|
|
86
|
+
* @internal Used by the framework during route registration. Not intended for app or plugin code.
|
|
87
|
+
* @param routes - Array of {@link Route} objects to mutate with registered query/input params.
|
|
88
|
+
*/
|
|
89
|
+
applyExtraParamsToRoutes: (routes: Route[]) => void;
|
|
90
|
+
}
|
|
91
|
+
export {};
|
|
92
|
+
//# sourceMappingURL=content-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-api.d.ts","sourceRoot":"","sources":["../../src/modules/content-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,0EAA0E;AAC1E,KAAK,eAAe,GAAG,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,UAAU,GAAG,CA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EAAE,KAAK,IAAI,CAAC;CACrD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type SetParams = {
|
|
2
|
+
key: string;
|
|
3
|
+
value: unknown;
|
|
4
|
+
type?: string;
|
|
5
|
+
environment?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
tag?: string;
|
|
8
|
+
};
|
|
9
|
+
type GetParams = {
|
|
10
|
+
key: string;
|
|
11
|
+
type?: string;
|
|
12
|
+
environment?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
tag?: string;
|
|
15
|
+
};
|
|
16
|
+
type Params = SetParams & GetParams;
|
|
17
|
+
export interface CoreStore {
|
|
18
|
+
(defaultParams: Partial<Params>): {
|
|
19
|
+
get(params?: Partial<GetParams>): Promise<unknown>;
|
|
20
|
+
set(params?: Partial<SetParams>): Promise<void>;
|
|
21
|
+
delete(params?: Partial<GetParams>): Promise<void>;
|
|
22
|
+
};
|
|
23
|
+
get(params: GetParams): Promise<unknown>;
|
|
24
|
+
set(params: SetParams): Promise<void>;
|
|
25
|
+
delete(params: GetParams): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=core-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-store.d.ts","sourceRoot":"","sources":["../../src/modules/core-store.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AAEpC,MAAM,WAAW,SAAS;IACxB,CAAC,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG;QAChC,GAAG,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;QACnD,GAAG,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;KACpD,CAAC;IACF,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Job, Spec } from 'node-schedule';
|
|
2
|
+
import type { Strapi } from '../core';
|
|
3
|
+
interface JobSpec {
|
|
4
|
+
job: Job;
|
|
5
|
+
options: Spec;
|
|
6
|
+
name: string | null;
|
|
7
|
+
}
|
|
8
|
+
type TaskFn = ({ strapi }: {
|
|
9
|
+
strapi: Strapi;
|
|
10
|
+
}, ...args: unknown[]) => Promise<unknown>;
|
|
11
|
+
export type CronTask = TaskFn | {
|
|
12
|
+
task: TaskFn;
|
|
13
|
+
options: Spec;
|
|
14
|
+
};
|
|
15
|
+
export interface CronTasks {
|
|
16
|
+
[key: string]: CronTask;
|
|
17
|
+
}
|
|
18
|
+
export interface CronService {
|
|
19
|
+
add(tasks: CronTasks): CronService;
|
|
20
|
+
remove(name: string): CronService;
|
|
21
|
+
start(): CronService;
|
|
22
|
+
stop(): CronService;
|
|
23
|
+
destroy(): CronService;
|
|
24
|
+
jobs: JobSpec[];
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=cron.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cron.d.ts","sourceRoot":"","sources":["../../src/modules/cron.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC,UAAU,OAAO;IACf,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,KAAK,MAAM,GAAG,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAEvF,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN;IACE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,IAAI,CAAC;CACf,CAAC;AAEN,MAAM,WAAW,SAAS;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,KAAK,EAAE,SAAS,GAAG,WAAW,CAAC;IACnC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAClC,KAAK,IAAI,WAAW,CAAC;IACrB,IAAI,IAAI,WAAW,CAAC;IACpB,OAAO,IAAI,WAAW,CAAC;IACvB,IAAI,EAAE,OAAO,EAAE,CAAC;CACjB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface CustomFieldServerOptions {
|
|
2
|
+
/**
|
|
3
|
+
* The name of the custom field
|
|
4
|
+
*/
|
|
5
|
+
name: string;
|
|
6
|
+
/**
|
|
7
|
+
* The name of the plugin creating the custom field
|
|
8
|
+
*/
|
|
9
|
+
plugin?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The existing Strapi data type the custom field uses
|
|
12
|
+
*/
|
|
13
|
+
type: 'biginteger' | 'boolean' | 'date' | 'datetime' | 'decimal' | 'email' | 'enumeration' | 'float' | 'integer' | 'json' | 'password' | 'richtext' | 'string' | 'text' | 'time' | 'uid';
|
|
14
|
+
/**
|
|
15
|
+
* Settings for the input size in the Admin UI
|
|
16
|
+
*/
|
|
17
|
+
inputSize?: {
|
|
18
|
+
default: 4 | 6 | 8 | 12;
|
|
19
|
+
isResizable: boolean;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface CustomFields {
|
|
23
|
+
register: (customFields: CustomFieldServerOptions[] | CustomFieldServerOptions) => void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=custom-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-fields.d.ts","sourceRoot":"","sources":["../../src/modules/custom-fields.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EACA,YAAY,GACZ,SAAS,GACT,MAAM,GACN,UAAU,GACV,SAAS,GACT,OAAO,GACP,aAAa,GACb,OAAO,GACP,SAAS,GACT,MAAM,GACN,UAAU,GACV,UAAU,GACV,QAAQ,GACR,MAAM,GACN,MAAM,GACN,KAAK,CAAC;IAEV;;OAEG;IACH,SAAS,CAAC,EAAE;QACV,OAAO,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;QACxB,WAAW,EAAE,OAAO,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,CAAC,YAAY,EAAE,wBAAwB,EAAE,GAAG,wBAAwB,KAAK,IAAI,CAAC;CACzF"}
|