Standard index as code introduction + type refactor (#16426)

# Introduction
Related https://github.com/twentyhq/core-team-issues/issues/1995

In this PR we're introducing the standard index tools for their
declaration
Also adding a common typing in order to have a simily consistency across
standard builders

Will implement remaining standard index builder in an other PR
This commit is contained in:
Paul Rastoin
2025-12-09 14:52:25 +01:00
committed by GitHub
parent 4996f3dd28
commit e8d4f11d8e
44 changed files with 3673 additions and 1901 deletions
@@ -30,10 +30,12 @@ export class ComputeTwentyStandardWorkspaceMigrationCommand extends CommandRunne
// TODO: Implement migration logic here
const workspaceId = '20202020-ef6f-4118-953c-2b027324b54a';
const twentyStandardApplicationId = '20202020-5adb-4091-81b7-d5be86a8bdd2';
const twentyStandardAllFlatEntityMaps =
computeTwentyStandardApplicationAllFlatEntityMaps({
createdAt: new Date(),
now: new Date(),
workspaceId,
twentyStandardApplicationId,
});
writeFileSync(
@@ -48,6 +50,7 @@ export class ComputeTwentyStandardWorkspaceMigrationCommand extends CommandRunne
isSystemBuild: true,
},
fromToAllFlatEntityMaps: {
// Should be dynamic
flatObjectMetadataMaps: {
from: createEmptyFlatEntityMaps(),
to: twentyStandardAllFlatEntityMaps.flatObjectMetadataMaps,
@@ -56,6 +59,10 @@ export class ComputeTwentyStandardWorkspaceMigrationCommand extends CommandRunne
from: createEmptyFlatEntityMaps(),
to: twentyStandardAllFlatEntityMaps.flatFieldMetadataMaps,
},
flatIndexMaps: {
from: createEmptyFlatEntityMaps(),
to: twentyStandardAllFlatEntityMaps.flatIndexMaps,
},
},
workspaceId,
})