@webiny/api-headless-cms 0.0.0-unstable.7be00a75a9 → 0.0.0-unstable.7c2def32a7
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/HeadlessCmsEndpointConfig.d.ts +10 -0
- package/HeadlessCmsEndpointConfig.js +5 -0
- package/HeadlessCmsEndpointConfig.js.map +1 -0
- package/HeadlessCmsFeature.d.ts +10 -0
- package/HeadlessCmsFeature.js +168 -0
- package/HeadlessCmsFeature.js.map +1 -0
- package/createCmsRoute.d.ts +24 -0
- package/createCmsRoute.js +47 -0
- package/createCmsRoute.js.map +1 -0
- package/crud/contentEntry/entryDataValidation.d.ts +1 -1
- package/crud/contentEntry/entryDataValidation.js +43 -22
- package/crud/contentEntry/entryDataValidation.js.map +1 -1
- package/crud/contentEntry/references/validateEntries.d.ts +1 -1
- package/crud/contentEntry/references/validateEntries.js +17 -7
- package/crud/contentEntry/references/validateEntries.js.map +1 -1
- package/crud/contentModel/defaultFields.js +3 -2
- package/crud/contentModel/defaultFields.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/modelFields.js +23 -15
- package/domain/contentModel/validation/modelFields.js.map +1 -1
- package/export/abstractions.d.ts +9 -0
- package/export/abstractions.js +6 -0
- package/export/abstractions.js.map +1 -0
- package/export/crud/exporting.js +8 -2
- package/export/crud/exporting.js.map +1 -1
- package/export/crud/importing.js +13 -4
- package/export/crud/importing.js.map +1 -1
- package/export/crud/imports/importGroups.js +23 -23
- package/export/crud/imports/importGroups.js.map +1 -1
- package/export/crud/imports/importModels.js +25 -22
- package/export/crud/imports/importModels.js.map +1 -1
- package/export/graphql/index.d.ts +2 -3
- package/export/graphql/index.js +6 -10
- package/export/graphql/index.js.map +1 -1
- package/exports/api/cms/entry.d.ts +2 -0
- package/exports/api/cms/entry.js +2 -0
- package/exports/api/cms/model.d.ts +4 -1
- package/exports/api/cms/model.js +2 -0
- package/exports/api/cms/storage.d.ts +0 -1
- package/exports/api/cms/storage.js +0 -1
- 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 +6 -0
- package/features/contentEntry/ContentEntriesFeature.js.map +1 -1
- package/features/contentEntry/CreateEntry/CreateEntryRepository.d.ts +9 -5
- package/features/contentEntry/CreateEntry/CreateEntryRepository.js +13 -9
- package/features/contentEntry/CreateEntry/CreateEntryRepository.js.map +1 -1
- package/features/contentEntry/CreateEntry/CreateEntryUseCase.d.ts +5 -3
- package/features/contentEntry/CreateEntry/CreateEntryUseCase.js +5 -7
- package/features/contentEntry/CreateEntry/CreateEntryUseCase.js.map +1 -1
- package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromRepository.d.ts +9 -5
- package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromRepository.js +13 -9
- package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromRepository.js.map +1 -1
- package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromUseCase.d.ts +5 -5
- package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromUseCase.js +8 -17
- 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 +9 -5
- package/features/contentEntry/DeleteEntry/DeleteEntryRepository.js +13 -9
- package/features/contentEntry/DeleteEntry/DeleteEntryRepository.js.map +1 -1
- package/features/contentEntry/DeleteEntry/DeleteEntryUseCase.d.ts +5 -3
- package/features/contentEntry/DeleteEntry/DeleteEntryUseCase.js +4 -5
- package/features/contentEntry/DeleteEntry/DeleteEntryUseCase.js.map +1 -1
- package/features/contentEntry/DeleteEntry/MoveEntryToBinRepository.d.ts +8 -4
- package/features/contentEntry/DeleteEntry/MoveEntryToBinRepository.js +12 -9
- package/features/contentEntry/DeleteEntry/MoveEntryToBinRepository.js.map +1 -1
- package/features/contentEntry/DeleteEntry/MoveEntryToBinUseCase.d.ts +5 -3
- package/features/contentEntry/DeleteEntry/MoveEntryToBinUseCase.js +4 -5
- package/features/contentEntry/DeleteEntry/MoveEntryToBinUseCase.js.map +1 -1
- package/features/contentEntry/DeleteEntry/decorators/ForceDeleteDecorator.d.ts +3 -3
- package/features/contentEntry/DeleteEntry/decorators/ForceDeleteDecorator.js +5 -5
- package/features/contentEntry/DeleteEntry/decorators/ForceDeleteDecorator.js.map +1 -1
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionRepository.d.ts +8 -4
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionRepository.js +14 -9
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionRepository.js.map +1 -1
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionUseCase.d.ts +5 -3
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionUseCase.js +4 -5
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionUseCase.js.map +1 -1
- package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesRepository.d.ts +9 -5
- package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesRepository.js +12 -9
- package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesRepository.js.map +1 -1
- package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesUseCase.d.ts +5 -3
- package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesUseCase.js +4 -5
- 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/GetEntriesByIds/GetEntriesByIdsRepository.d.ts +9 -7
- package/features/contentEntry/GetEntriesByIds/GetEntriesByIdsRepository.js +12 -16
- package/features/contentEntry/GetEntriesByIds/GetEntriesByIdsRepository.js.map +1 -1
- package/features/contentEntry/GetEntriesByIds/GetEntriesByIdsUseCase.d.ts +3 -1
- package/features/contentEntry/GetEntriesByIds/GetEntriesByIdsUseCase.js +2 -3
- package/features/contentEntry/GetEntriesByIds/GetEntriesByIdsUseCase.js.map +1 -1
- package/features/contentEntry/GetEntry/GetEntryUseCase.d.ts +3 -1
- package/features/contentEntry/GetEntry/GetEntryUseCase.js +2 -3
- package/features/contentEntry/GetEntry/GetEntryUseCase.js.map +1 -1
- package/features/contentEntry/GetEntryById/GetEntryByIdUseCase.d.ts +3 -1
- package/features/contentEntry/GetEntryById/GetEntryByIdUseCase.js +2 -3
- package/features/contentEntry/GetEntryById/GetEntryByIdUseCase.js.map +1 -1
- package/features/contentEntry/GetLatestEntriesByIds/GetLatestEntriesByIdsRepository.d.ts +9 -5
- package/features/contentEntry/GetLatestEntriesByIds/GetLatestEntriesByIdsRepository.js +12 -9
- package/features/contentEntry/GetLatestEntriesByIds/GetLatestEntriesByIdsRepository.js.map +1 -1
- package/features/contentEntry/GetLatestEntriesByIds/GetLatestEntriesByIdsUseCase.d.ts +3 -1
- package/features/contentEntry/GetLatestEntriesByIds/GetLatestEntriesByIdsUseCase.js +2 -3
- package/features/contentEntry/GetLatestEntriesByIds/GetLatestEntriesByIdsUseCase.js.map +1 -1
- package/features/contentEntry/GetLatestRevisionByEntryId/BaseUseCase.d.ts +3 -1
- package/features/contentEntry/GetLatestRevisionByEntryId/BaseUseCase.js +2 -3
- package/features/contentEntry/GetLatestRevisionByEntryId/BaseUseCase.js.map +1 -1
- package/features/contentEntry/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdRepository.d.ts +9 -5
- package/features/contentEntry/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdRepository.js +12 -9
- package/features/contentEntry/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdRepository.js.map +1 -1
- package/features/contentEntry/GetLatestRevisionByEntryId/variations/GetLatestDeletedRevisionByEntryIdUseCase.d.ts +3 -1
- package/features/contentEntry/GetLatestRevisionByEntryId/variations/GetLatestDeletedRevisionByEntryIdUseCase.js +2 -3
- package/features/contentEntry/GetLatestRevisionByEntryId/variations/GetLatestDeletedRevisionByEntryIdUseCase.js.map +1 -1
- package/features/contentEntry/GetLatestRevisionByEntryId/variations/GetLatestRevisionByEntryIdIncludingDeletedUseCase.d.ts +3 -1
- package/features/contentEntry/GetLatestRevisionByEntryId/variations/GetLatestRevisionByEntryIdIncludingDeletedUseCase.js +1 -3
- package/features/contentEntry/GetLatestRevisionByEntryId/variations/GetLatestRevisionByEntryIdIncludingDeletedUseCase.js.map +1 -1
- package/features/contentEntry/GetLatestRevisionByEntryId/variations/GetLatestRevisionByEntryIdUseCase.d.ts +3 -1
- package/features/contentEntry/GetLatestRevisionByEntryId/variations/GetLatestRevisionByEntryIdUseCase.js +2 -3
- package/features/contentEntry/GetLatestRevisionByEntryId/variations/GetLatestRevisionByEntryIdUseCase.js.map +1 -1
- package/features/contentEntry/GetPreviousRevisionByEntryId/BaseUseCase.d.ts +3 -1
- package/features/contentEntry/GetPreviousRevisionByEntryId/BaseUseCase.js +2 -3
- package/features/contentEntry/GetPreviousRevisionByEntryId/BaseUseCase.js.map +1 -1
- package/features/contentEntry/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdRepository.d.ts +9 -5
- package/features/contentEntry/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdRepository.js +12 -9
- package/features/contentEntry/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdRepository.js.map +1 -1
- package/features/contentEntry/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdUseCase.d.ts +3 -1
- package/features/contentEntry/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdUseCase.js +2 -3
- package/features/contentEntry/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdUseCase.js.map +1 -1
- package/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsRepository.d.ts +9 -5
- package/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsRepository.js +12 -9
- package/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsRepository.js.map +1 -1
- package/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsUseCase.d.ts +3 -1
- package/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsUseCase.js +2 -3
- package/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsUseCase.js.map +1 -1
- package/features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdRepository.d.ts +9 -5
- package/features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdRepository.js +12 -9
- package/features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdRepository.js.map +1 -1
- package/features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdUseCase.d.ts +3 -1
- package/features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdUseCase.js +2 -3
- package/features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdUseCase.js.map +1 -1
- package/features/contentEntry/GetRevisionById/GetRevisionByIdRepository.d.ts +9 -5
- package/features/contentEntry/GetRevisionById/GetRevisionByIdRepository.js +12 -9
- package/features/contentEntry/GetRevisionById/GetRevisionByIdRepository.js.map +1 -1
- package/features/contentEntry/GetRevisionById/GetRevisionByIdUseCase.d.ts +3 -1
- package/features/contentEntry/GetRevisionById/GetRevisionByIdUseCase.js +1 -3
- package/features/contentEntry/GetRevisionById/GetRevisionByIdUseCase.js.map +1 -1
- package/features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdRepository.d.ts +9 -5
- package/features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdRepository.js +12 -9
- package/features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdRepository.js.map +1 -1
- package/features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdUseCase.d.ts +3 -1
- package/features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdUseCase.js +2 -3
- package/features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdUseCase.js.map +1 -1
- package/features/contentEntry/GetSingletonEntry/GetSingletonEntryUseCase.js +1 -3
- package/features/contentEntry/GetSingletonEntry/GetSingletonEntryUseCase.js.map +1 -1
- package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesRepository.d.ts +9 -5
- package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesRepository.js +12 -9
- package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesRepository.js.map +1 -1
- package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesUseCase.d.ts +6 -2
- package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesUseCase.js +8 -6
- package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesUseCase.js.map +1 -1
- package/features/contentEntry/ListEntries/ListDeletedEntriesUseCase.d.ts +3 -1
- package/features/contentEntry/ListEntries/ListDeletedEntriesUseCase.js +1 -3
- package/features/contentEntry/ListEntries/ListDeletedEntriesUseCase.js.map +1 -1
- package/features/contentEntry/ListEntries/ListEntriesRepository.d.ts +9 -5
- package/features/contentEntry/ListEntries/ListEntriesRepository.js +12 -9
- package/features/contentEntry/ListEntries/ListEntriesRepository.js.map +1 -1
- package/features/contentEntry/ListEntries/ListEntriesUseCase.d.ts +3 -1
- package/features/contentEntry/ListEntries/ListEntriesUseCase.js +2 -3
- package/features/contentEntry/ListEntries/ListEntriesUseCase.js.map +1 -1
- package/features/contentEntry/ListEntries/ListLatestEntriesUseCase.d.ts +3 -1
- package/features/contentEntry/ListEntries/ListLatestEntriesUseCase.js +1 -3
- package/features/contentEntry/ListEntries/ListLatestEntriesUseCase.js.map +1 -1
- package/features/contentEntry/ListEntries/ListPublishedEntriesUseCase.d.ts +3 -1
- package/features/contentEntry/ListEntries/ListPublishedEntriesUseCase.js +1 -3
- package/features/contentEntry/ListEntries/ListPublishedEntriesUseCase.js.map +1 -1
- package/features/contentEntry/MoveEntry/MoveEntryRepository.d.ts +9 -5
- package/features/contentEntry/MoveEntry/MoveEntryRepository.js +12 -9
- package/features/contentEntry/MoveEntry/MoveEntryRepository.js.map +1 -1
- package/features/contentEntry/MoveEntry/MoveEntryUseCase.d.ts +5 -3
- package/features/contentEntry/MoveEntry/MoveEntryUseCase.js +4 -5
- package/features/contentEntry/MoveEntry/MoveEntryUseCase.js.map +1 -1
- package/features/contentEntry/PublishEntry/PublishEntryRepository.d.ts +9 -5
- package/features/contentEntry/PublishEntry/PublishEntryRepository.js +13 -9
- package/features/contentEntry/PublishEntry/PublishEntryRepository.js.map +1 -1
- package/features/contentEntry/PublishEntry/PublishEntryUseCase.d.ts +7 -7
- package/features/contentEntry/PublishEntry/PublishEntryUseCase.js +13 -16
- 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 +11 -5
- package/features/contentEntry/RepublishEntry/RepublishEntryRepository.js +17 -10
- package/features/contentEntry/RepublishEntry/RepublishEntryRepository.js.map +1 -1
- package/features/contentEntry/RepublishEntry/RepublishEntryUseCase.d.ts +5 -3
- package/features/contentEntry/RepublishEntry/RepublishEntryUseCase.js +7 -6
- package/features/contentEntry/RepublishEntry/RepublishEntryUseCase.js.map +1 -1
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinRepository.d.ts +9 -5
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinRepository.js +13 -9
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinRepository.js.map +1 -1
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinUseCase.d.ts +5 -3
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinUseCase.js +4 -5
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinUseCase.js.map +1 -1
- package/features/contentEntry/UnpublishEntry/UnpublishEntryRepository.d.ts +9 -5
- package/features/contentEntry/UnpublishEntry/UnpublishEntryRepository.js +13 -9
- package/features/contentEntry/UnpublishEntry/UnpublishEntryRepository.js.map +1 -1
- package/features/contentEntry/UnpublishEntry/UnpublishEntryUseCase.d.ts +5 -3
- package/features/contentEntry/UnpublishEntry/UnpublishEntryUseCase.js +7 -6
- package/features/contentEntry/UnpublishEntry/UnpublishEntryUseCase.js.map +1 -1
- package/features/contentEntry/UpdateEntry/UpdateEntryRepository.d.ts +9 -5
- package/features/contentEntry/UpdateEntry/UpdateEntryRepository.js +13 -9
- package/features/contentEntry/UpdateEntry/UpdateEntryRepository.js.map +1 -1
- package/features/contentEntry/UpdateEntry/UpdateEntryUseCase.d.ts +5 -3
- package/features/contentEntry/UpdateEntry/UpdateEntryUseCase.js +7 -6
- package/features/contentEntry/UpdateEntry/UpdateEntryUseCase.js.map +1 -1
- package/features/contentEntry/UpdateRevisionDescription/UpdateRevisionDescriptionUseCase.d.ts +6 -9
- package/features/contentEntry/UpdateRevisionDescription/UpdateRevisionDescriptionUseCase.js +7 -17
- package/features/contentEntry/UpdateRevisionDescription/UpdateRevisionDescriptionUseCase.js.map +1 -1
- package/features/contentEntry/ValidateEntry/ValidateEntryUseCase.d.ts +3 -1
- package/features/contentEntry/ValidateEntry/ValidateEntryUseCase.js +2 -3
- package/features/contentEntry/ValidateEntry/ValidateEntryUseCase.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 +6 -2
- package/features/contentEntry/entryDataFactories/CreateEntryDataFactory/CreateEntryDataFactory.js +10 -6
- package/features/contentEntry/entryDataFactories/CreateEntryDataFactory/CreateEntryDataFactory.js.map +1 -1
- package/features/contentEntry/entryDataFactories/CreateEntryRevisionFromDataFactory/CreateEntryRevisionFromDataFactory.d.ts +10 -6
- package/features/contentEntry/entryDataFactories/CreateEntryRevisionFromDataFactory/CreateEntryRevisionFromDataFactory.js +49 -20
- 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 +8 -4
- package/features/contentEntry/entryDataFactories/CreatePublishEntryDataFactory/CreatePublishEntryDataFactory.js +23 -18
- 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 +8 -4
- package/features/contentEntry/entryDataFactories/CreateRepublishEntryDataFactory/CreateRepublishEntryDataFactory.js +18 -15
- 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 +9 -7
- package/features/contentEntry/entryDataFactories/CreateUnpublishEntryDataFactory/CreateUnpublishEntryDataFactory.js +18 -20
- 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 +10 -4
- package/features/contentEntry/entryDataFactories/UpdateEntryDataFactory/UpdateEntryDataFactory.js +74 -32
- 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/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 +6 -0
- package/features/contentModel/ContentModelFeature.js.map +1 -1
- package/features/contentModel/CreateModel/CreateModelRepository.d.ts +4 -3
- package/features/contentModel/CreateModel/CreateModelRepository.js +6 -5
- package/features/contentModel/CreateModel/CreateModelRepository.js.map +1 -1
- package/features/contentModel/CreateModelFrom/CreateModelFromRepository.d.ts +4 -3
- package/features/contentModel/CreateModelFrom/CreateModelFromRepository.js +6 -5
- package/features/contentModel/CreateModelFrom/CreateModelFromRepository.js.map +1 -1
- package/features/contentModel/DeleteModel/DeleteModelRepository.d.ts +6 -4
- package/features/contentModel/DeleteModel/DeleteModelRepository.js +10 -6
- package/features/contentModel/DeleteModel/DeleteModelRepository.js.map +1 -1
- package/features/contentModel/DeleteModel/DeleteModelWithEntryCleanup.d.ts +9 -3
- package/features/contentModel/DeleteModel/DeleteModelWithEntryCleanup.js +36 -18
- 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 +9 -4
- package/features/contentModel/UpdateModel/UpdateModelRepository.js +17 -9
- 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.d.ts +16 -0
- package/features/contentModel/ValuesSelectionGenerator/ValuesSelectionGenerator.js +54 -0
- package/features/contentModel/ValuesSelectionGenerator/ValuesSelectionGenerator.js.map +1 -0
- package/features/contentModel/ValuesSelectionGenerator/abstractions.d.ts +8 -0
- package/features/contentModel/ValuesSelectionGenerator/abstractions.js +5 -0
- package/features/contentModel/ValuesSelectionGenerator/abstractions.js.map +1 -0
- package/features/contentModel/ValuesSelectionGenerator/feature.d.ts +4 -0
- package/features/contentModel/ValuesSelectionGenerator/feature.js +11 -0
- package/features/contentModel/ValuesSelectionGenerator/feature.js.map +1 -0
- package/features/contentModel/ValuesSelectionGenerator/index.d.ts +1 -0
- package/features/contentModel/ValuesSelectionGenerator/index.js +1 -0
- package/features/contentModel/shared/ModelsFetcher.d.ts +9 -8
- package/features/contentModel/shared/ModelsFetcher.js +5 -5
- package/features/contentModel/shared/ModelsFetcher.js.map +1 -1
- package/features/contentModel/shared/PluginModelsProvider.d.ts +9 -5
- package/features/contentModel/shared/PluginModelsProvider.js +11 -15
- package/features/contentModel/shared/PluginModelsProvider.js.map +1 -1
- package/features/contentModel/shared/abstractions.d.ts +10 -0
- package/features/contentModel/shared/abstractions.js +2 -1
- package/features/contentModel/shared/abstractions.js.map +1 -1
- package/features/contentModelGroup/CreateGroup/CreateGroupRepository.d.ts +10 -4
- package/features/contentModelGroup/CreateGroup/CreateGroupRepository.js +18 -14
- package/features/contentModelGroup/CreateGroup/CreateGroupRepository.js.map +1 -1
- package/features/contentModelGroup/CreateGroup/CreateGroupUseCase.d.ts +3 -1
- package/features/contentModelGroup/CreateGroup/CreateGroupUseCase.js +2 -3
- package/features/contentModelGroup/CreateGroup/CreateGroupUseCase.js.map +1 -1
- package/features/contentModelGroup/DeleteGroup/DeleteGroupRepository.d.ts +11 -5
- package/features/contentModelGroup/DeleteGroup/DeleteGroupRepository.js +16 -10
- package/features/contentModelGroup/DeleteGroup/DeleteGroupRepository.js.map +1 -1
- package/features/contentModelGroup/DeleteGroup/DeleteGroupUseCase.d.ts +3 -1
- package/features/contentModelGroup/DeleteGroup/DeleteGroupUseCase.js +2 -3
- package/features/contentModelGroup/DeleteGroup/DeleteGroupUseCase.js.map +1 -1
- package/features/contentModelGroup/GetGroup/GetGroupRepository.d.ts +6 -4
- package/features/contentModelGroup/GetGroup/GetGroupRepository.js +9 -9
- package/features/contentModelGroup/GetGroup/GetGroupRepository.js.map +1 -1
- package/features/contentModelGroup/GetGroup/GetGroupUseCase.d.ts +3 -1
- package/features/contentModelGroup/GetGroup/GetGroupUseCase.js +2 -3
- package/features/contentModelGroup/GetGroup/GetGroupUseCase.js.map +1 -1
- package/features/contentModelGroup/ListGroups/ListGroupsRepository.d.ts +6 -4
- package/features/contentModelGroup/ListGroups/ListGroupsRepository.js +9 -9
- package/features/contentModelGroup/ListGroups/ListGroupsRepository.js.map +1 -1
- package/features/contentModelGroup/ListGroups/ListGroupsUseCase.d.ts +3 -1
- package/features/contentModelGroup/ListGroups/ListGroupsUseCase.js +2 -3
- package/features/contentModelGroup/ListGroups/ListGroupsUseCase.js.map +1 -1
- package/features/contentModelGroup/UpdateGroup/UpdateGroupRepository.d.ts +9 -5
- package/features/contentModelGroup/UpdateGroup/UpdateGroupRepository.js +13 -10
- package/features/contentModelGroup/UpdateGroup/UpdateGroupRepository.js.map +1 -1
- package/features/contentModelGroup/UpdateGroup/UpdateGroupUseCase.d.ts +3 -1
- package/features/contentModelGroup/UpdateGroup/UpdateGroupUseCase.js +4 -5
- 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/contentModelGroup/shared/PluginGroupsProvider.d.ts +6 -4
- package/features/contentModelGroup/shared/PluginGroupsProvider.js +13 -11
- package/features/contentModelGroup/shared/PluginGroupsProvider.js.map +1 -1
- package/features/contentModelGroup/shared/abstractions.d.ts +10 -0
- package/features/contentModelGroup/shared/abstractions.js +2 -1
- package/features/contentModelGroup/shared/abstractions.js.map +1 -1
- package/features/graphql/feature.js +2 -0
- package/features/graphql/feature.js.map +1 -1
- package/features/graphql/fields/abstractions/CmsModelFieldToGraphQL.d.ts +2 -2
- package/features/graphql/fields/abstractions/CmsModelFieldToGraphQL.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.d.ts +1 -1
- package/features/graphql/fields/base/RefToGraphQL.js +25 -9
- package/features/graphql/fields/base/RefToGraphQL.js.map +1 -1
- package/features/graphql/fields/base/richText/richTextResolver.d.ts +1 -1
- package/features/graphql/fields/base/richText/richTextResolver.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 +71 -18
- 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/TextFieldType.d.ts +3 -1
- package/features/modelBuilder/fields/TextFieldType.js +1 -3
- package/features/modelBuilder/fields/TextFieldType.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/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 +8 -16
- package/features/shared/abstractions.js +2 -3
- package/features/shared/abstractions.js.map +1 -1
- package/features/shared/storageOperations/entry/CreateEntryRevisionFromStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/CreateEntryRevisionFromStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/CreateEntryRevisionFromStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/CreateEntryStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/CreateEntryStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/CreateEntryStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/DeleteEntryRevisionStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/DeleteEntryRevisionStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/DeleteEntryRevisionStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/DeleteEntryStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/DeleteEntryStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/DeleteEntryStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/DeleteMultipleEntriesStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/DeleteMultipleEntriesStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/DeleteMultipleEntriesStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/GetEntriesByIdsStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/GetEntriesByIdsStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/GetEntriesByIdsStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/GetEntryStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/GetEntryStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/GetEntryStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/GetLatestEntriesByIdsStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/GetLatestEntriesByIdsStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/GetLatestEntriesByIdsStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/GetLatestRevisionByEntryIdStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/GetLatestRevisionByEntryIdStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/GetLatestRevisionByEntryIdStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/GetPreviousRevisionStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/GetPreviousRevisionStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/GetPreviousRevisionStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/GetPublishedEntriesByIdsStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/GetPublishedEntriesByIdsStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/GetPublishedEntriesByIdsStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/GetPublishedRevisionByEntryIdStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/GetPublishedRevisionByEntryIdStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/GetPublishedRevisionByEntryIdStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/GetRevisionByIdStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/GetRevisionByIdStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/GetRevisionByIdStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/GetRevisionsStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/GetRevisionsStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/GetRevisionsStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/GetUniqueFieldValuesStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/GetUniqueFieldValuesStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/GetUniqueFieldValuesStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/ListEntriesStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/ListEntriesStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/ListEntriesStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/MoveEntryStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/MoveEntryStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/MoveEntryStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/MoveToBinStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/MoveToBinStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/MoveToBinStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/PublishEntryStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/PublishEntryStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/PublishEntryStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/RestoreFromBinStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/RestoreFromBinStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/RestoreFromBinStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/UnpublishEntryStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/UnpublishEntryStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/UnpublishEntryStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/entry/UpdateEntryStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/entry/UpdateEntryStorageOperation.js +5 -0
- package/features/shared/storageOperations/entry/UpdateEntryStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/group/CreateGroupStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/group/CreateGroupStorageOperation.js +5 -0
- package/features/shared/storageOperations/group/CreateGroupStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/group/DeleteGroupStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/group/DeleteGroupStorageOperation.js +5 -0
- package/features/shared/storageOperations/group/DeleteGroupStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/group/GetGroupStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/group/GetGroupStorageOperation.js +5 -0
- package/features/shared/storageOperations/group/GetGroupStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/group/ListGroupsStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/group/ListGroupsStorageOperation.js +5 -0
- package/features/shared/storageOperations/group/ListGroupsStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/group/UpdateGroupStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/group/UpdateGroupStorageOperation.js +5 -0
- package/features/shared/storageOperations/group/UpdateGroupStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/index.d.ts +32 -0
- package/features/shared/storageOperations/index.js +32 -0
- package/features/shared/storageOperations/model/CreateModelStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/model/CreateModelStorageOperation.js +5 -0
- package/features/shared/storageOperations/model/CreateModelStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/model/DeleteModelStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/model/DeleteModelStorageOperation.js +5 -0
- package/features/shared/storageOperations/model/DeleteModelStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/model/GetModelStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/model/GetModelStorageOperation.js +5 -0
- package/features/shared/storageOperations/model/GetModelStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/model/ListModelsStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/model/ListModelsStorageOperation.js +5 -0
- package/features/shared/storageOperations/model/ListModelsStorageOperation.js.map +1 -0
- package/features/shared/storageOperations/model/UpdateModelStorageOperation.d.ts +8 -0
- package/features/shared/storageOperations/model/UpdateModelStorageOperation.js +5 -0
- package/features/shared/storageOperations/model/UpdateModelStorageOperation.js.map +1 -0
- package/features/sortMapper/SortMapper.js +2 -5
- package/features/sortMapper/SortMapper.js.map +1 -1
- package/features/storage/fields/ObjectStorageTransform.js +27 -7
- package/features/storage/fields/ObjectStorageTransform.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 +7 -5
- 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/fieldConverters/abstractions.d.ts +14 -0
- package/fieldConverters/abstractions.js +13 -0
- package/fieldConverters/abstractions.js.map +1 -0
- package/fieldConverters/index.d.ts +1 -1
- package/graphql/CmsGraphQLSchemaFactory.d.ts +8 -0
- package/graphql/CmsGraphQLSchemaFactory.js +5 -0
- package/graphql/CmsGraphQLSchemaFactory.js.map +1 -0
- package/graphql/CmsSchemaExecutor.d.ts +10 -0
- package/graphql/CmsSchemaExecutor.js +5 -0
- package/graphql/CmsSchemaExecutor.js.map +1 -0
- package/graphql/buildSchemaPlugins.d.ts +2 -1
- package/graphql/buildSchemaPlugins.js +1 -3
- package/graphql/buildSchemaPlugins.js.map +1 -1
- package/graphql/checkEndpointAccess.js +5 -2
- package/graphql/checkEndpointAccess.js.map +1 -1
- package/graphql/createExecutableSchema.d.ts +1 -1
- package/graphql/createExecutableSchema.js +1 -1
- package/graphql/createExecutableSchema.js.map +1 -1
- package/graphql/generateSchema.d.ts +2 -1
- package/graphql/generateSchema.js +14 -5
- package/graphql/generateSchema.js.map +1 -1
- package/graphql/getSchema.js +7 -2
- package/graphql/getSchema.js.map +1 -1
- package/graphql/scalars/RevisionIdScalarPlugin.d.ts +1 -1
- package/graphql/scalars/RevisionIdScalarPlugin.js.map +1 -1
- package/graphql/schema/baseContentSchema.d.ts +1 -6
- package/graphql/schema/baseContentSchema.js +5 -8
- package/graphql/schema/baseContentSchema.js.map +1 -1
- package/graphql/schema/baseSchema.d.ts +2 -2
- package/graphql/schema/baseSchema.js +6 -41
- package/graphql/schema/baseSchema.js.map +1 -1
- package/graphql/schema/cms/CmsBaseErrorTypeFactory.d.ts +15 -0
- package/graphql/schema/cms/CmsBaseErrorTypeFactory.js +25 -0
- package/graphql/schema/cms/CmsBaseErrorTypeFactory.js.map +1 -0
- package/graphql/schema/cms/createEntryResolver.js +2 -2
- package/graphql/schema/cms/createEntryResolver.js.map +1 -1
- package/graphql/schema/cms/deleteEntryResolver.js +2 -2
- package/graphql/schema/cms/deleteEntryResolver.js.map +1 -1
- package/graphql/schema/cms/getEntryResolver.js +5 -4
- 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/getModel.d.ts +0 -3
- package/graphql/schema/cms/helpers/getModel.js +5 -3
- package/graphql/schema/cms/helpers/getModel.js.map +1 -1
- 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 +5 -4
- package/graphql/schema/cms/listEntriesResolver.js.map +1 -1
- package/graphql/schema/cms/publishEntryResolver.js +2 -2
- package/graphql/schema/cms/publishEntryResolver.js.map +1 -1
- package/graphql/schema/cms/resolvers/createEntry.d.ts +3 -2
- package/graphql/schema/cms/resolvers/createEntry.js +5 -1
- package/graphql/schema/cms/resolvers/createEntry.js.map +1 -1
- package/graphql/schema/cms/resolvers/deleteEntryRevision.d.ts +3 -2
- package/graphql/schema/cms/resolvers/deleteEntryRevision.js +5 -1
- package/graphql/schema/cms/resolvers/deleteEntryRevision.js.map +1 -1
- package/graphql/schema/cms/resolvers/getEntry.d.ts +3 -2
- package/graphql/schema/cms/resolvers/getEntry.js +5 -1
- 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 +3 -2
- package/graphql/schema/cms/resolvers/listEntries.js +5 -1
- package/graphql/schema/cms/resolvers/listEntries.js.map +1 -1
- package/graphql/schema/cms/resolvers/mutationCms.d.ts +3 -2
- package/graphql/schema/cms/resolvers/mutationCms.js +5 -1
- package/graphql/schema/cms/resolvers/mutationCms.js.map +1 -1
- package/graphql/schema/cms/resolvers/publishEntryRevision.d.ts +3 -2
- package/graphql/schema/cms/resolvers/publishEntryRevision.js +5 -1
- package/graphql/schema/cms/resolvers/publishEntryRevision.js.map +1 -1
- package/graphql/schema/cms/resolvers/queryCms.d.ts +3 -2
- package/graphql/schema/cms/resolvers/queryCms.js +5 -1
- package/graphql/schema/cms/resolvers/queryCms.js.map +1 -1
- package/graphql/schema/cms/resolvers/unpublishEntryRevision.d.ts +3 -2
- package/graphql/schema/cms/resolvers/unpublishEntryRevision.js +5 -1
- package/graphql/schema/cms/resolvers/unpublishEntryRevision.js.map +1 -1
- package/graphql/schema/cms/resolvers/updateEntryRevision.d.ts +3 -2
- package/graphql/schema/cms/resolvers/updateEntryRevision.js +5 -1
- package/graphql/schema/cms/resolvers/updateEntryRevision.js.map +1 -1
- package/graphql/schema/cms/typeDefs/mutation.d.ts +3 -2
- package/graphql/schema/cms/typeDefs/mutation.js +5 -1
- package/graphql/schema/cms/typeDefs/mutation.js.map +1 -1
- package/graphql/schema/cms/typeDefs/query.d.ts +3 -2
- package/graphql/schema/cms/typeDefs/query.js +6 -1
- package/graphql/schema/cms/typeDefs/query.js.map +1 -1
- package/graphql/schema/cms/typeDefs/responses.d.ts +3 -2
- package/graphql/schema/cms/typeDefs/responses.js +10 -1
- package/graphql/schema/cms/typeDefs/responses.js.map +1 -1
- package/graphql/schema/cms/unpublishEntryResolver.js +2 -2
- package/graphql/schema/cms/unpublishEntryResolver.js.map +1 -1
- package/graphql/schema/cms/updateEntryResolver.js +2 -2
- package/graphql/schema/cms/updateEntryResolver.js.map +1 -1
- package/graphql/schema/contentEntries.js +60 -34
- package/graphql/schema/contentEntries.js.map +1 -1
- package/graphql/schema/contentModelGroups.js +39 -18
- package/graphql/schema/contentModelGroups.js.map +1 -1
- package/graphql/schema/contentModels.js +70 -16
- package/graphql/schema/contentModels.js.map +1 -1
- package/graphql/schema/createFieldResolvers.d.ts +1 -1
- package/graphql/schema/createFieldResolvers.js.map +1 -1
- package/graphql/schema/createManageResolvers.js +7 -3
- 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/createSingularSDL.js +2 -0
- package/graphql/schema/createSingularSDL.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreate.js +5 -3
- package/graphql/schema/resolvers/manage/resolveCreate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreateFrom.js +5 -3
- package/graphql/schema/resolvers/manage/resolveCreateFrom.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDelete.js +9 -4
- package/graphql/schema/resolvers/manage/resolveDelete.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDeleteMultiple.js +5 -3
- package/graphql/schema/resolvers/manage/resolveDeleteMultiple.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/graphql/schema/resolvers/manage/resolveGet.js +11 -6
- package/graphql/schema/resolvers/manage/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetByIds.js +5 -3
- package/graphql/schema/resolvers/manage/resolveGetByIds.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetRevisions.js +5 -3
- package/graphql/schema/resolvers/manage/resolveGetRevisions.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.js +5 -3
- package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveList.js +5 -3
- package/graphql/schema/resolvers/manage/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveListDeleted.js +5 -3
- package/graphql/schema/resolvers/manage/resolveListDeleted.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveMove.js +4 -2
- package/graphql/schema/resolvers/manage/resolveMove.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolvePublish.js +5 -3
- package/graphql/schema/resolvers/manage/resolvePublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveRepublish.js +5 -3
- package/graphql/schema/resolvers/manage/resolveRepublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveRestoreFromBin.js +5 -3
- package/graphql/schema/resolvers/manage/resolveRestoreFromBin.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUnpublish.js +5 -3
- package/graphql/schema/resolvers/manage/resolveUnpublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUpdate.js +5 -3
- package/graphql/schema/resolvers/manage/resolveUpdate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUpdateRevisionDescription.js +5 -3
- package/graphql/schema/resolvers/manage/resolveUpdateRevisionDescription.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveValidate.js +5 -3
- package/graphql/schema/resolvers/manage/resolveValidate.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveGet.js +6 -3
- package/graphql/schema/resolvers/preview/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveList.js +5 -3
- package/graphql/schema/resolvers/preview/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveGet.js +5 -2
- package/graphql/schema/resolvers/read/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveList.js +5 -3
- package/graphql/schema/resolvers/read/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/singular/resolveGet.js +1 -1
- package/graphql/schema/resolvers/singular/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/singular/resolveUpdate.js +1 -1
- package/graphql/schema/resolvers/singular/resolveUpdate.js.map +1 -1
- package/graphql/schema/schemaPlugins.d.ts +2 -1
- package/graphql/schema/schemaPlugins.js +2 -4
- package/graphql/schema/schemaPlugins.js.map +1 -1
- package/index.d.ts +7 -6
- package/index.js +4 -22
- package/legacy/abstractions.js.map +1 -1
- package/package.json +27 -33
- package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.d.ts +2 -2
- package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.js +1 -1
- package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.js.map +1 -1
- package/plugins/CmsModelPlugin.js +2 -1
- package/plugins/CmsModelPlugin.js.map +1 -1
- package/plugins/index.d.ts +0 -1
- package/plugins/index.js +0 -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 +11 -290
- package/types/types.js.map +1 -1
- package/utils/contentModelToJsonSchema/CmsModelToJsonSchemaConverter.d.ts +28 -0
- package/utils/contentModelToJsonSchema/CmsModelToJsonSchemaConverter.js +324 -0
- package/utils/contentModelToJsonSchema/CmsModelToJsonSchemaConverter.js.map +1 -0
- package/utils/contentModelToJsonSchema/index.d.ts +2 -0
- package/utils/contentModelToJsonSchema/index.js +1 -0
- package/utils/contentModelToJsonSchema/types.d.ts +24 -0
- package/utils/converters/ConverterCollection.d.ts +2 -2
- package/utils/converters/ConverterCollection.js +1 -3
- package/utils/converters/ConverterCollection.js.map +1 -1
- package/utils/converters/valueKeyFromStorageConverter.d.ts +2 -2
- package/utils/converters/valueKeyFromStorageConverter.js +2 -2
- package/utils/converters/valueKeyFromStorageConverter.js.map +1 -1
- package/utils/converters/valueKeyStorageConverter.js +4 -2
- package/utils/converters/valueKeyStorageConverter.js.map +1 -1
- package/utils/converters/valueKeyToStorageConverter.d.ts +2 -2
- package/utils/converters/valueKeyToStorageConverter.js +2 -2
- package/utils/converters/valueKeyToStorageConverter.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/getSchemaFromFieldPlugins.d.ts +2 -2
- package/utils/getSchemaFromFieldPlugins.js.map +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/isHeadlessCmsReady.d.ts +1 -1
- package/utils/isHeadlessCmsReady.js +3 -2
- package/utils/isHeadlessCmsReady.js.map +1 -1
- package/abstractions/entryHooks/OnEntryBeforeCreate.d.ts +0 -8
- package/abstractions/entryHooks/OnEntryBeforeCreate.js +0 -5
- package/abstractions/entryHooks/OnEntryBeforeCreate.js.map +0 -1
- package/abstractions/entryHooks/index.d.ts +0 -1
- package/abstractions/entryHooks/index.js +0 -1
- package/abstractions/index.d.ts +0 -1
- package/abstractions/index.js +0 -1
- package/context.d.ts +0 -3
- package/context.js +0 -131
- package/context.js.map +0 -1
- package/crud/contentEntry.crud.d.ts +0 -6
- package/crud/contentEntry.crud.js +0 -334
- package/crud/contentEntry.crud.js.map +0 -1
- package/crud/contentModel.crud.d.ts +0 -5
- package/crud/contentModel.crud.js +0 -77
- package/crud/contentModel.crud.js.map +0 -1
- package/crud/contentModelGroup.crud.d.ts +0 -5
- package/crud/contentModelGroup.crud.js +0 -74
- package/crud/contentModelGroup.crud.js.map +0 -1
- package/extensions/entryHooks/OnEntryBeforeCreate.d.ts +0 -4
- package/extensions/entryHooks/OnEntryBeforeCreate.js +0 -21
- package/extensions/entryHooks/OnEntryBeforeCreate.js.map +0 -1
- package/extensions/entryHooks/index.d.ts +0 -1
- package/extensions/entryHooks/index.js +0 -1
- package/extensions/index.d.ts +0 -5
- package/extensions/index.js +0 -7
- package/extensions/index.js.map +0 -1
- package/graphql/graphQLHandlerFactory.d.ts +0 -5
- package/graphql/graphQLHandlerFactory.js +0 -22
- package/graphql/graphQLHandlerFactory.js.map +0 -1
- package/graphql/handleRequest.d.ts +0 -11
- package/graphql/handleRequest.js +0 -62
- package/graphql/handleRequest.js.map +0 -1
- package/graphql/index.d.ts +0 -4
- package/graphql/index.js +0 -11
- package/graphql/index.js.map +0 -1
- package/graphql/schema/cms/index.d.ts +0 -2
- package/graphql/schema/cms/index.js +0 -24
- package/graphql/schema/cms/index.js.map +0 -1
- package/index.js.map +0 -1
- package/parameters/context.d.ts +0 -2
- package/parameters/context.js +0 -7
- package/parameters/context.js.map +0 -1
- package/parameters/header.d.ts +0 -2
- package/parameters/header.js +0 -13
- package/parameters/header.js.map +0 -1
- package/parameters/index.d.ts +0 -3
- package/parameters/index.js +0 -3
- package/parameters/path.d.ts +0 -2
- package/parameters/path.js +0 -12
- package/parameters/path.js.map +0 -1
- package/plugins/CmsParametersPlugin.d.ts +0 -18
- package/plugins/CmsParametersPlugin.js +0 -16
- package/plugins/CmsParametersPlugin.js.map +0 -1
- package/types/context.d.ts +0 -110
- /package/{types/context.js → utils/contentModelToJsonSchema/types.js} +0 -0
package/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsRepository.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { Result } from "@webiny/feature/api";
|
|
2
2
|
import { GetPublishedEntriesByIdsRepository as RepositoryAbstraction } from "./abstractions.js";
|
|
3
3
|
import type { CmsEntry, CmsEntryValues, CmsModel } from "../../../types/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { GetPublishedEntriesByIdsStorageOperation } from "../../../features/shared/storageOperations/entry/GetPublishedEntriesByIdsStorageOperation.js";
|
|
5
5
|
import { EntryFromStorageTransform } from "../../../legacy/abstractions.js";
|
|
6
|
+
import { RuntimeTenant } from "../../../features/runtimeTenant/abstractions.js";
|
|
6
7
|
/**
|
|
7
8
|
* GetPublishedEntriesByIdsRepository - Fetches published entries by entry IDs from storage.
|
|
8
9
|
* Returns array of published entries.
|
|
9
10
|
*/
|
|
10
11
|
declare class GetPublishedEntriesByIdsRepositoryImpl implements RepositoryAbstraction.Interface {
|
|
11
12
|
private entryFromStorageTransform;
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
private getPublishedEntriesByIdsStorage;
|
|
14
|
+
private runtimeTenant;
|
|
15
|
+
constructor(entryFromStorageTransform: EntryFromStorageTransform.Interface, getPublishedEntriesByIdsStorage: GetPublishedEntriesByIdsStorageOperation.Interface, runtimeTenant: RuntimeTenant.Interface);
|
|
16
|
+
execute<T extends CmsEntryValues>(initialModel: CmsModel, ids: string[]): Promise<Result<CmsEntry<T>[], RepositoryAbstraction.Error>>;
|
|
15
17
|
}
|
|
16
|
-
export declare const GetPublishedEntriesByIdsRepository:
|
|
18
|
+
export declare const GetPublishedEntriesByIdsRepository: typeof GetPublishedEntriesByIdsRepositoryImpl & {
|
|
19
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IGetPublishedEntriesByIdsRepository>;
|
|
20
|
+
};
|
|
17
21
|
export {};
|
package/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsRepository.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { Result
|
|
1
|
+
import { Result } from "@webiny/feature/api";
|
|
2
2
|
import { GetPublishedEntriesByIdsRepository } from "./abstractions.js";
|
|
3
3
|
import { EntryPersistenceError } from "../../../domain/contentEntry/errors.js";
|
|
4
|
-
import {
|
|
4
|
+
import { GetPublishedEntriesByIdsStorageOperation } from "../../shared/storageOperations/entry/GetPublishedEntriesByIdsStorageOperation.js";
|
|
5
5
|
import { EntryFromStorageTransform } from "../../../legacy/abstractions.js";
|
|
6
|
+
import { RuntimeTenant } from "../../runtimeTenant/abstractions.js";
|
|
6
7
|
class GetPublishedEntriesByIdsRepositoryImpl {
|
|
7
|
-
constructor(entryFromStorageTransform,
|
|
8
|
+
constructor(entryFromStorageTransform, getPublishedEntriesByIdsStorage, runtimeTenant){
|
|
8
9
|
this.entryFromStorageTransform = entryFromStorageTransform;
|
|
9
|
-
this.
|
|
10
|
+
this.getPublishedEntriesByIdsStorage = getPublishedEntriesByIdsStorage;
|
|
11
|
+
this.runtimeTenant = runtimeTenant;
|
|
10
12
|
}
|
|
11
|
-
async execute(
|
|
13
|
+
async execute(initialModel, ids) {
|
|
14
|
+
const model = this.runtimeTenant.assign(initialModel);
|
|
12
15
|
try {
|
|
13
|
-
const result = await this.
|
|
16
|
+
const result = await this.getPublishedEntriesByIdsStorage.execute(model, {
|
|
14
17
|
ids
|
|
15
18
|
});
|
|
16
19
|
const items = await Promise.all(result.map(async (entry)=>this.entryFromStorageTransform(model, entry)));
|
|
@@ -20,12 +23,12 @@ class GetPublishedEntriesByIdsRepositoryImpl {
|
|
|
20
23
|
}
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
|
-
const GetPublishedEntriesByIdsRepository_GetPublishedEntriesByIdsRepository = createImplementation({
|
|
24
|
-
abstraction: GetPublishedEntriesByIdsRepository,
|
|
26
|
+
const GetPublishedEntriesByIdsRepository_GetPublishedEntriesByIdsRepository = GetPublishedEntriesByIdsRepository.createImplementation({
|
|
25
27
|
implementation: GetPublishedEntriesByIdsRepositoryImpl,
|
|
26
28
|
dependencies: [
|
|
27
29
|
EntryFromStorageTransform,
|
|
28
|
-
|
|
30
|
+
GetPublishedEntriesByIdsStorageOperation,
|
|
31
|
+
RuntimeTenant
|
|
29
32
|
]
|
|
30
33
|
});
|
|
31
34
|
export { GetPublishedEntriesByIdsRepository_GetPublishedEntriesByIdsRepository as GetPublishedEntriesByIdsRepository };
|
package/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsRepository.js","sources":["../../../../src/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsRepository.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsRepository.js","sources":["../../../../src/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsRepository.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport { GetPublishedEntriesByIdsRepository as RepositoryAbstraction } from \"./abstractions.js\";\nimport { EntryPersistenceError } from \"~/domain/contentEntry/errors.js\";\nimport type { CmsEntry, CmsEntryValues, CmsModel } from \"~/types/index.js\";\nimport { GetPublishedEntriesByIdsStorageOperation } from \"~/features/shared/storageOperations/entry/GetPublishedEntriesByIdsStorageOperation.js\";\nimport { EntryFromStorageTransform } from \"~/legacy/abstractions.js\";\nimport { RuntimeTenant } from \"~/features/runtimeTenant/abstractions.js\";\n\n/**\n * GetPublishedEntriesByIdsRepository - Fetches published entries by entry IDs from storage.\n * Returns array of published entries.\n */\nclass GetPublishedEntriesByIdsRepositoryImpl implements RepositoryAbstraction.Interface {\n public constructor(\n private entryFromStorageTransform: EntryFromStorageTransform.Interface,\n private getPublishedEntriesByIdsStorage: GetPublishedEntriesByIdsStorageOperation.Interface,\n private runtimeTenant: RuntimeTenant.Interface\n ) {}\n\n public async execute<T extends CmsEntryValues>(\n initialModel: CmsModel,\n ids: string[]\n ): Promise<Result<CmsEntry<T>[], RepositoryAbstraction.Error>> {\n const model = this.runtimeTenant.assign(initialModel);\n\n try {\n const result = await this.getPublishedEntriesByIdsStorage.execute<T>(model, {\n ids\n });\n\n // Transform storage entries to domain entries\n const items = await Promise.all(\n result.map(async entry => {\n return this.entryFromStorageTransform(model, entry);\n })\n );\n\n return Result.ok(items);\n } catch (error) {\n return Result.fail(new EntryPersistenceError(error as Error));\n }\n }\n}\n\nexport const GetPublishedEntriesByIdsRepository = RepositoryAbstraction.createImplementation({\n implementation: GetPublishedEntriesByIdsRepositoryImpl,\n dependencies: [\n EntryFromStorageTransform,\n GetPublishedEntriesByIdsStorageOperation,\n RuntimeTenant\n ]\n});\n"],"names":["GetPublishedEntriesByIdsRepositoryImpl","entryFromStorageTransform","getPublishedEntriesByIdsStorage","runtimeTenant","initialModel","ids","model","result","items","Promise","entry","Result","error","EntryPersistenceError","GetPublishedEntriesByIdsRepository","RepositoryAbstraction","EntryFromStorageTransform","GetPublishedEntriesByIdsStorageOperation","RuntimeTenant"],"mappings":";;;;;;AAYA,MAAMA;IACF,YACYC,yBAA8D,EAC9DC,+BAAmF,EACnFC,aAAsC,CAChD;aAHUF,yBAAyB,GAAzBA;aACAC,+BAA+B,GAA/BA;aACAC,aAAa,GAAbA;IACT;IAEH,MAAa,QACTC,YAAsB,EACtBC,GAAa,EAC8C;QAC3D,MAAMC,QAAQ,IAAI,CAAC,aAAa,CAAC,MAAM,CAACF;QAExC,IAAI;YACA,MAAMG,SAAS,MAAM,IAAI,CAAC,+BAA+B,CAAC,OAAO,CAAID,OAAO;gBACxED;YACJ;YAGA,MAAMG,QAAQ,MAAMC,QAAQ,GAAG,CAC3BF,OAAO,GAAG,CAAC,OAAMG,QACN,IAAI,CAAC,yBAAyB,CAACJ,OAAOI;YAIrD,OAAOC,OAAO,EAAE,CAACH;QACrB,EAAE,OAAOI,OAAO;YACZ,OAAOD,OAAO,IAAI,CAAC,IAAIE,sBAAsBD;QACjD;IACJ;AACJ;AAEO,MAAME,wEAAqCC,mCAAAA,oBAA0C,CAAC;IACzF,gBAAgBf;IAChB,cAAc;QACVgB;QACAC;QACAC;KACH;AACL"}
|
|
@@ -16,5 +16,7 @@ declare class GetPublishedEntriesByIdsUseCaseImpl implements UseCaseAbstraction.
|
|
|
16
16
|
constructor(repository: GetPublishedEntriesByIdsRepository.Interface, accessControl: AccessControl.Interface);
|
|
17
17
|
execute<T extends CmsEntryValues = CmsEntryValues>(model: CmsModel, ids: string[]): Promise<Result<CmsEntry<T>[], UseCaseAbstraction.Error>>;
|
|
18
18
|
}
|
|
19
|
-
export declare const GetPublishedEntriesByIdsUseCase:
|
|
19
|
+
export declare const GetPublishedEntriesByIdsUseCase: typeof GetPublishedEntriesByIdsUseCaseImpl & {
|
|
20
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IGetPublishedEntriesByIdsUseCase>;
|
|
21
|
+
};
|
|
20
22
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Result
|
|
1
|
+
import { Result } from "@webiny/feature/api";
|
|
2
2
|
import { GetPublishedEntriesByIdsRepository, GetPublishedEntriesByIdsUseCase } from "./abstractions.js";
|
|
3
3
|
import { AccessControl } from "../../shared/abstractions.js";
|
|
4
4
|
import { EntryNotAuthorizedError } from "../../../domain/contentEntry/errors.js";
|
|
@@ -17,8 +17,7 @@ class GetPublishedEntriesByIdsUseCaseImpl {
|
|
|
17
17
|
return Result.ok(result.value);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
const GetPublishedEntriesByIdsUseCase_GetPublishedEntriesByIdsUseCase = createImplementation({
|
|
21
|
-
abstraction: GetPublishedEntriesByIdsUseCase,
|
|
20
|
+
const GetPublishedEntriesByIdsUseCase_GetPublishedEntriesByIdsUseCase = GetPublishedEntriesByIdsUseCase.createImplementation({
|
|
22
21
|
implementation: GetPublishedEntriesByIdsUseCaseImpl,
|
|
23
22
|
dependencies: [
|
|
24
23
|
GetPublishedEntriesByIdsRepository,
|
package/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsUseCase.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsUseCase.js","sources":["../../../../src/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsUseCase.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport {
|
|
1
|
+
{"version":3,"file":"features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsUseCase.js","sources":["../../../../src/features/contentEntry/GetPublishedEntriesByIds/GetPublishedEntriesByIdsUseCase.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport { GetPublishedEntriesByIdsUseCase as UseCaseAbstraction } from \"./abstractions.js\";\nimport { GetPublishedEntriesByIdsRepository } from \"./abstractions.js\";\nimport { AccessControl } from \"~/features/shared/abstractions.js\";\nimport type { CmsEntry, CmsEntryValues, CmsModel } from \"~/types/index.js\";\nimport { EntryNotAuthorizedError } from \"~/domain/contentEntry/errors.js\";\n\n/**\n * GetPublishedEntriesByIdsUseCase - Orchestrates fetching published entries by IDs.\n *\n * Responsibilities:\n * - Apply access control\n * - Delegate to repository for data fetching\n */\nclass GetPublishedEntriesByIdsUseCaseImpl implements UseCaseAbstraction.Interface {\n public constructor(\n private repository: GetPublishedEntriesByIdsRepository.Interface,\n private accessControl: AccessControl.Interface\n ) {}\n\n public async execute<T extends CmsEntryValues = CmsEntryValues>(\n model: CmsModel,\n ids: string[]\n ): Promise<Result<CmsEntry<T>[], UseCaseAbstraction.Error>> {\n // Check access control\n const canAccess = await this.accessControl.canAccessEntry({ model });\n if (!canAccess) {\n return Result.fail(EntryNotAuthorizedError.fromModel(model));\n }\n\n // Delegate to repository\n const result = await this.repository.execute<T>(model, ids);\n\n if (result.isFail()) {\n return Result.fail(result.error);\n }\n\n return Result.ok(result.value);\n }\n}\n\nexport const GetPublishedEntriesByIdsUseCase = UseCaseAbstraction.createImplementation({\n implementation: GetPublishedEntriesByIdsUseCaseImpl,\n dependencies: [GetPublishedEntriesByIdsRepository, AccessControl]\n});\n"],"names":["GetPublishedEntriesByIdsUseCaseImpl","repository","accessControl","model","ids","canAccess","Result","EntryNotAuthorizedError","result","GetPublishedEntriesByIdsUseCase","UseCaseAbstraction","GetPublishedEntriesByIdsRepository","AccessControl"],"mappings":";;;;AAcA,MAAMA;IACF,YACYC,UAAwD,EACxDC,aAAsC,CAChD;aAFUD,UAAU,GAAVA;aACAC,aAAa,GAAbA;IACT;IAEH,MAAa,QACTC,KAAe,EACfC,GAAa,EAC2C;QAExD,MAAMC,YAAY,MAAM,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC;YAAEF;QAAM;QAClE,IAAI,CAACE,WACD,OAAOC,OAAO,IAAI,CAACC,wBAAwB,SAAS,CAACJ;QAIzD,MAAMK,SAAS,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAIL,OAAOC;QAEvD,IAAII,OAAO,MAAM,IACb,OAAOF,OAAO,IAAI,CAACE,OAAO,KAAK;QAGnC,OAAOF,OAAO,EAAE,CAACE,OAAO,KAAK;IACjC;AACJ;AAEO,MAAMC,kEAAkCC,gCAAAA,oBAAuC,CAAC;IACnF,gBAAgBV;IAChB,cAAc;QAACW;QAAoCC;KAAc;AACrE"}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { Result } from "@webiny/feature/api";
|
|
2
2
|
import { GetPublishedRevisionByEntryIdRepository as RepositoryAbstraction } from "./abstractions.js";
|
|
3
3
|
import type { CmsEntry, CmsEntryValues, CmsModel } from "../../../types/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { GetPublishedRevisionByEntryIdStorageOperation } from "../../../features/shared/storageOperations/entry/GetPublishedRevisionByEntryIdStorageOperation.js";
|
|
5
5
|
import { EntryFromStorageTransform } from "../../../legacy/abstractions.js";
|
|
6
|
+
import { RuntimeTenant } from "../../../features/runtimeTenant/abstractions.js";
|
|
6
7
|
/**
|
|
7
8
|
* GetPublishedRevisionByEntryIdRepository - Fetches published revision from storage.
|
|
8
9
|
* Returns null if entry not found or is deleted.
|
|
9
10
|
*/
|
|
10
11
|
declare class GetPublishedRevisionByEntryIdRepositoryImpl implements RepositoryAbstraction.Interface {
|
|
11
12
|
private entryFromStorageTransform;
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
private getPublishedRevisionByEntryIdStorage;
|
|
14
|
+
private runtimeTenant;
|
|
15
|
+
constructor(entryFromStorageTransform: EntryFromStorageTransform.Interface, getPublishedRevisionByEntryIdStorage: GetPublishedRevisionByEntryIdStorageOperation.Interface, runtimeTenant: RuntimeTenant.Interface);
|
|
16
|
+
execute<T extends CmsEntryValues = CmsEntryValues>(initialModel: CmsModel, entryId: string): Promise<Result<CmsEntry<T>, RepositoryAbstraction.Error>>;
|
|
15
17
|
}
|
|
16
|
-
export declare const GetPublishedRevisionByEntryIdRepository:
|
|
18
|
+
export declare const GetPublishedRevisionByEntryIdRepository: typeof GetPublishedRevisionByEntryIdRepositoryImpl & {
|
|
19
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IGetPublishedRevisionByEntryIdRepository>;
|
|
20
|
+
};
|
|
17
21
|
export {};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { Result
|
|
1
|
+
import { Result } from "@webiny/feature/api";
|
|
2
2
|
import { GetPublishedRevisionByEntryIdRepository } from "./abstractions.js";
|
|
3
3
|
import { EntryNotFoundError, EntryPersistenceError } from "../../../domain/contentEntry/errors.js";
|
|
4
|
-
import {
|
|
4
|
+
import { GetPublishedRevisionByEntryIdStorageOperation } from "../../shared/storageOperations/entry/GetPublishedRevisionByEntryIdStorageOperation.js";
|
|
5
5
|
import { EntryFromStorageTransform } from "../../../legacy/abstractions.js";
|
|
6
|
+
import { RuntimeTenant } from "../../runtimeTenant/abstractions.js";
|
|
6
7
|
class GetPublishedRevisionByEntryIdRepositoryImpl {
|
|
7
|
-
constructor(entryFromStorageTransform,
|
|
8
|
+
constructor(entryFromStorageTransform, getPublishedRevisionByEntryIdStorage, runtimeTenant){
|
|
8
9
|
this.entryFromStorageTransform = entryFromStorageTransform;
|
|
9
|
-
this.
|
|
10
|
+
this.getPublishedRevisionByEntryIdStorage = getPublishedRevisionByEntryIdStorage;
|
|
11
|
+
this.runtimeTenant = runtimeTenant;
|
|
10
12
|
}
|
|
11
|
-
async execute(
|
|
13
|
+
async execute(initialModel, entryId) {
|
|
14
|
+
const model = this.runtimeTenant.assign(initialModel);
|
|
12
15
|
try {
|
|
13
|
-
const storageEntry = await this.
|
|
16
|
+
const storageEntry = await this.getPublishedRevisionByEntryIdStorage.execute(model, {
|
|
14
17
|
id: entryId
|
|
15
18
|
});
|
|
16
19
|
if (!storageEntry || storageEntry.wbyDeleted) return Result.fail(new EntryNotFoundError(entryId));
|
|
@@ -21,12 +24,12 @@ class GetPublishedRevisionByEntryIdRepositoryImpl {
|
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
26
|
}
|
|
24
|
-
const GetPublishedRevisionByEntryIdRepository_GetPublishedRevisionByEntryIdRepository = createImplementation({
|
|
25
|
-
abstraction: GetPublishedRevisionByEntryIdRepository,
|
|
27
|
+
const GetPublishedRevisionByEntryIdRepository_GetPublishedRevisionByEntryIdRepository = GetPublishedRevisionByEntryIdRepository.createImplementation({
|
|
26
28
|
implementation: GetPublishedRevisionByEntryIdRepositoryImpl,
|
|
27
29
|
dependencies: [
|
|
28
30
|
EntryFromStorageTransform,
|
|
29
|
-
|
|
31
|
+
GetPublishedRevisionByEntryIdStorageOperation,
|
|
32
|
+
RuntimeTenant
|
|
30
33
|
]
|
|
31
34
|
});
|
|
32
35
|
export { GetPublishedRevisionByEntryIdRepository_GetPublishedRevisionByEntryIdRepository as GetPublishedRevisionByEntryIdRepository };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdRepository.js","sources":["../../../../src/features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdRepository.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdRepository.js","sources":["../../../../src/features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdRepository.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport { GetPublishedRevisionByEntryIdRepository as RepositoryAbstraction } from \"./abstractions.js\";\nimport { EntryNotFoundError, EntryPersistenceError } from \"~/domain/contentEntry/errors.js\";\nimport type { CmsEntry, CmsEntryValues, CmsModel } from \"~/types/index.js\";\nimport { GetPublishedRevisionByEntryIdStorageOperation } from \"~/features/shared/storageOperations/entry/GetPublishedRevisionByEntryIdStorageOperation.js\";\nimport { EntryFromStorageTransform } from \"~/legacy/abstractions.js\";\nimport { RuntimeTenant } from \"~/features/runtimeTenant/abstractions.js\";\n\n/**\n * GetPublishedRevisionByEntryIdRepository - Fetches published revision from storage.\n * Returns null if entry not found or is deleted.\n */\nclass GetPublishedRevisionByEntryIdRepositoryImpl implements RepositoryAbstraction.Interface {\n public constructor(\n private entryFromStorageTransform: EntryFromStorageTransform.Interface,\n private getPublishedRevisionByEntryIdStorage: GetPublishedRevisionByEntryIdStorageOperation.Interface,\n private runtimeTenant: RuntimeTenant.Interface\n ) {}\n\n public async execute<T extends CmsEntryValues = CmsEntryValues>(\n initialModel: CmsModel,\n entryId: string\n ): Promise<Result<CmsEntry<T>, RepositoryAbstraction.Error>> {\n const model = this.runtimeTenant.assign(initialModel);\n\n try {\n // Get published revision from storage\n const storageEntry = await this.getPublishedRevisionByEntryIdStorage.execute<T>(model, {\n id: entryId\n });\n\n if (!storageEntry || storageEntry.wbyDeleted) {\n return Result.fail(new EntryNotFoundError(entryId));\n }\n\n // Transform storage entry to domain entry\n const entry = await this.entryFromStorageTransform(model, storageEntry);\n\n return Result.ok(entry);\n } catch (error) {\n return Result.fail(new EntryPersistenceError(error as Error));\n }\n }\n}\n\nexport const GetPublishedRevisionByEntryIdRepository = RepositoryAbstraction.createImplementation({\n implementation: GetPublishedRevisionByEntryIdRepositoryImpl,\n dependencies: [\n EntryFromStorageTransform,\n GetPublishedRevisionByEntryIdStorageOperation,\n RuntimeTenant\n ]\n});\n"],"names":["GetPublishedRevisionByEntryIdRepositoryImpl","entryFromStorageTransform","getPublishedRevisionByEntryIdStorage","runtimeTenant","initialModel","entryId","model","storageEntry","Result","EntryNotFoundError","entry","error","EntryPersistenceError","GetPublishedRevisionByEntryIdRepository","RepositoryAbstraction","EntryFromStorageTransform","GetPublishedRevisionByEntryIdStorageOperation","RuntimeTenant"],"mappings":";;;;;;AAYA,MAAMA;IACF,YACYC,yBAA8D,EAC9DC,oCAA6F,EAC7FC,aAAsC,CAChD;aAHUF,yBAAyB,GAAzBA;aACAC,oCAAoC,GAApCA;aACAC,aAAa,GAAbA;IACT;IAEH,MAAa,QACTC,YAAsB,EACtBC,OAAe,EAC0C;QACzD,MAAMC,QAAQ,IAAI,CAAC,aAAa,CAAC,MAAM,CAACF;QAExC,IAAI;YAEA,MAAMG,eAAe,MAAM,IAAI,CAAC,oCAAoC,CAAC,OAAO,CAAID,OAAO;gBACnF,IAAID;YACR;YAEA,IAAI,CAACE,gBAAgBA,aAAa,UAAU,EACxC,OAAOC,OAAO,IAAI,CAAC,IAAIC,mBAAmBJ;YAI9C,MAAMK,QAAQ,MAAM,IAAI,CAAC,yBAAyB,CAACJ,OAAOC;YAE1D,OAAOC,OAAO,EAAE,CAACE;QACrB,EAAE,OAAOC,OAAO;YACZ,OAAOH,OAAO,IAAI,CAAC,IAAII,sBAAsBD;QACjD;IACJ;AACJ;AAEO,MAAME,kFAA0CC,wCAAAA,oBAA0C,CAAC;IAC9F,gBAAgBd;IAChB,cAAc;QACVe;QACAC;QACAC;KACH;AACL"}
|
|
@@ -13,5 +13,7 @@ declare class GetPublishedRevisionByEntryIdUseCaseImpl implements UseCaseAbstrac
|
|
|
13
13
|
constructor(repository: GetPublishedRevisionByEntryIdRepository.Interface);
|
|
14
14
|
execute<T extends CmsEntryValues = CmsEntryValues>(model: CmsModel, entryId: string): Promise<Result<CmsEntry<T> | null, UseCaseAbstraction.Error>>;
|
|
15
15
|
}
|
|
16
|
-
export declare const GetPublishedRevisionByEntryIdUseCase:
|
|
16
|
+
export declare const GetPublishedRevisionByEntryIdUseCase: typeof GetPublishedRevisionByEntryIdUseCaseImpl & {
|
|
17
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IGetPublishedRevisionByEntryIdUseCase>;
|
|
18
|
+
};
|
|
17
19
|
export {};
|
package/features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdUseCase.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Result
|
|
1
|
+
import { Result } from "@webiny/feature/api";
|
|
2
2
|
import { GetPublishedRevisionByEntryIdRepository, GetPublishedRevisionByEntryIdUseCase } from "./abstractions.js";
|
|
3
3
|
class GetPublishedRevisionByEntryIdUseCaseImpl {
|
|
4
4
|
constructor(repository){
|
|
@@ -10,8 +10,7 @@ class GetPublishedRevisionByEntryIdUseCaseImpl {
|
|
|
10
10
|
return Result.ok(result.value);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
const GetPublishedRevisionByEntryIdUseCase_GetPublishedRevisionByEntryIdUseCase = createImplementation({
|
|
14
|
-
abstraction: GetPublishedRevisionByEntryIdUseCase,
|
|
13
|
+
const GetPublishedRevisionByEntryIdUseCase_GetPublishedRevisionByEntryIdUseCase = GetPublishedRevisionByEntryIdUseCase.createImplementation({
|
|
15
14
|
implementation: GetPublishedRevisionByEntryIdUseCaseImpl,
|
|
16
15
|
dependencies: [
|
|
17
16
|
GetPublishedRevisionByEntryIdRepository
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdUseCase.js","sources":["../../../../src/features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdUseCase.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdUseCase.js","sources":["../../../../src/features/contentEntry/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdUseCase.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport {\n GetPublishedRevisionByEntryIdRepository,\n GetPublishedRevisionByEntryIdUseCase as UseCaseAbstraction\n} from \"./abstractions.js\";\nimport type { CmsEntry, CmsEntryValues, CmsModel } from \"~/types/index.js\";\n\n/**\n * GetPublishedRevisionByEntryIdUseCase - Orchestrates fetching published revision by entry ID.\n *\n * Responsibilities:\n * - Delegate to repository for data fetching\n * - Return null if entry not found or deleted\n */\nclass GetPublishedRevisionByEntryIdUseCaseImpl implements UseCaseAbstraction.Interface {\n public constructor(private repository: GetPublishedRevisionByEntryIdRepository.Interface) {}\n\n public async execute<T extends CmsEntryValues = CmsEntryValues>(\n model: CmsModel,\n entryId: string\n ): Promise<Result<CmsEntry<T> | null, UseCaseAbstraction.Error>> {\n // Delegate to repository\n const result = await this.repository.execute<T>(model, entryId);\n\n if (result.isFail()) {\n return Result.fail(result.error);\n }\n\n return Result.ok(result.value);\n }\n}\n\nexport const GetPublishedRevisionByEntryIdUseCase = UseCaseAbstraction.createImplementation({\n implementation: GetPublishedRevisionByEntryIdUseCaseImpl,\n dependencies: [GetPublishedRevisionByEntryIdRepository]\n});\n"],"names":["GetPublishedRevisionByEntryIdUseCaseImpl","repository","model","entryId","result","Result","GetPublishedRevisionByEntryIdUseCase","UseCaseAbstraction","GetPublishedRevisionByEntryIdRepository"],"mappings":";;AAcA,MAAMA;IACF,YAA2BC,UAA6D,CAAE;aAA/DA,UAAU,GAAVA;IAAgE;IAE3F,MAAa,QACTC,KAAe,EACfC,OAAe,EAC8C;QAE7D,MAAMC,SAAS,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAIF,OAAOC;QAEvD,IAAIC,OAAO,MAAM,IACb,OAAOC,OAAO,IAAI,CAACD,OAAO,KAAK;QAGnC,OAAOC,OAAO,EAAE,CAACD,OAAO,KAAK;IACjC;AACJ;AAEO,MAAME,4EAAuCC,qCAAAA,oBAAuC,CAAC;IACxF,gBAAgBP;IAChB,cAAc;QAACQ;KAAwC;AAC3D"}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { Result } from "@webiny/feature/api";
|
|
2
2
|
import { GetRevisionByIdRepository as RepositoryAbstraction } from "./abstractions.js";
|
|
3
3
|
import type { CmsEntry, CmsEntryValues, CmsModel } from "../../../types/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { GetRevisionByIdStorageOperation } from "../../../features/shared/storageOperations/entry/GetRevisionByIdStorageOperation.js";
|
|
5
5
|
import { EntryFromStorageTransform } from "../../../legacy/abstractions.js";
|
|
6
|
+
import { RuntimeTenant } from "../../../features/runtimeTenant/abstractions.js";
|
|
6
7
|
/**
|
|
7
8
|
* GetRevisionByIdRepository - Fetches entry revision from storage and transforms it.
|
|
8
9
|
* Returns entry or fails with EntryNotFoundError if not found.
|
|
9
10
|
*/
|
|
10
11
|
declare class GetRevisionByIdRepositoryImpl implements RepositoryAbstraction.Interface {
|
|
11
12
|
private entryFromStorageTransform;
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
private getRevisionByIdStorage;
|
|
14
|
+
private runtimeTenant;
|
|
15
|
+
constructor(entryFromStorageTransform: EntryFromStorageTransform.Interface, getRevisionByIdStorage: GetRevisionByIdStorageOperation.Interface, runtimeTenant: RuntimeTenant.Interface);
|
|
16
|
+
execute<T extends CmsEntryValues = CmsEntryValues>(initialModel: CmsModel, id: string): Promise<Result<CmsEntry<T>, RepositoryAbstraction.Error>>;
|
|
15
17
|
}
|
|
16
|
-
export declare const GetRevisionByIdRepository:
|
|
18
|
+
export declare const GetRevisionByIdRepository: typeof GetRevisionByIdRepositoryImpl & {
|
|
19
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IGetRevisionByIdRepository>;
|
|
20
|
+
};
|
|
17
21
|
export {};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { Result
|
|
1
|
+
import { Result } from "@webiny/feature/api";
|
|
2
2
|
import { GetRevisionByIdRepository } from "./abstractions.js";
|
|
3
3
|
import { EntryNotFoundError, EntryPersistenceError } from "../../../domain/contentEntry/errors.js";
|
|
4
|
-
import {
|
|
4
|
+
import { GetRevisionByIdStorageOperation } from "../../shared/storageOperations/entry/GetRevisionByIdStorageOperation.js";
|
|
5
5
|
import { EntryFromStorageTransform } from "../../../legacy/abstractions.js";
|
|
6
|
+
import { RuntimeTenant } from "../../runtimeTenant/abstractions.js";
|
|
6
7
|
class GetRevisionByIdRepositoryImpl {
|
|
7
|
-
constructor(entryFromStorageTransform,
|
|
8
|
+
constructor(entryFromStorageTransform, getRevisionByIdStorage, runtimeTenant){
|
|
8
9
|
this.entryFromStorageTransform = entryFromStorageTransform;
|
|
9
|
-
this.
|
|
10
|
+
this.getRevisionByIdStorage = getRevisionByIdStorage;
|
|
11
|
+
this.runtimeTenant = runtimeTenant;
|
|
10
12
|
}
|
|
11
|
-
async execute(
|
|
13
|
+
async execute(initialModel, id) {
|
|
14
|
+
const model = this.runtimeTenant.assign(initialModel);
|
|
12
15
|
try {
|
|
13
|
-
const storageEntry = await this.
|
|
16
|
+
const storageEntry = await this.getRevisionByIdStorage.execute(model, {
|
|
14
17
|
id
|
|
15
18
|
});
|
|
16
19
|
if (!storageEntry) return Result.fail(new EntryNotFoundError(id));
|
|
@@ -21,12 +24,12 @@ class GetRevisionByIdRepositoryImpl {
|
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
26
|
}
|
|
24
|
-
const GetRevisionByIdRepository_GetRevisionByIdRepository = createImplementation({
|
|
25
|
-
abstraction: GetRevisionByIdRepository,
|
|
27
|
+
const GetRevisionByIdRepository_GetRevisionByIdRepository = GetRevisionByIdRepository.createImplementation({
|
|
26
28
|
implementation: GetRevisionByIdRepositoryImpl,
|
|
27
29
|
dependencies: [
|
|
28
30
|
EntryFromStorageTransform,
|
|
29
|
-
|
|
31
|
+
GetRevisionByIdStorageOperation,
|
|
32
|
+
RuntimeTenant
|
|
30
33
|
]
|
|
31
34
|
});
|
|
32
35
|
export { GetRevisionByIdRepository_GetRevisionByIdRepository as GetRevisionByIdRepository };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/contentEntry/GetRevisionById/GetRevisionByIdRepository.js","sources":["../../../../src/features/contentEntry/GetRevisionById/GetRevisionByIdRepository.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport {
|
|
1
|
+
{"version":3,"file":"features/contentEntry/GetRevisionById/GetRevisionByIdRepository.js","sources":["../../../../src/features/contentEntry/GetRevisionById/GetRevisionByIdRepository.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport { GetRevisionByIdRepository as RepositoryAbstraction } from \"./abstractions.js\";\nimport { EntryPersistenceError, EntryNotFoundError } from \"~/domain/contentEntry/errors.js\";\nimport type { CmsEntry, CmsEntryValues, CmsModel } from \"~/types/index.js\";\nimport { GetRevisionByIdStorageOperation } from \"~/features/shared/storageOperations/entry/GetRevisionByIdStorageOperation.js\";\nimport { EntryFromStorageTransform } from \"~/legacy/abstractions.js\";\nimport { RuntimeTenant } from \"~/features/runtimeTenant/abstractions.js\";\n\n/**\n * GetRevisionByIdRepository - Fetches entry revision from storage and transforms it.\n * Returns entry or fails with EntryNotFoundError if not found.\n */\nclass GetRevisionByIdRepositoryImpl implements RepositoryAbstraction.Interface {\n public constructor(\n private entryFromStorageTransform: EntryFromStorageTransform.Interface,\n private getRevisionByIdStorage: GetRevisionByIdStorageOperation.Interface,\n private runtimeTenant: RuntimeTenant.Interface\n ) {}\n\n async execute<T extends CmsEntryValues = CmsEntryValues>(\n initialModel: CmsModel,\n id: string\n ): Promise<Result<CmsEntry<T>, RepositoryAbstraction.Error>> {\n const model = this.runtimeTenant.assign(initialModel);\n\n try {\n // Fetch from storage\n const storageEntry = await this.getRevisionByIdStorage.execute<T>(model, {\n id\n });\n\n if (!storageEntry) {\n return Result.fail(new EntryNotFoundError(id));\n }\n\n // Transform storage entry to domain entry\n const entry = await this.entryFromStorageTransform<T>(model, storageEntry);\n\n return Result.ok(entry);\n } catch (error) {\n return Result.fail(new EntryPersistenceError(error as Error));\n }\n }\n}\n\nexport const GetRevisionByIdRepository = RepositoryAbstraction.createImplementation({\n implementation: GetRevisionByIdRepositoryImpl,\n dependencies: [EntryFromStorageTransform, GetRevisionByIdStorageOperation, RuntimeTenant]\n});\n"],"names":["GetRevisionByIdRepositoryImpl","entryFromStorageTransform","getRevisionByIdStorage","runtimeTenant","initialModel","id","model","storageEntry","Result","EntryNotFoundError","entry","error","EntryPersistenceError","GetRevisionByIdRepository","RepositoryAbstraction","EntryFromStorageTransform","GetRevisionByIdStorageOperation","RuntimeTenant"],"mappings":";;;;;;AAYA,MAAMA;IACF,YACYC,yBAA8D,EAC9DC,sBAAiE,EACjEC,aAAsC,CAChD;aAHUF,yBAAyB,GAAzBA;aACAC,sBAAsB,GAAtBA;aACAC,aAAa,GAAbA;IACT;IAEH,MAAM,QACFC,YAAsB,EACtBC,EAAU,EAC+C;QACzD,MAAMC,QAAQ,IAAI,CAAC,aAAa,CAAC,MAAM,CAACF;QAExC,IAAI;YAEA,MAAMG,eAAe,MAAM,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAID,OAAO;gBACrED;YACJ;YAEA,IAAI,CAACE,cACD,OAAOC,OAAO,IAAI,CAAC,IAAIC,mBAAmBJ;YAI9C,MAAMK,QAAQ,MAAM,IAAI,CAAC,yBAAyB,CAAIJ,OAAOC;YAE7D,OAAOC,OAAO,EAAE,CAACE;QACrB,EAAE,OAAOC,OAAO;YACZ,OAAOH,OAAO,IAAI,CAAC,IAAII,sBAAsBD;QACjD;IACJ;AACJ;AAEO,MAAME,sDAA4BC,0BAAAA,oBAA0C,CAAC;IAChF,gBAAgBd;IAChB,cAAc;QAACe;QAA2BC;QAAiCC;KAAc;AAC7F"}
|
|
@@ -12,5 +12,7 @@ declare class GetRevisionByIdUseCaseImpl implements UseCaseAbstraction.Interface
|
|
|
12
12
|
constructor(repository: GetRevisionByIdRepository.Interface);
|
|
13
13
|
execute<T extends CmsEntryValues = CmsEntryValues>(model: CmsModel, id: string): Promise<Result<CmsEntry<T>, UseCaseAbstraction.Error>>;
|
|
14
14
|
}
|
|
15
|
-
export declare const GetRevisionByIdUseCase:
|
|
15
|
+
export declare const GetRevisionByIdUseCase: typeof GetRevisionByIdUseCaseImpl & {
|
|
16
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IGetRevisionByIdUseCase>;
|
|
17
|
+
};
|
|
16
18
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createImplementation } from "@webiny/feature/api";
|
|
2
1
|
import { GetRevisionByIdRepository, GetRevisionByIdUseCase } from "./abstractions.js";
|
|
3
2
|
class GetRevisionByIdUseCaseImpl {
|
|
4
3
|
constructor(repository){
|
|
@@ -8,8 +7,7 @@ class GetRevisionByIdUseCaseImpl {
|
|
|
8
7
|
return this.repository.execute(model, id);
|
|
9
8
|
}
|
|
10
9
|
}
|
|
11
|
-
const GetRevisionByIdUseCase_GetRevisionByIdUseCase = createImplementation({
|
|
12
|
-
abstraction: GetRevisionByIdUseCase,
|
|
10
|
+
const GetRevisionByIdUseCase_GetRevisionByIdUseCase = GetRevisionByIdUseCase.createImplementation({
|
|
13
11
|
implementation: GetRevisionByIdUseCaseImpl,
|
|
14
12
|
dependencies: [
|
|
15
13
|
GetRevisionByIdRepository
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/contentEntry/GetRevisionById/GetRevisionByIdUseCase.js","sources":["../../../../src/features/contentEntry/GetRevisionById/GetRevisionByIdUseCase.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport {
|
|
1
|
+
{"version":3,"file":"features/contentEntry/GetRevisionById/GetRevisionByIdUseCase.js","sources":["../../../../src/features/contentEntry/GetRevisionById/GetRevisionByIdUseCase.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport { GetRevisionByIdUseCase as UseCaseAbstraction } from \"./abstractions.js\";\nimport { GetRevisionByIdRepository } from \"./abstractions.js\";\nimport type { CmsEntry, CmsEntryValues, CmsModel } from \"~/types/index.js\";\n\n/**\n * GetRevisionByIdUseCase - Fetches a specific entry revision.\n *\n * This is a simple query use case that delegates to the repository.\n */\nclass GetRevisionByIdUseCaseImpl implements UseCaseAbstraction.Interface {\n public constructor(private repository: GetRevisionByIdRepository.Interface) {}\n\n public async execute<T extends CmsEntryValues = CmsEntryValues>(\n model: CmsModel,\n id: string\n ): Promise<Result<CmsEntry<T>, UseCaseAbstraction.Error>> {\n return this.repository.execute<T>(model, id);\n }\n}\n\nexport const GetRevisionByIdUseCase = UseCaseAbstraction.createImplementation({\n implementation: GetRevisionByIdUseCaseImpl,\n dependencies: [GetRevisionByIdRepository]\n});\n"],"names":["GetRevisionByIdUseCaseImpl","repository","model","id","GetRevisionByIdUseCase","UseCaseAbstraction","GetRevisionByIdRepository"],"mappings":";AAUA,MAAMA;IACF,YAA2BC,UAA+C,CAAE;aAAjDA,UAAU,GAAVA;IAAkD;IAE7E,MAAa,QACTC,KAAe,EACfC,EAAU,EAC4C;QACtD,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAID,OAAOC;IAC7C;AACJ;AAEO,MAAMC,gDAAyBC,uBAAAA,oBAAuC,CAAC;IAC1E,gBAAgBL;IAChB,cAAc;QAACM;KAA0B;AAC7C"}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { Result } from "@webiny/feature/api";
|
|
2
2
|
import { GetRevisionsByEntryIdRepository as RepositoryAbstraction } from "./abstractions.js";
|
|
3
3
|
import type { CmsEntry, CmsEntryValues, CmsModel } from "../../../types/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { GetRevisionsStorageOperation } from "../../../features/shared/storageOperations/entry/GetRevisionsStorageOperation.js";
|
|
5
5
|
import { EntryFromStorageTransform } from "../../../legacy/abstractions.js";
|
|
6
|
+
import { RuntimeTenant } from "../../../features/runtimeTenant/abstractions.js";
|
|
6
7
|
/**
|
|
7
8
|
* GetRevisionsByEntryIdRepository - Fetches all revisions for an entry from storage.
|
|
8
9
|
* Returns array of entry revisions.
|
|
9
10
|
*/
|
|
10
11
|
declare class GetRevisionsByEntryIdRepositoryImpl implements RepositoryAbstraction.Interface {
|
|
11
12
|
private entryFromStorageTransform;
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
private getRevisionsStorage;
|
|
14
|
+
private runtimeTenant;
|
|
15
|
+
constructor(entryFromStorageTransform: EntryFromStorageTransform.Interface, getRevisionsStorage: GetRevisionsStorageOperation.Interface, runtimeTenant: RuntimeTenant.Interface);
|
|
16
|
+
execute<T extends CmsEntryValues = CmsEntryValues>(initialModel: CmsModel, entryId: string): Promise<Result<CmsEntry<T>[], RepositoryAbstraction.Error>>;
|
|
15
17
|
}
|
|
16
|
-
export declare const GetRevisionsByEntryIdRepository:
|
|
18
|
+
export declare const GetRevisionsByEntryIdRepository: typeof GetRevisionsByEntryIdRepositoryImpl & {
|
|
19
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IGetRevisionsByEntryIdRepository>;
|
|
20
|
+
};
|
|
17
21
|
export {};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { Result
|
|
1
|
+
import { Result } from "@webiny/feature/api";
|
|
2
2
|
import { GetRevisionsByEntryIdRepository } from "./abstractions.js";
|
|
3
3
|
import { EntryPersistenceError } from "../../../domain/contentEntry/errors.js";
|
|
4
|
-
import {
|
|
4
|
+
import { GetRevisionsStorageOperation } from "../../shared/storageOperations/entry/GetRevisionsStorageOperation.js";
|
|
5
5
|
import { EntryFromStorageTransform } from "../../../legacy/abstractions.js";
|
|
6
|
+
import { RuntimeTenant } from "../../runtimeTenant/abstractions.js";
|
|
6
7
|
class GetRevisionsByEntryIdRepositoryImpl {
|
|
7
|
-
constructor(entryFromStorageTransform,
|
|
8
|
+
constructor(entryFromStorageTransform, getRevisionsStorage, runtimeTenant){
|
|
8
9
|
this.entryFromStorageTransform = entryFromStorageTransform;
|
|
9
|
-
this.
|
|
10
|
+
this.getRevisionsStorage = getRevisionsStorage;
|
|
11
|
+
this.runtimeTenant = runtimeTenant;
|
|
10
12
|
}
|
|
11
|
-
async execute(
|
|
13
|
+
async execute(initialModel, entryId) {
|
|
14
|
+
const model = this.runtimeTenant.assign(initialModel);
|
|
12
15
|
try {
|
|
13
|
-
const result = await this.
|
|
16
|
+
const result = await this.getRevisionsStorage.execute(model, {
|
|
14
17
|
id: entryId
|
|
15
18
|
});
|
|
16
19
|
const items = await Promise.all(result.map(async (entry)=>this.entryFromStorageTransform(model, entry)));
|
|
@@ -20,12 +23,12 @@ class GetRevisionsByEntryIdRepositoryImpl {
|
|
|
20
23
|
}
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
|
-
const GetRevisionsByEntryIdRepository_GetRevisionsByEntryIdRepository = createImplementation({
|
|
24
|
-
abstraction: GetRevisionsByEntryIdRepository,
|
|
26
|
+
const GetRevisionsByEntryIdRepository_GetRevisionsByEntryIdRepository = GetRevisionsByEntryIdRepository.createImplementation({
|
|
25
27
|
implementation: GetRevisionsByEntryIdRepositoryImpl,
|
|
26
28
|
dependencies: [
|
|
27
29
|
EntryFromStorageTransform,
|
|
28
|
-
|
|
30
|
+
GetRevisionsStorageOperation,
|
|
31
|
+
RuntimeTenant
|
|
29
32
|
]
|
|
30
33
|
});
|
|
31
34
|
export { GetRevisionsByEntryIdRepository_GetRevisionsByEntryIdRepository as GetRevisionsByEntryIdRepository };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdRepository.js","sources":["../../../../src/features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdRepository.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport {
|
|
1
|
+
{"version":3,"file":"features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdRepository.js","sources":["../../../../src/features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdRepository.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport { GetRevisionsByEntryIdRepository as RepositoryAbstraction } from \"./abstractions.js\";\nimport { EntryPersistenceError } from \"~/domain/contentEntry/errors.js\";\nimport type { CmsEntry, CmsEntryValues, CmsModel } from \"~/types/index.js\";\nimport { GetRevisionsStorageOperation } from \"~/features/shared/storageOperations/entry/GetRevisionsStorageOperation.js\";\nimport { EntryFromStorageTransform } from \"~/legacy/abstractions.js\";\nimport { RuntimeTenant } from \"~/features/runtimeTenant/abstractions.js\";\n\n/**\n * GetRevisionsByEntryIdRepository - Fetches all revisions for an entry from storage.\n * Returns array of entry revisions.\n */\nclass GetRevisionsByEntryIdRepositoryImpl implements RepositoryAbstraction.Interface {\n public constructor(\n private entryFromStorageTransform: EntryFromStorageTransform.Interface,\n private getRevisionsStorage: GetRevisionsStorageOperation.Interface,\n private runtimeTenant: RuntimeTenant.Interface\n ) {}\n\n public async execute<T extends CmsEntryValues = CmsEntryValues>(\n initialModel: CmsModel,\n entryId: string\n ): Promise<Result<CmsEntry<T>[], RepositoryAbstraction.Error>> {\n const model = this.runtimeTenant.assign(initialModel);\n\n try {\n const result = await this.getRevisionsStorage.execute<T>(model, {\n id: entryId\n });\n\n // Transform storage entries to domain entries\n const items = await Promise.all(\n result.map(async entry => {\n return this.entryFromStorageTransform<T>(model, entry);\n })\n );\n\n return Result.ok(items);\n } catch (error) {\n return Result.fail(new EntryPersistenceError(error as Error));\n }\n }\n}\n\nexport const GetRevisionsByEntryIdRepository = RepositoryAbstraction.createImplementation({\n implementation: GetRevisionsByEntryIdRepositoryImpl,\n dependencies: [EntryFromStorageTransform, GetRevisionsStorageOperation, RuntimeTenant]\n});\n"],"names":["GetRevisionsByEntryIdRepositoryImpl","entryFromStorageTransform","getRevisionsStorage","runtimeTenant","initialModel","entryId","model","result","items","Promise","entry","Result","error","EntryPersistenceError","GetRevisionsByEntryIdRepository","RepositoryAbstraction","EntryFromStorageTransform","GetRevisionsStorageOperation","RuntimeTenant"],"mappings":";;;;;;AAYA,MAAMA;IACF,YACYC,yBAA8D,EAC9DC,mBAA2D,EAC3DC,aAAsC,CAChD;aAHUF,yBAAyB,GAAzBA;aACAC,mBAAmB,GAAnBA;aACAC,aAAa,GAAbA;IACT;IAEH,MAAa,QACTC,YAAsB,EACtBC,OAAe,EAC4C;QAC3D,MAAMC,QAAQ,IAAI,CAAC,aAAa,CAAC,MAAM,CAACF;QAExC,IAAI;YACA,MAAMG,SAAS,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAID,OAAO;gBAC5D,IAAID;YACR;YAGA,MAAMG,QAAQ,MAAMC,QAAQ,GAAG,CAC3BF,OAAO,GAAG,CAAC,OAAMG,QACN,IAAI,CAAC,yBAAyB,CAAIJ,OAAOI;YAIxD,OAAOC,OAAO,EAAE,CAACH;QACrB,EAAE,OAAOI,OAAO;YACZ,OAAOD,OAAO,IAAI,CAAC,IAAIE,sBAAsBD;QACjD;IACJ;AACJ;AAEO,MAAME,kEAAkCC,gCAAAA,oBAA0C,CAAC;IACtF,gBAAgBf;IAChB,cAAc;QAACgB;QAA2BC;QAA8BC;KAAc;AAC1F"}
|
|
@@ -16,5 +16,7 @@ declare class GetRevisionsByEntryIdUseCaseImpl implements UseCaseAbstraction.Int
|
|
|
16
16
|
constructor(repository: GetRevisionsByEntryIdRepository.Interface, accessControl: AccessControl.Interface);
|
|
17
17
|
execute<T extends CmsEntryValues = CmsEntryValues>(model: CmsModel, entryId: string): Promise<Result<CmsEntry<T>[], UseCaseAbstraction.Error>>;
|
|
18
18
|
}
|
|
19
|
-
export declare const GetRevisionsByEntryIdUseCase:
|
|
19
|
+
export declare const GetRevisionsByEntryIdUseCase: typeof GetRevisionsByEntryIdUseCaseImpl & {
|
|
20
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IGetRevisionsByEntryIdUseCase>;
|
|
21
|
+
};
|
|
20
22
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Result
|
|
1
|
+
import { Result } from "@webiny/feature/api";
|
|
2
2
|
import { GetRevisionsByEntryIdRepository, GetRevisionsByEntryIdUseCase } from "./abstractions.js";
|
|
3
3
|
import { AccessControl } from "../../shared/abstractions.js";
|
|
4
4
|
import { EntryNotAuthorizedError } from "../../../domain/contentEntry/errors.js";
|
|
@@ -17,8 +17,7 @@ class GetRevisionsByEntryIdUseCaseImpl {
|
|
|
17
17
|
return Result.ok(result.value);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
const GetRevisionsByEntryIdUseCase_GetRevisionsByEntryIdUseCase = createImplementation({
|
|
21
|
-
abstraction: GetRevisionsByEntryIdUseCase,
|
|
20
|
+
const GetRevisionsByEntryIdUseCase_GetRevisionsByEntryIdUseCase = GetRevisionsByEntryIdUseCase.createImplementation({
|
|
22
21
|
implementation: GetRevisionsByEntryIdUseCaseImpl,
|
|
23
22
|
dependencies: [
|
|
24
23
|
GetRevisionsByEntryIdRepository,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdUseCase.js","sources":["../../../../src/features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdUseCase.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport {
|
|
1
|
+
{"version":3,"file":"features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdUseCase.js","sources":["../../../../src/features/contentEntry/GetRevisionsByEntryId/GetRevisionsByEntryIdUseCase.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport { GetRevisionsByEntryIdUseCase as UseCaseAbstraction } from \"./abstractions.js\";\nimport { GetRevisionsByEntryIdRepository } from \"./abstractions.js\";\nimport { AccessControl } from \"~/features/shared/abstractions.js\";\nimport type { CmsEntry, CmsEntryValues, CmsModel } from \"~/types/index.js\";\nimport { EntryNotAuthorizedError } from \"~/domain/contentEntry/errors.js\";\n\n/**\n * GetRevisionsByEntryIdUseCase - Orchestrates fetching all revisions for an entry.\n *\n * Responsibilities:\n * - Apply access control\n * - Delegate to repository for data fetching\n */\nclass GetRevisionsByEntryIdUseCaseImpl implements UseCaseAbstraction.Interface {\n public constructor(\n private repository: GetRevisionsByEntryIdRepository.Interface,\n private accessControl: AccessControl.Interface\n ) {}\n\n public async execute<T extends CmsEntryValues = CmsEntryValues>(\n model: CmsModel,\n entryId: string\n ): Promise<Result<CmsEntry<T>[], UseCaseAbstraction.Error>> {\n // Check access control\n const canAccess = await this.accessControl.canAccessEntry({ model });\n if (!canAccess) {\n return Result.fail(EntryNotAuthorizedError.fromModel(model));\n }\n\n // Delegate to repository\n const result = await this.repository.execute<T>(model, entryId);\n\n if (result.isFail()) {\n return Result.fail(result.error);\n }\n\n return Result.ok(result.value);\n }\n}\n\nexport const GetRevisionsByEntryIdUseCase = UseCaseAbstraction.createImplementation({\n implementation: GetRevisionsByEntryIdUseCaseImpl,\n dependencies: [GetRevisionsByEntryIdRepository, AccessControl]\n});\n"],"names":["GetRevisionsByEntryIdUseCaseImpl","repository","accessControl","model","entryId","canAccess","Result","EntryNotAuthorizedError","result","GetRevisionsByEntryIdUseCase","UseCaseAbstraction","GetRevisionsByEntryIdRepository","AccessControl"],"mappings":";;;;AAcA,MAAMA;IACF,YACYC,UAAqD,EACrDC,aAAsC,CAChD;aAFUD,UAAU,GAAVA;aACAC,aAAa,GAAbA;IACT;IAEH,MAAa,QACTC,KAAe,EACfC,OAAe,EACyC;QAExD,MAAMC,YAAY,MAAM,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC;YAAEF;QAAM;QAClE,IAAI,CAACE,WACD,OAAOC,OAAO,IAAI,CAACC,wBAAwB,SAAS,CAACJ;QAIzD,MAAMK,SAAS,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAIL,OAAOC;QAEvD,IAAII,OAAO,MAAM,IACb,OAAOF,OAAO,IAAI,CAACE,OAAO,KAAK;QAGnC,OAAOF,OAAO,EAAE,CAACE,OAAO,KAAK;IACjC;AACJ;AAEO,MAAMC,4DAA+BC,6BAAAA,oBAAuC,CAAC;IAChF,gBAAgBV;IAChB,cAAc;QAACW;QAAiCC;KAAc;AAClE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/contentEntry/GetSingletonEntry/GetSingletonEntryUseCase.js","sources":["../../../../src/features/contentEntry/GetSingletonEntry/GetSingletonEntryUseCase.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport { GetSingletonEntryUseCase as UseCaseAbstraction } from \"./abstractions.js\";\nimport { CMS_MODEL_SINGLETON_TAG } from \"~/constants.js\";\nimport { EntryValidationError } from \"~/domain/contentEntry/errors.js\";\nimport { createCacheKey } from \"@webiny/utils\";\nimport type { CmsEntry, CmsEntryValues, CmsModel } from \"~/types/index.js\";\nimport { CreateEntryUseCase } from \"~/features/contentEntry/CreateEntry/index.js\";\nimport { GetEntryByIdUseCase } from \"~/features/contentEntry/GetEntryById/index.js\";\n\n/**\n * GetSingletonEntryUseCase - Gets the singleton entry for a model.\n *\n * Responsibilities:\n * - Validate model is marked as singleton\n * - Generate singleton entry ID from model ID\n * - Try to get existing entry\n * - If not found, create a new entry with skipValidators: [\"required\"]\n * - Delegate to generic GetEntry and CreateEntry use cases\n */\nclass GetSingletonEntryUseCaseImpl implements UseCaseAbstraction.Interface {\n public constructor(\n private getEntryById: GetEntryByIdUseCase.Interface,\n private createEntry: CreateEntryUseCase.Interface\n ) {}\n\n async execute<T extends CmsEntryValues = CmsEntryValues>(\n model: CmsModel\n ): Promise<Result<CmsEntry<T>, UseCaseAbstraction.Error>> {\n // Validate model is marked as singleton\n if (!model.tags?.includes(CMS_MODEL_SINGLETON_TAG)) {\n return Result.fail(new EntryValidationError(\"Model is not marked as singleton.\"));\n }\n\n // Generate singleton entry ID from model ID\n const id = createCacheKey(model.modelId);\n const entryId = `${id}#0001`;\n\n // Try to get existing entry\n const getResult = await this.getEntryById.execute<T>(model, entryId);\n\n if (getResult.isOk()) {\n return getResult;\n }\n\n // Entry doesn't exist, create it\n return await this.createEntry.execute<T>(\n model,\n {\n id,\n values: {\n // safe to cast\n } as T\n },\n {
|
|
1
|
+
{"version":3,"file":"features/contentEntry/GetSingletonEntry/GetSingletonEntryUseCase.js","sources":["../../../../src/features/contentEntry/GetSingletonEntry/GetSingletonEntryUseCase.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport { GetSingletonEntryUseCase as UseCaseAbstraction } from \"./abstractions.js\";\nimport { CMS_MODEL_SINGLETON_TAG } from \"~/constants.js\";\nimport { EntryValidationError } from \"~/domain/contentEntry/errors.js\";\nimport { createCacheKey } from \"@webiny/utils\";\nimport type { CmsEntry, CmsEntryValues, CmsModel } from \"~/types/index.js\";\nimport { CreateEntryUseCase } from \"~/features/contentEntry/CreateEntry/index.js\";\nimport { GetEntryByIdUseCase } from \"~/features/contentEntry/GetEntryById/index.js\";\n\n/**\n * GetSingletonEntryUseCase - Gets the singleton entry for a model.\n *\n * Responsibilities:\n * - Validate model is marked as singleton\n * - Generate singleton entry ID from model ID\n * - Try to get existing entry\n * - If not found, create a new entry with skipValidators: [\"required\"]\n * - Delegate to generic GetEntry and CreateEntry use cases\n */\nclass GetSingletonEntryUseCaseImpl implements UseCaseAbstraction.Interface {\n public constructor(\n private getEntryById: GetEntryByIdUseCase.Interface,\n private createEntry: CreateEntryUseCase.Interface\n ) {}\n\n async execute<T extends CmsEntryValues = CmsEntryValues>(\n model: CmsModel\n ): Promise<Result<CmsEntry<T>, UseCaseAbstraction.Error>> {\n // Validate model is marked as singleton\n if (!model.tags?.includes(CMS_MODEL_SINGLETON_TAG)) {\n return Result.fail(new EntryValidationError(\"Model is not marked as singleton.\"));\n }\n\n // Generate singleton entry ID from model ID\n const id = createCacheKey(model.modelId);\n const entryId = `${id}#0001`;\n\n // Try to get existing entry\n const getResult = await this.getEntryById.execute<T>(model, entryId);\n\n if (getResult.isOk()) {\n return getResult;\n }\n\n // Entry doesn't exist, create it\n return await this.createEntry.execute<T>(\n model,\n {\n id,\n values: {\n // safe to cast\n } as T\n },\n { skipValidation: true }\n );\n }\n}\n\nexport const GetSingletonEntryUseCase = UseCaseAbstraction.createImplementation({\n implementation: GetSingletonEntryUseCaseImpl,\n dependencies: [GetEntryByIdUseCase, CreateEntryUseCase]\n});\n"],"names":["GetSingletonEntryUseCaseImpl","getEntryById","createEntry","model","CMS_MODEL_SINGLETON_TAG","Result","EntryValidationError","id","createCacheKey","entryId","getResult","GetSingletonEntryUseCase","UseCaseAbstraction","GetEntryByIdUseCase","CreateEntryUseCase"],"mappings":";;;;;;;AAmBA,MAAMA;IACF,YACYC,YAA2C,EAC3CC,WAAyC,CACnD;aAFUD,YAAY,GAAZA;aACAC,WAAW,GAAXA;IACT;IAEH,MAAM,QACFC,KAAe,EACuC;QAEtD,IAAI,CAACA,MAAM,IAAI,EAAE,SAASC,0BACtB,OAAOC,OAAO,IAAI,CAAC,IAAIC,qBAAqB;QAIhD,MAAMC,KAAKC,eAAeL,MAAM,OAAO;QACvC,MAAMM,UAAU,GAAGF,GAAG,KAAK,CAAC;QAG5B,MAAMG,YAAY,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAIP,OAAOM;QAE5D,IAAIC,UAAU,IAAI,IACd,OAAOA;QAIX,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CACjCP,OACA;YACII;YACA,QAAQ,CAER;QACJ,GACA;YAAE,gBAAgB;QAAK;IAE/B;AACJ;AAEO,MAAMI,oDAA2BC,yBAAAA,oBAAuC,CAAC;IAC5E,gBAAgBZ;IAChB,cAAc;QAACa;QAAqBC;KAAmB;AAC3D"}
|