@@ -6,7 +6,7 @@ import type { AttributeMap, ObjectCache, OpsMap, State } from './ObjectStateMuta
66import type ParseFile from './ParseFile' ;
77import type { FileSource } from './ParseFile' ;
88import type { Op } from './ParseOp' ;
9- import type ParseObject from './ParseObject' ;
9+ import type ParseObject , { SaveOptions } from './ParseObject' ;
1010import type { QueryJSON } from './ParseQuery' ;
1111import type ParseUser from './ParseUser' ;
1212import type { AuthData } from './ParseUser' ;
@@ -73,6 +73,11 @@ type QueryController = {
7373 find : ( className : string , params : QueryJSON , options : RequestOptions ) => Promise ,
7474 aggregate : ( className : string , params : any , options : RequestOptions ) => Promise ,
7575} ;
76+ type EventuallyQueue = {
77+ save : ( object : ParseObject , serverOptions : SaveOptions ) => Promise ,
78+ destroy : ( object : ParseObject , serverOptions : RequestOptions ) => Promise ,
79+ poll : ( ms : number ) => void
80+ } ;
7681type RESTController = {
7782 request : ( method : string , path : string , data : mixed , options : RequestOptions ) => Promise ,
7883 ajax : ( method : string , url : string , data : any , headers ?: any , options : FullOptions ) => Promise ,
@@ -363,6 +368,15 @@ const CoreManager = {
363368 return config [ 'RESTController' ] ;
364369 } ,
365370
371+ setEventuallyQueue ( controller : EventuallyQueue ) {
372+ requireMethods ( 'EventuallyQueue' , [ 'poll' , 'save' , 'destroy' ] , controller ) ;
373+ config [ 'EventuallyQueue' ] = controller ;
374+ } ,
375+
376+ getEventuallyQueue ( ) : EventuallyQueue {
377+ return config [ 'EventuallyQueue' ] ;
378+ } ,
379+
366380 setSchemaController ( controller : SchemaController ) {
367381 requireMethods (
368382 'SchemaController' ,
0 commit comments