From 578a7649874cf1f23533035d0400a992fce90345 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 3 Oct 2019 22:20:11 +0200 Subject: [PATCH] feat: condition, pattern, and anchoring are now optional within queries (#38844) * [algoliasearch]: allow optional condition query rules This is a change in the API, and was requested here https://github.com/algolia/algoliasearch-client-javascript/issues/775 * Update index.d.ts --- types/algoliasearch/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/algoliasearch/index.d.ts b/types/algoliasearch/index.d.ts index fadd2aae83..56b1780f8a 100644 --- a/types/algoliasearch/index.d.ts +++ b/types/algoliasearch/index.d.ts @@ -924,15 +924,15 @@ declare namespace algoliasearch { /** * Condition of the rule */ - condition: { + condition?: { /** * Query pattern */ - pattern: string; + pattern?: string; /** * Whether the pattern must match the beginning or the end of the query string, or both, or none. */ - anchoring: 'is' | 'startsWith' | 'endsWith' | 'contains'; + anchoring?: 'is' | 'startsWith' | 'endsWith' | 'contains'; /** * Rule context (format: [A-Za-z0-9_-]+). * When specified, the rule is contextual and applies only when the same context is specified