@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,95 @@
|
|
|
1
|
+
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
export declare const createDdbFileEntity: (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
|
+
}>;
|
|
49
|
+
export declare const createDdbEsFileEntity: (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, {
|
|
50
|
+
PK: {
|
|
51
|
+
partitionKey: true;
|
|
52
|
+
};
|
|
53
|
+
SK: {
|
|
54
|
+
sortKey: true;
|
|
55
|
+
};
|
|
56
|
+
GSI1_PK: {
|
|
57
|
+
type: "string";
|
|
58
|
+
};
|
|
59
|
+
GSI1_SK: {
|
|
60
|
+
type: "string";
|
|
61
|
+
};
|
|
62
|
+
TYPE: {
|
|
63
|
+
type: "string";
|
|
64
|
+
};
|
|
65
|
+
data: {
|
|
66
|
+
type: "map";
|
|
67
|
+
};
|
|
68
|
+
}, {
|
|
69
|
+
PK: {
|
|
70
|
+
partitionKey: true;
|
|
71
|
+
};
|
|
72
|
+
SK: {
|
|
73
|
+
sortKey: true;
|
|
74
|
+
};
|
|
75
|
+
GSI1_PK: {
|
|
76
|
+
type: "string";
|
|
77
|
+
};
|
|
78
|
+
GSI1_SK: {
|
|
79
|
+
type: "string";
|
|
80
|
+
};
|
|
81
|
+
TYPE: {
|
|
82
|
+
type: "string";
|
|
83
|
+
};
|
|
84
|
+
data: {
|
|
85
|
+
type: "map";
|
|
86
|
+
};
|
|
87
|
+
}, import("dynamodb-toolbox/dist/cjs/classes/Entity").ParsedAttributes<import("ts-toolbelt/out/Any/Key").Key>, any, {
|
|
88
|
+
[x: string]: any;
|
|
89
|
+
[x: number]: any;
|
|
90
|
+
[x: symbol]: any;
|
|
91
|
+
}, {
|
|
92
|
+
[x: string]: any;
|
|
93
|
+
[x: number]: any;
|
|
94
|
+
[x: symbol]: any;
|
|
95
|
+
}>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createDdbFileEntity = exports.createDdbEsFileEntity = void 0;
|
|
7
|
+
var _utils = require("../../../../utils");
|
|
8
|
+
const ddbEsAttributes = {
|
|
9
|
+
PK: {
|
|
10
|
+
type: "string",
|
|
11
|
+
partitionKey: true
|
|
12
|
+
},
|
|
13
|
+
SK: {
|
|
14
|
+
type: "string",
|
|
15
|
+
sortKey: true
|
|
16
|
+
},
|
|
17
|
+
index: {
|
|
18
|
+
type: "string"
|
|
19
|
+
},
|
|
20
|
+
data: {
|
|
21
|
+
type: "map"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const createDdbFileEntity = table => {
|
|
25
|
+
return (0, _utils.createStandardEntity)(table, "FM.File");
|
|
26
|
+
};
|
|
27
|
+
exports.createDdbFileEntity = createDdbFileEntity;
|
|
28
|
+
const createDdbEsFileEntity = table => {
|
|
29
|
+
return (0, _utils.createStandardEntity)(table, "FilesElasticsearch", ddbEsAttributes);
|
|
30
|
+
};
|
|
31
|
+
exports.createDdbEsFileEntity = createDdbEsFileEntity;
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=createFileEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_utils","require","ddbEsAttributes","PK","type","partitionKey","SK","sortKey","index","data","createDdbFileEntity","table","createStandardEntity","exports","createDdbEsFileEntity"],"sources":["createFileEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { createStandardEntity } from \"~/utils\";\n\nconst ddbEsAttributes: Parameters<typeof createStandardEntity>[2] = {\n PK: {\n type: \"string\",\n partitionKey: true\n },\n SK: {\n type: \"string\",\n sortKey: true\n },\n index: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n }\n};\n\nexport const createDdbFileEntity = (table: Table<string, string, string>) => {\n return createStandardEntity(table, \"FM.File\");\n};\n\nexport const createDdbEsFileEntity = (table: Table<string, string, string>) => {\n return createStandardEntity(table, \"FilesElasticsearch\", ddbEsAttributes);\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,MAAMC,eAA2D,GAAG;EAChEC,EAAE,EAAE;IACAC,IAAI,EAAE,QAAQ;IACdC,YAAY,EAAE;EAClB,CAAC;EACDC,EAAE,EAAE;IACAF,IAAI,EAAE,QAAQ;IACdG,OAAO,EAAE;EACb,CAAC;EACDC,KAAK,EAAE;IACHJ,IAAI,EAAE;EACV,CAAC;EACDK,IAAI,EAAE;IACFL,IAAI,EAAE;EACV;AACJ,CAAC;AAEM,MAAMM,mBAAmB,GAAIC,KAAoC,IAAK;EACzE,OAAO,IAAAC,2BAAoB,EAACD,KAAK,EAAE,SAAS,CAAC;AACjD,CAAC;AAACE,OAAA,CAAAH,mBAAA,GAAAA,mBAAA;AAEK,MAAMI,qBAAqB,GAAIH,KAAoC,IAAK;EAC3E,OAAO,IAAAC,2BAAoB,EAACD,KAAK,EAAE,oBAAoB,EAAET,eAAe,CAAC;AAC7E,CAAC;AAACW,OAAA,CAAAC,qBAAA,GAAAA,qBAAA"}
|
|
@@ -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,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,48 @@
|
|
|
1
|
+
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
export declare const createTenantLinkEntity: (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,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createTenantLinkEntity = void 0;
|
|
7
|
+
var _utils = require("../../../../utils");
|
|
8
|
+
const createTenantLinkEntity = table => {
|
|
9
|
+
return (0, _utils.createStandardEntity)(table, "SecurityIdentity2Tenant", {
|
|
10
|
+
type: {
|
|
11
|
+
type: "string"
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
exports.createTenantLinkEntity = createTenantLinkEntity;
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=createTenantLinkEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_utils","require","createTenantLinkEntity","table","createStandardEntity","type","exports"],"sources":["createTenantLinkEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { createStandardEntity } from \"~/utils\";\n\nexport const createTenantLinkEntity = (table: Table<string, string, string>) => {\n return createStandardEntity(table, \"SecurityIdentity2Tenant\", { type: { type: \"string\" } });\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,sBAAsB,GAAIC,KAAoC,IAAK;EAC5E,OAAO,IAAAC,2BAAoB,EAACD,KAAK,EAAE,yBAAyB,EAAE;IAAEE,IAAI,EAAE;MAAEA,IAAI,EAAE;IAAS;EAAE,CAAC,CAAC;AAC/F,CAAC;AAACC,OAAA,CAAAJ,sBAAA,GAAAA,sBAAA"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export interface Tenant {
|
|
2
|
+
data: {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export interface I18NLocale {
|
|
8
|
+
code: string;
|
|
9
|
+
}
|
|
10
|
+
export interface Identity {
|
|
11
|
+
id: string;
|
|
12
|
+
displayName: string | null;
|
|
13
|
+
type: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CmsEntryValues {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
export declare type CmsEntryStatus = "published" | "unpublished" | "draft";
|
|
19
|
+
export interface CmsEntry<T = CmsEntryValues> {
|
|
20
|
+
webinyVersion: string;
|
|
21
|
+
tenant: string;
|
|
22
|
+
entryId: string;
|
|
23
|
+
id: string;
|
|
24
|
+
createdBy: Identity;
|
|
25
|
+
ownedBy: Identity;
|
|
26
|
+
modifiedBy?: Identity | null;
|
|
27
|
+
createdOn: string;
|
|
28
|
+
savedOn: string;
|
|
29
|
+
modelId: string;
|
|
30
|
+
locale: string;
|
|
31
|
+
location: {
|
|
32
|
+
folderId: string;
|
|
33
|
+
};
|
|
34
|
+
publishedOn?: string;
|
|
35
|
+
version: number;
|
|
36
|
+
locked: boolean;
|
|
37
|
+
status: CmsEntryStatus;
|
|
38
|
+
values: T;
|
|
39
|
+
meta?: {
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface FileSearchRecordValues {
|
|
44
|
+
"object@location": {
|
|
45
|
+
"text@folderId": string;
|
|
46
|
+
};
|
|
47
|
+
"text@type": "FmFile";
|
|
48
|
+
"wby-aco-json@data": {
|
|
49
|
+
aliases: string[];
|
|
50
|
+
size: number;
|
|
51
|
+
createdBy: {
|
|
52
|
+
type: string;
|
|
53
|
+
displayName: string;
|
|
54
|
+
id: string;
|
|
55
|
+
};
|
|
56
|
+
meta: {
|
|
57
|
+
private: boolean;
|
|
58
|
+
width?: number;
|
|
59
|
+
height?: number;
|
|
60
|
+
};
|
|
61
|
+
name: string;
|
|
62
|
+
id: string;
|
|
63
|
+
type: string;
|
|
64
|
+
createdOn: string;
|
|
65
|
+
key: string;
|
|
66
|
+
};
|
|
67
|
+
"text@tags": string[];
|
|
68
|
+
}
|
|
69
|
+
export interface FileEntryValues {
|
|
70
|
+
"object@meta": {
|
|
71
|
+
"boolean@private": boolean;
|
|
72
|
+
"number@width"?: number;
|
|
73
|
+
"number@height"?: number;
|
|
74
|
+
};
|
|
75
|
+
"object@location": {
|
|
76
|
+
"text@folderId": string;
|
|
77
|
+
};
|
|
78
|
+
"text@key": string;
|
|
79
|
+
"text@aliases": string[];
|
|
80
|
+
"number@size": number;
|
|
81
|
+
"text@name": string;
|
|
82
|
+
"text@type": string;
|
|
83
|
+
"text@tags": string[];
|
|
84
|
+
}
|
|
85
|
+
export interface ListLocalesParams {
|
|
86
|
+
tenant: Tenant;
|
|
87
|
+
}
|
|
88
|
+
export interface File {
|
|
89
|
+
id: string;
|
|
90
|
+
key: string;
|
|
91
|
+
size: number;
|
|
92
|
+
type: string;
|
|
93
|
+
name: string;
|
|
94
|
+
meta: Record<string, any>;
|
|
95
|
+
tags: string[];
|
|
96
|
+
aliases: string[];
|
|
97
|
+
createdOn: string;
|
|
98
|
+
createdBy: Identity;
|
|
99
|
+
tenant: string;
|
|
100
|
+
locale: string;
|
|
101
|
+
webinyVersion: string;
|
|
102
|
+
/**
|
|
103
|
+
* User can add new fields to the File object so we must allow it in the types.
|
|
104
|
+
*/
|
|
105
|
+
[key: string]: any;
|
|
106
|
+
}
|
|
107
|
+
export interface FileItem {
|
|
108
|
+
data: File;
|
|
109
|
+
}
|
|
@@ -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 I18NLocale {\n code: string;\n}\n\nexport interface Identity {\n id: string;\n displayName: string | null;\n type: string;\n}\n\nexport interface CmsEntryValues {\n [key: string]: any;\n}\n\nexport type CmsEntryStatus = \"published\" | \"unpublished\" | \"draft\";\n\nexport interface CmsEntry<T = CmsEntryValues> {\n webinyVersion: string;\n tenant: string;\n entryId: string;\n id: string;\n createdBy: Identity;\n ownedBy: Identity;\n modifiedBy?: Identity | null;\n createdOn: string;\n savedOn: string;\n modelId: string;\n locale: string;\n location: {\n folderId: string;\n };\n publishedOn?: string;\n version: number;\n locked: boolean;\n status: CmsEntryStatus;\n values: T;\n meta?: {\n [key: string]: any;\n };\n}\n\nexport interface FileSearchRecordValues {\n \"object@location\": {\n \"text@folderId\": string;\n };\n \"text@type\": \"FmFile\";\n \"wby-aco-json@data\": {\n aliases: string[];\n size: number;\n createdBy: {\n type: string;\n displayName: string;\n id: string;\n };\n meta: {\n private: boolean;\n width?: number;\n height?: number;\n };\n name: string;\n id: string;\n type: string;\n createdOn: string;\n key: string;\n };\n \"text@tags\": string[];\n}\n\nexport interface FileEntryValues {\n \"object@meta\": {\n \"boolean@private\": boolean;\n \"number@width\"?: number;\n \"number@height\"?: number;\n };\n \"object@location\": {\n \"text@folderId\": string;\n };\n \"text@key\": string;\n \"text@aliases\": string[];\n \"number@size\": number;\n \"text@name\": string;\n \"text@type\": string;\n \"text@tags\": string[];\n}\n\nexport interface ListLocalesParams {\n tenant: Tenant;\n}\n\nexport interface File {\n id: string;\n key: string;\n size: number;\n type: string;\n name: string;\n meta: Record<string, any>;\n tags: string[];\n aliases: string[];\n createdOn: string;\n createdBy: Identity;\n tenant: string;\n locale: string;\n webinyVersion: string;\n /**\n * User can add new fields to the File object so we must allow it in the types.\n */\n [key: string]: any;\n}\n\nexport interface FileItem {\n data: File;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
import { DataMigration, DataMigrationContext } from "@webiny/data-migration";
|
|
3
|
+
export declare class MultiStepForms_5_38_0_001 implements DataMigration {
|
|
4
|
+
private readonly formEntity;
|
|
5
|
+
private readonly table;
|
|
6
|
+
constructor(table: Table<string, string, string>);
|
|
7
|
+
getId(): string;
|
|
8
|
+
getDescription(): string;
|
|
9
|
+
shouldExecute({ logger }: DataMigrationContext): Promise<boolean>;
|
|
10
|
+
execute({ logger }: DataMigrationContext): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MultiStepForms_5_38_0_001 = void 0;
|
|
7
|
+
var _dataMigration = require("@webiny/data-migration");
|
|
8
|
+
var _createFormEntity = require("../entities/createFormEntity");
|
|
9
|
+
var _utils = require("../../../../utils");
|
|
10
|
+
var _ioc = require("@webiny/ioc");
|
|
11
|
+
var _utils2 = require("@webiny/utils");
|
|
12
|
+
class MultiStepForms_5_38_0_001 {
|
|
13
|
+
constructor(table) {
|
|
14
|
+
this.table = table;
|
|
15
|
+
this.formEntity = (0, _createFormEntity.createFormEntity)(table);
|
|
16
|
+
}
|
|
17
|
+
getId() {
|
|
18
|
+
return "5.38.0-001";
|
|
19
|
+
}
|
|
20
|
+
getDescription() {
|
|
21
|
+
return "Convert forms to multi-step forms.";
|
|
22
|
+
}
|
|
23
|
+
async shouldExecute({
|
|
24
|
+
logger
|
|
25
|
+
}) {
|
|
26
|
+
let shouldExecute = false;
|
|
27
|
+
await (0, _utils.forEachTenantLocale)({
|
|
28
|
+
table: this.table,
|
|
29
|
+
logger,
|
|
30
|
+
callback: async ({
|
|
31
|
+
tenantId,
|
|
32
|
+
localeCode
|
|
33
|
+
}) => {
|
|
34
|
+
const ddbRecords = await (0, _utils.queryAll)({
|
|
35
|
+
entity: this.formEntity,
|
|
36
|
+
// Pulling all forms via the `T#root#L#en-US#FB#F` PK will suffice.
|
|
37
|
+
partitionKey: `T#${tenantId}#L#${localeCode}#FB#F`
|
|
38
|
+
});
|
|
39
|
+
for (const ddbRecord of ddbRecords) {
|
|
40
|
+
if (!ddbRecord.steps) {
|
|
41
|
+
shouldExecute = true;
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Continue to the next locale.
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return shouldExecute;
|
|
51
|
+
}
|
|
52
|
+
async execute({
|
|
53
|
+
logger
|
|
54
|
+
}) {
|
|
55
|
+
await (0, _utils.forEachTenantLocale)({
|
|
56
|
+
table: this.table,
|
|
57
|
+
logger,
|
|
58
|
+
callback: async ({
|
|
59
|
+
tenantId,
|
|
60
|
+
localeCode
|
|
61
|
+
}) => {
|
|
62
|
+
const ddbRecords = await Promise.all([(0, _utils.queryAll)({
|
|
63
|
+
entity: this.formEntity,
|
|
64
|
+
partitionKey: `T#${tenantId}#L#${localeCode}#FB#F`
|
|
65
|
+
}), (0, _utils.queryAll)({
|
|
66
|
+
entity: this.formEntity,
|
|
67
|
+
partitionKey: `T#${tenantId}#L#${localeCode}#FB#F#L`
|
|
68
|
+
}), (0, _utils.queryAll)({
|
|
69
|
+
entity: this.formEntity,
|
|
70
|
+
partitionKey: `T#${tenantId}#L#${localeCode}#FB#F#LP`
|
|
71
|
+
})]).then(response => response.flat());
|
|
72
|
+
if (!ddbRecords.length) {
|
|
73
|
+
// Continue to the next locale.
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
const items = [];
|
|
77
|
+
for (const ddbRecord of ddbRecords) {
|
|
78
|
+
if (ddbRecord.steps) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// If no steps are defined, we need to create a single step.
|
|
83
|
+
ddbRecord.steps = [];
|
|
84
|
+
if (Array.isArray(ddbRecord.layout)) {
|
|
85
|
+
// If layout is an array, we need to create a single step with all the fields.
|
|
86
|
+
ddbRecord.steps = [{
|
|
87
|
+
title: "Step 1",
|
|
88
|
+
layout: ddbRecord.layout
|
|
89
|
+
}];
|
|
90
|
+
delete ddbRecord.layout;
|
|
91
|
+
}
|
|
92
|
+
items.push(this.formEntity.putBatch(ddbRecord));
|
|
93
|
+
}
|
|
94
|
+
const execute = () => {
|
|
95
|
+
return (0, _utils.batchWriteAll)({
|
|
96
|
+
table: this.formEntity.table,
|
|
97
|
+
items
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
logger.trace("Storing the DynamoDB records...");
|
|
101
|
+
await (0, _utils2.executeWithRetry)(execute, {
|
|
102
|
+
onFailedAttempt: error => {
|
|
103
|
+
logger.error(`"batchWriteAll" attempt #${error.attemptNumber} failed.`);
|
|
104
|
+
logger.error(error.message);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
logger.info("Updated all the forms.");
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
exports.MultiStepForms_5_38_0_001 = MultiStepForms_5_38_0_001;
|
|
114
|
+
(0, _ioc.makeInjectable)(MultiStepForms_5_38_0_001, [(0, _ioc.inject)(_dataMigration.PrimaryDynamoTableSymbol)]);
|
|
115
|
+
|
|
116
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_dataMigration","require","_createFormEntity","_utils","_ioc","_utils2","MultiStepForms_5_38_0_001","constructor","table","formEntity","createFormEntity","getId","getDescription","shouldExecute","logger","forEachTenantLocale","callback","tenantId","localeCode","ddbRecords","queryAll","entity","partitionKey","ddbRecord","steps","execute","Promise","all","then","response","flat","length","items","Array","isArray","layout","title","push","putBatch","batchWriteAll","trace","executeWithRetry","onFailedAttempt","error","attemptNumber","message","info","exports","makeInjectable","inject","PrimaryDynamoTableSymbol"],"sources":["index.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport {\n DataMigration,\n DataMigrationContext,\n PrimaryDynamoTableSymbol\n} from \"@webiny/data-migration\";\nimport { createFormEntity } from \"../entities/createFormEntity\";\nimport { batchWriteAll, BatchWriteItem, forEachTenantLocale, queryAll } from \"~/utils\";\nimport { FbForm } from \"../types\";\nimport { inject, makeInjectable } from \"@webiny/ioc\";\nimport { executeWithRetry } from \"@webiny/utils\";\n\nexport class MultiStepForms_5_38_0_001 implements DataMigration {\n private readonly formEntity: ReturnType<typeof createFormEntity>;\n private readonly table: Table<string, string, string>;\n\n constructor(table: Table<string, string, string>) {\n this.table = table;\n this.formEntity = createFormEntity(table);\n }\n\n getId() {\n return \"5.38.0-001\";\n }\n\n getDescription() {\n return \"Convert forms to multi-step forms.\";\n }\n\n async shouldExecute({ logger }: DataMigrationContext): Promise<boolean> {\n let shouldExecute = false;\n\n await forEachTenantLocale({\n table: this.table,\n logger,\n callback: async ({ tenantId, localeCode }) => {\n const ddbRecords = await queryAll<FbForm>({\n entity: this.formEntity,\n // Pulling all forms via the `T#root#L#en-US#FB#F` PK will suffice.\n partitionKey: `T#${tenantId}#L#${localeCode}#FB#F`\n });\n\n for (const ddbRecord of ddbRecords) {\n if (!ddbRecord.steps) {\n shouldExecute = true;\n return false;\n }\n }\n\n // Continue to the next locale.\n return true;\n }\n });\n\n return shouldExecute;\n }\n\n async execute({ logger }: DataMigrationContext): Promise<void> {\n await forEachTenantLocale({\n table: this.table,\n logger,\n callback: async ({ tenantId, localeCode }) => {\n const ddbRecords = await Promise.all([\n queryAll<FbForm>({\n entity: this.formEntity,\n partitionKey: `T#${tenantId}#L#${localeCode}#FB#F`\n }),\n queryAll<FbForm>({\n entity: this.formEntity,\n partitionKey: `T#${tenantId}#L#${localeCode}#FB#F#L`\n }),\n queryAll<FbForm>({\n entity: this.formEntity,\n partitionKey: `T#${tenantId}#L#${localeCode}#FB#F#LP`\n })\n ]).then(response => response.flat());\n\n if (!ddbRecords.length) {\n // Continue to the next locale.\n return true;\n }\n\n const items: BatchWriteItem[] = [];\n for (const ddbRecord of ddbRecords) {\n if (ddbRecord.steps) {\n continue;\n }\n\n // If no steps are defined, we need to create a single step.\n ddbRecord.steps = [];\n\n if (Array.isArray(ddbRecord.layout)) {\n // If layout is an array, we need to create a single step with all the fields.\n ddbRecord.steps = [{ title: \"Step 1\", layout: ddbRecord.layout }];\n delete ddbRecord.layout;\n }\n\n items.push(this.formEntity.putBatch(ddbRecord));\n }\n\n const execute = () => {\n return batchWriteAll({ table: this.formEntity.table, items });\n };\n\n logger.trace(\"Storing the DynamoDB records...\");\n await executeWithRetry(execute, {\n onFailedAttempt: error => {\n logger.error(`\"batchWriteAll\" attempt #${error.attemptNumber} failed.`);\n logger.error(error.message);\n }\n });\n\n return true;\n }\n });\n\n logger.info(\"Updated all the forms.\");\n }\n}\n\nmakeInjectable(MultiStepForms_5_38_0_001, [inject(PrimaryDynamoTableSymbol)]);\n"],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
import { DataMigration, DataMigrationContext } from "@webiny/data-migration";
|
|
3
|
+
import { Client } from "@elastic/elasticsearch";
|
|
4
|
+
export declare class MultiStepForms_5_38_0_001 implements DataMigration {
|
|
5
|
+
private readonly table;
|
|
6
|
+
private readonly formEntity;
|
|
7
|
+
private readonly elasticsearchClient;
|
|
8
|
+
constructor(table: Table<string, string, string>, elasticsearchClient: Client);
|
|
9
|
+
getId(): string;
|
|
10
|
+
getDescription(): string;
|
|
11
|
+
shouldExecute({ logger }: DataMigrationContext): Promise<boolean>;
|
|
12
|
+
execute({ logger }: DataMigrationContext): Promise<void>;
|
|
13
|
+
}
|