@@ -8,6 +8,12 @@ declare namespace AV {
88 export var applicationKey : string ;
99 export var masterKey : string ;
1010
11+ interface FetchOptions {
12+ keys ?: string | string [ ] ;
13+ include ?: string | string [ ] ;
14+ includeACL ?: boolean ;
15+ }
16+
1117 export interface AuthOptions {
1218 /**
1319 * In Cloud Code and Node only, causes the Master Key to be used for this request.
@@ -126,15 +132,15 @@ declare namespace AV {
126132 static withURL ( name : string , url : string ) : File ;
127133 static createWithoutData ( objectId : string ) : File ;
128134
129- destroy < T > ( ) : Promise < T > ;
130- fetch < T > ( options ?: AuthOptions ) : Promise < T > ;
135+ destroy ( ) : Promise < void > ;
136+ fetch ( fetchOptions ?: FetchOptions , options ?: AuthOptions ) : Promise < File > ;
131137 metaData ( ) : any ;
132138 metaData ( metaKey : string ) : any ;
133139 metaData ( metaKey : string , metaValue : any ) : any ;
134140 name ( ) : string ;
135141 ownerId ( ) : string ;
136142 url ( ) : string ;
137- save < T > ( options ?: AuthOptions ) : Promise < T > ;
143+ save ( options ?: AuthOptions ) : Promise < File > ;
138144 setACL ( acl ?: ACL ) : any ;
139145 size ( ) : any ;
140146 thumbnailURL ( width : number , height : number ) : string ;
@@ -254,7 +260,7 @@ declare namespace AV {
254260 destroy < T > ( options ?: Object . DestroyOptions ) : Promise < T > ;
255261 dirty ( attr : String ) : boolean ;
256262 escape ( attr : string ) : string ;
257- fetch < T > ( fetchOptions ?: any , options ?: Object . FetchOptions ) : Promise < T > ;
263+ fetch < T > ( fetchOptions ?: FetchOptions , options ?: AuthOptions ) : Promise < T > ;
258264 fetchWhenSave ( enable : boolean ) : any ;
259265 get ( attr : string ) : any ;
260266 getACL ( ) : ACL ;
@@ -280,8 +286,6 @@ declare namespace AV {
280286
281287 interface DestroyAllOptions extends AuthOptions { }
282288
283- interface FetchOptions extends AuthOptions { }
284-
285289 interface SaveOptions extends AuthOptions , SilentOption , WaitOption { }
286290
287291 interface SaveAllOptions extends AuthOptions { }
@@ -440,6 +444,7 @@ declare namespace AV {
440444 greaterThanOrEqualTo ( key : string , value : any ) : Query ;
441445 include ( key : string ) : Query ;
442446 include ( keys : string [ ] ) : Query ;
447+ includeACL ( value ?: boolean ) : Query ;
443448 lessThan ( key : string , value : any ) : Query ;
444449 lessThanOrEqualTo ( key : string , value : any ) : Query ;
445450 limit ( n : number ) : Query ;
0 commit comments