@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,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getSettingsData = exports.createSettingsEntity = exports.createLegacySettingsEntity = void 0;
|
|
8
|
+
var _pick = _interopRequireDefault(require("lodash/pick"));
|
|
9
|
+
var _utils = require("../../../../utils");
|
|
10
|
+
const attributes = {
|
|
11
|
+
tenant: {
|
|
12
|
+
type: "string"
|
|
13
|
+
},
|
|
14
|
+
srcPrefix: {
|
|
15
|
+
type: "string"
|
|
16
|
+
},
|
|
17
|
+
uploadMaxFileSize: {
|
|
18
|
+
type: "number"
|
|
19
|
+
},
|
|
20
|
+
uploadMinFileSize: {
|
|
21
|
+
type: "number"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const getSettingsData = settings => {
|
|
25
|
+
return (0, _pick.default)(settings, Object.keys(attributes));
|
|
26
|
+
};
|
|
27
|
+
exports.getSettingsData = getSettingsData;
|
|
28
|
+
const createLegacySettingsEntity = table => {
|
|
29
|
+
return (0, _utils.createLegacyEntity)(table, "Settings", attributes);
|
|
30
|
+
};
|
|
31
|
+
exports.createLegacySettingsEntity = createLegacySettingsEntity;
|
|
32
|
+
const createSettingsEntity = table => {
|
|
33
|
+
return (0, _utils.createStandardEntity)(table, "FM.Settings");
|
|
34
|
+
};
|
|
35
|
+
exports.createSettingsEntity = createSettingsEntity;
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=createSettingsEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_pick","_interopRequireDefault","require","_utils","attributes","tenant","type","srcPrefix","uploadMaxFileSize","uploadMinFileSize","getSettingsData","settings","pick","Object","keys","exports","createLegacySettingsEntity","table","createLegacyEntity","createSettingsEntity","createStandardEntity"],"sources":["createSettingsEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport pick from \"lodash/pick\";\nimport { createLegacyEntity, createStandardEntity } from \"~/utils\";\n\nconst attributes: Parameters<typeof createLegacyEntity>[2] = {\n tenant: {\n type: \"string\"\n },\n srcPrefix: {\n type: \"string\"\n },\n uploadMaxFileSize: {\n type: \"number\"\n },\n uploadMinFileSize: {\n type: \"number\"\n }\n};\n\nexport const getSettingsData = (settings: any) => {\n return pick(settings, Object.keys(attributes));\n};\n\nexport const createLegacySettingsEntity = (table: Table<string, string, string>) => {\n return createLegacyEntity(table, \"Settings\", attributes);\n};\n\nexport const createSettingsEntity = (table: Table<string, string, string>) => {\n return createStandardEntity(table, \"FM.Settings\");\n};\n"],"mappings":";;;;;;;AACA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,UAAoD,GAAG;EACzDC,MAAM,EAAE;IACJC,IAAI,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IACPD,IAAI,EAAE;EACV,CAAC;EACDE,iBAAiB,EAAE;IACfF,IAAI,EAAE;EACV,CAAC;EACDG,iBAAiB,EAAE;IACfH,IAAI,EAAE;EACV;AACJ,CAAC;AAEM,MAAMI,eAAe,GAAIC,QAAa,IAAK;EAC9C,OAAO,IAAAC,aAAI,EAACD,QAAQ,EAAEE,MAAM,CAACC,IAAI,CAACV,UAAU,CAAC,CAAC;AAClD,CAAC;AAACW,OAAA,CAAAL,eAAA,GAAAA,eAAA;AAEK,MAAMM,0BAA0B,GAAIC,KAAoC,IAAK;EAChF,OAAO,IAAAC,yBAAkB,EAACD,KAAK,EAAE,UAAU,EAAEb,UAAU,CAAC;AAC5D,CAAC;AAACW,OAAA,CAAAC,0BAAA,GAAAA,0BAAA;AAEK,MAAMG,oBAAoB,GAAIF,KAAoC,IAAK;EAC1E,OAAO,IAAAG,2BAAoB,EAACH,KAAK,EAAE,aAAa,CAAC;AACrD,CAAC;AAACF,OAAA,CAAAI,oBAAA,GAAAA,oBAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
}, {
|
|
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,69 @@
|
|
|
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.createLegacyEntity)(table, "TenancyTenant", {
|
|
10
|
+
id: {
|
|
11
|
+
type: "string"
|
|
12
|
+
},
|
|
13
|
+
name: {
|
|
14
|
+
type: "string"
|
|
15
|
+
},
|
|
16
|
+
description: {
|
|
17
|
+
type: "string"
|
|
18
|
+
},
|
|
19
|
+
status: {
|
|
20
|
+
type: "string",
|
|
21
|
+
default: "active"
|
|
22
|
+
},
|
|
23
|
+
createdOn: {
|
|
24
|
+
type: "string"
|
|
25
|
+
},
|
|
26
|
+
savedOn: {
|
|
27
|
+
type: "string"
|
|
28
|
+
},
|
|
29
|
+
createdBy: {
|
|
30
|
+
type: "map"
|
|
31
|
+
},
|
|
32
|
+
parent: {
|
|
33
|
+
type: "string"
|
|
34
|
+
},
|
|
35
|
+
webinyVersion: {
|
|
36
|
+
type: "string"
|
|
37
|
+
},
|
|
38
|
+
settings: {
|
|
39
|
+
type: "map",
|
|
40
|
+
default: {}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// [
|
|
46
|
+
// {
|
|
47
|
+
// PK: "T#root",
|
|
48
|
+
// SK: "A",
|
|
49
|
+
// createdOn: "2023-01-25T09:37:58.183Z",
|
|
50
|
+
// description: "The top-level Webiny tenant.",
|
|
51
|
+
// GSI1_PK: "TENANTS",
|
|
52
|
+
// GSI1_SK: "T#null#2023-01-25T09:37:58.183Z",
|
|
53
|
+
// id: "root",
|
|
54
|
+
// name: "Root",
|
|
55
|
+
// savedOn: "2023-01-25T09:37:58.183Z",
|
|
56
|
+
// settings: {
|
|
57
|
+
// domains: []
|
|
58
|
+
// },
|
|
59
|
+
// status: "active",
|
|
60
|
+
// TYPE: "tenancy.tenant",
|
|
61
|
+
// webinyVersion: "0.0.0",
|
|
62
|
+
// _ct: "2023-01-25T09:37:58.220Z",
|
|
63
|
+
// _et: "TenancyTenant",
|
|
64
|
+
// _md: "2023-01-25T09:37:58.220Z"
|
|
65
|
+
// }
|
|
66
|
+
// ];
|
|
67
|
+
exports.createTenantEntity = createTenantEntity;
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=createTenantEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_utils","require","createTenantEntity","table","createLegacyEntity","id","type","name","description","status","default","createdOn","savedOn","createdBy","parent","webinyVersion","settings","exports"],"sources":["createTenantEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { createLegacyEntity } from \"~/utils\";\n\nexport const createTenantEntity = (table: Table<string, string, string>) => {\n return createLegacyEntity(table, \"TenancyTenant\", {\n id: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n status: {\n type: \"string\",\n default: \"active\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n parent: {\n type: \"string\"\n },\n webinyVersion: {\n type: \"string\"\n },\n settings: {\n type: \"map\",\n default: {}\n }\n });\n};\n\n// [\n// {\n// PK: \"T#root\",\n// SK: \"A\",\n// createdOn: \"2023-01-25T09:37:58.183Z\",\n// description: \"The top-level Webiny tenant.\",\n// GSI1_PK: \"TENANTS\",\n// GSI1_SK: \"T#null#2023-01-25T09:37:58.183Z\",\n// id: \"root\",\n// name: \"Root\",\n// savedOn: \"2023-01-25T09:37:58.183Z\",\n// settings: {\n// domains: []\n// },\n// status: \"active\",\n// TYPE: \"tenancy.tenant\",\n// webinyVersion: \"0.0.0\",\n// _ct: \"2023-01-25T09:37:58.220Z\",\n// _et: \"TenancyTenant\",\n// _md: \"2023-01-25T09:37:58.220Z\"\n// }\n// ];\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,kBAAkB,GAAIC,KAAoC,IAAK;EACxE,OAAO,IAAAC,yBAAkB,EAACD,KAAK,EAAE,eAAe,EAAE;IAC9CE,EAAE,EAAE;MACAC,IAAI,EAAE;IACV,CAAC;IACDC,IAAI,EAAE;MACFD,IAAI,EAAE;IACV,CAAC;IACDE,WAAW,EAAE;MACTF,IAAI,EAAE;IACV,CAAC;IACDG,MAAM,EAAE;MACJH,IAAI,EAAE,QAAQ;MACdI,OAAO,EAAE;IACb,CAAC;IACDC,SAAS,EAAE;MACPL,IAAI,EAAE;IACV,CAAC;IACDM,OAAO,EAAE;MACLN,IAAI,EAAE;IACV,CAAC;IACDO,SAAS,EAAE;MACPP,IAAI,EAAE;IACV,CAAC;IACDQ,MAAM,EAAE;MACJR,IAAI,EAAE;IACV,CAAC;IACDS,aAAa,EAAE;MACXT,IAAI,EAAE;IACV,CAAC;IACDU,QAAQ,EAAE;MACNV,IAAI,EAAE,KAAK;MACXI,OAAO,EAAE,CAAC;IACd;EACJ,CAAC,CAAC;AACN,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAAO,OAAA,CAAAf,kBAAA,GAAAA,kBAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface File {
|
|
2
|
+
id: string;
|
|
3
|
+
key: string;
|
|
4
|
+
size: number;
|
|
5
|
+
type: string;
|
|
6
|
+
name: string;
|
|
7
|
+
meta: Record<string, any>;
|
|
8
|
+
tags: string[];
|
|
9
|
+
createdOn: string;
|
|
10
|
+
createdBy: CreatedBy;
|
|
11
|
+
tenant: string;
|
|
12
|
+
locale: string;
|
|
13
|
+
webinyVersion: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CreatedBy {
|
|
16
|
+
id: string;
|
|
17
|
+
displayName: string | null;
|
|
18
|
+
type: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export 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 createdOn: string;\n createdBy: CreatedBy;\n tenant: string;\n locale: string;\n webinyVersion: string;\n}\n\nexport interface CreatedBy {\n id: string;\n displayName: string | null;\n type: string;\n}\n"],"mappings":""}
|
|
@@ -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,90 @@
|
|
|
1
|
+
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
export declare const getSettingsData: (settings: any) => Pick<any, string>;
|
|
3
|
+
export declare const createLegacySettingsEntity: (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, {
|
|
4
|
+
PK: {
|
|
5
|
+
partitionKey: true;
|
|
6
|
+
};
|
|
7
|
+
SK: {
|
|
8
|
+
sortKey: true;
|
|
9
|
+
};
|
|
10
|
+
GSI1_PK: {
|
|
11
|
+
type: "string";
|
|
12
|
+
};
|
|
13
|
+
GSI1_SK: {
|
|
14
|
+
type: "string";
|
|
15
|
+
};
|
|
16
|
+
TYPE: {
|
|
17
|
+
type: "string";
|
|
18
|
+
};
|
|
19
|
+
}, {
|
|
20
|
+
PK: {
|
|
21
|
+
partitionKey: true;
|
|
22
|
+
};
|
|
23
|
+
SK: {
|
|
24
|
+
sortKey: true;
|
|
25
|
+
};
|
|
26
|
+
GSI1_PK: {
|
|
27
|
+
type: "string";
|
|
28
|
+
};
|
|
29
|
+
GSI1_SK: {
|
|
30
|
+
type: "string";
|
|
31
|
+
};
|
|
32
|
+
TYPE: {
|
|
33
|
+
type: "string";
|
|
34
|
+
};
|
|
35
|
+
}, import("dynamodb-toolbox/dist/cjs/classes/Entity").ParsedAttributes<import("ts-toolbelt/out/Any/Key").Key>, any, {
|
|
36
|
+
[x: string]: any;
|
|
37
|
+
[x: number]: any;
|
|
38
|
+
[x: symbol]: any;
|
|
39
|
+
}, {
|
|
40
|
+
[x: string]: any;
|
|
41
|
+
[x: number]: any;
|
|
42
|
+
[x: symbol]: any;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const createSettingsEntity: (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, {
|
|
45
|
+
PK: {
|
|
46
|
+
partitionKey: true;
|
|
47
|
+
};
|
|
48
|
+
SK: {
|
|
49
|
+
sortKey: true;
|
|
50
|
+
};
|
|
51
|
+
GSI1_PK: {
|
|
52
|
+
type: "string";
|
|
53
|
+
};
|
|
54
|
+
GSI1_SK: {
|
|
55
|
+
type: "string";
|
|
56
|
+
};
|
|
57
|
+
TYPE: {
|
|
58
|
+
type: "string";
|
|
59
|
+
};
|
|
60
|
+
data: {
|
|
61
|
+
type: "map";
|
|
62
|
+
};
|
|
63
|
+
}, {
|
|
64
|
+
PK: {
|
|
65
|
+
partitionKey: true;
|
|
66
|
+
};
|
|
67
|
+
SK: {
|
|
68
|
+
sortKey: true;
|
|
69
|
+
};
|
|
70
|
+
GSI1_PK: {
|
|
71
|
+
type: "string";
|
|
72
|
+
};
|
|
73
|
+
GSI1_SK: {
|
|
74
|
+
type: "string";
|
|
75
|
+
};
|
|
76
|
+
TYPE: {
|
|
77
|
+
type: "string";
|
|
78
|
+
};
|
|
79
|
+
data: {
|
|
80
|
+
type: "map";
|
|
81
|
+
};
|
|
82
|
+
}, import("dynamodb-toolbox/dist/cjs/classes/Entity").ParsedAttributes<import("ts-toolbelt/out/Any/Key").Key>, any, {
|
|
83
|
+
[x: string]: any;
|
|
84
|
+
[x: number]: any;
|
|
85
|
+
[x: symbol]: any;
|
|
86
|
+
}, {
|
|
87
|
+
[x: string]: any;
|
|
88
|
+
[x: number]: any;
|
|
89
|
+
[x: symbol]: any;
|
|
90
|
+
}>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getSettingsData = exports.createSettingsEntity = exports.createLegacySettingsEntity = void 0;
|
|
8
|
+
var _pick = _interopRequireDefault(require("lodash/pick"));
|
|
9
|
+
var _utils = require("../../../utils");
|
|
10
|
+
const attributes = {
|
|
11
|
+
name: {
|
|
12
|
+
type: "string"
|
|
13
|
+
},
|
|
14
|
+
websiteUrl: {
|
|
15
|
+
type: "string"
|
|
16
|
+
},
|
|
17
|
+
websitePreviewUrl: {
|
|
18
|
+
type: "string"
|
|
19
|
+
},
|
|
20
|
+
favicon: {
|
|
21
|
+
type: "map"
|
|
22
|
+
},
|
|
23
|
+
logo: {
|
|
24
|
+
type: "map"
|
|
25
|
+
},
|
|
26
|
+
prerendering: {
|
|
27
|
+
type: "map"
|
|
28
|
+
},
|
|
29
|
+
social: {
|
|
30
|
+
type: "map"
|
|
31
|
+
},
|
|
32
|
+
htmlTags: {
|
|
33
|
+
type: "map"
|
|
34
|
+
},
|
|
35
|
+
pages: {
|
|
36
|
+
type: "map"
|
|
37
|
+
},
|
|
38
|
+
tenant: {
|
|
39
|
+
type: "string"
|
|
40
|
+
},
|
|
41
|
+
locale: {
|
|
42
|
+
type: "string"
|
|
43
|
+
},
|
|
44
|
+
theme: {
|
|
45
|
+
type: "string"
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const getSettingsData = settings => {
|
|
49
|
+
return (0, _pick.default)(settings, Object.keys(attributes));
|
|
50
|
+
};
|
|
51
|
+
exports.getSettingsData = getSettingsData;
|
|
52
|
+
const createLegacySettingsEntity = table => {
|
|
53
|
+
return (0, _utils.createLegacyEntity)(table, "PbSettings", attributes);
|
|
54
|
+
};
|
|
55
|
+
exports.createLegacySettingsEntity = createLegacySettingsEntity;
|
|
56
|
+
const createSettingsEntity = table => {
|
|
57
|
+
return (0, _utils.createStandardEntity)(table, "PB.Settings");
|
|
58
|
+
};
|
|
59
|
+
exports.createSettingsEntity = createSettingsEntity;
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=createSettingsEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_pick","_interopRequireDefault","require","_utils","attributes","name","type","websiteUrl","websitePreviewUrl","favicon","logo","prerendering","social","htmlTags","pages","tenant","locale","theme","getSettingsData","settings","pick","Object","keys","exports","createLegacySettingsEntity","table","createLegacyEntity","createSettingsEntity","createStandardEntity"],"sources":["createSettingsEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport pick from \"lodash/pick\";\nimport { createLegacyEntity, createStandardEntity } from \"~/utils\";\n\nconst attributes: Parameters<typeof createLegacyEntity>[2] = {\n name: {\n type: \"string\"\n },\n websiteUrl: {\n type: \"string\"\n },\n websitePreviewUrl: {\n type: \"string\"\n },\n favicon: {\n type: \"map\"\n },\n logo: {\n type: \"map\"\n },\n prerendering: {\n type: \"map\"\n },\n social: {\n type: \"map\"\n },\n htmlTags: {\n type: \"map\"\n },\n pages: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n theme: {\n type: \"string\"\n }\n};\n\nexport const getSettingsData = (settings: any) => {\n return pick(settings, Object.keys(attributes));\n};\n\nexport const createLegacySettingsEntity = (table: Table<string, string, string>) => {\n return createLegacyEntity(table, \"PbSettings\", attributes);\n};\n\nexport const createSettingsEntity = (table: Table<string, string, string>) => {\n return createStandardEntity(table, \"PB.Settings\");\n};\n"],"mappings":";;;;;;;AACA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,UAAoD,GAAG;EACzDC,IAAI,EAAE;IACFC,IAAI,EAAE;EACV,CAAC;EACDC,UAAU,EAAE;IACRD,IAAI,EAAE;EACV,CAAC;EACDE,iBAAiB,EAAE;IACfF,IAAI,EAAE;EACV,CAAC;EACDG,OAAO,EAAE;IACLH,IAAI,EAAE;EACV,CAAC;EACDI,IAAI,EAAE;IACFJ,IAAI,EAAE;EACV,CAAC;EACDK,YAAY,EAAE;IACVL,IAAI,EAAE;EACV,CAAC;EACDM,MAAM,EAAE;IACJN,IAAI,EAAE;EACV,CAAC;EACDO,QAAQ,EAAE;IACNP,IAAI,EAAE;EACV,CAAC;EACDQ,KAAK,EAAE;IACHR,IAAI,EAAE;EACV,CAAC;EACDS,MAAM,EAAE;IACJT,IAAI,EAAE;EACV,CAAC;EACDU,MAAM,EAAE;IACJV,IAAI,EAAE;EACV,CAAC;EACDW,KAAK,EAAE;IACHX,IAAI,EAAE;EACV;AACJ,CAAC;AAEM,MAAMY,eAAe,GAAIC,QAAa,IAAK;EAC9C,OAAO,IAAAC,aAAI,EAACD,QAAQ,EAAEE,MAAM,CAACC,IAAI,CAAClB,UAAU,CAAC,CAAC;AAClD,CAAC;AAACmB,OAAA,CAAAL,eAAA,GAAAA,eAAA;AAEK,MAAMM,0BAA0B,GAAIC,KAAoC,IAAK;EAChF,OAAO,IAAAC,yBAAkB,EAACD,KAAK,EAAE,YAAY,EAAErB,UAAU,CAAC;AAC9D,CAAC;AAACmB,OAAA,CAAAC,0BAAA,GAAAA,0BAAA;AAEK,MAAMG,oBAAoB,GAAIF,KAAoC,IAAK;EAC1E,OAAO,IAAAG,2BAAoB,EAACH,KAAK,EAAE,aAAa,CAAC;AACrD,CAAC;AAACF,OAAA,CAAAI,oBAAA,GAAAA,oBAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
}, {
|
|
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,46 @@
|
|
|
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.createLegacyEntity)(table, "TenancyTenant", {
|
|
10
|
+
id: {
|
|
11
|
+
type: "string"
|
|
12
|
+
},
|
|
13
|
+
name: {
|
|
14
|
+
type: "string"
|
|
15
|
+
},
|
|
16
|
+
description: {
|
|
17
|
+
type: "string"
|
|
18
|
+
},
|
|
19
|
+
status: {
|
|
20
|
+
type: "string",
|
|
21
|
+
default: "active"
|
|
22
|
+
},
|
|
23
|
+
createdOn: {
|
|
24
|
+
type: "string"
|
|
25
|
+
},
|
|
26
|
+
savedOn: {
|
|
27
|
+
type: "string"
|
|
28
|
+
},
|
|
29
|
+
createdBy: {
|
|
30
|
+
type: "map"
|
|
31
|
+
},
|
|
32
|
+
parent: {
|
|
33
|
+
type: "string"
|
|
34
|
+
},
|
|
35
|
+
webinyVersion: {
|
|
36
|
+
type: "string"
|
|
37
|
+
},
|
|
38
|
+
settings: {
|
|
39
|
+
type: "map",
|
|
40
|
+
default: {}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
exports.createTenantEntity = createTenantEntity;
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=createTenantEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_utils","require","createTenantEntity","table","createLegacyEntity","id","type","name","description","status","default","createdOn","savedOn","createdBy","parent","webinyVersion","settings","exports"],"sources":["createTenantEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { createLegacyEntity } from \"~/utils\";\n\nexport const createTenantEntity = (table: Table<string, string, string>) => {\n return createLegacyEntity(table, \"TenancyTenant\", {\n id: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n status: {\n type: \"string\",\n default: \"active\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n parent: {\n type: \"string\"\n },\n webinyVersion: {\n type: \"string\"\n },\n settings: {\n type: \"map\",\n default: {}\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,kBAAkB,GAAIC,KAAoC,IAAK;EACxE,OAAO,IAAAC,yBAAkB,EAACD,KAAK,EAAE,eAAe,EAAE;IAC9CE,EAAE,EAAE;MACAC,IAAI,EAAE;IACV,CAAC;IACDC,IAAI,EAAE;MACFD,IAAI,EAAE;IACV,CAAC;IACDE,WAAW,EAAE;MACTF,IAAI,EAAE;IACV,CAAC;IACDG,MAAM,EAAE;MACJH,IAAI,EAAE,QAAQ;MACdI,OAAO,EAAE;IACb,CAAC;IACDC,SAAS,EAAE;MACPL,IAAI,EAAE;IACV,CAAC;IACDM,OAAO,EAAE;MACLN,IAAI,EAAE;IACV,CAAC;IACDO,SAAS,EAAE;MACPP,IAAI,EAAE;IACV,CAAC;IACDQ,MAAM,EAAE;MACJR,IAAI,EAAE;IACV,CAAC;IACDS,aAAa,EAAE;MACXT,IAAI,EAAE;IACV,CAAC;IACDU,QAAQ,EAAE;MACNV,IAAI,EAAE,KAAK;MACXI,OAAO,EAAE,CAAC;IACd;EACJ,CAAC,CAAC;AACN,CAAC;AAACO,OAAA,CAAAf,kBAAA,GAAAA,kBAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
import { DataMigrationContext } from "@webiny/data-migration";
|
|
3
|
+
export declare class PageBuilder_5_35_0_002 {
|
|
4
|
+
private readonly newSettingsEntity;
|
|
5
|
+
private readonly legacySettingsEntity;
|
|
6
|
+
private readonly tenantEntity;
|
|
7
|
+
private readonly localeEntity;
|
|
8
|
+
constructor(table: Table<string, string, string>);
|
|
9
|
+
getId(): string;
|
|
10
|
+
getDescription(): string;
|
|
11
|
+
shouldExecute({ logger }: DataMigrationContext): Promise<boolean>;
|
|
12
|
+
execute({ logger }: DataMigrationContext): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PageBuilder_5_35_0_002 = void 0;
|
|
7
|
+
var _dataMigration = require("@webiny/data-migration");
|
|
8
|
+
var _utils = require("../../../utils");
|
|
9
|
+
var _createTenantEntity = require("./createTenantEntity");
|
|
10
|
+
var _createSettingsEntity = require("./createSettingsEntity");
|
|
11
|
+
var _createLocaleEntity = require("./createLocaleEntity");
|
|
12
|
+
var _ioc = require("@webiny/ioc");
|
|
13
|
+
var _dbDynamodb = require("@webiny/db-dynamodb");
|
|
14
|
+
class PageBuilder_5_35_0_002 {
|
|
15
|
+
constructor(table) {
|
|
16
|
+
this.newSettingsEntity = (0, _createSettingsEntity.createSettingsEntity)(table);
|
|
17
|
+
this.legacySettingsEntity = (0, _createSettingsEntity.createLegacySettingsEntity)(table);
|
|
18
|
+
this.tenantEntity = (0, _createTenantEntity.createTenantEntity)(table);
|
|
19
|
+
this.localeEntity = (0, _createLocaleEntity.createLocaleEntity)(table);
|
|
20
|
+
}
|
|
21
|
+
getId() {
|
|
22
|
+
return "5.35.0-002";
|
|
23
|
+
}
|
|
24
|
+
getDescription() {
|
|
25
|
+
return "Move PB Settings attributes to a `data` envelope.";
|
|
26
|
+
}
|
|
27
|
+
async shouldExecute({
|
|
28
|
+
logger
|
|
29
|
+
}) {
|
|
30
|
+
const defaultLocale = await (0, _utils.queryOne)({
|
|
31
|
+
entity: this.localeEntity,
|
|
32
|
+
partitionKey: `T#root#I18N#L#D`,
|
|
33
|
+
options: {
|
|
34
|
+
eq: "default"
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
if (!defaultLocale) {
|
|
38
|
+
logger.info(`Default locale not found; system is not yet installed.`);
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
const settings = await (0, _utils.queryOne)({
|
|
42
|
+
entity: this.legacySettingsEntity,
|
|
43
|
+
partitionKey: `T#root#L#${defaultLocale.code}#PB#SETTINGS`,
|
|
44
|
+
options: {
|
|
45
|
+
eq: "default"
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
if (!settings) {
|
|
49
|
+
logger.info(`Settings not found; system is not yet installed.`);
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
const newSettings = await (0, _utils.queryOne)({
|
|
53
|
+
entity: this.newSettingsEntity,
|
|
54
|
+
partitionKey: `T#root#L#${defaultLocale.code}#PB#SETTINGS`,
|
|
55
|
+
options: {
|
|
56
|
+
eq: "A"
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
if (newSettings) {
|
|
60
|
+
logger.info(`Settings record seems to be in order.`);
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
async execute({
|
|
66
|
+
logger
|
|
67
|
+
}) {
|
|
68
|
+
const tenants = await (0, _utils.queryAll)({
|
|
69
|
+
entity: this.tenantEntity,
|
|
70
|
+
partitionKey: "TENANTS",
|
|
71
|
+
options: {
|
|
72
|
+
index: "GSI1",
|
|
73
|
+
gt: " "
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
for (const tenant of tenants) {
|
|
77
|
+
const locales = await (0, _utils.queryAll)({
|
|
78
|
+
entity: this.localeEntity,
|
|
79
|
+
partitionKey: `T#${tenant.id}#I18N#L`,
|
|
80
|
+
options: {
|
|
81
|
+
gt: " "
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
for (const locale of locales) {
|
|
85
|
+
const settings = await (0, _utils.queryOne)({
|
|
86
|
+
entity: this.legacySettingsEntity,
|
|
87
|
+
partitionKey: `T#${tenant.id}#L#${locale.code}#PB#SETTINGS`,
|
|
88
|
+
options: {
|
|
89
|
+
eq: "default"
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
if (!settings) {
|
|
93
|
+
// It's possible that a tenant exists, but it was not yet installed.
|
|
94
|
+
logger.info(`Tenant ${tenant.name} (${tenant.id}) is not installed. Skipping migration of settings.`);
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
logger.info(`Updating PB settings for tenant ${tenant.name} (${tenant.id}).`);
|
|
98
|
+
await (0, _dbDynamodb.put)({
|
|
99
|
+
entity: this.newSettingsEntity,
|
|
100
|
+
item: {
|
|
101
|
+
PK: `T#${tenant.id}#L#${locale.code}#PB#SETTINGS`,
|
|
102
|
+
SK: "A",
|
|
103
|
+
TYPE: "pb.settings",
|
|
104
|
+
data: {
|
|
105
|
+
...(0, _createSettingsEntity.getSettingsData)(settings),
|
|
106
|
+
tenant: tenant.id
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
exports.PageBuilder_5_35_0_002 = PageBuilder_5_35_0_002;
|
|
115
|
+
(0, _ioc.makeInjectable)(PageBuilder_5_35_0_002, [(0, _ioc.inject)(_dataMigration.PrimaryDynamoTableSymbol)]);
|
|
116
|
+
|
|
117
|
+
//# sourceMappingURL=index.js.map
|