Connect logic in Workspace Entity Manager (#13078)

Large PR, sorry for that. Don't hesitate to reach me to have full
context (env. 500lines for integration and unit tests)

- Add connect logic in Workspace Entity Manager
- Update QueryDeepPartialEntity type to enable dev to use connect
- Add integration test on createOne / createMany
- Add unit test to cover main utils
- Remove feature flag on connect

closes https://github.com/twentyhq/core-team-issues/issues/1148
closes https://github.com/twentyhq/core-team-issues/issues/1147
This commit is contained in:
Etienne
2025-07-09 14:16:28 +02:00
committed by GitHub
parent a95ca10f29
commit fce33004bc
27 changed files with 1293 additions and 80 deletions

View File

@ -1,8 +1,12 @@
import { CustomException } from 'src/utils/custom-exception';
export class TwentyORMException extends CustomException {
constructor(message: string, code: TwentyORMExceptionCode) {
super(message, code);
constructor(
message: string,
code: TwentyORMExceptionCode,
{ userFriendlyMessage }: { userFriendlyMessage?: string } = {},
) {
super(message, code, userFriendlyMessage);
}
}
@ -14,4 +18,7 @@ export enum TwentyORMExceptionCode {
USER_WORKSPACE_ROLE_MAP_VERSION_NOT_FOUND = 'USER_WORKSPACE_ROLE_MAP_VERSION_NOT_FOUND',
MALFORMED_METADATA = 'MALFORMED_METADATA',
WORKSPACE_NOT_FOUND = 'WORKSPACE_NOT_FOUND',
CONNECT_RECORD_NOT_FOUND = 'CONNECT_RECORD_NOT_FOUND',
CONNECT_NOT_ALLOWED = 'CONNECT_NOT_ALLOWED',
CONNECT_UNIQUE_CONSTRAINT_ERROR = 'CONNECT_UNIQUE_CONSTRAINT_ERROR',
}