Files
twenty_crm/server/src/integrations/file-storage/interfaces/file-storage.interface.ts
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

31 lines
843 B
TypeScript

import { FactoryProvider, ModuleMetadata } from '@nestjs/common';
import { S3DriverOptions } from 'src/integrations/file-storage/drivers/s3.driver';
import { LocalDriverOptions } from 'src/integrations/file-storage/drivers/local.driver';
export enum StorageDriverType {
S3 = 's3',
Local = 'local',
}
export interface S3DriverFactoryOptions {
type: StorageDriverType.S3;
options: S3DriverOptions;
}
export interface LocalDriverFactoryOptions {
type: StorageDriverType.Local;
options: LocalDriverOptions;
}
export type FileStorageModuleOptions =
| S3DriverFactoryOptions
| LocalDriverFactoryOptions;
export type FileStorageModuleAsyncOptions = {
useFactory: (
...args: any[]
) => FileStorageModuleOptions | Promise<FileStorageModuleOptions>;
} & Pick<ModuleMetadata, 'imports'> &
Pick<FactoryProvider, 'inject'>;