The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix(): include workspace in reset password flow (#10617)
Antoine Moreaux2325e0ae0ffc
diff --git a/packages/twenty-front/src/generated-metadata/gql.ts b/packages/twenty-front/src/generated-metadata/gql.tsindex 6c893704291..7c40921ca4a 100644--- a/packages/twenty-front/src/generated-metadata/gql.ts+++ b/packages/twenty-front/src/generated-metadata/gql.ts@@ -28,8 +28,8 @@ const documents = {"\n mutation CreateOneFieldMetadataItem($input: CreateOneFieldMetadataInput!) {\n createOneField(input: $input) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n settings\n defaultValue\n options\n }\n }\n": types.CreateOneFieldMetadataItemDocument,"\n mutation CreateOneRelationMetadataItem(\n $input: CreateOneRelationMetadataInput!\n ) {\n createOneRelationMetadata(input: $input) {\n id\n relationType\n fromObjectMetadataId\n toObjectMetadataId\n fromFieldMetadataId\n toFieldMetadataId\n createdAt\n updatedAt\n }\n }\n": types.CreateOneRelationMetadataItemDocument,"\n mutation UpdateOneFieldMetadataItem(\n $idToUpdate: UUID!\n $updatePayload: UpdateFieldInput!\n ) {\n updateOneField(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isNullable\n createdAt\n updatedAt\n settings\n isLabelSyncedWithName\n }\n }\n": types.UpdateOneFieldMetadataItemDocument,- "\n mutation UpdateOneObjectMetadataItem(\n $idToUpdate: UUID!\n $updatePayload: UpdateObjectPayload!\n ) {\n updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) {\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.UpdateOneObjectMetadataItemDocument,- "\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 UpdateOneObjectMetadataItem(\n $idToUpdate: UUID!\n $updatePayload: UpdateObjectPayload!\n ) {\n updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n isSearchable\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n": types.UpdateOneObjectMetadataItemDocument,+ "\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 isSearchable\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 settings\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 objects(paging: { first: 1000 }) {\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 shortcut\n isLabelSyncedWithName\n isSearchable\n duplicateCriteria\n indexMetadatas(paging: { first: 100 }) {\n edges {\n node {\n id\n createdAt\n updatedAt\n name\n indexWhereClause\n indexType\n isUnique\n indexFieldMetadatas(paging: { first: 100 }) {\n edges {\n node {\n id\n createdAt\n updatedAt\n order\n fieldMetadataId\n }\n }\n }\n }\n }\n }\n fieldsList {\n id\n type\n name\n label\n description\n icon\n isCustom\n isActive\n isSystem\n isNullable\n isUnique\n createdAt\n updatedAt\n defaultValue\n options\n settings\n isLabelSyncedWithName\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 }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n": types.ObjectMetadataItemsDocument,@@ -122,11 +122,11 @@ export function graphql(source: "\n mutation UpdateOneFieldMetadataItem(\n $/*** The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.*/-export function graphql(source: "\n mutation UpdateOneObjectMetadataItem(\n $idToUpdate: UUID!\n $updatePayload: UpdateObjectPayload!\n ) {\n updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) {\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"): (typeof documents)["\n mutation UpdateOneObjectMetadataItem(\n $idToUpdate: UUID!\n $updatePayload: UpdateObjectPayload!\n ) {\n updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) {\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"];+export function graphql(source: "\n mutation UpdateOneObjectMetadataItem(\n $idToUpdate: UUID!\n $updatePayload: UpdateObjectPayload!\n ) {\n updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n isSearchable\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n"): (typeof documents)["\n mutation UpdateOneObjectMetadataItem(\n $idToUpdate: UUID!\n $updatePayload: UpdateObjectPayload!\n ) {\n updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) {\n id\n dataSourceId\n nameSingular\n namePlural\n labelSingular\n labelPlural\n description\n icon\n isCustom\n isActive\n isSearchable\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n"];/*** The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.*/-export function graphql(source: "\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"): (typeof 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"];+export function graphql(source: "\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 isSearchable\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\n }\n }\n"): (typeof 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 isSearchable\n createdAt\n updatedAt\n labelIdentifierFieldMetadataId\n imageIdentifierFieldMetadataId\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.tsindex 612c95298ee..59605658589 100644--- a/packages/twenty-front/src/generated-metadata/graphql.ts+++ b/packages/twenty-front/src/generated-metadata/graphql.ts@@ -569,7 +569,6 @@ export enum FeatureFlagKey {IsNewRelationEnabled = 'IsNewRelationEnabled',IsPermissionsEnabled = 'IsPermissionsEnabled',IsPostgreSQLIntegrationEnabled = 'IsPostgreSQLIntegrationEnabled',- IsRichTextV2Enabled = 'IsRichTextV2Enabled',IsStripeIntegrationEnabled = 'IsStripeIntegrationEnabled',IsUniqueIndexesEnabled = 'IsUniqueIndexesEnabled',IsWorkflowEnabled = 'IsWorkflowEnabled'@@ -908,6 +907,7 @@ export type Mutation = {sendInvitations: SendInvitationsOutput;signUp: SignUpOutput;skipSyncEmailOnboardingStep: OnboardingStepSuccess;+ submitFormStep: Scalars['Boolean']['output'];syncRemoteTable: RemoteTable;syncRemoteTableSchemaChanges: RemoteTable;track: Analytics;@@ -1074,6 +1074,7 @@ export type MutationEditSsoIdentityProviderArgs = {export type MutationEmailPasswordResetLinkArgs = {email: Scalars['String']['input'];+ workspaceId: Scalars['String']['input'];};@@ -1158,6 +1159,11 @@ export type MutationSignUpArgs = {};+export type MutationSubmitFormStepArgs = {+ input: SubmitFormStepInput;+};++export type MutationSyncRemoteTableArgs = {input: RemoteTableInput;};@@ -1426,7 +1432,6 @@ export type Query = {currentWorkspace: Workspace;field: Field;fields: FieldConnection;- findAvailableWorkspacesByEmail: Array<AvailableWorkspaceOutput>;findDistantTablesWithStatus: Array<RemoteTable>;findManyRemoteServersByType: Array<RemoteServer>;findManyServerlessFunctions: Array<ServerlessFunction>;@@ -1487,11 +1492,6 @@ export type QueryFieldsArgs = {};-export type QueryFindAvailableWorkspacesByEmailArgs = {- email: Scalars['String']['input'];-};--export type QueryFindDistantTablesWithStatusArgs = {input: FindManyRemoteTablesInput;};@@ -1869,6 +1869,15 @@ export type SignUpOutput = {workspace: WorkspaceUrlsAndId;};+export type SubmitFormStepInput = {+ /** Form response in JSON format */+ response: Scalars['JSON']['input'];+ /** Workflow version ID */+ stepId: Scalars['String']['input'];+ /** Workflow run ID */+ workflowRunId: Scalars['String']['input'];+};+export enum SubscriptionInterval {Day = 'Day',Month = 'Month',@@ -2428,14 +2437,14 @@ export type UpdateOneObjectMetadataItemMutationVariables = Exact<{}>;-export type UpdateOneObjectMetadataItemMutation = { __typename?: 'Mutation', updateOneObject: { __typename?: 'Object', id: any, dataSourceId: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isActive: boolean, createdAt: any, updatedAt: any, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null } };+export type UpdateOneObjectMetadataItemMutation = { __typename?: 'Mutation', updateOneObject: { __typename?: 'Object', id: any, dataSourceId: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isActive: boolean, isSearchable: boolean, createdAt: any, updatedAt: any, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null } };export type DeleteOneObjectMetadataItemMutationVariables = Exact<{idToDelete: Scalars['UUID']['input'];}>;-export type DeleteOneObjectMetadataItemMutation = { __typename?: 'Mutation', deleteOneObject: { __typename?: 'Object', id: any, dataSourceId: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isActive: boolean, createdAt: any, updatedAt: any, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null } };+export type DeleteOneObjectMetadataItemMutation = { __typename?: 'Mutation', deleteOneObject: { __typename?: 'Object', id: any, dataSourceId: string, nameSingular: string, namePlural: string, labelSingular: string, labelPlural: string, description?: string | null, icon?: string | null, isCustom: boolean, isActive: boolean, isSearchable: boolean, createdAt: any, updatedAt: any, labelIdentifierFieldMetadataId?: string | null, imageIdentifierFieldMetadataId?: string | null } };export type DeleteOneFieldMetadataItemMutationVariables = Exact<{idToDelete: Scalars['UUID']['input'];@@ -2535,8 +2544,8 @@ export const CreateOneObjectMetadataItemDocument = {"kind":"Document","definitioexport const CreateOneFieldMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateOneFieldMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateOneFieldMetadataInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createOneField"},"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":"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"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}}]}}]}}]} as unknown as DocumentNode<CreateOneFieldMetadataItemMutation, CreateOneFieldMetadataItemMutationVariables>;export const CreateOneRelationMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateOneRelationMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateOneRelationMetadataInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createOneRelationMetadata"},"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":"id"}},{"kind":"Field","name":{"kind":"Name","value":"relationType"}},{"kind":"Field","name":{"kind":"Name","value":"fromObjectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"toObjectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"fromFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"toFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<CreateOneRelationMetadataItemMutation, CreateOneRelationMetadataItemMutationVariables>;export const UpdateOneFieldMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateOneFieldMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"idToUpdate"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"updatePayload"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateFieldInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateOneField"},"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":"idToUpdate"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"update"},"value":{"kind":"Variable","name":{"kind":"Name","value":"updatePayload"}}}]}}],"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"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}}]}}]}}]} as unknown as DocumentNode<UpdateOneFieldMetadataItemMutation, UpdateOneFieldMetadataItemMutationVariables>;-export const UpdateOneObjectMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateOneObjectMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"idToUpdate"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"updatePayload"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateObjectPayload"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateOneObject"},"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":"idToUpdate"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"update"},"value":{"kind":"Variable","name":{"kind":"Name","value":"updatePayload"}}}]}}],"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<UpdateOneObjectMetadataItemMutation, UpdateOneObjectMetadataItemMutationVariables>;-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<DeleteOneObjectMetadataItemMutation, DeleteOneObjectMetadataItemMutationVariables>;+export const UpdateOneObjectMetadataItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateOneObjectMetadataItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"idToUpdate"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"updatePayload"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateObjectPayload"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateOneObject"},"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":"idToUpdate"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"update"},"value":{"kind":"Variable","name":{"kind":"Name","value":"updatePayload"}}}]}}],"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":"isSearchable"}},{"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<UpdateOneObjectMetadataItemMutation, UpdateOneObjectMetadataItemMutationVariables>;+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":"isSearchable"}},{"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<DeleteOneObjectMetadataItemMutation, DeleteOneObjectMetadataItemMutationVariables>;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"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}}]}}]}}]} as unknown as DocumentNode<DeleteOneFieldMetadataItemMutation, DeleteOneFieldMetadataItemMutationVariables>;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<DeleteOneRelationMetadataItemMutation, DeleteOneRelationMetadataItemMutationVariables>;export const ObjectMetadataItemsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ObjectMetadataItems"},"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"}}]}}],"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":"shortcut"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"isSearchable"}},{"kind":"Field","name":{"kind":"Name","value":"duplicateCriteria"}},{"kind":"Field","name":{"kind":"Name","value":"indexMetadatas"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"paging"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"100"}}]}}],"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"indexWhereClause"}},{"kind":"Field","name":{"kind":"Name","value":"indexType"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"indexFieldMetadatas"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"paging"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"first"},"value":{"kind":"IntValue","value":"100"}}]}}],"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"order"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}}]}}]}}]}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"fieldsList"},"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":"isUnique"}},{"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":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"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"}}]}}]}}]}}]} as unknown as DocumentNode<ObjectMetadataItemsQuery, ObjectMetadataItemsQueryVariables>;diff --git a/packages/twenty-front/src/generated/graphql.tsx b/packages/twenty-front/src/generated/graphql.tsxindex c2ffdd9b41d..c3bfd026922 100644--- a/packages/twenty-front/src/generated/graphql.tsx+++ b/packages/twenty-front/src/generated/graphql.tsx@@ -501,7 +501,6 @@ export enum FeatureFlagKey {IsNewRelationEnabled = 'IsNewRelationEnabled',IsPermissionsEnabled = 'IsPermissionsEnabled',IsPostgreSQLIntegrationEnabled = 'IsPostgreSQLIntegrationEnabled',- IsRichTextV2Enabled = 'IsRichTextV2Enabled',IsStripeIntegrationEnabled = 'IsStripeIntegrationEnabled',IsUniqueIndexesEnabled = 'IsUniqueIndexesEnabled',IsWorkflowEnabled = 'IsWorkflowEnabled'@@ -829,6 +828,7 @@ export type Mutation = {sendInvitations: SendInvitationsOutput;signUp: SignUpOutput;skipSyncEmailOnboardingStep: OnboardingStepSuccess;+ submitFormStep: Scalars['Boolean'];track: Analytics;updateBillingSubscription: BillingUpdateOutput;updateLabPublicFeatureFlag: FeatureFlag;@@ -961,6 +961,7 @@ export type MutationEditSsoIdentityProviderArgs = {export type MutationEmailPasswordResetLinkArgs = {email: Scalars['String'];+ workspaceId: Scalars['String'];};@@ -1045,6 +1046,11 @@ export type MutationSignUpArgs = {};+export type MutationSubmitFormStepArgs = {+ input: SubmitFormStepInput;+};++export type MutationTrackArgs = {action: Scalars['String'];payload: Scalars['JSON'];@@ -1293,7 +1299,6 @@ export type Query = {currentWorkspace: Workspace;field: Field;fields: FieldConnection;- findAvailableWorkspacesByEmail: Array<AvailableWorkspaceOutput>;findManyServerlessFunctions: Array<ServerlessFunction>;findOneServerlessFunction: ServerlessFunction;findWorkspaceFromInviteHash: Workspace;@@ -1339,11 +1344,6 @@ export type QueryCheckWorkspaceInviteHashIsValidArgs = {};-export type QueryFindAvailableWorkspacesByEmailArgs = {- email: Scalars['String'];-};--export type QueryFindOneServerlessFunctionArgs = {input: ServerlessFunctionIdInput;};@@ -1665,6 +1665,15 @@ export type SignUpOutput = {workspace: WorkspaceUrlsAndId;};+export type SubmitFormStepInput = {+ /** Form response in JSON format */+ response: Scalars['JSON'];+ /** Workflow version ID */+ stepId: Scalars['String'];+ /** Workflow run ID */+ workflowRunId: Scalars['String'];+};+export enum SubscriptionInterval {Day = 'Day',Month = 'Month',@@ -2152,6 +2161,11 @@ export type GetTimelineThreadsFromPersonIdQueryVariables = Exact<{export type GetTimelineThreadsFromPersonIdQuery = { __typename?: 'Query', getTimelineThreadsFromPersonId: { __typename?: 'TimelineThreadsWithTotal', totalNumberOfThreads: number, timelineThreads: Array<{ __typename?: 'TimelineThread', id: any, read: boolean, visibility: MessageChannelVisibility, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } };+export type EmptyQueryVariables = Exact<{ [key: string]: never; }>;+++export type EmptyQuery = { __typename: 'Query' };+export type TrackMutationVariables = Exact<{action: Scalars['String'];payload: Scalars['JSON'];@@ -2193,6 +2207,7 @@ export type AuthorizeAppMutation = { __typename?: 'Mutation', authorizeApp: { __export type EmailPasswordResetLinkMutationVariables = Exact<{email: Scalars['String'];+ workspaceId: Scalars['String'];}>;@@ -2984,6 +2999,38 @@ export function useGetTimelineThreadsFromPersonIdLazyQuery(baseOptions?: Apollo.export type GetTimelineThreadsFromPersonIdQueryHookResult = ReturnType<typeof useGetTimelineThreadsFromPersonIdQuery>;export type GetTimelineThreadsFromPersonIdLazyQueryHookResult = ReturnType<typeof useGetTimelineThreadsFromPersonIdLazyQuery>;export type GetTimelineThreadsFromPersonIdQueryResult = Apollo.QueryResult<GetTimelineThreadsFromPersonIdQuery, GetTimelineThreadsFromPersonIdQueryVariables>;+export const EmptyDocument = gql`+ query Empty {+ __typename+}+ `;++/**+ * __useEmptyQuery__+ *+ * To run a query within a React component, call `useEmptyQuery` and pass it any options that fit your needs.+ * When your component renders, `useEmptyQuery` 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 } = useEmptyQuery({+ * variables: {+ * },+ * });+ */+export function useEmptyQuery(baseOptions?: Apollo.QueryHookOptions<EmptyQuery, EmptyQueryVariables>) {+ const options = {...defaultOptions, ...baseOptions}+ return Apollo.useQuery<EmptyQuery, EmptyQueryVariables>(EmptyDocument, options);+ }+export function useEmptyLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<EmptyQuery, EmptyQueryVariables>) {+ const options = {...defaultOptions, ...baseOptions}+ return Apollo.useLazyQuery<EmptyQuery, EmptyQueryVariables>(EmptyDocument, options);+ }+export type EmptyQueryHookResult = ReturnType<typeof useEmptyQuery>;+export type EmptyLazyQueryHookResult = ReturnType<typeof useEmptyLazyQuery>;+export type EmptyQueryResult = Apollo.QueryResult<EmptyQuery, EmptyQueryVariables>;export const TrackDocument = gql`mutation Track($action: String!, $payload: JSON!) {track(action: $action, payload: $payload) {@@ -3122,8 +3169,8 @@ export type AuthorizeAppMutationHookResult = ReturnType<typeof useAuthorizeAppMuexport type AuthorizeAppMutationResult = Apollo.MutationResult<AuthorizeAppMutation>;export type AuthorizeAppMutationOptions = Apollo.BaseMutationOptions<AuthorizeAppMutation, AuthorizeAppMutationVariables>;export const EmailPasswordResetLinkDocument = gql`- mutation EmailPasswordResetLink($email: String!) {- emailPasswordResetLink(email: $email) {+ mutation EmailPasswordResetLink($email: String!, $workspaceId: String!) {+ emailPasswordResetLink(email: $email, workspaceId: $workspaceId) {success}}@@ -3144,6 +3191,7 @@ export type EmailPasswordResetLinkMutationFn = Apollo.MutationFunction<EmailPass* const [emailPasswordResetLinkMutation, { data, loading, error }] = useEmailPasswordResetLinkMutation({* variables: {* email: // value for 'email'+ * workspaceId: // value for 'workspaceId'* },* });*/diff --git a/packages/twenty-front/src/modules/auth/graphql/mutations/emailPasswordResetLink.ts b/packages/twenty-front/src/modules/auth/graphql/mutations/emailPasswordResetLink.tsindex dff9e15a315..e02b05f2320 100644--- a/packages/twenty-front/src/modules/auth/graphql/mutations/emailPasswordResetLink.ts+++ b/packages/twenty-front/src/modules/auth/graphql/mutations/emailPasswordResetLink.ts@@ -1,8 +1,8 @@import { gql } from '@apollo/client';-export const EMAIL_PASSWORD_RESET_Link = gql`- mutation EmailPasswordResetLink($email: String!) {- emailPasswordResetLink(email: $email) {+export const EMAIL_PASSWORD_RESET_LINK = gql`+ mutation EmailPasswordResetLink($email: String!, $workspaceId: String!) {+ emailPasswordResetLink(email: $email, workspaceId: $workspaceId) {success}}diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpWorkspaceScopeFormEffect.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpWorkspaceScopeFormEffect.tsxindex 8811127f994..bfffc217dfd 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpWorkspaceScopeFormEffect.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpWorkspaceScopeFormEffect.tsx@@ -97,6 +97,7 @@ export const SignInUpWorkspaceScopeFormEffect = () => {}if (+ signInUpStep !== SignInUpStep.Email &&isDefined(email) &&workspaceAuthProviders.password &&loadingStatus === LoadingStatus.Donediff --git a/packages/twenty-front/src/modules/auth/sign-in-up/hooks/__tests__/useHandleResetPassword.test.ts b/packages/twenty-front/src/modules/auth/sign-in-up/hooks/__tests__/useHandleResetPassword.test.tsindex b7b774e5736..eaf3bf1e998 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/hooks/__tests__/useHandleResetPassword.test.ts+++ b/packages/twenty-front/src/modules/auth/sign-in-up/hooks/__tests__/useHandleResetPassword.test.ts@@ -7,8 +7,12 @@ import { SOURCE_LOCALE } from 'twenty-shared';import { useHandleResetPassword } from '@/auth/sign-in-up/hooks/useHandleResetPassword';import { SnackBarVariant } from '@/ui/feedback/snack-bar-manager/components/SnackBar';import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';-import { useEmailPasswordResetLinkMutation } from '~/generated/graphql';+import {+ PublicWorkspaceDataOutput,+ useEmailPasswordResetLinkMutation,+} from '~/generated/graphql';import { dynamicActivate } from '~/utils/i18n/dynamicActivate';+import { workspacePublicDataState } from '@/auth/states/workspacePublicDataState';// Mocksjest.mock('@/ui/feedback/snack-bar-manager/hooks/useSnackBar');@@ -19,7 +23,14 @@ dynamicActivate(SOURCE_LOCALE);const renderHooks = () => {const { result } = renderHook(() => useHandleResetPassword(), {wrapper: ({ children }) =>- RecoilRoot({ children: I18nProvider({ i18n, children }) }),+ RecoilRoot({+ initializeState: ({ set }) => {+ set(workspacePublicDataState, {+ id: 'workspace-id',+ } as PublicWorkspaceDataOutput);+ },+ children: I18nProvider({ i18n, children }),+ }),});return { result };};diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useHandleResetPassword.ts b/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useHandleResetPassword.tsindex 7cbcfe283a8..8e080143aee 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useHandleResetPassword.ts+++ b/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useHandleResetPassword.ts@@ -4,14 +4,20 @@ import { SnackBarVariant } from '@/ui/feedback/snack-bar-manager/components/Snacimport { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';import { useLingui } from '@lingui/react/macro';import { useEmailPasswordResetLinkMutation } from '~/generated/graphql';+import { workspacePublicDataState } from '@/auth/states/workspacePublicDataState';+import { useRecoilValue } from 'recoil';+import { currentUserState } from '@/auth/states/currentUserState';export const useHandleResetPassword = () => {const { enqueueSnackBar } = useSnackBar();const [emailPasswordResetLink] = useEmailPasswordResetLinkMutation();+ const workspacePublicData = useRecoilValue(workspacePublicDataState);+ const currentUser = useRecoilValue(currentUserState);+const { t } = useLingui();const handleResetPassword = useCallback(- (email: string) => {+ (email = currentUser?.email) => {return async () => {if (!email) {enqueueSnackBar(t`Invalid email`, {@@ -20,9 +26,16 @@ export const useHandleResetPassword = () => {return;}+ if (!workspacePublicData?.id) {+ enqueueSnackBar(t`Invalid workspace`, {+ variant: SnackBarVariant.Error,+ });+ return;+ }+try {const { data } = await emailPasswordResetLink({- variables: { email },+ variables: { email, workspaceId: workspacePublicData.id },});if (data?.emailPasswordResetLink?.success === true) {@@ -41,7 +54,13 @@ export const useHandleResetPassword = () => {}};},- [enqueueSnackBar, emailPasswordResetLink, t],+ [+ currentUser?.email,+ workspacePublicData?.id,+ enqueueSnackBar,+ t,+ emailPasswordResetLink,+ ],);return { handleResetPassword };diff --git a/packages/twenty-front/src/modules/settings/profile/components/ChangePassword.tsx b/packages/twenty-front/src/modules/settings/profile/components/ChangePassword.tsxindex 2f9a504c873..7c31a174429 100644--- a/packages/twenty-front/src/modules/settings/profile/components/ChangePassword.tsx+++ b/packages/twenty-front/src/modules/settings/profile/components/ChangePassword.tsx@@ -1,50 +1,12 @@-import { useRecoilValue } from 'recoil';import { Button, H2Title } from 'twenty-ui';-import { currentUserState } from '@/auth/states/currentUserState';-import { SnackBarVariant } from '@/ui/feedback/snack-bar-manager/components/SnackBar';-import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';import { useLingui } from '@lingui/react/macro';-import { useEmailPasswordResetLinkMutation } from '~/generated/graphql';+import { useHandleResetPassword } from '@/auth/sign-in-up/hooks/useHandleResetPassword';export const ChangePassword = () => {const { t } = useLingui();- const { enqueueSnackBar } = useSnackBar();-- const currentUser = useRecoilValue(currentUserState);-- const [emailPasswordResetLink] = useEmailPasswordResetLinkMutation();-- const handlePasswordResetClick = async () => {- if (!currentUser?.email) {- enqueueSnackBar(t`Invalid email`, {- variant: SnackBarVariant.Error,- });- return;- }-- try {- const { data } = await emailPasswordResetLink({- variables: {- email: currentUser.email,- },- });- if (data?.emailPasswordResetLink?.success === true) {- enqueueSnackBar(t`Password reset link has been sent to the email`, {- variant: SnackBarVariant.Success,- });- } else {- enqueueSnackBar(t`There was an issue`, {- variant: SnackBarVariant.Error,- });- }- } catch (error) {- enqueueSnackBar((error as Error).message, {- variant: SnackBarVariant.Error,- });- }- };+ const { handleResetPassword } = useHandleResetPassword();return (<>@@ -53,7 +15,7 @@ export const ChangePassword = () => {description={t`Receive an email containing password update link`}/><Button- onClick={handlePasswordResetClick}+ onClick={handleResetPassword()}variant="secondary"title={t`Change Password`}/>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.tsindex c29d5d53da4..bbe5e70395c 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@@ -24,7 +24,6 @@ import {AuthException,AuthExceptionCode,} from 'src/engine/core-modules/auth/auth.exception';-import { AvailableWorkspaceOutput } from 'src/engine/core-modules/auth/dto/available-workspaces.output';import { GetAuthorizationUrlForSSOInput } from 'src/engine/core-modules/auth/dto/get-authorization-url-for-sso.input';import { GetAuthorizationUrlForSSOOutput } from 'src/engine/core-modules/auth/dto/get-authorization-url-for-sso.output';import { GetLoginTokenFromEmailVerificationTokenInput } from 'src/engine/core-modules/auth/dto/get-login-token-from-email-verification-token.input';@@ -366,6 +365,7 @@ export class AuthResolver {const resetToken =await this.resetPasswordService.generatePasswordResetToken(emailPasswordResetInput.email,+ emailPasswordResetInput.workspaceId,);return await this.resetPasswordService.sendEmailPasswordResetLink(@@ -403,11 +403,4 @@ export class AuthResolver {args.passwordResetToken,);}-- @Query(() => [AvailableWorkspaceOutput])- async findAvailableWorkspacesByEmail(- @Args('email') email: string,- ): Promise<AvailableWorkspaceOutput[]> {- return this.userWorkspaceService.findAvailableWorkspacesByEmail(email);- }}diff --git a/packages/twenty-server/src/engine/core-modules/auth/dto/email-password-reset-link.input.ts b/packages/twenty-server/src/engine/core-modules/auth/dto/email-password-reset-link.input.tsindex f73a2a6708c..cdfc2174742 100644--- a/packages/twenty-server/src/engine/core-modules/auth/dto/email-password-reset-link.input.ts+++ b/packages/twenty-server/src/engine/core-modules/auth/dto/email-password-reset-link.input.ts@@ -1,6 +1,6 @@import { ArgsType, Field } from '@nestjs/graphql';-import { IsEmail, IsNotEmpty } from 'class-validator';+import { IsEmail, IsNotEmpty, IsString } from 'class-validator';@ArgsType()export class EmailPasswordResetLinkInput {@@ -8,4 +8,9 @@ export class EmailPasswordResetLinkInput {@IsNotEmpty()@IsEmail()email: string;++ @Field(() => String)+ @IsNotEmpty()+ @IsString()+ workspaceId: string;}diff --git a/packages/twenty-server/src/engine/core-modules/auth/dto/token.entity.ts b/packages/twenty-server/src/engine/core-modules/auth/dto/token.entity.tsindex 3f6872dc4d0..997124675ce 100644--- a/packages/twenty-server/src/engine/core-modules/auth/dto/token.entity.ts+++ b/packages/twenty-server/src/engine/core-modules/auth/dto/token.entity.ts@@ -37,4 +37,7 @@ export class PasswordResetToken {@Field(() => Date)passwordResetTokenExpiresAt: Date;++ @Field(() => String)+ workspaceId: string;}diff --git a/packages/twenty-server/src/engine/core-modules/auth/services/reset-password.service.spec.ts b/packages/twenty-server/src/engine/core-modules/auth/services/reset-password.service.spec.tsindex 30d4ff074c5..2939b9b3b2f 100644--- a/packages/twenty-server/src/engine/core-modules/auth/services/reset-password.service.spec.ts+++ b/packages/twenty-server/src/engine/core-modules/auth/services/reset-password.service.spec.ts@@ -20,9 +20,11 @@ import { ResetPasswordService } from './reset-password.service';describe('ResetPasswordService', () => {let service: ResetPasswordService;let userRepository: Repository<User>;+ let workspaceRepository: Repository<Workspace>;let appTokenRepository: Repository<AppToken>;let emailService: EmailService;let environmentService: EnvironmentService;+ let domainManagerService: DomainManagerService;beforeEach(async () => {const module: TestingModule = await Test.createTestingModule({@@ -32,6 +34,10 @@ describe('ResetPasswordService', () => {provide: getRepositoryToken(User, 'core'),useClass: Repository,},+ {+ provide: getRepositoryToken(Workspace, 'core'),+ useClass: Repository,+ },{provide: getRepositoryToken(AppToken, 'core'),useClass: Repository,@@ -52,6 +58,7 @@ describe('ResetPasswordService', () => {getBaseUrl: jest.fn().mockResolvedValue(new URL('http://localhost:3001')),+ buildWorkspaceURL: jest.fn(),},},{@@ -67,11 +74,16 @@ describe('ResetPasswordService', () => {userRepository = module.get<Repository<User>>(getRepositoryToken(User, 'core'),);+ workspaceRepository = module.get<Repository<Workspace>>(+ getRepositoryToken(Workspace, 'core'),+ );appTokenRepository = module.get<Repository<AppToken>>(getRepositoryToken(AppToken, 'core'),);emailService = module.get<EmailService>(EmailService);environmentService = module.get<EnvironmentService>(EnvironmentService);+ domainManagerService =+ module.get<DomainManagerService>(DomainManagerService);});it('should be defined', () => {@@ -89,8 +101,10 @@ describe('ResetPasswordService', () => {jest.spyOn(appTokenRepository, 'save').mockResolvedValue({} as AppToken);jest.spyOn(environmentService, 'get').mockReturnValue('1h');- const result =- await service.generatePasswordResetToken('[email protected]');+ const result = await service.generatePasswordResetToken(+ '[email protected]',+ 'workspace-id',+ );expect(result.passwordResetToken).toBeDefined();expect(result.passwordResetTokenExpiresAt).toBeDefined();@@ -106,7 +120,10 @@ describe('ResetPasswordService', () => {jest.spyOn(userRepository, 'findOneBy').mockResolvedValue(null);await expect(- service.generatePasswordResetToken('[email protected]'),+ service.generatePasswordResetToken(+ '[email protected]',+ 'workspace-id',+ ),).rejects.toThrow(AuthException);});@@ -115,6 +132,7 @@ describe('ResetPasswordService', () => {const mockExistingToken = {userId: '1',type: AppTokenType.PasswordResetToken,+ workspaceId: 'workspace-id',expiresAt: addMilliseconds(new Date(), 3600000),};@@ -126,7 +144,7 @@ describe('ResetPasswordService', () => {.mockResolvedValue(mockExistingToken as AppToken);await expect(- service.generatePasswordResetToken('[email protected]'),+ service.generatePasswordResetToken('[email protected]', 'workspace-id'),).rejects.toThrow(AuthException);});});@@ -135,6 +153,7 @@ describe('ResetPasswordService', () => {it('should send a password reset email', async () => {const mockUser = { id: '1', email: '[email protected]' };const mockToken = {+ workspaceId: 'workspace-id',passwordResetToken: 'token123',passwordResetTokenExpiresAt: new Date(),};@@ -142,9 +161,19 @@ describe('ResetPasswordService', () => {jest.spyOn(userRepository, 'findOneBy').mockResolvedValue(mockUser as User);+ jest+ .spyOn(workspaceRepository, 'findOneBy')+ .mockResolvedValue({ id: 'workspace-id' } as Workspace);jest.spyOn(environmentService, 'get').mockReturnValue('http://localhost:3000');+ jest+ .spyOn(domainManagerService, 'buildWorkspaceURL')+ .mockReturnValue(+ new URL(+ 'https://subdomain.localhost.com:3000/reset-password/passwordResetToken',+ ),+ );const result = await service.sendEmailPasswordResetLink(mockToken,diff --git a/packages/twenty-server/src/engine/core-modules/auth/services/reset-password.service.ts b/packages/twenty-server/src/engine/core-modules/auth/services/reset-password.service.tsindex 992462fba21..db4a5ce295a 100644--- a/packages/twenty-server/src/engine/core-modules/auth/services/reset-password.service.ts+++ b/packages/twenty-server/src/engine/core-modules/auth/services/reset-password.service.ts@@ -28,6 +28,8 @@ import { DomainManagerService } from 'src/engine/core-modules/domain-manager/serimport { EmailService } from 'src/engine/core-modules/email/email.service';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 { workspaceValidator } from 'src/engine/core-modules/workspace/workspace.validate';@Injectable()export class ResetPasswordService {@@ -36,12 +38,17 @@ export class ResetPasswordService {private readonly domainManagerService: DomainManagerService,@InjectRepository(User, 'core')private readonly userRepository: Repository<User>,+ @InjectRepository(Workspace, 'core')+ private readonly workspaceRepository: Repository<Workspace>,@InjectRepository(AppToken, 'core')private readonly appTokenRepository: Repository<AppToken>,private readonly emailService: EmailService,) {}- async generatePasswordResetToken(email: string): Promise<PasswordResetToken> {+ async generatePasswordResetToken(+ email: string,+ workspaceId: string,+ ): Promise<PasswordResetToken> {const user = await this.userRepository.findOneBy({email,});@@ -95,12 +102,14 @@ export class ResetPasswordService {await this.appTokenRepository.save({userId: user.id,+ workspaceId: workspaceId,value: hashedResetToken,expiresAt,type: AppTokenType.PasswordResetToken,});return {+ workspaceId,passwordResetToken: plainResetToken,passwordResetTokenExpiresAt: expiresAt,};@@ -122,12 +131,19 @@ export class ResetPasswordService {);}- const frontBaseURL = this.domainManagerService.getBaseUrl();+ const workspace = await this.workspaceRepository.findOneBy({+ id: resetToken.workspaceId,+ });++ workspaceValidator.assertIsDefinedOrThrow(workspace);- frontBaseURL.pathname = `/reset-password/${resetToken.passwordResetToken}`;+ const link = this.domainManagerService.buildWorkspaceURL({+ workspace,+ pathname: `/reset-password/${resetToken.passwordResetToken}`,+ });const emailData = {- link: frontBaseURL.toString(),+ link: link.toString(),duration: ms(differenceInMilliseconds(resetToken.passwordResetTokenExpiresAt,