@webiny/api-headless-cms 0.0.0-unstable.e622468070 → 0.0.0-unstable.e6f0dc8ca7
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/constants.d.ts +2 -1
- package/constants.js +4 -0
- package/constants.js.map +1 -1
- package/context.d.ts +2 -5
- package/context.js +16 -7
- package/context.js.map +1 -1
- package/crud/AccessControl/AccessControl.d.ts +18 -28
- package/crud/AccessControl/AccessControl.js.map +1 -1
- package/crud/AccessControl/README.md +1 -1
- package/crud/contentEntry/entryDataFactories/createEntryData.js +27 -12
- package/crud/contentEntry/entryDataFactories/createEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js +13 -6
- package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.js +4 -1
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js +4 -1
- package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js +2 -1
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js +4 -3
- package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/system.d.ts +10 -0
- package/crud/contentEntry/entryDataFactories/system.js +14 -0
- package/crud/contentEntry/entryDataFactories/system.js.map +1 -0
- package/crud/contentEntry/entryDataValidation.d.ts +1 -1
- package/crud/contentEntry/entryDataValidation.js +19 -16
- package/crud/contentEntry/entryDataValidation.js.map +1 -1
- package/crud/contentEntry/references/buildPaths.d.ts +1 -1
- package/crud/contentEntry/references/buildPaths.js +3 -3
- package/crud/contentEntry/references/buildPaths.js.map +1 -1
- package/crud/contentEntry/searchableFields.d.ts +2 -3
- package/crud/contentEntry/searchableFields.js +15 -19
- package/crud/contentEntry/searchableFields.js.map +1 -1
- package/crud/contentEntry.crud.js +16 -11
- package/crud/contentEntry.crud.js.map +1 -1
- package/crud/contentModel/fields/descriptionField.js +1 -1
- package/crud/contentModel/fields/descriptionField.js.map +1 -1
- package/crud/contentModel/fields/imageField.js +1 -1
- package/crud/contentModel/fields/imageField.js.map +1 -1
- package/crud/contentModel/fields/titleField.js +1 -1
- package/crud/contentModel/fields/titleField.js.map +1 -1
- package/crud/contentModel/validation.d.ts +224 -902
- package/crud/contentModel/validation.js +64 -36
- package/crud/contentModel/validation.js.map +1 -1
- package/crud/contentModel.crud.js +2 -1
- package/crud/contentModel.crud.js.map +1 -1
- package/domain/contentEntry/EntryId.d.ts +1 -0
- package/domain/contentEntry/EntryId.js +2 -0
- package/domain/contentEntry/EntryId.js.map +1 -1
- package/domain/contentEntry/errors.d.ts +2 -2
- package/domain/contentEntry/errors.js.map +1 -1
- package/domain/contentModel/errors.d.ts +1 -1
- package/domain/contentModel/errors.js.map +1 -1
- package/domain/contentModel/schemas.d.ts +198 -616
- package/domain/contentModel/schemas.js +55 -37
- package/domain/contentModel/schemas.js.map +1 -1
- package/domain/contentModel/validation/fields/descriptionField.js +1 -1
- package/domain/contentModel/validation/fields/descriptionField.js.map +1 -1
- package/domain/contentModel/validation/fields/imageField.js +1 -1
- package/domain/contentModel/validation/fields/imageField.js.map +1 -1
- package/domain/contentModel/validation/fields/titleField.js +1 -1
- package/domain/contentModel/validation/fields/titleField.js.map +1 -1
- package/domain/contentModel/validation/modelFields.js +15 -20
- package/domain/contentModel/validation/modelFields.js.map +1 -1
- package/domain/contentModelGroup/validation.d.ts +34 -82
- package/domain/contentModelGroup/validation.js +2 -2
- package/domain/contentModelGroup/validation.js.map +1 -1
- package/export/graphql/index.js +1 -1
- package/export/graphql/index.js.map +1 -1
- package/export/types.js.map +1 -1
- package/exports/api/cms/entry.d.ts +3 -0
- package/exports/api/cms/entry.js +6 -0
- package/exports/api/cms/entry.js.map +1 -1
- package/exports/api/cms/graphql.d.ts +1 -0
- package/exports/api/cms/graphql.js +3 -0
- package/exports/api/cms/graphql.js.map +1 -0
- package/exports/api/cms/model.d.ts +5 -1
- package/exports/api/cms/model.js +3 -1
- package/exports/api/cms/model.js.map +1 -1
- package/exports/api/cms/storage.d.ts +3 -0
- package/exports/api/cms/storage.js +5 -0
- package/exports/api/cms/storage.js.map +1 -0
- package/exports/api/cms/validation.d.ts +4 -0
- package/exports/api/cms/validation.js +6 -0
- package/exports/api/cms/validation.js.map +1 -0
- package/extensions/entryHooks/OnEntryBeforeCreate.d.ts +3 -7
- package/extensions/index.d.ts +2 -6
- package/features/contentEntry/ContentEntriesFeature.d.ts +4 -1
- package/features/contentEntry/ContentEntriesFeature.js +6 -0
- package/features/contentEntry/ContentEntriesFeature.js.map +1 -1
- package/{utils/contentEntryTraverser → features/contentEntry/ContentEntryTraverser}/ContentEntryTraverser.d.ts +1 -1
- package/{utils/contentEntryTraverser → features/contentEntry/ContentEntryTraverser}/ContentEntryTraverser.js +2 -2
- package/features/contentEntry/ContentEntryTraverser/ContentEntryTraverser.js.map +1 -0
- package/features/contentEntry/ContentEntryTraverser/ContentEntryTraverserProvider.d.ts +14 -0
- package/features/contentEntry/ContentEntryTraverser/ContentEntryTraverserProvider.js +25 -0
- package/features/contentEntry/ContentEntryTraverser/ContentEntryTraverserProvider.js.map +1 -0
- package/features/contentEntry/ContentEntryTraverser/abstractions.d.ts +12 -0
- package/features/contentEntry/ContentEntryTraverser/abstractions.js +7 -0
- package/features/contentEntry/ContentEntryTraverser/abstractions.js.map +1 -0
- package/features/contentEntry/ContentEntryTraverser/feature.d.ts +4 -0
- package/features/contentEntry/ContentEntryTraverser/feature.js +10 -0
- package/features/contentEntry/ContentEntryTraverser/feature.js.map +1 -0
- package/features/contentEntry/ContentEntryTraverser/index.d.ts +2 -0
- package/features/contentEntry/ContentEntryTraverser/index.js +4 -0
- package/features/contentEntry/ContentEntryTraverser/index.js.map +1 -0
- package/features/contentEntry/CreateEntry/CreateEntryUseCase.d.ts +3 -3
- package/features/contentEntry/CreateEntry/CreateEntryUseCase.js +3 -3
- package/features/contentEntry/CreateEntry/CreateEntryUseCase.js.map +1 -1
- package/features/contentEntry/CreateEntry/abstractions.d.ts +1 -0
- package/features/contentEntry/CreateEntry/abstractions.js +1 -0
- package/features/contentEntry/CreateEntry/abstractions.js.map +1 -1
- package/features/contentEntry/CreateEntry/events.d.ts +4 -2
- package/features/contentEntry/CreateEntry/events.js +5 -1
- package/features/contentEntry/CreateEntry/events.js.map +1 -1
- package/features/contentEntry/CreateEntry/feature.d.ts +4 -1
- package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromUseCase.d.ts +3 -3
- package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromUseCase.js +3 -3
- package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromUseCase.js.map +1 -1
- package/features/contentEntry/CreateEntryRevisionFrom/abstractions.d.ts +1 -0
- package/features/contentEntry/CreateEntryRevisionFrom/abstractions.js +1 -0
- package/features/contentEntry/CreateEntryRevisionFrom/abstractions.js.map +1 -1
- package/features/contentEntry/CreateEntryRevisionFrom/events.d.ts +4 -2
- package/features/contentEntry/CreateEntryRevisionFrom/events.js +5 -1
- package/features/contentEntry/CreateEntryRevisionFrom/events.js.map +1 -1
- package/features/contentEntry/CreateEntryRevisionFrom/feature.d.ts +4 -1
- package/features/contentEntry/DeleteEntry/DeleteEntryUseCase.d.ts +1 -1
- package/features/contentEntry/DeleteEntry/DeleteEntryUseCase.js +1 -1
- package/features/contentEntry/DeleteEntry/DeleteEntryUseCase.js.map +1 -1
- package/features/contentEntry/DeleteEntry/MoveEntryToBinUseCase.d.ts +2 -2
- package/features/contentEntry/DeleteEntry/MoveEntryToBinUseCase.js +2 -2
- package/features/contentEntry/DeleteEntry/MoveEntryToBinUseCase.js.map +1 -1
- package/features/contentEntry/DeleteEntry/abstractions.d.ts +2 -0
- package/features/contentEntry/DeleteEntry/abstractions.js +2 -0
- package/features/contentEntry/DeleteEntry/abstractions.js.map +1 -1
- package/features/contentEntry/DeleteEntry/events.d.ts +4 -2
- package/features/contentEntry/DeleteEntry/events.js +5 -1
- package/features/contentEntry/DeleteEntry/events.js.map +1 -1
- package/features/contentEntry/DeleteEntry/feature.d.ts +4 -1
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionUseCase.d.ts +1 -1
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionUseCase.js +1 -1
- package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionUseCase.js.map +1 -1
- package/features/contentEntry/DeleteEntryRevision/abstractions.d.ts +1 -0
- package/features/contentEntry/DeleteEntryRevision/abstractions.js +1 -0
- package/features/contentEntry/DeleteEntryRevision/abstractions.js.map +1 -1
- package/features/contentEntry/DeleteEntryRevision/events.d.ts +4 -2
- package/features/contentEntry/DeleteEntryRevision/events.js +5 -1
- package/features/contentEntry/DeleteEntryRevision/events.js.map +1 -1
- package/features/contentEntry/DeleteEntryRevision/feature.d.ts +4 -1
- package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesUseCase.d.ts +1 -1
- package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesUseCase.js +1 -1
- package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesUseCase.js.map +1 -1
- package/features/contentEntry/DeleteMultipleEntries/abstractions.d.ts +1 -0
- package/features/contentEntry/DeleteMultipleEntries/abstractions.js +1 -0
- package/features/contentEntry/DeleteMultipleEntries/abstractions.js.map +1 -1
- package/features/contentEntry/DeleteMultipleEntries/events.d.ts +4 -2
- package/features/contentEntry/DeleteMultipleEntries/events.js +5 -1
- package/features/contentEntry/DeleteMultipleEntries/events.js.map +1 -1
- package/features/contentEntry/DeleteMultipleEntries/feature.d.ts +4 -1
- package/features/contentEntry/GetEntriesByIds/abstractions.d.ts +1 -0
- package/features/contentEntry/GetEntriesByIds/abstractions.js +1 -0
- package/features/contentEntry/GetEntriesByIds/abstractions.js.map +1 -1
- package/features/contentEntry/GetEntriesByIds/feature.d.ts +4 -1
- package/features/contentEntry/GetEntry/abstractions.d.ts +1 -0
- package/features/contentEntry/GetEntry/abstractions.js +1 -0
- package/features/contentEntry/GetEntry/abstractions.js.map +1 -1
- package/features/contentEntry/GetEntry/feature.d.ts +4 -1
- package/features/contentEntry/GetEntryById/abstractions.d.ts +1 -0
- package/features/contentEntry/GetEntryById/abstractions.js +1 -0
- package/features/contentEntry/GetEntryById/abstractions.js.map +1 -1
- package/features/contentEntry/GetEntryById/feature.d.ts +4 -1
- package/features/contentEntry/GetLatestEntriesByIds/abstractions.d.ts +1 -0
- package/features/contentEntry/GetLatestEntriesByIds/abstractions.js +1 -0
- package/features/contentEntry/GetLatestEntriesByIds/abstractions.js.map +1 -1
- package/features/contentEntry/GetLatestEntriesByIds/feature.d.ts +4 -1
- package/features/contentEntry/GetLatestRevisionByEntryId/abstractions.d.ts +4 -9
- package/features/contentEntry/GetLatestRevisionByEntryId/abstractions.js +4 -9
- package/features/contentEntry/GetLatestRevisionByEntryId/abstractions.js.map +1 -1
- package/features/contentEntry/GetLatestRevisionByEntryId/feature.d.ts +4 -1
- package/features/contentEntry/GetPreviousRevisionByEntryId/abstractions.d.ts +2 -3
- package/features/contentEntry/GetPreviousRevisionByEntryId/abstractions.js +2 -3
- package/features/contentEntry/GetPreviousRevisionByEntryId/abstractions.js.map +1 -1
- package/features/contentEntry/GetPreviousRevisionByEntryId/feature.d.ts +4 -1
- package/features/contentEntry/GetPublishedEntriesByIds/abstractions.d.ts +1 -0
- package/features/contentEntry/GetPublishedEntriesByIds/abstractions.js +1 -0
- package/features/contentEntry/GetPublishedEntriesByIds/abstractions.js.map +1 -1
- package/features/contentEntry/GetPublishedEntriesByIds/feature.d.ts +4 -1
- package/features/contentEntry/GetPublishedRevisionByEntryId/abstractions.d.ts +1 -0
- package/features/contentEntry/GetPublishedRevisionByEntryId/abstractions.js +1 -0
- package/features/contentEntry/GetPublishedRevisionByEntryId/abstractions.js.map +1 -1
- package/features/contentEntry/GetPublishedRevisionByEntryId/feature.d.ts +4 -1
- package/features/contentEntry/GetRevisionById/abstractions.d.ts +1 -0
- package/features/contentEntry/GetRevisionById/abstractions.js +1 -0
- package/features/contentEntry/GetRevisionById/abstractions.js.map +1 -1
- package/features/contentEntry/GetRevisionById/feature.d.ts +4 -1
- package/features/contentEntry/GetRevisionsByEntryId/abstractions.d.ts +1 -0
- package/features/contentEntry/GetRevisionsByEntryId/abstractions.js +1 -0
- package/features/contentEntry/GetRevisionsByEntryId/abstractions.js.map +1 -1
- package/features/contentEntry/GetRevisionsByEntryId/feature.d.ts +4 -1
- package/features/contentEntry/GetSingletonEntry/abstractions.d.ts +1 -0
- package/features/contentEntry/GetSingletonEntry/abstractions.js +1 -0
- package/features/contentEntry/GetSingletonEntry/abstractions.js.map +1 -1
- package/features/contentEntry/GetSingletonEntry/feature.d.ts +4 -1
- package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesUseCase.d.ts +2 -2
- package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesUseCase.js +9 -15
- package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesUseCase.js.map +1 -1
- package/features/contentEntry/GetUniqueFieldValues/feature.d.ts +4 -1
- package/features/contentEntry/ListEntries/ListEntriesRepository.js +6 -1
- package/features/contentEntry/ListEntries/ListEntriesRepository.js.map +1 -1
- package/features/contentEntry/ListEntries/ListEntriesUseCase.d.ts +1 -1
- package/features/contentEntry/ListEntries/ListEntriesUseCase.js +1 -1
- package/features/contentEntry/ListEntries/ListEntriesUseCase.js.map +1 -1
- package/features/contentEntry/ListEntries/abstractions.d.ts +4 -0
- package/features/contentEntry/ListEntries/abstractions.js +4 -0
- package/features/contentEntry/ListEntries/abstractions.js.map +1 -1
- package/features/contentEntry/ListEntries/feature.d.ts +4 -1
- package/features/contentEntry/MoveEntry/MoveEntryUseCase.d.ts +1 -1
- package/features/contentEntry/MoveEntry/MoveEntryUseCase.js +1 -1
- package/features/contentEntry/MoveEntry/MoveEntryUseCase.js.map +1 -1
- package/features/contentEntry/MoveEntry/abstractions.d.ts +1 -0
- package/features/contentEntry/MoveEntry/abstractions.js +1 -0
- package/features/contentEntry/MoveEntry/abstractions.js.map +1 -1
- package/features/contentEntry/MoveEntry/events.d.ts +4 -2
- package/features/contentEntry/MoveEntry/events.js +5 -1
- package/features/contentEntry/MoveEntry/events.js.map +1 -1
- package/features/contentEntry/MoveEntry/feature.d.ts +4 -1
- package/features/contentEntry/PublishEntry/PublishEntryUseCase.d.ts +2 -2
- package/features/contentEntry/PublishEntry/PublishEntryUseCase.js +2 -2
- package/features/contentEntry/PublishEntry/PublishEntryUseCase.js.map +1 -1
- package/features/contentEntry/PublishEntry/abstractions.d.ts +1 -0
- package/features/contentEntry/PublishEntry/abstractions.js +1 -0
- package/features/contentEntry/PublishEntry/abstractions.js.map +1 -1
- package/features/contentEntry/PublishEntry/events.d.ts +4 -2
- package/features/contentEntry/PublishEntry/events.js +5 -1
- package/features/contentEntry/PublishEntry/events.js.map +1 -1
- package/features/contentEntry/PublishEntry/feature.d.ts +4 -1
- package/features/contentEntry/RepublishEntry/RepublishEntryUseCase.d.ts +2 -2
- package/features/contentEntry/RepublishEntry/RepublishEntryUseCase.js +2 -2
- package/features/contentEntry/RepublishEntry/RepublishEntryUseCase.js.map +1 -1
- package/features/contentEntry/RepublishEntry/abstractions.d.ts +1 -0
- package/features/contentEntry/RepublishEntry/abstractions.js +1 -0
- package/features/contentEntry/RepublishEntry/abstractions.js.map +1 -1
- package/features/contentEntry/RepublishEntry/events.d.ts +4 -2
- package/features/contentEntry/RepublishEntry/events.js +5 -1
- package/features/contentEntry/RepublishEntry/events.js.map +1 -1
- package/features/contentEntry/RepublishEntry/feature.d.ts +4 -1
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinUseCase.d.ts +2 -2
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinUseCase.js +2 -2
- package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinUseCase.js.map +1 -1
- package/features/contentEntry/RestoreEntryFromBin/abstractions.d.ts +1 -0
- package/features/contentEntry/RestoreEntryFromBin/abstractions.js +1 -0
- package/features/contentEntry/RestoreEntryFromBin/abstractions.js.map +1 -1
- package/features/contentEntry/RestoreEntryFromBin/events.d.ts +4 -2
- package/features/contentEntry/RestoreEntryFromBin/events.js +5 -1
- package/features/contentEntry/RestoreEntryFromBin/events.js.map +1 -1
- package/features/contentEntry/RestoreEntryFromBin/feature.d.ts +4 -1
- package/features/contentEntry/UnpublishEntry/UnpublishEntryUseCase.d.ts +2 -2
- package/features/contentEntry/UnpublishEntry/UnpublishEntryUseCase.js +2 -2
- package/features/contentEntry/UnpublishEntry/UnpublishEntryUseCase.js.map +1 -1
- package/features/contentEntry/UnpublishEntry/abstractions.d.ts +1 -0
- package/features/contentEntry/UnpublishEntry/abstractions.js +1 -0
- package/features/contentEntry/UnpublishEntry/abstractions.js.map +1 -1
- package/features/contentEntry/UnpublishEntry/events.d.ts +4 -2
- package/features/contentEntry/UnpublishEntry/events.js +5 -1
- package/features/contentEntry/UnpublishEntry/events.js.map +1 -1
- package/features/contentEntry/UnpublishEntry/feature.d.ts +4 -1
- package/features/contentEntry/UpdateEntry/UpdateEntryUseCase.d.ts +3 -3
- package/features/contentEntry/UpdateEntry/UpdateEntryUseCase.js +3 -3
- package/features/contentEntry/UpdateEntry/UpdateEntryUseCase.js.map +1 -1
- package/features/contentEntry/UpdateEntry/abstractions.d.ts +1 -0
- package/features/contentEntry/UpdateEntry/abstractions.js +1 -0
- package/features/contentEntry/UpdateEntry/abstractions.js.map +1 -1
- package/features/contentEntry/UpdateEntry/events.d.ts +4 -2
- package/features/contentEntry/UpdateEntry/events.js +5 -1
- package/features/contentEntry/UpdateEntry/events.js.map +1 -1
- package/features/contentEntry/UpdateEntry/feature.d.ts +4 -1
- package/features/contentEntry/UpdateRevisionDescription/UpdateRevisionDescriptionUseCase.d.ts +22 -0
- package/features/contentEntry/UpdateRevisionDescription/UpdateRevisionDescriptionUseCase.js +90 -0
- package/features/contentEntry/UpdateRevisionDescription/UpdateRevisionDescriptionUseCase.js.map +1 -0
- package/features/contentEntry/UpdateRevisionDescription/abstractions.d.ts +25 -0
- package/features/contentEntry/UpdateRevisionDescription/abstractions.js +10 -0
- package/features/contentEntry/UpdateRevisionDescription/abstractions.js.map +1 -0
- package/features/contentEntry/UpdateRevisionDescription/events.d.ts +44 -0
- package/features/contentEntry/UpdateRevisionDescription/events.js +33 -0
- package/features/contentEntry/UpdateRevisionDescription/events.js.map +1 -0
- package/features/contentEntry/UpdateRevisionDescription/feature.d.ts +12 -0
- package/features/contentEntry/UpdateRevisionDescription/feature.js +20 -0
- package/features/contentEntry/UpdateRevisionDescription/feature.js.map +1 -0
- package/features/contentEntry/UpdateRevisionDescription/index.d.ts +2 -0
- package/features/contentEntry/UpdateRevisionDescription/index.js +4 -0
- package/features/contentEntry/UpdateRevisionDescription/index.js.map +1 -0
- package/features/contentEntry/UpdateSingletonEntry/abstractions.d.ts +1 -0
- package/features/contentEntry/UpdateSingletonEntry/abstractions.js +1 -0
- package/features/contentEntry/UpdateSingletonEntry/abstractions.js.map +1 -1
- package/features/contentEntry/UpdateSingletonEntry/feature.d.ts +4 -1
- package/features/contentEntry/ValidateEntry/abstractions.d.ts +1 -0
- package/features/contentEntry/ValidateEntry/abstractions.js +1 -0
- package/features/contentEntry/ValidateEntry/abstractions.js.map +1 -1
- package/features/contentEntry/ValidateEntry/feature.d.ts +4 -1
- package/features/contentModel/ContentModelFeature.d.ts +4 -1
- package/features/contentModel/ContentModelFeature.js +2 -0
- package/features/contentModel/ContentModelFeature.js.map +1 -1
- package/features/contentModel/CreateModel/CreateModelRepository.d.ts +12 -12
- package/features/contentModel/CreateModel/CreateModelRepository.js +17 -12
- package/features/contentModel/CreateModel/CreateModelRepository.js.map +1 -1
- package/features/contentModel/CreateModel/CreateModelUseCase.d.ts +3 -3
- package/features/contentModel/CreateModel/CreateModelUseCase.js +3 -3
- package/features/contentModel/CreateModel/CreateModelUseCase.js.map +1 -1
- package/features/contentModel/CreateModel/abstractions.d.ts +1 -0
- package/features/contentModel/CreateModel/abstractions.js +1 -0
- package/features/contentModel/CreateModel/abstractions.js.map +1 -1
- package/features/contentModel/CreateModel/events.d.ts +4 -2
- package/features/contentModel/CreateModel/events.js +5 -1
- package/features/contentModel/CreateModel/events.js.map +1 -1
- package/features/contentModel/CreateModel/feature.d.ts +4 -1
- package/features/contentModel/CreateModelFrom/CreateModelFromRepository.d.ts +12 -13
- package/features/contentModel/CreateModelFrom/CreateModelFromRepository.js +25 -15
- package/features/contentModel/CreateModelFrom/CreateModelFromRepository.js.map +1 -1
- package/features/contentModel/CreateModelFrom/CreateModelFromUseCase.d.ts +3 -3
- package/features/contentModel/CreateModelFrom/CreateModelFromUseCase.js +4 -3
- package/features/contentModel/CreateModelFrom/CreateModelFromUseCase.js.map +1 -1
- package/features/contentModel/CreateModelFrom/abstractions.d.ts +1 -0
- package/features/contentModel/CreateModelFrom/abstractions.js +1 -0
- package/features/contentModel/CreateModelFrom/abstractions.js.map +1 -1
- package/features/contentModel/CreateModelFrom/events.d.ts +4 -2
- package/features/contentModel/CreateModelFrom/events.js +5 -1
- package/features/contentModel/CreateModelFrom/events.js.map +1 -1
- package/features/contentModel/CreateModelFrom/feature.d.ts +4 -1
- package/features/contentModel/DeleteModel/DeleteModelUseCase.d.ts +1 -1
- package/features/contentModel/DeleteModel/DeleteModelUseCase.js +1 -1
- package/features/contentModel/DeleteModel/DeleteModelUseCase.js.map +1 -1
- package/features/contentModel/DeleteModel/abstractions.d.ts +1 -0
- package/features/contentModel/DeleteModel/abstractions.js +1 -0
- package/features/contentModel/DeleteModel/abstractions.js.map +1 -1
- package/features/contentModel/DeleteModel/events.d.ts +4 -2
- package/features/contentModel/DeleteModel/events.js +5 -1
- package/features/contentModel/DeleteModel/events.js.map +1 -1
- package/features/contentModel/DeleteModel/feature.d.ts +4 -1
- package/features/contentModel/GetModel/abstractions.d.ts +1 -0
- package/features/contentModel/GetModel/abstractions.js +1 -0
- package/features/contentModel/GetModel/abstractions.js.map +1 -1
- package/features/contentModel/GetModel/feature.d.ts +4 -1
- package/features/contentModel/ListModels/abstractions.d.ts +1 -0
- package/features/contentModel/ListModels/abstractions.js +1 -0
- package/features/contentModel/ListModels/abstractions.js.map +1 -1
- package/features/contentModel/ListModels/feature.d.ts +4 -1
- package/features/contentModel/ModelFieldCompression/ModelFieldCompression.d.ts +15 -0
- package/features/contentModel/ModelFieldCompression/ModelFieldCompression.js +27 -0
- package/features/contentModel/ModelFieldCompression/ModelFieldCompression.js.map +1 -0
- package/features/contentModel/ModelFieldCompression/abstractions.d.ts +17 -0
- package/features/contentModel/ModelFieldCompression/abstractions.js +4 -0
- package/features/contentModel/ModelFieldCompression/abstractions.js.map +1 -0
- package/features/contentModel/ModelFieldCompression/feature.d.ts +4 -0
- package/features/contentModel/ModelFieldCompression/feature.js +10 -0
- package/features/contentModel/ModelFieldCompression/feature.js.map +1 -0
- package/features/contentModel/ModelFieldCompression/index.d.ts +1 -0
- package/features/contentModel/ModelFieldCompression/index.js +3 -0
- package/features/contentModel/ModelFieldCompression/index.js.map +1 -0
- package/features/contentModel/ModelToAstConverter/ModelToAstConverter.d.ts +3 -3
- package/features/contentModel/ModelToAstConverter/ModelToAstConverter.js +6 -6
- package/features/contentModel/ModelToAstConverter/ModelToAstConverter.js.map +1 -1
- package/features/contentModel/ModelToAstConverter/feature.d.ts +4 -1
- package/features/contentModel/UpdateModel/UpdateModelRepository.d.ts +9 -9
- package/features/contentModel/UpdateModel/UpdateModelRepository.js +21 -12
- package/features/contentModel/UpdateModel/UpdateModelRepository.js.map +1 -1
- package/features/contentModel/UpdateModel/UpdateModelUseCase.d.ts +2 -2
- package/features/contentModel/UpdateModel/UpdateModelUseCase.js +6 -3
- package/features/contentModel/UpdateModel/UpdateModelUseCase.js.map +1 -1
- package/features/contentModel/UpdateModel/abstractions.d.ts +1 -0
- package/features/contentModel/UpdateModel/abstractions.js +1 -0
- package/features/contentModel/UpdateModel/abstractions.js.map +1 -1
- package/features/contentModel/UpdateModel/events.d.ts +4 -2
- package/features/contentModel/UpdateModel/events.js +5 -1
- package/features/contentModel/UpdateModel/events.js.map +1 -1
- package/features/contentModel/UpdateModel/feature.d.ts +4 -1
- package/features/contentModel/shared/ModelsFetcher.d.ts +8 -6
- package/features/contentModel/shared/ModelsFetcher.js +14 -4
- package/features/contentModel/shared/ModelsFetcher.js.map +1 -1
- package/features/contentModelGroup/ContentModelGroupFeature.d.ts +4 -1
- package/features/contentModelGroup/CreateGroup/CreateGroupRepository.d.ts +1 -1
- package/features/contentModelGroup/CreateGroup/CreateGroupRepository.js +1 -1
- package/features/contentModelGroup/CreateGroup/CreateGroupRepository.js.map +1 -1
- package/features/contentModelGroup/CreateGroup/CreateGroupUseCase.d.ts +3 -3
- package/features/contentModelGroup/CreateGroup/CreateGroupUseCase.js +3 -3
- package/features/contentModelGroup/CreateGroup/CreateGroupUseCase.js.map +1 -1
- package/features/contentModelGroup/CreateGroup/abstractions.d.ts +1 -0
- package/features/contentModelGroup/CreateGroup/abstractions.js +1 -0
- package/features/contentModelGroup/CreateGroup/abstractions.js.map +1 -1
- package/features/contentModelGroup/CreateGroup/events.d.ts +4 -2
- package/features/contentModelGroup/CreateGroup/events.js +5 -1
- package/features/contentModelGroup/CreateGroup/events.js.map +1 -1
- package/features/contentModelGroup/CreateGroup/feature.d.ts +4 -1
- package/features/contentModelGroup/DeleteGroup/DeleteGroupUseCase.d.ts +1 -1
- package/features/contentModelGroup/DeleteGroup/DeleteGroupUseCase.js +1 -1
- package/features/contentModelGroup/DeleteGroup/DeleteGroupUseCase.js.map +1 -1
- package/features/contentModelGroup/DeleteGroup/abstractions.d.ts +1 -0
- package/features/contentModelGroup/DeleteGroup/abstractions.js +1 -0
- package/features/contentModelGroup/DeleteGroup/abstractions.js.map +1 -1
- package/features/contentModelGroup/DeleteGroup/events.d.ts +4 -2
- package/features/contentModelGroup/DeleteGroup/events.js +5 -1
- package/features/contentModelGroup/DeleteGroup/events.js.map +1 -1
- package/features/contentModelGroup/DeleteGroup/feature.d.ts +4 -1
- package/features/contentModelGroup/GetGroup/GetGroupRepository.d.ts +2 -2
- package/features/contentModelGroup/GetGroup/GetGroupRepository.js +2 -2
- package/features/contentModelGroup/GetGroup/GetGroupRepository.js.map +1 -1
- package/features/contentModelGroup/GetGroup/abstractions.d.ts +1 -0
- package/features/contentModelGroup/GetGroup/abstractions.js +1 -0
- package/features/contentModelGroup/GetGroup/abstractions.js.map +1 -1
- package/features/contentModelGroup/GetGroup/feature.d.ts +4 -1
- package/features/contentModelGroup/ListGroups/ListGroupsRepository.d.ts +2 -2
- package/features/contentModelGroup/ListGroups/ListGroupsRepository.js +2 -2
- package/features/contentModelGroup/ListGroups/ListGroupsRepository.js.map +1 -1
- package/features/contentModelGroup/ListGroups/abstractions.d.ts +1 -0
- package/features/contentModelGroup/ListGroups/abstractions.js +1 -0
- package/features/contentModelGroup/ListGroups/abstractions.js.map +1 -1
- package/features/contentModelGroup/ListGroups/feature.d.ts +4 -1
- package/features/contentModelGroup/UpdateGroup/UpdateGroupUseCase.d.ts +2 -2
- package/features/contentModelGroup/UpdateGroup/UpdateGroupUseCase.js +2 -2
- package/features/contentModelGroup/UpdateGroup/UpdateGroupUseCase.js.map +1 -1
- package/features/contentModelGroup/UpdateGroup/abstractions.d.ts +1 -0
- package/features/contentModelGroup/UpdateGroup/abstractions.js +1 -0
- package/features/contentModelGroup/UpdateGroup/abstractions.js.map +1 -1
- package/features/contentModelGroup/UpdateGroup/events.d.ts +4 -2
- package/features/contentModelGroup/UpdateGroup/events.js +5 -1
- package/features/contentModelGroup/UpdateGroup/events.js.map +1 -1
- package/features/contentModelGroup/UpdateGroup/feature.d.ts +4 -1
- package/features/contentModelGroup/shared/PluginGroupsProvider.d.ts +2 -2
- package/features/contentModelGroup/shared/PluginGroupsProvider.js +2 -2
- package/features/contentModelGroup/shared/PluginGroupsProvider.js.map +1 -1
- package/features/contentModelGroup/shared/abstractions.d.ts +1 -0
- package/features/contentModelGroup/shared/abstractions.js +1 -0
- package/features/contentModelGroup/shared/abstractions.js.map +1 -1
- package/features/graphql/feature.d.ts +4 -0
- package/features/graphql/feature.js +34 -0
- package/features/graphql/feature.js.map +1 -0
- package/features/graphql/fields/CmsModelFieldToGraphQLRegistry.d.ts +13 -0
- package/features/graphql/fields/CmsModelFieldToGraphQLRegistry.js +27 -0
- package/features/graphql/fields/CmsModelFieldToGraphQLRegistry.js.map +1 -0
- package/features/graphql/fields/abstractions/CmsModelFieldToGraphQL.d.ts +97 -0
- package/features/graphql/fields/abstractions/CmsModelFieldToGraphQL.js +4 -0
- package/features/graphql/fields/abstractions/CmsModelFieldToGraphQL.js.map +1 -0
- package/features/graphql/fields/abstractions/CmsModelFieldToGraphQLRegistry.d.ts +10 -0
- package/features/graphql/fields/abstractions/CmsModelFieldToGraphQLRegistry.js +4 -0
- package/features/graphql/fields/abstractions/CmsModelFieldToGraphQLRegistry.js.map +1 -0
- package/features/graphql/fields/base/BooleanToGraphQL.d.ts +26 -0
- package/features/graphql/fields/base/BooleanToGraphQL.js +68 -0
- package/features/graphql/fields/base/BooleanToGraphQL.js.map +1 -0
- package/features/graphql/fields/base/DateTimeToGraphQL.d.ts +26 -0
- package/features/graphql/fields/base/DateTimeToGraphQL.js +97 -0
- package/features/graphql/fields/base/DateTimeToGraphQL.js.map +1 -0
- package/features/graphql/fields/base/DynamicZoneToGraphQL.d.ts +30 -0
- package/features/graphql/fields/base/DynamicZoneToGraphQL.js +280 -0
- package/features/graphql/fields/base/DynamicZoneToGraphQL.js.map +1 -0
- package/features/graphql/fields/base/FileToGraphQL.d.ts +22 -0
- package/features/graphql/fields/base/FileToGraphQL.js +39 -0
- package/features/graphql/fields/base/FileToGraphQL.js.map +1 -0
- package/features/graphql/fields/base/JsonToGraphQL.d.ts +24 -0
- package/features/graphql/fields/base/JsonToGraphQL.js +52 -0
- package/features/graphql/fields/base/JsonToGraphQL.js.map +1 -0
- package/features/graphql/fields/base/LongTextToGraphQL.d.ts +24 -0
- package/features/graphql/fields/base/LongTextToGraphQL.js +57 -0
- package/features/graphql/fields/base/LongTextToGraphQL.js.map +1 -0
- package/features/graphql/fields/base/NumberToGraphQL.d.ts +26 -0
- package/features/graphql/fields/base/NumberToGraphQL.js +78 -0
- package/features/graphql/fields/base/NumberToGraphQL.js.map +1 -0
- package/features/graphql/fields/base/ObjectToGraphQL.d.ts +31 -0
- package/features/graphql/fields/base/ObjectToGraphQL.js +264 -0
- package/features/graphql/fields/base/ObjectToGraphQL.js.map +1 -0
- package/features/graphql/fields/base/RefToGraphQL.d.ts +29 -0
- package/features/graphql/fields/base/RefToGraphQL.js +261 -0
- package/features/graphql/fields/base/RefToGraphQL.js.map +1 -0
- package/features/graphql/fields/base/RichTextToGraphQL.d.ts +25 -0
- package/features/graphql/fields/base/RichTextToGraphQL.js +58 -0
- package/features/graphql/fields/base/RichTextToGraphQL.js.map +1 -0
- package/features/graphql/fields/base/SearchableJsonToGraphQL.d.ts +26 -0
- package/features/graphql/fields/base/SearchableJsonToGraphQL.js +62 -0
- package/features/graphql/fields/base/SearchableJsonToGraphQL.js.map +1 -0
- package/features/graphql/fields/base/TextToGraphQL.d.ts +26 -0
- package/features/graphql/fields/base/TextToGraphQL.js +74 -0
- package/features/graphql/fields/base/TextToGraphQL.js.map +1 -0
- package/features/graphql/fields/base/dynamicZone/createTypeDefsForTemplates.d.ts +16 -0
- package/features/graphql/fields/base/dynamicZone/createTypeDefsForTemplates.js +37 -0
- package/features/graphql/fields/base/dynamicZone/createTypeDefsForTemplates.js.map +1 -0
- package/features/graphql/fields/base/dynamicZone/normalizeDynamicZoneInput.d.ts +3 -0
- package/features/graphql/fields/base/dynamicZone/normalizeDynamicZoneInput.js +14 -0
- package/features/graphql/fields/base/dynamicZone/normalizeDynamicZoneInput.js.map +1 -0
- package/{graphqlFields → features/graphql/fields/base}/richText/richTextResolver.d.ts +1 -1
- package/{graphqlFields → features/graphql/fields/base}/richText/richTextResolver.js +4 -4
- package/features/graphql/fields/base/richText/richTextResolver.js.map +1 -0
- package/{graphqlFields/helpers.d.ts → features/graphql/fields/base/utils/createGraphQLInputField.d.ts} +1 -1
- package/features/graphql/fields/base/utils/createGraphQLInputField.js +17 -0
- package/features/graphql/fields/base/utils/createGraphQLInputField.js.map +1 -0
- package/features/graphql/index.d.ts +4 -0
- package/features/graphql/index.js +6 -0
- package/features/graphql/index.js.map +1 -0
- package/features/graphql/sort/abstractions/CmsGraphQLSchemaSorter.d.ts +13 -0
- package/features/graphql/sort/abstractions/CmsGraphQLSchemaSorter.js +4 -0
- package/features/graphql/sort/abstractions/CmsGraphQLSchemaSorter.js.map +1 -0
- package/features/installer/CmsInstaller.d.ts +1 -1
- package/features/installer/CmsInstaller.js +1 -1
- package/features/installer/CmsInstaller.js.map +1 -1
- package/features/installer/feature.d.ts +4 -1
- package/features/modelBuilder/abstractions.d.ts +8 -4
- package/features/modelBuilder/abstractions.js +5 -2
- package/features/modelBuilder/abstractions.js.map +1 -1
- package/features/modelBuilder/feature.d.ts +4 -1
- package/features/modelBuilder/feature.js +6 -0
- package/features/modelBuilder/feature.js.map +1 -1
- package/features/modelBuilder/fields/BaseFieldBuilder.d.ts +36 -0
- package/features/modelBuilder/fields/BaseFieldBuilder.js +41 -0
- package/features/modelBuilder/fields/BaseFieldBuilder.js.map +1 -0
- package/features/modelBuilder/fields/BooleanFieldType.d.ts +2 -2
- package/features/modelBuilder/fields/BooleanFieldType.js +2 -2
- package/features/modelBuilder/fields/BooleanFieldType.js.map +1 -1
- package/features/modelBuilder/fields/DataFieldBuilder.d.ts +220 -0
- package/features/modelBuilder/fields/DataFieldBuilder.js +211 -0
- package/features/modelBuilder/fields/DataFieldBuilder.js.map +1 -0
- package/features/modelBuilder/fields/DateTimeFieldType.d.ts +3 -3
- package/features/modelBuilder/fields/DateTimeFieldType.js +22 -2
- package/features/modelBuilder/fields/DateTimeFieldType.js.map +1 -1
- package/features/modelBuilder/fields/DynamicZoneFieldType.d.ts +3 -3
- package/features/modelBuilder/fields/DynamicZoneFieldType.js +12 -5
- package/features/modelBuilder/fields/DynamicZoneFieldType.js.map +1 -1
- package/features/modelBuilder/fields/FieldBuilder.d.ts +5 -46
- package/features/modelBuilder/fields/FieldBuilder.js +3 -152
- package/features/modelBuilder/fields/FieldBuilder.js.map +1 -1
- package/features/modelBuilder/fields/FieldBuilderRegistry.d.ts +3 -3
- package/features/modelBuilder/fields/FieldBuilderRegistry.js +11 -1
- package/features/modelBuilder/fields/FieldBuilderRegistry.js.map +1 -1
- package/features/modelBuilder/fields/FileFieldType.d.ts +3 -3
- package/features/modelBuilder/fields/FileFieldType.js +2 -2
- package/features/modelBuilder/fields/FileFieldType.js.map +1 -1
- package/features/modelBuilder/fields/JsonFieldType.d.ts +2 -2
- package/features/modelBuilder/fields/JsonFieldType.js +2 -2
- package/features/modelBuilder/fields/JsonFieldType.js.map +1 -1
- package/features/modelBuilder/fields/LayoutFieldBuilder.d.ts +7 -0
- package/features/modelBuilder/fields/LayoutFieldBuilder.js +9 -0
- package/features/modelBuilder/fields/LayoutFieldBuilder.js.map +1 -0
- package/features/modelBuilder/fields/LongTextFieldType.d.ts +3 -4
- package/features/modelBuilder/fields/LongTextFieldType.js +2 -2
- package/features/modelBuilder/fields/LongTextFieldType.js.map +1 -1
- package/features/modelBuilder/fields/NumberFieldType.d.ts +3 -3
- package/features/modelBuilder/fields/NumberFieldType.js +2 -2
- package/features/modelBuilder/fields/NumberFieldType.js.map +1 -1
- package/features/modelBuilder/fields/ObjectFieldType.d.ts +7 -6
- package/features/modelBuilder/fields/ObjectFieldType.js +21 -6
- package/features/modelBuilder/fields/ObjectFieldType.js.map +1 -1
- package/features/modelBuilder/fields/RefFieldType.d.ts +3 -3
- package/features/modelBuilder/fields/RefFieldType.js +2 -2
- package/features/modelBuilder/fields/RefFieldType.js.map +1 -1
- package/features/modelBuilder/fields/RichTextFieldType.d.ts +2 -2
- package/features/modelBuilder/fields/RichTextFieldType.js +2 -2
- package/features/modelBuilder/fields/RichTextFieldType.js.map +1 -1
- package/features/modelBuilder/fields/SearchableJsonFieldType.d.ts +2 -2
- package/features/modelBuilder/fields/SearchableJsonFieldType.js +2 -2
- package/features/modelBuilder/fields/SearchableJsonFieldType.js.map +1 -1
- package/features/modelBuilder/fields/TextFieldType.d.ts +3 -3
- package/features/modelBuilder/fields/TextFieldType.js +2 -2
- package/features/modelBuilder/fields/TextFieldType.js.map +1 -1
- package/features/modelBuilder/fields/UiAlertFieldType.d.ts +19 -0
- package/features/modelBuilder/fields/UiAlertFieldType.js +36 -0
- package/features/modelBuilder/fields/UiAlertFieldType.js.map +1 -0
- package/features/modelBuilder/fields/UiSeparatorFieldType.d.ts +17 -0
- package/features/modelBuilder/fields/UiSeparatorFieldType.js +31 -0
- package/features/modelBuilder/fields/UiSeparatorFieldType.js.map +1 -0
- package/features/modelBuilder/fields/UiTabsFieldType.d.ts +28 -0
- package/features/modelBuilder/fields/UiTabsFieldType.js +75 -0
- package/features/modelBuilder/fields/UiTabsFieldType.js.map +1 -0
- package/features/modelBuilder/fields/abstractions.d.ts +6 -3
- package/features/modelBuilder/fields/abstractions.js +1 -1
- package/features/modelBuilder/fields/abstractions.js.map +1 -1
- package/features/modelBuilder/fields/{validators.d.ts → fieldTypeValidator.d.ts} +23 -1
- package/features/modelBuilder/fields/fieldTypeValidator.js +31 -0
- package/features/modelBuilder/fields/fieldTypeValidator.js.map +1 -0
- package/features/modelBuilder/index.d.ts +3 -0
- package/features/modelBuilder/index.js +3 -0
- package/features/modelBuilder/index.js.map +1 -1
- package/features/modelBuilder/models/BaseModelBuilder.d.ts +9 -4
- package/features/modelBuilder/models/BaseModelBuilder.js +19 -0
- package/features/modelBuilder/models/BaseModelBuilder.js.map +1 -1
- package/features/modelBuilder/models/PrivateModelBuilder.js +4 -2
- package/features/modelBuilder/models/PrivateModelBuilder.js.map +1 -1
- package/features/modelBuilder/models/PublicModelBuilder.js +16 -4
- package/features/modelBuilder/models/PublicModelBuilder.js.map +1 -1
- package/features/shared/abstractions.d.ts +9 -2
- package/features/shared/abstractions.js +1 -0
- package/features/shared/abstractions.js.map +1 -1
- package/features/sortMapper/abstractions.d.ts +1 -0
- package/features/sortMapper/abstractions.js +1 -0
- package/features/sortMapper/abstractions.js.map +1 -1
- package/features/sortMapper/feature.d.ts +4 -1
- package/features/storage/StorageTransformRegistry.d.ts +13 -0
- package/features/storage/StorageTransformRegistry.js +27 -0
- package/features/storage/StorageTransformRegistry.js.map +1 -0
- package/features/storage/abstractions/StorageTransform.d.ts +26 -0
- package/features/storage/abstractions/StorageTransform.js +4 -0
- package/features/storage/abstractions/StorageTransform.js.map +1 -0
- package/features/storage/abstractions/StorageTransformRegistry.d.ts +10 -0
- package/features/storage/abstractions/StorageTransformRegistry.js +4 -0
- package/features/storage/abstractions/StorageTransformRegistry.js.map +1 -0
- package/features/storage/feature.d.ts +4 -0
- package/features/storage/feature.js +24 -0
- package/features/storage/feature.js.map +1 -0
- package/features/storage/fields/DateStorageTransform.d.ts +10 -0
- package/features/storage/fields/DateStorageTransform.js +110 -0
- package/features/storage/fields/DateStorageTransform.js.map +1 -0
- package/features/storage/fields/DefaultStorageTransform.d.ts +10 -0
- package/features/storage/fields/DefaultStorageTransform.js +20 -0
- package/features/storage/fields/DefaultStorageTransform.js.map +1 -0
- package/features/storage/fields/DynamicZoneStorageTransform.d.ts +10 -0
- package/features/storage/fields/DynamicZoneStorageTransform.js +142 -0
- package/features/storage/fields/DynamicZoneStorageTransform.js.map +1 -0
- package/features/storage/fields/JsonStorageTransform.d.ts +13 -0
- package/features/storage/fields/JsonStorageTransform.js +31 -0
- package/features/storage/fields/JsonStorageTransform.js.map +1 -0
- package/features/storage/fields/LongTextStorageTransform.d.ts +18 -0
- package/features/storage/fields/LongTextStorageTransform.js +55 -0
- package/features/storage/fields/LongTextStorageTransform.js.map +1 -0
- package/features/storage/fields/ObjectStorageTransform.d.ts +10 -0
- package/features/storage/fields/ObjectStorageTransform.js +99 -0
- package/features/storage/fields/ObjectStorageTransform.js.map +1 -0
- package/features/storage/fields/RichTextStorageTransform.d.ts +13 -0
- package/features/storage/fields/RichTextStorageTransform.js +39 -0
- package/features/storage/fields/RichTextStorageTransform.js.map +1 -0
- package/features/storage/index.d.ts +3 -0
- package/features/storage/index.js +5 -0
- package/features/storage/index.js.map +1 -0
- package/features/validation/CmsModelFieldPatternValidatorRegistry.d.ts +12 -0
- package/features/validation/CmsModelFieldPatternValidatorRegistry.js +21 -0
- package/features/validation/CmsModelFieldPatternValidatorRegistry.js.map +1 -0
- package/features/validation/CmsModelFieldValidatorRegistry.d.ts +12 -0
- package/features/validation/CmsModelFieldValidatorRegistry.js +23 -0
- package/features/validation/CmsModelFieldValidatorRegistry.js.map +1 -0
- package/features/validation/abstractions/CmsModelFieldPatternValidator.d.ts +13 -0
- package/features/validation/abstractions/CmsModelFieldPatternValidator.js +4 -0
- package/features/validation/abstractions/CmsModelFieldPatternValidator.js.map +1 -0
- package/features/validation/abstractions/CmsModelFieldPatternValidatorRegistry.d.ts +9 -0
- package/features/validation/abstractions/CmsModelFieldPatternValidatorRegistry.js +4 -0
- package/features/validation/abstractions/CmsModelFieldPatternValidatorRegistry.js.map +1 -0
- package/features/validation/abstractions/CmsModelFieldValidator.d.ts +11 -0
- package/features/validation/abstractions/CmsModelFieldValidator.js +4 -0
- package/features/validation/abstractions/CmsModelFieldValidator.js.map +1 -0
- package/features/validation/abstractions/CmsModelFieldValidatorRegistry.d.ts +9 -0
- package/features/validation/abstractions/CmsModelFieldValidatorRegistry.js +4 -0
- package/features/validation/abstractions/CmsModelFieldValidatorRegistry.js.map +1 -0
- package/features/validation/feature.d.ts +4 -0
- package/features/validation/feature.js +48 -0
- package/features/validation/feature.js.map +1 -0
- package/features/validation/index.d.ts +5 -0
- package/features/validation/index.js +7 -0
- package/features/validation/index.js.map +1 -0
- package/features/validation/validators/DateGteValidator.d.ts +10 -0
- package/features/validation/validators/DateGteValidator.js +26 -0
- package/features/validation/validators/DateGteValidator.js.map +1 -0
- package/features/validation/validators/DateLteValidator.d.ts +10 -0
- package/features/validation/validators/DateLteValidator.js +26 -0
- package/features/validation/validators/DateLteValidator.js.map +1 -0
- package/features/validation/validators/GteValidator.d.ts +10 -0
- package/features/validation/validators/GteValidator.js +21 -0
- package/features/validation/validators/GteValidator.js.map +1 -0
- package/features/validation/validators/InValidator.d.ts +10 -0
- package/features/validation/validators/InValidator.js +21 -0
- package/features/validation/validators/InValidator.js.map +1 -0
- package/features/validation/validators/LteValidator.d.ts +10 -0
- package/features/validation/validators/LteValidator.js +21 -0
- package/features/validation/validators/LteValidator.js.map +1 -0
- package/features/validation/validators/MaxLengthValidator.d.ts +10 -0
- package/features/validation/validators/MaxLengthValidator.js +21 -0
- package/features/validation/validators/MaxLengthValidator.js.map +1 -0
- package/features/validation/validators/MinLengthValidator.d.ts +10 -0
- package/features/validation/validators/MinLengthValidator.js +21 -0
- package/features/validation/validators/MinLengthValidator.js.map +1 -0
- package/features/validation/validators/PatternValidator.d.ts +13 -0
- package/features/validation/validators/PatternValidator.js +38 -0
- package/features/validation/validators/PatternValidator.js.map +1 -0
- package/features/validation/validators/RequiredValidator.d.ts +10 -0
- package/features/validation/validators/RequiredValidator.js +16 -0
- package/features/validation/validators/RequiredValidator.js.map +1 -0
- package/features/validation/validators/TimeGteValidator.d.ts +10 -0
- package/features/validation/validators/TimeGteValidator.js +21 -0
- package/features/validation/validators/TimeGteValidator.js.map +1 -0
- package/features/validation/validators/TimeLteValidator.d.ts +10 -0
- package/features/validation/validators/TimeLteValidator.js +21 -0
- package/features/validation/validators/TimeLteValidator.js.map +1 -0
- package/features/validation/validators/UniqueValidator.d.ts +10 -0
- package/features/validation/validators/UniqueValidator.js +47 -0
- package/features/validation/validators/UniqueValidator.js.map +1 -0
- package/features/validation/validators/patterns/EmailPattern.d.ts +12 -0
- package/features/validation/validators/patterns/EmailPattern.js +14 -0
- package/features/validation/validators/patterns/EmailPattern.js.map +1 -0
- package/features/validation/validators/patterns/LowerCasePattern.d.ts +12 -0
- package/features/validation/validators/patterns/LowerCasePattern.js +14 -0
- package/features/validation/validators/patterns/LowerCasePattern.js.map +1 -0
- package/features/validation/validators/patterns/LowerCaseSpacePattern.d.ts +12 -0
- package/features/validation/validators/patterns/LowerCaseSpacePattern.js +14 -0
- package/features/validation/validators/patterns/LowerCaseSpacePattern.js.map +1 -0
- package/features/validation/validators/patterns/UpperCasePattern.d.ts +12 -0
- package/features/validation/validators/patterns/UpperCasePattern.js +14 -0
- package/features/validation/validators/patterns/UpperCasePattern.js.map +1 -0
- package/features/validation/validators/patterns/UpperCaseSpacePattern.d.ts +12 -0
- package/features/validation/validators/patterns/UpperCaseSpacePattern.js +14 -0
- package/features/validation/validators/patterns/UpperCaseSpacePattern.js.map +1 -0
- package/features/validation/validators/patterns/UrlPattern.d.ts +12 -0
- package/features/validation/validators/patterns/UrlPattern.js +14 -0
- package/features/validation/validators/patterns/UrlPattern.js.map +1 -0
- package/features/whereMapper/abstractions.d.ts +1 -0
- package/features/whereMapper/abstractions.js +1 -0
- package/features/whereMapper/abstractions.js.map +1 -1
- package/features/whereMapper/feature.d.ts +4 -1
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js +2 -2
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js +2 -2
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -1
- package/graphql/getSchema/generateCacheKey.js +15 -7
- package/graphql/getSchema/generateCacheKey.js.map +1 -1
- package/graphql/index.js +2 -1
- package/graphql/index.js.map +1 -1
- package/graphql/schema/baseSchema.d.ts +2 -1
- package/graphql/schema/baseSchema.js +28 -24
- package/graphql/schema/baseSchema.js.map +1 -1
- package/graphql/schema/cms/createEntryResolver.d.ts +10 -0
- package/graphql/schema/cms/createEntryResolver.js +65 -0
- package/graphql/schema/cms/createEntryResolver.js.map +1 -0
- package/graphql/schema/cms/deleteEntryResolver.d.ts +10 -0
- package/graphql/schema/cms/deleteEntryResolver.js +65 -0
- package/graphql/schema/cms/deleteEntryResolver.js.map +1 -0
- package/graphql/schema/cms/getEntryResolver.d.ts +11 -0
- package/graphql/schema/cms/getEntryResolver.js +67 -0
- package/graphql/schema/cms/getEntryResolver.js.map +1 -0
- package/graphql/schema/cms/helpers/buildFieldsSelection.d.ts +23 -0
- package/graphql/schema/cms/helpers/buildFieldsSelection.js +79 -0
- package/graphql/schema/cms/helpers/buildFieldsSelection.js.map +1 -0
- package/graphql/schema/cms/helpers/getErrorMessage.d.ts +4 -0
- package/graphql/schema/cms/helpers/getErrorMessage.js +14 -0
- package/graphql/schema/cms/helpers/getErrorMessage.js.map +1 -0
- package/graphql/schema/cms/helpers/getModel.d.ts +6 -0
- package/graphql/schema/cms/helpers/getModel.js +12 -0
- package/graphql/schema/cms/helpers/getModel.js.map +1 -0
- package/graphql/schema/cms/helpers/index.d.ts +5 -0
- package/graphql/schema/cms/helpers/index.js +7 -0
- package/graphql/schema/cms/helpers/index.js.map +1 -0
- package/graphql/schema/cms/helpers/transformSortToArray.d.ts +18 -0
- package/graphql/schema/cms/helpers/transformSortToArray.js +38 -0
- package/graphql/schema/cms/helpers/transformSortToArray.js.map +1 -0
- package/graphql/schema/cms/helpers/transformWhereToNested.d.ts +17 -0
- package/graphql/schema/cms/helpers/transformWhereToNested.js +54 -0
- package/graphql/schema/cms/helpers/transformWhereToNested.js.map +1 -0
- package/graphql/schema/cms/helpers.d.ts +5 -0
- package/graphql/schema/cms/helpers.js +7 -0
- package/graphql/schema/cms/helpers.js.map +1 -0
- package/graphql/schema/cms/index.d.ts +2 -0
- package/graphql/schema/cms/index.js +26 -0
- package/graphql/schema/cms/index.js.map +1 -0
- package/graphql/schema/cms/listEntriesResolver.d.ts +15 -0
- package/graphql/schema/cms/listEntriesResolver.js +115 -0
- package/graphql/schema/cms/listEntriesResolver.js.map +1 -0
- package/graphql/schema/cms/publishEntryResolver.d.ts +10 -0
- package/graphql/schema/cms/publishEntryResolver.js +65 -0
- package/graphql/schema/cms/publishEntryResolver.js.map +1 -0
- package/graphql/schema/cms/resolvers/createEntry.d.ts +8 -0
- package/graphql/schema/cms/resolvers/createEntry.js +17 -0
- package/graphql/schema/cms/resolvers/createEntry.js.map +1 -0
- package/graphql/schema/cms/resolvers/deleteEntryRevision.d.ts +8 -0
- package/graphql/schema/cms/resolvers/deleteEntryRevision.js +17 -0
- package/graphql/schema/cms/resolvers/deleteEntryRevision.js.map +1 -0
- package/graphql/schema/cms/resolvers/getEntry.d.ts +8 -0
- package/graphql/schema/cms/resolvers/getEntry.js +17 -0
- package/graphql/schema/cms/resolvers/getEntry.js.map +1 -0
- package/graphql/schema/cms/resolvers/index.d.ts +9 -0
- package/graphql/schema/cms/resolvers/index.js +11 -0
- package/graphql/schema/cms/resolvers/index.js.map +1 -0
- package/graphql/schema/cms/resolvers/listEntries.d.ts +8 -0
- package/graphql/schema/cms/resolvers/listEntries.js +17 -0
- package/graphql/schema/cms/resolvers/listEntries.js.map +1 -0
- package/graphql/schema/cms/resolvers/mutationCms.d.ts +8 -0
- package/graphql/schema/cms/resolvers/mutationCms.js +24 -0
- package/graphql/schema/cms/resolvers/mutationCms.js.map +1 -0
- package/graphql/schema/cms/resolvers/publishEntryRevision.d.ts +8 -0
- package/graphql/schema/cms/resolvers/publishEntryRevision.js +17 -0
- package/graphql/schema/cms/resolvers/publishEntryRevision.js.map +1 -0
- package/graphql/schema/cms/resolvers/queryCms.d.ts +8 -0
- package/graphql/schema/cms/resolvers/queryCms.js +23 -0
- package/graphql/schema/cms/resolvers/queryCms.js.map +1 -0
- package/graphql/schema/cms/resolvers/unpublishEntryRevision.d.ts +8 -0
- package/graphql/schema/cms/resolvers/unpublishEntryRevision.js +17 -0
- package/graphql/schema/cms/resolvers/unpublishEntryRevision.js.map +1 -0
- package/graphql/schema/cms/resolvers/updateEntryRevision.d.ts +8 -0
- package/graphql/schema/cms/resolvers/updateEntryRevision.js +17 -0
- package/graphql/schema/cms/resolvers/updateEntryRevision.js.map +1 -0
- package/graphql/schema/cms/typeDefs/index.d.ts +3 -0
- package/graphql/schema/cms/typeDefs/index.js +5 -0
- package/graphql/schema/cms/typeDefs/index.js.map +1 -0
- package/graphql/schema/cms/typeDefs/mutation.d.ts +8 -0
- package/graphql/schema/cms/typeDefs/mutation.js +42 -0
- package/graphql/schema/cms/typeDefs/mutation.js.map +1 -0
- package/graphql/schema/cms/typeDefs/query.d.ts +8 -0
- package/graphql/schema/cms/typeDefs/query.js +36 -0
- package/graphql/schema/cms/typeDefs/query.js.map +1 -0
- package/graphql/schema/cms/typeDefs/responses.d.ts +8 -0
- package/graphql/schema/cms/typeDefs/responses.js +35 -0
- package/graphql/schema/cms/typeDefs/responses.js.map +1 -0
- package/graphql/schema/cms/unpublishEntryResolver.d.ts +10 -0
- package/graphql/schema/cms/unpublishEntryResolver.js +65 -0
- package/graphql/schema/cms/unpublishEntryResolver.js.map +1 -0
- package/graphql/schema/cms/updateEntryResolver.d.ts +11 -0
- package/graphql/schema/cms/updateEntryResolver.js +67 -0
- package/graphql/schema/cms/updateEntryResolver.js.map +1 -0
- package/graphql/schema/contentEntries.js +1 -1
- package/graphql/schema/contentEntries.js.map +1 -1
- package/graphql/schema/contentModels.js +31 -9
- package/graphql/schema/contentModels.js.map +1 -1
- package/graphql/schema/createFieldResolvers.d.ts +3 -2
- package/graphql/schema/createFieldResolvers.js +5 -4
- package/graphql/schema/createFieldResolvers.js.map +1 -1
- package/graphql/schema/createManageResolvers.d.ts +3 -2
- package/graphql/schema/createManageResolvers.js +5 -3
- package/graphql/schema/createManageResolvers.js.map +1 -1
- package/graphql/schema/createManageSDL.d.ts +4 -4
- package/graphql/schema/createManageSDL.js +16 -11
- package/graphql/schema/createManageSDL.js.map +1 -1
- package/graphql/schema/createPreviewResolvers.d.ts +3 -2
- package/graphql/schema/createPreviewResolvers.js +4 -4
- package/graphql/schema/createPreviewResolvers.js.map +1 -1
- package/graphql/schema/createReadResolvers.d.ts +3 -2
- package/graphql/schema/createReadResolvers.js +4 -4
- package/graphql/schema/createReadResolvers.js.map +1 -1
- package/graphql/schema/createReadSDL.d.ts +4 -4
- package/graphql/schema/createReadSDL.js +7 -7
- package/graphql/schema/createReadSDL.js.map +1 -1
- package/graphql/schema/createSingularResolvers.d.ts +3 -2
- package/graphql/schema/createSingularResolvers.js +3 -3
- package/graphql/schema/createSingularResolvers.js.map +1 -1
- package/graphql/schema/createSingularSDL.d.ts +3 -2
- package/graphql/schema/createSingularSDL.js +5 -4
- package/graphql/schema/createSingularSDL.js.map +1 -1
- package/graphql/schema/resolvers/manage/normalizeGraphQlInput.js +9 -7
- package/graphql/schema/resolvers/manage/normalizeGraphQlInput.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUpdateRevisionDescription.d.ts +8 -0
- package/graphql/schema/resolvers/manage/resolveUpdateRevisionDescription.js +13 -0
- package/graphql/schema/resolvers/manage/resolveUpdateRevisionDescription.js.map +1 -0
- package/graphql/schema/schemaPlugins.js +14 -17
- package/graphql/schema/schemaPlugins.js.map +1 -1
- package/index.d.ts +3 -5
- package/index.js +4 -7
- package/index.js.map +1 -1
- package/package.json +36 -32
- package/plugins/CmsModelPlugin.js +19 -4
- package/plugins/CmsModelPlugin.js.map +1 -1
- package/plugins/index.d.ts +0 -2
- package/plugins/index.js +0 -2
- package/plugins/index.js.map +1 -1
- package/types/context.d.ts +5 -5
- package/types/context.js.map +1 -1
- package/types/fields/objectField.d.ts +2 -0
- package/types/fields/objectField.js.map +1 -1
- package/types/model.d.ts +39 -3
- package/types/model.js.map +1 -1
- package/types/modelField.d.ts +47 -15
- package/types/modelField.js.map +1 -1
- package/types/plugins.d.ts +1 -305
- package/types/plugins.js.map +1 -1
- package/types/types.d.ts +28 -61
- package/types/types.js +0 -4
- package/types/types.js.map +1 -1
- package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.d.ts +3 -2
- package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.js +3 -3
- package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.js.map +1 -1
- package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.d.ts +4 -3
- package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.js +3 -3
- package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.js.map +1 -1
- package/utils/converters/ConverterCollection.d.ts +2 -0
- package/utils/converters/ConverterCollection.js +3 -2
- package/utils/converters/ConverterCollection.js.map +1 -1
- package/utils/converters/types.js.map +1 -1
- package/utils/converters/valueKeyFromStorageConverter.d.ts +2 -0
- package/utils/converters/valueKeyFromStorageConverter.js +4 -2
- package/utils/converters/valueKeyFromStorageConverter.js.map +1 -1
- package/utils/converters/valueKeyStorageConverter.d.ts +2 -3
- package/utils/converters/valueKeyStorageConverter.js +7 -3
- package/utils/converters/valueKeyStorageConverter.js.map +1 -1
- package/utils/converters/valueKeyToStorageConverter.d.ts +2 -0
- package/utils/converters/valueKeyToStorageConverter.js +4 -2
- package/utils/converters/valueKeyToStorageConverter.js.map +1 -1
- package/utils/createModelField.js +10 -8
- package/utils/createModelField.js.map +1 -1
- package/utils/createTypeFromFields.d.ts +3 -2
- package/utils/createTypeFromFields.js +3 -3
- package/utils/createTypeFromFields.js.map +1 -1
- package/utils/entryStorage.d.ts +8 -15
- package/utils/entryStorage.js +31 -59
- package/utils/entryStorage.js.map +1 -1
- package/utils/getBaseFieldType.js +3 -0
- package/utils/getBaseFieldType.js.map +1 -1
- package/utils/getSchemaFromFieldPlugins.d.ts +3 -2
- package/utils/getSchemaFromFieldPlugins.js +5 -9
- package/utils/getSchemaFromFieldPlugins.js.map +1 -1
- package/utils/renderFields.d.ts +4 -3
- package/utils/renderFields.js +14 -9
- package/utils/renderFields.js.map +1 -1
- package/utils/renderGetFilterFields.d.ts +3 -2
- package/utils/renderGetFilterFields.js +2 -2
- package/utils/renderGetFilterFields.js.map +1 -1
- package/utils/renderInputFields.d.ts +4 -3
- package/utils/renderInputFields.js +5 -11
- package/utils/renderInputFields.js.map +1 -1
- package/utils/renderListFilterFields.d.ts +3 -2
- package/utils/renderListFilterFields.js +5 -3
- package/utils/renderListFilterFields.js.map +1 -1
- package/utils/renderSortEnum.d.ts +4 -4
- package/utils/renderSortEnum.js +11 -11
- package/utils/renderSortEnum.js.map +1 -1
- package/utils/toSlug.js +1 -1
- package/utils/toSlug.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/state.d.ts +0 -10
- package/crud/contentEntry/entryDataFactories/state.js +0 -16
- package/crud/contentEntry/entryDataFactories/state.js.map +0 -1
- package/crud/contentModel/validateModel.d.ts +0 -9
- package/crud/contentModel/validateModel.js +0 -21
- package/crud/contentModel/validateModel.js.map +0 -1
- package/crud/contentModel/validateModelFields.d.ts +0 -9
- package/crud/contentModel/validateModelFields.js +0 -267
- package/crud/contentModel/validateModelFields.js.map +0 -1
- package/features/modelBuilder/fields/validators.js +0 -3
- package/features/modelBuilder/fields/validators.js.map +0 -1
- package/graphql/schema/createFieldTypePluginRecords.d.ts +0 -3
- package/graphql/schema/createFieldTypePluginRecords.js +0 -8
- package/graphql/schema/createFieldTypePluginRecords.js.map +0 -1
- package/graphqlFields/boolean.d.ts +0 -2
- package/graphqlFields/boolean.js +0 -52
- package/graphqlFields/boolean.js.map +0 -1
- package/graphqlFields/datetime.d.ts +0 -2
- package/graphqlFields/datetime.js +0 -71
- package/graphqlFields/datetime.js.map +0 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.d.ts +0 -2
- package/graphqlFields/dynamicZone/dynamicZoneField.js +0 -313
- package/graphqlFields/dynamicZone/dynamicZoneField.js.map +0 -1
- package/graphqlFields/dynamicZone/index.d.ts +0 -1
- package/graphqlFields/dynamicZone/index.js +0 -3
- package/graphqlFields/dynamicZone/index.js.map +0 -1
- package/graphqlFields/file.d.ts +0 -2
- package/graphqlFields/file.js +0 -37
- package/graphqlFields/file.js.map +0 -1
- package/graphqlFields/helpers.js +0 -20
- package/graphqlFields/helpers.js.map +0 -1
- package/graphqlFields/index.d.ts +0 -2
- package/graphqlFields/index.js +0 -15
- package/graphqlFields/index.js.map +0 -1
- package/graphqlFields/json.d.ts +0 -2
- package/graphqlFields/json.js +0 -42
- package/graphqlFields/json.js.map +0 -1
- package/graphqlFields/longText.d.ts +0 -2
- package/graphqlFields/longText.js +0 -57
- package/graphqlFields/longText.js.map +0 -1
- package/graphqlFields/number.d.ts +0 -2
- package/graphqlFields/number.js +0 -63
- package/graphqlFields/number.js.map +0 -1
- package/graphqlFields/object.d.ts +0 -2
- package/graphqlFields/object.js +0 -245
- package/graphqlFields/object.js.map +0 -1
- package/graphqlFields/ref.d.ts +0 -2
- package/graphqlFields/ref.js +0 -286
- package/graphqlFields/ref.js.map +0 -1
- package/graphqlFields/richText/richTextResolver.js.map +0 -1
- package/graphqlFields/richText.d.ts +0 -2
- package/graphqlFields/richText.js +0 -48
- package/graphqlFields/richText.js.map +0 -1
- package/graphqlFields/searchableJson.d.ts +0 -2
- package/graphqlFields/searchableJson.js +0 -53
- package/graphqlFields/searchableJson.js.map +0 -1
- package/graphqlFields/text.d.ts +0 -2
- package/graphqlFields/text.js +0 -59
- package/graphqlFields/text.js.map +0 -1
- package/plugins/CmsGraphQLSchemaSorterPlugin.d.ts +0 -20
- package/plugins/CmsGraphQLSchemaSorterPlugin.js +0 -19
- package/plugins/CmsGraphQLSchemaSorterPlugin.js.map +0 -1
- package/plugins/StorageTransformPlugin.d.ts +0 -35
- package/plugins/StorageTransformPlugin.js +0 -26
- package/plugins/StorageTransformPlugin.js.map +0 -1
- package/storage/date.d.ts +0 -3
- package/storage/date.js +0 -110
- package/storage/date.js.map +0 -1
- package/storage/default.d.ts +0 -2
- package/storage/default.js +0 -19
- package/storage/default.js.map +0 -1
- package/storage/dynamicZone.d.ts +0 -2
- package/storage/dynamicZone.js +0 -149
- package/storage/dynamicZone.js.map +0 -1
- package/storage/index.d.ts +0 -1
- package/storage/index.js +0 -13
- package/storage/index.js.map +0 -1
- package/storage/json.d.ts +0 -2
- package/storage/json.js +0 -49
- package/storage/json.js.map +0 -1
- package/storage/object.d.ts +0 -2
- package/storage/object.js +0 -104
- package/storage/object.js.map +0 -1
- package/utils/contentEntryTraverser/ContentEntryTraverser.js.map +0 -1
- package/validators/dateGte.d.ts +0 -2
- package/validators/dateGte.js +0 -25
- package/validators/dateGte.js.map +0 -1
- package/validators/dateLte.d.ts +0 -2
- package/validators/dateLte.js +0 -25
- package/validators/dateLte.js.map +0 -1
- package/validators/gte.d.ts +0 -2
- package/validators/gte.js +0 -22
- package/validators/gte.js.map +0 -1
- package/validators/in.d.ts +0 -2
- package/validators/in.js +0 -22
- package/validators/in.js.map +0 -1
- package/validators/index.d.ts +0 -1
- package/validators/index.js +0 -16
- package/validators/index.js.map +0 -1
- package/validators/lte.d.ts +0 -2
- package/validators/lte.js +0 -22
- package/validators/lte.js.map +0 -1
- package/validators/maxLength.d.ts +0 -2
- package/validators/maxLength.js +0 -22
- package/validators/maxLength.js.map +0 -1
- package/validators/minLength.d.ts +0 -2
- package/validators/minLength.js +0 -22
- package/validators/minLength.js.map +0 -1
- package/validators/pattern.d.ts +0 -2
- package/validators/pattern.js +0 -36
- package/validators/pattern.js.map +0 -1
- package/validators/patternPlugins/email.d.ts +0 -2
- package/validators/patternPlugins/email.js +0 -13
- package/validators/patternPlugins/email.js.map +0 -1
- package/validators/patternPlugins/index.d.ts +0 -2
- package/validators/patternPlugins/index.js +0 -11
- package/validators/patternPlugins/index.js.map +0 -1
- package/validators/patternPlugins/lowerCase.d.ts +0 -2
- package/validators/patternPlugins/lowerCase.js +0 -13
- package/validators/patternPlugins/lowerCase.js.map +0 -1
- package/validators/patternPlugins/lowerCaseSpace.d.ts +0 -2
- package/validators/patternPlugins/lowerCaseSpace.js +0 -13
- package/validators/patternPlugins/lowerCaseSpace.js.map +0 -1
- package/validators/patternPlugins/upperCase.d.ts +0 -2
- package/validators/patternPlugins/upperCase.js +0 -13
- package/validators/patternPlugins/upperCase.js.map +0 -1
- package/validators/patternPlugins/upperCaseSpace.d.ts +0 -2
- package/validators/patternPlugins/upperCaseSpace.js +0 -13
- package/validators/patternPlugins/upperCaseSpace.js.map +0 -1
- package/validators/patternPlugins/url.d.ts +0 -2
- package/validators/patternPlugins/url.js +0 -13
- package/validators/patternPlugins/url.js.map +0 -1
- package/validators/required.d.ts +0 -2
- package/validators/required.js +0 -17
- package/validators/required.js.map +0 -1
- package/validators/timeGte.d.ts +0 -2
- package/validators/timeGte.js +0 -20
- package/validators/timeGte.js.map +0 -1
- package/validators/timeLte.d.ts +0 -2
- package/validators/timeLte.js +0 -20
- package/validators/timeLte.js.map +0 -1
- package/validators/unique.d.ts +0 -6
- package/validators/unique.js +0 -57
- package/validators/unique.js.map +0 -1
package/storage/dynamicZone.js
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { StorageTransformPlugin } from "../plugins/index.js";
|
|
2
|
-
import pReduce from "p-reduce";
|
|
3
|
-
const processToStorage = async params => {
|
|
4
|
-
const {
|
|
5
|
-
model,
|
|
6
|
-
field: parentField,
|
|
7
|
-
value: input,
|
|
8
|
-
getStoragePlugin,
|
|
9
|
-
plugins
|
|
10
|
-
} = params;
|
|
11
|
-
const output = structuredClone(input);
|
|
12
|
-
if (!output._templateId) {
|
|
13
|
-
return output;
|
|
14
|
-
}
|
|
15
|
-
const template = parentField.settings.templates.find(t => t.id === output._templateId);
|
|
16
|
-
if (!template || !template.fields.length) {
|
|
17
|
-
return output;
|
|
18
|
-
}
|
|
19
|
-
return await pReduce(template.fields, async (values, field) => {
|
|
20
|
-
const value = values[field.fieldId];
|
|
21
|
-
if (!value) {
|
|
22
|
-
values[field.fieldId] = value;
|
|
23
|
-
return values;
|
|
24
|
-
}
|
|
25
|
-
const plugin = getStoragePlugin(field.type);
|
|
26
|
-
if (!plugin) {
|
|
27
|
-
console.error(`Missing storage plugin for field type "${field.type}".`);
|
|
28
|
-
delete values[field.fieldId];
|
|
29
|
-
return values;
|
|
30
|
-
}
|
|
31
|
-
values[field.fieldId] = await plugin.toStorage({
|
|
32
|
-
plugins,
|
|
33
|
-
getStoragePlugin,
|
|
34
|
-
model,
|
|
35
|
-
field,
|
|
36
|
-
value
|
|
37
|
-
});
|
|
38
|
-
return values;
|
|
39
|
-
}, output);
|
|
40
|
-
};
|
|
41
|
-
const processFromStorage = async params => {
|
|
42
|
-
const {
|
|
43
|
-
model,
|
|
44
|
-
field: parentField,
|
|
45
|
-
value: input,
|
|
46
|
-
getStoragePlugin,
|
|
47
|
-
plugins
|
|
48
|
-
} = params;
|
|
49
|
-
const output = structuredClone(input);
|
|
50
|
-
if (!output._templateId) {
|
|
51
|
-
return output;
|
|
52
|
-
}
|
|
53
|
-
const template = parentField.settings.templates.find(t => t.id === output._templateId);
|
|
54
|
-
if (!template || !template.fields.length) {
|
|
55
|
-
return output;
|
|
56
|
-
}
|
|
57
|
-
return await pReduce(template.fields, async (values, field) => {
|
|
58
|
-
const value = values[field.fieldId];
|
|
59
|
-
if (!value) {
|
|
60
|
-
return values;
|
|
61
|
-
}
|
|
62
|
-
const plugin = getStoragePlugin(field.type);
|
|
63
|
-
if (!plugin) {
|
|
64
|
-
console.error(`Missing storage plugin for field type "${field.type}".`);
|
|
65
|
-
delete values[field.fieldId];
|
|
66
|
-
return values;
|
|
67
|
-
}
|
|
68
|
-
values[field.fieldId] = await plugin.fromStorage({
|
|
69
|
-
plugins,
|
|
70
|
-
getStoragePlugin,
|
|
71
|
-
model,
|
|
72
|
-
field,
|
|
73
|
-
value
|
|
74
|
-
});
|
|
75
|
-
return values;
|
|
76
|
-
}, output);
|
|
77
|
-
};
|
|
78
|
-
export const createDynamicZoneStorageTransform = () => {
|
|
79
|
-
return new StorageTransformPlugin({
|
|
80
|
-
name: "headless-cms.storage-transform.dynamicZone.default",
|
|
81
|
-
fieldType: "dynamicZone",
|
|
82
|
-
toStorage: async ({
|
|
83
|
-
field,
|
|
84
|
-
value: input,
|
|
85
|
-
getStoragePlugin,
|
|
86
|
-
model,
|
|
87
|
-
plugins
|
|
88
|
-
}) => {
|
|
89
|
-
if (!input) {
|
|
90
|
-
return input;
|
|
91
|
-
} else if (field.multipleValues) {
|
|
92
|
-
if (!Array.isArray(input)) {
|
|
93
|
-
return input;
|
|
94
|
-
}
|
|
95
|
-
const values = input;
|
|
96
|
-
return Promise.all(values.map(async value => {
|
|
97
|
-
return await processToStorage({
|
|
98
|
-
model,
|
|
99
|
-
field: field,
|
|
100
|
-
value,
|
|
101
|
-
getStoragePlugin,
|
|
102
|
-
plugins
|
|
103
|
-
});
|
|
104
|
-
}));
|
|
105
|
-
}
|
|
106
|
-
return await processToStorage({
|
|
107
|
-
model,
|
|
108
|
-
field: field,
|
|
109
|
-
value: input,
|
|
110
|
-
getStoragePlugin,
|
|
111
|
-
plugins
|
|
112
|
-
});
|
|
113
|
-
},
|
|
114
|
-
fromStorage: async ({
|
|
115
|
-
field,
|
|
116
|
-
value: input,
|
|
117
|
-
getStoragePlugin,
|
|
118
|
-
model,
|
|
119
|
-
plugins
|
|
120
|
-
}) => {
|
|
121
|
-
if (!input) {
|
|
122
|
-
return input;
|
|
123
|
-
} else if (field.multipleValues) {
|
|
124
|
-
if (!Array.isArray(input)) {
|
|
125
|
-
return input;
|
|
126
|
-
}
|
|
127
|
-
const values = input;
|
|
128
|
-
return await Promise.all(values.map(async value => {
|
|
129
|
-
return await processFromStorage({
|
|
130
|
-
model,
|
|
131
|
-
field: field,
|
|
132
|
-
value,
|
|
133
|
-
getStoragePlugin,
|
|
134
|
-
plugins
|
|
135
|
-
});
|
|
136
|
-
}));
|
|
137
|
-
}
|
|
138
|
-
return await processFromStorage({
|
|
139
|
-
model,
|
|
140
|
-
field: field,
|
|
141
|
-
value: input,
|
|
142
|
-
getStoragePlugin,
|
|
143
|
-
plugins
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
//# sourceMappingURL=dynamicZone.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["StorageTransformPlugin","pReduce","processToStorage","params","model","field","parentField","value","input","getStoragePlugin","plugins","output","structuredClone","_templateId","template","settings","templates","find","t","id","fields","length","values","fieldId","plugin","type","console","error","toStorage","processFromStorage","fromStorage","createDynamicZoneStorageTransform","name","fieldType","multipleValues","Array","isArray","Promise","all","map"],"sources":["dynamicZone.ts"],"sourcesContent":["import type { ToStorageParams } from \"~/plugins/index.js\";\nimport { StorageTransformPlugin } from \"~/plugins/index.js\";\nimport type { GenericRecord } from \"@webiny/api/types.js\";\nimport type { CmsModel, CmsModelDynamicZoneField, CmsModelField } from \"~/types/index.js\";\nimport type { PluginsContainer } from \"@webiny/plugins\";\nimport pReduce from \"p-reduce\";\n\ninterface IProcessParams {\n model: CmsModel;\n field: CmsModelDynamicZoneField;\n value: GenericRecord;\n getStoragePlugin: ToStorageParams<GenericRecord, CmsModelField>[\"getStoragePlugin\"];\n plugins: PluginsContainer;\n}\n\nconst processToStorage = async (params: IProcessParams): Promise<GenericRecord> => {\n const { model, field: parentField, value: input, getStoragePlugin, plugins } = params;\n\n const output: GenericRecord = structuredClone(input);\n\n if (!output._templateId) {\n return output;\n }\n const template = parentField.settings.templates.find(t => t.id === output._templateId);\n if (!template || !template.fields.length) {\n return output;\n }\n\n return await pReduce(\n template.fields,\n async (values, field) => {\n const value = values[field.fieldId];\n\n if (!value) {\n values[field.fieldId] = value;\n return values;\n }\n const plugin = getStoragePlugin(field.type);\n if (!plugin) {\n console.error(`Missing storage plugin for field type \"${field.type}\".`);\n delete values[field.fieldId];\n return values;\n }\n values[field.fieldId] = await plugin.toStorage({\n plugins,\n getStoragePlugin,\n model,\n field,\n value\n });\n\n return values;\n },\n output\n );\n};\n\nconst processFromStorage = async (params: IProcessParams): Promise<GenericRecord> => {\n const { model, field: parentField, value: input, getStoragePlugin, plugins } = params;\n\n const output: GenericRecord = structuredClone(input);\n\n if (!output._templateId) {\n return output;\n }\n const template = parentField.settings.templates.find(t => t.id === output._templateId);\n if (!template || !template.fields.length) {\n return output;\n }\n\n return await pReduce(\n template.fields,\n async (values, field) => {\n const value = values[field.fieldId];\n\n if (!value) {\n return values;\n }\n const plugin = getStoragePlugin(field.type);\n if (!plugin) {\n console.error(`Missing storage plugin for field type \"${field.type}\".`);\n delete values[field.fieldId];\n return values;\n }\n values[field.fieldId] = await plugin.fromStorage({\n plugins,\n getStoragePlugin,\n model,\n field,\n value\n });\n\n return values;\n },\n output\n );\n};\n\nexport const createDynamicZoneStorageTransform = (): StorageTransformPlugin => {\n return new StorageTransformPlugin({\n name: \"headless-cms.storage-transform.dynamicZone.default\",\n fieldType: \"dynamicZone\",\n toStorage: async ({ field, value: input, getStoragePlugin, model, plugins }) => {\n if (!input) {\n return input;\n } else if (field.multipleValues) {\n if (!Array.isArray(input)) {\n return input;\n }\n const values = input as GenericRecord[];\n return Promise.all(\n values.map(async value => {\n return await processToStorage({\n model,\n field: field as CmsModelDynamicZoneField,\n value,\n getStoragePlugin,\n plugins\n });\n })\n );\n }\n return await processToStorage({\n model,\n field: field as CmsModelDynamicZoneField,\n value: input,\n getStoragePlugin,\n plugins\n });\n },\n fromStorage: async ({ field, value: input, getStoragePlugin, model, plugins }) => {\n if (!input) {\n return input;\n } else if (field.multipleValues) {\n if (!Array.isArray(input)) {\n return input;\n }\n const values = input as GenericRecord[];\n\n return await Promise.all(\n values.map(async value => {\n return await processFromStorage({\n model,\n field: field as CmsModelDynamicZoneField,\n value,\n getStoragePlugin,\n plugins\n });\n })\n );\n }\n return await processFromStorage({\n model,\n field: field as CmsModelDynamicZoneField,\n value: input,\n getStoragePlugin,\n plugins\n });\n }\n });\n};\n"],"mappings":"AACA,SAASA,sBAAsB;AAI/B,OAAOC,OAAO,MAAM,UAAU;AAU9B,MAAMC,gBAAgB,GAAG,MAAOC,MAAsB,IAA6B;EAC/E,MAAM;IAAEC,KAAK;IAAEC,KAAK,EAAEC,WAAW;IAAEC,KAAK,EAAEC,KAAK;IAAEC,gBAAgB;IAAEC;EAAQ,CAAC,GAAGP,MAAM;EAErF,MAAMQ,MAAqB,GAAGC,eAAe,CAACJ,KAAK,CAAC;EAEpD,IAAI,CAACG,MAAM,CAACE,WAAW,EAAE;IACrB,OAAOF,MAAM;EACjB;EACA,MAAMG,QAAQ,GAAGR,WAAW,CAACS,QAAQ,CAACC,SAAS,CAACC,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,EAAE,KAAKR,MAAM,CAACE,WAAW,CAAC;EACtF,IAAI,CAACC,QAAQ,IAAI,CAACA,QAAQ,CAACM,MAAM,CAACC,MAAM,EAAE;IACtC,OAAOV,MAAM;EACjB;EAEA,OAAO,MAAMV,OAAO,CAChBa,QAAQ,CAACM,MAAM,EACf,OAAOE,MAAM,EAAEjB,KAAK,KAAK;IACrB,MAAME,KAAK,GAAGe,MAAM,CAACjB,KAAK,CAACkB,OAAO,CAAC;IAEnC,IAAI,CAAChB,KAAK,EAAE;MACRe,MAAM,CAACjB,KAAK,CAACkB,OAAO,CAAC,GAAGhB,KAAK;MAC7B,OAAOe,MAAM;IACjB;IACA,MAAME,MAAM,GAAGf,gBAAgB,CAACJ,KAAK,CAACoB,IAAI,CAAC;IAC3C,IAAI,CAACD,MAAM,EAAE;MACTE,OAAO,CAACC,KAAK,CAAC,0CAA0CtB,KAAK,CAACoB,IAAI,IAAI,CAAC;MACvE,OAAOH,MAAM,CAACjB,KAAK,CAACkB,OAAO,CAAC;MAC5B,OAAOD,MAAM;IACjB;IACAA,MAAM,CAACjB,KAAK,CAACkB,OAAO,CAAC,GAAG,MAAMC,MAAM,CAACI,SAAS,CAAC;MAC3ClB,OAAO;MACPD,gBAAgB;MAChBL,KAAK;MACLC,KAAK;MACLE;IACJ,CAAC,CAAC;IAEF,OAAOe,MAAM;EACjB,CAAC,EACDX,MACJ,CAAC;AACL,CAAC;AAED,MAAMkB,kBAAkB,GAAG,MAAO1B,MAAsB,IAA6B;EACjF,MAAM;IAAEC,KAAK;IAAEC,KAAK,EAAEC,WAAW;IAAEC,KAAK,EAAEC,KAAK;IAAEC,gBAAgB;IAAEC;EAAQ,CAAC,GAAGP,MAAM;EAErF,MAAMQ,MAAqB,GAAGC,eAAe,CAACJ,KAAK,CAAC;EAEpD,IAAI,CAACG,MAAM,CAACE,WAAW,EAAE;IACrB,OAAOF,MAAM;EACjB;EACA,MAAMG,QAAQ,GAAGR,WAAW,CAACS,QAAQ,CAACC,SAAS,CAACC,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,EAAE,KAAKR,MAAM,CAACE,WAAW,CAAC;EACtF,IAAI,CAACC,QAAQ,IAAI,CAACA,QAAQ,CAACM,MAAM,CAACC,MAAM,EAAE;IACtC,OAAOV,MAAM;EACjB;EAEA,OAAO,MAAMV,OAAO,CAChBa,QAAQ,CAACM,MAAM,EACf,OAAOE,MAAM,EAAEjB,KAAK,KAAK;IACrB,MAAME,KAAK,GAAGe,MAAM,CAACjB,KAAK,CAACkB,OAAO,CAAC;IAEnC,IAAI,CAAChB,KAAK,EAAE;MACR,OAAOe,MAAM;IACjB;IACA,MAAME,MAAM,GAAGf,gBAAgB,CAACJ,KAAK,CAACoB,IAAI,CAAC;IAC3C,IAAI,CAACD,MAAM,EAAE;MACTE,OAAO,CAACC,KAAK,CAAC,0CAA0CtB,KAAK,CAACoB,IAAI,IAAI,CAAC;MACvE,OAAOH,MAAM,CAACjB,KAAK,CAACkB,OAAO,CAAC;MAC5B,OAAOD,MAAM;IACjB;IACAA,MAAM,CAACjB,KAAK,CAACkB,OAAO,CAAC,GAAG,MAAMC,MAAM,CAACM,WAAW,CAAC;MAC7CpB,OAAO;MACPD,gBAAgB;MAChBL,KAAK;MACLC,KAAK;MACLE;IACJ,CAAC,CAAC;IAEF,OAAOe,MAAM;EACjB,CAAC,EACDX,MACJ,CAAC;AACL,CAAC;AAED,OAAO,MAAMoB,iCAAiC,GAAGA,CAAA,KAA8B;EAC3E,OAAO,IAAI/B,sBAAsB,CAAC;IAC9BgC,IAAI,EAAE,oDAAoD;IAC1DC,SAAS,EAAE,aAAa;IACxBL,SAAS,EAAE,MAAAA,CAAO;MAAEvB,KAAK;MAAEE,KAAK,EAAEC,KAAK;MAAEC,gBAAgB;MAAEL,KAAK;MAAEM;IAAQ,CAAC,KAAK;MAC5E,IAAI,CAACF,KAAK,EAAE;QACR,OAAOA,KAAK;MAChB,CAAC,MAAM,IAAIH,KAAK,CAAC6B,cAAc,EAAE;QAC7B,IAAI,CAACC,KAAK,CAACC,OAAO,CAAC5B,KAAK,CAAC,EAAE;UACvB,OAAOA,KAAK;QAChB;QACA,MAAMc,MAAM,GAAGd,KAAwB;QACvC,OAAO6B,OAAO,CAACC,GAAG,CACdhB,MAAM,CAACiB,GAAG,CAAC,MAAMhC,KAAK,IAAI;UACtB,OAAO,MAAML,gBAAgB,CAAC;YAC1BE,KAAK;YACLC,KAAK,EAAEA,KAAiC;YACxCE,KAAK;YACLE,gBAAgB;YAChBC;UACJ,CAAC,CAAC;QACN,CAAC,CACL,CAAC;MACL;MACA,OAAO,MAAMR,gBAAgB,CAAC;QAC1BE,KAAK;QACLC,KAAK,EAAEA,KAAiC;QACxCE,KAAK,EAAEC,KAAK;QACZC,gBAAgB;QAChBC;MACJ,CAAC,CAAC;IACN,CAAC;IACDoB,WAAW,EAAE,MAAAA,CAAO;MAAEzB,KAAK;MAAEE,KAAK,EAAEC,KAAK;MAAEC,gBAAgB;MAAEL,KAAK;MAAEM;IAAQ,CAAC,KAAK;MAC9E,IAAI,CAACF,KAAK,EAAE;QACR,OAAOA,KAAK;MAChB,CAAC,MAAM,IAAIH,KAAK,CAAC6B,cAAc,EAAE;QAC7B,IAAI,CAACC,KAAK,CAACC,OAAO,CAAC5B,KAAK,CAAC,EAAE;UACvB,OAAOA,KAAK;QAChB;QACA,MAAMc,MAAM,GAAGd,KAAwB;QAEvC,OAAO,MAAM6B,OAAO,CAACC,GAAG,CACpBhB,MAAM,CAACiB,GAAG,CAAC,MAAMhC,KAAK,IAAI;UACtB,OAAO,MAAMsB,kBAAkB,CAAC;YAC5BzB,KAAK;YACLC,KAAK,EAAEA,KAAiC;YACxCE,KAAK;YACLE,gBAAgB;YAChBC;UACJ,CAAC,CAAC;QACN,CAAC,CACL,CAAC;MACL;MACA,OAAO,MAAMmB,kBAAkB,CAAC;QAC5BzB,KAAK;QACLC,KAAK,EAAEA,KAAiC;QACxCE,KAAK,EAAEC,KAAK;QACZC,gBAAgB;QAChBC;MACJ,CAAC,CAAC;IACN;EACJ,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
package/storage/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const createStorageTransform: () => import("../index.js").StorageTransformPlugin<any, any, import("../types/modelField.js").CmsModelField>[];
|
package/storage/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Storage transforms are used to transform the data before it is saved to the database and after it is read from the database.
|
|
3
|
-
*/
|
|
4
|
-
import { createDefaultStorageTransform } from "./default.js";
|
|
5
|
-
import { createObjectStorageTransform } from "./object.js";
|
|
6
|
-
import { createJsonStorageTransform } from "./json.js";
|
|
7
|
-
import { createDynamicZoneStorageTransform } from "./dynamicZone.js";
|
|
8
|
-
import { createDateStorageTransformPlugin } from "./date.js";
|
|
9
|
-
export const createStorageTransform = () => {
|
|
10
|
-
return [createDefaultStorageTransform(), createDateStorageTransformPlugin(), createObjectStorageTransform(), createJsonStorageTransform(), createDynamicZoneStorageTransform()];
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
package/storage/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createDefaultStorageTransform","createObjectStorageTransform","createJsonStorageTransform","createDynamicZoneStorageTransform","createDateStorageTransformPlugin","createStorageTransform"],"sources":["index.ts"],"sourcesContent":["/**\n * Storage transforms are used to transform the data before it is saved to the database and after it is read from the database.\n */\nimport { createDefaultStorageTransform } from \"./default.js\";\nimport { createObjectStorageTransform } from \"./object.js\";\nimport { createJsonStorageTransform } from \"./json.js\";\nimport { createDynamicZoneStorageTransform } from \"./dynamicZone.js\";\nimport { createDateStorageTransformPlugin } from \"./date.js\";\n\nexport const createStorageTransform = () => {\n return [\n createDefaultStorageTransform(),\n createDateStorageTransformPlugin(),\n createObjectStorageTransform(),\n createJsonStorageTransform(),\n createDynamicZoneStorageTransform()\n ];\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,6BAA6B;AACtC,SAASC,4BAA4B;AACrC,SAASC,0BAA0B;AACnC,SAASC,iCAAiC;AAC1C,SAASC,gCAAgC;AAEzC,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,KAAM;EACxC,OAAO,CACHL,6BAA6B,CAAC,CAAC,EAC/BI,gCAAgC,CAAC,CAAC,EAClCH,4BAA4B,CAAC,CAAC,EAC9BC,0BAA0B,CAAC,CAAC,EAC5BC,iCAAiC,CAAC,CAAC,CACtC;AACL,CAAC","ignoreList":[]}
|
package/storage/json.d.ts
DELETED
package/storage/json.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { StorageTransformPlugin } from "../plugins/StorageTransformPlugin.js";
|
|
2
|
-
import { CompressorPlugin } from "@webiny/api";
|
|
3
|
-
import { WebinyError } from "@webiny/error";
|
|
4
|
-
export const createJsonStorageTransform = () => {
|
|
5
|
-
return new StorageTransformPlugin({
|
|
6
|
-
name: "headless-cms.storage-transform.json",
|
|
7
|
-
fieldType: "json",
|
|
8
|
-
fromStorage: async ({
|
|
9
|
-
field,
|
|
10
|
-
value: storageValue,
|
|
11
|
-
plugins
|
|
12
|
-
}) => {
|
|
13
|
-
if (!storageValue) {
|
|
14
|
-
return storageValue;
|
|
15
|
-
} else if (typeof storageValue !== "object") {
|
|
16
|
-
throw new WebinyError(`JSON value received in "fromStorage" function is not an object in field "${field.storageId}" - ${field.fieldId}.`);
|
|
17
|
-
}
|
|
18
|
-
let compressor;
|
|
19
|
-
try {
|
|
20
|
-
compressor = plugins.oneByType(CompressorPlugin.type);
|
|
21
|
-
} catch {
|
|
22
|
-
return storageValue;
|
|
23
|
-
}
|
|
24
|
-
try {
|
|
25
|
-
return await compressor.getCompressor().decompress(storageValue);
|
|
26
|
-
} catch {
|
|
27
|
-
return storageValue;
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
toStorage: async ({
|
|
31
|
-
value,
|
|
32
|
-
plugins
|
|
33
|
-
}) => {
|
|
34
|
-
let compressor;
|
|
35
|
-
try {
|
|
36
|
-
compressor = plugins.oneByType(CompressorPlugin.type);
|
|
37
|
-
} catch {
|
|
38
|
-
return value;
|
|
39
|
-
}
|
|
40
|
-
try {
|
|
41
|
-
return await compressor.getCompressor().compress(value);
|
|
42
|
-
} catch {
|
|
43
|
-
return value;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
//# sourceMappingURL=json.js.map
|
package/storage/json.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["StorageTransformPlugin","CompressorPlugin","WebinyError","createJsonStorageTransform","name","fieldType","fromStorage","field","value","storageValue","plugins","storageId","fieldId","compressor","oneByType","type","getCompressor","decompress","toStorage","compress"],"sources":["json.ts"],"sourcesContent":["import { StorageTransformPlugin } from \"~/plugins/StorageTransformPlugin.js\";\nimport { CompressorPlugin } from \"@webiny/api\";\nimport { WebinyError } from \"@webiny/error\";\n\nexport const createJsonStorageTransform = (): StorageTransformPlugin => {\n return new StorageTransformPlugin({\n name: \"headless-cms.storage-transform.json\",\n fieldType: \"json\",\n fromStorage: async ({ field, value: storageValue, plugins }) => {\n if (!storageValue) {\n return storageValue;\n } else if (typeof storageValue !== \"object\") {\n throw new WebinyError(\n `JSON value received in \"fromStorage\" function is not an object in field \"${field.storageId}\" - ${field.fieldId}.`\n );\n }\n\n let compressor: CompressorPlugin;\n\n try {\n compressor = plugins.oneByType<CompressorPlugin>(CompressorPlugin.type);\n } catch {\n return storageValue;\n }\n\n try {\n return await compressor.getCompressor().decompress(storageValue);\n } catch {\n return storageValue;\n }\n },\n toStorage: async ({ value, plugins }) => {\n let compressor: CompressorPlugin;\n\n try {\n compressor = plugins.oneByType<CompressorPlugin>(CompressorPlugin.type);\n } catch {\n return value;\n }\n try {\n return await compressor.getCompressor().compress(value);\n } catch {\n return value;\n }\n }\n });\n};\n"],"mappings":"AAAA,SAASA,sBAAsB;AAC/B,SAASC,gBAAgB,QAAQ,aAAa;AAC9C,SAASC,WAAW,QAAQ,eAAe;AAE3C,OAAO,MAAMC,0BAA0B,GAAGA,CAAA,KAA8B;EACpE,OAAO,IAAIH,sBAAsB,CAAC;IAC9BI,IAAI,EAAE,qCAAqC;IAC3CC,SAAS,EAAE,MAAM;IACjBC,WAAW,EAAE,MAAAA,CAAO;MAAEC,KAAK;MAAEC,KAAK,EAAEC,YAAY;MAAEC;IAAQ,CAAC,KAAK;MAC5D,IAAI,CAACD,YAAY,EAAE;QACf,OAAOA,YAAY;MACvB,CAAC,MAAM,IAAI,OAAOA,YAAY,KAAK,QAAQ,EAAE;QACzC,MAAM,IAAIP,WAAW,CACjB,4EAA4EK,KAAK,CAACI,SAAS,OAAOJ,KAAK,CAACK,OAAO,GACnH,CAAC;MACL;MAEA,IAAIC,UAA4B;MAEhC,IAAI;QACAA,UAAU,GAAGH,OAAO,CAACI,SAAS,CAAmBb,gBAAgB,CAACc,IAAI,CAAC;MAC3E,CAAC,CAAC,MAAM;QACJ,OAAON,YAAY;MACvB;MAEA,IAAI;QACA,OAAO,MAAMI,UAAU,CAACG,aAAa,CAAC,CAAC,CAACC,UAAU,CAACR,YAAY,CAAC;MACpE,CAAC,CAAC,MAAM;QACJ,OAAOA,YAAY;MACvB;IACJ,CAAC;IACDS,SAAS,EAAE,MAAAA,CAAO;MAAEV,KAAK;MAAEE;IAAQ,CAAC,KAAK;MACrC,IAAIG,UAA4B;MAEhC,IAAI;QACAA,UAAU,GAAGH,OAAO,CAACI,SAAS,CAAmBb,gBAAgB,CAACc,IAAI,CAAC;MAC3E,CAAC,CAAC,MAAM;QACJ,OAAOP,KAAK;MAChB;MACA,IAAI;QACA,OAAO,MAAMK,UAAU,CAACG,aAAa,CAAC,CAAC,CAACG,QAAQ,CAACX,KAAK,CAAC;MAC3D,CAAC,CAAC,MAAM;QACJ,OAAOA,KAAK;MAChB;IACJ;EACJ,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
package/storage/object.d.ts
DELETED
package/storage/object.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import pReduce from "p-reduce";
|
|
2
|
-
import pMap from "p-map";
|
|
3
|
-
import { StorageTransformPlugin } from "../plugins/StorageTransformPlugin.js";
|
|
4
|
-
import { getBaseFieldType } from "../utils/getBaseFieldType.js";
|
|
5
|
-
const processValue = async params => {
|
|
6
|
-
const {
|
|
7
|
-
fields,
|
|
8
|
-
sourceValue,
|
|
9
|
-
getStoragePlugin,
|
|
10
|
-
plugins,
|
|
11
|
-
model,
|
|
12
|
-
operation
|
|
13
|
-
} = params;
|
|
14
|
-
return await pReduce(fields, async (values, field) => {
|
|
15
|
-
const baseType = getBaseFieldType(field);
|
|
16
|
-
const plugin = getStoragePlugin(baseType);
|
|
17
|
-
if (!plugin) {
|
|
18
|
-
throw new Error(`Missing storage plugin for field type "${baseType}".`);
|
|
19
|
-
}
|
|
20
|
-
const input = sourceValue[field.fieldId];
|
|
21
|
-
const value = await plugin[operation]({
|
|
22
|
-
plugins,
|
|
23
|
-
model,
|
|
24
|
-
field,
|
|
25
|
-
value: input,
|
|
26
|
-
getStoragePlugin
|
|
27
|
-
});
|
|
28
|
-
return {
|
|
29
|
-
...values,
|
|
30
|
-
[field.fieldId]: value
|
|
31
|
-
};
|
|
32
|
-
}, {});
|
|
33
|
-
};
|
|
34
|
-
export const createObjectStorageTransform = () => {
|
|
35
|
-
return new StorageTransformPlugin({
|
|
36
|
-
name: "headless-cms.storage-transform.object.default",
|
|
37
|
-
fieldType: "object",
|
|
38
|
-
toStorage: async ({
|
|
39
|
-
field,
|
|
40
|
-
value,
|
|
41
|
-
getStoragePlugin,
|
|
42
|
-
model,
|
|
43
|
-
plugins
|
|
44
|
-
}) => {
|
|
45
|
-
if (!value) {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
const fields = field.settings?.fields || [];
|
|
49
|
-
if (field.multipleValues) {
|
|
50
|
-
return await pMap(value, value => processValue({
|
|
51
|
-
sourceValue: value,
|
|
52
|
-
getStoragePlugin,
|
|
53
|
-
model,
|
|
54
|
-
plugins,
|
|
55
|
-
operation: "toStorage",
|
|
56
|
-
fields
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
59
|
-
return await processValue({
|
|
60
|
-
sourceValue: value,
|
|
61
|
-
getStoragePlugin,
|
|
62
|
-
model,
|
|
63
|
-
plugins,
|
|
64
|
-
operation: "toStorage",
|
|
65
|
-
fields
|
|
66
|
-
});
|
|
67
|
-
},
|
|
68
|
-
fromStorage: async ({
|
|
69
|
-
field,
|
|
70
|
-
value: input,
|
|
71
|
-
getStoragePlugin,
|
|
72
|
-
plugins,
|
|
73
|
-
model
|
|
74
|
-
}) => {
|
|
75
|
-
if (!input) {
|
|
76
|
-
return null;
|
|
77
|
-
}
|
|
78
|
-
const fields = field.settings?.fields || [];
|
|
79
|
-
if (field.multipleValues) {
|
|
80
|
-
const values = input;
|
|
81
|
-
return await Promise.all(values.map(async value => {
|
|
82
|
-
return await processValue({
|
|
83
|
-
sourceValue: value,
|
|
84
|
-
getStoragePlugin,
|
|
85
|
-
model,
|
|
86
|
-
plugins,
|
|
87
|
-
operation: "fromStorage",
|
|
88
|
-
fields
|
|
89
|
-
});
|
|
90
|
-
}));
|
|
91
|
-
}
|
|
92
|
-
return await processValue({
|
|
93
|
-
sourceValue: input,
|
|
94
|
-
getStoragePlugin,
|
|
95
|
-
model,
|
|
96
|
-
plugins,
|
|
97
|
-
operation: "fromStorage",
|
|
98
|
-
fields
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
//# sourceMappingURL=object.js.map
|
package/storage/object.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["pReduce","pMap","StorageTransformPlugin","getBaseFieldType","processValue","params","fields","sourceValue","getStoragePlugin","plugins","model","operation","values","field","baseType","plugin","Error","input","fieldId","value","createObjectStorageTransform","name","fieldType","toStorage","settings","multipleValues","fromStorage","Promise","all","map"],"sources":["object.ts"],"sourcesContent":["import pReduce from \"p-reduce\";\nimport pMap from \"p-map\";\nimport type { CmsModel, CmsModelField } from \"~/types/index.js\";\nimport type { PluginsContainer } from \"@webiny/plugins\";\nimport { StorageTransformPlugin } from \"~/plugins/StorageTransformPlugin.js\";\nimport { getBaseFieldType } from \"~/utils/getBaseFieldType.js\";\nimport type { GenericRecord } from \"@webiny/api/types.js\";\n\ninterface ProcessValueParams {\n fields: CmsModelField[];\n sourceValue: GenericRecord;\n getStoragePlugin: (fieldType: string) => StorageTransformPlugin;\n plugins: PluginsContainer;\n model: CmsModel;\n operation: \"toStorage\" | \"fromStorage\";\n}\ninterface ProcessValue {\n (params: ProcessValueParams): Promise<GenericRecord>;\n}\n\nconst processValue: ProcessValue = async params => {\n const { fields, sourceValue, getStoragePlugin, plugins, model, operation } = params;\n return await pReduce(\n fields,\n async (values, field) => {\n const baseType = getBaseFieldType(field);\n const plugin = getStoragePlugin(baseType);\n if (!plugin) {\n throw new Error(`Missing storage plugin for field type \"${baseType}\".`);\n }\n const input = sourceValue[field.fieldId];\n const value = await plugin[operation]({\n plugins,\n model,\n field,\n value: input,\n getStoragePlugin\n });\n return { ...values, [field.fieldId]: value };\n },\n {}\n );\n};\n\nexport const createObjectStorageTransform = (): StorageTransformPlugin => {\n return new StorageTransformPlugin({\n name: \"headless-cms.storage-transform.object.default\",\n fieldType: \"object\",\n toStorage: async ({ field, value, getStoragePlugin, model, plugins }) => {\n if (!value) {\n return null;\n }\n\n const fields = (field.settings?.fields || []) as CmsModelField[];\n\n if (field.multipleValues) {\n return await pMap(value as GenericRecord[], value =>\n processValue({\n sourceValue: value,\n getStoragePlugin,\n model,\n plugins,\n operation: \"toStorage\",\n fields\n })\n );\n }\n\n return await processValue({\n sourceValue: value,\n getStoragePlugin,\n model,\n plugins,\n operation: \"toStorage\",\n fields\n });\n },\n fromStorage: async ({ field, value: input, getStoragePlugin, plugins, model }) => {\n if (!input) {\n return null;\n }\n\n const fields = (field.settings?.fields || []) as CmsModelField[];\n\n if (field.multipleValues) {\n const values = input as GenericRecord[];\n\n return await Promise.all(\n values.map(async value => {\n return await processValue({\n sourceValue: value,\n getStoragePlugin,\n model,\n plugins,\n operation: \"fromStorage\",\n fields\n });\n })\n );\n }\n\n return await processValue({\n sourceValue: input,\n getStoragePlugin,\n model,\n plugins,\n operation: \"fromStorage\",\n fields\n });\n }\n });\n};\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["nodeHasChildren","node","children","length","childrenAreCollections","every","type","ContentEntryTraverser","constructor","modelAst","traverse","values","visitor","visitTree","root","path","context","parent","field","getFieldFromNode","fieldIdKey","fieldId","value","undefined","fieldPath","join","multipleValues","arrayValue","ensureArray","i","findCollectionAndVisit","toString","Array","isArray","collection","find","child","discriminator","id"],"sources":["ContentEntryTraverser.ts"],"sourcesContent":["import type {\n CmsEntryValues,\n CmsModelAst,\n CmsModelFieldAstNode,\n CmsModelFieldAstNodeCollection,\n CmsModelFieldAstNodeField,\n ContentEntryValueVisitor\n} from \"~/types/index.js\";\n\ntype ParentNode = CmsModelAst | CmsModelFieldAstNode | null;\n\ntype VisitorContext = {\n node: CmsModelFieldAstNode;\n parent: ParentNode;\n};\n\nconst nodeHasChildren = (node: CmsModelFieldAstNode) => {\n return node.children.length > 0;\n};\n\ninterface NodeWithCollections extends CmsModelFieldAstNodeField {\n children: CmsModelFieldAstNodeCollection[];\n}\n\nconst childrenAreCollections = (node: CmsModelFieldAstNode): node is NodeWithCollections => {\n return node.children.every(node => node.type === \"collection\");\n};\n\nexport interface IContentEntryTraverser {\n traverse(values: CmsEntryValues, visitor: ContentEntryValueVisitor): Promise<void>;\n}\n\nexport class ContentEntryTraverser implements IContentEntryTraverser {\n private readonly modelAst: CmsModelAst;\n\n constructor(modelAst: CmsModelAst) {\n this.modelAst = modelAst;\n }\n\n async traverse<T extends CmsEntryValues = CmsEntryValues>(\n values: T,\n visitor: ContentEntryValueVisitor\n ) {\n await this.visitTree<T>(this.modelAst, values, [], visitor);\n }\n\n private async visitTree<T extends CmsEntryValues = CmsEntryValues>(\n root: CmsModelAst | CmsModelFieldAstNode,\n values: T,\n path: string[],\n visitor: ContentEntryValueVisitor\n ) {\n for (const node of root.children) {\n const context: VisitorContext = { node, parent: root };\n const field = this.getFieldFromNode(context);\n const fieldIdKey = field.fieldId as keyof T;\n let value = values[fieldIdKey];\n\n // We do not descend into nodes if they're `null` or `undefined`.\n if (nodeHasChildren(node) && (value === null || value === undefined)) {\n continue;\n }\n\n // We do not visit leaf nodes that are `undefined`.\n if (!nodeHasChildren(node) && value === undefined) {\n continue;\n }\n\n const fieldPath = [...path, field.fieldId];\n\n await visitor(\n {\n field,\n value,\n path: fieldPath.join(\".\")\n },\n context\n );\n\n // Refetch the value from the original input, in case the value changed within the visitor.\n value = values[fieldIdKey];\n\n if (nodeHasChildren(node) && childrenAreCollections(node)) {\n if (field.multipleValues) {\n const arrayValue = this.ensureArray(value);\n for (let i = 0; i < arrayValue.length; i++) {\n await this.findCollectionAndVisit<T>(\n node,\n arrayValue[i],\n [...fieldPath, i.toString()],\n visitor\n );\n }\n continue;\n }\n await this.findCollectionAndVisit<T>(node, value as T, fieldPath, visitor);\n }\n\n if (field.multipleValues) {\n const arrayValue = this.ensureArray(value);\n for (let i = 0; i < arrayValue.length; i++) {\n await this.visitTree(\n node,\n arrayValue[i],\n [...fieldPath, i.toString()],\n visitor\n );\n }\n continue;\n }\n\n await this.visitTree<T>(node, value as T, fieldPath, visitor);\n }\n }\n\n private ensureArray(value: any) {\n if (!Array.isArray(value)) {\n return [];\n }\n\n return value;\n }\n\n private findCollectionAndVisit<T extends CmsEntryValues = CmsEntryValues>(\n node: NodeWithCollections,\n values: T,\n path: string[],\n visitor: ContentEntryValueVisitor\n ) {\n const collection = node.children.find(child => {\n // Use the `discriminator` to find the correct value.\n return values[child.collection.discriminator as keyof T] === child.collection.id;\n });\n\n if (!collection) {\n return;\n }\n\n return this.visitTree(collection, values, path, visitor);\n }\n\n private getFieldFromNode({ node, parent }: VisitorContext) {\n if (node.type === \"collection\") {\n return (parent as CmsModelFieldAstNodeField).field;\n }\n\n return (node as CmsModelFieldAstNodeField).field;\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
package/validators/dateGte.d.ts
DELETED
package/validators/dateGte.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { validation } from "@webiny/validation";
|
|
2
|
-
export const createDateGteValidator = () => ({
|
|
3
|
-
type: "cms-model-field-validator",
|
|
4
|
-
name: "cms-model-field-validator-date-gte",
|
|
5
|
-
validator: {
|
|
6
|
-
name: "dateGte",
|
|
7
|
-
async validate({
|
|
8
|
-
value,
|
|
9
|
-
validator
|
|
10
|
-
}) {
|
|
11
|
-
const {
|
|
12
|
-
value: gteValue,
|
|
13
|
-
type
|
|
14
|
-
} = validator.settings || {};
|
|
15
|
-
if (typeof gteValue === "undefined") {
|
|
16
|
-
return true;
|
|
17
|
-
} else if (type === "time") {
|
|
18
|
-
return validation.validate(value, `timeGte:${gteValue}`).then(v => v === true).catch(() => false);
|
|
19
|
-
}
|
|
20
|
-
return validation.validate(value, `dateGte:${gteValue}`).then(v => v === true).catch(() => false);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=dateGte.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["validation","createDateGteValidator","type","name","validator","validate","value","gteValue","settings","then","v","catch"],"sources":["dateGte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types/index.js\";\n\nexport const createDateGteValidator = (): CmsModelFieldValidatorPlugin => ({\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-date-gte\",\n validator: {\n name: \"dateGte\",\n async validate({ value, validator }) {\n const { value: gteValue, type } = validator.settings || {};\n if (typeof gteValue === \"undefined\") {\n return true;\n } else if (type === \"time\") {\n return validation\n .validate(value, `timeGte:${gteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return validation\n .validate(value, `dateGte:${gteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n }\n});\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,oBAAoB;AAG/C,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,MAAqC;EACvEC,IAAI,EAAE,2BAA2B;EACjCC,IAAI,EAAE,oCAAoC;EAC1CC,SAAS,EAAE;IACPD,IAAI,EAAE,SAAS;IACf,MAAME,QAAQA,CAAC;MAAEC,KAAK;MAAEF;IAAU,CAAC,EAAE;MACjC,MAAM;QAAEE,KAAK,EAAEC,QAAQ;QAAEL;MAAK,CAAC,GAAGE,SAAS,CAACI,QAAQ,IAAI,CAAC,CAAC;MAC1D,IAAI,OAAOD,QAAQ,KAAK,WAAW,EAAE;QACjC,OAAO,IAAI;MACf,CAAC,MAAM,IAAIL,IAAI,KAAK,MAAM,EAAE;QACxB,OAAOF,UAAU,CACZK,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCE,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;MAC3B;MACA,OAAOX,UAAU,CACZK,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCE,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;IAC3B;EACJ;AACJ,CAAC,CAAC","ignoreList":[]}
|
package/validators/dateLte.d.ts
DELETED
package/validators/dateLte.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { validation } from "@webiny/validation";
|
|
2
|
-
export const createDateLteValidator = () => ({
|
|
3
|
-
type: "cms-model-field-validator",
|
|
4
|
-
name: "cms-model-field-validator-date-lte",
|
|
5
|
-
validator: {
|
|
6
|
-
name: "dateLte",
|
|
7
|
-
async validate({
|
|
8
|
-
value,
|
|
9
|
-
validator
|
|
10
|
-
}) {
|
|
11
|
-
const {
|
|
12
|
-
value: lteValue,
|
|
13
|
-
type
|
|
14
|
-
} = validator.settings || {};
|
|
15
|
-
if (typeof lteValue === "undefined") {
|
|
16
|
-
return true;
|
|
17
|
-
} else if (type === "time") {
|
|
18
|
-
return validation.validate(value, `timeLte:${lteValue}`).then(v => v === true).catch(() => false);
|
|
19
|
-
}
|
|
20
|
-
return validation.validate(value, `dateLte:${lteValue}`).then(v => v === true).catch(() => false);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=dateLte.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["validation","createDateLteValidator","type","name","validator","validate","value","lteValue","settings","then","v","catch"],"sources":["dateLte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types/index.js\";\n\nexport const createDateLteValidator = (): CmsModelFieldValidatorPlugin => ({\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-date-lte\",\n validator: {\n name: \"dateLte\",\n async validate({ value, validator }) {\n const { value: lteValue, type } = validator.settings || {};\n if (typeof lteValue === \"undefined\") {\n return true;\n } else if (type === \"time\") {\n return validation\n .validate(value, `timeLte:${lteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return validation\n .validate(value, `dateLte:${lteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n }\n});\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,oBAAoB;AAG/C,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,MAAqC;EACvEC,IAAI,EAAE,2BAA2B;EACjCC,IAAI,EAAE,oCAAoC;EAC1CC,SAAS,EAAE;IACPD,IAAI,EAAE,SAAS;IACf,MAAME,QAAQA,CAAC;MAAEC,KAAK;MAAEF;IAAU,CAAC,EAAE;MACjC,MAAM;QAAEE,KAAK,EAAEC,QAAQ;QAAEL;MAAK,CAAC,GAAGE,SAAS,CAACI,QAAQ,IAAI,CAAC,CAAC;MAC1D,IAAI,OAAOD,QAAQ,KAAK,WAAW,EAAE;QACjC,OAAO,IAAI;MACf,CAAC,MAAM,IAAIL,IAAI,KAAK,MAAM,EAAE;QACxB,OAAOF,UAAU,CACZK,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCE,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;MAC3B;MACA,OAAOX,UAAU,CACZK,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCE,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;IAC3B;EACJ;AACJ,CAAC,CAAC","ignoreList":[]}
|
package/validators/gte.d.ts
DELETED
package/validators/gte.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { validation } from "@webiny/validation";
|
|
2
|
-
export const createGteValidator = () => {
|
|
3
|
-
return {
|
|
4
|
-
type: "cms-model-field-validator",
|
|
5
|
-
name: "cms-model-field-validator-gte",
|
|
6
|
-
validator: {
|
|
7
|
-
name: "gte",
|
|
8
|
-
validate({
|
|
9
|
-
value,
|
|
10
|
-
validator
|
|
11
|
-
}) {
|
|
12
|
-
const gteValue = validator.settings?.value;
|
|
13
|
-
if (typeof gteValue !== "undefined") {
|
|
14
|
-
return validation.validate(value, `gte:${gteValue}`).then(v => v === true).catch(() => false);
|
|
15
|
-
}
|
|
16
|
-
return Promise.resolve(true);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=gte.js.map
|
package/validators/gte.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["validation","createGteValidator","type","name","validator","validate","value","gteValue","settings","then","v","catch","Promise","resolve"],"sources":["gte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types/index.js\";\n\nexport const createGteValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-gte\",\n validator: {\n name: \"gte\",\n validate({ value, validator }) {\n const gteValue = validator.settings?.value;\n if (typeof gteValue !== \"undefined\") {\n return validation\n .validate(value, `gte:${gteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,oBAAoB;AAG/C,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAAoC;EAClE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,+BAA+B;IACrCC,SAAS,EAAE;MACPD,IAAI,EAAE,KAAK;MACXE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,QAAQ,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;QAC1C,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;UACjC,OAAOP,UAAU,CACZK,QAAQ,CAACC,KAAK,EAAE,OAAOC,QAAQ,EAAE,CAAC,CAClCE,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QACA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
|
package/validators/in.d.ts
DELETED
package/validators/in.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { validation } from "@webiny/validation";
|
|
2
|
-
export const createInValidator = () => {
|
|
3
|
-
return {
|
|
4
|
-
type: "cms-model-field-validator",
|
|
5
|
-
name: "cms-model-field-validator-in",
|
|
6
|
-
validator: {
|
|
7
|
-
name: "in",
|
|
8
|
-
validate({
|
|
9
|
-
value,
|
|
10
|
-
validator
|
|
11
|
-
}) {
|
|
12
|
-
const values = validator.settings?.values;
|
|
13
|
-
if (Array.isArray(values)) {
|
|
14
|
-
return validation.validate(value, `in:${values.join(":")}`).then(v => v === true).catch(() => false);
|
|
15
|
-
}
|
|
16
|
-
return Promise.resolve(true);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=in.js.map
|
package/validators/in.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["validation","createInValidator","type","name","validator","validate","value","values","settings","Array","isArray","join","then","v","catch","Promise","resolve"],"sources":["in.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types/index.js\";\n\nexport const createInValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-in\",\n validator: {\n name: \"in\",\n validate({ value, validator }) {\n const values = validator.settings?.values;\n if (Array.isArray(values)) {\n return validation\n .validate(value, `in:${values.join(\":\")}`)\n .then(v => v === true)\n .catch(() => false);\n }\n\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,oBAAoB;AAG/C,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAAoC;EACjE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,8BAA8B;IACpCC,SAAS,EAAE;MACPD,IAAI,EAAE,IAAI;MACVE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,MAAM,GAAGH,SAAS,CAACI,QAAQ,EAAED,MAAM;QACzC,IAAIE,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,EAAE;UACvB,OAAOP,UAAU,CACZK,QAAQ,CAACC,KAAK,EAAE,MAAMC,MAAM,CAACI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CACzCC,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QAEA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
|
package/validators/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const createValidators: () => (import("../types/plugins.js").CmsModelFieldValidatorPlugin | import("../types/plugins.js").CmsModelFieldPatternValidatorPlugin[])[];
|
package/validators/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { createGteValidator } from "./gte.js";
|
|
2
|
-
import { createInValidator } from "./in.js";
|
|
3
|
-
import { createLteValidator } from "./lte.js";
|
|
4
|
-
import { createMaxLengthValidator } from "./maxLength.js";
|
|
5
|
-
import { createMinLengthValidator } from "./minLength.js";
|
|
6
|
-
import { createPatternValidator } from "./pattern.js";
|
|
7
|
-
import { createRequiredValidator } from "./required.js";
|
|
8
|
-
import { createPatternValidatorPlugins } from "./patternPlugins/index.js";
|
|
9
|
-
import { createDateLteValidator } from "./dateLte.js";
|
|
10
|
-
import { createDateGteValidator } from "./dateGte.js";
|
|
11
|
-
import { createTimeLteValidator } from "./timeLte.js";
|
|
12
|
-
import { createTimeGteValidator } from "./timeGte.js";
|
|
13
|
-
import { createUniqueValidator } from "./unique.js";
|
|
14
|
-
export const createValidators = () => [createGteValidator(), createInValidator(), createLteValidator(), createMaxLengthValidator(), createMinLengthValidator(), createPatternValidator(), createRequiredValidator(), createPatternValidatorPlugins(), createDateLteValidator(), createDateGteValidator(), createTimeLteValidator(), createTimeGteValidator(), createUniqueValidator()];
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
package/validators/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createGteValidator","createInValidator","createLteValidator","createMaxLengthValidator","createMinLengthValidator","createPatternValidator","createRequiredValidator","createPatternValidatorPlugins","createDateLteValidator","createDateGteValidator","createTimeLteValidator","createTimeGteValidator","createUniqueValidator","createValidators"],"sources":["index.ts"],"sourcesContent":["import { createGteValidator } from \"./gte.js\";\nimport { createInValidator } from \"./in.js\";\nimport { createLteValidator } from \"./lte.js\";\nimport { createMaxLengthValidator } from \"./maxLength.js\";\nimport { createMinLengthValidator } from \"./minLength.js\";\nimport { createPatternValidator } from \"./pattern.js\";\nimport { createRequiredValidator } from \"./required.js\";\nimport { createPatternValidatorPlugins } from \"./patternPlugins/index.js\";\nimport { createDateLteValidator } from \"./dateLte.js\";\nimport { createDateGteValidator } from \"./dateGte.js\";\nimport { createTimeLteValidator } from \"./timeLte.js\";\nimport { createTimeGteValidator } from \"./timeGte.js\";\nimport { createUniqueValidator } from \"./unique.js\";\n\nexport const createValidators = () => [\n createGteValidator(),\n createInValidator(),\n createLteValidator(),\n createMaxLengthValidator(),\n createMinLengthValidator(),\n createPatternValidator(),\n createRequiredValidator(),\n createPatternValidatorPlugins(),\n createDateLteValidator(),\n createDateGteValidator(),\n createTimeLteValidator(),\n createTimeGteValidator(),\n createUniqueValidator()\n];\n"],"mappings":"AAAA,SAASA,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,kBAAkB;AAC3B,SAASC,wBAAwB;AACjC,SAASC,wBAAwB;AACjC,SAASC,sBAAsB;AAC/B,SAASC,uBAAuB;AAChC,SAASC,6BAA6B;AACtC,SAASC,sBAAsB;AAC/B,SAASC,sBAAsB;AAC/B,SAASC,sBAAsB;AAC/B,SAASC,sBAAsB;AAC/B,SAASC,qBAAqB;AAE9B,OAAO,MAAMC,gBAAgB,GAAGA,CAAA,KAAM,CAClCb,kBAAkB,CAAC,CAAC,EACpBC,iBAAiB,CAAC,CAAC,EACnBC,kBAAkB,CAAC,CAAC,EACpBC,wBAAwB,CAAC,CAAC,EAC1BC,wBAAwB,CAAC,CAAC,EAC1BC,sBAAsB,CAAC,CAAC,EACxBC,uBAAuB,CAAC,CAAC,EACzBC,6BAA6B,CAAC,CAAC,EAC/BC,sBAAsB,CAAC,CAAC,EACxBC,sBAAsB,CAAC,CAAC,EACxBC,sBAAsB,CAAC,CAAC,EACxBC,sBAAsB,CAAC,CAAC,EACxBC,qBAAqB,CAAC,CAAC,CAC1B","ignoreList":[]}
|
package/validators/lte.d.ts
DELETED
package/validators/lte.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { validation } from "@webiny/validation";
|
|
2
|
-
export const createLteValidator = () => {
|
|
3
|
-
return {
|
|
4
|
-
type: "cms-model-field-validator",
|
|
5
|
-
name: "cms-model-field-validator-lte",
|
|
6
|
-
validator: {
|
|
7
|
-
name: "lte",
|
|
8
|
-
validate({
|
|
9
|
-
value,
|
|
10
|
-
validator
|
|
11
|
-
}) {
|
|
12
|
-
const lteValue = validator.settings?.value;
|
|
13
|
-
if (typeof lteValue !== "undefined") {
|
|
14
|
-
return validation.validate(value, `lte:${lteValue}`).then(v => v === true).catch(() => false);
|
|
15
|
-
}
|
|
16
|
-
return Promise.resolve(true);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=lte.js.map
|
package/validators/lte.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["validation","createLteValidator","type","name","validator","validate","value","lteValue","settings","then","v","catch","Promise","resolve"],"sources":["lte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types/index.js\";\n\nexport const createLteValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-lte\",\n validator: {\n name: \"lte\",\n validate({ value, validator }) {\n const lteValue = validator.settings?.value;\n if (typeof lteValue !== \"undefined\") {\n return validation\n .validate(value, `lte:${lteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,oBAAoB;AAG/C,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAAoC;EAClE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,+BAA+B;IACrCC,SAAS,EAAE;MACPD,IAAI,EAAE,KAAK;MACXE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,QAAQ,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;QAC1C,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;UACjC,OAAOP,UAAU,CACZK,QAAQ,CAACC,KAAK,EAAE,OAAOC,QAAQ,EAAE,CAAC,CAClCE,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QACA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
|
package/validators/maxLength.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { validation } from "@webiny/validation";
|
|
2
|
-
export const createMaxLengthValidator = () => {
|
|
3
|
-
return {
|
|
4
|
-
type: "cms-model-field-validator",
|
|
5
|
-
name: "cms-model-field-validator-max-length",
|
|
6
|
-
validator: {
|
|
7
|
-
name: "maxLength",
|
|
8
|
-
validate({
|
|
9
|
-
value,
|
|
10
|
-
validator
|
|
11
|
-
}) {
|
|
12
|
-
const maxLengthValue = validator.settings?.value;
|
|
13
|
-
if (typeof maxLengthValue !== "undefined") {
|
|
14
|
-
return validation.validate(value, `maxLength:${maxLengthValue}`).then(v => v === true).catch(() => false);
|
|
15
|
-
}
|
|
16
|
-
return Promise.resolve(true);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=maxLength.js.map
|