@@ -21,6 +21,7 @@ import type { PushData } from './Push';
21
21
type RequestOptions = {
22
22
useMasterKey ?: boolean ;
23
23
sessionToken ? : string ;
24
+ installationId ? : string ;
24
25
} ;
25
26
type AnalyticsController = {
26
27
track : ( name : string , dimensions : { [ key : string ] : string } ) => ParsePromise ;
@@ -116,6 +117,7 @@ var config: { [key: string]: mixed } = {
116
117
! process . version . electron ) ,
117
118
REQUEST_ATTEMPT_LIMIT : 5 ,
118
119
SERVER_URL : 'https://api.parse.com/1' ,
120
+ LIVEQUERY_SERVER_URL : null ,
119
121
VERSION : 'js' + require ( '../package.json' ) . version ,
120
122
APPLICATION_ID : null ,
121
123
JAVASCRIPT_KEY : null ,
@@ -454,5 +456,25 @@ module.exports = {
454
456
455
457
getUserController ( ) : UserController {
456
458
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' ] ;
457
479
}
458
480
}
0 commit comments