339aee6dbb
Run queries within queryRunner transaction sequentially ( #5668 )
...
Within a queryRunner transaction, it is important that migrations are
run subsequently and not concurrently: otherwise if an error is thrown
by one of the query, it will abort the transaction; any subsequent query
running on the same queryRunner will cause the error _current
transaction is aborted, commands ignored until end of transaction
block_.
Using an async function in a map as below does not guarantee that each
query terminates before iterating over the next one, which can be an
issue as described above, and which seems to cause [this
sentry](https://twenty-v7.sentry.io/issues/5258406553/?environment=prod&project=4507072499810304&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=7d&stream_index=4 ).
2024-05-30 10:45:46 +02:00
5bb205bd6a
Fix update remote field metadata ( #5638 )
...
Closes #5610 .
& update fetch-policy when fetching database on the remote databases
show page to get freshest status.
2024-05-28 18:01:05 +02:00
ebb1aa0377
Add label to remote server ( #5637 )
...
Added label on remote server entity.
Also added the possibility to update schema.
<img width="688" alt="Capture d’écran 2024-05-28 à 15 36 31"
src="https://github.com/twentyhq/twenty/assets/22936103/c9786122-8459-4876-833e-c9a1d7d27829 ">
2024-05-28 15:54:57 +02:00
ae6d5afdfc
Add missing stripe tables ( #5621 )
...
As title
Still adding not working tables / columns commented so we know why these
are not available.
2024-05-28 11:32:57 +02:00
930237e778
Bump to version v0.12.1 ( #5608 )
2024-05-27 16:07:38 +02:00
f58c961d98
Remove feature flag for Links field ( #5606 )
2024-05-27 16:05:22 +02:00
857971458a
Bump version to v0.12.0 ( #5604 )
2024-05-27 15:16:50 +02:00
2f52e0fdb6
5505 forgot password feature broken ( #5602 )
...
- add missing `excludedOperations` in
`packages/twenty-server/src/engine/middlewares/graphql-hydrate-request-from-token.middleware.ts`
- update generated graphql file
- Add missing redirection to index after password update
2024-05-27 15:13:11 +02:00
def1774bf0
[Fix] Object names should be camel cased ( #5571 )
...
as per title
2024-05-25 10:29:00 +02:00
936ac4027a
Introduce a new feature flag for contact creation ( #5570 )
...
Introduce new feature flag
`IS_CONTACT_CREATION_FOR_SENT_AND_RECEIVED_EMAILS_ENABLED` to allow
contacts to be created for sent and received emails.
2024-05-24 18:55:21 +02:00
3680647c9a
Fix sync token is no longer valid in calendar sync ( #5563 )
...
Fix sync token is no longer valid in calendar sync.
https://developers.google.com/apps-script/add-ons/calendar/conferencing/sync-calendar-changes#implement_a_sync_trigger_function
_Caution: Occasionally sync tokens are invalidated by the server,
resulting in a Sync token is no longer valid error. When this happens,
your code should conduct a full sync and replace any stored sync tokens
you have._
2024-05-24 18:33:44 +02:00
87465b13ee
5507 modify the partial sync cron to work with the new statuses ( #5512 )
...
Closes #5507
2024-05-24 18:27:54 +02:00
18fafbdeb5
Rename findAvailableTables endpoint ( #5557 )
...
As title
2024-05-24 10:57:46 +02:00
4bd0aafb8e
[fix] Update remote table sync status in cache after schema update ( #5553 )
...
Upon schema update, sync status can change from synced to non_synced in
case the update regards a table that was deleted. Let's update the sync
status too to avoid displaying the table as still synchronized.
https://github.com/twentyhq/twenty/assets/51697796/7ff2342b-ce9f-4179-9b76-940617cf1292
2024-05-24 10:20:08 +02:00
fede721ba8
Add sorter for distant tables ( #5546 )
...
As title
2024-05-23 22:36:50 +02:00
fe5b558477
[FE] Update remote table schema + refactor Tables list ( #5548 )
...
Closes #5062 .
Refactoring tables list to avoid rendering all toggles on each sync or
schema update while using fresh data:
- introducing id for RemoteTables in apollo cache
- manually updating the cache for the record that was updated after a
sync or schema update instead of fetching all tables again
2024-05-23 17:00:24 +02:00
0d6fe7b2b4
Handle relations separately for remotes ( #5538 )
...
Remote object id columns are not removed anymore when a remote object is
unsynced.
This is because we do not use relations anymore. We only created the id
field. So the current behavior that was implemented for custom objects,
to retrieve the fields to deleted, does not work.
Since remote object relations are really different, I extracted the
logic from `objectMetadataService`. It now handles only the relations
for custom objects creation and deletion (this part should be extracted
as well).
I create a new remote table relation service that will:
- fetch objects metadata linked to remotes (favorites,
activityTargets...)
- look for columns based on remote object name
- delete the fields and columns
2024-05-23 14:59:34 +02:00
453525ca25
fix: workspace health showing error for multi select ( #5547 )
...
Fix `workspace:health` command not working properly with `MULTI_SELECT`
field metadata type.
2024-05-23 12:02:40 +02:00
7b1bea3a8a
Release patch v0.11.3
2024-05-23 08:41:37 +02:00
6b1d4e0744
[Fix] Do not allow names with whitespaces ( #5542 )
...
As per title
2024-05-23 07:43:09 +02:00
04bf697b25
feat: add feature flag to activate Links field creation ( #5535 )
...
Related issue: #3607
2024-05-22 18:06:32 +02:00
4e533bf2ef
fix pgGraphqlQuery with concurent search path ( #5537 )
2024-05-22 17:14:33 +02:00
5448512bdc
Add quotes for table name ( #5533 )
...
As title
2024-05-22 14:21:32 +02:00
bb6df43d17
fix: twentyORM datasource configuration for ssl ( #5529 )
...
We need to specify ssl configuration for TwentyORM datasources when
needed, otherwise connection will be broken.
2024-05-22 11:11:05 +02:00
beaaf33544
5498 create a feature flag is gmail sync v2 enabled ( #5501 )
...
Closes #5498
2024-05-22 09:25:06 +02:00
3deda2f29a
Update foreign table to distant table schema ( #5508 )
...
Closes #5069 back-end part
And:
- do not display schemaPendingUpdates status on remote server lists as
this call will become too costly if there are dozens of servers
- (refacto) create foreignTableService
After this is merged we will be able to delete remoteTable's
availableTables column
2024-05-21 21:25:38 +02:00
36b467d301
Fix storybook tests ( #5487 )
...
Fixes #5486
---------
Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com >
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: Charles Bochet <charles@twenty.com >
2024-05-21 20:24:08 +02:00
e47101e08b
5483 modify messagechannel syncstatus ( #5484 )
...
- Closes #5483
- Fix seeds
- Add default value to syncSubStatus
2024-05-21 13:31:39 +02:00
66a23a852f
fix: unwanted change moving back datetime to date ( #5499 )
...
Moving back datetime to date, due to an unwanted change.
2024-05-21 13:29:59 +02:00
ec248f8605
Remove dumb code placement ( #5494 )
...
Fix a bug introduced in [this
PR](https://github.com/twentyhq/twenty/pull/5254/files )
When a subscription is created, we need to create the subscription,
#5254 return if no subscription is created so the sub can never be
created at all
This PR fixes that
2024-05-21 12:08:51 +02:00
4fcdfbff7d
Fix unhandled exception ( #5474 )
...
Solves exception.getStatus is not a function error logs in twenty-server
Catch all errors in order to have no error log at all
2024-05-21 11:31:03 +02:00
0d16051ded
[fix] Re-introduce beforeUpdateOneObject hook ( #5495 )
...
... and disable name edition in object edition form. This feature will
be introduced by #5491
2024-05-21 10:46:49 +02:00
4907ae5a74
Improve docs ( #5492 )
...
Fix #4382 and remove useless pages to make docs more readable
2024-05-21 09:09:19 +02:00
a9813447f3
feat: fetch and parse full gmail message ( #5160 )
...
first part of https://github.com/twentyhq/twenty/issues/4108
related PR https://github.com/twentyhq/twenty/pull/5081
---------
Co-authored-by: Charles Bochet <charles@twenty.com >
2024-05-20 17:29:35 +02:00
b5d3396ea9
5477 - Introduce syncsubstatus in db to refactor gmail sync behavior ( #5479 )
...
Closes #5477
2024-05-20 17:19:21 +02:00
4d479ee8ea
Remove relations for remotes ( #5455 )
...
For remotes, we will only create the foreign key, without the relation
metadata. Expected behavior will be:
- possible to create an activity. But the remote object will not be
displayed in the relations of the activity
- the remote objects should not be available in the search for relations
Also switched the number settings to an enum, since we now have to
handle `BigInt` case.
---------
Co-authored-by: Thomas Trompette <thomast@twenty.com >
2024-05-20 16:37:35 +02:00
b098027174
Fix graphql prep query ( #5478 )
2024-05-20 15:53:13 +02:00
88f5eb669e
4689 multi workspace i should be able to accept an invite if im already logged in ( #5454 )
...
- split signInUp to separate Invitation from signInUp
- update redirection logic
- add a resolver for userWorkspace
- add a mutation to add a user to a workspace
- authorize /invite/hash while loggedIn
- add a button to join a workspace
### Base functionnality
https://github.com/twentyhq/twenty/assets/29927851/a1075a4e-a2af-4184-aa3e-e163711277a1
### Error handling
https://github.com/twentyhq/twenty/assets/29927851/1bdd78ce-933a-4860-a87a-3f1f7bda389e
2024-05-20 12:11:38 +02:00
8b5f79ddbf
fix: multiple twenty orm issues & show an example of use ( #5439 )
...
This PR is fixing some issues and adding enhancement in TwentyORM:
- [x] Composite fields in nested relations are not formatted properly
- [x] Passing operators like `Any` in `where` condition is breaking the
query
- [x] Ability to auto load workspace-entities based on a regex path
I've also introduced an example of use for `CalendarEventService`:
https://github.com/twentyhq/twenty/pull/5439/files#diff-3a7dffc0dea57345d10e70c648e911f98fe237248bcea124dafa9c8deb1db748R15
2024-05-20 11:01:47 +02:00
66637a3770
Add more details to mutation limit exception message and fix update many query ( #5460 )
...
## Context
Since we rely on PgGraphql to query the DB, we have to map its errors to
more comprehensible errors before sending them back to the FE. This has
already been done for unicity constraint and mutation maximum records
but for the last one the message wasn't clear enough. This PR introduces
a new pgGraphqlConfig param to the util to pass down the 'atMost' config
that we are actually overwriting with an
'MUTATION_MAXIMUM_RECORD_AFFECTED' env variable. See how atMost works in
this doc (https://supabase.github.io/pg_graphql/api/#delete )
Also adding the same message for the update since this mutation is also
affected. Create is not though.
Lastly, this PR introduces a fix on the updateMany. Since the current FE
is not using updateMany, this was missed for a few weeks but a
regression has been introduced when we started checking if the id is a
valid UUID however for updateMany this was checking the data object
instead of the filter object. Actually, the data object should never
contain id because it wouldn't make sense to allow the update of the id
and even more for multiple records since the id should be unique.
## Test
locally with MUTATION_MAXIMUM_RECORD_AFFECTED=5
<img width="1408" alt="Screenshot 2024-05-18 at 02 11 59"
src="https://github.com/twentyhq/twenty/assets/1834158/06bf25ce-4a44-4851-8456-aed7689bb33e ">
<img width="1250" alt="Screenshot 2024-05-18 at 02 12 10"
src="https://github.com/twentyhq/twenty/assets/1834158/06fc4329-147b-4bb4-9223-c3bce340a8d2 ">
<img width="1222" alt="Screenshot 2024-05-18 at 02 12 36"
src="https://github.com/twentyhq/twenty/assets/1834158/0674546e-73e2-4e5c-918f-9825f2ee5967 ">
<img width="1228" alt="Screenshot 2024-05-18 at 02 13 01"
src="https://github.com/twentyhq/twenty/assets/1834158/f50df435-1fd4-45df-a953-8fefa8f36e75 ">
<img width="1174" alt="Screenshot 2024-05-18 at 02 13 09"
src="https://github.com/twentyhq/twenty/assets/1834158/707b9300-2779-43df-8177-9658b8965b49 ">
<img width="1393" alt="Screenshot 2024-05-18 at 02 19 11"
src="https://github.com/twentyhq/twenty/assets/1834158/2cd167b6-1261-4914-a4db-36f792d810c0 ">
2024-05-18 08:00:00 +02:00
36e54119a3
Enable remotes with existing name ( #5433 )
...
- Check if a table with the same name already exists
- If yes, add a number suffix, and check again
Co-authored-by: Thomas Trompette <thomast@twenty.com >
2024-05-17 10:38:17 +02:00
1694e0cccd
Fix missing name validation on object names at update ( #5434 )
...
## Context
as per title
## How was it tested?
local (/metadata + in product)
2024-05-16 18:15:56 +02:00
d741f4a5bd
Minor refacto and fixes on Remotes updates ( #5438 )
...
In this PR
- Code refactoring
- v0 of adding "updates available" info in Connection sync status
<img width="835" alt="Capture d’écran 2024-05-16 à 17 02 07"
src="https://github.com/twentyhq/twenty/assets/51697796/9674d3ca-bed2-4520-a5a6-ba37bc242d06 ">
- fix distant table columns with not-camel case names are always
considered as new
2024-05-16 17:31:34 +02:00
afad993bb3
Fix main ( #5435 )
...
- fix lint issue
- fix Apply Cors exception handler (do not work when logged out)
2024-05-16 15:29:27 +02:00
fdf10f17e2
4655 batch endpoints on the rest api ( #5411 )
...
- add POST rest/batch/<OBJECT> endpoint
- rearrange rest api code with Twenty quality standard
- unify REST API error format
- Added PATCH verb to update objects
- In openapi schema, we replaced PUT with PATCH verb to comply with REST
standard
- fix openApi schema to match the REST api
### Batch Create

### Replace PUT by PATCH in open Api

### Error format unification



2024-05-16 14:15:49 +02:00
ea5a7ba70e
feat: add renew token query for apollo client (chrome-extension) ( #5200 )
...
fixes - #5203
2024-05-16 10:21:16 +02:00
63387424c3
Fix transliteration for metadata + transliterate select options ( #5430 )
...
## Context
Fixes #5403
Transliteration is now integrated to form validation through the schema.
While it does not impede inputting an invalid value, it impedes
submitting a form that will fail as the transliteration is not possible.
Until then we were only performing the transliteration at save time in
the front-end, but it's best to provide the information as soon as
possible. Later we will add helpers to guide the user (eg "This name is
not valid": https://github.com/twentyhq/twenty/issues/5428 ).
---------
Co-authored-by: Charles Bochet <charles@twenty.com >
2024-05-15 21:43:58 +02:00
e1eead56c6
Alter comment on foreign key deletion ( #5406 )
...
We do not update the comment on the local table when a foreign table key
is deleted.
This was not breaking, which is why we did not see it. But comments
should be kept up to date.
---------
Co-authored-by: Thomas Trompette <thomast@twenty.com >
2024-05-15 17:05:30 +02:00
f0383e3147
feat: twenty orm sync ( #5266 )
...
This PR is updating all object metadata entities with the new
decorators, and deleting the old ones.
This way we can use the new TwentyORM with all the standard objects.
---------
Co-authored-by: Weiko <corentin@twenty.com >
2024-05-15 16:58:47 +02:00
38eb293b3c
Compare distant tables schema with remote tables schema ( #5413 )
...
Closes #4532 and part of #5062
2024-05-15 15:47:54 +02:00