@aopslab/domain-dm-docman 0.1.2
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/LICENSE +202 -0
- package/NOTICE +6 -0
- package/README.md +26 -0
- package/dist/application/errors/AssetServiceError.d.ts +20 -0
- package/dist/application/errors/AssetServiceError.js +13 -0
- package/dist/application/errors/AssetVersionServiceError.d.ts +20 -0
- package/dist/application/errors/AssetVersionServiceError.js +13 -0
- package/dist/application/errors/DocumentGroupServiceError.d.ts +20 -0
- package/dist/application/errors/DocumentGroupServiceError.js +16 -0
- package/dist/application/errors/DocumentSectionLinkServiceError.d.ts +20 -0
- package/dist/application/errors/DocumentSectionLinkServiceError.js +16 -0
- package/dist/application/errors/DocumentServiceError.d.ts +20 -0
- package/dist/application/errors/DocumentServiceError.js +16 -0
- package/dist/application/errors/DocumentVersionServiceError.d.ts +20 -0
- package/dist/application/errors/DocumentVersionServiceError.js +16 -0
- package/dist/application/errors/EmbedServiceError.d.ts +20 -0
- package/dist/application/errors/EmbedServiceError.js +16 -0
- package/dist/application/errors/PageEmbedLinkServiceError.d.ts +20 -0
- package/dist/application/errors/PageEmbedLinkServiceError.js +16 -0
- package/dist/application/errors/PageServiceError.d.ts +20 -0
- package/dist/application/errors/PageServiceError.js +16 -0
- package/dist/application/errors/PageSnippetLinkServiceError.d.ts +20 -0
- package/dist/application/errors/PageSnippetLinkServiceError.js +16 -0
- package/dist/application/errors/PageVersionServiceError.d.ts +20 -0
- package/dist/application/errors/PageVersionServiceError.js +16 -0
- package/dist/application/errors/SectionPageLinkServiceError.d.ts +20 -0
- package/dist/application/errors/SectionPageLinkServiceError.js +16 -0
- package/dist/application/errors/SectionServiceError.d.ts +20 -0
- package/dist/application/errors/SectionServiceError.js +16 -0
- package/dist/application/errors/SnippetServiceError.d.ts +20 -0
- package/dist/application/errors/SnippetServiceError.js +16 -0
- package/dist/application/errors/index.d.ts +1 -0
- package/dist/application/errors/index.js +1 -0
- package/dist/application/factories/RepositoryFactoryAsset.d.ts +4 -0
- package/dist/application/factories/RepositoryFactoryAsset.js +7 -0
- package/dist/application/factories/RepositoryFactoryAssetVersion.d.ts +4 -0
- package/dist/application/factories/RepositoryFactoryAssetVersion.js +7 -0
- package/dist/application/factories/RepositoryFactoryDocument.d.ts +4 -0
- package/dist/application/factories/RepositoryFactoryDocument.js +7 -0
- package/dist/application/factories/RepositoryFactoryDocumentGroup.d.ts +4 -0
- package/dist/application/factories/RepositoryFactoryDocumentGroup.js +7 -0
- package/dist/application/factories/RepositoryFactoryDocumentIndexEntry.d.ts +4 -0
- package/dist/application/factories/RepositoryFactoryDocumentIndexEntry.js +7 -0
- package/dist/application/factories/RepositoryFactoryDocumentSectionLink.d.ts +4 -0
- package/dist/application/factories/RepositoryFactoryDocumentSectionLink.js +7 -0
- package/dist/application/factories/RepositoryFactoryDocumentVersion.d.ts +4 -0
- package/dist/application/factories/RepositoryFactoryDocumentVersion.js +7 -0
- package/dist/application/factories/RepositoryFactoryEmbed.d.ts +4 -0
- package/dist/application/factories/RepositoryFactoryEmbed.js +7 -0
- package/dist/application/factories/RepositoryFactoryPage.d.ts +4 -0
- package/dist/application/factories/RepositoryFactoryPage.js +7 -0
- package/dist/application/factories/RepositoryFactoryPageEmbedLink.d.ts +4 -0
- package/dist/application/factories/RepositoryFactoryPageEmbedLink.js +7 -0
- package/dist/application/factories/RepositoryFactoryPageSnippetLink.d.ts +4 -0
- package/dist/application/factories/RepositoryFactoryPageSnippetLink.js +7 -0
- package/dist/application/factories/RepositoryFactoryPageVersion.d.ts +4 -0
- package/dist/application/factories/RepositoryFactoryPageVersion.js +7 -0
- package/dist/application/factories/RepositoryFactorySection.d.ts +4 -0
- package/dist/application/factories/RepositoryFactorySection.js +7 -0
- package/dist/application/factories/RepositoryFactorySectionPageLink.d.ts +4 -0
- package/dist/application/factories/RepositoryFactorySectionPageLink.js +7 -0
- package/dist/application/factories/RepositoryFactorySnippet.d.ts +4 -0
- package/dist/application/factories/RepositoryFactorySnippet.js +7 -0
- package/dist/application/factories/ServiceAssetBuilder.d.ts +30 -0
- package/dist/application/factories/ServiceAssetBuilder.js +80 -0
- package/dist/application/factories/ServiceAssetFactory.d.ts +11 -0
- package/dist/application/factories/ServiceAssetFactory.js +15 -0
- package/dist/application/factories/ServiceAssetVersionBuilder.d.ts +30 -0
- package/dist/application/factories/ServiceAssetVersionBuilder.js +80 -0
- package/dist/application/factories/ServiceAssetVersionFactory.d.ts +11 -0
- package/dist/application/factories/ServiceAssetVersionFactory.js +15 -0
- package/dist/application/factories/ServiceDocumentBuilder.d.ts +30 -0
- package/dist/application/factories/ServiceDocumentBuilder.js +83 -0
- package/dist/application/factories/ServiceDocumentFactory.d.ts +11 -0
- package/dist/application/factories/ServiceDocumentFactory.js +15 -0
- package/dist/application/factories/ServiceDocumentGroupBuilder.d.ts +30 -0
- package/dist/application/factories/ServiceDocumentGroupBuilder.js +83 -0
- package/dist/application/factories/ServiceDocumentGroupFactory.d.ts +11 -0
- package/dist/application/factories/ServiceDocumentGroupFactory.js +15 -0
- package/dist/application/factories/ServiceDocumentSectionLinkBuilder.d.ts +30 -0
- package/dist/application/factories/ServiceDocumentSectionLinkBuilder.js +83 -0
- package/dist/application/factories/ServiceDocumentSectionLinkFactory.d.ts +11 -0
- package/dist/application/factories/ServiceDocumentSectionLinkFactory.js +15 -0
- package/dist/application/factories/ServiceDocumentVersionBuilder.d.ts +30 -0
- package/dist/application/factories/ServiceDocumentVersionBuilder.js +83 -0
- package/dist/application/factories/ServiceDocumentVersionFactory.d.ts +11 -0
- package/dist/application/factories/ServiceDocumentVersionFactory.js +15 -0
- package/dist/application/factories/ServiceEmbedBuilder.d.ts +30 -0
- package/dist/application/factories/ServiceEmbedBuilder.js +83 -0
- package/dist/application/factories/ServiceEmbedFactory.d.ts +11 -0
- package/dist/application/factories/ServiceEmbedFactory.js +15 -0
- package/dist/application/factories/ServicePageBuilder.d.ts +30 -0
- package/dist/application/factories/ServicePageBuilder.js +83 -0
- package/dist/application/factories/ServicePageEmbedLinkBuilder.d.ts +30 -0
- package/dist/application/factories/ServicePageEmbedLinkBuilder.js +83 -0
- package/dist/application/factories/ServicePageEmbedLinkFactory.d.ts +11 -0
- package/dist/application/factories/ServicePageEmbedLinkFactory.js +15 -0
- package/dist/application/factories/ServicePageFactory.d.ts +11 -0
- package/dist/application/factories/ServicePageFactory.js +15 -0
- package/dist/application/factories/ServicePageSnippetLinkBuilder.d.ts +30 -0
- package/dist/application/factories/ServicePageSnippetLinkBuilder.js +83 -0
- package/dist/application/factories/ServicePageSnippetLinkFactory.d.ts +11 -0
- package/dist/application/factories/ServicePageSnippetLinkFactory.js +15 -0
- package/dist/application/factories/ServicePageVersionBuilder.d.ts +34 -0
- package/dist/application/factories/ServicePageVersionBuilder.js +121 -0
- package/dist/application/factories/ServicePageVersionFactory.d.ts +11 -0
- package/dist/application/factories/ServicePageVersionFactory.js +15 -0
- package/dist/application/factories/ServiceSectionBuilder.d.ts +30 -0
- package/dist/application/factories/ServiceSectionBuilder.js +83 -0
- package/dist/application/factories/ServiceSectionFactory.d.ts +11 -0
- package/dist/application/factories/ServiceSectionFactory.js +15 -0
- package/dist/application/factories/ServiceSectionPageLinkBuilder.d.ts +30 -0
- package/dist/application/factories/ServiceSectionPageLinkBuilder.js +83 -0
- package/dist/application/factories/ServiceSectionPageLinkFactory.d.ts +11 -0
- package/dist/application/factories/ServiceSectionPageLinkFactory.js +15 -0
- package/dist/application/factories/ServiceSnippetBuilder.d.ts +30 -0
- package/dist/application/factories/ServiceSnippetBuilder.js +83 -0
- package/dist/application/factories/ServiceSnippetFactory.d.ts +11 -0
- package/dist/application/factories/ServiceSnippetFactory.js +15 -0
- package/dist/application/factories/drizzleDialect.d.ts +16 -0
- package/dist/application/factories/drizzleDialect.js +36 -0
- package/dist/application/factories/index.d.ts +43 -0
- package/dist/application/factories/index.js +44 -0
- package/dist/application/ports/inbound/IAssetServicePort.d.ts +14 -0
- package/dist/application/ports/inbound/IAssetServicePort.js +1 -0
- package/dist/application/ports/inbound/IAssetVersionServicePort.d.ts +14 -0
- package/dist/application/ports/inbound/IAssetVersionServicePort.js +1 -0
- package/dist/application/ports/inbound/IDocumentGroupServicePort.d.ts +14 -0
- package/dist/application/ports/inbound/IDocumentGroupServicePort.js +1 -0
- package/dist/application/ports/inbound/IDocumentSectionLinkServicePort.d.ts +16 -0
- package/dist/application/ports/inbound/IDocumentSectionLinkServicePort.js +1 -0
- package/dist/application/ports/inbound/IDocumentServicePort.d.ts +300 -0
- package/dist/application/ports/inbound/IDocumentServicePort.js +1 -0
- package/dist/application/ports/inbound/IDocumentVersionServicePort.d.ts +106 -0
- package/dist/application/ports/inbound/IDocumentVersionServicePort.js +1 -0
- package/dist/application/ports/inbound/IEmbedServicePort.d.ts +14 -0
- package/dist/application/ports/inbound/IEmbedServicePort.js +1 -0
- package/dist/application/ports/inbound/IPageEmbedLinkServicePort.d.ts +14 -0
- package/dist/application/ports/inbound/IPageEmbedLinkServicePort.js +1 -0
- package/dist/application/ports/inbound/IPageServicePort.d.ts +14 -0
- package/dist/application/ports/inbound/IPageServicePort.js +1 -0
- package/dist/application/ports/inbound/IPageSnippetLinkServicePort.d.ts +14 -0
- package/dist/application/ports/inbound/IPageSnippetLinkServicePort.js +1 -0
- package/dist/application/ports/inbound/IPageVersionServicePort.d.ts +14 -0
- package/dist/application/ports/inbound/IPageVersionServicePort.js +1 -0
- package/dist/application/ports/inbound/ISectionPageLinkServicePort.d.ts +14 -0
- package/dist/application/ports/inbound/ISectionPageLinkServicePort.js +1 -0
- package/dist/application/ports/inbound/ISectionServicePort.d.ts +14 -0
- package/dist/application/ports/inbound/ISectionServicePort.js +1 -0
- package/dist/application/ports/inbound/ISnippetServicePort.d.ts +14 -0
- package/dist/application/ports/inbound/ISnippetServicePort.js +1 -0
- package/dist/application/ports/inbound/index.d.ts +14 -0
- package/dist/application/ports/inbound/index.js +15 -0
- package/dist/application/ports/repository-ports/IRepositoryPortAsset.d.ts +5 -0
- package/dist/application/ports/repository-ports/IRepositoryPortAsset.js +1 -0
- package/dist/application/ports/repository-ports/IRepositoryPortAssetVersion.d.ts +5 -0
- package/dist/application/ports/repository-ports/IRepositoryPortAssetVersion.js +1 -0
- package/dist/application/ports/repository-ports/IRepositoryPortDocument.d.ts +10 -0
- package/dist/application/ports/repository-ports/IRepositoryPortDocument.js +1 -0
- package/dist/application/ports/repository-ports/IRepositoryPortDocumentGroup.d.ts +10 -0
- package/dist/application/ports/repository-ports/IRepositoryPortDocumentGroup.js +1 -0
- package/dist/application/ports/repository-ports/IRepositoryPortDocumentIndexEntry.d.ts +5 -0
- package/dist/application/ports/repository-ports/IRepositoryPortDocumentIndexEntry.js +1 -0
- package/dist/application/ports/repository-ports/IRepositoryPortDocumentSectionLink.d.ts +21 -0
- package/dist/application/ports/repository-ports/IRepositoryPortDocumentSectionLink.js +1 -0
- package/dist/application/ports/repository-ports/IRepositoryPortDocumentVersion.d.ts +10 -0
- package/dist/application/ports/repository-ports/IRepositoryPortDocumentVersion.js +1 -0
- package/dist/application/ports/repository-ports/IRepositoryPortEmbed.d.ts +10 -0
- package/dist/application/ports/repository-ports/IRepositoryPortEmbed.js +1 -0
- package/dist/application/ports/repository-ports/IRepositoryPortPage.d.ts +10 -0
- package/dist/application/ports/repository-ports/IRepositoryPortPage.js +1 -0
- package/dist/application/ports/repository-ports/IRepositoryPortPageEmbedLink.d.ts +10 -0
- package/dist/application/ports/repository-ports/IRepositoryPortPageEmbedLink.js +1 -0
- package/dist/application/ports/repository-ports/IRepositoryPortPageSnippetLink.d.ts +10 -0
- package/dist/application/ports/repository-ports/IRepositoryPortPageSnippetLink.js +1 -0
- package/dist/application/ports/repository-ports/IRepositoryPortPageVersion.d.ts +10 -0
- package/dist/application/ports/repository-ports/IRepositoryPortPageVersion.js +1 -0
- package/dist/application/ports/repository-ports/IRepositoryPortSection.d.ts +10 -0
- package/dist/application/ports/repository-ports/IRepositoryPortSection.js +1 -0
- package/dist/application/ports/repository-ports/IRepositoryPortSectionPageLink.d.ts +10 -0
- package/dist/application/ports/repository-ports/IRepositoryPortSectionPageLink.js +1 -0
- package/dist/application/ports/repository-ports/IRepositoryPortSnippet.d.ts +10 -0
- package/dist/application/ports/repository-ports/IRepositoryPortSnippet.js +1 -0
- package/dist/application/ports/repository-ports/index.d.ts +15 -0
- package/dist/application/ports/repository-ports/index.js +16 -0
- package/dist/application/services/documentCascadeDelete.d.ts +47 -0
- package/dist/application/services/documentCascadeDelete.js +202 -0
- package/dist/application/services/documentComposeSupport.d.ts +30 -0
- package/dist/application/services/documentComposeSupport.js +285 -0
- package/dist/application/services/documentIndexSupport.d.ts +7 -0
- package/dist/application/services/documentIndexSupport.js +28 -0
- package/dist/application/services/documentPublishSupport.d.ts +14 -0
- package/dist/application/services/documentPublishSupport.js +39 -0
- package/dist/application/services/documentRetrievalAiSupport.d.ts +21 -0
- package/dist/application/services/documentRetrievalAiSupport.js +114 -0
- package/dist/application/services/index.d.ts +14 -0
- package/dist/application/services/index.js +15 -0
- package/dist/application/services/service.asset.d.ts +25 -0
- package/dist/application/services/service.asset.js +58 -0
- package/dist/application/services/service.assetVersion.d.ts +25 -0
- package/dist/application/services/service.assetVersion.js +58 -0
- package/dist/application/services/service.document.d.ts +167 -0
- package/dist/application/services/service.document.js +2860 -0
- package/dist/application/services/service.documentGroup.d.ts +25 -0
- package/dist/application/services/service.documentGroup.js +58 -0
- package/dist/application/services/service.documentSectionLink.d.ts +27 -0
- package/dist/application/services/service.documentSectionLink.js +69 -0
- package/dist/application/services/service.documentVersion.d.ts +66 -0
- package/dist/application/services/service.documentVersion.js +715 -0
- package/dist/application/services/service.embed.d.ts +25 -0
- package/dist/application/services/service.embed.js +58 -0
- package/dist/application/services/service.page.d.ts +25 -0
- package/dist/application/services/service.page.js +58 -0
- package/dist/application/services/service.pageEmbedLink.d.ts +25 -0
- package/dist/application/services/service.pageEmbedLink.js +58 -0
- package/dist/application/services/service.pageSnippetLink.d.ts +25 -0
- package/dist/application/services/service.pageSnippetLink.js +58 -0
- package/dist/application/services/service.pageVersion.d.ts +31 -0
- package/dist/application/services/service.pageVersion.js +114 -0
- package/dist/application/services/service.section.d.ts +25 -0
- package/dist/application/services/service.section.js +58 -0
- package/dist/application/services/service.sectionPageLink.d.ts +25 -0
- package/dist/application/services/service.sectionPageLink.js +58 -0
- package/dist/application/services/service.snippet.d.ts +25 -0
- package/dist/application/services/service.snippet.js +58 -0
- package/dist/application/services/service.zod-validation.d.ts +11 -0
- package/dist/application/services/service.zod-validation.js +14 -0
- package/dist/domain/domain.d.ts +8 -0
- package/dist/domain/domain.js +9 -0
- package/dist/domain/dto/index.d.ts +1 -0
- package/dist/domain/dto/index.js +1 -0
- package/dist/domain/index.d.ts +4 -0
- package/dist/domain/index.js +4 -0
- package/dist/domain/models/asset/IbmAsset.d.ts +5 -0
- package/dist/domain/models/asset/IbmAsset.js +18 -0
- package/dist/domain/models/asset/index.d.ts +2 -0
- package/dist/domain/models/asset/index.js +2 -0
- package/dist/domain/models/asset/zod.schema.d.ts +39 -0
- package/dist/domain/models/asset/zod.schema.js +22 -0
- package/dist/domain/models/assetVersion/IbmAssetVersion.d.ts +6 -0
- package/dist/domain/models/assetVersion/IbmAssetVersion.js +25 -0
- package/dist/domain/models/assetVersion/index.d.ts +2 -0
- package/dist/domain/models/assetVersion/index.js +2 -0
- package/dist/domain/models/assetVersion/zod.schema.d.ts +71 -0
- package/dist/domain/models/assetVersion/zod.schema.js +37 -0
- package/dist/domain/models/document/IbmDocument.d.ts +8 -0
- package/dist/domain/models/document/IbmDocument.js +30 -0
- package/dist/domain/models/document/index.d.ts +2 -0
- package/dist/domain/models/document/index.js +2 -0
- package/dist/domain/models/document/zod.schema.d.ts +157 -0
- package/dist/domain/models/document/zod.schema.js +31 -0
- package/dist/domain/models/documentGroup/IbmDocumentGroup.d.ts +5 -0
- package/dist/domain/models/documentGroup/IbmDocumentGroup.js +17 -0
- package/dist/domain/models/documentGroup/index.d.ts +2 -0
- package/dist/domain/models/documentGroup/index.js +2 -0
- package/dist/domain/models/documentGroup/zod.schema.d.ts +27 -0
- package/dist/domain/models/documentGroup/zod.schema.js +22 -0
- package/dist/domain/models/documentIndexEntry/IbmDocumentIndexEntry.d.ts +6 -0
- package/dist/domain/models/documentIndexEntry/IbmDocumentIndexEntry.js +50 -0
- package/dist/domain/models/documentIndexEntry/index.d.ts +2 -0
- package/dist/domain/models/documentIndexEntry/index.js +2 -0
- package/dist/domain/models/documentIndexEntry/zod.schema.d.ts +112 -0
- package/dist/domain/models/documentIndexEntry/zod.schema.js +55 -0
- package/dist/domain/models/documentSectionLink/IbmDocumentSectionLink.d.ts +5 -0
- package/dist/domain/models/documentSectionLink/IbmDocumentSectionLink.js +23 -0
- package/dist/domain/models/documentSectionLink/index.d.ts +2 -0
- package/dist/domain/models/documentSectionLink/index.js +2 -0
- package/dist/domain/models/documentSectionLink/zod.schema.d.ts +65 -0
- package/dist/domain/models/documentSectionLink/zod.schema.js +80 -0
- package/dist/domain/models/documentVersion/IbmDocumentVersion.d.ts +8 -0
- package/dist/domain/models/documentVersion/IbmDocumentVersion.js +25 -0
- package/dist/domain/models/documentVersion/index.d.ts +2 -0
- package/dist/domain/models/documentVersion/index.js +2 -0
- package/dist/domain/models/documentVersion/zod.schema.d.ts +75 -0
- package/dist/domain/models/documentVersion/zod.schema.js +26 -0
- package/dist/domain/models/embed/IbmEmbed.d.ts +5 -0
- package/dist/domain/models/embed/IbmEmbed.js +19 -0
- package/dist/domain/models/embed/index.d.ts +2 -0
- package/dist/domain/models/embed/index.js +2 -0
- package/dist/domain/models/embed/zod.schema.d.ts +39 -0
- package/dist/domain/models/embed/zod.schema.js +24 -0
- package/dist/domain/models/index.d.ts +15 -0
- package/dist/domain/models/index.js +16 -0
- package/dist/domain/models/page/IbmPage.d.ts +8 -0
- package/dist/domain/models/page/IbmPage.js +20 -0
- package/dist/domain/models/page/index.d.ts +2 -0
- package/dist/domain/models/page/index.js +2 -0
- package/dist/domain/models/page/zod.schema.d.ts +57 -0
- package/dist/domain/models/page/zod.schema.js +21 -0
- package/dist/domain/models/pageEmbedLink/IbmPageEmbedLink.d.ts +5 -0
- package/dist/domain/models/pageEmbedLink/IbmPageEmbedLink.js +14 -0
- package/dist/domain/models/pageEmbedLink/index.d.ts +2 -0
- package/dist/domain/models/pageEmbedLink/index.js +2 -0
- package/dist/domain/models/pageEmbedLink/zod.schema.d.ts +21 -0
- package/dist/domain/models/pageEmbedLink/zod.schema.js +19 -0
- package/dist/domain/models/pageSnippetLink/IbmPageSnippetLink.d.ts +5 -0
- package/dist/domain/models/pageSnippetLink/IbmPageSnippetLink.js +15 -0
- package/dist/domain/models/pageSnippetLink/index.d.ts +2 -0
- package/dist/domain/models/pageSnippetLink/index.js +2 -0
- package/dist/domain/models/pageSnippetLink/zod.schema.d.ts +23 -0
- package/dist/domain/models/pageSnippetLink/zod.schema.js +20 -0
- package/dist/domain/models/pageVersion/IbmPageVersion.d.ts +8 -0
- package/dist/domain/models/pageVersion/IbmPageVersion.js +23 -0
- package/dist/domain/models/pageVersion/index.d.ts +2 -0
- package/dist/domain/models/pageVersion/index.js +2 -0
- package/dist/domain/models/pageVersion/zod.schema.d.ts +77 -0
- package/dist/domain/models/pageVersion/zod.schema.js +24 -0
- package/dist/domain/models/section/IbmSection.d.ts +8 -0
- package/dist/domain/models/section/IbmSection.js +20 -0
- package/dist/domain/models/section/index.d.ts +2 -0
- package/dist/domain/models/section/index.js +2 -0
- package/dist/domain/models/section/zod.schema.d.ts +57 -0
- package/dist/domain/models/section/zod.schema.js +21 -0
- package/dist/domain/models/sectionPageLink/IbmSectionPageLink.d.ts +5 -0
- package/dist/domain/models/sectionPageLink/IbmSectionPageLink.js +18 -0
- package/dist/domain/models/sectionPageLink/index.d.ts +2 -0
- package/dist/domain/models/sectionPageLink/index.js +2 -0
- package/dist/domain/models/sectionPageLink/zod.schema.d.ts +29 -0
- package/dist/domain/models/sectionPageLink/zod.schema.js +23 -0
- package/dist/domain/models/snippet/IbmSnippet.d.ts +5 -0
- package/dist/domain/models/snippet/IbmSnippet.js +17 -0
- package/dist/domain/models/snippet/index.d.ts +2 -0
- package/dist/domain/models/snippet/index.js +2 -0
- package/dist/domain/models/snippet/zod.schema.d.ts +27 -0
- package/dist/domain/models/snippet/zod.schema.js +22 -0
- package/dist/domain/types.d.ts +1 -0
- package/dist/domain/types.js +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/infrastructure/db/asset/drizzle/drizzle.mapper.asset.d.ts +31 -0
- package/dist/infrastructure/db/asset/drizzle/drizzle.mapper.asset.js +6 -0
- package/dist/infrastructure/db/asset/drizzle/drizzle.schema.asset.d.ts +250 -0
- package/dist/infrastructure/db/asset/drizzle/drizzle.schema.asset.js +24 -0
- package/dist/infrastructure/db/asset/drizzle/drizzle.schema.asset.sqlite.d.ts +272 -0
- package/dist/infrastructure/db/asset/drizzle/drizzle.schema.asset.sqlite.js +25 -0
- package/dist/infrastructure/db/asset/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/asset/drizzle/index.js +2 -0
- package/dist/infrastructure/db/assetVersion/drizzle/drizzle.mapper.assetVersion.d.ts +45 -0
- package/dist/infrastructure/db/assetVersion/drizzle/drizzle.mapper.assetVersion.js +6 -0
- package/dist/infrastructure/db/assetVersion/drizzle/drizzle.schema.assetVersion.d.ts +371 -0
- package/dist/infrastructure/db/assetVersion/drizzle/drizzle.schema.assetVersion.js +30 -0
- package/dist/infrastructure/db/assetVersion/drizzle/drizzle.schema.assetVersion.sqlite.d.ts +397 -0
- package/dist/infrastructure/db/assetVersion/drizzle/drizzle.schema.assetVersion.sqlite.js +31 -0
- package/dist/infrastructure/db/assetVersion/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/assetVersion/drizzle/index.js +2 -0
- package/dist/infrastructure/db/document/drizzle/drizzle.mapper.document.d.ts +98 -0
- package/dist/infrastructure/db/document/drizzle/drizzle.mapper.document.js +6 -0
- package/dist/infrastructure/db/document/drizzle/drizzle.schema.document.d.ts +394 -0
- package/dist/infrastructure/db/document/drizzle/drizzle.schema.document.js +34 -0
- package/dist/infrastructure/db/document/drizzle/drizzle.schema.document.sqlite.d.ts +424 -0
- package/dist/infrastructure/db/document/drizzle/drizzle.schema.document.sqlite.js +35 -0
- package/dist/infrastructure/db/document/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/document/drizzle/index.js +2 -0
- package/dist/infrastructure/db/documentGroup/drizzle/drizzle.mapper.documentGroup.d.ts +29 -0
- package/dist/infrastructure/db/documentGroup/drizzle/drizzle.mapper.documentGroup.js +6 -0
- package/dist/infrastructure/db/documentGroup/drizzle/drizzle.schema.documentGroup.d.ts +233 -0
- package/dist/infrastructure/db/documentGroup/drizzle/drizzle.schema.documentGroup.js +22 -0
- package/dist/infrastructure/db/documentGroup/drizzle/drizzle.schema.documentGroup.sqlite.d.ts +253 -0
- package/dist/infrastructure/db/documentGroup/drizzle/drizzle.schema.documentGroup.sqlite.js +23 -0
- package/dist/infrastructure/db/documentGroup/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/documentGroup/drizzle/index.js +2 -0
- package/dist/infrastructure/db/documentIndexEntry/drizzle/drizzle.mapper.documentIndexEntry.d.ts +95 -0
- package/dist/infrastructure/db/documentIndexEntry/drizzle/drizzle.mapper.documentIndexEntry.js +12 -0
- package/dist/infrastructure/db/documentIndexEntry/drizzle/drizzle.schema.documentIndexEntry.d.ts +792 -0
- package/dist/infrastructure/db/documentIndexEntry/drizzle/drizzle.schema.documentIndexEntry.js +57 -0
- package/dist/infrastructure/db/documentIndexEntry/drizzle/drizzle.schema.documentIndexEntry.sqlite.d.ts +854 -0
- package/dist/infrastructure/db/documentIndexEntry/drizzle/drizzle.schema.documentIndexEntry.sqlite.js +58 -0
- package/dist/infrastructure/db/documentIndexEntry/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/documentIndexEntry/drizzle/index.js +2 -0
- package/dist/infrastructure/db/documentSectionLink/drizzle/drizzle.mapper.documentSectionLink.d.ts +41 -0
- package/dist/infrastructure/db/documentSectionLink/drizzle/drizzle.mapper.documentSectionLink.js +12 -0
- package/dist/infrastructure/db/documentSectionLink/drizzle/drizzle.schema.documentSectionLink.d.ts +335 -0
- package/dist/infrastructure/db/documentSectionLink/drizzle/drizzle.schema.documentSectionLink.js +29 -0
- package/dist/infrastructure/db/documentSectionLink/drizzle/drizzle.schema.documentSectionLink.sqlite.d.ts +357 -0
- package/dist/infrastructure/db/documentSectionLink/drizzle/drizzle.schema.documentSectionLink.sqlite.js +30 -0
- package/dist/infrastructure/db/documentSectionLink/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/documentSectionLink/drizzle/index.js +2 -0
- package/dist/infrastructure/db/documentVersion/drizzle/drizzle.mapper.documentVersion.d.ts +54 -0
- package/dist/infrastructure/db/documentVersion/drizzle/drizzle.mapper.documentVersion.js +7 -0
- package/dist/infrastructure/db/documentVersion/drizzle/drizzle.schema.documentVersion.d.ts +301 -0
- package/dist/infrastructure/db/documentVersion/drizzle/drizzle.schema.documentVersion.js +30 -0
- package/dist/infrastructure/db/documentVersion/drizzle/drizzle.schema.documentVersion.sqlite.d.ts +323 -0
- package/dist/infrastructure/db/documentVersion/drizzle/drizzle.schema.documentVersion.sqlite.js +27 -0
- package/dist/infrastructure/db/documentVersion/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/documentVersion/drizzle/index.js +2 -0
- package/dist/infrastructure/db/domain-naming.d.ts +2 -0
- package/dist/infrastructure/db/domain-naming.js +57 -0
- package/dist/infrastructure/db/embed/drizzle/drizzle.mapper.embed.d.ts +33 -0
- package/dist/infrastructure/db/embed/drizzle/drizzle.mapper.embed.js +5 -0
- package/dist/infrastructure/db/embed/drizzle/drizzle.schema.embed.d.ts +267 -0
- package/dist/infrastructure/db/embed/drizzle/drizzle.schema.embed.js +24 -0
- package/dist/infrastructure/db/embed/drizzle/drizzle.schema.embed.sqlite.d.ts +291 -0
- package/dist/infrastructure/db/embed/drizzle/drizzle.schema.embed.sqlite.js +25 -0
- package/dist/infrastructure/db/embed/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/embed/drizzle/index.js +2 -0
- package/dist/infrastructure/db/page/drizzle/drizzle.mapper.page.d.ts +44 -0
- package/dist/infrastructure/db/page/drizzle/drizzle.mapper.page.js +5 -0
- package/dist/infrastructure/db/page/drizzle/drizzle.schema.page.d.ts +218 -0
- package/dist/infrastructure/db/page/drizzle/drizzle.schema.page.js +20 -0
- package/dist/infrastructure/db/page/drizzle/drizzle.schema.page.sqlite.d.ts +234 -0
- package/dist/infrastructure/db/page/drizzle/drizzle.schema.page.sqlite.js +21 -0
- package/dist/infrastructure/db/page/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/page/drizzle/index.js +2 -0
- package/dist/infrastructure/db/pageEmbedLink/drizzle/drizzle.mapper.pageEmbedLink.d.ts +23 -0
- package/dist/infrastructure/db/pageEmbedLink/drizzle/drizzle.mapper.pageEmbedLink.js +5 -0
- package/dist/infrastructure/db/pageEmbedLink/drizzle/drizzle.schema.pageEmbedLink.d.ts +180 -0
- package/dist/infrastructure/db/pageEmbedLink/drizzle/drizzle.schema.pageEmbedLink.js +18 -0
- package/dist/infrastructure/db/pageEmbedLink/drizzle/drizzle.schema.pageEmbedLink.sqlite.d.ts +194 -0
- package/dist/infrastructure/db/pageEmbedLink/drizzle/drizzle.schema.pageEmbedLink.sqlite.js +19 -0
- package/dist/infrastructure/db/pageEmbedLink/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/pageEmbedLink/drizzle/index.js +2 -0
- package/dist/infrastructure/db/pageSnippetLink/drizzle/drizzle.mapper.pageSnippetLink.d.ts +25 -0
- package/dist/infrastructure/db/pageSnippetLink/drizzle/drizzle.mapper.pageSnippetLink.js +7 -0
- package/dist/infrastructure/db/pageSnippetLink/drizzle/drizzle.schema.pageSnippetLink.d.ts +197 -0
- package/dist/infrastructure/db/pageSnippetLink/drizzle/drizzle.schema.pageSnippetLink.js +19 -0
- package/dist/infrastructure/db/pageSnippetLink/drizzle/drizzle.schema.pageSnippetLink.sqlite.d.ts +211 -0
- package/dist/infrastructure/db/pageSnippetLink/drizzle/drizzle.schema.pageSnippetLink.sqlite.js +20 -0
- package/dist/infrastructure/db/pageSnippetLink/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/pageSnippetLink/drizzle/index.js +2 -0
- package/dist/infrastructure/db/pageVersion/drizzle/drizzle.mapper.pageVersion.d.ts +50 -0
- package/dist/infrastructure/db/pageVersion/drizzle/drizzle.mapper.pageVersion.js +6 -0
- package/dist/infrastructure/db/pageVersion/drizzle/drizzle.schema.pageVersion.d.ts +271 -0
- package/dist/infrastructure/db/pageVersion/drizzle/drizzle.schema.pageVersion.js +23 -0
- package/dist/infrastructure/db/pageVersion/drizzle/drizzle.schema.pageVersion.sqlite.d.ts +289 -0
- package/dist/infrastructure/db/pageVersion/drizzle/drizzle.schema.pageVersion.sqlite.js +24 -0
- package/dist/infrastructure/db/pageVersion/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/pageVersion/drizzle/index.js +2 -0
- package/dist/infrastructure/db/section/drizzle/drizzle.mapper.section.d.ts +44 -0
- package/dist/infrastructure/db/section/drizzle/drizzle.mapper.section.js +5 -0
- package/dist/infrastructure/db/section/drizzle/drizzle.schema.section.d.ts +216 -0
- package/dist/infrastructure/db/section/drizzle/drizzle.schema.section.js +20 -0
- package/dist/infrastructure/db/section/drizzle/drizzle.schema.section.sqlite.d.ts +234 -0
- package/dist/infrastructure/db/section/drizzle/drizzle.schema.section.sqlite.js +21 -0
- package/dist/infrastructure/db/section/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/section/drizzle/index.js +2 -0
- package/dist/infrastructure/db/sectionPageLink/drizzle/drizzle.mapper.sectionPageLink.d.ts +31 -0
- package/dist/infrastructure/db/sectionPageLink/drizzle/drizzle.mapper.sectionPageLink.js +7 -0
- package/dist/infrastructure/db/sectionPageLink/drizzle/drizzle.schema.sectionPageLink.d.ts +248 -0
- package/dist/infrastructure/db/sectionPageLink/drizzle/drizzle.schema.sectionPageLink.js +22 -0
- package/dist/infrastructure/db/sectionPageLink/drizzle/drizzle.schema.sectionPageLink.sqlite.d.ts +264 -0
- package/dist/infrastructure/db/sectionPageLink/drizzle/drizzle.schema.sectionPageLink.sqlite.js +23 -0
- package/dist/infrastructure/db/sectionPageLink/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/sectionPageLink/drizzle/index.js +2 -0
- package/dist/infrastructure/db/snippet/drizzle/drizzle.mapper.snippet.d.ts +29 -0
- package/dist/infrastructure/db/snippet/drizzle/drizzle.mapper.snippet.js +5 -0
- package/dist/infrastructure/db/snippet/drizzle/drizzle.schema.snippet.d.ts +233 -0
- package/dist/infrastructure/db/snippet/drizzle/drizzle.schema.snippet.js +22 -0
- package/dist/infrastructure/db/snippet/drizzle/drizzle.schema.snippet.sqlite.d.ts +253 -0
- package/dist/infrastructure/db/snippet/drizzle/drizzle.schema.snippet.sqlite.js +23 -0
- package/dist/infrastructure/db/snippet/drizzle/index.d.ts +2 -0
- package/dist/infrastructure/db/snippet/drizzle/index.js +2 -0
- package/dist/infrastructure/repositories/asset/drizzle/AssetDrizzleRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/asset/drizzle/AssetDrizzleRepo.js +8 -0
- package/dist/infrastructure/repositories/asset/drizzle/AssetDrizzleSqliteRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/asset/drizzle/AssetDrizzleSqliteRepo.js +8 -0
- package/dist/infrastructure/repositories/assetVersion/drizzle/AssetVersionDrizzleRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/assetVersion/drizzle/AssetVersionDrizzleRepo.js +8 -0
- package/dist/infrastructure/repositories/assetVersion/drizzle/AssetVersionDrizzleSqliteRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/assetVersion/drizzle/AssetVersionDrizzleSqliteRepo.js +12 -0
- package/dist/infrastructure/repositories/document/drizzle/DocumentDrizzleRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/document/drizzle/DocumentDrizzleRepo.js +8 -0
- package/dist/infrastructure/repositories/document/drizzle/DocumentDrizzleSqliteRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/document/drizzle/DocumentDrizzleSqliteRepo.js +8 -0
- package/dist/infrastructure/repositories/documentGroup/drizzle/DocumentGroupDrizzleRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/documentGroup/drizzle/DocumentGroupDrizzleRepo.js +8 -0
- package/dist/infrastructure/repositories/documentGroup/drizzle/DocumentGroupDrizzleSqliteRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/documentGroup/drizzle/DocumentGroupDrizzleSqliteRepo.js +8 -0
- package/dist/infrastructure/repositories/documentIndexEntry/drizzle/DocumentIndexEntryDrizzleRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/documentIndexEntry/drizzle/DocumentIndexEntryDrizzleRepo.js +12 -0
- package/dist/infrastructure/repositories/documentIndexEntry/drizzle/DocumentIndexEntryDrizzleSqliteRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/documentIndexEntry/drizzle/DocumentIndexEntryDrizzleSqliteRepo.js +12 -0
- package/dist/infrastructure/repositories/documentSectionLink/drizzle/DocumentSectionLinkDrizzleRepo.d.ts +15 -0
- package/dist/infrastructure/repositories/documentSectionLink/drizzle/DocumentSectionLinkDrizzleRepo.js +41 -0
- package/dist/infrastructure/repositories/documentSectionLink/drizzle/DocumentSectionLinkDrizzleSqliteRepo.d.ts +15 -0
- package/dist/infrastructure/repositories/documentSectionLink/drizzle/DocumentSectionLinkDrizzleSqliteRepo.js +40 -0
- package/dist/infrastructure/repositories/documentVersion/drizzle/DocumentVersionDrizzleRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/documentVersion/drizzle/DocumentVersionDrizzleRepo.js +8 -0
- package/dist/infrastructure/repositories/documentVersion/drizzle/DocumentVersionDrizzleSqliteRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/documentVersion/drizzle/DocumentVersionDrizzleSqliteRepo.js +8 -0
- package/dist/infrastructure/repositories/embed/drizzle/EmbedDrizzleRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/embed/drizzle/EmbedDrizzleRepo.js +8 -0
- package/dist/infrastructure/repositories/embed/drizzle/EmbedDrizzleSqliteRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/embed/drizzle/EmbedDrizzleSqliteRepo.js +8 -0
- package/dist/infrastructure/repositories/index.d.ts +30 -0
- package/dist/infrastructure/repositories/index.js +31 -0
- package/dist/infrastructure/repositories/page/drizzle/PageDrizzleRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/page/drizzle/PageDrizzleRepo.js +8 -0
- package/dist/infrastructure/repositories/page/drizzle/PageDrizzleSqliteRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/page/drizzle/PageDrizzleSqliteRepo.js +8 -0
- package/dist/infrastructure/repositories/pageEmbedLink/drizzle/PageEmbedLinkDrizzleRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/pageEmbedLink/drizzle/PageEmbedLinkDrizzleRepo.js +8 -0
- package/dist/infrastructure/repositories/pageEmbedLink/drizzle/PageEmbedLinkDrizzleSqliteRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/pageEmbedLink/drizzle/PageEmbedLinkDrizzleSqliteRepo.js +8 -0
- package/dist/infrastructure/repositories/pageSnippetLink/drizzle/PageSnippetLinkDrizzleRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/pageSnippetLink/drizzle/PageSnippetLinkDrizzleRepo.js +8 -0
- package/dist/infrastructure/repositories/pageSnippetLink/drizzle/PageSnippetLinkDrizzleSqliteRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/pageSnippetLink/drizzle/PageSnippetLinkDrizzleSqliteRepo.js +8 -0
- package/dist/infrastructure/repositories/pageVersion/drizzle/PageVersionDrizzleRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/pageVersion/drizzle/PageVersionDrizzleRepo.js +8 -0
- package/dist/infrastructure/repositories/pageVersion/drizzle/PageVersionDrizzleSqliteRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/pageVersion/drizzle/PageVersionDrizzleSqliteRepo.js +8 -0
- package/dist/infrastructure/repositories/section/drizzle/SectionDrizzleRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/section/drizzle/SectionDrizzleRepo.js +8 -0
- package/dist/infrastructure/repositories/section/drizzle/SectionDrizzleSqliteRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/section/drizzle/SectionDrizzleSqliteRepo.js +8 -0
- package/dist/infrastructure/repositories/sectionPageLink/drizzle/SectionPageLinkDrizzleRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/sectionPageLink/drizzle/SectionPageLinkDrizzleRepo.js +8 -0
- package/dist/infrastructure/repositories/sectionPageLink/drizzle/SectionPageLinkDrizzleSqliteRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/sectionPageLink/drizzle/SectionPageLinkDrizzleSqliteRepo.js +8 -0
- package/dist/infrastructure/repositories/snippet/drizzle/SnippetDrizzleRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/snippet/drizzle/SnippetDrizzleRepo.js +8 -0
- package/dist/infrastructure/repositories/snippet/drizzle/SnippetDrizzleSqliteRepo.d.ts +12 -0
- package/dist/infrastructure/repositories/snippet/drizzle/SnippetDrizzleSqliteRepo.js +8 -0
- package/dist/public/factories/index.d.ts +2 -0
- package/dist/public/factories/index.js +2 -0
- package/dist/public/index.d.ts +5 -0
- package/dist/public/index.js +5 -0
- package/dist/public/models/index.d.ts +3 -0
- package/dist/public/models/index.js +4 -0
- package/dist/public/ports/index.d.ts +1 -0
- package/dist/public/ports/index.js +2 -0
- package/dist/public/repository-ports/index.d.ts +1 -0
- package/dist/public/repository-ports/index.js +2 -0
- package/dist/public/services/index.d.ts +1 -0
- package/dist/public/services/index.js +2 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.js +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { pipe } from 'effect/Function';
|
|
3
|
+
import { validateInput, XfErrorFactory, effectErrorInfo } from '@aopslab/xf-core';
|
|
4
|
+
import { sectionPageLinkZodSchemaInsert } from '../../domain/models/index.js';
|
|
5
|
+
import { validateBmInputWithSchema } from './service.zod-validation.js';
|
|
6
|
+
import { mapDbError } from '@aopslab/xf-db';
|
|
7
|
+
export class SectionPageLinkService {
|
|
8
|
+
sectionPageLinkRepository;
|
|
9
|
+
logger;
|
|
10
|
+
constructor(options) {
|
|
11
|
+
this.sectionPageLinkRepository = options.sectionPageLinkRepository;
|
|
12
|
+
this.logger = options.logger?.child({ module: this.constructor.name });
|
|
13
|
+
}
|
|
14
|
+
getById(id, options) {
|
|
15
|
+
const stage = 'SectionPageLinkService::getById';
|
|
16
|
+
return pipe(validateInput(id, 'id', { stage }), Effect.flatMap((id) => this.sectionPageLinkRepository.findById(id, options).pipe(Effect.mapError(mapDbError({ stage, operation: 'findById', factory: XfErrorFactory.notFound })))), Effect.tapError((e) => Effect.sync(() => {
|
|
17
|
+
const info = effectErrorInfo(e);
|
|
18
|
+
this.logger?.error({ error: info.unwrapped, stage }, 'Error in getById');
|
|
19
|
+
})));
|
|
20
|
+
}
|
|
21
|
+
create(data) {
|
|
22
|
+
const stage = 'SectionPageLinkService::create';
|
|
23
|
+
return pipe(validateInput(data, 'data', { stage }), Effect.flatMap((data) => validateBmInputWithSchema({
|
|
24
|
+
input: data,
|
|
25
|
+
schema: sectionPageLinkZodSchemaInsert,
|
|
26
|
+
stage,
|
|
27
|
+
operation: 'SectionPageLinkService::create.sectionPageLinkZodSchemaInsert',
|
|
28
|
+
field: 'data',
|
|
29
|
+
})), Effect.flatMap((data) => this.sectionPageLinkRepository.create(data).pipe(Effect.mapError(mapDbError({ stage, operation: 'create', factory: XfErrorFactory.createFailed })))));
|
|
30
|
+
}
|
|
31
|
+
listSectionPageLinks(filter = {}, options) {
|
|
32
|
+
const stage = 'SectionPageLinkService::listSectionPageLinks';
|
|
33
|
+
return pipe(validateInput(filter, 'filter', { stage }), Effect.flatMap((filter) => this.sectionPageLinkRepository.find({ matchEq: filter, options }).pipe(Effect.mapError(mapDbError({ stage, operation: 'find', factory: XfErrorFactory.notFound })))), Effect.tapError((e) => Effect.sync(() => {
|
|
34
|
+
const info = effectErrorInfo(e);
|
|
35
|
+
this.logger?.error({ error: info.unwrapped, stage }, 'Error in listSectionPageLinks');
|
|
36
|
+
})));
|
|
37
|
+
}
|
|
38
|
+
updateSectionPageLink(id, patch) {
|
|
39
|
+
const stage = 'SectionPageLinkService::updateSectionPageLink';
|
|
40
|
+
if (!patch || Object.keys(patch).length === 0) {
|
|
41
|
+
return Effect.fail(XfErrorFactory.inputRequired({ field: 'patch', stage }));
|
|
42
|
+
}
|
|
43
|
+
return pipe(validateInput(id, 'id', { stage }), Effect.flatMap((entityId) => validateBmInputWithSchema({
|
|
44
|
+
input: patch,
|
|
45
|
+
schema: sectionPageLinkZodSchemaInsert.partial().strict(),
|
|
46
|
+
stage,
|
|
47
|
+
operation: 'SectionPageLinkService::updateSectionPageLink.sectionPageLinkZodSchemaInsert.patch',
|
|
48
|
+
field: 'patch',
|
|
49
|
+
}).pipe(Effect.map(() => entityId))), Effect.flatMap((entityId) => this.sectionPageLinkRepository.patchById(entityId, patch).pipe(Effect.mapError(mapDbError({ stage, operation: 'patchById', factory: XfErrorFactory.upsertFailed })))), Effect.tapError((e) => Effect.sync(() => {
|
|
50
|
+
const info = effectErrorInfo(e);
|
|
51
|
+
this.logger?.error({ error: info.unwrapped, stage }, 'Error in updateSectionPageLink');
|
|
52
|
+
})));
|
|
53
|
+
}
|
|
54
|
+
removeSectionPageLink(id) {
|
|
55
|
+
const stage = 'SectionPageLinkService::removeSectionPageLink';
|
|
56
|
+
return pipe(validateInput(id, 'id', { stage }), Effect.flatMap((entityId) => this.sectionPageLinkRepository.deleteById(entityId).pipe(Effect.mapError(mapDbError({ stage, operation: 'deleteById', factory: XfErrorFactory.upsertFailed })))), Effect.map(() => undefined));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { XfLogger } from '@aopslab/xf-logger';
|
|
3
|
+
import type { IRepositoryPortSnippet } from '../ports/repository-ports/index.js';
|
|
4
|
+
import type { ISnippetServicePort } from '../ports/inbound/index.js';
|
|
5
|
+
import { SnippetServiceError } from '../errors/SnippetServiceError.js';
|
|
6
|
+
import { IbmSnippet, IbmSnippetInsert } from '../../domain/models/index.js';
|
|
7
|
+
import { DbQueryOptions } from '@aopslab/xf-db';
|
|
8
|
+
export interface SnippetServiceDependencies {
|
|
9
|
+
}
|
|
10
|
+
export interface SnippetServiceOptions {
|
|
11
|
+
snippetRepository: IRepositoryPortSnippet;
|
|
12
|
+
serviceDependencies?: Partial<SnippetServiceDependencies>;
|
|
13
|
+
logger?: XfLogger;
|
|
14
|
+
locale?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class SnippetService implements ISnippetServicePort {
|
|
17
|
+
private readonly snippetRepository;
|
|
18
|
+
private readonly logger?;
|
|
19
|
+
constructor(options: SnippetServiceOptions);
|
|
20
|
+
getById(id: string, options?: DbQueryOptions<IbmSnippet>): Effect.Effect<IbmSnippet | null, SnippetServiceError>;
|
|
21
|
+
create(data: IbmSnippetInsert): Effect.Effect<IbmSnippet, SnippetServiceError>;
|
|
22
|
+
listSnippets(filter?: Partial<IbmSnippet>, options?: DbQueryOptions<IbmSnippet>): Effect.Effect<IbmSnippet[], SnippetServiceError>;
|
|
23
|
+
updateSnippet(id: string, patch: Partial<IbmSnippet>): Effect.Effect<IbmSnippet, SnippetServiceError>;
|
|
24
|
+
removeSnippet(id: string): Effect.Effect<void, SnippetServiceError>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { pipe } from 'effect/Function';
|
|
3
|
+
import { validateInput, XfErrorFactory, effectErrorInfo } from '@aopslab/xf-core';
|
|
4
|
+
import { snippetZodSchemaInsert } from '../../domain/models/index.js';
|
|
5
|
+
import { validateBmInputWithSchema } from './service.zod-validation.js';
|
|
6
|
+
import { mapDbError } from '@aopslab/xf-db';
|
|
7
|
+
export class SnippetService {
|
|
8
|
+
snippetRepository;
|
|
9
|
+
logger;
|
|
10
|
+
constructor(options) {
|
|
11
|
+
this.snippetRepository = options.snippetRepository;
|
|
12
|
+
this.logger = options.logger?.child({ module: this.constructor.name });
|
|
13
|
+
}
|
|
14
|
+
getById(id, options) {
|
|
15
|
+
const stage = 'SnippetService::getById';
|
|
16
|
+
return pipe(validateInput(id, 'id', { stage }), Effect.flatMap((id) => this.snippetRepository.findById(id, options).pipe(Effect.mapError(mapDbError({ stage, operation: 'findById', factory: XfErrorFactory.notFound })))), Effect.tapError((e) => Effect.sync(() => {
|
|
17
|
+
const info = effectErrorInfo(e);
|
|
18
|
+
this.logger?.error({ error: info.unwrapped, stage }, 'Error in getById');
|
|
19
|
+
})));
|
|
20
|
+
}
|
|
21
|
+
create(data) {
|
|
22
|
+
const stage = 'SnippetService::create';
|
|
23
|
+
return pipe(validateInput(data, 'data', { stage }), Effect.flatMap((data) => validateBmInputWithSchema({
|
|
24
|
+
input: data,
|
|
25
|
+
schema: snippetZodSchemaInsert,
|
|
26
|
+
stage,
|
|
27
|
+
operation: 'SnippetService::create.snippetZodSchemaInsert',
|
|
28
|
+
field: 'data',
|
|
29
|
+
})), Effect.flatMap((data) => this.snippetRepository.create(data).pipe(Effect.mapError(mapDbError({ stage, operation: 'create', factory: XfErrorFactory.createFailed })))));
|
|
30
|
+
}
|
|
31
|
+
listSnippets(filter = {}, options) {
|
|
32
|
+
const stage = 'SnippetService::listSnippets';
|
|
33
|
+
return pipe(validateInput(filter, 'filter', { stage }), Effect.flatMap((filter) => this.snippetRepository.find({ matchEq: filter, options }).pipe(Effect.mapError(mapDbError({ stage, operation: 'find', factory: XfErrorFactory.notFound })))), Effect.tapError((e) => Effect.sync(() => {
|
|
34
|
+
const info = effectErrorInfo(e);
|
|
35
|
+
this.logger?.error({ error: info.unwrapped, stage }, 'Error in listSnippets');
|
|
36
|
+
})));
|
|
37
|
+
}
|
|
38
|
+
updateSnippet(id, patch) {
|
|
39
|
+
const stage = 'SnippetService::updateSnippet';
|
|
40
|
+
if (!patch || Object.keys(patch).length === 0) {
|
|
41
|
+
return Effect.fail(XfErrorFactory.inputRequired({ field: 'patch', stage }));
|
|
42
|
+
}
|
|
43
|
+
return pipe(validateInput(id, 'id', { stage }), Effect.flatMap((entityId) => validateBmInputWithSchema({
|
|
44
|
+
input: patch,
|
|
45
|
+
schema: snippetZodSchemaInsert.partial().strict(),
|
|
46
|
+
stage,
|
|
47
|
+
operation: 'SnippetService::updateSnippet.snippetZodSchemaInsert.patch',
|
|
48
|
+
field: 'patch',
|
|
49
|
+
}).pipe(Effect.map(() => entityId))), Effect.flatMap((entityId) => this.snippetRepository.patchById(entityId, patch).pipe(Effect.mapError(mapDbError({ stage, operation: 'patchById', factory: XfErrorFactory.upsertFailed })))), Effect.tapError((e) => Effect.sync(() => {
|
|
50
|
+
const info = effectErrorInfo(e);
|
|
51
|
+
this.logger?.error({ error: info.unwrapped, stage }, 'Error in updateSnippet');
|
|
52
|
+
})));
|
|
53
|
+
}
|
|
54
|
+
removeSnippet(id) {
|
|
55
|
+
const stage = 'SnippetService::removeSnippet';
|
|
56
|
+
return pipe(validateInput(id, 'id', { stage }), Effect.flatMap((entityId) => this.snippetRepository.deleteById(entityId).pipe(Effect.mapError(mapDbError({ stage, operation: 'deleteById', factory: XfErrorFactory.upsertFailed })))), Effect.map(() => undefined));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { type XfValidationError } from '@aopslab/xf-core';
|
|
3
|
+
import type { ZodTypeAny } from 'zod';
|
|
4
|
+
export type ValidateBmInputWithSchemaOptions<TInput> = {
|
|
5
|
+
input: TInput;
|
|
6
|
+
schema: ZodTypeAny;
|
|
7
|
+
stage: string;
|
|
8
|
+
operation: string;
|
|
9
|
+
field: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const validateBmInputWithSchema: <TInput>({ input, schema, stage, operation, field, }: ValidateBmInputWithSchemaOptions<TInput>) => Effect.Effect<TInput, XfValidationError>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { XfErrorFactory } from '@aopslab/xf-core';
|
|
3
|
+
import { zodErrorToXfResultLegacy } from '@aopslab/xf-validation';
|
|
4
|
+
export const validateBmInputWithSchema = ({ input, schema, stage, operation, field, }) => {
|
|
5
|
+
const validation = schema.safeParse(input);
|
|
6
|
+
if (validation.success) {
|
|
7
|
+
return Effect.succeed(input);
|
|
8
|
+
}
|
|
9
|
+
return Effect.fail(XfErrorFactory.xfValidationFailed(zodErrorToXfResultLegacy(validation.error, stage), {
|
|
10
|
+
stage,
|
|
11
|
+
operation,
|
|
12
|
+
message: `Validation failed for ${field}`,
|
|
13
|
+
}, input));
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import { assetZodSchema, assetZodSchemaInsert } from './zod.schema.js';
|
|
3
|
+
export type IbmAsset = z.infer<typeof assetZodSchema>;
|
|
4
|
+
export type IbmAssetInsert = z.infer<typeof assetZodSchemaInsert>;
|
|
5
|
+
export declare const ibmAssetKeys: readonly ["id", "tenantId", "createdAt", "updatedAt", "scopeId", "assetUid", "kind", "title", "slug", "altText", "currentVersionId", "meta", "createdBy", "updatedBy"];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const ibmAssetKeys = [
|
|
2
|
+
'id',
|
|
3
|
+
'tenantId',
|
|
4
|
+
'createdAt',
|
|
5
|
+
'updatedAt',
|
|
6
|
+
'scopeId',
|
|
7
|
+
'assetUid',
|
|
8
|
+
'kind',
|
|
9
|
+
'title',
|
|
10
|
+
'slug',
|
|
11
|
+
'altText',
|
|
12
|
+
'currentVersionId',
|
|
13
|
+
'meta',
|
|
14
|
+
'createdBy',
|
|
15
|
+
'updatedBy',
|
|
16
|
+
];
|
|
17
|
+
const _verifyKeys = true;
|
|
18
|
+
void _verifyKeys;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const assetZodSchema: z.ZodObject<{
|
|
3
|
+
scopeId: z.ZodString;
|
|
4
|
+
assetUid: z.ZodString;
|
|
5
|
+
kind: z.ZodEnum<{
|
|
6
|
+
file: "file";
|
|
7
|
+
document: "document";
|
|
8
|
+
image: "image";
|
|
9
|
+
attachment: "attachment";
|
|
10
|
+
}>;
|
|
11
|
+
title: z.ZodOptional<z.ZodString>;
|
|
12
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
13
|
+
altText: z.ZodOptional<z.ZodString>;
|
|
14
|
+
currentVersionId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
meta: z.ZodOptional<z.ZodUnknown>;
|
|
16
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
17
|
+
updatedBy: z.ZodOptional<z.ZodString>;
|
|
18
|
+
createdAt: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>, z.ZodTransform<Date, string | Date>>>;
|
|
19
|
+
updatedAt: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>, z.ZodTransform<Date, string | Date>>>;
|
|
20
|
+
id: z.ZodOptional<z.ZodString>;
|
|
21
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export declare const assetZodSchemaInsert: z.ZodObject<{
|
|
24
|
+
scopeId: z.ZodString;
|
|
25
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
26
|
+
title: z.ZodOptional<z.ZodString>;
|
|
27
|
+
meta: z.ZodOptional<z.ZodUnknown>;
|
|
28
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
29
|
+
updatedBy: z.ZodOptional<z.ZodString>;
|
|
30
|
+
kind: z.ZodEnum<{
|
|
31
|
+
file: "file";
|
|
32
|
+
document: "document";
|
|
33
|
+
image: "image";
|
|
34
|
+
attachment: "attachment";
|
|
35
|
+
}>;
|
|
36
|
+
assetUid: z.ZodString;
|
|
37
|
+
altText: z.ZodOptional<z.ZodString>;
|
|
38
|
+
currentVersionId: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { IbmZodSchema } from '@aopslab/xf-bm';
|
|
3
|
+
export const assetZodSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
...IbmZodSchema.shape,
|
|
6
|
+
scopeId: z.string(),
|
|
7
|
+
assetUid: z.string(),
|
|
8
|
+
kind: z.enum(['image', 'file', 'document', 'attachment']),
|
|
9
|
+
title: z.string().optional(),
|
|
10
|
+
slug: z.string().optional(),
|
|
11
|
+
altText: z.string().optional(),
|
|
12
|
+
currentVersionId: z.string().uuid().optional(),
|
|
13
|
+
meta: z.unknown().optional(),
|
|
14
|
+
createdBy: z.string().optional(),
|
|
15
|
+
updatedBy: z.string().optional(),
|
|
16
|
+
});
|
|
17
|
+
export const assetZodSchemaInsert = assetZodSchema.omit({
|
|
18
|
+
id: true,
|
|
19
|
+
createdAt: true,
|
|
20
|
+
updatedAt: true,
|
|
21
|
+
tenantId: true,
|
|
22
|
+
}).strict();
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import { assetVersionMutablePatchZodSchema, assetVersionZodSchema, assetVersionZodSchemaInsert } from './zod.schema.js';
|
|
3
|
+
export type IbmAssetVersion = z.infer<typeof assetVersionZodSchema>;
|
|
4
|
+
export type IbmAssetVersionInsert = z.infer<typeof assetVersionZodSchemaInsert>;
|
|
5
|
+
export type IbmAssetVersionPatch = z.infer<typeof assetVersionMutablePatchZodSchema>;
|
|
6
|
+
export declare const ibmAssetVersionKeys: readonly ["id", "tenantId", "createdAt", "updatedAt", "assetId", "version", "label", "status", "storageKey", "sourcePath", "sourceUrl", "filename", "mime", "contentHash", "byteSize", "width", "height", "variants", "meta", "createdBy", "updatedBy"];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const ibmAssetVersionKeys = [
|
|
2
|
+
'id',
|
|
3
|
+
'tenantId',
|
|
4
|
+
'createdAt',
|
|
5
|
+
'updatedAt',
|
|
6
|
+
'assetId',
|
|
7
|
+
'version',
|
|
8
|
+
'label',
|
|
9
|
+
'status',
|
|
10
|
+
'storageKey',
|
|
11
|
+
'sourcePath',
|
|
12
|
+
'sourceUrl',
|
|
13
|
+
'filename',
|
|
14
|
+
'mime',
|
|
15
|
+
'contentHash',
|
|
16
|
+
'byteSize',
|
|
17
|
+
'width',
|
|
18
|
+
'height',
|
|
19
|
+
'variants',
|
|
20
|
+
'meta',
|
|
21
|
+
'createdBy',
|
|
22
|
+
'updatedBy',
|
|
23
|
+
];
|
|
24
|
+
const _verifyKeys = true;
|
|
25
|
+
void _verifyKeys;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const assetVersionStatusZodSchema: z.ZodEnum<{
|
|
3
|
+
draft: "draft";
|
|
4
|
+
archived: "archived";
|
|
5
|
+
ready: "ready";
|
|
6
|
+
failed: "failed";
|
|
7
|
+
}>;
|
|
8
|
+
export declare const assetVersionZodSchema: z.ZodObject<{
|
|
9
|
+
assetId: z.ZodString;
|
|
10
|
+
version: z.ZodNumber;
|
|
11
|
+
label: z.ZodOptional<z.ZodString>;
|
|
12
|
+
status: z.ZodEnum<{
|
|
13
|
+
draft: "draft";
|
|
14
|
+
archived: "archived";
|
|
15
|
+
ready: "ready";
|
|
16
|
+
failed: "failed";
|
|
17
|
+
}>;
|
|
18
|
+
storageKey: z.ZodOptional<z.ZodString>;
|
|
19
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
20
|
+
sourceUrl: z.ZodOptional<z.ZodString>;
|
|
21
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
22
|
+
mime: z.ZodString;
|
|
23
|
+
contentHash: z.ZodString;
|
|
24
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
variants: z.ZodOptional<z.ZodUnknown>;
|
|
28
|
+
meta: z.ZodOptional<z.ZodUnknown>;
|
|
29
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
30
|
+
updatedBy: z.ZodOptional<z.ZodString>;
|
|
31
|
+
createdAt: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>, z.ZodTransform<Date, string | Date>>>;
|
|
32
|
+
updatedAt: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodDate]>, z.ZodTransform<Date, string | Date>>>;
|
|
33
|
+
id: z.ZodOptional<z.ZodString>;
|
|
34
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export declare const assetVersionZodSchemaInsert: z.ZodObject<{
|
|
37
|
+
status: z.ZodEnum<{
|
|
38
|
+
draft: "draft";
|
|
39
|
+
archived: "archived";
|
|
40
|
+
ready: "ready";
|
|
41
|
+
failed: "failed";
|
|
42
|
+
}>;
|
|
43
|
+
meta: z.ZodOptional<z.ZodUnknown>;
|
|
44
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
45
|
+
updatedBy: z.ZodOptional<z.ZodString>;
|
|
46
|
+
version: z.ZodNumber;
|
|
47
|
+
label: z.ZodOptional<z.ZodString>;
|
|
48
|
+
assetId: z.ZodString;
|
|
49
|
+
storageKey: z.ZodOptional<z.ZodString>;
|
|
50
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
51
|
+
sourceUrl: z.ZodOptional<z.ZodString>;
|
|
52
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
53
|
+
mime: z.ZodString;
|
|
54
|
+
contentHash: z.ZodString;
|
|
55
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
variants: z.ZodOptional<z.ZodUnknown>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
export declare const assetVersionMutablePatchZodSchema: z.ZodObject<{
|
|
61
|
+
label: z.ZodOptional<z.ZodString>;
|
|
62
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
63
|
+
draft: "draft";
|
|
64
|
+
archived: "archived";
|
|
65
|
+
ready: "ready";
|
|
66
|
+
failed: "failed";
|
|
67
|
+
}>>;
|
|
68
|
+
variants: z.ZodOptional<z.ZodUnknown>;
|
|
69
|
+
meta: z.ZodOptional<z.ZodUnknown>;
|
|
70
|
+
updatedBy: z.ZodOptional<z.ZodString>;
|
|
71
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { IbmZodSchema } from '@aopslab/xf-bm';
|
|
3
|
+
export const assetVersionStatusZodSchema = z.enum(['draft', 'ready', 'archived', 'failed']);
|
|
4
|
+
export const assetVersionZodSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
...IbmZodSchema.shape,
|
|
7
|
+
assetId: z.string().uuid(),
|
|
8
|
+
version: z.number().int(),
|
|
9
|
+
label: z.string().optional(),
|
|
10
|
+
status: assetVersionStatusZodSchema,
|
|
11
|
+
storageKey: z.string().optional(),
|
|
12
|
+
sourcePath: z.string().optional(),
|
|
13
|
+
sourceUrl: z.string().optional(),
|
|
14
|
+
filename: z.string().optional(),
|
|
15
|
+
mime: z.string(),
|
|
16
|
+
contentHash: z.string(),
|
|
17
|
+
byteSize: z.number().int().nonnegative().optional(),
|
|
18
|
+
width: z.number().int().nonnegative().optional(),
|
|
19
|
+
height: z.number().int().nonnegative().optional(),
|
|
20
|
+
variants: z.unknown().optional(),
|
|
21
|
+
meta: z.unknown().optional(),
|
|
22
|
+
createdBy: z.string().optional(),
|
|
23
|
+
updatedBy: z.string().optional(),
|
|
24
|
+
});
|
|
25
|
+
export const assetVersionZodSchemaInsert = assetVersionZodSchema.omit({
|
|
26
|
+
id: true,
|
|
27
|
+
createdAt: true,
|
|
28
|
+
updatedAt: true,
|
|
29
|
+
tenantId: true,
|
|
30
|
+
}).strict();
|
|
31
|
+
export const assetVersionMutablePatchZodSchema = z.object({
|
|
32
|
+
label: z.string().optional(),
|
|
33
|
+
status: assetVersionStatusZodSchema.optional(),
|
|
34
|
+
variants: z.unknown().optional(),
|
|
35
|
+
meta: z.unknown().optional(),
|
|
36
|
+
updatedBy: z.string().optional(),
|
|
37
|
+
}).strict();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import { DotNestedMlgKeys } from '@aopslab/xf-bm';
|
|
3
|
+
import { documentZodSchema, documentZodSchemaInsert } from './zod.schema.js';
|
|
4
|
+
export type IbmDocument = z.infer<typeof documentZodSchema>;
|
|
5
|
+
export type IbmDocumentInsert = z.infer<typeof documentZodSchemaInsert>;
|
|
6
|
+
export declare const ibmDocumentKeys: readonly ["id", "tenantId", "createdAt", "updatedAt", "scopeId", "documentUid", "groupId", "groupUid", "slug", "title", "titleMl", "summary", "summaryMl", "description", "descriptionMl", "status", "visibility", "tags", "pageSize", "meta", "createdBy", "updatedBy"];
|
|
7
|
+
export type BmDocumentMlgKeys = DotNestedMlgKeys<IbmDocument>;
|
|
8
|
+
export declare const bmDocumentMlgFields: ("titleMl" | "summaryMl" | "descriptionMl" | "meta")[];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { mlgFieldsOf } from '@aopslab/xf-bm';
|
|
2
|
+
export const ibmDocumentKeys = [
|
|
3
|
+
'id',
|
|
4
|
+
'tenantId',
|
|
5
|
+
'createdAt',
|
|
6
|
+
'updatedAt',
|
|
7
|
+
'scopeId',
|
|
8
|
+
'documentUid',
|
|
9
|
+
'groupId',
|
|
10
|
+
'groupUid',
|
|
11
|
+
'slug',
|
|
12
|
+
'title',
|
|
13
|
+
'titleMl',
|
|
14
|
+
'summary',
|
|
15
|
+
'summaryMl',
|
|
16
|
+
'description',
|
|
17
|
+
'descriptionMl',
|
|
18
|
+
'status',
|
|
19
|
+
'visibility',
|
|
20
|
+
'tags',
|
|
21
|
+
'pageSize',
|
|
22
|
+
'meta',
|
|
23
|
+
'createdBy',
|
|
24
|
+
'updatedBy',
|
|
25
|
+
];
|
|
26
|
+
const _verifyKeys = true;
|
|
27
|
+
void _verifyKeys;
|
|
28
|
+
export const bmDocumentMlgFields = mlgFieldsOf()('titleMl', 'summaryMl', 'descriptionMl', 'meta');
|
|
29
|
+
const _verifyMlgFields = true;
|
|
30
|
+
void _verifyMlgFields;
|