Commit Graph

35 Commits

Author SHA1 Message Date
Jérémy M
cf334ada0e
feat: exceptions handlers (#2855)
* feat: wip exception handlers

* feat: exception capturer

* fix: rename exception-capturer into exception-handler

* fix: remove unused variable
2023-12-08 10:18:50 +01:00
martmull
3cd1ec21e6
Throw an error if workspace id has no object (#2857)
* Throw an error if workspace id has no object

* Request only plurial object names

* Fix tests

* Fix query

* Handle graphql errors
2023-12-07 12:32:29 +01:00
martmull
b72d6a9d9d
Rest api updates (#2844)
* Fix typo

* Fix ':' parsing

* Add '' for strings

* Add 'in', 'is', 'neq', 'like', 'ilike', 'startWith' comparators

* Fix test

* Move mapFieldMetadataToGraphqlQuery to util

* Move filter utils to utils

* Split code into factories

* Fix order by parser

* Reorganize files

* Add tests for limit parser

* Add tests for last_cursor parser

* Add tests for last_filter parser

* Move filter utils to factory

* Update filter parser tests

* Code review returns

* Fix tests

* Remove LOCAL_SERVER_URL

* Simplify and fix filter string parser

* Rename parser to input

* Add new lines for more readability

* Use unary plus

* Use nextjs errors

* Use destructuring

* Remove useless else

* Use FieldMetadata types

* Rename enums

* Move methods to utils

* Lint project

* Use singular name if id provided

* Handle typing

* Handle typing

* Minor update

* Simplify order by parser

* Lint

* handle missing conjunction

* filter parser update
2023-12-06 16:55:42 +01:00
Ruslan
fd9467c54d
feat: Add seed people and companies data for demo environment (#2207) (#2307)
* feat: seed companies and people data

* init DataSeedDemoWorkspaceCommand to handle:
- seedCoreSchema()
- seedMetadataSchema()

* feature: Seed workspace with demo data

- delete workspace
- initDemo() with prefillWorkspaceWithDemoObjects()

* added companies-demo.ts with data
* added people-demo.ts with data

* added workspaceId to seedFeatureFlags()

* delete previous CoreSchema before seedCoreSchema

* added workspaceMemberPrefillData

* getDemoWorkspaces() to get DEMO_WORKSPACES from config

* defined DemoSeedUserIds

- created core/demo/ to keep modified seedCoreSchema() there
- DemoSeedUserIds with new set of users and Ids

* generateOpportunities() to seed demo opportunities (limit = 50)

* Code review and fixes

* Fix

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-12-02 18:37:45 +01:00
martmull
97f154ef2c
Add rest api (#2757)
* Add a wildcard get route

* Call api from api

* Add a query formatter

* Use headers to authenticate

* Handle findMany query

* Add limit, orderBy and lastCursor parameters

* Add filter parameters

* Remove singular object name from valid requests

* Update order_by format

* Add depth parameter

* Make /api/objects/ID requests work

* Fix filter

* Add INTERNAL_SERVER_URL env variable

* Remove useless comment

* Change bath api url to 'rest'

* Fix limit parser

* Handle full filter version

* Improve handle full filter version

* Continue rest api

* Add and(...) default behaviour on filters

* Add tests

* Handle 'not' conjunction for filters

* Check filter query

* Format values with field metadata item type

* Handle nested filtering

* Update parsing method

* Check nested fields

* Add delete query

* Add create query

* Rename methods

* Add update query

* Update get one object request

* Fix error handling

* Code review returns
2023-12-01 16:26:39 +01:00
Mahendra Kumar
f405b77cea
add message queue integration (#2491) 2023-12-01 16:09:04 +01:00
Charles Bochet
f5e1d7825a
Removing Prisma and Grapql-nestjs-prisma resolvers (#2574)
* Some cleaning

* Fix seeds

* Fix all sign in, sign up flow and apiKey optimistic rendering

* Fix
2023-11-19 18:25:47 +01:00
bosiraphael
dda911fea7
Remove three old env variables (#2297)
* remove three old env variables IS_DATA_MODEL_SETTINGS_ENABLED IS_DEVELOPERS_SETTINGS_ENABLED FLEXIBLE_BACKEND_ENABLED

* Fix database:reset script

* Removing unused variable

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-10-31 13:15:24 +01:00
martmull
fc4075b372
2062 view edit an api key (#2231)
* Add query to get api keys

* Add a link to apiKey detail page

* Reset generatedApiKey when leaving page

* Simplify stuff

* Regenerate key when clicking on button

* Simplify

* Fix test

* Refetch apiKeys when delete or create one

* Add test for utils

* Create utils function

* Enable null expiration dates

* Update formatExpiration

* Fix display

* Fix noteCard

* Fix errors

* Fix reset

* Fix display

* Fix renaming

* Fix tests

* Fix ci

* Fix mocked data

* Fix test

* Update coverage requiremeents

* Rename folder

* Code review returns

* Symplify sht code
2023-10-26 11:32:44 +02:00
bosiraphael
2b8a81a05c
Created two new env variables (#2120)
* created the two env variables

* modify according to comments
2023-10-19 14:57:16 +02:00
martmull
b904397599
Fix api keys (#2116)
* Distinguish local env variables

* Remove api token secret
2023-10-19 11:07:40 +02:00
martmull
8fbad7d3ba
1043 timebox prepare zapier integration (#1967)
* Add create api-key route

* Import module

* Remove required mutation parameter

* Fix Authentication

* Generate random key

* Update Read ApiKeyAbility handler

* Add findMany apiKey route

* Remove useless attribute

* Use signed token for apiKeys

* Authenticate with api keys

* Fix typo

* Add a test for apiKey module

* Revoke token when api key does not exist

* Handler expiresAt parameter

* Fix user passport

* Code review returns: Add API_TOKEN_SECRET

* Code review returns: Rename variable

* Code review returns: Update code style

* Update apiKey schema

* Update create token route

* Update delete token route

* Filter revoked api keys from listApiKeys

* Rename endpoint

* Set default expiry to 2 years

* Code review returns: Update comment

* Generate token after create apiKey

* Code review returns: Update env variable

* Code review returns: Move method to proper service

---------

Co-authored-by: martmull <martmull@hotmail.com>
2023-10-12 18:07:44 +02:00
Jérémy M
fc820f47b2
Feat/disable flexible backend (#1673)
* wip: refacto and start creating custom resolver

* feat: findMany & findUnique of a custom entity

* feat: wip pagination

* feat: initial metadata migration

* feat: universal findAll with pagination

* fix: clean small stuff in pagination

* fix: test

* fix: miss file

* feat: rename custom into universal

* feat: enable/disable flexible backend from env

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
2023-09-20 17:25:45 -07:00
Charles Bochet
7621854d4b
Complete Sentry integration (#1546) 2023-09-11 15:07:30 -07:00
brendanlaschke
35bcef5090
Add Sentry for Backend (#1403)
* - added sentry

* - renamed env var

* - logger driver

* - add breadcrumb and category

* - fix driver
2023-09-11 12:22:30 -07:00
Charles Bochet
cfbeac9c56
Enable port to be overridden (#1527)
Enable port to be overriden
2023-09-09 17:59:56 -07:00
Charles Bochet
510c466271
Add WSL instruction and IDE setup instruction (#1150)
* Add WSL instruction and IDE setup instruction

* Fix setup

* Fix setup

* Fix

* Update docs/docs/developer/additional/ide-setup.mdx

Co-authored-by: Weiko <corentin@twenty.com>

---------

Co-authored-by: Weiko <corentin@twenty.com>
2023-08-09 22:24:15 -07:00
Charles Bochet
6008789a17
Wrap up Front chat (#1085)
* Wrap up Front chat

* Wrap up Front chat
2023-08-04 19:22:54 -07:00
gitstart-twenty
57c465176a
Add support chat (#1066)
* Add support chat

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Refactor the chat logic

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add HMAC signing

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Update the button styles

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Update the button styles

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Refactor the chat logic

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Fix the chat not loading

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Fix the chat not loading

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
2023-08-04 16:52:59 -07:00
Corentin
efbc346b48
[server] set local setup as default in .env.example (#1045) 2023-08-01 19:40:17 -07:00
Emilien Chauvet
813fd5a067
Fix env variables for dev setup (#1031) 2023-08-01 12:05:05 +02:00
Charles Bochet
7a6a75a958 Rename SIGN_IN_PREFILLED env variable 2023-07-31 19:21:08 -07:00
Félix Malfait
b028d9fd2a
Add deploy buttons and clean environment variables (#974)
* add render.yaml

* Clean environment variables



---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-07-31 14:36:04 -07:00
Charles Bochet
775b4c353d
Refactor login (#748)
* wip refactor login

* wip refactor login

* Fix lint conflicts

* Complete Sign In only

* Feature complete

* Fix test

* Fix test
2023-07-21 22:05:45 -07:00
Charles Bochet
e65c7ee6fe
Update install (#785) 2023-07-20 22:59:03 -07:00
Charles Bochet
349caacb9f
Update local setup doc (#726)
* Update local setup doc

* Update docs
2023-07-17 21:15:57 -07:00
Charles Bochet
26b033abc9
Refactor client config (#529)
* Refactor client config

* Fix server tests

* Fix lint
2023-07-07 11:10:42 -07:00
Jérémy M
1144bd13ed
feat: onboarding & profile edition (#507)
* feat: wip onboarding

* fix: generate graphql front

* wip: onboarding

* feat: login/register and edit profile

* fix: unused import

* fix: test

* Use DEBUG_MODE instead of STAGE and mute typescript depth exceed errors

* Fix seeds

* Fix onboarding when coming from google

* Fix

* Fix lint

* Fix ci

* Fix tests

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-07-06 17:05:15 -07:00
Charles Bochet
2afe933055
Make google auth optional on server side (#508)
* Make google auth optional on server side

* fix lint

* Fix according to review
2023-07-04 23:53:53 +02:00
Jérémy M
5e1fc1ad11
feat: upload module (#486)
* feat: wip upload module

* feat: local storage and serve local images

* feat: protect against injections

* feat: server local and s3 files

* fix: use storage location when serving local files

* feat: cross field env validation
2023-07-04 14:02:44 +00:00
Jérémy M
299ca293a8
feat: refactoring auth & add email password login (#318)
* feat: wip

* fix: issues

* feat: clean controllers and services

* fix: test

* Fix auth

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-06-17 13:42:02 +02:00
Charles Bochet
b95ac8b40b
Add logo on navbar workspace container (#147) 2023-05-26 17:41:21 +02:00
Charles Bochet
29fb781c26
Updating server configuration (#145)
Update server deploy staging
2023-05-26 16:30:41 +02:00
Charles Bochet
26d3716ae7
Implement scoping on be (#144) 2023-05-26 14:00:32 +02:00
Charles Bochet
80f9cc8797
Re-implement authentication (#136)
* Remove hasura and hasura-auth

* Implement authentication
2023-05-25 11:51:15 +02:00