From d36f1bc1917465aeaa22f6db7a0d434197924174 Mon Sep 17 00:00:00 2001 From: munch-lax Date: Thu, 12 Dec 2024 21:24:59 +0530 Subject: [PATCH 1/8] fix:expire attachment token throws 500 error --- .../file/guards/file-path-guard.ts | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts b/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts index 3296a57cf76e..b339f73e3a9c 100644 --- a/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts +++ b/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts @@ -5,6 +5,7 @@ import { HttpStatus, Injectable, } from '@nestjs/common'; +import { AuthException, AuthExceptionCode } from 'src/engine/core-modules/auth/auth.exception'; import { JwtWrapperService } from 'src/engine/core-modules/jwt/services/jwt-wrapper.service'; @@ -15,20 +16,31 @@ export class FilePathGuard implements CanActivate { async canActivate(context: ExecutionContext): Promise { const request = context.switchToHttp().getRequest(); const query = request.query; - + if (!query || !query['token']) { return false; } - - const payload = await this.jwtWrapperService.verifyWorkspaceToken( + let payload:any ={} + try{ + payload = await this.jwtWrapperService.verifyWorkspaceToken( query['token'], 'FILE', - ); - + ) + }catch (error) { + if(error instanceof AuthException && error.code === AuthExceptionCode.UNAUTHENTICATED ){ + return false + } + else{ + throw new AuthException( + 'TOKEN VERIFICATION FAILED', + AuthExceptionCode.INTERNAL_SERVER_ERROR, + ); + } + } if (!payload.workspaceId) { return false; } - + const decodedPayload = await this.jwtWrapperService.decode(query['token'], { json: true, }); From de0c95b118c9f62672fab37675ce0a3c323452fa Mon Sep 17 00:00:00 2001 From: munch-lax Date: Wed, 18 Dec 2024 21:22:46 +0530 Subject: [PATCH 2/8] file path guard code reverted and file api expection filter integrated --- .../filters/auth-file-api-exception.filter.ts | 38 +++++++++++++++++++ .../file/controllers/file.controller.ts | 13 ++++++- .../file/guards/file-path-guard.ts | 24 +++--------- 3 files changed, 55 insertions(+), 20 deletions(-) create mode 100644 packages/twenty-server/src/engine/core-modules/auth/filters/auth-file-api-exception.filter.ts diff --git a/packages/twenty-server/src/engine/core-modules/auth/filters/auth-file-api-exception.filter.ts b/packages/twenty-server/src/engine/core-modules/auth/filters/auth-file-api-exception.filter.ts new file mode 100644 index 000000000000..038c040cff12 --- /dev/null +++ b/packages/twenty-server/src/engine/core-modules/auth/filters/auth-file-api-exception.filter.ts @@ -0,0 +1,38 @@ +import { ArgumentsHost, Catch, ExceptionFilter } from '@nestjs/common'; + +import { Response } from 'express'; + +import { + AuthException, + AuthExceptionCode, +} from 'src/engine/core-modules/auth/auth.exception'; +import { HttpExceptionHandlerService } from 'src/engine/core-modules/exception-handler/http-exception-handler.service'; + +@Catch(AuthException) +export class AuthFileApiExceptionFilter implements ExceptionFilter { + constructor( + private readonly httpExceptionHandlerService: HttpExceptionHandlerService, + ) {} + + catch(exception: AuthException, host: ArgumentsHost) { + const ctx = host.switchToHttp(); + const response = ctx.getResponse(); + + switch (exception.code) { + case AuthExceptionCode.UNAUTHENTICATED: + case AuthExceptionCode.INVALID_INPUT: + return this.httpExceptionHandlerService.handleError( + exception, + response, + 403, + ); + case AuthExceptionCode.INTERNAL_SERVER_ERROR: + default: + return this.httpExceptionHandlerService.handleError( + exception, + response, + 500, + ); + } + } +} diff --git a/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts b/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts index cd95d43c79aa..9a2845c9c905 100644 --- a/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts +++ b/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts @@ -1,4 +1,12 @@ -import { Controller, Get, Param, Req, Res, UseGuards } from '@nestjs/common'; +import { + Controller, + Get, + Param, + Req, + Res, + UseFilters, + UseGuards, +} from '@nestjs/common'; import { Response } from 'express'; @@ -7,6 +15,7 @@ import { FileStorageExceptionCode, } from 'src/engine/core-modules/file-storage/interfaces/file-storage-exception'; +import { AuthFileApiExceptionFilter } from 'src/engine/core-modules/auth/filters/auth-file-api-exception.filter'; import { checkFilePath, checkFilename, @@ -16,6 +25,7 @@ import { FileService } from 'src/engine/core-modules/file/services/file.service' // TODO: Add cookie authentication @Controller('files') +@UseFilters(AuthFileApiExceptionFilter) @UseGuards(FilePathGuard) export class FileController { constructor(private readonly fileService: FileService) {} @@ -27,7 +37,6 @@ export class FileController { @Req() req: Request, ) { const folderPath = checkFilePath(params[0]); - const filename = checkFilename(params['filename']); const workspaceId = (req as any)?.workspaceId; diff --git a/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts b/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts index b339f73e3a9c..3296a57cf76e 100644 --- a/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts +++ b/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts @@ -5,7 +5,6 @@ import { HttpStatus, Injectable, } from '@nestjs/common'; -import { AuthException, AuthExceptionCode } from 'src/engine/core-modules/auth/auth.exception'; import { JwtWrapperService } from 'src/engine/core-modules/jwt/services/jwt-wrapper.service'; @@ -16,31 +15,20 @@ export class FilePathGuard implements CanActivate { async canActivate(context: ExecutionContext): Promise { const request = context.switchToHttp().getRequest(); const query = request.query; - + if (!query || !query['token']) { return false; } - let payload:any ={} - try{ - payload = await this.jwtWrapperService.verifyWorkspaceToken( + + const payload = await this.jwtWrapperService.verifyWorkspaceToken( query['token'], 'FILE', - ) - }catch (error) { - if(error instanceof AuthException && error.code === AuthExceptionCode.UNAUTHENTICATED ){ - return false - } - else{ - throw new AuthException( - 'TOKEN VERIFICATION FAILED', - AuthExceptionCode.INTERNAL_SERVER_ERROR, - ); - } - } + ); + if (!payload.workspaceId) { return false; } - + const decodedPayload = await this.jwtWrapperService.decode(query['token'], { json: true, }); From 9d22d3712283f1d243b2b07cc8fc130b9af8ece2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Malfait?= Date: Sat, 4 Jan 2025 09:43:43 +0100 Subject: [PATCH 3/8] Throw exception instead of sending response --- .../core-modules/file/controllers/file.controller.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts b/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts index 9a2845c9c905..07bd961519c7 100644 --- a/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts +++ b/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts @@ -15,6 +15,10 @@ import { FileStorageExceptionCode, } from 'src/engine/core-modules/file-storage/interfaces/file-storage-exception'; +import { + AuthException, + AuthExceptionCode, +} from 'src/engine/core-modules/auth/auth.exception'; import { AuthFileApiExceptionFilter } from 'src/engine/core-modules/auth/filters/auth-file-api-exception.filter'; import { checkFilePath, @@ -42,9 +46,10 @@ export class FileController { const workspaceId = (req as any)?.workspaceId; if (!workspaceId) { - return res - .status(401) - .send({ error: 'Unauthorized, missing workspaceId' }); + throw new AuthException( + 'Unauthorized, missing workspaceId', + AuthExceptionCode.UNAUTHENTICATED, + ); } try { From fb9cec2372340b1cfb57466b833833db2f66ad7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Malfait?= Date: Sat, 4 Jan 2025 11:09:43 +0100 Subject: [PATCH 4/8] Fix double expiration date implem --- .../file/controllers/file.controller.ts | 6 ++-- .../file/guards/file-path-guard.ts | 30 +------------------ .../file/services/file.service.ts | 7 +---- 3 files changed, 6 insertions(+), 37 deletions(-) diff --git a/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts b/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts index 07bd961519c7..359cb54260b8 100644 --- a/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts +++ b/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts @@ -60,7 +60,7 @@ export class FileController { ); fileStream.on('error', () => { - res.status(500).send({ error: 'Internal server error' }); + res.status(500).send({ error: 'Error streaming file from storage' }); }); fileStream.pipe(res); @@ -72,7 +72,9 @@ export class FileController { return res.status(404).send({ error: 'File not found' }); } - return res.status(500).send({ error: 'Internal server error' }); + return res + .status(500) + .send({ error: `Error retrieving file: ${error.message}` }); } } } diff --git a/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts b/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts index 3296a57cf76e..88897455b41a 100644 --- a/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts +++ b/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts @@ -1,10 +1,4 @@ -import { - CanActivate, - ExecutionContext, - HttpException, - HttpStatus, - Injectable, -} from '@nestjs/common'; +import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common'; import { JwtWrapperService } from 'src/engine/core-modules/jwt/services/jwt-wrapper.service'; @@ -33,32 +27,10 @@ export class FilePathGuard implements CanActivate { json: true, }); - const expirationDate = decodedPayload?.['expirationDate']; const workspaceId = decodedPayload?.['workspaceId']; - const isExpired = await this.isExpired(expirationDate); - - if (isExpired) { - return false; - } - request.workspaceId = workspaceId; return true; } - - private async isExpired(expirationDate: string): Promise { - if (!expirationDate) { - return true; - } - - if (new Date(expirationDate) < new Date()) { - throw new HttpException( - 'This url has expired. Please reload twenty page and open file again.', - HttpStatus.FORBIDDEN, - ); - } - - return false; - } } diff --git a/packages/twenty-server/src/engine/core-modules/file/services/file.service.ts b/packages/twenty-server/src/engine/core-modules/file/services/file.service.ts index c4c240f21051..8bc2dc022195 100644 --- a/packages/twenty-server/src/engine/core-modules/file/services/file.service.ts +++ b/packages/twenty-server/src/engine/core-modules/file/services/file.service.ts @@ -2,9 +2,6 @@ import { Injectable } from '@nestjs/common'; import { Stream } from 'stream'; -import { addMilliseconds } from 'date-fns'; -import ms from 'ms'; - import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; import { FileStorageService } from 'src/engine/core-modules/file-storage/file-storage.service'; import { JwtWrapperService } from 'src/engine/core-modules/jwt/services/jwt-wrapper.service'; @@ -39,15 +36,13 @@ export class FileService { payloadToEncode.workspaceId, ); - const expirationDate = addMilliseconds(new Date(), ms(fileTokenExpiresIn)); - const signedPayload = this.jwtWrapperService.sign( { - expirationDate: expirationDate, ...payloadToEncode, }, { secret, + expiresIn: fileTokenExpiresIn, }, ); From 05609ec59cd6f52985668190373604497064dfa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Malfait?= Date: Sun, 5 Jan 2025 13:32:19 +0100 Subject: [PATCH 5/8] Forgot to commit this. Forbidden exception for missing workspaceId --- .../src/engine/core-modules/file/controllers/file.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts b/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts index 359cb54260b8..d323db2c5134 100644 --- a/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts +++ b/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts @@ -48,7 +48,7 @@ export class FileController { if (!workspaceId) { throw new AuthException( 'Unauthorized, missing workspaceId', - AuthExceptionCode.UNAUTHENTICATED, + AuthExceptionCode.FORBIDDEN_EXCEPTION, ); } From 497e23230873d3bfe71ca69b2c5116fbd2b6a76e Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Wed, 8 Jan 2025 18:49:08 +0100 Subject: [PATCH 6/8] Introduce FileAPI Exception --- .../auth/services/sign-in-up.service.ts | 2 +- .../file/controllers/file.controller.ts | 34 +++++++++++-------- .../core-modules/file/file.exception.ts | 15 ++++++++ .../filters/file-api-exception.filter.ts} | 25 ++++++++------ 4 files changed, 51 insertions(+), 25 deletions(-) create mode 100644 packages/twenty-server/src/engine/core-modules/file/file.exception.ts rename packages/twenty-server/src/engine/core-modules/{auth/filters/auth-file-api-exception.filter.ts => file/filters/file-api-exception.filter.ts} (59%) diff --git a/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts b/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts index 53a8028cb80d..b9d79bc38901 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts @@ -14,9 +14,9 @@ import { AuthExceptionCode, } from 'src/engine/core-modules/auth/auth.exception'; import { + PASSWORD_REGEX, compareHash, hashPassword, - PASSWORD_REGEX, } from 'src/engine/core-modules/auth/auth.util'; import { DomainManagerService } from 'src/engine/core-modules/domain-manager/service/domain-manager.service'; import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; diff --git a/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts b/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts index d323db2c5134..4c9ed0744b93 100644 --- a/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts +++ b/packages/twenty-server/src/engine/core-modules/file/controllers/file.controller.ts @@ -16,20 +16,19 @@ import { } from 'src/engine/core-modules/file-storage/interfaces/file-storage-exception'; import { - AuthException, - AuthExceptionCode, -} from 'src/engine/core-modules/auth/auth.exception'; -import { AuthFileApiExceptionFilter } from 'src/engine/core-modules/auth/filters/auth-file-api-exception.filter'; + FileException, + FileExceptionCode, +} from 'src/engine/core-modules/file/file.exception'; import { checkFilePath, checkFilename, } from 'src/engine/core-modules/file/file.utils'; +import { FileApiExceptionFilter } from 'src/engine/core-modules/file/filters/file-api-exception.filter'; import { FilePathGuard } from 'src/engine/core-modules/file/guards/file-path-guard'; import { FileService } from 'src/engine/core-modules/file/services/file.service'; -// TODO: Add cookie authentication @Controller('files') -@UseFilters(AuthFileApiExceptionFilter) +@UseFilters(FileApiExceptionFilter) @UseGuards(FilePathGuard) export class FileController { constructor(private readonly fileService: FileService) {} @@ -46,9 +45,9 @@ export class FileController { const workspaceId = (req as any)?.workspaceId; if (!workspaceId) { - throw new AuthException( - 'Unauthorized, missing workspaceId', - AuthExceptionCode.FORBIDDEN_EXCEPTION, + throw new FileException( + 'Unauthorized: missing workspaceId', + FileExceptionCode.UNAUTHENTICATED, ); } @@ -60,7 +59,10 @@ export class FileController { ); fileStream.on('error', () => { - res.status(500).send({ error: 'Error streaming file from storage' }); + throw new FileException( + 'Error streaming file from storage', + FileExceptionCode.INTERNAL_SERVER_ERROR, + ); }); fileStream.pipe(res); @@ -69,12 +71,16 @@ export class FileController { error instanceof FileStorageException && error.code === FileStorageExceptionCode.FILE_NOT_FOUND ) { - return res.status(404).send({ error: 'File not found' }); + throw new FileException( + 'File not found', + FileExceptionCode.FILE_NOT_FOUND, + ); } - return res - .status(500) - .send({ error: `Error retrieving file: ${error.message}` }); + throw new FileException( + `Error retrieving file: ${error.message}`, + FileExceptionCode.INTERNAL_SERVER_ERROR, + ); } } } diff --git a/packages/twenty-server/src/engine/core-modules/file/file.exception.ts b/packages/twenty-server/src/engine/core-modules/file/file.exception.ts new file mode 100644 index 000000000000..0e8c4037597f --- /dev/null +++ b/packages/twenty-server/src/engine/core-modules/file/file.exception.ts @@ -0,0 +1,15 @@ +import { CustomException } from 'src/utils/custom-exception'; + +export enum FileExceptionCode { + UNAUTHENTICATED = 'UNAUTHENTICATED', + INVALID_INPUT = 'INVALID_INPUT', + INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR', + FILE_NOT_FOUND = 'FILE_NOT_FOUND', +} + +export class FileException extends CustomException { + code: FileExceptionCode; + constructor(message: string, code: FileExceptionCode) { + super(message, code); + } +} diff --git a/packages/twenty-server/src/engine/core-modules/auth/filters/auth-file-api-exception.filter.ts b/packages/twenty-server/src/engine/core-modules/file/filters/file-api-exception.filter.ts similarity index 59% rename from packages/twenty-server/src/engine/core-modules/auth/filters/auth-file-api-exception.filter.ts rename to packages/twenty-server/src/engine/core-modules/file/filters/file-api-exception.filter.ts index 038c040cff12..548c44155733 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/filters/auth-file-api-exception.filter.ts +++ b/packages/twenty-server/src/engine/core-modules/file/filters/file-api-exception.filter.ts @@ -2,31 +2,36 @@ import { ArgumentsHost, Catch, ExceptionFilter } from '@nestjs/common'; import { Response } from 'express'; -import { - AuthException, - AuthExceptionCode, -} from 'src/engine/core-modules/auth/auth.exception'; import { HttpExceptionHandlerService } from 'src/engine/core-modules/exception-handler/http-exception-handler.service'; +import { + FileException, + FileExceptionCode, +} from 'src/engine/core-modules/file/file.exception'; -@Catch(AuthException) -export class AuthFileApiExceptionFilter implements ExceptionFilter { +@Catch(FileException) +export class FileApiExceptionFilter implements ExceptionFilter { constructor( private readonly httpExceptionHandlerService: HttpExceptionHandlerService, ) {} - catch(exception: AuthException, host: ArgumentsHost) { + catch(exception: FileException, host: ArgumentsHost) { const ctx = host.switchToHttp(); const response = ctx.getResponse(); switch (exception.code) { - case AuthExceptionCode.UNAUTHENTICATED: - case AuthExceptionCode.INVALID_INPUT: + case FileExceptionCode.UNAUTHENTICATED: return this.httpExceptionHandlerService.handleError( exception, response, 403, ); - case AuthExceptionCode.INTERNAL_SERVER_ERROR: + case FileExceptionCode.FILE_NOT_FOUND: + return this.httpExceptionHandlerService.handleError( + exception, + response, + 404, + ); + case FileExceptionCode.INTERNAL_SERVER_ERROR: default: return this.httpExceptionHandlerService.handleError( exception, From fb607b69c87e4c7cc6042860a601313cb45c15a7 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Wed, 8 Jan 2025 19:05:53 +0100 Subject: [PATCH 7/8] Fix 500 error being throw in guard --- .../environment/environment-variables.ts | 2 +- .../engine/core-modules/file/file.exception.ts | 1 - .../core-modules/file/guards/file-path-guard.ts | 16 ++++++++++------ packages/twenty-ui/src/layout/index.ts | 8 ++++++++ 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts b/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts index 96b46927df95..616fe3fb07e1 100644 --- a/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts +++ b/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts @@ -172,7 +172,7 @@ export class EnvironmentVariables { @IsDuration() @IsOptional() - FILE_TOKEN_EXPIRES_IN = '1d'; + FILE_TOKEN_EXPIRES_IN = '1m'; @IsDuration() @IsOptional() diff --git a/packages/twenty-server/src/engine/core-modules/file/file.exception.ts b/packages/twenty-server/src/engine/core-modules/file/file.exception.ts index 0e8c4037597f..4a953f2355f7 100644 --- a/packages/twenty-server/src/engine/core-modules/file/file.exception.ts +++ b/packages/twenty-server/src/engine/core-modules/file/file.exception.ts @@ -2,7 +2,6 @@ import { CustomException } from 'src/utils/custom-exception'; export enum FileExceptionCode { UNAUTHENTICATED = 'UNAUTHENTICATED', - INVALID_INPUT = 'INVALID_INPUT', INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR', FILE_NOT_FOUND = 'FILE_NOT_FOUND', } diff --git a/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts b/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts index 88897455b41a..0cbe988a03c6 100644 --- a/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts +++ b/packages/twenty-server/src/engine/core-modules/file/guards/file-path-guard.ts @@ -14,12 +14,16 @@ export class FilePathGuard implements CanActivate { return false; } - const payload = await this.jwtWrapperService.verifyWorkspaceToken( - query['token'], - 'FILE', - ); - - if (!payload.workspaceId) { + try { + const payload = await this.jwtWrapperService.verifyWorkspaceToken( + query['token'], + 'FILE', + ); + + if (!payload.workspaceId) { + return false; + } + } catch (error) { return false; } diff --git a/packages/twenty-ui/src/layout/index.ts b/packages/twenty-ui/src/layout/index.ts index 1f88712f8c38..8f33feb754a4 100644 --- a/packages/twenty-ui/src/layout/index.ts +++ b/packages/twenty-ui/src/layout/index.ts @@ -1,4 +1,12 @@ export * from './animated-expandable-container/components/AnimatedExpandableContainer'; +export * from './animated-expandable-container/types/AnimationDimension'; +export * from './animated-expandable-container/types/AnimationDurationObject'; +export * from './animated-expandable-container/types/AnimationDurations'; +export * from './animated-expandable-container/types/AnimationMode'; +export * from './animated-expandable-container/types/AnimationSize'; +export * from './animated-expandable-container/utils/getCommonStyles'; +export * from './animated-expandable-container/utils/getExpandableAnimationConfig'; +export * from './animated-expandable-container/utils/getTransitionValues'; export * from './animated-placeholder/components/AnimatedPlaceholder'; export * from './animated-placeholder/components/EmptyPlaceholderStyled'; export * from './animated-placeholder/components/ErrorPlaceholderStyled'; From 406ec77f8ae1381a4e8fa5cd3b0526129ecb9dd3 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Wed, 8 Jan 2025 19:06:21 +0100 Subject: [PATCH 8/8] Fix --- .../engine/core-modules/environment/environment-variables.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts b/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts index 616fe3fb07e1..96b46927df95 100644 --- a/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts +++ b/packages/twenty-server/src/engine/core-modules/environment/environment-variables.ts @@ -172,7 +172,7 @@ export class EnvironmentVariables { @IsDuration() @IsOptional() - FILE_TOKEN_EXPIRES_IN = '1m'; + FILE_TOKEN_EXPIRES_IN = '1d'; @IsDuration() @IsOptional()