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
This commit is contained in:
Nuno Maduro
2019-10-03 13:20:11 -07:00
committed by Ryan Cavanaugh
parent 48d7231956
commit 578a764987
+3 -3
View File
@@ -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