@@ -117,6 +117,7 @@ var config: { [key: string]: mixed } = {
117117 ! process . version . electron ) ,
118118 REQUEST_ATTEMPT_LIMIT : 5 ,
119119 SERVER_URL : 'https://api.parse.com/1' ,
120+ LIVEQUERY_SERVER_URL : null ,
120121 VERSION : 'js' + require ( '../package.json' ) . version ,
121122 APPLICATION_ID : null ,
122123 JAVASCRIPT_KEY : null ,
@@ -455,5 +456,25 @@ module.exports = {
455456
456457 getUserController ( ) : UserController {
457458 return config [ 'UserController' ] ;
459+ } ,
460+
461+ setLiveQueryController ( controller : any ) {
462+ if ( typeof controller . subscribe !== 'function' ) {
463+ throw new Error ( 'LiveQueryController must implement subscribe()' ) ;
464+ }
465+ if ( typeof controller . unsubscribe !== 'function' ) {
466+ throw new Error ( 'LiveQueryController must implement unsubscribe()' ) ;
467+ }
468+ if ( typeof controller . open !== 'function' ) {
469+ throw new Error ( 'LiveQueryController must implement open()' ) ;
470+ }
471+ if ( typeof controller . close !== 'function' ) {
472+ throw new Error ( 'LiveQueryController must implement close()' ) ;
473+ }
474+ config [ 'LiveQueryController' ] = controller ;
475+ } ,
476+
477+ getLiveQueryController ( ) : any {
478+ return config [ 'LiveQueryController' ] ;
458479 }
459480}
0 commit comments