@@ -6,7 +6,7 @@ import type { AttributeMap, ObjectCache, OpsMap, State } from './ObjectStateMuta
6
6
import type ParseFile from './ParseFile' ;
7
7
import type { FileSource } from './ParseFile' ;
8
8
import type { Op } from './ParseOp' ;
9
- import type ParseObject from './ParseObject' ;
9
+ import type ParseObject , { SaveOptions } from './ParseObject' ;
10
10
import type { QueryJSON } from './ParseQuery' ;
11
11
import type ParseUser from './ParseUser' ;
12
12
import type { AuthData } from './ParseUser' ;
@@ -73,6 +73,11 @@ type QueryController = {
73
73
find : ( className : string , params : QueryJSON , options : RequestOptions ) => Promise ,
74
74
aggregate : ( className : string , params : any , options : RequestOptions ) => Promise ,
75
75
} ;
76
+ type EventuallyQueue = {
77
+ save : ( object : ParseObject , serverOptions : SaveOptions ) => Promise ,
78
+ destroy : ( object : ParseObject , serverOptions : RequestOptions ) => Promise ,
79
+ poll : ( ms : number ) => void
80
+ } ;
76
81
type RESTController = {
77
82
request : ( method : string , path : string , data : mixed , options : RequestOptions ) => Promise ,
78
83
ajax : ( method : string , url : string , data : any , headers ?: any , options : FullOptions ) => Promise ,
@@ -363,6 +368,15 @@ const CoreManager = {
363
368
return config [ 'RESTController' ] ;
364
369
} ,
365
370
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
+
366
380
setSchemaController ( controller : SchemaController ) {
367
381
requireMethods (
368
382
'SchemaController' ,
0 commit comments