mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
fix(algoliasearch): add missing createIfNotExists on partial update (#25652)
* fix(algoliasearch): add createIfNotExists in callback version of partialUpdateObject(s) * fix(algoliasearch): add createIfNotExists in promise version of partialUpdateObject(s) * test(algoliasearch): add tests for partialUpdateObject(s)
This commit is contained in:
committed by
Sheetal Nandi
parent
28aa874704
commit
d2159cc9cc
@@ -150,4 +150,17 @@ let _algoliaQueryParameters: QueryParameters = {
|
||||
let index: Index = algoliasearch('', '').initIndex('');
|
||||
|
||||
let search = index.search({ query: '' });
|
||||
|
||||
index.search({ query: '' }, (err, res) => {});
|
||||
|
||||
// partialUpdateObject
|
||||
index.partialUpdateObject({}, () => {});
|
||||
index.partialUpdateObject({}, false, () => {});
|
||||
index.partialUpdateObject({}).then(() => {});
|
||||
index.partialUpdateObject({}, false).then(() => {});
|
||||
|
||||
// partialUpdateObjects
|
||||
index.partialUpdateObjects([{}], () => {});
|
||||
index.partialUpdateObjects([{}], false, () => {});
|
||||
index.partialUpdateObjects([{}]).then(() => {});
|
||||
index.partialUpdateObjects([{}], false).then(() => {});
|
||||
|
||||
Vendored
+5
-4
@@ -286,14 +286,13 @@ declare namespace algoliasearch {
|
||||
* https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects
|
||||
*/
|
||||
partialUpdateObject(object: {}, cb: (err: Error, res: Task) => void): void;
|
||||
partialUpdateObject(object: {}, createIfNotExists: boolean, cb: (err: Error, res: Task) => void): void;
|
||||
/**
|
||||
* Update parameters of a list of objects
|
||||
* https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects
|
||||
*/
|
||||
partialUpdateObjects(
|
||||
objects: {}[],
|
||||
cb: (err: Error, res: Task) => void
|
||||
): void;
|
||||
partialUpdateObjects(objects: {}[], cb: (err: Error, res: Task) => void): void;
|
||||
partialUpdateObjects(objects: {}[], createIfNotExists: boolean, cb: (err: Error, res: Task) => void): void;
|
||||
/**
|
||||
* Delete a specific object
|
||||
* https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects
|
||||
@@ -531,11 +530,13 @@ declare namespace algoliasearch {
|
||||
* https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects
|
||||
*/
|
||||
partialUpdateObject(object: {}): Promise<Task>;
|
||||
partialUpdateObject(object: {}, createIfNotExists: boolean): Promise<Task>;
|
||||
/**
|
||||
* Update parameters of a list of objects
|
||||
* https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects
|
||||
*/
|
||||
partialUpdateObjects(objects: {}[]): Promise<Task>;
|
||||
partialUpdateObjects(objects: {}[], createIfNotExists?: boolean): Promise<Task>;
|
||||
/**
|
||||
* Delete a specific object
|
||||
* https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects
|
||||
|
||||
Reference in New Issue
Block a user