@@ -4,6 +4,8 @@ import { HelmetOptions } from 'helmet';
44import { SwaggerCustomOptions } from '@nestjs/swagger' ;
55import { IAuthModuleOptions } from '@nestjs/passport' ;
66import { JwtModuleOptions } from '@nestjs/jwt' ;
7+ import { StorageManagerConfig } from '@the-software-compagny/nestjs_module_factorydrive' ;
8+ import { AmazonWebServicesS3StorageConfig } from '@the-software-compagny/nestjs_module_factorydrive-s3' ;
79
810export interface MongoosePlugin {
911 package : string ;
@@ -28,6 +30,18 @@ export interface ConfigInstance {
2830 uri : string ;
2931 options : RedisOptions ;
3032 } ;
33+ factorydrive : {
34+ options :
35+ | StorageManagerConfig
36+ | {
37+ disks : {
38+ [ key : string ] : {
39+ driver : 's3'
40+ config : AmazonWebServicesS3StorageConfig
41+ }
42+ }
43+ }
44+ }
3145 passport : {
3246 options : IAuthModuleOptions ;
3347 } ;
@@ -39,15 +53,15 @@ export interface ConfigInstance {
3953 port : number ;
4054 sender : string ;
4155 } ;
42- sms :{
56+ sms : {
4357 host : string ,
4458 systemId : string ,
4559 password : string ,
4660 sourceAddr : string ,
4761 regionCode : string
4862 } ,
4963 frontPwd : {
50- url :string ;
64+ url : string ;
5165 identityMailAttribute : string ;
5266 identityMobileAttribute : string ;
5367 } ;
@@ -93,6 +107,25 @@ export default (): ConfigInstance => ({
93107 } ,
94108 plugins : [ ] ,
95109 } ,
110+ factorydrive : {
111+ options : {
112+ default : 'local' ,
113+ disks : {
114+ local : {
115+ driver : 'local' ,
116+ config : {
117+ root : process . cwd ( ) + '/storage' ,
118+ } ,
119+ } ,
120+ pictures : {
121+ driver : 'local' ,
122+ config : {
123+ root : process . cwd ( ) + '/storage/pictures' ,
124+ } ,
125+ } ,
126+ } ,
127+ } ,
128+ } ,
96129 passport : {
97130 options : {
98131 defaultStrategy : 'jwt' ,
@@ -118,17 +151,17 @@ export default (): ConfigInstance => ({
118151 } ,
119152 } ,
120153 } ,
121- mailer :{
154+ mailer : {
122155 host : process . env [ 'SESAME_SMTP_SERVER' ] ,
123156 port : parseInt ( process . env [ 'SESAME_SMTP_PORT' ] ) || 25 ,
124157 sender : process . env [ 'SESAME_MDP_SENDER' ] || 'noreply@mydomain.com'
125158 } ,
126- frontPwd :{
159+ frontPwd : {
127160 url : process . env [ 'SESAME_FRONT_MDP' ] ,
128161 identityMailAttribute : process . env [ 'SESAME_RESET_PWD_MAIL' ] || '' ,
129162 identityMobileAttribute : process . env [ 'SESAME_RESET_PWD_MOBILE' ] || ''
130163 } ,
131- sms :{
164+ sms : {
132165 host : process . env [ 'SESAME_SMPP_SERVER' ] || '' ,
133166 systemId : process . env [ 'SESAME_SMPP_SYSTEMID' ] || '' ,
134167 password : process . env [ 'SESAME_SMPP_PASSWORD' ] || '' ,
0 commit comments