From 96034d863bf11341d8ef5080eddb3b298b5eb74d Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Sun, 24 Jul 2016 07:47:59 +0200 Subject: [PATCH] Update parse.d.ts (#10249) Alter options for Cloud.run and Query.each --- parse/parse.d.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/parse/parse.d.ts b/parse/parse.d.ts index 4035019c8dd31f..825eedf3864887 100644 --- a/parse/parse.d.ts +++ b/parse/parse.d.ts @@ -25,6 +25,10 @@ declare namespace Parse { interface SuccessFailureOptions extends SuccessOption, ErrorOption { } + + interface SessionTokenOption { + sessionToken?: string; + } interface WaitOption { /** @@ -589,7 +593,7 @@ declare namespace Parse { doesNotExist(key: string): Query; doesNotMatchKeyInQuery(key: string, queryKey: string, query: Query): Query; doesNotMatchQuery(key: string, query: Query): Query; - each(callback: Function, options?: SuccessFailureOptions): Promise; + each(callback: Function, options?: Query.EachOptions): Promise; endsWith(key: string, suffix: string): Query; equalTo(key: string, value: any): Query; exists(key: string): Query; @@ -619,6 +623,7 @@ declare namespace Parse { } namespace Query { + interface EachOptions extends SuccessFailureOptions, UseMasterKeyOption { } interface CountOptions extends SuccessFailureOptions, UseMasterKeyOption { } interface FindOptions extends SuccessFailureOptions, UseMasterKeyOption { } interface FirstOptions extends SuccessFailureOptions, UseMasterKeyOption { } @@ -885,9 +890,11 @@ declare namespace Parse { function define(name: string, func?: (request: FunctionRequest, response: FunctionResponse) => void): void; function httpRequest(options: HTTPOptions): Promise; function job(name: string, func?: (request: JobRequest, status: JobStatus) => void): HttpResponse; - function run(name: string, data?: any, options?: SuccessFailureOptions): Promise; + function run(name: string, data?: any, options?: RunOptions): Promise; function useMasterKey(): void; + interface RunOptions extends SuccessFailureOptions, UseMasterKeyOption, SessionTokenOption { } + /** * To use this Cloud Module in Cloud Code, you must require 'buffer' in your JavaScript file. *