From d752b4588e62a675fa3ddbd56bfd79e41e879141 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Thu, 12 Sep 2024 19:36:49 +0200 Subject: [PATCH 01/16] Fix --- .../database/typeorm/core/core.datasource.ts | 2 +- .../graphql-config/graphql-config.service.ts | 19 +++++---- .../rest-api-core-batch.controller.ts | 4 +- .../controllers/rest-api-core.controller.ts | 4 +- .../ai-sql-query/ai-sql-query.resolver.ts | 5 ++- .../analytics/analytics.resolver.ts | 15 +++---- .../app-token/app-token.auto-resolver-opts.ts | 4 +- .../hooks/before-create-one-app-token.hook.ts | 2 +- .../engine/core-modules/auth/auth.resolver.ts | 15 +++---- .../auth/services/token.service.ts | 4 +- .../auth/strategies/jwt.auth.strategy.ts | 3 +- .../core-modules/billing/billing.resolver.ts | 9 +++-- .../timeline-calendar-event.resolver.ts | 4 +- .../resolvers/file-upload.resolver.ts | 4 +- .../messaging/timeline-messaging.resolver.ts | 5 ++- .../onboarding/onboarding.resolver.ts | 5 ++- .../postgres-credentials.resolver.ts | 10 ++--- .../user-workspace/user-workspace.resolver.ts | 10 ++--- .../user/user.auto-resolver-opts.ts | 6 +-- .../engine/core-modules/user/user.resolver.ts | 8 ++-- .../workflow/workflow-trigger.resolver.ts | 5 ++- .../workspace/workspace.auto-resolver-opts.ts | 4 +- .../workspace/workspace.resolver.ts | 8 ++-- .../decorators/auth/auth-user.decorator.ts | 4 +- .../auth/auth-workspace.decorator.ts | 2 +- .../src/engine/guards/demo.env.guard.ts | 28 ++++++------- .../src/engine/guards/jwt.auth.guard.ts | 40 ------------------- .../engine/guards/optional-jwt.auth.guard.ts | 23 ----------- .../src/engine/guards/user-auth.guard copy.ts | 15 +++++++ .../src/engine/guards/workspace-auth.guard.ts | 15 +++++++ .../field-metadata/dtos/field-metadata.dto.ts | 2 +- .../field-metadata/field-metadata.module.ts | 4 +- .../field-metadata/field-metadata.resolver.ts | 4 +- .../dtos/object-metadata.dto.ts | 2 +- .../hooks/before-create-one-object.hook.ts | 2 +- .../hooks/before-delete-one-object.hook.ts | 2 +- .../object-metadata/object-metadata.module.ts | 4 +- .../object-metadata.resolver.ts | 8 ++-- .../dtos/relation-metadata.dto.ts | 10 ++--- .../hooks/before-create-one-relation.hook.ts | 2 +- .../hooks/before-delete-one-relation.hook.ts | 2 +- .../relation-metadata.module.ts | 4 +- .../relation-metadata.resolver.ts | 10 ++--- .../remote-server/remote-server.resolver.ts | 6 +-- .../remote-table/remote-table.resolver.ts | 4 +- .../dtos/serverless-function.dto.ts | 2 +- .../serverless-function.module.ts | 6 +-- .../serverless-function.resolver.ts | 10 ++--- .../twenty-server/test/company.e2e-spec.ts | 4 +- 49 files changed, 172 insertions(+), 198 deletions(-) delete mode 100644 packages/twenty-server/src/engine/guards/jwt.auth.guard.ts delete mode 100644 packages/twenty-server/src/engine/guards/optional-jwt.auth.guard.ts create mode 100644 packages/twenty-server/src/engine/guards/user-auth.guard copy.ts create mode 100644 packages/twenty-server/src/engine/guards/workspace-auth.guard.ts diff --git a/packages/twenty-server/src/database/typeorm/core/core.datasource.ts b/packages/twenty-server/src/database/typeorm/core/core.datasource.ts index 1260f9bcf01d..64ef5a5d0233 100644 --- a/packages/twenty-server/src/database/typeorm/core/core.datasource.ts +++ b/packages/twenty-server/src/database/typeorm/core/core.datasource.ts @@ -7,7 +7,7 @@ config(); export const typeORMCoreModuleOptions: TypeOrmModuleOptions = { url: process.env.PG_DATABASE_URL, type: 'postgres', - logging: ['error'], + logging: ['error', 'query'], schema: 'core', entities: ['dist/src/engine/core-modules/**/*.entity{.ts,.js}'], synchronize: false, diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-config/graphql-config.service.ts b/packages/twenty-server/src/engine/api/graphql/graphql-config/graphql-config.service.ts index 39dcda62f7d9..062aebe47cda 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-config/graphql-config.service.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-config/graphql-config.service.ts @@ -17,12 +17,12 @@ import { WorkspaceSchemaFactory } from 'src/engine/api/graphql/workspace-schema. import { TokenService } from 'src/engine/core-modules/auth/services/token.service'; import { AuthContext } from 'src/engine/core-modules/auth/types/auth-context.type'; import { CoreEngineModule } from 'src/engine/core-modules/core-engine.module'; -import { useGraphQLErrorHandlerHook } from 'src/engine/core-modules/graphql/hooks/use-graphql-error-handler.hook'; -import { User } from 'src/engine/core-modules/user/user.entity'; -import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; import { ExceptionHandlerService } from 'src/engine/core-modules/exception-handler/exception-handler.service'; import { useSentryTracing } from 'src/engine/core-modules/exception-handler/hooks/use-sentry-tracing'; +import { useGraphQLErrorHandlerHook } from 'src/engine/core-modules/graphql/hooks/use-graphql-error-handler.hook'; +import { User } from 'src/engine/core-modules/user/user.entity'; +import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { handleExceptionAndConvertToGraphQLError } from 'src/engine/utils/global-exception-handler.util'; import { renderApolloPlayground } from 'src/engine/utils/render-apollo-playground.util'; @@ -69,13 +69,18 @@ export class GraphQLConfigService let workspace: Workspace | undefined; try { - if (!this.tokenService.isTokenPresent(context.req)) { + const { user, workspace, apiKey, workspaceMemberId } = context.req; + + if (!workspace) { return new GraphQLSchema({}); } - const data = await this.tokenService.validateToken(context.req); - - return await this.createSchema(context, data); + return await this.createSchema(context, { + user, + workspace, + apiKey, + workspaceMemberId, + }); } catch (error) { if (error instanceof UnauthorizedException) { throw new GraphQLError('Unauthenticated', { diff --git a/packages/twenty-server/src/engine/api/rest/core/controllers/rest-api-core-batch.controller.ts b/packages/twenty-server/src/engine/api/rest/core/controllers/rest-api-core-batch.controller.ts index b43ef55dd274..16fe7477657e 100644 --- a/packages/twenty-server/src/engine/api/rest/core/controllers/rest-api-core-batch.controller.ts +++ b/packages/twenty-server/src/engine/api/rest/core/controllers/rest-api-core-batch.controller.ts @@ -4,10 +4,10 @@ import { Request, Response } from 'express'; import { RestApiCoreService } from 'src/engine/api/rest/core/rest-api-core.service'; import { cleanGraphQLResponse } from 'src/engine/api/rest/utils/clean-graphql-response.utils'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @Controller('rest/batch/*') -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard) export class RestApiCoreBatchController { constructor(private readonly restApiCoreService: RestApiCoreService) {} diff --git a/packages/twenty-server/src/engine/api/rest/core/controllers/rest-api-core.controller.ts b/packages/twenty-server/src/engine/api/rest/core/controllers/rest-api-core.controller.ts index b23e9ab6f615..30c7fce4e6dc 100644 --- a/packages/twenty-server/src/engine/api/rest/core/controllers/rest-api-core.controller.ts +++ b/packages/twenty-server/src/engine/api/rest/core/controllers/rest-api-core.controller.ts @@ -14,10 +14,10 @@ import { Request, Response } from 'express'; import { RestApiCoreService } from 'src/engine/api/rest/core/rest-api-core.service'; import { cleanGraphQLResponse } from 'src/engine/api/rest/utils/clean-graphql-response.utils'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @Controller('rest/*') -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard) export class RestApiCoreController { constructor(private readonly restApiCoreService: RestApiCoreService) {} diff --git a/packages/twenty-server/src/engine/core-modules/ai-sql-query/ai-sql-query.resolver.ts b/packages/twenty-server/src/engine/core-modules/ai-sql-query/ai-sql-query.resolver.ts index 16f8aff9bf00..813c4f0eca3e 100644 --- a/packages/twenty-server/src/engine/core-modules/ai-sql-query/ai-sql-query.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/ai-sql-query/ai-sql-query.resolver.ts @@ -12,7 +12,8 @@ import { User } from 'src/engine/core-modules/user/user.entity'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { UserAuthGuard } from 'src/engine/guards/user-auth.guard copy'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @ArgsType() class GetAISQLQueryArgs { @@ -20,7 +21,7 @@ class GetAISQLQueryArgs { text: string; } -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard, UserAuthGuard) @Resolver(() => AISQLQueryResult) export class AISQLQueryResolver { constructor( diff --git a/packages/twenty-server/src/engine/core-modules/analytics/analytics.resolver.ts b/packages/twenty-server/src/engine/core-modules/analytics/analytics.resolver.ts index 6233ce683f66..06cd9aabed3b 100644 --- a/packages/twenty-server/src/engine/core-modules/analytics/analytics.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/analytics/analytics.resolver.ts @@ -1,21 +1,18 @@ -import { Resolver, Mutation, Args, Context } from '@nestjs/graphql'; -import { UseGuards } from '@nestjs/common'; +import { Args, Context, Mutation, Resolver } from '@nestjs/graphql'; import { Request } from 'express'; -import { OptionalJwtAuthGuard } from 'src/engine/guards/optional-jwt.auth.guard'; -import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; -import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; -import { User } from 'src/engine/core-modules/user/user.entity'; import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; +import { User } from 'src/engine/core-modules/user/user.entity'; +import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; +import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; +import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { AnalyticsService } from './analytics.service'; import { Analytics } from './analytics.entity'; +import { AnalyticsService } from './analytics.service'; import { CreateAnalyticsInput } from './dtos/create-analytics.input'; -@UseGuards(OptionalJwtAuthGuard) @Resolver(() => Analytics) export class AnalyticsResolver { constructor( diff --git a/packages/twenty-server/src/engine/core-modules/app-token/app-token.auto-resolver-opts.ts b/packages/twenty-server/src/engine/core-modules/app-token/app-token.auto-resolver-opts.ts index 651fc08c61b5..f431a2e8ab9a 100644 --- a/packages/twenty-server/src/engine/core-modules/app-token/app-token.auto-resolver-opts.ts +++ b/packages/twenty-server/src/engine/core-modules/app-token/app-token.auto-resolver-opts.ts @@ -6,7 +6,7 @@ import { import { AppToken } from 'src/engine/core-modules/app-token/app-token.entity'; import { CreateAppTokenInput } from 'src/engine/core-modules/app-token/dtos/create-app-token.input'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; export const appTokenAutoResolverOpts: AutoResolverOpts< any, @@ -34,6 +34,6 @@ export const appTokenAutoResolverOpts: AutoResolverOpts< one: { disabled: true }, }, delete: { many: { disabled: true }, one: { disabled: true } }, - guards: [JwtAuthGuard], + guards: [WorkspaceAuthGuard], }, ]; diff --git a/packages/twenty-server/src/engine/core-modules/app-token/hooks/before-create-one-app-token.hook.ts b/packages/twenty-server/src/engine/core-modules/app-token/hooks/before-create-one-app-token.hook.ts index 01399f21e4dc..0927ee8de7b4 100644 --- a/packages/twenty-server/src/engine/core-modules/app-token/hooks/before-create-one-app-token.hook.ts +++ b/packages/twenty-server/src/engine/core-modules/app-token/hooks/before-create-one-app-token.hook.ts @@ -13,7 +13,7 @@ export class BeforeCreateOneAppToken instance: CreateOneInputType, context: any, ): Promise> { - const userId = context?.req?.user?.user?.id; + const userId = context?.req?.user?.id; instance.input.userId = userId; // FIXME: These fields should be autogenerated, we need to run a migration for this diff --git a/packages/twenty-server/src/engine/core-modules/auth/auth.resolver.ts b/packages/twenty-server/src/engine/core-modules/auth/auth.resolver.ts index 6dbcd832a451..ac3193182ed8 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/auth.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/auth.resolver.ts @@ -16,13 +16,14 @@ import { UpdatePasswordViaResetTokenInput } from 'src/engine/core-modules/auth/d import { ValidatePasswordResetToken } from 'src/engine/core-modules/auth/dto/validate-password-reset-token.entity'; import { ValidatePasswordResetTokenInput } from 'src/engine/core-modules/auth/dto/validate-password-reset-token.input'; import { AuthGraphqlApiExceptionFilter } from 'src/engine/core-modules/auth/filters/auth-graphql-api-exception.filter'; +import { CaptchaGuard } from 'src/engine/core-modules/captcha/captcha.guard'; import { UserService } from 'src/engine/core-modules/user/services/user.service'; import { User } from 'src/engine/core-modules/user/user.entity'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; -import { CaptchaGuard } from 'src/engine/core-modules/captcha/captcha.guard'; +import { UserAuthGuard } from 'src/engine/guards/user-auth.guard copy'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { ChallengeInput } from './dto/challenge.input'; import { ImpersonateInput } from './dto/impersonate.input'; @@ -111,7 +112,7 @@ export class AuthResolver { } @Mutation(() => TransientToken) - @UseGuards(JwtAuthGuard) + @UseGuards(WorkspaceAuthGuard, UserAuthGuard) async generateTransientToken( @AuthUser() user: User, ): Promise { @@ -141,7 +142,7 @@ export class AuthResolver { } @Mutation(() => AuthorizeApp) - @UseGuards(JwtAuthGuard) + @UseGuards(WorkspaceAuthGuard, UserAuthGuard) async authorizeApp( @Args() authorizeAppInput: AuthorizeAppInput, @AuthUser() user: User, @@ -155,7 +156,7 @@ export class AuthResolver { } @Mutation(() => AuthTokens) - @UseGuards(JwtAuthGuard) + @UseGuards(WorkspaceAuthGuard, UserAuthGuard) async generateJWT( @AuthUser() user: User, @Args() args: GenerateJwtInput, @@ -177,7 +178,7 @@ export class AuthResolver { return { tokens: tokens }; } - @UseGuards(JwtAuthGuard) + @UseGuards(WorkspaceAuthGuard, UserAuthGuard) @Mutation(() => Verify) async impersonate( @Args() impersonateInput: ImpersonateInput, @@ -186,7 +187,7 @@ export class AuthResolver { return await this.authService.impersonate(impersonateInput.userId, user); } - @UseGuards(JwtAuthGuard) + @UseGuards(WorkspaceAuthGuard) @Mutation(() => ApiKeyToken) async generateApiKeyToken( @Args() args: ApiKeyTokenInput, diff --git a/packages/twenty-server/src/engine/core-modules/auth/services/token.service.ts b/packages/twenty-server/src/engine/core-modules/auth/services/token.service.ts index 2189ddb41045..abc0befea9e5 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/services/token.service.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/services/token.service.ts @@ -36,14 +36,14 @@ import { JwtPayload, } from 'src/engine/core-modules/auth/strategies/jwt.auth.strategy'; import { AuthContext } from 'src/engine/core-modules/auth/types/auth-context.type'; +import { EmailService } from 'src/engine/core-modules/email/email.service'; +import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; import { JwtWrapperService } from 'src/engine/core-modules/jwt/services/jwt-wrapper.service'; import { User } from 'src/engine/core-modules/user/user.entity'; import { Workspace, WorkspaceActivationStatus, } from 'src/engine/core-modules/workspace/workspace.entity'; -import { EmailService } from 'src/engine/core-modules/email/email.service'; -import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; import { TwentyORMGlobalManager } from 'src/engine/twenty-orm/twenty-orm-global.manager'; import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/standard-objects/workspace-member.workspace-entity'; diff --git a/packages/twenty-server/src/engine/core-modules/auth/strategies/jwt.auth.strategy.ts b/packages/twenty-server/src/engine/core-modules/auth/strategies/jwt.auth.strategy.ts index 3a81540048ef..64eeac4a7839 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/strategies/jwt.auth.strategy.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/strategies/jwt.auth.strategy.ts @@ -11,9 +11,9 @@ import { AuthExceptionCode, } from 'src/engine/core-modules/auth/auth.exception'; import { AuthContext } from 'src/engine/core-modules/auth/types/auth-context.type'; +import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; import { User } from 'src/engine/core-modules/user/user.entity'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; -import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; import { DataSourceService } from 'src/engine/metadata-modules/data-source/data-source.service'; import { ApiKeyWorkspaceEntity } from 'src/modules/api-key/standard-objects/api-key.workspace-entity'; @@ -90,7 +90,6 @@ export class JwtAuthStrategy extends PassportStrategy(Strategy, 'jwt') { if (payload.workspaceId) { user = await this.userRepository.findOne({ where: { id: payload.sub }, - relations: ['defaultWorkspace'], }); if (!user) { throw new AuthException( diff --git a/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts b/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts index a60992cc7090..d466b8620d72 100644 --- a/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts @@ -16,7 +16,8 @@ import { User } from 'src/engine/core-modules/user/user.entity'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { UserAuthGuard } from 'src/engine/guards/user-auth.guard copy'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @Resolver() export class BillingResolver { @@ -37,7 +38,7 @@ export class BillingResolver { } @Query(() => SessionEntity) - @UseGuards(JwtAuthGuard) + @UseGuards(WorkspaceAuthGuard, UserAuthGuard) async billingPortalSession( @AuthUser() user: User, @Args() { returnUrlPath }: BillingSessionInput, @@ -51,7 +52,7 @@ export class BillingResolver { } @Mutation(() => SessionEntity) - @UseGuards(JwtAuthGuard) + @UseGuards(WorkspaceAuthGuard, UserAuthGuard) async checkoutSession( @AuthWorkspace() workspace: Workspace, @AuthUser() user: User, @@ -79,7 +80,7 @@ export class BillingResolver { } @Mutation(() => UpdateBillingEntity) - @UseGuards(JwtAuthGuard) + @UseGuards(WorkspaceAuthGuard) async updateBillingSubscription(@AuthUser() user: User) { await this.billingSubscriptionService.applyBillingSubscription(user); diff --git a/packages/twenty-server/src/engine/core-modules/calendar/timeline-calendar-event.resolver.ts b/packages/twenty-server/src/engine/core-modules/calendar/timeline-calendar-event.resolver.ts index 585551291b06..c6656e0ef36d 100644 --- a/packages/twenty-server/src/engine/core-modules/calendar/timeline-calendar-event.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/calendar/timeline-calendar-event.resolver.ts @@ -7,7 +7,7 @@ import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/ import { TIMELINE_CALENDAR_EVENTS_MAX_PAGE_SIZE } from 'src/engine/core-modules/calendar/constants/calendar.constants'; import { TimelineCalendarEventsWithTotal } from 'src/engine/core-modules/calendar/dtos/timeline-calendar-events-with-total.dto'; import { TimelineCalendarEventService } from 'src/engine/core-modules/calendar/timeline-calendar-event.service'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @ArgsType() class GetTimelineCalendarEventsFromPersonIdArgs { @@ -35,7 +35,7 @@ class GetTimelineCalendarEventsFromCompanyIdArgs { pageSize: number; } -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard) @Resolver(() => TimelineCalendarEventsWithTotal) export class TimelineCalendarEventResolver { constructor( diff --git a/packages/twenty-server/src/engine/core-modules/file/file-upload/resolvers/file-upload.resolver.ts b/packages/twenty-server/src/engine/core-modules/file/file-upload/resolvers/file-upload.resolver.ts index 8e5bae9400cd..41d8739a1cb6 100644 --- a/packages/twenty-server/src/engine/core-modules/file/file-upload/resolvers/file-upload.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/file/file-upload/resolvers/file-upload.resolver.ts @@ -9,10 +9,10 @@ import { FileUploadService } from 'src/engine/core-modules/file/file-upload/serv import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; import { DemoEnvGuard } from 'src/engine/guards/demo.env.guard'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { streamToBuffer } from 'src/utils/stream-to-buffer'; -@UseGuards(JwtAuthGuard, DemoEnvGuard) +@UseGuards(WorkspaceAuthGuard, DemoEnvGuard) @Resolver() export class FileUploadResolver { constructor(private readonly fileUploadService: FileUploadService) {} diff --git a/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts b/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts index 33a3a3caeba4..c8e9eac59715 100644 --- a/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts @@ -10,7 +10,8 @@ import { GetMessagesService } from 'src/engine/core-modules/messaging/services/g import { UserService } from 'src/engine/core-modules/user/services/user.service'; import { User } from 'src/engine/core-modules/user/user.entity'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { UserAuthGuard } from 'src/engine/guards/user-auth.guard copy'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @ArgsType() class GetTimelineThreadsFromPersonIdArgs { @@ -38,7 +39,7 @@ class GetTimelineThreadsFromCompanyIdArgs { pageSize: number; } -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard, UserAuthGuard) @Resolver(() => TimelineThreadsWithTotal) export class TimelineMessagingResolver { constructor( diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts index fcc0a89a73dd..24710e7f9409 100644 --- a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts @@ -7,9 +7,10 @@ import { User } from 'src/engine/core-modules/user/user.entity'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { UserAuthGuard } from 'src/engine/guards/user-auth.guard copy'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard, UserAuthGuard) @Resolver() export class OnboardingResolver { constructor(private readonly onboardingService: OnboardingService) {} diff --git a/packages/twenty-server/src/engine/core-modules/postgres-credentials/postgres-credentials.resolver.ts b/packages/twenty-server/src/engine/core-modules/postgres-credentials/postgres-credentials.resolver.ts index 2dece160639e..b8a6499ec457 100644 --- a/packages/twenty-server/src/engine/core-modules/postgres-credentials/postgres-credentials.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/postgres-credentials/postgres-credentials.resolver.ts @@ -1,11 +1,11 @@ import { UseGuards } from '@nestjs/common'; -import { Resolver, Mutation, Query } from '@nestjs/graphql'; +import { Mutation, Query, Resolver } from '@nestjs/graphql'; import { PostgresCredentialsDTO } from 'src/engine/core-modules/postgres-credentials/dtos/postgres-credentials.dto'; import { PostgresCredentialsService } from 'src/engine/core-modules/postgres-credentials/postgres-credentials.service'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @Resolver(() => PostgresCredentialsDTO) export class PostgresCredentialsResolver { @@ -13,19 +13,19 @@ export class PostgresCredentialsResolver { private readonly postgresCredentialsService: PostgresCredentialsService, ) {} - @UseGuards(JwtAuthGuard) + @UseGuards(WorkspaceAuthGuard) @Mutation(() => PostgresCredentialsDTO) async enablePostgresProxy(@AuthWorkspace() { id: workspaceId }: Workspace) { return this.postgresCredentialsService.enablePostgresProxy(workspaceId); } - @UseGuards(JwtAuthGuard) + @UseGuards(WorkspaceAuthGuard) @Mutation(() => PostgresCredentialsDTO) async disablePostgresProxy(@AuthWorkspace() { id: workspaceId }: Workspace) { return this.postgresCredentialsService.disablePostgresProxy(workspaceId); } - @UseGuards(JwtAuthGuard) + @UseGuards(WorkspaceAuthGuard) @Query(() => PostgresCredentialsDTO, { nullable: true }) async getPostgresCredentials( @AuthWorkspace() { id: workspaceId }: Workspace, diff --git a/packages/twenty-server/src/engine/core-modules/user-workspace/user-workspace.resolver.ts b/packages/twenty-server/src/engine/core-modules/user-workspace/user-workspace.resolver.ts index 065e0c4bd1d0..738b6024172a 100644 --- a/packages/twenty-server/src/engine/core-modules/user-workspace/user-workspace.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/user-workspace/user-workspace.resolver.ts @@ -4,15 +4,15 @@ import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceInviteHashValidInput } from 'src/engine/core-modules/auth/dto/workspace-invite-hash.input'; import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity'; -import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; +import { UserWorkspaceService } from 'src/engine/core-modules/user-workspace/user-workspace.service'; import { User } from 'src/engine/core-modules/user/user.entity'; -import { WorkspaceInviteHashValidInput } from 'src/engine/core-modules/auth/dto/workspace-invite-hash.input'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; -import { UserWorkspaceService } from 'src/engine/core-modules/user-workspace/user-workspace.service'; +import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard) @Resolver(() => UserWorkspace) export class UserWorkspaceResolver { constructor( diff --git a/packages/twenty-server/src/engine/core-modules/user/user.auto-resolver-opts.ts b/packages/twenty-server/src/engine/core-modules/user/user.auto-resolver-opts.ts index eeb6b95bbb25..b5ff2c2c3c22 100644 --- a/packages/twenty-server/src/engine/core-modules/user/user.auto-resolver-opts.ts +++ b/packages/twenty-server/src/engine/core-modules/user/user.auto-resolver-opts.ts @@ -1,11 +1,11 @@ import { AutoResolverOpts, - ReadResolverOpts, PagingStrategies, + ReadResolverOpts, } from '@ptc-org/nestjs-query-graphql'; import { User } from 'src/engine/core-modules/user/user.entity'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; export const userAutoResolverOpts: AutoResolverOpts< any, @@ -33,6 +33,6 @@ export const userAutoResolverOpts: AutoResolverOpts< one: { disabled: true }, }, delete: { many: { disabled: true }, one: { disabled: true } }, - guards: [JwtAuthGuard], + guards: [WorkspaceAuthGuard], }, ]; diff --git a/packages/twenty-server/src/engine/core-modules/user/user.resolver.ts b/packages/twenty-server/src/engine/core-modules/user/user.resolver.ts index 872ab7321bf3..f779b23db184 100644 --- a/packages/twenty-server/src/engine/core-modules/user/user.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/user/user.resolver.ts @@ -16,9 +16,10 @@ import { GraphQLJSONObject } from 'graphql-type-json'; import { FileUpload, GraphQLUpload } from 'graphql-upload'; import { Repository } from 'typeorm'; -import { FileFolder } from 'src/engine/core-modules/file/interfaces/file-folder.interface'; import { SupportDriver } from 'src/engine/core-modules/environment/interfaces/support.interface'; +import { FileFolder } from 'src/engine/core-modules/file/interfaces/file-folder.interface'; +import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; import { FileUploadService } from 'src/engine/core-modules/file/file-upload/services/file-upload.service'; import { FileService } from 'src/engine/core-modules/file/services/file.service'; import { OnboardingStatus } from 'src/engine/core-modules/onboarding/enums/onboarding-status.enum'; @@ -31,8 +32,7 @@ import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; import { DemoEnvGuard } from 'src/engine/guards/demo.env.guard'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; -import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { streamToBuffer } from 'src/utils/stream-to-buffer'; const getHMACKey = (email?: string, key?: string | null) => { @@ -43,7 +43,7 @@ const getHMACKey = (email?: string, key?: string | null) => { return hmac.update(email).digest('hex'); }; -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard) @Resolver(() => User) export class UserResolver { constructor( diff --git a/packages/twenty-server/src/engine/core-modules/workflow/workflow-trigger.resolver.ts b/packages/twenty-server/src/engine/core-modules/workflow/workflow-trigger.resolver.ts index ef2c735a389c..e06118947127 100644 --- a/packages/twenty-server/src/engine/core-modules/workflow/workflow-trigger.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/workflow/workflow-trigger.resolver.ts @@ -7,11 +7,12 @@ import { WorkflowRunDTO } from 'src/engine/core-modules/workflow/dtos/workflow-r import { WorkflowTriggerGraphqlApiExceptionFilter } from 'src/engine/core-modules/workflow/filters/workflow-trigger-graphql-api-exception.filter'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspaceMemberId } from 'src/engine/decorators/auth/auth-workspace-member-id.decorator'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { UserAuthGuard } from 'src/engine/guards/user-auth.guard copy'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { WorkflowTriggerWorkspaceService } from 'src/modules/workflow/workflow-trigger/workspace-services/workflow-trigger.workspace-service'; @Resolver() -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard, UserAuthGuard) @UseFilters(WorkflowTriggerGraphqlApiExceptionFilter) export class WorkflowTriggerResolver { constructor( diff --git a/packages/twenty-server/src/engine/core-modules/workspace/workspace.auto-resolver-opts.ts b/packages/twenty-server/src/engine/core-modules/workspace/workspace.auto-resolver-opts.ts index 50f7a0a5aa13..1f136422cf26 100644 --- a/packages/twenty-server/src/engine/core-modules/workspace/workspace.auto-resolver-opts.ts +++ b/packages/twenty-server/src/engine/core-modules/workspace/workspace.auto-resolver-opts.ts @@ -4,8 +4,8 @@ import { ReadResolverOpts, } from '@ptc-org/nestjs-query-graphql'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; import { UpdateWorkspaceInput } from 'src/engine/core-modules/workspace/dtos/update-workspace-input'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { Workspace } from './workspace.entity'; @@ -36,6 +36,6 @@ export const workspaceAutoResolverOpts: AutoResolverOpts< many: { disabled: true }, }, delete: { many: { disabled: true }, one: { disabled: true } }, - guards: [JwtAuthGuard], + guards: [WorkspaceAuthGuard], }, ]; diff --git a/packages/twenty-server/src/engine/core-modules/workspace/workspace.resolver.ts b/packages/twenty-server/src/engine/core-modules/workspace/workspace.resolver.ts index 4b9012a389c8..9f7cfc3dcf04 100644 --- a/packages/twenty-server/src/engine/core-modules/workspace/workspace.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/workspace/workspace.resolver.ts @@ -25,7 +25,8 @@ import { UpdateWorkspaceInput } from 'src/engine/core-modules/workspace/dtos/upd import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; import { DemoEnvGuard } from 'src/engine/guards/demo.env.guard'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { UserAuthGuard } from 'src/engine/guards/user-auth.guard copy'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { assert } from 'src/utils/assert'; import { streamToBuffer } from 'src/utils/stream-to-buffer'; @@ -33,7 +34,7 @@ import { Workspace } from './workspace.entity'; import { WorkspaceService } from './services/workspace.service'; -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard) @Resolver(() => Workspace) export class WorkspaceResolver { constructor( @@ -54,7 +55,7 @@ export class WorkspaceResolver { } @Mutation(() => Workspace) - @UseGuards(JwtAuthGuard) + @UseGuards(UserAuthGuard) async activateWorkspace( @Args('data') data: ActivateWorkspaceInput, @AuthUser() user: User, @@ -139,6 +140,7 @@ export class WorkspaceResolver { } @Mutation(() => SendInviteLink) + @UseGuards(UserAuthGuard) async sendInviteLink( @Args() sendInviteLinkInput: SendInviteLinkInput, @AuthUser() user: User, diff --git a/packages/twenty-server/src/engine/decorators/auth/auth-user.decorator.ts b/packages/twenty-server/src/engine/decorators/auth/auth-user.decorator.ts index 77248f4fd422..75f3a982e949 100644 --- a/packages/twenty-server/src/engine/decorators/auth/auth-user.decorator.ts +++ b/packages/twenty-server/src/engine/decorators/auth/auth-user.decorator.ts @@ -14,10 +14,10 @@ export const AuthUser = createParamDecorator( (options: DecoratorOptions | undefined, ctx: ExecutionContext) => { const request = getRequest(ctx); - if (!options?.allowUndefined && (!request.user || !request.user.user)) { + if (!options?.allowUndefined && !request.user) { throw new ForbiddenException("You're not authorized to do this"); } - return request.user ? request.user.user : undefined; + return request.user; }, ); diff --git a/packages/twenty-server/src/engine/decorators/auth/auth-workspace.decorator.ts b/packages/twenty-server/src/engine/decorators/auth/auth-workspace.decorator.ts index f8fb2d35a388..3cbbf02d4d2b 100644 --- a/packages/twenty-server/src/engine/decorators/auth/auth-workspace.decorator.ts +++ b/packages/twenty-server/src/engine/decorators/auth/auth-workspace.decorator.ts @@ -6,6 +6,6 @@ export const AuthWorkspace = createParamDecorator( (data: unknown, ctx: ExecutionContext) => { const request = getRequest(ctx); - return request.user ? request.user.workspace : undefined; + return request.workspace; }, ); diff --git a/packages/twenty-server/src/engine/guards/demo.env.guard.ts b/packages/twenty-server/src/engine/guards/demo.env.guard.ts index 5a64ff235ecc..a1cade4baf8e 100644 --- a/packages/twenty-server/src/engine/guards/demo.env.guard.ts +++ b/packages/twenty-server/src/engine/guards/demo.env.guard.ts @@ -1,27 +1,25 @@ import { - Injectable, + CanActivate, ExecutionContext, UnauthorizedException, } from '@nestjs/common'; -import { AuthGuard } from '@nestjs/passport'; +import { GqlExecutionContext } from '@nestjs/graphql'; + +import { Observable } from 'rxjs'; import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; -import { getRequest } from 'src/utils/extract-request'; -@Injectable() -export class DemoEnvGuard extends AuthGuard(['jwt']) { - constructor(private readonly environmentService: EnvironmentService) { - super(); - } +export class DemoEnvGuard implements CanActivate { + constructor(private readonly environmentService: EnvironmentService) {} - getRequest(context: ExecutionContext) { - return getRequest(context); - } + canActivate( + context: ExecutionContext, + ): boolean | Promise | Observable { + const ctx = GqlExecutionContext.create(context); + const request = ctx.getContext().req; - // TODO: input should be typed - handleRequest(err: any, user: any) { const demoWorkspaceIds = this.environmentService.get('DEMO_WORKSPACE_IDS'); - const currentUserWorkspaceId = user?.workspace?.id; + const currentUserWorkspaceId = request.workspace?.id; if (!currentUserWorkspaceId) { throw new UnauthorizedException('Unauthorized for not logged in user'); @@ -31,6 +29,6 @@ export class DemoEnvGuard extends AuthGuard(['jwt']) { throw new UnauthorizedException('Unauthorized for demo workspace'); } - return user; + return true; } } diff --git a/packages/twenty-server/src/engine/guards/jwt.auth.guard.ts b/packages/twenty-server/src/engine/guards/jwt.auth.guard.ts deleted file mode 100644 index dff0a5376b13..000000000000 --- a/packages/twenty-server/src/engine/guards/jwt.auth.guard.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { - ExecutionContext, - Injectable, - UnauthorizedException, -} from '@nestjs/common'; -import { AuthGuard } from '@nestjs/passport'; - -import { JsonWebTokenError } from 'jsonwebtoken'; - -import { assert } from 'src/utils/assert'; -import { getRequest } from 'src/utils/extract-request'; - -@Injectable() -export class JwtAuthGuard extends AuthGuard(['jwt']) { - constructor() { - super(); - } - - getRequest(context: ExecutionContext) { - return getRequest(context); - } - - handleRequest(err: any, user: any, info: any) { - assert(user, '', UnauthorizedException); - - if (err) { - throw err; - } - - if (info && info instanceof Error) { - if (info instanceof JsonWebTokenError) { - info = String(info); - } - - throw new UnauthorizedException(info); - } - - return user; - } -} diff --git a/packages/twenty-server/src/engine/guards/optional-jwt.auth.guard.ts b/packages/twenty-server/src/engine/guards/optional-jwt.auth.guard.ts deleted file mode 100644 index 6090a55c68c7..000000000000 --- a/packages/twenty-server/src/engine/guards/optional-jwt.auth.guard.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ExecutionContext, Injectable } from '@nestjs/common'; -import { AuthGuard } from '@nestjs/passport'; - -import { getRequest } from 'src/utils/extract-request'; - -@Injectable() -export class OptionalJwtAuthGuard extends AuthGuard(['jwt']) { - constructor() { - super(); - } - - getRequest(context: ExecutionContext) { - const request = getRequest(context); - - return request; - } - - handleRequest(err, user, info) { - if (err || info) return null; - - return user; - } -} diff --git a/packages/twenty-server/src/engine/guards/user-auth.guard copy.ts b/packages/twenty-server/src/engine/guards/user-auth.guard copy.ts new file mode 100644 index 000000000000..8aeef048c036 --- /dev/null +++ b/packages/twenty-server/src/engine/guards/user-auth.guard copy.ts @@ -0,0 +1,15 @@ +import { CanActivate, ExecutionContext } from '@nestjs/common'; +import { GqlExecutionContext } from '@nestjs/graphql'; + +import { Observable } from 'rxjs'; + +export class UserAuthGuard implements CanActivate { + canActivate( + context: ExecutionContext, + ): boolean | Promise | Observable { + const ctx = GqlExecutionContext.create(context); + const request = ctx.getContext().req; + + return request.user !== undefined; + } +} diff --git a/packages/twenty-server/src/engine/guards/workspace-auth.guard.ts b/packages/twenty-server/src/engine/guards/workspace-auth.guard.ts new file mode 100644 index 000000000000..6252d7b6f7e1 --- /dev/null +++ b/packages/twenty-server/src/engine/guards/workspace-auth.guard.ts @@ -0,0 +1,15 @@ +import { CanActivate, ExecutionContext } from '@nestjs/common'; +import { GqlExecutionContext } from '@nestjs/graphql'; + +import { Observable } from 'rxjs'; + +export class WorkspaceAuthGuard implements CanActivate { + canActivate( + context: ExecutionContext, + ): boolean | Promise | Observable { + const ctx = GqlExecutionContext.create(context); + const request = ctx.getContext().req; + + return request.workspace !== undefined; + } +} diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts index 157110b03a71..f5ff84a16378 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts @@ -44,7 +44,7 @@ registerEnumType(FieldMetadataType, { @ObjectType('field') @Authorize({ authorize: (context: any) => ({ - workspaceId: { eq: context?.req?.user?.workspace?.id }, + workspaceId: { eq: context?.req?.workspace?.id }, }), }) @QueryOptions({ diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.module.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.module.ts index 69cde9ae7c94..558a1bab555b 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.module.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.module.ts @@ -9,7 +9,7 @@ import { NestjsQueryTypeOrmModule } from '@ptc-org/nestjs-query-typeorm'; import { TypeORMModule } from 'src/database/typeorm/typeorm.module'; import { ActorModule } from 'src/engine/core-modules/actor/actor.module'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { DataSourceModule } from 'src/engine/metadata-modules/data-source/data-source.module'; import { FieldMetadataDTO } from 'src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto'; import { FieldMetadataResolver } from 'src/engine/metadata-modules/field-metadata/field-metadata.resolver'; @@ -65,7 +65,7 @@ import { UpdateFieldInput } from './dtos/update-field.input'; many: { disabled: true }, }, delete: { disabled: true }, - guards: [JwtAuthGuard], + guards: [WorkspaceAuthGuard], interceptors: [FieldMetadataGraphqlApiExceptionInterceptor], }, ], diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts index f92b8144b53e..553043c7fb1f 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts @@ -15,7 +15,7 @@ import { import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { IDataloaders } from 'src/engine/dataloaders/dataloader.interface'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { CreateOneFieldMetadataInput } from 'src/engine/metadata-modules/field-metadata/dtos/create-field.input'; import { DeleteOneFieldInput } from 'src/engine/metadata-modules/field-metadata/dtos/delete-field.input'; import { FieldMetadataDTO } from 'src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto'; @@ -25,7 +25,7 @@ import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/fi import { FieldMetadataService } from 'src/engine/metadata-modules/field-metadata/field-metadata.service'; import { fieldMetadataGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/field-metadata/utils/field-metadata-graphql-api-exception-handler.util'; -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard) @Resolver(() => FieldMetadataDTO) export class FieldMetadataResolver { constructor(private readonly fieldMetadataService: FieldMetadataService) {} diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/object-metadata.dto.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/object-metadata.dto.ts index 217bc5e89217..6a494370d962 100644 --- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/object-metadata.dto.ts +++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/dtos/object-metadata.dto.ts @@ -16,7 +16,7 @@ import { BeforeDeleteOneObject } from 'src/engine/metadata-modules/object-metada @ObjectType('object') @Authorize({ authorize: (context: any) => ({ - workspaceId: { eq: context?.req?.user?.workspace?.id }, + workspaceId: { eq: context?.req?.workspace?.id }, }), }) @QueryOptions({ diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/hooks/before-create-one-object.hook.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/hooks/before-create-one-object.hook.ts index c8fd261826ed..53d917c26cee 100644 --- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/hooks/before-create-one-object.hook.ts +++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/hooks/before-create-one-object.hook.ts @@ -15,7 +15,7 @@ export class BeforeCreateOneObject instance: CreateOneInputType, context: any, ): Promise> { - const workspaceId = context?.req?.user?.workspace?.id; + const workspaceId = context?.req?.workspace?.id; if (!workspaceId) { throw new UnauthorizedException(); diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/hooks/before-delete-one-object.hook.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/hooks/before-delete-one-object.hook.ts index 6f0147bf20e8..918001ebafe9 100644 --- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/hooks/before-delete-one-object.hook.ts +++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/hooks/before-delete-one-object.hook.ts @@ -19,7 +19,7 @@ export class BeforeDeleteOneObject implements BeforeDeleteOneHook { instance: DeleteOneInputType, context: any, ): Promise { - const workspaceId = context?.req?.user?.workspace?.id; + const workspaceId = context?.req?.workspace?.id; if (!workspaceId) { throw new UnauthorizedException(); diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.module.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.module.ts index b0d60f7593ab..2f750d9651a5 100644 --- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.module.ts +++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.module.ts @@ -11,7 +11,7 @@ import { NestjsQueryTypeOrmModule } from '@ptc-org/nestjs-query-typeorm'; import { TypeORMModule } from 'src/database/typeorm/typeorm.module'; import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity'; import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { DataSourceModule } from 'src/engine/metadata-modules/data-source/data-source.module'; import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { BeforeUpdateOneObject } from 'src/engine/metadata-modules/object-metadata/hooks/before-update-one-object.hook'; @@ -64,7 +64,7 @@ import { UpdateObjectPayload } from './dtos/update-object.input'; }, update: { disabled: true }, delete: { disabled: true }, - guards: [JwtAuthGuard], + guards: [WorkspaceAuthGuard], interceptors: [ObjectMetadataGraphqlApiExceptionInterceptor], }, ], diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.resolver.ts index 9ae44b1fe996..83d9a1548cb1 100644 --- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.resolver.ts @@ -3,18 +3,18 @@ import { Args, Mutation, Resolver } from '@nestjs/graphql'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; -import { ObjectMetadataDTO } from 'src/engine/metadata-modules/object-metadata/dtos/object-metadata.dto'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { DeleteOneObjectInput } from 'src/engine/metadata-modules/object-metadata/dtos/delete-object.input'; -import { ObjectMetadataService } from 'src/engine/metadata-modules/object-metadata/object-metadata.service'; +import { ObjectMetadataDTO } from 'src/engine/metadata-modules/object-metadata/dtos/object-metadata.dto'; import { UpdateObjectPayload, UpdateOneObjectInput, } from 'src/engine/metadata-modules/object-metadata/dtos/update-object.input'; import { BeforeUpdateOneObject } from 'src/engine/metadata-modules/object-metadata/hooks/before-update-one-object.hook'; +import { ObjectMetadataService } from 'src/engine/metadata-modules/object-metadata/object-metadata.service'; import { objectMetadataGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/object-metadata/utils/object-metadata-graphql-api-exception-handler.util'; -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard) @Resolver(() => ObjectMetadataDTO) export class ObjectMetadataResolver { constructor( diff --git a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/dtos/relation-metadata.dto.ts b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/dtos/relation-metadata.dto.ts index b7d04156176e..eff07dce31f2 100644 --- a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/dtos/relation-metadata.dto.ts +++ b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/dtos/relation-metadata.dto.ts @@ -1,11 +1,10 @@ import { - ObjectType, Field, HideField, + ObjectType, registerEnumType, } from '@nestjs/graphql'; -import { CreateDateColumn, UpdateDateColumn } from 'typeorm'; import { Authorize, BeforeDeleteOne, @@ -13,11 +12,12 @@ import { QueryOptions, Relation, } from '@ptc-org/nestjs-query-graphql'; +import { CreateDateColumn, UpdateDateColumn } from 'typeorm'; +import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; import { ObjectMetadataDTO } from 'src/engine/metadata-modules/object-metadata/dtos/object-metadata.dto'; -import { RelationMetadataType } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; import { BeforeDeleteOneRelation } from 'src/engine/metadata-modules/relation-metadata/hooks/before-delete-one-relation.hook'; -import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; +import { RelationMetadataType } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; registerEnumType(RelationMetadataType, { name: 'RelationMetadataType', @@ -27,7 +27,7 @@ registerEnumType(RelationMetadataType, { @ObjectType('relation') @Authorize({ authorize: (context: any) => ({ - workspaceId: { eq: context?.req?.user?.workspace?.id }, + workspaceId: { eq: context?.req?.workspace?.id }, }), }) @QueryOptions({ diff --git a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/hooks/before-create-one-relation.hook.ts b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/hooks/before-create-one-relation.hook.ts index d5e1223c05ae..dd11e95d59dc 100644 --- a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/hooks/before-create-one-relation.hook.ts +++ b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/hooks/before-create-one-relation.hook.ts @@ -15,7 +15,7 @@ export class BeforeCreateOneRelation instance: CreateOneInputType, context: any, ): Promise> { - const workspaceId = context?.req?.user?.workspace?.id; + const workspaceId = context?.req?.workspace?.id; if (!workspaceId) { throw new UnauthorizedException(); diff --git a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/hooks/before-delete-one-relation.hook.ts b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/hooks/before-delete-one-relation.hook.ts index 3f82928e6aae..df7880df5183 100644 --- a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/hooks/before-delete-one-relation.hook.ts +++ b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/hooks/before-delete-one-relation.hook.ts @@ -19,7 +19,7 @@ export class BeforeDeleteOneRelation implements BeforeDeleteOneHook { instance: DeleteOneInputType, context: any, ): Promise { - const workspaceId = context?.req?.user?.workspace?.id; + const workspaceId = context?.req?.workspace?.id; if (!workspaceId) { throw new UnauthorizedException(); diff --git a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.module.ts b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.module.ts index 345ec66d762b..09468757e77b 100644 --- a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.module.ts +++ b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.module.ts @@ -6,7 +6,7 @@ import { } from '@ptc-org/nestjs-query-graphql'; import { NestjsQueryTypeOrmModule } from '@ptc-org/nestjs-query-typeorm'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataModule } from 'src/engine/metadata-modules/field-metadata/field-metadata.module'; import { ObjectMetadataModule } from 'src/engine/metadata-modules/object-metadata/object-metadata.module'; @@ -47,7 +47,7 @@ import { RelationMetadataDTO } from './dtos/relation-metadata.dto'; create: { many: { disabled: true } }, update: { disabled: true }, delete: { disabled: true }, - guards: [JwtAuthGuard], + guards: [WorkspaceAuthGuard], interceptors: [RelationMetadataGraphqlApiExceptionInterceptor], }, ], diff --git a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.resolver.ts index 332f783e454d..b6f98d1eedd2 100644 --- a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.resolver.ts @@ -1,15 +1,15 @@ import { UseGuards } from '@nestjs/common'; import { Args, Mutation, Resolver } from '@nestjs/graphql'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; -import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { RelationMetadataService } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.service'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; -import { RelationMetadataDTO } from 'src/engine/metadata-modules/relation-metadata/dtos/relation-metadata.dto'; +import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { DeleteOneRelationInput } from 'src/engine/metadata-modules/relation-metadata/dtos/delete-relation.input'; +import { RelationMetadataDTO } from 'src/engine/metadata-modules/relation-metadata/dtos/relation-metadata.dto'; +import { RelationMetadataService } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.service'; import { relationMetadataGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/relation-metadata/utils/relation-metadata-graphql-api-exception-handler.util'; -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard) @Resolver() export class RelationMetadataResolver { constructor( diff --git a/packages/twenty-server/src/engine/metadata-modules/remote-server/remote-server.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/remote-server/remote-server.resolver.ts index 262326669ea0..8bb6f6042eb3 100644 --- a/packages/twenty-server/src/engine/metadata-modules/remote-server/remote-server.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/remote-server/remote-server.resolver.ts @@ -1,9 +1,9 @@ import { UseGuards } from '@nestjs/common'; -import { Resolver, Args, Mutation, Query } from '@nestjs/graphql'; +import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { CreateRemoteServerInput } from 'src/engine/metadata-modules/remote-server/dtos/create-remote-server.input'; import { RemoteServerIdInput } from 'src/engine/metadata-modules/remote-server/dtos/remote-server-id.input'; import { RemoteServerTypeInput } from 'src/engine/metadata-modules/remote-server/dtos/remote-server-type.input'; @@ -13,7 +13,7 @@ import { RemoteServerType } from 'src/engine/metadata-modules/remote-server/remo import { RemoteServerService } from 'src/engine/metadata-modules/remote-server/remote-server.service'; import { remoteServerGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/remote-server/utils/remote-server-graphql-api-exception-handler.util'; -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard) @Resolver() export class RemoteServerResolver { constructor( diff --git a/packages/twenty-server/src/engine/metadata-modules/remote-server/remote-table/remote-table.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/remote-server/remote-table/remote-table.resolver.ts index 7698f25d094f..c3be47ba7410 100644 --- a/packages/twenty-server/src/engine/metadata-modules/remote-server/remote-table/remote-table.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/remote-server/remote-table/remote-table.resolver.ts @@ -3,14 +3,14 @@ import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { FindManyRemoteTablesInput } from 'src/engine/metadata-modules/remote-server/remote-table/dtos/find-many-remote-tables-input'; import { RemoteTableInput } from 'src/engine/metadata-modules/remote-server/remote-table/dtos/remote-table-input'; import { RemoteTableDTO } from 'src/engine/metadata-modules/remote-server/remote-table/dtos/remote-table.dto'; import { RemoteTableService } from 'src/engine/metadata-modules/remote-server/remote-table/remote-table.service'; import { remoteTableGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/remote-server/remote-table/utils/remote-table-graphql-api-exception-handler.util'; -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard) @Resolver() export class RemoteTableResolver { constructor(private readonly remoteTableService: RemoteTableService) {} diff --git a/packages/twenty-server/src/engine/metadata-modules/serverless-function/dtos/serverless-function.dto.ts b/packages/twenty-server/src/engine/metadata-modules/serverless-function/dtos/serverless-function.dto.ts index 79c4f47ba268..092d2fce762c 100644 --- a/packages/twenty-server/src/engine/metadata-modules/serverless-function/dtos/serverless-function.dto.ts +++ b/packages/twenty-server/src/engine/metadata-modules/serverless-function/dtos/serverless-function.dto.ts @@ -29,7 +29,7 @@ registerEnumType(ServerlessFunctionSyncStatus, { @ObjectType('ServerlessFunction') @Authorize({ authorize: (context: any) => ({ - workspaceId: { eq: context?.req?.user?.workspace?.id }, + workspaceId: { eq: context?.req?.workspace?.id }, }), }) @QueryOptions({ diff --git a/packages/twenty-server/src/engine/metadata-modules/serverless-function/serverless-function.module.ts b/packages/twenty-server/src/engine/metadata-modules/serverless-function/serverless-function.module.ts index f1b700d3d23c..076343f4d206 100644 --- a/packages/twenty-server/src/engine/metadata-modules/serverless-function/serverless-function.module.ts +++ b/packages/twenty-server/src/engine/metadata-modules/serverless-function/serverless-function.module.ts @@ -11,9 +11,9 @@ import { NestjsQueryTypeOrmModule } from '@ptc-org/nestjs-query-typeorm'; import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity'; import { FileUploadModule } from 'src/engine/core-modules/file/file-upload/file-upload.module'; import { FileModule } from 'src/engine/core-modules/file/file.module'; -import { ThrottlerModule } from 'src/engine/core-modules/throttler/throttler.module'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; import { ServerlessModule } from 'src/engine/core-modules/serverless/serverless.module'; +import { ThrottlerModule } from 'src/engine/core-modules/throttler/throttler.module'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { ServerlessFunctionDTO } from 'src/engine/metadata-modules/serverless-function/dtos/serverless-function.dto'; import { ServerlessFunctionEntity } from 'src/engine/metadata-modules/serverless-function/serverless-function.entity'; import { ServerlessFunctionResolver } from 'src/engine/metadata-modules/serverless-function/serverless-function.resolver'; @@ -45,7 +45,7 @@ import { ServerlessFunctionService } from 'src/engine/metadata-modules/serverles create: { disabled: true }, update: { disabled: true }, delete: { disabled: true }, - guards: [JwtAuthGuard], + guards: [WorkspaceAuthGuard], }, ], }), diff --git a/packages/twenty-server/src/engine/metadata-modules/serverless-function/serverless-function.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/serverless-function/serverless-function.resolver.ts index 1b61a24639d8..14f4ed48478d 100644 --- a/packages/twenty-server/src/engine/metadata-modules/serverless-function/serverless-function.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/serverless-function/serverless-function.resolver.ts @@ -2,19 +2,21 @@ import { UseGuards } from '@nestjs/common'; import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; import { InjectRepository } from '@nestjs/typeorm'; +import graphqlTypeJson from 'graphql-type-json'; import { FileUpload, GraphQLUpload } from 'graphql-upload'; import { Repository } from 'typeorm'; -import graphqlTypeJson from 'graphql-type-json'; import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum'; import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { CreateServerlessFunctionFromFileInput } from 'src/engine/metadata-modules/serverless-function/dtos/create-serverless-function-from-file.input'; import { CreateServerlessFunctionInput } from 'src/engine/metadata-modules/serverless-function/dtos/create-serverless-function.input'; import { DeleteServerlessFunctionInput } from 'src/engine/metadata-modules/serverless-function/dtos/delete-serverless-function.input'; import { ExecuteServerlessFunctionInput } from 'src/engine/metadata-modules/serverless-function/dtos/execute-serverless-function.input'; +import { GetServerlessFunctionSourceCodeInput } from 'src/engine/metadata-modules/serverless-function/dtos/get-serverless-function-source-code.input'; +import { PublishServerlessFunctionInput } from 'src/engine/metadata-modules/serverless-function/dtos/publish-serverless-function.input'; import { ServerlessFunctionExecutionResultDTO } from 'src/engine/metadata-modules/serverless-function/dtos/serverless-function-execution-result.dto'; import { ServerlessFunctionDTO } from 'src/engine/metadata-modules/serverless-function/dtos/serverless-function.dto'; import { UpdateServerlessFunctionInput } from 'src/engine/metadata-modules/serverless-function/dtos/update-serverless-function.input'; @@ -24,10 +26,8 @@ import { } from 'src/engine/metadata-modules/serverless-function/serverless-function.exception'; import { ServerlessFunctionService } from 'src/engine/metadata-modules/serverless-function/serverless-function.service'; import { serverlessFunctionGraphQLApiExceptionHandler } from 'src/engine/metadata-modules/serverless-function/utils/serverless-function-graphql-api-exception-handler.utils'; -import { GetServerlessFunctionSourceCodeInput } from 'src/engine/metadata-modules/serverless-function/dtos/get-serverless-function-source-code.input'; -import { PublishServerlessFunctionInput } from 'src/engine/metadata-modules/serverless-function/dtos/publish-serverless-function.input'; -@UseGuards(JwtAuthGuard) +@UseGuards(WorkspaceAuthGuard) @Resolver() export class ServerlessFunctionResolver { constructor( diff --git a/packages/twenty-server/test/company.e2e-spec.ts b/packages/twenty-server/test/company.e2e-spec.ts index 1a52998601d8..f3c29e694fca 100644 --- a/packages/twenty-server/test/company.e2e-spec.ts +++ b/packages/twenty-server/test/company.e2e-spec.ts @@ -2,7 +2,7 @@ import { INestApplication } from '@nestjs/common'; import request from 'supertest'; -import { JwtAuthGuard } from 'src/engine/guards/jwt.auth.guard'; +import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { createApp } from './utils/create-app'; @@ -15,7 +15,7 @@ describe('CompanyResolver (e2e)', () => { beforeEach(async () => { [app] = await createApp({ moduleBuilderHook: (moduleBuilder) => - moduleBuilder.overrideGuard(JwtAuthGuard).useValue(authGuardMock), + moduleBuilder.overrideGuard(WorkspaceAuthGuard).useValue(authGuardMock), }); }); From c002280b6e61453fcbb1490cd2784d0f5a7dd10f Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Thu, 12 Sep 2024 21:27:34 +0200 Subject: [PATCH 02/16] Fix --- .../database/typeorm/core/core.datasource.ts | 2 +- .../graphql-query-filter-condition.parser.ts | 2 +- .../graphql-query-filter-field.parser.ts | 2 +- .../graphql-query-order.parser.spec.ts | 2 +- .../graphql-query-order.parser.ts | 2 +- ...graphql-selected-fields-relation.parser.ts | 2 +- .../graphql-selected-fields.parser.ts | 2 +- .../graphql-query.parser.ts | 2 +- ...ct-records-to-graphql-connection.mapper.ts | 2 +- ...raphql-query-find-many-resolver.service.ts | 4 +- ...graphql-query-find-one-resolver.service.ts | 9 ++- .../utils/get-object-metadata.util.ts | 21 ++++++ .../get-relation-object-metadata.util.ts | 2 +- .../api/graphql/workspace-schema.factory.ts | 13 +++- .../field-metadata/field-metadata.module.ts | 6 +- .../field-metadata/field-metadata.service.ts | 38 ++++------ ...sert-mutation-not-on-remote-object.util.ts | 2 +- .../relation-metadata.module.ts | 2 + .../relation-metadata.service.ts | 69 +++++++++++++++++-- .../generate-object-metadata-map.util.ts} | 23 +------ .../validate-field-name-availability.utils.ts | 4 ++ .../workspace-metadata-cache.service.ts | 33 ++++----- .../workspace-metadata-version.service.ts | 2 + .../workspace-migration.service.ts | 8 +-- .../factories/entity-schema-column.factory.ts | 14 ++-- .../entity-schema-relation.factory.ts | 29 +++----- .../factories/entity-schema.factory.ts | 11 +-- .../factories/workspace-datasource.factory.ts | 13 ++-- .../workspace-internal-context.interface.ts | 4 +- .../repository/workspace.repository.ts | 38 +++++----- .../utils/compute-relation-type.util.ts | 7 +- .../utils/determine-relation-details.util.ts | 34 ++++----- .../workspace-cache-storage.service.ts | 38 +++++----- 33 files changed, 247 insertions(+), 195 deletions(-) create mode 100644 packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util.ts rename packages/twenty-server/src/engine/{api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util.ts => metadata-modules/utils/generate-object-metadata-map.util.ts} (66%) diff --git a/packages/twenty-server/src/database/typeorm/core/core.datasource.ts b/packages/twenty-server/src/database/typeorm/core/core.datasource.ts index 64ef5a5d0233..1260f9bcf01d 100644 --- a/packages/twenty-server/src/database/typeorm/core/core.datasource.ts +++ b/packages/twenty-server/src/database/typeorm/core/core.datasource.ts @@ -7,7 +7,7 @@ config(); export const typeORMCoreModuleOptions: TypeOrmModuleOptions = { url: process.env.PG_DATABASE_URL, type: 'postgres', - logging: ['error', 'query'], + logging: ['error'], schema: 'core', entities: ['dist/src/engine/core-modules/**/*.entity{.ts,.js}'], synchronize: false, diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-condition.parser.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-condition.parser.ts index 7889c779ec5a..967f6b6778a6 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-condition.parser.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-condition.parser.ts @@ -2,7 +2,7 @@ import { FindOptionsWhere, ObjectLiteral } from 'typeorm'; import { RecordFilter } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface'; -import { FieldMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util'; +import { FieldMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { GraphqlQueryFilterFieldParser } from './graphql-query-filter-field.parser'; diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-field.parser.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-field.parser.ts index a855ec6e96bb..db390ead4504 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-field.parser.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-field.parser.ts @@ -3,7 +3,7 @@ import { FindOptionsWhere, Not, ObjectLiteral } from 'typeorm'; import { RecordFilter } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface'; import { FieldMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata.interface'; -import { FieldMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util'; +import { FieldMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { compositeTypeDefinitions } from 'src/engine/metadata-modules/field-metadata/composite-types'; import { isCompositeFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/utils/is-composite-field-metadata-type.util'; import { CompositeFieldMetadataType } from 'src/engine/metadata-modules/workspace-migration/factories/composite-column-action.factory'; diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/__tests__/graphql-query-order.parser.spec.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/__tests__/graphql-query-order.parser.spec.ts index 8eb5895d3c41..d829f239f212 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/__tests__/graphql-query-order.parser.spec.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/__tests__/graphql-query-order.parser.spec.ts @@ -1,7 +1,7 @@ import { OrderByDirection } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface'; import { GraphqlQueryOrderFieldParser } from 'src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/graphql-query-order.parser'; -import { FieldMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util'; +import { FieldMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; describe('GraphqlQueryOrderFieldParser', () => { diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/graphql-query-order.parser.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/graphql-query-order.parser.ts index 9b4a0abdc003..68c9b025a1b9 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/graphql-query-order.parser.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/graphql-query-order.parser.ts @@ -10,7 +10,7 @@ import { GraphqlQueryRunnerException, GraphqlQueryRunnerExceptionCode, } from 'src/engine/api/graphql/graphql-query-runner/errors/graphql-query-runner.exception'; -import { FieldMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util'; +import { FieldMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { compositeTypeDefinitions } from 'src/engine/metadata-modules/field-metadata/composite-types'; import { isCompositeFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/utils/is-composite-field-metadata-type.util'; import { CompositeFieldMetadataType } from 'src/engine/metadata-modules/workspace-migration/factories/composite-column-action.factory'; diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields-relation.parser.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields-relation.parser.ts index 9c253b184510..0e109458da69 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields-relation.parser.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields-relation.parser.ts @@ -1,7 +1,7 @@ import { FieldMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata.interface'; import { GraphqlQuerySelectedFieldsParser } from 'src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields.parser'; -import { ObjectMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util'; +import { ObjectMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { getRelationObjectMetadata } from 'src/engine/api/graphql/graphql-query-runner/utils/get-relation-object-metadata.util'; export class GraphqlQuerySelectedFieldsRelationParser { diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields.parser.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields.parser.ts index 8abcafd6de0b..ba7449a9b5b0 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields.parser.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields.parser.ts @@ -5,7 +5,7 @@ import { GraphqlQueryRunnerExceptionCode, } from 'src/engine/api/graphql/graphql-query-runner/errors/graphql-query-runner.exception'; import { GraphqlQuerySelectedFieldsRelationParser } from 'src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields-relation.parser'; -import { ObjectMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util'; +import { ObjectMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { compositeTypeDefinitions } from 'src/engine/metadata-modules/field-metadata/composite-types'; import { isCompositeFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/utils/is-composite-field-metadata-type.util'; import { CompositeFieldMetadataType } from 'src/engine/metadata-modules/workspace-migration/factories/composite-column-action.factory'; diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query.parser.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query.parser.ts index 1b1217e906c6..0f189f3d65b1 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query.parser.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query.parser.ts @@ -17,7 +17,7 @@ import { GraphqlQuerySelectedFieldsParser } from 'src/engine/api/graphql/graphql import { FieldMetadataMap, ObjectMetadataMap, -} from 'src/engine/api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util'; +} from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; export class GraphqlQueryParser { private fieldMetadataMap: FieldMetadataMap; diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/orm-mappers/object-records-to-graphql-connection.mapper.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/orm-mappers/object-records-to-graphql-connection.mapper.ts index 718add79e1dc..cddb43f8c5dc 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/orm-mappers/object-records-to-graphql-connection.mapper.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/orm-mappers/object-records-to-graphql-connection.mapper.ts @@ -9,8 +9,8 @@ import { GraphqlQueryRunnerException, GraphqlQueryRunnerExceptionCode, } from 'src/engine/api/graphql/graphql-query-runner/errors/graphql-query-runner.exception'; -import { ObjectMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util'; import { encodeCursor } from 'src/engine/api/graphql/graphql-query-runner/utils/cursors.util'; +import { ObjectMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { getRelationObjectMetadata } from 'src/engine/api/graphql/graphql-query-runner/utils/get-relation-object-metadata.util'; import { compositeTypeDefinitions } from 'src/engine/metadata-modules/field-metadata/composite-types'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-many-resolver.service.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-many-resolver.service.ts index d05a4f7f4591..7d7a7c86dc01 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-many-resolver.service.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-many-resolver.service.ts @@ -19,11 +19,11 @@ import { import { GraphqlQueryParser } from 'src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query.parser'; import { ObjectRecordsToGraphqlConnectionMapper } from 'src/engine/api/graphql/graphql-query-runner/orm-mappers/object-records-to-graphql-connection.mapper'; import { applyRangeFilter } from 'src/engine/api/graphql/graphql-query-runner/utils/apply-range-filter.util'; +import { decodeCursor } from 'src/engine/api/graphql/graphql-query-runner/utils/cursors.util'; import { convertObjectMetadataToMap, getObjectMetadata, -} from 'src/engine/api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util'; -import { decodeCursor } from 'src/engine/api/graphql/graphql-query-runner/utils/cursors.util'; +} from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { TwentyORMGlobalManager } from 'src/engine/twenty-orm/twenty-orm-global.manager'; export class GraphqlQueryFindManyResolverService { diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-one-resolver.service.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-one-resolver.service.ts index 063fb5c83754..a3028ee9e000 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-one-resolver.service.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-one-resolver.service.ts @@ -13,10 +13,8 @@ import { } from 'src/engine/api/graphql/graphql-query-runner/errors/graphql-query-runner.exception'; import { GraphqlQueryParser } from 'src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query.parser'; import { ObjectRecordsToGraphqlConnectionMapper } from 'src/engine/api/graphql/graphql-query-runner/orm-mappers/object-records-to-graphql-connection.mapper'; -import { - convertObjectMetadataToMap, - getObjectMetadata, -} from 'src/engine/api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util'; +import { getObjectMetadata } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; +import { generateObjectMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { TwentyORMGlobalManager } from 'src/engine/twenty-orm/twenty-orm-global.manager'; export class GraphqlQueryFindOneResolverService { @@ -40,9 +38,10 @@ export class GraphqlQueryFindOneResolverService { authContext.workspace.id, objectMetadataItem.nameSingular, ); - const objectMetadataMap = convertObjectMetadataToMap( + const objectMetadataMap = generateObjectMetadataMap( objectMetadataCollection, ); + const objectMetadata = getObjectMetadata( objectMetadataMap, objectMetadataItem.nameSingular, diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util.ts new file mode 100644 index 000000000000..e5f251e93477 --- /dev/null +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util.ts @@ -0,0 +1,21 @@ +import { + GraphqlQueryRunnerException, + GraphqlQueryRunnerExceptionCode, +} from 'src/engine/api/graphql/graphql-query-runner/errors/graphql-query-runner.exception'; +import { ObjectMetadataMapItem } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; + +export const getObjectMetadata = ( + objectMetadataMap: Record, + objectName: string, +): ObjectMetadataMapItem => { + const objectMetadata = objectMetadataMap[objectName]; + + if (!objectMetadata) { + throw new GraphqlQueryRunnerException( + `Object metadata not found for ${objectName}`, + GraphqlQueryRunnerExceptionCode.OBJECT_METADATA_NOT_FOUND, + ); + } + + return objectMetadata; +}; diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-relation-object-metadata.util.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-relation-object-metadata.util.ts index 4b502803292f..5af056700ea9 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-relation-object-metadata.util.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-relation-object-metadata.util.ts @@ -1,6 +1,6 @@ import { FieldMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata.interface'; -import { ObjectMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util'; +import { ObjectMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { deduceRelationDirection, RelationDirection, diff --git a/packages/twenty-server/src/engine/api/graphql/workspace-schema.factory.ts b/packages/twenty-server/src/engine/api/graphql/workspace-schema.factory.ts index c5a550b06605..3e7f20e7cf14 100644 --- a/packages/twenty-server/src/engine/api/graphql/workspace-schema.factory.ts +++ b/packages/twenty-server/src/engine/api/graphql/workspace-schema.factory.ts @@ -56,13 +56,13 @@ export class WorkspaceSchemaFactory { ); } - const objectMetadataCollection = - await this.workspaceCacheStorageService.getObjectMetadataCollection( + const objectMetadataMap = + await this.workspaceCacheStorageService.getObjectMetadataMap( authContext.workspace.id, currentCacheVersion, ); - if (!objectMetadataCollection) { + if (!objectMetadataMap) { await this.workspaceMetadataCacheService.recomputeMetadataCache( authContext.workspace.id, ); @@ -72,6 +72,13 @@ export class WorkspaceSchemaFactory { ); } + const objectMetadataCollection = Object.values(objectMetadataMap).map( + (objectMetadataItem) => ({ + ...objectMetadataItem, + fields: Object.values(objectMetadataItem.fields), + }), + ); + // Get typeDefs from cache let typeDefs = await this.workspaceCacheStorageService.getGraphQLTypeDefs( authContext.workspace.id, diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.module.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.module.ts index 558a1bab555b..40b4e23daae4 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.module.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.module.ts @@ -16,6 +16,7 @@ import { FieldMetadataResolver } from 'src/engine/metadata-modules/field-metadat import { FieldMetadataGraphqlApiExceptionInterceptor } from 'src/engine/metadata-modules/field-metadata/interceptors/field-metadata-graphql-api-exception.interceptor'; import { IsFieldMetadataDefaultValue } from 'src/engine/metadata-modules/field-metadata/validators/is-field-metadata-default-value.validator'; import { IsFieldMetadataOptions } from 'src/engine/metadata-modules/field-metadata/validators/is-field-metadata-options.validator'; +import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity'; import { ObjectMetadataModule } from 'src/engine/metadata-modules/object-metadata/object-metadata.module'; import { WorkspaceMetadataVersionModule } from 'src/engine/metadata-modules/workspace-metadata-version/workspace-metadata-version.module'; import { WorkspaceMigrationModule } from 'src/engine/metadata-modules/workspace-migration/workspace-migration.module'; @@ -32,7 +33,10 @@ import { UpdateFieldInput } from './dtos/update-field.input'; imports: [ NestjsQueryGraphQLModule.forFeature({ imports: [ - NestjsQueryTypeOrmModule.forFeature([FieldMetadataEntity], 'metadata'), + NestjsQueryTypeOrmModule.forFeature( + [FieldMetadataEntity, ObjectMetadataEntity], + 'metadata', + ), WorkspaceMigrationModule, WorkspaceStatusModule, WorkspaceMigrationRunnerModule, diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts index 1234062b5bfc..fec98f221b89 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts @@ -72,6 +72,8 @@ export class FieldMetadataService extends TypeOrmQueryService, + @InjectRepository(ObjectMetadataEntity, 'metadata') + private readonly objectMetadataRepository: Repository, private readonly objectMetadataService: ObjectMetadataService, private readonly workspaceMigrationFactory: WorkspaceMigrationFactory, private readonly workspaceMigrationService: WorkspaceMigrationService, @@ -97,20 +99,21 @@ export class FieldMetadataService extends TypeOrmQueryService( FieldMetadataEntity, ); - const objectMetadata = - await this.objectMetadataService.findOneWithinWorkspace( - fieldMetadataInput.workspaceId, - { - where: { - id: fieldMetadataInput.objectMetadataId, - }, - }, - ); + + // TODO: this looks like a big security hole here, we should not get workspaceId from the input + const [objectMetadata] = await this.objectMetadataRepository.find({ + where: { + id: fieldMetadataInput.objectMetadataId, + workspaceId: fieldMetadataInput.workspaceId, + }, + relations: ['fields'], + order: {}, + }); if (!objectMetadata) { throw new FieldMetadataException( 'Object metadata does not exist', - FieldMetadataExceptionCode.INVALID_FIELD_INPUT, + FieldMetadataExceptionCode.OBJECT_METADATA_NOT_FOUND, ); } @@ -155,21 +158,6 @@ export class FieldMetadataService extends TypeOrmQueryService, ) => { if (objectMetadataItem.isRemote) { throw new ObjectMetadataException( diff --git a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.module.ts b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.module.ts index 09468757e77b..b3d8efb8e36e 100644 --- a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.module.ts +++ b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.module.ts @@ -14,6 +14,7 @@ import { RelationMetadataGraphqlApiExceptionInterceptor } from 'src/engine/metad import { RelationMetadataResolver } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.resolver'; import { WorkspaceMetadataVersionModule } from 'src/engine/metadata-modules/workspace-metadata-version/workspace-metadata-version.module'; import { WorkspaceMigrationModule } from 'src/engine/metadata-modules/workspace-migration/workspace-migration.module'; +import { WorkspaceCacheStorageModule } from 'src/engine/workspace-cache-storage/workspace-cache-storage.module'; import { WorkspaceMigrationRunnerModule } from 'src/engine/workspace-manager/workspace-migration-runner/workspace-migration-runner.module'; import { RelationMetadataEntity } from './relation-metadata.entity'; @@ -34,6 +35,7 @@ import { RelationMetadataDTO } from './dtos/relation-metadata.dto'; FieldMetadataModule, WorkspaceMigrationRunnerModule, WorkspaceMigrationModule, + WorkspaceCacheStorageModule, WorkspaceMetadataVersionModule, ], services: [RelationMetadataService], diff --git a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.service.ts b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.service.ts index 627a9a4ea274..24352f0580b0 100644 --- a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.service.ts +++ b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.service.ts @@ -30,6 +30,7 @@ import { } from 'src/engine/metadata-modules/workspace-migration/workspace-migration.entity'; import { WorkspaceMigrationService } from 'src/engine/metadata-modules/workspace-migration/workspace-migration.service'; import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util'; +import { WorkspaceCacheStorageService } from 'src/engine/workspace-cache-storage/workspace-cache-storage.service'; import { WorkspaceMigrationRunnerService } from 'src/engine/workspace-manager/workspace-migration-runner/workspace-migration-runner.service'; import { @@ -50,6 +51,7 @@ export class RelationMetadataService extends TypeOrmQueryService { const foundRelationMetadataItem = relationMetadataCollection.find( (relationMetadataItem) => @@ -447,7 +470,39 @@ export class RelationMetadataService extends TypeOrmQueryService { + if (relationMetadataItem instanceof NotFoundException) { + return relationMetadataItem; + } + + const fromObjectMetadata = + objectMetadataMap[relationMetadataItem.fromObjectMetadataId]; + + const toObjectMetadata = + objectMetadataMap[relationMetadataItem.toObjectMetadataId]; + + const fromFieldMetadata = + Object.values(fromObjectMetadata.fields).find( + (fieldMetadata) => + fieldMetadata.id === relationMetadataItem.fromFieldMetadataId, + ) ?? null; + + const toFieldMetadata = + Object.values(toObjectMetadata.fields).find( + (fieldMetadata) => + fieldMetadata.id === relationMetadataItem.toFieldMetadataId, + ) ?? null; + + return { + ...relationMetadataItem, + fromObjectMetadata, + toObjectMetadata, + fromFieldMetadata, + toFieldMetadata, + }; + }); + + return enhancedResults as (RelationMetadataEntity | NotFoundException)[]; } private async deleteRelationWorkspaceCustomMigration( diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util.ts b/packages/twenty-server/src/engine/metadata-modules/utils/generate-object-metadata-map.util.ts similarity index 66% rename from packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util.ts rename to packages/twenty-server/src/engine/metadata-modules/utils/generate-object-metadata-map.util.ts index 0db7cd4017d9..116254332ee9 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/convert-object-metadata-to-map.util.ts +++ b/packages/twenty-server/src/engine/metadata-modules/utils/generate-object-metadata-map.util.ts @@ -1,11 +1,6 @@ import { FieldMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata.interface'; import { ObjectMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/object-metadata.interface'; -import { - GraphqlQueryRunnerException, - GraphqlQueryRunnerExceptionCode, -} from 'src/engine/api/graphql/graphql-query-runner/errors/graphql-query-runner.exception'; - export type FieldMetadataMap = Record; export type ObjectMetadataMapItem = Omit & { @@ -14,7 +9,7 @@ export type ObjectMetadataMapItem = Omit & { export type ObjectMetadataMap = Record; -export const convertObjectMetadataToMap = ( +export const generateObjectMetadataMap = ( objectMetadataCollection: ObjectMetadataInterface[], ): ObjectMetadataMap => { const objectMetadataMap: ObjectMetadataMap = {}; @@ -38,19 +33,3 @@ export const convertObjectMetadataToMap = ( return objectMetadataMap; }; - -export const getObjectMetadata = ( - objectMetadataMap: Record, - objectName: string, -): ObjectMetadataMapItem => { - const objectMetadata = objectMetadataMap[objectName]; - - if (!objectMetadata) { - throw new GraphqlQueryRunnerException( - `Object metadata not found for ${objectName}`, - GraphqlQueryRunnerExceptionCode.OBJECT_METADATA_NOT_FOUND, - ); - } - - return objectMetadata; -}; diff --git a/packages/twenty-server/src/engine/metadata-modules/utils/validate-field-name-availability.utils.ts b/packages/twenty-server/src/engine/metadata-modules/utils/validate-field-name-availability.utils.ts index 07db05aacfbd..974971fbcbf1 100644 --- a/packages/twenty-server/src/engine/metadata-modules/utils/validate-field-name-availability.utils.ts +++ b/packages/twenty-server/src/engine/metadata-modules/utils/validate-field-name-availability.utils.ts @@ -32,6 +32,10 @@ export const validateFieldNameAvailabilityOrThrow = ( const reservedCompositeFieldsNames = getReservedCompositeFieldNames(objectMetadata); + if (objectMetadata.fields.some((field) => field.name === name)) { + throw new NameNotAvailableException(name); + } + if (reservedCompositeFieldsNames.includes(name)) { throw new NameNotAvailableException(name); } diff --git a/packages/twenty-server/src/engine/metadata-modules/workspace-metadata-cache/services/workspace-metadata-cache.service.ts b/packages/twenty-server/src/engine/metadata-modules/workspace-metadata-cache/services/workspace-metadata-cache.service.ts index 26bed85b0e2c..70d85cba17f7 100644 --- a/packages/twenty-server/src/engine/metadata-modules/workspace-metadata-cache/services/workspace-metadata-cache.service.ts +++ b/packages/twenty-server/src/engine/metadata-modules/workspace-metadata-cache/services/workspace-metadata-cache.service.ts @@ -5,6 +5,7 @@ import { Repository } from 'typeorm'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity'; +import { generateObjectMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { WorkspaceMetadataCacheException, WorkspaceMetadataCacheExceptionCode, @@ -45,7 +46,7 @@ export class WorkspaceMetadataCacheService { } const isAlreadyCaching = - await this.workspaceCacheStorageService.getObjectMetadataCollectionOngoingCachingLock( + await this.workspaceCacheStorageService.getObjectMetadataOngoingCachingLock( workspaceId, currentDatabaseVersion, ); @@ -68,25 +69,25 @@ export class WorkspaceMetadataCacheService { currentDatabaseVersion, ); - const freshObjectMetadataCollection = - await this.objectMetadataRepository.find({ - where: { workspaceId }, - relations: [ - 'fields.object', - 'fields', - 'fields.fromRelationMetadata', - 'fields.toRelationMetadata', - 'fields.fromRelationMetadata.toObjectMetadata', - ], - }); - - await this.workspaceCacheStorageService.setObjectMetadataCollection( + const objectMetadataItems = await this.objectMetadataRepository.find({ + where: { workspaceId }, + relations: [ + 'fields', + 'fields.fromRelationMetadata', + 'fields.toRelationMetadata', + ], + }); + + const freshObjectMetadataMap = + generateObjectMetadataMap(objectMetadataItems); + + await this.workspaceCacheStorageService.setObjectMetadataMap( workspaceId, currentDatabaseVersion, - freshObjectMetadataCollection, + freshObjectMetadataMap, ); - await this.workspaceCacheStorageService.removeObjectMetadataCollectionOngoingCachingLock( + await this.workspaceCacheStorageService.removeObjectMetadataOngoingCachingLock( workspaceId, currentDatabaseVersion, ); diff --git a/packages/twenty-server/src/engine/metadata-modules/workspace-metadata-version/services/workspace-metadata-version.service.ts b/packages/twenty-server/src/engine/metadata-modules/workspace-metadata-version/services/workspace-metadata-version.service.ts index 2d1b0e383d08..52c151e3b879 100644 --- a/packages/twenty-server/src/engine/metadata-modules/workspace-metadata-version/services/workspace-metadata-version.service.ts +++ b/packages/twenty-server/src/engine/metadata-modules/workspace-metadata-version/services/workspace-metadata-version.service.ts @@ -4,6 +4,7 @@ import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; +import { LogExecutionTime } from 'src/engine/decorators/observability/log-execution-time.decorator'; import { WorkspaceMetadataCacheService } from 'src/engine/metadata-modules/workspace-metadata-cache/services/workspace-metadata-cache.service'; import { WorkspaceMetadataVersionException, @@ -22,6 +23,7 @@ export class WorkspaceMetadataVersionService { private readonly twentyORMGlobalManager: TwentyORMGlobalManager, ) {} + @LogExecutionTime() async incrementMetadataVersion(workspaceId: string): Promise { const workspace = await this.workspaceRepository.findOne({ where: { id: workspaceId }, diff --git a/packages/twenty-server/src/engine/metadata-modules/workspace-migration/workspace-migration.service.ts b/packages/twenty-server/src/engine/metadata-modules/workspace-migration/workspace-migration.service.ts index a0e91b25b37c..dd795e36528b 100644 --- a/packages/twenty-server/src/engine/metadata-modules/workspace-migration/workspace-migration.service.ts +++ b/packages/twenty-server/src/engine/metadata-modules/workspace-migration/workspace-migration.service.ts @@ -60,10 +60,10 @@ export class WorkspaceMigrationService { workspaceId: string, migration: WorkspaceMigrationEntity, ) { - await this.workspaceMigrationRepository.save({ - id: migration.id, - appliedAt: new Date(), - }); + await this.workspaceMigrationRepository.update( + { id: migration.id, workspaceId }, + { appliedAt: new Date() }, + ); } /** diff --git a/packages/twenty-server/src/engine/twenty-orm/factories/entity-schema-column.factory.ts b/packages/twenty-server/src/engine/twenty-orm/factories/entity-schema-column.factory.ts index 6b4564efaaea..6922bcc6dd85 100644 --- a/packages/twenty-server/src/engine/twenty-orm/factories/entity-schema-column.factory.ts +++ b/packages/twenty-server/src/engine/twenty-orm/factories/entity-schema-column.factory.ts @@ -2,15 +2,15 @@ import { Injectable } from '@nestjs/common'; import { ColumnType, EntitySchemaColumnOptions } from 'typeorm'; +import { FieldMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata.interface'; + import { compositeTypeDefinitions } from 'src/engine/metadata-modules/field-metadata/composite-types'; -import { - FieldMetadataEntity, - FieldMetadataType, -} from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; +import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { computeCompositeColumnName } from 'src/engine/metadata-modules/field-metadata/utils/compute-column-name.util'; import { isCompositeFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/utils/is-composite-field-metadata-type.util'; import { isEnumFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/utils/is-enum-field-metadata-type.util'; import { serializeDefaultValue } from 'src/engine/metadata-modules/field-metadata/utils/serialize-default-value'; +import { FieldMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { fieldMetadataTypeToColumnType } from 'src/engine/metadata-modules/workspace-migration/utils/field-metadata-type-to-column-type.util'; import { isRelationFieldMetadataType } from 'src/engine/utils/is-relation-field-metadata-type.util'; @@ -21,11 +21,13 @@ type EntitySchemaColumnMap = { @Injectable() export class EntitySchemaColumnFactory { create( - fieldMetadataCollection: FieldMetadataEntity[], + fieldMetadataMap: FieldMetadataMap, softDelete: boolean, ): EntitySchemaColumnMap { let entitySchemaColumnMap: EntitySchemaColumnMap = {}; + const fieldMetadataCollection = Object.values(fieldMetadataMap); + for (const fieldMetadata of fieldMetadataCollection) { const key = fieldMetadata.name; @@ -102,7 +104,7 @@ export class EntitySchemaColumnFactory { } private createCompositeColumns( - fieldMetadata: FieldMetadataEntity, + fieldMetadata: FieldMetadataInterface, ): EntitySchemaColumnMap { const entitySchemaColumnMap: EntitySchemaColumnMap = {}; const compositeType = compositeTypeDefinitions.get(fieldMetadata.type); diff --git a/packages/twenty-server/src/engine/twenty-orm/factories/entity-schema-relation.factory.ts b/packages/twenty-server/src/engine/twenty-orm/factories/entity-schema-relation.factory.ts index d36c6b97d73e..f6fc88de34f2 100644 --- a/packages/twenty-server/src/engine/twenty-orm/factories/entity-schema-relation.factory.ts +++ b/packages/twenty-server/src/engine/twenty-orm/factories/entity-schema-relation.factory.ts @@ -2,10 +2,12 @@ import { Injectable } from '@nestjs/common'; import { EntitySchemaRelationOptions } from 'typeorm'; -import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; +import { + FieldMetadataMap, + ObjectMetadataMap, +} from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { determineRelationDetails } from 'src/engine/twenty-orm/utils/determine-relation-details.util'; import { isRelationFieldMetadataType } from 'src/engine/utils/is-relation-field-metadata-type.util'; -import { WorkspaceCacheStorageService } from 'src/engine/workspace-cache-storage/workspace-cache-storage.service'; type EntitySchemaRelationMap = { [key: string]: EntitySchemaRelationOptions; @@ -13,17 +15,16 @@ type EntitySchemaRelationMap = { @Injectable() export class EntitySchemaRelationFactory { - constructor( - private readonly workspaceCacheStorageService: WorkspaceCacheStorageService, - ) {} + constructor() {} async create( - workspaceId: string, - metadataVersion: number, - fieldMetadataCollection: FieldMetadataEntity[], + fieldMetadataMap: FieldMetadataMap, + objectMetadataMap: ObjectMetadataMap, ): Promise { const entitySchemaRelationMap: EntitySchemaRelationMap = {}; + const fieldMetadataCollection = Object.values(fieldMetadataMap); + for (const fieldMetadata of fieldMetadataCollection) { if (!isRelationFieldMetadataType(fieldMetadata.type)) { continue; @@ -38,20 +39,10 @@ export class EntitySchemaRelationFactory { ); } - const objectMetadataCollection = - await this.workspaceCacheStorageService.getObjectMetadataCollection( - workspaceId, - metadataVersion, - ); - - if (!objectMetadataCollection) { - throw new Error('Object metadata collection not found'); - } - const relationDetails = await determineRelationDetails( fieldMetadata, relationMetadata, - objectMetadataCollection, + objectMetadataMap, ); entitySchemaRelationMap[fieldMetadata.name] = { diff --git a/packages/twenty-server/src/engine/twenty-orm/factories/entity-schema.factory.ts b/packages/twenty-server/src/engine/twenty-orm/factories/entity-schema.factory.ts index 494c892cf54b..018ba81ebe78 100644 --- a/packages/twenty-server/src/engine/twenty-orm/factories/entity-schema.factory.ts +++ b/packages/twenty-server/src/engine/twenty-orm/factories/entity-schema.factory.ts @@ -2,7 +2,10 @@ import { Injectable } from '@nestjs/common'; import { EntitySchema } from 'typeorm'; -import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity'; +import { + ObjectMetadataMap, + ObjectMetadataMapItem, +} from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { EntitySchemaColumnFactory } from 'src/engine/twenty-orm/factories/entity-schema-column.factory'; import { EntitySchemaRelationFactory } from 'src/engine/twenty-orm/factories/entity-schema-relation.factory'; import { WorkspaceEntitiesStorage } from 'src/engine/twenty-orm/storage/workspace-entities.storage'; @@ -18,7 +21,8 @@ export class EntitySchemaFactory { async create( workspaceId: string, metadataVersion: number, - objectMetadata: ObjectMetadataEntity, + objectMetadata: ObjectMetadataMapItem, + objectMetadataMap: ObjectMetadataMap, ): Promise { const columns = this.entitySchemaColumnFactory.create( objectMetadata.fields, @@ -26,9 +30,8 @@ export class EntitySchemaFactory { ); const relations = await this.entitySchemaRelationFactory.create( - workspaceId, - metadataVersion, objectMetadata.fields, + objectMetadataMap, ); const entitySchema = new EntitySchema({ diff --git a/packages/twenty-server/src/engine/twenty-orm/factories/workspace-datasource.factory.ts b/packages/twenty-server/src/engine/twenty-orm/factories/workspace-datasource.factory.ts index 051406a45669..877ea2f14f1f 100644 --- a/packages/twenty-server/src/engine/twenty-orm/factories/workspace-datasource.factory.ts +++ b/packages/twenty-server/src/engine/twenty-orm/factories/workspace-datasource.factory.ts @@ -56,20 +56,20 @@ export class WorkspaceDatasourceFactory { const workspaceDataSource = await this.cacheManager.execute( `${workspaceId}-${desiredWorkspaceMetadataVersion}`, async () => { - const cachedObjectMetadataCollection = - await this.workspaceCacheStorageService.getObjectMetadataCollection( + const cachedObjectMetadataMap = + await this.workspaceCacheStorageService.getObjectMetadataMap( workspaceId, desiredWorkspaceMetadataVersion, ); - if (!cachedObjectMetadataCollection) { + if (!cachedObjectMetadataMap) { await this.workspaceMetadataCacheService.recomputeMetadataCache( workspaceId, true, ); throw new TwentyORMException( - `Object metadata collection not found for workspace ${workspaceId}`, + `Object metadata map not found for workspace ${workspaceId}`, TwentyORMExceptionCode.METADATA_COLLECTION_NOT_FOUND, ); } @@ -100,11 +100,12 @@ export class WorkspaceDatasourceFactory { ); } else { const entitySchemas = await Promise.all( - cachedObjectMetadataCollection.map((objectMetadata) => + Object.values(cachedObjectMetadataMap).map((objectMetadata) => this.entitySchemaFactory.create( workspaceId, desiredWorkspaceMetadataVersion, objectMetadata, + cachedObjectMetadataMap, ), ), ); @@ -121,7 +122,7 @@ export class WorkspaceDatasourceFactory { const workspaceDataSource = new WorkspaceDataSource( { workspaceId, - objectMetadataCollection: cachedObjectMetadataCollection, + objectMetadataMap: cachedObjectMetadataMap, }, { url: diff --git a/packages/twenty-server/src/engine/twenty-orm/interfaces/workspace-internal-context.interface.ts b/packages/twenty-server/src/engine/twenty-orm/interfaces/workspace-internal-context.interface.ts index 266c60324f23..f68611f678db 100644 --- a/packages/twenty-server/src/engine/twenty-orm/interfaces/workspace-internal-context.interface.ts +++ b/packages/twenty-server/src/engine/twenty-orm/interfaces/workspace-internal-context.interface.ts @@ -1,6 +1,6 @@ -import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity'; +import { ObjectMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; export interface WorkspaceInternalContext { workspaceId: string; - objectMetadataCollection: ObjectMetadataEntity[]; + objectMetadataMap: ObjectMetadataMap; } diff --git a/packages/twenty-server/src/engine/twenty-orm/repository/workspace.repository.ts b/packages/twenty-server/src/engine/twenty-orm/repository/workspace.repository.ts index 6a436ced71aa..06335af638d8 100644 --- a/packages/twenty-server/src/engine/twenty-orm/repository/workspace.repository.ts +++ b/packages/twenty-server/src/engine/twenty-orm/repository/workspace.repository.ts @@ -27,7 +27,8 @@ import { WorkspaceInternalContext } from 'src/engine/twenty-orm/interfaces/works import { compositeTypeDefinitions } from 'src/engine/metadata-modules/field-metadata/composite-types'; import { computeCompositeColumnName } from 'src/engine/metadata-modules/field-metadata/utils/compute-column-name.util'; import { isCompositeFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/utils/is-composite-field-metadata-type.util'; -import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity'; +import { RelationMetadataEntity } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; +import { ObjectMetadataMapItem } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { WorkspaceEntitiesStorage } from 'src/engine/twenty-orm/storage/workspace-entities.storage'; import { computeRelationType } from 'src/engine/twenty-orm/utils/compute-relation-type.util'; import { isRelationFieldMetadataType } from 'src/engine/utils/is-relation-field-metadata-type.util'; @@ -623,15 +624,14 @@ export class WorkspaceRepository< throw new Error('Object metadata name is missing'); } - const objectMetadata = this.internalContext.objectMetadataCollection.find( - (objectMetadata) => objectMetadata.nameSingular === objectMetadataName, - ); + const objectMetadata = + this.internalContext.objectMetadataMap[objectMetadataName]; if (!objectMetadata) { throw new Error( `Object metadata for object "${objectMetadataName}" is missing ` + `in workspace "${this.internalContext.workspaceId}" ` + - `with object metadata collection length: ${this.internalContext.objectMetadataCollection.length}`, + `with object metadata collection length: ${this.internalContext.objectMetadataMap.length}`, ); } @@ -639,10 +639,12 @@ export class WorkspaceRepository< } private async getCompositeFieldMetadataCollection( - objectMetadata: ObjectMetadataEntity, + objectMetadata: ObjectMetadataMapItem, ) { - const compositeFieldMetadataCollection = objectMetadata.fields.filter( - (fieldMetadata) => isCompositeFieldMetadataType(fieldMetadata.type), + const compositeFieldMetadataCollection = Object.values( + objectMetadata.fields, + ).filter((fieldMetadata) => + isCompositeFieldMetadataType(fieldMetadata.type), ); return compositeFieldMetadataCollection; @@ -723,7 +725,7 @@ export class WorkspaceRepository< private async formatResult( data: T, - objectMetadata?: ObjectMetadataEntity, + objectMetadata?: ObjectMetadataMapItem, ): Promise { objectMetadata ??= await this.getObjectMetadataFromTarget(); @@ -767,7 +769,7 @@ export class WorkspaceRepository< ); const relationMetadataMap = new Map( - objectMetadata.fields + Object.values(objectMetadata.fields) .filter(({ type }) => isRelationFieldMetadataType(type)) .map((fieldMetadata) => [ fieldMetadata.name, @@ -778,7 +780,7 @@ export class WorkspaceRepository< relationType: computeRelationType( fieldMetadata, fieldMetadata.fromRelationMetadata ?? - fieldMetadata.toRelationMetadata, + (fieldMetadata.toRelationMetadata as RelationMetadataEntity), ), }, ]), @@ -801,16 +803,14 @@ export class WorkspaceRepository< if (relationMetadata) { const toObjectMetadata = - this.internalContext.objectMetadataCollection.find( - (objectMetadata) => - objectMetadata.id === relationMetadata.toObjectMetadataId, - ); + this.internalContext.objectMetadataMap[ + relationMetadata.toObjectMetadataId + ]; const fromObjectMetadata = - this.internalContext.objectMetadataCollection.find( - (objectMetadata) => - objectMetadata.id === relationMetadata.fromObjectMetadataId, - ); + this.internalContext.objectMetadataMap[ + relationMetadata.fromObjectMetadataId + ]; if (!toObjectMetadata) { throw new Error( diff --git a/packages/twenty-server/src/engine/twenty-orm/utils/compute-relation-type.util.ts b/packages/twenty-server/src/engine/twenty-orm/utils/compute-relation-type.util.ts index 8836edbf2cf7..aeaa2abc0940 100644 --- a/packages/twenty-server/src/engine/twenty-orm/utils/compute-relation-type.util.ts +++ b/packages/twenty-server/src/engine/twenty-orm/utils/compute-relation-type.util.ts @@ -1,15 +1,16 @@ -import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; +import { FieldMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata.interface'; + import { RelationMetadataEntity, RelationMetadataType, } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; import { - deduceRelationDirection, RelationDirection, + deduceRelationDirection, } from 'src/engine/utils/deduce-relation-direction.util'; export const computeRelationType = ( - fieldMetadata: FieldMetadataEntity, + fieldMetadata: FieldMetadataInterface, relationMetadata: RelationMetadataEntity, ) => { const relationDirection = deduceRelationDirection( diff --git a/packages/twenty-server/src/engine/twenty-orm/utils/determine-relation-details.util.ts b/packages/twenty-server/src/engine/twenty-orm/utils/determine-relation-details.util.ts index b5876783b7bd..783995afb0a9 100644 --- a/packages/twenty-server/src/engine/twenty-orm/utils/determine-relation-details.util.ts +++ b/packages/twenty-server/src/engine/twenty-orm/utils/determine-relation-details.util.ts @@ -1,8 +1,9 @@ import { RelationType } from 'typeorm/metadata/types/RelationTypes'; -import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; -import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity'; +import { FieldMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata.interface'; + import { RelationMetadataEntity } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; +import { ObjectMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { computeRelationType } from 'src/engine/twenty-orm/utils/compute-relation-type.util'; interface RelationDetails { @@ -13,37 +14,28 @@ interface RelationDetails { } export async function determineRelationDetails( - fieldMetadata: FieldMetadataEntity, + fieldMetadata: FieldMetadataInterface, relationMetadata: RelationMetadataEntity, - objectMetadataCollection: ObjectMetadataEntity[], + objectMetadataMap: ObjectMetadataMap, ): Promise { const relationType = computeRelationType(fieldMetadata, relationMetadata); - let fromObjectMetadata: ObjectMetadataEntity | undefined = - fieldMetadata.object; - let toObjectMetadata: ObjectMetadataEntity | undefined = - objectMetadataCollection.find( - (objectMetadata) => - objectMetadata.id === relationMetadata.toObjectMetadataId, - ); + const fromObjectMetadata = objectMetadataMap[fieldMetadata.objectMetadataId]; + let toObjectMetadata = objectMetadataMap[relationMetadata.toObjectMetadataId]; // RelationMetadata always store the relation from the perspective of the `from` object, MANY_TO_ONE relations are not stored yet if (relationType === 'many-to-one') { - fromObjectMetadata = fieldMetadata.object; - - toObjectMetadata = objectMetadataCollection.find( - (objectMetadata) => - objectMetadata.id === relationMetadata.fromObjectMetadataId, - ); + toObjectMetadata = objectMetadataMap[relationMetadata.fromObjectMetadataId]; } if (!fromObjectMetadata || !toObjectMetadata) { throw new Error('Object metadata not found'); } - const toFieldMetadata = toObjectMetadata.fields.find((field) => - relationType === 'many-to-one' - ? field.id === relationMetadata.fromFieldMetadataId - : field.id === relationMetadata.toFieldMetadataId, + const toFieldMetadata = Object.values(toObjectMetadata.fields).find( + (field) => + relationType === 'many-to-one' + ? field.id === relationMetadata.fromFieldMetadataId + : field.id === relationMetadata.toFieldMetadataId, ); if (!toFieldMetadata) { diff --git a/packages/twenty-server/src/engine/workspace-cache-storage/workspace-cache-storage.service.ts b/packages/twenty-server/src/engine/workspace-cache-storage/workspace-cache-storage.service.ts index 34612e70979c..8d03e725482b 100644 --- a/packages/twenty-server/src/engine/workspace-cache-storage/workspace-cache-storage.service.ts +++ b/packages/twenty-server/src/engine/workspace-cache-storage/workspace-cache-storage.service.ts @@ -5,15 +5,15 @@ import { EntitySchemaOptions } from 'typeorm'; import { CacheStorageService } from 'src/engine/core-modules/cache-storage/cache-storage.service'; import { InjectCacheStorage } from 'src/engine/core-modules/cache-storage/decorators/cache-storage.decorator'; import { CacheStorageNamespace } from 'src/engine/core-modules/cache-storage/types/cache-storage-namespace.enum'; -import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity'; +import { ObjectMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; enum WorkspaceCacheKeys { GraphQLTypeDefs = 'graphql:type-defs', GraphQLUsedScalarNames = 'graphql:used-scalar-names', GraphQLOperations = 'graphql:operations', ORMEntitySchemas = 'orm:entity-schemas', - MetadataObjectMetadataCollection = 'metadata:object-metadata-collection', - MetadataObjectMetadataCollectionOngoingCachingLock = 'metadata:object-metadata-collection-ongoing-caching-lock', + MetadataObjectMetadataMap = 'metadata:object-metadata-map', + MetadataObjectMetadataOngoingCachingLock = 'metadata:object-metadata-ongoing-caching-lock', MetadataVersion = 'metadata:workspace-metadata-version', } @@ -65,46 +65,46 @@ export class WorkspaceCacheStorageService { metadataVersion: number, ) { return this.cacheStorageService.set( - `${WorkspaceCacheKeys.MetadataObjectMetadataCollectionOngoingCachingLock}:${workspaceId}:${metadataVersion}`, + `${WorkspaceCacheKeys.MetadataObjectMetadataOngoingCachingLock}:${workspaceId}:${metadataVersion}`, true, ); } - removeObjectMetadataCollectionOngoingCachingLock( + removeObjectMetadataOngoingCachingLock( workspaceId: string, metadataVersion: number, ) { return this.cacheStorageService.del( - `${WorkspaceCacheKeys.MetadataObjectMetadataCollectionOngoingCachingLock}:${workspaceId}:${metadataVersion}`, + `${WorkspaceCacheKeys.MetadataObjectMetadataOngoingCachingLock}:${workspaceId}:${metadataVersion}`, ); } - getObjectMetadataCollectionOngoingCachingLock( + getObjectMetadataOngoingCachingLock( workspaceId: string, metadataVersion: number, ): Promise { return this.cacheStorageService.get( - `${WorkspaceCacheKeys.MetadataObjectMetadataCollectionOngoingCachingLock}:${workspaceId}:${metadataVersion}`, + `${WorkspaceCacheKeys.MetadataObjectMetadataOngoingCachingLock}:${workspaceId}:${metadataVersion}`, ); } - setObjectMetadataCollection( + setObjectMetadataMap( workspaceId: string, metadataVersion: number, - objectMetadataCollection: ObjectMetadataEntity[], + objectMetadataMap: ObjectMetadataMap, ) { - return this.cacheStorageService.set( - `${WorkspaceCacheKeys.MetadataObjectMetadataCollection}:${workspaceId}:${metadataVersion}`, - objectMetadataCollection, + return this.cacheStorageService.set( + `${WorkspaceCacheKeys.MetadataObjectMetadataMap}:${workspaceId}:${metadataVersion}`, + objectMetadataMap, ); } - getObjectMetadataCollection( + getObjectMetadataMap( workspaceId: string, metadataVersion: number, - ): Promise { - return this.cacheStorageService.get( - `${WorkspaceCacheKeys.MetadataObjectMetadataCollection}:${workspaceId}:${metadataVersion}`, + ): Promise { + return this.cacheStorageService.get( + `${WorkspaceCacheKeys.MetadataObjectMetadataMap}:${workspaceId}:${metadataVersion}`, ); } @@ -150,7 +150,7 @@ export class WorkspaceCacheStorageService { async flush(workspaceId: string, metadataVersion: number): Promise { await this.cacheStorageService.del( - `${WorkspaceCacheKeys.MetadataObjectMetadataCollection}:${workspaceId}:${metadataVersion}`, + `${WorkspaceCacheKeys.MetadataObjectMetadataMap}:${workspaceId}:${metadataVersion}`, ); await this.cacheStorageService.del( `${WorkspaceCacheKeys.MetadataVersion}:${workspaceId}:${metadataVersion}`, @@ -166,7 +166,7 @@ export class WorkspaceCacheStorageService { ); await this.cacheStorageService.del( - `${WorkspaceCacheKeys.MetadataObjectMetadataCollectionOngoingCachingLock}:${workspaceId}:${metadataVersion}`, + `${WorkspaceCacheKeys.MetadataObjectMetadataOngoingCachingLock}:${workspaceId}:${metadataVersion}`, ); } } From 998cb912dcb7eaaeb54220fbfef57db81627b09c Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Thu, 12 Sep 2024 21:51:32 +0200 Subject: [PATCH 03/16] Fix --- .../orm-mappers/object-records-to-graphql-connection.mapper.ts | 2 +- .../utils/get-relation-object-metadata.util.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/orm-mappers/object-records-to-graphql-connection.mapper.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/orm-mappers/object-records-to-graphql-connection.mapper.ts index cddb43f8c5dc..88d14093261f 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/orm-mappers/object-records-to-graphql-connection.mapper.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/orm-mappers/object-records-to-graphql-connection.mapper.ts @@ -10,11 +10,11 @@ import { GraphqlQueryRunnerExceptionCode, } from 'src/engine/api/graphql/graphql-query-runner/errors/graphql-query-runner.exception'; import { encodeCursor } from 'src/engine/api/graphql/graphql-query-runner/utils/cursors.util'; -import { ObjectMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { getRelationObjectMetadata } from 'src/engine/api/graphql/graphql-query-runner/utils/get-relation-object-metadata.util'; import { compositeTypeDefinitions } from 'src/engine/metadata-modules/field-metadata/composite-types'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { isCompositeFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/utils/is-composite-field-metadata-type.util'; +import { ObjectMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { CompositeFieldMetadataType } from 'src/engine/metadata-modules/workspace-migration/factories/composite-column-action.factory'; import { isRelationFieldMetadataType } from 'src/engine/utils/is-relation-field-metadata-type.util'; import { isPlainObject } from 'src/utils/is-plain-object'; diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-relation-object-metadata.util.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-relation-object-metadata.util.ts index 5af056700ea9..06e92388e562 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-relation-object-metadata.util.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-relation-object-metadata.util.ts @@ -1,6 +1,6 @@ import { FieldMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata.interface'; -import { ObjectMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; +import { ObjectMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { deduceRelationDirection, RelationDirection, From 92cac7ab19ff88ac794c5a475f42a2f446311072 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Thu, 12 Sep 2024 22:18:02 +0200 Subject: [PATCH 04/16] Fix --- .../graphql-query-filter-condition.parser.ts | 2 +- .../graphql-query-filter/graphql-query-filter-field.parser.ts | 2 +- .../__tests__/graphql-query-order.parser.spec.ts | 2 +- .../graphql-query-order/graphql-query-order.parser.ts | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-condition.parser.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-condition.parser.ts index 967f6b6778a6..d27996c02896 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-condition.parser.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-condition.parser.ts @@ -2,7 +2,7 @@ import { FindOptionsWhere, ObjectLiteral } from 'typeorm'; import { RecordFilter } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface'; -import { FieldMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; +import { FieldMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { GraphqlQueryFilterFieldParser } from './graphql-query-filter-field.parser'; diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-field.parser.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-field.parser.ts index db390ead4504..9df7ab803a97 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-field.parser.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-filter/graphql-query-filter-field.parser.ts @@ -3,9 +3,9 @@ import { FindOptionsWhere, Not, ObjectLiteral } from 'typeorm'; import { RecordFilter } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface'; import { FieldMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata.interface'; -import { FieldMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { compositeTypeDefinitions } from 'src/engine/metadata-modules/field-metadata/composite-types'; import { isCompositeFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/utils/is-composite-field-metadata-type.util'; +import { FieldMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { CompositeFieldMetadataType } from 'src/engine/metadata-modules/workspace-migration/factories/composite-column-action.factory'; import { capitalize } from 'src/utils/capitalize'; import { isPlainObject } from 'src/utils/is-plain-object'; diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/__tests__/graphql-query-order.parser.spec.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/__tests__/graphql-query-order.parser.spec.ts index d829f239f212..cf9864f3e12c 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/__tests__/graphql-query-order.parser.spec.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/__tests__/graphql-query-order.parser.spec.ts @@ -1,8 +1,8 @@ import { OrderByDirection } from 'src/engine/api/graphql/workspace-query-builder/interfaces/record.interface'; import { GraphqlQueryOrderFieldParser } from 'src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/graphql-query-order.parser'; -import { FieldMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; +import { FieldMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; describe('GraphqlQueryOrderFieldParser', () => { let parser: GraphqlQueryOrderFieldParser; diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/graphql-query-order.parser.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/graphql-query-order.parser.ts index 68c9b025a1b9..914c2f4d483d 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/graphql-query-order.parser.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/graphql-query-order.parser.ts @@ -10,12 +10,11 @@ import { GraphqlQueryRunnerException, GraphqlQueryRunnerExceptionCode, } from 'src/engine/api/graphql/graphql-query-runner/errors/graphql-query-runner.exception'; -import { FieldMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { compositeTypeDefinitions } from 'src/engine/metadata-modules/field-metadata/composite-types'; import { isCompositeFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/utils/is-composite-field-metadata-type.util'; +import { FieldMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { CompositeFieldMetadataType } from 'src/engine/metadata-modules/workspace-migration/factories/composite-column-action.factory'; import { capitalize } from 'src/utils/capitalize'; - export class GraphqlQueryOrderFieldParser { private fieldMetadataMap: FieldMetadataMap; From 82156870c98af0db1679505d9a491494c691f3b1 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Thu, 12 Sep 2024 22:19:02 +0200 Subject: [PATCH 05/16] Fix --- .../resolvers/graphql-query-find-many-resolver.service.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-many-resolver.service.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-many-resolver.service.ts index 7d7a7c86dc01..5058514708db 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-many-resolver.service.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-many-resolver.service.ts @@ -20,10 +20,8 @@ import { GraphqlQueryParser } from 'src/engine/api/graphql/graphql-query-runner/ import { ObjectRecordsToGraphqlConnectionMapper } from 'src/engine/api/graphql/graphql-query-runner/orm-mappers/object-records-to-graphql-connection.mapper'; import { applyRangeFilter } from 'src/engine/api/graphql/graphql-query-runner/utils/apply-range-filter.util'; import { decodeCursor } from 'src/engine/api/graphql/graphql-query-runner/utils/cursors.util'; -import { - convertObjectMetadataToMap, - getObjectMetadata, -} from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; +import { getObjectMetadata } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; +import { generateObjectMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { TwentyORMGlobalManager } from 'src/engine/twenty-orm/twenty-orm-global.manager'; export class GraphqlQueryFindManyResolverService { @@ -51,7 +49,7 @@ export class GraphqlQueryFindManyResolverService { authContext.workspace.id, objectMetadataItem.nameSingular, ); - const objectMetadataMap = convertObjectMetadataToMap( + const objectMetadataMap = generateObjectMetadataMap( objectMetadataCollection, ); const objectMetadata = getObjectMetadata( From 5cdd09b9e458c97397fe6b3e02ed9fca72545c7e Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Thu, 12 Sep 2024 22:20:56 +0200 Subject: [PATCH 06/16] Fix --- .../graphql-query-parsers/graphql-query.parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query.parser.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query.parser.ts index 0f189f3d65b1..9ad9c0b940f5 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query.parser.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query.parser.ts @@ -17,7 +17,7 @@ import { GraphqlQuerySelectedFieldsParser } from 'src/engine/api/graphql/graphql import { FieldMetadataMap, ObjectMetadataMap, -} from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; +} from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; export class GraphqlQueryParser { private fieldMetadataMap: FieldMetadataMap; From 9a740d6e8a336c6ef6552f505e884c426be8ba6d Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Thu, 12 Sep 2024 23:47:45 +0200 Subject: [PATCH 07/16] Fix --- .../graphql-selected-fields-relation.parser.ts | 2 +- .../graphql-selected-fields.parser.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields-relation.parser.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields-relation.parser.ts index 0e109458da69..19308a44989c 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields-relation.parser.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields-relation.parser.ts @@ -1,8 +1,8 @@ import { FieldMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata.interface'; import { GraphqlQuerySelectedFieldsParser } from 'src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields.parser'; -import { ObjectMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { getRelationObjectMetadata } from 'src/engine/api/graphql/graphql-query-runner/utils/get-relation-object-metadata.util'; +import { ObjectMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; export class GraphqlQuerySelectedFieldsRelationParser { private objectMetadataMap: ObjectMetadataMap; diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields.parser.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields.parser.ts index ba7449a9b5b0..d1b69345fee2 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields.parser.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields.parser.ts @@ -5,9 +5,9 @@ import { GraphqlQueryRunnerExceptionCode, } from 'src/engine/api/graphql/graphql-query-runner/errors/graphql-query-runner.exception'; import { GraphqlQuerySelectedFieldsRelationParser } from 'src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-selected-fields/graphql-selected-fields-relation.parser'; -import { ObjectMetadataMap } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; import { compositeTypeDefinitions } from 'src/engine/metadata-modules/field-metadata/composite-types'; import { isCompositeFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/utils/is-composite-field-metadata-type.util'; +import { ObjectMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { CompositeFieldMetadataType } from 'src/engine/metadata-modules/workspace-migration/factories/composite-column-action.factory'; import { isRelationFieldMetadataType } from 'src/engine/utils/is-relation-field-metadata-type.util'; import { capitalize } from 'src/utils/capitalize'; From 3e5dbc0c352fa61a7b925b7f84ea15e38154a0d9 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Fri, 13 Sep 2024 00:25:15 +0200 Subject: [PATCH 08/16] Add logs --- .../database/typeorm/core/core.datasource.ts | 2 +- .../typeorm/metadata/metadata.datasource.ts | 2 +- .../api/graphql/metadata.module-factory.ts | 4 ++-- .../field-metadata/field-metadata.service.ts | 21 +++++++++++++++++++ .../workspace-metadata-cache.service.ts | 8 +++++++ 5 files changed, 33 insertions(+), 4 deletions(-) diff --git a/packages/twenty-server/src/database/typeorm/core/core.datasource.ts b/packages/twenty-server/src/database/typeorm/core/core.datasource.ts index 1260f9bcf01d..64ef5a5d0233 100644 --- a/packages/twenty-server/src/database/typeorm/core/core.datasource.ts +++ b/packages/twenty-server/src/database/typeorm/core/core.datasource.ts @@ -7,7 +7,7 @@ config(); export const typeORMCoreModuleOptions: TypeOrmModuleOptions = { url: process.env.PG_DATABASE_URL, type: 'postgres', - logging: ['error'], + logging: ['error', 'query'], schema: 'core', entities: ['dist/src/engine/core-modules/**/*.entity{.ts,.js}'], synchronize: false, diff --git a/packages/twenty-server/src/database/typeorm/metadata/metadata.datasource.ts b/packages/twenty-server/src/database/typeorm/metadata/metadata.datasource.ts index de67cc736796..fe12118b4da9 100644 --- a/packages/twenty-server/src/database/typeorm/metadata/metadata.datasource.ts +++ b/packages/twenty-server/src/database/typeorm/metadata/metadata.datasource.ts @@ -7,7 +7,7 @@ config(); export const typeORMMetadataModuleOptions: TypeOrmModuleOptions = { url: process.env.PG_DATABASE_URL, type: 'postgres', - logging: ['error'], + logging: ['error', 'query'], schema: 'metadata', entities: ['dist/src/engine/metadata-modules/**/*.entity{.ts,.js}'], synchronize: false, diff --git a/packages/twenty-server/src/engine/api/graphql/metadata.module-factory.ts b/packages/twenty-server/src/engine/api/graphql/metadata.module-factory.ts index 52b75eab3979..7b91fd5394bd 100644 --- a/packages/twenty-server/src/engine/api/graphql/metadata.module-factory.ts +++ b/packages/twenty-server/src/engine/api/graphql/metadata.module-factory.ts @@ -4,11 +4,11 @@ import GraphQLJSON from 'graphql-type-json'; import { useCachedMetadata } from 'src/engine/api/graphql/graphql-config/hooks/use-cached-metadata'; import { useThrottler } from 'src/engine/api/graphql/graphql-config/hooks/use-throttler'; import { MetadataGraphQLApiModule } from 'src/engine/api/graphql/metadata-graphql-api.module'; -import { useGraphQLErrorHandlerHook } from 'src/engine/core-modules/graphql/hooks/use-graphql-error-handler.hook'; -import { DataloaderService } from 'src/engine/dataloaders/dataloader.service'; import { CacheStorageService } from 'src/engine/core-modules/cache-storage/cache-storage.service'; import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; import { ExceptionHandlerService } from 'src/engine/core-modules/exception-handler/exception-handler.service'; +import { useGraphQLErrorHandlerHook } from 'src/engine/core-modules/graphql/hooks/use-graphql-error-handler.hook'; +import { DataloaderService } from 'src/engine/dataloaders/dataloader.service'; import { renderApolloPlayground } from 'src/engine/utils/render-apollo-playground.util'; export const metadataModuleFactory = async ( diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts index fec98f221b89..2c59f00c729b 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts @@ -89,6 +89,7 @@ export class FieldMetadataService extends TypeOrmQueryService { + console.time('createOne'); const queryRunner = this.metadataDataSource.createQueryRunner(); await queryRunner.connect(); @@ -100,6 +101,7 @@ export class FieldMetadataService extends TypeOrmQueryService, ) {} + @LogExecutionTime() async recomputeMetadataCache( workspaceId: string, force = false, @@ -69,6 +71,7 @@ export class WorkspaceMetadataCacheService { currentDatabaseVersion, ); + console.time('fetching object metadata'); const objectMetadataItems = await this.objectMetadataRepository.find({ where: { workspaceId }, relations: [ @@ -78,9 +81,14 @@ export class WorkspaceMetadataCacheService { ], }); + console.timeEnd('fetching object metadata'); + + console.time('generating object metadata map'); const freshObjectMetadataMap = generateObjectMetadataMap(objectMetadataItems); + console.timeEnd('generating object metadata map'); + await this.workspaceCacheStorageService.setObjectMetadataMap( workspaceId, currentDatabaseVersion, From 304be2ffa412e0cf07a1869449003422733082e8 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Fri, 13 Sep 2024 01:16:55 +0200 Subject: [PATCH 09/16] Fix --- .../database/typeorm/core/core.datasource.ts | 2 +- .../typeorm/metadata/metadata.datasource.ts | 2 +- .../controllers/rest-api-core.controller.ts | 3 +- .../src/engine/api/rest/rest-api.module.ts | 16 +++++---- .../src/engine/guards/jwt-auth.guard.ts | 35 +++++++++++++++++++ .../field-metadata/field-metadata.service.ts | 2 +- 6 files changed, 49 insertions(+), 11 deletions(-) create mode 100644 packages/twenty-server/src/engine/guards/jwt-auth.guard.ts diff --git a/packages/twenty-server/src/database/typeorm/core/core.datasource.ts b/packages/twenty-server/src/database/typeorm/core/core.datasource.ts index 64ef5a5d0233..1260f9bcf01d 100644 --- a/packages/twenty-server/src/database/typeorm/core/core.datasource.ts +++ b/packages/twenty-server/src/database/typeorm/core/core.datasource.ts @@ -7,7 +7,7 @@ config(); export const typeORMCoreModuleOptions: TypeOrmModuleOptions = { url: process.env.PG_DATABASE_URL, type: 'postgres', - logging: ['error', 'query'], + logging: ['error'], schema: 'core', entities: ['dist/src/engine/core-modules/**/*.entity{.ts,.js}'], synchronize: false, diff --git a/packages/twenty-server/src/database/typeorm/metadata/metadata.datasource.ts b/packages/twenty-server/src/database/typeorm/metadata/metadata.datasource.ts index fe12118b4da9..de67cc736796 100644 --- a/packages/twenty-server/src/database/typeorm/metadata/metadata.datasource.ts +++ b/packages/twenty-server/src/database/typeorm/metadata/metadata.datasource.ts @@ -7,7 +7,7 @@ config(); export const typeORMMetadataModuleOptions: TypeOrmModuleOptions = { url: process.env.PG_DATABASE_URL, type: 'postgres', - logging: ['error', 'query'], + logging: ['error'], schema: 'metadata', entities: ['dist/src/engine/metadata-modules/**/*.entity{.ts,.js}'], synchronize: false, diff --git a/packages/twenty-server/src/engine/api/rest/core/controllers/rest-api-core.controller.ts b/packages/twenty-server/src/engine/api/rest/core/controllers/rest-api-core.controller.ts index 30c7fce4e6dc..488b03a262f3 100644 --- a/packages/twenty-server/src/engine/api/rest/core/controllers/rest-api-core.controller.ts +++ b/packages/twenty-server/src/engine/api/rest/core/controllers/rest-api-core.controller.ts @@ -14,10 +14,11 @@ import { Request, Response } from 'express'; import { RestApiCoreService } from 'src/engine/api/rest/core/rest-api-core.service'; import { cleanGraphQLResponse } from 'src/engine/api/rest/utils/clean-graphql-response.utils'; +import { JwtAuthGuard } from 'src/engine/guards/jwt-auth.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @Controller('rest/*') -@UseGuards(WorkspaceAuthGuard) +@UseGuards(JwtAuthGuard, WorkspaceAuthGuard) export class RestApiCoreController { constructor(private readonly restApiCoreService: RestApiCoreService) {} diff --git a/packages/twenty-server/src/engine/api/rest/rest-api.module.ts b/packages/twenty-server/src/engine/api/rest/rest-api.module.ts index c459f3286264..f54d89537531 100644 --- a/packages/twenty-server/src/engine/api/rest/rest-api.module.ts +++ b/packages/twenty-server/src/engine/api/rest/rest-api.module.ts @@ -1,23 +1,25 @@ -import { Module } from '@nestjs/common'; import { HttpModule } from '@nestjs/axios'; +import { Module } from '@nestjs/common'; +import { RestApiCoreBatchController } from 'src/engine/api/rest/core/controllers/rest-api-core-batch.controller'; import { RestApiCoreController } from 'src/engine/api/rest/core/controllers/rest-api-core.controller'; -import { RestApiCoreService } from 'src/engine/api/rest/core/rest-api-core.service'; import { CoreQueryBuilderModule } from 'src/engine/api/rest/core/query-builder/core-query-builder.module'; -import { AuthModule } from 'src/engine/core-modules/auth/auth.module'; -import { RestApiMetadataController } from 'src/engine/api/rest/metadata/rest-api-metadata.controller'; -import { RestApiMetadataService } from 'src/engine/api/rest/metadata/rest-api-metadata.service'; -import { RestApiCoreBatchController } from 'src/engine/api/rest/core/controllers/rest-api-core-batch.controller'; -import { RestApiService } from 'src/engine/api/rest/rest-api.service'; +import { RestApiCoreService } from 'src/engine/api/rest/core/rest-api-core.service'; import { EndingBeforeInputFactory } from 'src/engine/api/rest/input-factories/ending-before-input.factory'; import { LimitInputFactory } from 'src/engine/api/rest/input-factories/limit-input.factory'; import { StartingAfterInputFactory } from 'src/engine/api/rest/input-factories/starting-after-input.factory'; import { MetadataQueryBuilderModule } from 'src/engine/api/rest/metadata/query-builder/metadata-query-builder.module'; +import { RestApiMetadataController } from 'src/engine/api/rest/metadata/rest-api-metadata.controller'; +import { RestApiMetadataService } from 'src/engine/api/rest/metadata/rest-api-metadata.service'; +import { RestApiService } from 'src/engine/api/rest/rest-api.service'; +import { AuthModule } from 'src/engine/core-modules/auth/auth.module'; +import { WorkspaceCacheStorageModule } from 'src/engine/workspace-cache-storage/workspace-cache-storage.module'; @Module({ imports: [ CoreQueryBuilderModule, MetadataQueryBuilderModule, + WorkspaceCacheStorageModule, AuthModule, HttpModule, ], diff --git a/packages/twenty-server/src/engine/guards/jwt-auth.guard.ts b/packages/twenty-server/src/engine/guards/jwt-auth.guard.ts new file mode 100644 index 000000000000..5d00466ad708 --- /dev/null +++ b/packages/twenty-server/src/engine/guards/jwt-auth.guard.ts @@ -0,0 +1,35 @@ +import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common'; + +import { TokenService } from 'src/engine/core-modules/auth/services/token.service'; +import { WorkspaceCacheStorageService } from 'src/engine/workspace-cache-storage/workspace-cache-storage.service'; + +@Injectable() +export class JwtAuthGuard implements CanActivate { + constructor( + private readonly tokenService: TokenService, + private readonly workspaceStorageCacheService: WorkspaceCacheStorageService, + ) {} + + async canActivate(context: ExecutionContext): Promise { + const request = context.switchToHttp().getRequest(); + + try { + const data = await this.tokenService.validateToken(request); + const metadataVersion = + await this.workspaceStorageCacheService.getMetadataVersion( + data.workspace.id, + ); + + request.user = data.user; + request.apiKey = data.apiKey; + request.workspace = data.workspace; + request.workspaceId = data.workspace.id; + request.workspaceMetadataVersion = metadataVersion; + request.workspaceMemberId = data.workspaceMemberId; + + return true; + } catch (error) { + return false; + } + } +} diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts index 2c59f00c729b..496c536aaa77 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts @@ -293,7 +293,7 @@ export class FieldMetadataService extends TypeOrmQueryService Date: Fri, 13 Sep 2024 16:41:11 +0200 Subject: [PATCH 10/16] Deprecate fromRelationMetadata and toRelationMetadata --- .../src/generated-metadata/gql.ts | 4 +- .../src/generated-metadata/graphql.ts | 23 +- .../twenty-front/src/generated/graphql.tsx | 31 +- .../utils/getRelationDefinition.ts | 37 +- .../favorites/utils/sort-favorites.util.ts | 4 +- .../object-metadata/graphql/queries.ts | 26 - .../useFindManyObjectMetadataItems.ts | 28 +- .../useCreateOneRelationMetadataItem.test.tsx | 6 +- .../hooks/useGetRelationMetadata.ts | 38 +- .../types/FieldMetadataItem.ts | 25 +- ...ormatFieldMetadataItemAsFieldDefinition.ts | 9 +- .../utils/formatRelationMetadataInput.ts | 7 +- .../utils/getObjectMetadataItemsMock.ts | 2808 +---------------- .../utils/mapFieldMetadataToGraphQLQuery.ts | 15 +- .../utils/parseFieldRelationType.ts | 55 - .../fieldMetadataItemSchema.ts | 37 - .../record-field/types/FieldDefinition.ts | 5 - .../RecordDetailRelationRecordsListItem.tsx | 7 +- .../components/__stories__/perf/mock.ts | 154 - .../utils/generateDefaultFieldValue.ts | 5 +- .../utils/generateEmptyFieldValue.ts | 4 +- .../utils/isFieldCellSupported.ts | 33 +- .../data-model/constants/RelationTypes.ts | 17 +- .../SettingsDataModelFieldRelationForm.tsx | 13 +- ...DataModelFieldRelationSettingsFormCard.tsx | 2 +- .../useRelationSettingsFormInitialValues.ts | 9 +- .../SettingsDataModelOverviewEffect.tsx | 16 +- .../SettingsDataModelOverviewField.tsx | 7 +- .../SettingsObjectFieldItemTableRow.tsx | 6 +- .../settings/data-model/types/RelationType.ts | 6 +- .../standard-metadata-query-result.ts | 1726 +--------- .../src/testing/mock-data/metadata.ts | 30 - .../workspace/services/workspace.service.ts | 16 +- .../dataloaders/dataloader.interface.ts | 6 +- .../engine/dataloaders/dataloader.service.ts | 22 +- .../field-metadata/dtos/field-metadata.dto.ts | 2 + .../field-metadata/field-metadata.resolver.ts | 6 +- .../field-metadata/field-metadata.service.ts | 48 +- .../relation-metadata.service.ts | 75 +- .../generate-object-metadata-map.util.ts | 1 + 40 files changed, 301 insertions(+), 5068 deletions(-) delete mode 100644 packages/twenty-front/src/modules/object-metadata/utils/parseFieldRelationType.ts diff --git a/packages/twenty-front/src/generated-metadata/gql.ts b/packages/twenty-front/src/generated-metadata/gql.ts index 3b0ced4781f5..a01821654262 100644 --- a/packages/twenty-front/src/generated-metadata/gql.ts +++ b/packages/twenty-front/src/generated-metadata/gql.ts @@ -32,7 +32,7 @@ const documents = { "\n mutation DeleteOneObjectMetadataItem($idToDelete: UUID!) {\n deleteOneObject(input: { id: $idToDelete }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n": types.DeleteOneObjectMetadataItemDocument, "\n mutation DeleteOneFieldMetadataItem($idToDelete: UUID!) {\n deleteOneField(input: { id: $idToDelete }) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n }\n }\n": types.DeleteOneFieldMetadataItemDocument, "\n mutation DeleteOneRelationMetadataItem($idToDelete: UUID!) {\n deleteOneRelation(input: { id: $idToDelete }) {\n id\n }\n }\n": types.DeleteOneRelationMetadataItemDocument, - "\n query ObjectMetadataItems(\n $objectFilter: objectFilter\n $fieldFilter: fieldFilter\n ) {\n objects(paging: { first: 1000 }, filter: $objectFilter) {\n edges {\n node {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isRemote\n isActive\n isSystem\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n fields(paging: { first: 1000 }, filter: $fieldFilter) {\n edges {\n node {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isSystem\n isNullable\n createdAt\n updatedAt\n fromRelationMetadata {\n id\n relationType\n toObjectMetadata {\n id\n dataSourceId\n nameSingular\n namePlural\n isSystem\n isRemote\n }\n toFieldMetadataId\n }\n toRelationMetadata {\n id\n relationType\n fromObjectMetadata {\n id\n dataSourceId\n nameSingular\n namePlural\n isSystem\n isRemote\n }\n fromFieldMetadataId\n }\n defaultValue\n options\n relationDefinition {\n relationId\n direction\n sourceObjectMetadata {\n id\n nameSingular\n namePlural\n }\n sourceFieldMetadata {\n id\n name\n }\n targetObjectMetadata {\n id\n nameSingular\n namePlural\n }\n targetFieldMetadata {\n id\n name\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n": types.ObjectMetadataItemsDocument, + "\n query ObjectMetadataItems(\n $objectFilter: objectFilter\n $fieldFilter: fieldFilter\n ) {\n objects(paging: { first: 1000 }, filter: $objectFilter) {\n edges {\n node {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isRemote\n isActive\n isSystem\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n fields(paging: { first: 1000 }, filter: $fieldFilter) {\n edges {\n node {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isSystem\n isNullable\n createdAt\n updatedAt\n defaultValue\n options\n relationDefinition {\n relationId\n direction\n sourceObjectMetadata {\n id\n nameSingular\n namePlural\n }\n sourceFieldMetadata {\n id\n name\n }\n targetObjectMetadata {\n id\n nameSingular\n namePlural\n }\n targetFieldMetadata {\n id\n name\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n": types.ObjectMetadataItemsDocument, "\n fragment ServerlessFunctionFields on ServerlessFunction {\n id\n name\n description\n sourceCodeHash\n runtime\n syncStatus\n latestVersion\n createdAt\n updatedAt\n }\n": types.ServerlessFunctionFieldsFragmentDoc, "\n \n mutation CreateOneServerlessFunctionItem(\n $input: CreateServerlessFunctionInput!\n ) {\n createOneServerlessFunction(input: $input) {\n ...ServerlessFunctionFields\n }\n }\n": types.CreateOneServerlessFunctionItemDocument, "\n \n mutation DeleteOneServerlessFunction($input: DeleteServerlessFunctionInput!) {\n deleteOneServerlessFunction(input: $input) {\n ...ServerlessFunctionFields\n }\n }\n": types.DeleteOneServerlessFunctionDocument, @@ -138,7 +138,7 @@ export function graphql(source: "\n mutation DeleteOneRelationMetadataItem($idT /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "\n query ObjectMetadataItems(\n $objectFilter: objectFilter\n $fieldFilter: fieldFilter\n ) {\n objects(paging: { first: 1000 }, filter: $objectFilter) {\n edges {\n node {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isRemote\n isActive\n isSystem\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n fields(paging: { first: 1000 }, filter: $fieldFilter) {\n edges {\n node {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isSystem\n isNullable\n createdAt\n updatedAt\n fromRelationMetadata {\n id\n relationType\n toObjectMetadata {\n id\n dataSourceId\n nameSingular\n namePlural\n isSystem\n isRemote\n }\n toFieldMetadataId\n }\n toRelationMetadata {\n id\n relationType\n fromObjectMetadata {\n id\n dataSourceId\n nameSingular\n namePlural\n isSystem\n isRemote\n }\n fromFieldMetadataId\n }\n defaultValue\n options\n relationDefinition {\n relationId\n direction\n sourceObjectMetadata {\n id\n nameSingular\n namePlural\n }\n sourceFieldMetadata {\n id\n name\n }\n targetObjectMetadata {\n id\n nameSingular\n namePlural\n }\n targetFieldMetadata {\n id\n name\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n"): (typeof documents)["\n query ObjectMetadataItems(\n $objectFilter: objectFilter\n $fieldFilter: fieldFilter\n ) {\n objects(paging: { first: 1000 }, filter: $objectFilter) {\n edges {\n node {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isRemote\n isActive\n isSystem\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n fields(paging: { first: 1000 }, filter: $fieldFilter) {\n edges {\n node {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isSystem\n isNullable\n createdAt\n updatedAt\n fromRelationMetadata {\n id\n relationType\n toObjectMetadata {\n id\n dataSourceId\n nameSingular\n namePlural\n isSystem\n isRemote\n }\n toFieldMetadataId\n }\n toRelationMetadata {\n id\n relationType\n fromObjectMetadata {\n id\n dataSourceId\n nameSingular\n namePlural\n isSystem\n isRemote\n }\n fromFieldMetadataId\n }\n defaultValue\n options\n relationDefinition {\n relationId\n direction\n sourceObjectMetadata {\n id\n nameSingular\n namePlural\n }\n sourceFieldMetadata {\n id\n name\n }\n targetObjectMetadata {\n id\n nameSingular\n namePlural\n }\n targetFieldMetadata {\n id\n name\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n"]; +export function graphql(source: "\n query ObjectMetadataItems(\n $objectFilter: objectFilter\n $fieldFilter: fieldFilter\n ) {\n objects(paging: { first: 1000 }, filter: $objectFilter) {\n edges {\n node {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isRemote\n isActive\n isSystem\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n fields(paging: { first: 1000 }, filter: $fieldFilter) {\n edges {\n node {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isSystem\n isNullable\n createdAt\n updatedAt\n defaultValue\n options\n relationDefinition {\n relationId\n direction\n sourceObjectMetadata {\n id\n nameSingular\n namePlural\n }\n sourceFieldMetadata {\n id\n name\n }\n targetObjectMetadata {\n id\n nameSingular\n namePlural\n }\n targetFieldMetadata {\n id\n name\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n"): (typeof documents)["\n query ObjectMetadataItems(\n $objectFilter: objectFilter\n $fieldFilter: fieldFilter\n ) {\n objects(paging: { first: 1000 }, filter: $objectFilter) {\n edges {\n node {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isRemote\n isActive\n isSystem\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n fields(paging: { first: 1000 }, filter: $fieldFilter) {\n edges {\n node {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isSystem\n isNullable\n createdAt\n updatedAt\n defaultValue\n options\n relationDefinition {\n relationId\n direction\n sourceObjectMetadata {\n id\n nameSingular\n namePlural\n }\n sourceFieldMetadata {\n id\n name\n }\n targetObjectMetadata {\n id\n nameSingular\n namePlural\n }\n targetFieldMetadata {\n id\n name\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts index 4af948bc1783..18ef62e7645a 100644 --- a/packages/twenty-front/src/generated-metadata/graphql.ts +++ b/packages/twenty-front/src/generated-metadata/graphql.ts @@ -440,6 +440,7 @@ export enum MessageChannelVisibility { export type Mutation = { __typename?: 'Mutation'; + activateWorkflowVersion: Scalars['Boolean']['output']; activateWorkspace: Workspace; addUserToWorkspace: User; authorizeApp: AuthorizeApp; @@ -452,6 +453,7 @@ export type Mutation = { createOneRemoteServer: RemoteServer; createOneServerlessFunction: ServerlessFunction; createOneServerlessFunctionFromFile: ServerlessFunction; + deactivateWorkflowVersion: Scalars['Boolean']['output']; deleteCurrentWorkspace: Workspace; deleteOneField: Field; deleteOneObject: Object; @@ -462,7 +464,6 @@ export type Mutation = { disablePostgresProxy: PostgresCredentials; emailPasswordResetLink: EmailPasswordResetLink; enablePostgresProxy: PostgresCredentials; - enableWorkflowTrigger: Scalars['Boolean']['output']; exchangeAuthorizationCode: ExchangeAuthCode; executeOneServerlessFunction: ServerlessFunctionExecutionResult; generateApiKeyToken: ApiKeyToken; @@ -494,6 +495,11 @@ export type Mutation = { }; +export type MutationActivateWorkflowVersionArgs = { + workflowVersionId: Scalars['String']['input']; +}; + + export type MutationActivateWorkspaceArgs = { data: ActivateWorkspaceInput; }; @@ -560,6 +566,11 @@ export type MutationCreateOneServerlessFunctionFromFileArgs = { }; +export type MutationDeactivateWorkflowVersionArgs = { + workflowVersionId: Scalars['String']['input']; +}; + + export type MutationDeleteOneFieldArgs = { input: DeleteOneFieldInput; }; @@ -590,11 +601,6 @@ export type MutationEmailPasswordResetLinkArgs = { }; -export type MutationEnableWorkflowTriggerArgs = { - workflowVersionId: Scalars['String']['input']; -}; - - export type MutationExchangeAuthorizationCodeArgs = { authorizationCode: Scalars['String']['input']; clientSecret?: InputMaybe; @@ -1501,6 +1507,7 @@ export type Field = { isSystem?: Maybe; label: Scalars['String']['output']; name: Scalars['String']['output']; + object?: Maybe; options?: Maybe; relationDefinition?: Maybe; settings?: Maybe; @@ -1724,7 +1731,7 @@ export type ObjectMetadataItemsQueryVariables = Exact<{ }>; -export type ObjectMetadataItemsQuery = { __typename?: 'Query', objects: { __typename?: 'ObjectConnection', edges: Array<{ __typename?: 'objectEdge', node: { __typename?: 'object', id: any, dataSourceId: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, createdAt: any, updatedAt: any, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, fields: { __typename?: 'ObjectFieldsConnection', edges: Array<{ __typename?: 'fieldEdge', node: { __typename?: 'field', id: any, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isNullable?: boolean | null, createdAt: any, updatedAt: any, defaultValue?: any | null, options?: any | null, fromRelationMetadata?: { __typename?: 'relation', id: any, relationType: RelationMetadataType, toFieldMetadataId: string, toObjectMetadata: { __typename?: 'object', id: any, dataSourceId: string, nameSingular: string, namePlural: string, isSystem: boolean, isRemote: boolean } } | null, toRelationMetadata?: { __typename?: 'relation', id: any, relationType: RelationMetadataType, fromFieldMetadataId: string, fromObjectMetadata: { __typename?: 'object', id: any, dataSourceId: string, nameSingular: string, namePlural: string, isSystem: boolean, isRemote: boolean } } | null, relationDefinition?: { __typename?: 'RelationDefinition', relationId: any, direction: RelationDefinitionType, sourceObjectMetadata: { __typename?: 'object', id: any, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'field', id: any, name: string }, targetObjectMetadata: { __typename?: 'object', id: any, nameSingular: string, namePlural: string }, targetFieldMetadata: { __typename?: 'field', id: any, name: string } } | null } }>, pageInfo: { __typename?: 'PageInfo', hasNextPage?: boolean | null, hasPreviousPage?: boolean | null, startCursor?: any | null, endCursor?: any | null } } } }>, pageInfo: { __typename?: 'PageInfo', hasNextPage?: boolean | null, hasPreviousPage?: boolean | null, startCursor?: any | null, endCursor?: any | null } } }; +export type ObjectMetadataItemsQuery = { __typename?: 'Query', objects: { __typename?: 'ObjectConnection', edges: Array<{ __typename?: 'objectEdge', node: { __typename?: 'object', id: any, dataSourceId: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isRemote: boolean, isActive: boolean, isSystem: boolean, createdAt: any, updatedAt: any, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null, fields: { __typename?: 'ObjectFieldsConnection', edges: Array<{ __typename?: 'fieldEdge', node: { __typename?: 'field', id: any, type: FieldMetadataType, name: string, label: string, description?: string | null, icon?: string | null, isCustom?: boolean | null, isActive?: boolean | null, isSystem?: boolean | null, isNullable?: boolean | null, createdAt: any, updatedAt: any, defaultValue?: any | null, options?: any | null, relationDefinition?: { __typename?: 'RelationDefinition', relationId: any, direction: RelationDefinitionType, sourceObjectMetadata: { __typename?: 'object', id: any, nameSingular: string, namePlural: string }, sourceFieldMetadata: { __typename?: 'field', id: any, name: string }, targetObjectMetadata: { __typename?: 'object', id: any, nameSingular: string, namePlural: string }, targetFieldMetadata: { __typename?: 'field', id: any, name: string } } | null } }>, pageInfo: { __typename?: 'PageInfo', hasNextPage?: boolean | null, hasPreviousPage?: boolean | null, startCursor?: any | null, endCursor?: any | null } } } }>, pageInfo: { __typename?: 'PageInfo', hasNextPage?: boolean | null, hasPreviousPage?: boolean | null, startCursor?: any | null, endCursor?: any | null } } }; export type ServerlessFunctionFieldsFragment = { __typename?: 'ServerlessFunction', id: any, name: string, description?: string | null, sourceCodeHash: string, runtime: string, syncStatus: ServerlessFunctionSyncStatus, latestVersion?: string | null, createdAt: any, updatedAt: any }; @@ -1807,7 +1814,7 @@ export const UpdateOneObjectMetadataItemDocument = {"kind":"Document","definitio export const DeleteOneObjectMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteOneObjectMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"idToDelete"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteOneObject"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"idToDelete"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}}]}}]}}]} as unknown as DocumentNode; export const DeleteOneFieldMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteOneFieldMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"idToDelete"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteOneField"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"idToDelete"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode; export const DeleteOneRelationMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteOneRelationMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"idToDelete"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteOneRelation"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"idToDelete"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; -export const ObjectMetadataItemsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ObjectMetadataItems"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"objectFilter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"objectFilter"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fieldFilter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"fieldFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"objects"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"paging"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"1000"}}]}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"objectFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isRemote"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"paging"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"1000"}}]}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fieldFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"fromRelationMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"relationType"}},{"kind":"Field","name":{"kind":"Name","value":"toObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isRemote"}}]}},{"kind":"Field","name":{"kind":"Name","value":"toFieldMetadataId"}}]}},{"kind":"Field","name":{"kind":"Name","value":"toRelationMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"relationType"}},{"kind":"Field","name":{"kind":"Name","value":"fromObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isRemote"}}]}},{"kind":"Field","name":{"kind":"Name","value":"fromFieldMetadataId"}}]}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"relationDefinition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"relationId"}},{"kind":"Field","name":{"kind":"Name","value":"direction"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"hasPreviousPage"}},{"kind":"Field","name":{"kind":"Name","value":"startCursor"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"hasPreviousPage"}},{"kind":"Field","name":{"kind":"Name","value":"startCursor"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}}]}}]}}]} as unknown as DocumentNode; +export const ObjectMetadataItemsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ObjectMetadataItems"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"objectFilter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"objectFilter"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fieldFilter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"fieldFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"objects"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"paging"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"1000"}}]}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"objectFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"dataSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isRemote"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"fields"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"paging"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"1000"}}]}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fieldFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"relationDefinition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"relationId"}},{"kind":"Field","name":{"kind":"Name","value":"direction"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"hasPreviousPage"}},{"kind":"Field","name":{"kind":"Name","value":"startCursor"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"hasPreviousPage"}},{"kind":"Field","name":{"kind":"Name","value":"startCursor"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}}]}}]}}]} as unknown as DocumentNode; export const CreateOneServerlessFunctionItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateOneServerlessFunctionItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateServerlessFunctionInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createOneServerlessFunction"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ServerlessFunctionFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ServerlessFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerlessFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"sourceCodeHash"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"syncStatus"}},{"kind":"Field","name":{"kind":"Name","value":"latestVersion"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode; export const DeleteOneServerlessFunctionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteOneServerlessFunction"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DeleteServerlessFunctionInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteOneServerlessFunction"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ServerlessFunctionFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ServerlessFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerlessFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"sourceCodeHash"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"syncStatus"}},{"kind":"Field","name":{"kind":"Name","value":"latestVersion"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode; export const ExecuteOneServerlessFunctionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ExecuteOneServerlessFunction"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ExecuteServerlessFunctionInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"executeOneServerlessFunction"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}}]}}]} as unknown as DocumentNode; diff --git a/packages/twenty-front/src/generated/graphql.tsx b/packages/twenty-front/src/generated/graphql.tsx index a70718a34ee5..b96a53cbf6ae 100644 --- a/packages/twenty-front/src/generated/graphql.tsx +++ b/packages/twenty-front/src/generated/graphql.tsx @@ -1,5 +1,5 @@ -import * as Apollo from '@apollo/client'; import { gql } from '@apollo/client'; +import * as Apollo from '@apollo/client'; export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -219,7 +219,7 @@ export type ExecuteServerlessFunctionInput = { /** Id of the serverless function to execute */ id: Scalars['UUID']; /** Payload in JSON format */ - payload?: InputMaybe; + payload: Scalars['JSON']; /** Version of the serverless function to execute */ version?: Scalars['String']; }; @@ -338,6 +338,7 @@ export enum MessageChannelVisibility { export type Mutation = { __typename?: 'Mutation'; + activateWorkflowVersion: Scalars['Boolean']; activateWorkspace: Workspace; addUserToWorkspace: User; authorizeApp: AuthorizeApp; @@ -347,15 +348,14 @@ export type Mutation = { createOneObject: Object; createOneServerlessFunction: ServerlessFunction; createOneServerlessFunctionFromFile: ServerlessFunction; + deactivateWorkflowVersion: Scalars['Boolean']; deleteCurrentWorkspace: Workspace; deleteOneObject: Object; deleteOneServerlessFunction: ServerlessFunction; deleteUser: User; disablePostgresProxy: PostgresCredentials; - disableWorkflowTrigger: Scalars['Boolean']; emailPasswordResetLink: EmailPasswordResetLink; enablePostgresProxy: PostgresCredentials; - enableWorkflowTrigger: Scalars['Boolean']; exchangeAuthorizationCode: ExchangeAuthCode; executeOneServerlessFunction: ServerlessFunctionExecutionResult; generateApiKeyToken: ApiKeyToken; @@ -382,6 +382,11 @@ export type Mutation = { }; +export type MutationActivateWorkflowVersionArgs = { + workflowVersionId: Scalars['String']; +}; + + export type MutationActivateWorkspaceArgs = { data: ActivateWorkspaceInput; }; @@ -423,6 +428,11 @@ export type MutationCreateOneServerlessFunctionFromFileArgs = { }; +export type MutationDeactivateWorkflowVersionArgs = { + workflowVersionId: Scalars['String']; +}; + + export type MutationDeleteOneObjectArgs = { input: DeleteOneObjectInput; }; @@ -433,21 +443,11 @@ export type MutationDeleteOneServerlessFunctionArgs = { }; -export type MutationDisableWorkflowTriggerArgs = { - workflowVersionId: Scalars['String']; -}; - - export type MutationEmailPasswordResetLinkArgs = { email: Scalars['String']; }; -export type MutationEnableWorkflowTriggerArgs = { - workflowVersionId: Scalars['String']; -}; - - export type MutationExchangeAuthorizationCodeArgs = { authorizationCode: Scalars['String']; clientSecret?: InputMaybe; @@ -638,9 +638,10 @@ export type Query = { currentWorkspace: Workspace; findWorkspaceFromInviteHash: Workspace; getAISQLQuery: AisqlQueryResult; + getAvailablePackages: Scalars['JSON']; getPostgresCredentials?: Maybe; getProductPrices: ProductPricesEntity; - getServerlessFunctionSourceCode: Scalars['String']; + getServerlessFunctionSourceCode?: Maybe; getTimelineCalendarEventsFromCompanyId: TimelineCalendarEventsWithTotal; getTimelineCalendarEventsFromPersonId: TimelineCalendarEventsWithTotal; getTimelineThreadsFromCompanyId: TimelineThreadsWithTotal; diff --git a/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/getRelationDefinition.ts b/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/getRelationDefinition.ts index a9f44909f6a3..a65a522ef10b 100644 --- a/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/getRelationDefinition.ts +++ b/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/getRelationDefinition.ts @@ -1,10 +1,6 @@ import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem'; import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; -import { RelationType } from '@/settings/data-model/types/RelationType'; -import { - FieldMetadataType, - RelationMetadataType, -} from '~/generated-metadata/graphql'; +import { FieldMetadataType } from '~/generated-metadata/graphql'; export const getRelationDefinition = ({ objectMetadataItems, @@ -17,39 +13,18 @@ export const getRelationDefinition = ({ return null; } - const relationMetadataItem = - fieldMetadataItemOnSourceRecord.fromRelationMetadata || - fieldMetadataItemOnSourceRecord.toRelationMetadata; + const relationDefinition = fieldMetadataItemOnSourceRecord.relationDefinition; - if (!relationMetadataItem) return null; - - const relationSourceFieldMetadataItemId = - 'toFieldMetadataId' in relationMetadataItem - ? relationMetadataItem.toFieldMetadataId - : relationMetadataItem.fromFieldMetadataId; - - if (!relationSourceFieldMetadataItemId) return null; - - // TODO: precise naming, is it relationTypeFromTargetPointOfView or relationTypeFromSourcePointOfView ? - const relationType = - relationMetadataItem.relationType === RelationMetadataType.OneToMany && - fieldMetadataItemOnSourceRecord.toRelationMetadata - ? ('MANY_TO_ONE' satisfies RelationType) - : (relationMetadataItem.relationType as RelationType); - - const targetObjectMetadataNameSingular = - 'toObjectMetadata' in relationMetadataItem - ? relationMetadataItem.toObjectMetadata.nameSingular - : relationMetadataItem.fromObjectMetadata.nameSingular; + if (!relationDefinition) return null; const targetObjectMetadataItem = objectMetadataItems.find( - (item) => item.nameSingular === targetObjectMetadataNameSingular, + (item) => item.id === relationDefinition.targetObjectMetadata.id, ); if (!targetObjectMetadataItem) return null; const fieldMetadataItemOnTargetRecord = targetObjectMetadataItem.fields.find( - (field) => field.id === relationSourceFieldMetadataItemId, + (field) => field.id === relationDefinition.sourceFieldMetadata.id, ); if (!fieldMetadataItemOnTargetRecord) return null; @@ -57,6 +32,6 @@ export const getRelationDefinition = ({ return { fieldMetadataItemOnTargetRecord, targetObjectMetadataItem, - relationType, + relationType: relationDefinition.direction, }; }; diff --git a/packages/twenty-front/src/modules/favorites/utils/sort-favorites.util.ts b/packages/twenty-front/src/modules/favorites/utils/sort-favorites.util.ts index 689c8067a6b9..1e9f4052796d 100644 --- a/packages/twenty-front/src/modules/favorites/utils/sort-favorites.util.ts +++ b/packages/twenty-front/src/modules/favorites/utils/sort-favorites.util.ts @@ -19,8 +19,8 @@ export const sortFavorites = ( const relationObject = favorite[relationField.name]; const relationObjectNameSingular = - relationField.toRelationMetadata?.fromObjectMetadata.nameSingular ?? - ''; + relationField.relationDefinition?.targetObjectMetadata + .nameSingular ?? ''; const objectRecordIdentifier = getObjectRecordIdentifierByNameSingular( diff --git a/packages/twenty-front/src/modules/object-metadata/graphql/queries.ts b/packages/twenty-front/src/modules/object-metadata/graphql/queries.ts index 729e1f96bf53..8dbaad032e4c 100644 --- a/packages/twenty-front/src/modules/object-metadata/graphql/queries.ts +++ b/packages/twenty-front/src/modules/object-metadata/graphql/queries.ts @@ -39,32 +39,6 @@ export const FIND_MANY_OBJECT_METADATA_ITEMS = gql` isNullable createdAt updatedAt - fromRelationMetadata { - id - relationType - toObjectMetadata { - id - dataSourceId - nameSingular - namePlural - isSystem - isRemote - } - toFieldMetadataId - } - toRelationMetadata { - id - relationType - fromObjectMetadata { - id - dataSourceId - nameSingular - namePlural - isSystem - isRemote - } - fromFieldMetadataId - } defaultValue options relationDefinition { diff --git a/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useFindManyObjectMetadataItems.ts b/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useFindManyObjectMetadataItems.ts index 951b2742fbef..c9324a846f95 100644 --- a/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useFindManyObjectMetadataItems.ts +++ b/packages/twenty-front/src/modules/object-metadata/hooks/__mocks__/useFindManyObjectMetadataItems.ts @@ -39,29 +39,27 @@ export const query = gql` isNullable createdAt updatedAt - fromRelationMetadata { - id - relationType - toObjectMetadata { + relationDefinition { + relationId + direction + sourceObjectMetadata { id - dataSourceId nameSingular namePlural - isSystem } - toFieldMetadataId - } - toRelationMetadata { - id - relationType - fromObjectMetadata { + sourceFieldMetadata { + id + name + } + targetObjectMetadata { id - dataSourceId nameSingular namePlural - isSystem } - fromFieldMetadataId + targetFieldMetadata { + id + name + } } defaultValue options diff --git a/packages/twenty-front/src/modules/object-metadata/hooks/__tests__/useCreateOneRelationMetadataItem.test.tsx b/packages/twenty-front/src/modules/object-metadata/hooks/__tests__/useCreateOneRelationMetadataItem.test.tsx index 2d9b7f3e3f01..57692ea959d6 100644 --- a/packages/twenty-front/src/modules/object-metadata/hooks/__tests__/useCreateOneRelationMetadataItem.test.tsx +++ b/packages/twenty-front/src/modules/object-metadata/hooks/__tests__/useCreateOneRelationMetadataItem.test.tsx @@ -1,10 +1,10 @@ -import { ReactNode } from 'react'; import { MockedProvider } from '@apollo/client/testing'; import { act, renderHook } from '@testing-library/react'; +import { ReactNode } from 'react'; import { RecoilRoot } from 'recoil'; import { useCreateOneRelationMetadataItem } from '@/object-metadata/hooks/useCreateOneRelationMetadataItem'; -import { RelationMetadataType } from '~/generated/graphql'; +import { RelationDefinitionType } from '~/generated/graphql'; import { query, @@ -42,7 +42,7 @@ describe('useCreateOneRelationMetadataItem', () => { await act(async () => { const res = await result.current.createOneRelationMetadataItem({ - relationType: RelationMetadataType.OneToOne, + relationType: RelationDefinitionType.OneToOne, field: { label: 'label', }, diff --git a/packages/twenty-front/src/modules/object-metadata/hooks/useGetRelationMetadata.ts b/packages/twenty-front/src/modules/object-metadata/hooks/useGetRelationMetadata.ts index 3217e5bae338..448bac6ef8ac 100644 --- a/packages/twenty-front/src/modules/object-metadata/hooks/useGetRelationMetadata.ts +++ b/packages/twenty-front/src/modules/object-metadata/hooks/useGetRelationMetadata.ts @@ -1,11 +1,7 @@ import { useRecoilCallback } from 'recoil'; import { objectMetadataItemFamilySelector } from '@/object-metadata/states/objectMetadataItemFamilySelector'; -import { RelationType } from '@/settings/data-model/types/RelationType'; -import { - FieldMetadataType, - RelationMetadataType, -} from '~/generated-metadata/graphql'; +import { FieldMetadataType } from '~/generated-metadata/graphql'; import { FieldMetadataItem } from '../types/FieldMetadataItem'; @@ -17,39 +13,19 @@ export const useGetRelationMetadata = () => }: { fieldMetadataItem: Pick< FieldMetadataItem, - 'fromRelationMetadata' | 'toRelationMetadata' | 'type' + 'type' | 'relationDefinition' >; }) => { if (fieldMetadataItem.type !== FieldMetadataType.Relation) return null; - const relationMetadata = - fieldMetadataItem.fromRelationMetadata || - fieldMetadataItem.toRelationMetadata; + const relationDefinition = fieldMetadataItem.relationDefinition; - if (!relationMetadata) return null; - - const relationFieldMetadataId = - 'toFieldMetadataId' in relationMetadata - ? relationMetadata.toFieldMetadataId - : relationMetadata.fromFieldMetadataId; - - if (!relationFieldMetadataId) return null; - - const relationType = - relationMetadata.relationType === RelationMetadataType.OneToMany && - fieldMetadataItem.toRelationMetadata - ? 'MANY_TO_ONE' - : (relationMetadata.relationType as RelationType); - - const relationObjectMetadataNameSingular = - 'toObjectMetadata' in relationMetadata - ? relationMetadata.toObjectMetadata.nameSingular - : relationMetadata.fromObjectMetadata.nameSingular; + if (!relationDefinition) return null; const relationObjectMetadataItem = snapshot .getLoadable( objectMetadataItemFamilySelector({ - objectName: relationObjectMetadataNameSingular, + objectName: relationDefinition.targetObjectMetadata.nameSingular, objectNameType: 'singular', }), ) @@ -59,7 +35,7 @@ export const useGetRelationMetadata = () => const relationFieldMetadataItem = relationObjectMetadataItem.fields.find( - (field) => field.id === relationFieldMetadataId, + (field) => field.id === relationDefinition.targetFieldMetadata.id, ); if (!relationFieldMetadataItem) return null; @@ -67,7 +43,7 @@ export const useGetRelationMetadata = () => return { relationFieldMetadataItem, relationObjectMetadataItem, - relationType, + relationType: relationDefinition.direction, }; }, [], diff --git a/packages/twenty-front/src/modules/object-metadata/types/FieldMetadataItem.ts b/packages/twenty-front/src/modules/object-metadata/types/FieldMetadataItem.ts index 91b1fdd7d164..ed4529ff1102 100644 --- a/packages/twenty-front/src/modules/object-metadata/types/FieldMetadataItem.ts +++ b/packages/twenty-front/src/modules/object-metadata/types/FieldMetadataItem.ts @@ -3,7 +3,6 @@ import { ThemeColor } from 'twenty-ui'; import { Field, Object as MetadataObject, - Relation, RelationDefinition, RelationDefinitionType, } from '~/generated-metadata/graphql'; @@ -18,31 +17,9 @@ export type FieldMetadataItemOption = { export type FieldMetadataItem = Omit< Field, - | '__typename' - | 'fromRelationMetadata' - | 'toRelationMetadata' - | 'defaultValue' - | 'options' - | 'settings' - | 'relationDefinition' + '__typename' | 'defaultValue' | 'options' | 'settings' | 'relationDefinition' > & { __typename?: string; - fromRelationMetadata?: - | (Pick & { - toObjectMetadata: Pick< - Relation['toObjectMetadata'], - 'id' | 'nameSingular' | 'namePlural' | 'isSystem' | 'isRemote' - >; - }) - | null; - toRelationMetadata?: - | (Pick & { - fromObjectMetadata: Pick< - Relation['fromObjectMetadata'], - 'id' | 'nameSingular' | 'namePlural' | 'isSystem' | 'isRemote' - >; - }) - | null; defaultValue?: any; options?: FieldMetadataItemOption[] | null; relationDefinition?: { diff --git a/packages/twenty-front/src/modules/object-metadata/utils/formatFieldMetadataItemAsFieldDefinition.ts b/packages/twenty-front/src/modules/object-metadata/utils/formatFieldMetadataItemAsFieldDefinition.ts index a579d5ce4de3..7d26d1150410 100644 --- a/packages/twenty-front/src/modules/object-metadata/utils/formatFieldMetadataItemAsFieldDefinition.ts +++ b/packages/twenty-front/src/modules/object-metadata/utils/formatFieldMetadataItemAsFieldDefinition.ts @@ -1,5 +1,4 @@ import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; -import { parseFieldRelationType } from '@/object-metadata/utils/parseFieldRelationType'; import { FieldDefinition } from '@/object-record/record-field/types/FieldDefinition'; import { FieldMetadata } from '@/object-record/record-field/types/FieldMetadata'; import { getFieldButtonIcon } from '@/object-record/record-field/utils/getFieldButtonIcon'; @@ -20,17 +19,15 @@ export const formatFieldMetadataItemAsFieldDefinition = ({ labelWidth, }: FieldMetadataItemAsFieldDefinitionProps): FieldDefinition => { const relationObjectMetadataItem = - field.toRelationMetadata?.fromObjectMetadata || - field.fromRelationMetadata?.toObjectMetadata; + field.relationDefinition?.targetObjectMetadata; const relationFieldMetadataId = - field.toRelationMetadata?.fromFieldMetadataId || - field.fromRelationMetadata?.toFieldMetadataId; + field.relationDefinition?.targetFieldMetadata.id; const fieldDefintionMetadata = { fieldName: field.name, placeHolder: field.label, - relationType: parseFieldRelationType(field), + relationType: field.relationDefinition?.direction, relationFieldMetadataId, relationObjectMetadataNameSingular: relationObjectMetadataItem?.nameSingular ?? '', diff --git a/packages/twenty-front/src/modules/object-metadata/utils/formatRelationMetadataInput.ts b/packages/twenty-front/src/modules/object-metadata/utils/formatRelationMetadataInput.ts index 32f8b1f2758b..7937900ab198 100644 --- a/packages/twenty-front/src/modules/object-metadata/utils/formatRelationMetadataInput.ts +++ b/packages/twenty-front/src/modules/object-metadata/utils/formatRelationMetadataInput.ts @@ -2,6 +2,7 @@ import { RelationType } from '@/settings/data-model/types/RelationType'; import { CreateRelationInput, Field, + RelationDefinitionType, RelationMetadataType, } from '~/generated-metadata/graphql'; @@ -24,8 +25,8 @@ export const formatRelationMetadataInput = ( // => Transform into ONE_TO_MANY and invert "from" and "to" data. const isManyToOne = input.relationType === 'MANY_TO_ONE'; const relationType = isManyToOne - ? RelationMetadataType.OneToMany - : (input.relationType as RelationMetadataType); + ? RelationDefinitionType.OneToMany + : (input.relationType as RelationDefinitionType); const { field: fromField, objectMetadataId: fromObjectMetadataId } = isManyToOne ? input.connect : input; const { field: toField, objectMetadataId: toObjectMetadataId } = isManyToOne @@ -51,7 +52,7 @@ export const formatRelationMetadataInput = ( fromLabel, fromName, fromObjectMetadataId, - relationType, + relationType: relationType as unknown as RelationMetadataType, toDescription, toIcon, toLabel, diff --git a/packages/twenty-front/src/modules/object-metadata/utils/getObjectMetadataItemsMock.ts b/packages/twenty-front/src/modules/object-metadata/utils/getObjectMetadataItemsMock.ts index b754fc1b4ac6..2b2fd70bb53d 100644 --- a/packages/twenty-front/src/modules/object-metadata/utils/getObjectMetadataItemsMock.ts +++ b/packages/twenty-front/src/modules/object-metadata/utils/getObjectMetadataItemsMock.ts @@ -38,8 +38,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -58,8 +56,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:10:31.391Z", "updatedAt": "2024-08-05T17:10:31.391Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -78,22 +74,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "3e039f55-e535-406a-8a80-185123910b7a", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "b95b3f38-9fc2-4d7e-a823-7791cf13d089", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - }, - "toFieldMetadataId": "dc7898b0-d2b7-4910-bedc-a6fe8eb4c41e" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -138,8 +118,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:39:01.956Z", "updatedAt": "2024-08-05T16:39:01.956Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -158,8 +136,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "primaryLinkUrl": "''", "secondaryLinks": null, @@ -182,8 +158,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "lastName": "''", "firstName": "''" @@ -205,8 +179,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -225,8 +197,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -245,22 +215,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "20d67b64-4e67-44a1-81c7-116c0c8c6368", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "2128a43e-af47-44bf-b7e9-5d00ddd27a99", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "calendarEventParticipant", - "namePlural": "calendarEventParticipants", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "a7eb211d-4481-4269-99d7-cf2183b45598" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -305,22 +259,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "9a3a145b-6d06-4892-84d4-af523f40c58d", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "648268ca-94bf-418e-853c-56d0f51472b3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "activityTarget", - "namePlural": "activityTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "940d1664-b17c-4f66-820b-abfec70adaa5" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -365,22 +303,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "182b32c3-9ee9-4a65-937b-d9035ab65300", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "77d124cc-049a-44f9-ab59-56e3dd55bb69", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "taskTarget", - "namePlural": "taskTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "fc1a31f8-6e1c-4ce1-b6ff-80d1cd605e58" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -425,8 +347,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "name": "''", "source": "'MANUAL'" @@ -448,8 +368,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -468,8 +386,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -488,8 +404,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "primaryLinkUrl": "''", "secondaryLinks": null, @@ -512,8 +426,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:39:01.997Z", "updatedAt": "2024-08-05T16:39:01.997Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": [ { @@ -563,22 +475,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "0562d399-7053-4d7f-a415-cabfc889bd16", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "f1231579-8e7d-4b84-9a60-41844902f2c4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "48dba12f-4429-4ee2-9b3a-6df97c45141d" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -623,22 +519,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "ba3d762d-8fbf-45e5-a958-136a269a396d", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "94ef21ab-5eca-4c80-b378-2a207dcca2e4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "timelineActivity", - "namePlural": "timelineActivities", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "69e1ecef-09d7-4b53-826e-f440ae72d2b7" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -683,22 +563,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "4b90ec4b-3199-4cea-9e8b-01498967bd9f", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "9a53b4e1-bce2-4160-8ce3-028e14b2abb7", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "df6ee118-1cb0-4b2e-8668-3693d4d87ae2" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -743,8 +607,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -763,8 +625,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -783,22 +643,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "66551942-e576-4eb7-96c4-f78182f44491", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "d19be8c8-2cf4-4c29-80ae-0d1841dc11c1", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "favorite", - "namePlural": "favorites", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "b7caceaa-d49a-43c8-8b9b-10dc4298ade5" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -843,8 +687,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -863,8 +705,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -883,22 +723,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "f26f3e6e-35bf-474a-9679-fbfbb009d67d", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "b889efa2-e58a-471c-b258-3c5ef2fa09e9", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "messageParticipant", - "namePlural": "messageParticipants", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "3779c76a-30a8-45bc-a56a-6bfc084a9b29" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -943,8 +767,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -963,8 +785,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:39:01.936Z", "updatedAt": "2024-08-05T16:39:01.936Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -983,22 +803,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "9d20f0c0-e37b-48ca-bc45-da16461aa547", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "bd4e44a0-4b0d-4392-b0c9-d6c8684e3d44", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "noteTarget", - "namePlural": "noteTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "2f2fc7fb-51c5-4084-8d97-13b43b49c68a" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -1043,22 +847,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:10:31.391Z", "updatedAt": "2024-08-05T17:10:31.391Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "27f9741d-f967-4b75-affa-240f0f5f8d77", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "56dffccc-daf8-4c49-8919-f19787f07846", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "myCustomObject", - "namePlural": "myCustomObjects", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "23006c79-19fe-4148-9ee4-6db039ebc6fb" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -1103,8 +891,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:39:01.977Z", "updatedAt": "2024-08-05T16:39:01.977Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": [ { @@ -1166,8 +952,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "name": "''", "source": "'MANUAL'" @@ -1189,8 +973,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -1209,8 +991,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -1229,22 +1009,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "bc6b24e6-9fcd-43fd-a2ba-c12f5d022132", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "94ef21ab-5eca-4c80-b378-2a207dcca2e4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "timelineActivity", - "namePlural": "timelineActivities", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "99599532-c0e9-4d62-b4a6-89866e0374be" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -1289,8 +1053,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -1309,22 +1071,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "a39ebd92-e37e-46d7-b545-aed1945476f2", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "d19be8c8-2cf4-4c29-80ae-0d1841dc11c1", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "favorite", - "namePlural": "favorites", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "b4b7114a-8536-438a-8d13-917eae164506" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -1369,8 +1115,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -1389,22 +1133,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "ac29383b-d63e-4c0e-b28a-1abc03ab2b5a", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "9a53b4e1-bce2-4160-8ce3-028e14b2abb7", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "e985e32a-532f-4259-828f-cac80c5fc3b8" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -1449,22 +1177,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "72daf099-f592-4521-8a4e-febd67309f47", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "bd4e44a0-4b0d-4392-b0c9-d6c8684e3d44", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "noteTarget", - "namePlural": "noteTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "b8d93efe-14da-47a2-bb24-96ae2d037b59" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -1509,8 +1221,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -1529,8 +1239,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -1570,8 +1278,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -1590,22 +1296,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "01efe0bd-eda8-494a-b7ea-b4813dcf0b5a", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "c62f3148-1b8d-4fa3-ac29-8a20585bcee9", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "messageThread", - "namePlural": "messageThreads", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "11a2bd26-4856-4ab2-916d-86a07beaccd3" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -1650,22 +1340,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "099ebe85-572a-4f77-b077-475f97c0d54c", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "b889efa2-e58a-471c-b258-3c5ef2fa09e9", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "messageParticipant", - "namePlural": "messageParticipants", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "2efee208-73da-4ca1-ba73-19763d507611" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -1710,8 +1384,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'INCOMING'", "options": [ { @@ -1745,8 +1417,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -1765,8 +1435,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -1785,8 +1453,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -1805,8 +1471,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -1825,22 +1489,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "3d3b5a91-f7b7-4c50-98d2-093be343711c", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "d0f0efa4-9f44-4812-96f9-d91ee933a5e8", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "messageChannelMessageAssociation", - "namePlural": "messageChannelMessageAssociations", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "6e2131e3-b688-4b61-99bf-f0b50f100a5f" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -1885,8 +1533,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -1905,8 +1551,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -1925,8 +1569,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -1966,8 +1608,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -1986,8 +1626,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -2006,8 +1644,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -2026,8 +1662,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -2046,8 +1680,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -2066,8 +1698,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -2107,8 +1737,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -2127,8 +1755,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:39:01.913Z", "updatedAt": "2024-08-05T16:39:01.913Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": false, "options": null, "relationDefinition": null @@ -2147,8 +1773,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "name": "''", "source": "'MANUAL'" @@ -2170,8 +1794,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "primaryLinkUrl": "''", "secondaryLinks": null, @@ -2194,8 +1816,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:39:01.865Z", "updatedAt": "2024-08-05T16:39:01.865Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "primaryLinkUrl": "''", "secondaryLinks": null, @@ -2218,22 +1838,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "0896a728-e2cf-4032-9af2-a471645e9697", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "1e9ad365-ccb9-4dec-b42f-13b6e86477e3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "de44f939-76d9-4c1a-96aa-7c5a646f2045" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -2278,22 +1882,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "c542c9e0-b4b6-4073-aae6-66299868e9fb", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "94ef21ab-5eca-4c80-b378-2a207dcca2e4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "timelineActivity", - "namePlural": "timelineActivities", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "979ea933-d8a1-4db6-8c29-5c747a690326" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -2338,8 +1926,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -2358,8 +1944,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "amountMicros": null, "currencyCode": "''" @@ -2381,8 +1965,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -2401,22 +1983,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "d420db15-3060-4760-afd0-8485c76e53b4", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "bd4e44a0-4b0d-4392-b0c9-d6c8684e3d44", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "noteTarget", - "namePlural": "noteTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "cb654210-43c9-4ff7-95ee-8250c1d80e8d" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -2461,22 +2027,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "f80bfd64-c33d-4488-bc49-1635e092ea3f", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "77d124cc-049a-44f9-ab59-56e3dd55bb69", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "taskTarget", - "namePlural": "taskTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "1e4e3b2b-113f-4af3-aed8-94b03785a626" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -2521,8 +2071,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "primaryLinkUrl": "''", "secondaryLinks": null, @@ -2545,8 +2093,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:39:01.888Z", "updatedAt": "2024-08-05T16:39:01.888Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": [ { @@ -2587,8 +2133,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "addressLat": null, "addressLng": null, @@ -2616,8 +2160,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -2636,8 +2178,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -2656,22 +2196,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "be6051cd-703c-4539-89ed-e643784bad26", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "9a53b4e1-bce2-4160-8ce3-028e14b2abb7", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "6496b8e0-2d8f-493e-8973-fcba2aa84b59" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -2716,8 +2240,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "primaryLinkUrl": "''", "secondaryLinks": null, @@ -2740,22 +2262,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "0562d399-7053-4d7f-a415-cabfc889bd16", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "ff2881da-89f6-4f15-8f0a-e3f355ea3b94", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - }, - "toFieldMetadataId": "6672a066-7a7f-44ae-bb5c-ae3a5e82d835" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -2800,8 +2306,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T17:09:37.502Z", "updatedAt": "2024-08-05T17:09:37.502Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -2820,8 +2324,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -2840,22 +2342,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "2ed70c2c-b17a-4ed1-9f35-b570139440fa", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "648268ca-94bf-418e-853c-56d0f51472b3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "activityTarget", - "namePlural": "activityTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "10150d34-2f00-4642-8a9d-6b0b6ab72562" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -2900,22 +2386,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "67d4ff08-f5e6-4382-8996-67fdc2d02125", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "b95b3f38-9fc2-4d7e-a823-7791cf13d089", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - }, - "toFieldMetadataId": "28b61c8a-8437-4770-9b12-f3d0e591bee8" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -2960,22 +2430,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "31819eaa-5847-4207-b4a3-0ecffefd9332", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "d19be8c8-2cf4-4c29-80ae-0d1841dc11c1", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "favorite", - "namePlural": "favorites", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "69b1d954-1ed3-4bf9-b9e1-b886a00953b4" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -3020,8 +2474,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -3040,8 +2492,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:39:01.834Z", "updatedAt": "2024-08-05T16:39:01.834Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -3060,8 +2510,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": false, "options": null, "relationDefinition": null @@ -3101,8 +2549,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": true, "options": null, "relationDefinition": null @@ -3121,22 +2567,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "57d32129-b126-417e-98a8-7f1217b29dea", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "90df20e5-c655-474f-bb98-b423652e36df", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "view", - "namePlural": "views", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "6ea01d0e-340e-40e4-a029-89a7cbc07291" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -3181,8 +2611,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -3201,8 +2629,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -3221,8 +2647,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -3241,8 +2665,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -3261,8 +2683,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": 0, "options": null, "relationDefinition": null @@ -3281,8 +2701,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": 0, "options": null, "relationDefinition": null @@ -3301,8 +2719,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -3342,8 +2758,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -3362,8 +2776,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -3382,8 +2794,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -3402,8 +2812,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -3422,8 +2830,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -3442,8 +2848,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -3483,8 +2887,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -3503,8 +2905,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.167Z", "updatedAt": "2024-08-05T17:09:54.167Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -3523,8 +2923,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -3543,22 +2941,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "b0f40da3-1fda-4803-be21-14a2755bc834", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "1e9ad365-ccb9-4dec-b42f-13b6e86477e3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "f537669a-4524-4dfc-91d3-79438e2a481e" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -3603,8 +2985,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -3623,22 +3003,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.168Z", "updatedAt": "2024-08-05T17:09:54.168Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "143c2257-721f-46eb-8114-987a70979146", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "56dffccc-daf8-4c49-8919-f19787f07846", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "myCustomObject", - "namePlural": "myCustomObjects", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "c475ebbc-f86b-4956-9d67-d0bb62062408" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -3683,8 +3047,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -3703,8 +3065,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -3723,22 +3083,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "c1110f68-bbc9-4dbf-aae4-c6e5e2569240", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "b95b3f38-9fc2-4d7e-a823-7791cf13d089", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "a1a7bb38-6f6c-4bdb-803f-804cdd97cb77" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -3783,8 +3127,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -3803,22 +3145,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "a39ebd92-e37e-46d7-b545-aed1945476f2", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "f62992f2-80ef-477c-ae60-fc7a862b0f4a", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "note", - "namePlural": "notes", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "ff8e5043-6168-4c65-984d-ef4d28eb76ce" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -3863,8 +3189,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -3883,22 +3207,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "32b10a0d-0ca4-4027-be9e-ab8d8be608d1", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "99f8caa6-263c-4690-8dc0-eb7645304cf5", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "task", - "namePlural": "tasks", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "80fe7004-903e-4bdd-985d-9ef7e6acd793" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -3943,8 +3251,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -3963,8 +3269,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": 0, "options": null, "relationDefinition": null @@ -3983,8 +3287,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -4003,22 +3305,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "31819eaa-5847-4207-b4a3-0ecffefd9332", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "f1231579-8e7d-4b84-9a60-41844902f2c4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "ae74690d-94d5-4860-928f-4ed8ea36be1d" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -4063,22 +3349,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "66551942-e576-4eb7-96c4-f78182f44491", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "ff2881da-89f6-4f15-8f0a-e3f355ea3b94", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "4cd944c2-a252-42c2-93d3-c71d71b4587d" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -4144,8 +3414,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -4164,8 +3432,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -4184,22 +3450,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "6be1cb67-30fe-41b3-8695-09cf6cbef18a", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "c62f3148-1b8d-4fa3-ac29-8a20585bcee9", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "messageThread", - "namePlural": "messageThreads", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "bfa74ef1-b2d8-4720-a9bd-3084ceb005f3" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -4244,8 +3494,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -4264,8 +3512,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -4284,22 +3530,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "3d3b5a91-f7b7-4c50-98d2-093be343711c", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "f5a97cba-781d-4665-9dea-0eda6d687a99", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "message", - "namePlural": "messages", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "cb6eb250-d255-4446-88f3-bc6b7dd20800" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -4344,8 +3574,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -4364,8 +3592,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -4384,8 +3610,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -4404,22 +3628,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "e420b731-e1e1-425a-ac7a-488d37d1958b", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "219d7acf-5934-44dc-8789-62ade666cb43", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "messageChannel", - "namePlural": "messageChannels", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "2682d5c3-f05e-4c5c-87eb-bb1a6c0c37bb" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -4464,8 +3672,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -4505,22 +3711,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "6d4e8025-7ee9-4079-ae80-b18de7b5ff4e", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "1e9ad365-ccb9-4dec-b42f-13b6e86477e3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "5e889b07-de1e-47f0-aeb9-301a684bd6a4" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -4565,22 +3755,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "00b07eda-840c-4a91-a8f7-365c008a2ea1", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "3af96291-b873-402f-bd90-f4731984c8dd", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "comment", - "namePlural": "comments", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "88c3a2b9-b59a-413a-b2d3-44b151185929" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -4625,8 +3799,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -4645,8 +3817,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -4665,8 +3835,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -4685,8 +3853,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -4705,8 +3871,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -4725,22 +3889,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "16017cba-688e-4483-a258-9cef3999cbbf", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "648268ca-94bf-418e-853c-56d0f51472b3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "activityTarget", - "namePlural": "activityTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "aa1c7e04-31c1-4b62-8451-6b32926cab47" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -4785,22 +3933,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "cf9ac76a-9f22-4252-a00a-63cc45fcabc4", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "1e9ad365-ccb9-4dec-b42f-13b6e86477e3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "a147a0df-eb28-4259-a304-0460f92adf30" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -4845,8 +3977,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -4865,8 +3995,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -4885,8 +4013,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'Note'", "options": null, "relationDefinition": null @@ -4905,8 +4031,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -4925,8 +4049,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -4945,22 +4067,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "23518310-2443-4907-8ac6-b77bf340d99d", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "9a53b4e1-bce2-4160-8ce3-028e14b2abb7", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "394c0644-d8bd-44a8-82c9-6e2a4c9aa19c" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -5005,8 +4111,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -5046,8 +4150,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -5066,22 +4168,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "6be1cb67-30fe-41b3-8695-09cf6cbef18a", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "d0f0efa4-9f44-4812-96f9-d91ee933a5e8", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "messageChannelMessageAssociation", - "namePlural": "messageChannelMessageAssociations", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "930b7926-639c-43c1-85ba-4c185a9ad5d3" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -5126,8 +4212,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -5146,8 +4230,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -5166,22 +4248,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "01efe0bd-eda8-494a-b7ea-b4813dcf0b5a", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "f5a97cba-781d-4665-9dea-0eda6d687a99", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "message", - "namePlural": "messages", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "2e91d365-c35a-446e-b019-bdf7e51d7d79" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -5247,8 +4313,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -5267,8 +4331,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -5287,8 +4349,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -5307,8 +4367,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.176Z", "updatedAt": "2024-08-05T17:09:54.176Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -5327,22 +4385,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.177Z", "updatedAt": "2024-08-05T17:09:54.177Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "4f4d3969-913b-478c-a41d-9daffc9b2255", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "56dffccc-daf8-4c49-8919-f19787f07846", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "myCustomObject", - "namePlural": "myCustomObjects", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "87631266-4a85-4c49-82d1-90d1805c3de6" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -5387,8 +4429,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -5407,8 +4447,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -5427,22 +4465,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "72daf099-f592-4521-8a4e-febd67309f47", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "f62992f2-80ef-477c-ae60-fc7a862b0f4a", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "note", - "namePlural": "notes", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "d6d5a326-5a21-46a6-96b5-c70549f8f937" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -5487,8 +4509,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -5507,22 +4527,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "a0fa9159-85ab-47c5-bdac-46f7acbb78a7", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "b95b3f38-9fc2-4d7e-a823-7791cf13d089", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "8ee18f64-937c-489b-893c-80bc44f9c105" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -5567,22 +4571,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "d420db15-3060-4760-afd0-8485c76e53b4", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "f1231579-8e7d-4b84-9a60-41844902f2c4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "63261a95-39ac-4826-bc8b-7fc0fd21a8ad" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -5627,8 +4615,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -5647,22 +4633,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "9d20f0c0-e37b-48ca-bc45-da16461aa547", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "ff2881da-89f6-4f15-8f0a-e3f355ea3b94", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "1c1c7ffc-3a45-4069-996a-bdfa8f46b037" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -5728,22 +4698,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "e594dda4-55fc-46ba-8108-5f672a5b1301", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "77d124cc-049a-44f9-ab59-56e3dd55bb69", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "taskTarget", - "namePlural": "taskTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "705e4379-9ba2-4853-b267-c86dad461dd7" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -5788,22 +4742,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "a0fa9159-85ab-47c5-bdac-46f7acbb78a7", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "bd4e44a0-4b0d-4392-b0c9-d6c8684e3d44", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "noteTarget", - "namePlural": "noteTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "459cd941-1db8-4e61-af0e-35812736cfd1" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -5848,8 +4786,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -5868,22 +4804,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "c1110f68-bbc9-4dbf-aae4-c6e5e2569240", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "d19be8c8-2cf4-4c29-80ae-0d1841dc11c1", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "favorite", - "namePlural": "favorites", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "3464f1ce-34d3-4bf1-ac74-072bf750cc5c" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -5928,22 +4848,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "0ee1046a-3f9f-477e-8811-5d29021eca38", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "9a53b4e1-bce2-4160-8ce3-028e14b2abb7", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "31bbc876-619d-4444-b954-9b6c66343314" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -5988,8 +4892,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -6008,8 +4910,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'NEW'", "options": [ { @@ -6064,8 +4964,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "name": "''", "source": "'MANUAL'" @@ -6087,8 +4985,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -6107,8 +5003,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -6127,22 +5021,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "d2a53784-3664-49ab-983e-5ad5bf15dbd0", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "648268ca-94bf-418e-853c-56d0f51472b3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "activityTarget", - "namePlural": "activityTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "997b0618-d3f7-4e5c-8c8e-2ba1bad10549" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -6187,22 +5065,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "61e4edee-13d4-4edd-9101-b9dc5ea5506a", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "94ef21ab-5eca-4c80-b378-2a207dcca2e4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "timelineActivity", - "namePlural": "timelineActivities", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "2c3baa6b-7ffe-470e-bd9d-0532e2bce3ac" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -6247,8 +5109,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -6267,8 +5127,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -6287,22 +5145,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "67d4ff08-f5e6-4382-8996-67fdc2d02125", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "f1231579-8e7d-4b84-9a60-41844902f2c4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "cbd94612-00a2-4efd-8869-93f945e93076" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -6347,22 +5189,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "3e039f55-e535-406a-8a80-185123910b7a", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "ff2881da-89f6-4f15-8f0a-e3f355ea3b94", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "e1ecbeb4-76cb-4f9a-8829-ac0665854c69" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -6407,8 +5233,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -6427,8 +5251,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "amountMicros": null, "currencyCode": "''" @@ -6450,8 +5272,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -6491,22 +5311,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "94c22c13-b00a-4f60-b2d2-f34b9efe6aa2", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "1e9ad365-ccb9-4dec-b42f-13b6e86477e3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "dd7ee456-52bf-4335-bee9-7ba18a1e9a09" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -6551,22 +5355,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "f26f3e6e-35bf-474a-9679-fbfbb009d67d", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "ff2881da-89f6-4f15-8f0a-e3f355ea3b94", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "4227c9a5-6dd3-4de0-9248-e62572afc92b" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -6611,22 +5399,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "099ebe85-572a-4f77-b077-475f97c0d54c", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "f5a97cba-781d-4665-9dea-0eda6d687a99", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "message", - "namePlural": "messages", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "5291bbf6-1c32-47fe-8164-ebd6dca187ad" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -6671,8 +5443,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -6691,8 +5461,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -6711,8 +5479,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -6731,8 +5497,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -6751,8 +5515,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -6771,8 +5533,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'from'", "options": [ { @@ -6820,8 +5580,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -6840,8 +5598,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -6860,8 +5616,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -6901,22 +5655,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "ac29383b-d63e-4c0e-b28a-1abc03ab2b5a", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "f62992f2-80ef-477c-ae60-fc7a862b0f4a", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "note", - "namePlural": "notes", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "38a2a378-bac0-4c4d-bf05-7f9ff995b860" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -6961,8 +5699,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -6981,8 +5717,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -7001,22 +5735,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "4b90ec4b-3199-4cea-9e8b-01498967bd9f", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "ff2881da-89f6-4f15-8f0a-e3f355ea3b94", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "1b21ef27-ba22-46ab-967e-f2d9f780bf8b" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -7061,8 +5779,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -7081,8 +5797,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -7101,22 +5815,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "aeca7339-1ff5-45cb-b9f4-d8bd9ec572d9", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "99f8caa6-263c-4690-8dc0-eb7645304cf5", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "task", - "namePlural": "tasks", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "7e719850-091f-4876-87b0-4eb5fd9847af" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -7161,8 +5859,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -7181,8 +5877,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -7201,8 +5895,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -7221,22 +5913,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "c86299f2-7210-4c89-a2ab-29e17f21edc8", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "1e9ad365-ccb9-4dec-b42f-13b6e86477e3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "1b2d1e2c-290d-4a0e-adf9-192e5fac103c" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -7281,22 +5957,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "0ee1046a-3f9f-477e-8811-5d29021eca38", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "b95b3f38-9fc2-4d7e-a823-7791cf13d089", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "b32af3b6-330f-405b-b9ce-6156797f836a" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -7341,8 +6001,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -7361,22 +6019,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.173Z", "updatedAt": "2024-08-05T17:09:54.173Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "bd914a9e-b1f8-43c6-af60-3afe46518988", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "56dffccc-daf8-4c49-8919-f19787f07846", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "myCustomObject", - "namePlural": "myCustomObjects", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "a4580aee-6fb4-4b5d-87c0-daf24745ca13" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -7421,8 +6063,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -7441,8 +6081,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -7461,8 +6099,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -7481,22 +6117,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "be6051cd-703c-4539-89ed-e643784bad26", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "f1231579-8e7d-4b84-9a60-41844902f2c4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "3a2bd134-5b31-4bde-a64f-d5244a8e6271" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -7541,8 +6161,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -7561,8 +6179,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.172Z", "updatedAt": "2024-08-05T17:09:54.172Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -7581,22 +6197,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "23518310-2443-4907-8ac6-b77bf340d99d", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "cf6f8138-3445-4a36-b137-41ebb8f2e3dc", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "activity", - "namePlural": "activities", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "d9f1711b-a8b1-48ee-9f81-503bbf945b87" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -7641,8 +6241,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -7682,8 +6280,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'TODO'", "options": [ { @@ -7724,22 +6320,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "5527b9f6-55ec-4efd-b244-03e91b01e91b", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "1e9ad365-ccb9-4dec-b42f-13b6e86477e3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "fefca31b-ba53-4860-b04e-5b9944587693" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -7784,8 +6364,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -7804,8 +6382,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -7824,8 +6400,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -7844,8 +6418,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -7864,8 +6436,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -7884,8 +6454,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -7904,22 +6472,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "aeca7339-1ff5-45cb-b9f4-d8bd9ec572d9", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "9a53b4e1-bce2-4160-8ce3-028e14b2abb7", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "0f978508-2e4a-4bc6-bbaf-87ad6acbe08a" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -7964,22 +6516,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "85f92b6a-bc71-4da4-ba4e-7b0685a05fde", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "77d124cc-049a-44f9-ab59-56e3dd55bb69", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "taskTarget", - "namePlural": "taskTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "31d8d648-5118-4b59-8c1e-876e83bf85f3" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -8024,8 +6560,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -8044,22 +6578,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "32b10a0d-0ca4-4027-be9e-ab8d8be608d1", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "d19be8c8-2cf4-4c29-80ae-0d1841dc11c1", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "favorite", - "namePlural": "favorites", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "e7201f19-bfa7-42e1-9550-7c848a842ecc" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -8104,8 +6622,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -8124,22 +6640,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "9f7f6a7c-072e-4818-8077-d0d0c9601cb0", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "94ef21ab-5eca-4c80-b378-2a207dcca2e4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "timelineActivity", - "namePlural": "timelineActivities", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "6ea41d58-7eae-4434-bb2f-9a1b2c30dba3" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -8184,8 +6684,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "name": "''", "source": "'MANUAL'" @@ -8228,8 +6726,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -8248,22 +6744,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "bc6b24e6-9fcd-43fd-a2ba-c12f5d022132", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "f62992f2-80ef-477c-ae60-fc7a862b0f4a", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "note", - "namePlural": "notes", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "383d3f90-d691-4487-a13d-e80c50fb756e" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -8308,8 +6788,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -8328,8 +6806,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -8348,8 +6824,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -8368,8 +6842,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.152Z", "updatedAt": "2024-08-05T17:09:54.152Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -8388,8 +6860,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -8408,22 +6878,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "170c6f88-63b3-41ff-9e5d-044968a062a4", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "1e9ad365-ccb9-4dec-b42f-13b6e86477e3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "4ae17923-dd16-45c7-9df3-8cee92584a52" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -8468,8 +6922,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -8488,8 +6940,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -8508,22 +6958,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "ba3d762d-8fbf-45e5-a958-136a269a396d", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "ff2881da-89f6-4f15-8f0a-e3f355ea3b94", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "c08e6ba8-b7ef-4fa7-b199-c8e93045f8ee" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -8568,22 +7002,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "9f7f6a7c-072e-4818-8077-d0d0c9601cb0", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "99f8caa6-263c-4690-8dc0-eb7645304cf5", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "task", - "namePlural": "tasks", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "49cf9eb7-53bc-4347-93f5-daec9c219cfa" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -8628,22 +7046,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "c542c9e0-b4b6-4073-aae6-66299868e9fb", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "f1231579-8e7d-4b84-9a60-41844902f2c4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "c06142b8-52a9-4b0b-93f6-99e2b5b67ab8" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -8688,8 +7090,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -8708,8 +7108,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -8728,8 +7126,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -8748,8 +7144,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -8768,8 +7162,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -8788,22 +7180,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.153Z", "updatedAt": "2024-08-05T17:09:54.153Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "e143276e-7f4a-46e8-bf0f-61111f36d4fd", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "56dffccc-daf8-4c49-8919-f19787f07846", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "myCustomObject", - "namePlural": "myCustomObjects", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "e7cd7adb-152e-4d19-b2ba-d1b66bc40e79" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -8848,8 +7224,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -8868,8 +7242,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -8888,22 +7260,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "61e4edee-13d4-4edd-9101-b9dc5ea5506a", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "b95b3f38-9fc2-4d7e-a823-7791cf13d089", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "713c39d7-63e2-4b0e-bd5c-d240b840255e" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -8948,8 +7304,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -8989,8 +7343,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -9009,8 +7361,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -9029,8 +7379,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -9049,8 +7397,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -9069,22 +7415,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "1a74fdd8-63d4-407f-9d25-7e2e6c4d271c", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "219d7acf-5934-44dc-8789-62ade666cb43", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "messageChannel", - "namePlural": "messageChannels", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "252a6670-31ea-4b7a-a75f-09c44f4822be" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -9129,8 +7459,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -9148,23 +7476,7 @@ export const getObjectMetadataItemsMock = () => { "isSystem": true, "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", - "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "69dde225-0e12-4df6-ab55-d870d6dec717", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "3f89df71-38d5-46f4-818f-076a5ee77e48", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "calendarChannel", - "namePlural": "calendarChannels", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "f7f4925d-e186-4fe6-80f5-1ddd1ae5bf22" - }, - "toRelationMetadata": null, + "updatedAt": "2024-08-05T16:38:57.285Z", "defaultValue": null, "options": null, "relationDefinition": { @@ -9209,8 +7521,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -9229,8 +7539,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -9249,8 +7557,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -9269,22 +7575,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "9a65de46-ef09-429f-b7ba-31cb8a8c7038", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "1e9ad365-ccb9-4dec-b42f-13b6e86477e3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "4d977e6a-4d0e-4bca-b743-9bc3df1744d6" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -9329,8 +7619,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -9349,8 +7637,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -9369,8 +7655,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -9410,8 +7694,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -9430,8 +7712,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -9450,22 +7730,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "bd7a6047-3eb5-413e-9315-bb28533c4aed", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "666caea5-3c1e-4847-9fd9-2d8c1d08eabb", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "viewFilter", - "namePlural": "viewFilters", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "c56cc7db-9e19-470e-9d6d-2b7180fb0fb7" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -9510,8 +7774,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -9530,8 +7792,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'table'", "options": null, "relationDefinition": null @@ -9550,8 +7810,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": false, "options": null, "relationDefinition": null @@ -9570,8 +7828,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -9590,22 +7846,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "57d32129-b126-417e-98a8-7f1217b29dea", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "ee025446-440d-49ae-8d0e-ad30b6309840", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "viewField", - "namePlural": "viewFields", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "6725c7ad-a704-436a-be67-a4612bc48e37" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -9650,8 +7890,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -9670,8 +7908,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -9690,8 +7926,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -9710,8 +7944,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'INDEX'", "options": [ { @@ -9738,8 +7970,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -9758,22 +7988,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "53abf7c2-810d-478b-bb2d-689f31322d67", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "1b5e63b9-9fc3-485d-86ff-de70ff17a665", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "viewSort", - "namePlural": "viewSorts", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "673fb6fb-5123-4336-9b4b-e4b268c1cffe" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -9839,8 +8053,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -9859,8 +8071,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -9879,8 +8089,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -9899,8 +8107,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -9919,8 +8125,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -9939,8 +8143,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -9959,22 +8161,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "182b32c3-9ee9-4a65-937b-d9035ab65300", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "ff2881da-89f6-4f15-8f0a-e3f355ea3b94", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "4c9ba269-244f-4768-a52d-9b1ffbe3339f" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -10019,8 +8205,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -10039,22 +8223,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.181Z", "updatedAt": "2024-08-05T17:09:54.181Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "3f2b2bab-8411-41b7-a87b-06dd0007eab4", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "56dffccc-daf8-4c49-8919-f19787f07846", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "myCustomObject", - "namePlural": "myCustomObjects", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "90dd4b06-8b21-4411-9f38-b95968a1d4e1" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -10099,22 +8267,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "e594dda4-55fc-46ba-8108-5f672a5b1301", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "b95b3f38-9fc2-4d7e-a823-7791cf13d089", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "40cdd413-5239-4887-b5e6-eb32eb1d95e3" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -10159,22 +8311,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "85f92b6a-bc71-4da4-ba4e-7b0685a05fde", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "99f8caa6-263c-4690-8dc0-eb7645304cf5", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "task", - "namePlural": "tasks", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "f1ed6bba-53bc-4f9c-ac40-504a9ff5bade" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -10219,8 +8355,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.180Z", "updatedAt": "2024-08-05T17:09:54.180Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -10239,22 +8373,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "f80bfd64-c33d-4488-bc49-1635e092ea3f", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "f1231579-8e7d-4b84-9a60-41844902f2c4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "cb47633a-1b44-41b9-8bce-16e28616c2ad" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -10320,8 +8438,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'Contains'", "options": null, "relationDefinition": null @@ -10340,8 +8456,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -10360,22 +8474,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "bd7a6047-3eb5-413e-9315-bb28533c4aed", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "90df20e5-c655-474f-bb98-b423652e36df", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "view", - "namePlural": "views", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "0d2e0bfe-fe67-4df4-af4f-49722ba4bf96" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -10420,8 +8518,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -10440,8 +8536,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -10460,8 +8554,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -10480,8 +8572,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -10500,8 +8590,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -10520,8 +8608,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -10561,22 +8647,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "16017cba-688e-4483-a258-9cef3999cbbf", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "cf6f8138-3445-4a36-b137-41ebb8f2e3dc", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "activity", - "namePlural": "activities", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "41f8fd90-2de9-402f-8b37-fb023d318de2" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -10621,8 +8691,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -10641,8 +8709,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -10661,22 +8727,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "d2a53784-3664-49ab-983e-5ad5bf15dbd0", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "b95b3f38-9fc2-4d7e-a823-7791cf13d089", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "71341870-4e4d-4399-ab74-8f277047664e" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -10721,8 +8771,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -10741,8 +8789,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.160Z", "updatedAt": "2024-08-05T17:09:54.160Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -10761,8 +8807,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -10781,8 +8825,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -10801,8 +8843,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -10821,22 +8861,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "2ed70c2c-b17a-4ed1-9f35-b570139440fa", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "f1231579-8e7d-4b84-9a60-41844902f2c4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "4d74b886-b359-4c4c-a2c0-692edc8a3273" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -10881,22 +8905,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "9a3a145b-6d06-4892-84d4-af523f40c58d", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "ff2881da-89f6-4f15-8f0a-e3f355ea3b94", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "9b018bba-687b-4850-9e0e-c192d3b5977d" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -10941,22 +8949,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.161Z", "updatedAt": "2024-08-05T17:09:54.161Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "1271db29-f60e-4cf2-83cb-b31f62211850", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "56dffccc-daf8-4c49-8919-f19787f07846", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "myCustomObject", - "namePlural": "myCustomObjects", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "7e079b54-1abf-486d-850e-5a5d32fed77b" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -11001,8 +8993,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -11042,22 +9032,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "876e63a4-ce57-4852-b1b7-5659021ea34c", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "3f89df71-38d5-46f4-818f-076a5ee77e48", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "calendarChannel", - "namePlural": "calendarChannels", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "0751ede9-2493-4079-b976-14b98a4eb971" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -11102,8 +9076,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -11122,22 +9094,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "09476064-1403-4948-84c2-d87a02a022ca", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "37d40c3f-e106-4348-af22-201659bbd8a6", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "calendarEvent", - "namePlural": "calendarEvents", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "46421d40-86ab-4f44-aee4-862320bf7534" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -11182,8 +9138,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -11202,8 +9156,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -11222,8 +9174,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -11242,8 +9192,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -11262,8 +9210,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -11303,22 +9249,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.168Z", "updatedAt": "2024-08-05T17:09:54.168Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "143c2257-721f-46eb-8114-987a70979146", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "d19be8c8-2cf4-4c29-80ae-0d1841dc11c1", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "favorite", - "namePlural": "favorites", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "87c2dd65-2c54-4184-9a19-0bdce7781a3f" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -11363,22 +9293,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.161Z", "updatedAt": "2024-08-05T17:09:54.161Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "1271db29-f60e-4cf2-83cb-b31f62211850", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "648268ca-94bf-418e-853c-56d0f51472b3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "activityTarget", - "namePlural": "activityTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "d20eb128-2dd6-49e2-ac71-9d8991bc22fb" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -11423,22 +9337,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.181Z", "updatedAt": "2024-08-05T17:09:54.181Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "3f2b2bab-8411-41b7-a87b-06dd0007eab4", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "77d124cc-049a-44f9-ab59-56e3dd55bb69", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "taskTarget", - "namePlural": "taskTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "7c6ab6b0-9978-456b-bb7c-c7c1dc454e3d" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -11483,8 +9381,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T17:09:54.141Z", "updatedAt": "2024-08-05T17:09:54.141Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "name": "''", "source": "'MANUAL'" @@ -11506,8 +9402,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.141Z", "updatedAt": "2024-08-05T17:09:54.141Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -11526,8 +9420,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T17:09:54.141Z", "updatedAt": "2024-08-05T17:09:54.141Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -11546,22 +9438,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.177Z", "updatedAt": "2024-08-05T17:09:54.177Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "4f4d3969-913b-478c-a41d-9daffc9b2255", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "bd4e44a0-4b0d-4392-b0c9-d6c8684e3d44", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "noteTarget", - "namePlural": "noteTargets", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "e884eac3-4cbd-40af-970e-a34b409c0acd" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -11606,8 +9482,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T17:09:54.141Z", "updatedAt": "2024-08-05T17:09:54.141Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'Untitled'", "options": null, "relationDefinition": null @@ -11626,8 +9500,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T17:10:03.185Z", "updatedAt": "2024-08-05T17:10:03.185Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -11646,22 +9518,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.173Z", "updatedAt": "2024-08-05T17:09:54.173Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "bd914a9e-b1f8-43c6-af60-3afe46518988", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "9a53b4e1-bce2-4160-8ce3-028e14b2abb7", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "2e1b103b-a75b-4ebc-8219-4b59027bd3fd" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -11706,8 +9562,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T17:09:54.141Z", "updatedAt": "2024-08-05T17:09:54.141Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -11726,22 +9580,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:09:54.153Z", "updatedAt": "2024-08-05T17:09:54.153Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "e143276e-7f4a-46e8-bf0f-61111f36d4fd", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "94ef21ab-5eca-4c80-b378-2a207dcca2e4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "timelineActivity", - "namePlural": "timelineActivities", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "e7e04af7-a0a2-4999-9265-e9bafcd0197c" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -11786,8 +9624,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T17:09:54.141Z", "updatedAt": "2024-08-05T17:09:54.141Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -11806,22 +9642,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T17:10:31.391Z", "updatedAt": "2024-08-05T17:10:31.391Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "27f9741d-f967-4b75-affa-240f0f5f8d77", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "ff2881da-89f6-4f15-8f0a-e3f355ea3b94", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - }, - "toFieldMetadataId": "f7002609-5760-4ae6-ba29-a8b9066b95de" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -11887,8 +9707,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -11907,8 +9725,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -11927,8 +9743,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -11947,8 +9761,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": true, "options": null, "relationDefinition": null @@ -11967,8 +9779,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": 0, "options": null, "relationDefinition": null @@ -11987,8 +9797,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": true, "options": null, "relationDefinition": null @@ -12007,8 +9815,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -12027,22 +9833,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "876e63a4-ce57-4852-b1b7-5659021ea34c", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "5b55de69-76d8-4170-94d3-ff85ee7640ca", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "calendarChannelEventAssociation", - "namePlural": "calendarChannelEventAssociations", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "94180d42-50ed-48a0-a62b-e00f1a6f4753" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -12087,8 +9877,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'SHARE_EVERYTHING'", "options": [ { @@ -12122,22 +9910,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "69dde225-0e12-4df6-ab55-d870d6dec717", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "90e63030-f26d-46c8-b27a-13686b717538", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "connectedAccount", - "namePlural": "connectedAccounts", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "793ca9eb-06ac-433a-b0c3-d62139cbd71c" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -12182,8 +9954,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -12202,8 +9972,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'AS_PARTICIPANT_AND_ORGANIZER'", "options": [ { @@ -12251,8 +10019,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -12271,8 +10037,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -12291,8 +10055,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'FULL_CALENDAR_EVENT_LIST_FETCH_PENDING'", "options": [ { @@ -12354,8 +10116,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": [ { @@ -12431,8 +10191,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -12451,8 +10209,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -12471,8 +10227,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -12491,8 +10245,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -12511,8 +10263,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -12531,8 +10281,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -12551,22 +10299,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "4917f689-5cc2-4716-b4ab-6906aef009b3", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "1e9ad365-ccb9-4dec-b42f-13b6e86477e3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "12d19915-891e-4a4e-8c42-49a12639264f" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -12611,22 +10343,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "00b07eda-840c-4a91-a8f7-365c008a2ea1", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "cf6f8138-3445-4a36-b137-41ebb8f2e3dc", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "activity", - "namePlural": "activities", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "9045116d-0fed-433c-80a4-f4296db72ae5" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -12692,8 +10408,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -12712,8 +10426,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": false, "options": null, "relationDefinition": null @@ -12732,8 +10444,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -12752,8 +10462,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -12772,8 +10480,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -12792,8 +10498,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -12812,8 +10516,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": false, "options": null, "relationDefinition": null @@ -12832,8 +10534,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -12852,22 +10552,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "09476064-1403-4948-84c2-d87a02a022ca", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "5b55de69-76d8-4170-94d3-ff85ee7640ca", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "calendarChannelEventAssociation", - "namePlural": "calendarChannelEventAssociations", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "2baeedd7-34a0-4d07-ab4c-5e6995213ec5" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -12912,8 +10596,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -12932,8 +10614,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -12952,8 +10632,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "primaryLinkUrl": "''", "secondaryLinks": null, @@ -12976,8 +10654,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -12996,8 +10672,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -13016,8 +10690,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -13036,22 +10708,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "28688620-c3df-463d-a655-ad6435f6215b", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "2128a43e-af47-44bf-b7e9-5d00ddd27a99", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "calendarEventParticipant", - "namePlural": "calendarEventParticipants", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "9ae2ccf9-1390-4861-a771-324ab4310f33" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -13096,8 +10752,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -13116,8 +10770,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -13157,8 +10809,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": 0, "options": null, "relationDefinition": null @@ -13177,8 +10827,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'email'", "options": [ { @@ -13212,8 +10860,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -13232,8 +10878,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -13252,8 +10896,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": [ { @@ -13308,8 +10950,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -13328,8 +10968,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": true, "options": null, "relationDefinition": null @@ -13348,8 +10986,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -13368,8 +11004,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'SHARE_EVERYTHING'", "options": [ { @@ -13410,8 +11044,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -13430,8 +11062,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -13450,8 +11080,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -13470,22 +11098,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "1a74fdd8-63d4-407f-9d25-7e2e6c4d271c", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "90e63030-f26d-46c8-b27a-13686b717538", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "connectedAccount", - "namePlural": "connectedAccounts", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "55a55985-3e1d-4db6-b0ac-3585d72b69ed" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -13530,22 +11142,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "e420b731-e1e1-425a-ac7a-488d37d1958b", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "d0f0efa4-9f44-4812-96f9-d91ee933a5e8", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "messageChannelMessageAssociation", - "namePlural": "messageChannelMessageAssociations", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "f2561dd5-c695-4635-816c-27175470b285" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -13590,8 +11186,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'FULL_MESSAGE_LIST_FETCH_PENDING'", "options": [ { @@ -13653,8 +11247,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -13673,8 +11265,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": true, "options": null, "relationDefinition": null @@ -13693,8 +11283,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": true, "options": null, "relationDefinition": null @@ -13713,8 +11301,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'SENT'", "options": [ { @@ -13755,8 +11341,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": true, "options": null, "relationDefinition": null @@ -13796,8 +11380,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -13816,8 +11398,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -13836,8 +11416,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -13856,8 +11434,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -13876,22 +11452,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "67aaa999-8332-43ba-8830-76bf48d53cf2", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "1e9ad365-ccb9-4dec-b42f-13b6e86477e3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "6623a9d7-e137-4709-a592-02ae76e5bfd7" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -13936,8 +11496,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'NEEDS_ACTION'", "options": [ { @@ -13985,8 +11543,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -14005,8 +11561,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -14025,8 +11579,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": false, "options": null, "relationDefinition": null @@ -14045,8 +11597,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -14065,22 +11615,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "28688620-c3df-463d-a655-ad6435f6215b", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "37d40c3f-e106-4348-af22-201659bbd8a6", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "calendarEvent", - "namePlural": "calendarEvents", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "c9a2189f-abb1-4166-9d1d-f870f0e32b3e" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -14125,22 +11659,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "20d67b64-4e67-44a1-81c7-116c0c8c6368", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "ff2881da-89f6-4f15-8f0a-e3f355ea3b94", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - }, - "fromFieldMetadataId": "d44bf743-b557-47d4-9341-04114fd05d52" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -14185,8 +11703,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -14226,8 +11742,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -14246,22 +11760,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "4917f689-5cc2-4716-b4ab-6906aef009b3", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "3af96291-b873-402f-bd90-f4731984c8dd", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "comment", - "namePlural": "comments", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "1a7fec45-dd33-43a0-9302-5b0b9052d2f0" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -14306,22 +11804,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "6d4e8025-7ee9-4079-ae80-b18de7b5ff4e", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "cf6f8138-3445-4a36-b137-41ebb8f2e3dc", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "activity", - "namePlural": "activities", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "beac3449-af10-43a2-9abb-276a798df3de" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -14366,22 +11848,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "94c22c13-b00a-4f60-b2d2-f34b9efe6aa2", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "b889efa2-e58a-471c-b258-3c5ef2fa09e9", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "messageParticipant", - "namePlural": "messageParticipants", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "a7036ff9-a86d-4290-9f2a-cc360c86fe1e" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -14426,22 +11892,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "0896a728-e2cf-4032-9af2-a471645e9697", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "f1231579-8e7d-4b84-9a60-41844902f2c4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - }, - "toFieldMetadataId": "3ece1b4d-c052-4b32-bd2a-ba0f8c8b6f3e" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -14486,22 +11936,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "025cb05b-3bdb-4418-8a07-8b7a8c22dbc1", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "189129d8-8037-4edf-9c91-63001ab52370", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "auditLog", - "namePlural": "auditLogs", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "0e09a491-d3bd-4a23-9c50-cda32acbc7ef" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -14546,8 +11980,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -14566,22 +11998,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "c86299f2-7210-4c89-a2ab-29e17f21edc8", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "9a53b4e1-bce2-4160-8ce3-028e14b2abb7", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "3d2bbb4e-e908-4bc5-97d7-a152dd7652bf" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -14626,22 +12042,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "d9eb657a-f97b-4cec-af79-0e113d47279b", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "033ae6fd-c59e-475e-ba93-bbc1b2b185a5", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "blocklist", - "namePlural": "blocklists", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "597169c3-ad77-4a48-8a2a-94b7cc155e25" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -14686,8 +12086,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'SYSTEM'", "options": [ { @@ -14735,8 +12133,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -14755,8 +12151,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'en'", "options": null, "relationDefinition": null @@ -14775,22 +12169,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "67aaa999-8332-43ba-8830-76bf48d53cf2", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "2128a43e-af47-44bf-b7e9-5d00ddd27a99", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "calendarEventParticipant", - "namePlural": "calendarEventParticipants", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "b2982cd8-c796-4718-b74b-298b46d19841" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -14835,8 +12213,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -14855,22 +12231,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "9a65de46-ef09-429f-b7ba-31cb8a8c7038", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "90e63030-f26d-46c8-b27a-13686b717538", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "connectedAccount", - "namePlural": "connectedAccounts", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "8c36e0eb-108e-4797-97a1-b9b5ea096180" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -14915,8 +12275,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'system'", "options": null, "relationDefinition": null @@ -14935,22 +12293,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "5527b9f6-55ec-4efd-b244-03e91b01e91b", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "99f8caa6-263c-4690-8dc0-eb7645304cf5", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "task", - "namePlural": "tasks", - "isSystem": false, - "isRemote": false - }, - "toFieldMetadataId": "53347f0d-658a-45b0-91b5-2088adbeaaf0" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -14995,8 +12337,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": { "lastName": "''", "firstName": "''" @@ -15018,8 +12358,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -15038,22 +12376,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "cf9ac76a-9f22-4252-a00a-63cc45fcabc4", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "cf6f8138-3445-4a36-b137-41ebb8f2e3dc", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "activity", - "namePlural": "activities", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "ea9aa19c-22d8-4b72-83ff-78d9653c27c4" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -15098,8 +12420,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -15118,22 +12438,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "b0f40da3-1fda-4803-be21-14a2755bc834", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "d19be8c8-2cf4-4c29-80ae-0d1841dc11c1", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "favorite", - "namePlural": "favorites", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "407a2cbc-6c15-41dd-942c-5322d273bec3" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -15178,8 +12482,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'SYSTEM'", "options": [ { @@ -15220,8 +12522,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'Light'", "options": null, "relationDefinition": null @@ -15240,22 +12540,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": { - "__typename": "relation", - "id": "170c6f88-63b3-41ff-9e5d-044968a062a4", - "relationType": "ONE_TO_MANY", - "toObjectMetadata": { - "__typename": "object", - "id": "94ef21ab-5eca-4c80-b378-2a207dcca2e4", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "timelineActivity", - "namePlural": "timelineActivities", - "isSystem": true, - "isRemote": false - }, - "toFieldMetadataId": "dba195e2-63d6-42ca-94aa-42c87b4306ea" - }, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": { @@ -15321,8 +12605,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "'asc'", "options": null, "relationDefinition": null @@ -15341,22 +12623,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "53abf7c2-810d-478b-bb2d-689f31322d67", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "90df20e5-c655-474f-bb98-b423652e36df", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "view", - "namePlural": "views", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "4abadd14-56cd-48e4-8013-7b46de4ffe22" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -15401,8 +12667,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -15421,8 +12685,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -15441,8 +12703,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -15461,8 +12721,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -15481,8 +12739,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -15522,8 +12778,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -15542,8 +12796,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -15562,8 +12814,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -15582,8 +12832,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -15602,8 +12850,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -15622,8 +12868,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null @@ -15642,8 +12886,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -15662,22 +12904,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "025cb05b-3bdb-4418-8a07-8b7a8c22dbc1", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "1e9ad365-ccb9-4dec-b42f-13b6e86477e3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "45b45740-d6cd-476c-af07-f6ed323953b6" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -15722,8 +12948,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -15742,8 +12966,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -15762,8 +12984,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -15803,8 +13023,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -15823,8 +13041,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": null, "options": null, "relationDefinition": null @@ -15843,22 +13059,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": true, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": { - "__typename": "relation", - "id": "d9eb657a-f97b-4cec-af79-0e113d47279b", - "relationType": "ONE_TO_MANY", - "fromObjectMetadata": { - "__typename": "object", - "id": "1e9ad365-ccb9-4dec-b42f-13b6e86477e3", - "dataSourceId": "9af88cea-baa2-4c00-bc22-c55cfbcd7e3c", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - }, - "fromFieldMetadataId": "89b50259-5ed6-4504-9c89-3f4457dc43a6" - }, "defaultValue": null, "options": null, "relationDefinition": { @@ -15903,8 +13103,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "''", "options": null, "relationDefinition": null @@ -15923,8 +13121,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "now", "options": null, "relationDefinition": null @@ -15943,8 +13139,6 @@ export const getObjectMetadataItemsMock = () => { "isNullable": false, "createdAt": "2024-08-05T16:38:57.285Z", "updatedAt": "2024-08-05T16:38:57.285Z", - "fromRelationMetadata": null, - "toRelationMetadata": null, "defaultValue": "uuid", "options": null, "relationDefinition": null diff --git a/packages/twenty-front/src/modules/object-metadata/utils/mapFieldMetadataToGraphQLQuery.ts b/packages/twenty-front/src/modules/object-metadata/utils/mapFieldMetadataToGraphQLQuery.ts index 671964f85913..11da8c73d53b 100644 --- a/packages/twenty-front/src/modules/object-metadata/utils/mapFieldMetadataToGraphQLQuery.ts +++ b/packages/twenty-front/src/modules/object-metadata/utils/mapFieldMetadataToGraphQLQuery.ts @@ -4,7 +4,7 @@ import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; import { mapObjectMetadataToGraphQLQuery } from '@/object-metadata/utils/mapObjectMetadataToGraphQLQuery'; import { FieldMetadataType, - RelationMetadataType, + RelationDefinitionType, } from '~/generated-metadata/graphql'; import { FieldMetadataItem } from '../types/FieldMetadataItem'; @@ -17,10 +17,7 @@ export const mapFieldMetadataToGraphQLQuery = ({ computeReferences = false, }: { objectMetadataItems: ObjectMetadataItem[]; - field: Pick< - FieldMetadataItem, - 'name' | 'type' | 'toRelationMetadata' | 'fromRelationMetadata' - >; + field: Pick; relationrecordFields?: Record; computeReferences?: boolean; }): any => { @@ -49,12 +46,12 @@ export const mapFieldMetadataToGraphQLQuery = ({ if ( fieldType === FieldMetadataType.Relation && - field.toRelationMetadata?.relationType === RelationMetadataType.OneToMany + field.relationDefinition?.direction === RelationDefinitionType.ManyToOne ) { const relationMetadataItem = objectMetadataItems.find( (objectMetadataItem) => objectMetadataItem.id === - (field.toRelationMetadata as any)?.fromObjectMetadata?.id, + field.relationDefinition?.targetObjectMetadata.id, ); if (isUndefined(relationMetadataItem)) { @@ -73,12 +70,12 @@ ${mapObjectMetadataToGraphQLQuery({ if ( fieldType === FieldMetadataType.Relation && - field.fromRelationMetadata?.relationType === RelationMetadataType.OneToMany + field.relationDefinition?.direction === RelationDefinitionType.OneToMany ) { const relationMetadataItem = objectMetadataItems.find( (objectMetadataItem) => objectMetadataItem.id === - (field.fromRelationMetadata as any)?.toObjectMetadata?.id, + field.relationDefinition?.targetObjectMetadata.id, ); if (isUndefined(relationMetadataItem)) { diff --git a/packages/twenty-front/src/modules/object-metadata/utils/parseFieldRelationType.ts b/packages/twenty-front/src/modules/object-metadata/utils/parseFieldRelationType.ts deleted file mode 100644 index 8540a7cfcef6..000000000000 --- a/packages/twenty-front/src/modules/object-metadata/utils/parseFieldRelationType.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem'; -import { FieldDefinitionRelationType } from '@/object-record/record-field/types/FieldDefinition'; -import { - FieldMetadataType, - RelationMetadataType, -} from '~/generated-metadata/graphql'; -import { isDefined } from '~/utils/isDefined'; - -export const parseFieldRelationType = ( - field: FieldMetadataItem | undefined, -): FieldDefinitionRelationType | undefined => { - if (!field || field.type !== FieldMetadataType.Relation) return; - - const config: Record< - RelationMetadataType, - { from: FieldDefinitionRelationType; to: FieldDefinitionRelationType } - > = { - [RelationMetadataType.ManyToMany]: { - from: 'FROM_MANY_OBJECTS', - to: 'TO_MANY_OBJECTS', - }, - [RelationMetadataType.OneToMany]: { - from: 'FROM_MANY_OBJECTS', - to: 'TO_ONE_OBJECT', - }, - [RelationMetadataType.ManyToOne]: { - from: 'TO_ONE_OBJECT', - to: 'FROM_MANY_OBJECTS', - }, - [RelationMetadataType.OneToOne]: { - from: 'FROM_ONE_OBJECT', - to: 'TO_ONE_OBJECT', - }, - }; - - if ( - isDefined(field.fromRelationMetadata) && - field.fromRelationMetadata.relationType in config - ) { - return config[field.fromRelationMetadata.relationType].from; - } - - if ( - isDefined(field.toRelationMetadata) && - field.toRelationMetadata.relationType in config - ) { - return config[field.toRelationMetadata.relationType].to; - } - - throw new Error( - `Cannot determine field relation type for field : ${JSON.stringify( - field, - )}.`, - ); -}; diff --git a/packages/twenty-front/src/modules/object-metadata/validation-schemas/fieldMetadataItemSchema.ts b/packages/twenty-front/src/modules/object-metadata/validation-schemas/fieldMetadataItemSchema.ts index ce60af2269f9..42a976b5d2e1 100644 --- a/packages/twenty-front/src/modules/object-metadata/validation-schemas/fieldMetadataItemSchema.ts +++ b/packages/twenty-front/src/modules/object-metadata/validation-schemas/fieldMetadataItemSchema.ts @@ -6,7 +6,6 @@ import { metadataLabelSchema } from '@/object-metadata/validation-schemas/metada import { FieldMetadataType, RelationDefinitionType, - RelationMetadataType, } from '~/generated-metadata/graphql'; import { camelCaseStringSchema } from '~/utils/validation-schemas/camelCaseStringSchema'; @@ -16,24 +15,6 @@ export const fieldMetadataItemSchema = (existingLabels?: string[]) => { createdAt: z.string().datetime(), defaultValue: z.any().optional(), description: z.string().trim().nullable().optional(), - fromRelationMetadata: z - .object({ - __typename: z.literal('relation').optional(), - id: z.string().uuid(), - relationType: z.nativeEnum(RelationMetadataType), - toFieldMetadataId: z.string().uuid(), - toObjectMetadata: z.object({ - __typename: z.literal('object').optional(), - dataSourceId: z.string().uuid(), - id: z.string().uuid(), - isRemote: z.boolean(), - isSystem: z.boolean(), - namePlural: z.string().trim().min(1), - nameSingular: z.string().trim().min(1), - }), - }) - .nullable() - .optional(), icon: z.string().startsWith('Icon').trim().nullable(), id: z.string().uuid(), isActive: z.boolean(), @@ -84,24 +65,6 @@ export const fieldMetadataItemSchema = (existingLabels?: string[]) => { }) .nullable() .optional(), - toRelationMetadata: z - .object({ - __typename: z.literal('relation').optional(), - id: z.string().uuid(), - relationType: z.nativeEnum(RelationMetadataType), - fromFieldMetadataId: z.string().uuid(), - fromObjectMetadata: z.object({ - __typename: z.literal('object').optional(), - id: z.string().uuid(), - dataSourceId: z.string().uuid(), - isRemote: z.boolean(), - isSystem: z.boolean(), - namePlural: z.string().trim().min(1), - nameSingular: z.string().trim().min(1), - }), - }) - .nullable() - .optional(), type: z.nativeEnum(FieldMetadataType), updatedAt: z.string().datetime(), }) satisfies z.ZodType; diff --git a/packages/twenty-front/src/modules/object-record/record-field/types/FieldDefinition.ts b/packages/twenty-front/src/modules/object-record/record-field/types/FieldDefinition.ts index f1ab2a9929e2..f00c197d0eb6 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/types/FieldDefinition.ts +++ b/packages/twenty-front/src/modules/object-record/record-field/types/FieldDefinition.ts @@ -10,11 +10,6 @@ export type FieldDefinitionRelationType = | 'TO_MANY_OBJECTS' | 'TO_ONE_OBJECT'; -export type RelationDirections = { - from: FieldDefinitionRelationType; - to: FieldDefinitionRelationType; -}; - export type FieldDefinition = { fieldMetadataId: string; label: string; diff --git a/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationRecordsListItem.tsx b/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationRecordsListItem.tsx index 4eabe61e7907..8a52e5691bb5 100644 --- a/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationRecordsListItem.tsx +++ b/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationRecordsListItem.tsx @@ -1,7 +1,7 @@ -import { useCallback, useContext } from 'react'; import { css } from '@emotion/react'; import styled from '@emotion/styled'; import { motion } from 'framer-motion'; +import { useCallback, useContext } from 'react'; import { IconChevronDown, IconComponent, @@ -11,6 +11,7 @@ import { } from 'twenty-ui'; import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem'; +import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems'; import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular'; import { formatFieldMetadataItemAsColumnDefinition } from '@/object-metadata/utils/formatFieldMetadataItemAsColumnDefinition'; import { RecordChip } from '@/object-record/components/RecordChip'; @@ -95,6 +96,8 @@ export const RecordDetailRelationRecordsListItem = ({ objectNameSingular: relationObjectMetadataNameSingular, }); + const { objectMetadataItems } = useObjectMetadataItems(); + const persistField = usePersistField(); const { updateOneRecord: updateOneRelationRecord } = useUpdateOneRecord({ @@ -111,7 +114,7 @@ export const RecordDetailRelationRecordsListItem = ({ const availableRelationFieldMetadataItems = relationObjectMetadataItem.fields .filter( (fieldMetadataItem) => - isFieldCellSupported(fieldMetadataItem) && + isFieldCellSupported(fieldMetadataItem, objectMetadataItems) && fieldMetadataItem.id !== relationObjectMetadataItem.labelIdentifierFieldMetadataId && fieldMetadataItem.id !== relationFieldMetadataId, diff --git a/packages/twenty-front/src/modules/object-record/record-table/components/__stories__/perf/mock.ts b/packages/twenty-front/src/modules/object-record/record-table/components/__stories__/perf/mock.ts index 15da709584af..52c11a2044d9 100644 --- a/packages/twenty-front/src/modules/object-record/record-table/components/__stories__/perf/mock.ts +++ b/packages/twenty-front/src/modules/object-record/record-table/components/__stories__/perf/mock.ts @@ -34,22 +34,6 @@ export const mockPerformance = { isNullable: true, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: null, - toRelationMetadata: { - __typename: 'relation', - id: '0cf72416-3d94-4d94-abf3-7dc9d734435b', - relationType: 'ONE_TO_MANY', - fromObjectMetadata: { - __typename: 'object', - id: '79c2d29c-76f6-432f-91c9-df1259b73d95', - dataSourceId: '0fd9fd54-0e8d-4f78-911c-76b33436a768', - nameSingular: 'company', - namePlural: 'companies', - isSystem: false, - isRemote: false, - }, - fromFieldMetadataId: '7b281010-5f47-4771-b3f5-f4bcd24ed1b5', - }, defaultValue: null, options: null, relationDefinition: { @@ -94,8 +78,6 @@ export const mockPerformance = { isNullable: false, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: null, - toRelationMetadata: null, defaultValue: "''", options: null, relationDefinition: null, @@ -114,8 +96,6 @@ export const mockPerformance = { isNullable: false, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: null, - toRelationMetadata: null, defaultValue: "''", options: null, relationDefinition: null, @@ -134,22 +114,6 @@ export const mockPerformance = { isNullable: true, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: { - __typename: 'relation', - id: 'd76f949d-023d-4b45-a71e-f39e3b1562ba', - relationType: 'ONE_TO_MANY', - toObjectMetadata: { - __typename: 'object', - id: '82222ca2-dd40-44ec-b8c5-eb0eca9ec625', - dataSourceId: '0fd9fd54-0e8d-4f78-911c-76b33436a768', - nameSingular: 'activityTarget', - namePlural: 'activityTargets', - isSystem: true, - isRemote: false, - }, - toFieldMetadataId: 'f5f515cc-6d8a-44c3-b2d4-f04b9868a9c5', - }, - toRelationMetadata: null, defaultValue: null, options: null, relationDefinition: { @@ -194,22 +158,6 @@ export const mockPerformance = { isNullable: true, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: { - __typename: 'relation', - id: 'a5a61d23-8ac9-4014-9441-ec3a1781a661', - relationType: 'ONE_TO_MANY', - toObjectMetadata: { - __typename: 'object', - id: '494b9b7c-a44e-4d52-b274-cdfb0e322165', - dataSourceId: '0fd9fd54-0e8d-4f78-911c-76b33436a768', - nameSingular: 'opportunity', - namePlural: 'opportunities', - isSystem: false, - isRemote: false, - }, - toFieldMetadataId: '86559a6f-6afc-4d5c-9bed-fc74d063791b', - }, - toRelationMetadata: null, defaultValue: null, options: null, relationDefinition: { @@ -254,22 +202,6 @@ export const mockPerformance = { isNullable: true, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: { - __typename: 'relation', - id: '456f7875-b48c-4795-a0c7-a69d7339afee', - relationType: 'ONE_TO_MANY', - toObjectMetadata: { - __typename: 'object', - id: 'eba13fca-57b7-470c-8c23-a0e640e04ffb', - dataSourceId: '0fd9fd54-0e8d-4f78-911c-76b33436a768', - nameSingular: 'calendarEventParticipant', - namePlural: 'calendarEventParticipants', - isSystem: true, - isRemote: false, - }, - toFieldMetadataId: 'c1cdebda-b514-4487-9b9c-aa59d8fca8eb', - }, - toRelationMetadata: null, defaultValue: null, options: null, relationDefinition: { @@ -314,8 +246,6 @@ export const mockPerformance = { isNullable: false, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: null, - toRelationMetadata: null, defaultValue: 'now', options: null, relationDefinition: null, @@ -334,22 +264,6 @@ export const mockPerformance = { isNullable: true, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: { - __typename: 'relation', - id: '31542774-fb15-4d01-b00b-8fc94887f458', - relationType: 'ONE_TO_MANY', - toObjectMetadata: { - __typename: 'object', - id: 'f08422e2-14cd-4966-9cd3-bce0302cc56f', - dataSourceId: '0fd9fd54-0e8d-4f78-911c-76b33436a768', - nameSingular: 'favorite', - namePlural: 'favorites', - isSystem: true, - isRemote: false, - }, - toFieldMetadataId: '67d28b17-ff3c-49b4-a6da-1354be9634b0', - }, - toRelationMetadata: null, defaultValue: null, options: null, relationDefinition: { @@ -394,8 +308,6 @@ export const mockPerformance = { isNullable: true, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: null, - toRelationMetadata: null, defaultValue: { primaryLinkUrl: "''", primaryLinkLabel: "''", @@ -417,22 +329,6 @@ export const mockPerformance = { isNullable: true, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: { - __typename: 'relation', - id: 'c0cc3456-afa4-46e0-820d-2db0b63a8273', - relationType: 'ONE_TO_MANY', - toObjectMetadata: { - __typename: 'object', - id: '0e3c9a9d-8a60-4671-a466-7b840a422da2', - dataSourceId: '0fd9fd54-0e8d-4f78-911c-76b33436a768', - nameSingular: 'attachment', - namePlural: 'attachments', - isSystem: true, - isRemote: false, - }, - toFieldMetadataId: 'a920a0d6-8e71-4ab8-90b9-ab540e04732a', - }, - toRelationMetadata: null, defaultValue: null, options: null, relationDefinition: { @@ -477,8 +373,6 @@ export const mockPerformance = { isNullable: false, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: null, - toRelationMetadata: null, defaultValue: "''", options: null, relationDefinition: null, @@ -497,8 +391,6 @@ export const mockPerformance = { isNullable: true, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: null, - toRelationMetadata: null, defaultValue: null, options: null, relationDefinition: null, @@ -517,8 +409,6 @@ export const mockPerformance = { isNullable: false, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: null, - toRelationMetadata: null, defaultValue: "''", options: null, relationDefinition: null, @@ -537,8 +427,6 @@ export const mockPerformance = { isNullable: false, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: null, - toRelationMetadata: null, defaultValue: "''", options: null, relationDefinition: null, @@ -557,8 +445,6 @@ export const mockPerformance = { isNullable: false, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: null, - toRelationMetadata: null, defaultValue: 'now', options: null, relationDefinition: null, @@ -577,8 +463,6 @@ export const mockPerformance = { isNullable: true, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: null, - toRelationMetadata: null, defaultValue: null, options: null, relationDefinition: null, @@ -597,22 +481,6 @@ export const mockPerformance = { isNullable: true, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: { - __typename: 'relation', - id: '25150feb-fcd7-407e-b5fa-ffe58a0450ac', - relationType: 'ONE_TO_MANY', - toObjectMetadata: { - __typename: 'object', - id: '83b5ff3e-975e-4dc9-ba4d-c645a0d8afb2', - dataSourceId: '0fd9fd54-0e8d-4f78-911c-76b33436a768', - nameSingular: 'timelineActivity', - namePlural: 'timelineActivities', - isSystem: true, - isRemote: false, - }, - toFieldMetadataId: '556a12d4-ef0a-4232-963f-0f317f4c5ef5', - }, - toRelationMetadata: null, defaultValue: null, options: null, relationDefinition: { @@ -657,8 +525,6 @@ export const mockPerformance = { isNullable: true, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: null, - toRelationMetadata: null, defaultValue: { lastName: "''", firstName: "''", @@ -680,8 +546,6 @@ export const mockPerformance = { isNullable: true, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: null, - toRelationMetadata: null, defaultValue: { primaryLinkUrl: "''", primaryLinkLabel: "''", @@ -703,22 +567,6 @@ export const mockPerformance = { isNullable: true, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: { - __typename: 'relation', - id: 'e2eb7156-6e65-4bf8-922b-670179744f27', - relationType: 'ONE_TO_MANY', - toObjectMetadata: { - __typename: 'object', - id: 'ffd8e640-84b7-4ed6-99e9-14def0f9d82b', - dataSourceId: '0fd9fd54-0e8d-4f78-911c-76b33436a768', - nameSingular: 'messageParticipant', - namePlural: 'messageParticipants', - isSystem: true, - isRemote: false, - }, - toFieldMetadataId: '8c4593a1-ad40-4681-92fe-43ad4fe60205', - }, - toRelationMetadata: null, defaultValue: null, options: null, relationDefinition: { @@ -763,8 +611,6 @@ export const mockPerformance = { isNullable: false, createdAt: '2024-05-16T10:54:27.788Z', updatedAt: '2024-05-16T10:54:27.788Z', - fromRelationMetadata: null, - toRelationMetadata: null, defaultValue: 'uuid', options: null, relationDefinition: null, diff --git a/packages/twenty-front/src/modules/object-record/utils/generateDefaultFieldValue.ts b/packages/twenty-front/src/modules/object-record/utils/generateDefaultFieldValue.ts index 2ed467659cf3..4a12f3ee72d8 100644 --- a/packages/twenty-front/src/modules/object-record/utils/generateDefaultFieldValue.ts +++ b/packages/twenty-front/src/modules/object-record/utils/generateDefaultFieldValue.ts @@ -4,10 +4,7 @@ import { generateEmptyFieldValue } from '@/object-record/utils/generateEmptyFiel import { v4 } from 'uuid'; export const generateDefaultFieldValue = ( - fieldMetadataItem: Pick< - FieldMetadataItem, - 'defaultValue' | 'type' | 'fromRelationMetadata' - >, + fieldMetadataItem: Pick, ) => { const defaultValue = isFieldValueEmpty({ fieldValue: fieldMetadataItem.defaultValue, diff --git a/packages/twenty-front/src/modules/object-record/utils/generateEmptyFieldValue.ts b/packages/twenty-front/src/modules/object-record/utils/generateEmptyFieldValue.ts index a418792bc3de..7782b5de070f 100644 --- a/packages/twenty-front/src/modules/object-record/utils/generateEmptyFieldValue.ts +++ b/packages/twenty-front/src/modules/object-record/utils/generateEmptyFieldValue.ts @@ -4,7 +4,7 @@ import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem'; import { FieldMetadataType } from '~/generated-metadata/graphql'; export const generateEmptyFieldValue = ( - fieldMetadataItem: Pick, + fieldMetadataItem: Pick, ) => { switch (fieldMetadataItem.type) { case FieldMetadataType.Email: @@ -63,7 +63,7 @@ export const generateEmptyFieldValue = ( case FieldMetadataType.Relation: { if ( !isNonEmptyString( - fieldMetadataItem.fromRelationMetadata?.toObjectMetadata + fieldMetadataItem.relationDefinition?.targetObjectMetadata ?.nameSingular, ) ) { diff --git a/packages/twenty-front/src/modules/object-record/utils/isFieldCellSupported.ts b/packages/twenty-front/src/modules/object-record/utils/isFieldCellSupported.ts index bfdeb6e174f2..df03a87311ca 100644 --- a/packages/twenty-front/src/modules/object-record/utils/isFieldCellSupported.ts +++ b/packages/twenty-front/src/modules/object-record/utils/isFieldCellSupported.ts @@ -1,12 +1,16 @@ import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular'; import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem'; +import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; import { isObjectMetadataAvailableForRelation } from '@/object-metadata/utils/isObjectMetadataAvailableForRelation'; import { FieldMetadataType, - RelationMetadataType, + RelationDefinitionType, } from '~/generated-metadata/graphql'; -export const isFieldCellSupported = (fieldMetadataItem: FieldMetadataItem) => { +export const isFieldCellSupported = ( + fieldMetadataItem: FieldMetadataItem, + objectMetadataItems: ObjectMetadataItem[], +) => { if ( [ FieldMetadataType.Uuid, @@ -18,17 +22,17 @@ export const isFieldCellSupported = (fieldMetadataItem: FieldMetadataItem) => { } if (fieldMetadataItem.type === FieldMetadataType.Relation) { - const relationMetadata = - fieldMetadataItem.fromRelationMetadata ?? - fieldMetadataItem.toRelationMetadata; - const relationObjectMetadataItem = - fieldMetadataItem.fromRelationMetadata?.toObjectMetadata ?? - fieldMetadataItem.toRelationMetadata?.fromObjectMetadata; + const relationObjectMetadataItemId = + fieldMetadataItem.relationDefinition?.targetObjectMetadata.id; + + const relationObjectMetadataItem = objectMetadataItems.find( + (item) => item.id === relationObjectMetadataItemId, + ); // Hack to display targets on Notes and Tasks if ( - fieldMetadataItem.fromRelationMetadata?.toObjectMetadata?.nameSingular === - CoreObjectNameSingular.NoteTarget && + fieldMetadataItem.relationDefinition?.targetObjectMetadata + ?.nameSingular === CoreObjectNameSingular.NoteTarget && fieldMetadataItem.relationDefinition?.sourceObjectMetadata .nameSingular === CoreObjectNameSingular.Note ) { @@ -36,8 +40,8 @@ export const isFieldCellSupported = (fieldMetadataItem: FieldMetadataItem) => { } if ( - fieldMetadataItem.fromRelationMetadata?.toObjectMetadata?.nameSingular === - CoreObjectNameSingular.TaskTarget && + fieldMetadataItem.relationDefinition?.targetObjectMetadata + ?.nameSingular === CoreObjectNameSingular.TaskTarget && fieldMetadataItem.relationDefinition?.sourceObjectMetadata .nameSingular === CoreObjectNameSingular.Task ) { @@ -45,9 +49,10 @@ export const isFieldCellSupported = (fieldMetadataItem: FieldMetadataItem) => { } if ( - !relationMetadata || + !fieldMetadataItem.relationDefinition || // TODO: Many to many relations are not supported yet. - relationMetadata.relationType === RelationMetadataType.ManyToMany || + fieldMetadataItem.relationDefinition.direction === + RelationDefinitionType.ManyToMany || !relationObjectMetadataItem || !isObjectMetadataAvailableForRelation(relationObjectMetadataItem) ) { diff --git a/packages/twenty-front/src/modules/settings/data-model/constants/RelationTypes.ts b/packages/twenty-front/src/modules/settings/data-model/constants/RelationTypes.ts index 08127f6c9888..a03ceedf1e3f 100644 --- a/packages/twenty-front/src/modules/settings/data-model/constants/RelationTypes.ts +++ b/packages/twenty-front/src/modules/settings/data-model/constants/RelationTypes.ts @@ -1,12 +1,12 @@ import { IconComponent, + IconRelationManyToMany, IconRelationManyToOne, IconRelationOneToMany, IconRelationOneToOne, } from 'twenty-ui'; -import { RelationMetadataType } from '~/generated-metadata/graphql'; - +import { RelationDefinitionType } from '~/generated-metadata/graphql'; import OneToManySvg from '../assets/OneToMany.svg'; import OneToOneSvg from '../assets/OneToOne.svg'; import { RelationType } from '../types/RelationType'; @@ -20,20 +20,27 @@ export const RELATION_TYPES: Record< isImageFlipped?: boolean; } > = { - [RelationMetadataType.OneToMany]: { + [RelationDefinitionType.OneToMany]: { label: 'Has many', Icon: IconRelationOneToMany, imageSrc: OneToManySvg, }, - [RelationMetadataType.OneToOne]: { + [RelationDefinitionType.OneToOne]: { label: 'Has one', Icon: IconRelationOneToOne, imageSrc: OneToOneSvg, }, - MANY_TO_ONE: { + [RelationDefinitionType.ManyToOne]: { label: 'Belongs to one', Icon: IconRelationManyToOne, imageSrc: OneToManySvg, isImageFlipped: true, }, + // Not supported yet + [RelationDefinitionType.ManyToMany]: { + label: 'Belongs to many', + Icon: IconRelationManyToMany, + imageSrc: OneToManySvg, + isImageFlipped: true, + }, }; diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/relation/components/SettingsDataModelFieldRelationForm.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/relation/components/SettingsDataModelFieldRelationForm.tsx index 1ee8522bfd73..d30e05193f4b 100644 --- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/relation/components/SettingsDataModelFieldRelationForm.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/relation/components/SettingsDataModelFieldRelationForm.tsx @@ -1,5 +1,5 @@ -import { Controller, useFormContext } from 'react-hook-form'; import styled from '@emotion/styled'; +import { Controller, useFormContext } from 'react-hook-form'; import { useIcons } from 'twenty-ui'; import { z } from 'zod'; @@ -14,6 +14,7 @@ import { RelationType } from '@/settings/data-model/types/RelationType'; import { IconPicker } from '@/ui/input/components/IconPicker'; import { Select } from '@/ui/input/components/Select'; import { TextInput } from '@/ui/input/components/TextInput'; +import { RelationDefinitionType } from '~/generated-metadata/graphql'; export const settingsDataModelFieldRelationFormSchema = z.object({ relation: z.object({ @@ -23,7 +24,10 @@ export const settingsDataModelFieldRelationFormSchema = z.object({ }), objectMetadataId: z.string().uuid(), type: z.enum( - Object.keys(RELATION_TYPES) as [RelationType, ...RelationType[]], + Object.keys(RELATION_TYPES) as [ + RelationDefinitionType, + ...RelationDefinitionType[], + ], ), }), }); @@ -33,10 +37,7 @@ export type SettingsDataModelFieldRelationFormValues = z.infer< >; type SettingsDataModelFieldRelationFormProps = { - fieldMetadataItem: Pick< - FieldMetadataItem, - 'fromRelationMetadata' | 'toRelationMetadata' | 'type' - >; + fieldMetadataItem: Pick; }; const StyledContainer = styled.div` diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/relation/components/SettingsDataModelFieldRelationSettingsFormCard.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/relation/components/SettingsDataModelFieldRelationSettingsFormCard.tsx index 808153bd7878..134787be8379 100644 --- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/relation/components/SettingsDataModelFieldRelationSettingsFormCard.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/relation/components/SettingsDataModelFieldRelationSettingsFormCard.tsx @@ -1,5 +1,5 @@ -import { useFormContext } from 'react-hook-form'; import styled from '@emotion/styled'; +import { useFormContext } from 'react-hook-form'; import { useFilteredObjectMetadataItems } from '@/object-metadata/hooks/useFilteredObjectMetadataItems'; import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem'; diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/relation/hooks/useRelationSettingsFormInitialValues.ts b/packages/twenty-front/src/modules/settings/data-model/fields/forms/relation/hooks/useRelationSettingsFormInitialValues.ts index c429eceb1bf5..bd4b2badd0e2 100644 --- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/relation/hooks/useRelationSettingsFormInitialValues.ts +++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/relation/hooks/useRelationSettingsFormInitialValues.ts @@ -5,15 +5,12 @@ import { useGetRelationMetadata } from '@/object-metadata/hooks/useGetRelationMe import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular'; import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem'; import { isObjectMetadataAvailableForRelation } from '@/object-metadata/utils/isObjectMetadataAvailableForRelation'; -import { RelationMetadataType } from '~/generated-metadata/graphql'; +import { RelationDefinitionType } from '~/generated-metadata/graphql'; export const useRelationSettingsFormInitialValues = ({ fieldMetadataItem, }: { - fieldMetadataItem?: Pick< - FieldMetadataItem, - 'fromRelationMetadata' | 'toRelationMetadata' | 'type' - >; + fieldMetadataItem?: Pick; }) => { const { objectMetadataItems } = useFilteredObjectMetadataItems(); @@ -39,7 +36,7 @@ export const useRelationSettingsFormInitialValues = ({ ); const initialRelationType = - relationTypeFromFieldMetadata ?? RelationMetadataType.OneToMany; + relationTypeFromFieldMetadata ?? RelationDefinitionType.OneToMany; return { disableFieldEdition: diff --git a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewEffect.tsx b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewEffect.tsx index 1cb6c6716bd1..af4694f66d48 100644 --- a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewEffect.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewEffect.tsx @@ -1,7 +1,7 @@ -import { useEffect } from 'react'; -import { Edge, Node } from 'reactflow'; import dagre from '@dagrejs/dagre'; import { useTheme } from '@emotion/react'; +import { useEffect } from 'react'; +import { Edge, Node } from 'reactflow'; import { useRecoilValue } from 'recoil'; import { objectMetadataItemsState } from '@/object-metadata/states/objectMetadataItemsState'; @@ -43,10 +43,10 @@ export const SettingsDataModelOverviewEffect = ({ for (const field of object.fields) { if ( - isDefined(field.toRelationMetadata) && + isDefined(field.relationDefinition) && isDefined( items.find( - (x) => x.id === field.toRelationMetadata?.fromObjectMetadata.id, + (x) => x.id === field.relationDefinition?.targetObjectMetadata.id, ), ) ) { @@ -59,8 +59,8 @@ export const SettingsDataModelOverviewEffect = ({ id: `${sourceObj}-${targetObj}`, source: object.namePlural, sourceHandle: `${field.id}-right`, - target: field.toRelationMetadata.fromObjectMetadata.namePlural, - targetHandle: `${field.toRelationMetadata.fromFieldMetadataId}-left`, + target: field.relationDefinition.targetObjectMetadata.namePlural, + targetHandle: `${field.relationDefinition.targetObjectMetadata}-left`, type: 'smoothstep', style: { strokeWidth: 1, @@ -70,8 +70,8 @@ export const SettingsDataModelOverviewEffect = ({ markerStart: 'marker', data: { sourceField: field.id, - targetField: field.toRelationMetadata.fromFieldMetadataId, - relation: field.toRelationMetadata.relationType, + targetField: field.relationDefinition.targetFieldMetadata.id, + relation: field.relationDefinition.direction, sourceObject: sourceObj, targetObject: targetObj, }, diff --git a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewField.tsx b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewField.tsx index a3804093bf33..a6c24b7886cc 100644 --- a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewField.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewField.tsx @@ -6,6 +6,7 @@ import { useIcons } from 'twenty-ui'; import { objectMetadataItemsState } from '@/object-metadata/states/objectMetadataItemsState'; import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem'; +import { RelationDefinitionType } from '~/generated-metadata/graphql'; type ObjectFieldRowProps = { field: FieldMetadataItem; @@ -46,7 +47,8 @@ export const ObjectFieldRow = ({ field }: ObjectFieldRowProps) => { position={Position.Right} id={`${field.id}-right`} className={ - field.fromRelationMetadata + field.relationDefinition?.direction === + RelationDefinitionType.OneToMany ? 'right-handle source-handle' : 'right-handle target-handle' } @@ -56,7 +58,8 @@ export const ObjectFieldRow = ({ field }: ObjectFieldRowProps) => { position={Position.Left} id={`${field.id}-left`} className={ - field.fromRelationMetadata + field.relationDefinition?.direction === + RelationDefinitionType.OneToMany ? 'left-handle source-handle' : 'left-handle target-handle' } diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldItemTableRow.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldItemTableRow.tsx index c1cef9d42f65..5e9187915914 100644 --- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldItemTableRow.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectFieldItemTableRow.tsx @@ -29,7 +29,7 @@ import { navigationMemorizedUrlState } from '@/ui/navigation/states/navigationMe import { View } from '@/views/types/View'; import { useNavigate } from 'react-router-dom'; import { useRecoilState } from 'recoil'; -import { RelationMetadataType } from '~/generated-metadata/graphql'; +import { RelationDefinitionType } from '~/generated-metadata/graphql'; import { SettingsObjectDetailTableItem } from '~/pages/settings/data-model/types/SettingsObjectDetailTableItem'; import { SettingsObjectFieldDataType } from './SettingsObjectFieldDataType'; @@ -224,8 +224,8 @@ export const SettingsObjectFieldItemTableRow = ({ - | 'MANY_TO_ONE'; +export type RelationType = RelationDefinitionType; diff --git a/packages/twenty-front/src/testing/mock-data/generated/standard-metadata-query-result.ts b/packages/twenty-front/src/testing/mock-data/generated/standard-metadata-query-result.ts index f94bbc2f7680..fa8039497758 100644 --- a/packages/twenty-front/src/testing/mock-data/generated/standard-metadata-query-result.ts +++ b/packages/twenty-front/src/testing/mock-data/generated/standard-metadata-query-result.ts @@ -66,8 +66,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -88,7 +86,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "d8ae1b79-b532-412c-92cf-767a32e3cda2", @@ -116,21 +113,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "timelineActivities" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "d8ae1b79-b532-412c-92cf-767a32e3cda2", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "4e24ba90-8fcd-4df5-9fe8-48679c75d374", - "fromObjectMetadata": { - "__typename": "object", - "id": "2dbf5d59-f03c-4578-8ff3-750f4bcdf8d0", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -152,8 +134,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -174,7 +154,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "87c0082f-5411-4202-97cd-fc1d9112fa7a", @@ -202,21 +181,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "timelineActivities" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "87c0082f-5411-4202-97cd-fc1d9112fa7a", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "975e6a19-d90c-45dc-9bb0-ffc57f4e1950", - "fromObjectMetadata": { - "__typename": "object", - "id": "4601f72c-580d-4e64-8004-4864f5e60da7", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "task", - "namePlural": "tasks", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -238,8 +202,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -260,7 +222,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "1e93ed03-91a5-4ad4-bca7-c6a637551289", @@ -288,21 +249,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "timelineActivities" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "1e93ed03-91a5-4ad4-bca7-c6a637551289", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "f39f1db9-3d7f-46d3-aa0c-4cae44352407", - "fromObjectMetadata": { - "__typename": "object", - "id": "701aecf9-eb1c-4d84-9d94-b954b231b64b", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -323,7 +269,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "680351ba-8759-405d-8fda-90799bf75741", @@ -351,21 +296,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "timelineActivities" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "680351ba-8759-405d-8fda-90799bf75741", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "3700e772-3bf6-4150-b5ce-f7f00ded863a", - "fromObjectMetadata": { - "__typename": "object", - "id": "aeffaa4e-cae1-4dd8-b76e-5658eb73d0a9", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -387,8 +317,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -410,8 +338,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -432,7 +358,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "7ec36219-a377-4aea-98be-7954590f8a32", @@ -460,21 +385,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "timelineActivities" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "7ec36219-a377-4aea-98be-7954590f8a32", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "b66379fc-ac94-4823-b759-aa940fde9c73", - "fromObjectMetadata": { - "__typename": "object", - "id": "4cd6194a-093e-4c5d-9ff2-218970b01e3c", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "note", - "namePlural": "notes", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -496,8 +406,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -519,8 +427,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -542,8 +448,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -565,8 +469,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -588,8 +490,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -611,8 +511,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -634,8 +532,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -657,8 +553,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -680,8 +574,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -702,7 +594,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "5b2015dd-3fac-4118-adf5-3cceede873eb", @@ -730,21 +621,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "timelineActivities" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "5b2015dd-3fac-4118-adf5-3cceede873eb", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "ace8a324-075e-49a3-92fa-34e07590ec72", - "fromObjectMetadata": { - "__typename": "object", - "id": "b87720c6-bead-46a9-8c1e-c8596bdb702e", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -766,8 +642,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -823,8 +697,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -846,8 +718,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -884,8 +754,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -906,7 +774,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "c958fe88-7d66-4c1b-87c7-55ab724f42c5", @@ -934,21 +801,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "messages" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "c958fe88-7d66-4c1b-87c7-55ab724f42c5", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "9016096d-93c4-495f-93d5-b966e5bedc74", - "fromObjectMetadata": { - "__typename": "object", - "id": "1f73c3c3-a356-4a70-8a91-948e70120fdf", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "messageThread", - "namePlural": "messageThreads", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -970,8 +822,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -993,8 +843,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1041,8 +889,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "660b4257-010e-4039-897a-e274f2559ed5", "name": "message" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "2180d888-98dc-428e-a157-c30ce7bf8ce4", @@ -1079,8 +926,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1102,8 +947,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1150,8 +993,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "785c0609-42b8-4b0e-b7c2-4d54b6ed651f", "name": "message" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "642b4d8c-f2f8-4590-abce-4b112d8689ba", @@ -1188,8 +1030,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1211,8 +1051,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -1267,7 +1105,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "c0946e53-4cdd-46b4-b30a-9fce040b9a7a", @@ -1295,21 +1132,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "noteTargets" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "c0946e53-4cdd-46b4-b30a-9fce040b9a7a", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "e6fe20c1-091e-418f-9ff0-8ea7cfb864f8", - "fromObjectMetadata": { - "__typename": "object", - "id": "2dbf5d59-f03c-4578-8ff3-750f4bcdf8d0", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -1331,8 +1153,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1353,7 +1173,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "663e9842-8b92-451a-bf73-12a886ff8b05", @@ -1381,21 +1200,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "noteTargets" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "663e9842-8b92-451a-bf73-12a886ff8b05", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "04794a4e-35c3-46a9-8bf3-8ba1c0324f0b", - "fromObjectMetadata": { - "__typename": "object", - "id": "4cd6194a-093e-4c5d-9ff2-218970b01e3c", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "note", - "namePlural": "notes", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -1417,8 +1221,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1440,8 +1242,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1463,8 +1263,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1485,7 +1283,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "700c5e52-3e7b-4471-9826-82270c03c37e", @@ -1513,21 +1310,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "noteTargets" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "700c5e52-3e7b-4471-9826-82270c03c37e", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "82d1a637-3df9-4d59-a412-1cbc1d92baf2", - "fromObjectMetadata": { - "__typename": "object", - "id": "aeffaa4e-cae1-4dd8-b76e-5658eb73d0a9", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -1549,8 +1331,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1572,8 +1352,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1595,8 +1373,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1617,7 +1393,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "1670824b-e097-4afc-8401-feab7f9af0d4", @@ -1645,21 +1420,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "noteTargets" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "1670824b-e097-4afc-8401-feab7f9af0d4", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "74bf3aba-450e-48f9-987a-60662929e768", - "fromObjectMetadata": { - "__typename": "object", - "id": "701aecf9-eb1c-4d84-9d94-b954b231b64b", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - } - } } } ] @@ -1715,8 +1475,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1738,8 +1496,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1761,8 +1517,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": false, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1784,8 +1538,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1832,8 +1584,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "18cea1c1-f521-4c41-b694-729756931795", "name": "calendarEvent" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "0f9d244b-e9c6-44af-88f4-9ce798d50bf8", @@ -1870,8 +1621,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1893,8 +1642,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1920,8 +1667,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1943,8 +1688,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -1966,8 +1709,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2014,8 +1755,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "b04775e2-53a3-4f62-a2ab-858f2a456fa7", "name": "calendarEvent" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "e02ea7b1-1d5a-481b-ab71-3c94ab3f9bf0", @@ -2052,8 +1792,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2075,8 +1813,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2098,8 +1834,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": false, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2121,8 +1855,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2144,8 +1876,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2167,8 +1897,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2190,8 +1918,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -2247,8 +1973,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2270,8 +1994,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2293,8 +2015,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2316,8 +2036,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2338,7 +2056,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "d74023b4-87a8-44d0-84d8-9b2a85018e4b", @@ -2366,21 +2083,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "auditLogs" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "d74023b4-87a8-44d0-84d8-9b2a85018e4b", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "82057d3c-fd1d-4479-a8e3-f18dd9207f3e", - "fromObjectMetadata": { - "__typename": "object", - "id": "b87720c6-bead-46a9-8c1e-c8596bdb702e", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -2402,8 +2104,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2425,8 +2125,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2448,8 +2146,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2471,8 +2167,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2494,8 +2188,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2517,8 +2209,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -2574,8 +2264,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": true, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2597,8 +2285,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2620,8 +2306,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": 0, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2642,7 +2326,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "ae731975-39ee-4387-a80c-de94dff0b760", @@ -2670,21 +2353,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "viewFields" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "ae731975-39ee-4387-a80c-de94dff0b760", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "c086b30a-0267-4857-9fe0-29a2bbaa8dc8", - "fromObjectMetadata": { - "__typename": "object", - "id": "2c6e4a32-28cd-4a72-8ca6-915fd819ed32", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "view", - "namePlural": "views", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -2706,8 +2374,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": 0, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2729,8 +2395,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2752,8 +2416,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2775,8 +2437,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2798,8 +2458,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -2855,8 +2513,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2878,8 +2534,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2901,8 +2555,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2924,8 +2576,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -2946,7 +2596,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "eaf90876-fac7-448a-906c-7c2b6afcd346", @@ -2974,21 +2623,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "comments" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "eaf90876-fac7-448a-906c-7c2b6afcd346", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "c2a21675-a29d-442a-9f02-84cd93df15ce", - "fromObjectMetadata": { - "__typename": "object", - "id": "96bf92fd-6b8f-40b4-afd6-f90fedc40a1a", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "activity", - "namePlural": "activities", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -3010,8 +2644,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -3032,7 +2664,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "017b3808-bc03-4817-8a67-b20770a6a126", @@ -3060,21 +2691,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "authoredComments" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "017b3808-bc03-4817-8a67-b20770a6a126", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "c86049ea-6cac-4b7f-a58e-b68b917e4a2b", - "fromObjectMetadata": { - "__typename": "object", - "id": "b87720c6-bead-46a9-8c1e-c8596bdb702e", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -3096,8 +2712,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -3178,8 +2792,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "fbc9d8eb-c04f-4c86-81ff-d4ca9957d0d4", "name": "workspaceMember" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "d5ffcbba-0ab9-4f4d-a5e6-15f1e668b04c", @@ -3216,8 +2829,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "'en'", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -3264,8 +2875,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "9fc19fe9-2563-41ac-8c92-2062ff3a0c0c", "name": "workspaceMember" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "5b2015dd-3fac-4118-adf5-3cceede873eb", @@ -3327,8 +2937,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "a56f365a-22c8-475d-816b-709f3a19c5fd", "name": "accountOwner" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "97b97e1e-aed0-4d59-997c-13ad9007e037", @@ -3365,8 +2974,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -3388,8 +2995,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -3414,8 +3019,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -3437,8 +3040,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -3485,8 +3086,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "b31f4c53-a5ee-4939-9804-6964144540ca", "name": "author" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "fccbbaf8-c653-4e09-8d3e-5652b37d8209", @@ -3548,8 +3148,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "96acdd2a-b7d1-452b-9e58-5c4265691444", "name": "workspaceMember" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "19b7520c-bc6e-490c-bfab-a3b020315cc4", @@ -3608,8 +3207,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -3656,8 +3253,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "bc788a8f-8eb2-47bf-a02c-42f7de197ca8", "name": "workspaceMember" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "7d3faf56-e4bb-45ec-9b75-612ca6e9ae5a", @@ -3694,8 +3290,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -3746,8 +3340,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -3794,8 +3386,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "5bcc7e50-73ce-4146-b000-5a336f0e9c40", "name": "assignee" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "8cb075f2-e51c-4684-80f6-cf6af471e82a", @@ -3857,8 +3448,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "4ec37c9c-be4c-4f52-a441-03a1dfd951db", "name": "assignee" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "d5315a70-980f-4c45-9a4f-74779a00fdd3", @@ -3895,8 +3485,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -3943,8 +3531,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "95bd59b8-8083-4c76-b770-ec40a744138c", "name": "accountOwner" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "1ecacc04-e834-421d-bf1b-c765e55a4318", @@ -4006,8 +3593,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "0aaf9f83-9b43-4f15-a187-9c11761b367a", "name": "workspaceMember" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "a72edc8d-e5e3-4eae-9fd6-4cb0792b18aa", @@ -4069,8 +3655,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "fd9fcac5-c853-4fe7-ab1e-18081e4d4517", "name": "author" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "017b3808-bc03-4817-8a67-b20770a6a126", @@ -4107,8 +3692,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "'Light'", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -4155,8 +3738,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "0fedd2c5-1c9c-4e0a-8687-a8ce4dd88378", "name": "workspaceMember" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "d74023b4-87a8-44d0-84d8-9b2a85018e4b", @@ -4193,8 +3775,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -4241,8 +3821,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "85046974-8ab2-456d-a732-64da14715643", "name": "author" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "5b9f08b0-8960-40c4-b6bb-9d3552a24f8d", @@ -4279,8 +3858,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "'system'", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -4336,8 +3913,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -4362,8 +3937,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -4385,8 +3958,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -4412,8 +3983,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -4435,8 +4004,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -4462,8 +4029,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -4485,8 +4050,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -4533,8 +4096,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "362195e4-4dfb-49e1-b25b-fe3ffe7b7f14", "name": "person" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "5bb99199-6a3c-4947-b16b-6a90c6097eac", @@ -4574,8 +4136,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -4622,8 +4182,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "0669197c-bc4e-4a44-9cd9-db449bfa380e", "name": "person" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "680351ba-8759-405d-8fda-90799bf75741", @@ -4660,8 +4219,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -4708,8 +4265,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "18ea34ae-f9bc-4240-b65f-46f0d688135f", "name": "pointOfContact" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "58a081ed-e5e7-44f8-bae6-99be66b6ac2f", @@ -4746,8 +4302,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -4794,8 +4348,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "4a9e3e27-70b0-4ed7-9edf-9126c1675b22", "name": "person" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "74f62324-bc36-4210-bb88-e0e6e0136c9f", @@ -4857,8 +4410,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "f0748d0d-e6b4-44ea-b957-0c0d81af4627", "name": "person" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "450a3266-7706-4593-a458-5897c5f60fc5", @@ -4895,8 +4447,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -4917,7 +4467,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "2f030298-14c7-48a4-b351-2ec185bb1814", @@ -4945,21 +4494,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "people" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "2f030298-14c7-48a4-b351-2ec185bb1814", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "0943b1b4-3aae-4ebe-8e8e-b1a8640d78d9", - "fromObjectMetadata": { - "__typename": "object", - "id": "701aecf9-eb1c-4d84-9d94-b954b231b64b", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -4981,8 +4515,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -5029,8 +4561,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "a2ecf99f-9725-4b20-90df-28ad410f173b", "name": "person" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "178c5cfe-cc05-49ec-bedb-eff402da4e8f", @@ -5067,8 +4598,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -5115,8 +4644,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "8ac4df39-f1a0-4221-a605-bd4c229fbc12", "name": "person" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "700c5e52-3e7b-4471-9826-82270c03c37e", @@ -5178,8 +4706,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "b192eb71-bcfb-46ab-ae88-83a73700ee34", "name": "person" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "0c8f43c1-d325-4a58-99a7-926b1db4e8fc", @@ -5241,8 +4768,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "db61f1e6-17d5-4f1d-8c18-8cb5f1108831", "name": "person" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "e95da71a-7162-4282-8ff7-ea65fea36fe8", @@ -5279,8 +4805,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -5336,8 +4860,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -5359,8 +4881,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -5382,8 +4902,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -5405,8 +4923,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -5428,8 +4944,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -5451,8 +4965,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -5508,8 +5020,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -5531,8 +5041,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -5579,8 +5087,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "a6299818-986d-4358-9a7b-04e6f5e0fd8b", "name": "activity" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "69539f96-cede-4f76-bd64-84b1182c3427", @@ -5617,8 +5124,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -5665,8 +5170,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "8bcf99e6-2368-4caa-9c5e-e70c46bc6ab7", "name": "activity" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "938c0b4f-e398-4db6-8893-ad6b609556a9", @@ -5703,8 +5207,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "'Note'", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -5751,8 +5253,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "ace0311d-6b58-4c34-9e78-3c18ff147408", "name": "activity" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "eaf90876-fac7-448a-906c-7c2b6afcd346", @@ -5788,7 +5289,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "fccbbaf8-c653-4e09-8d3e-5652b37d8209", @@ -5816,21 +5316,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "authoredActivities" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "fccbbaf8-c653-4e09-8d3e-5652b37d8209", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "f9d4a27e-1728-44d8-b990-e648d838a35a", - "fromObjectMetadata": { - "__typename": "object", - "id": "b87720c6-bead-46a9-8c1e-c8596bdb702e", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -5851,7 +5336,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "d5315a70-980f-4c45-9a4f-74779a00fdd3", @@ -5879,21 +5363,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "assignedActivities" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "d5315a70-980f-4c45-9a4f-74779a00fdd3", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "2d52a31f-3ad8-4d57-90eb-61142bf58382", - "fromObjectMetadata": { - "__typename": "object", - "id": "b87720c6-bead-46a9-8c1e-c8596bdb702e", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -5915,8 +5384,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -5938,8 +5405,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -5961,8 +5426,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -5984,8 +5447,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6007,8 +5468,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6030,8 +5489,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6053,8 +5510,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -6110,8 +5565,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6132,7 +5585,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "cc228da1-14c7-4c49-a84d-231ba6166f38", @@ -6160,21 +5612,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "attachments" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "cc228da1-14c7-4c49-a84d-231ba6166f38", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "7c3b7305-e7be-4dbf-9e94-ee354e011f63", - "fromObjectMetadata": { - "__typename": "object", - "id": "4601f72c-580d-4e64-8004-4864f5e60da7", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "task", - "namePlural": "tasks", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -6195,7 +5632,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "2be99c6b-02c8-4ca0-b155-dcf7539097b5", @@ -6223,21 +5659,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "attachments" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "2be99c6b-02c8-4ca0-b155-dcf7539097b5", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "16706d44-4042-4998-b5c7-15437e052196", - "fromObjectMetadata": { - "__typename": "object", - "id": "701aecf9-eb1c-4d84-9d94-b954b231b64b", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -6258,7 +5679,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "0c8f43c1-d325-4a58-99a7-926b1db4e8fc", @@ -6286,21 +5706,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "attachments" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "0c8f43c1-d325-4a58-99a7-926b1db4e8fc", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "5030bb60-7366-4e7d-8ba4-35c6a6255547", - "fromObjectMetadata": { - "__typename": "object", - "id": "aeffaa4e-cae1-4dd8-b76e-5658eb73d0a9", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -6321,7 +5726,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "69539f96-cede-4f76-bd64-84b1182c3427", @@ -6349,21 +5753,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "attachments" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "69539f96-cede-4f76-bd64-84b1182c3427", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "5d7fa454-c89c-4fdd-ac48-6b119977c8bd", - "fromObjectMetadata": { - "__typename": "object", - "id": "96bf92fd-6b8f-40b4-afd6-f90fedc40a1a", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "activity", - "namePlural": "activities", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -6385,8 +5774,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6408,8 +5795,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6431,8 +5816,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6453,7 +5836,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "bb4120f5-5135-4881-97a8-d50e6df2f97e", @@ -6481,21 +5863,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "attachments" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "bb4120f5-5135-4881-97a8-d50e6df2f97e", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "2a2fa9e4-242f-449e-a191-d1937ee4cedc", - "fromObjectMetadata": { - "__typename": "object", - "id": "4cd6194a-093e-4c5d-9ff2-218970b01e3c", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "note", - "namePlural": "notes", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -6517,8 +5884,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6540,8 +5905,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6563,8 +5926,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6586,8 +5947,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6609,8 +5968,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6632,8 +5989,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6655,8 +6010,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6678,8 +6031,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6700,7 +6051,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "5b9f08b0-8960-40c4-b6bb-9d3552a24f8d", @@ -6728,21 +6078,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "authoredAttachments" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "5b9f08b0-8960-40c4-b6bb-9d3552a24f8d", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "6e622089-670a-4831-964c-f27af03f39c0", - "fromObjectMetadata": { - "__typename": "object", - "id": "b87720c6-bead-46a9-8c1e-c8596bdb702e", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -6763,7 +6098,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "c20ecc99-e48a-4311-b850-8fbf1a7b68ea", @@ -6791,21 +6125,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "attachments" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "c20ecc99-e48a-4311-b850-8fbf1a7b68ea", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "095b38a6-1881-40b8-9849-cb80d19aa295", - "fromObjectMetadata": { - "__typename": "object", - "id": "2dbf5d59-f03c-4578-8ff3-750f4bcdf8d0", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -6827,8 +6146,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -6884,8 +6201,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -6906,7 +6221,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "938c0b4f-e398-4db6-8893-ad6b609556a9", @@ -6934,21 +6248,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "activityTargets" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "938c0b4f-e398-4db6-8893-ad6b609556a9", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "fdf929a7-5529-4be3-a7df-aa08d2a23b2c", - "fromObjectMetadata": { - "__typename": "object", - "id": "96bf92fd-6b8f-40b4-afd6-f90fedc40a1a", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "activity", - "namePlural": "activities", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -6969,7 +6268,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "2105fe76-e9fa-4610-992a-261d0f24722d", @@ -6997,21 +6295,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "activityTargets" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "2105fe76-e9fa-4610-992a-261d0f24722d", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "1bab9225-7390-43d7-a2c5-1d14f918efc0", - "fromObjectMetadata": { - "__typename": "object", - "id": "2dbf5d59-f03c-4578-8ff3-750f4bcdf8d0", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -7033,8 +6316,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7056,8 +6337,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7078,7 +6357,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "450a3266-7706-4593-a458-5897c5f60fc5", @@ -7106,21 +6384,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "activityTargets" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "450a3266-7706-4593-a458-5897c5f60fc5", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "c87e6f64-f722-4487-9930-1c6fb67572c1", - "fromObjectMetadata": { - "__typename": "object", - "id": "aeffaa4e-cae1-4dd8-b76e-5658eb73d0a9", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -7142,8 +6405,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7165,8 +6426,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7188,8 +6447,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7210,7 +6467,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "a0f5427c-2c97-4457-b87f-a4d145e06952", @@ -7238,21 +6494,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "activityTargets" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "a0f5427c-2c97-4457-b87f-a4d145e06952", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "33454d9c-57f7-4639-9120-b024f365d52f", - "fromObjectMetadata": { - "__typename": "object", - "id": "701aecf9-eb1c-4d84-9d94-b954b231b64b", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -7274,8 +6515,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -7331,8 +6570,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7354,8 +6591,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7377,8 +6612,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7400,8 +6633,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7422,7 +6653,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "7c42db51-2fcc-44b6-9a80-787b1967e69e", @@ -7450,21 +6680,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "viewFilters" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "7c42db51-2fcc-44b6-9a80-787b1967e69e", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "4f92f2f0-9204-4f23-afdc-894829664668", - "fromObjectMetadata": { - "__typename": "object", - "id": "2c6e4a32-28cd-4a72-8ca6-915fd819ed32", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "view", - "namePlural": "views", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -7486,8 +6701,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7509,8 +6722,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7532,8 +6743,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "'Contains'", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7555,8 +6764,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -7612,8 +6819,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "'asc'", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7635,8 +6840,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7658,8 +6861,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7681,8 +6882,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7704,8 +6903,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7726,7 +6923,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "fcf27acc-a651-4ac2-9f99-aba306756209", @@ -7754,21 +6950,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "viewSorts" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "fcf27acc-a651-4ac2-9f99-aba306756209", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "5969cfdb-bf30-4a34-9b52-11b38945bbd0", - "fromObjectMetadata": { - "__typename": "object", - "id": "2c6e4a32-28cd-4a72-8ca6-915fd819ed32", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "view", - "namePlural": "views", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -7790,8 +6971,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -7846,7 +7025,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "97b97e1e-aed0-4d59-997c-13ad9007e037", @@ -7874,21 +7052,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "accountOwnerForCompanies" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "97b97e1e-aed0-4d59-997c-13ad9007e037", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "57d6eb4f-c86b-4a50-98ce-fa04c849b1a2", - "fromObjectMetadata": { - "__typename": "object", - "id": "b87720c6-bead-46a9-8c1e-c8596bdb702e", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -7910,8 +7073,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": false, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7933,8 +7094,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7956,8 +7115,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -7979,8 +7136,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8002,8 +7157,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8050,8 +7203,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "d89d8a7f-6a14-4fc8-96ca-2966632a1ca4", "name": "company" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "ac6788b1-952c-4376-bafd-66ea5a031398", @@ -8113,8 +7265,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "6213d5af-e8cd-4e5d-9a60-bab631884ae5", "name": "company" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "a0f5427c-2c97-4457-b87f-a4d145e06952", @@ -8151,8 +7302,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8178,8 +7327,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8205,8 +7352,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8228,8 +7373,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8251,8 +7394,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8299,8 +7440,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "4fa60a42-bd0d-462c-b05d-d85f96b00458", "name": "company" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "632aaba8-f213-4353-95a5-c090168c3ad7", @@ -8362,8 +7502,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "0224c08b-2c2e-474f-8360-dafad378cf62", "name": "company" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "1e93ed03-91a5-4ad4-bca7-c6a637551289", @@ -8403,8 +7542,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8451,8 +7588,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "36f7236a-bfd2-404c-adb6-66b294ca5435", "name": "company" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "2be99c6b-02c8-4ca0-b155-dcf7539097b5", @@ -8489,8 +7625,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8516,8 +7650,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8548,8 +7680,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8596,8 +7726,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "5a0243d0-051b-4f30-b0d2-da66b3b8eefe", "name": "company" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "1670824b-e097-4afc-8401-feab7f9af0d4", @@ -8634,8 +7763,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8660,8 +7787,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8708,8 +7833,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "538e49cd-f04a-4889-9994-35cacc0754b7", "name": "company" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "2f030298-14c7-48a4-b351-2ec185bb1814", @@ -8746,8 +7870,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8794,8 +7916,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "727ec83b-93b7-4e6b-be22-6f00637ec3f5", "name": "company" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "1ebadb76-46e6-4c57-b24f-441acecbd2d9", @@ -8866,8 +7987,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8914,8 +8033,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "d288fd3a-8fb0-493d-bec3-31a2c4a7d366", "name": "connectedAccount" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "21bbef75-8acf-48bf-80aa-1d26d50aea22", @@ -8952,8 +8070,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8975,8 +8091,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -8998,8 +8112,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9021,8 +8133,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9044,8 +8154,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9067,8 +8175,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9115,8 +8221,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "ceaf8f8e-297a-418b-a652-01f3eeb5c562", "name": "connectedAccount" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "b6b75323-8790-4b3e-8798-e0af646bb9aa", @@ -9153,8 +8258,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9176,8 +8279,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9199,8 +8300,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9221,7 +8320,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "1ecacc04-e834-421d-bf1b-c765e55a4318", @@ -9249,21 +8347,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "connectedAccounts" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "1ecacc04-e834-421d-bf1b-c765e55a4318", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "104209de-5259-4d74-b14a-f37badf49be9", - "fromObjectMetadata": { - "__typename": "object", - "id": "b87720c6-bead-46a9-8c1e-c8596bdb702e", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -9285,8 +8368,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -9342,8 +8423,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9365,8 +8444,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9387,7 +8464,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "19b7520c-bc6e-490c-bfab-a3b020315cc4", @@ -9415,21 +8491,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "blocklist" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "19b7520c-bc6e-490c-bfab-a3b020315cc4", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "c6b1b4a1-bad8-4872-b408-aa0ceb668215", - "fromObjectMetadata": { - "__typename": "object", - "id": "b87720c6-bead-46a9-8c1e-c8596bdb702e", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -9451,8 +8512,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9474,8 +8533,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9497,8 +8554,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -9553,7 +8608,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "457627a4-8e4f-4720-80b4-b8c47a49a1d7", @@ -9581,21 +8635,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "taskTargets" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "457627a4-8e4f-4720-80b4-b8c47a49a1d7", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "100f9c10-11c4-4fee-963a-f98a0e42d05d", - "fromObjectMetadata": { - "__typename": "object", - "id": "2dbf5d59-f03c-4578-8ff3-750f4bcdf8d0", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -9616,7 +8655,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "e95da71a-7162-4282-8ff7-ea65fea36fe8", @@ -9644,21 +8682,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "taskTargets" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "e95da71a-7162-4282-8ff7-ea65fea36fe8", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "a53d5e8d-85d9-45de-9f45-d8b4f5b11c3a", - "fromObjectMetadata": { - "__typename": "object", - "id": "aeffaa4e-cae1-4dd8-b76e-5658eb73d0a9", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -9680,8 +8703,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9703,8 +8724,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9726,8 +8745,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9749,8 +8766,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9771,7 +8786,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "1cc7a6b5-66d2-40dc-aa08-4b1a252e3ae3", @@ -9799,21 +8813,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "taskTargets" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "1cc7a6b5-66d2-40dc-aa08-4b1a252e3ae3", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "157bef1e-50c2-4c2a-bc48-a5bc790c0f08", - "fromObjectMetadata": { - "__typename": "object", - "id": "4601f72c-580d-4e64-8004-4864f5e60da7", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "task", - "namePlural": "tasks", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -9834,7 +8833,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "ac6788b1-952c-4376-bafd-66ea5a031398", @@ -9858,25 +8856,10 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "targetFieldMetadata": { "__typename": "field", - "id": "b295267e-e066-4eb1-98ab-50a9d3004394", - "name": "taskTargets" - } - }, - "toRelationMetadata": { - "__typename": "relation", - "id": "ac6788b1-952c-4376-bafd-66ea5a031398", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "b295267e-e066-4eb1-98ab-50a9d3004394", - "fromObjectMetadata": { - "__typename": "object", - "id": "701aecf9-eb1c-4d84-9d94-b954b231b64b", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false + "id": "b295267e-e066-4eb1-98ab-50a9d3004394", + "name": "taskTargets" } - } + }, } }, { @@ -9898,8 +8881,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9921,8 +8902,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -9944,8 +8923,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -10001,8 +8978,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10024,8 +8999,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10076,8 +9049,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10099,8 +9070,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10122,8 +9091,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": false, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10144,7 +9111,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "178c5cfe-cc05-49ec-bedb-eff402da4e8f", @@ -10172,21 +9138,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "calendarEventParticipants" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "178c5cfe-cc05-49ec-bedb-eff402da4e8f", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "fd48c551-1309-473d-bb7e-921c577b731b", - "fromObjectMetadata": { - "__typename": "object", - "id": "aeffaa4e-cae1-4dd8-b76e-5658eb73d0a9", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -10208,8 +9159,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10231,8 +9180,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10253,7 +9200,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "e02ea7b1-1d5a-481b-ab71-3c94ab3f9bf0", @@ -10281,21 +9227,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "calendarEventParticipants" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "e02ea7b1-1d5a-481b-ab71-3c94ab3f9bf0", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "eb3a27fb-9cb8-4017-b896-e52eaf801dc2", - "fromObjectMetadata": { - "__typename": "object", - "id": "d2834e90-eecc-4528-bab3-ad005effd6f2", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "calendarEvent", - "namePlural": "calendarEvents", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -10316,7 +9247,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "d5ffcbba-0ab9-4f4d-a5e6-15f1e668b04c", @@ -10344,21 +9274,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "calendarEventParticipants" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "d5ffcbba-0ab9-4f4d-a5e6-15f1e668b04c", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "6062715e-08e8-4ff5-962d-eed4f992fc61", - "fromObjectMetadata": { - "__typename": "object", - "id": "b87720c6-bead-46a9-8c1e-c8596bdb702e", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -10380,8 +9295,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10403,8 +9316,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10426,8 +9337,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -10483,8 +9392,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10506,8 +9413,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10528,7 +9433,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "0f9d244b-e9c6-44af-88f4-9ce798d50bf8", @@ -10556,21 +9460,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "calendarChannelEventAssociations" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "0f9d244b-e9c6-44af-88f4-9ce798d50bf8", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "fe7dcb62-099f-4ad1-af7e-a74713f6159d", - "fromObjectMetadata": { - "__typename": "object", - "id": "d2834e90-eecc-4528-bab3-ad005effd6f2", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "calendarEvent", - "namePlural": "calendarEvents", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -10592,8 +9481,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10615,8 +9502,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10638,8 +9523,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10660,7 +9543,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "bf0f695a-08cd-4767-9a83-4fd09f617793", @@ -10688,21 +9570,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "calendarChannelEventAssociations" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "bf0f695a-08cd-4767-9a83-4fd09f617793", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "9867ad34-df58-4ad0-a459-cc283990b5e5", - "fromObjectMetadata": { - "__typename": "object", - "id": "0e285964-d858-48bc-98ab-b8c6b1bd5d0b", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "calendarChannel", - "namePlural": "calendarChannels", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -10724,8 +9591,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -10781,8 +9646,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -10829,8 +9692,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "bc0e2a25-4e13-4751-a79a-2d264582ef9a", "name": "note" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "7ec36219-a377-4aea-98be-7954590f8a32", @@ -10892,8 +9754,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "87334d50-0c5d-4327-a8c5-3db6bc28c1ea", "name": "note" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "663e9842-8b92-451a-bf73-12a886ff8b05", @@ -10955,8 +9816,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "f8a0a4ad-a6f5-4eb3-985d-a3134e5449ad", "name": "note" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "bb4120f5-5135-4881-97a8-d50e6df2f97e", @@ -10993,8 +9853,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11016,8 +9874,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11039,8 +9895,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11062,8 +9916,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11085,8 +9937,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11111,8 +9961,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -11171,8 +10019,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11216,8 +10062,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11264,8 +10108,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "e48eeafe-43d8-4abc-95c8-6e7a6a56a7c9", "name": "task" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "87c0082f-5411-4202-97cd-fc1d9112fa7a", @@ -11302,8 +10145,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11325,8 +10166,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11348,8 +10187,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11371,8 +10208,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11394,8 +10229,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11442,8 +10275,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "0913c9cc-c3d4-4fd4-9fc7-b758daa08ba4", "name": "task" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "cc228da1-14c7-4c49-a84d-231ba6166f38", @@ -11480,8 +10312,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11503,8 +10333,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11551,8 +10379,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "0f37463a-4a08-44b6-87b6-8175ffa6bff0", "name": "task" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "1cc7a6b5-66d2-40dc-aa08-4b1a252e3ae3", @@ -11588,7 +10415,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "8cb075f2-e51c-4684-80f6-cf6af471e82a", @@ -11616,21 +10442,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "assignedTasks" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "8cb075f2-e51c-4684-80f6-cf6af471e82a", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "e4c25d9f-10cf-4c33-8c39-7aaac0a98f11", - "fromObjectMetadata": { - "__typename": "object", - "id": "b87720c6-bead-46a9-8c1e-c8596bdb702e", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -11652,8 +10463,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -11709,8 +10518,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11731,7 +10538,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "74f62324-bc36-4210-bb88-e0e6e0136c9f", @@ -11759,21 +10565,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "favorites" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "74f62324-bc36-4210-bb88-e0e6e0136c9f", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "ee426b52-f4d3-4b96-a7fc-04d968b66331", - "fromObjectMetadata": { - "__typename": "object", - "id": "aeffaa4e-cae1-4dd8-b76e-5658eb73d0a9", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -11794,7 +10585,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "2f07395e-a114-465c-a3a2-9c6b990d3dca", @@ -11822,21 +10612,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "favorites" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "2f07395e-a114-465c-a3a2-9c6b990d3dca", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "2e93a9a9-774b-43fd-8338-d54c29b8704c", - "fromObjectMetadata": { - "__typename": "object", - "id": "2dbf5d59-f03c-4578-8ff3-750f4bcdf8d0", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -11858,8 +10633,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11881,8 +10654,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -11903,7 +10674,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "a72edc8d-e5e3-4eae-9fd6-4cb0792b18aa", @@ -11931,21 +10701,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "favorites" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "a72edc8d-e5e3-4eae-9fd6-4cb0792b18aa", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "29055851-94dc-4fa9-84d8-295a3d161724", - "fromObjectMetadata": { - "__typename": "object", - "id": "b87720c6-bead-46a9-8c1e-c8596bdb702e", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -11966,7 +10721,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "632aaba8-f213-4353-95a5-c090168c3ad7", @@ -11994,21 +10748,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "favorites" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "632aaba8-f213-4353-95a5-c090168c3ad7", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "a0df43b7-d926-44a2-ba12-252866607207", - "fromObjectMetadata": { - "__typename": "object", - "id": "701aecf9-eb1c-4d84-9d94-b954b231b64b", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -12030,8 +10769,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": 0, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12053,8 +10790,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12076,8 +10811,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12099,8 +10832,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12122,8 +10853,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -12179,8 +10908,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12202,8 +10929,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12225,8 +10950,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12248,8 +10971,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12271,8 +10992,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12294,8 +11013,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -12351,8 +11068,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12374,8 +11089,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12419,8 +11132,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12442,8 +11153,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12487,8 +11196,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12553,8 +11260,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12576,8 +11281,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": true, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12599,8 +11302,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": 0, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12658,8 +11359,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12681,8 +11380,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12729,8 +11426,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "34479a8f-e7a4-4069-9f05-08d09113c8dc", "name": "messageChannel" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "40e51c6c-0268-47ca-bab9-4a899391e74b", @@ -12767,8 +11463,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": true, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12790,8 +11484,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12828,8 +11520,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12851,8 +11541,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12873,7 +11561,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "21bbef75-8acf-48bf-80aa-1d26d50aea22", @@ -12901,21 +11588,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "messageChannels" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "21bbef75-8acf-48bf-80aa-1d26d50aea22", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "3bf6ad9c-0441-4b8f-8dd0-12d93f83b67a", - "fromObjectMetadata": { - "__typename": "object", - "id": "66cd3a29-e2d8-4efa-8852-d17d7b538efa", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "connectedAccount", - "namePlural": "connectedAccounts", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -12937,8 +11609,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12960,8 +11630,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": true, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -12983,8 +11651,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": true, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -13006,8 +11672,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -13062,7 +11726,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "58a081ed-e5e7-44f8-bae6-99be66b6ac2f", @@ -13090,21 +11753,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "pointOfContactForOpportunities" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "58a081ed-e5e7-44f8-bae6-99be66b6ac2f", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "05863c2c-bcf7-4d88-b0cd-f00335b6854d", - "fromObjectMetadata": { - "__typename": "object", - "id": "aeffaa4e-cae1-4dd8-b76e-5658eb73d0a9", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -13151,8 +11799,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "2a725662-fe1a-44e8-af06-2ae21c9ae0c2", "name": "opportunity" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "2f07395e-a114-465c-a3a2-9c6b990d3dca", @@ -13214,8 +11861,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "987fd4f6-4c5f-48a4-82f3-fd769de80dc4", "name": "opportunity" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "d8ae1b79-b532-412c-92cf-767a32e3cda2", @@ -13252,8 +11898,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -13275,8 +11919,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -13323,8 +11965,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "ddc84553-0678-4697-a8c2-06ddbc136cab", "name": "opportunity" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "2105fe76-e9fa-4610-992a-261d0f24722d", @@ -13364,8 +12005,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -13412,8 +12051,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "807cfd9f-4081-4027-b646-cf66d81aa8c6", "name": "opportunity" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "457627a4-8e4f-4720-80b4-b8c47a49a1d7", @@ -13450,8 +12088,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -13509,8 +12145,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -13532,8 +12166,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -13554,7 +12186,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "1ebadb76-46e6-4c57-b24f-441acecbd2d9", @@ -13582,21 +12213,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "opportunities" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "1ebadb76-46e6-4c57-b24f-441acecbd2d9", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "34aec238-a534-46e7-be64-d0680a12c8ec", - "fromObjectMetadata": { - "__typename": "object", - "id": "701aecf9-eb1c-4d84-9d94-b954b231b64b", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -13621,8 +12237,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = }, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -13644,8 +12258,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -13692,8 +12304,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "b4868b15-ff98-4f36-9f59-1dbf63052bb7", "name": "opportunity" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "c20ecc99-e48a-4311-b850-8fbf1a7b68ea", @@ -13730,8 +12341,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -13778,8 +12387,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "5b2ec790-e8b8-4bd0-bf1b-db4ebc2b473a", "name": "opportunity" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "c0946e53-4cdd-46b4-b30a-9fce040b9a7a", @@ -13816,8 +12424,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -13839,8 +12445,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -13896,8 +12500,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "'table'", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -13919,8 +12521,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -13950,8 +12550,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -13973,8 +12571,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14021,8 +12617,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "337d9389-06a9-4cb1-9f2a-76dbb37a7576", "name": "view" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "ae731975-39ee-4387-a80c-de94dff0b760", @@ -14059,8 +12654,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14107,8 +12700,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "2c09d04d-007c-4652-9c90-c2cfa4696145", "name": "view" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "fcf27acc-a651-4ac2-9f99-aba306756209", @@ -14145,8 +12737,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14168,8 +12758,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14216,8 +12804,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "0f9c4eb8-501d-4861-827a-5ef45a01eba9", "name": "view" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "7c42db51-2fcc-44b6-9a80-787b1967e69e", @@ -14254,8 +12841,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14277,8 +12862,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14300,8 +12883,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14323,8 +12904,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": false, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -14405,8 +12984,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "114f853e-2684-4e62-92c9-0213ace3c498", "name": "messageThread" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "c958fe88-7d66-4c1b-87c7-55ab724f42c5", @@ -14443,8 +13021,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14491,8 +13067,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "fcbef4a3-f1d9-4714-b7ea-f44816821d6e", "name": "messageThread" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "1d8cbabc-edf5-40c9-8bd5-d1e47a93d246", @@ -14529,8 +13104,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14552,8 +13125,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -14609,8 +13180,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": true, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14675,8 +13244,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14734,8 +13301,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14772,8 +13337,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14794,7 +13357,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "b6b75323-8790-4b3e-8798-e0af646bb9aa", @@ -14822,21 +13384,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "calendarChannels" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "b6b75323-8790-4b3e-8798-e0af646bb9aa", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "bb10e69d-f049-4d97-84f4-09bce29cd401", - "fromObjectMetadata": { - "__typename": "object", - "id": "66cd3a29-e2d8-4efa-8852-d17d7b538efa", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "connectedAccount", - "namePlural": "connectedAccounts", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -14858,8 +13405,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14881,8 +13426,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14904,8 +13447,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -14952,8 +13493,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "d3039865-07b4-4114-bd78-18aa0be2a93b", "name": "calendarChannel" } - }, - "toRelationMetadata": null, + },, "fromRelationMetadata": { "__typename": "relation", "id": "bf0f695a-08cd-4767-9a83-4fd09f617793", @@ -14990,8 +13530,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": true, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15013,8 +13551,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15036,8 +13572,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": 0, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15059,8 +13593,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15082,8 +13614,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15134,8 +13664,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15157,8 +13685,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -15214,8 +13740,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15237,8 +13761,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15260,8 +13782,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15282,7 +13802,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "7d3faf56-e4bb-45ec-9b75-612ca6e9ae5a", @@ -15310,21 +13829,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "messageParticipants" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "7d3faf56-e4bb-45ec-9b75-612ca6e9ae5a", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "c00ccd93-ebc7-4744-8cb3-797a752b4627", - "fromObjectMetadata": { - "__typename": "object", - "id": "b87720c6-bead-46a9-8c1e-c8596bdb702e", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "workspaceMember", - "namePlural": "workspaceMembers", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -15346,8 +13850,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15369,8 +13871,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15392,8 +13892,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15415,8 +13913,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15437,7 +13933,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "2180d888-98dc-428e-a157-c30ce7bf8ce4", @@ -15465,21 +13960,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "messageParticipants" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "2180d888-98dc-428e-a157-c30ce7bf8ce4", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "15658254-6562-4fad-9ef3-393f913e95c2", - "fromObjectMetadata": { - "__typename": "object", - "id": "dfdcf91e-f4b4-4460-8c89-919ef501fd79", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "message", - "namePlural": "messages", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -15500,7 +13980,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "5bb99199-6a3c-4947-b16b-6a90c6097eac", @@ -15528,21 +14007,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "messageParticipants" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "5bb99199-6a3c-4947-b16b-6a90c6097eac", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "19f77ace-4b00-4fac-ba7d-8c7a3dde409b", - "fromObjectMetadata": { - "__typename": "object", - "id": "aeffaa4e-cae1-4dd8-b76e-5658eb73d0a9", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -15593,8 +14057,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = } ], "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15616,8 +14078,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] @@ -15673,8 +14133,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15696,8 +14154,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15719,8 +14175,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15742,8 +14196,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "''", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15765,8 +14217,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15787,7 +14237,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "642b4d8c-f2f8-4590-abce-4b112d8689ba", @@ -15815,21 +14264,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "messageChannelMessageAssociations" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "642b4d8c-f2f8-4590-abce-4b112d8689ba", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "2ac789bf-ce05-4f0e-9f04-f848f93c2f21", - "fromObjectMetadata": { - "__typename": "object", - "id": "dfdcf91e-f4b4-4460-8c89-919ef501fd79", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "message", - "namePlural": "messages", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -15850,7 +14284,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "40e51c6c-0268-47ca-bab9-4a899391e74b", @@ -15878,21 +14311,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "messageChannelMessageAssociations" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "40e51c6c-0268-47ca-bab9-4a899391e74b", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "bdd7ff46-118c-44e7-9b2e-cd522a248a8a", - "fromObjectMetadata": { - "__typename": "object", - "id": "311ea123-5b30-4637-ae39-3e639e780c83", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "messageChannel", - "namePlural": "messageChannels", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -15914,8 +14332,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "uuid", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15937,8 +14353,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": null, "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } }, { @@ -15959,7 +14373,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "updatedAt": "2024-08-02T16:00:05.938Z", "defaultValue": null, "options": null, - "fromRelationMetadata": null, "relationDefinition": { "__typename": "RelationDefinition", "relationId": "1d8cbabc-edf5-40c9-8bd5-d1e47a93d246", @@ -15987,21 +14400,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "messageChannelMessageAssociations" } }, - "toRelationMetadata": { - "__typename": "relation", - "id": "1d8cbabc-edf5-40c9-8bd5-d1e47a93d246", - "relationType": "ONE_TO_MANY", - "fromFieldMetadataId": "25bbf51f-17fa-4a2c-9636-3f3fdba41e08", - "fromObjectMetadata": { - "__typename": "object", - "id": "1f73c3c3-a356-4a70-8a91-948e70120fdf", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "messageThread", - "namePlural": "messageThreads", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -16023,8 +14421,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "defaultValue": "now", "options": null, "relationDefinition": null, - "fromRelationMetadata": null, - "toRelationMetadata": null } } ] diff --git a/packages/twenty-front/src/testing/mock-data/metadata.ts b/packages/twenty-front/src/testing/mock-data/metadata.ts index c86d17d47afb..93635d405e94 100644 --- a/packages/twenty-front/src/testing/mock-data/metadata.ts +++ b/packages/twenty-front/src/testing/mock-data/metadata.ts @@ -83,22 +83,6 @@ const customObjectMetadataItemEdge: ObjectEdge = { name: 'myCustom', }, }, - toRelationMetadata: null, - fromRelationMetadata: { - __typename: 'relation', - id: 'c5cdbacd-2489-4409-be9e-bb4cb38f6ddd', - relationType: 'ONE_TO_MANY', - toFieldMetadataId: 'c9607ed7-168d-4743-a56a-689ffcfffe98', - toObjectMetadata: { - __typename: 'object', - id: 'dba899da-7d88-41ac-b70e-5ea612ab4b2e', - dataSourceId: 'd36e6a2d-28bc-459d-afd5-fe18e4405729', - nameSingular: 'viewField', - namePlural: 'viewFields', - isSystem: true, - isRemote: false, - }, - }, }, }, { @@ -120,8 +104,6 @@ const customObjectMetadataItemEdge: ObjectEdge = { updatedAt: '2024-04-08T12:48:49.538Z', defaultValue: null, relationDefinition: null, - fromRelationMetadata: null, - toRelationMetadata: null, }, }, { @@ -143,8 +125,6 @@ const customObjectMetadataItemEdge: ObjectEdge = { updatedAt: '2024-04-08T12:48:49.538Z', defaultValue: null, relationDefinition: null, - fromRelationMetadata: null, - toRelationMetadata: null, }, }, { @@ -166,8 +146,6 @@ const customObjectMetadataItemEdge: ObjectEdge = { updatedAt: '2024-04-08T12:48:49.538Z', defaultValue: "''", relationDefinition: null, - fromRelationMetadata: null, - toRelationMetadata: null, }, }, { @@ -189,8 +167,6 @@ const customObjectMetadataItemEdge: ObjectEdge = { updatedAt: '2024-04-08T12:48:49.538Z', defaultValue: 'now', relationDefinition: null, - fromRelationMetadata: null, - toRelationMetadata: null, }, }, { @@ -212,8 +188,6 @@ const customObjectMetadataItemEdge: ObjectEdge = { updatedAt: '2024-04-08T12:48:49.538Z', defaultValue: 'now', relationDefinition: null, - fromRelationMetadata: null, - toRelationMetadata: null, }, }, { @@ -235,8 +209,6 @@ const customObjectMetadataItemEdge: ObjectEdge = { updatedAt: '2024-04-08T12:48:49.538Z', defaultValue: 'uuid', relationDefinition: null, - fromRelationMetadata: null, - toRelationMetadata: null, }, }, { @@ -277,8 +249,6 @@ const customObjectMetadataItemEdge: ObjectEdge = { updatedAt: '2024-04-08T12:48:49.538Z', defaultValue: null, relationDefinition: null, - fromRelationMetadata: null, - toRelationMetadata: null, }, }, ], diff --git a/packages/twenty-server/src/engine/core-modules/workspace/services/workspace.service.ts b/packages/twenty-server/src/engine/core-modules/workspace/services/workspace.service.ts index 70dbdf5769dd..56ae3ce9061f 100644 --- a/packages/twenty-server/src/engine/core-modules/workspace/services/workspace.service.ts +++ b/packages/twenty-server/src/engine/core-modules/workspace/services/workspace.service.ts @@ -9,6 +9,8 @@ import { SendInviteLinkEmail } from 'twenty-emails'; import { Repository } from 'typeorm'; import { BillingSubscriptionService } from 'src/engine/core-modules/billing/services/billing-subscription.service'; +import { EmailService } from 'src/engine/core-modules/email/email.service'; +import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; import { OnboardingService } from 'src/engine/core-modules/onboarding/onboarding.service'; import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity'; import { UserWorkspaceService } from 'src/engine/core-modules/user-workspace/user-workspace.service'; @@ -19,8 +21,6 @@ import { Workspace, WorkspaceActivationStatus, } from 'src/engine/core-modules/workspace/workspace.entity'; -import { EmailService } from 'src/engine/core-modules/email/email.service'; -import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; import { WorkspaceManagerService } from 'src/engine/workspace-manager/workspace-manager.service'; // eslint-disable-next-line @nx/workspace-inject-workspace-repository @@ -48,7 +48,7 @@ export class WorkspaceService extends TypeOrmQueryService { } const existingWorkspace = await this.workspaceRepository.findOneBy({ - id: user.defaultWorkspace.id, + id: user.defaultWorkspaceId, }); if (!existingWorkspace) { @@ -69,21 +69,21 @@ export class WorkspaceService extends TypeOrmQueryService { throw new Error('Worspace is not pending creation'); } - await this.workspaceRepository.update(user.defaultWorkspace.id, { + await this.workspaceRepository.update(user.defaultWorkspaceId, { activationStatus: WorkspaceActivationStatus.ONGOING_CREATION, }); - await this.workspaceManagerService.init(user.defaultWorkspace.id); + await this.workspaceManagerService.init(user.defaultWorkspaceId); await this.userWorkspaceService.createWorkspaceMember( - user.defaultWorkspace.id, + user.defaultWorkspaceId, user, ); - await this.workspaceRepository.update(user.defaultWorkspace.id, { + await this.workspaceRepository.update(user.defaultWorkspaceId, { displayName: data.displayName, activationStatus: WorkspaceActivationStatus.ACTIVE, }); - return user.defaultWorkspace; + return existingWorkspace; } async softDeleteWorkspace(id: string) { diff --git a/packages/twenty-server/src/engine/dataloaders/dataloader.interface.ts b/packages/twenty-server/src/engine/dataloaders/dataloader.interface.ts index defdba21188a..90b4c9ef4d2a 100644 --- a/packages/twenty-server/src/engine/dataloaders/dataloader.interface.ts +++ b/packages/twenty-server/src/engine/dataloaders/dataloader.interface.ts @@ -1,7 +1,11 @@ import DataLoader from 'dataloader'; +import { RelationMetadataLoaderPayload } from 'src/engine/dataloaders/dataloader.service'; import { RelationMetadataEntity } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; export interface IDataloaders { - relationMetadataLoader: DataLoader; + relationMetadataLoader: DataLoader< + RelationMetadataLoaderPayload, + RelationMetadataEntity + >; } diff --git a/packages/twenty-server/src/engine/dataloaders/dataloader.service.ts b/packages/twenty-server/src/engine/dataloaders/dataloader.service.ts index 4a12186c5dd0..e87f236db0c5 100644 --- a/packages/twenty-server/src/engine/dataloaders/dataloader.service.ts +++ b/packages/twenty-server/src/engine/dataloaders/dataloader.service.ts @@ -2,10 +2,20 @@ import { Injectable } from '@nestjs/common'; import DataLoader from 'dataloader'; +import { FieldMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata.interface'; + import { IDataloaders } from 'src/engine/dataloaders/dataloader.interface'; import { RelationMetadataEntity } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; import { RelationMetadataService } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.service'; +export type RelationMetadataLoaderPayload = { + workspaceId: string; + fieldMetadata: Pick< + FieldMetadataInterface, + 'type' | 'id' | 'objectMetadataId' + >; +}; + @Injectable() export class DataloaderService { constructor( @@ -14,12 +24,18 @@ export class DataloaderService { createLoaders(): IDataloaders { const relationMetadataLoader = new DataLoader< - string, + RelationMetadataLoaderPayload, RelationMetadataEntity - >(async (fieldMetadataIds: string[]) => { + >(async (dataLoaderParams: RelationMetadataLoaderPayload[]) => { + const workspaceId = dataLoaderParams[0].workspaceId; + const fieldMetadataItems = dataLoaderParams.map( + (dataLoaderParam) => dataLoaderParam.fieldMetadata, + ); + const relationsMetadataCollection = await this.relationMetadataService.findManyRelationMetadataByFieldMetadataIds( - fieldMetadataIds, + fieldMetadataItems, + workspaceId, ); return relationsMetadataCollection; diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts index f5ff84a16378..576ce0b64824 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto.ts @@ -132,6 +132,8 @@ export class FieldMetadataDTO< @HideField() workspaceId: string; + objectMetadataId: string; + @IsDateString() @Field() createdAt: Date; diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts index 553043c7fb1f..2d9e4796132c 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts @@ -103,6 +103,7 @@ export class FieldMetadataResolver { @ResolveField(() => RelationDefinitionDTO, { nullable: true }) async relationDefinition( + @AuthWorkspace() workspace: Workspace, @Parent() fieldMetadata: FieldMetadataDTO, @Context() context: { loaders: IDataloaders }, ): Promise { @@ -112,7 +113,10 @@ export class FieldMetadataResolver { try { const relationMetadataItem = - await context.loaders.relationMetadataLoader.load(fieldMetadata.id); + await context.loaders.relationMetadataLoader.load({ + fieldMetadata, + workspaceId: workspace.id, + }); return await this.fieldMetadataService.getRelationDefinitionFromRelationMetadata( fieldMetadata, diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts index 496c536aaa77..ee88d7e4fc51 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.service.ts @@ -4,7 +4,7 @@ import { InjectDataSource, InjectRepository } from '@nestjs/typeorm'; import { TypeOrmQueryService } from '@ptc-org/nestjs-query-typeorm'; import isEmpty from 'lodash.isempty'; import { DataSource, FindOneOptions, Repository } from 'typeorm'; -import { v4 as uuidV4 } from 'uuid'; +import { v4 as uuidV4, v4 } from 'uuid'; import { TypeORMService } from 'src/database/typeorm/typeorm.service'; import { DataSourceService } from 'src/engine/metadata-modules/data-source/data-source.service'; @@ -102,7 +102,6 @@ export class FieldMetadataService extends TypeOrmQueryService, ) { - const fieldMetadata = await this.fieldMetadataRepository.findOne({ + const [fieldMetadata] = await this.fieldMetadataRepository.find({ ...options, where: { ...options?.where, @@ -614,13 +616,15 @@ export class FieldMetadataService extends TypeOrmQueryService, ) { - return this.fieldMetadataRepository.findOne({ + const [fieldMetadata] = await this.fieldMetadataRepository.find({ ...options, where: { ...options.where, workspaceId, }, }); + + return fieldMetadata; } private buildUpdatableStandardFieldInput( diff --git a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.service.ts b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.service.ts index 24352f0580b0..fa59ee9973fb 100644 --- a/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.service.ts +++ b/packages/twenty-server/src/engine/metadata-modules/relation-metadata/relation-metadata.service.ts @@ -6,6 +6,8 @@ import camelCase from 'lodash.camelcase'; import { FindOneOptions, In, Repository } from 'typeorm'; import { v4 as uuidV4 } from 'uuid'; +import { FieldMetadataInterface } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata.interface'; + import { FieldMetadataEntity, FieldMetadataType, @@ -413,26 +415,11 @@ export class RelationMetadataService extends TypeOrmQueryService + >, + workspaceId: string, ): Promise<(RelationMetadataEntity | NotFoundException)[]> { - const relationMetadataCollection = - await this.relationMetadataRepository.find({ - where: [ - { - fromFieldMetadataId: In(fieldMetadataIds), - }, - { - toFieldMetadataId: In(fieldMetadataIds), - }, - ], - }); - - if (relationMetadataCollection.length === 0) { - return []; - } - - const workspaceId = relationMetadataCollection[0].workspaceId; - const metadataVersion = await this.workspaceCacheStorageService.getMetadataVersion(workspaceId); @@ -454,47 +441,39 @@ export class RelationMetadataService extends TypeOrmQueryService { - const foundRelationMetadataItem = relationMetadataCollection.find( - (relationMetadataItem) => - relationMetadataItem.fromFieldMetadataId === fieldMetadataId || - relationMetadataItem.toFieldMetadataId === fieldMetadataId, - ); + const mappedResult = fieldMetadataItems.map((fieldMetadataItem) => { + const objectMetadata = + objectMetadataMap[fieldMetadataItem.objectMetadataId]; - return ( - foundRelationMetadataItem ?? - // TODO: return a relation metadata not found exception - new NotFoundException( - `RelationMetadata with fieldMetadataId ${fieldMetadataId} not found`, - ) - ); - }); + const fieldMetadata = objectMetadata.fields[fieldMetadataItem.id]; + + const relationMetadata = + fieldMetadata.fromRelationMetadata ?? fieldMetadata.toRelationMetadata; - const enhancedResults = mappedResult.map((relationMetadataItem) => { - if (relationMetadataItem instanceof NotFoundException) { - return relationMetadataItem; + if (!relationMetadata) { + return new NotFoundException( + `From object metadata not found for relation ${fieldMetadata?.id}`, + ); } const fromObjectMetadata = - objectMetadataMap[relationMetadataItem.fromObjectMetadataId]; + objectMetadataMap[relationMetadata.fromObjectMetadataId]; const toObjectMetadata = - objectMetadataMap[relationMetadataItem.toObjectMetadataId]; + objectMetadataMap[relationMetadata.toObjectMetadataId]; const fromFieldMetadata = - Object.values(fromObjectMetadata.fields).find( - (fieldMetadata) => - fieldMetadata.id === relationMetadataItem.fromFieldMetadataId, - ) ?? null; + objectMetadataMap[fromObjectMetadata.id].fields[ + relationMetadata.fromFieldMetadataId + ]; const toFieldMetadata = - Object.values(toObjectMetadata.fields).find( - (fieldMetadata) => - fieldMetadata.id === relationMetadataItem.toFieldMetadataId, - ) ?? null; + objectMetadataMap[toObjectMetadata.id].fields[ + relationMetadata.toFieldMetadataId + ]; return { - ...relationMetadataItem, + ...relationMetadata, fromObjectMetadata, toObjectMetadata, fromFieldMetadata, @@ -502,7 +481,7 @@ export class RelationMetadataService extends TypeOrmQueryService Date: Fri, 13 Sep 2024 16:51:40 +0200 Subject: [PATCH 11/16] Fix --- .../useOpenObjectRecordsSpreasheetImportDialog.ts | 8 ++++++-- .../components/SettingsDataModelOverviewField.tsx | 14 ++++++++++++-- .../views/hooks/internal/useViewFromQueryParams.ts | 12 ++++++------ 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/packages/twenty-front/src/modules/object-record/spreadsheet-import/hooks/useOpenObjectRecordsSpreasheetImportDialog.ts b/packages/twenty-front/src/modules/object-record/spreadsheet-import/hooks/useOpenObjectRecordsSpreasheetImportDialog.ts index 80b547eaa5a6..5a0ee222a133 100644 --- a/packages/twenty-front/src/modules/object-record/spreadsheet-import/hooks/useOpenObjectRecordsSpreasheetImportDialog.ts +++ b/packages/twenty-front/src/modules/object-record/spreadsheet-import/hooks/useOpenObjectRecordsSpreasheetImportDialog.ts @@ -6,7 +6,10 @@ import { useOpenSpreadsheetImportDialog } from '@/spreadsheet-import/hooks/useOp import { SpreadsheetImportDialogOptions } from '@/spreadsheet-import/types'; import { SnackBarVariant } from '@/ui/feedback/snack-bar-manager/components/SnackBar'; import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; -import { FieldMetadataType } from '~/generated-metadata/graphql'; +import { + FieldMetadataType, + RelationDefinitionType, +} from '~/generated-metadata/graphql'; export const useOpenObjectRecordsSpreasheetImportDialog = ( objectNameSingular: string, @@ -37,7 +40,8 @@ export const useOpenObjectRecordsSpreasheetImportDialog = ( (!fieldMetadataItem.isSystem || fieldMetadataItem.name === 'id') && fieldMetadataItem.name !== 'createdAt' && (fieldMetadataItem.type !== FieldMetadataType.Relation || - fieldMetadataItem.toRelationMetadata), + fieldMetadataItem.relationDefinition?.direction === + RelationDefinitionType.OneToMany), ) .sort((fieldMetadataItemA, fieldMetadataItemB) => fieldMetadataItemA.name.localeCompare(fieldMetadataItemB.name), diff --git a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewField.tsx b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewField.tsx index a6c24b7886cc..98c0321056e7 100644 --- a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewField.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewField.tsx @@ -43,7 +43,12 @@ export const ObjectFieldRow = ({ field }: ObjectFieldRowProps) => { {Icon && } {relatedObject?.labelPlural ?? ''} { } /> { if (isUndefinedOrNull(filterDefinition)) return null; const relationObjectMetadataNameSingular = - fieldMetadataItem.toRelationMetadata?.fromObjectMetadata - .nameSingular; + fieldMetadataItem.relationDefinition?.targetObjectMetadata + ?.nameSingular; const relationObjectMetadataNamePlural = - fieldMetadataItem.toRelationMetadata?.fromObjectMetadata - .namePlural; + fieldMetadataItem.relationDefinition?.targetObjectMetadata + ?.namePlural; const relationObjectMetadataItem = relationObjectMetadataNameSingular From b02d1979cc04a2f131bccdaadf72702edcce0fb0 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Fri, 13 Sep 2024 16:55:25 +0200 Subject: [PATCH 12/16] Fix --- .../record-show/components/RecordShowContainer.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/twenty-front/src/modules/object-record/record-show/components/RecordShowContainer.tsx b/packages/twenty-front/src/modules/object-record/record-show/components/RecordShowContainer.tsx index 505dfae807c5..4829831086e2 100644 --- a/packages/twenty-front/src/modules/object-record/record-show/components/RecordShowContainer.tsx +++ b/packages/twenty-front/src/modules/object-record/record-show/components/RecordShowContainer.tsx @@ -7,6 +7,7 @@ import { Task } from '@/activities/types/Task'; import { InformationBannerDeletedRecord } from '@/information-banner/components/deleted-record/InformationBannerDeletedRecord'; import { useLabelIdentifierFieldMetadataItem } from '@/object-metadata/hooks/useLabelIdentifierFieldMetadataItem'; import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem'; +import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems'; import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular'; import { formatFieldMetadataItemAsColumnDefinition } from '@/object-metadata/utils/formatFieldMetadataItemAsColumnDefinition'; import { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord'; @@ -56,6 +57,8 @@ export const RecordShowContainer = ({ objectNameSingular, }); + const { objectMetadataItems } = useObjectMetadataItems(); + const { labelIdentifierFieldMetadataItem } = useLabelIdentifierFieldMetadataItem({ objectNameSingular, @@ -119,7 +122,7 @@ export const RecordShowContainer = ({ const availableFieldMetadataItems = objectMetadataItem.fields .filter( (fieldMetadataItem) => - isFieldCellSupported(fieldMetadataItem) && + isFieldCellSupported(fieldMetadataItem, objectMetadataItems) && fieldMetadataItem.id !== labelIdentifierFieldMetadataItem?.id, ) .sort((fieldMetadataItemA, fieldMetadataItemB) => From e4c2f9dd0c51c8f0df3a4bc359942be4471f3549 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Fri, 13 Sep 2024 18:04:07 +0200 Subject: [PATCH 13/16] Fixes --- .../CurrentWorkspaceMemberFavorites.tsx | 8 +- .../src/modules/favorites/types/Favorite.ts | 1 + .../favorites/utils/sort-favorites.util.ts | 2 + .../record-field/types/FieldDefinition.ts | 6 - .../record-field/types/FieldMetadata.ts | 22 +--- .../guards/isFieldRelationFromManyObjects.ts | 8 +- .../guards/isFieldRelationToOneObject.ts | 8 +- .../options/hooks/useExportTableData.ts | 3 +- .../RecordDetailRelationRecordsListItem.tsx | 3 +- .../RecordDetailRelationSection.tsx | 7 +- .../utils/filterAvailableTableColumns.ts | 4 +- .../utils/generateEmptyFieldValue.ts | 13 +- .../SignInBackgroundMockColumnDefinitions.ts | 17 +-- .../standard-metadata-query-result.ts | 116 +++++++++--------- .../src/engine/guards/demo.env.guard.ts | 2 + 15 files changed, 105 insertions(+), 115 deletions(-) diff --git a/packages/twenty-front/src/modules/favorites/components/CurrentWorkspaceMemberFavorites.tsx b/packages/twenty-front/src/modules/favorites/components/CurrentWorkspaceMemberFavorites.tsx index c40df8e53c92..c78cdd05c6fb 100644 --- a/packages/twenty-front/src/modules/favorites/components/CurrentWorkspaceMemberFavorites.tsx +++ b/packages/twenty-front/src/modules/favorites/components/CurrentWorkspaceMemberFavorites.tsx @@ -11,7 +11,7 @@ import { NavigationDrawerSection } from '@/ui/navigation/navigation-drawer/compo import { NavigationDrawerSectionTitle } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerSectionTitle'; import { useNavigationSection } from '@/ui/navigation/navigation-drawer/hooks/useNavigationSection'; -import { currentUserState } from '@/auth/states/currentUserState'; +import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState'; import { useFavorites } from '../hooks/useFavorites'; const StyledContainer = styled(NavigationDrawerSection)` @@ -35,7 +35,7 @@ const StyledNavigationDrawerItem = styled(NavigationDrawerItem)` `; export const CurrentWorkspaceMemberFavorites = () => { - const currentUser = useRecoilValue(currentUserState); + const currentWorkspaceMember = useRecoilValue(currentWorkspaceMemberState); const { favorites, handleReorderFavorite } = useFavorites(); const loading = useIsPrefetchLoading(); @@ -44,12 +44,12 @@ export const CurrentWorkspaceMemberFavorites = () => { useNavigationSection('Favorites'); const isNavigationSectionOpen = useRecoilValue(isNavigationSectionOpenState); - if (loading && isDefined(currentUser)) { + if (loading && isDefined(currentWorkspaceMember)) { return ; } const currentWorkspaceMemberFavorites = favorites.filter( - (favorite) => favorite.workspaceMemberId === currentUser?.id, + (favorite) => favorite.workspaceMemberId === currentWorkspaceMember?.id, ); if ( diff --git a/packages/twenty-front/src/modules/favorites/types/Favorite.ts b/packages/twenty-front/src/modules/favorites/types/Favorite.ts index a00414137950..a0bb7289911d 100644 --- a/packages/twenty-front/src/modules/favorites/types/Favorite.ts +++ b/packages/twenty-front/src/modules/favorites/types/Favorite.ts @@ -9,5 +9,6 @@ export type Favorite = { avatarType: AvatarType; link: string; recordId: string; + workspaceMemberId: string; __typename: 'Favorite'; }; diff --git a/packages/twenty-front/src/modules/favorites/utils/sort-favorites.util.ts b/packages/twenty-front/src/modules/favorites/utils/sort-favorites.util.ts index 1e9f4052796d..cac8c448dd35 100644 --- a/packages/twenty-front/src/modules/favorites/utils/sort-favorites.util.ts +++ b/packages/twenty-front/src/modules/favorites/utils/sort-favorites.util.ts @@ -29,6 +29,7 @@ export const sortFavorites = ( ); return { + ...favorite, id: favorite.id, recordId: objectRecordIdentifier.id, position: favorite.position, @@ -38,6 +39,7 @@ export const sortFavorites = ( link: hasLinkToShowPage ? objectRecordIdentifier.linkToShowPage : '', + workspaceMemberId: favorite.workspaceMemberId, } as Favorite; } } diff --git a/packages/twenty-front/src/modules/object-record/record-field/types/FieldDefinition.ts b/packages/twenty-front/src/modules/object-record/record-field/types/FieldDefinition.ts index f00c197d0eb6..16f05f2418d2 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/types/FieldDefinition.ts +++ b/packages/twenty-front/src/modules/object-record/record-field/types/FieldDefinition.ts @@ -4,12 +4,6 @@ import { FieldMetadataType } from '~/generated-metadata/graphql'; import { FieldMetadata } from './FieldMetadata'; -export type FieldDefinitionRelationType = - | 'FROM_MANY_OBJECTS' - | 'FROM_ONE_OBJECT' - | 'TO_MANY_OBJECTS' - | 'TO_ONE_OBJECT'; - export type FieldDefinition = { fieldMetadataId: string; label: string; diff --git a/packages/twenty-front/src/modules/object-record/record-field/types/FieldMetadata.ts b/packages/twenty-front/src/modules/object-record/record-field/types/FieldMetadata.ts index aaf659355717..2c46991afd4a 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/types/FieldMetadata.ts +++ b/packages/twenty-front/src/modules/object-record/record-field/types/FieldMetadata.ts @@ -3,8 +3,8 @@ import { ThemeColor } from 'twenty-ui'; import { RATING_VALUES } from '@/object-record/record-field/meta-types/constants/RatingValues'; import { ZodHelperLiteral } from '@/object-record/record-field/types/ZodHelperLiteral'; import { EntityForSelect } from '@/object-record/relation-picker/types/EntityForSelect'; -import { WithNarrowedStringLiteralProperty } from '~/types/WithNarrowedStringLiteralProperty'; +import { RelationDefinitionType } from '~/generated-metadata/graphql'; import { CurrencyCode } from './CurrencyCode'; export type FieldUuidMetadata = { @@ -110,35 +110,17 @@ export type FieldPositionMetadata = { fieldName: string; }; -export type FieldDefinitionRelationType = - | 'FROM_MANY_OBJECTS' - | 'FROM_ONE_OBJECT' - | 'TO_MANY_OBJECTS' - | 'TO_ONE_OBJECT'; - export type FieldRelationMetadata = { fieldName: string; objectMetadataNameSingular?: string; relationFieldMetadataId: string; relationObjectMetadataNamePlural: string; relationObjectMetadataNameSingular: string; - relationType?: FieldDefinitionRelationType; + relationType?: RelationDefinitionType; targetFieldMetadataName?: string; useEditButton?: boolean; }; -export type FieldRelationOneMetadata = WithNarrowedStringLiteralProperty< - FieldRelationMetadata, - 'relationType', - 'TO_ONE_OBJECT' ->; - -export type FieldRelationManyMetadata = WithNarrowedStringLiteralProperty< - FieldRelationMetadata, - 'relationType', - 'FROM_MANY_OBJECTS' ->; - export type FieldSelectMetadata = { objectMetadataNameSingular?: string; fieldName: string; diff --git a/packages/twenty-front/src/modules/object-record/record-field/types/guards/isFieldRelationFromManyObjects.ts b/packages/twenty-front/src/modules/object-record/record-field/types/guards/isFieldRelationFromManyObjects.ts index 03559df5d356..e325df622c5a 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/types/guards/isFieldRelationFromManyObjects.ts +++ b/packages/twenty-front/src/modules/object-record/record-field/types/guards/isFieldRelationFromManyObjects.ts @@ -1,9 +1,11 @@ import { isFieldRelation } from '@/object-record/record-field/types/guards/isFieldRelation'; +import { RelationDefinitionType } from '~/generated-metadata/graphql'; import { FieldDefinition } from '../FieldDefinition'; -import { FieldMetadata, FieldRelationManyMetadata } from '../FieldMetadata'; +import { FieldMetadata } from '../FieldMetadata'; export const isFieldRelationFromManyObjects = ( field: Pick, 'type' | 'metadata'>, -): field is FieldDefinition => - isFieldRelation(field) && field.metadata.relationType === 'FROM_MANY_OBJECTS'; +): field is FieldDefinition => + isFieldRelation(field) && + field.metadata.relationType === RelationDefinitionType.OneToMany; diff --git a/packages/twenty-front/src/modules/object-record/record-field/types/guards/isFieldRelationToOneObject.ts b/packages/twenty-front/src/modules/object-record/record-field/types/guards/isFieldRelationToOneObject.ts index d1a1bb365aab..12b9958ade93 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/types/guards/isFieldRelationToOneObject.ts +++ b/packages/twenty-front/src/modules/object-record/record-field/types/guards/isFieldRelationToOneObject.ts @@ -1,9 +1,11 @@ import { isFieldRelation } from '@/object-record/record-field/types/guards/isFieldRelation'; +import { RelationDefinitionType } from '~/generated-metadata/graphql'; import { FieldDefinition } from '../FieldDefinition'; -import { FieldMetadata, FieldRelationOneMetadata } from '../FieldMetadata'; +import { FieldMetadata } from '../FieldMetadata'; export const isFieldRelationToOneObject = ( field: Pick, 'type' | 'metadata'>, -): field is FieldDefinition => - isFieldRelation(field) && field.metadata.relationType === 'TO_ONE_OBJECT'; +): field is FieldDefinition => + isFieldRelation(field) && + field.metadata.relationType === RelationDefinitionType.ManyToOne; diff --git a/packages/twenty-front/src/modules/object-record/record-index/options/hooks/useExportTableData.ts b/packages/twenty-front/src/modules/object-record/record-index/options/hooks/useExportTableData.ts index d6f6f83f3feb..8a535604dee8 100644 --- a/packages/twenty-front/src/modules/object-record/record-index/options/hooks/useExportTableData.ts +++ b/packages/twenty-front/src/modules/object-record/record-index/options/hooks/useExportTableData.ts @@ -9,6 +9,7 @@ import { } from '@/object-record/record-index/options/hooks/useTableData'; import { ColumnDefinition } from '@/object-record/record-table/types/ColumnDefinition'; import { ObjectRecord } from '@/object-record/types/ObjectRecord'; +import { RelationDefinitionType } from '~/generated-metadata/graphql'; import { FieldMetadataType } from '~/generated/graphql'; import { isDefined } from '~/utils/isDefined'; import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull'; @@ -43,7 +44,7 @@ export const generateCsv: GenerateExport = ({ const columnsToExport = columns.filter( (col) => !('relationType' in col.metadata && col.metadata.relationType) || - col.metadata.relationType === 'TO_ONE_OBJECT', + col.metadata.relationType === RelationDefinitionType.ManyToOne, ); const objectIdColumn: ColumnDefinition = { diff --git a/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationRecordsListItem.tsx b/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationRecordsListItem.tsx index 8a52e5691bb5..36a3d7a1a2fe 100644 --- a/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationRecordsListItem.tsx +++ b/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationRecordsListItem.tsx @@ -38,6 +38,7 @@ import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown'; import { DropdownScope } from '@/ui/layout/dropdown/scopes/DropdownScope'; import { MenuItem } from '@/ui/navigation/menu-item/components/MenuItem'; import { AnimatedEaseInOut } from '@/ui/utilities/animation/components/AnimatedEaseInOut'; +import { RelationDefinitionType } from '~/generated-metadata/graphql'; const StyledListItem = styled(RecordDetailRecordsListItem)<{ isDropdownOpen?: boolean; @@ -90,7 +91,7 @@ export const RecordDetailRelationRecordsListItem = ({ relationType, } = fieldDefinition.metadata as FieldRelationMetadata; - const isToOneObject = relationType === 'TO_ONE_OBJECT'; + const isToOneObject = relationType === RelationDefinitionType.ManyToOne; const { objectMetadataItem: relationObjectMetadataItem } = useObjectMetadataItem({ objectNameSingular: relationObjectMetadataNameSingular, diff --git a/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationSection.tsx b/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationSection.tsx index c1c80de6696a..39b1c2f31d68 100644 --- a/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationSection.tsx +++ b/packages/twenty-front/src/modules/object-record/record-show/record-detail-section/components/RecordDetailRelationSection.tsx @@ -32,6 +32,7 @@ import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown'; import { DropdownScope } from '@/ui/layout/dropdown/scopes/DropdownScope'; import { FilterQueryParams } from '@/views/hooks/internal/useViewFromQueryParams'; import { ViewFilterOperand } from '@/views/types/ViewFilterOperand'; +import { RelationDefinitionType } from '~/generated-metadata/graphql'; type RecordDetailRelationSectionProps = { loading: boolean; @@ -67,8 +68,8 @@ export const RecordDetailRelationSection = ({ >(recordStoreFamilySelector({ recordId, fieldName })); // TODO: use new relation type - const isToOneObject = relationType === 'TO_ONE_OBJECT'; - const isFromManyObjects = relationType === 'FROM_MANY_OBJECTS'; + const isToOneObject = relationType === RelationDefinitionType.ManyToOne; + const isToManyObjects = RelationDefinitionType.OneToMany; const relationRecords: ObjectRecord[] = fieldValue && isToOneObject @@ -160,7 +161,7 @@ export const RecordDetailRelationSection = ({ , ): boolean => { if ( isFieldRelation(columnDefinition) && - columnDefinition.metadata?.relationType !== 'TO_ONE_OBJECT' && - columnDefinition.metadata?.relationType !== 'FROM_MANY_OBJECTS' + columnDefinition.metadata?.relationType !== RelationDefinitionType.ManyToOne ) { return false; } diff --git a/packages/twenty-front/src/modules/object-record/utils/generateEmptyFieldValue.ts b/packages/twenty-front/src/modules/object-record/utils/generateEmptyFieldValue.ts index 7782b5de070f..bd07d173cfd2 100644 --- a/packages/twenty-front/src/modules/object-record/utils/generateEmptyFieldValue.ts +++ b/packages/twenty-front/src/modules/object-record/utils/generateEmptyFieldValue.ts @@ -1,7 +1,8 @@ -import { isNonEmptyString } from '@sniptt/guards'; - import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem'; -import { FieldMetadataType } from '~/generated-metadata/graphql'; +import { + FieldMetadataType, + RelationDefinitionType, +} from '~/generated-metadata/graphql'; export const generateEmptyFieldValue = ( fieldMetadataItem: Pick, @@ -62,10 +63,8 @@ export const generateEmptyFieldValue = ( } case FieldMetadataType.Relation: { if ( - !isNonEmptyString( - fieldMetadataItem.relationDefinition?.targetObjectMetadata - ?.nameSingular, - ) + fieldMetadataItem.relationDefinition?.direction === + RelationDefinitionType.ManyToOne ) { return null; } diff --git a/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockColumnDefinitions.ts b/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockColumnDefinitions.ts index 5e4e4377de89..7a3d5912ff22 100644 --- a/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockColumnDefinitions.ts +++ b/packages/twenty-front/src/modules/sign-in-background-mock/constants/SignInBackgroundMockColumnDefinitions.ts @@ -2,7 +2,10 @@ import { COMPANY_LABEL_IDENTIFIER_FIELD_METADATA_ID } from '@/object-metadata/ut import { FieldMetadata } from '@/object-record/record-field/types/FieldMetadata'; import { ColumnDefinition } from '@/object-record/record-table/types/ColumnDefinition'; import { filterAvailableTableColumns } from '@/object-record/utils/filterAvailableTableColumns'; -import { FieldMetadataType } from '~/generated-metadata/graphql'; +import { + FieldMetadataType, + RelationDefinitionType, +} from '~/generated-metadata/graphql'; export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = ( [ @@ -65,7 +68,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = ( type: FieldMetadataType.Relation, metadata: { fieldName: 'favorites', - relationType: 'FROM_MANY_OBJECTS', + relationType: RelationDefinitionType.OneToMany, relationObjectMetadataNameSingular: '', relationObjectMetadataNamePlural: '', objectMetadataNameSingular: 'company', @@ -99,7 +102,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = ( type: FieldMetadataType.Relation, metadata: { fieldName: 'accountOwner', - relationType: 'TO_ONE_OBJECT', + relationType: RelationDefinitionType.ManyToOne, relationObjectMetadataNameSingular: 'workspaceMember', relationObjectMetadataNamePlural: 'workspaceMembers', objectMetadataNameSingular: 'company', @@ -116,7 +119,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = ( type: FieldMetadataType.Relation, metadata: { fieldName: 'people', - relationType: 'FROM_MANY_OBJECTS', + relationType: RelationDefinitionType.OneToMany, relationObjectMetadataNameSingular: '', relationObjectMetadataNamePlural: '', objectMetadataNameSingular: 'company', @@ -133,7 +136,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = ( type: FieldMetadataType.Relation, metadata: { fieldName: 'attachments', - relationType: 'FROM_MANY_OBJECTS', + relationType: RelationDefinitionType.OneToMany, relationObjectMetadataNameSingular: '', relationObjectMetadataNamePlural: '', objectMetadataNameSingular: 'company', @@ -201,7 +204,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = ( type: FieldMetadataType.Relation, metadata: { fieldName: 'opportunities', - relationType: 'FROM_MANY_OBJECTS', + relationType: RelationDefinitionType.OneToMany, relationObjectMetadataNameSingular: '', relationObjectMetadataNamePlural: '', objectMetadataNameSingular: 'company', @@ -235,7 +238,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = ( type: FieldMetadataType.Relation, metadata: { fieldName: 'activityTargets', - relationType: 'FROM_MANY_OBJECTS', + relationType: RelationDefinitionType.OneToMany, relationObjectMetadataNameSingular: '', relationObjectMetadataNamePlural: '', objectMetadataNameSingular: 'company', diff --git a/packages/twenty-front/src/testing/mock-data/generated/standard-metadata-query-result.ts b/packages/twenty-front/src/testing/mock-data/generated/standard-metadata-query-result.ts index fa8039497758..560ee65a7a49 100644 --- a/packages/twenty-front/src/testing/mock-data/generated/standard-metadata-query-result.ts +++ b/packages/twenty-front/src/testing/mock-data/generated/standard-metadata-query-result.ts @@ -889,7 +889,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "660b4257-010e-4039-897a-e274f2559ed5", "name": "message" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "2180d888-98dc-428e-a157-c30ce7bf8ce4", @@ -993,7 +993,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "785c0609-42b8-4b0e-b7c2-4d54b6ed651f", "name": "message" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "642b4d8c-f2f8-4590-abce-4b112d8689ba", @@ -1584,7 +1584,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "18cea1c1-f521-4c41-b694-729756931795", "name": "calendarEvent" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "0f9d244b-e9c6-44af-88f4-9ce798d50bf8", @@ -1755,7 +1755,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "b04775e2-53a3-4f62-a2ab-858f2a456fa7", "name": "calendarEvent" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "e02ea7b1-1d5a-481b-ab71-3c94ab3f9bf0", @@ -2792,7 +2792,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "fbc9d8eb-c04f-4c86-81ff-d4ca9957d0d4", "name": "workspaceMember" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "d5ffcbba-0ab9-4f4d-a5e6-15f1e668b04c", @@ -2875,7 +2875,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "9fc19fe9-2563-41ac-8c92-2062ff3a0c0c", "name": "workspaceMember" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "5b2015dd-3fac-4118-adf5-3cceede873eb", @@ -2937,7 +2937,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "a56f365a-22c8-475d-816b-709f3a19c5fd", "name": "accountOwner" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "97b97e1e-aed0-4d59-997c-13ad9007e037", @@ -3086,7 +3086,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "b31f4c53-a5ee-4939-9804-6964144540ca", "name": "author" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "fccbbaf8-c653-4e09-8d3e-5652b37d8209", @@ -3148,7 +3148,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "96acdd2a-b7d1-452b-9e58-5c4265691444", "name": "workspaceMember" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "19b7520c-bc6e-490c-bfab-a3b020315cc4", @@ -3253,7 +3253,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "bc788a8f-8eb2-47bf-a02c-42f7de197ca8", "name": "workspaceMember" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "7d3faf56-e4bb-45ec-9b75-612ca6e9ae5a", @@ -3386,7 +3386,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "5bcc7e50-73ce-4146-b000-5a336f0e9c40", "name": "assignee" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "8cb075f2-e51c-4684-80f6-cf6af471e82a", @@ -3448,7 +3448,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "4ec37c9c-be4c-4f52-a441-03a1dfd951db", "name": "assignee" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "d5315a70-980f-4c45-9a4f-74779a00fdd3", @@ -3531,7 +3531,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "95bd59b8-8083-4c76-b770-ec40a744138c", "name": "accountOwner" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "1ecacc04-e834-421d-bf1b-c765e55a4318", @@ -3593,7 +3593,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "0aaf9f83-9b43-4f15-a187-9c11761b367a", "name": "workspaceMember" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "a72edc8d-e5e3-4eae-9fd6-4cb0792b18aa", @@ -3655,7 +3655,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "fd9fcac5-c853-4fe7-ab1e-18081e4d4517", "name": "author" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "017b3808-bc03-4817-8a67-b20770a6a126", @@ -3738,7 +3738,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "0fedd2c5-1c9c-4e0a-8687-a8ce4dd88378", "name": "workspaceMember" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "d74023b4-87a8-44d0-84d8-9b2a85018e4b", @@ -3821,7 +3821,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "85046974-8ab2-456d-a732-64da14715643", "name": "author" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "5b9f08b0-8960-40c4-b6bb-9d3552a24f8d", @@ -4096,7 +4096,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "362195e4-4dfb-49e1-b25b-fe3ffe7b7f14", "name": "person" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "5bb99199-6a3c-4947-b16b-6a90c6097eac", @@ -4182,7 +4182,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "0669197c-bc4e-4a44-9cd9-db449bfa380e", "name": "person" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "680351ba-8759-405d-8fda-90799bf75741", @@ -4265,7 +4265,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "18ea34ae-f9bc-4240-b65f-46f0d688135f", "name": "pointOfContact" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "58a081ed-e5e7-44f8-bae6-99be66b6ac2f", @@ -4348,7 +4348,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "4a9e3e27-70b0-4ed7-9edf-9126c1675b22", "name": "person" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "74f62324-bc36-4210-bb88-e0e6e0136c9f", @@ -4410,7 +4410,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "f0748d0d-e6b4-44ea-b957-0c0d81af4627", "name": "person" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "450a3266-7706-4593-a458-5897c5f60fc5", @@ -4561,7 +4561,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "a2ecf99f-9725-4b20-90df-28ad410f173b", "name": "person" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "178c5cfe-cc05-49ec-bedb-eff402da4e8f", @@ -4644,7 +4644,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "8ac4df39-f1a0-4221-a605-bd4c229fbc12", "name": "person" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "700c5e52-3e7b-4471-9826-82270c03c37e", @@ -4706,7 +4706,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "b192eb71-bcfb-46ab-ae88-83a73700ee34", "name": "person" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "0c8f43c1-d325-4a58-99a7-926b1db4e8fc", @@ -4768,7 +4768,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "db61f1e6-17d5-4f1d-8c18-8cb5f1108831", "name": "person" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "e95da71a-7162-4282-8ff7-ea65fea36fe8", @@ -5087,7 +5087,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "a6299818-986d-4358-9a7b-04e6f5e0fd8b", "name": "activity" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "69539f96-cede-4f76-bd64-84b1182c3427", @@ -5170,7 +5170,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "8bcf99e6-2368-4caa-9c5e-e70c46bc6ab7", "name": "activity" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "938c0b4f-e398-4db6-8893-ad6b609556a9", @@ -5253,7 +5253,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "ace0311d-6b58-4c34-9e78-3c18ff147408", "name": "activity" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "eaf90876-fac7-448a-906c-7c2b6afcd346", @@ -7203,7 +7203,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "d89d8a7f-6a14-4fc8-96ca-2966632a1ca4", "name": "company" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "ac6788b1-952c-4376-bafd-66ea5a031398", @@ -7265,7 +7265,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "6213d5af-e8cd-4e5d-9a60-bab631884ae5", "name": "company" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "a0f5427c-2c97-4457-b87f-a4d145e06952", @@ -7440,7 +7440,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "4fa60a42-bd0d-462c-b05d-d85f96b00458", "name": "company" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "632aaba8-f213-4353-95a5-c090168c3ad7", @@ -7502,7 +7502,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "0224c08b-2c2e-474f-8360-dafad378cf62", "name": "company" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "1e93ed03-91a5-4ad4-bca7-c6a637551289", @@ -7588,7 +7588,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "36f7236a-bfd2-404c-adb6-66b294ca5435", "name": "company" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "2be99c6b-02c8-4ca0-b155-dcf7539097b5", @@ -7726,7 +7726,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "5a0243d0-051b-4f30-b0d2-da66b3b8eefe", "name": "company" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "1670824b-e097-4afc-8401-feab7f9af0d4", @@ -7833,7 +7833,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "538e49cd-f04a-4889-9994-35cacc0754b7", "name": "company" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "2f030298-14c7-48a4-b351-2ec185bb1814", @@ -7916,7 +7916,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "727ec83b-93b7-4e6b-be22-6f00637ec3f5", "name": "company" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "1ebadb76-46e6-4c57-b24f-441acecbd2d9", @@ -8033,7 +8033,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "d288fd3a-8fb0-493d-bec3-31a2c4a7d366", "name": "connectedAccount" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "21bbef75-8acf-48bf-80aa-1d26d50aea22", @@ -8221,7 +8221,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "ceaf8f8e-297a-418b-a652-01f3eeb5c562", "name": "connectedAccount" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "b6b75323-8790-4b3e-8798-e0af646bb9aa", @@ -9692,7 +9692,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "bc0e2a25-4e13-4751-a79a-2d264582ef9a", "name": "note" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "7ec36219-a377-4aea-98be-7954590f8a32", @@ -9754,7 +9754,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "87334d50-0c5d-4327-a8c5-3db6bc28c1ea", "name": "note" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "663e9842-8b92-451a-bf73-12a886ff8b05", @@ -9816,7 +9816,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "f8a0a4ad-a6f5-4eb3-985d-a3134e5449ad", "name": "note" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "bb4120f5-5135-4881-97a8-d50e6df2f97e", @@ -10108,7 +10108,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "e48eeafe-43d8-4abc-95c8-6e7a6a56a7c9", "name": "task" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "87c0082f-5411-4202-97cd-fc1d9112fa7a", @@ -10275,7 +10275,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "0913c9cc-c3d4-4fd4-9fc7-b758daa08ba4", "name": "task" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "cc228da1-14c7-4c49-a84d-231ba6166f38", @@ -10379,7 +10379,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "0f37463a-4a08-44b6-87b6-8175ffa6bff0", "name": "task" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "1cc7a6b5-66d2-40dc-aa08-4b1a252e3ae3", @@ -11426,7 +11426,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "34479a8f-e7a4-4069-9f05-08d09113c8dc", "name": "messageChannel" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "40e51c6c-0268-47ca-bab9-4a899391e74b", @@ -11799,7 +11799,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "2a725662-fe1a-44e8-af06-2ae21c9ae0c2", "name": "opportunity" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "2f07395e-a114-465c-a3a2-9c6b990d3dca", @@ -11861,7 +11861,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "987fd4f6-4c5f-48a4-82f3-fd769de80dc4", "name": "opportunity" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "d8ae1b79-b532-412c-92cf-767a32e3cda2", @@ -11965,7 +11965,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "ddc84553-0678-4697-a8c2-06ddbc136cab", "name": "opportunity" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "2105fe76-e9fa-4610-992a-261d0f24722d", @@ -12051,7 +12051,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "807cfd9f-4081-4027-b646-cf66d81aa8c6", "name": "opportunity" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "457627a4-8e4f-4720-80b4-b8c47a49a1d7", @@ -12304,7 +12304,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "b4868b15-ff98-4f36-9f59-1dbf63052bb7", "name": "opportunity" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "c20ecc99-e48a-4311-b850-8fbf1a7b68ea", @@ -12387,7 +12387,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "5b2ec790-e8b8-4bd0-bf1b-db4ebc2b473a", "name": "opportunity" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "c0946e53-4cdd-46b4-b30a-9fce040b9a7a", @@ -12617,7 +12617,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "337d9389-06a9-4cb1-9f2a-76dbb37a7576", "name": "view" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "ae731975-39ee-4387-a80c-de94dff0b760", @@ -12700,7 +12700,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "2c09d04d-007c-4652-9c90-c2cfa4696145", "name": "view" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "fcf27acc-a651-4ac2-9f99-aba306756209", @@ -12804,7 +12804,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "0f9c4eb8-501d-4861-827a-5ef45a01eba9", "name": "view" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "7c42db51-2fcc-44b6-9a80-787b1967e69e", @@ -12984,7 +12984,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "114f853e-2684-4e62-92c9-0213ace3c498", "name": "messageThread" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "c958fe88-7d66-4c1b-87c7-55ab724f42c5", @@ -13067,7 +13067,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "fcbef4a3-f1d9-4714-b7ea-f44816821d6e", "name": "messageThread" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "1d8cbabc-edf5-40c9-8bd5-d1e47a93d246", @@ -13493,7 +13493,7 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "id": "d3039865-07b4-4114-bd78-18aa0be2a93b", "name": "calendarChannel" } - },, + }, "fromRelationMetadata": { "__typename": "relation", "id": "bf0f695a-08cd-4767-9a83-4fd09f617793", diff --git a/packages/twenty-server/src/engine/guards/demo.env.guard.ts b/packages/twenty-server/src/engine/guards/demo.env.guard.ts index a1cade4baf8e..947d38d43791 100644 --- a/packages/twenty-server/src/engine/guards/demo.env.guard.ts +++ b/packages/twenty-server/src/engine/guards/demo.env.guard.ts @@ -1,6 +1,7 @@ import { CanActivate, ExecutionContext, + Injectable, UnauthorizedException, } from '@nestjs/common'; import { GqlExecutionContext } from '@nestjs/graphql'; @@ -9,6 +10,7 @@ import { Observable } from 'rxjs'; import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; +@Injectable() export class DemoEnvGuard implements CanActivate { constructor(private readonly environmentService: EnvironmentService) {} From 294492d15d9095009d8dbd755f63ad9cd2334e19 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Fri, 13 Sep 2024 18:50:56 +0200 Subject: [PATCH 14/16] Fix --- .../utils/getRelationDefinition.ts | 37 ------------------- .../triggerUpdateRelationsOptimisticEffect.ts | 36 ++++++++++-------- .../utils/sanitizeRecordInput.ts | 5 ++- ...raphql-query-find-many-resolver.service.ts | 4 +- ...graphql-query-find-one-resolver.service.ts | 4 +- ...s => get-object-metadata-or-throw.util.ts} | 2 +- .../ai-sql-query/ai-sql-query.resolver.ts | 2 +- .../engine/core-modules/auth/auth.resolver.ts | 2 +- .../core-modules/billing/billing.resolver.ts | 2 +- .../messaging/timeline-messaging.resolver.ts | 2 +- .../onboarding/onboarding.resolver.ts | 2 +- .../workflow/workflow-trigger.resolver.ts | 2 +- .../workspace/workspace.resolver.ts | 2 +- ...-auth.guard copy.ts => user-auth.guard.ts} | 0 14 files changed, 36 insertions(+), 66 deletions(-) delete mode 100644 packages/twenty-front/src/modules/apollo/optimistic-effect/utils/getRelationDefinition.ts rename packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/{get-object-metadata.util.ts => get-object-metadata-or-throw.util.ts} (93%) rename packages/twenty-server/src/engine/guards/{user-auth.guard copy.ts => user-auth.guard.ts} (100%) diff --git a/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/getRelationDefinition.ts b/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/getRelationDefinition.ts deleted file mode 100644 index a65a522ef10b..000000000000 --- a/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/getRelationDefinition.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem'; -import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; -import { FieldMetadataType } from '~/generated-metadata/graphql'; - -export const getRelationDefinition = ({ - objectMetadataItems, - fieldMetadataItemOnSourceRecord, -}: { - objectMetadataItems: ObjectMetadataItem[]; - fieldMetadataItemOnSourceRecord: FieldMetadataItem; -}) => { - if (fieldMetadataItemOnSourceRecord.type !== FieldMetadataType.Relation) { - return null; - } - - const relationDefinition = fieldMetadataItemOnSourceRecord.relationDefinition; - - if (!relationDefinition) return null; - - const targetObjectMetadataItem = objectMetadataItems.find( - (item) => item.id === relationDefinition.targetObjectMetadata.id, - ); - - if (!targetObjectMetadataItem) return null; - - const fieldMetadataItemOnTargetRecord = targetObjectMetadataItem.fields.find( - (field) => field.id === relationDefinition.sourceFieldMetadata.id, - ); - - if (!fieldMetadataItemOnTargetRecord) return null; - - return { - fieldMetadataItemOnTargetRecord, - targetObjectMetadataItem, - relationType: relationDefinition.direction, - }; -}; diff --git a/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRelationsOptimisticEffect.ts b/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRelationsOptimisticEffect.ts index 16d103532b77..535f33db4f8a 100644 --- a/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRelationsOptimisticEffect.ts +++ b/packages/twenty-front/src/modules/apollo/optimistic-effect/utils/triggerUpdateRelationsOptimisticEffect.ts @@ -1,6 +1,5 @@ import { ApolloCache } from '@apollo/client'; -import { getRelationDefinition } from '@/apollo/optimistic-effect/utils/getRelationDefinition'; import { triggerAttachRelationOptimisticEffect } from '@/apollo/optimistic-effect/utils/triggerAttachRelationOptimisticEffect'; import { triggerDeleteRecordsOptimisticEffect } from '@/apollo/optimistic-effect/utils/triggerDeleteRecordsOptimisticEffect'; import { triggerDetachRelationOptimisticEffect } from '@/apollo/optimistic-effect/utils/triggerDetachRelationOptimisticEffect'; @@ -45,16 +44,23 @@ export const triggerUpdateRelationsOptimisticEffect = ({ return; } - const relationDefinition = getRelationDefinition({ - fieldMetadataItemOnSourceRecord, - objectMetadataItems, - }); + const relationDefinition = + fieldMetadataItemOnSourceRecord.relationDefinition; + if (!relationDefinition) { return; } - const { targetObjectMetadataItem, fieldMetadataItemOnTargetRecord } = - relationDefinition; + const { targetObjectMetadata, targetFieldMetadata } = relationDefinition; + + const fullTargetObjectMetadataItem = objectMetadataItems.find( + ({ nameSingular }) => + nameSingular === targetObjectMetadata.nameSingular, + ); + + if (!fullTargetObjectMetadataItem) { + return; + } const currentFieldValueOnSourceRecord: | RecordGqlConnection @@ -80,7 +86,7 @@ export const triggerUpdateRelationsOptimisticEffect = ({ // it's an object record connection (we can still check it though as a safeguard) const currentFieldValueOnSourceRecordIsARecordConnection = isObjectRecordConnection( - targetObjectMetadataItem.nameSingular, + targetObjectMetadata.nameSingular, currentFieldValueOnSourceRecord, ); @@ -93,7 +99,7 @@ export const triggerUpdateRelationsOptimisticEffect = ({ const updatedFieldValueOnSourceRecordIsARecordConnection = isObjectRecordConnection( - targetObjectMetadataItem.nameSingular, + targetObjectMetadata.nameSingular, updatedFieldValueOnSourceRecord, ); @@ -112,13 +118,13 @@ export const triggerUpdateRelationsOptimisticEffect = ({ // Instead of hardcoding it here const shouldCascadeDeleteTargetRecords = CORE_OBJECT_NAMES_TO_DELETE_ON_TRIGGER_RELATION_DETACH.includes( - targetObjectMetadataItem.nameSingular as CoreObjectNameSingular, + targetObjectMetadata.nameSingular as CoreObjectNameSingular, ); if (shouldCascadeDeleteTargetRecords) { triggerDeleteRecordsOptimisticEffect({ cache, - objectMetadataItem: targetObjectMetadataItem, + objectMetadataItem: fullTargetObjectMetadataItem, recordsToDelete: targetRecordsToDetachFrom, objectMetadataItems, }); @@ -128,8 +134,8 @@ export const triggerUpdateRelationsOptimisticEffect = ({ cache, sourceObjectNameSingular: sourceObjectMetadataItem.nameSingular, sourceRecordId: currentSourceRecord.id, - fieldNameOnTargetRecord: fieldMetadataItemOnTargetRecord.name, - targetObjectNameSingular: targetObjectMetadataItem.nameSingular, + fieldNameOnTargetRecord: targetFieldMetadata.name, + targetObjectNameSingular: targetObjectMetadata.nameSingular, targetRecordId: targetRecordToDetachFrom.id, }); }); @@ -145,8 +151,8 @@ export const triggerUpdateRelationsOptimisticEffect = ({ cache, sourceObjectNameSingular: sourceObjectMetadataItem.nameSingular, sourceRecordId: updatedSourceRecord.id, - fieldNameOnTargetRecord: fieldMetadataItemOnTargetRecord.name, - targetObjectNameSingular: targetObjectMetadataItem.nameSingular, + fieldNameOnTargetRecord: targetFieldMetadata.name, + targetObjectNameSingular: targetObjectMetadata.nameSingular, targetRecordId: targetRecordToAttachTo.id, }), ); diff --git a/packages/twenty-front/src/modules/object-record/utils/sanitizeRecordInput.ts b/packages/twenty-front/src/modules/object-record/utils/sanitizeRecordInput.ts index bbad8bd461cd..54d457e5f46e 100644 --- a/packages/twenty-front/src/modules/object-record/utils/sanitizeRecordInput.ts +++ b/packages/twenty-front/src/modules/object-record/utils/sanitizeRecordInput.ts @@ -1,8 +1,8 @@ import { isString } from '@sniptt/guards'; import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; -import { isFieldRelationToOneValue } from '@/object-record/record-field/types/guards/isFieldRelationToOneValue'; import { ObjectRecord } from '@/object-record/types/ObjectRecord'; +import { RelationDefinitionType } from '~/generated-metadata/graphql'; import { FieldMetadataType } from '~/generated/graphql'; import { isDefined } from '~/utils/isDefined'; import { getUrlHostName } from '~/utils/url/getUrlHostName'; @@ -29,7 +29,8 @@ export const sanitizeRecordInput = ({ if ( fieldMetadataItem.type === FieldMetadataType.Relation && - isFieldRelationToOneValue(fieldValue) + fieldMetadataItem.relationDefinition?.direction === + RelationDefinitionType.ManyToOne ) { const relationIdFieldName = `${fieldMetadataItem.name}Id`; const relationIdFieldMetadataItem = objectMetadataItem.fields.find( diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-many-resolver.service.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-many-resolver.service.ts index 326623857aed..9780a6cb38a2 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-many-resolver.service.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-many-resolver.service.ts @@ -20,7 +20,7 @@ import { GraphqlQueryParser } from 'src/engine/api/graphql/graphql-query-runner/ import { ObjectRecordsToGraphqlConnectionMapper } from 'src/engine/api/graphql/graphql-query-runner/orm-mappers/object-records-to-graphql-connection.mapper'; import { applyRangeFilter } from 'src/engine/api/graphql/graphql-query-runner/utils/apply-range-filter.util'; import { decodeCursor } from 'src/engine/api/graphql/graphql-query-runner/utils/cursors.util'; -import { getObjectMetadata } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; +import { getObjectMetadataOrThrow } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata-or-throw.util'; import { generateObjectMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { TwentyORMGlobalManager } from 'src/engine/twenty-orm/twenty-orm-global.manager'; @@ -52,7 +52,7 @@ export class GraphqlQueryFindManyResolverService { const objectMetadataMap = generateObjectMetadataMap( objectMetadataCollection, ); - const objectMetadata = getObjectMetadata( + const objectMetadata = getObjectMetadataOrThrow( objectMetadataMap, objectMetadataItem.nameSingular, ); diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-one-resolver.service.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-one-resolver.service.ts index ec57537efac9..f9f838abbf63 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-one-resolver.service.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-one-resolver.service.ts @@ -13,7 +13,7 @@ import { } from 'src/engine/api/graphql/graphql-query-runner/errors/graphql-query-runner.exception'; import { GraphqlQueryParser } from 'src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query.parser'; import { ObjectRecordsToGraphqlConnectionMapper } from 'src/engine/api/graphql/graphql-query-runner/orm-mappers/object-records-to-graphql-connection.mapper'; -import { getObjectMetadata } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util'; +import { getObjectMetadataOrThrow } from 'src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata-or-throw.util'; import { generateObjectMetadataMap } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; import { TwentyORMGlobalManager } from 'src/engine/twenty-orm/twenty-orm-global.manager'; @@ -42,7 +42,7 @@ export class GraphqlQueryFindOneResolverService { objectMetadataCollection, ); - const objectMetadata = getObjectMetadata( + const objectMetadata = getObjectMetadataOrThrow( objectMetadataMap, objectMetadataItem.nameSingular, ); diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util.ts b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata-or-throw.util.ts similarity index 93% rename from packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util.ts rename to packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata-or-throw.util.ts index e5f251e93477..00ef040204e0 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata.util.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-query-runner/utils/get-object-metadata-or-throw.util.ts @@ -4,7 +4,7 @@ import { } from 'src/engine/api/graphql/graphql-query-runner/errors/graphql-query-runner.exception'; import { ObjectMetadataMapItem } from 'src/engine/metadata-modules/utils/generate-object-metadata-map.util'; -export const getObjectMetadata = ( +export const getObjectMetadataOrThrow = ( objectMetadataMap: Record, objectName: string, ): ObjectMetadataMapItem => { diff --git a/packages/twenty-server/src/engine/core-modules/ai-sql-query/ai-sql-query.resolver.ts b/packages/twenty-server/src/engine/core-modules/ai-sql-query/ai-sql-query.resolver.ts index 813c4f0eca3e..c739c7e3ba06 100644 --- a/packages/twenty-server/src/engine/core-modules/ai-sql-query/ai-sql-query.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/ai-sql-query/ai-sql-query.resolver.ts @@ -12,7 +12,7 @@ import { User } from 'src/engine/core-modules/user/user.entity'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { UserAuthGuard } from 'src/engine/guards/user-auth.guard copy'; +import { UserAuthGuard } from 'src/engine/guards/user-auth.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @ArgsType() diff --git a/packages/twenty-server/src/engine/core-modules/auth/auth.resolver.ts b/packages/twenty-server/src/engine/core-modules/auth/auth.resolver.ts index ac3193182ed8..0488701360b3 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/auth.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/auth.resolver.ts @@ -22,7 +22,7 @@ import { User } from 'src/engine/core-modules/user/user.entity'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { UserAuthGuard } from 'src/engine/guards/user-auth.guard copy'; +import { UserAuthGuard } from 'src/engine/guards/user-auth.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { ChallengeInput } from './dto/challenge.input'; diff --git a/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts b/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts index d466b8620d72..949615dd6679 100644 --- a/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts @@ -16,7 +16,7 @@ import { User } from 'src/engine/core-modules/user/user.entity'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { UserAuthGuard } from 'src/engine/guards/user-auth.guard copy'; +import { UserAuthGuard } from 'src/engine/guards/user-auth.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @Resolver() diff --git a/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts b/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts index c8e9eac59715..4f8c6b8a430e 100644 --- a/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts @@ -10,7 +10,7 @@ import { GetMessagesService } from 'src/engine/core-modules/messaging/services/g import { UserService } from 'src/engine/core-modules/user/services/user.service'; import { User } from 'src/engine/core-modules/user/user.entity'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; -import { UserAuthGuard } from 'src/engine/guards/user-auth.guard copy'; +import { UserAuthGuard } from 'src/engine/guards/user-auth.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @ArgsType() diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts index 24710e7f9409..d61c41472499 100644 --- a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts @@ -7,7 +7,7 @@ import { User } from 'src/engine/core-modules/user/user.entity'; import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; -import { UserAuthGuard } from 'src/engine/guards/user-auth.guard copy'; +import { UserAuthGuard } from 'src/engine/guards/user-auth.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @UseGuards(WorkspaceAuthGuard, UserAuthGuard) diff --git a/packages/twenty-server/src/engine/core-modules/workflow/workflow-trigger.resolver.ts b/packages/twenty-server/src/engine/core-modules/workflow/workflow-trigger.resolver.ts index e06118947127..70cedd3f54a9 100644 --- a/packages/twenty-server/src/engine/core-modules/workflow/workflow-trigger.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/workflow/workflow-trigger.resolver.ts @@ -7,7 +7,7 @@ import { WorkflowRunDTO } from 'src/engine/core-modules/workflow/dtos/workflow-r import { WorkflowTriggerGraphqlApiExceptionFilter } from 'src/engine/core-modules/workflow/filters/workflow-trigger-graphql-api-exception.filter'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspaceMemberId } from 'src/engine/decorators/auth/auth-workspace-member-id.decorator'; -import { UserAuthGuard } from 'src/engine/guards/user-auth.guard copy'; +import { UserAuthGuard } from 'src/engine/guards/user-auth.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { WorkflowTriggerWorkspaceService } from 'src/modules/workflow/workflow-trigger/workspace-services/workflow-trigger.workspace-service'; diff --git a/packages/twenty-server/src/engine/core-modules/workspace/workspace.resolver.ts b/packages/twenty-server/src/engine/core-modules/workspace/workspace.resolver.ts index 9f7cfc3dcf04..d5ab03b23a9b 100644 --- a/packages/twenty-server/src/engine/core-modules/workspace/workspace.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/workspace/workspace.resolver.ts @@ -25,7 +25,7 @@ import { UpdateWorkspaceInput } from 'src/engine/core-modules/workspace/dtos/upd import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; import { DemoEnvGuard } from 'src/engine/guards/demo.env.guard'; -import { UserAuthGuard } from 'src/engine/guards/user-auth.guard copy'; +import { UserAuthGuard } from 'src/engine/guards/user-auth.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { assert } from 'src/utils/assert'; import { streamToBuffer } from 'src/utils/stream-to-buffer'; diff --git a/packages/twenty-server/src/engine/guards/user-auth.guard copy.ts b/packages/twenty-server/src/engine/guards/user-auth.guard.ts similarity index 100% rename from packages/twenty-server/src/engine/guards/user-auth.guard copy.ts rename to packages/twenty-server/src/engine/guards/user-auth.guard.ts From 9e735bf339406b0163a79dc458113ec699d41057 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Fri, 13 Sep 2024 18:57:54 +0200 Subject: [PATCH 15/16] Fix --- .../src/modules/favorites/utils/sort-favorites.util.ts | 1 - .../hooks/useOpenObjectRecordsSpreasheetImportDialog.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/twenty-front/src/modules/favorites/utils/sort-favorites.util.ts b/packages/twenty-front/src/modules/favorites/utils/sort-favorites.util.ts index cac8c448dd35..aba5b0bfd6f9 100644 --- a/packages/twenty-front/src/modules/favorites/utils/sort-favorites.util.ts +++ b/packages/twenty-front/src/modules/favorites/utils/sort-favorites.util.ts @@ -29,7 +29,6 @@ export const sortFavorites = ( ); return { - ...favorite, id: favorite.id, recordId: objectRecordIdentifier.id, position: favorite.position, diff --git a/packages/twenty-front/src/modules/object-record/spreadsheet-import/hooks/useOpenObjectRecordsSpreasheetImportDialog.ts b/packages/twenty-front/src/modules/object-record/spreadsheet-import/hooks/useOpenObjectRecordsSpreasheetImportDialog.ts index 5a0ee222a133..e5be43858442 100644 --- a/packages/twenty-front/src/modules/object-record/spreadsheet-import/hooks/useOpenObjectRecordsSpreasheetImportDialog.ts +++ b/packages/twenty-front/src/modules/object-record/spreadsheet-import/hooks/useOpenObjectRecordsSpreasheetImportDialog.ts @@ -41,7 +41,7 @@ export const useOpenObjectRecordsSpreasheetImportDialog = ( fieldMetadataItem.name !== 'createdAt' && (fieldMetadataItem.type !== FieldMetadataType.Relation || fieldMetadataItem.relationDefinition?.direction === - RelationDefinitionType.OneToMany), + RelationDefinitionType.ManyToOne), ) .sort((fieldMetadataItemA, fieldMetadataItemB) => fieldMetadataItemA.name.localeCompare(fieldMetadataItemB.name), From fb0f214d46c008282e3c3a0b969d078fd502ddd0 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Fri, 13 Sep 2024 19:10:45 +0200 Subject: [PATCH 16/16] Fix --- .../__tests__/useExportTableData.test.ts | 6 +- .../utils/sanitizeRecordInput.ts | 8 + .../standard-metadata-query-result.ts | 870 ------------------ .../resolvers/file-upload.resolver.spec.ts | 5 + 4 files changed, 18 insertions(+), 871 deletions(-) diff --git a/packages/twenty-front/src/modules/object-record/record-index/options/hooks/__tests__/useExportTableData.test.ts b/packages/twenty-front/src/modules/object-record/record-index/options/hooks/__tests__/useExportTableData.test.ts index b7dfc586016f..0494fd32f023 100644 --- a/packages/twenty-front/src/modules/object-record/record-index/options/hooks/__tests__/useExportTableData.test.ts +++ b/packages/twenty-front/src/modules/object-record/record-index/options/hooks/__tests__/useExportTableData.test.ts @@ -1,6 +1,7 @@ import { FieldMetadata } from '@/object-record/record-field/types/FieldMetadata'; import { ColumnDefinition } from '@/object-record/record-table/types/ColumnDefinition'; +import { RelationDefinitionType } from '~/generated-metadata/graphql'; import { csvDownloader, displayedExportProgress, @@ -35,7 +36,10 @@ describe('generateCsv', () => { { label: 'Nested', metadata: { fieldName: 'nested' } }, { label: 'Relation', - metadata: { fieldName: 'relation', relationType: 'TO_ONE_OBJECT' }, + metadata: { + fieldName: 'relation', + relationType: RelationDefinitionType.ManyToOne, + }, }, ] as ColumnDefinition[]; const rows = [ diff --git a/packages/twenty-front/src/modules/object-record/utils/sanitizeRecordInput.ts b/packages/twenty-front/src/modules/object-record/utils/sanitizeRecordInput.ts index 54d457e5f46e..cc3fb4ba46fa 100644 --- a/packages/twenty-front/src/modules/object-record/utils/sanitizeRecordInput.ts +++ b/packages/twenty-front/src/modules/object-record/utils/sanitizeRecordInput.ts @@ -42,6 +42,14 @@ export const sanitizeRecordInput = ({ : undefined; } + if ( + fieldMetadataItem.type === FieldMetadataType.Relation && + fieldMetadataItem.relationDefinition?.direction === + RelationDefinitionType.OneToMany + ) { + return undefined; + } + return [fieldName, fieldValue]; }) .filter(isDefined), diff --git a/packages/twenty-front/src/testing/mock-data/generated/standard-metadata-query-result.ts b/packages/twenty-front/src/testing/mock-data/generated/standard-metadata-query-result.ts index 560ee65a7a49..664750f85e25 100644 --- a/packages/twenty-front/src/testing/mock-data/generated/standard-metadata-query-result.ts +++ b/packages/twenty-front/src/testing/mock-data/generated/standard-metadata-query-result.ts @@ -890,21 +890,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "message" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "2180d888-98dc-428e-a157-c30ce7bf8ce4", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "660b4257-010e-4039-897a-e274f2559ed5", - "toObjectMetadata": { - "__typename": "object", - "id": "0c0a3db9-f3ba-485a-8dff-488c477f3fa6", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "messageParticipant", - "namePlural": "messageParticipants", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -994,21 +979,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "message" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "642b4d8c-f2f8-4590-abce-4b112d8689ba", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "785c0609-42b8-4b0e-b7c2-4d54b6ed651f", - "toObjectMetadata": { - "__typename": "object", - "id": "0985d46f-722d-468f-9fa6-efa219405aa7", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "messageChannelMessageAssociation", - "namePlural": "messageChannelMessageAssociations", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -1585,21 +1555,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "calendarEvent" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "0f9d244b-e9c6-44af-88f4-9ce798d50bf8", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "18cea1c1-f521-4c41-b694-729756931795", - "toObjectMetadata": { - "__typename": "object", - "id": "4fed9657-e68b-4856-8e6d-a1c860d16242", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "calendarChannelEventAssociation", - "namePlural": "calendarChannelEventAssociations", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -1756,21 +1711,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "calendarEvent" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "e02ea7b1-1d5a-481b-ab71-3c94ab3f9bf0", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "b04775e2-53a3-4f62-a2ab-858f2a456fa7", - "toObjectMetadata": { - "__typename": "object", - "id": "53743ffb-932c-43ec-b624-f5119ec46808", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "calendarEventParticipant", - "namePlural": "calendarEventParticipants", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -2793,21 +2733,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "workspaceMember" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "d5ffcbba-0ab9-4f4d-a5e6-15f1e668b04c", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "fbc9d8eb-c04f-4c86-81ff-d4ca9957d0d4", - "toObjectMetadata": { - "__typename": "object", - "id": "53743ffb-932c-43ec-b624-f5119ec46808", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "calendarEventParticipant", - "namePlural": "calendarEventParticipants", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -2876,21 +2801,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "workspaceMember" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "5b2015dd-3fac-4118-adf5-3cceede873eb", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "9fc19fe9-2563-41ac-8c92-2062ff3a0c0c", - "toObjectMetadata": { - "__typename": "object", - "id": "e095e196-08d4-493c-8a02-01c4a3decb5c", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "timelineActivity", - "namePlural": "timelineActivities", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -2938,21 +2848,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "accountOwner" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "97b97e1e-aed0-4d59-997c-13ad9007e037", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "a56f365a-22c8-475d-816b-709f3a19c5fd", - "toObjectMetadata": { - "__typename": "object", - "id": "701aecf9-eb1c-4d84-9d94-b954b231b64b", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "company", - "namePlural": "companies", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -3087,21 +2982,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "author" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "fccbbaf8-c653-4e09-8d3e-5652b37d8209", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "b31f4c53-a5ee-4939-9804-6964144540ca", - "toObjectMetadata": { - "__typename": "object", - "id": "96bf92fd-6b8f-40b4-afd6-f90fedc40a1a", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "activity", - "namePlural": "activities", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -3149,21 +3029,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "workspaceMember" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "19b7520c-bc6e-490c-bfab-a3b020315cc4", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "96acdd2a-b7d1-452b-9e58-5c4265691444", - "toObjectMetadata": { - "__typename": "object", - "id": "60637cd3-24f6-4d9a-9432-a590accbefb9", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "blocklist", - "namePlural": "blocklists", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -3254,21 +3119,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "workspaceMember" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "7d3faf56-e4bb-45ec-9b75-612ca6e9ae5a", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "bc788a8f-8eb2-47bf-a02c-42f7de197ca8", - "toObjectMetadata": { - "__typename": "object", - "id": "0c0a3db9-f3ba-485a-8dff-488c477f3fa6", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "messageParticipant", - "namePlural": "messageParticipants", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -3387,21 +3237,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "assignee" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "8cb075f2-e51c-4684-80f6-cf6af471e82a", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "5bcc7e50-73ce-4146-b000-5a336f0e9c40", - "toObjectMetadata": { - "__typename": "object", - "id": "4601f72c-580d-4e64-8004-4864f5e60da7", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "task", - "namePlural": "tasks", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -3449,21 +3284,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "assignee" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "d5315a70-980f-4c45-9a4f-74779a00fdd3", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "4ec37c9c-be4c-4f52-a441-03a1dfd951db", - "toObjectMetadata": { - "__typename": "object", - "id": "96bf92fd-6b8f-40b4-afd6-f90fedc40a1a", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "activity", - "namePlural": "activities", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -3532,21 +3352,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "accountOwner" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "1ecacc04-e834-421d-bf1b-c765e55a4318", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "95bd59b8-8083-4c76-b770-ec40a744138c", - "toObjectMetadata": { - "__typename": "object", - "id": "66cd3a29-e2d8-4efa-8852-d17d7b538efa", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "connectedAccount", - "namePlural": "connectedAccounts", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -3594,21 +3399,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "workspaceMember" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "a72edc8d-e5e3-4eae-9fd6-4cb0792b18aa", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "0aaf9f83-9b43-4f15-a187-9c11761b367a", - "toObjectMetadata": { - "__typename": "object", - "id": "4566e731-1922-4610-8e85-0beab7fc57be", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "favorite", - "namePlural": "favorites", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -3656,21 +3446,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "author" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "017b3808-bc03-4817-8a67-b20770a6a126", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "fd9fcac5-c853-4fe7-ab1e-18081e4d4517", - "toObjectMetadata": { - "__typename": "object", - "id": "c6d8d5a8-08ab-4828-8b19-82a9a835685a", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "comment", - "namePlural": "comments", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -3739,21 +3514,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "workspaceMember" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "d74023b4-87a8-44d0-84d8-9b2a85018e4b", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "0fedd2c5-1c9c-4e0a-8687-a8ce4dd88378", - "toObjectMetadata": { - "__typename": "object", - "id": "ccb2a7ce-f998-4363-b951-cdf7409b64dc", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "auditLog", - "namePlural": "auditLogs", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -3822,21 +3582,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "author" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "5b9f08b0-8960-40c4-b6bb-9d3552a24f8d", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "85046974-8ab2-456d-a732-64da14715643", - "toObjectMetadata": { - "__typename": "object", - "id": "963747ea-45e2-4deb-b36d-73b014e17c42", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -4097,21 +3842,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "person" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "5bb99199-6a3c-4947-b16b-6a90c6097eac", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "362195e4-4dfb-49e1-b25b-fe3ffe7b7f14", - "toObjectMetadata": { - "__typename": "object", - "id": "0c0a3db9-f3ba-485a-8dff-488c477f3fa6", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "messageParticipant", - "namePlural": "messageParticipants", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -4183,21 +3913,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "person" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "680351ba-8759-405d-8fda-90799bf75741", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "0669197c-bc4e-4a44-9cd9-db449bfa380e", - "toObjectMetadata": { - "__typename": "object", - "id": "e095e196-08d4-493c-8a02-01c4a3decb5c", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "timelineActivity", - "namePlural": "timelineActivities", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -4266,21 +3981,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "pointOfContact" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "58a081ed-e5e7-44f8-bae6-99be66b6ac2f", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "18ea34ae-f9bc-4240-b65f-46f0d688135f", - "toObjectMetadata": { - "__typename": "object", - "id": "2dbf5d59-f03c-4578-8ff3-750f4bcdf8d0", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -4349,21 +4049,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "person" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "74f62324-bc36-4210-bb88-e0e6e0136c9f", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "4a9e3e27-70b0-4ed7-9edf-9126c1675b22", - "toObjectMetadata": { - "__typename": "object", - "id": "4566e731-1922-4610-8e85-0beab7fc57be", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "favorite", - "namePlural": "favorites", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -4411,21 +4096,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "person" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "450a3266-7706-4593-a458-5897c5f60fc5", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "f0748d0d-e6b4-44ea-b957-0c0d81af4627", - "toObjectMetadata": { - "__typename": "object", - "id": "948a52f8-eba6-4bb2-a3a7-b1aa61c0daf7", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "activityTarget", - "namePlural": "activityTargets", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -4562,21 +4232,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "person" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "178c5cfe-cc05-49ec-bedb-eff402da4e8f", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "a2ecf99f-9725-4b20-90df-28ad410f173b", - "toObjectMetadata": { - "__typename": "object", - "id": "53743ffb-932c-43ec-b624-f5119ec46808", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "calendarEventParticipant", - "namePlural": "calendarEventParticipants", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -4645,21 +4300,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "person" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "700c5e52-3e7b-4471-9826-82270c03c37e", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "8ac4df39-f1a0-4221-a605-bd4c229fbc12", - "toObjectMetadata": { - "__typename": "object", - "id": "dcb774a3-71e8-44cc-bf53-7f195e0bfdb6", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "noteTarget", - "namePlural": "noteTargets", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -4707,21 +4347,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "person" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "0c8f43c1-d325-4a58-99a7-926b1db4e8fc", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "b192eb71-bcfb-46ab-ae88-83a73700ee34", - "toObjectMetadata": { - "__typename": "object", - "id": "963747ea-45e2-4deb-b36d-73b014e17c42", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -4769,21 +4394,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "person" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "e95da71a-7162-4282-8ff7-ea65fea36fe8", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "db61f1e6-17d5-4f1d-8c18-8cb5f1108831", - "toObjectMetadata": { - "__typename": "object", - "id": "5e92b318-bc10-4fe3-b997-de41b7e45c36", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "taskTarget", - "namePlural": "taskTargets", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -5088,21 +4698,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "activity" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "69539f96-cede-4f76-bd64-84b1182c3427", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "a6299818-986d-4358-9a7b-04e6f5e0fd8b", - "toObjectMetadata": { - "__typename": "object", - "id": "963747ea-45e2-4deb-b36d-73b014e17c42", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -5171,21 +4766,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "activity" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "938c0b4f-e398-4db6-8893-ad6b609556a9", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "8bcf99e6-2368-4caa-9c5e-e70c46bc6ab7", - "toObjectMetadata": { - "__typename": "object", - "id": "948a52f8-eba6-4bb2-a3a7-b1aa61c0daf7", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "activityTarget", - "namePlural": "activityTargets", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -5254,21 +4834,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "activity" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "eaf90876-fac7-448a-906c-7c2b6afcd346", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "ace0311d-6b58-4c34-9e78-3c18ff147408", - "toObjectMetadata": { - "__typename": "object", - "id": "c6d8d5a8-08ab-4828-8b19-82a9a835685a", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "comment", - "namePlural": "comments", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -7204,21 +6769,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "company" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "ac6788b1-952c-4376-bafd-66ea5a031398", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "d89d8a7f-6a14-4fc8-96ca-2966632a1ca4", - "toObjectMetadata": { - "__typename": "object", - "id": "5e92b318-bc10-4fe3-b997-de41b7e45c36", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "taskTarget", - "namePlural": "taskTargets", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -7266,21 +6816,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "company" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "a0f5427c-2c97-4457-b87f-a4d145e06952", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "6213d5af-e8cd-4e5d-9a60-bab631884ae5", - "toObjectMetadata": { - "__typename": "object", - "id": "948a52f8-eba6-4bb2-a3a7-b1aa61c0daf7", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "activityTarget", - "namePlural": "activityTargets", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -7441,21 +6976,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "company" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "632aaba8-f213-4353-95a5-c090168c3ad7", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "4fa60a42-bd0d-462c-b05d-d85f96b00458", - "toObjectMetadata": { - "__typename": "object", - "id": "4566e731-1922-4610-8e85-0beab7fc57be", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "favorite", - "namePlural": "favorites", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -7503,21 +7023,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "company" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "1e93ed03-91a5-4ad4-bca7-c6a637551289", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "0224c08b-2c2e-474f-8360-dafad378cf62", - "toObjectMetadata": { - "__typename": "object", - "id": "e095e196-08d4-493c-8a02-01c4a3decb5c", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "timelineActivity", - "namePlural": "timelineActivities", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -7589,21 +7094,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "company" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "2be99c6b-02c8-4ca0-b155-dcf7539097b5", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "36f7236a-bfd2-404c-adb6-66b294ca5435", - "toObjectMetadata": { - "__typename": "object", - "id": "963747ea-45e2-4deb-b36d-73b014e17c42", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -7727,21 +7217,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "company" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "1670824b-e097-4afc-8401-feab7f9af0d4", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "5a0243d0-051b-4f30-b0d2-da66b3b8eefe", - "toObjectMetadata": { - "__typename": "object", - "id": "dcb774a3-71e8-44cc-bf53-7f195e0bfdb6", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "noteTarget", - "namePlural": "noteTargets", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -7834,21 +7309,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "company" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "2f030298-14c7-48a4-b351-2ec185bb1814", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "538e49cd-f04a-4889-9994-35cacc0754b7", - "toObjectMetadata": { - "__typename": "object", - "id": "aeffaa4e-cae1-4dd8-b76e-5658eb73d0a9", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "person", - "namePlural": "people", - "isSystem": false, - "isRemote": false - } - } } }, { @@ -7917,21 +7377,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "company" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "1ebadb76-46e6-4c57-b24f-441acecbd2d9", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "727ec83b-93b7-4e6b-be22-6f00637ec3f5", - "toObjectMetadata": { - "__typename": "object", - "id": "2dbf5d59-f03c-4578-8ff3-750f4bcdf8d0", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "opportunity", - "namePlural": "opportunities", - "isSystem": false, - "isRemote": false - } - } } } ] @@ -8034,21 +7479,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "connectedAccount" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "21bbef75-8acf-48bf-80aa-1d26d50aea22", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "d288fd3a-8fb0-493d-bec3-31a2c4a7d366", - "toObjectMetadata": { - "__typename": "object", - "id": "311ea123-5b30-4637-ae39-3e639e780c83", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "messageChannel", - "namePlural": "messageChannels", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -8222,21 +7652,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "connectedAccount" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "b6b75323-8790-4b3e-8798-e0af646bb9aa", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "ceaf8f8e-297a-418b-a652-01f3eeb5c562", - "toObjectMetadata": { - "__typename": "object", - "id": "0e285964-d858-48bc-98ab-b8c6b1bd5d0b", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "calendarChannel", - "namePlural": "calendarChannels", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -9693,21 +9108,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "note" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "7ec36219-a377-4aea-98be-7954590f8a32", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "bc0e2a25-4e13-4751-a79a-2d264582ef9a", - "toObjectMetadata": { - "__typename": "object", - "id": "e095e196-08d4-493c-8a02-01c4a3decb5c", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "timelineActivity", - "namePlural": "timelineActivities", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -9755,21 +9155,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "note" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "663e9842-8b92-451a-bf73-12a886ff8b05", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "87334d50-0c5d-4327-a8c5-3db6bc28c1ea", - "toObjectMetadata": { - "__typename": "object", - "id": "dcb774a3-71e8-44cc-bf53-7f195e0bfdb6", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "noteTarget", - "namePlural": "noteTargets", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -9817,21 +9202,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "note" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "bb4120f5-5135-4881-97a8-d50e6df2f97e", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "f8a0a4ad-a6f5-4eb3-985d-a3134e5449ad", - "toObjectMetadata": { - "__typename": "object", - "id": "963747ea-45e2-4deb-b36d-73b014e17c42", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -10109,21 +9479,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "task" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "87c0082f-5411-4202-97cd-fc1d9112fa7a", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "e48eeafe-43d8-4abc-95c8-6e7a6a56a7c9", - "toObjectMetadata": { - "__typename": "object", - "id": "e095e196-08d4-493c-8a02-01c4a3decb5c", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "timelineActivity", - "namePlural": "timelineActivities", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -10276,21 +9631,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "task" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "cc228da1-14c7-4c49-a84d-231ba6166f38", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "0913c9cc-c3d4-4fd4-9fc7-b758daa08ba4", - "toObjectMetadata": { - "__typename": "object", - "id": "963747ea-45e2-4deb-b36d-73b014e17c42", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -10380,21 +9720,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "task" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "1cc7a6b5-66d2-40dc-aa08-4b1a252e3ae3", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "0f37463a-4a08-44b6-87b6-8175ffa6bff0", - "toObjectMetadata": { - "__typename": "object", - "id": "5e92b318-bc10-4fe3-b997-de41b7e45c36", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "taskTarget", - "namePlural": "taskTargets", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -11427,21 +10752,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "messageChannel" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "40e51c6c-0268-47ca-bab9-4a899391e74b", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "34479a8f-e7a4-4069-9f05-08d09113c8dc", - "toObjectMetadata": { - "__typename": "object", - "id": "0985d46f-722d-468f-9fa6-efa219405aa7", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "messageChannelMessageAssociation", - "namePlural": "messageChannelMessageAssociations", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -11800,21 +11110,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "opportunity" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "2f07395e-a114-465c-a3a2-9c6b990d3dca", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "2a725662-fe1a-44e8-af06-2ae21c9ae0c2", - "toObjectMetadata": { - "__typename": "object", - "id": "4566e731-1922-4610-8e85-0beab7fc57be", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "favorite", - "namePlural": "favorites", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -11862,21 +11157,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "opportunity" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "d8ae1b79-b532-412c-92cf-767a32e3cda2", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "987fd4f6-4c5f-48a4-82f3-fd769de80dc4", - "toObjectMetadata": { - "__typename": "object", - "id": "e095e196-08d4-493c-8a02-01c4a3decb5c", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "timelineActivity", - "namePlural": "timelineActivities", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -11966,21 +11246,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "opportunity" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "2105fe76-e9fa-4610-992a-261d0f24722d", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "ddc84553-0678-4697-a8c2-06ddbc136cab", - "toObjectMetadata": { - "__typename": "object", - "id": "948a52f8-eba6-4bb2-a3a7-b1aa61c0daf7", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "activityTarget", - "namePlural": "activityTargets", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -12052,21 +11317,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "opportunity" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "457627a4-8e4f-4720-80b4-b8c47a49a1d7", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "807cfd9f-4081-4027-b646-cf66d81aa8c6", - "toObjectMetadata": { - "__typename": "object", - "id": "5e92b318-bc10-4fe3-b997-de41b7e45c36", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "taskTarget", - "namePlural": "taskTargets", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -12305,21 +11555,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "opportunity" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "c20ecc99-e48a-4311-b850-8fbf1a7b68ea", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "b4868b15-ff98-4f36-9f59-1dbf63052bb7", - "toObjectMetadata": { - "__typename": "object", - "id": "963747ea-45e2-4deb-b36d-73b014e17c42", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "attachment", - "namePlural": "attachments", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -12388,21 +11623,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "opportunity" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "c0946e53-4cdd-46b4-b30a-9fce040b9a7a", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "5b2ec790-e8b8-4bd0-bf1b-db4ebc2b473a", - "toObjectMetadata": { - "__typename": "object", - "id": "dcb774a3-71e8-44cc-bf53-7f195e0bfdb6", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "noteTarget", - "namePlural": "noteTargets", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -12618,21 +11838,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "view" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "ae731975-39ee-4387-a80c-de94dff0b760", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "337d9389-06a9-4cb1-9f2a-76dbb37a7576", - "toObjectMetadata": { - "__typename": "object", - "id": "c81903be-3be2-49af-82b3-d170cd35ac0f", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "viewField", - "namePlural": "viewFields", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -12701,21 +11906,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "view" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "fcf27acc-a651-4ac2-9f99-aba306756209", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "2c09d04d-007c-4652-9c90-c2cfa4696145", - "toObjectMetadata": { - "__typename": "object", - "id": "718779fd-d87d-4b99-8f6c-3042a6bb03a3", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "viewSort", - "namePlural": "viewSorts", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -12805,21 +11995,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "view" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "7c42db51-2fcc-44b6-9a80-787b1967e69e", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "0f9c4eb8-501d-4861-827a-5ef45a01eba9", - "toObjectMetadata": { - "__typename": "object", - "id": "816a7154-5111-47fa-9d8d-87ca2dafc521", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "viewFilter", - "namePlural": "viewFilters", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -12985,21 +12160,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "messageThread" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "c958fe88-7d66-4c1b-87c7-55ab724f42c5", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "114f853e-2684-4e62-92c9-0213ace3c498", - "toObjectMetadata": { - "__typename": "object", - "id": "dfdcf91e-f4b4-4460-8c89-919ef501fd79", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "message", - "namePlural": "messages", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -13068,21 +12228,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "messageThread" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "1d8cbabc-edf5-40c9-8bd5-d1e47a93d246", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "fcbef4a3-f1d9-4714-b7ea-f44816821d6e", - "toObjectMetadata": { - "__typename": "object", - "id": "0985d46f-722d-468f-9fa6-efa219405aa7", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "messageChannelMessageAssociation", - "namePlural": "messageChannelMessageAssociations", - "isSystem": true, - "isRemote": false - } - } } }, { @@ -13494,21 +12639,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery = "name": "calendarChannel" } }, - "fromRelationMetadata": { - "__typename": "relation", - "id": "bf0f695a-08cd-4767-9a83-4fd09f617793", - "relationType": "ONE_TO_MANY", - "toFieldMetadataId": "d3039865-07b4-4114-bd78-18aa0be2a93b", - "toObjectMetadata": { - "__typename": "object", - "id": "4fed9657-e68b-4856-8e6d-a1c860d16242", - "dataSourceId": "8b919f4b-aef5-40ba-aeeb-3f29b90e765f", - "nameSingular": "calendarChannelEventAssociation", - "namePlural": "calendarChannelEventAssociations", - "isSystem": true, - "isRemote": false - } - } } }, { diff --git a/packages/twenty-server/src/engine/core-modules/file/file-upload/resolvers/file-upload.resolver.spec.ts b/packages/twenty-server/src/engine/core-modules/file/file-upload/resolvers/file-upload.resolver.spec.ts index 5a62ebdc4ff4..9633227b3c8d 100644 --- a/packages/twenty-server/src/engine/core-modules/file/file-upload/resolvers/file-upload.resolver.spec.ts +++ b/packages/twenty-server/src/engine/core-modules/file/file-upload/resolvers/file-upload.resolver.spec.ts @@ -1,5 +1,6 @@ import { Test, TestingModule } from '@nestjs/testing'; +import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; import { FileUploadService } from 'src/engine/core-modules/file/file-upload/services/file-upload.service'; import { FileUploadResolver } from './file-upload.resolver'; @@ -15,6 +16,10 @@ describe('FileUploadResolver', () => { provide: FileUploadService, useValue: {}, }, + { + provide: EnvironmentService, + useValue: {}, + }, ], }).compile();