1 import * as schema from './xcally_configuration.schema.json'
3 declare type ValidProperties = keyof typeof schema.properties
6 * Logging Level. If VERBOSE and NODE_ENV is development, it will also make log each query
8 declare enum XcDebugLevel {
19 * Configuration Object for Motion V3
21 declare interface Configuration {
23 * path of the execution root folder, resolved at runtime.
24 * In dev and test environment, it's 'src', while in the build it's usually 'dist/server'
28 * Node ENV. Relevant values for motion are: development, test, build, production, vscode_debugger
33 * shortcut for environment === 'production'
37 * shortcut for environment === 'test'
41 * shortcut for environment !== 'production' && environment !== 'test' && environment !== build.
42 * When true, it usually means you are using nodemon in dev mode and both
43 * motion-client and motion-chat are running as detached projects with webpack-dev-server
45 isDevelopment: boolean
48 * Domain for Google OAuth callback
52 * Google OAuth Client ID
73 * History/Replica Database name
75 mysqlHistoryDatabase: string
77 * History/Replica Database password
79 mysqlHistoryPassword: string
81 * History/Replica Database user name
83 mysqlHistoryUser: string
86 * IP Address for RPC AGI motion process
90 * Port for the AGI motion process
94 * IP Address or hostname for Asterisk connection
100 asteriskPassword: string
102 * Port for Asterisk connection
106 * Asterisk shared folder path
108 asteriskSharedFolder: string
112 asteriskUsername: string
116 browserSyncPort: number
118 * IP Address or hostname for MySQL Database connection
122 * Sequelize: The maximum time, in milliseconds, that a connection can be idle before being
127 * Sequelize: Maximum number of connection in pool
131 * Sequelize: Minimum number of connection in pool
135 * Port for MySQL Database connection
140 * IP Address or hostname for MySQL History/Replica Database connection
142 historyDbHost: string
144 * Sequelize: The maximum time, in milliseconds, that a connection to History/Replica db can be idle before being
147 historyDbPoolIdle: number
149 * Sequelize: Maximum number of connection to History/Replica db in pool
151 historyDbPoolMax: number
153 * Sequelize: Minimum number of connection to History/Replica db in pool
155 historyDbPoolMin: number
157 * Port for MySQL History/Replica Database connection
159 historyDbPort: number
162 * Logging Level. If VERBOSE and NODE_ENV is development, it will also make log each query
164 debugLevel: XcDebugLevel
166 * License token. Required for development, or for cluster mode
168 licenseToken: null | string
170 * When true, the debugger will attach to the processes in the test containers. Useful for
171 * debugging forked processes in integration tests
173 inspectTests: boolean
175 * IP Address for the main motion process. Set 0.0.0.0 for listening on any interface, e.g.
180 * Path where to store log files. Set to some folder on your machine when developing, e.g.
185 * Port for the main motion process connection
189 * Voice recording secret
191 recordingSecret: string
193 * IP Address or hostname for Redis connection
199 redisPassword?: string
201 * Port for Redis connection
207 redisUsername?: string
209 * IP Address for the RPC AMI motion process
213 * Port for the RPC AMI motion process
217 * IP Address for the RPC Email motion process
221 * Port for the RPC Email motion process
225 * IP Address for the RPC motion process
229 * Port for the RPC motion process
233 * IP Address for the RPC Routing motion process
237 * Port for the RPC Routing motion process
239 rpcRoutingPort: number
241 * When true, the server will perform DB Seed at startup
245 * Session secret for cookies
247 sessionSecret: string
249 * When true, XDR will be disabled. Useful in development mode
254 * Dialer max number originate
256 maxNumberOriginate: number
260 * Returns a configuration as a singleton, immutable, object,
261 * that holds the whole app configuration values
263 * const config = getConfig()
264 * console.log('Root folder:', config.root)
266 declare function getConfig(): Readonly<Configuration>