Skip to content

Commit d6a665f

Browse files
Merge branch 'twentyhq:main' into 6138_DataImporter-incorret-unmactedFields
2 parents f3a8c3d + 47ddc7b commit d6a665f

File tree

335 files changed

+9093
-3544
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

335 files changed

+9093
-3544
lines changed

nx.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
"options": {
163163
"cwd": "{projectRoot}",
164164
"commands": [
165-
"test-storybook --url http://localhost:{args.port} --maxWorkers=3"
165+
"test-storybook --url http://localhost:{args.port} --maxWorkers=2"
166166
],
167167
"port": 6006
168168
}

package.json

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"@air/react-drag-to-select": "^5.0.8",
44
"@apollo/client": "^3.7.17",
55
"@apollo/server": "^4.7.3",
6+
"@aws-sdk/client-lambda": "^3.614.0",
67
"@aws-sdk/client-s3": "^3.363.0",
78
"@aws-sdk/credential-providers": "^3.363.0",
89
"@blocknote/core": "^0.12.1",
@@ -70,6 +71,8 @@
7071
"afterframe": "^1.0.2",
7172
"apollo-server-express": "^3.12.0",
7273
"apollo-upload-client": "^17.0.0",
74+
"archiver": "^7.0.1",
75+
"aws-sdk": "^2.1658.0",
7376
"axios": "^1.6.2",
7477
"bcrypt": "^5.1.1",
7578
"better-sqlite3": "^9.2.2",
@@ -93,6 +96,7 @@
9396
"facepaint": "^1.2.1",
9497
"file-type": "16.5.4",
9598
"framer-motion": "^10.12.17",
99+
"fs-extra": "^11.2.0",
96100
"googleapis": "105",
97101
"graphiql": "^3.1.1",
98102
"graphql": "16.8.0",

packages/twenty-chrome-extension/src/generated/graphql.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { gql } from '@apollo/client';
21
import * as Apollo from '@apollo/client';
2+
import { gql } from '@apollo/client';
33
export type Maybe<T> = T | null;
44
export type InputMaybe<T> = Maybe<T>;
55
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
@@ -2528,7 +2528,6 @@ export enum FieldMetadataType {
25282528
Numeric = 'NUMERIC',
25292529
Phone = 'PHONE',
25302530
Position = 'POSITION',
2531-
Probability = 'PROBABILITY',
25322531
Rating = 'RATING',
25332532
RawJson = 'RAW_JSON',
25342533
Relation = 'RELATION',

packages/twenty-emails/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twenty-emails",
3-
"version": "0.21.0",
3+
"version": "0.22.0",
44
"description": "",
55
"author": "",
66
"private": true,

packages/twenty-front/jest.config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const jestConfig: JestConfigWithTsJest = {
2424
extensionsToTreatAsEsm: ['.ts', '.tsx'],
2525
coverageThreshold: {
2626
global: {
27-
statements: 65,
28-
lines: 64,
27+
statements: 64,
28+
lines: 63,
2929
functions: 55,
3030
},
3131
},

packages/twenty-front/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twenty-front",
3-
"version": "0.21.0",
3+
"version": "0.22.0",
44
"private": true,
55
"type": "module",
66
"scripts": {

packages/twenty-front/src/generated-metadata/graphql.ts

+95-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ export type Scalars = {
2626
Upload: { input: any; output: any; }
2727
};
2828

29+
export type AisqlQueryResult = {
30+
__typename?: 'AISQLQueryResult';
31+
queryFailedErrorMessage?: Maybe<Scalars['String']['output']>;
32+
sqlQuery: Scalars['String']['output'];
33+
sqlQueryResult?: Maybe<Scalars['String']['output']>;
34+
};
35+
2936
export type ActivateWorkspaceInput = {
3037
displayName?: InputMaybe<Scalars['String']['input']>;
3138
};
@@ -333,7 +340,6 @@ export enum FieldMetadataType {
333340
Numeric = 'NUMERIC',
334341
Phone = 'PHONE',
335342
Position = 'POSITION',
336-
Probability = 'PROBABILITY',
337343
Rating = 'RATING',
338344
RawJson = 'RAW_JSON',
339345
Relation = 'RELATION',
@@ -346,6 +352,7 @@ export enum FileFolder {
346352
Attachment = 'Attachment',
347353
PersonPicture = 'PersonPicture',
348354
ProfilePicture = 'ProfilePicture',
355+
ServerlessFunction = 'ServerlessFunction',
349356
WorkspaceLogo = 'WorkspaceLogo'
350357
}
351358

@@ -398,6 +405,7 @@ export type Mutation = {
398405
createOneObject: Object;
399406
createOneRelation: Relation;
400407
createOneRemoteServer: RemoteServer;
408+
createOneServerlessFunction: ServerlessFunction;
401409
deleteCurrentWorkspace: Workspace;
402410
deleteOneField: Field;
403411
deleteOneObject: Object;
@@ -408,6 +416,7 @@ export type Mutation = {
408416
emailPasswordResetLink: EmailPasswordResetLink;
409417
enablePostgresProxy: PostgresCredentials;
410418
exchangeAuthorizationCode: ExchangeAuthCode;
419+
executeOneServerlessFunction: ServerlessFunctionExecutionResult;
411420
generateApiKeyToken: ApiKeyToken;
412421
generateJWT: AuthTokens;
413422
generateTransientToken: TransientToken;
@@ -489,6 +498,12 @@ export type MutationCreateOneRemoteServerArgs = {
489498
};
490499

491500

501+
export type MutationCreateOneServerlessFunctionArgs = {
502+
file: Scalars['Upload']['input'];
503+
name: Scalars['String']['input'];
504+
};
505+
506+
492507
export type MutationDeleteOneFieldArgs = {
493508
input: DeleteOneFieldInput;
494509
};
@@ -521,6 +536,12 @@ export type MutationExchangeAuthorizationCodeArgs = {
521536
};
522537

523538

539+
export type MutationExecuteOneServerlessFunctionArgs = {
540+
name: Scalars['String']['input'];
541+
payload?: InputMaybe<Scalars['JSON']['input']>;
542+
};
543+
544+
524545
export type MutationGenerateApiKeyTokenArgs = {
525546
apiKeyId: Scalars['String']['input'];
526547
expiresAt: Scalars['String']['input'];
@@ -708,6 +729,7 @@ export type Query = {
708729
findManyRemoteServersByType: Array<RemoteServer>;
709730
findOneRemoteServerById: RemoteServer;
710731
findWorkspaceFromInviteHash: Workspace;
732+
getAISQLQuery: AisqlQueryResult;
711733
getPostgresCredentials?: Maybe<PostgresCredentials>;
712734
getProductPrices: ProductPricesEntity;
713735
getTimelineCalendarEventsFromCompanyId: TimelineCalendarEventsWithTotal;
@@ -718,6 +740,8 @@ export type Query = {
718740
objects: ObjectConnection;
719741
relation: Relation;
720742
relations: RelationConnection;
743+
serverlessFunction: ServerlessFunction;
744+
serverlessFunctions: ServerlessFunctionConnection;
721745
validatePasswordResetToken: ValidatePasswordResetToken;
722746
};
723747

@@ -769,6 +793,11 @@ export type QueryFindWorkspaceFromInviteHashArgs = {
769793
};
770794

771795

796+
export type QueryGetAisqlQueryArgs = {
797+
text: Scalars['String']['input'];
798+
};
799+
800+
772801
export type QueryGetProductPricesArgs = {
773802
product: Scalars['String']['input'];
774803
};
@@ -823,6 +852,18 @@ export type QueryRelationsArgs = {
823852
};
824853

825854

855+
export type QueryServerlessFunctionArgs = {
856+
id: Scalars['UUID']['input'];
857+
};
858+
859+
860+
export type QueryServerlessFunctionsArgs = {
861+
filter?: ServerlessFunctionFilter;
862+
paging?: CursorPaging;
863+
sorting?: Array<ServerlessFunctionSort>;
864+
};
865+
866+
826867
export type QueryValidatePasswordResetTokenArgs = {
827868
passwordResetToken: Scalars['String']['input'];
828869
};
@@ -916,6 +957,26 @@ export type Sentry = {
916957
release?: Maybe<Scalars['String']['output']>;
917958
};
918959

960+
export type ServerlessFunctionConnection = {
961+
__typename?: 'ServerlessFunctionConnection';
962+
/** Array of edges. */
963+
edges: Array<ServerlessFunctionEdge>;
964+
/** Paging information */
965+
pageInfo: PageInfo;
966+
};
967+
968+
export type ServerlessFunctionExecutionResult = {
969+
__typename?: 'ServerlessFunctionExecutionResult';
970+
/** Execution result in JSON format */
971+
result: Scalars['JSON']['output'];
972+
};
973+
974+
/** SyncStatus of the serverlessFunction */
975+
export enum ServerlessFunctionSyncStatus {
976+
NotReady = 'NOT_READY',
977+
Ready = 'READY'
978+
}
979+
919980
export type SessionEntity = {
920981
__typename?: 'SessionEntity';
921982
url?: Maybe<Scalars['String']['output']>;
@@ -1346,6 +1407,39 @@ export type RelationEdge = {
13461407
node: Relation;
13471408
};
13481409

1410+
export type ServerlessFunction = {
1411+
__typename?: 'serverlessFunction';
1412+
createdAt: Scalars['DateTime']['output'];
1413+
id: Scalars['UUID']['output'];
1414+
name: Scalars['String']['output'];
1415+
syncStatus: ServerlessFunctionSyncStatus;
1416+
updatedAt: Scalars['DateTime']['output'];
1417+
};
1418+
1419+
export type ServerlessFunctionEdge = {
1420+
__typename?: 'serverlessFunctionEdge';
1421+
/** Cursor for this node. */
1422+
cursor: Scalars['ConnectionCursor']['output'];
1423+
/** The node containing the serverlessFunction */
1424+
node: ServerlessFunction;
1425+
};
1426+
1427+
export type ServerlessFunctionFilter = {
1428+
and?: InputMaybe<Array<ServerlessFunctionFilter>>;
1429+
id?: InputMaybe<UuidFilterComparison>;
1430+
or?: InputMaybe<Array<ServerlessFunctionFilter>>;
1431+
};
1432+
1433+
export type ServerlessFunctionSort = {
1434+
direction: SortDirection;
1435+
field: ServerlessFunctionSortFields;
1436+
nulls?: InputMaybe<SortNulls>;
1437+
};
1438+
1439+
export enum ServerlessFunctionSortFields {
1440+
Id = 'id'
1441+
}
1442+
13491443
export type RemoteServerFieldsFragment = { __typename?: 'RemoteServer', id: string, createdAt: any, foreignDataWrapperId: string, foreignDataWrapperOptions?: any | null, foreignDataWrapperType: string, updatedAt: any, schema?: string | null, label: string, userMappingOptions?: { __typename?: 'UserMappingOptionsUser', user?: string | null } | null };
13501444

13511445
export type RemoteTableFieldsFragment = { __typename?: 'RemoteTable', id?: any | null, name: string, schema?: string | null, status: RemoteTableStatus, schemaPendingUpdates?: Array<DistantTableUpdate> | null };

packages/twenty-front/src/generated/graphql.tsx

+38-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ export enum FieldMetadataType {
246246
Numeric = 'NUMERIC',
247247
Phone = 'PHONE',
248248
Position = 'POSITION',
249-
Probability = 'PROBABILITY',
250249
Rating = 'RATING',
251250
RawJson = 'RAW_JSON',
252251
Relation = 'RELATION',
@@ -259,6 +258,7 @@ export enum FileFolder {
259258
Attachment = 'Attachment',
260259
PersonPicture = 'PersonPicture',
261260
ProfilePicture = 'ProfilePicture',
261+
ServerlessFunction = 'ServerlessFunction',
262262
WorkspaceLogo = 'WorkspaceLogo'
263263
}
264264

@@ -684,6 +684,26 @@ export type Sentry = {
684684
release?: Maybe<Scalars['String']>;
685685
};
686686

687+
export type ServerlessFunctionConnection = {
688+
__typename?: 'ServerlessFunctionConnection';
689+
/** Array of edges. */
690+
edges: Array<ServerlessFunctionEdge>;
691+
/** Paging information */
692+
pageInfo: PageInfo;
693+
};
694+
695+
export type ServerlessFunctionExecutionResult = {
696+
__typename?: 'ServerlessFunctionExecutionResult';
697+
/** Execution result in JSON format */
698+
result: Scalars['JSON'];
699+
};
700+
701+
/** SyncStatus of the serverlessFunction */
702+
export enum ServerlessFunctionSyncStatus {
703+
NotReady = 'NOT_READY',
704+
Ready = 'READY'
705+
}
706+
687707
export type SessionEntity = {
688708
__typename?: 'SessionEntity';
689709
url?: Maybe<Scalars['String']>;
@@ -1065,6 +1085,23 @@ export type RelationEdge = {
10651085
node: Relation;
10661086
};
10671087

1088+
export type ServerlessFunction = {
1089+
__typename?: 'serverlessFunction';
1090+
createdAt: Scalars['DateTime'];
1091+
id: Scalars['UUID'];
1092+
name: Scalars['String'];
1093+
syncStatus: ServerlessFunctionSyncStatus;
1094+
updatedAt: Scalars['DateTime'];
1095+
};
1096+
1097+
export type ServerlessFunctionEdge = {
1098+
__typename?: 'serverlessFunctionEdge';
1099+
/** Cursor for this node. */
1100+
cursor: Scalars['ConnectionCursor'];
1101+
/** The node containing the serverlessFunction */
1102+
node: ServerlessFunction;
1103+
};
1104+
10681105
export type TimelineCalendarEventFragmentFragment = { __typename?: 'TimelineCalendarEvent', id: any, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: CalendarChannelVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> };
10691106

10701107
export type TimelineCalendarEventParticipantFragmentFragment = { __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string };
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { overlayScrollbarsState } from '@/ui/utilities/scroll/states/overlayScrollbarsState';
2+
import { useRecoilCallback } from 'recoil';
3+
4+
export const useScrollToPosition = () => {
5+
const scrollToPosition = useRecoilCallback(
6+
({ snapshot }) =>
7+
(scrollPositionInPx: number) => {
8+
const overlayScrollbars = snapshot
9+
.getLoadable(overlayScrollbarsState)
10+
.getValue();
11+
12+
const scrollWrapper = overlayScrollbars?.elements().viewport;
13+
14+
scrollWrapper?.scrollTo({ top: scrollPositionInPx });
15+
},
16+
[],
17+
);
18+
19+
return { scrollToPosition };
20+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { CalendarEvent } from '@/activities/calendar/types/CalendarEvent';
2+
import { useUpsertRecordsInStore } from '@/object-record/record-store/hooks/useUpsertRecordsInStore';
3+
import { useEffect } from 'react';
4+
5+
type CalendarEventDetailsEffectProps = {
6+
record: CalendarEvent;
7+
};
8+
9+
export const CalendarEventDetailsEffect = ({
10+
record,
11+
}: CalendarEventDetailsEffectProps) => {
12+
const { upsertRecords } = useUpsertRecordsInStore();
13+
14+
useEffect(() => {
15+
if (!record) {
16+
return;
17+
}
18+
19+
upsertRecords([record]);
20+
}, [record, upsertRecords]);
21+
22+
return <></>;
23+
};

0 commit comments

Comments
 (0)