Commit Graph

53 Commits

Author SHA1 Message Date
Charles Bochet
7774ef68a2
Release 0.4.0 (#4856)
0.4.0 Release!
2024-04-05 18:35:48 +02:00
Thaïs
c5349291c8
chore: setup twenty-ui absolute path alias (#4732)
Split from https://github.com/twentyhq/twenty/pull/4518

- Setup `@ui/*` as an internal alias to reference `twenty-ui/src`.
- Configures twenty-front to understand the `@ui/*` alias on development
mode, so twenty-ui can be hot reloaded.
- When building on production mode, twenty-front needs twenty-ui to be
built beforehand (which is automatic with the `dependsOn` option).
- Configures twenty-front to understand the `@ui/*` alias when launching
tests, so there is no need to re-build twenty-ui for tests.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 15:38:01 +02:00
Charles Bochet
514417245a
Add JsDom to server dependencies (#4740)
We were missing `JsDom` dependencies in the package.json generated by nx
while running `twenty-server`: `yarn nx build:packageJson`

Detailed explanation: 
- we are currently using nx paradigm which is to put dependencies of all
projets at root, which enables global package migrations for the whole
monorepo
- for production containers, we only want specific project dependency to
be added. This is done by running `yarn nx build:packageJson` on
`twenty-server`. Nx is statically analyzing twenty-server dependencies
and generating a tailored package.json that production containers can
later use.
- However, `nx` static analysis is not flawless and is missing some
packages. We are going to stop using it as the value is not there yet
but the burden for developers is high. The guideline is to put back
project dependencies into specific package `package.json`
- Therefore, I'm adding `jsdom` to twenty-server `package.json`
2024-04-02 12:07:12 +02:00
Thaïs
a3e5cf37b0
chore: upgrade Nx to v18.1.3 (#4706)
Split from https://github.com/twentyhq/twenty/pull/4518

- Upgrades dependencies and applies automatic config migrations with the
command: `npx nx migrate nx` (see
https://nx.dev/nx-api/nx/documents/migrate)
- Fixes lint errors after upgrading `@typescript-eslint`

Note: it was not possible (for now) to migrate Nx to the latest stable
version (v18.2.1) because it upgrades Typescript to v5.4.3, which seems
to cause a bug on install when Yarn tries to apply its native patches.
Might be a bug on the Yarn side.
2024-04-01 13:16:50 +02:00
Charles Bochet
e576fe0d67
Update yarn commands (#4644)
* Simplify commands

* Simplify commands

* Migrate all dev commands to project.json

* Fix tests
2024-03-25 12:31:18 +01:00
bosiraphael
96cad2accd
4398 decouple contacts and companies creation from messages import (#4590)
* emit event

* create queue and listener

* filter participants with role 'from'

* create job

* Add job to job module

* Refactoring

* Refactor contact creation in CreateCompanyAndContactService

* update job

* wip

* add getByHandlesWithoutPersonIdAndWorkspaceMemberId to calendar event attendee repository

* refactoring

* refactoring

* Revert "refactoring"

This reverts commit e5434f0b87.

* fix nest imports

* add await

* fix contact creation condition

* emit contact creation event after calendar-full-sync

* add await

* add missing transactionManager

* calendar event attendees personId update is working

* messageParticipant and calendarEventAttendee update is working as intended

* rename module

* fix lodash import

* add test

* update package.json
2024-03-22 18:44:14 +01:00
bosiraphael
5665656b05
4489 timebox finish google calendar full sync (#4615)
* add lodash differenceWith

* add awaits

* update sync cursor is working

* add logs

* use isSyncEnabled information to enqueue jobs

* add decorator InjectObjectMetadataRepository

* fix gmail-full-sync
2024-03-22 18:10:55 +01:00
Charles Bochet
3c5c9c2f31
Release 0.3.3 (#4622)
* Release 0.3.3

* Fix tests
2024-03-22 17:28:53 +01:00
Quentin G
1aa48d3bf7
feat: merge front and server dockerfiles and optimize build (#4589)
* feat: merge front and server dockerfiles and optimize build

* fix: update image label

* fix: bring back support for REACT_APP_SERVER_BASE_URL injection at runtime

* fix: remove old entries & add nx cache in dockerignore

* feat: generate frontend config at runtime using Nest

* fix: format and filename

* feat: use the EnvironmentService and leave default blank

* feat: add support for DB migrations
2024-03-21 19:22:21 +01:00
Jérémy M
e5c1309e8c
feat: wip server folder structure (#4573)
* feat: wip server folder structure

* fix: merge

* fix: wrong merge

* fix: remove unused file

* fix: comment

* fix: lint

* fix: merge

* fix: remove console.log

* fix: metadata graphql arguments broken
2024-03-20 16:23:46 +01:00
Charles Bochet
7294d5aedc Add migrate prod command 2024-03-15 23:33:25 +01:00
Weiko
2c09096edd
Refactor backend folder structure (#4505)
* Refactor backend folder structure

Co-authored-by: Charles Bochet <charles@twenty.com>

* fix tests

* fix

* move yoga hooks

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-03-15 18:37:09 +01:00
Jérémy M
94487f6737
feat: refactor folder structure (#4498)
* feat: wip refactor folder structure

* Fix

* fix position

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-03-15 14:40:58 +01:00
Jérémy M
af6ffbcc68
feat: standard fields on custom (#4332)
* feat: add ability to sync standard fields on custom object

* fix: clean

* fix: wrong compute during object creation

* fix: missing cascade delete

* fix: remove unused injected class

* fix: naming

* fix: rename factory to paramsFactory and clean

* fix: rename ExtendCustomObjectMetadata to BaseCustomObjectMetadata

* fix: partial fix inconsistent label and description

* Fixes

* Fix

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-03-07 17:21:50 +01:00
Weiko
41bed57be9
[backend] add cache storage module (#4320)
* [backend] add cache storage module

* update docs

* update default TTL to a week
2024-03-07 14:07:01 +01:00
Charles Bochet
706b5d3cf1
Release 0.3.2 (#4324)
* Release 0.3.2

* Fix Select search
2024-03-05 18:57:31 +01:00
bosiraphael
735e75b3b1
Fix domain name parsing on company creation (#4297)
* add domain parsing library

* change package for psl

* trying to fix error

* fix

* update

* remove unused function
2024-03-04 17:50:41 +01:00
Thaïs
ec20117e80
chore: make twenty-server nest command scripts depend on twenty-email… (#4055)
chore: make twenty-server nest command scripts depend on twenty-emails build

Closes #4013
2024-02-20 14:35:09 +01:00
Charles Bochet
ba050cd33d
Release 0.3.1 (#4031) 2024-02-16 20:11:38 +01:00
Jérémy M
990cb107a1
feat: workspace health target column map fix (#3932)
* feat: workspace health fix target column map

* fix: remove log

* feat: refactor health fixer

* fix: default-value issue and health check not working with composite

* fix: enhance target column map fix

* feat: create workspace migrations for target-column-map issues

* feat: enhance workspace-health issue detection
2024-02-15 18:04:12 +01:00
Weiko
0b2ffb0ee6
add rimraf to server dependencies (#3977) 2024-02-14 16:56:37 +01:00
Thaïs
e011ecbd6f
POC: generate twenty-server package.json with Nx (#3654)
* POC: generate twenty-server package.json with Nx

* Re-add passport

* Fix instal

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-02-13 22:16:21 +01:00
Weiko
458e8c839f
Add workspacePreQueryHook module (#3879)
* rebase

* reorganise messaging folders

* fix

* fix after review

* fix yarn lock
2024-02-13 18:23:29 +01:00
Charles Bochet
3fc18aeec1 Fix twenty-server build 2024-02-09 11:18:58 +01:00
Charles Bochet
3d7b5902e6 Fix twenty-server build 2024-02-09 11:14:02 +01:00
Joe S
850eab8f8f
Add rate limiting in the server using built in Nest.js capability (#3566)
* Add rate limiting in the server using built in Nest.js capability

* Generatekey based on ip address when an http request is sent

* Update env var types to number for ttl and limit

* Remove unused env variables

* Use getRequest utility function

* fix: remove dist from path

* fix: adding .env variables

* fix: remove unused functions

* feat: throttler plugin

* Fix according to review

---------

Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-02-07 18:11:32 +01:00
Félix Malfait
a5989a470c
Improve Documentation (#3795)
* Begin docs improvement

* Keep improving documentation

* Upgrade Docusarus

* Fix broken links
2024-02-05 15:01:37 +01:00
Charles Bochet
8692e5d1ca
Release 0.3.0 (#3793) 2024-02-03 09:05:11 +01:00
Jérémy M
cdc51add7d
feat: add user to sentry (#3467)
* feat: wip add user to sentry

* feat: wip interceptor

* feat: wip add user to sentry

* feat: add user into sentry errors

* fix: hide stack trace in production

* fix: properly log commands and handle exceptions

* fix: filter command exceptions

* feat: handle jobs errors
2024-02-01 16:14:08 +01:00
Jérémy M
73f6876641
feat: workspace sync (#3505)
* feat: wip workspace sync

* feat: wip lot of debugging

* feat: refactor and fix sync

* fix: clean

fix: clean

* feat: add simple comparator tests

* fix: remove debug

* feat: wip drop table

* fix: main merge

* fix: some issues, and prepare storage system to handle complex deletion

* feat: wip clean and fix

* fix: reflect issue when using array instead of map and clean

* fix: test & sync

* fix: yarn files

* fix: unecesary if-else

* fix: if condition not needed

* fix: remove debug

* fix: replace EQUAL by SKIP

* fix: sync metadata relation not applied properly

* fix: lint issues

* fix: merge issue
2024-01-30 14:40:55 +01:00
Thaïs
a654205dbc
chore: set up twenty-emails config so build isn't needed in development (#3619)
* chore: set up twenty-emails config so build isn't needed in development

* fix: fix script dependency

* chore: use @vitejs/plugin-react-swc

* Remove useless dependancy

* Fix typing

* chore: use baseUrl in twenty-emails

* chore: fix docker server prod build

* refactor: optimize Docker file and tsconfig

* fix: fix WORKDIR in docker

---------

Co-authored-by: martmull <martmull@hotmail.fr>
2024-01-29 06:17:12 -03:00
bosiraphael
b0c14ba5b9
3571 remove reply quotations from emails (#3630)
* lib is working

* update

* plural
2024-01-25 18:26:29 +01:00
Deepak Kumar
46f0eb522f
GH-3245 Change password from settings page (#3538)
* GH-3245 add passwordResetToken and passwordResetTokenExpiresAt column on user entity

* Add password reset token expiry delay env variable

* Add generatePasswordResetToken mutation resolver

* Update .env.sample file on server

* Add password reset token and expiry migration script

* Add validate password reset token query and a dummy password update (WIP) resolver

* Fix bug in password reset token generate

* add update password mutation

* Update name and add email password reset link

* Add change password UI on settings page

* Add reset password route on frontend

* Add reset password form UI

* sign in user on password reset

* format code

* make PASSWORD_RESET_TOKEN_EXPIRES_IN optional

* add email template for password reset

* Improve error message

* Rename methods and DTO to improve naming

* fix formatting of backend code

* Update change password component

* Update password reset via token component

* update graphql files

* spelling fix

* Make password-reset route authless on frontend

* show token generation wait time

* remove constant from .env.example

* Add PASSWORD_RESET_TOKEN_EXPIRES_IN in docs

* refactor emails module in reset password

* update Graphql generated file

* update email template of password reset

* add space between date and text

* update method name

* fix lint issues

* remove unused code, fix indentation, and email link color

* update test file for auth and token service

* Fix ci: build twenty-emails when running tests

---------

Co-authored-by: martmull <martmull@hotmail.fr>
2024-01-25 10:28:48 +01:00
martmull
8ffd958a3c
Fix twenty-emails build (#3608) 2024-01-24 17:41:38 +01:00
Charles Bochet
d6dfd0ce05 Use npx for ts-node execution in twenty-server commands 2024-01-23 18:26:48 +01:00
Charles Bochet
a7265fa3b4
Remove flag relation select (#3588)
* Remove feature flag on relation and select

* Move packages back to twenty-server to enable smaller build without using nx

* Fix package.json
2024-01-23 09:59:00 +01:00
martmull
e358d677f9
Move emails to dedicated package (#3542)
* Add new package

* Add twenty-emails package

* Use generated files from twenty-emails in twenty-server

* Fix deleted file

* Import emails templates properly
2024-01-22 16:21:56 +01:00
Charles Bochet
2628ee0f27 Revert blocknote upgrade because it's breakind design 2024-01-18 10:56:39 +01:00
Charles Bochet
4316950cf9
Bump version to 0.2.3 (#3506) 2024-01-17 11:57:13 +01:00
Charles Bochet
f7034d6e7d
Embrace nx monorepo structure with root package.json (#3255)
* Upgrade to node 18.17.1 and regroup dependencies in root package.json

* Sort package.json

* Fix lint

* Migrate zapier
2024-01-05 14:59:58 +01:00
Charles Bochet
c15e138d72
Fix nx lint setup (#3234)
* Fix nx lint setup

* Fixes

* Fixes

* Add missing metadata

Fixes

Fix

Fixes

* Fix
2024-01-04 16:39:57 +01:00
Thaïs
8483cf0b4b
POC: chore: use Nx workspace lint rules (#3163)
* chore: use Nx workspace lint rules

Closes #3162

* Fix lint

* Fix lint on BE

* Fix tests

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-01-03 23:07:25 +01:00
martmull
ea06f04350
3207 fix render self deploy (#3221)
* Fix paths and commands for render deploy

* Remove breaking change

* Use twentycrm postgres image for postgres

* Fix render script

* Specify docker image version

* Fix postgres user

* Update setup command
2024-01-03 14:25:24 +01:00
Félix Malfait
5ef5bbdc4d
Marketing website POC (#3139)
First website POC
2023-12-23 10:08:55 +01:00
Charles Bochet
68a6250757 Bump version 2023-12-21 23:52:45 +01:00
Lucas Bordeau
d70cb23f30
Added rimraf to yarn build (#3089) 2023-12-20 14:50:10 +01:00
bosiraphael
5afcab4e78
3011 fill the messagerecipient table when fetching messages (#3073)
* wip

* trying to parse display names and emails

* add nodemailer mailparser

* mail parsing is working

* add personId and workspaceMemberId

* add date to messages

* Fix PR

* Run tsc on bigger machine

* Fix lint

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-12-19 17:08:54 +01:00
Félix Malfait
fff51a2d91
Basic data enrichment (#3023)
* Add Enrich to frontend

* Naive backend implementation

* Add work email check

* Rename Enrich to Quick Action

* Refactor logic to a separate service

* Refacto to separate IntelligenceService

* Small fixes

* Missing Break statement

* Address PR comments

* Create company interface

* Improve edge case handling

* Use httpService instead of Axios

* Fix server tests
2023-12-18 15:45:30 +01:00
Weiko
36164ab59b
Add pg-boss worker poc (#2991)
* Add pg-boss worker poc

* add Example job

* add retry limit

* rename MessageQueue
2023-12-14 18:57:25 +01:00
martmull
e3e42be723
Add generate openapi schema for rest api (#2923)
* Add generate openapi schema for rest api

* Split method in utils

* Add paramters

* Add error response

* Update description of filter and order by

* Add get/id routes

* Add delete route

* Use components

* Fix Typo

* Add tags

* Add create query

* Add required field

* Add update query

* Add body request example

* Add 201 on create request

* Add servers

* Fix failing test

* Add open-api endpoint

* Update description

* Return base schema if no auth

* Code review returns

* Use open-api/types

* Fix tag

* Use components for parameters

* Improve response examples

* Improve axios error message

* Fix tests
2023-12-13 14:58:34 +01:00