2021-11-01 09:28:49 -04:00
// @flow
2018-09-01 13:58:06 -04:00
import { AnalyticsAdapter } from '../Adapters/Analytics/AnalyticsAdapter' ;
import { CacheAdapter } from '../Adapters/Cache/CacheAdapter' ;
import { MailAdapter } from '../Adapters/Email/MailAdapter' ;
2022-12-07 22:55:45 +01:00
import { FilesAdapter } from '../Adapters/Files/FilesAdapter' ;
import { LoggerAdapter } from '../Adapters/Logger/LoggerAdapter' ;
2018-09-01 13:58:06 -04:00
import { PubSubAdapter } from '../Adapters/PubSub/PubSubAdapter' ;
2022-12-07 22:55:45 +01:00
import { StorageAdapter } from '../Adapters/Storage/StorageAdapter' ;
2019-07-30 09:05:41 -05:00
import { WSSAdapter } from '../Adapters/WebSocketServer/WSSAdapter' ;
2021-03-10 20:19:28 +01:00
import { CheckGroup } from '../Security/CheckGroup' ;
2022-04-04 01:40:29 +02:00
export interface SchemaOptions {
/* Rest representation on Parse.Schema https:/ / docs . parseplatform . org / rest / guide / # adding - a - schema
: DEFAULT : [ ] * /
definitions : any ;
/ * I s t r u e i f P a r s e S e r v e r s h o u l d e x i t i f s c h e m a u p d a t e f a i l .
: DEFAULT : false * /
strict : ? boolean ;
/ * I s t r u e i f P a r s e S e r v e r s h o u l d d e l e t e a n y f i e l d s n o t d e f i n e d i n a s c h e m a d e f i n i t i o n . T h i s s h o u l d o n l y b e u s e d d u r i n g d e v e l o p m e n t .
: DEFAULT : false * /
deleteExtraFields : ? boolean ;
/ * I s t r u e i f P a r s e S e r v e r s h o u l d r e c r e a t e a n y f i e l d s t h a t a r e d i f f e r e n t b e t w e e n t h e c u r r e n t d a t a b a s e s c h e m a a n d t h e s c h e m a d e f i n i t i o n . T h i s s h o u l d o n l y b e u s e d d u r i n g d e v e l o p m e n t .
: DEFAULT : false * /
recreateModifiedFields : ? boolean ;
/ * I s t r u e i f P a r s e S e r v e r w i l l r e j e c t a n y a t t e m p t s t o m o d i f y t h e s c h e m a w h i l e t h e s e r v e r i s r u n n i n g .
: DEFAULT : false * /
lockSchemas : ? boolean ;
2025-10-03 18:05:34 +05:30
/ * ( O p t i o n a l ) K e e p i n d e x e s t h a t a r e p r e s e n t i n t h e d a t a b a s e b u t n o t d e f i n e d i n t h e s c h e m a . S e t t h i s t o ` t r u e ` i f y o u a r e a d d i n g i n d e x e s m a n u a l l y , s o t h a t t h e y w o n ' t b e r e m o v e d w h e n r u n n i n g s c h e m a m i g r a t i o n . D e f a u l t i s ` f a l s e ` .
: DEFAULT : false * /
keepUnknownIndexes : ? boolean ;
2022-04-04 01:40:29 +02:00
/* Execute a callback before running schema migrations. */
beforeMigration : ? ( ) => void | Promise < void > ;
/* Execute a callback after running schema migrations. */
afterMigration : ? ( ) => void | Promise < void > ;
}
2018-08-10 15:51:31 -04:00
2018-09-01 13:58:06 -04:00
type Adapter < T > = string | any | T ;
type NumberOrBoolean = number | boolean ;
2019-12-24 11:35:28 -06:00
type NumberOrString = number | string ;
2019-05-11 15:25:31 -05:00
type ProtectedFields = any ;
2023-05-01 16:25:22 -04:00
type StringOrStringArray = string | string [ ] ;
2022-03-12 13:49:57 +01:00
type RequestKeywordDenylist = {
key : string | any ,
value : any ,
} ;
2017-10-23 08:43:05 -04:00
export interface ParseServerOptions {
/ * Y o u r P a r s e A p p l i c a t i o n I D
: ENV : PARSE _SERVER _APPLICATION _ID * /
appId : string ;
/* Your Parse Master Key */
2025-02-13 08:23:18 +11:00
masterKey : ( ( ) => void ) | string ;
/* (Optional) The duration in seconds for which the current `masterKey` is being used before it is requested again if `masterKey` is set to a function. If `masterKey` is not set to a function, this option has no effect. Default is `0`, which means the master key is requested by invoking the `masterKey` function every time the master key is used internally by Parse Server. */
masterKeyTtl : ? number ;
2023-09-29 13:17:48 -07:00
/* (Optional) The maintenance key is used for modifying internal and read-only fields of Parse Server.<br><br>⚠️ This key is not intended to be used as part of a regular operation of Parse Server. This key is intended to conduct out-of-band changes such as one-time migrations or data correction tasks. Internal fields are not officially documented and may change at any time without publication in release changelogs. We strongly advice not to rely on internal fields as part of your regular operation and to investigate the implications of any planned changes *directly in the source code* of your current version of Parse Server. */
2023-01-09 08:02:12 +11:00
maintenanceKey : string ;
2017-10-23 08:43:05 -04:00
/* URL to your parse server with http:/ / or https : //.
: ENV : PARSE _SERVER _URL * /
serverURL : string ;
2023-11-18 15:41:16 +01:00
/ * ( O p t i o n a l ) R e s t r i c t s t h e u s e o f m a s t e r k e y p e r m i s s i o n s t o a l i s t o f I P a d d r e s s e s o r r a n g e s . < b r > < b r > T h i s o p t i o n a c c e p t s a l i s t o f s i n g l e I P a d d r e s s e s , f o r e x a m p l e ` [ ' 1 0 . 0 . 0 . 1 ' , ' 1 0 . 0 . 0 . 2 ' ] ` . Y o u c a n a l s o u s e C I D R n o t a t i o n t o s p e c i f y a n I P a d d r e s s r a n g e , f o r e x a m p l e ` [ ' 1 0 . 0 . 1 . 0 / 2 4 ' ] ` . < b r > < b r > < b > S p e c i a l s c e n a r i o s : < / b > < b r > - S e t t i n g a n e m p t y a r r a y ` [ ] ` m e a n s t h a t t h e m a s t e r k e y c a n n o t b e u s e d e v e n i n P a r s e S e r v e r C l o u d C o d e . T h i s v a l u e c a n n o t b e s e t v i a a n e n v i r o n m e n t v a r i a b l e a s t h e r e i s n o w a y t o p a s s a n e m p t y a r r a y t o P a r s e S e r v e r v i a a n e n v i r o n m e n t v a r i a b l e . < b r > - S e t t i n g ` [ ' 0 . 0 . 0 . 0 / 0 ' , ' : : 0 ' ] ` m e a n s t o a l l o w a n y I P v 4 a n d I P v 6 a d d r e s s t o u s e t h e m a s t e r k e y a n d e f f e c t i v e l y d i s a b l e s t h e I P f i l t e r . < b r > < b r > < b > C o n s i d e r a t i o n s : < / b > < b r > - I P v 4 a n d I P v 6 a d d r e s s e s a r e n o t c o m p a r e d a g a i n s t e a c h o t h e r . E a c h I P v e r s i o n ( I P v 4 a n d I P v 6 ) n e e d s t o b e c o n s i d e r e d s e p a r a t e l y . F o r e x a m p l e , ` [ ' 0 . 0 . 0 . 0 / 0 ' ] ` a l l o w s a n y I P v 4 a d d r e s s a n d b l o c k s e v e r y I P v 6 a d d r e s s . C o n v e r s e l y , ` [ ' : : 0 ' ] ` a l l o w s a n y I P v 6 a d d r e s s a n d b l o c k s e v e r y I P v 4 a d d r e s s . < b r > - K e e p i n m i n d t h a t t h e I P v e r s i o n i n u s e d e p e n d s o n t h e n e t w o r k s t a c k o f t h e e n v i r o n m e n t i n w h i c h P a r s e S e r v e r r u n s . A l o c a l e n v i r o n m e n t m a y u s e a d i f f e r e n t I P v e r s i o n t h a n a r e m o t e e n v i r o n m e n t . F o r e x a m p l e , i t ' s p o s s i b l e t h a t l o c a l l y t h e v a l u e ` [ ' 0 . 0 . 0 . 0 / 0 ' ] ` a l l o w s t h e r e q u e s t I P b e c a u s e t h e e n v i r o n m e n t i s u s i n g I P v 4 , b u t w h e n P a r s e S e r v e r i s d e p l o y e d r e m o t e l y t h e r e q u e s t I P i s b l o c k e d b e c a u s e t h e r e m o t e e n v i r o n m e n t i s u s i n g I P v 6 . < b r > - W h e n s e t t i n g t h e o p t i o n v i a a n e n v i r o n m e n t v a r i a b l e t h e n o t a t i o n i s a c o m m a - s e p a r a t e d s t r i n g , f o r e x a m p l e ` " 0 . 0 . 0 . 0 / 0 , : : 0 " ` . < b r > - I P v 6 z o n e i n d i c e s ( ` % ` s u f f i x ) a r e n o t s u p p o r t e d , f o r e x a m p l e ` f e 8 0 : : 1 % e t h 0 ` , ` f e 8 0 : : 1 % 1 ` o r ` : : 1 % l o ` . < b r > < b r > D e f a u l t s t o ` [ ' 1 2 7 . 0 . 0 . 1 ' , ' : : 1 ' ] ` w h i c h m e a n s t h a t o n l y ` l o c a l h o s t ` , t h e s e r v e r i n s t a n c e o n w h i c h P a r s e S e r v e r r u n s , i s a l l o w e d t o u s e t h e m a s t e r k e y .
2022-11-26 09:19:14 +11:00
: DEFAULT : [ "127.0.0.1" , "::1" ] * /
2018-09-08 14:12:23 -04:00
masterKeyIps : ? ( string [ ] ) ;
2023-11-18 15:41:16 +01:00
/ * ( O p t i o n a l ) R e s t r i c t s t h e u s e o f m a i n t e n a n c e k e y p e r m i s s i o n s t o a l i s t o f I P a d d r e s s e s o r r a n g e s . < b r > < b r > T h i s o p t i o n a c c e p t s a l i s t o f s i n g l e I P a d d r e s s e s , f o r e x a m p l e ` [ ' 1 0 . 0 . 0 . 1 ' , ' 1 0 . 0 . 0 . 2 ' ] ` . Y o u c a n a l s o u s e C I D R n o t a t i o n t o s p e c i f y a n I P a d d r e s s r a n g e , f o r e x a m p l e ` [ ' 1 0 . 0 . 1 . 0 / 2 4 ' ] ` . < b r > < b r > < b > S p e c i a l s c e n a r i o s : < / b > < b r > - S e t t i n g a n e m p t y a r r a y ` [ ] ` m e a n s t h a t t h e m a i n t e n a n c e k e y c a n n o t b e u s e d e v e n i n P a r s e S e r v e r C l o u d C o d e . T h i s v a l u e c a n n o t b e s e t v i a a n e n v i r o n m e n t v a r i a b l e a s t h e r e i s n o w a y t o p a s s a n e m p t y a r r a y t o P a r s e S e r v e r v i a a n e n v i r o n m e n t v a r i a b l e . < b r > - S e t t i n g ` [ ' 0 . 0 . 0 . 0 / 0 ' , ' : : 0 ' ] ` m e a n s t o a l l o w a n y I P v 4 a n d I P v 6 a d d r e s s t o u s e t h e m a i n t e n a n c e k e y a n d e f f e c t i v e l y d i s a b l e s t h e I P f i l t e r . < b r > < b r > < b > C o n s i d e r a t i o n s : < / b > < b r > - I P v 4 a n d I P v 6 a d d r e s s e s a r e n o t c o m p a r e d a g a i n s t e a c h o t h e r . E a c h I P v e r s i o n ( I P v 4 a n d I P v 6 ) n e e d s t o b e c o n s i d e r e d s e p a r a t e l y . F o r e x a m p l e , ` [ ' 0 . 0 . 0 . 0 / 0 ' ] ` a l l o w s a n y I P v 4 a d d r e s s a n d b l o c k s e v e r y I P v 6 a d d r e s s . C o n v e r s e l y , ` [ ' : : 0 ' ] ` a l l o w s a n y I P v 6 a d d r e s s a n d b l o c k s e v e r y I P v 4 a d d r e s s . < b r > - K e e p i n m i n d t h a t t h e I P v e r s i o n i n u s e d e p e n d s o n t h e n e t w o r k s t a c k o f t h e e n v i r o n m e n t i n w h i c h P a r s e S e r v e r r u n s . A l o c a l e n v i r o n m e n t m a y u s e a d i f f e r e n t I P v e r s i o n t h a n a r e m o t e e n v i r o n m e n t . F o r e x a m p l e , i t ' s p o s s i b l e t h a t l o c a l l y t h e v a l u e ` [ ' 0 . 0 . 0 . 0 / 0 ' ] ` a l l o w s t h e r e q u e s t I P b e c a u s e t h e e n v i r o n m e n t i s u s i n g I P v 4 , b u t w h e n P a r s e S e r v e r i s d e p l o y e d r e m o t e l y t h e r e q u e s t I P i s b l o c k e d b e c a u s e t h e r e m o t e e n v i r o n m e n t i s u s i n g I P v 6 . < b r > - W h e n s e t t i n g t h e o p t i o n v i a a n e n v i r o n m e n t v a r i a b l e t h e n o t a t i o n i s a c o m m a - s e p a r a t e d s t r i n g , f o r e x a m p l e ` " 0 . 0 . 0 . 0 / 0 , : : 0 " ` . < b r > - I P v 6 z o n e i n d i c e s ( ` % ` s u f f i x ) a r e n o t s u p p o r t e d , f o r e x a m p l e ` f e 8 0 : : 1 % e t h 0 ` , ` f e 8 0 : : 1 % 1 ` o r ` : : 1 % l o ` . < b r > < b r > D e f a u l t s t o ` [ ' 1 2 7 . 0 . 0 . 1 ' , ' : : 1 ' ] ` w h i c h m e a n s t h a t o n l y ` l o c a l h o s t ` , t h e s e r v e r i n s t a n c e o n w h i c h P a r s e S e r v e r r u n s , i s a l l o w e d t o u s e t h e m a i n t e n a n c e k e y .
: DEFAULT : [ "127.0.0.1" , "::1" ] * /
2023-01-09 08:02:12 +11:00
maintenanceKeyIps : ? ( string [ ] ) ;
2017-10-23 08:43:05 -04:00
/* Sets the app name */
appName : ? string ;
2019-09-12 22:03:57 +01:00
/* Add headers to Access-Control-Allow-Headers */
allowHeaders : ? ( string [ ] ) ;
2023-05-01 16:25:22 -04:00
/* Sets origins for Access-Control-Allow-Origin. This can be a string for a single origin or an array of strings for multiple origins. */
allowOrigin : ? StringOrStringArray ;
2017-10-23 08:43:05 -04:00
/* Adapter module for the analytics */
2018-08-10 15:51:31 -04:00
analyticsAdapter : ? Adapter < AnalyticsAdapter > ;
2017-10-23 08:43:05 -04:00
/* Adapter module for the files sub-system */
2018-08-10 15:51:31 -04:00
filesAdapter : ? Adapter < FilesAdapter > ;
2017-10-23 08:43:05 -04:00
/* Configuration for push, as stringified JSON. See http://docs.parseplatform.org/parse-server/guide/#push-notifications */
push : ? any ;
2018-09-08 14:12:23 -04:00
/ * C o n f i g u r a t i o n f o r p u s h s c h e d u l i n g , d e f a u l t s t o f a l s e .
: DEFAULT : false * /
scheduledPush : ? boolean ;
2017-10-23 08:43:05 -04:00
/* Adapter module for the logging sub-system */
2018-08-10 15:51:31 -04:00
loggerAdapter : ? Adapter < LoggerAdapter > ;
2017-10-23 08:43:05 -04:00
/ * L o g a s s t r u c t u r e d J S O N o b j e c t s
: ENV : JSON _LOGS * /
jsonLogs : ? boolean ;
/ * F o l d e r f o r t h e l o g s ( d e f a u l t s t o ' . / l o g s ' ) ; s e t t o n u l l t o d i s a b l e f i l e b a s e d l o g g i n g
2018-09-08 14:12:23 -04:00
: ENV : PARSE _SERVER _LOGS _FOLDER
: DEFAULT : . / logs * /
logsFolder : ? string ;
2017-10-23 08:43:05 -04:00
/ * S e t t h e l o g g i n g t o v e r b o s e
: ENV : VERBOSE * /
verbose : ? boolean ;
/* Sets the level for logs */
logLevel : ? string ;
2022-12-07 22:55:45 +01:00
/ * ( O p t i o n a l ) O v e r r i d e s t h e l o g l e v e l s u s e d i n t e r n a l l y b y P a r s e S e r v e r t o l o g e v e n t s .
: DEFAULT : { } * /
logLevels : ? LogLevels ;
2019-12-24 11:35:28 -06:00
/* Maximum number of logs to keep. If not set, no logs will be removed. This can be a number of files or number of days. If using days, add 'd' as the suffix. (default: null) */
maxLogFiles : ? NumberOrString ;
2017-10-23 08:43:05 -04:00
/ * D i s a b l e s c o n s o l e o u t p u t
: ENV : SILENT * /
silent : ? boolean ;
2018-09-08 14:12:23 -04:00
/ * T h e f u l l U R I t o y o u r d a t a b a s e . S u p p o r t e d d a t a b a s e s a r e m o n g o d b o r p o s t g r e s .
: DEFAULT : mongodb : //localhost:27017/parse */
databaseURI : string ;
2021-03-16 16:05:36 -05:00
/ * O p t i o n s t o p a s s t o t h e d a t a b a s e c l i e n t
: ENV : PARSE _SERVER _DATABASE _OPTIONS * /
databaseOptions : ? DatabaseOptions ;
2022-09-19 02:44:31 +10:00
/* Adapter module for the database; any options that are not explicitly described here are passed directly to the database client. */
2018-08-10 15:51:31 -04:00
databaseAdapter : ? Adapter < StorageAdapter > ;
2023-11-13 23:32:47 +01:00
/ * O p t i o n a l . I f s e t t o ` t r u e ` , t h e c o l l a t i o n r u l e o f c a s e c o m p a r i s o n f o r q u e r i e s a n d i n d e x e s i s e n a b l e d . E n a b l e t h i s o p t i o n t o r u n P a r s e S e r v e r w i t h M o n g o D B A t l a s S e r v e r l e s s o r A W S A m a z o n D o c u m e n t D B . I f ` f a l s e ` , t h e c o l l a t i o n r u l e o f c a s e c o m p a r i s o n i s d i s a b l e d . D e f a u l t i s ` f a l s e ` .
: DEFAULT : false * /
enableCollationCaseComparison : ? boolean ;
/ * O p t i o n a l . I f s e t t o ` t r u e ` , t h e ` e m a i l ` p r o p e r t y o f a u s e r i s a u t o m a t i c a l l y c o n v e r t e d t o l o w e r c a s e b e f o r e b e i n g s t o r e d i n t h e d a t a b a s e . C o n s e q u e n t l y , q u e r i e s m u s t m a t c h t h e c a s e a s s t o r e d i n t h e d a t a b a s e , w h i c h w o u l d b e l o w e r c a s e i n t h i s s c e n a r i o . I f ` f a l s e ` , t h e ` e m a i l ` p r o p e r t y i s s t o r e d a s s e t , w i t h o u t a n y c a s e m o d i f i c a t i o n s . D e f a u l t i s ` f a l s e ` .
: DEFAULT : false * /
convertEmailToLowercase : ? boolean ;
2023-11-18 15:41:16 +01:00
/ * O p t i o n a l . I f s e t t o ` t r u e ` , t h e ` u s e r n a m e ` p r o p e r t y o f a u s e r i s a u t o m a t i c a l l y c o n v e r t e d t o l o w e r c a s e b e f o r e b e i n g s t o r e d i n t h e d a t a b a s e . C o n s e q u e n t l y , q u e r i e s m u s t m a t c h t h e c a s e a s s t o r e d i n t h e d a t a b a s e , w h i c h w o u l d b e l o w e r c a s e i n t h i s s c e n a r i o . I f ` f a l s e ` , t h e ` u s e r n a m e ` p r o p e r t y i s s t o r e d a s s e t , w i t h o u t a n y c a s e m o d i f i c a t i o n s . D e f a u l t i s ` f a l s e ` .
2023-11-13 23:32:47 +01:00
: DEFAULT : false * /
convertUsernameToLowercase : ? boolean ;
2017-10-23 08:43:05 -04:00
/* Full path to your cloud code main.js */
2017-10-23 09:11:08 -04:00
cloud : ? string ;
2018-09-08 14:12:23 -04:00
/ * A c o l l e c t i o n p r e f i x f o r t h e c l a s s e s
: DEFAULT : '' * /
collectionPrefix : ? string ;
2017-10-23 08:43:05 -04:00
/* Key for iOS, MacOS, tvOS clients */
clientKey : ? string ;
/* Key for the Javascript SDK */
javascriptKey : ? string ;
/* Key for Unity and .Net SDK */
dotNetKey : ? string ;
2020-11-10 11:36:45 +11:00
/ * K e y f o r e n c r y p t i n g y o u r f i l e s
: ENV : PARSE _SERVER _ENCRYPTION _KEY * /
encryptionKey : ? string ;
2017-10-25 11:46:40 -04:00
/ * K e y f o r R E S T c a l l s
: ENV : PARSE _SERVER _REST _API _KEY * /
2017-10-23 08:43:05 -04:00
restAPIKey : ? string ;
2017-10-26 15:35:07 -04:00
/* Read-only key, which has the same capabilities as MasterKey without writes */
readOnlyMasterKey : ? string ;
2017-10-23 08:43:05 -04:00
/* Key sent with outgoing webhook calls */
webhookKey : ? string ;
/* Key for your files */
fileKey : ? string ;
2018-07-27 10:04:06 -03:00
/ * E n a b l e ( o r d i s a b l e ) t h e a d d i t i o n o f a u n i q u e h a s h t o t h e f i l e n a m e s
2018-09-08 14:12:23 -04:00
: ENV : PARSE _SERVER _PRESERVE _FILE _NAME
: DEFAULT : false * /
preserveFileName : ? boolean ;
2019-05-14 01:14:31 +01:00
/* Personally identifiable information fields in the user table the should be removed for non-authorized users. Deprecated @see protectedFields */
2018-09-08 14:12:23 -04:00
userSensitiveFields : ? ( string [ ] ) ;
2019-01-28 07:46:36 +00:00
/ * P r o t e c t e d f i e l d s t h a t s h o u l d b e t r e a t e d w i t h e x t r a s e c u r i t y w h e n f e t c h i n g d e t a i l s .
: DEFAULT : { "_User" : { "*" : [ "email" ] } } * /
2019-05-11 15:25:31 -05:00
protectedFields : ? ProtectedFields ;
2020-07-13 23:00:55 +08:00
/ * E n a b l e ( o r d i s a b l e ) a n o n y m o u s u s e r s , d e f a u l t s t o t r u e
2018-09-08 14:12:23 -04:00
: ENV : PARSE _SERVER _ENABLE _ANON _USERS
: DEFAULT : true * /
enableAnonymousUsers : ? boolean ;
2024-03-05 22:05:54 +03:00
/ * E n a b l e ( o r d i s a b l e ) c l i e n t c l a s s c r e a t i o n , d e f a u l t s t o f a l s e
2018-09-08 14:12:23 -04:00
: ENV : PARSE _SERVER _ALLOW _CLIENT _CLASS _CREATION
2024-03-05 22:05:54 +03:00
: DEFAULT : false * /
2018-09-08 14:12:23 -04:00
allowClientClassCreation : ? boolean ;
2019-12-17 19:23:18 +01:00
/ * E n a b l e ( o r d i s a b l e ) c u s t o m o b j e c t I d
: ENV : PARSE _SERVER _ALLOW _CUSTOM _OBJECT _ID
: DEFAULT : false * /
allowCustomObjectId : ? boolean ;
2017-10-23 08:43:05 -04:00
/* Configuration for your authentication providers, as stringified JSON. See http:/ / docs . parseplatform . org / parse - server / guide / # oauth - and - 3 rd - party - authentication
: ENV : PARSE _SERVER _AUTH _PROVIDERS * /
2023-07-04 21:16:55 +10:00
auth : ? { [ string ] : AuthAdapter } ;
2025-03-21 10:49:09 +01:00
/ * E n a b l e ( o r d i s a b l e ) i n s e c u r e a u t h a d a p t e r s , d e f a u l t s t o t r u e . I n s e c u r e a u t h a d a p t e r s a r e d e p r e c a t e d a n d i t i s r e c o m m e n d e d t o d i s a b l e t h e m .
: ENV : PARSE _SERVER _ENABLE _INSECURE _AUTH _ADAPTERS
: DEFAULT : true * /
enableInsecureAuthAdapters : ? boolean ;
2018-09-08 14:12:23 -04:00
/ * M a x f i l e s i z e f o r u p l o a d s , d e f a u l t s t o 2 0 m b
: DEFAULT : 20 mb * /
maxUploadSize : ? string ;
2023-06-20 20:10:25 +10:00
/ * S e t t o ` t r u e ` t o r e q u i r e u s e r s t o v e r i f y t h e i r e m a i l a d d r e s s t o c o m p l e t e t h e s i g n - u p p r o c e s s . S u p p o r t s a f u n c t i o n w i t h a r e t u r n v a l u e o f ` t r u e ` o r ` f a l s e ` f o r c o n d i t i o n a l v e r i f i c a t i o n .
2021-04-06 16:32:48 +02:00
< br > < br >
Default is ` false ` .
2018-09-08 14:12:23 -04:00
: DEFAULT : false * /
2023-06-20 20:10:25 +10:00
verifyUserEmails : ? ( boolean | void ) ;
2021-04-06 16:32:48 +02:00
/ * S e t t o ` t r u e ` t o p r e v e n t a u s e r f r o m l o g g i n g i n i f t h e e m a i l h a s n o t y e t b e e n v e r i f i e d a n d e m a i l v e r i f i c a t i o n i s r e q u i r e d .
< br > < br >
Default is ` false ` .
< br >
Requires option ` verifyUserEmails: true ` .
2018-09-08 14:12:23 -04:00
: DEFAULT : false * /
preventLoginWithUnverifiedEmail : ? boolean ;
2023-06-08 05:51:53 +10:00
/ * I f s e t t o ` t r u e ` i t p r e v e n t s a u s e r f r o m s i g n i n g u p i f t h e e m a i l h a s n o t y e t b e e n v e r i f i e d a n d e m a i l v e r i f i c a t i o n i s r e q u i r e d . I n t h a t c a s e t h e s e r v e r r e s p o n d s t o t h e s i g n - u p w i t h H T T P s t a t u s 4 0 0 a n d a P a r s e E r r o r 2 0 5 ` E M A I L _ N O T _ F O U N D ` . I f s e t t o ` f a l s e ` t h e s e r v e r r e s p o n d s w i t h H T T P s t a t u s 2 0 0 , a n d c l i e n t S D K s r e t u r n a n u n a u t h e n t i c a t e d P a r s e U s e r w i t h o u t s e s s i o n t o k e n . I n t h a t c a s e s u b s e q u e n t r e q u e s t s f a i l u n t i l t h e u s e r ' s e m a i l a d d r e s s i s v e r i f i e d .
< br > < br >
Default is ` false ` .
< br >
Requires option ` verifyUserEmails: true ` .
: DEFAULT : false * /
preventSignupWithUnverifiedEmail : ? boolean ;
2021-04-06 16:32:48 +02:00
/ * S e t t h e v a l i d i t y d u r a t i o n o f t h e e m a i l v e r i f i c a t i o n t o k e n i n s e c o n d s a f t e r w h i c h t h e t o k e n e x p i r e s . T h e t o k e n i s u s e d i n t h e l i n k t h a t i s s e t i n t h e e m a i l . A f t e r t h e t o k e n e x p i r e s , t h e l i n k b e c o m e s i n v a l i d a n d a n e w l i n k h a s t o b e s e n t . I f t h e o p t i o n i s n o t s e t o r s e t t o ` u n d e f i n e d ` , t h e n t h e t o k e n n e v e r e x p i r e s .
< br > < br >
For example , to expire the token after 2 hours , set a value of 7200 seconds ( = 60 seconds * 60 minutes * 2 hours ) .
< br > < br >
Default is ` undefined ` .
< br >
Requires option ` verifyUserEmails: true ` .
* /
2017-10-23 08:43:05 -04:00
emailVerifyTokenValidityDuration : ? number ;
2021-04-06 16:32:48 +02:00
/ * S e t t o ` t r u e ` i f a e m a i l v e r i f i c a t i o n t o k e n s h o u l d b e r e u s e d i n c a s e a n o t h e r t o k e n i s r e q u e s t e d b u t t h e r e i s a t o k e n t h a t i s s t i l l v a l i d , i . e . h a s n o t e x p i r e d . T h i s a v o i d s t h e o f t e n o b s e r v e d i s s u e t h a t a u s e r r e q u e s t s m u l t i p l e e m a i l s a n d d o e s n o t k n o w w h i c h l i n k c o n t a i n s a v a l i d t o k e n b e c a u s e e a c h n e w l y g e n e r a t e d t o k e n w o u l d i n v a l i d a t e t h e p r e v i o u s t o k e n .
< br > < br >
Default is ` false ` .
< br >
Requires option ` verifyUserEmails: true ` .
2020-11-26 04:30:52 +11:00
: DEFAULT : false * /
emailVerifyTokenReuseIfValid : ? boolean ;
2023-06-20 20:10:25 +10:00
/ * S e t t o ` f a l s e ` t o p r e v e n t s e n d i n g o f v e r i f i c a t i o n e m a i l . S u p p o r t s a f u n c t i o n w i t h a r e t u r n v a l u e o f ` t r u e ` o r ` f a l s e ` f o r c o n d i t i o n a l e m a i l s e n d i n g .
< br > < br >
Default is ` true ` .
< br >
: DEFAULT : true * /
sendUserEmailVerification : ? ( boolean | void ) ;
2021-04-06 16:32:48 +02:00
/* The account lockout policy for failed login attempts. */
2020-12-04 08:03:29 +11:00
accountLockout : ? AccountLockoutOptions ;
2021-04-06 16:32:48 +02:00
/* The password policy for enforcing password related rules. */
2020-12-04 08:03:29 +11:00
passwordPolicy : ? PasswordPolicyOptions ;
2017-10-23 08:43:05 -04:00
/* Adapter module for the cache */
2018-08-10 15:51:31 -04:00
cacheAdapter : ? Adapter < CacheAdapter > ;
/* Adapter module for email sending */
emailAdapter : ? Adapter < MailAdapter > ;
2023-06-24 00:29:54 +10:00
/ * I f s e t t o ` t r u e ` , a ` P a r s e . O b j e c t ` t h a t i s i n t h e p a y l o a d w h e n c a l l i n g a C l o u d F u n c t i o n w i l l b e c o n v e r t e d t o a n i n s t a n c e o f ` P a r s e . O b j e c t ` . I f ` f a l s e ` , t h e o b j e c t w i l l n o t b e c o n v e r t e d a n d i n s t e a d b e a p l a i n J a v a S c r i p t o b j e c t , w h i c h c o n t a i n s t h e r a w d a t a o f a ` P a r s e . O b j e c t ` b u t i s n o t a n a c t u a l i n s t a n c e o f ` P a r s e . O b j e c t ` . D e f a u l t i s ` f a l s e ` . < b r > < b r > ℹ ️ T h e e x p e c t e d b e h a v i o r w o u l d b e t h a t t h e o b j e c t i s c o n v e r t e d t o a n i n s t a n c e o f ` P a r s e . O b j e c t ` , s o y o u w o u l d n o r m a l l y s e t t h i s o p t i o n t o ` t r u e ` . T h e d e f a u l t i s ` f a l s e ` b e c a u s e t h i s i s a t e m p o r a r y o p t i o n t h a t h a s b e e n i n t r o d u c e d t o a v o i d a b r e a k i n g c h a n g e w h e n f i x i n g a b u g w h e r e J a v a S c r i p t o b j e c t s a r e n o t c o n v e r t e d t o a c t u a l i n s t a n c e s o f ` P a r s e . O b j e c t ` .
2025-01-12 14:34:52 +11:00
: DEFAULT : true * /
2023-06-24 00:29:54 +10:00
encodeParseObjectInCloudFunction : ? boolean ;
2017-10-23 08:43:05 -04:00
/* Public URL to your parse server with http:/ / or https : //.
: ENV : PARSE _PUBLIC _SERVER _URL * /
publicServerURL : ? string ;
2025-01-12 11:59:40 +11:00
/ * T h e o p t i o n s f o r p a g e s s u c h a s p a s s w o r d r e s e t a n d e m a i l v e r i f i c a t i o n .
2021-02-09 14:03:57 +01:00
: DEFAULT : { } * /
pages : ? PagesOptions ;
2018-09-08 14:12:23 -04:00
/ * c u s t o m p a g e s f o r p a s s w o r d v a l i d a t i o n a n d r e s e t
: DEFAULT : { } * /
customPages : ? CustomPagesOptions ;
2017-10-23 08:43:05 -04:00
/* parse-server's LiveQuery configuration object */
liveQuery : ? LiveQueryOptions ;
2018-09-08 14:12:23 -04:00
/ * S e s s i o n d u r a t i o n , i n s e c o n d s , d e f a u l t s t o 1 y e a r
: DEFAULT : 31536000 * /
sessionLength : ? number ;
2024-05-27 20:03:11 +05:30
/ * W h e t h e r P a r s e S e r v e r s h o u l d a u t o m a t i c a l l y e x t e n d a v a l i d s e s s i o n b y t h e s e s s i o n L e n g t h . I n o r d e r t o r e d u c e t h e n u m b e r o f s e s s i o n u p d a t e s i n t h e d a t a b a s e , a s e s s i o n w i l l o n l y b e e x t e n d e d w h e n a r e q u e s t i s r e c e i v e d a f t e r a t l e a s t h a l f o f t h e c u r r e n t s e s s i o n ' s l i f e t i m e h a s p a s s e d .
2023-05-18 03:49:25 +10:00
: DEFAULT : false * /
extendSessionOnUse : ? boolean ;
2022-09-30 01:38:57 +03:00
/ * D e f a u l t v a l u e f o r l i m i t o p t i o n o n q u e r i e s , d e f a u l t s t o ` 1 0 0 ` .
: DEFAULT : 100 * /
defaultLimit : ? number ;
2017-10-23 08:43:05 -04:00
/* Max value for limit option on queries, defaults to unlimited */
maxLimit : ? number ;
2021-09-10 15:49:20 +02:00
/ * S e t s w h e t h e r w e s h o u l d e x p i r e t h e i n a c t i v e s e s s i o n s , d e f a u l t s t o t r u e . I f f a l s e , a l l n e w s e s s i o n s a r e c r e a t e d w i t h n o e x p i r a t i o n d a t e .
2018-09-08 14:12:23 -04:00
: DEFAULT : true * /
expireInactiveSessions : ? boolean ;
/ * W h e n a u s e r c h a n g e s t h e i r p a s s w o r d , e i t h e r t h r o u g h t h e r e s e t p a s s w o r d e m a i l o r w h i l e l o g g e d i n , a l l s e s s i o n s a r e r e v o k e d i f t h i s i s t r u e . S e t t o f a l s e i f y o u d o n ' t w a n t t o r e v o k e s e s s i o n s .
: DEFAULT : true * /
revokeSessionOnPasswordReset : ? boolean ;
/ * S e t s t h e T T L f o r t h e i n m e m o r y c a c h e ( i n m s ) , d e f a u l t s t o 5 0 0 0 ( 5 s e c o n d s )
: DEFAULT : 5000 * /
cacheTTL : ? number ;
/ * S e t s t h e m a x i m u m s i z e f o r t h e i n m e m o r y c a c h e , d e f a u l t s t o 1 0 0 0 0
: DEFAULT : 10000 * /
cacheMaxSize : ? number ;
2021-04-05 02:28:28 +02:00
/ * S e t t o ` t r u e ` i f P a r s e r e q u e s t s w i t h i n t h e s a m e N o d e . j s e n v i r o n m e n t a s P a r s e S e r v e r s h o u l d b e r o u t e d t o P a r s e S e r v e r d i r e c t l y i n s t e a d o f v i a t h e H T T P i n t e r f a c e . D e f a u l t i s ` f a l s e ` .
< br > < br >
If set to ` false ` then Parse requests within the same Node . js environment as Parse Server are executed as HTTP requests sent to Parse Server via the ` serverURL ` . For example , a ` Parse.Query ` in Cloud Code is calling Parse Server via a HTTP request . The server is essentially making a HTTP request to itself , unnecessarily using network resources such as network ports .
< br > < br >
⚠ ️ In environments where multiple Parse Server instances run behind a load balancer and Parse requests within the current Node . js environment should be routed via the load balancer and distributed as HTTP requests among all instances via the ` serverURL ` , this should be set to ` false ` .
2022-11-11 06:31:07 +11:00
: DEFAULT : true * /
2019-05-10 14:34:19 -05:00
directAccess : ? boolean ;
2018-09-08 14:12:23 -04:00
/ * E n a b l e s t h e d e f a u l t e x p r e s s e r r o r h a n d l e r f o r a l l e r r o r s
: DEFAULT : false * /
enableExpressErrorHandler : ? boolean ;
/ * S e t s t h e n u m b e r o f c h a r a c t e r s i n g e n e r a t e d o b j e c t i d ' s , d e f a u l t 1 0
: DEFAULT : 10 * /
objectIdSize : ? number ;
2018-08-10 15:51:31 -04:00
/ * T h e p o r t t o r u n t h e P a r s e S e r v e r , d e f a u l t s t o 1 3 3 7 .
2018-09-08 14:12:23 -04:00
: ENV : PORT
: DEFAULT : 1337 * /
port : ? number ;
/ * T h e h o s t t o s e r v e P a r s e S e r v e r o n , d e f a u l t s t o 0 . 0 . 0 . 0
: DEFAULT : 0.0 . 0.0 * /
host : ? string ;
/ * M o u n t p a t h f o r t h e s e r v e r , d e f a u l t s t o / p a r s e
: DEFAULT : /parse */
mountPath : ? string ;
2017-10-23 08:43:05 -04:00
/* Run with cluster, optionally set the number of processes default to os.cpus().length */
cluster : ? NumberOrBoolean ;
/* middleware for express server, can be string or function */
2018-09-01 13:58:06 -04:00
middleware : ? ( ( ( ) => void ) | string ) ;
2023-01-05 14:26:54 +01:00
/* The trust proxy settings. It is important to understand the exact setup of the reverse proxy, since this setting will trust values provided in the Parse Server API request. See the <a href="https:/ / expressjs . com / en / guide / behind - proxies . html " > express trust proxy settings < / a > d o c u m e n t a t i o n . D e f a u l t s t o ` f a l s e ` .
: DEFAULT : false * /
trustProxy : ? any ;
2017-10-23 08:43:05 -04:00
/* Starts the liveQuery server */
startLiveQueryServer : ? boolean ;
/* Live query server configuration options (will start the liveQuery server) */
liveQueryServerOptions : ? LiveQueryServerOptions ;
2020-07-15 20:10:33 +02:00
/ * O p t i o n s f o r r e q u e s t i d e m p o t e n c y t o d e d u p l i c a t e i d e n t i c a l r e q u e s t s t h a t m a y b e c a u s e d b y n e t w o r k i s s u e s . C a u t i o n , t h i s i s a n e x p e r i m e n t a l f e a t u r e t h a t m a y n o t b e a p p r o p r i a t e f o r p r o d u c t i o n .
: ENV : PARSE _SERVER _EXPERIMENTAL _IDEMPOTENCY _OPTIONS
: DEFAULT : false * /
idempotencyOptions : ? IdempotencyOptions ;
2020-12-17 20:16:37 +11:00
/ * O p t i o n s f o r f i l e u p l o a d s
2021-01-11 21:26:56 +01:00
: ENV : PARSE _SERVER _FILE _UPLOAD _OPTIONS
: DEFAULT : { } * /
2020-12-17 20:16:37 +11:00
fileUpload : ? FileUploadOptions ;
2019-07-19 12:29:45 -07:00
/* Full path to your GraphQL custom schema.graphql file */
graphQLSchema : ? string ;
2019-06-25 14:44:23 -07:00
/ * M o u n t s t h e G r a p h Q L e n d p o i n t
: ENV : PARSE _SERVER _MOUNT _GRAPHQL
: DEFAULT : false * /
mountGraphQL : ? boolean ;
/ * M o u n t p a t h f o r t h e G r a p h Q L e n d p o i n t , d e f a u l t s t o / g r a p h q l
: ENV : PARSE _SERVER _GRAPHQL _PATH
: DEFAULT : /graphql */
graphQLPath : ? string ;
2025-07-10 04:25:09 +02:00
/ * E n a b l e p u b l i c i n t r o s p e c t i o n f o r t h e G r a p h Q L e n d p o i n t , d e f a u l t s t o f a l s e
: ENV : PARSE _SERVER _GRAPHQL _PUBLIC _INTROSPECTION
: DEFAULT : false * /
graphQLPublicIntrospection : ? boolean ;
2019-06-25 14:44:23 -07:00
/ * M o u n t s t h e G r a p h Q L P l a y g r o u n d - n e v e r u s e t h i s o p t i o n i n p r o d u c t i o n
: ENV : PARSE _SERVER _MOUNT _PLAYGROUND
: DEFAULT : false * /
mountPlayground : ? boolean ;
/ * M o u n t p a t h f o r t h e G r a p h Q L P l a y g r o u n d , d e f a u l t s t o / p l a y g r o u n d
: ENV : PARSE _SERVER _PLAYGROUND _PATH
: DEFAULT : /playground */
playgroundPath : ? string ;
2022-04-04 01:40:29 +02:00
/ * D e f i n e d s c h e m a
: ENV : PARSE _SERVER _SCHEMA
* /
2021-11-01 09:28:49 -04:00
schema : ? SchemaOptions ;
2019-08-19 00:25:52 -05:00
/* Callback when server has closed */
serverCloseComplete : ? ( ) => void ;
2021-03-10 20:19:28 +01:00
/ * T h e s e c u r i t y o p t i o n s t o i d e n t i f y a n d r e p o r t w e a k s e c u r i t y s e t t i n g s .
: DEFAULT : { } * /
security : ? SecurityOptions ;
2021-10-08 14:24:20 +11:00
/ * S e t t o t r u e i f n e w u s e r s s h o u l d b e c r e a t e d w i t h o u t p u b l i c r e a d a n d w r i t e a c c e s s .
2022-11-17 08:59:44 +11:00
: DEFAULT : true * /
2021-10-08 14:24:20 +11:00
enforcePrivateUsers : ? boolean ;
2024-02-15 03:07:35 +03:00
/ * A l l o w a u s e r t o l o g i n e v e n i f t h e 3 r d p a r t y a u t h e n t i c a t i o n t o k e n t h a t w a s u s e d t o s i g n i n t o t h e i r a c c o u n t h a s e x p i r e d . I f t h i s i s s e t t o ` f a l s e ` , t h e n t h e t o k e n w i l l b e v a l i d a t e d e v e r y t i m e t h e u s e r s i g n s i n t o t h e i r a c c o u n t . T h i s r e f e r s t o t h e t o k e n t h a t i s s t o r e d i n t h e ` _ U s e r . a u t h D a t a ` f i e l d . D e f a u l t s t o ` f a l s e ` .
: DEFAULT : false * /
2022-11-11 03:35:39 +11:00
allowExpiredAuthDataToken : ? boolean ;
2022-03-12 13:49:57 +01:00
/ * A n a r r a y o f k e y s a n d v a l u e s t h a t a r e p r o h i b i t e d i n d a t a b a s e r e a d a n d w r i t e r e q u e s t s t o p r e v e n t p o t e n t i a l s e c u r i t y v u l n e r a b i l i t i e s . I t i s p o s s i b l e t o s p e c i f y o n l y a k e y ( ` { " k e y " : " . . . " } ` ) , o n l y a v a l u e ( ` { " v a l u e " : " . . . " } ` ) o r a k e y - v a l u e p a i r ( ` { " k e y " : " . . . " , " v a l u e " : " . . . " } ` ) . T h e s p e c i f i c a t i o n c a n u s e t h e f o l l o w i n g t y p e s : ` b o o l e a n ` , ` n u m e r i c ` o r ` s t r i n g ` , w h e r e ` s t r i n g ` w i l l b e i n t e r p r e t e d a s a r e g e x n o t a t i o n . R e q u e s t d a t a i s d e e p - s c a n n e d f o r m a t c h i n g d e f i n i t i o n s t o d e t e c t a l s o a n y n e s t e d o c c u r r e n c e s . D e f a u l t s a r e p a t t e r n s t h a t a r e l i k e l y t o b e u s e d i n m a l i c i o u s r e q u e s t s . S e t t i n g t h i s o p t i o n w i l l o v e r r i d e t h e d e f a u l t p a t t e r n s .
: DEFAULT : [ { "key" : "_bsontype" , "value" : "Code" } , { "key" : "constructor" } , { "key" : "__proto__" } ] * /
requestKeywordDenylist : ? ( RequestKeywordDenylist [ ] ) ;
2023-01-06 23:39:02 +11:00
/ * O p t i o n s t o l i m i t r e p e a t e d r e q u e s t s t o P a r s e S e r v e r A P I s . T h i s c a n b e u s e d t o p r o t e c t s e n s i t i v e e n d p o i n t s s u c h a s ` / r e q u e s t P a s s w o r d R e s e t ` f r o m b r u t e - f o r c e a t t a c k s o r P a r s e S e r v e r a s a w h o l e f r o m d e n i a l - o f - s e r v i c e ( D o S ) a t t a c k s . < b r > < b r > ℹ ️ M i n d t h e f o l l o w i n g l i m i t a t i o n s : < b r > - r a t e l i m i t s a p p l i e d p e r I P a d d r e s s ; t h i s l i m i t s p r o t e c t i o n a g a i n s t d i s t r i b u t e d d e n i a l - o f - s e r v i c e ( D D o S ) a t t a c k s w h e r e m a n y r e q u e s t s a r e c o m i n g f r o m v a r i o u s I P a d d r e s s e s < b r > - i f m u l t i p l e P a r s e S e r v e r i n s t a n c e s a r e b e h i n d a l o a d b a l a n c e r o r r a n i n a c l u s t e r , e a c h i n s t a n c e w i l l c a l c u l a t e i t ' s o w n r e q u e s t r a t e s , i n d e p e n d e n t f r o m o t h e r i n s t a n c e s ; t h i s l i m i t s t h e a p p l i c a b i l i t y o f t h i s f e a t u r e w h e n u s i n g a l o a d b a l a n c e r a n d a n o t h e r r a t e l i m i t i n g s o l u t i o n t h a t t a k e s r e q u e s t s a c r o s s a l l i n s t a n c e s i n t o a c c o u n t m a y b e m o r e s u i t a b l e < b r > - t h i s f e a t u r e p r o v i d e s b a s i c p r o t e c t i o n a g a i n s t d e n i a l - o f - s e r v i c e a t t a c k s , b u t a m o r e s o p h i s t i c a t e d s o l u t i o n w o r k s e a r l i e r i n t h e r e q u e s t f l o w a n d p r e v e n t s a m a l i c i o u s r e q u e s t s t o e v e n r e a c h a s e r v e r i n s t a n c e ; i t ' s t h e r e f o r e r e c o m m e n d e d t o i m p l e m e n t a s o l u t i o n a c c o r d i n g t o a r c h i t e c t u r e a n d u s e r c a s e .
: DEFAULT : [ ] * /
rateLimit : ? ( RateLimitOptions [ ] ) ;
2025-10-14 20:16:31 +02:00
/* Options to customize the request context using inversion of control/dependency injection.*/
2025-10-16 09:29:02 +02:00
requestContextMiddleware : ? ( req : any , res : any , next : any ) => void ;
2023-01-06 23:39:02 +11:00
}
export interface RateLimitOptions {
/* The path of the API route to be rate limited. Route paths, in combination with a request method, define the endpoints at which requests can be made. Route paths can be strings, string patterns, or regular expression. See: https://expressjs.com/en/guide/routing.html */
requestPath : string ;
/* The window of time in milliseconds within which the number of requests set in `requestCount` can be made before the rate limit is applied. */
requestTimeWindow : ? number ;
/* The number of requests that can be made per IP address within the time window set in `requestTimeWindow` before the rate limit is applied. */
requestCount : ? number ;
/ * T h e e r r o r m e s s a g e t h a t s h o u l d b e r e t u r n e d i n t h e b o d y o f t h e H T T P 4 2 9 r e s p o n s e w h e n t h e r a t e l i m i t i s h i t . D e f a u l t i s ` T o o m a n y r e q u e s t s . ` .
: DEFAULT : Too many requests . * /
errorResponseMessage : ? string ;
/* Optional, the HTTP request methods to which the rate limit should be applied, default is all methods. */
requestMethods : ? ( string [ ] ) ;
/ * O p t i o n a l , i f ` t r u e ` t h e r a t e l i m i t w i l l a l s o a p p l y t o r e q u e s t s u s i n g t h e ` m a s t e r K e y ` , d e f a u l t i s ` f a l s e ` . N o t e t h a t a p u b l i c C l o u d C o d e f u n c t i o n t h a t t r i g g e r s i n t e r n a l r e q u e s t s u s i n g t h e ` m a s t e r K e y ` m a y c i r c u m v e n t r a t e l i m i t i n g a n d b e v u l n e r a b l e t o a t t a c k s .
: DEFAULT : false * /
includeMasterKey : ? boolean ;
/ * O p t i o n a l , i f ` t r u e ` t h e r a t e l i m i t w i l l a l s o a p p l y t o r e q u e s t s t h a t a r e m a d e i n b y C l o u d C o d e , d e f a u l t i s ` f a l s e ` . N o t e t h a t a p u b l i c C l o u d C o d e f u n c t i o n t h a t t r i g g e r s i n t e r n a l r e q u e s t s m a y c i r c u m v e n t r a t e l i m i t i n g a n d b e v u l n e r a b l e t o a t t a c k s .
: DEFAULT : false * /
includeInternalRequests : ? boolean ;
2023-03-07 03:43:15 +11:00
/ * O p t i o n a l , t h e U R L o f t h e R e d i s s e r v e r t o s t o r e r a t e l i m i t d a t a . T h i s a l l o w s t o r a t e l i m i t r e q u e s t s f o r m u l t i p l e s e r v e r s b y c a l c u l a t i n g t h e s u m o f a l l r e q u e s t s a c r o s s a l l s e r v e r s . T h i s i s u s e f u l i f m u l t i p l e s e r v e r s a r e p r o c e s s i n g r e q u e s t s b e h i n d a l o a d b a l a n c e r . F o r e x a m p l e , t h e l i m i t o f 1 0 r e q u e s t s i s r e a c h e d i f e a c h o f 2 s e r v e r s p r o c e s s e d 5 r e q u e s t s .
* /
redisUrl : ? string ;
2023-06-09 21:27:56 +10:00
/ *
The type of rate limit to apply . The following types are supported :
< br > < br >
- ` global ` : rate limit based on the number of requests made by all users < br >
- ` ip ` : rate limit based on the IP address of the request < br >
- ` user ` : rate limit based on the user ID of the request < br >
- ` session ` : rate limit based on the session token of the request < br >
< br > < br >
: default : 'ip'
* /
zone : ? string ;
2021-03-10 20:19:28 +01:00
}
export interface SecurityOptions {
/ * I s t r u e i f P a r s e S e r v e r s h o u l d c h e c k f o r w e a k s e c u r i t y s e t t i n g s .
: DEFAULT : false * /
enableCheck : ? boolean ;
/ * I s t r u e i f t h e s e c u r i t y c h e c k r e p o r t s h o u l d b e w r i t t e n t o l o g s . T h i s s h o u l d o n l y b e e n a b l e d t e m p o r a r i l y t o n o t e x p o s e w e a k s e c u r i t y s e t t i n g s i n l o g s .
: DEFAULT : false * /
enableCheckLog : ? boolean ;
/* The security check groups to run. This allows to add custom security checks or override existing ones. Default are the groups defined in `CheckGroups.js`. */
checkGroups : ? ( CheckGroup [ ] ) ;
2017-10-23 08:43:05 -04:00
}
2021-02-09 14:03:57 +01:00
export interface PagesOptions {
2025-01-12 11:59:40 +11:00
/ * I s t r u e i f t h e p a g e s r o u t e r s h o u l d b e e n a b l e d ; t h i s i s r e q u i r e d f o r a n y o f t h e p a g e s o p t i o n s t o t a k e e f f e c t .
2021-02-09 14:03:57 +01:00
: DEFAULT : false * /
enableRouter : ? boolean ;
/ * I s t r u e i f p a g e s s h o u l d b e l o c a l i z e d ; t h i s h a s n o e f f e c t o n c u s t o m p a g e r e d i r e c t s .
: DEFAULT : false * /
enableLocalization : ? boolean ;
/* The path to the JSON file for localization; the translations will be used to fill template placeholders according to the locale. */
localizationJsonPath : ? string ;
/ * T h e f a l l b a c k l o c a l e f o r l o c a l i z a t i o n i f n o m a t c h i n g t r a n s l a t i o n i s p r o v i d e d f o r t h e g i v e n l o c a l e . T h i s i s o n l y r e l e v a n t w h e n p r o v i d i n g t r a n s l a t i o n r e s o u r c e s v i a J S O N f i l e .
: DEFAULT : en * /
localizationFallbackLocale : ? string ;
/ * T h e p l a c e h o l d e r k e y s a n d v a l u e s w h i c h w i l l b e f i l l e d i n p a g e s ; t h i s c a n b e a s i m p l e o b j e c t o r a c a l l b a c k f u n c t i o n .
: DEFAULT : { } * /
placeholders : ? Object ;
/ * I s t r u e i f r e s p o n s e s s h o u l d a l w a y s b e r e d i r e c t s a n d n e v e r c o n t e n t , f a l s e i f t h e r e s p o n s e t y p e s h o u l d d e p e n d o n t h e r e q u e s t t y p e ( G E T r e q u e s t - > c o n t e n t r e s p o n s e ; P O S T r e q u e s t - > r e d i r e c t r e s p o n s e ) .
: DEFAULT : false * /
forceRedirect : ? boolean ;
/ * T h e p a t h t o t h e p a g e s d i r e c t o r y ; t h i s a l s o d e f i n e s w h e r e t h e s t a t i c e n d p o i n t ' / a p p s ' p o i n t s t o . D e f a u l t i s t h e ' . / p u b l i c / ' d i r e c t o r y .
: DEFAULT : . / public * /
pagesPath : ? string ;
/ * T h e A P I e n d p o i n t f o r t h e p a g e s . D e f a u l t i s ' a p p s ' .
: DEFAULT : apps * /
pagesEndpoint : ? string ;
/ * T h e U R L s t o t h e c u s t o m p a g e s .
: DEFAULT : { } * /
customUrls : ? PagesCustomUrlsOptions ;
2021-03-07 13:51:35 +01:00
/ * T h e c u s t o m r o u t e s .
: DEFAULT : [ ] * /
customRoutes : ? ( PagesRoute [ ] ) ;
}
export interface PagesRoute {
/* The route path. */
path : string ;
/* The route method, e.g. 'GET' or 'POST'. */
method : string ;
/* The route handler that is an async function. */
handler : ( ) => void ;
2021-02-09 14:03:57 +01:00
}
export interface PagesCustomUrlsOptions {
/* The URL to the custom page for password reset. */
passwordReset : ? string ;
/* The URL to the custom page for password reset -> link invalid. */
passwordResetLinkInvalid : ? string ;
/* The URL to the custom page for password reset -> success. */
passwordResetSuccess : ? string ;
/* The URL to the custom page for email verification -> success. */
emailVerificationSuccess : ? string ;
/* The URL to the custom page for email verification -> link send fail. */
emailVerificationSendFail : ? string ;
/* The URL to the custom page for email verification -> resend link -> success. */
emailVerificationSendSuccess : ? string ;
/* The URL to the custom page for email verification -> link invalid. */
emailVerificationLinkInvalid : ? string ;
/* The URL to the custom page for email verification -> link expired. */
emailVerificationLinkExpired : ? string ;
}
2017-10-23 08:43:05 -04:00
export interface CustomPagesOptions {
/* invalid link page path */
invalidLink : ? string ;
2019-06-15 04:35:09 +08:00
/* verification link send fail page path */
linkSendFail : ? string ;
2017-10-23 08:43:05 -04:00
/* choose password page path */
choosePassword : ? string ;
2021-02-09 14:03:57 +01:00
/* verification link send success page path */
linkSendSuccess : ? string ;
/* verify email success page path */
verifyEmailSuccess : ? string ;
2017-10-23 08:43:05 -04:00
/* password reset success page path */
passwordResetSuccess : ? string ;
2021-02-09 14:03:57 +01:00
/* invalid verification link page path */
invalidVerificationLink : ? string ;
/* expired verification link page path */
expiredVerificationLink : ? string ;
/* invalid password reset link page path */
invalidPasswordResetLink : ? string ;
2019-06-15 04:35:09 +08:00
/* for masking user-facing pages */
parseFrameURL : ? string ;
2017-10-23 08:43:05 -04:00
}
export interface LiveQueryOptions {
/ * p a r s e - s e r v e r ' s L i v e Q u e r y c l a s s N a m e s
: ENV : PARSE _SERVER _LIVEQUERY _CLASSNAMES * /
2018-09-01 13:58:06 -04:00
classNames : ? ( string [ ] ) ;
2019-05-11 19:13:41 -05:00
/* parse-server's LiveQuery redisOptions */
redisOptions : ? any ;
2017-10-23 08:43:05 -04:00
/* parse-server's LiveQuery redisURL */
2018-09-01 13:58:06 -04:00
redisURL : ? string ;
2017-10-23 08:43:05 -04:00
/* LiveQuery pubsub adapter */
2018-09-01 13:58:06 -04:00
pubSubAdapter : ? Adapter < PubSubAdapter > ;
2019-07-30 09:05:41 -05:00
/* Adapter module for the WebSocketServer */
wssAdapter : ? Adapter < WSSAdapter > ;
2017-10-23 08:43:05 -04:00
}
export interface LiveQueryServerOptions {
/* This string should match the appId in use by your Parse Server. If you deploy the LiveQuery server alongside Parse Server, the LiveQuery server will try to use the same appId.*/
2018-09-01 13:58:06 -04:00
appId : ? string ;
2017-10-23 08:43:05 -04:00
/* This string should match the masterKey in use by your Parse Server. If you deploy the LiveQuery server alongside Parse Server, the LiveQuery server will try to use the same masterKey.*/
2018-09-01 13:58:06 -04:00
masterKey : ? string ;
2017-10-23 08:43:05 -04:00
/* This string should match the serverURL in use by your Parse Server. If you deploy the LiveQuery server alongside Parse Server, the LiveQuery server will try to use the same serverURL.*/
2018-09-01 13:58:06 -04:00
serverURL : ? string ;
2017-10-23 08:43:05 -04:00
/* A JSON object that serves as a whitelist of keys. It is used for validating clients when they try to connect to the LiveQuery server. Check the following Security section and our protocol specification for details.*/
2018-09-01 13:58:06 -04:00
keyPairs : ? any ;
2018-08-10 15:51:31 -04:00
/* Number of milliseconds between ping/pong frames. The WebSocket server sends ping/pong frames to the clients to keep the WebSocket alive. This value defines the interval of the ping/pong frame from the server to clients, defaults to 10 * 1000 ms (10 s).*/
2018-09-01 13:58:06 -04:00
websocketTimeout : ? number ;
2020-10-21 16:32:07 -07:00
/* Number in milliseconds. When clients provide the sessionToken to the LiveQuery server, the LiveQuery server will try to fetch its ParseUser's objectId from parse server and store it in the cache. The value defines the duration of the cache. Check the following Security section and our protocol specification for details, defaults to 5 * 1000 ms (5 seconds).*/
2018-09-01 13:58:06 -04:00
cacheTimeout : ? number ;
2018-08-10 15:51:31 -04:00
/* This string defines the log level of the LiveQuery server. We support VERBOSE, INFO, ERROR, NONE, defaults to INFO.*/
2018-09-01 13:58:06 -04:00
logLevel : ? string ;
2018-09-08 14:12:23 -04:00
/ * T h e p o r t t o r u n t h e L i v e Q u e r y s e r v e r , d e f a u l t s t o 1 3 3 7 .
: DEFAULT : 1337 * /
port : ? number ;
2019-05-11 19:13:41 -05:00
/* parse-server's LiveQuery redisOptions */
redisOptions : ? any ;
2017-10-23 08:43:05 -04:00
/* parse-server's LiveQuery redisURL */
2018-09-01 13:58:06 -04:00
redisURL : ? string ;
2017-10-23 08:43:05 -04:00
/* LiveQuery pubsub adapter */
2018-09-01 13:58:06 -04:00
pubSubAdapter : ? Adapter < PubSubAdapter > ;
2019-07-30 09:05:41 -05:00
/* Adapter module for the WebSocketServer */
wssAdapter : ? Adapter < WSSAdapter > ;
2017-10-23 08:43:05 -04:00
}
2020-07-15 20:10:33 +02:00
export interface IdempotencyOptions {
/ * A n a r r a y o f p a t h s f o r w h i c h t h e f e a t u r e s h o u l d b e e n a b l e d . T h e m o u n t p a t h m u s t n o t b e i n c l u d e d , f o r e x a m p l e i n s t e a d o f ` / p a r s e / f u n c t i o n s / m y F u n c t i o n ` s p e c i f i y ` f u n c t i o n s / m y F u n c t i o n ` . T h e e n t r i e s a r e i n t e r p r e t e d a s r e g u l a r e x p r e s s i o n , f o r e x a m p l e ` f u n c t i o n s / . * ` m a t c h e s a l l f u n c t i o n s , ` j o b s / . * ` m a t c h e s a l l j o b s , ` c l a s s e s / . * ` m a t c h e s a l l c l a s s e s , ` . * ` m a t c h e s a l l p a t h s .
: DEFAULT : [ ] * /
paths : ? ( string [ ] ) ;
/ * T h e d u r a t i o n i n s e c o n d s a f t e r w h i c h a r e q u e s t r e c o r d i s d i s c a r d e d f r o m t h e d a t a b a s e , d e f a u l t s t o 3 0 0 s .
: DEFAULT : 300 * /
ttl : ? number ;
}
2020-12-04 08:03:29 +11:00
export interface AccountLockoutOptions {
2021-04-06 16:32:48 +02:00
/ * S e t t h e d u r a t i o n i n m i n u t e s t h a t a l o c k e d - o u t a c c o u n t r e m a i n s l o c k e d o u t b e f o r e a u t o m a t i c a l l y b e c o m i n g u n l o c k e d .
< br > < br >
Valid values are greater than ` 0 ` and less than ` 100000 ` . * /
2020-12-04 08:03:29 +11:00
duration : ? number ;
2021-04-06 16:32:48 +02:00
/ * S e t t h e n u m b e r o f f a i l e d s i g n - i n a t t e m p t s t h a t w i l l c a u s e a u s e r a c c o u n t t o b e l o c k e d . I f t h e a c c o u n t i s l o c k e d . T h e a c c o u n t w i l l u n l o c k a f t e r t h e d u r a t i o n s e t i n t h e ` d u r a t i o n ` o p t i o n h a s p a s s e d a n d n o f u r t h e r l o g i n a t t e m p t s h a v e b e e n m a d e .
< br > < br >
Valid values are greater than ` 0 ` and less than ` 1000 ` . * /
2020-12-04 08:03:29 +11:00
threshold : ? number ;
2021-04-06 16:32:48 +02:00
/ * S e t t o ` t r u e ` i f t h e a c c o u n t s h o u l d b e u n l o c k e d a f t e r a s u c c e s s f u l p a s s w o r d r e s e t .
< br > < br >
Default is ` false ` .
< br >
Requires options ` duration ` and ` threshold ` to be set .
2021-02-01 01:07:04 +01:00
: DEFAULT : false * /
unlockOnPasswordReset : ? boolean ;
2020-12-04 08:03:29 +11:00
}
export interface PasswordPolicyOptions {
2021-04-06 16:32:48 +02:00
/ * S e t t h e r e g u l a r e x p r e s s i o n v a l i d a t i o n p a t t e r n a p a s s w o r d m u s t m a t c h t o b e a c c e p t e d .
< br > < br >
If used in combination with ` validatorCallback ` , the password must pass both to be accepted . * /
2020-12-04 08:03:29 +11:00
validatorPattern : ? string ;
2021-04-06 16:32:48 +02:00
/* */
/ * S e t a c a l l b a c k f u n c t i o n t o v a l i d a t e a p a s s w o r d t o b e a c c e p t e d .
< br > < br >
If used in combination with ` validatorPattern ` , the password must pass both to be accepted . * /
2020-12-04 08:03:29 +11:00
validatorCallback : ? ( ) => void ;
2021-04-06 16:32:48 +02:00
/ * S e t t h e e r r o r m e s s a g e t o b e s e n t .
< br > < br >
Default is ` Password does not meet the Password Policy requirements. ` * /
validationError : ? string ;
/ * S e t t o ` t r u e ` t o d i s a l l o w t h e u s e r n a m e a s p a r t o f t h e p a s s w o r d .
< br > < br >
Default is ` false ` .
: DEFAULT : false * /
2020-12-04 08:03:29 +11:00
doNotAllowUsername : ? boolean ;
2021-04-06 16:32:48 +02:00
/* Set the number of days after which a password expires. Login attempts fail if the user does not reset the password before expiration. */
2020-12-04 08:03:29 +11:00
maxPasswordAge : ? number ;
2021-04-06 16:32:48 +02:00
/ * S e t t h e n u m b e r o f p r e v i o u s p a s s w o r d t h a t w i l l n o t b e a l l o w e d t o b e s e t a s n e w p a s s w o r d . I f t h e o p t i o n i s n o t s e t o r s e t t o ` 0 ` , n o p r e v i o u s p a s s w o r d s w i l l b e c o n s i d e r e d .
< br > < br >
Valid values are >= ` 0 ` and <= ` 20 ` .
< br >
Default is ` 0 ` .
* /
2020-12-04 08:03:29 +11:00
maxPasswordHistory : ? number ;
2021-04-06 16:32:48 +02:00
/ * S e t t h e v a l i d i t y d u r a t i o n o f t h e p a s s w o r d r e s e t t o k e n i n s e c o n d s a f t e r w h i c h t h e t o k e n e x p i r e s . T h e t o k e n i s u s e d i n t h e l i n k t h a t i s s e t i n t h e e m a i l . A f t e r t h e t o k e n e x p i r e s , t h e l i n k b e c o m e s i n v a l i d a n d a n e w l i n k h a s t o b e s e n t . I f t h e o p t i o n i s n o t s e t o r s e t t o ` u n d e f i n e d ` , t h e n t h e t o k e n n e v e r e x p i r e s .
< br > < br >
For example , to expire the token after 2 hours , set a value of 7200 seconds ( = 60 seconds * 60 minutes * 2 hours ) .
< br > < br >
Default is ` undefined ` .
* /
2020-12-04 08:03:29 +11:00
resetTokenValidityDuration : ? number ;
2021-04-06 16:32:48 +02:00
/ * S e t t o ` t r u e ` i f a p a s s w o r d r e s e t t o k e n s h o u l d b e r e u s e d i n c a s e a n o t h e r t o k e n i s r e q u e s t e d b u t t h e r e i s a t o k e n t h a t i s s t i l l v a l i d , i . e . h a s n o t e x p i r e d . T h i s a v o i d s t h e o f t e n o b s e r v e d i s s u e t h a t a u s e r r e q u e s t s m u l t i p l e e m a i l s a n d d o e s n o t k n o w w h i c h l i n k c o n t a i n s a v a l i d t o k e n b e c a u s e e a c h n e w l y g e n e r a t e d t o k e n w o u l d i n v a l i d a t e t h e p r e v i o u s t o k e n .
< br > < br >
Default is ` false ` .
: DEFAULT : false * /
2020-12-04 08:03:29 +11:00
resetTokenReuseIfValid : ? boolean ;
2023-02-25 06:30:48 +11:00
/ * S e t t o ` t r u e ` i f a r e q u e s t t o r e s e t t h e p a s s w o r d s h o u l d r e t u r n a s u c c e s s r e s p o n s e e v e n i f t h e p r o v i d e d e m a i l a d d r e s s i s i n v a l i d , o r ` f a l s e ` i f t h e r e q u e s t s h o u l d r e t u r n a n e r r o r r e s p o n s e i f t h e e m a i l a d d r e s s i s i n v a l i d .
< br > < br >
Default is ` true ` .
: DEFAULT : true * /
resetPasswordSuccessOnInvalidEmail : ? boolean ;
2020-12-04 08:03:29 +11:00
}
2020-12-17 20:16:37 +11:00
export interface FileUploadOptions {
2024-03-11 01:11:27 +11:00
/ * S e t s t h e a l l o w e d f i l e e x t e n s i o n s f o r u p l o a d i n g f i l e s . T h e e x t e n s i o n i s d e f i n e d a s a n a r r a y o f f i l e e x t e n s i o n s , o r a r e g e x p a t t e r n . < b r > < b r > I t i s r e c o m m e n d e d t o r e s t r i c t t h e f i l e u p l o a d e x t e n s i o n s a s m u c h a s p o s s i b l e . H T M L f i l e s a r e e s p e c i a l l y p r o b l e m a t i c a s t h e y m a y b e u s e d b y a n a t t a c k e r w h o u p l o a d s a H T M L f o r m t o l o o k l e g i t i m a t e u n d e r y o u r a p p ' s d o m a i n n a m e , o r t o c o m p r o m i s e t h e s e s s i o n t o k e n o f a n o t h e r u s e r v i a a c c e s s i n g t h e b r o w s e r ' s l o c a l s t o r a g e . < b r > < b r > D e f a u l t s t o ` ^ ( ? ! ( h | H ) ( t | T ) ( m | M ) ( l | L ) ? $ ) ` w h i c h a l l o w s a n y f i l e e x t e n s i o n e x c e p t H T M L f i l e s .
: DEFAULT : [ "^(?!(h|H)(t|T)(m|M)(l|L)?$)" ] * /
2023-05-21 01:31:52 +02:00
fileExtensions : ? ( string [ ] ) ;
2020-12-17 20:16:37 +11:00
/ * I s t r u e i f f i l e u p l o a d s h o u l d b e a l l o w e d f o r a n o n y m o u s u s e r s .
: DEFAULT : false * /
enableForAnonymousUser : ? boolean ;
/ * I s t r u e i f f i l e u p l o a d s h o u l d b e a l l o w e d f o r a u t h e n t i c a t e d u s e r s .
: DEFAULT : true * /
enableForAuthenticatedUser : ? boolean ;
/ * I s t r u e i f f i l e u p l o a d s h o u l d b e a l l o w e d f o r a n y o n e , r e g a r d l e s s o f u s e r a u t h e n t i c a t i o n .
: DEFAULT : false * /
enableForPublic : ? boolean ;
}
2021-03-16 16:05:36 -05:00
export interface DatabaseOptions {
2021-03-17 01:57:10 +01:00
/* Enables database real-time hooks to update single schema cache. Set to `true` if using multiple Parse Servers instances connected to the same database. Failing to do so will cause a schema change to not propagate to all instances and re-syncing will only happen when the instances restart. To use this feature with MongoDB, a replica set cluster with [change stream](https:/ / docs . mongodb . com / manual / changeStreams / # availability ) support is required .
2021-03-16 16:05:36 -05:00
: DEFAULT : false * /
enableSchemaHooks : ? boolean ;
2023-02-27 11:55:47 +11:00
/* The duration in seconds after which the schema cache expires and will be refetched from the database. Use this option if using multiple Parse Servers instances connected to the same database. A low duration will cause the schema cache to be updated too often, causing unnecessary database reads. A high duration will cause the schema to be updated too rarely, increasing the time required until schema changes propagate to all server instances. This feature can be used as an alternative or in conjunction with the option `enableSchemaHooks`. Default is infinite which means the schema cache never expires. */
schemaCacheTtl : ? number ;
2024-07-17 17:48:33 +02:00
/* The MongoDB driver option to set whether to retry failed writes. */
retryWrites : ? boolean ;
/* The MongoDB driver option to set a cumulative time limit in milliseconds for processing operations on a cursor. */
maxTimeMS : ? number ;
/* The MongoDB driver option to set the maximum replication lag for reads from secondary nodes.*/
maxStalenessSeconds : ? number ;
2025-01-27 20:21:40 -05:00
/* The MongoDB driver option to set the minimum number of opened, cached, ready-to-use database connections maintained by the driver. */
minPoolSize : ? number ;
2024-07-17 17:48:33 +02:00
/* The MongoDB driver option to set the maximum number of opened, cached, ready-to-use database connections maintained by the driver. */
maxPoolSize : ? number ;
2025-01-27 20:21:40 -05:00
/* The MongoDB driver option to specify the amount of time, in milliseconds, to wait to establish a single TCP socket connection to the server before raising an error. Specifying 0 disables the connection timeout. */
connectTimeoutMS : ? number ;
/* The MongoDB driver option to specify the amount of time, in milliseconds, spent attempting to send or receive on a socket before timing out. Specifying 0 means no timeout. */
socketTimeoutMS : ? number ;
2025-01-29 19:28:04 -05:00
/* The MongoDB driver option to set whether the socket attempts to connect to IPv6 and IPv4 addresses until a connection is established. If available, the driver will select the first IPv6 address. */
autoSelectFamily : ? boolean ;
/* The MongoDB driver option to specify the amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the autoSelectFamily option. If set to a positive integer less than 10, the value 10 is used instead. */
autoSelectFamilyAttemptTimeout : ? number ;
2025-10-16 09:29:02 +02:00
/* Set to `true` to disable validation of index fields. When disabled, indexes can be created even if the fields do not exist in the schema. This can be useful when creating indexes on fields that will be added later. */
disableIndexFieldValidation : ? boolean ;
2021-03-16 16:05:36 -05:00
}
2022-05-29 09:50:43 +10:00
export interface AuthAdapter {
/ * I s ` t r u e ` i f t h e a u t h a d a p t e r i s e n a b l e d , ` f a l s e ` o t h e r w i s e .
2024-02-15 03:28:09 +03:00
: DEFAULT : false
2022-05-29 09:50:43 +10:00
: ENV :
* /
enabled : ? boolean ;
}
2022-12-07 22:55:45 +01:00
export interface LogLevels {
2024-02-15 00:54:30 +03:00
/ * L o g l e v e l u s e d b y t h e C l o u d C o d e T r i g g e r s ` a f t e r S a v e ` , ` a f t e r D e l e t e ` , ` a f t e r F i n d ` , ` a f t e r L o g o u t ` . D e f a u l t i s ` i n f o ` .
2022-12-07 22:55:45 +01:00
: DEFAULT : info
* /
triggerAfter : ? string ;
2024-02-15 00:54:30 +03:00
/ * L o g l e v e l u s e d b y t h e C l o u d C o d e T r i g g e r s ` b e f o r e S a v e ` , ` b e f o r e D e l e t e ` , ` b e f o r e F i n d ` , ` b e f o r e L o g i n ` o n s u c c e s s . D e f a u l t i s ` i n f o ` .
2022-12-07 22:55:45 +01:00
: DEFAULT : info
* /
triggerBeforeSuccess : ? string ;
2024-02-15 00:54:30 +03:00
/ * L o g l e v e l u s e d b y t h e C l o u d C o d e T r i g g e r s ` b e f o r e S a v e ` , ` b e f o r e D e l e t e ` , ` b e f o r e F i n d ` , ` b e f o r e L o g i n ` o n e r r o r . D e f a u l t i s ` e r r o r ` .
2022-12-07 22:55:45 +01:00
: DEFAULT : error
* /
triggerBeforeError : ? string ;
2023-05-09 15:03:00 +02:00
/ * L o g l e v e l u s e d b y t h e C l o u d C o d e F u n c t i o n s o n s u c c e s s . D e f a u l t i s ` i n f o ` .
: DEFAULT : info
* /
cloudFunctionSuccess : ? string ;
/ * L o g l e v e l u s e d b y t h e C l o u d C o d e F u n c t i o n s o n e r r o r . D e f a u l t i s ` e r r o r ` .
: DEFAULT : error
* /
cloudFunctionError : ? string ;
2022-12-07 22:55:45 +01:00
}