From a70eac8627d55e88c8f2359d5934e8b6078090f6 Mon Sep 17 00:00:00 2001 From: Chris Grant Date: Sun, 23 Sep 2018 09:49:15 +0100 Subject: [PATCH 1/3] Satisfying new Full Text search tests. --- types/parse/index.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/types/parse/index.d.ts b/types/parse/index.d.ts index 63bc16d17a..7987c3658c 100644 --- a/types/parse/index.d.ts +++ b/types/parse/index.d.ts @@ -634,6 +634,7 @@ declare namespace Parse { exists(key: string): Query; find(options?: Query.FindOptions): Promise; first(options?: Query.FirstOptions): Promise; + fullText(key: string, value: string, options?: Query.FullTextOptions): Query; get(objectId: string, options?: Query.GetOptions): Promise; greaterThan(key: string, value: any): Query; greaterThanOrEqualTo(key: string, value: any): Query; @@ -675,6 +676,13 @@ declare namespace Parse { // Sort documentation https://docs.mongodb.com/v3.2/reference/operator/aggregation/sort/#pipe._S_sort sort?: {[key: string]: 1|-1}; } + + // According to https://parseplatform.org/Parse-SDK-JS/api/2.1.0/Parse.Query.html#fullText + interface FullTextOptions { + language: string; + caseSensitive: boolean; + diacriticSensitive: boolean; + } } /** From 3b27e3227dfaf288de49a6596954398eb9ef6379 Mon Sep 17 00:00:00 2001 From: Chris Grant Date: Sun, 23 Sep 2018 09:51:15 +0100 Subject: [PATCH 2/3] Added fullText test. --- types/parse/parse-tests.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/parse/parse-tests.ts b/types/parse/parse-tests.ts index acb194ed6a..7f7f72e072 100644 --- a/types/parse/parse-tests.ts +++ b/types/parse/parse-tests.ts @@ -83,6 +83,7 @@ function test_query() { const query = new Parse.Query(GameScore); query.equalTo("playerName", "Dan Stemkoski"); query.notEqualTo("playerName", "Michael Yabuti"); + query.fullText("playerName", "dan", { language: 'en', caseSensitive: false, diacriticSensitive: true }); query.greaterThan("playerAge", 18); query.limit(10); query.skip(10); From 5f62d000ce403d9fc3ab3cd75b92ba3a39551c4a Mon Sep 17 00:00:00 2001 From: Chris Grant Date: Fri, 5 Oct 2018 12:10:16 +0100 Subject: [PATCH 3/3] Added ? to optional properties. --- types/parse/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/parse/index.d.ts b/types/parse/index.d.ts index 7987c3658c..5f75772541 100644 --- a/types/parse/index.d.ts +++ b/types/parse/index.d.ts @@ -679,9 +679,9 @@ declare namespace Parse { // According to https://parseplatform.org/Parse-SDK-JS/api/2.1.0/Parse.Query.html#fullText interface FullTextOptions { - language: string; - caseSensitive: boolean; - diacriticSensitive: boolean; + language?: string; + caseSensitive?: boolean; + diacriticSensitive?: boolean; } }