@strapi/plugin-graphql 5.37.0 → 5.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs.map +1 -1
- package/dist/admin/package.json.js +1 -133
- package/dist/admin/package.json.js.map +1 -1
- package/dist/admin/package.json.mjs +2 -120
- package/dist/admin/package.json.mjs.map +1 -1
- package/dist/admin/utils/prefixPluginTranslations.js.map +1 -1
- package/dist/admin/utils/prefixPluginTranslations.mjs.map +1 -1
- package/dist/server/bootstrap.js.map +1 -1
- package/dist/server/bootstrap.mjs.map +1 -1
- package/dist/server/config/default-config.js.map +1 -1
- package/dist/server/config/default-config.mjs.map +1 -1
- package/dist/server/config/index.js.map +1 -1
- package/dist/server/config/index.mjs.map +1 -1
- package/dist/server/format-graphql-error.js.map +1 -1
- package/dist/server/format-graphql-error.mjs.map +1 -1
- package/dist/server/index.js +4 -4
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/services/builders/dynamic-zones.js.map +1 -1
- package/dist/server/services/builders/dynamic-zones.mjs.map +1 -1
- package/dist/server/services/builders/entity.js.map +1 -1
- package/dist/server/services/builders/entity.mjs.map +1 -1
- package/dist/server/services/builders/enums.js.map +1 -1
- package/dist/server/services/builders/enums.mjs.map +1 -1
- package/dist/server/services/builders/filters/content-type.js.map +1 -1
- package/dist/server/services/builders/filters/content-type.mjs.map +1 -1
- package/dist/server/services/builders/filters/index.js.map +1 -1
- package/dist/server/services/builders/filters/index.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/and.js.map +1 -1
- package/dist/server/services/builders/filters/operators/and.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/between.js.map +1 -1
- package/dist/server/services/builders/filters/operators/between.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/contains.js.map +1 -1
- package/dist/server/services/builders/filters/operators/contains.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/containsi.js.map +1 -1
- package/dist/server/services/builders/filters/operators/containsi.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/ends-with.js.map +1 -1
- package/dist/server/services/builders/filters/operators/ends-with.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/eq.js.map +1 -1
- package/dist/server/services/builders/filters/operators/eq.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/eqi.js.map +1 -1
- package/dist/server/services/builders/filters/operators/eqi.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/gt.js.map +1 -1
- package/dist/server/services/builders/filters/operators/gt.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/gte.js.map +1 -1
- package/dist/server/services/builders/filters/operators/gte.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/in.js.map +1 -1
- package/dist/server/services/builders/filters/operators/in.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/index.js.map +1 -1
- package/dist/server/services/builders/filters/operators/index.mjs +4 -4
- package/dist/server/services/builders/filters/operators/index.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/lt.js.map +1 -1
- package/dist/server/services/builders/filters/operators/lt.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/lte.js.map +1 -1
- package/dist/server/services/builders/filters/operators/lte.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/ne.js.map +1 -1
- package/dist/server/services/builders/filters/operators/ne.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/nei.js.map +1 -1
- package/dist/server/services/builders/filters/operators/nei.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/not-contains.js.map +1 -1
- package/dist/server/services/builders/filters/operators/not-contains.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/not-containsi.js.map +1 -1
- package/dist/server/services/builders/filters/operators/not-containsi.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/not-in.js.map +1 -1
- package/dist/server/services/builders/filters/operators/not-in.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/not-null.js.map +1 -1
- package/dist/server/services/builders/filters/operators/not-null.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/not.js.map +1 -1
- package/dist/server/services/builders/filters/operators/not.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/null.js.map +1 -1
- package/dist/server/services/builders/filters/operators/null.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/or.js.map +1 -1
- package/dist/server/services/builders/filters/operators/or.mjs.map +1 -1
- package/dist/server/services/builders/filters/operators/starts-with.js.map +1 -1
- package/dist/server/services/builders/filters/operators/starts-with.mjs.map +1 -1
- package/dist/server/services/builders/generic-morph.js.map +1 -1
- package/dist/server/services/builders/generic-morph.mjs.map +1 -1
- package/dist/server/services/builders/index.js.map +1 -1
- package/dist/server/services/builders/index.mjs.map +1 -1
- package/dist/server/services/builders/input.js.map +1 -1
- package/dist/server/services/builders/input.mjs.map +1 -1
- package/dist/server/services/builders/mutations/collection-type.js.map +1 -1
- package/dist/server/services/builders/mutations/collection-type.mjs.map +1 -1
- package/dist/server/services/builders/mutations/index.js.map +1 -1
- package/dist/server/services/builders/mutations/index.mjs.map +1 -1
- package/dist/server/services/builders/mutations/single-type.js.map +1 -1
- package/dist/server/services/builders/mutations/single-type.mjs.map +1 -1
- package/dist/server/services/builders/queries/collection-type.js.map +1 -1
- package/dist/server/services/builders/queries/collection-type.mjs.map +1 -1
- package/dist/server/services/builders/queries/index.js.map +1 -1
- package/dist/server/services/builders/queries/index.mjs.map +1 -1
- package/dist/server/services/builders/queries/single-type.js.map +1 -1
- package/dist/server/services/builders/queries/single-type.mjs.map +1 -1
- package/dist/server/services/builders/relation-response-collection.js.map +1 -1
- package/dist/server/services/builders/relation-response-collection.mjs.map +1 -1
- package/dist/server/services/builders/resolvers/association.js.map +1 -1
- package/dist/server/services/builders/resolvers/association.mjs +1 -1
- package/dist/server/services/builders/resolvers/association.mjs.map +1 -1
- package/dist/server/services/builders/resolvers/component.js.map +1 -1
- package/dist/server/services/builders/resolvers/component.mjs.map +1 -1
- package/dist/server/services/builders/resolvers/dynamic-zone.js.map +1 -1
- package/dist/server/services/builders/resolvers/dynamic-zone.mjs.map +1 -1
- package/dist/server/services/builders/resolvers/index.js.map +1 -1
- package/dist/server/services/builders/resolvers/index.mjs.map +1 -1
- package/dist/server/services/builders/resolvers/pagination.js.map +1 -1
- package/dist/server/services/builders/resolvers/pagination.mjs.map +1 -1
- package/dist/server/services/builders/resolvers/query.js.map +1 -1
- package/dist/server/services/builders/resolvers/query.mjs.map +1 -1
- package/dist/server/services/builders/response-collection.js.map +1 -1
- package/dist/server/services/builders/response-collection.mjs.map +1 -1
- package/dist/server/services/builders/response.js.map +1 -1
- package/dist/server/services/builders/response.mjs.map +1 -1
- package/dist/server/services/builders/type.js +1 -3
- package/dist/server/services/builders/type.js.map +1 -1
- package/dist/server/services/builders/type.mjs +1 -3
- package/dist/server/services/builders/type.mjs.map +1 -1
- package/dist/server/services/builders/utils.js.map +1 -1
- package/dist/server/services/builders/utils.mjs +2 -2
- package/dist/server/services/builders/utils.mjs.map +1 -1
- package/dist/server/services/constants.js.map +1 -1
- package/dist/server/services/constants.mjs.map +1 -1
- package/dist/server/services/content-api/index.js.map +1 -1
- package/dist/server/services/content-api/index.mjs.map +1 -1
- package/dist/server/services/content-api/policy.js.map +1 -1
- package/dist/server/services/content-api/policy.mjs +1 -1
- package/dist/server/services/content-api/policy.mjs.map +1 -1
- package/dist/server/services/content-api/register-functions/collection-type.js.map +1 -1
- package/dist/server/services/content-api/register-functions/collection-type.mjs.map +1 -1
- package/dist/server/services/content-api/register-functions/component.js.map +1 -1
- package/dist/server/services/content-api/register-functions/component.mjs.map +1 -1
- package/dist/server/services/content-api/register-functions/dynamic-zones.js.map +1 -1
- package/dist/server/services/content-api/register-functions/dynamic-zones.mjs.map +1 -1
- package/dist/server/services/content-api/register-functions/enums.js.map +1 -1
- package/dist/server/services/content-api/register-functions/enums.mjs.map +1 -1
- package/dist/server/services/content-api/register-functions/filters.js.map +1 -1
- package/dist/server/services/content-api/register-functions/filters.mjs.map +1 -1
- package/dist/server/services/content-api/register-functions/inputs.js.map +1 -1
- package/dist/server/services/content-api/register-functions/inputs.mjs.map +1 -1
- package/dist/server/services/content-api/register-functions/internals.js.map +1 -1
- package/dist/server/services/content-api/register-functions/internals.mjs.map +1 -1
- package/dist/server/services/content-api/register-functions/polymorphic.js.map +1 -1
- package/dist/server/services/content-api/register-functions/polymorphic.mjs.map +1 -1
- package/dist/server/services/content-api/register-functions/scalars.js.map +1 -1
- package/dist/server/services/content-api/register-functions/scalars.mjs.map +1 -1
- package/dist/server/services/content-api/register-functions/single-type.js.map +1 -1
- package/dist/server/services/content-api/register-functions/single-type.mjs.map +1 -1
- package/dist/server/services/content-api/wrap-resolvers.js.map +1 -1
- package/dist/server/services/content-api/wrap-resolvers.mjs.map +1 -1
- package/dist/server/services/extension/extension.js.map +1 -1
- package/dist/server/services/extension/extension.mjs.map +1 -1
- package/dist/server/services/extension/shadow-crud-manager.js.map +1 -1
- package/dist/server/services/extension/shadow-crud-manager.mjs.map +1 -1
- package/dist/server/services/format/index.js.map +1 -1
- package/dist/server/services/format/index.mjs.map +1 -1
- package/dist/server/services/format/return-types.js.map +1 -1
- package/dist/server/services/format/return-types.mjs.map +1 -1
- package/dist/server/services/index.js +8 -8
- package/dist/server/services/index.js.map +1 -1
- package/dist/server/services/index.mjs.map +1 -1
- package/dist/server/services/internals/args/index.js.map +1 -1
- package/dist/server/services/internals/args/index.mjs.map +1 -1
- package/dist/server/services/internals/args/pagination.js.map +1 -1
- package/dist/server/services/internals/args/pagination.mjs.map +1 -1
- package/dist/server/services/internals/args/publication-status.js.map +1 -1
- package/dist/server/services/internals/args/publication-status.mjs.map +1 -1
- package/dist/server/services/internals/args/sort.js.map +1 -1
- package/dist/server/services/internals/args/sort.mjs.map +1 -1
- package/dist/server/services/internals/helpers/get-enabled-scalars.js.map +1 -1
- package/dist/server/services/internals/helpers/get-enabled-scalars.mjs.map +1 -1
- package/dist/server/services/internals/helpers/index.js.map +1 -1
- package/dist/server/services/internals/helpers/index.mjs.map +1 -1
- package/dist/server/services/internals/index.js +8 -8
- package/dist/server/services/internals/index.js.map +1 -1
- package/dist/server/services/internals/index.mjs.map +1 -1
- package/dist/server/services/internals/scalars/date.js.map +1 -1
- package/dist/server/services/internals/scalars/date.mjs.map +1 -1
- package/dist/server/services/internals/scalars/index.js.map +1 -1
- package/dist/server/services/internals/scalars/index.mjs +1 -1
- package/dist/server/services/internals/scalars/index.mjs.map +1 -1
- package/dist/server/services/internals/scalars/time.js.map +1 -1
- package/dist/server/services/internals/scalars/time.mjs +1 -1
- package/dist/server/services/internals/scalars/time.mjs.map +1 -1
- package/dist/server/services/internals/types/delete-mutation-response.js.map +1 -1
- package/dist/server/services/internals/types/delete-mutation-response.mjs.map +1 -1
- package/dist/server/services/internals/types/error.js.map +1 -1
- package/dist/server/services/internals/types/error.mjs.map +1 -1
- package/dist/server/services/internals/types/filters.js.map +1 -1
- package/dist/server/services/internals/types/filters.mjs.map +1 -1
- package/dist/server/services/internals/types/index.js.map +1 -1
- package/dist/server/services/internals/types/index.mjs.map +1 -1
- package/dist/server/services/internals/types/pagination.js.map +1 -1
- package/dist/server/services/internals/types/pagination.mjs.map +1 -1
- package/dist/server/services/internals/types/publication-status.js.map +1 -1
- package/dist/server/services/internals/types/publication-status.mjs.map +1 -1
- package/dist/server/services/internals/types/response-collection-meta.js.map +1 -1
- package/dist/server/services/internals/types/response-collection-meta.mjs.map +1 -1
- package/dist/server/services/type-registry.js.map +1 -1
- package/dist/server/services/type-registry.mjs.map +1 -1
- package/dist/server/services/utils/attributes.js.map +1 -1
- package/dist/server/services/utils/attributes.mjs.map +1 -1
- package/dist/server/services/utils/index.js.map +1 -1
- package/dist/server/services/utils/index.mjs.map +1 -1
- package/dist/server/services/utils/mappers/entity-to-response-entity.js.map +1 -1
- package/dist/server/services/utils/mappers/entity-to-response-entity.mjs +5 -5
- package/dist/server/services/utils/mappers/entity-to-response-entity.mjs.map +1 -1
- package/dist/server/services/utils/mappers/graphql-filters-to-strapi-query.js.map +1 -1
- package/dist/server/services/utils/mappers/graphql-filters-to-strapi-query.mjs.map +1 -1
- package/dist/server/services/utils/mappers/graphql-scalar-to-operators.js.map +1 -1
- package/dist/server/services/utils/mappers/graphql-scalar-to-operators.mjs.map +1 -1
- package/dist/server/services/utils/mappers/index.js.map +1 -1
- package/dist/server/services/utils/mappers/index.mjs.map +1 -1
- package/dist/server/services/utils/mappers/strapi-scalar-to-graphql-scalar.js.map +1 -1
- package/dist/server/services/utils/mappers/strapi-scalar-to-graphql-scalar.mjs.map +1 -1
- package/dist/server/services/utils/naming.js.map +1 -1
- package/dist/server/services/utils/naming.mjs.map +1 -1
- package/dist/server/services/utils/playground.js.map +1 -1
- package/dist/server/services/utils/playground.mjs.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-zones.js","sources":["../../../../server/src/services/builders/dynamic-zones.ts"],"sourcesContent":["import { Kind, valueFromASTUntyped } from 'graphql';\nimport { omit } from 'lodash/fp';\nimport { unionType, scalarType } from 'nexus';\nimport { errors } from '@strapi/utils';\nimport type { Internal, Schema } from '@strapi/types';\n\nimport type { Context } from '../types';\n\nconst { ApplicationError } = errors;\n\nexport default ({ strapi }: Context) => {\n const buildTypeDefinition = (name: string, components: Internal.UID.Component[]) => {\n const { ERROR_TYPE_NAME } = strapi.plugin('graphql').service('constants');\n const isEmpty = components.length === 0;\n\n const componentsTypeNames = components.map((componentUID) => {\n const component = strapi.components[componentUID];\n\n if (!component) {\n throw new ApplicationError(\n `Trying to create a dynamic zone type with an unknown component: \"${componentUID}\"`\n );\n }\n\n return component.globalId;\n });\n\n return unionType({\n name,\n\n resolveType(obj) {\n if (isEmpty) {\n return ERROR_TYPE_NAME;\n }\n\n return strapi.components[obj.__component].globalId;\n },\n\n definition(t) {\n t.members(...componentsTypeNames, ERROR_TYPE_NAME);\n },\n });\n };\n\n const buildInputDefinition = (name: string, components: Internal.UID.Component[]) => {\n const parseData = (value: any) => {\n const component = Object.values(strapi.components).find(\n (component) => component.globalId === value.__typename\n );\n\n if (!component) {\n throw new ApplicationError(\n `Component not found. expected one of: ${components\n .map((uid) => strapi.components[uid].globalId)\n .join(', ')}`\n );\n }\n\n return {\n __component: component.uid,\n ...omit(['__typename'], value),\n };\n };\n\n return scalarType({\n name,\n\n serialize: (value) => value,\n\n parseValue: (value) => parseData(value),\n\n parseLiteral(ast, variables) {\n if (ast.kind !== Kind.OBJECT) {\n return undefined;\n }\n\n const value = valueFromASTUntyped(ast, variables);\n return parseData(value);\n },\n });\n };\n\n return {\n /**\n * Build a Nexus dynamic zone type from a Strapi dz attribute\n */\n buildDynamicZoneDefinition(\n definition: Schema.Attribute.DynamicZone,\n name: string,\n inputName: string\n ) {\n const { components } = definition;\n\n const typeDefinition = buildTypeDefinition(name, components);\n const inputDefinition = buildInputDefinition(inputName, components);\n\n return [typeDefinition, inputDefinition];\n },\n };\n};\n"],"names":["ApplicationError","errors","strapi","buildTypeDefinition","name","components","ERROR_TYPE_NAME","plugin","service","isEmpty","length","componentsTypeNames","map","componentUID","component","globalId","unionType","resolveType","obj","__component","definition","t","members","buildInputDefinition","parseData","value","Object","values","find","__typename","uid","join","omit","scalarType","serialize","parseValue","parseLiteral","ast","variables","kind","Kind","OBJECT","undefined","valueFromASTUntyped","buildDynamicZoneDefinition","inputName","typeDefinition","inputDefinition"],"mappings":";;;;;;;AAQA,MAAM,EAAEA,gBAAgB,EAAE,GAAGC,YAAAA;AAE7B,kBAAe,CAAA,CAAC,EAAEC,MAAM,EAAW,GAAA;IACjC,MAAMC,mBAAAA,GAAsB,CAACC,
|
|
1
|
+
{"version":3,"file":"dynamic-zones.js","sources":["../../../../server/src/services/builders/dynamic-zones.ts"],"sourcesContent":["import { Kind, valueFromASTUntyped } from 'graphql';\nimport { omit } from 'lodash/fp';\nimport { unionType, scalarType } from 'nexus';\nimport { errors } from '@strapi/utils';\nimport type { Internal, Schema } from '@strapi/types';\n\nimport type { Context } from '../types';\n\nconst { ApplicationError } = errors;\n\nexport default ({ strapi }: Context) => {\n const buildTypeDefinition = (name: string, components: Internal.UID.Component[]) => {\n const { ERROR_TYPE_NAME } = strapi.plugin('graphql').service('constants');\n const isEmpty = components.length === 0;\n\n const componentsTypeNames = components.map((componentUID) => {\n const component = strapi.components[componentUID];\n\n if (!component) {\n throw new ApplicationError(\n `Trying to create a dynamic zone type with an unknown component: \"${componentUID}\"`\n );\n }\n\n return component.globalId;\n });\n\n return unionType({\n name,\n\n resolveType(obj) {\n if (isEmpty) {\n return ERROR_TYPE_NAME;\n }\n\n return strapi.components[obj.__component].globalId;\n },\n\n definition(t) {\n t.members(...componentsTypeNames, ERROR_TYPE_NAME);\n },\n });\n };\n\n const buildInputDefinition = (name: string, components: Internal.UID.Component[]) => {\n const parseData = (value: any) => {\n const component = Object.values(strapi.components).find(\n (component) => component.globalId === value.__typename\n );\n\n if (!component) {\n throw new ApplicationError(\n `Component not found. expected one of: ${components\n .map((uid) => strapi.components[uid].globalId)\n .join(', ')}`\n );\n }\n\n return {\n __component: component.uid,\n ...omit(['__typename'], value),\n };\n };\n\n return scalarType({\n name,\n\n serialize: (value) => value,\n\n parseValue: (value) => parseData(value),\n\n parseLiteral(ast, variables) {\n if (ast.kind !== Kind.OBJECT) {\n return undefined;\n }\n\n const value = valueFromASTUntyped(ast, variables);\n return parseData(value);\n },\n });\n };\n\n return {\n /**\n * Build a Nexus dynamic zone type from a Strapi dz attribute\n */\n buildDynamicZoneDefinition(\n definition: Schema.Attribute.DynamicZone,\n name: string,\n inputName: string\n ) {\n const { components } = definition;\n\n const typeDefinition = buildTypeDefinition(name, components);\n const inputDefinition = buildInputDefinition(inputName, components);\n\n return [typeDefinition, inputDefinition];\n },\n };\n};\n"],"names":["ApplicationError","errors","strapi","buildTypeDefinition","name","components","ERROR_TYPE_NAME","plugin","service","isEmpty","length","componentsTypeNames","map","componentUID","component","globalId","unionType","resolveType","obj","__component","definition","t","members","buildInputDefinition","parseData","value","Object","values","find","__typename","uid","join","omit","scalarType","serialize","parseValue","parseLiteral","ast","variables","kind","Kind","OBJECT","undefined","valueFromASTUntyped","buildDynamicZoneDefinition","inputName","typeDefinition","inputDefinition"],"mappings":";;;;;;;AAQA,MAAM,EAAEA,gBAAgB,EAAE,GAAGC,YAAAA;AAE7B,kBAAe,CAAA,CAAC,EAAEC,MAAM,EAAW,GAAA;IACjC,MAAMC,mBAAAA,GAAsB,CAACC,IAAAA,EAAcC,UAAAA,GAAAA;QACzC,MAAM,EAAEC,eAAe,EAAE,GAAGJ,OAAOK,MAAM,CAAC,SAAA,CAAA,CAAWC,OAAO,CAAC,WAAA,CAAA;QAC7D,MAAMC,OAAAA,GAAUJ,UAAAA,CAAWK,MAAM,KAAK,CAAA;AAEtC,QAAA,MAAMC,mBAAAA,GAAsBN,UAAAA,CAAWO,GAAG,CAAC,CAACC,YAAAA,GAAAA;AAC1C,YAAA,MAAMC,SAAAA,GAAYZ,MAAAA,CAAOG,UAAU,CAACQ,YAAAA,CAAa;AAEjD,YAAA,IAAI,CAACC,SAAAA,EAAW;AACd,gBAAA,MAAM,IAAId,gBAAAA,CACR,CAAC,iEAAiE,EAAEa,YAAAA,CAAa,CAAC,CAAC,CAAA;AAEvF,YAAA;AAEA,YAAA,OAAOC,UAAUC,QAAQ;AAC3B,QAAA,CAAA,CAAA;AAEA,QAAA,OAAOC,eAAAA,CAAU;AACfZ,YAAAA,IAAAA;AAEAa,YAAAA,WAAAA,CAAAA,CAAYC,GAAG,EAAA;AACb,gBAAA,IAAIT,OAAAA,EAAS;oBACX,OAAOH,eAAAA;AACT,gBAAA;AAEA,gBAAA,OAAOJ,OAAOG,UAAU,CAACa,IAAIC,WAAW,CAAC,CAACJ,QAAQ;AACpD,YAAA,CAAA;AAEAK,YAAAA,UAAAA,CAAAA,CAAWC,CAAC,EAAA;gBACVA,CAAAA,CAAEC,OAAO,IAAIX,mBAAAA,EAAqBL,eAAAA,CAAAA;AACpC,YAAA;AAC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;AACF,IAAA,CAAA;IAEA,OAAO;AACL;;AAEC,QACDmB,0BAAAA,CAAAA,CACExB,UAAwC,EACxChB,IAAY,EACZyC,SAAiB,EAAA;YAEjB,MAAM,EAAExC,UAAU,EAAE,GAAGe,UAAAA;YAEvB,MAAM0B,cAAAA,GAAiB3C,oBAAoBC,IAAAA,EAAMC,UAAAA,CAAAA;YACjD,MAAM0C,eAAAA,GAAkBxB,qBAAqBsB,SAAAA,EAAWxC,UAAAA,CAAAA;YAExD,OAAO;AAACyC,gBAAAA,cAAAA;AAAgBC,gBAAAA;AAAgB,aAAA;AAC1C,QAAA;AACF,KAAA;AACF,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-zones.mjs","sources":["../../../../server/src/services/builders/dynamic-zones.ts"],"sourcesContent":["import { Kind, valueFromASTUntyped } from 'graphql';\nimport { omit } from 'lodash/fp';\nimport { unionType, scalarType } from 'nexus';\nimport { errors } from '@strapi/utils';\nimport type { Internal, Schema } from '@strapi/types';\n\nimport type { Context } from '../types';\n\nconst { ApplicationError } = errors;\n\nexport default ({ strapi }: Context) => {\n const buildTypeDefinition = (name: string, components: Internal.UID.Component[]) => {\n const { ERROR_TYPE_NAME } = strapi.plugin('graphql').service('constants');\n const isEmpty = components.length === 0;\n\n const componentsTypeNames = components.map((componentUID) => {\n const component = strapi.components[componentUID];\n\n if (!component) {\n throw new ApplicationError(\n `Trying to create a dynamic zone type with an unknown component: \"${componentUID}\"`\n );\n }\n\n return component.globalId;\n });\n\n return unionType({\n name,\n\n resolveType(obj) {\n if (isEmpty) {\n return ERROR_TYPE_NAME;\n }\n\n return strapi.components[obj.__component].globalId;\n },\n\n definition(t) {\n t.members(...componentsTypeNames, ERROR_TYPE_NAME);\n },\n });\n };\n\n const buildInputDefinition = (name: string, components: Internal.UID.Component[]) => {\n const parseData = (value: any) => {\n const component = Object.values(strapi.components).find(\n (component) => component.globalId === value.__typename\n );\n\n if (!component) {\n throw new ApplicationError(\n `Component not found. expected one of: ${components\n .map((uid) => strapi.components[uid].globalId)\n .join(', ')}`\n );\n }\n\n return {\n __component: component.uid,\n ...omit(['__typename'], value),\n };\n };\n\n return scalarType({\n name,\n\n serialize: (value) => value,\n\n parseValue: (value) => parseData(value),\n\n parseLiteral(ast, variables) {\n if (ast.kind !== Kind.OBJECT) {\n return undefined;\n }\n\n const value = valueFromASTUntyped(ast, variables);\n return parseData(value);\n },\n });\n };\n\n return {\n /**\n * Build a Nexus dynamic zone type from a Strapi dz attribute\n */\n buildDynamicZoneDefinition(\n definition: Schema.Attribute.DynamicZone,\n name: string,\n inputName: string\n ) {\n const { components } = definition;\n\n const typeDefinition = buildTypeDefinition(name, components);\n const inputDefinition = buildInputDefinition(inputName, components);\n\n return [typeDefinition, inputDefinition];\n },\n };\n};\n"],"names":["ApplicationError","errors","strapi","buildTypeDefinition","name","components","ERROR_TYPE_NAME","plugin","service","isEmpty","length","componentsTypeNames","map","componentUID","component","globalId","unionType","resolveType","obj","__component","definition","t","members","buildInputDefinition","parseData","value","Object","values","find","__typename","uid","join","omit","scalarType","serialize","parseValue","parseLiteral","ast","variables","kind","Kind","OBJECT","undefined","valueFromASTUntyped","buildDynamicZoneDefinition","inputName","typeDefinition","inputDefinition"],"mappings":";;;;;AAQA,MAAM,EAAEA,gBAAgB,EAAE,GAAGC,MAAAA;AAE7B,kBAAe,CAAA,CAAC,EAAEC,MAAM,EAAW,GAAA;IACjC,MAAMC,mBAAAA,GAAsB,CAACC,
|
|
1
|
+
{"version":3,"file":"dynamic-zones.mjs","sources":["../../../../server/src/services/builders/dynamic-zones.ts"],"sourcesContent":["import { Kind, valueFromASTUntyped } from 'graphql';\nimport { omit } from 'lodash/fp';\nimport { unionType, scalarType } from 'nexus';\nimport { errors } from '@strapi/utils';\nimport type { Internal, Schema } from '@strapi/types';\n\nimport type { Context } from '../types';\n\nconst { ApplicationError } = errors;\n\nexport default ({ strapi }: Context) => {\n const buildTypeDefinition = (name: string, components: Internal.UID.Component[]) => {\n const { ERROR_TYPE_NAME } = strapi.plugin('graphql').service('constants');\n const isEmpty = components.length === 0;\n\n const componentsTypeNames = components.map((componentUID) => {\n const component = strapi.components[componentUID];\n\n if (!component) {\n throw new ApplicationError(\n `Trying to create a dynamic zone type with an unknown component: \"${componentUID}\"`\n );\n }\n\n return component.globalId;\n });\n\n return unionType({\n name,\n\n resolveType(obj) {\n if (isEmpty) {\n return ERROR_TYPE_NAME;\n }\n\n return strapi.components[obj.__component].globalId;\n },\n\n definition(t) {\n t.members(...componentsTypeNames, ERROR_TYPE_NAME);\n },\n });\n };\n\n const buildInputDefinition = (name: string, components: Internal.UID.Component[]) => {\n const parseData = (value: any) => {\n const component = Object.values(strapi.components).find(\n (component) => component.globalId === value.__typename\n );\n\n if (!component) {\n throw new ApplicationError(\n `Component not found. expected one of: ${components\n .map((uid) => strapi.components[uid].globalId)\n .join(', ')}`\n );\n }\n\n return {\n __component: component.uid,\n ...omit(['__typename'], value),\n };\n };\n\n return scalarType({\n name,\n\n serialize: (value) => value,\n\n parseValue: (value) => parseData(value),\n\n parseLiteral(ast, variables) {\n if (ast.kind !== Kind.OBJECT) {\n return undefined;\n }\n\n const value = valueFromASTUntyped(ast, variables);\n return parseData(value);\n },\n });\n };\n\n return {\n /**\n * Build a Nexus dynamic zone type from a Strapi dz attribute\n */\n buildDynamicZoneDefinition(\n definition: Schema.Attribute.DynamicZone,\n name: string,\n inputName: string\n ) {\n const { components } = definition;\n\n const typeDefinition = buildTypeDefinition(name, components);\n const inputDefinition = buildInputDefinition(inputName, components);\n\n return [typeDefinition, inputDefinition];\n },\n };\n};\n"],"names":["ApplicationError","errors","strapi","buildTypeDefinition","name","components","ERROR_TYPE_NAME","plugin","service","isEmpty","length","componentsTypeNames","map","componentUID","component","globalId","unionType","resolveType","obj","__component","definition","t","members","buildInputDefinition","parseData","value","Object","values","find","__typename","uid","join","omit","scalarType","serialize","parseValue","parseLiteral","ast","variables","kind","Kind","OBJECT","undefined","valueF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ACZyC,SAAiB,EAAA;YAEjB,MAAM,EAAExC,UAAU,EAAE,GAAGe,UAAAA;YAEvB,MAAM0B,cAAAA,GAAiB3C,oBAAoBC,IAAAA,EAAMC,UAAAA,CAAAA;YACjD,MAAM0C,eAAAA,GAAkBxB,qBAAqBsB,SAAAA,EAAWxC,UAAAA,CAAAA;YAExD,OAAO;AAACyC,gBAAAA,cAAAA;AAAgBC,gBAAAA;AAAgB,aAAA;AAC1C,QAAA;AACF,KAAA;AACF,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.js","sources":["../../../../server/src/services/builders/entity.ts"],"sourcesContent":["import { objectType } from 'nexus';\nimport { prop, identity, isEmpty } from 'lodash/fp';\nimport type { Schema } from '@strapi/types';\n\nimport type { Context } from '../types';\n\nexport default ({ strapi }: Context) => {\n const { naming } = strapi.plugin('graphql').service('utils');\n\n return {\n /**\n * Build a higher level type for a content type which contains the attributes, the ID and the metadata\n * @param {object} contentType The content type which will be used to build its entity type\n * @return {NexusObjectTypeDef}\n */\n buildEntityDefinition(contentType: Schema.ContentType) {\n const { attributes } = contentType;\n\n const name = naming.getEntityName(contentType);\n const typeName = naming.getTypeName(contentType);\n\n return objectType({\n name,\n\n definition(t) {\n // Keep the ID attribute at the top level\n t.id('id', { resolve: prop('id') });\n\n if (!isEmpty(attributes)) {\n // Keep the fetched object into a dedicated `attributes` field\n t.field('attributes', {\n type: typeName,\n resolve: identity,\n });\n }\n },\n });\n },\n };\n};\n"],"names":["strapi","naming","plugin","service","buildEntityDefinition","contentType","attributes","name","getEntityName","typeName","getTypeName","objectType","definition","t","id","resolve","prop","isEmpty","field","type","identity"],"mappings":";;;;;AAMA,aAAe,CAAA,CAAC,EAAEA,MAAM,EAAW,GAAA;IACjC,MAAM,EAAEC,MAAM,EAAE,GAAGD,OAAOE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"entity.js","sources":["../../../../server/src/services/builders/entity.ts"],"sourcesContent":["import { objectType } from 'nexus';\nimport { prop, identity, isEmpty } from 'lodash/fp';\nimport type { Schema } from '@strapi/types';\n\nimport type { Context } from '../types';\n\nexport default ({ strapi }: Context) => {\n const { naming } = strapi.plugin('graphql').service('utils');\n\n return {\n /**\n * Build a higher level type for a content type which contains the attributes, the ID and the metadata\n * @param {object} contentType The content type which will be used to build its entity type\n * @return {NexusObjectTypeDef}\n */\n buildEntityDefinition(contentType: Schema.ContentType) {\n const { attributes } = contentType;\n\n const name = naming.getEntityName(contentType);\n const typeName = naming.getTypeName(contentType);\n\n return objectType({\n name,\n\n definition(t) {\n // Keep the ID attribute at the top level\n t.id('id', { resolve: prop('id') });\n\n if (!isEmpty(attributes)) {\n // Keep the fetched object into a dedicated `attributes` field\n t.field('attributes', {\n type: typeName,\n resolve: identity,\n });\n }\n },\n });\n },\n };\n};\n"],"names":["strapi","naming","plugin","service","buildEntityDefinition","contentType","attributes","name","getEntityName","typeName","getTypeName","objectType","definition","t","id","resolve","prop","isEmpty","field","type","identity"],"mappings":";;;;;AAMA,aAAe,CAAA,CAAC,EAAEA,MAAM,EAAW,GAAA;IACjC,MAAM,EAAEC,MAAM,EAAE,GAAGD,OAAOE,MAAM,CAAC,SAAA,CAAA,CAAWC,OAAO,CAAC,OAAA,CAAA;IAEpD,OAAO;AACL;;;;AAIC,QACDC,uBAAsBC,WAA+B,EAAA;YACnD,MAAM,EAAEC,UAAU,EAAE,GAAGD,WAAAA;YAEvB,MAAME,IAAAA,GAAON,MAAAA,CAAOO,aAAa,CAACH,WAAAA,CAAAA;YAClC,MAAMI,QAAAA,GAAWR,MAAAA,CAAOS,WAAW,CAACL,WAAAA,CAAAA;AAEpC,YAAA,OAAOM,gBAAAA,CAAW;AAChBJ,gBAAAA,IAAAA;AAEAK,gBAAAA,UAAAA,CAAAA,CAAWC,CAAC,EAAA;;oBAEVA,CAAAA,CAAEC,EAAE,CAAC,IAAA,EAAM;AAAEC,wBAAAA,OAAAA,EAASC,OAAAA,CAAK,IAAA;AAAM,qBAAA,CAAA;oBAEjC,IAAI,CAACC,WAAQX,UAAAA,CAAAA,EAAa;;wBAExBO,CAAAA,CAAEK,KAAK,CAAC,YAAA,EAAc;4BACpBC,IAAAA,EAAMV,QAAAA;4BACNM,OAAAA,EAASK;AACX,yBAAA,CAAA;AACF,oBAAA;AACF,gBAAA;AACF,aAAA,CAAA;AACF,QAAA;AACF,KAAA;AACF,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.mjs","sources":["../../../../server/src/services/builders/entity.ts"],"sourcesContent":["import { objectType } from 'nexus';\nimport { prop, identity, isEmpty } from 'lodash/fp';\nimport type { Schema } from '@strapi/types';\n\nimport type { Context } from '../types';\n\nexport default ({ strapi }: Context) => {\n const { naming } = strapi.plugin('graphql').service('utils');\n\n return {\n /**\n * Build a higher level type for a content type which contains the attributes, the ID and the metadata\n * @param {object} contentType The content type which will be used to build its entity type\n * @return {NexusObjectTypeDef}\n */\n buildEntityDefinition(contentType: Schema.ContentType) {\n const { attributes } = contentType;\n\n const name = naming.getEntityName(contentType);\n const typeName = naming.getTypeName(contentType);\n\n return objectType({\n name,\n\n definition(t) {\n // Keep the ID attribute at the top level\n t.id('id', { resolve: prop('id') });\n\n if (!isEmpty(attributes)) {\n // Keep the fetched object into a dedicated `attributes` field\n t.field('attributes', {\n type: typeName,\n resolve: identity,\n });\n }\n },\n });\n },\n };\n};\n"],"names":["strapi","naming","plugin","service","buildEntityDefinition","contentType","attributes","name","getEntityName","typeName","getTypeName","objectType","definition","t","id","resolve","prop","isEmpty","field","type","identity"],"mappings":";;;AAMA,aAAe,CAAA,CAAC,EAAEA,MAAM,EAAW,GAAA;IACjC,MAAM,EAAEC,MAAM,EAAE,GAAGD,OAAOE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"entity.mjs","sources":["../../../../server/src/services/builders/entity.ts"],"sourcesContent":["import { objectType } from 'nexus';\nimport { prop, identity, isEmpty } from 'lodash/fp';\nimport type { Schema } from '@strapi/types';\n\nimport type { Context } from '../types';\n\nexport default ({ strapi }: Context) => {\n const { naming } = strapi.plugin('graphql').service('utils');\n\n return {\n /**\n * Build a higher level type for a content type which contains the attributes, the ID and the metadata\n * @param {object} contentType The content type which will be used to build its entity type\n * @return {NexusObjectTypeDef}\n */\n buildEntityDefinition(contentType: Schema.ContentType) {\n const { attributes } = contentType;\n\n const name = naming.getEntityName(contentType);\n const typeName = naming.getTypeName(contentType);\n\n return objectType({\n name,\n\n definition(t) {\n // Keep the ID attribute at the top level\n t.id('id', { resolve: prop('id') });\n\n if (!isEmpty(attributes)) {\n // Keep the fetched object into a dedicated `attributes` field\n t.field('attributes', {\n type: typeName,\n resolve: identity,\n });\n }\n },\n });\n },\n };\n};\n"],"names":["strapi","naming","plugin","service","buildEntityDefinition","contentType","attributes","name","getEntityName","typeName","getTypeName","objectType","definition","t","id","resolve","prop","isEmpty","field","type","identity"],"mappings":";;;AAMA,aAAe,CAAA,CAAC,EAAEA,MAAM,EAAW,GAAA;IACjC,MAAM,EAAEC,MAAM,EAAE,GAAGD,OAAOE,MAAM,CAAC,SAAA,CAAA,CAAWC,OAAO,CAAC,OAAA,CAAA;IAEpD,OAAO;AACL;;;;AAIC,QACDC,uBAAsBC,WAA+B,EAAA;YACnD,MAAM,EAAEC,UAAU,EAAE,GAAGD,WAAAA;YAEvB,MAAME,IAAAA,GAAON,MAAAA,CAAOO,aAAa,CAACH,WAAAA,CAAAA;YAClC,MAAMI,QAAAA,GAAWR,MAAAA,CAAOS,WAAW,CAACL,WAAAA,CAAAA;AAEpC,YAAA,OAAOM,UAAAA,CAAW;AAChBJ,gBAAAA,IAAAA;AAEAK,gBAAAA,UAAAA,CAAAA,CAAWC,CAAC,EAAA;;oBAEVA,CAAAA,CAAEC,EAAE,CAAC,IAAA,EAAM;AAAEC,wBAAAA,OAAAA,EAASC,IAAAA,CAAK,IAAA;AAAM,qBAAA,CAAA;oBAEjC,IAAI,CAACC,QAAQX,UAAAA,CAAAA,EAAa;;wBAExBO,CAAAA,CAAEK,KAAK,CAAC,YAAA,EAAc;4BACpBC,IAAAA,EAAMV,QAAAA;4BACNM,OAAAA,EAASK;AACX,yBAAA,CAAA;AACF,oBAAA;AACF,gBAAA;AACF,aAAA,CAAA;AACF,QAAA;AACF,KAAA;AACF,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sources":["../../../../server/src/services/builders/enums.ts"],"sourcesContent":["import { enumType } from 'nexus';\nimport { set } from 'lodash/fp';\nimport { strings } from '@strapi/utils';\n\ninterface Definition {\n enum: string[];\n}\n\n/**\n * Build a Nexus enum type from a Strapi enum attribute\n * @param {object} definition - The definition of the enum\n * @param {string[]} definition.enum - The params of the enum\n * @param {string} name - The name of the enum\n * @return {NexusEnumTypeDef}\n */\nconst buildEnumTypeDefinition = (definition: Definition, name: string) => {\n return enumType({\n name,\n members: definition.enum.reduce(\n (acc, value) => set(strings.toRegressedEnumValue(value), value, acc),\n {}\n ),\n });\n};\n\nexport default () => ({\n buildEnumTypeDefinition,\n});\n"],"names":["buildEnumTypeDefinition","definition","name","enumType","members","enum","reduce","acc","value","set","strings","toRegressedEnumValue"],"mappings":";;;;;;AAQA;;;;;;IAOA,MAAMA,
|
|
1
|
+
{"version":3,"file":"enums.js","sources":["../../../../server/src/services/builders/enums.ts"],"sourcesContent":["import { enumType } from 'nexus';\nimport { set } from 'lodash/fp';\nimport { strings } from '@strapi/utils';\n\ninterface Definition {\n enum: string[];\n}\n\n/**\n * Build a Nexus enum type from a Strapi enum attribute\n * @param {object} definition - The definition of the enum\n * @param {string[]} definition.enum - The params of the enum\n * @param {string} name - The name of the enum\n * @return {NexusEnumTypeDef}\n */\nconst buildEnumTypeDefinition = (definition: Definition, name: string) => {\n return enumType({\n name,\n members: definition.enum.reduce(\n (acc, value) => set(strings.toRegressedEnumValue(value), value, acc),\n {}\n ),\n });\n};\n\nexport default () => ({\n buildEnumTypeDefinition,\n});\n"],"names":["buildEnumTypeDefinition","definition","name","enumType","members","enum","reduce","acc","value","set","strings","toRegressedEnumValue"],"mappings":";;;;;;AAQA;;;;;;IAOA,MAAMA,uBAAAA,GAA0B,CAACC,UAAAA,EAAwBC,IAAAA,GAAAA;AACvD,IAAA,OAAOC,cAAAA,CAAS;AACdD,QAAAA,IAAAA;AACAE,QAAAA,OAAAA,EAASH,UAAAA,CAAWI,IAAI,CAACC,MAAM,CAC7B,CAACC,GAAAA,EAAKC,KAAAA,GAAUC,MAAAA,CAAIC,cAAQC,oBAAoB,CAACH,KAAAA,CAAAA,EAAQA,KAAAA,EAAOD,MAChE,EAAC;AAEL,KAAA,CAAA;AACF,CAAA;AAEA,YAAe,CAAA,KAAO;AACpBP,QAAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.mjs","sources":["../../../../server/src/services/builders/enums.ts"],"sourcesContent":["import { enumType } from 'nexus';\nimport { set } from 'lodash/fp';\nimport { strings } from '@strapi/utils';\n\ninterface Definition {\n enum: string[];\n}\n\n/**\n * Build a Nexus enum type from a Strapi enum attribute\n * @param {object} definition - The definition of the enum\n * @param {string[]} definition.enum - The params of the enum\n * @param {string} name - The name of the enum\n * @return {NexusEnumTypeDef}\n */\nconst buildEnumTypeDefinition = (definition: Definition, name: string) => {\n return enumType({\n name,\n members: definition.enum.reduce(\n (acc, value) => set(strings.toRegressedEnumValue(value), value, acc),\n {}\n ),\n });\n};\n\nexport default () => ({\n buildEnumTypeDefinition,\n});\n"],"names":["buildEnumTypeDefinition","definition","name","enumType","members","enum","reduce","acc","value","set","strings","toRegressedEnumValue"],"mappings":";;;;AAQA;;;;;;IAOA,MAAMA,
|
|
1
|
+
{"version":3,"file":"enums.mjs","sources":["../../../../server/src/services/builders/enums.ts"],"sourcesContent":["import { enumType } from 'nexus';\nimport { set } from 'lodash/fp';\nimport { strings } from '@strapi/utils';\n\ninterface Definition {\n enum: string[];\n}\n\n/**\n * Build a Nexus enum type from a Strapi enum attribute\n * @param {object} definition - The definition of the enum\n * @param {string[]} definition.enum - The params of the enum\n * @param {string} name - The name of the enum\n * @return {NexusEnumTypeDef}\n */\nconst buildEnumTypeDefinition = (definition: Definition, name: string) => {\n return enumType({\n name,\n members: definition.enum.reduce(\n (acc, value) => set(strings.toRegressedEnumValue(value), value, acc),\n {}\n ),\n });\n};\n\nexport default () => ({\n buildEnumTypeDefinition,\n});\n"],"names":["buildEnumTypeDefinition","definition","name","enumType","members","enum","reduce","acc","value","set","strings","toRegressedEnumValue"],"mappings":";;;;AAQA;;;;;;IAOA,MAAMA,uBAAAA,GAA0B,CAACC,UAAAA,EAAwBC,IAAAA,GAAAA;AACvD,IAAA,OAAOC,QAAAA,CAAS;AACdD,QAAAA,IAAAA;AACAE,QAAAA,OAAAA,EAASH,UAAAA,CAAWI,IAAI,CAACC,MAAM,CAC7B,CAACC,GAAAA,EAAKC,KAAAA,GAAUC,GAAAA,CAAIC,QAAQC,oBAAoB,CAACH,KAAAA,CAAAA,EAAQA,KAAAA,EAAOD,MAChE,EAAC;AAEL,KAAA,CAAA;AACF,CAAA;AAEA,YAAe,CAAA,KAAO;AACpBP,QAAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-type.js","sources":["../../../../../server/src/services/builders/filters/content-type.ts"],"sourcesContent":["import { inputObjectType } from 'nexus';\nimport { contentTypes } from '@strapi/utils';\nimport type * as Nexus from 'nexus';\nimport type { Struct, Schema } from '@strapi/types';\nimport type { Context } from '../../types';\n\nexport default ({ strapi }: Context) => {\n const rootLevelOperators = () => {\n const { operators } = strapi.plugin('graphql').service('builders').filters;\n\n return [operators.and, operators.or, operators.not];\n };\n\n const addScalarAttribute = (\n builder: Nexus.blocks.InputDefinitionBlock<any>,\n attributeName: string,\n attribute: Schema.Attribute.AnyAttribute\n ) => {\n const { naming, mappers } = strapi.plugin('graphql').service('utils');\n\n const gqlType = mappers.strapiScalarToGraphQLScalar(attribute.type);\n\n builder.field(attributeName, { type: naming.getScalarFilterInputTypeName(gqlType) });\n };\n\n const addRelationalAttribute = (\n builder: Nexus.blocks.InputDefinitionBlock<any>,\n attributeName: string,\n attribute: Schema.Attribute.Relation\n ) => {\n const utils = strapi.plugin('graphql').service('utils');\n const extension = strapi.plugin('graphql').service('extension');\n const { getFiltersInputTypeName } = utils.naming;\n const { isMorphRelation } = utils.attributes;\n\n const model = 'target' in attribute && strapi.getModel(attribute.target);\n\n // If there is no model corresponding to the attribute configuration\n // or if the attribute is a polymorphic relation, then ignore it\n if (!model || isMorphRelation(attribute)) return;\n\n // If the target model is disabled, then ignore it too\n if (extension.shadowCRUD(model.uid).isDisabled()) return;\n\n builder.field(attributeName, { type: getFiltersInputTypeName(model) });\n };\n\n const addComponentAttribute = (\n builder: Nexus.blocks.InputDefinitionBlock<any>,\n attributeName: string,\n attribute: Schema.Attribute.Component\n ) => {\n const utils = strapi.plugin('graphql').service('utils');\n const extension = strapi.plugin('graphql').service('extension');\n const { getFiltersInputTypeName } = utils.naming;\n\n const component = strapi.getModel(attribute.component);\n\n // If there is no component corresponding to the attribute configuration, then ignore it\n if (!component) return;\n\n // If the component is disabled, then ignore it too\n if (extension.shadowCRUD(component.uid).isDisabled()) return;\n\n builder.field(attributeName, { type: getFiltersInputTypeName(component) });\n };\n\n const buildContentTypeFilters = (contentType: Struct.ContentTypeSchema) => {\n const utils = strapi.plugin('graphql').service('utils');\n const extension = strapi.plugin('graphql').service('extension');\n\n const { getFiltersInputTypeName, getScalarFilterInputTypeName } = utils.naming;\n const { isStrapiScalar, isRelation, isComponent } = utils.attributes;\n\n const { attributes } = contentType;\n\n const filtersTypeName = getFiltersInputTypeName(contentType);\n\n return inputObjectType({\n name: filtersTypeName,\n\n definition(t) {\n const validAttributes = Object.entries(attributes)\n // Remove private attributes\n .filter(([attributeName]) => !contentTypes.isPrivateAttribute(contentType, attributeName))\n // Remove attributes that have been disabled using the shadow CRUD extension API\n .filter(([attributeName]) =>\n extension.shadowCRUD(contentType.uid).field(attributeName).hasFiltersEnabeld()\n );\n\n const isIDFilterEnabled = extension\n .shadowCRUD(contentType.uid)\n .field('documentId')\n .hasFiltersEnabeld();\n\n // Add an ID filter to the collection types\n if (contentType.kind === 'collectionType' && isIDFilterEnabled) {\n t.field('documentId', { type: getScalarFilterInputTypeName('ID') });\n }\n\n // Add every defined attribute\n for (const [attributeName, attribute] of validAttributes) {\n // Handle scalars\n if (isStrapiScalar(attribute)) {\n addScalarAttribute(t, attributeName, attribute);\n }\n\n // Handle relations\n else if (isRelation(attribute)) {\n addRelationalAttribute(t, attributeName, attribute as Schema.Attribute.Relation);\n }\n\n // Handle components\n else if (isComponent(attribute)) {\n addComponentAttribute(t, attributeName, attribute as Schema.Attribute.Component);\n }\n }\n\n // Conditional clauses\n for (const operator of rootLevelOperators()) {\n operator.add(t, filtersTypeName);\n }\n },\n });\n };\n\n return {\n buildContentTypeFilters,\n };\n};\n"],"names":["strapi","rootLevelOperators","operators","plugin","service","filters","and","or","not","addScalarAttribute","builder","attributeName","attribute","naming","mappers","gqlType","strapiScalarToGraphQLScalar","type","field","getScalarFilterInputTypeName","addRelationalAttribute","utils","extension","getFiltersInputTypeName","isMorphRelation","attributes","model","getModel","target","shadowCRUD","uid","isDisabled","addComponentAttribute","component","buildContentTypeFilters","contentType","isStrapiScalar","isRelation","isComponent","filtersTypeName","inputObjectType","name","definition","t","validAttributes","Object","entries","filter","contentTypes","isPrivateAttribute","hasFiltersEnabeld","isIDFilterEnabled","kind","operator","add"],"mappings":";;;;;AAMA,kBAAe,CAAA,CAAC,EAAEA,MAAM,EAAW,GAAA;AACjC,IAAA,MAAMC,
|
|
1
|
+
{"version":3,"file":"content-type.js","sources":["../../../../../server/src/services/builders/filters/content-type.ts"],"sourcesContent":["import { inputObjectType } from 'nexus';\nimport { contentTypes } from '@strapi/utils';\nimport type * as Nexus from 'nexus';\nimport type { Struct, Schema } from '@strapi/types';\nimport type { Context } from '../../types';\n\nexport default ({ strapi }: Context) => {\n const rootLevelOperators = () => {\n const { operators } = strapi.plugin('graphql').service('builders').filters;\n\n return [operators.and, operators.or, operators.not];\n };\n\n const addScalarAttribute = (\n builder: Nexus.blocks.InputDefinitionBlock<any>,\n attributeName: string,\n attribute: Schema.Attribute.AnyAttribute\n ) => {\n const { naming, mappers } = strapi.plugin('graphql').service('utils');\n\n const gqlType = mappers.strapiScalarToGraphQLScalar(attribute.type);\n\n builder.field(attributeName, { type: naming.getScalarFilterInputTypeName(gqlType) });\n };\n\n const addRelationalAttribute = (\n builder: Nexus.blocks.InputDefinitionBlock<any>,\n attributeName: string,\n attribute: Schema.Attribute.Relation\n ) => {\n const utils = strapi.plugin('graphql').service('utils');\n const extension = strapi.plugin('graphql').service('extension');\n const { getFiltersInputTypeName } = utils.naming;\n const { isMorphRelation } = utils.attributes;\n\n const model = 'target' in attribute && strapi.getModel(attribute.target);\n\n // If there is no model corresponding to the attribute configuration\n // or if the attribute is a polymorphic relation, then ignore it\n if (!model || isMorphRelation(attribute)) return;\n\n // If the target model is disabled, then ignore it too\n if (extension.shadowCRUD(model.uid).isDisabled()) return;\n\n builder.field(attributeName, { type: getFiltersInputTypeName(model) });\n };\n\n const addComponentAttribute = (\n builder: Nexus.blocks.InputDefinitionBlock<any>,\n attributeName: string,\n attribute: Schema.Attribute.Component\n ) => {\n const utils = strapi.plugin('graphql').service('utils');\n const extension = strapi.plugin('graphql').service('extension');\n const { getFiltersInputTypeName } = utils.naming;\n\n const component = strapi.getModel(attribute.component);\n\n // If there is no component corresponding to the attribute configuration, then ignore it\n if (!component) return;\n\n // If the component is disabled, then ignore it too\n if (extension.shadowCRUD(component.uid).isDisabled()) return;\n\n builder.field(attributeName, { type: getFiltersInputTypeName(component) });\n };\n\n const buildContentTypeFilters = (contentType: Struct.ContentTypeSchema) => {\n const utils = strapi.plugin('graphql').service('utils');\n const extension = strapi.plugin('graphql').service('extension');\n\n const { getFiltersInputTypeName, getScalarFilterInputTypeName } = utils.naming;\n const { isStrapiScalar, isRelation, isComponent } = utils.attributes;\n\n const { attributes } = contentType;\n\n const filtersTypeName = getFiltersInputTypeName(contentType);\n\n return inputObjectType({\n name: filtersTypeName,\n\n definition(t) {\n const validAttributes = Object.entries(attributes)\n // Remove private attributes\n .filter(([attributeName]) => !contentTypes.isPrivateAttribute(contentType, attributeName))\n // Remove attributes that have been disabled using the shadow CRUD extension API\n .filter(([attributeName]) =>\n extension.shadowCRUD(contentType.uid).field(attributeName).hasFiltersEnabeld()\n );\n\n const isIDFilterEnabled = extension\n .shadowCRUD(contentType.uid)\n .field('documentId')\n .hasFiltersEnabeld();\n\n // Add an ID filter to the collection types\n if (contentType.kind === 'collectionType' && isIDFilterEnabled) {\n t.field('documentId', { type: getScalarFilterInputTypeName('ID') });\n }\n\n // Add every defined attribute\n for (const [attributeName, attribute] of validAttributes) {\n // Handle scalars\n if (isStrapiScalar(attribute)) {\n addScalarAttribute(t, attributeName, attribute);\n }\n\n // Handle relations\n else if (isRelation(attribute)) {\n addRelationalAttribute(t, attributeName, attribute as Schema.Attribute.Relation);\n }\n\n // Handle components\n else if (isComponent(attribute)) {\n addComponentAttribute(t, attributeName, attribute as Schema.Attribute.Component);\n }\n }\n\n // Conditional clauses\n for (const operator of rootLevelOperators()) {\n operator.add(t, filtersTypeName);\n }\n },\n });\n };\n\n return {\n buildContentTypeFilters,\n };\n};\n"],"names":["strapi","rootLevelOperators","operators","plugin","service","filters","and","or","not","addScalarAttribute","builder","attributeName","attribute","naming","mappers","gqlType","strapiScalarToGraphQLScalar","type","field","getScalarFilterInputTypeName","addRelationalAttribute","utils","extension","getFiltersInputTypeName","isMorphRelation","attributes","model","getModel","target","shadowCRUD","uid","isDisabled","addComponentAttribute","component","buildContentTypeFilters","contentType","isStrapiScalar","isRelation","isComponent","filtersTypeName","inputObjectType","name","definition","t","validAttributes","Object","entries","filter","contentTypes","isPrivateAttribute","hasFiltersEnabeld","isIDFilterEnabled","kind","operator","add"],"mappings":";;;;;AAM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ExD,oBAAA,IAAIR,eAAexB,SAAAA,CAAAA,EAAY;AAC7BH,wBAAAA,kBAAAA,CAAmBkC,GAAGhC,aAAAA,EAAeC,SAAAA,CAAAA;oBACvC,CAAA,MAGK,IAAIyB,WAAWzB,SAAAA,CAAAA,EAAY;AAC9BQ,wBAAAA,sBAAAA,CAAuBuB,GAAGhC,aAAAA,EAAeC,SAAAA,CAAAA;oBAC3C,CAAA,MAGK,IAAI0B,YAAY1B,SAAAA,CAAAA,EAAY;AAC/BoB,wBAAAA,qBAAAA,CAAsBW,GAAGhC,aAAAA,EAAeC,SAAAA,CAAAA;AAC1C,oBAAA;AACF,gBAAA;;gBAGA,KAAK,MAAMyC,YAAYpD,kBAAAA,EAAAA,CAAsB;oBAC3CoD,QAAAA,CAASC,GAAG,CAACX,CAAAA,EAAGJ,eAAAA,CAAAA;AAClB,gBAAA;AACF,YAAA;AACF,SAAA,CAAA;AACF,IAAA,CAAA;IAEA,OAAO;AACLL,QAAAA;AACF,KAAA;AACF,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-type.mjs","sources":["../../../../../server/src/services/builders/filters/content-type.ts"],"sourcesContent":["import { inputObjectType } from 'nexus';\nimport { contentTypes } from '@strapi/utils';\nimport type * as Nexus from 'nexus';\nimport type { Struct, Schema } from '@strapi/types';\nimport type { Context } from '../../types';\n\nexport default ({ strapi }: Context) => {\n const rootLevelOperators = () => {\n const { operators } = strapi.plugin('graphql').service('builders').filters;\n\n return [operators.and, operators.or, operators.not];\n };\n\n const addScalarAttribute = (\n builder: Nexus.blocks.InputDefinitionBlock<any>,\n attributeName: string,\n attribute: Schema.Attribute.AnyAttribute\n ) => {\n const { naming, mappers } = strapi.plugin('graphql').service('utils');\n\n const gqlType = mappers.strapiScalarToGraphQLScalar(attribute.type);\n\n builder.field(attributeName, { type: naming.getScalarFilterInputTypeName(gqlType) });\n };\n\n const addRelationalAttribute = (\n builder: Nexus.blocks.InputDefinitionBlock<any>,\n attributeName: string,\n attribute: Schema.Attribute.Relation\n ) => {\n const utils = strapi.plugin('graphql').service('utils');\n const extension = strapi.plugin('graphql').service('extension');\n const { getFiltersInputTypeName } = utils.naming;\n const { isMorphRelation } = utils.attributes;\n\n const model = 'target' in attribute && strapi.getModel(attribute.target);\n\n // If there is no model corresponding to the attribute configuration\n // or if the attribute is a polymorphic relation, then ignore it\n if (!model || isMorphRelation(attribute)) return;\n\n // If the target model is disabled, then ignore it too\n if (extension.shadowCRUD(model.uid).isDisabled()) return;\n\n builder.field(attributeName, { type: getFiltersInputTypeName(model) });\n };\n\n const addComponentAttribute = (\n builder: Nexus.blocks.InputDefinitionBlock<any>,\n attributeName: string,\n attribute: Schema.Attribute.Component\n ) => {\n const utils = strapi.plugin('graphql').service('utils');\n const extension = strapi.plugin('graphql').service('extension');\n const { getFiltersInputTypeName } = utils.naming;\n\n const component = strapi.getModel(attribute.component);\n\n // If there is no component corresponding to the attribute configuration, then ignore it\n if (!component) return;\n\n // If the component is disabled, then ignore it too\n if (extension.shadowCRUD(component.uid).isDisabled()) return;\n\n builder.field(attributeName, { type: getFiltersInputTypeName(component) });\n };\n\n const buildContentTypeFilters = (contentType: Struct.ContentTypeSchema) => {\n const utils = strapi.plugin('graphql').service('utils');\n const extension = strapi.plugin('graphql').service('extension');\n\n const { getFiltersInputTypeName, getScalarFilterInputTypeName } = utils.naming;\n const { isStrapiScalar, isRelation, isComponent } = utils.attributes;\n\n const { attributes } = contentType;\n\n const filtersTypeName = getFiltersInputTypeName(contentType);\n\n return inputObjectType({\n name: filtersTypeName,\n\n definition(t) {\n const validAttributes = Object.entries(attributes)\n // Remove private attributes\n .filter(([attributeName]) => !contentTypes.isPrivateAttribute(contentType, attributeName))\n // Remove attributes that have been disabled using the shadow CRUD extension API\n .filter(([attributeName]) =>\n extension.shadowCRUD(contentType.uid).field(attributeName).hasFiltersEnabeld()\n );\n\n const isIDFilterEnabled = extension\n .shadowCRUD(contentType.uid)\n .field('documentId')\n .hasFiltersEnabeld();\n\n // Add an ID filter to the collection types\n if (contentType.kind === 'collectionType' && isIDFilterEnabled) {\n t.field('documentId', { type: getScalarFilterInputTypeName('ID') });\n }\n\n // Add every defined attribute\n for (const [attributeName, attribute] of validAttributes) {\n // Handle scalars\n if (isStrapiScalar(attribute)) {\n addScalarAttribute(t, attributeName, attribute);\n }\n\n // Handle relations\n else if (isRelation(attribute)) {\n addRelationalAttribute(t, attributeName, attribute as Schema.Attribute.Relation);\n }\n\n // Handle components\n else if (isComponent(attribute)) {\n addComponentAttribute(t, attributeName, attribute as Schema.Attribute.Component);\n }\n }\n\n // Conditional clauses\n for (const operator of rootLevelOperators()) {\n operator.add(t, filtersTypeName);\n }\n },\n });\n };\n\n return {\n buildContentTypeFilters,\n };\n};\n"],"names":["strapi","rootLevelOperators","operators","plugin","service","filters","and","or","not","addScalarAttribute","builder","attributeName","attribute","naming","mappers","gqlType","strapiScalarToGraphQLScalar","type","field","getScalarFilterInputTypeName","addRelationalAttribute","utils","extension","getFiltersInputTypeName","isMorphRelation","attributes","model","getModel","target","shadowCRUD","uid","isDisabled","addComponentAttribute","component","buildContentTypeFilters","contentType","isStrapiScalar","isRelation","isComponent","filtersTypeName","inputObjectType","name","definition","t","validAttributes","Object","entries","filter","contentTypes","isPrivateAttribute","hasFiltersEnabeld","isIDFilterEnabled","kind","operator","add"],"mappings":";;;AAMA,kBAAe,CAAA,CAAC,EAAEA,MAAM,EAAW,GAAA;AACjC,IAAA,MAAMC,
|
|
1
|
+
{"version":3,"file":"content-type.mjs","sources":["../../../../../server/src/services/builders/filters/content-type.ts"],"sourcesContent":["import { inputObjectType } from 'nexus';\nimport { contentTypes } from '@strapi/utils';\nimport type * as Nexus from 'nexus';\nimport type { Struct, Schema } from '@strapi/types';\nimport type { Context } from '../../types';\n\nexport default ({ strapi }: Context) => {\n const rootLevelOperators = () => {\n const { operators } = strapi.plugin('graphql').service('builders').filters;\n\n return [operators.and, operators.or, operators.not];\n };\n\n const addScalarAttribute = (\n builder: Nexus.blocks.InputDefinitionBlock<any>,\n attributeName: string,\n attribute: Schema.Attribute.AnyAttribute\n ) => {\n const { naming, mappers } = strapi.plugin('graphql').service('utils');\n\n const gqlType = mappers.strapiScalarToGraphQLScalar(attribute.type);\n\n builder.field(attributeName, { type: naming.getScalarFilterInputTypeName(gqlType) });\n };\n\n const addRelationalAttribute = (\n builder: Nexus.blocks.InputDefinitionBlock<any>,\n attributeName: string,\n attribute: Schema.Attribute.Relation\n ) => {\n const utils = strapi.plugin('graphql').service('utils');\n const extension = strapi.plugin('graphql').service('extension');\n const { getFiltersInputTypeName } = utils.naming;\n const { isMorphRelation } = utils.attributes;\n\n const model = 'target' in attribute && strapi.getModel(attribute.target);\n\n // If there is no model corresponding to the attribute configuration\n // or if the attribute is a polymorphic relation, then ignore it\n if (!model || isMorphRelation(attribute)) return;\n\n // If the target model is disabled, then ignore it too\n if (extension.shadowCRUD(model.uid).isDisabled()) return;\n\n builder.field(attributeName, { type: getFiltersInputTypeName(model) });\n };\n\n const addComponentAttribute = (\n builder: Nexus.blocks.InputDefinitionBlock<any>,\n attributeName: string,\n attribute: Schema.Attribute.Component\n ) => {\n const utils = strapi.plugin('graphql').service('utils');\n const extension = strapi.plugin('graphql').service('extension');\n const { getFiltersInputTypeName } = utils.naming;\n\n const component = strapi.getModel(attribute.component);\n\n // If there is no component corresponding to the attribute configuration, then ignore it\n if (!component) return;\n\n // If the component is disabled, then ignore it too\n if (extension.shadowCRUD(component.uid).isDisabled()) return;\n\n builder.field(attributeName, { type: getFiltersInputTypeName(component) });\n };\n\n const buildContentTypeFilters = (contentType: Struct.ContentTypeSchema) => {\n const utils = strapi.plugin('graphql').service('utils');\n const extension = strapi.plugin('graphql').service('extension');\n\n const { getFiltersInputTypeName, getScalarFilterInputTypeName } = utils.naming;\n const { isStrapiScalar, isRelation, isComponent } = utils.attributes;\n\n const { attributes } = contentType;\n\n const filtersTypeName = getFiltersInputTypeName(contentType);\n\n return inputObjectType({\n name: filtersTypeName,\n\n definition(t) {\n const validAttributes = Object.entries(attributes)\n // Remove private attributes\n .filter(([attributeName]) => !contentTypes.isPrivateAttribute(contentType, attributeName))\n // Remove attributes that have been disabled using the shadow CRUD extension API\n .filter(([attributeName]) =>\n extension.shadowCRUD(contentType.uid).field(attributeName).hasFiltersEnabeld()\n );\n\n const isIDFilterEnabled = extension\n .shadowCRUD(contentType.uid)\n .field('documentId')\n .hasFiltersEnabeld();\n\n // Add an ID filter to the collection types\n if (contentType.kind === 'collectionType' && isIDFilterEnabled) {\n t.field('documentId', { type: getScalarFilterInputTypeName('ID') });\n }\n\n // Add every defined attribute\n for (const [attributeName, attribute] of validAttributes) {\n // Handle scalars\n if (isStrapiScalar(attribute)) {\n addScalarAttribute(t, attributeName, attribute);\n }\n\n // Handle relations\n else if (isRelation(attribute)) {\n addRelationalAttribute(t, attributeName, attribute as Schema.Attribute.Relation);\n }\n\n // Handle components\n else if (isComponent(attribute)) {\n addComponentAttribute(t, attributeName, attribute as Schema.Attribute.Component);\n }\n }\n\n // Conditional clauses\n for (const operator of rootLevelOperators()) {\n operator.add(t, filtersTypeName);\n }\n },\n });\n };\n\n return {\n buildContentTypeFilters,\n };\n};\n"],"names":["strapi","rootLevelOperators","operators","plugin","service","filters","and","or","not","addScalarAttribute","builder","attributeName","attribute","naming","mappers","gqlType","strapiScalarToGraphQLScalar","type","field","getScalarFilterInputTypeName","addRelationalAttribute","utils","extension","getFiltersInputTypeName","isMorphRelation","attributes","model","getModel","target","shadowCRUD","uid","isDisabled","addComponentAttribute","component","buildContentTypeFilters","contentType","isStrapiScalar","isRelation","isComponent","filtersTypeName","inputObjectType","name","definition","t","validAttributes","Object","entries","filter","contentTypes","isPrivateAttribute","hasFiltersEnabeld","isIDFilterEnabled","kind","operator","add"],"mappings":";;;AAMA,kBAAe,CAAA,CAAC,EAAEA,MAAM,EAAW,GAAA;AACjC,IAAA,MAAMC,kBAAAA,GAAqB,IAAA;QACzB,MAAM,EAAEC,SAAS,EAAE,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vC,CAAA,MAGK,IAAIyB,WAAWzB,SAAAA,CAAAA,EAAY;AAC9BQ,wBAAAA,sBAAAA,CAAuBuB,GAAGhC,aAAAA,EAAeC,SAAAA,CAAAA;oBAC3C,CAAA,MAGK,IAAI0B,YAAY1B,SAAAA,CAAAA,EAAY;AAC/BoB,wBAAAA,qBAAAA,CAAsBW,GAAGhC,aAAAA,EAAeC,SAAAA,CAAAA;AAC1C,oBAAA;AACF,gBAAA;;gBAGA,KAAK,MAAMyC,YAAYpD,kBAAAA,EAAAA,CAAsB;oBAC3CoD,QAAAA,CAASC,GAAG,CAACX,CAAAA,EAAGJ,eAAAA,CAAAA;AAClB,gBAAA;AACF,YAAA;AACF,SAAA,CAAA;AACF,IAAA,CAAA;IAEA,OAAO;AACLL,QAAAA;AACF,KAAA;AACF,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../server/src/services/builders/filters/index.ts"],"sourcesContent":["import contentType from './content-type';\nimport type { Context } from '../../types';\n\nexport default (context: Context) => ({\n ...contentType(context),\n});\n"],"names":["context","contentType"],"mappings":";;;;AAGA,cAAe,CAAA,CAACA,OAAAA,IAAsB;AACpC,QAAA,GAAGC,YAAYD,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../server/src/services/builders/filters/index.ts"],"sourcesContent":["import contentType from './content-type';\nimport type { Context } from '../../types';\n\nexport default (context: Context) => ({\n ...contentType(context),\n});\n"],"names":["context","contentType"],"mappings":";;;;AAGA,cAAe,CAAA,CAACA,OAAAA,IAAsB;AACpC,QAAA,GAAGC,YAAYD,OAAAA;AACjB,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../server/src/services/builders/filters/index.ts"],"sourcesContent":["import contentType from './content-type';\nimport type { Context } from '../../types';\n\nexport default (context: Context) => ({\n ...contentType(context),\n});\n"],"names":["context","contentType"],"mappings":";;AAGA,cAAe,CAAA,CAACA,OAAAA,IAAsB;AACpC,QAAA,GAAGC,YAAYD,
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../server/src/services/builders/filters/index.ts"],"sourcesContent":["import contentType from './content-type';\nimport type { Context } from '../../types';\n\nexport default (context: Context) => ({\n ...contentType(context),\n});\n"],"names":["context","contentType"],"mappings":";;AAGA,cAAe,CAAA,CAACA,OAAAA,IAAsB;AACpC,QAAA,GAAGC,YAAYD,OAAAA;AACjB,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"and.js","sources":["../../../../../../server/src/services/builders/filters/operators/and.ts"],"sourcesContent":["import { list } from 'nexus';\nimport type * as Nexus from 'nexus';\n\nconst AND_FIELD_NAME = 'and';\n\nexport default () => ({\n fieldName: AND_FIELD_NAME,\n\n strapiOperator: '$and',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(AND_FIELD_NAME, { type: list(type) });\n },\n});\n"],"names":["AND_FIELD_NAME","fieldName","strapiOperator","add","t","type","field","list"],"mappings":";;;;AAGA,MAAMA,
|
|
1
|
+
{"version":3,"file":"and.js","sources":["../../../../../../server/src/services/builders/filters/operators/and.ts"],"sourcesContent":["import { list } from 'nexus';\nimport type * as Nexus from 'nexus';\n\nconst AND_FIELD_NAME = 'and';\n\nexport default () => ({\n fieldName: AND_FIELD_NAME,\n\n strapiOperator: '$and',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(AND_FIELD_NAME, { type: list(type) });\n },\n});\n"],"names":["AND_FIELD_NAME","fieldName","strapiOperator","add","t","type","field","list"],"mappings":";;;;AAGA,MAAMA,cAAAA,GAAiB,KAAA;AAEvB,kBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,cAAAA;QAEXE,cAAAA,EAAgB,MAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,cAAAA,EAAgB;AAAEK,gBAAAA,IAAAA,EAAME,UAAAA,CAAKF,IAAAA;AAAM,aAAA,CAAA;AAC7C,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"and.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/and.ts"],"sourcesContent":["import { list } from 'nexus';\nimport type * as Nexus from 'nexus';\n\nconst AND_FIELD_NAME = 'and';\n\nexport default () => ({\n fieldName: AND_FIELD_NAME,\n\n strapiOperator: '$and',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(AND_FIELD_NAME, { type: list(type) });\n },\n});\n"],"names":["AND_FIELD_NAME","fieldName","strapiOperator","add","t","type","field","list"],"mappings":";;AAGA,MAAMA,
|
|
1
|
+
{"version":3,"file":"and.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/and.ts"],"sourcesContent":["import { list } from 'nexus';\nimport type * as Nexus from 'nexus';\n\nconst AND_FIELD_NAME = 'and';\n\nexport default () => ({\n fieldName: AND_FIELD_NAME,\n\n strapiOperator: '$and',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(AND_FIELD_NAME, { type: list(type) });\n },\n});\n"],"names":["AND_FIELD_NAME","fieldName","strapiOperator","add","t","type","field","list"],"mappings":";;AAGA,MAAMA,cAAAA,GAAiB,KAAA;AAEvB,kBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,cAAAA;QAEXE,cAAAA,EAAgB,MAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,cAAAA,EAAgB;AAAEK,gBAAAA,IAAAA,EAAME,IAAAA,CAAKF,IAAAA;AAAM,aAAA,CAAA;AAC7C,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"between.js","sources":["../../../../../../server/src/services/builders/filters/operators/between.ts"],"sourcesContent":["import { list } from 'nexus';\nimport type * as Nexus from 'nexus';\n\nconst BETWEEN_FIELD_NAME = 'between';\n\nexport default () => ({\n fieldName: BETWEEN_FIELD_NAME,\n\n strapiOperator: '$between',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(BETWEEN_FIELD_NAME, { type: list(type) });\n },\n});\n"],"names":["BETWEEN_FIELD_NAME","fieldName","strapiOperator","add","t","type","field","list"],"mappings":";;;;AAGA,MAAMA,
|
|
1
|
+
{"version":3,"file":"between.js","sources":["../../../../../../server/src/services/builders/filters/operators/between.ts"],"sourcesContent":["import { list } from 'nexus';\nimport type * as Nexus from 'nexus';\n\nconst BETWEEN_FIELD_NAME = 'between';\n\nexport default () => ({\n fieldName: BETWEEN_FIELD_NAME,\n\n strapiOperator: '$between',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(BETWEEN_FIELD_NAME, { type: list(type) });\n },\n});\n"],"names":["BETWEEN_FIELD_NAME","fieldName","strapiOperator","add","t","type","field","list"],"mappings":";;;;AAGA,MAAMA,kBAAAA,GAAqB,SAAA;AAE3B,sBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,kBAAAA;QAEXE,cAAAA,EAAgB,UAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,kBAAAA,EAAoB;AAAEK,gBAAAA,IAAAA,EAAME,UAAAA,CAAKF,IAAAA;AAAM,aAAA,CAAA;AACjD,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"between.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/between.ts"],"sourcesContent":["import { list } from 'nexus';\nimport type * as Nexus from 'nexus';\n\nconst BETWEEN_FIELD_NAME = 'between';\n\nexport default () => ({\n fieldName: BETWEEN_FIELD_NAME,\n\n strapiOperator: '$between',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(BETWEEN_FIELD_NAME, { type: list(type) });\n },\n});\n"],"names":["BETWEEN_FIELD_NAME","fieldName","strapiOperator","add","t","type","field","list"],"mappings":";;AAGA,MAAMA,
|
|
1
|
+
{"version":3,"file":"between.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/between.ts"],"sourcesContent":["import { list } from 'nexus';\nimport type * as Nexus from 'nexus';\n\nconst BETWEEN_FIELD_NAME = 'between';\n\nexport default () => ({\n fieldName: BETWEEN_FIELD_NAME,\n\n strapiOperator: '$between',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(BETWEEN_FIELD_NAME, { type: list(type) });\n },\n});\n"],"names":["BETWEEN_FIELD_NAME","fieldName","strapiOperator","add","t","type","field","list"],"mappings":";;AAGA,MAAMA,kBAAAA,GAAqB,SAAA;AAE3B,sBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,kBAAAA;QAEXE,cAAAA,EAAgB,UAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,kBAAAA,EAAoB;AAAEK,gBAAAA,IAAAA,EAAME,IAAAA,CAAKF,IAAAA;AAAM,aAAA,CAAA;AACjD,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contains.js","sources":["../../../../../../server/src/services/builders/filters/operators/contains.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst CONTAINS_FIELD_NAME = 'contains';\n\nexport default () => ({\n fieldName: CONTAINS_FIELD_NAME,\n\n strapiOperator: '$contains',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(CONTAINS_FIELD_NAME, { type });\n },\n});\n"],"names":["CONTAINS_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"contains.js","sources":["../../../../../../server/src/services/builders/filters/operators/contains.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst CONTAINS_FIELD_NAME = 'contains';\n\nexport default () => ({\n fieldName: CONTAINS_FIELD_NAME,\n\n strapiOperator: '$contains',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(CONTAINS_FIELD_NAME, { type });\n },\n});\n"],"names":["CONTAINS_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,mBAAAA,GAAsB,UAAA;AAE5B,uBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,mBAAAA;QAEXE,cAAAA,EAAgB,WAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,mBAAAA,EAAqB;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AACtC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contains.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/contains.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst CONTAINS_FIELD_NAME = 'contains';\n\nexport default () => ({\n fieldName: CONTAINS_FIELD_NAME,\n\n strapiOperator: '$contains',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(CONTAINS_FIELD_NAME, { type });\n },\n});\n"],"names":["CONTAINS_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"contains.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/contains.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst CONTAINS_FIELD_NAME = 'contains';\n\nexport default () => ({\n fieldName: CONTAINS_FIELD_NAME,\n\n strapiOperator: '$contains',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(CONTAINS_FIELD_NAME, { type });\n },\n});\n"],"names":["CONTAINS_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,mBAAAA,GAAsB,UAAA;AAE5B,uBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,mBAAAA;QAEXE,cAAAA,EAAgB,WAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,mBAAAA,EAAqB;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AACtC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containsi.js","sources":["../../../../../../server/src/services/builders/filters/operators/containsi.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst CONTAINSI_FIELD_NAME = 'containsi';\n\nexport default () => ({\n fieldName: CONTAINSI_FIELD_NAME,\n\n strapiOperator: '$containsi',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(CONTAINSI_FIELD_NAME, { type });\n },\n});\n"],"names":["CONTAINSI_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"containsi.js","sources":["../../../../../../server/src/services/builders/filters/operators/containsi.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst CONTAINSI_FIELD_NAME = 'containsi';\n\nexport default () => ({\n fieldName: CONTAINSI_FIELD_NAME,\n\n strapiOperator: '$containsi',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(CONTAINSI_FIELD_NAME, { type });\n },\n});\n"],"names":["CONTAINSI_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,oBAAAA,GAAuB,WAAA;AAE7B,wBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,oBAAAA;QAEXE,cAAAA,EAAgB,YAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,oBAAAA,EAAsB;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AACvC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containsi.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/containsi.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst CONTAINSI_FIELD_NAME = 'containsi';\n\nexport default () => ({\n fieldName: CONTAINSI_FIELD_NAME,\n\n strapiOperator: '$containsi',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(CONTAINSI_FIELD_NAME, { type });\n },\n});\n"],"names":["CONTAINSI_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"containsi.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/containsi.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst CONTAINSI_FIELD_NAME = 'containsi';\n\nexport default () => ({\n fieldName: CONTAINSI_FIELD_NAME,\n\n strapiOperator: '$containsi',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(CONTAINSI_FIELD_NAME, { type });\n },\n});\n"],"names":["CONTAINSI_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,oBAAAA,GAAuB,WAAA;AAE7B,wBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,oBAAAA;QAEXE,cAAAA,EAAgB,YAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,oBAAAA,EAAsB;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AACvC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ends-with.js","sources":["../../../../../../server/src/services/builders/filters/operators/ends-with.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst ENDS_WITH_FIELD_NAME = 'endsWith';\n\nexport default () => ({\n fieldName: ENDS_WITH_FIELD_NAME,\n\n strapiOperator: '$endsWith',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(ENDS_WITH_FIELD_NAME, { type });\n },\n});\n"],"names":["ENDS_WITH_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"ends-with.js","sources":["../../../../../../server/src/services/builders/filters/operators/ends-with.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst ENDS_WITH_FIELD_NAME = 'endsWith';\n\nexport default () => ({\n fieldName: ENDS_WITH_FIELD_NAME,\n\n strapiOperator: '$endsWith',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(ENDS_WITH_FIELD_NAME, { type });\n },\n});\n"],"names":["ENDS_WITH_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,oBAAAA,GAAuB,UAAA;AAE7B,uBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,oBAAAA;QAEXE,cAAAA,EAAgB,WAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,oBAAAA,EAAsB;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AACvC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ends-with.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/ends-with.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst ENDS_WITH_FIELD_NAME = 'endsWith';\n\nexport default () => ({\n fieldName: ENDS_WITH_FIELD_NAME,\n\n strapiOperator: '$endsWith',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(ENDS_WITH_FIELD_NAME, { type });\n },\n});\n"],"names":["ENDS_WITH_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"ends-with.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/ends-with.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst ENDS_WITH_FIELD_NAME = 'endsWith';\n\nexport default () => ({\n fieldName: ENDS_WITH_FIELD_NAME,\n\n strapiOperator: '$endsWith',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(ENDS_WITH_FIELD_NAME, { type });\n },\n});\n"],"names":["ENDS_WITH_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,oBAAAA,GAAuB,UAAA;AAE7B,uBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,oBAAAA;QAEXE,cAAAA,EAAgB,WAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,oBAAAA,EAAsB;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AACvC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eq.js","sources":["../../../../../../server/src/services/builders/filters/operators/eq.ts"],"sourcesContent":["import { errors } from '@strapi/utils';\nimport type * as Nexus from 'nexus';\nimport type { Core } from '@strapi/types';\n\nconst { ValidationError } = errors;\n\nconst EQ_FIELD_NAME = 'eq';\n\nexport default ({ strapi }: { strapi: Core.Strapi }) => ({\n fieldName: EQ_FIELD_NAME,\n\n strapiOperator: '$eq',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n const { GRAPHQL_SCALARS } = strapi.plugin('graphql').service('constants');\n\n if (!GRAPHQL_SCALARS.includes(type)) {\n throw new ValidationError(\n `Can't use \"${EQ_FIELD_NAME}\" operator. \"${type}\" is not a valid scalar`\n );\n }\n\n t.field(EQ_FIELD_NAME, { type });\n },\n});\n"],"names":["ValidationError","errors","EQ_FIELD_NAME","strapi","fieldName","strapiOperator","add","t","type","GRAPHQL_SCALARS","plugin","service","includes","field"],"mappings":";;;;AAIA,MAAM,EAAEA,eAAe,EAAE,GAAGC,YAAAA;AAE5B,MAAMC,
|
|
1
|
+
{"version":3,"file":"eq.js","sources":["../../../../../../server/src/services/builders/filters/operators/eq.ts"],"sourcesContent":["import { errors } from '@strapi/utils';\nimport type * as Nexus from 'nexus';\nimport type { Core } from '@strapi/types';\n\nconst { ValidationError } = errors;\n\nconst EQ_FIELD_NAME = 'eq';\n\nexport default ({ strapi }: { strapi: Core.Strapi }) => ({\n fieldName: EQ_FIELD_NAME,\n\n strapiOperator: '$eq',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n const { GRAPHQL_SCALARS } = strapi.plugin('graphql').service('constants');\n\n if (!GRAPHQL_SCALARS.includes(type)) {\n throw new ValidationError(\n `Can't use \"${EQ_FIELD_NAME}\" operator. \"${type}\" is not a valid scalar`\n );\n }\n\n t.field(EQ_FIELD_NAME, { type });\n },\n});\n"],"names":["ValidationError","errors","EQ_FIELD_NAME","strapi","fieldName","strapiOperator","add","t","type","GRAPHQL_SCALARS","plugin","service","includes","field"],"mappings":";;;;AAIA,MAAM,EAAEA,eAAe,EAAE,GAAGC,YAAAA;AAE5B,MAAMC,aAAAA,GAAgB,IAAA;AAEtB,iBAAe,CAAA,CAAC,EAAEC,MAAM,EAA2B,IAAM;QACvDC,SAAAA,EAAWF,aAAAA;QAEXG,cAAAA,EAAgB,KAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7D,MAAM,EAAEC,eAAe,EAAE,GAAGN,OAAOO,MAAM,CAAC,SAAA,CAAA,CAAWC,OAAO,CAAC,WAAA,CAAA;AAE7D,YAAA,IAAI,CAACF,eAAAA,CAAgBG,QAAQ,CAACJ,IAAAA,CAAAA,EAAO;gBACnC,MAAM,IAAIR,eAAAA,CACR,CAAC,WAAW,EAAEE,cAAc,aAAa,EAAEM,IAAAA,CAAK,uBAAuB,CAAC,CAAA;AAE5E,YAAA;YAEAD,CAAAA,CAAEM,KAAK,CAACX,aAAAA,EAAe;AAAEM,gBAAAA;AAAK,aAAA,CAAA;AAChC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eq.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/eq.ts"],"sourcesContent":["import { errors } from '@strapi/utils';\nimport type * as Nexus from 'nexus';\nimport type { Core } from '@strapi/types';\n\nconst { ValidationError } = errors;\n\nconst EQ_FIELD_NAME = 'eq';\n\nexport default ({ strapi }: { strapi: Core.Strapi }) => ({\n fieldName: EQ_FIELD_NAME,\n\n strapiOperator: '$eq',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n const { GRAPHQL_SCALARS } = strapi.plugin('graphql').service('constants');\n\n if (!GRAPHQL_SCALARS.includes(type)) {\n throw new ValidationError(\n `Can't use \"${EQ_FIELD_NAME}\" operator. \"${type}\" is not a valid scalar`\n );\n }\n\n t.field(EQ_FIELD_NAME, { type });\n },\n});\n"],"names":["ValidationError","errors","EQ_FIELD_NAME","strapi","fieldName","strapiOperator","add","t","type","GRAPHQL_SCALARS","plugin","service","includes","field"],"mappings":";;AAIA,MAAM,EAAEA,eAAe,EAAE,GAAGC,MAAAA;AAE5B,MAAMC,
|
|
1
|
+
{"version":3,"file":"eq.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/eq.ts"],"sourcesContent":["import { errors } from '@strapi/utils';\nimport type * as Nexus from 'nexus';\nimport type { Core } from '@strapi/types';\n\nconst { ValidationError } = errors;\n\nconst EQ_FIELD_NAME = 'eq';\n\nexport default ({ strapi }: { strapi: Core.Strapi }) => ({\n fieldName: EQ_FIELD_NAME,\n\n strapiOperator: '$eq',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n const { GRAPHQL_SCALARS } = strapi.plugin('graphql').service('constants');\n\n if (!GRAPHQL_SCALARS.includes(type)) {\n throw new ValidationError(\n `Can't use \"${EQ_FIELD_NAME}\" operator. \"${type}\" is not a valid scalar`\n );\n }\n\n t.field(EQ_FIELD_NAME, { type });\n },\n});\n"],"names":["ValidationError","errors","EQ_FIELD_NAME","strapi","fieldName","strapiOperator","add","t","type","GRAPHQL_SCALARS","plugin","service","includes","field"],"mappings":";;AAIA,MAAM,EAAEA,eAAe,EAAE,GAAGC,MAAAA;AAE5B,MAAMC,aAAAA,GAAgB,IAAA;AAEtB,iBAAe,CAAA,CAAC,EAAEC,MAAM,EAA2B,IAAM;QACvDC,SAAAA,EAAWF,aAAAA;QAEXG,cAAAA,EAAgB,KAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7D,MAAM,EAAEC,eAAe,EAAE,GAAGN,OAAOO,MAAM,CAAC,SAAA,CAAA,CAAWC,OAAO,CAAC,WAAA,CAAA;AAE7D,YAAA,IAAI,CAACF,eAAAA,CAAgBG,QAAQ,CAACJ,IAAAA,CAAAA,EAAO;gBACnC,MAAM,IAAIR,eAAAA,CACR,CAAC,WAAW,EAAEE,cAAc,aAAa,EAAEM,IAAAA,CAAK,uBAAuB,CAAC,CAAA;AAE5E,YAAA;YAEAD,CAAAA,CAAEM,KAAK,CAACX,aAAAA,EAAe;AAAEM,gBAAAA;AAAK,aAAA,CAAA;AAChC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eqi.js","sources":["../../../../../../server/src/services/builders/filters/operators/eqi.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst EQI_FIELD_NAME = 'eqi';\n\nexport default () => ({\n fieldName: EQI_FIELD_NAME,\n\n strapiOperator: '$eqi',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(EQI_FIELD_NAME, { type });\n },\n});\n"],"names":["EQI_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"eqi.js","sources":["../../../../../../server/src/services/builders/filters/operators/eqi.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst EQI_FIELD_NAME = 'eqi';\n\nexport default () => ({\n fieldName: EQI_FIELD_NAME,\n\n strapiOperator: '$eqi',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(EQI_FIELD_NAME, { type });\n },\n});\n"],"names":["EQI_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,cAAAA,GAAiB,KAAA;AAEvB,kBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,cAAAA;QAEXE,cAAAA,EAAgB,MAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,cAAAA,EAAgB;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AACjC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eqi.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/eqi.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst EQI_FIELD_NAME = 'eqi';\n\nexport default () => ({\n fieldName: EQI_FIELD_NAME,\n\n strapiOperator: '$eqi',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(EQI_FIELD_NAME, { type });\n },\n});\n"],"names":["EQI_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"eqi.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/eqi.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst EQI_FIELD_NAME = 'eqi';\n\nexport default () => ({\n fieldName: EQI_FIELD_NAME,\n\n strapiOperator: '$eqi',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(EQI_FIELD_NAME, { type });\n },\n});\n"],"names":["EQI_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,cAAAA,GAAiB,KAAA;AAEvB,kBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,cAAAA;QAEXE,cAAAA,EAAgB,MAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,cAAAA,EAAgB;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AACjC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gt.js","sources":["../../../../../../server/src/services/builders/filters/operators/gt.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst GT_FIELD_NAME = 'gt';\n\nexport default () => ({\n fieldName: GT_FIELD_NAME,\n\n strapiOperator: '$gt',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(GT_FIELD_NAME, { type });\n },\n});\n"],"names":["GT_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"gt.js","sources":["../../../../../../server/src/services/builders/filters/operators/gt.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst GT_FIELD_NAME = 'gt';\n\nexport default () => ({\n fieldName: GT_FIELD_NAME,\n\n strapiOperator: '$gt',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(GT_FIELD_NAME, { type });\n },\n});\n"],"names":["GT_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,aAAAA,GAAgB,IAAA;AAEtB,iBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,aAAAA;QAEXE,cAAAA,EAAgB,KAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,aAAAA,EAAe;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AAChC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gt.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/gt.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst GT_FIELD_NAME = 'gt';\n\nexport default () => ({\n fieldName: GT_FIELD_NAME,\n\n strapiOperator: '$gt',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(GT_FIELD_NAME, { type });\n },\n});\n"],"names":["GT_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"gt.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/gt.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst GT_FIELD_NAME = 'gt';\n\nexport default () => ({\n fieldName: GT_FIELD_NAME,\n\n strapiOperator: '$gt',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(GT_FIELD_NAME, { type });\n },\n});\n"],"names":["GT_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,aAAAA,GAAgB,IAAA;AAEtB,iBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,aAAAA;QAEXE,cAAAA,EAAgB,KAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,aAAAA,EAAe;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AAChC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gte.js","sources":["../../../../../../server/src/services/builders/filters/operators/gte.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst GTE_FIELD_NAME = 'gte';\n\nexport default () => ({\n fieldName: GTE_FIELD_NAME,\n\n strapiOperator: '$gte',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(GTE_FIELD_NAME, { type });\n },\n});\n"],"names":["GTE_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"gte.js","sources":["../../../../../../server/src/services/builders/filters/operators/gte.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst GTE_FIELD_NAME = 'gte';\n\nexport default () => ({\n fieldName: GTE_FIELD_NAME,\n\n strapiOperator: '$gte',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(GTE_FIELD_NAME, { type });\n },\n});\n"],"names":["GTE_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,cAAAA,GAAiB,KAAA;AAEvB,kBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,cAAAA;QAEXE,cAAAA,EAAgB,MAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,cAAAA,EAAgB;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AACjC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gte.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/gte.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst GTE_FIELD_NAME = 'gte';\n\nexport default () => ({\n fieldName: GTE_FIELD_NAME,\n\n strapiOperator: '$gte',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(GTE_FIELD_NAME, { type });\n },\n});\n"],"names":["GTE_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"gte.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/gte.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst GTE_FIELD_NAME = 'gte';\n\nexport default () => ({\n fieldName: GTE_FIELD_NAME,\n\n strapiOperator: '$gte',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(GTE_FIELD_NAME, { type });\n },\n});\n"],"names":["GTE_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,cAAAA,GAAiB,KAAA;AAEvB,kBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,cAAAA;QAEXE,cAAAA,EAAgB,MAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,cAAAA,EAAgB;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AACjC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in.js","sources":["../../../../../../server/src/services/builders/filters/operators/in.ts"],"sourcesContent":["import { list } from 'nexus';\nimport type * as Nexus from 'nexus';\n\nconst IN_FIELD_NAME = 'in';\n\nexport default () => ({\n fieldName: IN_FIELD_NAME,\n\n strapiOperator: '$in',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(IN_FIELD_NAME, { type: list(type) });\n },\n});\n"],"names":["IN_FIELD_NAME","fieldName","strapiOperator","add","t","type","field","list"],"mappings":";;;;AAGA,MAAMA,
|
|
1
|
+
{"version":3,"file":"in.js","sources":["../../../../../../server/src/services/builders/filters/operators/in.ts"],"sourcesContent":["import { list } from 'nexus';\nimport type * as Nexus from 'nexus';\n\nconst IN_FIELD_NAME = 'in';\n\nexport default () => ({\n fieldName: IN_FIELD_NAME,\n\n strapiOperator: '$in',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(IN_FIELD_NAME, { type: list(type) });\n },\n});\n"],"names":["IN_FIELD_NAME","fieldName","strapiOperator","add","t","type","field","list"],"mappings":";;;;AAGA,MAAMA,aAAAA,GAAgB,IAAA;AAEtB,iBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,aAAAA;QAEXE,cAAAA,EAAgB,KAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,aAAAA,EAAe;AAAEK,gBAAAA,IAAAA,EAAME,UAAAA,CAAKF,IAAAA;AAAM,aAAA,CAAA;AAC5C,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/in.ts"],"sourcesContent":["import { list } from 'nexus';\nimport type * as Nexus from 'nexus';\n\nconst IN_FIELD_NAME = 'in';\n\nexport default () => ({\n fieldName: IN_FIELD_NAME,\n\n strapiOperator: '$in',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(IN_FIELD_NAME, { type: list(type) });\n },\n});\n"],"names":["IN_FIELD_NAME","fieldName","strapiOperator","add","t","type","field","list"],"mappings":";;AAGA,MAAMA,
|
|
1
|
+
{"version":3,"file":"in.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/in.ts"],"sourcesContent":["import { list } from 'nexus';\nimport type * as Nexus from 'nexus';\n\nconst IN_FIELD_NAME = 'in';\n\nexport default () => ({\n fieldName: IN_FIELD_NAME,\n\n strapiOperator: '$in',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(IN_FIELD_NAME, { type: list(type) });\n },\n});\n"],"names":["IN_FIELD_NAME","fieldName","strapiOperator","add","t","type","field","list"],"mappings":";;AAGA,MAAMA,aAAAA,GAAgB,IAAA;AAEtB,iBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,aAAAA;QAEXE,cAAAA,EAAgB,KAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,aAAAA,EAAe;AAAEK,gBAAAA,IAAAA,EAAME,IAAAA,CAAKF,IAAAA;AAAM,aAAA,CAAA;AAC5C,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../server/src/services/builders/filters/operators/index.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { mapValues } from 'lodash/fp';\nimport andOperator from './and';\nimport orOperator from './or';\nimport notOperator from './not';\nimport eqOperator from './eq';\nimport eqiOperator from './eqi';\nimport neOperator from './ne';\nimport neiOperator from './nei';\nimport startsWithOperator from './starts-with';\nimport endsWithOperator from './ends-with';\nimport containsOperator from './contains';\nimport notContainsOperator from './not-contains';\nimport containsiOperator from './containsi';\nimport notContainsiOperator from './not-containsi';\nimport gtOperator from './gt';\nimport gteOperator from './gte';\nimport ltOperator from './lt';\nimport lteOperator from './lte';\nimport nullOperator from './null';\nimport notNullOperator from './not-null';\nimport inOperator from './in';\nimport notInOperator from './not-in';\nimport betweenOperator from './between';\n\nconst operators = {\n and: andOperator,\n or: orOperator,\n not: notOperator,\n eq: eqOperator,\n eqi: eqiOperator,\n ne: neOperator,\n nei: neiOperator,\n startsWith: startsWithOperator,\n endsWith: endsWithOperator,\n contains: containsOperator,\n notContains: notContainsOperator,\n containsi: containsiOperator,\n notContainsi: notContainsiOperator,\n gt: gtOperator,\n gte: gteOperator,\n lt: ltOperator,\n lte: lteOperator,\n null: nullOperator,\n notNull: notNullOperator,\n in: inOperator,\n notIn: notInOperator,\n between: betweenOperator,\n};\n\n// Instantiate every operator with the Strapi instance\nexport default ({ strapi }: { strapi: Core.Strapi }) =>\n mapValues((opCtor) => opCtor({ strapi }), operators);\n"],"names":["operators","and","andOperator","or","orOperator","not","notOperator","eq","eqOperator","eqi","eqiOperator","ne","neOperator","nei","neiOperator","startsWith","startsWithOperator","endsWith","endsWithOperator","contains","containsOperator","notContains","notContainsOperator","containsi","containsiOperator","notContainsi","notContainsiOperator","gt","gtOperator","gte","gteOperator","lt","ltOperator","lte","lteOperator","null","nullOperator","notNull","notNullOperator","in","inOperator","notIn","notInOperator","between","betweenOperator","strapi","mapValues","opCtor"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../server/src/services/builders/filters/operators/index.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { mapValues } from 'lodash/fp';\nimport andOperator from './and';\nimport orOperator from './or';\nimport notOperator from './not';\nimport eqOperator from './eq';\nimport eqiOperator from './eqi';\nimport neOperator from './ne';\nimport neiOperator from './nei';\nimport startsWithOperator from './starts-with';\nimport endsWithOperator from './ends-with';\nimport containsOperator from './contains';\nimport notContainsOperator from './not-contains';\nimport containsiOperator from './containsi';\nimport notContainsiOperator from './not-containsi';\nimport gtOperator from './gt';\nimport gteOperator from './gte';\nimport ltOperator from './lt';\nimport lteOperator from './lte';\nimport nullOperator from './null';\nimport notNullOperator from './not-null';\nimport inOperator from './in';\nimport notInOperator from './not-in';\nimport betweenOperator from './between';\n\nconst operators = {\n and: andOperator,\n or: orOperator,\n not: notOperator,\n eq: eqOperator,\n eqi: eqiOperator,\n ne: neOperator,\n nei: neiOperator,\n startsWith: startsWithOperator,\n endsWith: endsWithOperator,\n contains: containsOperator,\n notContains: notContainsOperator,\n containsi: containsiOperator,\n notContainsi: notContainsiOperator,\n gt: gtOperator,\n gte: gteOperator,\n lt: ltOperator,\n lte: lteOperator,\n null: nullOperator,\n notNull: notNullOperator,\n in: inOperator,\n notIn: notInOperator,\n between: betweenOperator,\n};\n\n// Instantiate every operator with the Strapi instance\nexport default ({ strapi }: { strapi: Core.Strapi }) =>\n mapValues((opCtor) => opCtor({ strapi }), operators);\n"],"names":["operators","and","andOperator","or","orOperator","not","notOperator","eq","eqOperator","eqi","eqiOperator","ne","neOperator","nei","neiOperator","startsWith","startsWithOperator","endsWith","endsWithOperator","contains","containsOperator","notContains","notContainsOperator","containsi","containsiOperator","notContainsi","notContainsiOperator","gt","gtOperator","gte","gteOperator","lt","ltOperator","lte","lteOperator","null","nullOperator","notNull","notNullOperator","in","inOperator","notIn","notInOperator","between","betweenOperator","strapi","mapValues","opCtor"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,SAAAA,GAAY;IAChBC,GAAAA,EAAKC,GAAAA;IACLC,EAAAA,EAAIC,EAAAA;IACJC,GAAAA,EAAKC,GAAAA;IACLC,EAAAA,EAAIC,EAAAA;IACJC,GAAAA,EAAKC,GAAAA;IACLC,EAAAA,EAAIC,EAAAA;IACJC,GAAAA,EAAKC,GAAAA;IACLC,UAAAA,EAAYC,UAAAA;IACZC,QAAAA,EAAUC,QAAAA;IACVC,QAAAA,EAAUC,QAAAA;IACVC,WAAAA,EAAaC,WAAAA;IACbC,SAAAA,EAAWC,SAAAA;IACXC,YAAAA,EAAcC,YAAAA;IACdC,EAAAA,EAAIC,EAAAA;IACJC,GAAAA,EAAKC,GAAAA;IACLC,EAAAA,EAAIC,EAAAA;IACJC,GAAAA,EAAKC,GAAAA;IACLC,IAAAA,EAAMC,KAAAA;IACNC,OAAAA,EAASC,OAAAA;IACTC,EAAAA,EAAIC,GAAAA;IACJC,KAAAA,EAAOC,KAAAA;IACPC,OAAAA,EAASC;AACX,CAAA;AAEA;AACA,kBAAe,CAAA,CAAC,EAAEC,MAAM,EAA2B,GACjDC,YAAAA,CAAU,CAACC,MAAAA,GAAWA,MAAAA,CAAO;AAAEF,YAAAA;AAAO,SAAA,CAAA,EAAI7C,UAAS;;;;"}
|
|
@@ -22,7 +22,7 @@ import inOperator from './in.mjs';
|
|
|
22
22
|
import notInOperator from './not-in.mjs';
|
|
23
23
|
import betweenOperator from './between.mjs';
|
|
24
24
|
|
|
25
|
-
const operators = {
|
|
25
|
+
const operators$1 = {
|
|
26
26
|
and: andOperator,
|
|
27
27
|
or: orOperator,
|
|
28
28
|
not: notOperator,
|
|
@@ -47,9 +47,9 @@ const operators = {
|
|
|
47
47
|
between: betweenOperator
|
|
48
48
|
};
|
|
49
49
|
// Instantiate every operator with the Strapi instance
|
|
50
|
-
var operators
|
|
50
|
+
var operators = (({ strapi })=>mapValues((opCtor)=>opCtor({
|
|
51
51
|
strapi
|
|
52
|
-
}), operators));
|
|
52
|
+
}), operators$1));
|
|
53
53
|
|
|
54
|
-
export { operators
|
|
54
|
+
export { operators as default };
|
|
55
55
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/index.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { mapValues } from 'lodash/fp';\nimport andOperator from './and';\nimport orOperator from './or';\nimport notOperator from './not';\nimport eqOperator from './eq';\nimport eqiOperator from './eqi';\nimport neOperator from './ne';\nimport neiOperator from './nei';\nimport startsWithOperator from './starts-with';\nimport endsWithOperator from './ends-with';\nimport containsOperator from './contains';\nimport notContainsOperator from './not-contains';\nimport containsiOperator from './containsi';\nimport notContainsiOperator from './not-containsi';\nimport gtOperator from './gt';\nimport gteOperator from './gte';\nimport ltOperator from './lt';\nimport lteOperator from './lte';\nimport nullOperator from './null';\nimport notNullOperator from './not-null';\nimport inOperator from './in';\nimport notInOperator from './not-in';\nimport betweenOperator from './between';\n\nconst operators = {\n and: andOperator,\n or: orOperator,\n not: notOperator,\n eq: eqOperator,\n eqi: eqiOperator,\n ne: neOperator,\n nei: neiOperator,\n startsWith: startsWithOperator,\n endsWith: endsWithOperator,\n contains: containsOperator,\n notContains: notContainsOperator,\n containsi: containsiOperator,\n notContainsi: notContainsiOperator,\n gt: gtOperator,\n gte: gteOperator,\n lt: ltOperator,\n lte: lteOperator,\n null: nullOperator,\n notNull: notNullOperator,\n in: inOperator,\n notIn: notInOperator,\n between: betweenOperator,\n};\n\n// Instantiate every operator with the Strapi instance\nexport default ({ strapi }: { strapi: Core.Strapi }) =>\n mapValues((opCtor) => opCtor({ strapi }), operators);\n"],"names":["operators","and","andOperator","or","orOperator","not","notOperator","eq","eqOperator","eqi","eqiOperator","ne","neOperator","nei","neiOperator","startsWith","startsWithOperator","endsWith","endsWithOperator","contains","containsOperator","notContains","notContainsOperator","containsi","containsiOperator","notContainsi","notContainsiOperator","gt","gtOperator","gte","gteOperator","lt","ltOperator","lte","lteOperator","null","nullOperator","notNull","notNullOperator","in","inOperator","notIn","notInOperator","between","betweenOperator","strapi","mapValues","opCtor"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/index.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { mapValues } from 'lodash/fp';\nimport andOperator from './and';\nimport orOperator from './or';\nimport notOperator from './not';\nimport eqOperator from './eq';\nimport eqiOperator from './eqi';\nimport neOperator from './ne';\nimport neiOperator from './nei';\nimport startsWithOperator from './starts-with';\nimport endsWithOperator from './ends-with';\nimport containsOperator from './contains';\nimport notContainsOperator from './not-contains';\nimport containsiOperator from './containsi';\nimport notContainsiOperator from './not-containsi';\nimport gtOperator from './gt';\nimport gteOperator from './gte';\nimport ltOperator from './lt';\nimport lteOperator from './lte';\nimport nullOperator from './null';\nimport notNullOperator from './not-null';\nimport inOperator from './in';\nimport notInOperator from './not-in';\nimport betweenOperator from './between';\n\nconst operators = {\n and: andOperator,\n or: orOperator,\n not: notOperator,\n eq: eqOperator,\n eqi: eqiOperator,\n ne: neOperator,\n nei: neiOperator,\n startsWith: startsWithOperator,\n endsWith: endsWithOperator,\n contains: containsOperator,\n notContains: notContainsOperator,\n containsi: containsiOperator,\n notContainsi: notContainsiOperator,\n gt: gtOperator,\n gte: gteOperator,\n lt: ltOperator,\n lte: lteOperator,\n null: nullOperator,\n notNull: notNullOperator,\n in: inOperator,\n notIn: notInOperator,\n between: betweenOperator,\n};\n\n// Instantiate every operator with the Strapi instance\nexport default ({ strapi }: { strapi: Core.Strapi }) =>\n mapValues((opCtor) => opCtor({ strapi }), operators);\n"],"names":["operators","and","andOperator","or","orOperator","not","notOperator","eq","eqOperator","eqi","eqiOperator","ne","neOperator","nei","neiOperator","startsWith","startsWithOperator","endsWith","endsWithOperator","contains","containsOperator","notContains","notContainsOperator","containsi","containsiOperator","notContainsi","notContainsiOperator","gt","gtOperator","gte","gteOperator","lt","ltOperator","lte","lteOperator","null","nullOperator","notNull","notNullOperator","in","inOperator","notIn","notInOperator","between","betweenOperator","strapi","mapValues","opCtor"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,WAAAA,GAAY;IAChBC,GAAAA,EAAKC,WAAAA;IACLC,EAAAA,EAAIC,UAAAA;IACJC,GAAAA,EAAKC,WAAAA;IACLC,EAAAA,EAAIC,UAAAA;IACJC,GAAAA,EAAKC,WAAAA;IACLC,EAAAA,EAAIC,UAAAA;IACJC,GAAAA,EAAKC,WAAAA;IACLC,UAAAA,EAAYC,kBAAAA;IACZC,QAAAA,EAAUC,gBAAAA;IACVC,QAAAA,EAAUC,gBAAAA;IACVC,WAAAA,EAAaC,mBAAAA;IACbC,SAAAA,EAAWC,iBAAAA;IACXC,YAAAA,EAAcC,oBAAAA;IACdC,EAAAA,EAAIC,UAAAA;IACJC,GAAAA,EAAKC,WAAAA;IACLC,EAAAA,EAAIC,UAAAA;IACJC,GAAAA,EAAKC,WAAAA;IACLC,IAAAA,EAAMC,YAAAA;IACNC,OAAAA,EAASC,eAAAA;IACTC,EAAAA,EAAIC,UAAAA;IACJC,KAAAA,EAAOC,aAAAA;IACPC,OAAAA,EAASC;AACX,CAAA;AAEA;AACA,gBAAe,CAAA,CAAC,EAAEC,MAAM,EAA2B,GACjDC,SAAAA,CAAU,CAACC,MAAAA,GAAWA,MAAAA,CAAO;AAAEF,YAAAA;AAAO,SAAA,CAAA,EAAI7C,YAAS;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lt.js","sources":["../../../../../../server/src/services/builders/filters/operators/lt.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst LT_FIELD_NAME = 'lt';\n\nexport default () => ({\n fieldName: LT_FIELD_NAME,\n\n strapiOperator: '$lt',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(LT_FIELD_NAME, { type });\n },\n});\n"],"names":["LT_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"lt.js","sources":["../../../../../../server/src/services/builders/filters/operators/lt.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst LT_FIELD_NAME = 'lt';\n\nexport default () => ({\n fieldName: LT_FIELD_NAME,\n\n strapiOperator: '$lt',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(LT_FIELD_NAME, { type });\n },\n});\n"],"names":["LT_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,aAAAA,GAAgB,IAAA;AAEtB,iBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,aAAAA;QAEXE,cAAAA,EAAgB,KAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,aAAAA,EAAe;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AAChC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lt.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/lt.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst LT_FIELD_NAME = 'lt';\n\nexport default () => ({\n fieldName: LT_FIELD_NAME,\n\n strapiOperator: '$lt',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(LT_FIELD_NAME, { type });\n },\n});\n"],"names":["LT_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"lt.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/lt.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst LT_FIELD_NAME = 'lt';\n\nexport default () => ({\n fieldName: LT_FIELD_NAME,\n\n strapiOperator: '$lt',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(LT_FIELD_NAME, { type });\n },\n});\n"],"names":["LT_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,aAAAA,GAAgB,IAAA;AAEtB,iBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,aAAAA;QAEXE,cAAAA,EAAgB,KAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,aAAAA,EAAe;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AAChC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lte.js","sources":["../../../../../../server/src/services/builders/filters/operators/lte.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst LTE_FIELD_NAME = 'lte';\n\nexport default () => ({\n fieldName: LTE_FIELD_NAME,\n\n strapiOperator: '$lte',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(LTE_FIELD_NAME, { type });\n },\n});\n"],"names":["LTE_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"lte.js","sources":["../../../../../../server/src/services/builders/filters/operators/lte.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst LTE_FIELD_NAME = 'lte';\n\nexport default () => ({\n fieldName: LTE_FIELD_NAME,\n\n strapiOperator: '$lte',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(LTE_FIELD_NAME, { type });\n },\n});\n"],"names":["LTE_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,cAAAA,GAAiB,KAAA;AAEvB,kBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,cAAAA;QAEXE,cAAAA,EAAgB,MAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,cAAAA,EAAgB;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AACjC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lte.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/lte.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst LTE_FIELD_NAME = 'lte';\n\nexport default () => ({\n fieldName: LTE_FIELD_NAME,\n\n strapiOperator: '$lte',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(LTE_FIELD_NAME, { type });\n },\n});\n"],"names":["LTE_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"lte.mjs","sources":["../../../../../../server/src/services/builders/filters/operators/lte.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst LTE_FIELD_NAME = 'lte';\n\nexport default () => ({\n fieldName: LTE_FIELD_NAME,\n\n strapiOperator: '$lte',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(LTE_FIELD_NAME, { type });\n },\n});\n"],"names":["LTE_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":"AAEA,MAAMA,cAAAA,GAAiB,KAAA;AAEvB,kBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,cAAAA;QAEXE,cAAAA,EAAgB,MAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,cAAAA,EAAgB;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AACjC,QAAA;AACF,KAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ne.js","sources":["../../../../../../server/src/services/builders/filters/operators/ne.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst NE_FIELD_NAME = 'ne';\n\nexport default () => ({\n fieldName: NE_FIELD_NAME,\n\n strapiOperator: '$ne',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(NE_FIELD_NAME, { type });\n },\n});\n"],"names":["NE_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,
|
|
1
|
+
{"version":3,"file":"ne.js","sources":["../../../../../../server/src/services/builders/filters/operators/ne.ts"],"sourcesContent":["import type * as Nexus from 'nexus';\n\nconst NE_FIELD_NAME = 'ne';\n\nexport default () => ({\n fieldName: NE_FIELD_NAME,\n\n strapiOperator: '$ne',\n\n add(t: Nexus.blocks.ObjectDefinitionBlock<string>, type: string) {\n t.field(NE_FIELD_NAME, { type });\n },\n});\n"],"names":["NE_FIELD_NAME","fieldName","strapiOperator","add","t","type","field"],"mappings":";;AAEA,MAAMA,aAAAA,GAAgB,IAAA;AAEtB,iBAAe,CAAA,KAAO;QACpBC,SAAAA,EAAWD,aAAAA;QAEXE,cAAAA,EAAgB,KAAA;QAEhBC,GAAAA,CAAAA,CAAIC,CAA6C,EAAEC,IAAY,EAAA;YAC7DD,CAAAA,CAAEE,KAAK,CAACN,aAAAA,EAAe;AAAEK,gBAAAA;AAAK,aAAA,CAAA;AAChC,QAAA;AACF,KAAA,CAAC;;;;"}
|