Rename uniqueIdentifier to universalIdentifier (#14201)
This commit is contained in:
+1
-1
@@ -11,5 +11,5 @@ type IndexFieldMetadataEntityRelationProperties =
|
||||
export type FlatIndexFieldMetadata = Partial<
|
||||
Omit<IndexFieldMetadataEntity, IndexFieldMetadataEntityRelationProperties>
|
||||
> & {
|
||||
uniqueIdentifier: string;
|
||||
universalIdentifier: string;
|
||||
};
|
||||
|
||||
+5
-5
@@ -10,12 +10,12 @@ export type CustomDeletedCreatedUpdatedMatrix<TLabel extends string, TInput> = {
|
||||
[P in keyof DeletedCreatedUpdatedMatrix<TInput> as `${P}${Capitalize<TLabel>}`]: DeletedCreatedUpdatedMatrix<TInput>[P];
|
||||
};
|
||||
|
||||
export type UniqueIdentifierItem = {
|
||||
uniqueIdentifier: string;
|
||||
export type UniversalIdentifierItem = {
|
||||
universalIdentifier: string;
|
||||
};
|
||||
|
||||
export const deletedCreatedUpdatedMatrixDispatcher = <
|
||||
T extends UniqueIdentifierItem,
|
||||
T extends UniversalIdentifierItem,
|
||||
>({
|
||||
from,
|
||||
to,
|
||||
@@ -26,8 +26,8 @@ export const deletedCreatedUpdatedMatrixDispatcher = <
|
||||
deleted: [],
|
||||
};
|
||||
|
||||
const fromMap = new Map(from.map((obj) => [obj.uniqueIdentifier, obj]));
|
||||
const toMap = new Map(to.map((obj) => [obj.uniqueIdentifier, obj]));
|
||||
const fromMap = new Map(from.map((obj) => [obj.universalIdentifier, obj]));
|
||||
const toMap = new Map(to.map((obj) => [obj.universalIdentifier, obj]));
|
||||
|
||||
for (const [identifier, fromObj] of fromMap) {
|
||||
if (!toMap.has(identifier)) {
|
||||
|
||||
+85
-85
@@ -40,7 +40,7 @@ exports[`Workspace migration builder field actions test suite It should build an
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "TEXT",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -79,7 +79,7 @@ exports[`Workspace migration builder field actions test suite It should build an
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -107,7 +107,7 @@ exports[`Workspace migration builder field actions test suite It should build an
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"targetTableName": "DEPRECATED",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -130,7 +130,7 @@ exports[`Workspace migration builder field actions test suite It should build an
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -168,7 +168,7 @@ exports[`Workspace migration builder field actions test suite It should build an
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -196,7 +196,7 @@ exports[`Workspace migration builder field actions test suite It should build an
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"targetTableName": "DEPRECATED",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -219,7 +219,7 @@ exports[`Workspace migration builder field actions test suite It should build an
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -247,7 +247,7 @@ exports[`Workspace migration builder field actions test suite It should build an
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"targetTableName": "DEPRECATED",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -270,7 +270,7 @@ exports[`Workspace migration builder field actions test suite It should build an
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -370,7 +370,7 @@ exports[`Workspace migration builder index actions test suite It should build an
|
||||
"isUnique": false,
|
||||
"name": "defaultFlatIndexMetadataName",
|
||||
"objectMetadataId": Any<String>,
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<ClockDate>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -396,7 +396,7 @@ exports[`Workspace migration builder index actions test suite It should build an
|
||||
"isUnique": false,
|
||||
"name": "new index name",
|
||||
"objectMetadataId": Any<String>,
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<ClockDate>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -437,7 +437,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "UUID",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -469,7 +469,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "TEXT",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -501,7 +501,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "DATE_TIME",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -533,7 +533,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "DATE_TIME",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -565,7 +565,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "DATE_TIME",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -600,7 +600,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "ACTOR",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -632,7 +632,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "POSITION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -672,7 +672,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -698,7 +698,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -738,7 +738,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -764,7 +764,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -804,7 +804,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -830,7 +830,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -870,7 +870,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -896,7 +896,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -936,7 +936,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -962,7 +962,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -994,7 +994,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "TS_VECTOR",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1025,7 +1025,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"targetTableName": "DEPRECATED",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1151,7 +1151,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1177,7 +1177,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1209,7 +1209,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "UUID",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1241,7 +1241,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "TEXT",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1273,7 +1273,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "DATE_TIME",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1305,7 +1305,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "DATE_TIME",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1337,7 +1337,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "DATE_TIME",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1372,7 +1372,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "ACTOR",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1404,7 +1404,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "POSITION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1444,7 +1444,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1470,7 +1470,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1510,7 +1510,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1536,7 +1536,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1576,7 +1576,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1602,7 +1602,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1642,7 +1642,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1668,7 +1668,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1700,7 +1700,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "TS_VECTOR",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1775,7 +1775,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "SELECT",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1850,7 +1850,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "MULTI_SELECT",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1882,7 +1882,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "TEXT",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1914,7 +1914,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "NUMBER",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1955,7 +1955,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "ADDRESS",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -1992,7 +1992,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "PHONES",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2027,7 +2027,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "EMAILS",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2059,7 +2059,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "DATE",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2091,7 +2091,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "BOOLEAN",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2127,7 +2127,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "LINKS",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2162,7 +2162,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "CURRENCY",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2197,7 +2197,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "FULL_NAME",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2260,7 +2260,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "RATING",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2292,7 +2292,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "RICH_TEXT",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2324,7 +2324,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "ARRAY",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2356,7 +2356,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"type": "RAW_JSON",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2387,7 +2387,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"targetTableName": "DEPRECATED",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2601,7 +2601,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "UUID",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2633,7 +2633,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "TEXT",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2665,7 +2665,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "DATE_TIME",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2697,7 +2697,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "DATE_TIME",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2729,7 +2729,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "DATE_TIME",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2764,7 +2764,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "ACTOR",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2796,7 +2796,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "POSITION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2836,7 +2836,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2862,7 +2862,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2902,7 +2902,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2928,7 +2928,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2968,7 +2968,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -2994,7 +2994,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -3034,7 +3034,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -3060,7 +3060,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -3100,7 +3100,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -3126,7 +3126,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "RELATION",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -3158,7 +3158,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": Any<String>,
|
||||
"standardOverrides": null,
|
||||
"type": "TS_VECTOR",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -3189,7 +3189,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"standardId": null,
|
||||
"standardOverrides": null,
|
||||
"targetTableName": "DEPRECATED",
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<String>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
@@ -3206,7 +3206,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUnique": false,
|
||||
"name": "defaultFlatIndexMetadataName",
|
||||
"objectMetadataId": Any<String>,
|
||||
"uniqueIdentifier": Any<String>,
|
||||
"universalIdentifier": Any<String>,
|
||||
"updatedAt": Any<ClockDate>,
|
||||
"workspaceId": Any<String>,
|
||||
},
|
||||
|
||||
+3
-3
@@ -29,7 +29,7 @@ const relationTestCases: WorkspaceMigrationBuilderTestCase[] = [
|
||||
const sourceRelationId = faker.string.uuid();
|
||||
const sourceRelationFlatField = getFlatFieldMetadataMock({
|
||||
id: sourceRelationId,
|
||||
uniqueIdentifier: 'field-metadata-unique-identifier-1',
|
||||
universalIdentifier: 'field-metadata-unique-identifier-1',
|
||||
objectMetadataId: PET_FLAT_OBJECT_MOCK.id,
|
||||
type: FieldMetadataType.RELATION,
|
||||
relationTargetFieldMetadataId: targetRelationId,
|
||||
@@ -43,7 +43,7 @@ const relationTestCases: WorkspaceMigrationBuilderTestCase[] = [
|
||||
|
||||
const targetRelationFlatField = getFlatFieldMetadataMock({
|
||||
id: targetRelationId,
|
||||
uniqueIdentifier: 'field-metadata-unique-identifier-2',
|
||||
universalIdentifier: 'field-metadata-unique-identifier-2',
|
||||
objectMetadataId: ROCKET_FLAT_OBJECT_MOCK.id,
|
||||
type: FieldMetadataType.RELATION,
|
||||
relationTargetFieldMetadataId: sourceRelationId,
|
||||
@@ -135,7 +135,7 @@ const basicCrudTestCases: WorkspaceMigrationBuilderTestCase[] = [
|
||||
toFlatObjectMetadataMaps:
|
||||
addFlatFieldMetadataInFlatObjectMetadataMapsOrThrow({
|
||||
flatFieldMetadata: getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'field-metadata-unique-identifier-1',
|
||||
universalIdentifier: 'field-metadata-unique-identifier-1',
|
||||
type: FieldMetadataType.TEXT,
|
||||
objectMetadataId: ROCKET_FLAT_OBJECT_MOCK.id,
|
||||
}),
|
||||
|
||||
+4
-4
@@ -20,7 +20,7 @@ export const WORKSPACE_MIGRATION_INDEX_BUILDER_TEST_CASES: WorkspaceMigrationBui
|
||||
flatIndexMetadatas: [
|
||||
getFlatIndexMetadataMock({
|
||||
objectMetadataId: NOTE_FLAT_OBJECT_MOCK.id,
|
||||
uniqueIdentifier: 'field-metadata-unique-identifier-1',
|
||||
universalIdentifier: 'field-metadata-unique-identifier-1',
|
||||
}),
|
||||
],
|
||||
}),
|
||||
@@ -38,7 +38,7 @@ export const WORKSPACE_MIGRATION_INDEX_BUILDER_TEST_CASES: WorkspaceMigrationBui
|
||||
input: () => {
|
||||
const flatIndexMetadata = getFlatIndexMetadataMock({
|
||||
objectMetadataId: NOTE_FLAT_OBJECT_MOCK.id,
|
||||
uniqueIdentifier: 'field-metadata-unique-identifier-1',
|
||||
universalIdentifier: 'field-metadata-unique-identifier-1',
|
||||
});
|
||||
const fromFlatObjectMetadataMaps =
|
||||
replaceFlatObjectMetadataInFlatObjectMetadataMapsOrThrow({
|
||||
@@ -59,7 +59,7 @@ export const WORKSPACE_MIGRATION_INDEX_BUILDER_TEST_CASES: WorkspaceMigrationBui
|
||||
name: 'new index name',
|
||||
isUnique: false,
|
||||
indexWhereClause: 'new index where clause',
|
||||
uniqueIdentifier: 'field-metadata-unique-identifier-1',
|
||||
universalIdentifier: 'field-metadata-unique-identifier-1',
|
||||
},
|
||||
],
|
||||
}),
|
||||
@@ -88,7 +88,7 @@ export const WORKSPACE_MIGRATION_INDEX_BUILDER_TEST_CASES: WorkspaceMigrationBui
|
||||
flatIndexMetadatas: [
|
||||
getFlatIndexMetadataMock({
|
||||
objectMetadataId: NOTE_FLAT_OBJECT_MOCK.id,
|
||||
uniqueIdentifier: 'field-metadata-unique-identifier-1',
|
||||
universalIdentifier: 'field-metadata-unique-identifier-1',
|
||||
}),
|
||||
],
|
||||
}),
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ const CREATE_OBJECT_TEST_CASES: WorkspaceMigrationBuilderTestCase[] = [
|
||||
flatIndexMetadatas: [
|
||||
getFlatIndexMetadataMock({
|
||||
objectMetadataId: ROCKET_FLAT_OBJECT_MOCK.id,
|
||||
uniqueIdentifier: 'field-metadata-unique-identifier-1',
|
||||
universalIdentifier: 'field-metadata-unique-identifier-1',
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
||||
+11
-11
@@ -7,7 +7,7 @@ import { generateColumnDefinitions } from 'src/engine/workspace-manager/workspac
|
||||
|
||||
describe('Generate Column Definitions', () => {
|
||||
const mockObjectMetadata = getFlatObjectMetadataMock({
|
||||
uniqueIdentifier: 'person',
|
||||
universalIdentifier: 'person',
|
||||
id: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
nameSingular: 'person',
|
||||
@@ -18,7 +18,7 @@ describe('Generate Column Definitions', () => {
|
||||
describe('Enum Field Schema Generation', () => {
|
||||
it('should generate deterministic enum names to prevent schema conflicts', () => {
|
||||
const enumField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'status',
|
||||
universalIdentifier: 'status',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.SELECT,
|
||||
name: 'status',
|
||||
@@ -61,7 +61,7 @@ describe('Generate Column Definitions', () => {
|
||||
|
||||
it('should handle multi-select fields with proper enum generation', () => {
|
||||
const multiSelectField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'tags',
|
||||
universalIdentifier: 'tags',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.MULTI_SELECT,
|
||||
name: 'tags',
|
||||
@@ -106,7 +106,7 @@ describe('Generate Column Definitions', () => {
|
||||
describe('Relation Field Schema Generation', () => {
|
||||
it('should handle null relation settings without crashing', () => {
|
||||
const relationField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'company',
|
||||
universalIdentifier: 'company',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
@@ -124,7 +124,7 @@ describe('Generate Column Definitions', () => {
|
||||
|
||||
it('should generate proper UUID foreign key columns for valid relations', () => {
|
||||
const relationField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'company',
|
||||
universalIdentifier: 'company',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
@@ -157,7 +157,7 @@ describe('Generate Column Definitions', () => {
|
||||
describe('Composite Field Schema Generation', () => {
|
||||
it('should generate all required columns for ADDRESS composite type', () => {
|
||||
const addressField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'address',
|
||||
universalIdentifier: 'address',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.ADDRESS,
|
||||
name: 'homeAddress',
|
||||
@@ -194,7 +194,7 @@ describe('Generate Column Definitions', () => {
|
||||
|
||||
it('should handle CURRENCY composite type properly', () => {
|
||||
const currencyField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'price',
|
||||
universalIdentifier: 'price',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.CURRENCY,
|
||||
name: 'price',
|
||||
@@ -236,7 +236,7 @@ describe('Generate Column Definitions', () => {
|
||||
describe('Default Value Schema Generation', () => {
|
||||
it('should handle null and undefined default values safely', () => {
|
||||
const textField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'description',
|
||||
universalIdentifier: 'description',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'description',
|
||||
@@ -262,7 +262,7 @@ describe('Generate Column Definitions', () => {
|
||||
|
||||
it('should handle boolean fields with default values', () => {
|
||||
const booleanField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'isActive',
|
||||
universalIdentifier: 'isActive',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.BOOLEAN,
|
||||
name: 'isActive',
|
||||
@@ -290,7 +290,7 @@ describe('Generate Column Definitions', () => {
|
||||
describe('Field Definition Generation', () => {
|
||||
it('should handle text fields without crashing', () => {
|
||||
const textField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'content',
|
||||
universalIdentifier: 'content',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'content',
|
||||
@@ -315,7 +315,7 @@ describe('Generate Column Definitions', () => {
|
||||
|
||||
it('should handle UUID fields properly', () => {
|
||||
const uuidField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'uuid',
|
||||
universalIdentifier: 'uuid',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'uuid',
|
||||
|
||||
+6
-6
@@ -86,7 +86,7 @@ describe('WorkspaceSchemaEnumOperations', () => {
|
||||
describe('Enum Collection for SELECT Fields', () => {
|
||||
it('should collect enum operations for simple SELECT fields', () => {
|
||||
const selectField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'status',
|
||||
universalIdentifier: 'status',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.SELECT,
|
||||
name: 'status',
|
||||
@@ -124,7 +124,7 @@ describe('WorkspaceSchemaEnumOperations', () => {
|
||||
|
||||
it('should collect enum operations for MULTI_SELECT fields', () => {
|
||||
const multiSelectField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'tags',
|
||||
universalIdentifier: 'tags',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.MULTI_SELECT,
|
||||
name: 'tags',
|
||||
@@ -162,7 +162,7 @@ describe('WorkspaceSchemaEnumOperations', () => {
|
||||
|
||||
it('should handle field renaming with proper enum name mapping', () => {
|
||||
const selectField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'status',
|
||||
universalIdentifier: 'status',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.SELECT,
|
||||
name: 'oldStatus',
|
||||
@@ -187,7 +187,7 @@ describe('WorkspaceSchemaEnumOperations', () => {
|
||||
describe('Composite Field Enum Handling', () => {
|
||||
it('should handle composite fields that do not currently generate enum operations', () => {
|
||||
const addressField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'address',
|
||||
universalIdentifier: 'address',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.ADDRESS,
|
||||
name: 'primaryAddress',
|
||||
@@ -205,7 +205,7 @@ describe('WorkspaceSchemaEnumOperations', () => {
|
||||
|
||||
it('should skip relation properties in composite types', () => {
|
||||
const relationField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'relation',
|
||||
universalIdentifier: 'relation',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
@@ -225,7 +225,7 @@ describe('WorkspaceSchemaEnumOperations', () => {
|
||||
describe('Non-Enum Field Safety', () => {
|
||||
it('should return empty operations for non-enum fields', () => {
|
||||
const textField = getFlatFieldMetadataMock({
|
||||
uniqueIdentifier: 'description',
|
||||
universalIdentifier: 'description',
|
||||
objectMetadataId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'description',
|
||||
|
||||
+6
-6
@@ -28,7 +28,7 @@ export class WorkspaceAgentComparator {
|
||||
}: WorkspaceAgentComparatorArgs): AgentComparatorResult[] {
|
||||
const results: AgentComparatorResult[] = [];
|
||||
|
||||
const keyFactory = (agent: FlatAgent) => agent.uniqueIdentifier;
|
||||
const keyFactory = (agent: FlatAgent) => agent.universalIdentifier;
|
||||
|
||||
const fromAgentMap = transformMetadataForComparison(fromFlatAgents, {
|
||||
shouldIgnoreProperty: (property) =>
|
||||
@@ -45,12 +45,12 @@ export class WorkspaceAgentComparator {
|
||||
const agentDifferences = diff(fromAgentMap, toAgentMap);
|
||||
|
||||
for (const difference of agentDifferences) {
|
||||
const uniqueIdentifier = difference.path[0] as string;
|
||||
const universalIdentifier = difference.path[0] as string;
|
||||
|
||||
switch (difference.type) {
|
||||
case 'CREATE': {
|
||||
const toAgent = toFlatAgents.find(
|
||||
(agent) => keyFactory(agent) === uniqueIdentifier,
|
||||
(agent) => keyFactory(agent) === universalIdentifier,
|
||||
);
|
||||
|
||||
if (toAgent) {
|
||||
@@ -63,10 +63,10 @@ export class WorkspaceAgentComparator {
|
||||
}
|
||||
case 'CHANGE': {
|
||||
const fromAgent = fromFlatAgents.find(
|
||||
(agent) => keyFactory(agent) === uniqueIdentifier,
|
||||
(agent) => keyFactory(agent) === universalIdentifier,
|
||||
);
|
||||
const toAgent = toFlatAgents.find(
|
||||
(agent) => keyFactory(agent) === uniqueIdentifier,
|
||||
(agent) => keyFactory(agent) === universalIdentifier,
|
||||
);
|
||||
|
||||
if (fromAgent && toAgent) {
|
||||
@@ -82,7 +82,7 @@ export class WorkspaceAgentComparator {
|
||||
}
|
||||
case 'REMOVE': {
|
||||
const fromAgent = fromFlatAgents.find(
|
||||
(agent) => keyFactory(agent) === uniqueIdentifier,
|
||||
(agent) => keyFactory(agent) === universalIdentifier,
|
||||
);
|
||||
|
||||
if (fromAgent && difference.path.length === 1) {
|
||||
|
||||
+5
-5
@@ -65,12 +65,12 @@ export class WorkspaceRoleComparator {
|
||||
const roleDifferences = diff(fromRoleMap, toRoleMap);
|
||||
|
||||
for (const difference of roleDifferences) {
|
||||
const uniqueIdentifier = difference.path[0] as string;
|
||||
const universalIdentifier = difference.path[0] as string;
|
||||
|
||||
switch (difference.type) {
|
||||
case 'CREATE': {
|
||||
const toRole = toFlatRoles.find(
|
||||
(role) => keyFactory(role) === uniqueIdentifier,
|
||||
(role) => keyFactory(role) === universalIdentifier,
|
||||
);
|
||||
|
||||
if (toRole) {
|
||||
@@ -84,10 +84,10 @@ export class WorkspaceRoleComparator {
|
||||
}
|
||||
case 'CHANGE': {
|
||||
const fromRole = fromFlatRoles.find(
|
||||
(role) => keyFactory(role) === uniqueIdentifier,
|
||||
(role) => keyFactory(role) === universalIdentifier,
|
||||
);
|
||||
const toRole = toFlatRoles.find(
|
||||
(role) => keyFactory(role) === uniqueIdentifier,
|
||||
(role) => keyFactory(role) === universalIdentifier,
|
||||
);
|
||||
|
||||
if (fromRole && toRole) {
|
||||
@@ -101,7 +101,7 @@ export class WorkspaceRoleComparator {
|
||||
}
|
||||
case 'REMOVE': {
|
||||
const fromRole = fromFlatRoles.find(
|
||||
(role) => keyFactory(role) === uniqueIdentifier,
|
||||
(role) => keyFactory(role) === universalIdentifier,
|
||||
);
|
||||
|
||||
if (fromRole && difference.path.length === 1) {
|
||||
|
||||
+2
-2
@@ -30,12 +30,12 @@ export class StandardAgentFactory {
|
||||
computedAgents.push({
|
||||
...flatAgent,
|
||||
id: existingAgent.id,
|
||||
uniqueIdentifier: agentDefinition.standardId,
|
||||
universalIdentifier: agentDefinition.standardId,
|
||||
});
|
||||
} else {
|
||||
computedAgents.push({
|
||||
...flatAgent,
|
||||
uniqueIdentifier: agentDefinition.standardId,
|
||||
universalIdentifier: agentDefinition.standardId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -30,12 +30,12 @@ export class StandardRoleFactory {
|
||||
computedRoles.push({
|
||||
...flatRole,
|
||||
id: existingRole.id,
|
||||
uniqueIdentifier: roleDefinition.standardId || existingRole.id,
|
||||
universalIdentifier: roleDefinition.standardId || existingRole.id,
|
||||
});
|
||||
} else {
|
||||
computedRoles.push({
|
||||
...flatRole,
|
||||
uniqueIdentifier: roleDefinition.standardId,
|
||||
universalIdentifier: roleDefinition.standardId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -66,7 +66,7 @@ export class WorkspaceSyncAgentService {
|
||||
const agentToCreate = agentComparatorResult.object;
|
||||
|
||||
const flatAgentData = removePropertiesFromRecord(agentToCreate, [
|
||||
'uniqueIdentifier',
|
||||
'universalIdentifier',
|
||||
'id',
|
||||
]);
|
||||
|
||||
@@ -97,7 +97,7 @@ export class WorkspaceSyncAgentService {
|
||||
|
||||
const flatAgentData = removePropertiesFromRecord(agentToUpdate, [
|
||||
'id',
|
||||
'uniqueIdentifier',
|
||||
'universalIdentifier',
|
||||
'workspaceId',
|
||||
]);
|
||||
|
||||
|
||||
+2
-2
@@ -53,7 +53,7 @@ export class WorkspaceSyncRoleService {
|
||||
const roleToCreate = roleComparatorResult.toFlatRole;
|
||||
|
||||
const flatRoleData = removePropertiesFromRecord(roleToCreate, [
|
||||
'uniqueIdentifier',
|
||||
'universalIdentifier',
|
||||
'id',
|
||||
]);
|
||||
|
||||
@@ -69,7 +69,7 @@ export class WorkspaceSyncRoleService {
|
||||
|
||||
const flatRoleData = removePropertiesFromRecord(roleToUpdate, [
|
||||
'id',
|
||||
'uniqueIdentifier',
|
||||
'universalIdentifier',
|
||||
'workspaceId',
|
||||
]);
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { type FlatAgent } from 'src/engine/metadata-modules/flat-agent/types/fla
|
||||
|
||||
export type StandardAgentDefinition = Omit<
|
||||
FlatAgent,
|
||||
'id' | 'workspaceId' | 'uniqueIdentifier' | 'standardId'
|
||||
'id' | 'workspaceId' | 'universalIdentifier' | 'standardId'
|
||||
> & {
|
||||
standardId: string;
|
||||
};
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { type FlatRole } from 'src/engine/metadata-modules/flat-role/types/flat-
|
||||
|
||||
export type StandardRoleDefinition = Omit<
|
||||
FlatRole,
|
||||
'id' | 'workspaceId' | 'uniqueIdentifier' | 'standardId'
|
||||
'id' | 'workspaceId' | 'universalIdentifier' | 'standardId'
|
||||
> & {
|
||||
standardId: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user