diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts index 6102df4167..83f7fc2e7b 100644 --- a/packages/twenty-front/src/generated-metadata/graphql.ts +++ b/packages/twenty-front/src/generated-metadata/graphql.ts @@ -914,14 +914,6 @@ export type CreatePageLayoutWidgetInput = { type: WidgetType; }; -export type CreateRemoteServerInput = { - foreignDataWrapperOptions: Scalars['JSON']; - foreignDataWrapperType: Scalars['String']; - label: Scalars['String']; - schema?: InputMaybe; - userMappingOptions?: InputMaybe; -}; - export type CreateRoleInput = { canAccessAllTools?: InputMaybe; canBeAssignedToAgents?: InputMaybe; @@ -1232,14 +1224,6 @@ export type DestroyViewGroupInput = { id: Scalars['UUID']; }; -/** Schema update on a table */ -export enum DistantTableUpdate { - COLUMNS_ADDED = 'COLUMNS_ADDED', - COLUMNS_DELETED = 'COLUMNS_DELETED', - COLUMNS_TYPE_CHANGED = 'COLUMNS_TYPE_CHANGED', - TABLE_DELETED = 'TABLE_DELETED' -} - export type DomainRecord = { __typename?: 'DomainRecord'; key: Scalars['String']; @@ -1350,7 +1334,6 @@ export type FeatureFlagDto = { }; export enum FeatureFlagKey { - IS_AIRTABLE_INTEGRATION_ENABLED = 'IS_AIRTABLE_INTEGRATION_ENABLED', IS_AI_ENABLED = 'IS_AI_ENABLED', IS_APPLICATION_ENABLED = 'IS_APPLICATION_ENABLED', IS_DASHBOARD_V2_ENABLED = 'IS_DASHBOARD_V2_ENABLED', @@ -1358,11 +1341,9 @@ export enum FeatureFlagKey { IS_IF_ELSE_ENABLED = 'IS_IF_ELSE_ENABLED', IS_JSON_FILTER_ENABLED = 'IS_JSON_FILTER_ENABLED', IS_PAGE_LAYOUT_ENABLED = 'IS_PAGE_LAYOUT_ENABLED', - IS_POSTGRESQL_INTEGRATION_ENABLED = 'IS_POSTGRESQL_INTEGRATION_ENABLED', IS_PUBLIC_DOMAIN_ENABLED = 'IS_PUBLIC_DOMAIN_ENABLED', IS_RECORD_PAGE_LAYOUT_ENABLED = 'IS_RECORD_PAGE_LAYOUT_ENABLED', IS_ROW_LEVEL_PERMISSION_PREDICATES_ENABLED = 'IS_ROW_LEVEL_PERMISSION_PREDICATES_ENABLED', - IS_STRIPE_INTEGRATION_ENABLED = 'IS_STRIPE_INTEGRATION_ENABLED', IS_TIMELINE_ACTIVITY_MIGRATED = 'IS_TIMELINE_ACTIVITY_MIGRATED', IS_UNIQUE_INDEXES_ENABLED = 'IS_UNIQUE_INDEXES_ENABLED', IS_WORKSPACE_CREATION_V2_ENABLED = 'IS_WORKSPACE_CREATION_V2_ENABLED' @@ -1503,13 +1484,6 @@ export type FindAvailableSsoidpOutput = { workspace: WorkspaceNameAndId; }; -export type FindManyRemoteTablesInput = { - /** The id of the remote server. */ - id: Scalars['ID']; - /** Indicates if pending schema updates status should be computed. */ - shouldFetchPendingSchemaUpdates?: InputMaybe; -}; - export type FullName = { __typename?: 'FullName'; firstName: Scalars['String']; @@ -1859,7 +1833,6 @@ export type Mutation = { createOneDatabaseEventTrigger: DatabaseEventTrigger; createOneField: Field; createOneObject: Object; - createOneRemoteServer: RemoteServer; createOneRole: Role; createOneRouteTrigger: RouteTrigger; createOneServerlessFunction: ServerlessFunction; @@ -1894,7 +1867,6 @@ export type Mutation = { deleteOneDatabaseEventTrigger: DatabaseEventTrigger; deleteOneField: Field; deleteOneObject: Object; - deleteOneRemoteServer: RemoteServer; deleteOneRole: Scalars['String']; deleteOneRouteTrigger: RouteTrigger; deleteOneServerlessFunction: ServerlessFunction; @@ -1969,12 +1941,9 @@ export type Mutation = { switchBillingPlan: BillingUpdateOutput; switchSubscriptionInterval: BillingUpdateOutput; syncApplication: Scalars['Boolean']; - syncRemoteTable: RemoteTable; - syncRemoteTableSchemaChanges: RemoteTable; testHttpRequest: TestHttpRequestOutput; trackAnalytics: Analytics; uninstallApplication: Scalars['Boolean']; - unsyncRemoteTable: RemoteTable; updateApiKey?: Maybe; updateCoreView: CoreView; updateCoreViewField: CoreViewField; @@ -1990,7 +1959,6 @@ export type Mutation = { updateOneDatabaseEventTrigger: DatabaseEventTrigger; updateOneField: Field; updateOneObject: Object; - updateOneRemoteServer: RemoteServer; updateOneRole: Role; updateOneRouteTrigger: RouteTrigger; updateOneServerlessFunction: ServerlessFunction; @@ -2193,11 +2161,6 @@ export type MutationCreateOneObjectArgs = { }; -export type MutationCreateOneRemoteServerArgs = { - input: CreateRemoteServerInput; -}; - - export type MutationCreateOneRoleArgs = { createRoleInput: CreateRoleInput; }; @@ -2365,11 +2328,6 @@ export type MutationDeleteOneObjectArgs = { }; -export type MutationDeleteOneRemoteServerArgs = { - input: RemoteServerIdInput; -}; - - export type MutationDeleteOneRoleArgs = { roleId: Scalars['UUID']; }; @@ -2721,16 +2679,6 @@ export type MutationSyncApplicationArgs = { }; -export type MutationSyncRemoteTableArgs = { - input: RemoteTableInput; -}; - - -export type MutationSyncRemoteTableSchemaChangesArgs = { - input: RemoteTableInput; -}; - - export type MutationTestHttpRequestArgs = { input: TestHttpRequestInput; }; @@ -2749,11 +2697,6 @@ export type MutationUninstallApplicationArgs = { }; -export type MutationUnsyncRemoteTableArgs = { - input: RemoteTableInput; -}; - - export type MutationUpdateApiKeyArgs = { input: UpdateApiKeyInput; }; @@ -2835,11 +2778,6 @@ export type MutationUpdateOneObjectArgs = { }; -export type MutationUpdateOneRemoteServerArgs = { - input: UpdateRemoteServerInput; -}; - - export type MutationUpdateOneRoleArgs = { updateRoleInput: UpdateRoleInput; }; @@ -3368,20 +3306,17 @@ export type Query = { currentWorkspace: Workspace; field: Field; fields: FieldConnection; - findDistantTablesWithStatus: Array; findManyAgents: Array; findManyApplications: Array; findManyCronTriggers: Array; findManyDatabaseEventTriggers: Array; findManyPublicDomains: Array; - findManyRemoteServersByType: Array; findManyRouteTriggers: Array; findManyServerlessFunctions: Array; findOneAgent: Agent; findOneApplication: Application; findOneCronTrigger: CronTrigger; findOneDatabaseEventTrigger: DatabaseEventTrigger; - findOneRemoteServerById: RemoteServer; findOneRouteTrigger: RouteTrigger; findOneServerlessFunction: ServerlessFunction; findWorkspaceFromInviteHash: Workspace; @@ -3494,16 +3429,6 @@ export type QueryFieldsArgs = { }; -export type QueryFindDistantTablesWithStatusArgs = { - input: FindManyRemoteTablesInput; -}; - - -export type QueryFindManyRemoteServersByTypeArgs = { - input: RemoteServerTypeInput; -}; - - export type QueryFindOneAgentArgs = { input: AgentIdInput; }; @@ -3524,11 +3449,6 @@ export type QueryFindOneDatabaseEventTriggerArgs = { }; -export type QueryFindOneRemoteServerByIdArgs = { - input: RemoteServerIdInput; -}; - - export type QueryFindOneRouteTriggerArgs = { input: RouteTriggerIdInput; }; @@ -3879,48 +3799,6 @@ export enum RelationType { ONE_TO_MANY = 'ONE_TO_MANY' } -export type RemoteServer = { - __typename?: 'RemoteServer'; - createdAt: Scalars['DateTime']; - foreignDataWrapperId: Scalars['UUID']; - foreignDataWrapperOptions?: Maybe; - foreignDataWrapperType: Scalars['String']; - id: Scalars['UUID']; - label: Scalars['String']; - schema?: Maybe; - updatedAt: Scalars['DateTime']; - userMappingOptions?: Maybe; -}; - -export type RemoteServerIdInput = { - /** The id of the record. */ - id: Scalars['ID']; -}; - -export type RemoteServerTypeInput = { - foreignDataWrapperType: Scalars['String']; -}; - -export type RemoteTable = { - __typename?: 'RemoteTable'; - id?: Maybe; - name: Scalars['String']; - schema?: Maybe; - schemaPendingUpdates?: Maybe>; - status: RemoteTableStatus; -}; - -export type RemoteTableInput = { - name: Scalars['String']; - remoteServerId: Scalars['UUID']; -}; - -/** Status of the table */ -export enum RemoteTableStatus { - NOT_SYNCED = 'NOT_SYNCED', - SYNCED = 'SYNCED' -} - export type ResendEmailVerificationTokenOutput = { __typename?: 'ResendEmailVerificationTokenOutput'; success: Scalars['Boolean']; @@ -4611,14 +4489,6 @@ export type UpdatePageLayoutWithTabsInput = { type: PageLayoutType; }; -export type UpdateRemoteServerInput = { - foreignDataWrapperOptions?: InputMaybe; - id: Scalars['UUID']; - label?: InputMaybe; - schema?: InputMaybe; - userMappingOptions?: InputMaybe; -}; - export type UpdateRoleInput = { /** The id of the role to update */ id: Scalars['UUID']; @@ -4894,21 +4764,6 @@ export type UserLookup = { workspaces: Array; }; -export type UserMappingOptions = { - password?: InputMaybe; - user?: InputMaybe; -}; - -export type UserMappingOptionsUpdateInput = { - password?: InputMaybe; - user?: InputMaybe; -}; - -export type UserMappingOptionsUser = { - __typename?: 'UserMappingOptionsUser'; - user?: Maybe; -}; - export type UserWorkspace = { __typename?: 'UserWorkspace'; createdAt: Scalars['DateTime']; @@ -5784,73 +5639,6 @@ export type ListPlansQueryVariables = Exact<{ [key: string]: never; }>; export type ListPlansQuery = { __typename?: 'Query', listPlans: Array<{ __typename?: 'BillingPlanOutput', planKey: BillingPlanKey, licensedProducts: Array<{ __typename?: 'BillingLicensedProduct', name: string, description: string, images?: Array | null, prices?: Array<{ __typename?: 'BillingPriceLicensed', stripePriceId: string, unitAmount: number, recurringInterval: SubscriptionInterval, priceUsageType: BillingUsageType }> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }>, meteredProducts: Array<{ __typename?: 'BillingMeteredProduct', name: string, description: string, images?: Array | null, prices?: Array<{ __typename?: 'BillingPriceMetered', priceUsageType: BillingUsageType, recurringInterval: SubscriptionInterval, stripePriceId: string, tiers: Array<{ __typename?: 'BillingPriceTier', flatAmount?: number | null, unitAmount?: number | null, upTo?: number | null }> }> | null, metadata: { __typename?: 'BillingProductMetadata', productKey: BillingProductKey, planKey: BillingPlanKey, priceUsageBased: BillingUsageType } }> }> }; -export type RemoteServerFieldsFragment = { __typename?: 'RemoteServer', id: string, createdAt: string, foreignDataWrapperId: string, foreignDataWrapperOptions?: any | null, foreignDataWrapperType: string, updatedAt: string, schema?: string | null, label: string, userMappingOptions?: { __typename?: 'UserMappingOptionsUser', user?: string | null } | null }; - -export type RemoteTableFieldsFragment = { __typename?: 'RemoteTable', id?: string | null, name: string, schema?: string | null, status: RemoteTableStatus, schemaPendingUpdates?: Array | null }; - -export type CreateServerMutationVariables = Exact<{ - input: CreateRemoteServerInput; -}>; - - -export type CreateServerMutation = { __typename?: 'Mutation', createOneRemoteServer: { __typename?: 'RemoteServer', id: string, createdAt: string, foreignDataWrapperId: string, foreignDataWrapperOptions?: any | null, foreignDataWrapperType: string, updatedAt: string, schema?: string | null, label: string, userMappingOptions?: { __typename?: 'UserMappingOptionsUser', user?: string | null } | null } }; - -export type DeleteServerMutationVariables = Exact<{ - input: RemoteServerIdInput; -}>; - - -export type DeleteServerMutation = { __typename?: 'Mutation', deleteOneRemoteServer: { __typename?: 'RemoteServer', id: string } }; - -export type SyncRemoteTableMutationVariables = Exact<{ - input: RemoteTableInput; -}>; - - -export type SyncRemoteTableMutation = { __typename?: 'Mutation', syncRemoteTable: { __typename?: 'RemoteTable', id?: string | null, name: string, schema?: string | null, status: RemoteTableStatus, schemaPendingUpdates?: Array | null } }; - -export type SyncRemoteTableSchemaChangesMutationVariables = Exact<{ - input: RemoteTableInput; -}>; - - -export type SyncRemoteTableSchemaChangesMutation = { __typename?: 'Mutation', syncRemoteTableSchemaChanges: { __typename?: 'RemoteTable', id?: string | null, name: string, schema?: string | null, status: RemoteTableStatus, schemaPendingUpdates?: Array | null } }; - -export type UnsyncRemoteTableMutationVariables = Exact<{ - input: RemoteTableInput; -}>; - - -export type UnsyncRemoteTableMutation = { __typename?: 'Mutation', unsyncRemoteTable: { __typename?: 'RemoteTable', id?: string | null, name: string, schema?: string | null, status: RemoteTableStatus, schemaPendingUpdates?: Array | null } }; - -export type UpdateServerMutationVariables = Exact<{ - input: UpdateRemoteServerInput; -}>; - - -export type UpdateServerMutation = { __typename?: 'Mutation', updateOneRemoteServer: { __typename?: 'RemoteServer', id: string, createdAt: string, foreignDataWrapperId: string, foreignDataWrapperOptions?: any | null, foreignDataWrapperType: string, updatedAt: string, schema?: string | null, label: string, userMappingOptions?: { __typename?: 'UserMappingOptionsUser', user?: string | null } | null } }; - -export type GetManyDatabaseConnectionsQueryVariables = Exact<{ - input: RemoteServerTypeInput; -}>; - - -export type GetManyDatabaseConnectionsQuery = { __typename?: 'Query', findManyRemoteServersByType: Array<{ __typename?: 'RemoteServer', id: string, createdAt: string, foreignDataWrapperId: string, foreignDataWrapperOptions?: any | null, foreignDataWrapperType: string, updatedAt: string, schema?: string | null, label: string, userMappingOptions?: { __typename?: 'UserMappingOptionsUser', user?: string | null } | null }> }; - -export type GetManyRemoteTablesQueryVariables = Exact<{ - input: FindManyRemoteTablesInput; -}>; - - -export type GetManyRemoteTablesQuery = { __typename?: 'Query', findDistantTablesWithStatus: Array<{ __typename?: 'RemoteTable', id?: string | null, name: string, schema?: string | null, status: RemoteTableStatus, schemaPendingUpdates?: Array | null }> }; - -export type GetOneDatabaseConnectionQueryVariables = Exact<{ - input: RemoteServerIdInput; -}>; - - -export type GetOneDatabaseConnectionQuery = { __typename?: 'Query', findOneRemoteServerById: { __typename?: 'RemoteServer', id: string, createdAt: string, foreignDataWrapperId: string, foreignDataWrapperOptions?: any | null, foreignDataWrapperType: string, updatedAt: string, schema?: string | null, label: string, userMappingOptions?: { __typename?: 'UserMappingOptionsUser', user?: string | null } | null } }; - export type CreateFileMutationVariables = Exact<{ file: Scalars['Upload']; }>; @@ -7160,30 +6948,6 @@ export const BillingPriceMeteredFragmentFragmentDoc = gql` } } `; -export const RemoteServerFieldsFragmentDoc = gql` - fragment RemoteServerFields on RemoteServer { - id - createdAt - foreignDataWrapperId - foreignDataWrapperOptions - foreignDataWrapperType - userMappingOptions { - user - } - updatedAt - schema - label -} - `; -export const RemoteTableFieldsFragmentDoc = gql` - fragment RemoteTableFields on RemoteTable { - id - name - schema - status - schemaPendingUpdates -} - `; export const ApiKeyFragmentFragmentDoc = gql` fragment ApiKeyFragment on ApiKey { id @@ -10003,309 +9767,6 @@ export function useListPlansLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions< export type ListPlansQueryHookResult = ReturnType; export type ListPlansLazyQueryHookResult = ReturnType; export type ListPlansQueryResult = Apollo.QueryResult; -export const CreateServerDocument = gql` - mutation createServer($input: CreateRemoteServerInput!) { - createOneRemoteServer(input: $input) { - ...RemoteServerFields - } -} - ${RemoteServerFieldsFragmentDoc}`; -export type CreateServerMutationFn = Apollo.MutationFunction; - -/** - * __useCreateServerMutation__ - * - * To run a mutation, you first call `useCreateServerMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateServerMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createServerMutation, { data, loading, error }] = useCreateServerMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useCreateServerMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateServerDocument, options); - } -export type CreateServerMutationHookResult = ReturnType; -export type CreateServerMutationResult = Apollo.MutationResult; -export type CreateServerMutationOptions = Apollo.BaseMutationOptions; -export const DeleteServerDocument = gql` - mutation deleteServer($input: RemoteServerIdInput!) { - deleteOneRemoteServer(input: $input) { - id - } -} - `; -export type DeleteServerMutationFn = Apollo.MutationFunction; - -/** - * __useDeleteServerMutation__ - * - * To run a mutation, you first call `useDeleteServerMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDeleteServerMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [deleteServerMutation, { data, loading, error }] = useDeleteServerMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useDeleteServerMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DeleteServerDocument, options); - } -export type DeleteServerMutationHookResult = ReturnType; -export type DeleteServerMutationResult = Apollo.MutationResult; -export type DeleteServerMutationOptions = Apollo.BaseMutationOptions; -export const SyncRemoteTableDocument = gql` - mutation syncRemoteTable($input: RemoteTableInput!) { - syncRemoteTable(input: $input) { - ...RemoteTableFields - } -} - ${RemoteTableFieldsFragmentDoc}`; -export type SyncRemoteTableMutationFn = Apollo.MutationFunction; - -/** - * __useSyncRemoteTableMutation__ - * - * To run a mutation, you first call `useSyncRemoteTableMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useSyncRemoteTableMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [syncRemoteTableMutation, { data, loading, error }] = useSyncRemoteTableMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useSyncRemoteTableMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(SyncRemoteTableDocument, options); - } -export type SyncRemoteTableMutationHookResult = ReturnType; -export type SyncRemoteTableMutationResult = Apollo.MutationResult; -export type SyncRemoteTableMutationOptions = Apollo.BaseMutationOptions; -export const SyncRemoteTableSchemaChangesDocument = gql` - mutation syncRemoteTableSchemaChanges($input: RemoteTableInput!) { - syncRemoteTableSchemaChanges(input: $input) { - ...RemoteTableFields - } -} - ${RemoteTableFieldsFragmentDoc}`; -export type SyncRemoteTableSchemaChangesMutationFn = Apollo.MutationFunction; - -/** - * __useSyncRemoteTableSchemaChangesMutation__ - * - * To run a mutation, you first call `useSyncRemoteTableSchemaChangesMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useSyncRemoteTableSchemaChangesMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [syncRemoteTableSchemaChangesMutation, { data, loading, error }] = useSyncRemoteTableSchemaChangesMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useSyncRemoteTableSchemaChangesMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(SyncRemoteTableSchemaChangesDocument, options); - } -export type SyncRemoteTableSchemaChangesMutationHookResult = ReturnType; -export type SyncRemoteTableSchemaChangesMutationResult = Apollo.MutationResult; -export type SyncRemoteTableSchemaChangesMutationOptions = Apollo.BaseMutationOptions; -export const UnsyncRemoteTableDocument = gql` - mutation unsyncRemoteTable($input: RemoteTableInput!) { - unsyncRemoteTable(input: $input) { - ...RemoteTableFields - } -} - ${RemoteTableFieldsFragmentDoc}`; -export type UnsyncRemoteTableMutationFn = Apollo.MutationFunction; - -/** - * __useUnsyncRemoteTableMutation__ - * - * To run a mutation, you first call `useUnsyncRemoteTableMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUnsyncRemoteTableMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [unsyncRemoteTableMutation, { data, loading, error }] = useUnsyncRemoteTableMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useUnsyncRemoteTableMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UnsyncRemoteTableDocument, options); - } -export type UnsyncRemoteTableMutationHookResult = ReturnType; -export type UnsyncRemoteTableMutationResult = Apollo.MutationResult; -export type UnsyncRemoteTableMutationOptions = Apollo.BaseMutationOptions; -export const UpdateServerDocument = gql` - mutation updateServer($input: UpdateRemoteServerInput!) { - updateOneRemoteServer(input: $input) { - ...RemoteServerFields - } -} - ${RemoteServerFieldsFragmentDoc}`; -export type UpdateServerMutationFn = Apollo.MutationFunction; - -/** - * __useUpdateServerMutation__ - * - * To run a mutation, you first call `useUpdateServerMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateServerMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [updateServerMutation, { data, loading, error }] = useUpdateServerMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateServerMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateServerDocument, options); - } -export type UpdateServerMutationHookResult = ReturnType; -export type UpdateServerMutationResult = Apollo.MutationResult; -export type UpdateServerMutationOptions = Apollo.BaseMutationOptions; -export const GetManyDatabaseConnectionsDocument = gql` - query GetManyDatabaseConnections($input: RemoteServerTypeInput!) { - findManyRemoteServersByType(input: $input) { - ...RemoteServerFields - } -} - ${RemoteServerFieldsFragmentDoc}`; - -/** - * __useGetManyDatabaseConnectionsQuery__ - * - * To run a query within a React component, call `useGetManyDatabaseConnectionsQuery` and pass it any options that fit your needs. - * When your component renders, `useGetManyDatabaseConnectionsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useGetManyDatabaseConnectionsQuery({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useGetManyDatabaseConnectionsQuery(baseOptions: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(GetManyDatabaseConnectionsDocument, options); - } -export function useGetManyDatabaseConnectionsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(GetManyDatabaseConnectionsDocument, options); - } -export type GetManyDatabaseConnectionsQueryHookResult = ReturnType; -export type GetManyDatabaseConnectionsLazyQueryHookResult = ReturnType; -export type GetManyDatabaseConnectionsQueryResult = Apollo.QueryResult; -export const GetManyRemoteTablesDocument = gql` - query GetManyRemoteTables($input: FindManyRemoteTablesInput!) { - findDistantTablesWithStatus(input: $input) { - ...RemoteTableFields - } -} - ${RemoteTableFieldsFragmentDoc}`; - -/** - * __useGetManyRemoteTablesQuery__ - * - * To run a query within a React component, call `useGetManyRemoteTablesQuery` and pass it any options that fit your needs. - * When your component renders, `useGetManyRemoteTablesQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useGetManyRemoteTablesQuery({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useGetManyRemoteTablesQuery(baseOptions: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(GetManyRemoteTablesDocument, options); - } -export function useGetManyRemoteTablesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(GetManyRemoteTablesDocument, options); - } -export type GetManyRemoteTablesQueryHookResult = ReturnType; -export type GetManyRemoteTablesLazyQueryHookResult = ReturnType; -export type GetManyRemoteTablesQueryResult = Apollo.QueryResult; -export const GetOneDatabaseConnectionDocument = gql` - query GetOneDatabaseConnection($input: RemoteServerIdInput!) { - findOneRemoteServerById(input: $input) { - ...RemoteServerFields - } -} - ${RemoteServerFieldsFragmentDoc}`; - -/** - * __useGetOneDatabaseConnectionQuery__ - * - * To run a query within a React component, call `useGetOneDatabaseConnectionQuery` and pass it any options that fit your needs. - * When your component renders, `useGetOneDatabaseConnectionQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useGetOneDatabaseConnectionQuery({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useGetOneDatabaseConnectionQuery(baseOptions: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(GetOneDatabaseConnectionDocument, options); - } -export function useGetOneDatabaseConnectionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(GetOneDatabaseConnectionDocument, options); - } -export type GetOneDatabaseConnectionQueryHookResult = ReturnType; -export type GetOneDatabaseConnectionLazyQueryHookResult = ReturnType; -export type GetOneDatabaseConnectionQueryResult = Apollo.QueryResult; export const CreateFileDocument = gql` mutation CreateFile($file: Upload!) { createFile(file: $file) { diff --git a/packages/twenty-front/src/generated/graphql.ts b/packages/twenty-front/src/generated/graphql.ts index 2195c3d01b..b631bc9e21 100644 --- a/packages/twenty-front/src/generated/graphql.ts +++ b/packages/twenty-front/src/generated/graphql.ts @@ -1207,14 +1207,6 @@ export type DestroyViewGroupInput = { id: Scalars['UUID']; }; -/** Schema update on a table */ -export enum DistantTableUpdate { - COLUMNS_ADDED = 'COLUMNS_ADDED', - COLUMNS_DELETED = 'COLUMNS_DELETED', - COLUMNS_TYPE_CHANGED = 'COLUMNS_TYPE_CHANGED', - TABLE_DELETED = 'TABLE_DELETED' -} - export type DomainRecord = { __typename?: 'DomainRecord'; key: Scalars['String']; @@ -1325,7 +1317,6 @@ export type FeatureFlagDto = { }; export enum FeatureFlagKey { - IS_AIRTABLE_INTEGRATION_ENABLED = 'IS_AIRTABLE_INTEGRATION_ENABLED', IS_AI_ENABLED = 'IS_AI_ENABLED', IS_APPLICATION_ENABLED = 'IS_APPLICATION_ENABLED', IS_DASHBOARD_V2_ENABLED = 'IS_DASHBOARD_V2_ENABLED', @@ -1333,11 +1324,9 @@ export enum FeatureFlagKey { IS_IF_ELSE_ENABLED = 'IS_IF_ELSE_ENABLED', IS_JSON_FILTER_ENABLED = 'IS_JSON_FILTER_ENABLED', IS_PAGE_LAYOUT_ENABLED = 'IS_PAGE_LAYOUT_ENABLED', - IS_POSTGRESQL_INTEGRATION_ENABLED = 'IS_POSTGRESQL_INTEGRATION_ENABLED', IS_PUBLIC_DOMAIN_ENABLED = 'IS_PUBLIC_DOMAIN_ENABLED', IS_RECORD_PAGE_LAYOUT_ENABLED = 'IS_RECORD_PAGE_LAYOUT_ENABLED', IS_ROW_LEVEL_PERMISSION_PREDICATES_ENABLED = 'IS_ROW_LEVEL_PERMISSION_PREDICATES_ENABLED', - IS_STRIPE_INTEGRATION_ENABLED = 'IS_STRIPE_INTEGRATION_ENABLED', IS_TIMELINE_ACTIVITY_MIGRATED = 'IS_TIMELINE_ACTIVITY_MIGRATED', IS_UNIQUE_INDEXES_ENABLED = 'IS_UNIQUE_INDEXES_ENABLED', IS_WORKSPACE_CREATION_V2_ENABLED = 'IS_WORKSPACE_CREATION_V2_ENABLED' @@ -3685,34 +3674,6 @@ export enum RelationType { ONE_TO_MANY = 'ONE_TO_MANY' } -export type RemoteServer = { - __typename?: 'RemoteServer'; - createdAt: Scalars['DateTime']; - foreignDataWrapperId: Scalars['UUID']; - foreignDataWrapperOptions?: Maybe; - foreignDataWrapperType: Scalars['String']; - id: Scalars['UUID']; - label: Scalars['String']; - schema?: Maybe; - updatedAt: Scalars['DateTime']; - userMappingOptions?: Maybe; -}; - -export type RemoteTable = { - __typename?: 'RemoteTable'; - id?: Maybe; - name: Scalars['String']; - schema?: Maybe; - schemaPendingUpdates?: Maybe>; - status: RemoteTableStatus; -}; - -/** Status of the table */ -export enum RemoteTableStatus { - NOT_SYNCED = 'NOT_SYNCED', - SYNCED = 'SYNCED' -} - export type ResendEmailVerificationTokenOutput = { __typename?: 'ResendEmailVerificationTokenOutput'; success: Scalars['Boolean']; @@ -4668,11 +4629,6 @@ export type UserLookup = { workspaces: Array; }; -export type UserMappingOptionsUser = { - __typename?: 'UserMappingOptionsUser'; - user?: Maybe; -}; - export type UserWorkspace = { __typename?: 'UserWorkspace'; createdAt: Scalars['DateTime']; diff --git a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx index 5e0d53069e..ef9e63000c 100644 --- a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx +++ b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx @@ -225,14 +225,6 @@ const SettingsBilling = lazy(() => })), ); -const SettingsIntegrations = lazy(() => - import('~/pages/settings/integrations/SettingsIntegrations').then( - (module) => ({ - default: module.SettingsIntegrations, - }), - ), -); - const SettingsObjects = lazy(() => import('~/pages/settings/data-model/SettingsObjects').then((module) => ({ default: module.SettingsObjects, @@ -572,10 +564,6 @@ export const SettingsRoutes = ({ isAdminPageEnabled }: SettingsRoutesProps) => ( path={SettingsPath.WebhookDetail} element={} /> - } - /> { - const apolloMetadataClient = useApolloCoreClient(); - - const [mutate] = useMutation< - CreateServerMutation, - CreateServerMutationVariables - >(CREATE_ONE_DATABASE_CONNECTION, { - client: apolloMetadataClient, - }); - - const createOneDatabaseConnection = async ( - input: CreateRemoteServerInput, - ) => { - return await mutate({ - variables: { - input, - }, - update: (cache, { data }) => { - const createdRemoteServer = data?.createOneRemoteServer; - if (!createdRemoteServer) return; - - const getManyDatabaseConnectionsQuery = { - query: GET_MANY_DATABASE_CONNECTIONS, - variables: { - input: { foreignDataWrapperType: input.foreignDataWrapperType }, - }, - }; - - if (isDefined(cache.readQuery(getManyDatabaseConnectionsQuery))) { - cache.updateQuery(getManyDatabaseConnectionsQuery, (cachedQuery) => ({ - findManyRemoteServersByType: [ - ...cachedQuery.findManyRemoteServersByType, - createdRemoteServer, - ], - })); - - return; - } - }, - }); - }; - - return { - createOneDatabaseConnection, - }; -}; diff --git a/packages/twenty-front/src/modules/databases/hooks/useDeleteOneDatabaseConnection.ts b/packages/twenty-front/src/modules/databases/hooks/useDeleteOneDatabaseConnection.ts deleted file mode 100644 index 32423b4ad9..0000000000 --- a/packages/twenty-front/src/modules/databases/hooks/useDeleteOneDatabaseConnection.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { useMutation } from '@apollo/client'; -import { getOperationName } from '@apollo/client/utilities'; - -import { DELETE_ONE_DATABASE_CONNECTION } from '@/databases/graphql/mutations/deleteOneDatabaseConnection'; -import { GET_MANY_DATABASE_CONNECTIONS } from '@/databases/graphql/queries/findManyDatabaseConnections'; -import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient'; -import { - type DeleteServerMutation, - type DeleteServerMutationVariables, - type RemoteServerIdInput, -} from '~/generated-metadata/graphql'; - -export const useDeleteOneDatabaseConnection = () => { - const apolloMetadataClient = useApolloCoreClient(); - - const [mutate] = useMutation< - DeleteServerMutation, - DeleteServerMutationVariables - >(DELETE_ONE_DATABASE_CONNECTION, { - client: apolloMetadataClient, - }); - - const deleteOneDatabaseConnection = async (input: RemoteServerIdInput) => { - return await mutate({ - variables: { - input, - }, - awaitRefetchQueries: true, - refetchQueries: [getOperationName(GET_MANY_DATABASE_CONNECTIONS) ?? ''], - }); - }; - - return { - deleteOneDatabaseConnection, - }; -}; diff --git a/packages/twenty-front/src/modules/databases/hooks/useGetDatabaseConnection.ts b/packages/twenty-front/src/modules/databases/hooks/useGetDatabaseConnection.ts deleted file mode 100644 index 89569fa5e6..0000000000 --- a/packages/twenty-front/src/modules/databases/hooks/useGetDatabaseConnection.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { useQuery, type WatchQueryFetchPolicy } from '@apollo/client'; - -import { GET_ONE_DATABASE_CONNECTION } from '@/databases/graphql/queries/findOneDatabaseConnection'; -import { getForeignDataWrapperType } from '@/databases/utils/getForeignDataWrapperType'; -import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient'; -import { - type GetOneDatabaseConnectionQuery, - type GetOneDatabaseConnectionQueryVariables, -} from '~/generated-metadata/graphql'; - -type UseGetDatabaseConnectionParams = { - databaseKey: string; - connectionId: string; - skip?: boolean; - fetchPolicy?: WatchQueryFetchPolicy; -}; - -export const useGetDatabaseConnection = ({ - databaseKey, - connectionId, - skip, - fetchPolicy, -}: UseGetDatabaseConnectionParams) => { - const apolloMetadataClient = useApolloCoreClient(); - const foreignDataWrapperType = getForeignDataWrapperType(databaseKey); - - const fetchPolicyOption = fetchPolicy ? { fetchPolicy: fetchPolicy } : {}; - - const { data, loading } = useQuery< - GetOneDatabaseConnectionQuery, - GetOneDatabaseConnectionQueryVariables - >(GET_ONE_DATABASE_CONNECTION, { - client: apolloMetadataClient ?? undefined, - skip: skip || !apolloMetadataClient || !foreignDataWrapperType, - variables: { - input: { - id: connectionId, - }, - }, - ...fetchPolicyOption, - }); - - const connection = data?.findOneRemoteServerById ?? null; - - return { - connection: - connection?.foreignDataWrapperType === foreignDataWrapperType - ? connection - : null, - loading, - }; -}; diff --git a/packages/twenty-front/src/modules/databases/hooks/useGetDatabaseConnectionTables.ts b/packages/twenty-front/src/modules/databases/hooks/useGetDatabaseConnectionTables.ts deleted file mode 100644 index 3b458bf59c..0000000000 --- a/packages/twenty-front/src/modules/databases/hooks/useGetDatabaseConnectionTables.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { useQuery, type WatchQueryFetchPolicy } from '@apollo/client'; - -import { GET_MANY_REMOTE_TABLES } from '@/databases/graphql/queries/findManyRemoteTables'; -import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient'; -import { - type GetManyRemoteTablesQuery, - type GetManyRemoteTablesQueryVariables, -} from '~/generated-metadata/graphql'; - -type UseGetDatabaseConnectionTablesParams = { - connectionId: string; - skip?: boolean; - shouldFetchPendingSchemaUpdates?: boolean; - fetchPolicy?: WatchQueryFetchPolicy; -}; - -export const useGetDatabaseConnectionTables = ({ - connectionId, - skip, - shouldFetchPendingSchemaUpdates, - fetchPolicy, -}: UseGetDatabaseConnectionTablesParams) => { - const apolloMetadataClient = useApolloCoreClient(); - - const fetchPolicyOption = fetchPolicy ? { fetchPolicy: fetchPolicy } : {}; - - const { data, error } = useQuery< - GetManyRemoteTablesQuery, - GetManyRemoteTablesQueryVariables - >(GET_MANY_REMOTE_TABLES, { - client: apolloMetadataClient ?? undefined, - skip: skip || !apolloMetadataClient, - variables: { - input: { - id: connectionId, - shouldFetchPendingSchemaUpdates, - }, - }, - ...fetchPolicyOption, - }); - - return { - tables: data?.findDistantTablesWithStatus || [], - error, - }; -}; diff --git a/packages/twenty-front/src/modules/databases/hooks/useGetDatabaseConnections.ts b/packages/twenty-front/src/modules/databases/hooks/useGetDatabaseConnections.ts deleted file mode 100644 index 84afa90c23..0000000000 --- a/packages/twenty-front/src/modules/databases/hooks/useGetDatabaseConnections.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { useQuery } from '@apollo/client'; - -import { GET_MANY_DATABASE_CONNECTIONS } from '@/databases/graphql/queries/findManyDatabaseConnections'; -import { getForeignDataWrapperType } from '@/databases/utils/getForeignDataWrapperType'; -import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient'; -import { - type GetManyDatabaseConnectionsQuery, - type GetManyDatabaseConnectionsQueryVariables, -} from '~/generated-metadata/graphql'; - -type UseGetDatabaseConnectionsParams = { - databaseKey: string; - skip?: boolean; -}; - -export const useGetDatabaseConnections = ({ - databaseKey, - skip, -}: UseGetDatabaseConnectionsParams) => { - const apolloMetadataClient = useApolloCoreClient(); - const foreignDataWrapperType = getForeignDataWrapperType(databaseKey); - - const { data } = useQuery< - GetManyDatabaseConnectionsQuery, - GetManyDatabaseConnectionsQueryVariables - >(GET_MANY_DATABASE_CONNECTIONS, { - client: apolloMetadataClient ?? undefined, - skip: skip || !apolloMetadataClient || !foreignDataWrapperType, - variables: { - input: { - foreignDataWrapperType: foreignDataWrapperType || '', - }, - }, - }); - - return { - connections: data?.findManyRemoteServersByType || [], - }; -}; diff --git a/packages/twenty-front/src/modules/databases/hooks/useUnsyncRemoteTable.ts b/packages/twenty-front/src/modules/databases/hooks/useUnsyncRemoteTable.ts deleted file mode 100644 index fc4869db1d..0000000000 --- a/packages/twenty-front/src/modules/databases/hooks/useUnsyncRemoteTable.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { useMutation } from '@apollo/client'; -import { useCallback } from 'react'; - -import { UNSYNC_REMOTE_TABLE } from '@/databases/graphql/mutations/unsyncRemoteTable'; -import { modifyRemoteTableFromCache } from '@/databases/utils/modifyRemoteTableFromCache'; -import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient'; -import { useFindManyObjectMetadataItems } from '@/object-metadata/hooks/useFindManyObjectMetadataItems'; -import { - type RemoteTableInput, - type UnsyncRemoteTableMutation, - type UnsyncRemoteTableMutationVariables, -} from '~/generated-metadata/graphql'; -import { isDefined } from 'twenty-shared/utils'; - -export const useUnsyncRemoteTable = () => { - const apolloMetadataClient = useApolloCoreClient(); - const { refetch: refetchObjectMetadataItems } = - useFindManyObjectMetadataItems(); - - const [mutate] = useMutation< - UnsyncRemoteTableMutation, - UnsyncRemoteTableMutationVariables - >(UNSYNC_REMOTE_TABLE, { - client: apolloMetadataClient, - }); - - const unsyncRemoteTable = useCallback( - async (input: RemoteTableInput) => { - const remoteTable = await mutate({ - variables: { - input, - }, - update: (cache, { data }) => { - if (isDefined(data)) { - modifyRemoteTableFromCache({ - cache: cache, - remoteTableName: input.name, - fieldModifiers: { - status: () => data.unsyncRemoteTable.status, - }, - }); - } - }, - }); - - await refetchObjectMetadataItems(); - - return remoteTable; - }, - [mutate, refetchObjectMetadataItems], - ); - - return { - unsyncRemoteTable, - }; -}; diff --git a/packages/twenty-front/src/modules/databases/hooks/useUpdateOneDatabaseConnection.ts b/packages/twenty-front/src/modules/databases/hooks/useUpdateOneDatabaseConnection.ts deleted file mode 100644 index ca793a6e23..0000000000 --- a/packages/twenty-front/src/modules/databases/hooks/useUpdateOneDatabaseConnection.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { useMutation } from '@apollo/client'; - -import { UPDATE_ONE_DATABASE_CONNECTION } from '@/databases/graphql/mutations/updateOneDatabaseConnection'; -import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient'; -import { - type UpdateRemoteServerInput, - type UpdateServerMutation, - type UpdateServerMutationVariables, -} from '~/generated-metadata/graphql'; - -export const useUpdateOneDatabaseConnection = () => { - const apolloMetadataClient = useApolloCoreClient(); - - const [mutate] = useMutation< - UpdateServerMutation, - UpdateServerMutationVariables - >(UPDATE_ONE_DATABASE_CONNECTION, { - client: apolloMetadataClient, - }); - - const updateOneDatabaseConnection = async ( - input: UpdateRemoteServerInput, - ) => { - return await mutate({ - variables: { - input, - }, - }); - }; - - return { - updateOneDatabaseConnection, - }; -}; diff --git a/packages/twenty-front/src/modules/databases/utils/__tests__/getForeignDataWrapperType.test.ts b/packages/twenty-front/src/modules/databases/utils/__tests__/getForeignDataWrapperType.test.ts deleted file mode 100644 index 451fbc4f5a..0000000000 --- a/packages/twenty-front/src/modules/databases/utils/__tests__/getForeignDataWrapperType.test.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { getForeignDataWrapperType } from '@/databases/utils/getForeignDataWrapperType'; - -describe('getForeignDataWrapperType', () => { - it('should handle postgres', () => { - expect(getForeignDataWrapperType('postgresql')).toBe('postgres_fdw'); - }); - - it('should handle stripe', () => { - expect(getForeignDataWrapperType('stripe')).toBe('stripe_fdw'); - }); - - it('should return null for unknown', () => { - expect(getForeignDataWrapperType('unknown')).toBeNull(); - }); -}); diff --git a/packages/twenty-front/src/modules/databases/utils/getForeignDataWrapperType.ts b/packages/twenty-front/src/modules/databases/utils/getForeignDataWrapperType.ts deleted file mode 100644 index cd3c16f17a..0000000000 --- a/packages/twenty-front/src/modules/databases/utils/getForeignDataWrapperType.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const getForeignDataWrapperType = (databaseKey: string) => { - switch (databaseKey) { - case 'postgresql': - return 'postgres_fdw'; - case 'stripe': - return 'stripe_fdw'; - default: - return null; - } -}; diff --git a/packages/twenty-front/src/modules/databases/utils/modifyRemoteTableFromCache.ts b/packages/twenty-front/src/modules/databases/utils/modifyRemoteTableFromCache.ts deleted file mode 100644 index 5354655968..0000000000 --- a/packages/twenty-front/src/modules/databases/utils/modifyRemoteTableFromCache.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { type ApolloCache } from '@apollo/client'; -import { type Modifiers } from '@apollo/client/cache'; - -import { type RemoteTable } from '~/generated-metadata/graphql'; - -export const modifyRemoteTableFromCache = ({ - cache, - fieldModifiers, - remoteTableName, -}: { - cache: ApolloCache; - fieldModifiers: Modifiers; - remoteTableName: string; -}) => { - const remoteTableCacheId = `RemoteTable:{"name":"${remoteTableName}"}`; - - cache.modify({ - id: remoteTableCacheId, - fields: fieldModifiers, - optimistic: true, - }); -}; diff --git a/packages/twenty-front/src/modules/settings/integrations/assets/preview-background.svg b/packages/twenty-front/src/modules/settings/integrations/assets/preview-background.svg deleted file mode 100644 index b9fe4a3171..0000000000 --- a/packages/twenty-front/src/modules/settings/integrations/assets/preview-background.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/twenty-front/src/modules/settings/integrations/assets/sync.svg b/packages/twenty-front/src/modules/settings/integrations/assets/sync.svg deleted file mode 100644 index b1d10480e0..0000000000 --- a/packages/twenty-front/src/modules/settings/integrations/assets/sync.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/twenty-front/src/modules/settings/integrations/components/SettingsIntegrationComponent.tsx b/packages/twenty-front/src/modules/settings/integrations/components/SettingsIntegrationComponent.tsx deleted file mode 100644 index 12882c44c7..0000000000 --- a/packages/twenty-front/src/modules/settings/integrations/components/SettingsIntegrationComponent.tsx +++ /dev/null @@ -1,129 +0,0 @@ -import { css } from '@emotion/react'; -import styled from '@emotion/styled'; - -import { type SettingsIntegration } from '@/settings/integrations/types/SettingsIntegration'; -import { t } from '@lingui/core/macro'; -import { Link } from 'react-router-dom'; -import { isDefined } from 'twenty-shared/utils'; -import { Pill } from 'twenty-ui/components'; -import { - IconArrowUpRight, - IconBolt, - IconCopy, - IconPlus, - Status, -} from 'twenty-ui/display'; -import { Button } from 'twenty-ui/input'; -import { useCopyToClipboard } from '~/hooks/useCopyToClipboard'; - -interface SettingsIntegrationComponentProps { - integration: SettingsIntegration; -} - -const StyledContainer = styled.div<{ to?: string }>` - align-items: center; - background: ${({ theme }) => theme.background.secondary}; - border: 1px solid ${({ theme }) => theme.border.color.medium}; - border-radius: ${({ theme }) => theme.border.radius.md}; - font-size: ${({ theme }) => theme.font.size.md}; - display: flex; - flex-direction: row; - justify-content: space-between; - padding: ${({ theme }) => theme.spacing(3)}; - text-decoration: none; - color: ${({ theme }) => theme.font.color.primary}; - - ${({ to }) => - isDefined(to) && - css` - cursor: pointer; - `} -`; - -const StyledSection = styled.div` - align-items: center; - display: flex; - flex-direction: row; - gap: ${({ theme }) => theme.spacing(3)}; -`; - -const StyledIntegrationLogo = styled.div` - align-items: center; - display: flex; - flex-direction: row; - gap: ${({ theme }) => theme.spacing(2)}; - color: ${({ theme }) => theme.border.color.strong}; -`; - -const StyledSoonPill = styled(Pill)` - padding: ${({ theme }) => theme.spacing(1)} ${({ theme }) => theme.spacing(2)}; -`; - -const StyledLogo = styled.img` - height: 24px; - width: 24px; -`; - -export const SettingsIntegrationComponent = ({ - integration, -}: SettingsIntegrationComponentProps) => { - const { copyToClipboard } = useCopyToClipboard(); - return ( - - - - - {isDefined(integration.to) && ( - <> -
→
- - - )} -
- {integration.text} -
- {integration.type === 'Soon' ? ( - - ) : integration.type === 'Active' ? ( - - ) : integration.type === 'Add' ? ( -