@webiny/migrations 5.39.7-beta.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 +26 -0
- package/README.md +1 -0
- package/ddb-es.d.ts +18 -0
- package/ddb-es.js +67 -0
- package/ddb-es.js.map +1 -0
- package/ddb.d.ts +18 -0
- package/ddb.js +49 -0
- package/ddb.js.map +1 -0
- package/migrations/5.35.0/001/FileSettingsMigration.d.ts +12 -0
- package/migrations/5.35.0/001/FileSettingsMigration.js +93 -0
- package/migrations/5.35.0/001/FileSettingsMigration.js.map +1 -0
- package/migrations/5.35.0/001/ddb/FileDataMigration.d.ts +14 -0
- package/migrations/5.35.0/001/ddb/FileDataMigration.js +156 -0
- package/migrations/5.35.0/001/ddb/FileDataMigration.js.map +1 -0
- package/migrations/5.35.0/001/ddb/index.d.ts +10 -0
- package/migrations/5.35.0/001/ddb/index.js +50 -0
- package/migrations/5.35.0/001/ddb/index.js.map +1 -0
- package/migrations/5.35.0/001/ddb-es/FileDataMigration.d.ts +17 -0
- package/migrations/5.35.0/001/ddb-es/FileDataMigration.js +172 -0
- package/migrations/5.35.0/001/ddb-es/FileDataMigration.js.map +1 -0
- package/migrations/5.35.0/001/ddb-es/index.d.ts +12 -0
- package/migrations/5.35.0/001/ddb-es/index.js +65 -0
- package/migrations/5.35.0/001/ddb-es/index.js.map +1 -0
- package/migrations/5.35.0/001/entities/createFileEntity.d.ts +92 -0
- package/migrations/5.35.0/001/entities/createFileEntity.js +62 -0
- package/migrations/5.35.0/001/entities/createFileEntity.js.map +1 -0
- package/migrations/5.35.0/001/entities/createLocaleEntity.d.ts +42 -0
- package/migrations/5.35.0/001/entities/createLocaleEntity.js +52 -0
- package/migrations/5.35.0/001/entities/createLocaleEntity.js.map +1 -0
- package/migrations/5.35.0/001/entities/createSettingsEntity.d.ts +90 -0
- package/migrations/5.35.0/001/entities/createSettingsEntity.js +37 -0
- package/migrations/5.35.0/001/entities/createSettingsEntity.js.map +1 -0
- package/migrations/5.35.0/001/entities/createTenantEntity.d.ts +42 -0
- package/migrations/5.35.0/001/entities/createTenantEntity.js +69 -0
- package/migrations/5.35.0/001/entities/createTenantEntity.js.map +1 -0
- package/migrations/5.35.0/001/types.d.ts +19 -0
- package/migrations/5.35.0/001/types.js +7 -0
- package/migrations/5.35.0/001/types.js.map +1 -0
- package/migrations/5.35.0/002/createLocaleEntity.d.ts +42 -0
- package/migrations/5.35.0/002/createLocaleEntity.js +32 -0
- package/migrations/5.35.0/002/createLocaleEntity.js.map +1 -0
- package/migrations/5.35.0/002/createSettingsEntity.d.ts +90 -0
- package/migrations/5.35.0/002/createSettingsEntity.js +61 -0
- package/migrations/5.35.0/002/createSettingsEntity.js.map +1 -0
- package/migrations/5.35.0/002/createTenantEntity.d.ts +42 -0
- package/migrations/5.35.0/002/createTenantEntity.js +46 -0
- package/migrations/5.35.0/002/createTenantEntity.js.map +1 -0
- package/migrations/5.35.0/002/index.d.ts +13 -0
- package/migrations/5.35.0/002/index.js +117 -0
- package/migrations/5.35.0/002/index.js.map +1 -0
- package/migrations/5.35.0/003/createTenantEntity.d.ts +42 -0
- package/migrations/5.35.0/003/createTenantEntity.js +46 -0
- package/migrations/5.35.0/003/createTenantEntity.js.map +1 -0
- package/migrations/5.35.0/003/createUserEntity.d.ts +90 -0
- package/migrations/5.35.0/003/createUserEntity.js +55 -0
- package/migrations/5.35.0/003/createUserEntity.js.map +1 -0
- package/migrations/5.35.0/003/index.d.ts +12 -0
- package/migrations/5.35.0/003/index.js +92 -0
- package/migrations/5.35.0/003/index.js.map +1 -0
- package/migrations/5.35.0/004/createTenantEntity.d.ts +90 -0
- package/migrations/5.35.0/004/createTenantEntity.js +57 -0
- package/migrations/5.35.0/004/createTenantEntity.js.map +1 -0
- package/migrations/5.35.0/004/index.d.ts +11 -0
- package/migrations/5.35.0/004/index.js +80 -0
- package/migrations/5.35.0/004/index.js.map +1 -0
- package/migrations/5.35.0/005/createLocaleEntity.d.ts +42 -0
- package/migrations/5.35.0/005/createLocaleEntity.js +32 -0
- package/migrations/5.35.0/005/createLocaleEntity.js.map +1 -0
- package/migrations/5.35.0/005/createModelEntity.d.ts +42 -0
- package/migrations/5.35.0/005/createModelEntity.js +101 -0
- package/migrations/5.35.0/005/createModelEntity.js.map +1 -0
- package/migrations/5.35.0/005/createTenantEntity.d.ts +48 -0
- package/migrations/5.35.0/005/createTenantEntity.js +13 -0
- package/migrations/5.35.0/005/createTenantEntity.js.map +1 -0
- package/migrations/5.35.0/005/index.d.ts +15 -0
- package/migrations/5.35.0/005/index.js +144 -0
- package/migrations/5.35.0/005/index.js.map +1 -0
- package/migrations/5.35.0/005/types.d.ts +42 -0
- package/migrations/5.35.0/005/types.js +7 -0
- package/migrations/5.35.0/005/types.js.map +1 -0
- package/migrations/5.35.0/006/constants.d.ts +3 -0
- package/migrations/5.35.0/006/constants.js +14 -0
- package/migrations/5.35.0/006/constants.js.map +1 -0
- package/migrations/5.35.0/006/ddb/PageDataMigration.d.ts +17 -0
- package/migrations/5.35.0/006/ddb/PageDataMigration.js +249 -0
- package/migrations/5.35.0/006/ddb/PageDataMigration.js.map +1 -0
- package/migrations/5.35.0/006/ddb/index.d.ts +10 -0
- package/migrations/5.35.0/006/ddb/index.js +49 -0
- package/migrations/5.35.0/006/ddb/index.js.map +1 -0
- package/migrations/5.35.0/006/ddb-es/PageDataMigration.d.ts +22 -0
- package/migrations/5.35.0/006/ddb-es/PageDataMigration.js +413 -0
- package/migrations/5.35.0/006/ddb-es/PageDataMigration.js.map +1 -0
- package/migrations/5.35.0/006/ddb-es/index.d.ts +12 -0
- package/migrations/5.35.0/006/ddb-es/index.js +64 -0
- package/migrations/5.35.0/006/ddb-es/index.js.map +1 -0
- package/migrations/5.35.0/006/entities/createEntryEntity.d.ts +89 -0
- package/migrations/5.35.0/006/entities/createEntryEntity.js +106 -0
- package/migrations/5.35.0/006/entities/createEntryEntity.js.map +1 -0
- package/migrations/5.35.0/006/entities/createLocaleEntity.d.ts +42 -0
- package/migrations/5.35.0/006/entities/createLocaleEntity.js +32 -0
- package/migrations/5.35.0/006/entities/createLocaleEntity.js.map +1 -0
- package/migrations/5.35.0/006/entities/createPageEntity.d.ts +89 -0
- package/migrations/5.35.0/006/entities/createPageEntity.js +113 -0
- package/migrations/5.35.0/006/entities/createPageEntity.js.map +1 -0
- package/migrations/5.35.0/006/entities/createTenantEntity.d.ts +48 -0
- package/migrations/5.35.0/006/entities/createTenantEntity.js +13 -0
- package/migrations/5.35.0/006/entities/createTenantEntity.js.map +1 -0
- package/migrations/5.35.0/006/types.d.ts +91 -0
- package/migrations/5.35.0/006/types.js +7 -0
- package/migrations/5.35.0/006/types.js.map +1 -0
- package/migrations/5.35.0/006/utils/getCompressedData.d.ts +4 -0
- package/migrations/5.35.0/006/utils/getCompressedData.js +19 -0
- package/migrations/5.35.0/006/utils/getCompressedData.js.map +1 -0
- package/migrations/5.35.0/006/utils/getLexicalContentText.d.ts +1 -0
- package/migrations/5.35.0/006/utils/getLexicalContentText.js +29 -0
- package/migrations/5.35.0/006/utils/getLexicalContentText.js.map +1 -0
- package/migrations/5.35.0/006/utils/getSearchableContent.d.ts +6 -0
- package/migrations/5.35.0/006/utils/getSearchableContent.js +45 -0
- package/migrations/5.35.0/006/utils/getSearchableContent.js.map +1 -0
- package/migrations/5.35.0/006/utils/processors/button.d.ts +1 -0
- package/migrations/5.35.0/006/utils/processors/button.js +17 -0
- package/migrations/5.35.0/006/utils/processors/button.js.map +1 -0
- package/migrations/5.35.0/006/utils/processors/image.d.ts +1 -0
- package/migrations/5.35.0/006/utils/processors/image.js +17 -0
- package/migrations/5.35.0/006/utils/processors/image.js.map +1 -0
- package/migrations/5.35.0/006/utils/processors/images.d.ts +1 -0
- package/migrations/5.35.0/006/utils/processors/images.js +18 -0
- package/migrations/5.35.0/006/utils/processors/images.js.map +1 -0
- package/migrations/5.35.0/006/utils/processors/index.d.ts +1 -0
- package/migrations/5.35.0/006/utils/processors/index.js +14 -0
- package/migrations/5.35.0/006/utils/processors/index.js.map +1 -0
- package/migrations/5.35.0/006/utils/processors/paragraph.d.ts +1 -0
- package/migrations/5.35.0/006/utils/processors/paragraph.js +25 -0
- package/migrations/5.35.0/006/utils/processors/paragraph.js.map +1 -0
- package/migrations/5.36.0/001/constants.d.ts +3 -0
- package/migrations/5.36.0/001/constants.js +14 -0
- package/migrations/5.36.0/001/constants.js.map +1 -0
- package/migrations/5.36.0/001/ddb/FileDataMigration.d.ts +17 -0
- package/migrations/5.36.0/001/ddb/FileDataMigration.js +241 -0
- package/migrations/5.36.0/001/ddb/FileDataMigration.js.map +1 -0
- package/migrations/5.36.0/001/ddb/index.d.ts +10 -0
- package/migrations/5.36.0/001/ddb/index.js +49 -0
- package/migrations/5.36.0/001/ddb/index.js.map +1 -0
- package/migrations/5.36.0/001/ddb-es/FileDataMigration.d.ts +20 -0
- package/migrations/5.36.0/001/ddb-es/FileDataMigration.js +405 -0
- package/migrations/5.36.0/001/ddb-es/FileDataMigration.js.map +1 -0
- package/migrations/5.36.0/001/ddb-es/index.d.ts +12 -0
- package/migrations/5.36.0/001/ddb-es/index.js +64 -0
- package/migrations/5.36.0/001/ddb-es/index.js.map +1 -0
- package/migrations/5.36.0/001/entities/createEntryEntity.d.ts +89 -0
- package/migrations/5.36.0/001/entities/createEntryEntity.js +106 -0
- package/migrations/5.36.0/001/entities/createEntryEntity.js.map +1 -0
- package/migrations/5.36.0/001/entities/createFileEntity.d.ts +95 -0
- package/migrations/5.36.0/001/entities/createFileEntity.js +33 -0
- package/migrations/5.36.0/001/entities/createFileEntity.js.map +1 -0
- package/migrations/5.36.0/001/entities/createLocaleEntity.d.ts +42 -0
- package/migrations/5.36.0/001/entities/createLocaleEntity.js +32 -0
- package/migrations/5.36.0/001/entities/createLocaleEntity.js.map +1 -0
- package/migrations/5.36.0/001/entities/createTenantEntity.d.ts +48 -0
- package/migrations/5.36.0/001/entities/createTenantEntity.js +13 -0
- package/migrations/5.36.0/001/entities/createTenantEntity.js.map +1 -0
- package/migrations/5.36.0/001/types.d.ts +67 -0
- package/migrations/5.36.0/001/types.js +7 -0
- package/migrations/5.36.0/001/types.js.map +1 -0
- package/migrations/5.36.0/001/utils/createMimeTag.d.ts +1 -0
- package/migrations/5.36.0/001/utils/createMimeTag.js +10 -0
- package/migrations/5.36.0/001/utils/createMimeTag.js.map +1 -0
- package/migrations/5.36.0/001/utils/getCompressedData.d.ts +4 -0
- package/migrations/5.36.0/001/utils/getCompressedData.js +19 -0
- package/migrations/5.36.0/001/utils/getCompressedData.js.map +1 -0
- package/migrations/5.37.0/001/TenantLinkDataMigration.d.ts +14 -0
- package/migrations/5.37.0/001/TenantLinkDataMigration.js +106 -0
- package/migrations/5.37.0/001/TenantLinkDataMigration.js.map +1 -0
- package/migrations/5.37.0/001/entities/createTenantEntity.d.ts +48 -0
- package/migrations/5.37.0/001/entities/createTenantEntity.js +13 -0
- package/migrations/5.37.0/001/entities/createTenantEntity.js.map +1 -0
- package/migrations/5.37.0/001/entities/createTenantLinkEntity.d.ts +48 -0
- package/migrations/5.37.0/001/entities/createTenantLinkEntity.js +17 -0
- package/migrations/5.37.0/001/entities/createTenantLinkEntity.js.map +1 -0
- package/migrations/5.37.0/001/index.d.ts +10 -0
- package/migrations/5.37.0/001/index.js +49 -0
- package/migrations/5.37.0/001/index.js.map +1 -0
- package/migrations/5.37.0/001/types.d.ts +25 -0
- package/migrations/5.37.0/001/types.js +7 -0
- package/migrations/5.37.0/001/types.js.map +1 -0
- package/migrations/5.37.0/001/utils/isMigratedTenantLink.d.ts +2 -0
- package/migrations/5.37.0/001/utils/isMigratedTenantLink.js +12 -0
- package/migrations/5.37.0/001/utils/isMigratedTenantLink.js.map +1 -0
- package/migrations/5.37.0/002/constants.d.ts +1 -0
- package/migrations/5.37.0/002/constants.js +10 -0
- package/migrations/5.37.0/002/constants.js.map +1 -0
- package/migrations/5.37.0/002/ddb/index.d.ts +22 -0
- package/migrations/5.37.0/002/ddb/index.js +133 -0
- package/migrations/5.37.0/002/ddb/index.js.map +1 -0
- package/migrations/5.37.0/002/ddb-es/index.d.ts +35 -0
- package/migrations/5.37.0/002/ddb-es/index.js +321 -0
- package/migrations/5.37.0/002/ddb-es/index.js.map +1 -0
- package/migrations/5.37.0/002/entities/createEntryEntity.d.ts +89 -0
- package/migrations/5.37.0/002/entities/createEntryEntity.js +109 -0
- package/migrations/5.37.0/002/entities/createEntryEntity.js.map +1 -0
- package/migrations/5.37.0/002/entities/createLocaleEntity.d.ts +42 -0
- package/migrations/5.37.0/002/entities/createLocaleEntity.js +32 -0
- package/migrations/5.37.0/002/entities/createLocaleEntity.js.map +1 -0
- package/migrations/5.37.0/002/entities/createTenantEntity.d.ts +48 -0
- package/migrations/5.37.0/002/entities/createTenantEntity.js +13 -0
- package/migrations/5.37.0/002/entities/createTenantEntity.js.map +1 -0
- package/migrations/5.37.0/002/types.d.ts +53 -0
- package/migrations/5.37.0/002/types.js +7 -0
- package/migrations/5.37.0/002/types.js.map +1 -0
- package/migrations/5.37.0/002/utils/getCompressedData.d.ts +4 -0
- package/migrations/5.37.0/002/utils/getCompressedData.js +19 -0
- package/migrations/5.37.0/002/utils/getCompressedData.js.map +1 -0
- package/migrations/5.37.0/002/utils/getDecompressedData.d.ts +1 -0
- package/migrations/5.37.0/002/utils/getDecompressedData.js +31 -0
- package/migrations/5.37.0/002/utils/getDecompressedData.js.map +1 -0
- package/migrations/5.37.0/003/constants.d.ts +3 -0
- package/migrations/5.37.0/003/constants.js +14 -0
- package/migrations/5.37.0/003/constants.js.map +1 -0
- package/migrations/5.37.0/003/ddb/AcoFolderMigration.d.ts +15 -0
- package/migrations/5.37.0/003/ddb/AcoFolderMigration.js +179 -0
- package/migrations/5.37.0/003/ddb/AcoFolderMigration.js.map +1 -0
- package/migrations/5.37.0/003/ddb/index.d.ts +10 -0
- package/migrations/5.37.0/003/ddb/index.js +49 -0
- package/migrations/5.37.0/003/ddb/index.js.map +1 -0
- package/migrations/5.37.0/003/ddb-es/AcoFolderMigration.d.ts +20 -0
- package/migrations/5.37.0/003/ddb-es/AcoFolderMigration.js +313 -0
- package/migrations/5.37.0/003/ddb-es/AcoFolderMigration.js.map +1 -0
- package/migrations/5.37.0/003/ddb-es/index.d.ts +12 -0
- package/migrations/5.37.0/003/ddb-es/index.js +64 -0
- package/migrations/5.37.0/003/ddb-es/index.js.map +1 -0
- package/migrations/5.37.0/003/ddb-es/latestElasticsearchData.d.ts +4 -0
- package/migrations/5.37.0/003/ddb-es/latestElasticsearchData.js +30 -0
- package/migrations/5.37.0/003/ddb-es/latestElasticsearchData.js.map +1 -0
- package/migrations/5.37.0/003/entities/createEntryEntity.d.ts +89 -0
- package/migrations/5.37.0/003/entities/createEntryEntity.js +109 -0
- package/migrations/5.37.0/003/entities/createEntryEntity.js.map +1 -0
- package/migrations/5.37.0/003/entities/createLocaleEntity.d.ts +42 -0
- package/migrations/5.37.0/003/entities/createLocaleEntity.js +32 -0
- package/migrations/5.37.0/003/entities/createLocaleEntity.js.map +1 -0
- package/migrations/5.37.0/003/entities/createTenantEntity.d.ts +48 -0
- package/migrations/5.37.0/003/entities/createTenantEntity.js +13 -0
- package/migrations/5.37.0/003/entities/createTenantEntity.js.map +1 -0
- package/migrations/5.37.0/003/types.d.ts +46 -0
- package/migrations/5.37.0/003/types.js +7 -0
- package/migrations/5.37.0/003/types.js.map +1 -0
- package/migrations/5.37.0/003/utils/getCompressedData.d.ts +4 -0
- package/migrations/5.37.0/003/utils/getCompressedData.js +19 -0
- package/migrations/5.37.0/003/utils/getCompressedData.js.map +1 -0
- package/migrations/5.37.0/003/utils/getDecompressedData.d.ts +1 -0
- package/migrations/5.37.0/003/utils/getDecompressedData.js +31 -0
- package/migrations/5.37.0/003/utils/getDecompressedData.js.map +1 -0
- package/migrations/5.37.0/004/constants.d.ts +7 -0
- package/migrations/5.37.0/004/constants.js +22 -0
- package/migrations/5.37.0/004/constants.js.map +1 -0
- package/migrations/5.37.0/004/ddb/PageDataMigration.d.ts +17 -0
- package/migrations/5.37.0/004/ddb/PageDataMigration.js +269 -0
- package/migrations/5.37.0/004/ddb/PageDataMigration.js.map +1 -0
- package/migrations/5.37.0/004/ddb/index.d.ts +10 -0
- package/migrations/5.37.0/004/ddb/index.js +49 -0
- package/migrations/5.37.0/004/ddb/index.js.map +1 -0
- package/migrations/5.37.0/004/ddb-es/PageDataMigration.d.ts +22 -0
- package/migrations/5.37.0/004/ddb-es/PageDataMigration.js +364 -0
- package/migrations/5.37.0/004/ddb-es/PageDataMigration.js.map +1 -0
- package/migrations/5.37.0/004/ddb-es/index.d.ts +12 -0
- package/migrations/5.37.0/004/ddb-es/index.js +64 -0
- package/migrations/5.37.0/004/ddb-es/index.js.map +1 -0
- package/migrations/5.37.0/004/entities/createEntryEntity.d.ts +89 -0
- package/migrations/5.37.0/004/entities/createEntryEntity.js +109 -0
- package/migrations/5.37.0/004/entities/createEntryEntity.js.map +1 -0
- package/migrations/5.37.0/004/entities/createLocaleEntity.d.ts +42 -0
- package/migrations/5.37.0/004/entities/createLocaleEntity.js +32 -0
- package/migrations/5.37.0/004/entities/createLocaleEntity.js.map +1 -0
- package/migrations/5.37.0/004/entities/createPageEntity.d.ts +89 -0
- package/migrations/5.37.0/004/entities/createPageEntity.js +113 -0
- package/migrations/5.37.0/004/entities/createPageEntity.js.map +1 -0
- package/migrations/5.37.0/004/entities/createTenantEntity.d.ts +48 -0
- package/migrations/5.37.0/004/entities/createTenantEntity.js +13 -0
- package/migrations/5.37.0/004/entities/createTenantEntity.js.map +1 -0
- package/migrations/5.37.0/004/types.d.ts +149 -0
- package/migrations/5.37.0/004/types.js +7 -0
- package/migrations/5.37.0/004/types.js.map +1 -0
- package/migrations/5.37.0/004/utils/getCompressedData.d.ts +4 -0
- package/migrations/5.37.0/004/utils/getCompressedData.js +19 -0
- package/migrations/5.37.0/004/utils/getCompressedData.js.map +1 -0
- package/migrations/5.37.0/005/constants.d.ts +3 -0
- package/migrations/5.37.0/005/constants.js +14 -0
- package/migrations/5.37.0/005/constants.js.map +1 -0
- package/migrations/5.37.0/005/ddb/index.d.ts +20 -0
- package/migrations/5.37.0/005/ddb/index.js +245 -0
- package/migrations/5.37.0/005/ddb/index.js.map +1 -0
- package/migrations/5.37.0/005/ddb-es/index.d.ts +22 -0
- package/migrations/5.37.0/005/ddb-es/index.js +382 -0
- package/migrations/5.37.0/005/ddb-es/index.js.map +1 -0
- package/migrations/5.37.0/005/entities/createEntryEntity.d.ts +89 -0
- package/migrations/5.37.0/005/entities/createEntryEntity.js +109 -0
- package/migrations/5.37.0/005/entities/createEntryEntity.js.map +1 -0
- package/migrations/5.37.0/005/entities/createFileEntity.d.ts +95 -0
- package/migrations/5.37.0/005/entities/createFileEntity.js +33 -0
- package/migrations/5.37.0/005/entities/createFileEntity.js.map +1 -0
- package/migrations/5.37.0/005/entities/createLocaleEntity.d.ts +42 -0
- package/migrations/5.37.0/005/entities/createLocaleEntity.js +32 -0
- package/migrations/5.37.0/005/entities/createLocaleEntity.js.map +1 -0
- package/migrations/5.37.0/005/entities/createTenantEntity.d.ts +48 -0
- package/migrations/5.37.0/005/entities/createTenantEntity.js +13 -0
- package/migrations/5.37.0/005/entities/createTenantEntity.js.map +1 -0
- package/migrations/5.37.0/005/entities/createTenantLinkEntity.d.ts +48 -0
- package/migrations/5.37.0/005/entities/createTenantLinkEntity.js +17 -0
- package/migrations/5.37.0/005/entities/createTenantLinkEntity.js.map +1 -0
- package/migrations/5.37.0/005/types.d.ts +109 -0
- package/migrations/5.37.0/005/types.js +7 -0
- package/migrations/5.37.0/005/types.js.map +1 -0
- package/migrations/5.38.0/001/ddb/index.d.ts +11 -0
- package/migrations/5.38.0/001/ddb/index.js +116 -0
- package/migrations/5.38.0/001/ddb/index.js.map +1 -0
- package/migrations/5.38.0/001/ddb-es/index.d.ts +13 -0
- package/migrations/5.38.0/001/ddb-es/index.js +211 -0
- package/migrations/5.38.0/001/ddb-es/index.js.map +1 -0
- package/migrations/5.38.0/001/entities/createFormEntity.d.ts +42 -0
- package/migrations/5.38.0/001/entities/createFormEntity.js +92 -0
- package/migrations/5.38.0/001/entities/createFormEntity.js.map +1 -0
- package/migrations/5.38.0/001/types.d.ts +11 -0
- package/migrations/5.38.0/001/types.js +7 -0
- package/migrations/5.38.0/001/types.js.map +1 -0
- package/migrations/5.38.0/002/ddb/index.d.ts +22 -0
- package/migrations/5.38.0/002/ddb/index.js +140 -0
- package/migrations/5.38.0/002/ddb/index.js.map +1 -0
- package/migrations/5.38.0/002/ddb-es/index.d.ts +32 -0
- package/migrations/5.38.0/002/ddb-es/index.js +250 -0
- package/migrations/5.38.0/002/ddb-es/index.js.map +1 -0
- package/migrations/5.38.0/002/entities/createFormEntity.d.ts +42 -0
- package/migrations/5.38.0/002/entities/createFormEntity.js +92 -0
- package/migrations/5.38.0/002/entities/createFormEntity.js.map +1 -0
- package/migrations/5.38.0/002/entities/createFormSubmissionDdbEsEntity.d.ts +48 -0
- package/migrations/5.38.0/002/entities/createFormSubmissionDdbEsEntity.js +29 -0
- package/migrations/5.38.0/002/entities/createFormSubmissionDdbEsEntity.js.map +1 -0
- package/migrations/5.38.0/002/entities/createFormSubmissionEntity.d.ts +42 -0
- package/migrations/5.38.0/002/entities/createFormSubmissionEntity.js +56 -0
- package/migrations/5.38.0/002/entities/createFormSubmissionEntity.js.map +1 -0
- package/migrations/5.38.0/002/types.d.ts +23 -0
- package/migrations/5.38.0/002/types.js +7 -0
- package/migrations/5.38.0/002/types.js.map +1 -0
- package/migrations/5.38.0/003/ddb/compressContent.d.ts +4 -0
- package/migrations/5.38.0/003/ddb/compressContent.js +17 -0
- package/migrations/5.38.0/003/ddb/compressContent.js.map +1 -0
- package/migrations/5.38.0/003/ddb/index.d.ts +12 -0
- package/migrations/5.38.0/003/ddb/index.js +143 -0
- package/migrations/5.38.0/003/ddb/index.js.map +1 -0
- package/migrations/5.38.0/003/entities/createPageBlockEntity.d.ts +83 -0
- package/migrations/5.38.0/003/entities/createPageBlockEntity.js +68 -0
- package/migrations/5.38.0/003/entities/createPageBlockEntity.js.map +1 -0
- package/migrations/5.38.0/003/types.d.ts +8 -0
- package/migrations/5.38.0/003/types.js +7 -0
- package/migrations/5.38.0/003/types.js.map +1 -0
- package/migrations/5.39.0/001/ddb/index.d.ts +20 -0
- package/migrations/5.39.0/001/ddb/index.js +136 -0
- package/migrations/5.39.0/001/ddb/index.js.map +1 -0
- package/migrations/5.39.0/001/ddb-es/index.d.ts +30 -0
- package/migrations/5.39.0/001/ddb-es/index.js +266 -0
- package/migrations/5.39.0/001/ddb-es/index.js.map +1 -0
- package/migrations/5.39.0/001/entities/createEntryEntity.d.ts +89 -0
- package/migrations/5.39.0/001/entities/createEntryEntity.js +164 -0
- package/migrations/5.39.0/001/entities/createEntryEntity.js.map +1 -0
- package/migrations/5.39.0/001/types.d.ts +136 -0
- package/migrations/5.39.0/001/types.js +7 -0
- package/migrations/5.39.0/001/types.js.map +1 -0
- package/migrations/5.39.0/001/utils/assignNewMetaFields.d.ts +11 -0
- package/migrations/5.39.0/001/utils/assignNewMetaFields.js +44 -0
- package/migrations/5.39.0/001/utils/assignNewMetaFields.js.map +1 -0
- package/migrations/5.39.0/001/utils/ensureAllNonNullableValues.d.ts +8 -0
- package/migrations/5.39.0/001/utils/ensureAllNonNullableValues.js +38 -0
- package/migrations/5.39.0/001/utils/ensureAllNonNullableValues.js.map +1 -0
- package/migrations/5.39.0/001/utils/fixTypeFieldValue.d.ts +3 -0
- package/migrations/5.39.0/001/utils/fixTypeFieldValue.js +33 -0
- package/migrations/5.39.0/001/utils/fixTypeFieldValue.js.map +1 -0
- package/migrations/5.39.0/001/utils/getCompressedData.d.ts +4 -0
- package/migrations/5.39.0/001/utils/getCompressedData.js +19 -0
- package/migrations/5.39.0/001/utils/getCompressedData.js.map +1 -0
- package/migrations/5.39.0/001/utils/getDecompressedData.d.ts +1 -0
- package/migrations/5.39.0/001/utils/getDecompressedData.js +31 -0
- package/migrations/5.39.0/001/utils/getDecompressedData.js.map +1 -0
- package/migrations/5.39.0/001/utils/getFallbackIdentity.d.ts +8 -0
- package/migrations/5.39.0/001/utils/getFallbackIdentity.js +44 -0
- package/migrations/5.39.0/001/utils/getFallbackIdentity.js.map +1 -0
- package/migrations/5.39.0/001/utils/getFirstLastPublishedOn.d.ts +11 -0
- package/migrations/5.39.0/001/utils/getFirstLastPublishedOn.js +40 -0
- package/migrations/5.39.0/001/utils/getFirstLastPublishedOn.js.map +1 -0
- package/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues.d.ts +2 -0
- package/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues.js +22 -0
- package/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues.js.map +1 -0
- package/migrations/5.39.0/001/utils/getOldestRevisionCreatedOn.d.ts +11 -0
- package/migrations/5.39.0/001/utils/getOldestRevisionCreatedOn.js +33 -0
- package/migrations/5.39.0/001/utils/getOldestRevisionCreatedOn.js.map +1 -0
- package/migrations/5.39.0/001/utils/hasAllNonNullableValues.d.ts +2 -0
- package/migrations/5.39.0/001/utils/hasAllNonNullableValues.js +21 -0
- package/migrations/5.39.0/001/utils/hasAllNonNullableValues.js.map +1 -0
- package/migrations/5.39.0/001/utils/hasValidTypeFieldValue.d.ts +4 -0
- package/migrations/5.39.0/001/utils/hasValidTypeFieldValue.js +21 -0
- package/migrations/5.39.0/001/utils/hasValidTypeFieldValue.js.map +1 -0
- package/migrations/5.39.0/001/utils/isMigratedEntry.d.ts +2 -0
- package/migrations/5.39.0/001/utils/isMigratedEntry.js +12 -0
- package/migrations/5.39.0/001/utils/isMigratedEntry.js.map +1 -0
- package/migrations/5.39.0/002/ddb/FileManager_5_39_0_002.d.ts +14 -0
- package/migrations/5.39.0/002/ddb/FileManager_5_39_0_002.js +133 -0
- package/migrations/5.39.0/002/ddb/FileManager_5_39_0_002.js.map +1 -0
- package/migrations/5.39.0/002/ddb/index.d.ts +1 -0
- package/migrations/5.39.0/002/ddb/index.js +18 -0
- package/migrations/5.39.0/002/ddb/index.js.map +1 -0
- package/migrations/5.39.0/002/ddb-es/FileManager_5_39_0_002.d.ts +15 -0
- package/migrations/5.39.0/002/ddb-es/FileManager_5_39_0_002.js +190 -0
- package/migrations/5.39.0/002/ddb-es/FileManager_5_39_0_002.js.map +1 -0
- package/migrations/5.39.0/002/ddb-es/index.d.ts +1 -0
- package/migrations/5.39.0/002/ddb-es/index.js +18 -0
- package/migrations/5.39.0/002/ddb-es/index.js.map +1 -0
- package/migrations/5.39.0/002/utils/FileMetadata.d.ts +12 -0
- package/migrations/5.39.0/002/utils/FileMetadata.js +55 -0
- package/migrations/5.39.0/002/utils/FileMetadata.js.map +1 -0
- package/migrations/5.39.0/002/utils/createFileEntity.d.ts +53 -0
- package/migrations/5.39.0/002/utils/createFileEntity.js +50 -0
- package/migrations/5.39.0/002/utils/createFileEntity.js.map +1 -0
- package/migrations/5.39.0/002/utils/createLocaleEntity.d.ts +42 -0
- package/migrations/5.39.0/002/utils/createLocaleEntity.js +32 -0
- package/migrations/5.39.0/002/utils/createLocaleEntity.js.map +1 -0
- package/migrations/5.39.0/002/utils/createTenantEntity.d.ts +48 -0
- package/migrations/5.39.0/002/utils/createTenantEntity.js +13 -0
- package/migrations/5.39.0/002/utils/createTenantEntity.js.map +1 -0
- package/migrations/5.39.2/001/ddb-es/index.d.ts +30 -0
- package/migrations/5.39.2/001/ddb-es/index.js +276 -0
- package/migrations/5.39.2/001/ddb-es/index.js.map +1 -0
- package/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.d.ts +21 -0
- package/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.js +167 -0
- package/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.js.map +1 -0
- package/migrations/5.39.6/001/ddb-es/SegmentProcessor.d.ts +23 -0
- package/migrations/5.39.6/001/ddb-es/SegmentProcessor.js +31 -0
- package/migrations/5.39.6/001/ddb-es/SegmentProcessor.js.map +1 -0
- package/migrations/5.39.6/001/ddb-es/bin.d.ts +2 -0
- package/migrations/5.39.6/001/ddb-es/bin.js +83 -0
- package/migrations/5.39.6/001/ddb-es/bin.js.map +1 -0
- package/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.d.ts +11 -0
- package/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.js +83 -0
- package/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.js.map +1 -0
- package/migrations/5.39.6/001/ddb-es/index.d.ts +30 -0
- package/migrations/5.39.6/001/ddb-es/index.js +329 -0
- package/migrations/5.39.6/001/ddb-es/index.js.map +1 -0
- package/migrations/5.39.6/001/ddb-es/utils.d.ts +28 -0
- package/migrations/5.39.6/001/ddb-es/utils.js +62 -0
- package/migrations/5.39.6/001/ddb-es/utils.js.map +1 -0
- package/migrations/5.39.6/001/ddb-es/worker.d.ts +1 -0
- package/migrations/5.39.6/001/ddb-es/worker.js +352 -0
- package/migrations/5.39.6/001/ddb-es/worker.js.map +1 -0
- package/package.json +45 -0
- package/utils/createEntity.d.ts +89 -0
- package/utils/createEntity.js +67 -0
- package/utils/createEntity.js.map +1 -0
- package/utils/createLocaleEntity.d.ts +42 -0
- package/utils/createLocaleEntity.js +32 -0
- package/utils/createLocaleEntity.js.map +1 -0
- package/utils/createTenantEntity.d.ts +48 -0
- package/utils/createTenantEntity.js +13 -0
- package/utils/createTenantEntity.js.map +1 -0
- package/utils/dynamoDb.d.ts +3 -0
- package/utils/dynamoDb.js +62 -0
- package/utils/dynamoDb.js.map +1 -0
- package/utils/elasticsearch/disableEsIndexing.d.ts +9 -0
- package/utils/elasticsearch/disableEsIndexing.js +34 -0
- package/utils/elasticsearch/disableEsIndexing.js.map +1 -0
- package/utils/elasticsearch/esCreateIndex.d.ts +9 -0
- package/utils/elasticsearch/esCreateIndex.js +62 -0
- package/utils/elasticsearch/esCreateIndex.js.map +1 -0
- package/utils/elasticsearch/esFindOne.d.ts +8 -0
- package/utils/elasticsearch/esFindOne.js +27 -0
- package/utils/elasticsearch/esFindOne.js.map +1 -0
- package/utils/elasticsearch/esGetIndexExist.d.ts +9 -0
- package/utils/elasticsearch/esGetIndexExist.js +37 -0
- package/utils/elasticsearch/esGetIndexExist.js.map +1 -0
- package/utils/elasticsearch/esGetIndexName.d.ts +7 -0
- package/utils/elasticsearch/esGetIndexName.js +40 -0
- package/utils/elasticsearch/esGetIndexName.js.map +1 -0
- package/utils/elasticsearch/esGetIndexSettings.d.ts +7 -0
- package/utils/elasticsearch/esGetIndexSettings.js +32 -0
- package/utils/elasticsearch/esGetIndexSettings.js.map +1 -0
- package/utils/elasticsearch/esListIndexes.d.ts +6 -0
- package/utils/elasticsearch/esListIndexes.js +23 -0
- package/utils/elasticsearch/esListIndexes.js.map +1 -0
- package/utils/elasticsearch/esPutIndexSettings.d.ts +7 -0
- package/utils/elasticsearch/esPutIndexSettings.js +30 -0
- package/utils/elasticsearch/esPutIndexSettings.js.map +1 -0
- package/utils/elasticsearch/esQueryAll.d.ts +8 -0
- package/utils/elasticsearch/esQueryAll.js +26 -0
- package/utils/elasticsearch/esQueryAll.js.map +1 -0
- package/utils/elasticsearch/esQueryAllWithCallback.d.ts +10 -0
- package/utils/elasticsearch/esQueryAllWithCallback.js +45 -0
- package/utils/elasticsearch/esQueryAllWithCallback.js.map +1 -0
- package/utils/elasticsearch/fetchOriginalEsSettings.d.ts +13 -0
- package/utils/elasticsearch/fetchOriginalEsSettings.js +36 -0
- package/utils/elasticsearch/fetchOriginalEsSettings.js.map +1 -0
- package/utils/elasticsearch/index.d.ts +12 -0
- package/utils/elasticsearch/index.js +139 -0
- package/utils/elasticsearch/index.js.map +1 -0
- package/utils/elasticsearch/plugins/base.d.ts +3 -0
- package/utils/elasticsearch/plugins/base.js +13 -0
- package/utils/elasticsearch/plugins/base.js.map +1 -0
- package/utils/elasticsearch/plugins/index.d.ts +6 -0
- package/utils/elasticsearch/plugins/index.js +14 -0
- package/utils/elasticsearch/plugins/index.js.map +1 -0
- package/utils/elasticsearch/plugins/japanese.d.ts +4 -0
- package/utils/elasticsearch/plugins/japanese.js +14 -0
- package/utils/elasticsearch/plugins/japanese.js.map +1 -0
- package/utils/elasticsearch/restoreOriginalEsSettings.d.ts +15 -0
- package/utils/elasticsearch/restoreOriginalEsSettings.js +44 -0
- package/utils/elasticsearch/restoreOriginalEsSettings.js.map +1 -0
- package/utils/forEachTenantLocale.d.ts +13 -0
- package/utils/forEachTenantLocale.js +55 -0
- package/utils/forEachTenantLocale.js.map +1 -0
- package/utils/index.d.ts +6 -0
- package/utils/index.js +73 -0
- package/utils/index.js.map +1 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
export declare const createLocaleEntity: (table: Table<string, string, string>) => import("dynamodb-toolbox/dist/cjs/classes/Entity/Entity").default<string, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, Table<string, string, string>, true, true, boolean, string, string, string, boolean, {
|
|
3
|
+
PK: {
|
|
4
|
+
partitionKey: true;
|
|
5
|
+
};
|
|
6
|
+
SK: {
|
|
7
|
+
sortKey: true;
|
|
8
|
+
};
|
|
9
|
+
GSI1_PK: {
|
|
10
|
+
type: "string";
|
|
11
|
+
};
|
|
12
|
+
GSI1_SK: {
|
|
13
|
+
type: "string";
|
|
14
|
+
};
|
|
15
|
+
TYPE: {
|
|
16
|
+
type: "string";
|
|
17
|
+
};
|
|
18
|
+
}, {
|
|
19
|
+
PK: {
|
|
20
|
+
partitionKey: true;
|
|
21
|
+
};
|
|
22
|
+
SK: {
|
|
23
|
+
sortKey: true;
|
|
24
|
+
};
|
|
25
|
+
GSI1_PK: {
|
|
26
|
+
type: "string";
|
|
27
|
+
};
|
|
28
|
+
GSI1_SK: {
|
|
29
|
+
type: "string";
|
|
30
|
+
};
|
|
31
|
+
TYPE: {
|
|
32
|
+
type: "string";
|
|
33
|
+
};
|
|
34
|
+
}, import("dynamodb-toolbox/dist/cjs/classes/Entity").ParsedAttributes<import("ts-toolbelt/out/Any/Key").Key>, any, {
|
|
35
|
+
[x: string]: any;
|
|
36
|
+
[x: number]: any;
|
|
37
|
+
[x: symbol]: any;
|
|
38
|
+
}, {
|
|
39
|
+
[x: string]: any;
|
|
40
|
+
[x: number]: any;
|
|
41
|
+
[x: symbol]: any;
|
|
42
|
+
}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createLocaleEntity = void 0;
|
|
7
|
+
var _utils = require("../../../utils");
|
|
8
|
+
const createLocaleEntity = table => {
|
|
9
|
+
return (0, _utils.createLegacyEntity)(table, "I18NLocale", {
|
|
10
|
+
createdOn: {
|
|
11
|
+
type: "string"
|
|
12
|
+
},
|
|
13
|
+
createdBy: {
|
|
14
|
+
type: "map"
|
|
15
|
+
},
|
|
16
|
+
code: {
|
|
17
|
+
type: "string"
|
|
18
|
+
},
|
|
19
|
+
default: {
|
|
20
|
+
type: "boolean"
|
|
21
|
+
},
|
|
22
|
+
webinyVersion: {
|
|
23
|
+
type: "string"
|
|
24
|
+
},
|
|
25
|
+
tenant: {
|
|
26
|
+
type: "string"
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
exports.createLocaleEntity = createLocaleEntity;
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=createLocaleEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_utils","require","createLocaleEntity","table","createLegacyEntity","createdOn","type","createdBy","code","default","webinyVersion","tenant","exports"],"sources":["createLocaleEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { createLegacyEntity } from \"~/utils\";\n\nexport const createLocaleEntity = (table: Table<string, string, string>) => {\n return createLegacyEntity(table, \"I18NLocale\", {\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n code: {\n type: \"string\"\n },\n default: {\n type: \"boolean\"\n },\n webinyVersion: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,kBAAkB,GAAIC,KAAoC,IAAK;EACxE,OAAO,IAAAC,yBAAkB,EAACD,KAAK,EAAE,YAAY,EAAE;IAC3CE,SAAS,EAAE;MACPC,IAAI,EAAE;IACV,CAAC;IACDC,SAAS,EAAE;MACPD,IAAI,EAAE;IACV,CAAC;IACDE,IAAI,EAAE;MACFF,IAAI,EAAE;IACV,CAAC;IACDG,OAAO,EAAE;MACLH,IAAI,EAAE;IACV,CAAC;IACDI,aAAa,EAAE;MACXJ,IAAI,EAAE;IACV,CAAC;IACDK,MAAM,EAAE;MACJL,IAAI,EAAE;IACV;EACJ,CAAC,CAAC;AACN,CAAC;AAACM,OAAA,CAAAV,kBAAA,GAAAA,kBAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
export declare const createModelEntity: (table: Table<string, string, string>) => import("dynamodb-toolbox/dist/cjs/classes/Entity/Entity").default<string, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, Table<string, string, string>, true, true, boolean, string, string, string, boolean, {
|
|
3
|
+
PK: {
|
|
4
|
+
partitionKey: true;
|
|
5
|
+
};
|
|
6
|
+
SK: {
|
|
7
|
+
sortKey: true;
|
|
8
|
+
};
|
|
9
|
+
GSI1_PK: {
|
|
10
|
+
type: "string";
|
|
11
|
+
};
|
|
12
|
+
GSI1_SK: {
|
|
13
|
+
type: "string";
|
|
14
|
+
};
|
|
15
|
+
TYPE: {
|
|
16
|
+
type: "string";
|
|
17
|
+
};
|
|
18
|
+
}, {
|
|
19
|
+
PK: {
|
|
20
|
+
partitionKey: true;
|
|
21
|
+
};
|
|
22
|
+
SK: {
|
|
23
|
+
sortKey: true;
|
|
24
|
+
};
|
|
25
|
+
GSI1_PK: {
|
|
26
|
+
type: "string";
|
|
27
|
+
};
|
|
28
|
+
GSI1_SK: {
|
|
29
|
+
type: "string";
|
|
30
|
+
};
|
|
31
|
+
TYPE: {
|
|
32
|
+
type: "string";
|
|
33
|
+
};
|
|
34
|
+
}, import("dynamodb-toolbox/dist/cjs/classes/Entity").ParsedAttributes<import("ts-toolbelt/out/Any/Key").Key>, any, {
|
|
35
|
+
[x: string]: any;
|
|
36
|
+
[x: number]: any;
|
|
37
|
+
[x: symbol]: any;
|
|
38
|
+
}, {
|
|
39
|
+
[x: string]: any;
|
|
40
|
+
[x: number]: any;
|
|
41
|
+
[x: symbol]: any;
|
|
42
|
+
}>;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createModelEntity = void 0;
|
|
7
|
+
var _utils = require("../../../utils");
|
|
8
|
+
const attributes = {
|
|
9
|
+
PK: {
|
|
10
|
+
partitionKey: true
|
|
11
|
+
},
|
|
12
|
+
SK: {
|
|
13
|
+
sortKey: true
|
|
14
|
+
},
|
|
15
|
+
TYPE: {
|
|
16
|
+
type: "string",
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
webinyVersion: {
|
|
20
|
+
type: "string",
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
name: {
|
|
24
|
+
type: "string",
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
modelId: {
|
|
28
|
+
type: "string",
|
|
29
|
+
required: true
|
|
30
|
+
},
|
|
31
|
+
singularApiName: {
|
|
32
|
+
type: "string",
|
|
33
|
+
required: true
|
|
34
|
+
},
|
|
35
|
+
pluralApiName: {
|
|
36
|
+
type: "string",
|
|
37
|
+
required: true
|
|
38
|
+
},
|
|
39
|
+
locale: {
|
|
40
|
+
type: "string",
|
|
41
|
+
required: true
|
|
42
|
+
},
|
|
43
|
+
group: {
|
|
44
|
+
type: "map",
|
|
45
|
+
required: true
|
|
46
|
+
},
|
|
47
|
+
icon: {
|
|
48
|
+
type: "string"
|
|
49
|
+
},
|
|
50
|
+
description: {
|
|
51
|
+
type: "string"
|
|
52
|
+
},
|
|
53
|
+
createdOn: {
|
|
54
|
+
type: "string",
|
|
55
|
+
required: true
|
|
56
|
+
},
|
|
57
|
+
savedOn: {
|
|
58
|
+
type: "string",
|
|
59
|
+
required: true
|
|
60
|
+
},
|
|
61
|
+
createdBy: {
|
|
62
|
+
type: "map",
|
|
63
|
+
required: true
|
|
64
|
+
},
|
|
65
|
+
fields: {
|
|
66
|
+
type: "list",
|
|
67
|
+
required: true
|
|
68
|
+
},
|
|
69
|
+
layout: {
|
|
70
|
+
type: "list",
|
|
71
|
+
required: true
|
|
72
|
+
},
|
|
73
|
+
tags: {
|
|
74
|
+
type: "list",
|
|
75
|
+
required: false,
|
|
76
|
+
default: []
|
|
77
|
+
},
|
|
78
|
+
lockedFields: {
|
|
79
|
+
type: "list",
|
|
80
|
+
required: true
|
|
81
|
+
},
|
|
82
|
+
titleFieldId: {
|
|
83
|
+
type: "string"
|
|
84
|
+
},
|
|
85
|
+
descriptionFieldId: {
|
|
86
|
+
type: "string"
|
|
87
|
+
},
|
|
88
|
+
imageFieldId: {
|
|
89
|
+
type: "string"
|
|
90
|
+
},
|
|
91
|
+
tenant: {
|
|
92
|
+
type: "string",
|
|
93
|
+
required: true
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
const createModelEntity = table => {
|
|
97
|
+
return (0, _utils.createLegacyEntity)(table, "CmsModels", attributes);
|
|
98
|
+
};
|
|
99
|
+
exports.createModelEntity = createModelEntity;
|
|
100
|
+
|
|
101
|
+
//# sourceMappingURL=createModelEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_utils","require","attributes","PK","partitionKey","SK","sortKey","TYPE","type","required","webinyVersion","name","modelId","singularApiName","pluralApiName","locale","group","icon","description","createdOn","savedOn","createdBy","fields","layout","tags","default","lockedFields","titleFieldId","descriptionFieldId","imageFieldId","tenant","createModelEntity","table","createLegacyEntity","exports"],"sources":["createModelEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { createLegacyEntity } from \"~/utils\";\n\nconst attributes: Parameters<typeof createLegacyEntity>[2] = {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\",\n required: true\n },\n webinyVersion: {\n type: \"string\",\n required: true\n },\n name: {\n type: \"string\",\n required: true\n },\n modelId: {\n type: \"string\",\n required: true\n },\n singularApiName: {\n type: \"string\",\n required: true\n },\n pluralApiName: {\n type: \"string\",\n required: true\n },\n locale: {\n type: \"string\",\n required: true\n },\n group: {\n type: \"map\",\n required: true\n },\n icon: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\",\n required: true\n },\n savedOn: {\n type: \"string\",\n required: true\n },\n createdBy: {\n type: \"map\",\n required: true\n },\n fields: {\n type: \"list\",\n required: true\n },\n layout: {\n type: \"list\",\n required: true\n },\n tags: {\n type: \"list\",\n required: false,\n default: []\n },\n lockedFields: {\n type: \"list\",\n required: true\n },\n titleFieldId: {\n type: \"string\"\n },\n descriptionFieldId: {\n type: \"string\"\n },\n imageFieldId: {\n type: \"string\"\n },\n tenant: {\n type: \"string\",\n required: true\n }\n};\n\nexport const createModelEntity = (table: Table<string, string, string>) => {\n return createLegacyEntity(table, \"CmsModels\", attributes);\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,MAAMC,UAAoD,GAAG;EACzDC,EAAE,EAAE;IACAC,YAAY,EAAE;EAClB,CAAC;EACDC,EAAE,EAAE;IACAC,OAAO,EAAE;EACb,CAAC;EACDC,IAAI,EAAE;IACFC,IAA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V,CAAC;EACDoB,kBAAkB,EAAE;IAChBpB,IAAI,EAAE;EACV,CAAC;EACDqB,YAAY,EAAE;IACVrB,IAAI,EAAE;EACV,CAAC;EACDsB,MAAM,EAAE;IACJtB,IAAI,EAAE,QAAQ;IACdC,QAAQ,EAAE;EACd;AACJ,CAAC;AAEM,MAAMsB,iBAAiB,GAAIC,KAAoC,IAAK;EACvE,OAAO,IAAAC,yBAAkB,EAACD,KAAK,EAAE,WAAW,EAAE9B,UAAU,CAAC;AAC7D,CAAC;AAACgC,OAAA,CAAAH,iBAAA,GAAAA,iBAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
export declare const createTenantEntity: (table: Table<string, string, string>) => import("dynamodb-toolbox/dist/cjs/classes/Entity/Entity").default<string, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, Table<string, string, string>, true, true, boolean, string, string, string, boolean, {
|
|
3
|
+
PK: {
|
|
4
|
+
partitionKey: true;
|
|
5
|
+
};
|
|
6
|
+
SK: {
|
|
7
|
+
sortKey: true;
|
|
8
|
+
};
|
|
9
|
+
GSI1_PK: {
|
|
10
|
+
type: "string";
|
|
11
|
+
};
|
|
12
|
+
GSI1_SK: {
|
|
13
|
+
type: "string";
|
|
14
|
+
};
|
|
15
|
+
TYPE: {
|
|
16
|
+
type: "string";
|
|
17
|
+
};
|
|
18
|
+
data: {
|
|
19
|
+
type: "map";
|
|
20
|
+
};
|
|
21
|
+
}, {
|
|
22
|
+
PK: {
|
|
23
|
+
partitionKey: true;
|
|
24
|
+
};
|
|
25
|
+
SK: {
|
|
26
|
+
sortKey: true;
|
|
27
|
+
};
|
|
28
|
+
GSI1_PK: {
|
|
29
|
+
type: "string";
|
|
30
|
+
};
|
|
31
|
+
GSI1_SK: {
|
|
32
|
+
type: "string";
|
|
33
|
+
};
|
|
34
|
+
TYPE: {
|
|
35
|
+
type: "string";
|
|
36
|
+
};
|
|
37
|
+
data: {
|
|
38
|
+
type: "map";
|
|
39
|
+
};
|
|
40
|
+
}, import("dynamodb-toolbox/dist/cjs/classes/Entity").ParsedAttributes<import("ts-toolbelt/out/Any/Key").Key>, any, {
|
|
41
|
+
[x: string]: any;
|
|
42
|
+
[x: number]: any;
|
|
43
|
+
[x: symbol]: any;
|
|
44
|
+
}, {
|
|
45
|
+
[x: string]: any;
|
|
46
|
+
[x: number]: any;
|
|
47
|
+
[x: symbol]: any;
|
|
48
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createTenantEntity = void 0;
|
|
7
|
+
var _utils = require("../../../utils");
|
|
8
|
+
const createTenantEntity = table => {
|
|
9
|
+
return (0, _utils.createStandardEntity)(table, "TenancyTenant");
|
|
10
|
+
};
|
|
11
|
+
exports.createTenantEntity = createTenantEntity;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=createTenantEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_utils","require","createTenantEntity","table","createStandardEntity","exports"],"sources":["createTenantEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { createStandardEntity } from \"~/utils\";\n\nexport const createTenantEntity = (table: Table<string, string, string>) => {\n return createStandardEntity(table, \"TenancyTenant\");\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,kBAAkB,GAAIC,KAAoC,IAAK;EACxE,OAAO,IAAAC,2BAAoB,EAACD,KAAK,EAAE,eAAe,CAAC;AACvD,CAAC;AAACE,OAAA,CAAAH,kBAAA,GAAAA,kBAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
import { DataMigrationContext } from "@webiny/data-migration";
|
|
3
|
+
export declare class CmsModels_5_35_0_005 {
|
|
4
|
+
private readonly modelEntity;
|
|
5
|
+
private readonly tenantEntity;
|
|
6
|
+
private readonly localeEntity;
|
|
7
|
+
constructor(table: Table<string, string, string>);
|
|
8
|
+
getId(): string;
|
|
9
|
+
getDescription(): string;
|
|
10
|
+
shouldExecute({ logger }: DataMigrationContext): Promise<boolean>;
|
|
11
|
+
execute({ logger }: DataMigrationContext): Promise<void>;
|
|
12
|
+
private listTenants;
|
|
13
|
+
private listLocales;
|
|
14
|
+
private listModels;
|
|
15
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.CmsModels_5_35_0_005 = void 0;
|
|
8
|
+
var _ioc = require("@webiny/ioc");
|
|
9
|
+
var _dataMigration = require("@webiny/data-migration");
|
|
10
|
+
var _utils = require("../../../utils");
|
|
11
|
+
var _createModelEntity = require("./createModelEntity");
|
|
12
|
+
var _createTenantEntity = require("./createTenantEntity");
|
|
13
|
+
var _createLocaleEntity = require("./createLocaleEntity");
|
|
14
|
+
var _pluralize = _interopRequireDefault(require("pluralize"));
|
|
15
|
+
var _upperFirst = _interopRequireDefault(require("lodash/upperFirst"));
|
|
16
|
+
var _camelCase = _interopRequireDefault(require("lodash/camelCase"));
|
|
17
|
+
const createSingularApiName = model => {
|
|
18
|
+
return (0, _upperFirst.default)((0, _camelCase.default)(model.modelId));
|
|
19
|
+
};
|
|
20
|
+
const createPluralApiName = model => {
|
|
21
|
+
return (0, _pluralize.default)(createSingularApiName(model));
|
|
22
|
+
};
|
|
23
|
+
class CmsModels_5_35_0_005 {
|
|
24
|
+
constructor(table) {
|
|
25
|
+
this.modelEntity = (0, _createModelEntity.createModelEntity)(table);
|
|
26
|
+
this.tenantEntity = (0, _createTenantEntity.createTenantEntity)(table);
|
|
27
|
+
this.localeEntity = (0, _createLocaleEntity.createLocaleEntity)(table);
|
|
28
|
+
}
|
|
29
|
+
getId() {
|
|
30
|
+
return "5.35.0-005";
|
|
31
|
+
}
|
|
32
|
+
getDescription() {
|
|
33
|
+
return "Add singular and plural API names to the CMS Model entity";
|
|
34
|
+
}
|
|
35
|
+
async shouldExecute({
|
|
36
|
+
logger
|
|
37
|
+
}) {
|
|
38
|
+
const tenants = await this.listTenants();
|
|
39
|
+
if (tenants.length === 0) {
|
|
40
|
+
logger.info(`No tenants found in the system; skipping migration.`);
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
for (const tenant of tenants) {
|
|
44
|
+
const locales = await this.listLocales({
|
|
45
|
+
tenant
|
|
46
|
+
});
|
|
47
|
+
if (locales.length === 0) {
|
|
48
|
+
logger.info(`No locales found in tenant "${tenant.data.id}".`);
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
for (const locale of locales) {
|
|
52
|
+
const models = (await this.listModels({
|
|
53
|
+
tenant,
|
|
54
|
+
locale
|
|
55
|
+
})).filter(model => {
|
|
56
|
+
return !model.singularApiName || !model.pluralApiName;
|
|
57
|
+
});
|
|
58
|
+
if (models.length === 0) {
|
|
59
|
+
logger.info(`No models, to be updated, found in tenant "${tenant.data.id}" and locale "${locale.code}".`);
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
async execute({
|
|
68
|
+
logger
|
|
69
|
+
}) {
|
|
70
|
+
const models = [];
|
|
71
|
+
const tenants = await this.listTenants();
|
|
72
|
+
for (const tenant of tenants) {
|
|
73
|
+
const locales = await this.listLocales({
|
|
74
|
+
tenant
|
|
75
|
+
});
|
|
76
|
+
for (const locale of locales) {
|
|
77
|
+
const items = (await this.listModels({
|
|
78
|
+
tenant,
|
|
79
|
+
locale
|
|
80
|
+
})).filter(model => {
|
|
81
|
+
return !model.singularApiName || !model.pluralApiName;
|
|
82
|
+
});
|
|
83
|
+
models.push(...items);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (models.length === 0) {
|
|
87
|
+
logger.info(`No models to be updated; skipping migration.`);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const items = models.map(model => {
|
|
91
|
+
return this.modelEntity.putBatch({
|
|
92
|
+
...model,
|
|
93
|
+
/**
|
|
94
|
+
* Add singular and plural API names.
|
|
95
|
+
*/
|
|
96
|
+
singularApiName: createSingularApiName(model),
|
|
97
|
+
pluralApiName: createPluralApiName(model)
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
logger.info(`Updating total of ${items.length} models.`);
|
|
101
|
+
await (0, _utils.batchWriteAll)({
|
|
102
|
+
table: this.modelEntity.table,
|
|
103
|
+
items
|
|
104
|
+
});
|
|
105
|
+
logger.info("Updated all the models.");
|
|
106
|
+
}
|
|
107
|
+
async listTenants() {
|
|
108
|
+
return await (0, _utils.queryAll)({
|
|
109
|
+
entity: this.tenantEntity,
|
|
110
|
+
partitionKey: "TENANTS",
|
|
111
|
+
options: {
|
|
112
|
+
index: "GSI1",
|
|
113
|
+
gte: " "
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
async listLocales({
|
|
118
|
+
tenant
|
|
119
|
+
}) {
|
|
120
|
+
return await (0, _utils.queryAll)({
|
|
121
|
+
entity: this.localeEntity,
|
|
122
|
+
partitionKey: `T#${tenant.data.id}#I18N#L`,
|
|
123
|
+
options: {
|
|
124
|
+
gte: " "
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
async listModels({
|
|
129
|
+
tenant,
|
|
130
|
+
locale
|
|
131
|
+
}) {
|
|
132
|
+
return await (0, _utils.queryAll)({
|
|
133
|
+
entity: this.modelEntity,
|
|
134
|
+
partitionKey: `T#${tenant.data.id}#L#${locale.code}#CMS#CM`,
|
|
135
|
+
options: {
|
|
136
|
+
gte: " "
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
exports.CmsModels_5_35_0_005 = CmsModels_5_35_0_005;
|
|
142
|
+
(0, _ioc.makeInjectable)(CmsModels_5_35_0_005, [(0, _ioc.inject)(_dataMigration.PrimaryDynamoTableSymbol)]);
|
|
143
|
+
|
|
144
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_ioc","require","_dataMigration","_utils","_createModelEntity","_createTenantEntity","_createLocaleEntity","_pluralize","_interopRequireDefault","_upperFirst","_camelCase","createSingularApiName","model","upperFirst","camelCase","modelId","createPluralApiName","pluralize","CmsModels_5_35_0_005","constructor","table","modelEntity","createModelEntity","tenantEntity","createTenantEntity","localeEntity","createLocaleEntity","getId","getDescription","shouldExecute","logger","tenants","listTenants","length","info","tenant","locales","listLocales","data","id","locale","models","listModels","filter","singularApiName","pluralApiName","code","execute","items","push","map","putBatch","batchWriteAll","queryAll","entity","partitionKey","options","index","gte","exports","makeInjectable","inject","PrimaryDynamoTableSymbol"],"sources":["index.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { makeInjectable, inject } from \"@webiny/ioc\";\nimport { DataMigrationContext, PrimaryDynamoTableSymbol } from \"@webiny/data-migration\";\nimport { queryAll, batchWriteAll } from \"~/utils\";\nimport { createModelEntity } from \"./createModelEntity\";\nimport { createTenantEntity } from \"./createTenantEntity\";\nimport { createLocaleEntity } from \"./createLocaleEntity\";\nimport { Tenant, I18NLocale, CmsModel } from \"./types\";\nimport pluralize from \"pluralize\";\nimport upperFirst from \"lodash/upperFirst\";\nimport camelCase from \"lodash/camelCase\";\n\nconst createSingularApiName = (model: CmsModel) => {\n return upperFirst(camelCase(model.modelId));\n};\n\nconst createPluralApiName = (model: CmsModel) => {\n return pluralize(createSingularApiName(model));\n};\n\ninterface ListLocalesParams {\n tenant: Tenant;\n}\n\ninterface ListModelsParams {\n tenant: Tenant;\n locale: I18NLocale;\n}\n\nexport class CmsModels_5_35_0_005 {\n private readonly modelEntity: ReturnType<typeof createModelEntity>;\n private readonly tenantEntity: ReturnType<typeof createTenantEntity>;\n private readonly localeEntity: ReturnType<typeof createLocaleEntity>;\n\n public constructor(table: Table<string, string, string>) {\n this.modelEntity = createModelEntity(table);\n this.tenantEntity = createTenantEntity(table);\n this.localeEntity = createLocaleEntity(table);\n }\n\n public getId() {\n return \"5.35.0-005\";\n }\n\n public getDescription() {\n return \"Add singular and plural API names to the CMS Model entity\";\n }\n\n public async shouldExecute({ logger }: DataMigrationContext): Promise<boolean> {\n const tenants = await this.listTenants();\n if (tenants.length === 0) {\n logger.info(`No tenants found in the system; skipping migration.`);\n return false;\n }\n for (const tenant of tenants) {\n const locales = await this.listLocales({ tenant });\n if (locales.length === 0) {\n logger.info(`No locales found in tenant \"${tenant.data.id}\".`);\n continue;\n }\n for (const locale of locales) {\n const models = (await this.listModels({ tenant, locale })).filter(model => {\n return !model.singularApiName || !model.pluralApiName;\n });\n if (models.length === 0) {\n logger.info(\n `No models, to be updated, found in tenant \"${tenant.data.id}\" and locale \"${locale.code}\".`\n );\n continue;\n }\n return true;\n }\n }\n return false;\n }\n\n public async execute({ logger }: DataMigrationContext): Promise<void> {\n const models: CmsModel[] = [];\n const tenants = await this.listTenants();\n for (const tenant of tenants) {\n const locales = await this.listLocales({ tenant });\n for (const locale of locales) {\n const items = (await this.listModels({ tenant, locale })).filter(model => {\n return !model.singularApiName || !model.pluralApiName;\n });\n models.push(...items);\n }\n }\n if (models.length === 0) {\n logger.info(`No models to be updated; skipping migration.`);\n return;\n }\n\n const items = models.map(model => {\n return this.modelEntity.putBatch({\n ...model,\n /**\n * Add singular and plural API names.\n */\n singularApiName: createSingularApiName(model),\n pluralApiName: createPluralApiName(model)\n });\n });\n logger.info(`Updating total of ${items.length} models.`);\n\n await batchWriteAll({\n table: this.modelEntity.table,\n items\n });\n logger.info(\"Updated all the models.\");\n }\n\n private async listTenants(): Promise<Tenant[]> {\n return await queryAll<Tenant>({\n entity: this.tenantEntity,\n partitionKey: \"TENANTS\",\n options: {\n index: \"GSI1\",\n gte: \" \"\n }\n });\n }\n\n private async listLocales({ tenant }: ListLocalesParams): Promise<I18NLocale[]> {\n return await queryAll<I18NLocale>({\n entity: this.localeEntity,\n partitionKey: `T#${tenant.data.id}#I18N#L`,\n options: {\n gte: \" \"\n }\n });\n }\n\n private async listModels({ tenant, locale }: ListModelsParams): Promise<CmsModel[]> {\n return await queryAll<CmsModel>({\n entity: this.modelEntity,\n partitionKey: `T#${tenant.data.id}#L#${locale.code}#CMS#CM`,\n options: {\n gte: \" \"\n }\n });\n }\n}\n\nmakeInjectable(CmsModels_5_35_0_005, [inject(PrimaryDynamoTableSymbol)]);\n"],"mappings":";;;;;;;AACA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AAEA,IAAAM,UAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAD,sBAAA,CAAAP,OAAA;AACA,IAAAS,UAAA,GAAAF,sBAAA,CAAAP,OAAA;AAEA,MAAMU,qBAAqB,GAAIC,KAAe,IAAK;EAC/C,OAAO,IAAAC,mBAAU,EAAC,IAAAC,kBAAS,EAACF,KAAK,CAACG,OAAO,CAAC,CAAC;AAC/C,CAAC;AAED,MAAMC,mBAAmB,GAAIJ,KAAe,IAAK;EAC7C,OAAO,IAAAK,kBAAS,EAACN,qBAAqB,CAACC,KAAK,CAAC,CAAC;AAClD,CAAC;AAWM,MAAMM,oBAAoB,CAAC;EAKvBC,WAAWA,CAACC,KAAoC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|
+
TYPE: string;
|
|
11
|
+
_ct: string;
|
|
12
|
+
_et: string;
|
|
13
|
+
_md: string;
|
|
14
|
+
name: string;
|
|
15
|
+
modelId: string;
|
|
16
|
+
singularApiName?: string;
|
|
17
|
+
pluralApiName?: string;
|
|
18
|
+
tenant: string;
|
|
19
|
+
locale: string;
|
|
20
|
+
group: {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
24
|
+
icon?: string | null;
|
|
25
|
+
description: string;
|
|
26
|
+
createdOn?: string;
|
|
27
|
+
savedOn?: string;
|
|
28
|
+
createdBy: {
|
|
29
|
+
id: string;
|
|
30
|
+
type: string;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
33
|
+
fields: any[];
|
|
34
|
+
layout: string[][];
|
|
35
|
+
tags?: string[];
|
|
36
|
+
lockedFields: any[];
|
|
37
|
+
titleFieldId: string;
|
|
38
|
+
webinyVersion: string;
|
|
39
|
+
}
|
|
40
|
+
export interface I18NLocale {
|
|
41
|
+
code: string;
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export interface Tenant {\n data: {\n id: string;\n name: string;\n };\n}\n\nexport interface CmsModel {\n PK: string;\n SK: string;\n TYPE: string;\n _ct: string;\n _et: string;\n _md: string;\n name: string;\n modelId: string;\n singularApiName?: string;\n pluralApiName?: string;\n tenant: string;\n locale: string;\n group: {\n id: string;\n name: string;\n };\n icon?: string | null;\n description: string;\n createdOn?: string;\n savedOn?: string;\n createdBy: {\n id: string;\n type: string;\n displayName: string;\n };\n fields: any[];\n layout: string[][];\n tags?: string[];\n lockedFields: any[];\n titleFieldId: string;\n webinyVersion: string;\n}\n\nexport interface I18NLocale {\n code: string;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ROOT_FOLDER = exports.PB_PAGE_TYPE = exports.ACO_SEARCH_MODEL_ID = void 0;
|
|
7
|
+
const ROOT_FOLDER = "ROOT";
|
|
8
|
+
exports.ROOT_FOLDER = ROOT_FOLDER;
|
|
9
|
+
const PB_PAGE_TYPE = "PbPage";
|
|
10
|
+
exports.PB_PAGE_TYPE = PB_PAGE_TYPE;
|
|
11
|
+
const ACO_SEARCH_MODEL_ID = "acoSearchRecord";
|
|
12
|
+
exports.ACO_SEARCH_MODEL_ID = ACO_SEARCH_MODEL_ID;
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ROOT_FOLDER","exports","PB_PAGE_TYPE","ACO_SEARCH_MODEL_ID"],"sources":["constants.ts"],"sourcesContent":["export const ROOT_FOLDER = \"ROOT\";\nexport const PB_PAGE_TYPE = \"PbPage\";\nexport const ACO_SEARCH_MODEL_ID = \"acoSearchRecord\";\n"],"mappings":";;;;;;AAAO,MAAMA,WAAW,GAAG,MAAM;AAACC,OAAA,CAAAD,WAAA,GAAAA,WAAA;AAC3B,MAAME,YAAY,GAAG,QAAQ;AAACD,OAAA,CAAAC,YAAA,GAAAA,YAAA;AAC9B,MAAMC,mBAAmB,GAAG,iBAAiB;AAACF,OAAA,CAAAE,mBAAA,GAAAA,mBAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
import { DataMigration, DataMigrationContext } from "@webiny/data-migration";
|
|
3
|
+
export declare type PageDataMigrationCheckpoint = Record<string, string | boolean | undefined>;
|
|
4
|
+
export declare class AcoRecords_5_35_0_006_PageData implements DataMigration<PageDataMigrationCheckpoint> {
|
|
5
|
+
private readonly entryEntity;
|
|
6
|
+
private readonly localeEntity;
|
|
7
|
+
private readonly pageEntity;
|
|
8
|
+
private readonly tenantEntity;
|
|
9
|
+
constructor(table: Table<string, string, string>);
|
|
10
|
+
getId(): string;
|
|
11
|
+
getDescription(): string;
|
|
12
|
+
shouldExecute({ logger, forceExecute }: DataMigrationContext): Promise<boolean>;
|
|
13
|
+
execute({ logger, ...context }: DataMigrationContext): Promise<void>;
|
|
14
|
+
private listTenants;
|
|
15
|
+
private listLocales;
|
|
16
|
+
private createSearchRecordCommonFields;
|
|
17
|
+
}
|