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
9df83c9a5a
feat: better server lint ( #2850 )
...
* feat: add stylistic eslint plugin
* feat: add missing line return
* feat: secure line-break style
* feat: disallow break before else
* feat: line between class members
* feat: better new line lint rule
2023-12-06 12:19:00 +01:00
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
04c7c1a334
Feature flags seeds, queries and hooks ( #2769 )
...
* seed is working
* allow graphql to retrieve feature flag data
* create useIsFeatureEnabled hook
* hook is working
* Update icons.ts
2023-11-29 16:40:44 +01:00
18d30c45c4
Create feature flag table ( #2752 )
...
* feature flag working
* wip
* wip
* Fix
---------
Co-authored-by: Charles Bochet <charles@twenty.com >
2023-11-28 20:19:39 +01:00
2d0f63219f
Fix workspace prefill and remove user allowImpersonation Boolean
2023-11-24 00:07:15 +01:00
5038c36df4
Update seed default values ( #2681 )
...
* Update seed default values
* Update seed default values
* Update seed default values
* remove allowImpersonation in workspaceMembers
* remove USD from currencyCode defaultValue
* fix tests
2023-11-23 23:30:53 +01:00
9c4f402102
Fix token cookie not being peristed on browser reboot ( #2667 )
2023-11-23 12:16:20 +01:00
ccaa96bc58
Fix workspace/user deletion ( #2648 )
...
* Fix workspace/user deletion
* remove logs
* add defaultWorkspace check
2023-11-22 17:12:46 +01:00
a6abe09163
Move Impersonate from User to Workspace ( #2630 )
...
* Fix impersonate
* align core typeorm config with metadata config + add allowImpersonation to workspace
* move allowImpersonation to workspace
* remove allowImpersonation from workspaceMember workspace table
2023-11-22 14:12:39 +01:00
a33d4c8b8d
Rename DATE to DATETIME ( #2576 )
...
* Rename DATE to DATETIME
* rename DATE to DATE_TIME
* fix server tests
* rename date to datetime
* rename date to datetime
2023-11-21 00:16:42 +01:00
0ace17df82
Fix linter and remove console logs
2023-11-20 16:54:51 +01:00
eb64baa62e
Fix api Keys ( #2583 )
2023-11-20 10:57:08 +01:00
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
a8b6edd4a8
chore(server): Migrate workspace ( #2530 )
...
* Migrate workspace
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
* Migrate workspace
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
* Migrate workspace to TypeORM
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
* Migrate workspace to TypeORM
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
---------
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com >
2023-11-17 22:41:46 +01:00
b86ada6d2b
feat: rename tenant into workspace ( #2553 )
...
* feat: rename tenant into workspace
* fix: missing some files and reset not working
* fix: wrong import
* Use link in company seeds
* Use link in company seeds
---------
Co-authored-by: Charles Bochet <charles@twenty.com >
2023-11-17 11:26:33 +01:00
e8a1d0d6d5
Remove api keys from old world ( #2548 )
...
* Use apiKeyV2 for getApiKeys
* Use apiKeyV2 for createApiKey
* Use apiKeyV2 for getApiKey
* Use apiKeyV2 to deleteapikey
* Filter null revokedAt -> not working
* Use apiKeyV2 to regenerate
* Fix default values injected
* Remove useless stuff
* Fix type
2023-11-16 18:14:04 +01:00
e5caa7a5df
Eslint prevent duplicate import ( #2516 )
...
- eslint: prevent duplicate import
2023-11-16 12:26:43 +01:00
6129444c5c
[WIP] Whole FE migrated ( #2517 )
...
* Wip
* WIP
* Removed concole log
* Add relations to workspace init (#2511 )
* Add relations to workspace init
* remove logs
* update prefill
* add missing isSystem
* comment relation fields
* Migrate v2 core models to graphql schema (#2509 )
* migrate v2 core models to graphql schema
* Migrate to new workspace member schema
* Continue work
* migrated-main
* Finished accountOwner nested field integration on companies
* Introduce bug
* Fix
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com >
Co-authored-by: Weiko <corentin@twenty.com >
2023-11-15 15:46:06 +01:00
04c618284f
Convert metadata tables to camel_case ( #2420 )
...
* Convert metadata tables to camelcase
* refactor folder structure
* rename datasourcemetadata
* regenerate metadata schema
* rename dataSourceMetadata to dataSource
2023-11-10 15:33:25 +01:00
7b9175a4a4
Revert "Convert metadata tables to camelCase" ( #2419 )
...
Revert "Convert metadata tables to camelCase (#2400 )"
This reverts commit 1cf08c797f .
2023-11-10 11:48:44 +01:00
1cf08c797f
Convert metadata tables to camelCase ( #2400 )
...
* Convert metadata tables to camelCase
* datasourcemetadataid to datasourceid
* refactor metadata folders
* fix command
* move commands out of metadata
* fix seed
* rename objectId and fieldId in objectMetadataId and fieldMetadataId in FE
* fix field-metadata
* Fix
* Fix
* remove logs
---------
Co-authored-by: Charles Bochet <charles@twenty.com >
2023-11-09 20:06:10 +01:00
0ae56b055c
Clean metadata and schema ( #2382 )
2023-11-07 12:33:54 +01:00
ba69435339
0.2.0 cleaning script ( #2342 )
...
* Display maxUpdatedAt for each workspace Schema
* Factorize functions
* Add max update for public workspaces
* Merge everything in a single json
* Enrich results
* Get from proper table
* Update
* Move to proper command file
* Add a dry-run option
* Remove workspaces from database
* Fix DeleteWorkspace method
* Add new option
* Remove proper data when deleting workspace
* Minor improvements
2023-11-06 23:15:02 +01:00
b56f6f3947
Fix seeds for local workspace and newly created workspaces ( #2333 )
...
* Update metadata/data seeds
* fix
* fix
* move seeding into a transaction
* add no-non-null-assertion
---------
Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com >
2023-11-03 14:33:45 +01:00
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
685d342170
Migrate view field to new data model - Part 2 ( #2270 )
...
* Migrate view field to new data model
* Migrate view fields to new model
2023-10-28 19:13:48 +02:00
35237c05f3
Fix cache management ( #2264 )
2023-10-27 18:20:11 +02:00
d61511262e
2060 create a new api key ( #2206 )
...
* Add folder for api settings
* Init create api key page
* Update create api key page
* Implement api call to create apiKey
* Add create api key mutation
* Get id when creating apiKey
* Display created Api Key
* Add delete api key button
* Remove button from InputText
* Update stuff
* Add test for ApiDetail
* Fix type
* Use recoil instead of router state
* Remane route paths
* Remove online return
* Move and test date util
* Remove useless Component
* Rename ApiKeys paths
* Rename ApiKeys files
* Add input text info testing
* Rename hooks to webhooks
* Remove console error
* Add tests to reach minimum coverage
2023-10-24 16:14:54 +02:00
14a5a91499
Fix server typescript depth error
2023-10-20 00:20:47 +02:00
08772b4456
1721/feature/drag and drop favorites ( #2097 )
...
* prisma schema updated: added index in favorite
* update abilitiy added for favorite
* update one favorite resolver added
* update on favorite mutation added
* updateFavoriteOrder added
* Draglist added in favorite
* nav item convert to div from button: because it was not working dragable with button
* changed index to position
* position added in getFavorites query
* added recoil state for favorites
* reordering updated according to new method
* Use accurate type
---------
Co-authored-by: Charles Bochet <charles@twenty.com >
2023-10-19 23:35:23 +02:00
e9092162e0
2049 timebox 1j zapier integration 4 define and implement a first trigger for zapier app ( #2132 )
...
* Add create company trigger
* Refactor
* Add operation in subscribe
* Add create hook api endpoint
* Add import of hook module
* Add a test for hook subscribe
* Add delete hook api endpoint
* Add delete hook test
* Add findMany hook route
---------
Co-authored-by: Charles Bochet <charles@twenty.com >
2023-10-19 22:48:34 +02:00
2b8a81a05c
Created two new env variables ( #2120 )
...
* created the two env variables
* modify according to comments
2023-10-19 14:57:16 +02:00
b904397599
Fix api keys ( #2116 )
...
* Distinguish local env variables
* Remove api token secret
2023-10-19 11:07:40 +02:00
7fbef6d60d
Add Tenant initialisation service ( #2100 )
...
* Add Tenant initialisation service
* few fixes
* fix constraint
* fix tests
* update metadata json with employees and address
* add V2
* remove metadata.gql
2023-10-18 18:01:52 +02:00
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
1e91c985df
Add a dedicated GQL server for metadata available on /meta ( #1820 )
2023-10-03 10:17:13 +02:00
629bdbbf50
feat: dynamic graphQL schema generation based on user workspace ( #1725 )
...
* 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: create metadata schema in default database
* Multi-tenant db schemas POC
fix tests and use query builders
remove synchronize
restore updatedAt
remove unnecessary import
use queryRunner
fix camelcase
add migrations for standard objects
Multi-tenant db schemas POC
fix tests and use query builders
remove synchronize
restore updatedAt
remove unnecessary import
use queryRunner
fix camelcase
add migrations for standard objects
poc: conditional schema at runtime
wip: try to create resolver in Nest.JS context
fix
* feat: wip add pg_graphql
* feat: setup pg_graphql during database init
* wip: dynamic resolver
* poc: dynamic resolver and query using pg_graphql
* feat: pg_graphql use ARG in Dockerfile
* feat: clean findMany & findOne dynamic resolver
* feat: get correct schema based on access token
* fix: remove old file
* fix: tests
* fix: better comment
* fix: e2e test not working, error format change due to yoga
* remove typeorm entity generation + fix jwt + fix search_path + remove anon
* fix conflict
---------
Co-authored-by: Charles Bochet <charles@twenty.com >
Co-authored-by: corentin <corentin@twenty.com >
2023-09-28 16:27:34 +02:00
a4cde44b13
feat: add cooldown to refresh token security ( #1736 )
2023-09-27 15:03:50 +02:00
8639cb921e
Chore: corrects syntax for type only imports ( #1716 )
...
* chore: removes replaces 'import type xxx from 'xxx'' with 'import { type xxx} from 'xxx'''
* chore: remove typed imports
* chore: remove typed imports
* chore: cleanup
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com >
2023-09-26 11:47:35 +02:00
f60c209e39
Chore(backend): Enable attaching attachments to companies and people (backend) ( #1726 )
...
Enable attaching attachments to companies and people (backend)
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
2023-09-26 11:39:13 +02:00
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
ec90c77ec1
Refactor tenant ORM integration ( #1650 )
...
* Refactor tenant ORM integration
* fix tests
2023-09-19 17:58:28 +02:00
00a3c8ca2b
Change to using arrow functions ( #1603 )
...
* Change to using arrow functions
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: Matheus <matheus_benini@hotmail.com >
* Add lint rule
---------
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: Matheus <matheus_benini@hotmail.com >
Co-authored-by: Charles Bochet <charles@twenty.com >
2023-09-15 18:41:10 -07:00
549335054a
Chore: Duplicate certain user fields to workspaceMember ( #1514 )
...
* Move certain user fields to workspaceMember
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: chiazokam <chiazokamecheta@gmail.com >
* Merge main
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: chiazokam <chiazokamecheta@gmail.com >
* Refactor according to review
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: chiazokam <chiazokamecheta@gmail.com >
* Refactor according to review
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: chiazokam <chiazokamecheta@gmail.com >
* Refactor according to review
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: chiazokam <chiazokamecheta@gmail.com >
* Update the generated GraphQL
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: chiazokam <chiazokamecheta@gmail.com >
* Update hooks
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: chiazokam <chiazokamecheta@gmail.com >
* Refactor according to review
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: chiazokam <chiazokamecheta@gmail.com >
* Refactor according to review
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: chiazokam <chiazokamecheta@gmail.com >
* Refactor according to review
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: chiazokam <chiazokamecheta@gmail.com >
* Refactor according to review
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: chiazokam <chiazokamecheta@gmail.com >
* Refactor according to review
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: chiazokam <chiazokamecheta@gmail.com >
* Rework typing
* Fix tests
* Remove console logs
---------
Co-authored-by: v1b3m <vibenjamin6@gmail.com >
Co-authored-by: chiazokam <chiazokamecheta@gmail.com >
Co-authored-by: Charles Bochet <charles@twenty.com >
2023-09-15 17:32:58 -07:00
6462505a86
Fix CI: remove import for metadata POC ( #1577 )
...
Fix CI: remote import for metadata POC
2023-09-14 12:03:20 -07:00
d98ddc3dbe
multi tenant schemas poc ( #1569 )
...
* Multi-tenant db schemas POC
* fix tests and use query builders
* remove synchronize
* restore updatedAt
* remove unnecessary import
* use queryRunner
* fix camelcase
* add migrations for standard objects
* Multi-tenant db schemas POC
* fix tests and use query builders
* remove synchronize
* restore updatedAt
* remove unnecessary import
* use queryRunner
* fix camelcase
* add migrations for standard objects
* add metadata
* add comments
* remove migrations for now
* do not allow connection to public schema for non-remote workspace connection
* rename getLastDataSourceMetadataFromWorkspaceIdOrFail
* remove schema creation
* remove module import
2023-09-14 14:39:37 +02:00
509ffddc57
Hotfix abusive throw
2023-09-11 15:23:32 -07:00
7621854d4b
Complete Sentry integration ( #1546 )
2023-09-11 15:07:30 -07:00
5c7660f588
feat: create default opportunities view on workspace creation + add seed data ( #1461 )
...
Closes #1314
2023-09-06 12:05:33 +02:00