@webiny/api-headless-cms 6.6.0-alpha.0 → 6.6.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HeadlessCmsFeature.js +17 -38
- package/HeadlessCmsFeature.js.map +1 -1
- package/createCmsRoute.d.ts +13 -10
- package/createCmsRoute.js +40 -18
- package/createCmsRoute.js.map +1 -1
- package/crud/contentEntry/entryDataValidation.js +44 -11
- package/crud/contentEntry/entryDataValidation.js.map +1 -1
- package/crud/contentModel/defaultFields.js +3 -2
- package/crud/contentModel/defaultFields.js.map +1 -1
- package/crud/contentModel/validate/endingAllowed.js +1 -1
- package/crud/contentModel/validate/endingAllowed.js.map +1 -1
- package/crud/contentModel/validate/pluralApiName.js +1 -1
- package/crud/contentModel/validate/pluralApiName.js.map +1 -1
- package/crud/contentModel/validate/singularApiName.js +1 -1
- package/crud/contentModel/validate/singularApiName.js.map +1 -1
- package/crud/contentModel/validation.js +2 -2
- package/crud/contentModel/validation.js.map +1 -1
- package/domain/contentModel/schemas.d.ts +10 -6
- package/domain/contentModel/schemas.js +6 -3
- package/domain/contentModel/schemas.js.map +1 -1
- package/domain/contentModel/validation/dateExpressions.d.ts +6 -0
- package/domain/contentModel/validation/dateExpressions.js +27 -0
- package/domain/contentModel/validation/dateExpressions.js.map +1 -0
- package/domain/contentModel/validation/endingAllowed.js +1 -1
- package/domain/contentModel/validation/endingAllowed.js.map +1 -1
- package/domain/contentModel/validation/modelFields.js +4 -2
- package/domain/contentModel/validation/modelFields.js.map +1 -1
- package/domain/contentModel/validation/pluralApiName.js +1 -1
- package/domain/contentModel/validation/pluralApiName.js.map +1 -1
- package/domain/contentModel/validation/singularApiName.js +1 -1
- package/domain/contentModel/validation/singularApiName.js.map +1 -1
- package/export/crud/exporting.js +2 -2
- package/export/crud/exporting.js.map +1 -1
- package/export/crud/imports/importGroups.js +1 -2
- package/export/crud/imports/importGroups.js.map +1 -1
- package/export/crud/imports/validateModels.js +1 -1
- package/export/crud/imports/validateModels.js.map +1 -1
- package/exports/api/cms/entry.d.ts +5 -0
- package/exports/api/cms/entry.js +5 -0
- package/exports/api/cms/model.d.ts +4 -1
- package/exports/api/cms/model.js +2 -0
- package/features/ai/DescribeContentModelTool.d.ts +60 -0
- package/features/ai/DescribeContentModelTool.js +69 -0
- package/features/ai/DescribeContentModelTool.js.map +1 -0
- package/features/ai/ListContentModelsTool.d.ts +46 -0
- package/features/ai/ListContentModelsTool.js +53 -0
- package/features/ai/ListContentModelsTool.js.map +1 -0
- package/features/ai/QueryEntriesTool.d.ts +80 -0
- package/features/ai/QueryEntriesTool.js +99 -0
- package/features/ai/QueryEntriesTool.js.map +1 -0
- package/features/ai/feature.d.ts +8 -0
- package/features/ai/feature.js +15 -0
- package/features/ai/feature.js.map +1 -0
- package/features/ai/index.d.ts +4 -0
- package/features/ai/index.js +4 -0
- package/features/contentEntry/ContentEntriesFeature.js +8 -0
- package/features/contentEntry/ContentEntriesFeature.js.map +1 -1
- package/features/contentEntry/CreateEntry/CreateEntryRepository.d.ts +4 -2
- package/features/contentEntry/CreateEntry/CreateEntryRepository.js +8 -3
- package/features/contentEntry/CreateEntry/CreateEntryRepository.js.map +1 -1
- package/features/contentEntry/CreateEntry/CreateEntryUseCase.d.ts +2 -2
- package/features/contentEntry/CreateEntry/CreateEntryUseCase.js +3 -4
- package/features/contentEntry/CreateEntry/CreateEntryUseCase.js.map +1 -1
- package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromRepository.d.ts +4 -2
- package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromRepository.js +8 -3
- package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromRepository.js.map +1 -1
- package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromUseCase.d.ts +2 -4
- package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromUseCase.js +6 -14
- package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromUseCase.js.map +1 -1
- package/features/contentEntry/CreateEntryRevisionFrom/abstractions.d.ts +2 -0
- package/features/contentEntry/CreateEntryRevisionFrom/abstractions.js.map +1 -1
- package/features/contentEntry/DeleteEntry/DeleteEntryRepository.d.ts +4 -2
- package/features/contentEntry/DeleteEntry/DeleteEntryRepository.js +8 -3
- package/features/contentEntry/DeleteEntry/DeleteEntryRepository.js.map +1 -1
- package/features/contentEntry/DeleteEntry/DeleteEntryUseCase.d.ts +2 -2
- package/features/contentEntry/DeleteEntry/DeleteEntryUseCase.js +2 -2
- package/features/contentEntry/DeleteEntry/DeleteEntryUseCase.js.map +1 -1
- package/features/contentEntry/DeleteEntry/MoveEntryToBinRepository.d.ts +3 -1
- package/features/contentEntry/DeleteEntry/MoveEntryToBinRepository.js +7 -3
- package/features/contentEntry/DeleteEntry/MoveEntryToBinRepository.js.map +1 -1
- package/features/contentEntry/DeleteEntry/MoveEntryToBinUseCase.d.ts +2 -2
- package/features/contentEntry/DeleteEntry/MoveEntryToBinUseCase.js +2 -2
- package/features/contentEntry/DeleteEntry/MoveEntryToBinUseCase.js.map +1 -1
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionRepository.d.ts +3 -1
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionRepository.js +9 -3
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionRepository.js.map +1 -1
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionUseCase.d.ts +2 -2
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionUseCase.js +2 -2
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionUseCase.js.map +1 -1
- package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesRepository.d.ts +4 -2
- package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesRepository.js +7 -3
- package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesRepository.js.map +1 -1
- package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesUseCase.d.ts +2 -2
- package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesUseCase.js +11 -10
- package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesUseCase.js.map +1 -1
- package/features/contentEntry/DuplicateEntry/DuplicateEntryUseCase.d.ts +17 -0
- package/features/contentEntry/DuplicateEntry/DuplicateEntryUseCase.js +83 -0
- package/features/contentEntry/DuplicateEntry/DuplicateEntryUseCase.js.map +1 -0
- package/features/contentEntry/DuplicateEntry/abstractions.d.ts +47 -0
- package/features/contentEntry/DuplicateEntry/abstractions.js +5 -0
- package/features/contentEntry/DuplicateEntry/abstractions.js.map +1 -0
- package/features/contentEntry/DuplicateEntry/events.d.ts +41 -0
- package/features/contentEntry/DuplicateEntry/events.js +32 -0
- package/features/contentEntry/DuplicateEntry/events.js.map +1 -0
- package/features/contentEntry/DuplicateEntry/feature.d.ts +4 -0
- package/features/contentEntry/DuplicateEntry/feature.js +11 -0
- package/features/contentEntry/DuplicateEntry/feature.js.map +1 -0
- package/features/contentEntry/DuplicateEntry/index.d.ts +2 -0
- package/features/contentEntry/DuplicateEntry/index.js +2 -0
- package/features/contentEntry/DuplicateEntry/prepareDuplicateValues.d.ts +7 -0
- package/features/contentEntry/DuplicateEntry/prepareDuplicateValues.js +12 -0
- package/features/contentEntry/DuplicateEntry/prepareDuplicateValues.js.map +1 -0
- package/features/contentEntry/EntryEventPublisher/EntryEventPublisher.d.ts +10 -0
- package/features/contentEntry/EntryEventPublisher/EntryEventPublisher.js +25 -0
- package/features/contentEntry/EntryEventPublisher/EntryEventPublisher.js.map +1 -0
- package/features/contentEntry/EntryEventPublisher/abstractions.d.ts +16 -0
- package/features/contentEntry/EntryEventPublisher/abstractions.js +5 -0
- package/features/contentEntry/EntryEventPublisher/abstractions.js.map +1 -0
- package/features/contentEntry/EntryEventPublisher/feature.d.ts +4 -0
- package/features/contentEntry/EntryEventPublisher/feature.js +11 -0
- package/features/contentEntry/EntryEventPublisher/feature.js.map +1 -0
- package/features/contentEntry/EntryEventPublisher/index.d.ts +2 -0
- package/features/contentEntry/EntryEventPublisher/index.js +2 -0
- package/features/contentEntry/EntrySystemField/abstractions.d.ts +14 -0
- package/features/contentEntry/EntrySystemField/abstractions.js +5 -0
- package/features/contentEntry/EntrySystemField/abstractions.js.map +1 -0
- package/features/contentEntry/EntrySystemField/index.d.ts +1 -0
- package/features/contentEntry/EntrySystemField/index.js +1 -0
- package/features/contentEntry/GetEntriesByIds/GetEntriesByIdsRepository.d.ts +4 -4
- package/features/contentEntry/GetEntriesByIds/GetEntriesByIdsRepository.js +8 -11
- package/features/contentEntry/GetEntriesByIds/GetEntriesByIdsRepository.js.map +1 -1
- package/features/contentEntry/GetLatestEntriesByIds/GetLatestEntriesByIdsRepository.d.ts +4 -2
- package/features/contentEntry/GetLatestEntriesByIds/GetLatestEntriesByIdsRepository.js +7 -3
- package/features/contentEntry/GetLatestEntriesByIds/GetLatestEntriesByIdsRepository.js.map +1 -1
- package/features/contentEntry/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdRepository.d.ts +4 -2
- package/features/contentEntry/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdRepository.js +7 -3
- package/features/contentEntry/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdRepository.js.map +1 -1
- package/features/contentEntry/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdRepository.d.ts +4 -2
- package/features/contentEntry/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdRepository.js +7 -3
- package/features/contentEntry/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdRepository.js.map +1 -1
- package/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsRepository.d.ts +4 -2
- package/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsRepository.js +7 -3
- package/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsRepository.js.map +1 -1
- package/features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdRepository.d.ts +4 -2
- package/features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdRepository.js +7 -3
- package/features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdRepository.js.map +1 -1
- package/features/contentEntry/GetRevisionById/GetRevisionByIdRepository.d.ts +4 -2
- package/features/contentEntry/GetRevisionById/GetRevisionByIdRepository.js +7 -3
- package/features/contentEntry/GetRevisionById/GetRevisionByIdRepository.js.map +1 -1
- package/features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdRepository.d.ts +4 -2
- package/features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdRepository.js +7 -3
- package/features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdRepository.js.map +1 -1
- package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesRepository.d.ts +4 -2
- package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesRepository.js +7 -3
- package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesRepository.js.map +1 -1
- package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesUseCase.js +3 -0
- package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesUseCase.js.map +1 -1
- package/features/contentEntry/ListEntries/ListEntriesRepository.d.ts +4 -2
- package/features/contentEntry/ListEntries/ListEntriesRepository.js +7 -3
- package/features/contentEntry/ListEntries/ListEntriesRepository.js.map +1 -1
- package/features/contentEntry/MoveEntry/MoveEntryRepository.d.ts +4 -2
- package/features/contentEntry/MoveEntry/MoveEntryRepository.js +7 -3
- package/features/contentEntry/MoveEntry/MoveEntryRepository.js.map +1 -1
- package/features/contentEntry/MoveEntry/MoveEntryUseCase.d.ts +2 -2
- package/features/contentEntry/MoveEntry/MoveEntryUseCase.js +11 -4
- package/features/contentEntry/MoveEntry/MoveEntryUseCase.js.map +1 -1
- package/features/contentEntry/PublishEntry/PublishEntryRepository.d.ts +4 -2
- package/features/contentEntry/PublishEntry/PublishEntryRepository.js +8 -3
- package/features/contentEntry/PublishEntry/PublishEntryRepository.js.map +1 -1
- package/features/contentEntry/PublishEntry/PublishEntryUseCase.d.ts +4 -6
- package/features/contentEntry/PublishEntry/PublishEntryUseCase.js +11 -13
- package/features/contentEntry/PublishEntry/PublishEntryUseCase.js.map +1 -1
- package/features/contentEntry/PublishEntry/abstractions.d.ts +8 -1
- package/features/contentEntry/PublishEntry/abstractions.js.map +1 -1
- package/features/contentEntry/RepublishEntry/RepublishEntryRepository.d.ts +4 -2
- package/features/contentEntry/RepublishEntry/RepublishEntryRepository.js +8 -3
- package/features/contentEntry/RepublishEntry/RepublishEntryRepository.js.map +1 -1
- package/features/contentEntry/RepublishEntry/RepublishEntryUseCase.d.ts +2 -2
- package/features/contentEntry/RepublishEntry/RepublishEntryUseCase.js +5 -3
- package/features/contentEntry/RepublishEntry/RepublishEntryUseCase.js.map +1 -1
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinRepository.d.ts +4 -2
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinRepository.js +8 -3
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinRepository.js.map +1 -1
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinUseCase.d.ts +2 -2
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinUseCase.js +2 -2
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinUseCase.js.map +1 -1
- package/features/contentEntry/UnpublishEntry/UnpublishEntryRepository.d.ts +4 -2
- package/features/contentEntry/UnpublishEntry/UnpublishEntryRepository.js +8 -3
- package/features/contentEntry/UnpublishEntry/UnpublishEntryRepository.js.map +1 -1
- package/features/contentEntry/UnpublishEntry/UnpublishEntryUseCase.d.ts +2 -2
- package/features/contentEntry/UnpublishEntry/UnpublishEntryUseCase.js +5 -3
- package/features/contentEntry/UnpublishEntry/UnpublishEntryUseCase.js.map +1 -1
- package/features/contentEntry/UpdateEntry/UpdateEntryRepository.d.ts +4 -2
- package/features/contentEntry/UpdateEntry/UpdateEntryRepository.js +8 -3
- package/features/contentEntry/UpdateEntry/UpdateEntryRepository.js.map +1 -1
- package/features/contentEntry/UpdateEntry/UpdateEntryUseCase.d.ts +2 -2
- package/features/contentEntry/UpdateEntry/UpdateEntryUseCase.js +5 -3
- package/features/contentEntry/UpdateEntry/UpdateEntryUseCase.js.map +1 -1
- package/features/contentEntry/UpdateEntrySystem/UpdateEntrySystemUseCase.d.ts +19 -0
- package/features/contentEntry/UpdateEntrySystem/UpdateEntrySystemUseCase.js +70 -0
- package/features/contentEntry/UpdateEntrySystem/UpdateEntrySystemUseCase.js.map +1 -0
- package/features/contentEntry/UpdateEntrySystem/abstractions.d.ts +24 -0
- package/features/contentEntry/UpdateEntrySystem/abstractions.js +5 -0
- package/features/contentEntry/UpdateEntrySystem/abstractions.js.map +1 -0
- package/features/contentEntry/UpdateEntrySystem/events.d.ts +29 -0
- package/features/contentEntry/UpdateEntrySystem/events.js +23 -0
- package/features/contentEntry/UpdateEntrySystem/events.js.map +1 -0
- package/features/contentEntry/UpdateEntrySystem/feature.d.ts +4 -0
- package/features/contentEntry/UpdateEntrySystem/feature.js +11 -0
- package/features/contentEntry/UpdateEntrySystem/feature.js.map +1 -0
- package/features/contentEntry/UpdateEntrySystem/index.d.ts +2 -0
- package/features/contentEntry/UpdateEntrySystem/index.js +2 -0
- package/features/contentEntry/UpdateRevisionDescription/UpdateRevisionDescriptionUseCase.d.ts +2 -2
- package/features/contentEntry/UpdateRevisionDescription/UpdateRevisionDescriptionUseCase.js +2 -2
- package/features/contentEntry/UpdateRevisionDescription/UpdateRevisionDescriptionUseCase.js.map +1 -1
- package/features/contentEntry/ensureItemIds.d.ts +13 -0
- package/features/contentEntry/ensureItemIds.js +22 -0
- package/features/contentEntry/ensureItemIds.js.map +1 -0
- package/features/contentEntry/entryDataFactories/CreateEntryDataFactory/CreateEntryDataFactory.d.ts +3 -1
- package/features/contentEntry/entryDataFactories/CreateEntryDataFactory/CreateEntryDataFactory.js +8 -2
- package/features/contentEntry/entryDataFactories/CreateEntryDataFactory/CreateEntryDataFactory.js.map +1 -1
- package/features/contentEntry/entryDataFactories/CreateEntryRevisionFromDataFactory/CreateEntryRevisionFromDataFactory.d.ts +7 -3
- package/features/contentEntry/entryDataFactories/CreateEntryRevisionFromDataFactory/CreateEntryRevisionFromDataFactory.js +46 -13
- package/features/contentEntry/entryDataFactories/CreateEntryRevisionFromDataFactory/CreateEntryRevisionFromDataFactory.js.map +1 -1
- package/features/contentEntry/entryDataFactories/CreateEntryRevisionFromDataFactory/abstractions.d.ts +17 -1
- package/features/contentEntry/entryDataFactories/CreateEntryRevisionFromDataFactory/abstractions.js.map +1 -1
- package/features/contentEntry/entryDataFactories/CreatePublishEntryDataFactory/CreatePublishEntryDataFactory.d.ts +5 -3
- package/features/contentEntry/entryDataFactories/CreatePublishEntryDataFactory/CreatePublishEntryDataFactory.js +22 -15
- package/features/contentEntry/entryDataFactories/CreatePublishEntryDataFactory/CreatePublishEntryDataFactory.js.map +1 -1
- package/features/contentEntry/entryDataFactories/CreatePublishEntryDataFactory/abstractions.d.ts +15 -1
- package/features/contentEntry/entryDataFactories/CreatePublishEntryDataFactory/abstractions.js.map +1 -1
- package/features/contentEntry/entryDataFactories/CreateRepublishEntryDataFactory/CreateRepublishEntryDataFactory.d.ts +5 -3
- package/features/contentEntry/entryDataFactories/CreateRepublishEntryDataFactory/CreateRepublishEntryDataFactory.js +17 -12
- package/features/contentEntry/entryDataFactories/CreateRepublishEntryDataFactory/CreateRepublishEntryDataFactory.js.map +1 -1
- package/features/contentEntry/entryDataFactories/CreateRepublishEntryDataFactory/abstractions.d.ts +13 -1
- package/features/contentEntry/entryDataFactories/CreateRepublishEntryDataFactory/abstractions.js.map +1 -1
- package/features/contentEntry/entryDataFactories/CreateUnpublishEntryDataFactory/CreateUnpublishEntryDataFactory.d.ts +6 -6
- package/features/contentEntry/entryDataFactories/CreateUnpublishEntryDataFactory/CreateUnpublishEntryDataFactory.js +17 -17
- package/features/contentEntry/entryDataFactories/CreateUnpublishEntryDataFactory/CreateUnpublishEntryDataFactory.js.map +1 -1
- package/features/contentEntry/entryDataFactories/CreateUnpublishEntryDataFactory/abstractions.d.ts +14 -2
- package/features/contentEntry/entryDataFactories/CreateUnpublishEntryDataFactory/abstractions.js.map +1 -1
- package/features/contentEntry/entryDataFactories/UpdateEntryDataFactory/UpdateEntryDataFactory.d.ts +7 -3
- package/features/contentEntry/entryDataFactories/UpdateEntryDataFactory/UpdateEntryDataFactory.js +72 -28
- package/features/contentEntry/entryDataFactories/UpdateEntryDataFactory/UpdateEntryDataFactory.js.map +1 -1
- package/features/contentEntry/entryDataFactories/UpdateEntryDataFactory/abstractions.d.ts +15 -1
- package/features/contentEntry/entryDataFactories/UpdateEntryDataFactory/abstractions.js.map +1 -1
- package/features/contentEntry/entryDataFactories/expiresAt.js +2 -2
- package/features/contentEntry/entryDataFactories/expiresAt.js.map +1 -1
- package/features/contentEntry/entryDataFactories/hasEntryContentChanged.d.ts +24 -0
- package/features/contentEntry/entryDataFactories/hasEntryContentChanged.js +13 -0
- package/features/contentEntry/entryDataFactories/hasEntryContentChanged.js.map +1 -0
- package/features/contentModel/ComponentMapGenerator/ComponentMapGenerator.d.ts +14 -0
- package/features/contentModel/ComponentMapGenerator/ComponentMapGenerator.js +32 -0
- package/features/contentModel/ComponentMapGenerator/ComponentMapGenerator.js.map +1 -0
- package/features/contentModel/ComponentMapGenerator/abstractions.d.ts +8 -0
- package/features/contentModel/ComponentMapGenerator/abstractions.js +5 -0
- package/features/contentModel/ComponentMapGenerator/abstractions.js.map +1 -0
- package/features/contentModel/ComponentMapGenerator/feature.d.ts +4 -0
- package/features/contentModel/ComponentMapGenerator/feature.js +11 -0
- package/features/contentModel/ComponentMapGenerator/feature.js.map +1 -0
- package/features/contentModel/ComponentMapGenerator/index.d.ts +2 -0
- package/features/contentModel/ComponentMapGenerator/index.js +2 -0
- package/features/contentModel/ContentModelFeature.js +4 -0
- package/features/contentModel/ContentModelFeature.js.map +1 -1
- package/features/contentModel/CreateModel/CreateModelRepository.js +1 -2
- package/features/contentModel/CreateModel/CreateModelRepository.js.map +1 -1
- package/features/contentModel/CreateModelFrom/CreateModelFromRepository.js +1 -2
- package/features/contentModel/CreateModelFrom/CreateModelFromRepository.js.map +1 -1
- package/features/contentModel/DeleteModel/DeleteModelRepository.d.ts +4 -2
- package/features/contentModel/DeleteModel/DeleteModelRepository.js +7 -3
- package/features/contentModel/DeleteModel/DeleteModelRepository.js.map +1 -1
- package/features/contentModel/DeleteModel/DeleteModelWithEntryCleanup.d.ts +9 -4
- package/features/contentModel/DeleteModel/DeleteModelWithEntryCleanup.js +36 -21
- package/features/contentModel/DeleteModel/DeleteModelWithEntryCleanup.js.map +1 -1
- package/features/contentModel/ModelToAstConverter/ModelToAstConverter.d.ts +1 -1
- package/features/contentModel/ModelToAstConverter/ModelToAstConverter.js.map +1 -1
- package/features/contentModel/ModelToAstConverter/abstractions.d.ts +1 -1
- package/features/contentModel/ModelToAstConverter/abstractions.js.map +1 -1
- package/features/contentModel/RefModelsGenerator/RefModelsGenerator.d.ts +19 -0
- package/features/contentModel/RefModelsGenerator/RefModelsGenerator.js +56 -0
- package/features/contentModel/RefModelsGenerator/RefModelsGenerator.js.map +1 -0
- package/features/contentModel/RefModelsGenerator/abstractions.d.ts +11 -0
- package/features/contentModel/RefModelsGenerator/abstractions.js +5 -0
- package/features/contentModel/RefModelsGenerator/abstractions.js.map +1 -0
- package/features/contentModel/RefModelsGenerator/feature.d.ts +4 -0
- package/features/contentModel/RefModelsGenerator/feature.js +11 -0
- package/features/contentModel/RefModelsGenerator/feature.js.map +1 -0
- package/features/contentModel/RefModelsGenerator/index.d.ts +2 -0
- package/features/contentModel/RefModelsGenerator/index.js +2 -0
- package/features/contentModel/UpdateModel/UpdateModelRepository.d.ts +4 -2
- package/features/contentModel/UpdateModel/UpdateModelRepository.js +8 -4
- package/features/contentModel/UpdateModel/UpdateModelRepository.js.map +1 -1
- package/features/contentModel/UpdateModel/UpdateModelUseCase.js +2 -2
- package/features/contentModel/UpdateModel/UpdateModelUseCase.js.map +1 -1
- package/features/contentModel/UpdateModel/abstractions.d.ts +1 -1
- package/features/contentModel/UpdateModel/abstractions.js.map +1 -1
- package/features/contentModel/ValuesSelectionGenerator/ValuesSelectionGenerator.js +5 -2
- package/features/contentModel/ValuesSelectionGenerator/ValuesSelectionGenerator.js.map +1 -1
- package/features/contentModel/shared/ModelsFetcher.d.ts +6 -5
- package/features/contentModel/shared/ModelsFetcher.js.map +1 -1
- package/features/contentModel/shared/PluginModelsProvider.d.ts +6 -3
- package/features/contentModel/shared/PluginModelsProvider.js +2 -9
- package/features/contentModel/shared/PluginModelsProvider.js.map +1 -1
- package/features/contentModelGroup/CreateGroup/CreateGroupRepository.d.ts +3 -1
- package/features/contentModelGroup/CreateGroup/CreateGroupRepository.js +6 -4
- package/features/contentModelGroup/CreateGroup/CreateGroupRepository.js.map +1 -1
- package/features/contentModelGroup/DeleteGroup/DeleteGroupRepository.d.ts +4 -2
- package/features/contentModelGroup/DeleteGroup/DeleteGroupRepository.js +7 -3
- package/features/contentModelGroup/DeleteGroup/DeleteGroupRepository.js.map +1 -1
- package/features/contentModelGroup/UpdateGroup/UpdateGroupRepository.d.ts +4 -2
- package/features/contentModelGroup/UpdateGroup/UpdateGroupRepository.js +8 -4
- package/features/contentModelGroup/UpdateGroup/UpdateGroupRepository.js.map +1 -1
- package/features/contentModelGroup/UpdateGroup/UpdateGroupUseCase.js +2 -2
- package/features/contentModelGroup/UpdateGroup/UpdateGroupUseCase.js.map +1 -1
- package/features/contentModelGroup/UpdateGroup/abstractions.d.ts +1 -1
- package/features/contentModelGroup/UpdateGroup/abstractions.js.map +1 -1
- package/features/graphql/feature.js +2 -0
- package/features/graphql/feature.js.map +1 -1
- package/features/graphql/fields/base/AssetToGraphQL.d.ts +26 -0
- package/features/graphql/fields/base/AssetToGraphQL.js +153 -0
- package/features/graphql/fields/base/AssetToGraphQL.js.map +1 -0
- package/features/graphql/fields/base/DynamicZoneToGraphQL.js +12 -2
- package/features/graphql/fields/base/DynamicZoneToGraphQL.js.map +1 -1
- package/features/graphql/fields/base/ObjectToGraphQL.js +8 -5
- package/features/graphql/fields/base/ObjectToGraphQL.js.map +1 -1
- package/features/graphql/fields/base/RefToGraphQL.js +24 -10
- package/features/graphql/fields/base/RefToGraphQL.js.map +1 -1
- package/features/modelBuilder/abstractions.d.ts +13 -0
- package/features/modelBuilder/abstractions.js.map +1 -1
- package/features/modelBuilder/feature.js +3 -8
- package/features/modelBuilder/feature.js.map +1 -1
- package/features/modelBuilder/fields/AssetFieldType.d.ts +20 -0
- package/features/modelBuilder/fields/AssetFieldType.js +46 -0
- package/features/modelBuilder/fields/AssetFieldType.js.map +1 -0
- package/features/modelBuilder/fields/BaseFieldBuilder.d.ts +3 -1
- package/features/modelBuilder/fields/BaseFieldBuilder.js +4 -0
- package/features/modelBuilder/fields/BaseFieldBuilder.js.map +1 -1
- package/features/modelBuilder/fields/DataFieldBuilder.d.ts +59 -0
- package/features/modelBuilder/fields/DataFieldBuilder.js +11 -1
- package/features/modelBuilder/fields/DataFieldBuilder.js.map +1 -1
- package/features/modelBuilder/fields/DateTimeFieldType.js +27 -12
- package/features/modelBuilder/fields/DateTimeFieldType.js.map +1 -1
- package/features/modelBuilder/fields/DynamicZoneFieldType.d.ts +1 -0
- package/features/modelBuilder/fields/DynamicZoneFieldType.js +10 -9
- package/features/modelBuilder/fields/DynamicZoneFieldType.js.map +1 -1
- package/features/modelBuilder/fields/UiAlertFieldType.js +2 -1
- package/features/modelBuilder/fields/UiAlertFieldType.js.map +1 -1
- package/features/modelBuilder/fields/UiSeparatorFieldType.js +2 -1
- package/features/modelBuilder/fields/UiSeparatorFieldType.js.map +1 -1
- package/features/modelBuilder/fields/UiTabsFieldType.d.ts +2 -1
- package/features/modelBuilder/fields/UiTabsFieldType.js +6 -3
- package/features/modelBuilder/fields/UiTabsFieldType.js.map +1 -1
- package/features/modelBuilder/fields/fieldTypeValidator.d.ts +5 -3
- package/features/modelBuilder/fields/resolveAssetUrl.d.ts +35 -0
- package/features/modelBuilder/fields/resolveAssetUrl.js +26 -0
- package/features/modelBuilder/fields/resolveAssetUrl.js.map +1 -0
- package/features/modelBuilder/index.d.ts +1 -1
- package/features/modelBuilder/models/BaseModelBuilder.d.ts +3 -1
- package/features/modelBuilder/models/BaseModelBuilder.js +7 -0
- package/features/modelBuilder/models/BaseModelBuilder.js.map +1 -1
- package/features/modelBuilder/models/ModelBuilder.d.ts +8 -0
- package/features/modelBuilder/models/ModelBuilder.js +1 -0
- package/features/modelBuilder/models/ModelBuilder.js.map +1 -1
- package/features/modelBuilder/models/ModelsProvider.d.ts +1 -3
- package/features/modelBuilder/models/ModelsProvider.js +2 -7
- package/features/modelBuilder/models/ModelsProvider.js.map +1 -1
- package/features/modelBuilder/models/PrivateModelBuilder.d.ts +5 -0
- package/features/modelBuilder/models/PrivateModelBuilder.js +13 -1
- package/features/modelBuilder/models/PrivateModelBuilder.js.map +1 -1
- package/features/modelBuilder/models/PublicModelBuilder.js +2 -1
- package/features/modelBuilder/models/PublicModelBuilder.js.map +1 -1
- package/features/modelStorageSync/ModelStorageSyncTask.d.ts +31 -0
- package/features/modelStorageSync/ModelStorageSyncTask.js +66 -0
- package/features/modelStorageSync/ModelStorageSyncTask.js.map +1 -0
- package/features/modelStorageSync/SyncStorageOnModelUpdate.d.ts +23 -0
- package/features/modelStorageSync/SyncStorageOnModelUpdate.js +51 -0
- package/features/modelStorageSync/SyncStorageOnModelUpdate.js.map +1 -0
- package/features/modelStorageSync/abstractions.d.ts +34 -0
- package/features/modelStorageSync/abstractions.js +6 -0
- package/features/modelStorageSync/abstractions.js.map +1 -0
- package/features/modelStorageSync/feature.d.ts +8 -0
- package/features/modelStorageSync/feature.js +13 -0
- package/features/modelStorageSync/feature.js.map +1 -0
- package/features/modelStorageSync/index.d.ts +2 -0
- package/features/modelStorageSync/index.js +2 -0
- package/features/runtimeTenant/RuntimeTenant.d.ts +13 -0
- package/features/runtimeTenant/RuntimeTenant.js +22 -0
- package/features/runtimeTenant/RuntimeTenant.js.map +1 -0
- package/features/runtimeTenant/abstractions.d.ts +11 -0
- package/features/runtimeTenant/abstractions.js +5 -0
- package/features/runtimeTenant/abstractions.js.map +1 -0
- package/features/runtimeTenant/index.d.ts +2 -0
- package/features/runtimeTenant/index.js +2 -0
- package/features/shared/abstractions.d.ts +1 -5
- package/features/shared/abstractions.js +1 -2
- package/features/shared/abstractions.js.map +1 -1
- package/features/sortMapper/SortMapper.js +2 -5
- package/features/sortMapper/SortMapper.js.map +1 -1
- package/features/storage/fields/CompressedTextStorageTransform.js +1 -1
- package/features/storage/fields/CompressedTextStorageTransform.js.map +1 -1
- package/features/storage/fields/DateStorageTransform.js +3 -4
- package/features/storage/fields/DateStorageTransform.js.map +1 -1
- package/features/storage/fields/DynamicZoneStorageTransform.js +2 -2
- package/features/storage/fields/DynamicZoneStorageTransform.js.map +1 -1
- package/features/storage/fields/JsonStorageTransform.js +1 -1
- package/features/storage/fields/JsonStorageTransform.js.map +1 -1
- package/features/storage/fields/LongTextStorageTransform.js +1 -1
- package/features/storage/fields/LongTextStorageTransform.js.map +1 -1
- package/features/storage/fields/ObjectStorageTransform.js +27 -7
- package/features/storage/fields/ObjectStorageTransform.js.map +1 -1
- package/features/storage/fields/RichTextStorageTransform.js +1 -1
- package/features/storage/fields/RichTextStorageTransform.js.map +1 -1
- package/features/validation/abstractions/CmsModelFieldValidator.d.ts +5 -0
- package/features/validation/abstractions/CmsModelFieldValidator.js.map +1 -1
- package/features/validation/validators/DateGteValidator.d.ts +2 -0
- package/features/validation/validators/DateGteValidator.js +12 -2
- package/features/validation/validators/DateGteValidator.js.map +1 -1
- package/features/validation/validators/DateLteValidator.d.ts +2 -0
- package/features/validation/validators/DateLteValidator.js +12 -2
- package/features/validation/validators/DateLteValidator.js.map +1 -1
- package/features/validation/validators/PatternValidator.js +1 -1
- package/features/validation/validators/PatternValidator.js.map +1 -1
- package/features/validation/validators/dateLimit.d.ts +9 -0
- package/features/validation/validators/dateLimit.js +18 -0
- package/features/validation/validators/dateLimit.js.map +1 -0
- package/features/whereMapper/WhereMapper.js +8 -8
- package/features/whereMapper/WhereMapper.js.map +1 -1
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js +15 -5
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js +8 -2
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -1
- package/graphql/checkEndpointAccess.d.ts +7 -2
- package/graphql/checkEndpointAccess.js +2 -4
- package/graphql/checkEndpointAccess.js.map +1 -1
- package/graphql/getSchema/generateCacheKey.js +1 -1
- package/graphql/getSchema/generateCacheKey.js.map +1 -1
- package/graphql/scalars/RevisionId.js +1 -1
- package/graphql/scalars/RevisionId.js.map +1 -1
- package/graphql/schema/cms/CmsBaseErrorTypeFactory.d.ts +1 -0
- package/graphql/schema/cms/CmsBaseErrorTypeFactory.js +4 -0
- package/graphql/schema/cms/CmsBaseErrorTypeFactory.js.map +1 -1
- package/graphql/schema/cms/getEntryResolver.js +3 -2
- package/graphql/schema/cms/getEntryResolver.js.map +1 -1
- package/graphql/schema/cms/getModelResolver.d.ts +35 -0
- package/graphql/schema/cms/getModelResolver.js +49 -0
- package/graphql/schema/cms/getModelResolver.js.map +1 -0
- package/graphql/schema/cms/helpers/buildFieldsSelection.js +9 -2
- package/graphql/schema/cms/helpers/buildFieldsSelection.js.map +1 -1
- package/graphql/schema/cms/helpers/expandFieldWildcards.d.ts +2 -0
- package/graphql/schema/cms/helpers/expandFieldWildcards.js +13 -0
- package/graphql/schema/cms/helpers/expandFieldWildcards.js.map +1 -0
- package/graphql/schema/cms/helpers/index.d.ts +1 -0
- package/graphql/schema/cms/helpers/index.js +1 -0
- package/graphql/schema/cms/helpers/transformWhereToNested.js +39 -17
- package/graphql/schema/cms/helpers/transformWhereToNested.js.map +1 -1
- package/graphql/schema/cms/helpers.d.ts +1 -0
- package/graphql/schema/cms/helpers.js +1 -0
- package/graphql/schema/cms/listEntriesResolver.js +3 -2
- package/graphql/schema/cms/listEntriesResolver.js.map +1 -1
- package/graphql/schema/cms/resolvers/createEntry.d.ts +1 -0
- package/graphql/schema/cms/resolvers/createEntry.js +4 -0
- package/graphql/schema/cms/resolvers/createEntry.js.map +1 -1
- package/graphql/schema/cms/resolvers/deleteEntryRevision.d.ts +1 -0
- package/graphql/schema/cms/resolvers/deleteEntryRevision.js +4 -0
- package/graphql/schema/cms/resolvers/deleteEntryRevision.js.map +1 -1
- package/graphql/schema/cms/resolvers/getEntry.d.ts +1 -0
- package/graphql/schema/cms/resolvers/getEntry.js +4 -0
- package/graphql/schema/cms/resolvers/getEntry.js.map +1 -1
- package/graphql/schema/cms/resolvers/getModel.d.ts +9 -0
- package/graphql/schema/cms/resolvers/getModel.js +22 -0
- package/graphql/schema/cms/resolvers/getModel.js.map +1 -0
- package/graphql/schema/cms/resolvers/index.d.ts +1 -0
- package/graphql/schema/cms/resolvers/index.js +1 -0
- package/graphql/schema/cms/resolvers/listEntries.d.ts +1 -0
- package/graphql/schema/cms/resolvers/listEntries.js +4 -0
- package/graphql/schema/cms/resolvers/listEntries.js.map +1 -1
- package/graphql/schema/cms/resolvers/mutationCms.d.ts +1 -0
- package/graphql/schema/cms/resolvers/mutationCms.js +4 -0
- package/graphql/schema/cms/resolvers/mutationCms.js.map +1 -1
- package/graphql/schema/cms/resolvers/publishEntryRevision.d.ts +1 -0
- package/graphql/schema/cms/resolvers/publishEntryRevision.js +4 -0
- package/graphql/schema/cms/resolvers/publishEntryRevision.js.map +1 -1
- package/graphql/schema/cms/resolvers/queryCms.d.ts +1 -0
- package/graphql/schema/cms/resolvers/queryCms.js +4 -0
- package/graphql/schema/cms/resolvers/queryCms.js.map +1 -1
- package/graphql/schema/cms/resolvers/unpublishEntryRevision.d.ts +1 -0
- package/graphql/schema/cms/resolvers/unpublishEntryRevision.js +4 -0
- package/graphql/schema/cms/resolvers/unpublishEntryRevision.js.map +1 -1
- package/graphql/schema/cms/resolvers/updateEntryRevision.d.ts +1 -0
- package/graphql/schema/cms/resolvers/updateEntryRevision.js +4 -0
- package/graphql/schema/cms/resolvers/updateEntryRevision.js.map +1 -1
- package/graphql/schema/cms/typeDefs/mutation.d.ts +1 -0
- package/graphql/schema/cms/typeDefs/mutation.js +4 -0
- package/graphql/schema/cms/typeDefs/mutation.js.map +1 -1
- package/graphql/schema/cms/typeDefs/query.d.ts +1 -0
- package/graphql/schema/cms/typeDefs/query.js +5 -0
- package/graphql/schema/cms/typeDefs/query.js.map +1 -1
- package/graphql/schema/cms/typeDefs/responses.d.ts +1 -0
- package/graphql/schema/cms/typeDefs/responses.js +9 -0
- package/graphql/schema/cms/typeDefs/responses.js.map +1 -1
- package/graphql/schema/contentEntries.js +19 -4
- package/graphql/schema/contentEntries.js.map +1 -1
- package/graphql/schema/contentModels.js +33 -0
- package/graphql/schema/contentModels.js.map +1 -1
- package/graphql/schema/createFieldResolvers.js +1 -1
- package/graphql/schema/createFieldResolvers.js.map +1 -1
- package/graphql/schema/createManageResolvers.js +3 -1
- package/graphql/schema/createManageResolvers.js.map +1 -1
- package/graphql/schema/createManageSDL.js +2 -0
- package/graphql/schema/createManageSDL.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDuplicate.d.ts +7 -0
- package/graphql/schema/resolvers/manage/resolveDuplicate.js +11 -0
- package/graphql/schema/resolvers/manage/resolveDuplicate.js.map +1 -0
- package/package.json +24 -25
- package/plugins/CmsModelPlugin.js +11 -11
- package/plugins/CmsModelPlugin.js.map +1 -1
- package/types/fields/dynamicZoneField.d.ts +3 -2
- package/types/index.d.ts +0 -1
- package/types/model.d.ts +6 -0
- package/types/modelField.d.ts +14 -1
- package/types/types.d.ts +14 -109
- package/types/types.js.map +1 -1
- package/utils/caching/Cache.js +1 -1
- package/utils/caching/Cache.js.map +1 -1
- package/utils/createModelField.js +2 -1
- package/utils/createModelField.js.map +1 -1
- package/utils/createModelSchemaKey.d.ts +8 -0
- package/utils/createModelSchemaKey.js +18 -0
- package/utils/createModelSchemaKey.js.map +1 -0
- package/utils/date.js +1 -1
- package/utils/date.js.map +1 -1
- package/utils/entryStorage.js +1 -1
- package/utils/entryStorage.js.map +1 -1
- package/utils/renderFields.js +1 -1
- package/utils/renderFields.js.map +1 -1
- package/HeadlessCmsContextualSchema.d.ts +0 -16
- package/HeadlessCmsContextualSchema.js +0 -32
- package/HeadlessCmsContextualSchema.js.map +0 -1
- package/crud/contentEntry.crud.d.ts +0 -6
- package/crud/contentEntry.crud.js +0 -336
- package/crud/contentEntry.crud.js.map +0 -1
- package/crud/contentModel.crud.d.ts +0 -5
- package/crud/contentModel.crud.js +0 -79
- package/crud/contentModel.crud.js.map +0 -1
- package/crud/contentModelGroup.crud.d.ts +0 -5
- package/crud/contentModelGroup.crud.js +0 -76
- package/crud/contentModelGroup.crud.js.map +0 -1
- package/types/context.d.ts +0 -110
- package/types/context.js +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ValuesSelectionGenerator } from "../../../../features/contentModel/ValuesSelectionGenerator/abstractions.js";
|
|
2
|
+
const expandFieldWildcards = (fields, model, context)=>{
|
|
3
|
+
if (!fields.includes("values.*")) return fields;
|
|
4
|
+
const generator = context.container.resolve(ValuesSelectionGenerator);
|
|
5
|
+
const valuesSelection = generator.generate(model);
|
|
6
|
+
if (!valuesSelection || "_empty" === valuesSelection) return fields.filter((f)=>"values.*" !== f);
|
|
7
|
+
const expanded = fields.filter((f)=>"values.*" !== f);
|
|
8
|
+
expanded.push(`values { ${valuesSelection} }`);
|
|
9
|
+
return expanded;
|
|
10
|
+
};
|
|
11
|
+
export { expandFieldWildcards };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=expandFieldWildcards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql/schema/cms/helpers/expandFieldWildcards.js","sources":["../../../../../src/graphql/schema/cms/helpers/expandFieldWildcards.ts"],"sourcesContent":["import type { CmsContext, CmsModel } from \"~/types/index.js\";\nimport { ValuesSelectionGenerator } from \"~/features/contentModel/ValuesSelectionGenerator/abstractions.js\";\n\nexport const expandFieldWildcards = (\n fields: string[],\n model: CmsModel,\n context: CmsContext\n): string[] => {\n if (!fields.includes(\"values.*\")) {\n return fields;\n }\n\n const generator = context.container.resolve(ValuesSelectionGenerator);\n const valuesSelection = generator.generate(model);\n\n if (!valuesSelection || valuesSelection === \"_empty\") {\n return fields.filter(f => f !== \"values.*\");\n }\n\n const expanded = fields.filter(f => f !== \"values.*\");\n expanded.push(`values { ${valuesSelection} }`);\n return expanded;\n};\n"],"names":["expandFieldWildcards","fields","model","context","generator","ValuesSelectionGenerator","valuesSelection","f","expanded"],"mappings":";AAGO,MAAMA,uBAAuB,CAChCC,QACAC,OACAC;IAEA,IAAI,CAACF,OAAO,QAAQ,CAAC,aACjB,OAAOA;IAGX,MAAMG,YAAYD,QAAQ,SAAS,CAAC,OAAO,CAACE;IAC5C,MAAMC,kBAAkBF,UAAU,QAAQ,CAACF;IAE3C,IAAI,CAACI,mBAAmBA,AAAoB,aAApBA,iBACpB,OAAOL,OAAO,MAAM,CAACM,CAAAA,IAAKA,AAAM,eAANA;IAG9B,MAAMC,WAAWP,OAAO,MAAM,CAACM,CAAAA,IAAKA,AAAM,eAANA;IACpCC,SAAS,IAAI,CAAC,CAAC,SAAS,EAAEF,gBAAgB,EAAE,CAAC;IAC7C,OAAOE;AACX"}
|
|
@@ -2,4 +2,5 @@ export { getErrorMessage } from "./getErrorMessage.js";
|
|
|
2
2
|
export { getModel } from "./getModel.js";
|
|
3
3
|
export { transformSortToArray } from "./transformSortToArray.js";
|
|
4
4
|
export { buildFieldsSelection } from "./buildFieldsSelection.js";
|
|
5
|
+
export { expandFieldWildcards } from "./expandFieldWildcards.js";
|
|
5
6
|
export { transformWhereToNested } from "./transformWhereToNested.js";
|
|
@@ -2,4 +2,5 @@ export { getErrorMessage } from "./getErrorMessage.js";
|
|
|
2
2
|
export { getModel } from "./getModel.js";
|
|
3
3
|
export { transformSortToArray } from "./transformSortToArray.js";
|
|
4
4
|
export { buildFieldsSelection } from "./buildFieldsSelection.js";
|
|
5
|
+
export { expandFieldWildcards } from "./expandFieldWildcards.js";
|
|
5
6
|
export { transformWhereToNested } from "./transformWhereToNested.js";
|
|
@@ -1,26 +1,48 @@
|
|
|
1
|
+
const FORBIDDEN_KEYS = new Set([
|
|
2
|
+
"__proto__",
|
|
3
|
+
"prototype",
|
|
4
|
+
"constructor"
|
|
5
|
+
]);
|
|
1
6
|
const transformWhereToNested = (where)=>{
|
|
2
7
|
if (!where) return;
|
|
3
|
-
|
|
4
|
-
for (const [key, value] of Object.entries(where)){
|
|
8
|
+
return Object.entries(where).reduce((result, [key, value])=>{
|
|
5
9
|
if ("AND" === key || "OR" === key) {
|
|
6
|
-
if (Array.isArray(value))
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
if (!Array.isArray(value)) return {
|
|
11
|
+
...result,
|
|
12
|
+
[key]: value
|
|
13
|
+
};
|
|
14
|
+
return {
|
|
15
|
+
...result,
|
|
16
|
+
[key]: value.map((item)=>transformWhereToNested(item))
|
|
17
|
+
};
|
|
9
18
|
}
|
|
10
19
|
const dotIndex = key.indexOf(".");
|
|
11
|
-
if (-1 === dotIndex)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const expanded = transformWhereToNested({
|
|
18
|
-
[tail]: value
|
|
19
|
-
});
|
|
20
|
-
Object.assign(nested, expanded);
|
|
20
|
+
if (-1 === dotIndex) {
|
|
21
|
+
if (FORBIDDEN_KEYS.has(key)) throw new Error(`Invalid where key: "${key}".`);
|
|
22
|
+
return {
|
|
23
|
+
...result,
|
|
24
|
+
[key]: value
|
|
25
|
+
};
|
|
21
26
|
}
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
const head = key.slice(0, dotIndex);
|
|
28
|
+
const tail = key.slice(dotIndex + 1);
|
|
29
|
+
if (FORBIDDEN_KEYS.has(head)) throw new Error(`Invalid where key: "${head}".`);
|
|
30
|
+
if (Object.hasOwn(result, head)) return {
|
|
31
|
+
...result,
|
|
32
|
+
[head]: {
|
|
33
|
+
...result[head],
|
|
34
|
+
...transformWhereToNested({
|
|
35
|
+
[tail]: value
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return {
|
|
40
|
+
...result,
|
|
41
|
+
[head]: transformWhereToNested({
|
|
42
|
+
[tail]: value
|
|
43
|
+
})
|
|
44
|
+
};
|
|
45
|
+
}, {});
|
|
24
46
|
};
|
|
25
47
|
export { transformWhereToNested };
|
|
26
48
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql/schema/cms/helpers/transformWhereToNested.js","sources":["../../../../../src/graphql/schema/cms/helpers/transformWhereToNested.ts"],"sourcesContent":["/**\n * Transforms a flat where object with dot-notation keys into a nested object.\n * Keys without dots are passed through unchanged.\n * Handles logical operators (AND, OR) recursively.\n *\n * @param where - Where clause object potentially containing dot-notation keys\n * @returns Nested where object compatible with the GraphQL ListWhereInput type\n *\n * @example\n * transformWhereToNested({ \"values.name\": \"Keyboard\", id: \"abc\" })\n * // Returns: { values: { name: \"Keyboard\" }, id: \"abc\" }\n *\n * @example\n * transformWhereToNested({ \"values.price_gt\": 100, \"values.name_contains\": \"board\" })\n * // Returns: { values: { price_gt: 100, name_contains: \"board\" } }\n */\nexport const transformWhereToNested = (\n where?: Record<string, unknown>\n): Record<string, unknown> | undefined => {\n if (!where) {\n return undefined;\n }\n\n
|
|
1
|
+
{"version":3,"file":"graphql/schema/cms/helpers/transformWhereToNested.js","sources":["../../../../../src/graphql/schema/cms/helpers/transformWhereToNested.ts"],"sourcesContent":["const FORBIDDEN_KEYS = new Set([\"__proto__\", \"prototype\", \"constructor\"]);\n\n/**\n * Transforms a flat where object with dot-notation keys into a nested object.\n * Keys without dots are passed through unchanged.\n * Handles logical operators (AND, OR) recursively.\n *\n * @param where - Where clause object potentially containing dot-notation keys\n * @returns Nested where object compatible with the GraphQL ListWhereInput type\n *\n * @example\n * transformWhereToNested({ \"values.name\": \"Keyboard\", id: \"abc\" })\n * // Returns: { values: { name: \"Keyboard\" }, id: \"abc\" }\n *\n * @example\n * transformWhereToNested({ \"values.price_gt\": 100, \"values.name_contains\": \"board\" })\n * // Returns: { values: { price_gt: 100, name_contains: \"board\" } }\n */\nexport const transformWhereToNested = (\n where?: Record<string, unknown>\n): Record<string, unknown> | undefined => {\n if (!where) {\n return undefined;\n }\n\n return Object.entries(where).reduce<Record<string, unknown>>((result, [key, value]) => {\n if (key === \"AND\" || key === \"OR\") {\n if (!Array.isArray(value)) {\n return {\n ...result,\n [key]: value\n };\n }\n return {\n ...result,\n [key]: value.map(item => transformWhereToNested(item))\n };\n }\n\n const dotIndex = key.indexOf(\".\");\n\n if (dotIndex === -1) {\n if (FORBIDDEN_KEYS.has(key)) {\n throw new Error(`Invalid where key: \"${key}\".`);\n }\n return {\n ...result,\n [key]: value\n };\n }\n\n const head = key.slice(0, dotIndex);\n const tail = key.slice(dotIndex + 1);\n\n if (FORBIDDEN_KEYS.has(head)) {\n throw new Error(`Invalid where key: \"${head}\".`);\n }\n\n if (Object.hasOwn(result, head)) {\n return {\n ...result,\n [head]: {\n ...(result[head] as Record<string, unknown>),\n ...transformWhereToNested({ [tail]: value })\n }\n };\n }\n\n return {\n ...result,\n [head]: transformWhereToNested({ [tail]: value })\n };\n }, {});\n};\n"],"names":["FORBIDDEN_KEYS","Set","transformWhereToNested","where","Object","result","key","value","Array","item","dotIndex","Error","head","tail"],"mappings":"AAAA,MAAMA,iBAAiB,IAAIC,IAAI;IAAC;IAAa;IAAa;CAAc;AAkBjE,MAAMC,yBAAyB,CAClCC;IAEA,IAAI,CAACA,OACD;IAGJ,OAAOC,OAAO,OAAO,CAACD,OAAO,MAAM,CAA0B,CAACE,QAAQ,CAACC,KAAKC,MAAM;QAC9E,IAAID,AAAQ,UAARA,OAAiBA,AAAQ,SAARA,KAAc;YAC/B,IAAI,CAACE,MAAM,OAAO,CAACD,QACf,OAAO;gBACH,GAAGF,MAAM;gBACT,CAACC,IAAI,EAAEC;YACX;YAEJ,OAAO;gBACH,GAAGF,MAAM;gBACT,CAACC,IAAI,EAAEC,MAAM,GAAG,CAACE,CAAAA,OAAQP,uBAAuBO;YACpD;QACJ;QAEA,MAAMC,WAAWJ,IAAI,OAAO,CAAC;QAE7B,IAAII,AAAa,OAAbA,UAAiB;YACjB,IAAIV,eAAe,GAAG,CAACM,MACnB,MAAM,IAAIK,MAAM,CAAC,oBAAoB,EAAEL,IAAI,EAAE,CAAC;YAElD,OAAO;gBACH,GAAGD,MAAM;gBACT,CAACC,IAAI,EAAEC;YACX;QACJ;QAEA,MAAMK,OAAON,IAAI,KAAK,CAAC,GAAGI;QAC1B,MAAMG,OAAOP,IAAI,KAAK,CAACI,WAAW;QAElC,IAAIV,eAAe,GAAG,CAACY,OACnB,MAAM,IAAID,MAAM,CAAC,oBAAoB,EAAEC,KAAK,EAAE,CAAC;QAGnD,IAAIR,OAAO,MAAM,CAACC,QAAQO,OACtB,OAAO;YACH,GAAGP,MAAM;YACT,CAACO,KAAK,EAAE;gBACJ,GAAIP,MAAM,CAACO,KAAK;gBAChB,GAAGV,uBAAuB;oBAAE,CAACW,KAAK,EAAEN;gBAAM,EAAE;YAChD;QACJ;QAGJ,OAAO;YACH,GAAGF,MAAM;YACT,CAACO,KAAK,EAAEV,uBAAuB;gBAAE,CAACW,KAAK,EAAEN;YAAM;QACnD;IACJ,GAAG,CAAC;AACR"}
|
|
@@ -2,4 +2,5 @@ export { getErrorMessage } from "./helpers/getErrorMessage.js";
|
|
|
2
2
|
export { getModel } from "./helpers/getModel.js";
|
|
3
3
|
export { transformSortToArray } from "./helpers/transformSortToArray.js";
|
|
4
4
|
export { buildFieldsSelection } from "./helpers/buildFieldsSelection.js";
|
|
5
|
+
export { expandFieldWildcards } from "./helpers/expandFieldWildcards.js";
|
|
5
6
|
export { transformWhereToNested } from "./helpers/transformWhereToNested.js";
|
|
@@ -2,4 +2,5 @@ export { getErrorMessage } from "./helpers/getErrorMessage.js";
|
|
|
2
2
|
export { getModel } from "./helpers/getModel.js";
|
|
3
3
|
export { transformSortToArray } from "./helpers/transformSortToArray.js";
|
|
4
4
|
export { buildFieldsSelection } from "./helpers/buildFieldsSelection.js";
|
|
5
|
+
export { expandFieldWildcards } from "./helpers/expandFieldWildcards.js";
|
|
5
6
|
export { transformWhereToNested } from "./helpers/transformWhereToNested.js";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { buildFieldsSelection, getErrorMessage, getModel, transformSortToArray, transformWhereToNested } from "./helpers.js";
|
|
1
|
+
import { buildFieldsSelection, expandFieldWildcards, getErrorMessage, getModel, transformSortToArray, transformWhereToNested } from "./helpers.js";
|
|
2
2
|
import { CmsSchemaExecutor } from "../../CmsSchemaExecutor.js";
|
|
3
3
|
const createListEntriesResolver = ()=>async ({ args, context })=>{
|
|
4
4
|
const { modelId, where, sort, limit, after, search, fields, preview = false } = args;
|
|
5
5
|
try {
|
|
6
6
|
const model = await getModel(context, modelId);
|
|
7
7
|
const apiType = preview ? "preview" : "read";
|
|
8
|
-
const
|
|
8
|
+
const expandedFields = expandFieldWildcards(fields, model, context);
|
|
9
|
+
const fieldsSelection = buildFieldsSelection(expandedFields);
|
|
9
10
|
const transformedSort = transformSortToArray(sort);
|
|
10
11
|
const transformedWhere = transformWhereToNested(where);
|
|
11
12
|
const query = `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql/schema/cms/listEntriesResolver.js","sources":["../../../../src/graphql/schema/cms/listEntriesResolver.ts"],"sourcesContent":["import type { CmsContext, ApiEndpoint } from \"~/types/index.js\";\nimport type { ExecutionResult } from \"graphql\";\nimport {\n getModel,\n getErrorMessage,\n buildFieldsSelection,\n transformSortToArray,\n transformWhereToNested\n} from \"./helpers.js\";\nimport { CmsSchemaExecutor } from \"~/graphql/CmsSchemaExecutor.js\";\n\nexport interface ListEntriesArgs {\n modelId: string;\n where?: Record<string, unknown>;\n sort?: Record<string, unknown> | string[];\n limit?: number;\n after?: string;\n search?: string;\n fields: string[];\n preview?: boolean;\n}\n\nexport const createListEntriesResolver = () => {\n return async ({ args, context }: { args: ListEntriesArgs; context: CmsContext }) => {\n const { modelId, where, sort, limit, after, search, fields, preview = false } = args;\n\n try {\n const model = await getModel(context, modelId);\n\n // Determine which API to use based on the preview flag.\n // preview=true -> preview API, preview=false -> read API\n const apiType: ApiEndpoint = preview ? \"preview\" : \"read\";\n\n const fieldsSelection = buildFieldsSelection(
|
|
1
|
+
{"version":3,"file":"graphql/schema/cms/listEntriesResolver.js","sources":["../../../../src/graphql/schema/cms/listEntriesResolver.ts"],"sourcesContent":["import type { CmsContext, ApiEndpoint } from \"~/types/index.js\";\nimport type { ExecutionResult } from \"graphql\";\nimport {\n getModel,\n getErrorMessage,\n buildFieldsSelection,\n expandFieldWildcards,\n transformSortToArray,\n transformWhereToNested\n} from \"./helpers.js\";\nimport { CmsSchemaExecutor } from \"~/graphql/CmsSchemaExecutor.js\";\n\nexport interface ListEntriesArgs {\n modelId: string;\n where?: Record<string, unknown>;\n sort?: Record<string, unknown> | string[];\n limit?: number;\n after?: string;\n search?: string;\n fields: string[];\n preview?: boolean;\n}\n\nexport const createListEntriesResolver = () => {\n return async ({ args, context }: { args: ListEntriesArgs; context: CmsContext }) => {\n const { modelId, where, sort, limit, after, search, fields, preview = false } = args;\n\n try {\n const model = await getModel(context, modelId);\n\n // Determine which API to use based on the preview flag.\n // preview=true -> preview API, preview=false -> read API\n const apiType: ApiEndpoint = preview ? \"preview\" : \"read\";\n\n const expandedFields = expandFieldWildcards(fields, model, context);\n const fieldsSelection = buildFieldsSelection(expandedFields);\n\n // Transform sort to array format expected by the underlying GraphQL schema.\n // Handles both object format {createdOn: \"desc\"} and array format [\"createdOn_DESC\"].\n const transformedSort = transformSortToArray(sort);\n\n // Transform dot-notation where keys (e.g. \"values.name\") into nested objects\n // (e.g. { values: { name: ... } }) so they match the typed ListWhereInput.\n const transformedWhere = transformWhereToNested(where);\n\n const query = /* GraphQL */ `\n query List${model.pluralApiName}(\n $where: ${model.singularApiName}ListWhereInput\n $sort: [${model.singularApiName}ListSorter!]\n $limit: Int\n $after: String\n $search: String\n ) {\n list${model.pluralApiName}(\n where: $where\n sort: $sort\n limit: $limit\n after: $after\n search: $search\n ) {\n data {\n ${fieldsSelection}\n }\n meta {\n cursor\n hasMoreItems\n totalCount\n }\n error {\n message\n code\n data\n }\n }\n }\n `;\n\n const result = (await context.container.resolve(CmsSchemaExecutor).execute(apiType, {\n query,\n variables: { where: transformedWhere, sort: transformedSort, limit, after, search }\n })) as ExecutionResult;\n\n if (result.errors && result.errors.length > 0) {\n return {\n data: [],\n meta: { cursor: null, hasMoreItems: false, totalCount: 0 },\n error: {\n message: result.errors.map(e => e.message).join(\"; \"),\n code: \"LIST_ENTRIES_ERROR\"\n }\n };\n }\n\n const operationName = `list${model.pluralApiName}`;\n return (\n result.data?.[operationName] || {\n data: [],\n meta: { cursor: null, hasMoreItems: false, totalCount: 0 },\n error: null\n }\n );\n } catch (error) {\n return {\n data: [],\n meta: { cursor: null, hasMoreItems: false, totalCount: 0 },\n error: {\n message: getErrorMessage(error, \"Failed to list entries\"),\n code: \"LIST_ENTRIES_ERROR\"\n }\n };\n }\n };\n};\n"],"names":["createListEntriesResolver","args","context","modelId","where","sort","limit","after","search","fields","preview","model","getModel","apiType","expandedFields","expandFieldWildcards","fieldsSelection","buildFieldsSelection","transformedSort","transformSortToArray","transformedWhere","transformWhereToNested","query","result","CmsSchemaExecutor","e","operationName","error","getErrorMessage"],"mappings":";;AAuBO,MAAMA,4BAA4B,IAC9B,OAAO,EAAEC,IAAI,EAAEC,OAAO,EAAkD;QAC3E,MAAM,EAAEC,OAAO,EAAEC,KAAK,EAAEC,IAAI,EAAEC,KAAK,EAAEC,KAAK,EAAEC,MAAM,EAAEC,MAAM,EAAEC,UAAU,KAAK,EAAE,GAAGT;QAEhF,IAAI;YACA,MAAMU,QAAQ,MAAMC,SAASV,SAASC;YAItC,MAAMU,UAAuBH,UAAU,YAAY;YAEnD,MAAMI,iBAAiBC,qBAAqBN,QAAQE,OAAOT;YAC3D,MAAMc,kBAAkBC,qBAAqBH;YAI7C,MAAMI,kBAAkBC,qBAAqBd;YAI7C,MAAMe,mBAAmBC,uBAAuBjB;YAEhD,MAAMkB,QAAsB,CAAC;0BACf,EAAEX,MAAM,aAAa,CAAC;4BACpB,EAAEA,MAAM,eAAe,CAAC;4BACxB,EAAEA,MAAM,eAAe,CAAC;;;;;wBAK5B,EAAEA,MAAM,aAAa,CAAC;;;;;;;;4BAQlB,EAAEK,gBAAgB;;;;;;;;;;;;;;YAclC,CAAC;YAED,MAAMO,SAAU,MAAMrB,QAAQ,SAAS,CAAC,OAAO,CAACsB,mBAAmB,OAAO,CAACX,SAAS;gBAChFS;gBACA,WAAW;oBAAE,OAAOF;oBAAkB,MAAMF;oBAAiBZ;oBAAOC;oBAAOC;gBAAO;YACtF;YAEA,IAAIe,OAAO,MAAM,IAAIA,OAAO,MAAM,CAAC,MAAM,GAAG,GACxC,OAAO;gBACH,MAAM,EAAE;gBACR,MAAM;oBAAE,QAAQ;oBAAM,cAAc;oBAAO,YAAY;gBAAE;gBACzD,OAAO;oBACH,SAASA,OAAO,MAAM,CAAC,GAAG,CAACE,CAAAA,IAAKA,EAAE,OAAO,EAAE,IAAI,CAAC;oBAChD,MAAM;gBACV;YACJ;YAGJ,MAAMC,gBAAgB,CAAC,IAAI,EAAEf,MAAM,aAAa,EAAE;YAClD,OACIY,OAAO,IAAI,EAAE,CAACG,cAAc,IAAI;gBAC5B,MAAM,EAAE;gBACR,MAAM;oBAAE,QAAQ;oBAAM,cAAc;oBAAO,YAAY;gBAAE;gBACzD,OAAO;YACX;QAER,EAAE,OAAOC,OAAO;YACZ,OAAO;gBACH,MAAM,EAAE;gBACR,MAAM;oBAAE,QAAQ;oBAAM,cAAc;oBAAO,YAAY;gBAAE;gBACzD,OAAO;oBACH,SAASC,gBAAgBD,OAAO;oBAChC,MAAM;gBACV;YACJ;QACJ;IACJ"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
2
|
declare class CreateEntryResolver implements CoreGraphQLSchemaFactory.Interface {
|
|
3
|
+
getSchemaKey: () => string;
|
|
3
4
|
execute(builder: CoreGraphQLSchemaFactory.SchemaBuilder): CoreGraphQLSchemaFactory.Return;
|
|
4
5
|
}
|
|
5
6
|
export declare const CreateEntryResolverImpl: typeof CreateEntryResolver & {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
|
+
import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
|
|
2
3
|
import { createCreateEntryResolver } from "../createEntryResolver.js";
|
|
3
4
|
class CreateEntryResolver {
|
|
4
5
|
async execute(builder) {
|
|
@@ -8,6 +9,9 @@ class CreateEntryResolver {
|
|
|
8
9
|
});
|
|
9
10
|
return builder;
|
|
10
11
|
}
|
|
12
|
+
constructor(){
|
|
13
|
+
this.getSchemaKey = staticSchemaKey("api-headless-cms/CreateEntryResolver");
|
|
14
|
+
}
|
|
11
15
|
}
|
|
12
16
|
const CreateEntryResolverImpl = CoreGraphQLSchemaFactory.createImplementation({
|
|
13
17
|
implementation: CreateEntryResolver,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql/schema/cms/resolvers/createEntry.js","sources":["../../../../../src/graphql/schema/cms/resolvers/createEntry.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { createCreateEntryResolver } from \"../createEntryResolver.js\";\n\nclass CreateEntryResolver implements CoreGraphQLSchemaFactory.Interface {\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsMutation.createEntry\",\n resolver: createCreateEntryResolver\n });\n\n return builder;\n }\n}\n\nexport const CreateEntryResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: CreateEntryResolver,\n dependencies: []\n});\n"],"names":["CreateEntryResolver","builder","createCreateEntryResolver","CreateEntryResolverImpl","CoreGraphQLSchemaFactory"],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql/schema/cms/resolvers/createEntry.js","sources":["../../../../../src/graphql/schema/cms/resolvers/createEntry.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { createCreateEntryResolver } from \"../createEntryResolver.js\";\n\nclass CreateEntryResolver implements CoreGraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"api-headless-cms/CreateEntryResolver\");\n\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsMutation.createEntry\",\n resolver: createCreateEntryResolver\n });\n\n return builder;\n }\n}\n\nexport const CreateEntryResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: CreateEntryResolver,\n dependencies: []\n});\n"],"names":["CreateEntryResolver","builder","createCreateEntryResolver","staticSchemaKey","CreateEntryResolverImpl","CoreGraphQLSchemaFactory"],"mappings":";;;AAIA,MAAMA;IAGF,MAAM,QACFC,OAA+C,EAChB;QAC/BA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,UAAUC;QACd;QAEA,OAAOD;IACX;;aAXO,YAAY,GAAGE,gBAAgB;;AAY1C;AAEO,MAAMC,0BAA0BC,yBAAyB,oBAAoB,CAAC;IACjF,gBAAgBL;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
2
|
declare class DeleteEntryRevisionResolver implements CoreGraphQLSchemaFactory.Interface {
|
|
3
|
+
getSchemaKey: () => string;
|
|
3
4
|
execute(builder: CoreGraphQLSchemaFactory.SchemaBuilder): CoreGraphQLSchemaFactory.Return;
|
|
4
5
|
}
|
|
5
6
|
export declare const DeleteEntryRevisionResolverImpl: typeof DeleteEntryRevisionResolver & {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
|
+
import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
|
|
2
3
|
import { createDeleteEntryRevisionResolver } from "../deleteEntryResolver.js";
|
|
3
4
|
class DeleteEntryRevisionResolver {
|
|
4
5
|
async execute(builder) {
|
|
@@ -8,6 +9,9 @@ class DeleteEntryRevisionResolver {
|
|
|
8
9
|
});
|
|
9
10
|
return builder;
|
|
10
11
|
}
|
|
12
|
+
constructor(){
|
|
13
|
+
this.getSchemaKey = staticSchemaKey("api-headless-cms/DeleteEntryRevisionResolver");
|
|
14
|
+
}
|
|
11
15
|
}
|
|
12
16
|
const DeleteEntryRevisionResolverImpl = CoreGraphQLSchemaFactory.createImplementation({
|
|
13
17
|
implementation: DeleteEntryRevisionResolver,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql/schema/cms/resolvers/deleteEntryRevision.js","sources":["../../../../../src/graphql/schema/cms/resolvers/deleteEntryRevision.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { createDeleteEntryRevisionResolver } from \"../deleteEntryResolver.js\";\n\nclass DeleteEntryRevisionResolver implements CoreGraphQLSchemaFactory.Interface {\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsMutation.deleteEntryRevision\",\n resolver: createDeleteEntryRevisionResolver\n });\n\n return builder;\n }\n}\n\nexport const DeleteEntryRevisionResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: DeleteEntryRevisionResolver,\n dependencies: []\n});\n"],"names":["DeleteEntryRevisionResolver","builder","createDeleteEntryRevisionResolver","DeleteEntryRevisionResolverImpl","CoreGraphQLSchemaFactory"],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql/schema/cms/resolvers/deleteEntryRevision.js","sources":["../../../../../src/graphql/schema/cms/resolvers/deleteEntryRevision.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { createDeleteEntryRevisionResolver } from \"../deleteEntryResolver.js\";\n\nclass DeleteEntryRevisionResolver implements CoreGraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"api-headless-cms/DeleteEntryRevisionResolver\");\n\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsMutation.deleteEntryRevision\",\n resolver: createDeleteEntryRevisionResolver\n });\n\n return builder;\n }\n}\n\nexport const DeleteEntryRevisionResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: DeleteEntryRevisionResolver,\n dependencies: []\n});\n"],"names":["DeleteEntryRevisionResolver","builder","createDeleteEntryRevisionResolver","staticSchemaKey","DeleteEntryRevisionResolverImpl","CoreGraphQLSchemaFactory"],"mappings":";;;AAIA,MAAMA;IAGF,MAAM,QACFC,OAA+C,EAChB;QAC/BA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,UAAUC;QACd;QAEA,OAAOD;IACX;;aAXO,YAAY,GAAGE,gBAAgB;;AAY1C;AAEO,MAAMC,kCAAkCC,yBAAyB,oBAAoB,CAAC;IACzF,gBAAgBL;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
2
|
declare class GetEntryResolver implements CoreGraphQLSchemaFactory.Interface {
|
|
3
|
+
getSchemaKey: () => string;
|
|
3
4
|
execute(builder: CoreGraphQLSchemaFactory.SchemaBuilder): CoreGraphQLSchemaFactory.Return;
|
|
4
5
|
}
|
|
5
6
|
export declare const GetEntryResolverImpl: typeof GetEntryResolver & {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
|
+
import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
|
|
2
3
|
import { createGetEntryResolver } from "../getEntryResolver.js";
|
|
3
4
|
class GetEntryResolver {
|
|
4
5
|
async execute(builder) {
|
|
@@ -8,6 +9,9 @@ class GetEntryResolver {
|
|
|
8
9
|
});
|
|
9
10
|
return builder;
|
|
10
11
|
}
|
|
12
|
+
constructor(){
|
|
13
|
+
this.getSchemaKey = staticSchemaKey("api-headless-cms/GetEntryResolver");
|
|
14
|
+
}
|
|
11
15
|
}
|
|
12
16
|
const GetEntryResolverImpl = CoreGraphQLSchemaFactory.createImplementation({
|
|
13
17
|
implementation: GetEntryResolver,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql/schema/cms/resolvers/getEntry.js","sources":["../../../../../src/graphql/schema/cms/resolvers/getEntry.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { createGetEntryResolver } from \"../getEntryResolver.js\";\n\nclass GetEntryResolver implements CoreGraphQLSchemaFactory.Interface {\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsQuery.getEntry\",\n resolver: createGetEntryResolver\n });\n\n return builder;\n }\n}\n\nexport const GetEntryResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: GetEntryResolver,\n dependencies: []\n});\n"],"names":["GetEntryResolver","builder","createGetEntryResolver","GetEntryResolverImpl","CoreGraphQLSchemaFactory"],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql/schema/cms/resolvers/getEntry.js","sources":["../../../../../src/graphql/schema/cms/resolvers/getEntry.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { createGetEntryResolver } from \"../getEntryResolver.js\";\n\nclass GetEntryResolver implements CoreGraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"api-headless-cms/GetEntryResolver\");\n\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsQuery.getEntry\",\n resolver: createGetEntryResolver\n });\n\n return builder;\n }\n}\n\nexport const GetEntryResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: GetEntryResolver,\n dependencies: []\n});\n"],"names":["GetEntryResolver","builder","createGetEntryResolver","staticSchemaKey","GetEntryResolverImpl","CoreGraphQLSchemaFactory"],"mappings":";;;AAIA,MAAMA;IAGF,MAAM,QACFC,OAA+C,EAChB;QAC/BA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,UAAUC;QACd;QAEA,OAAOD;IACX;;aAXO,YAAY,GAAGE,gBAAgB;;AAY1C;AAEO,MAAMC,uBAAuBC,yBAAyB,oBAAoB,CAAC;IAC9E,gBAAgBL;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
|
+
declare class GetModelResolver implements CoreGraphQLSchemaFactory.Interface {
|
|
3
|
+
getSchemaKey: () => string;
|
|
4
|
+
execute(builder: CoreGraphQLSchemaFactory.SchemaBuilder): CoreGraphQLSchemaFactory.Return;
|
|
5
|
+
}
|
|
6
|
+
export declare const GetModelResolverImpl: typeof GetModelResolver & {
|
|
7
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/api-graphql/graphql/abstractions.core.js").ICoreGraphQLSchemaFactory>;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
|
+
import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
|
|
3
|
+
import { createGetModelResolver } from "../getModelResolver.js";
|
|
4
|
+
class GetModelResolver {
|
|
5
|
+
async execute(builder) {
|
|
6
|
+
builder.addResolver({
|
|
7
|
+
path: "CmsQuery.getModel",
|
|
8
|
+
resolver: createGetModelResolver
|
|
9
|
+
});
|
|
10
|
+
return builder;
|
|
11
|
+
}
|
|
12
|
+
constructor(){
|
|
13
|
+
this.getSchemaKey = staticSchemaKey("api-headless-cms/GetModelResolver");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
const GetModelResolverImpl = CoreGraphQLSchemaFactory.createImplementation({
|
|
17
|
+
implementation: GetModelResolver,
|
|
18
|
+
dependencies: []
|
|
19
|
+
});
|
|
20
|
+
export { GetModelResolverImpl };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=getModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql/schema/cms/resolvers/getModel.js","sources":["../../../../../src/graphql/schema/cms/resolvers/getModel.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { createGetModelResolver } from \"../getModelResolver.js\";\n\nclass GetModelResolver implements CoreGraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"api-headless-cms/GetModelResolver\");\n\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsQuery.getModel\",\n resolver: createGetModelResolver\n });\n\n return builder;\n }\n}\n\nexport const GetModelResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: GetModelResolver,\n dependencies: []\n});\n"],"names":["GetModelResolver","builder","createGetModelResolver","staticSchemaKey","GetModelResolverImpl","CoreGraphQLSchemaFactory"],"mappings":";;;AAIA,MAAMA;IAGF,MAAM,QACFC,OAA+C,EAChB;QAC/BA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,UAAUC;QACd;QAEA,OAAOD;IACX;;aAXO,YAAY,GAAGE,gBAAgB;;AAY1C;AAEO,MAAMC,uBAAuBC,yBAAyB,oBAAoB,CAAC;IAC9E,gBAAgBL;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -7,3 +7,4 @@ export { UpdateEntryRevisionResolverImpl } from "./updateEntryRevision.js";
|
|
|
7
7
|
export { DeleteEntryRevisionResolverImpl } from "./deleteEntryRevision.js";
|
|
8
8
|
export { PublishEntryRevisionResolverImpl } from "./publishEntryRevision.js";
|
|
9
9
|
export { UnpublishEntryRevisionResolverImpl } from "./unpublishEntryRevision.js";
|
|
10
|
+
export { GetModelResolverImpl } from "./getModel.js";
|
|
@@ -7,3 +7,4 @@ export { UpdateEntryRevisionResolverImpl } from "./updateEntryRevision.js";
|
|
|
7
7
|
export { DeleteEntryRevisionResolverImpl } from "./deleteEntryRevision.js";
|
|
8
8
|
export { PublishEntryRevisionResolverImpl } from "./publishEntryRevision.js";
|
|
9
9
|
export { UnpublishEntryRevisionResolverImpl } from "./unpublishEntryRevision.js";
|
|
10
|
+
export { GetModelResolverImpl } from "./getModel.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
2
|
declare class ListEntriesResolver implements CoreGraphQLSchemaFactory.Interface {
|
|
3
|
+
getSchemaKey: () => string;
|
|
3
4
|
execute(builder: CoreGraphQLSchemaFactory.SchemaBuilder): CoreGraphQLSchemaFactory.Return;
|
|
4
5
|
}
|
|
5
6
|
export declare const ListEntriesResolverImpl: typeof ListEntriesResolver & {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
|
+
import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
|
|
2
3
|
import { createListEntriesResolver } from "../listEntriesResolver.js";
|
|
3
4
|
class ListEntriesResolver {
|
|
4
5
|
async execute(builder) {
|
|
@@ -8,6 +9,9 @@ class ListEntriesResolver {
|
|
|
8
9
|
});
|
|
9
10
|
return builder;
|
|
10
11
|
}
|
|
12
|
+
constructor(){
|
|
13
|
+
this.getSchemaKey = staticSchemaKey("api-headless-cms/ListEntriesResolver");
|
|
14
|
+
}
|
|
11
15
|
}
|
|
12
16
|
const ListEntriesResolverImpl = CoreGraphQLSchemaFactory.createImplementation({
|
|
13
17
|
implementation: ListEntriesResolver,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql/schema/cms/resolvers/listEntries.js","sources":["../../../../../src/graphql/schema/cms/resolvers/listEntries.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { createListEntriesResolver } from \"../listEntriesResolver.js\";\n\nclass ListEntriesResolver implements CoreGraphQLSchemaFactory.Interface {\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsQuery.listEntries\",\n resolver: createListEntriesResolver\n });\n\n return builder;\n }\n}\n\nexport const ListEntriesResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: ListEntriesResolver,\n dependencies: []\n});\n"],"names":["ListEntriesResolver","builder","createListEntriesResolver","ListEntriesResolverImpl","CoreGraphQLSchemaFactory"],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql/schema/cms/resolvers/listEntries.js","sources":["../../../../../src/graphql/schema/cms/resolvers/listEntries.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { createListEntriesResolver } from \"../listEntriesResolver.js\";\n\nclass ListEntriesResolver implements CoreGraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"api-headless-cms/ListEntriesResolver\");\n\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsQuery.listEntries\",\n resolver: createListEntriesResolver\n });\n\n return builder;\n }\n}\n\nexport const ListEntriesResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: ListEntriesResolver,\n dependencies: []\n});\n"],"names":["ListEntriesResolver","builder","createListEntriesResolver","staticSchemaKey","ListEntriesResolverImpl","CoreGraphQLSchemaFactory"],"mappings":";;;AAIA,MAAMA;IAGF,MAAM,QACFC,OAA+C,EAChB;QAC/BA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,UAAUC;QACd;QAEA,OAAOD;IACX;;aAXO,YAAY,GAAGE,gBAAgB;;AAY1C;AAEO,MAAMC,0BAA0BC,yBAAyB,oBAAoB,CAAC;IACjF,gBAAgBL;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
2
|
declare class MutationCmsResolver implements CoreGraphQLSchemaFactory.Interface {
|
|
3
|
+
getSchemaKey: () => string;
|
|
3
4
|
execute(builder: CoreGraphQLSchemaFactory.SchemaBuilder): CoreGraphQLSchemaFactory.Return;
|
|
4
5
|
}
|
|
5
6
|
export declare const MutationCmsResolverImpl: typeof MutationCmsResolver & {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
|
+
import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
|
|
2
3
|
class MutationCmsResolver {
|
|
3
4
|
async execute(builder) {
|
|
4
5
|
builder.addResolver({
|
|
@@ -9,6 +10,9 @@ class MutationCmsResolver {
|
|
|
9
10
|
});
|
|
10
11
|
return builder;
|
|
11
12
|
}
|
|
13
|
+
constructor(){
|
|
14
|
+
this.getSchemaKey = staticSchemaKey("api-headless-cms/MutationCmsResolver");
|
|
15
|
+
}
|
|
12
16
|
}
|
|
13
17
|
const MutationCmsResolverImpl = CoreGraphQLSchemaFactory.createImplementation({
|
|
14
18
|
implementation: MutationCmsResolver,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql/schema/cms/resolvers/mutationCms.js","sources":["../../../../../src/graphql/schema/cms/resolvers/mutationCms.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\n\nclass MutationCmsResolver implements CoreGraphQLSchemaFactory.Interface {\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"Mutation.cms\",\n resolver() {\n /**\n * Returns an empty object to serve as the namespace for CMS mutations.\n * Individual mutation fields (createEntry, updateEntry, etc.) are resolved\n * by their own dedicated resolvers registered under the CmsMutation type.\n * This pattern provides a clean GraphQL API structure: mutation { cms { createEntry(...) } }\n */\n return () => ({});\n }\n });\n\n return builder;\n }\n}\n\nexport const MutationCmsResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: MutationCmsResolver,\n dependencies: []\n});\n"],"names":["MutationCmsResolver","builder","MutationCmsResolverImpl","CoreGraphQLSchemaFactory"],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql/schema/cms/resolvers/mutationCms.js","sources":["../../../../../src/graphql/schema/cms/resolvers/mutationCms.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\n\nclass MutationCmsResolver implements CoreGraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"api-headless-cms/MutationCmsResolver\");\n\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"Mutation.cms\",\n resolver() {\n /**\n * Returns an empty object to serve as the namespace for CMS mutations.\n * Individual mutation fields (createEntry, updateEntry, etc.) are resolved\n * by their own dedicated resolvers registered under the CmsMutation type.\n * This pattern provides a clean GraphQL API structure: mutation { cms { createEntry(...) } }\n */\n return () => ({});\n }\n });\n\n return builder;\n }\n}\n\nexport const MutationCmsResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: MutationCmsResolver,\n dependencies: []\n});\n"],"names":["MutationCmsResolver","builder","staticSchemaKey","MutationCmsResolverImpl","CoreGraphQLSchemaFactory"],"mappings":";;AAGA,MAAMA;IAGF,MAAM,QACFC,OAA+C,EAChB;QAC/BA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN;gBAOI,OAAO,IAAO,EAAC;YACnB;QACJ;QAEA,OAAOA;IACX;;aAnBO,YAAY,GAAGC,gBAAgB;;AAoB1C;AAEO,MAAMC,0BAA0BC,yBAAyB,oBAAoB,CAAC;IACjF,gBAAgBJ;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
2
|
declare class PublishEntryRevisionResolver implements CoreGraphQLSchemaFactory.Interface {
|
|
3
|
+
getSchemaKey: () => string;
|
|
3
4
|
execute(builder: CoreGraphQLSchemaFactory.SchemaBuilder): CoreGraphQLSchemaFactory.Return;
|
|
4
5
|
}
|
|
5
6
|
export declare const PublishEntryRevisionResolverImpl: typeof PublishEntryRevisionResolver & {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
|
+
import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
|
|
2
3
|
import { createPublishEntryRevisionResolver } from "../publishEntryResolver.js";
|
|
3
4
|
class PublishEntryRevisionResolver {
|
|
4
5
|
async execute(builder) {
|
|
@@ -8,6 +9,9 @@ class PublishEntryRevisionResolver {
|
|
|
8
9
|
});
|
|
9
10
|
return builder;
|
|
10
11
|
}
|
|
12
|
+
constructor(){
|
|
13
|
+
this.getSchemaKey = staticSchemaKey("api-headless-cms/PublishEntryRevisionResolver");
|
|
14
|
+
}
|
|
11
15
|
}
|
|
12
16
|
const PublishEntryRevisionResolverImpl = CoreGraphQLSchemaFactory.createImplementation({
|
|
13
17
|
implementation: PublishEntryRevisionResolver,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql/schema/cms/resolvers/publishEntryRevision.js","sources":["../../../../../src/graphql/schema/cms/resolvers/publishEntryRevision.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { createPublishEntryRevisionResolver } from \"../publishEntryResolver.js\";\n\nclass PublishEntryRevisionResolver implements CoreGraphQLSchemaFactory.Interface {\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsMutation.publishEntryRevision\",\n resolver: createPublishEntryRevisionResolver\n });\n\n return builder;\n }\n}\n\nexport const PublishEntryRevisionResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: PublishEntryRevisionResolver,\n dependencies: []\n});\n"],"names":["PublishEntryRevisionResolver","builder","createPublishEntryRevisionResolver","PublishEntryRevisionResolverImpl","CoreGraphQLSchemaFactory"],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql/schema/cms/resolvers/publishEntryRevision.js","sources":["../../../../../src/graphql/schema/cms/resolvers/publishEntryRevision.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { createPublishEntryRevisionResolver } from \"../publishEntryResolver.js\";\n\nclass PublishEntryRevisionResolver implements CoreGraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"api-headless-cms/PublishEntryRevisionResolver\");\n\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsMutation.publishEntryRevision\",\n resolver: createPublishEntryRevisionResolver\n });\n\n return builder;\n }\n}\n\nexport const PublishEntryRevisionResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: PublishEntryRevisionResolver,\n dependencies: []\n});\n"],"names":["PublishEntryRevisionResolver","builder","createPublishEntryRevisionResolver","staticSchemaKey","PublishEntryRevisionResolverImpl","CoreGraphQLSchemaFactory"],"mappings":";;;AAIA,MAAMA;IAGF,MAAM,QACFC,OAA+C,EAChB;QAC/BA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,UAAUC;QACd;QAEA,OAAOD;IACX;;aAXO,YAAY,GAAGE,gBAAgB;;AAY1C;AAEO,MAAMC,mCAAmCC,yBAAyB,oBAAoB,CAAC;IAC1F,gBAAgBL;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
2
|
declare class QueryCmsResolver implements CoreGraphQLSchemaFactory.Interface {
|
|
3
|
+
getSchemaKey: () => string;
|
|
3
4
|
execute(builder: CoreGraphQLSchemaFactory.SchemaBuilder): CoreGraphQLSchemaFactory.Return;
|
|
4
5
|
}
|
|
5
6
|
export declare const QueryCmsResolverImpl: typeof QueryCmsResolver & {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
|
+
import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
|
|
2
3
|
class QueryCmsResolver {
|
|
3
4
|
async execute(builder) {
|
|
4
5
|
builder.addResolver({
|
|
@@ -9,6 +10,9 @@ class QueryCmsResolver {
|
|
|
9
10
|
});
|
|
10
11
|
return builder;
|
|
11
12
|
}
|
|
13
|
+
constructor(){
|
|
14
|
+
this.getSchemaKey = staticSchemaKey("api-headless-cms/QueryCmsResolver");
|
|
15
|
+
}
|
|
12
16
|
}
|
|
13
17
|
const QueryCmsResolverImpl = CoreGraphQLSchemaFactory.createImplementation({
|
|
14
18
|
implementation: QueryCmsResolver,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql/schema/cms/resolvers/queryCms.js","sources":["../../../../../src/graphql/schema/cms/resolvers/queryCms.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\n\nclass QueryCmsResolver implements CoreGraphQLSchemaFactory.Interface {\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"Query.cms\",\n resolver() {\n /**\n * Returns an empty object that serves as a namespace for CMS queries.\n * Actual query operations (getEntry, getEntryById, listEntries, etc.) are resolved\n * by dedicated resolvers registered under the CmsQuery type.\n */\n return () => ({});\n }\n });\n\n return builder;\n }\n}\n\nexport const QueryCmsResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: QueryCmsResolver,\n dependencies: []\n});\n"],"names":["QueryCmsResolver","builder","QueryCmsResolverImpl","CoreGraphQLSchemaFactory"],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql/schema/cms/resolvers/queryCms.js","sources":["../../../../../src/graphql/schema/cms/resolvers/queryCms.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\n\nclass QueryCmsResolver implements CoreGraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"api-headless-cms/QueryCmsResolver\");\n\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"Query.cms\",\n resolver() {\n /**\n * Returns an empty object that serves as a namespace for CMS queries.\n * Actual query operations (getEntry, getEntryById, listEntries, etc.) are resolved\n * by dedicated resolvers registered under the CmsQuery type.\n */\n return () => ({});\n }\n });\n\n return builder;\n }\n}\n\nexport const QueryCmsResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: QueryCmsResolver,\n dependencies: []\n});\n"],"names":["QueryCmsResolver","builder","staticSchemaKey","QueryCmsResolverImpl","CoreGraphQLSchemaFactory"],"mappings":";;AAGA,MAAMA;IAGF,MAAM,QACFC,OAA+C,EAChB;QAC/BA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN;gBAMI,OAAO,IAAO,EAAC;YACnB;QACJ;QAEA,OAAOA;IACX;;aAlBO,YAAY,GAAGC,gBAAgB;;AAmB1C;AAEO,MAAMC,uBAAuBC,yBAAyB,oBAAoB,CAAC;IAC9E,gBAAgBJ;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
2
|
declare class UnpublishEntryRevisionResolver implements CoreGraphQLSchemaFactory.Interface {
|
|
3
|
+
getSchemaKey: () => string;
|
|
3
4
|
execute(builder: CoreGraphQLSchemaFactory.SchemaBuilder): CoreGraphQLSchemaFactory.Return;
|
|
4
5
|
}
|
|
5
6
|
export declare const UnpublishEntryRevisionResolverImpl: typeof UnpublishEntryRevisionResolver & {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
|
+
import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
|
|
2
3
|
import { createUnpublishEntryRevisionResolver } from "../unpublishEntryResolver.js";
|
|
3
4
|
class UnpublishEntryRevisionResolver {
|
|
4
5
|
async execute(builder) {
|
|
@@ -8,6 +9,9 @@ class UnpublishEntryRevisionResolver {
|
|
|
8
9
|
});
|
|
9
10
|
return builder;
|
|
10
11
|
}
|
|
12
|
+
constructor(){
|
|
13
|
+
this.getSchemaKey = staticSchemaKey("api-headless-cms/UnpublishEntryRevisionResolver");
|
|
14
|
+
}
|
|
11
15
|
}
|
|
12
16
|
const UnpublishEntryRevisionResolverImpl = CoreGraphQLSchemaFactory.createImplementation({
|
|
13
17
|
implementation: UnpublishEntryRevisionResolver,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql/schema/cms/resolvers/unpublishEntryRevision.js","sources":["../../../../../src/graphql/schema/cms/resolvers/unpublishEntryRevision.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { createUnpublishEntryRevisionResolver } from \"../unpublishEntryResolver.js\";\n\nclass UnpublishEntryRevisionResolver implements CoreGraphQLSchemaFactory.Interface {\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsMutation.unpublishEntryRevision\",\n resolver: createUnpublishEntryRevisionResolver\n });\n\n return builder;\n }\n}\n\nexport const UnpublishEntryRevisionResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: UnpublishEntryRevisionResolver,\n dependencies: []\n});\n"],"names":["UnpublishEntryRevisionResolver","builder","createUnpublishEntryRevisionResolver","UnpublishEntryRevisionResolverImpl","CoreGraphQLSchemaFactory"],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql/schema/cms/resolvers/unpublishEntryRevision.js","sources":["../../../../../src/graphql/schema/cms/resolvers/unpublishEntryRevision.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { createUnpublishEntryRevisionResolver } from \"../unpublishEntryResolver.js\";\n\nclass UnpublishEntryRevisionResolver implements CoreGraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"api-headless-cms/UnpublishEntryRevisionResolver\");\n\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsMutation.unpublishEntryRevision\",\n resolver: createUnpublishEntryRevisionResolver\n });\n\n return builder;\n }\n}\n\nexport const UnpublishEntryRevisionResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: UnpublishEntryRevisionResolver,\n dependencies: []\n});\n"],"names":["UnpublishEntryRevisionResolver","builder","createUnpublishEntryRevisionResolver","staticSchemaKey","UnpublishEntryRevisionResolverImpl","CoreGraphQLSchemaFactory"],"mappings":";;;AAIA,MAAMA;IAGF,MAAM,QACFC,OAA+C,EAChB;QAC/BA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,UAAUC;QACd;QAEA,OAAOD;IACX;;aAXO,YAAY,GAAGE,gBAAgB;;AAY1C;AAEO,MAAMC,qCAAqCC,yBAAyB,oBAAoB,CAAC;IAC5F,gBAAgBL;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
2
|
declare class UpdateEntryRevisionResolver implements CoreGraphQLSchemaFactory.Interface {
|
|
3
|
+
getSchemaKey: () => string;
|
|
3
4
|
execute(builder: CoreGraphQLSchemaFactory.SchemaBuilder): CoreGraphQLSchemaFactory.Return;
|
|
4
5
|
}
|
|
5
6
|
export declare const UpdateEntryRevisionResolverImpl: typeof UpdateEntryRevisionResolver & {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
|
+
import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
|
|
2
3
|
import { createUpdateEntryRevisionResolver } from "../updateEntryResolver.js";
|
|
3
4
|
class UpdateEntryRevisionResolver {
|
|
4
5
|
async execute(builder) {
|
|
@@ -8,6 +9,9 @@ class UpdateEntryRevisionResolver {
|
|
|
8
9
|
});
|
|
9
10
|
return builder;
|
|
10
11
|
}
|
|
12
|
+
constructor(){
|
|
13
|
+
this.getSchemaKey = staticSchemaKey("api-headless-cms/UpdateEntryRevisionResolver");
|
|
14
|
+
}
|
|
11
15
|
}
|
|
12
16
|
const UpdateEntryRevisionResolverImpl = CoreGraphQLSchemaFactory.createImplementation({
|
|
13
17
|
implementation: UpdateEntryRevisionResolver,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql/schema/cms/resolvers/updateEntryRevision.js","sources":["../../../../../src/graphql/schema/cms/resolvers/updateEntryRevision.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { createUpdateEntryRevisionResolver } from \"../updateEntryResolver.js\";\n\nclass UpdateEntryRevisionResolver implements CoreGraphQLSchemaFactory.Interface {\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsMutation.updateEntryRevision\",\n resolver: createUpdateEntryRevisionResolver\n });\n\n return builder;\n }\n}\n\nexport const UpdateEntryRevisionResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: UpdateEntryRevisionResolver,\n dependencies: []\n});\n"],"names":["UpdateEntryRevisionResolver","builder","createUpdateEntryRevisionResolver","UpdateEntryRevisionResolverImpl","CoreGraphQLSchemaFactory"],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql/schema/cms/resolvers/updateEntryRevision.js","sources":["../../../../../src/graphql/schema/cms/resolvers/updateEntryRevision.ts"],"sourcesContent":["import { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.core.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { createUpdateEntryRevisionResolver } from \"../updateEntryResolver.js\";\n\nclass UpdateEntryRevisionResolver implements CoreGraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"api-headless-cms/UpdateEntryRevisionResolver\");\n\n async execute(\n builder: CoreGraphQLSchemaFactory.SchemaBuilder\n ): CoreGraphQLSchemaFactory.Return {\n builder.addResolver({\n path: \"CmsMutation.updateEntryRevision\",\n resolver: createUpdateEntryRevisionResolver\n });\n\n return builder;\n }\n}\n\nexport const UpdateEntryRevisionResolverImpl = CoreGraphQLSchemaFactory.createImplementation({\n implementation: UpdateEntryRevisionResolver,\n dependencies: []\n});\n"],"names":["UpdateEntryRevisionResolver","builder","createUpdateEntryRevisionResolver","staticSchemaKey","UpdateEntryRevisionResolverImpl","CoreGraphQLSchemaFactory"],"mappings":";;;AAIA,MAAMA;IAGF,MAAM,QACFC,OAA+C,EAChB;QAC/BA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,UAAUC;QACd;QAEA,OAAOD;IACX;;aAXO,YAAY,GAAGE,gBAAgB;;AAY1C;AAEO,MAAMC,kCAAkCC,yBAAyB,oBAAoB,CAAC;IACzF,gBAAgBL;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
2
|
declare class CmsMutationTypeDefs implements CoreGraphQLSchemaFactory.Interface {
|
|
3
|
+
getSchemaKey: () => string;
|
|
3
4
|
execute(builder: CoreGraphQLSchemaFactory.SchemaBuilder): CoreGraphQLSchemaFactory.Return;
|
|
4
5
|
}
|
|
5
6
|
export declare const CmsMutationTypeDefsImpl: typeof CmsMutationTypeDefs & {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.core.js";
|
|
2
|
+
import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
|
|
2
3
|
class CmsMutationTypeDefs {
|
|
3
4
|
async execute(builder) {
|
|
4
5
|
builder.addTypeDefs(`
|
|
@@ -33,6 +34,9 @@ class CmsMutationTypeDefs {
|
|
|
33
34
|
`);
|
|
34
35
|
return builder;
|
|
35
36
|
}
|
|
37
|
+
constructor(){
|
|
38
|
+
this.getSchemaKey = staticSchemaKey("api-headless-cms/CmsMutationTypeDefs");
|
|
39
|
+
}
|
|
36
40
|
}
|
|
37
41
|
const CmsMutationTypeDefsImpl = CoreGraphQLSchemaFactory.createImplementation({
|
|
38
42
|
implementation: CmsMutationTypeDefs,
|