@webiny/api-headless-cms 0.0.0-mt-2 → 0.0.0-unstable.13771d80a8
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/context.d.ts +6 -0
- package/context.js +94 -0
- package/context.js.map +1 -0
- package/crud/contentEntry/afterDelete.d.ts +8 -0
- package/{content/plugins/crud → crud}/contentEntry/afterDelete.js +2 -7
- package/crud/contentEntry/afterDelete.js.map +1 -0
- package/crud/contentEntry/beforeCreate.d.ts +8 -0
- package/{content/plugins/crud → crud}/contentEntry/beforeCreate.js +2 -5
- package/crud/contentEntry/beforeCreate.js.map +1 -0
- package/crud/contentEntry/beforeUpdate.d.ts +8 -0
- package/{content/plugins/crud → crud}/contentEntry/beforeUpdate.js +2 -5
- package/crud/contentEntry/beforeUpdate.js.map +1 -0
- package/crud/contentEntry/entryDataValidation.d.ts +10 -0
- package/{content/plugins/crud → crud}/contentEntry/entryDataValidation.js +22 -49
- package/crud/contentEntry/entryDataValidation.js.map +1 -0
- package/{content/plugins/crud → crud}/contentEntry/markLockedFields.d.ts +3 -2
- package/{content/plugins/crud → crud}/contentEntry/markLockedFields.js +29 -43
- package/crud/contentEntry/markLockedFields.js.map +1 -0
- package/crud/contentEntry/referenceFieldsMapping.d.ts +13 -0
- package/crud/contentEntry/referenceFieldsMapping.js +236 -0
- package/crud/contentEntry/referenceFieldsMapping.js.map +1 -0
- package/crud/contentEntry/searchableFields.d.ts +9 -0
- package/crud/contentEntry/searchableFields.js +72 -0
- package/crud/contentEntry/searchableFields.js.map +1 -0
- package/{content/plugins/crud → crud}/contentEntry.crud.d.ts +6 -9
- package/crud/contentEntry.crud.js +1202 -0
- package/crud/contentEntry.crud.js.map +1 -0
- package/crud/contentModel/afterCreate.d.ts +8 -0
- package/crud/contentModel/afterCreate.js +16 -0
- package/crud/contentModel/afterCreate.js.map +1 -0
- package/crud/contentModel/afterCreateFrom.d.ts +8 -0
- package/crud/contentModel/afterCreateFrom.js +16 -0
- package/crud/contentModel/afterCreateFrom.js.map +1 -0
- package/crud/contentModel/afterDelete.d.ts +8 -0
- package/crud/contentModel/afterDelete.js +16 -0
- package/crud/contentModel/afterDelete.js.map +1 -0
- package/crud/contentModel/afterUpdate.d.ts +8 -0
- package/crud/contentModel/afterUpdate.js +16 -0
- package/crud/contentModel/afterUpdate.js.map +1 -0
- package/crud/contentModel/beforeCreate.d.ts +14 -0
- package/{content/plugins/crud → crud}/contentModel/beforeCreate.js +62 -39
- package/crud/contentModel/beforeCreate.js.map +1 -0
- package/crud/contentModel/beforeDelete.d.ts +10 -0
- package/{content/plugins/crud → crud}/contentModel/beforeDelete.js +13 -19
- package/crud/contentModel/beforeDelete.js.map +1 -0
- package/crud/contentModel/beforeUpdate.d.ts +8 -0
- package/crud/contentModel/beforeUpdate.js +36 -0
- package/crud/contentModel/beforeUpdate.js.map +1 -0
- package/crud/contentModel/compatibility/modelApiName.d.ts +3 -0
- package/crud/contentModel/compatibility/modelApiName.js +24 -0
- package/crud/contentModel/compatibility/modelApiName.js.map +1 -0
- package/crud/contentModel/contentModelManagerFactory.d.ts +2 -0
- package/{content/plugins/crud → crud}/contentModel/contentModelManagerFactory.js +0 -7
- package/crud/contentModel/contentModelManagerFactory.js.map +1 -0
- package/crud/contentModel/createFieldModels.d.ts +2 -0
- package/{content/plugins/crud → crud}/contentModel/createFieldModels.js +6 -2
- package/crud/contentModel/createFieldModels.js.map +1 -0
- package/crud/contentModel/createFieldStorageId.d.ts +2 -0
- package/crud/contentModel/createFieldStorageId.js +17 -0
- package/crud/contentModel/createFieldStorageId.js.map +1 -0
- package/crud/contentModel/defaultFields.d.ts +5 -0
- package/crud/contentModel/defaultFields.js +58 -0
- package/crud/contentModel/defaultFields.js.map +1 -0
- package/crud/contentModel/fieldIdValidation.d.ts +1 -0
- package/crud/contentModel/fieldIdValidation.js +25 -0
- package/crud/contentModel/fieldIdValidation.js.map +1 -0
- package/crud/contentModel/fields/descriptionField.d.ts +2 -0
- package/crud/contentModel/fields/descriptionField.js +42 -0
- package/crud/contentModel/fields/descriptionField.js.map +1 -0
- package/crud/contentModel/fields/imageField.d.ts +2 -0
- package/crud/contentModel/fields/imageField.js +46 -0
- package/crud/contentModel/fields/imageField.js.map +1 -0
- package/crud/contentModel/fields/titleField.d.ts +2 -0
- package/crud/contentModel/fields/titleField.js +58 -0
- package/crud/contentModel/fields/titleField.js.map +1 -0
- package/crud/contentModel/idValidation.d.ts +1 -0
- package/{content/plugins/crud → crud}/contentModel/idValidation.js +3 -3
- package/crud/contentModel/idValidation.js.map +1 -0
- package/{content/plugins/crud → crud}/contentModel/models.d.ts +2 -1
- package/{content/plugins/crud → crud}/contentModel/models.js +76 -25
- package/crud/contentModel/models.js.map +1 -0
- package/crud/contentModel/systemFields.d.ts +1 -0
- package/crud/contentModel/systemFields.js +8 -0
- package/crud/contentModel/systemFields.js.map +1 -0
- package/crud/contentModel/validateLayout.d.ts +2 -0
- package/{content/plugins/crud → crud}/contentModel/validateLayout.js +1 -11
- package/crud/contentModel/validateLayout.js.map +1 -0
- package/crud/contentModel/validateModel.d.ts +9 -0
- package/crud/contentModel/validateModel.js +27 -0
- package/crud/contentModel/validateModel.js.map +1 -0
- package/crud/contentModel/validateModelFields.d.ts +9 -0
- package/crud/contentModel/validateModelFields.js +343 -0
- package/crud/contentModel/validateModelFields.js.map +1 -0
- package/crud/contentModel/validation.d.ts +519 -0
- package/crud/contentModel/validation.js +145 -0
- package/crud/contentModel/validation.js.map +1 -0
- package/{content/plugins/crud → crud}/contentModel.crud.d.ts +3 -3
- package/crud/contentModel.crud.js +578 -0
- package/crud/contentModel.crud.js.map +1 -0
- package/crud/contentModelGroup/beforeCreate.d.ts +10 -0
- package/{content/plugins/crud → crud}/contentModelGroup/beforeCreate.js +8 -20
- package/crud/contentModelGroup/beforeCreate.js.map +1 -0
- package/crud/contentModelGroup/beforeDelete.d.ts +10 -0
- package/{content/plugins/crud → crud}/contentModelGroup/beforeDelete.js +4 -12
- package/crud/contentModelGroup/beforeDelete.js.map +1 -0
- package/crud/contentModelGroup/beforeUpdate.d.ts +9 -0
- package/{content/plugins/crud → crud}/contentModelGroup/beforeUpdate.js +3 -8
- package/crud/contentModelGroup/beforeUpdate.js.map +1 -0
- package/crud/contentModelGroup/validation.d.ts +30 -0
- package/crud/contentModelGroup/validation.js +34 -0
- package/crud/contentModelGroup/validation.js.map +1 -0
- package/{content/plugins/crud → crud}/contentModelGroup.crud.d.ts +3 -3
- package/crud/contentModelGroup.crud.js +324 -0
- package/crud/contentModelGroup.crud.js.map +1 -0
- package/{plugins/crud → crud}/settings.crud.d.ts +3 -3
- package/crud/settings.crud.js +71 -0
- package/crud/settings.crud.js.map +1 -0
- package/{plugins/crud → crud}/system.crud.d.ts +6 -3
- package/crud/system.crud.js +126 -0
- package/crud/system.crud.js.map +1 -0
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.d.ts +7 -0
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js +53 -0
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js.map +1 -0
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.d.ts +11 -0
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js +203 -0
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js.map +1 -0
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.d.ts +11 -0
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js +251 -0
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -0
- package/fieldConverters/index.d.ts +4 -0
- package/fieldConverters/index.js +13 -0
- package/fieldConverters/index.js.map +1 -0
- package/graphql/buildSchemaPlugins.d.ts +11 -0
- package/graphql/buildSchemaPlugins.js +19 -0
- package/graphql/buildSchemaPlugins.js.map +1 -0
- package/graphql/createExecutableSchema.d.ts +7 -0
- package/graphql/createExecutableSchema.js +29 -0
- package/graphql/createExecutableSchema.js.map +1 -0
- package/graphql/generateSchema.d.ts +8 -0
- package/graphql/generateSchema.js +31 -0
- package/graphql/generateSchema.js.map +1 -0
- package/graphql/graphQLHandlerFactory.d.ts +5 -0
- package/graphql/graphQLHandlerFactory.js +179 -0
- package/graphql/graphQLHandlerFactory.js.map +1 -0
- package/graphql/index.d.ts +3 -0
- package/graphql/index.js +13 -0
- package/graphql/index.js.map +1 -0
- package/graphql/schema/baseContentSchema.d.ts +7 -0
- package/graphql/schema/baseContentSchema.js +66 -0
- package/graphql/schema/baseContentSchema.js.map +1 -0
- package/graphql/schema/baseSchema.d.ts +3 -0
- package/graphql/schema/baseSchema.js +53 -0
- package/graphql/schema/baseSchema.js.map +1 -0
- package/graphql/schema/contentEntries.d.ts +7 -0
- package/graphql/schema/contentEntries.js +362 -0
- package/graphql/schema/contentEntries.js.map +1 -0
- package/graphql/schema/contentModelGroups.d.ts +7 -0
- package/{content/plugins → graphql}/schema/contentModelGroups.js +39 -33
- package/graphql/schema/contentModelGroups.js.map +1 -0
- package/graphql/schema/contentModels.d.ts +7 -0
- package/{content/plugins → graphql}/schema/contentModels.js +121 -29
- package/graphql/schema/contentModels.js.map +1 -0
- package/graphql/schema/createFieldResolvers.d.ts +20 -0
- package/graphql/schema/createFieldResolvers.js +110 -0
- package/graphql/schema/createFieldResolvers.js.map +1 -0
- package/graphql/schema/createManageResolvers.d.ts +12 -0
- package/graphql/schema/createManageResolvers.js +127 -0
- package/graphql/schema/createManageResolvers.js.map +1 -0
- package/graphql/schema/createManageSDL.d.ts +13 -0
- package/graphql/schema/createManageSDL.js +157 -0
- package/graphql/schema/createManageSDL.js.map +1 -0
- package/graphql/schema/createPreviewResolvers.d.ts +12 -0
- package/graphql/schema/createPreviewResolvers.js +44 -0
- package/graphql/schema/createPreviewResolvers.js.map +1 -0
- package/graphql/schema/createReadResolvers.d.ts +12 -0
- package/graphql/schema/createReadResolvers.js +49 -0
- package/graphql/schema/createReadResolvers.js.map +1 -0
- package/graphql/schema/createReadSDL.d.ts +13 -0
- package/graphql/schema/createReadSDL.js +100 -0
- package/graphql/schema/createReadSDL.js.map +1 -0
- package/graphql/schema/resolvers/commonFieldResolvers.d.ts +7 -0
- package/{content/plugins → graphql}/schema/resolvers/commonFieldResolvers.js +2 -3
- package/graphql/schema/resolvers/commonFieldResolvers.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveCreate.d.ts +7 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveCreate.js +2 -7
- package/graphql/schema/resolvers/manage/resolveCreate.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveCreateFrom.d.ts +8 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveCreateFrom.js +2 -7
- package/graphql/schema/resolvers/manage/resolveCreateFrom.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveDelete.d.ts +7 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveDelete.js +8 -12
- package/graphql/schema/resolvers/manage/resolveDelete.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveGet.d.ts +7 -0
- package/graphql/schema/resolvers/manage/resolveGet.js +63 -0
- package/graphql/schema/resolvers/manage/resolveGet.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveGetByIds.d.ts +7 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveGetByIds.js +2 -7
- package/graphql/schema/resolvers/manage/resolveGetByIds.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveGetRevisions.d.ts +7 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveGetRevisions.js +2 -7
- package/graphql/schema/resolvers/manage/resolveGetRevisions.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveList.d.ts +4 -0
- package/{content/plugins/schema/resolvers/preview → graphql/schema/resolvers/manage}/resolveList.js +2 -7
- package/graphql/schema/resolvers/manage/resolveList.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolvePublish.d.ts +7 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolvePublish.js +0 -3
- package/graphql/schema/resolvers/manage/resolvePublish.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveRepublish.d.ts +7 -0
- package/{content/plugins/schema/resolvers/manage/resolveGet.js → graphql/schema/resolvers/manage/resolveRepublish.js} +4 -7
- package/graphql/schema/resolvers/manage/resolveRepublish.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveUnpublish.d.ts +7 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveUnpublish.js +0 -3
- package/graphql/schema/resolvers/manage/resolveUnpublish.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveUpdate.d.ts +8 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveUpdate.js +2 -7
- package/graphql/schema/resolvers/manage/resolveUpdate.js.map +1 -0
- package/graphql/schema/resolvers/preview/resolveGet.d.ts +4 -0
- package/graphql/schema/resolvers/preview/resolveGet.js +26 -0
- package/graphql/schema/resolvers/preview/resolveGet.js.map +1 -0
- package/graphql/schema/resolvers/preview/resolveList.d.ts +4 -0
- package/{content/plugins/schema/resolvers/manage → graphql/schema/resolvers/preview}/resolveList.js +2 -7
- package/graphql/schema/resolvers/preview/resolveList.js.map +1 -0
- package/graphql/schema/resolvers/read/resolveGet.d.ts +4 -0
- package/graphql/schema/resolvers/read/resolveGet.js +26 -0
- package/graphql/schema/resolvers/read/resolveGet.js.map +1 -0
- package/graphql/schema/resolvers/read/resolveList.d.ts +4 -0
- package/{content/plugins → graphql}/schema/resolvers/read/resolveList.js +2 -7
- package/graphql/schema/resolvers/read/resolveList.js.map +1 -0
- package/graphql/schema/schemaPlugins.d.ts +8 -0
- package/graphql/schema/schemaPlugins.js +109 -0
- package/graphql/schema/schemaPlugins.js.map +1 -0
- package/graphql/system.d.ts +6 -0
- package/{plugins/graphql → graphql}/system.js +39 -24
- package/graphql/system.js.map +1 -0
- package/graphqlFields/boolean.d.ts +2 -0
- package/graphqlFields/boolean.js +57 -0
- package/graphqlFields/boolean.js.map +1 -0
- package/graphqlFields/datetime.d.ts +2 -0
- package/graphqlFields/datetime.js +78 -0
- package/graphqlFields/datetime.js.map +1 -0
- package/graphqlFields/dynamicZone/dynamicZoneField.d.ts +2 -0
- package/graphqlFields/dynamicZone/dynamicZoneField.js +216 -0
- package/graphqlFields/dynamicZone/dynamicZoneField.js.map +1 -0
- package/graphqlFields/dynamicZone/dynamicZoneStorage.d.ts +3 -0
- package/graphqlFields/dynamicZone/dynamicZoneStorage.js +63 -0
- package/graphqlFields/dynamicZone/dynamicZoneStorage.js.map +1 -0
- package/graphqlFields/dynamicZone/index.d.ts +2 -0
- package/graphqlFields/dynamicZone/index.js +19 -0
- package/graphqlFields/dynamicZone/index.js.map +1 -0
- package/graphqlFields/file.d.ts +2 -0
- package/graphqlFields/file.js +42 -0
- package/graphqlFields/file.js.map +1 -0
- package/graphqlFields/helpers.d.ts +6 -0
- package/graphqlFields/helpers.js +39 -0
- package/graphqlFields/helpers.js.map +1 -0
- package/graphqlFields/index.d.ts +2 -0
- package/graphqlFields/index.js +18 -0
- package/graphqlFields/index.js.map +1 -0
- package/graphqlFields/longText.d.ts +2 -0
- package/graphqlFields/longText.js +53 -0
- package/graphqlFields/longText.js.map +1 -0
- package/graphqlFields/number.d.ts +2 -0
- package/graphqlFields/number.js +67 -0
- package/graphqlFields/number.js.map +1 -0
- package/graphqlFields/object.d.ts +2 -0
- package/graphqlFields/object.js +245 -0
- package/graphqlFields/object.js.map +1 -0
- package/graphqlFields/ref.d.ts +2 -0
- package/graphqlFields/ref.js +255 -0
- package/graphqlFields/ref.js.map +1 -0
- package/graphqlFields/richText.d.ts +2 -0
- package/graphqlFields/richText.js +47 -0
- package/graphqlFields/richText.js.map +1 -0
- package/graphqlFields/text.d.ts +2 -0
- package/graphqlFields/text.js +62 -0
- package/graphqlFields/text.js.map +1 -0
- package/index.d.ts +10 -12
- package/index.js +74 -55
- package/index.js.map +1 -0
- package/modelManager/DefaultCmsModelManager.d.ts +14 -0
- package/{content/plugins/modelManager → modelManager}/DefaultCmsModelManager.js +10 -24
- package/modelManager/DefaultCmsModelManager.js.map +1 -0
- package/modelManager/index.d.ts +2 -0
- package/{content/plugins/modelManager → modelManager}/index.js +3 -7
- package/modelManager/index.js.map +1 -0
- package/package.json +37 -38
- package/parameters/context.d.ts +2 -0
- package/parameters/context.js +18 -0
- package/parameters/context.js.map +1 -0
- package/parameters/header.d.ts +2 -0
- package/parameters/header.js +44 -0
- package/parameters/header.js.map +1 -0
- package/parameters/index.d.ts +4 -0
- package/parameters/index.js +49 -0
- package/parameters/index.js.map +1 -0
- package/parameters/manual.d.ts +6 -0
- package/parameters/manual.js +37 -0
- package/parameters/manual.js.map +1 -0
- package/parameters/path.d.ts +2 -0
- package/parameters/path.js +40 -0
- package/parameters/path.js.map +1 -0
- package/plugins/CmsGraphQLSchemaPlugin.d.ts +5 -0
- package/plugins/CmsGraphQLSchemaPlugin.js +12 -0
- package/plugins/CmsGraphQLSchemaPlugin.js.map +1 -0
- package/plugins/CmsGraphQLSchemaSorterPlugin.d.ts +20 -0
- package/plugins/CmsGraphQLSchemaSorterPlugin.js +28 -0
- package/plugins/CmsGraphQLSchemaSorterPlugin.js.map +1 -0
- package/plugins/CmsGroupPlugin.d.ts +13 -0
- package/{content/plugins → plugins}/CmsGroupPlugin.js +7 -9
- package/plugins/CmsGroupPlugin.js.map +1 -0
- package/plugins/CmsModelFieldConverterPlugin.d.ts +14 -0
- package/plugins/CmsModelFieldConverterPlugin.js +12 -0
- package/plugins/CmsModelFieldConverterPlugin.js.map +1 -0
- package/plugins/CmsModelPlugin.d.ts +55 -0
- package/plugins/CmsModelPlugin.js +169 -0
- package/plugins/CmsModelPlugin.js.map +1 -0
- package/plugins/CmsParametersPlugin.d.ts +20 -0
- package/plugins/CmsParametersPlugin.js +21 -0
- package/plugins/CmsParametersPlugin.js.map +1 -0
- package/plugins/StorageTransformPlugin.d.ts +31 -0
- package/{content/plugins/storage → plugins}/StorageTransformPlugin.js +2 -10
- package/plugins/StorageTransformPlugin.js.map +1 -0
- package/plugins/index.d.ts +7 -0
- package/plugins/index.js +82 -0
- package/plugins/index.js.map +1 -0
- package/storage/default.d.ts +2 -0
- package/storage/default.js +24 -0
- package/storage/default.js.map +1 -0
- package/storage/object.d.ts +2 -0
- package/storage/object.js +108 -0
- package/storage/object.js.map +1 -0
- package/types.d.ts +951 -405
- package/types.js +105 -62
- package/types.js.map +1 -0
- package/upgrades/5.33.0/index.d.ts +3 -0
- package/upgrades/5.33.0/index.js +182 -0
- package/upgrades/5.33.0/index.js.map +1 -0
- package/upgrades/index.d.ts +1 -0
- package/upgrades/index.js +12 -0
- package/upgrades/index.js.map +1 -0
- package/utils/access.d.ts +8 -0
- package/utils/access.js +76 -0
- package/utils/access.js.map +1 -0
- package/utils/converters/Converter.d.ts +27 -0
- package/utils/converters/Converter.js +58 -0
- package/utils/converters/Converter.js.map +1 -0
- package/utils/converters/ConverterCollection.d.ts +31 -0
- package/utils/converters/ConverterCollection.js +119 -0
- package/utils/converters/ConverterCollection.js.map +1 -0
- package/utils/converters/valueKeyStorageConverter.d.ts +18 -0
- package/utils/converters/valueKeyStorageConverter.js +123 -0
- package/utils/converters/valueKeyStorageConverter.js.map +1 -0
- package/utils/createTypeFromFields.d.ts +16 -0
- package/utils/createTypeFromFields.js +67 -0
- package/utils/createTypeFromFields.js.map +1 -0
- package/{content/plugins/utils → utils}/createTypeName.d.ts +3 -3
- package/{content/plugins/utils → utils}/createTypeName.js +3 -10
- package/utils/createTypeName.js.map +1 -0
- package/{content/plugins/utils → utils}/entryStorage.d.ts +3 -3
- package/{content/plugins/utils → utils}/entryStorage.js +26 -47
- package/utils/entryStorage.js.map +1 -0
- package/utils/filterAsync.d.ts +1 -0
- package/utils/filterAsync.js +18 -0
- package/utils/filterAsync.js.map +1 -0
- package/utils/getBaseFieldType.d.ts +4 -0
- package/utils/getBaseFieldType.js +10 -0
- package/utils/getBaseFieldType.js.map +1 -0
- package/utils/getEntryDescription.d.ts +2 -0
- package/utils/getEntryDescription.js +17 -0
- package/utils/getEntryDescription.js.map +1 -0
- package/utils/getEntryImage.d.ts +2 -0
- package/utils/getEntryImage.js +17 -0
- package/utils/getEntryImage.js.map +1 -0
- package/utils/getEntryTitle.d.ts +2 -0
- package/{content/plugins/utils → utils}/getEntryTitle.js +7 -15
- package/utils/getEntryTitle.js.map +1 -0
- package/utils/getSchemaFromFieldPlugins.d.ts +9 -0
- package/utils/getSchemaFromFieldPlugins.js +39 -0
- package/utils/getSchemaFromFieldPlugins.js.map +1 -0
- package/utils/ownership.d.ts +8 -0
- package/utils/ownership.js +33 -0
- package/utils/ownership.js.map +1 -0
- package/utils/permissions.d.ts +7 -0
- package/utils/permissions.js +91 -0
- package/utils/permissions.js.map +1 -0
- package/utils/pluralizedTypeName.d.ts +1 -0
- package/{content/plugins/utils → utils}/pluralizedTypeName.js +1 -1
- package/utils/pluralizedTypeName.js.map +1 -0
- package/utils/removeNullValues.d.ts +1 -0
- package/utils/removeNullValues.js +17 -0
- package/utils/removeNullValues.js.map +1 -0
- package/utils/removeUndefinedValues.d.ts +1 -0
- package/utils/removeUndefinedValues.js +17 -0
- package/utils/removeUndefinedValues.js.map +1 -0
- package/utils/renderFields.d.ts +16 -0
- package/{content/plugins/utils → utils}/renderFields.js +14 -12
- package/utils/renderFields.js.map +1 -0
- package/utils/renderGetFilterFields.d.ts +10 -0
- package/utils/renderGetFilterFields.js +48 -0
- package/utils/renderGetFilterFields.js.map +1 -0
- package/utils/renderInputFields.d.ts +15 -0
- package/{content/plugins/utils → utils}/renderInputFields.js +7 -10
- package/utils/renderInputFields.js.map +1 -0
- package/utils/renderListFilterFields.d.ts +11 -0
- package/{content/plugins/utils → utils}/renderListFilterFields.js +36 -22
- package/utils/renderListFilterFields.js.map +1 -0
- package/utils/renderSortEnum.d.ts +12 -0
- package/utils/renderSortEnum.js +42 -0
- package/utils/renderSortEnum.js.map +1 -0
- package/utils/toSlug.d.ts +1 -0
- package/utils/toSlug.js +16 -0
- package/utils/toSlug.js.map +1 -0
- package/validators/dateGte.d.ts +2 -0
- package/{content/plugins/validators → validators}/dateGte.js +4 -11
- package/validators/dateGte.js.map +1 -0
- package/validators/dateLte.d.ts +2 -0
- package/{content/plugins/validators → validators}/dateLte.js +4 -11
- package/validators/dateLte.js.map +1 -0
- package/validators/dynamicZone.d.ts +2 -0
- package/validators/dynamicZone.js +20 -0
- package/validators/dynamicZone.js.map +1 -0
- package/validators/gte.d.ts +2 -0
- package/validators/gte.js +28 -0
- package/validators/gte.js.map +1 -0
- package/validators/in.d.ts +2 -0
- package/validators/in.js +28 -0
- package/validators/in.js.map +1 -0
- package/validators/index.d.ts +1 -0
- package/validators/index.js +22 -0
- package/validators/index.js.map +1 -0
- package/validators/lte.d.ts +2 -0
- package/validators/lte.js +28 -0
- package/validators/lte.js.map +1 -0
- package/validators/maxLength.d.ts +2 -0
- package/validators/maxLength.js +28 -0
- package/validators/maxLength.js.map +1 -0
- package/validators/minLength.d.ts +2 -0
- package/validators/minLength.js +28 -0
- package/validators/minLength.js.map +1 -0
- package/validators/pattern.d.ts +2 -0
- package/validators/pattern.js +41 -0
- package/validators/pattern.js.map +1 -0
- package/validators/patternPlugins/email.d.ts +2 -0
- package/validators/patternPlugins/email.js +18 -0
- package/validators/patternPlugins/email.js.map +1 -0
- package/validators/patternPlugins/index.d.ts +2 -0
- package/validators/patternPlugins/index.js +16 -0
- package/validators/patternPlugins/index.js.map +1 -0
- package/validators/patternPlugins/lowerCase.d.ts +2 -0
- package/validators/patternPlugins/lowerCase.js +18 -0
- package/validators/patternPlugins/lowerCase.js.map +1 -0
- package/validators/patternPlugins/lowerCaseSpace.d.ts +2 -0
- package/validators/patternPlugins/lowerCaseSpace.js +18 -0
- package/validators/patternPlugins/lowerCaseSpace.js.map +1 -0
- package/validators/patternPlugins/upperCase.d.ts +2 -0
- package/validators/patternPlugins/upperCase.js +18 -0
- package/validators/patternPlugins/upperCase.js.map +1 -0
- package/validators/patternPlugins/upperCaseSpace.d.ts +2 -0
- package/validators/patternPlugins/upperCaseSpace.js +18 -0
- package/validators/patternPlugins/upperCaseSpace.js.map +1 -0
- package/validators/patternPlugins/url.d.ts +2 -0
- package/validators/patternPlugins/url.js +18 -0
- package/validators/patternPlugins/url.js.map +1 -0
- package/validators/required.d.ts +2 -0
- package/validators/required.js +22 -0
- package/validators/required.js.map +1 -0
- package/validators/timeGte.d.ts +2 -0
- package/{content/plugins/validators → validators}/timeGte.js +5 -11
- package/validators/timeGte.js.map +1 -0
- package/validators/timeLte.d.ts +2 -0
- package/{content/plugins/validators → validators}/timeLte.js +5 -11
- package/validators/timeLte.js.map +1 -0
- package/validators/unique.d.ts +6 -0
- package/validators/unique.js +56 -0
- package/validators/unique.js.map +1 -0
- package/content/contextSetup.d.ts +0 -4
- package/content/contextSetup.js +0 -65
- package/content/graphQLHandlerFactory.d.ts +0 -5
- package/content/graphQLHandlerFactory.js +0 -173
- package/content/plugins/CmsGroupPlugin.d.ts +0 -11
- package/content/plugins/CmsModelPlugin.d.ts +0 -11
- package/content/plugins/CmsModelPlugin.js +0 -24
- package/content/plugins/buildSchemaPlugins.d.ts +0 -7
- package/content/plugins/buildSchemaPlugins.js +0 -29
- package/content/plugins/crud/contentEntry/afterDelete.d.ts +0 -7
- package/content/plugins/crud/contentEntry/beforeCreate.d.ts +0 -7
- package/content/plugins/crud/contentEntry/beforeUpdate.d.ts +0 -7
- package/content/plugins/crud/contentEntry/entryDataValidation.d.ts +0 -4
- package/content/plugins/crud/contentEntry.crud.js +0 -931
- package/content/plugins/crud/contentModel/afterCreate.d.ts +0 -7
- package/content/plugins/crud/contentModel/afterCreate.js +0 -18
- package/content/plugins/crud/contentModel/afterDelete.d.ts +0 -7
- package/content/plugins/crud/contentModel/afterDelete.js +0 -18
- package/content/plugins/crud/contentModel/afterUpdate.d.ts +0 -7
- package/content/plugins/crud/contentModel/afterUpdate.js +0 -18
- package/content/plugins/crud/contentModel/beforeCreate.d.ts +0 -9
- package/content/plugins/crud/contentModel/beforeDelete.d.ts +0 -9
- package/content/plugins/crud/contentModel/beforeUpdate.d.ts +0 -9
- package/content/plugins/crud/contentModel/beforeUpdate.js +0 -128
- package/content/plugins/crud/contentModel/contentModelManagerFactory.d.ts +0 -2
- package/content/plugins/crud/contentModel/createFieldModels.d.ts +0 -2
- package/content/plugins/crud/contentModel/idValidation.d.ts +0 -2
- package/content/plugins/crud/contentModel/validateLayout.d.ts +0 -2
- package/content/plugins/crud/contentModel.crud.js +0 -425
- package/content/plugins/crud/contentModelGroup/beforeCreate.d.ts +0 -9
- package/content/plugins/crud/contentModelGroup/beforeDelete.d.ts +0 -9
- package/content/plugins/crud/contentModelGroup/beforeUpdate.d.ts +0 -8
- package/content/plugins/crud/contentModelGroup.crud.js +0 -351
- package/content/plugins/crud/index.d.ts +0 -6
- package/content/plugins/crud/index.js +0 -100
- package/content/plugins/graphqlFields/boolean.d.ts +0 -3
- package/content/plugins/graphqlFields/boolean.js +0 -69
- package/content/plugins/graphqlFields/datetime.d.ts +0 -3
- package/content/plugins/graphqlFields/datetime.js +0 -83
- package/content/plugins/graphqlFields/file.d.ts +0 -3
- package/content/plugins/graphqlFields/file.js +0 -49
- package/content/plugins/graphqlFields/index.d.ts +0 -2
- package/content/plugins/graphqlFields/index.js +0 -30
- package/content/plugins/graphqlFields/longText.d.ts +0 -3
- package/content/plugins/graphqlFields/longText.js +0 -62
- package/content/plugins/graphqlFields/number.d.ts +0 -3
- package/content/plugins/graphqlFields/number.js +0 -75
- package/content/plugins/graphqlFields/object.d.ts +0 -3
- package/content/plugins/graphqlFields/object.js +0 -180
- package/content/plugins/graphqlFields/ref.d.ts +0 -3
- package/content/plugins/graphqlFields/ref.js +0 -205
- package/content/plugins/graphqlFields/richText.d.ts +0 -3
- package/content/plugins/graphqlFields/richText.js +0 -55
- package/content/plugins/graphqlFields/text.d.ts +0 -3
- package/content/plugins/graphqlFields/text.js +0 -72
- package/content/plugins/internalSecurity/InternalAuthenticationPlugin.d.ts +0 -8
- package/content/plugins/internalSecurity/InternalAuthenticationPlugin.js +0 -54
- package/content/plugins/internalSecurity/InternalAuthorizationPlugin.d.ts +0 -7
- package/content/plugins/internalSecurity/InternalAuthorizationPlugin.js +0 -35
- package/content/plugins/modelManager/DefaultCmsModelManager.d.ts +0 -15
- package/content/plugins/modelManager/index.d.ts +0 -3
- package/content/plugins/schema/baseSchema.d.ts +0 -4
- package/content/plugins/schema/baseSchema.js +0 -98
- package/content/plugins/schema/contentEntries.d.ts +0 -4
- package/content/plugins/schema/contentEntries.js +0 -166
- package/content/plugins/schema/contentModelGroups.d.ts +0 -4
- package/content/plugins/schema/contentModels.d.ts +0 -4
- package/content/plugins/schema/createFieldResolvers.d.ts +0 -19
- package/content/plugins/schema/createFieldResolvers.js +0 -92
- package/content/plugins/schema/createManageResolvers.d.ts +0 -11
- package/content/plugins/schema/createManageResolvers.js +0 -135
- package/content/plugins/schema/createManageSDL.d.ts +0 -9
- package/content/plugins/schema/createManageSDL.js +0 -153
- package/content/plugins/schema/createPreviewResolvers.d.ts +0 -10
- package/content/plugins/schema/createPreviewResolvers.js +0 -55
- package/content/plugins/schema/createReadResolvers.d.ts +0 -10
- package/content/plugins/schema/createReadResolvers.js +0 -55
- package/content/plugins/schema/createReadSDL.d.ts +0 -9
- package/content/plugins/schema/createReadSDL.js +0 -96
- package/content/plugins/schema/resolvers/commonFieldResolvers.d.ts +0 -6
- package/content/plugins/schema/resolvers/manage/resolveCreate.d.ts +0 -6
- package/content/plugins/schema/resolvers/manage/resolveCreateFrom.d.ts +0 -7
- package/content/plugins/schema/resolvers/manage/resolveDelete.d.ts +0 -2
- package/content/plugins/schema/resolvers/manage/resolveGet.d.ts +0 -2
- package/content/plugins/schema/resolvers/manage/resolveGetByIds.d.ts +0 -2
- package/content/plugins/schema/resolvers/manage/resolveGetRevisions.d.ts +0 -2
- package/content/plugins/schema/resolvers/manage/resolveList.d.ts +0 -2
- package/content/plugins/schema/resolvers/manage/resolvePublish.d.ts +0 -2
- package/content/plugins/schema/resolvers/manage/resolveRequestChanges.d.ts +0 -6
- package/content/plugins/schema/resolvers/manage/resolveRequestChanges.js +0 -23
- package/content/plugins/schema/resolvers/manage/resolveRequestReview.d.ts +0 -6
- package/content/plugins/schema/resolvers/manage/resolveRequestReview.js +0 -23
- package/content/plugins/schema/resolvers/manage/resolveUnpublish.d.ts +0 -2
- package/content/plugins/schema/resolvers/manage/resolveUpdate.d.ts +0 -7
- package/content/plugins/schema/resolvers/preview/resolveGet.d.ts +0 -2
- package/content/plugins/schema/resolvers/preview/resolveGet.js +0 -38
- package/content/plugins/schema/resolvers/preview/resolveList.d.ts +0 -2
- package/content/plugins/schema/resolvers/read/resolveGet.d.ts +0 -2
- package/content/plugins/schema/resolvers/read/resolveGet.js +0 -38
- package/content/plugins/schema/resolvers/read/resolveList.d.ts +0 -2
- package/content/plugins/schema/schemaPlugins.d.ts +0 -3
- package/content/plugins/schema/schemaPlugins.js +0 -92
- package/content/plugins/storage/StorageTransformPlugin.d.ts +0 -30
- package/content/plugins/storage/default.d.ts +0 -3
- package/content/plugins/storage/default.js +0 -28
- package/content/plugins/storage/object.d.ts +0 -3
- package/content/plugins/storage/object.js +0 -119
- package/content/plugins/utils/getEntryTitle.d.ts +0 -2
- package/content/plugins/utils/getSchemaFromFieldPlugins.d.ts +0 -11
- package/content/plugins/utils/getSchemaFromFieldPlugins.js +0 -30
- package/content/plugins/utils/pluralizedTypeName.d.ts +0 -1
- package/content/plugins/utils/renderFields.d.ts +0 -16
- package/content/plugins/utils/renderGetFilterFields.d.ts +0 -9
- package/content/plugins/utils/renderGetFilterFields.js +0 -41
- package/content/plugins/utils/renderInputFields.d.ts +0 -14
- package/content/plugins/utils/renderListFilterFields.d.ts +0 -10
- package/content/plugins/utils/renderSortEnum.d.ts +0 -9
- package/content/plugins/utils/renderSortEnum.js +0 -32
- package/content/plugins/validators/dateGte.d.ts +0 -3
- package/content/plugins/validators/dateLte.d.ts +0 -3
- package/content/plugins/validators/gte.d.ts +0 -3
- package/content/plugins/validators/gte.js +0 -32
- package/content/plugins/validators/in.d.ts +0 -3
- package/content/plugins/validators/in.js +0 -32
- package/content/plugins/validators/index.d.ts +0 -2
- package/content/plugins/validators/index.js +0 -36
- package/content/plugins/validators/lte.d.ts +0 -3
- package/content/plugins/validators/lte.js +0 -32
- package/content/plugins/validators/maxLength.d.ts +0 -3
- package/content/plugins/validators/maxLength.js +0 -32
- package/content/plugins/validators/minLength.d.ts +0 -3
- package/content/plugins/validators/minLength.js +0 -32
- package/content/plugins/validators/pattern.d.ts +0 -3
- package/content/plugins/validators/pattern.js +0 -47
- package/content/plugins/validators/patternPlugins/email.d.ts +0 -3
- package/content/plugins/validators/patternPlugins/email.js +0 -17
- package/content/plugins/validators/patternPlugins/index.d.ts +0 -2
- package/content/plugins/validators/patternPlugins/index.js +0 -19
- package/content/plugins/validators/patternPlugins/lowerCase.d.ts +0 -3
- package/content/plugins/validators/patternPlugins/lowerCase.js +0 -17
- package/content/plugins/validators/patternPlugins/upperCase.d.ts +0 -3
- package/content/plugins/validators/patternPlugins/upperCase.js +0 -17
- package/content/plugins/validators/patternPlugins/url.d.ts +0 -3
- package/content/plugins/validators/patternPlugins/url.js +0 -17
- package/content/plugins/validators/required.d.ts +0 -3
- package/content/plugins/validators/required.js +0 -25
- package/content/plugins/validators/timeGte.d.ts +0 -3
- package/content/plugins/validators/timeLte.d.ts +0 -3
- package/migrateCMSPermissions.d.ts +0 -17
- package/migrateCMSPermissions.js +0 -193
- package/plugins/context.d.ts +0 -4
- package/plugins/context.js +0 -34
- package/plugins/crud/index.d.ts +0 -6
- package/plugins/crud/index.js +0 -100
- package/plugins/crud/settings.crud.js +0 -93
- package/plugins/crud/system.crud.js +0 -182
- package/plugins/graphql/system.d.ts +0 -17
- package/plugins/graphql.d.ts +0 -2
- package/plugins/graphql.js +0 -79
- package/plugins/upgrades/index.d.ts +0 -2
- package/plugins/upgrades/index.js +0 -14
- package/plugins/upgrades/v5.5.0/helpers.d.ts +0 -6
- package/plugins/upgrades/v5.5.0/helpers.js +0 -10
- package/plugins/upgrades/v5.5.0/index.d.ts +0 -4
- package/plugins/upgrades/v5.5.0/index.js +0 -129
- package/transformers.d.ts +0 -2
- package/transformers.js +0 -25
- package/utils.d.ts +0 -25
- package/utils.js +0 -251
|
@@ -4,20 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolveCreate = void 0;
|
|
7
|
-
|
|
8
7
|
var _responses = require("@webiny/handler-graphql/responses");
|
|
9
|
-
|
|
10
8
|
const resolveCreate = ({
|
|
11
9
|
model
|
|
12
|
-
}) => async (_, args, {
|
|
13
|
-
cms
|
|
14
|
-
}) => {
|
|
10
|
+
}) => async (_, args, context) => {
|
|
15
11
|
try {
|
|
16
|
-
const entry = await cms.createEntry(model, args.data);
|
|
12
|
+
const entry = await context.cms.createEntry(model, args.data);
|
|
17
13
|
return new _responses.Response(entry);
|
|
18
14
|
} catch (e) {
|
|
19
15
|
return new _responses.ErrorResponse(e);
|
|
20
16
|
}
|
|
21
17
|
};
|
|
22
|
-
|
|
23
18
|
exports.resolveCreate = resolveCreate;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveCreate","model","_","args","context","entry","cms","createEntry","data","Response","e","ErrorResponse"],"sources":["resolveCreate.ts"],"sourcesContent":["import { Response, ErrorResponse } from \"@webiny/handler-graphql/responses\";\nimport { CmsEntryResolverFactory as ResolverFactory, CreateCmsEntryInput } from \"~/types\";\n\ninterface ResolveCreateArgs {\n data: CreateCmsEntryInput;\n}\ntype ResolveCreate = ResolverFactory<any, ResolveCreateArgs>;\n\nexport const resolveCreate: ResolveCreate =\n ({ model }) =>\n async (_, args: any, context) => {\n try {\n const entry = await context.cms.createEntry(model, args.data);\n\n return new Response(entry);\n } catch (e) {\n return new ErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;AAAA;AAQO,MAAMA,aAA4B,GACrC,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAC,EAAEC,IAAS,EAAEC,OAAO,KAAK;EAC7B,IAAI;IACA,MAAMC,KAAK,GAAG,MAAMD,OAAO,CAACE,GAAG,CAACC,WAAW,CAACN,KAAK,EAAEE,IAAI,CAACK,IAAI,CAAC;IAE7D,OAAO,IAAIC,mBAAQ,CAACJ,KAAK,CAAC;EAC9B,CAAC,CAAC,OAAOK,CAAC,EAAE;IACR,OAAO,IAAIC,wBAAa,CAACD,CAAC,CAAC;EAC/B;AACJ,CAAC;AAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CmsEntryResolverFactory as ResolverFactory, CreateFromCmsEntryInput } from "../../../../types";
|
|
2
|
+
interface ResolveCreateFromArgs {
|
|
3
|
+
revision: string;
|
|
4
|
+
data: CreateFromCmsEntryInput;
|
|
5
|
+
}
|
|
6
|
+
declare type ResolveCreateFrom = ResolverFactory<any, ResolveCreateFromArgs>;
|
|
7
|
+
export declare const resolveCreateFrom: ResolveCreateFrom;
|
|
8
|
+
export {};
|
|
@@ -4,20 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolveCreateFrom = void 0;
|
|
7
|
-
|
|
8
7
|
var _responses = require("@webiny/handler-graphql/responses");
|
|
9
|
-
|
|
10
8
|
const resolveCreateFrom = ({
|
|
11
9
|
model
|
|
12
|
-
}) => async (_, args, {
|
|
13
|
-
cms
|
|
14
|
-
}) => {
|
|
10
|
+
}) => async (_, args, context) => {
|
|
15
11
|
try {
|
|
16
|
-
const newRevision = await cms.createEntryRevisionFrom(model, args.revision, args.data || {});
|
|
12
|
+
const newRevision = await context.cms.createEntryRevisionFrom(model, args.revision, args.data || {});
|
|
17
13
|
return new _responses.Response(newRevision);
|
|
18
14
|
} catch (e) {
|
|
19
15
|
return new _responses.ErrorResponse(e);
|
|
20
16
|
}
|
|
21
17
|
};
|
|
22
|
-
|
|
23
18
|
exports.resolveCreateFrom = resolveCreateFrom;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveCreateFrom","model","_","args","context","newRevision","cms","createEntryRevisionFrom","revision","data","Response","e","ErrorResponse"],"sources":["resolveCreateFrom.ts"],"sourcesContent":["import { Response, ErrorResponse } from \"@webiny/handler-graphql/responses\";\nimport { CmsEntryResolverFactory as ResolverFactory, CreateFromCmsEntryInput } from \"~/types\";\n\ninterface ResolveCreateFromArgs {\n revision: string;\n data: CreateFromCmsEntryInput;\n}\ntype ResolveCreateFrom = ResolverFactory<any, ResolveCreateFromArgs>;\n\nexport const resolveCreateFrom: ResolveCreateFrom =\n ({ model }) =>\n async (_, args: any, context) => {\n try {\n const newRevision = await context.cms.createEntryRevisionFrom(\n model,\n args.revision,\n args.data || {}\n );\n return new Response(newRevision);\n } catch (e) {\n return new ErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;AAAA;AASO,MAAMA,iBAAoC,GAC7C,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAC,EAAEC,IAAS,EAAEC,OAAO,KAAK;EAC7B,IAAI;IACA,MAAMC,WAAW,GAAG,MAAMD,OAAO,CAACE,GAAG,CAACC,uBAAuB,CACzDN,KAAK,EACLE,IAAI,CAACK,QAAQ,EACbL,IAAI,CAACM,IAAI,IAAI,CAAC,CAAC,CAClB;IACD,OAAO,IAAIC,mBAAQ,CAACL,WAAW,CAAC;EACpC,CAAC,CAAC,OAAOM,CAAC,EAAE;IACR,OAAO,IAAIC,wBAAa,CAACD,CAAC,CAAC;EAC/B;AACJ,CAAC;AAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CmsEntryResolverFactory as ResolverFactory } from "../../../../types";
|
|
2
|
+
interface ResolveDeleteArgs {
|
|
3
|
+
revision: string;
|
|
4
|
+
}
|
|
5
|
+
declare type ResolveDelete = ResolverFactory<any, ResolveDeleteArgs>;
|
|
6
|
+
export declare const resolveDelete: ResolveDelete;
|
|
7
|
+
export {};
|
|
@@ -4,27 +4,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolveDelete = void 0;
|
|
7
|
-
|
|
8
7
|
var _responses = require("@webiny/handler-graphql/responses");
|
|
9
|
-
|
|
8
|
+
var _utils = require("@webiny/utils");
|
|
10
9
|
const resolveDelete = ({
|
|
11
10
|
model
|
|
12
|
-
}) => async (_, {
|
|
13
|
-
revision
|
|
14
|
-
}, {
|
|
15
|
-
cms
|
|
16
|
-
}) => {
|
|
11
|
+
}) => async (_, args, context) => {
|
|
17
12
|
try {
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
const {
|
|
14
|
+
version
|
|
15
|
+
} = (0, _utils.parseIdentifier)(args.revision);
|
|
16
|
+
if (version) {
|
|
17
|
+
await context.cms.deleteEntryRevision(model, args.revision);
|
|
20
18
|
} else {
|
|
21
|
-
await cms.deleteEntry(model, revision);
|
|
19
|
+
await context.cms.deleteEntry(model, args.revision);
|
|
22
20
|
}
|
|
23
|
-
|
|
24
21
|
return new _responses.Response(true);
|
|
25
22
|
} catch (e) {
|
|
26
23
|
return new _responses.ErrorResponse(e);
|
|
27
24
|
}
|
|
28
25
|
};
|
|
29
|
-
|
|
30
26
|
exports.resolveDelete = resolveDelete;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveDelete","model","_","args","context","version","parseIdentifier","revision","cms","deleteEntryRevision","deleteEntry","Response","e","ErrorResponse"],"sources":["resolveDelete.ts"],"sourcesContent":["import { Response, ErrorResponse } from \"@webiny/handler-graphql/responses\";\nimport { CmsEntryResolverFactory as ResolverFactory } from \"~/types\";\nimport { parseIdentifier } from \"@webiny/utils\";\n\ninterface ResolveDeleteArgs {\n revision: string;\n}\ntype ResolveDelete = ResolverFactory<any, ResolveDeleteArgs>;\n\nexport const resolveDelete: ResolveDelete =\n ({ model }) =>\n async (_, args: any, context) => {\n try {\n const { version } = parseIdentifier(args.revision);\n if (version) {\n await context.cms.deleteEntryRevision(model, args.revision);\n } else {\n await context.cms.deleteEntry(model, args.revision);\n }\n\n return new Response(true);\n } catch (e) {\n return new ErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;AAAA;AAEA;AAOO,MAAMA,aAA4B,GACrC,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAC,EAAEC,IAAS,EAAEC,OAAO,KAAK;EAC7B,IAAI;IACA,MAAM;MAAEC;IAAQ,CAAC,GAAG,IAAAC,sBAAe,EAACH,IAAI,CAACI,QAAQ,CAAC;IAClD,IAAIF,OAAO,EAAE;MACT,MAAMD,OAAO,CAACI,GAAG,CAACC,mBAAmB,CAACR,KAAK,EAAEE,IAAI,CAACI,QAAQ,CAAC;IAC/D,CAAC,MAAM;MACH,MAAMH,OAAO,CAACI,GAAG,CAACE,WAAW,CAACT,KAAK,EAAEE,IAAI,CAACI,QAAQ,CAAC;IACvD;IAEA,OAAO,IAAII,mBAAQ,CAAC,IAAI,CAAC;EAC7B,CAAC,CAAC,OAAOC,CAAC,EAAE;IACR,OAAO,IAAIC,wBAAa,CAACD,CAAC,CAAC;EAC/B;AACJ,CAAC;AAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.resolveGet = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
10
|
+
var _responses = require("@webiny/handler-graphql/responses");
|
|
11
|
+
var _utils = require("@webiny/utils");
|
|
12
|
+
const possibleTypes = ["published", "latest"];
|
|
13
|
+
const getValuesFromArgs = args => {
|
|
14
|
+
const {
|
|
15
|
+
status,
|
|
16
|
+
revision,
|
|
17
|
+
entryId
|
|
18
|
+
} = args || {};
|
|
19
|
+
if (!revision && !entryId) {
|
|
20
|
+
throw new _error.default("You must pass a 'revision' or an 'entryId' argument.", "GRAPHQL_ARGS_ERROR", (0, _objectSpread2.default)({}, args || {}));
|
|
21
|
+
} else if (revision && entryId) {
|
|
22
|
+
throw new _error.default("Cannot have both of GraphQL query arguments: revision and entryId. Must have only one.", "GRAPHQL_ARGS_ERROR", (0, _objectSpread2.default)({}, args));
|
|
23
|
+
}
|
|
24
|
+
if (status && possibleTypes.includes(status) === false) {
|
|
25
|
+
throw new _error.default(`Status can only be one of the following values: ${possibleTypes.join(" | ")}.`, "GRAPHQL_ARGS_ERROR", (0, _objectSpread2.default)({}, args));
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* In case we are searching for latest or published but we do not have entryId, we need to set it.
|
|
29
|
+
* OR if version was not passed we will find latest or published, depending on status sent.
|
|
30
|
+
*/
|
|
31
|
+
if (status || !revision) {
|
|
32
|
+
const {
|
|
33
|
+
id
|
|
34
|
+
} = (0, _utils.parseIdentifier)(entryId || revision);
|
|
35
|
+
return {
|
|
36
|
+
published: status === "published",
|
|
37
|
+
entryId: id
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
revision
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
const resolveGet = ({
|
|
45
|
+
model
|
|
46
|
+
}) => async (_, args, context) => {
|
|
47
|
+
try {
|
|
48
|
+
const {
|
|
49
|
+
entryId,
|
|
50
|
+
published,
|
|
51
|
+
revision
|
|
52
|
+
} = getValuesFromArgs(args);
|
|
53
|
+
if (entryId) {
|
|
54
|
+
const result = published ? await context.cms.getPublishedEntriesByIds(model, [entryId]) : await context.cms.getLatestEntriesByIds(model, [entryId]);
|
|
55
|
+
return new _responses.Response(result.shift() || null);
|
|
56
|
+
}
|
|
57
|
+
const entry = await context.cms.getEntryById(model, revision);
|
|
58
|
+
return new _responses.Response(entry);
|
|
59
|
+
} catch (e) {
|
|
60
|
+
return new _responses.ErrorResponse(e);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
exports.resolveGet = resolveGet;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["possibleTypes","getValuesFromArgs","args","status","revision","entryId","WebinyError","includes","join","id","parseIdentifier","published","resolveGet","model","_","context","result","cms","getPublishedEntriesByIds","getLatestEntriesByIds","Response","shift","entry","getEntryById","e","ErrorResponse"],"sources":["resolveGet.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { ErrorResponse, Response } from \"@webiny/handler-graphql/responses\";\nimport { CmsEntryResolverFactory as ResolverFactory } from \"~/types\";\nimport { parseIdentifier } from \"@webiny/utils\";\n\ninterface ResolveGetArgs {\n revision: string;\n}\n\ntype ResolveGet = ResolverFactory<any, ResolveGetArgs>;\n\ninterface ValuesFromArgsParams {\n status?: \"published\" | \"latest\";\n entryId?: string;\n revision: string;\n}\ninterface ArgsValues {\n published?: boolean;\n entryId?: string;\n revision?: string;\n}\n\nconst possibleTypes = [\"published\", \"latest\"];\n\nconst getValuesFromArgs = (args?: ValuesFromArgsParams): ArgsValues => {\n const { status, revision, entryId } = args || {};\n if (!revision && !entryId) {\n throw new WebinyError(\n \"You must pass a 'revision' or an 'entryId' argument.\",\n \"GRAPHQL_ARGS_ERROR\",\n {\n ...(args || {})\n }\n );\n } else if (revision && entryId) {\n throw new WebinyError(\n \"Cannot have both of GraphQL query arguments: revision and entryId. Must have only one.\",\n \"GRAPHQL_ARGS_ERROR\",\n {\n ...args\n }\n );\n }\n if (status && possibleTypes.includes(status) === false) {\n throw new WebinyError(\n `Status can only be one of the following values: ${possibleTypes.join(\" | \")}.`,\n \"GRAPHQL_ARGS_ERROR\",\n {\n ...args\n }\n );\n }\n /**\n * In case we are searching for latest or published but we do not have entryId, we need to set it.\n * OR if version was not passed we will find latest or published, depending on status sent.\n */\n if (status || !revision) {\n const { id } = parseIdentifier(entryId || revision);\n return {\n published: status === \"published\",\n entryId: id\n };\n }\n return {\n revision\n };\n};\n\nexport const resolveGet: ResolveGet =\n ({ model }) =>\n async (_, args: any, context) => {\n try {\n const { entryId, published, revision } = getValuesFromArgs(args);\n\n if (entryId) {\n const result = published\n ? await context.cms.getPublishedEntriesByIds(model, [entryId])\n : await context.cms.getLatestEntriesByIds(model, [entryId]);\n return new Response(result.shift() || null);\n }\n\n const entry = await context.cms.getEntryById(model, revision as string);\n\n return new Response(entry);\n } catch (e) {\n return new ErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;;;AAAA;AACA;AAEA;AAmBA,MAAMA,aAAa,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAC;AAE7C,MAAMC,iBAAiB,GAAIC,IAA2B,IAAiB;EACnE,MAAM;IAAEC,MAAM;IAAEC,QAAQ;IAAEC;EAAQ,CAAC,GAAGH,IAAI,IAAI,CAAC,CAAC;EAChD,IAAI,CAACE,QAAQ,IAAI,CAACC,OAAO,EAAE;IACvB,MAAM,IAAIC,cAAW,CACjB,sDAAsD,EACtD,oBAAoB,kCAEZJ,IAAI,IAAI,CAAC,CAAC,EAErB;EACL,CAAC,MAAM,IAAIE,QAAQ,IAAIC,OAAO,EAAE;IAC5B,MAAM,IAAIC,cAAW,CACjB,wFAAwF,EACxF,oBAAoB,kCAEbJ,IAAI,EAEd;EACL;EACA,IAAIC,MAAM,IAAIH,aAAa,CAACO,QAAQ,CAACJ,MAAM,CAAC,KAAK,KAAK,EAAE;IACpD,MAAM,IAAIG,cAAW,CAChB,mDAAkDN,aAAa,CAACQ,IAAI,CAAC,KAAK,CAAE,GAAE,EAC/E,oBAAoB,kCAEbN,IAAI,EAEd;EACL;EACA;AACJ;AACA;AACA;EACI,IAAIC,MAAM,IAAI,CAACC,QAAQ,EAAE;IACrB,MAAM;MAAEK;IAAG,CAAC,GAAG,IAAAC,sBAAe,EAACL,OAAO,IAAID,QAAQ,CAAC;IACnD,OAAO;MACHO,SAAS,EAAER,MAAM,KAAK,WAAW;MACjCE,OAAO,EAAEI;IACb,CAAC;EACL;EACA,OAAO;IACHL;EACJ,CAAC;AACL,CAAC;AAEM,MAAMQ,UAAsB,GAC/B,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAC,EAAEZ,IAAS,EAAEa,OAAO,KAAK;EAC7B,IAAI;IACA,MAAM;MAAEV,OAAO;MAAEM,SAAS;MAAEP;IAAS,CAAC,GAAGH,iBAAiB,CAACC,IAAI,CAAC;IAEhE,IAAIG,OAAO,EAAE;MACT,MAAMW,MAAM,GAAGL,SAAS,GAClB,MAAMI,OAAO,CAACE,GAAG,CAACC,wBAAwB,CAACL,KAAK,EAAE,CAACR,OAAO,CAAC,CAAC,GAC5D,MAAMU,OAAO,CAACE,GAAG,CAACE,qBAAqB,CAACN,KAAK,EAAE,CAACR,OAAO,CAAC,CAAC;MAC/D,OAAO,IAAIe,mBAAQ,CAACJ,MAAM,CAACK,KAAK,EAAE,IAAI,IAAI,CAAC;IAC/C;IAEA,MAAMC,KAAK,GAAG,MAAMP,OAAO,CAACE,GAAG,CAACM,YAAY,CAACV,KAAK,EAAET,QAAQ,CAAW;IAEvE,OAAO,IAAIgB,mBAAQ,CAACE,KAAK,CAAC;EAC9B,CAAC,CAAC,OAAOE,CAAC,EAAE;IACR,OAAO,IAAIC,wBAAa,CAACD,CAAC,CAAC;EAC/B;AACJ,CAAC;AAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CmsEntryResolverFactory as ResolverFactory } from "../../../../types";
|
|
2
|
+
interface ResolveGetByIdsArgs {
|
|
3
|
+
revisions: string[];
|
|
4
|
+
}
|
|
5
|
+
declare type ResolveGetByIds = ResolverFactory<any, ResolveGetByIdsArgs>;
|
|
6
|
+
export declare const resolveGetByIds: ResolveGetByIds;
|
|
7
|
+
export {};
|
|
@@ -4,20 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolveGetByIds = void 0;
|
|
7
|
-
|
|
8
7
|
var _responses = require("@webiny/handler-graphql/responses");
|
|
9
|
-
|
|
10
8
|
const resolveGetByIds = ({
|
|
11
9
|
model
|
|
12
|
-
}) => async (_, args, {
|
|
13
|
-
cms
|
|
14
|
-
}) => {
|
|
10
|
+
}) => async (_, args, context) => {
|
|
15
11
|
try {
|
|
16
|
-
const response = await cms.getEntriesByIds(model, args.revisions);
|
|
12
|
+
const response = await context.cms.getEntriesByIds(model, args.revisions);
|
|
17
13
|
return new _responses.Response(response);
|
|
18
14
|
} catch (e) {
|
|
19
15
|
return new _responses.ErrorResponse(e);
|
|
20
16
|
}
|
|
21
17
|
};
|
|
22
|
-
|
|
23
18
|
exports.resolveGetByIds = resolveGetByIds;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveGetByIds","model","_","args","context","response","cms","getEntriesByIds","revisions","Response","e","ErrorResponse"],"sources":["resolveGetByIds.ts"],"sourcesContent":["import { ErrorResponse, Response } from \"@webiny/handler-graphql/responses\";\nimport { CmsEntryResolverFactory as ResolverFactory, CmsEntry } from \"~/types\";\n\ninterface ResolveGetByIdsArgs {\n revisions: string[];\n}\ntype ResolveGetByIds = ResolverFactory<any, ResolveGetByIdsArgs>;\n\nexport const resolveGetByIds: ResolveGetByIds =\n ({ model }) =>\n async (_, args: any, context) => {\n try {\n const response: CmsEntry[] = await context.cms.getEntriesByIds(model, args.revisions);\n\n return new Response(response);\n } catch (e) {\n return new ErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;AAAA;AAQO,MAAMA,eAAgC,GACzC,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAC,EAAEC,IAAS,EAAEC,OAAO,KAAK;EAC7B,IAAI;IACA,MAAMC,QAAoB,GAAG,MAAMD,OAAO,CAACE,GAAG,CAACC,eAAe,CAACN,KAAK,EAAEE,IAAI,CAACK,SAAS,CAAC;IAErF,OAAO,IAAIC,mBAAQ,CAACJ,QAAQ,CAAC;EACjC,CAAC,CAAC,OAAOK,CAAC,EAAE;IACR,OAAO,IAAIC,wBAAa,CAACD,CAAC,CAAC;EAC/B;AACJ,CAAC;AAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CmsEntryResolverFactory as ResolverFactory } from "../../../../types";
|
|
2
|
+
interface ResolveGetRevisionsArgs {
|
|
3
|
+
id: string;
|
|
4
|
+
}
|
|
5
|
+
declare type ResolveGetRevisions = ResolverFactory<any, ResolveGetRevisionsArgs>;
|
|
6
|
+
export declare const resolveGetRevisions: ResolveGetRevisions;
|
|
7
|
+
export {};
|
|
@@ -4,20 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolveGetRevisions = void 0;
|
|
7
|
-
|
|
8
7
|
var _responses = require("@webiny/handler-graphql/responses");
|
|
9
|
-
|
|
10
8
|
const resolveGetRevisions = ({
|
|
11
9
|
model
|
|
12
|
-
}) => async (_, args, {
|
|
13
|
-
cms
|
|
14
|
-
}) => {
|
|
10
|
+
}) => async (_, args, context) => {
|
|
15
11
|
try {
|
|
16
|
-
const revisions = await cms.getEntryRevisions(model, args.id);
|
|
12
|
+
const revisions = await context.cms.getEntryRevisions(model, args.id);
|
|
17
13
|
return new _responses.Response(revisions.sort((a, b) => b.version - a.version));
|
|
18
14
|
} catch (e) {
|
|
19
15
|
return new _responses.ErrorResponse(e);
|
|
20
16
|
}
|
|
21
17
|
};
|
|
22
|
-
|
|
23
18
|
exports.resolveGetRevisions = resolveGetRevisions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveGetRevisions","model","_","args","context","revisions","cms","getEntryRevisions","id","Response","sort","a","b","version","e","ErrorResponse"],"sources":["resolveGetRevisions.ts"],"sourcesContent":["import { ErrorResponse, Response } from \"@webiny/handler-graphql/responses\";\nimport { CmsEntryResolverFactory as ResolverFactory } from \"~/types\";\n\ninterface ResolveGetRevisionsArgs {\n id: string;\n}\ntype ResolveGetRevisions = ResolverFactory<any, ResolveGetRevisionsArgs>;\n\nexport const resolveGetRevisions: ResolveGetRevisions =\n ({ model }) =>\n async (_, args: any, context) => {\n try {\n const revisions = await context.cms.getEntryRevisions(model, args.id);\n\n return new Response(revisions.sort((a, b) => b.version - a.version));\n } catch (e) {\n return new ErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;AAAA;AAQO,MAAMA,mBAAwC,GACjD,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAC,EAAEC,IAAS,EAAEC,OAAO,KAAK;EAC7B,IAAI;IACA,MAAMC,SAAS,GAAG,MAAMD,OAAO,CAACE,GAAG,CAACC,iBAAiB,CAACN,KAAK,EAAEE,IAAI,CAACK,EAAE,CAAC;IAErE,OAAO,IAAIC,mBAAQ,CAACJ,SAAS,CAACK,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKA,CAAC,CAACC,OAAO,GAAGF,CAAC,CAACE,OAAO,CAAC,CAAC;EACxE,CAAC,CAAC,OAAOC,CAAC,EAAE;IACR,OAAO,IAAIC,wBAAa,CAACD,CAAC,CAAC;EAC/B;AACJ,CAAC;AAAC"}
|
package/{content/plugins/schema/resolvers/preview → graphql/schema/resolvers/manage}/resolveList.js
RENAMED
|
@@ -4,20 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolveList = void 0;
|
|
7
|
-
|
|
8
7
|
var _responses = require("@webiny/handler-graphql/responses");
|
|
9
|
-
|
|
10
8
|
const resolveList = ({
|
|
11
9
|
model
|
|
12
|
-
}) => async (_, args, {
|
|
13
|
-
cms
|
|
14
|
-
}) => {
|
|
10
|
+
}) => async (_, args, context) => {
|
|
15
11
|
try {
|
|
16
|
-
const response = await cms.listLatestEntries(model, args);
|
|
12
|
+
const response = await context.cms.listLatestEntries(model, args);
|
|
17
13
|
return new _responses.ListResponse(...response);
|
|
18
14
|
} catch (e) {
|
|
19
15
|
return new _responses.ListErrorResponse(e);
|
|
20
16
|
}
|
|
21
17
|
};
|
|
22
|
-
|
|
23
18
|
exports.resolveList = resolveList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveList","model","_","args","context","response","cms","listLatestEntries","ListResponse","e","ListErrorResponse"],"sources":["resolveList.ts"],"sourcesContent":["import { ListResponse, ListErrorResponse } from \"@webiny/handler-graphql/responses\";\nimport {\n CmsEntryMeta,\n CmsEntryResolverFactory as ResolverFactory,\n CmsEntry,\n CmsEntryListParams\n} from \"~/types\";\n\ntype ResolveList = ResolverFactory<any, CmsEntryListParams>;\n\nexport const resolveList: ResolveList =\n ({ model }) =>\n async (_, args: any, context) => {\n try {\n const response: [CmsEntry[], CmsEntryMeta] = await context.cms.listLatestEntries(\n model,\n args\n );\n\n return new ListResponse(...response);\n } catch (e) {\n return new ListErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;AAAA;AAUO,MAAMA,WAAwB,GACjC,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAC,EAAEC,IAAS,EAAEC,OAAO,KAAK;EAC7B,IAAI;IACA,MAAMC,QAAoC,GAAG,MAAMD,OAAO,CAACE,GAAG,CAACC,iBAAiB,CAC5EN,KAAK,EACLE,IAAI,CACP;IAED,OAAO,IAAIK,uBAAY,CAAC,GAAGH,QAAQ,CAAC;EACxC,CAAC,CAAC,OAAOI,CAAC,EAAE;IACR,OAAO,IAAIC,4BAAiB,CAACD,CAAC,CAAC;EACnC;AACJ,CAAC;AAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CmsEntryResolverFactory as ResolverFactory } from "../../../../types";
|
|
2
|
+
interface ResolvePublishArgs {
|
|
3
|
+
revision: string;
|
|
4
|
+
}
|
|
5
|
+
declare type ResolvePublish = ResolverFactory<any, ResolvePublishArgs>;
|
|
6
|
+
export declare const resolvePublish: ResolvePublish;
|
|
7
|
+
export {};
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolvePublish = void 0;
|
|
7
|
-
|
|
8
7
|
var _responses = require("@webiny/handler-graphql/responses");
|
|
9
|
-
|
|
10
8
|
const resolvePublish = ({
|
|
11
9
|
model
|
|
12
10
|
}) => async (_, args, context) => {
|
|
@@ -17,5 +15,4 @@ const resolvePublish = ({
|
|
|
17
15
|
return new _responses.ErrorResponse(e);
|
|
18
16
|
}
|
|
19
17
|
};
|
|
20
|
-
|
|
21
18
|
exports.resolvePublish = resolvePublish;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolvePublish","model","_","args","context","entry","cms","publishEntry","revision","Response","e","ErrorResponse"],"sources":["resolvePublish.ts"],"sourcesContent":["import { Response, ErrorResponse } from \"@webiny/handler-graphql/responses\";\nimport { CmsEntryResolverFactory as ResolverFactory } from \"~/types\";\n\ninterface ResolvePublishArgs {\n revision: string;\n}\n\ntype ResolvePublish = ResolverFactory<any, ResolvePublishArgs>;\n\nexport const resolvePublish: ResolvePublish =\n ({ model }) =>\n async (_, args: any, context) => {\n try {\n const entry = await context.cms.publishEntry(model, args.revision);\n return new Response(entry);\n } catch (e) {\n return new ErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;AAAA;AASO,MAAMA,cAA8B,GACvC,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAC,EAAEC,IAAS,EAAEC,OAAO,KAAK;EAC7B,IAAI;IACA,MAAMC,KAAK,GAAG,MAAMD,OAAO,CAACE,GAAG,CAACC,YAAY,CAACN,KAAK,EAAEE,IAAI,CAACK,QAAQ,CAAC;IAClE,OAAO,IAAIC,mBAAQ,CAACJ,KAAK,CAAC;EAC9B,CAAC,CAAC,OAAOK,CAAC,EAAE;IACR,OAAO,IAAIC,wBAAa,CAACD,CAAC,CAAC;EAC/B;AACJ,CAAC;AAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CmsEntryResolverFactory as ResolverFactory } from "../../../../types";
|
|
2
|
+
interface ResolveRepublishArgs {
|
|
3
|
+
revision: string;
|
|
4
|
+
}
|
|
5
|
+
declare type ResolveRepublish = ResolverFactory<any, ResolveRepublishArgs>;
|
|
6
|
+
export declare const resolveRepublish: ResolveRepublish;
|
|
7
|
+
export {};
|
|
@@ -3,19 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
6
|
+
exports.resolveRepublish = void 0;
|
|
8
7
|
var _responses = require("@webiny/handler-graphql/responses");
|
|
9
|
-
|
|
10
|
-
const resolveGet = ({
|
|
8
|
+
const resolveRepublish = ({
|
|
11
9
|
model
|
|
12
10
|
}) => async (_, args, context) => {
|
|
13
11
|
try {
|
|
14
|
-
const entry = await context.cms.
|
|
12
|
+
const entry = await context.cms.republishEntry(model, args.revision);
|
|
15
13
|
return new _responses.Response(entry);
|
|
16
14
|
} catch (e) {
|
|
17
15
|
return new _responses.ErrorResponse(e);
|
|
18
16
|
}
|
|
19
17
|
};
|
|
20
|
-
|
|
21
|
-
exports.resolveGet = resolveGet;
|
|
18
|
+
exports.resolveRepublish = resolveRepublish;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveRepublish","model","_","args","context","entry","cms","republishEntry","revision","Response","e","ErrorResponse"],"sources":["resolveRepublish.ts"],"sourcesContent":["import { Response, ErrorResponse } from \"@webiny/handler-graphql/responses\";\nimport { CmsEntryResolverFactory as ResolverFactory } from \"~/types\";\n\ninterface ResolveRepublishArgs {\n revision: string;\n}\ntype ResolveRepublish = ResolverFactory<any, ResolveRepublishArgs>;\n\nexport const resolveRepublish: ResolveRepublish =\n ({ model }) =>\n async (_, args: any, context) => {\n try {\n const entry = await context.cms.republishEntry(model, args.revision);\n return new Response(entry);\n } catch (e) {\n return new ErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;AAAA;AAQO,MAAMA,gBAAkC,GAC3C,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAC,EAAEC,IAAS,EAAEC,OAAO,KAAK;EAC7B,IAAI;IACA,MAAMC,KAAK,GAAG,MAAMD,OAAO,CAACE,GAAG,CAACC,cAAc,CAACN,KAAK,EAAEE,IAAI,CAACK,QAAQ,CAAC;IACpE,OAAO,IAAIC,mBAAQ,CAACJ,KAAK,CAAC;EAC9B,CAAC,CAAC,OAAOK,CAAC,EAAE;IACR,OAAO,IAAIC,wBAAa,CAACD,CAAC,CAAC;EAC/B;AACJ,CAAC;AAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CmsEntryResolverFactory as ResolverFactory } from "../../../../types";
|
|
2
|
+
interface ResolveUnpublishArgs {
|
|
3
|
+
revision: string;
|
|
4
|
+
}
|
|
5
|
+
declare type ResolveUnpublish = ResolverFactory<any, ResolveUnpublishArgs>;
|
|
6
|
+
export declare const resolveUnpublish: ResolveUnpublish;
|
|
7
|
+
export {};
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolveUnpublish = void 0;
|
|
7
|
-
|
|
8
7
|
var _responses = require("@webiny/handler-graphql/responses");
|
|
9
|
-
|
|
10
8
|
const resolveUnpublish = ({
|
|
11
9
|
model
|
|
12
10
|
}) => async (_, args, context) => {
|
|
@@ -17,5 +15,4 @@ const resolveUnpublish = ({
|
|
|
17
15
|
return new _responses.ErrorResponse(e);
|
|
18
16
|
}
|
|
19
17
|
};
|
|
20
|
-
|
|
21
18
|
exports.resolveUnpublish = resolveUnpublish;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveUnpublish","model","_","args","context","entry","cms","unpublishEntry","revision","Response","e","ErrorResponse"],"sources":["resolveUnpublish.ts"],"sourcesContent":["import { Response, ErrorResponse } from \"@webiny/handler-graphql/responses\";\nimport { CmsEntryResolverFactory as ResolverFactory } from \"~/types\";\n\ninterface ResolveUnpublishArgs {\n revision: string;\n}\ntype ResolveUnpublish = ResolverFactory<any, ResolveUnpublishArgs>;\n\nexport const resolveUnpublish: ResolveUnpublish =\n ({ model }) =>\n async (_, args: any, context) => {\n try {\n const entry = await context.cms.unpublishEntry(model, args.revision);\n return new Response(entry);\n } catch (e) {\n return new ErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;AAAA;AAQO,MAAMA,gBAAkC,GAC3C,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAC,EAAEC,IAAS,EAAEC,OAAO,KAAK;EAC7B,IAAI;IACA,MAAMC,KAAK,GAAG,MAAMD,OAAO,CAACE,GAAG,CAACC,cAAc,CAACN,KAAK,EAAEE,IAAI,CAACK,QAAQ,CAAC;IACpE,OAAO,IAAIC,mBAAQ,CAACJ,KAAK,CAAC;EAC9B,CAAC,CAAC,OAAOK,CAAC,EAAE;IACR,OAAO,IAAIC,wBAAa,CAACD,CAAC,CAAC;EAC/B;AACJ,CAAC;AAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CmsEntryResolverFactory as ResolverFactory, UpdateCmsEntryInput } from "../../../../types";
|
|
2
|
+
interface ResolveUpdateArgs {
|
|
3
|
+
revision: string;
|
|
4
|
+
data: UpdateCmsEntryInput;
|
|
5
|
+
}
|
|
6
|
+
declare type ResolveUpdate = ResolverFactory<any, ResolveUpdateArgs>;
|
|
7
|
+
export declare const resolveUpdate: ResolveUpdate;
|
|
8
|
+
export {};
|
|
@@ -4,20 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolveUpdate = void 0;
|
|
7
|
-
|
|
8
7
|
var _responses = require("@webiny/handler-graphql/responses");
|
|
9
|
-
|
|
10
8
|
const resolveUpdate = ({
|
|
11
9
|
model
|
|
12
|
-
}) => async (_, args, {
|
|
13
|
-
cms
|
|
14
|
-
}) => {
|
|
10
|
+
}) => async (_, args, context) => {
|
|
15
11
|
try {
|
|
16
|
-
const entry = await cms.updateEntry(model, args.revision, args.data);
|
|
12
|
+
const entry = await context.cms.updateEntry(model, args.revision, args.data);
|
|
17
13
|
return new _responses.Response(entry);
|
|
18
14
|
} catch (e) {
|
|
19
15
|
return new _responses.ErrorResponse(e);
|
|
20
16
|
}
|
|
21
17
|
};
|
|
22
|
-
|
|
23
18
|
exports.resolveUpdate = resolveUpdate;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveUpdate","model","_","args","context","entry","cms","updateEntry","revision","data","Response","e","ErrorResponse"],"sources":["resolveUpdate.ts"],"sourcesContent":["import { Response, ErrorResponse } from \"@webiny/handler-graphql/responses\";\nimport { CmsEntryResolverFactory as ResolverFactory, UpdateCmsEntryInput } from \"~/types\";\n\ninterface ResolveUpdateArgs {\n revision: string;\n data: UpdateCmsEntryInput;\n}\ntype ResolveUpdate = ResolverFactory<any, ResolveUpdateArgs>;\n\nexport const resolveUpdate: ResolveUpdate =\n ({ model }) =>\n async (_, args: any, context) => {\n try {\n const entry = await context.cms.updateEntry(model, args.revision, args.data);\n\n return new Response(entry);\n } catch (e) {\n return new ErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;AAAA;AASO,MAAMA,aAA4B,GACrC,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAC,EAAEC,IAAS,EAAEC,OAAO,KAAK;EAC7B,IAAI;IACA,MAAMC,KAAK,GAAG,MAAMD,OAAO,CAACE,GAAG,CAACC,WAAW,CAACN,KAAK,EAAEE,IAAI,CAACK,QAAQ,EAAEL,IAAI,CAACM,IAAI,CAAC;IAE5E,OAAO,IAAIC,mBAAQ,CAACL,KAAK,CAAC;EAC9B,CAAC,CAAC,OAAOM,CAAC,EAAE;IACR,OAAO,IAAIC,wBAAa,CAACD,CAAC,CAAC;EAC/B;AACJ,CAAC;AAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.resolveGet = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _responses = require("@webiny/handler-graphql/responses");
|
|
10
|
+
var _handlerGraphql = require("@webiny/handler-graphql");
|
|
11
|
+
const resolveGet = ({
|
|
12
|
+
model
|
|
13
|
+
}) => async (_, args, context) => {
|
|
14
|
+
try {
|
|
15
|
+
const [[entry]] = await context.cms.listLatestEntries(model, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, args), {}, {
|
|
16
|
+
limit: 1
|
|
17
|
+
}));
|
|
18
|
+
if (!entry) {
|
|
19
|
+
throw new _handlerGraphql.NotFoundError(`Entry not found!`);
|
|
20
|
+
}
|
|
21
|
+
return new _responses.Response(entry);
|
|
22
|
+
} catch (e) {
|
|
23
|
+
return new _responses.ErrorResponse(e);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.resolveGet = resolveGet;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveGet","model","_","args","context","entry","cms","listLatestEntries","limit","NotFoundError","Response","e","ErrorResponse"],"sources":["resolveGet.ts"],"sourcesContent":["import { ErrorResponse, Response } from \"@webiny/handler-graphql/responses\";\nimport { CmsEntryListParams, CmsEntryResolverFactory as ResolverFactory } from \"~/types\";\nimport { NotFoundError } from \"@webiny/handler-graphql\";\n\ntype ResolveGet = ResolverFactory<any, CmsEntryListParams>;\n\nexport const resolveGet: ResolveGet =\n ({ model }) =>\n async (_: any, args: any, context) => {\n try {\n const [[entry]] = await context.cms.listLatestEntries(model, {\n ...args,\n limit: 1\n });\n if (!entry) {\n throw new NotFoundError(`Entry not found!`);\n }\n return new Response(entry);\n } catch (e) {\n return new ErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;;;AAAA;AAEA;AAIO,MAAMA,UAAsB,GAC/B,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAM,EAAEC,IAAS,EAAEC,OAAO,KAAK;EAClC,IAAI;IACA,MAAM,CAAC,CAACC,KAAK,CAAC,CAAC,GAAG,MAAMD,OAAO,CAACE,GAAG,CAACC,iBAAiB,CAACN,KAAK,8DACpDE,IAAI;MACPK,KAAK,EAAE;IAAC,GACV;IACF,IAAI,CAACH,KAAK,EAAE;MACR,MAAM,IAAII,6BAAa,CAAE,kBAAiB,CAAC;IAC/C;IACA,OAAO,IAAIC,mBAAQ,CAACL,KAAK,CAAC;EAC9B,CAAC,CAAC,OAAOM,CAAC,EAAE;IACR,OAAO,IAAIC,wBAAa,CAACD,CAAC,CAAC;EAC/B;AACJ,CAAC;AAAC"}
|
package/{content/plugins/schema/resolvers/manage → graphql/schema/resolvers/preview}/resolveList.js
RENAMED
|
@@ -4,20 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolveList = void 0;
|
|
7
|
-
|
|
8
7
|
var _responses = require("@webiny/handler-graphql/responses");
|
|
9
|
-
|
|
10
8
|
const resolveList = ({
|
|
11
9
|
model
|
|
12
|
-
}) => async (_, args, {
|
|
13
|
-
cms
|
|
14
|
-
}) => {
|
|
10
|
+
}) => async (_, args, context) => {
|
|
15
11
|
try {
|
|
16
|
-
const response = await cms.listLatestEntries(model, args);
|
|
12
|
+
const response = await context.cms.listLatestEntries(model, args);
|
|
17
13
|
return new _responses.ListResponse(...response);
|
|
18
14
|
} catch (e) {
|
|
19
15
|
return new _responses.ListErrorResponse(e);
|
|
20
16
|
}
|
|
21
17
|
};
|
|
22
|
-
|
|
23
18
|
exports.resolveList = resolveList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveList","model","_","args","context","response","cms","listLatestEntries","ListResponse","e","ListErrorResponse"],"sources":["resolveList.ts"],"sourcesContent":["import { ListResponse, ListErrorResponse } from \"@webiny/handler-graphql/responses\";\nimport {\n CmsEntryMeta,\n CmsEntryResolverFactory as ResolverFactory,\n CmsEntry,\n CmsEntryListParams\n} from \"~/types\";\n\ntype ResolveList = ResolverFactory<any, CmsEntryListParams>;\n\nexport const resolveList: ResolveList =\n ({ model }) =>\n async (_: any, args: any, context) => {\n try {\n const response: [CmsEntry[], CmsEntryMeta] = await context.cms.listLatestEntries(\n model,\n args\n );\n\n return new ListResponse(...response);\n } catch (e) {\n return new ListErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;AAAA;AAUO,MAAMA,WAAwB,GACjC,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAM,EAAEC,IAAS,EAAEC,OAAO,KAAK;EAClC,IAAI;IACA,MAAMC,QAAoC,GAAG,MAAMD,OAAO,CAACE,GAAG,CAACC,iBAAiB,CAC5EN,KAAK,EACLE,IAAI,CACP;IAED,OAAO,IAAIK,uBAAY,CAAC,GAAGH,QAAQ,CAAC;EACxC,CAAC,CAAC,OAAOI,CAAC,EAAE;IACR,OAAO,IAAIC,4BAAiB,CAACD,CAAC,CAAC;EACnC;AACJ,CAAC;AAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.resolveGet = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _responses = require("@webiny/handler-graphql/responses");
|
|
10
|
+
var _handlerGraphql = require("@webiny/handler-graphql");
|
|
11
|
+
const resolveGet = ({
|
|
12
|
+
model
|
|
13
|
+
}) => async (_, args, context) => {
|
|
14
|
+
try {
|
|
15
|
+
const [[entry]] = await context.cms.listPublishedEntries(model, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, args), {}, {
|
|
16
|
+
limit: 1
|
|
17
|
+
}));
|
|
18
|
+
if (!entry) {
|
|
19
|
+
throw new _handlerGraphql.NotFoundError(`Entry not found!`);
|
|
20
|
+
}
|
|
21
|
+
return new _responses.Response(entry);
|
|
22
|
+
} catch (e) {
|
|
23
|
+
return new _responses.ErrorResponse(e);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.resolveGet = resolveGet;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveGet","model","_","args","context","entry","cms","listPublishedEntries","limit","NotFoundError","Response","e","ErrorResponse"],"sources":["resolveGet.ts"],"sourcesContent":["import { ErrorResponse, Response } from \"@webiny/handler-graphql/responses\";\nimport { CmsEntryListParams, CmsEntryResolverFactory as ResolverFactory } from \"~/types\";\nimport { NotFoundError } from \"@webiny/handler-graphql\";\n\ntype ResolveGet = ResolverFactory<any, CmsEntryListParams>;\n\nexport const resolveGet: ResolveGet =\n ({ model }) =>\n async (_: any, args: any, context) => {\n try {\n const [[entry]] = await context.cms.listPublishedEntries(model, {\n ...args,\n limit: 1\n });\n if (!entry) {\n throw new NotFoundError(`Entry not found!`);\n }\n return new Response(entry);\n } catch (e) {\n return new ErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;;;AAAA;AAEA;AAIO,MAAMA,UAAsB,GAC/B,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAM,EAAEC,IAAS,EAAEC,OAAO,KAAK;EAClC,IAAI;IACA,MAAM,CAAC,CAACC,KAAK,CAAC,CAAC,GAAG,MAAMD,OAAO,CAACE,GAAG,CAACC,oBAAoB,CAACN,KAAK,8DACvDE,IAAI;MACPK,KAAK,EAAE;IAAC,GACV;IACF,IAAI,CAACH,KAAK,EAAE;MACR,MAAM,IAAII,6BAAa,CAAE,kBAAiB,CAAC;IAC/C;IACA,OAAO,IAAIC,mBAAQ,CAACL,KAAK,CAAC;EAC9B,CAAC,CAAC,OAAOM,CAAC,EAAE;IACR,OAAO,IAAIC,wBAAa,CAACD,CAAC,CAAC;EAC/B;AACJ,CAAC;AAAC"}
|
|
@@ -4,20 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolveList = void 0;
|
|
7
|
-
|
|
8
7
|
var _responses = require("@webiny/handler-graphql/responses");
|
|
9
|
-
|
|
10
8
|
const resolveList = ({
|
|
11
9
|
model
|
|
12
|
-
}) => async (_, args, {
|
|
13
|
-
cms
|
|
14
|
-
}) => {
|
|
10
|
+
}) => async (_, args, context) => {
|
|
15
11
|
try {
|
|
16
|
-
const response = await cms.listPublishedEntries(model, args);
|
|
12
|
+
const response = await context.cms.listPublishedEntries(model, args);
|
|
17
13
|
return new _responses.ListResponse(...response);
|
|
18
14
|
} catch (e) {
|
|
19
15
|
return new _responses.ListErrorResponse(e);
|
|
20
16
|
}
|
|
21
17
|
};
|
|
22
|
-
|
|
23
18
|
exports.resolveList = resolveList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveList","model","_","args","context","response","cms","listPublishedEntries","ListResponse","e","ListErrorResponse"],"sources":["resolveList.ts"],"sourcesContent":["import { ListResponse, ListErrorResponse } from \"@webiny/handler-graphql/responses\";\nimport {\n CmsEntryMeta,\n CmsEntryResolverFactory as ResolverFactory,\n CmsEntry,\n CmsEntryListParams\n} from \"~/types\";\n\ntype ResolveList = ResolverFactory<any, CmsEntryListParams>;\n\nexport const resolveList: ResolveList =\n ({ model }) =>\n async (_: any, args: CmsEntryListParams, context) => {\n try {\n const response: [CmsEntry[], CmsEntryMeta] = await context.cms.listPublishedEntries(\n model,\n args\n );\n\n return new ListResponse(...response);\n } catch (e) {\n return new ListErrorResponse(e);\n }\n };\n"],"mappings":";;;;;;AAAA;AAUO,MAAMA,WAAwB,GACjC,CAAC;EAAEC;AAAM,CAAC,KACV,OAAOC,CAAM,EAAEC,IAAwB,EAAEC,OAAO,KAAK;EACjD,IAAI;IACA,MAAMC,QAAoC,GAAG,MAAMD,OAAO,CAACE,GAAG,CAACC,oBAAoB,CAC/EN,KAAK,EACLE,IAAI,CACP;IAED,OAAO,IAAIK,uBAAY,CAAC,GAAGH,QAAQ,CAAC;EACxC,CAAC,CAAC,OAAOI,CAAC,EAAE;IACR,OAAO,IAAIC,4BAAiB,CAACD,CAAC,CAAC;EACnC;AACJ,CAAC;AAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CmsContext, CmsModel } from "../../types";
|
|
2
|
+
import { CmsGraphQLSchemaPlugin } from "../../plugins";
|
|
3
|
+
interface GenerateSchemaPluginsParams {
|
|
4
|
+
context: CmsContext;
|
|
5
|
+
models: CmsModel[];
|
|
6
|
+
}
|
|
7
|
+
export declare const generateSchemaPlugins: (params: GenerateSchemaPluginsParams) => Promise<CmsGraphQLSchemaPlugin[]>;
|
|
8
|
+
export {};
|