mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-24 22:17:06 +08:00
* Add ERROR_STATE flag * added prop options and func timeFormatter added property `options`, which can be found in [the code](15fc4b62f5/smoothie.js (L270)). Even though it's not mentioned in the docs, it useful to be able to access these options after chart is initialized when you want to change appearance in real tme. added function `timeFormatter`, which is mentioned in [right here, in the definitions](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/smoothie/smoothie.d.ts#L127) and can be found in [the code](15fc4b62f5/smoothie.js (L795)) * Fix type errors * Added typings for css-modules-require-hook * Remove spaces * Added semver, added explicit ignore callback, unified array definition and removed one time interface * Overwriting method signature * Correct parameter type * Add MobilePhoneLocale * Add isMobilePhone tests * Type definitions for bit-array * Add emit for cluster * To use the definition inline * [logat.d.ts] Type definition for node module 'logat' (#11485) * Create logat.d.ts * Create logat-tests.ts * Update logat-tests.ts * Update logat-tests.ts * Update logat.d.ts * updated logat test * updated type definiton * [dateformat.d.ts] Add definitions for dateformat * Remove the ES6 module hack * Yayson definitions (#11484) * Add yayson Store typings * Add yayson Store tests * Improve yayson coverage * Specify version in yayson definition * Remove yayson generics and tidy * Changed namespace from angularTouchspin to angular.touchspin (#11414) * [perfect-scrollbar.d.ts] Add definitions for perfect-scrollbar (#11486) * Added types for klaw (#11492) * Added types for klaw * addressed pr comments and `tsfmt -r klaw/*.ts` * add typings for onselected and onunselected methods, refs #11493 (#11496) * Improve through2 declarations (#11499) * [through2] Fix typos * [through2] Change return types to stream.Transform `through2` creates `stream.Transform`-flavored streams, so switching the return types to `stream.Transform` gives us richer typing information than using `NodeJS.ReadWriteStream`, which is missing methods (e.g. `stream.Transform#push`) and the ability to use object mode. * [through2] Add through2.ctor method * [through2] Update header and docs * Add module declaration to crossfilter so that it can be explicitly imported (#11521) * Add typings for murmurhash3js * fix module import to be ES6 compliant * newline at EOF * [rethinkdb] Adds missing promise methods to Cursor and Connection * [rethinkdb] Applied TypeScript formatting to the file * [rethinkdb] Adds types to Cursor methods * webpack - HotModuleReplacementPlugin has opts arg * [openlayers] forEachFeatureAtPixel can return a value See doc http://openlayers.org/en/latest/apidoc/ol.Map.html#forEachFeatureAtPixel * Update react.d.ts Added myself as an author so I get notifications of PRs / updates from GitHub. * vue: fixed definition for activate() in ComponentOption * Fix error that came using typescript 2 This error come when try compile with typescript 2 kue.d.ts(13,3): error TS2440: Import declaration conflicts with local declaration of 'redis' * path can be string or a hash of options As per http://restify.com/#client-api it states: > Note that all further documentation refers to the "short-hand" > form of methods like get/put/del which take a string path. You > can also pass in an object to any of those methods with extra > params (notably headers): So the path can be either a string or a hash of options. * Add CognitoIdentity into aws-sdk * Font advanced config options added (for v2.0.6+) * Add missing slider parameters * Add backspaceToRemoveMessage prop * fixup! path can be string or a hash of options * add request.body (#11395) * add request.body * Update koa-bodyparser.d.ts According to the documentation of `koa-bodyparser`: ```javascript // the parsed body will store in this.request.body // if nothing was parsed, body will be an empty object {} ctx.body = ctx.request.body; ``` Therefore the `body` property will exit in the `request` object. Changing the `body` property from optional to required can also fix the conflict problem in Koa's declaration file: ```ts class Koa extend Request, Response {} ``` * Implement tilebelt definition (#11495) * Add import test (#11476) * [validator] Add new stuff which document not mentioned (#11498) * Add new stuff which document not mentioned * Add related test * http.ServerRequest => http.IncomingMessage (#11500) * [node] Add events for dgram (#11501) * Add events for dgram * Add tests for dgram * Correct dgram.RemoteInfo interface * Correct emit * Correct emit * [node] Add events for tls.Server and tls.TLSSocket (#11502) * Add events for tls.Server * Add tests for tls.Server * Add tests for TLSSocket * Add events for TLSSocket * [react-router] Update getComponents signatures (#11319) Update `getComponent(s)` all over the place. See #9530 for more info. * Updated jquery.dataTables for 1.10.7. (#11408) * Updated jquery.dataTables for 1.10.7. Version release notes: https://cdn.datatables.net/1.10.7/ * Added any() * Added i18n() Note: selector-modifier support currently exists with interface ObjectSelectorModifier. * Added strong variable typing in jquery.dataTables-tests.ts * For parameter 'def', replaced 'Object' data type with 'any' per TypeScript declaration file guidance. * [HAPI] Add `IStrictSessionHandler` (#11523) * Fix #11519 * Added FileResizeOptions for the changed resize function call * getEvent should not be set to void it should return a value (#11135) * getEvent should not be set to void it should return a value * Add type to getActionData for testing * pnotify Add type fpr notice styling and state * fix pnotify test * Remove Generics and replaces by return any * convert space tp tabs * Add barTintColor to NavigatorIOS (#11522) * GreenSock TweenMax TweenLite config Object typed refs #11265 (#11310) * refs #9944 * refs #11265 * refs #11265 * Call strategy with only mode or options (#11466) * Call strategy with only mode or options * Refactor `server.auth.strategy` * - add client.exists([params, [callback]]) (#11515) * Update to Electron 1.4.1 (#11481) * Correct fs.createWriteStream (#11560) * add declaration file for weapp (#11554) * add declaration file of weapp * rename "weapp" to "weapp-api" rename "weapp" to "weapp-api" to avoid naming conflicts * Added more methods to Turf (#11558) * Added more methods to Turf - circle - geojsonType - propReduce - coordAll - tesselate * Replace Object with GeoJSON * Implemented cheap-ruler definition * Remove GeoJSON dependency * Cheap-ruler fixes - Removed GeoJSON from tests - Added return-type to fromTile * Update JSDocs cheap-ruler Update based on comments https://github.com/mapbox/cheap-ruler/pull/20 - Removed `{@name}` - Changed {Object} to {CheapRuler} * [bluebird] document .suppressUnhandledRejections http://bluebirdjs.com/docs/api/suppressunhandledrejections.html * Add typings for shallowequal. * URIjs fix .joinPaths() the .joinPaths function is on URIStatic, not an instance of URI https://medialize.github.io/URI.js/docs.html#static-joinPaths * set document id property to be optional * Fixed type of onchallenge * feat(CKEditor): Add missing typings for `focusManager` * sequelize: fix return value type of Model.findOrXXX methods http://docs.sequelizejs.com/en/latest/api/model/#findorinitialize-promiseinstance-initialized * Added type Point for simplicity Comments from @vladima * add interface for mongoose document optional properties * optional constructor for RecurrenceRule * fix the framework type * add parameter support in initialize() * add callback parameter * Added promise() to the JQueryPromise<T> interface jQuery allows calling a promise() function on a Promise object. Updated the interface to reflect this. * optional authorize * add contains fn * Update ip-tests.ts * Added tests for the promise() method on jqXHR Ensures that the jqXHR object exposes a standard promise because it implements the JQueryPromise<T> interface. * angular-dynamic-local Add "storageKey" definition (#11566) Add "storageKey" definition cf : https://github.com/lgalfaso/angular-dynamic-locale/blob/master/src/tmhDynamicLocale.js#L197 * Added declare module for easier including. (#11562) * Adding recompose@0.20.2 typings (#11577) * Added typings for change-emitter@0.1.2 * Adding recompose@0.20.2 typings * Update typescript definition for selectize to 0.12.13 (#11570) * [react-router-redux] Update action payload type (#11559) The payload for React Redux Router action is a location object. For more information look at the source code [here](https://github.com/reactjs/react-router-redux/blob/master/src/sync.js#L95) * [openlayers] Rewrite for openlayers 3.18.2 (#11339) * Added missing config options for release v2.0.8 (#11595) * [graphql] Create graphql (#11598) * Complete graphql/language * Update graphql/error * Update graphql.d.ts * Create graphql-tests.ts * Update graphql/type * Update graphql/error and graphql/execution * Remove null type * Remove comma * ej typings v14.3.0.49 added (#11597) * ej typings v14.3.0.49 added * jquery dependent added * react-bootstrap-table: add ignoreSinglePage option (#11581) As shown in the [docs](http://allenfang.github.io/react-bootstrap-table/docs.html) ``` ignoreSinglePage : Bool Enable to ignore the pagination if only one page, default is false. ``` * There is no INST_EDGE_FALLING exported const but INT_EDGE_FALLING (#11603) Exporting correct `const` `INST_EDGE_FALLING` -> `INT_EDGE_FALLING` * Complete HighchartsBarStates interface. Add Color interface (#11505) - HighchartsBarStates interfaces didn't include `borderColor` and `color` properties, as documented in http://api.highcharts.com/highcharts/plotOptions.bar.states.hover - A Color interface was added, since the documentation refers many times to `Color` as a type. This colors can be either a string or a gradient, as stated in http://www.highcharts.com/docs/chart-design-and-style/colors. The introduction of this type should help alleviating the errors currently present where certain "color" properties are only allowed to be strings. * Add definition for swagger-jsdoc (#11298) * Add definition for swagger-jsdoc * Update files * Remove interface and use any instead for options, fix tests * Fix Usage example * Add definitions for: "bunyan-config", "express-mung", "node-vitalsigns" and "memwatch-next" (#11285) * Add definition for "bunnymq". * Add definition for "strftime". * Add definitions for: "bunyan-config", "express-mung" and "node-vitalsigns". * Add definitions for: "bunyan-config", "express-mung" and "node-vitalsigns". * Add definition for "memwatch-next". * Fix project URL address. * Rename "node-vitalsigns" to "vitalsigns". * Update definitions. * Use {} instead of "Object" type. Remove unnecessary namespace for "memwatch-next" definition. Rewrite "bunyan-config" definition. * Replace "Object" by "{}". * (helmet): change to namespace and export interfaces (#11585) * Replace reference to deprecated http.ClientResponse with newer http.IncomingMessage (#11596) * [cheerio] Adds missing load(CheerioElement) (#11520) * add id (#11619) * add id * remove readonly * add touch after * fix typo * change Topic property latch to boolean type (#11607) * Add AngularJS linky filter definition (#11507) * Support universal modules for SAT (#11632) * changed versionKey in Schema spec to string * better structure * Add argumentless Q() * add definitions for tz-format (#11565) * add definitions for tz-format * fix return type * Create typings for ngeohash (#11634) * [nprogress] Update configuration properties (#11627) Update a couple of nprogress configuration properties: * `ease` is renamed to `easing`. * `trickleRate` is removed. * `parent` is added. More info [here](https://github.com/rstacruz/nprogress/blob/master/nprogress.js#L19-L31) * Fix leaflet L.GeoJSON.addData et al (#11590) (#11591) * NotificationAlertOptions can have a subtitle (#11638) * Parse5 comment data (#11649) * Add test for data * Update parse5.d.ts * feat: add localforage-cordovasqlitedriver definition (#11650) * Fix export for "bunyan-config" and improve definitions (#11653) * Fix export for "bunyan-config". * Update definitions. Replace "Object" to "{}" type. Add "express" property in "VitalSigns" class. * Update ejs.d.ts (#11467) This typings give an error when templating HTML Error: Cannot invoke an expression whose type lacks a call signature. my code ```javascript var templateFunction = EJS.compile(SOMESTRTEMPLATE); myDomElement.innerHTML = templateFunction(someDataObject) // <= ERROR ``` * Added hyperscript module (#11661) * update parsimmon typings for parsimmon 0.9.2 (#11648) * update parsimmon typings for parsimmon 0.9.2 * add overloads for parsimmon#seq * code review * Fix babel-traverse buildCodeFrameError signature (#11654) The Error argument is not an error instance, instead it is a constructor function that returns an error instance. Additionally, the constructor function is optional, by default SyntaxError is used * Added type definition for riot library (#11664) * Added type definition for riot * Added type information for compile function, version, settings and template error handler * Updated namespace name Riot -> riot * Renamed riot-test.ts -> riot-tests.ts * Add definitions for pem (#11666) https://github.com/andris9/pem * Added hapi-decorators.d.ts (#11668) * Add missing each, and correct type of Date.now() (#11670) * Add definitions for spdy (#11672) https://github.com/indutny/node-spdy * Allow interface to be named (#11673) > error TS4023: Exported variable 'DevTools' has or is using name 'IDevTools' from external module "/Users/remojansen/CODE/forks/redux-bootstrap/node_modules/@types/redux-devtools/index" but cannot be named. * Add array methods to LoDashExplicitArrayWrapper to match LoDashImplicitArrayWrapper. (#11518) * add transducers-js types w/ tests (#11676) * Fix redeclare block-scoped Base64 (#11677) Issue found by https://github.com/dankogai/js-base64/issues/38#issuecomment-250999729 * added seed, randomTests and randomizeTests property (#11678) * Add toJSON method to signature (#11682) * Fix instance of cropperjs for library version > 0.8 (#11490) * Updated fbsdk definitions for authentication responses and api calls. (#11686) Fixes #11327 May help with #11007 * Create typings for jquery-alertable (#11642) * ADD: definition file for the moment-duration-format library (#11557) * Update d.ts file for Dialog API updates (#11526) * Add support for Highcharts modules: offline exporting and boost (#11030) * Create highcharts-modules-offline-exporting * Rename highcharts-modules-offline-exporting to highcharts-modules-offline-exporting.d.ts * Create highcharts-modules-boost.d.ts * Added cash-js.d.ts File (#10765) * Added cash-js.d.ts File * Fixed Link break issue * Renamed from cash-js to cash * Fixed the module name as suggested * Update headroom.d.ts (#11313) notBottom missing from definition * Added the definition for the npm package simple-url-cache (#11296) * Added the definition for the npm package simple-url-cache https://www.npmjs.com/package/simple-url-cache * - Some problems with shells.js missing the touch fucntion deifnition * More details on the touch parameters - nice screenshot btw * Updated the RowMethods interface (#11665) * Updated the RowMethods interface This Interface was missing the Definition of the id() method. Link to official documentation: https://datatables.net/reference/api/row().id() * Changed indentation from tabs to spaces * Added definition file for Defaults Js Library (#11451) * Added missing className property to CardProps (#10823) The className property for CardPros is missing, so using it like <Card className={this.myClass}>...</Card> is not possible. * Add missing perMessageDeflate server option (#11380) * Add missing class AgendaView (#11371) * Add missing class AgendaView * Move class to kendo.ui namespace * Change path to interface * Add static fn * Add static extend * Add static extend * Resolve conflicts * adds system faker methods (#11432) * added definitions for SharePoint file Search.ClientControls.js (#11652) * added definitions for SharePoint file Search.ClientControls.js (Srch namespace, heavily used in Search Display Templates) * --noImplicitAny compatibility fixes also small improvements * more fixes for --noImplicitAny * Adding union type for offset (#11689) * add type definitions for msgpack-lite package. (#11690) * Updating jasmine to version 2.5 (#11688) * Updating jasmine to version 2.5 * Fixing 2 small errors in the update of jasmine * withMock now takes a "() => void" * fixed the withMock syntax error * number added as type to seed function * add missing isEmpty function (#11698) * Added type definitions for terminal-menu (#11697) * Update THREE.js definitions to r81 (#11679) * Update THREE.js definitions to r81 * Update test_unit_maths.ts to r81 * Update version in header to r81 * UPDATE localForage type definitions (#11702) * Update Google Maps API type definition to 3.25 (#11626) * Update Google Maps Places Library definition - According to the Places Library documentation (https://goo.gl/EJFiuQ), certain fields are being removed - I have aligned the Places Library definitions with the API reference (https://goo.gl/kYoi9V) and added deprecation comments for the old properties as they are still accepted until February - I could not find an official deprecation attribute or similar for Typescript definitions so I just left a comment * Update the API version in the header * Apply API changes between version 3.20 and 3.25 - Used the Google Maps API release notes (https://goo.gl/nRUZGJ) as a reference * Fix inconsistant type definition * Override ol.layer.Vector#getSource() (#11703) Reference: http://openlayers.org/en/latest/apidoc/ol.layer.Vector.html * Replace number[] by [number, number] (#11704) * [lodash]: memoize.Cache expects construcor (#11707) https://lodash.com/docs/4.15.0#memoize * Added jquery.flagstrap.js definition suport (#11710) * apply declaration merging (#10900) * Update material-ui.d.ts (#11353) Expose ThemePalette interface. * Change ChartAxisXOptions (#11449) Change the type for minimum and maximum options in ChartAxisXOptions to support both number and Date. * Improve support for arrays of promises (#11685) * Alias IWhenable<T> = IPromise<T> | T * Allow all Q functions to work with either promises or raw values * Allow functions expecting arrays to take promises for arrays Q.race is deliberately excluded, as this does not support this type of argument. * scheduler options (#11543) * Added missing move function (#11563) * Added missing move function Added missing move function in typings so that the move function is recognised by the IDE and the compiler. * Minor derp here * Add missing Valdr typings for validation results and constraints (#11636) * Add missing Valdr types Add ValdrValidationConstraints and ValdrValidationResult typings * Refine Valdr-message typings Set a more refined type to messages instead of any * Expand Valdr typings tests Expand tests to include added typings for ValdrValidationResult and ValdrConstraints * Fix spacing Replace tabs by spaces * Rename vars in test Rename vars to make test clearer * Fix TS issues Added missing types * Remove undefined In TS by default null and undefined are subtypes of all other types * Fix wrong type Add missing namespace * Fix wrong version number Set version to only numbers * Fix wrong version number Keep version to only numbers * Use douple quotes * Remove invalid triple-slash references * Add tsconfig.json files and move main file to index.d.ts * Rename file to index.d.ts * Remove tscparams files * Remove unused file * Remove invalid references * Move hapi-decorator to use index.d.ts * Switch to use external modules * Correctely extend angular * Fix tsconfig.json * Remove unused references * HACK: Put back /// reference tag.
1572 lines
57 KiB
TypeScript
1572 lines
57 KiB
TypeScript
// Type definitions for algoliasearch-client-js 3.18.1
|
|
// Project: https://github.com/algolia/algoliasearch-client-js
|
|
// Definitions by: Baptiste Coquelle <https://github.com/cbaptiste>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
interface AlgoliaResponse {
|
|
/**
|
|
* Contains all the hits matching the query
|
|
* https://github.com/algolia/algoliasearch-client-js#response-format
|
|
*/
|
|
hits: any[];
|
|
/**
|
|
* Current page
|
|
* https://github.com/algolia/algoliasearch-client-js#response-format
|
|
*/
|
|
page: number;
|
|
/**
|
|
* Number of total hits matching the query
|
|
* https://github.com/algolia/algoliasearch-client-js#response-format
|
|
*/
|
|
nbHits: number;
|
|
/**
|
|
* Number of pages
|
|
* https://github.com/algolia/algoliasearch-client-js#response-format
|
|
*/
|
|
nbPage: number;
|
|
/**
|
|
* Number of hits per pages
|
|
* https://github.com/algolia/algoliasearch-client-js#response-format
|
|
*/
|
|
hitsPerPage: number;
|
|
/**
|
|
* Engine processing time (excluding network transfer)
|
|
* https://github.com/algolia/algoliasearch-client-js#response-format
|
|
*/
|
|
processingTimeMS: number;
|
|
/**
|
|
* Query used to perform the search
|
|
* https://github.com/algolia/algoliasearch-client-js#response-format
|
|
*/
|
|
query: string;
|
|
/**
|
|
* GET parameters used to perform the search
|
|
* https://github.com/algolia/algoliasearch-client-js#response-format
|
|
*/
|
|
params: string;
|
|
}
|
|
/*
|
|
Interface for the algolia client object
|
|
*/
|
|
interface AlgoliaClient {
|
|
/**
|
|
* Initialization of the index
|
|
* @param name: index name
|
|
* return algolia index object
|
|
* https://github.com/algolia/algoliasearch-client-js#init-index---initindex
|
|
*/
|
|
initIndex(name: string): AlgoliaIndex;
|
|
/**
|
|
* Query on multiple index
|
|
* @param queries index name, query and query parameters
|
|
* @param cb callback(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#multiple-queries---multiplequeries
|
|
*/
|
|
search(queries: { indexName: string, query: string, options: AlgoliaQueryParameters }, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Query on multiple index
|
|
* @param queries index name, query and query parameters
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#multiple-queries---multiplequeries
|
|
*/
|
|
search(queries: { indexName: string, query: string, options: AlgoliaQueryParameters }): Promise<AlgoliaResponse>;
|
|
/**
|
|
* clear browser cache
|
|
* https://github.com/algolia/algoliasearch-client-js#cache
|
|
*/
|
|
clearCache(): void;
|
|
/**
|
|
* kill alive connections
|
|
* https://github.com/algolia/algoliasearch-client-js#keep-alive
|
|
*/
|
|
destroy(): void;
|
|
/**
|
|
* List all your indices along with their associated information (number of entries, disk size, etc.)
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#list-indices---listindexes
|
|
*/
|
|
listIndexes(cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* List all your indices along with their associated information (number of entries, disk size, etc.)
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#list-indices---listindexes
|
|
*/
|
|
listIndexes(): Promise<any>;
|
|
/**
|
|
* Delete a specific index
|
|
* @param name
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#delete-index---deleteindex
|
|
*/
|
|
deleteIndex(name: string, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Delete a specific index
|
|
* @param name
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#delete-index---deleteindex
|
|
*/
|
|
deleteIndex(name: string): Promise<any>;
|
|
/**
|
|
* Copy an index from a specific index to a new one
|
|
* @param from origin index
|
|
* @param to destination index
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#copy-index---copyindex
|
|
*/
|
|
copyIndex(from: string, to: string, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Copy an index from a specific index to a new one
|
|
* @param from origin index
|
|
* @param to destination index
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#copy-index---copyindex
|
|
*/
|
|
copyIndex(from: string, to: string): Promise<any>;
|
|
/**
|
|
* Move index to a new one (and will overwrite the original one)
|
|
* @param from origin index
|
|
* @param to destination index
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#move-index---moveindex
|
|
*/
|
|
moveIndex(from: string, to: string, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Move index to a new one (and will overwrite the original one)
|
|
* @param from origin index
|
|
* @param to destination index
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#move-index---moveindex
|
|
*/
|
|
moveIndex(from: string, to: string): Promise<any>;
|
|
/**
|
|
* Generate a public API key
|
|
* @param key api key
|
|
* @param filters
|
|
* https://github.com/algolia/algoliasearch-client-js#generate-key---generatesecuredapikey
|
|
*/
|
|
generateSecuredApiKey(key: string, filters: AlgoliaSecuredApiOptions): void;
|
|
/**
|
|
* Perform multiple operations with one API call to reduce latency
|
|
* @param action
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#custom-batch---batch
|
|
*/
|
|
batch(action: AlgoliaAction, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Perform multiple operations with one API call to reduce latency
|
|
* @param action
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#custom-batch---batch
|
|
*/
|
|
batch(action: AlgoliaAction): Promise<any>;
|
|
/**
|
|
* Lists global API Keys
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
|
|
*/
|
|
listUserKeys(cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Lists global API Keys
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
|
|
*/
|
|
listUserKeys(): Promise<any>;
|
|
/**
|
|
* Add global API Keys
|
|
* @param scopes
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
addUserKey(scopes: string[], cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Add global API Keys
|
|
* @param scopes
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
addUserKey(scopes: string[]): Promise<any>;
|
|
/**
|
|
* Add global API Key
|
|
* @param scopes
|
|
* @param options
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
addUserKey(scopes: string[], options: AlgoliaUserKeyOptions, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Add global API Key
|
|
* @param scopes
|
|
* @param options
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
addUserKey(scopes: string[], options: AlgoliaUserKeyOptions): Promise<any>;
|
|
/**
|
|
* Update global API key
|
|
* @param key
|
|
* @param scopes
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey
|
|
*/
|
|
updateUserKey(key: string, scopes: string[], cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Update global API key
|
|
* @param key
|
|
* @param scopes
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey
|
|
*/
|
|
updateUserKey(key: string, scopes: string[]): Promise<any>;
|
|
/**
|
|
* Update global API key
|
|
* @param key
|
|
* @param scopes
|
|
* @param options
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey
|
|
*/
|
|
updateUserKey(key: string, scopes: string[], options: AlgoliaUserKeyOptions, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Update global API key
|
|
* @param key
|
|
* @param scopes
|
|
* @param options
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey
|
|
*/
|
|
updateUserKey(key: string, scopes: string[], options: AlgoliaUserKeyOptions): Promise<any>;
|
|
/**
|
|
* Gets the rights of a global key
|
|
* @param key
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey
|
|
*/
|
|
getUserKeyACL(key: string, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Gets the rights of a global key
|
|
* @param key
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey
|
|
*/
|
|
getUserKeyACL(key: string): Promise<any>;
|
|
/**
|
|
* Deletes a global key
|
|
* @param key
|
|
* @param cb(err,res)
|
|
* https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteuserkey
|
|
*/
|
|
deleteUserKey(key: string, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Deletes a global key
|
|
* @param key
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteuserkey
|
|
*/
|
|
deleteUserKey(key: string): Promise<any>;
|
|
/**
|
|
* Get 1000 last events
|
|
* @param options
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs
|
|
*/
|
|
getLogs(options: LogsOptions, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Get 1000 last events
|
|
* @param options
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs
|
|
*/
|
|
getLogs(options: LogsOptions): Promise<any>;
|
|
}
|
|
/**
|
|
* Interface for the index algolia object
|
|
*/
|
|
interface AlgoliaIndex {
|
|
/**
|
|
* Gets a specific object
|
|
* @param objectID
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects
|
|
*/
|
|
getObject(objectID: string, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Gets specific attributes from an object
|
|
* @param objectID
|
|
* @param attributes
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects
|
|
*/
|
|
getObject(objectID: string, attributes: string[], cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Gets a list of objects
|
|
* @param objectIDs
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects
|
|
*/
|
|
getObjects(objectIDs: string[], cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Add a specific object
|
|
* @param object without objectID
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects
|
|
*/
|
|
addObject(object: {}, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Add a list of objects
|
|
* @param object with objectID
|
|
* @param objectID
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects
|
|
*/
|
|
addObject(object: {}, objectID: string, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Add list of objects
|
|
* @param objects
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects
|
|
*/
|
|
addObjects(objects: [{}], cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Add or replace a specific object
|
|
* @param object
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects
|
|
*/
|
|
saveObject(object: {}, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Add or replace several objects
|
|
* @param objects
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects
|
|
*/
|
|
saveObjects(objects: [{}], cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Update parameters of a specific object
|
|
* @param object
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects
|
|
*/
|
|
partialUpdateObject(object: {}, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Update parameters of a list of objects
|
|
* @param objects
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects
|
|
*/
|
|
partialUpdateObjects(objects: [{}], cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Delete a specific object
|
|
* @param objectID
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects
|
|
*/
|
|
deleteObject(objectID: string, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Delete a list of objects
|
|
* @param objectIDs
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects
|
|
*/
|
|
deleteObjects(objectIDs: string[], cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Delete objects that matches the query
|
|
* @param query
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#delete-by-query---deletebyquery
|
|
*/
|
|
deleteByQuery(query: string, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Delete objects that matches the query
|
|
* @param query
|
|
* @param params of the object
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#delete-by-query---deletebyquery
|
|
*/
|
|
deleteByQuery(query: string, params: {}, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Wait for an indexing task to be compete
|
|
* @param taskID
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#wait-for-operations---waittask
|
|
*/
|
|
waitTask(taskID: number, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Get an index settings
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#get-settings---getsettings
|
|
*/
|
|
getSettings(cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Set an index settings
|
|
* @param settings
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#set-settings---setsettings
|
|
*/
|
|
setSettings(settings: AlgoliaIndexSettings, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Clear cache of an index
|
|
* https://github.com/algolia/algoliasearch-client-js#cache
|
|
*/
|
|
clearCache(): void;
|
|
/**
|
|
* Clear an index content
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#clear-index---clearindex
|
|
*/
|
|
clearIndex(cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Save a synonym object
|
|
* @param synonym
|
|
* @param options
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym
|
|
*/
|
|
saveSynonym(synonym: AlgoliaSynonym, option: SynonymOption, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Save a synonym object
|
|
* @param synonyms
|
|
* @param options
|
|
* @param cb(err, res)
|
|
*/
|
|
batchSynonyms(synonyms: AlgoliaSynonym[], options: SynonymOption, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Delete a specific synonym
|
|
* @param identifier
|
|
* @param options
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#batch-synonyms---batchsynonyms
|
|
*/
|
|
deleteSynonym(identifier: string, options: SynonymOption, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Clear all synonyms of an index
|
|
* @param options
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#clear-all-synonyms---clearsynonyms
|
|
*/
|
|
clearSynonyms(options: SynonymOption, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Get a specific synonym
|
|
* @param identifier
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#get-synonym---getsynonym
|
|
*/
|
|
getSynonym(identifier: string, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Search a synonyms
|
|
* @param options
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms
|
|
*/
|
|
searchSynonyms(options: SearchSynonymOptions, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* List index user keys
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#list-api-keys---listapikeys
|
|
*/
|
|
listUserKeys(cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Add key for this index
|
|
* @param scopes
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
addUserKey(scopes: string[], cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Add key for this index
|
|
* @param scopes
|
|
* @param options
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
addUserKey(scopes: string[], options: AlgoliaUserKeyOptions, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Update a key for this index
|
|
* @param key
|
|
* @param scopes
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey
|
|
*/
|
|
updateUserKey(key: string, scopes: string[], cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Update a key for this index
|
|
* @param key
|
|
* @param scopes
|
|
* @param options
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey
|
|
*/
|
|
updateUserKey(key: string, scopes: string[], options: AlgoliaUserKeyOptions, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Gets the rights of an index specific key
|
|
* @param key
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#get-key-permissions---getuserkeyacl
|
|
*/
|
|
getUserKeyACL(key: string, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Deletes an index specific key
|
|
* @param key
|
|
* @param cb(err, res)
|
|
* https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteuserkey
|
|
*/
|
|
deleteUserKey(key: string, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Gets a specific object
|
|
* @param objectID
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects
|
|
*/
|
|
getObject(objectID: string): Promise<any> ;
|
|
/**
|
|
* Gets specific attributes from an object
|
|
* @param objectID
|
|
* @param attributes
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects
|
|
*/
|
|
getObject(objectID: string, attributes: string[]): Promise<any> ;
|
|
/**
|
|
* Gets a list of objects
|
|
* @param objectIDs
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#find-by-ids---getobjects
|
|
*/
|
|
getObjects(objectIDs: string[]): Promise<any> ;
|
|
/**
|
|
* Add a specific object
|
|
* @param object without objectID
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects
|
|
*/
|
|
addObject(object: {}): Promise<any> ;
|
|
/**
|
|
* Add a list of objects
|
|
* @param object with objectID
|
|
* @param objectID
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects
|
|
*/
|
|
addObject(object: {}, objectID: string): Promise<any> ;
|
|
/**
|
|
* Add list of objects
|
|
* @param objects
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#add-objects---addobjects
|
|
*/
|
|
addObjects(objects: [{}]): Promise<any> ;
|
|
/**
|
|
* Add or replace a specific object
|
|
* @param object
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects
|
|
*/
|
|
saveObject(object: {}): Promise<any> ;
|
|
/**
|
|
* Add or replace several objects
|
|
* @param objects
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects
|
|
*/
|
|
saveObjects(objects: [{}]): Promise<any> ;
|
|
/**
|
|
* Update parameters of a specific object
|
|
* @param object
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects
|
|
*/
|
|
partialUpdateObject(object: {}): Promise<any> ;
|
|
/**
|
|
* Update parameters of a list of objects
|
|
* @param objects
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#update-objects---saveobjects
|
|
*/
|
|
partialUpdateObjects(objects: [{}]): Promise<any> ;
|
|
/**
|
|
* Delete a specific object
|
|
* @param objectID
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects
|
|
*/
|
|
deleteObject(objectID: string): Promise<any> ;
|
|
/**
|
|
* Delete a list of objects
|
|
* @param objectIDs
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#delete-objects---deleteobjects
|
|
*/
|
|
deleteObjects(objectIDs: string[]): Promise<any> ;
|
|
/**
|
|
* Delete objects that matches the query
|
|
* @param query
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#delete-by-query---deletebyquery
|
|
*/
|
|
deleteByQuery(query: string): Promise<any> ;
|
|
/**
|
|
* Delete objects that matches the query
|
|
* @param query
|
|
* @param params of the object
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#delete-by-query---deletebyquery
|
|
*/
|
|
deleteByQuery(query: string, params: {}): Promise<any> ;
|
|
/**
|
|
* Wait for an indexing task to be compete
|
|
* @param taskID
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#wait-for-operations---waittask
|
|
*/
|
|
waitTask(taskID: number): Promise<any> ;
|
|
/**
|
|
* Get an index settings
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#get-settings---getsettings
|
|
*/
|
|
getSettings(): Promise<any> ;
|
|
/**
|
|
* Set an index settings
|
|
* @param settings
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#set-settings---setsettings
|
|
*/
|
|
setSettings(settings: AlgoliaIndexSettings): Promise<any> ;
|
|
/**
|
|
* Search in an index
|
|
* @param params query parameter
|
|
* return {Promise}
|
|
* @param err() error callback
|
|
* https://github.com/algolia/algoliasearch-client-js#search-in-an-index---search
|
|
*/
|
|
search(params: AlgoliaQueryParameters): Promise<any> ;
|
|
/**
|
|
* Search in an index
|
|
* @param params query parameter
|
|
* @param cb(err, res)
|
|
* @param err() error callback
|
|
* https://github.com/algolia/algoliasearch-client-js#search-in-an-index---search
|
|
*/
|
|
search(params: AlgoliaQueryParameters, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Browse an index
|
|
* @param query
|
|
* @param cb(err, content)
|
|
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
|
|
*/
|
|
browse(query: string, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Browse an index
|
|
* @param query
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
|
|
*/
|
|
browse(query: string): Promise<AlgoliaBrowseResponse>;
|
|
/**
|
|
* Browse an index from a cursor
|
|
* @param cursor
|
|
* @param cb(err, content)
|
|
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
|
|
*/
|
|
browseFrom(cursor: string, cb: (err: Error, res: any) => void): void;
|
|
/**
|
|
* Browse an index from a cursor
|
|
* @param cursor
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
|
|
*/
|
|
browseFrom(cursor: string): Promise<AlgoliaBrowseResponse>;
|
|
/**
|
|
* Browse an entire index
|
|
* return Promise
|
|
* https://github.com/algolia/algoliasearch-client-js#backup--export-an-index---browse
|
|
*/
|
|
browseAll(): Promise<AlgoliaResponse>;
|
|
/**
|
|
* Clear an index content
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#clear-index---clearindex
|
|
*/
|
|
clearIndex(): Promise<any> ;
|
|
/**
|
|
* Save a synonym object
|
|
* @param synonym
|
|
* @param options
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym
|
|
*/
|
|
saveSynonym(synonym: AlgoliaSynonym, option: SynonymOption): Promise<any> ;
|
|
/**
|
|
* Save a synonym object
|
|
* @param synonyms
|
|
* @param options
|
|
* return {Promise}
|
|
*/
|
|
batchSynonyms(synonyms: AlgoliaSynonym[], options: SynonymOption): Promise<any> ;
|
|
/**
|
|
* Delete a specific synonym
|
|
* @param identifier
|
|
* @param options
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#batch-synonyms---batchsynonyms
|
|
*/
|
|
deleteSynonym(identifier: string, options: SynonymOption): Promise<any> ;
|
|
/**
|
|
* Clear all synonyms of an index
|
|
* @param options
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#clear-all-synonyms---clearsynonyms
|
|
*/
|
|
clearSynonyms(options: SynonymOption): Promise<any> ;
|
|
/**
|
|
* Get a specific synonym
|
|
* @param identifier
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#get-synonym---getsynonym
|
|
*/
|
|
getSynonym(identifier: string): Promise<any> ;
|
|
/**
|
|
* Search a synonyms
|
|
* @param options
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms
|
|
*/
|
|
searchSynonyms(options: SearchSynonymOptions): Promise<any> ;
|
|
/**
|
|
* List index user keys
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#list-api-keys---listapikeys
|
|
*/
|
|
listUserKeys(): Promise<any> ;
|
|
/**
|
|
* Add key for this index
|
|
* @param scopes
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
addUserKey(scopes: string[]): Promise<any> ;
|
|
/**
|
|
* Add key for this index
|
|
* @param scopes
|
|
* @param options
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
addUserKey(scopes: string[], options: AlgoliaUserKeyOptions): Promise<any> ;
|
|
/**
|
|
* Update a key for this index
|
|
* @param key
|
|
* @param scopes
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey
|
|
*/
|
|
updateUserKey(key: string, scopes: string[]): Promise<any> ;
|
|
/**
|
|
* Update a key for this index
|
|
* @param key
|
|
* @param scopes
|
|
* @param options
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#update-user-key---updateuserkey
|
|
*/
|
|
updateUserKey(key: string, scopes: string[], options: AlgoliaUserKeyOptions): Promise<any> ;
|
|
/**
|
|
* Gets the rights of an index specific key
|
|
* @param key
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#get-key-permissions---getuserkeyacl
|
|
*/
|
|
getUserKeyACL(key: string): Promise<any> ;
|
|
/**
|
|
* Deletes an index specific key
|
|
* @param key
|
|
* return {Promise}
|
|
* https://github.com/algolia/algoliasearch-client-js#delete-user-key---deleteuserkey
|
|
*/
|
|
deleteUserKey(key: string): Promise<any> ;
|
|
}
|
|
/*
|
|
Interface describing available options when initializing a client
|
|
*/
|
|
interface ClientOptions {
|
|
/**
|
|
* Timeout for requests to our servers, in milliseconds
|
|
* default: 15s (node), 2s (browser)
|
|
* https://github.com/algolia/algoliasearch-client-js#client-options
|
|
*/
|
|
timeout?: number;
|
|
/**
|
|
* Protocol to use when communicating with algolia
|
|
* default: current protocol(browser), https(node)
|
|
* https://github.com/algolia/algoliasearch-client-js#client-options
|
|
*/
|
|
protocol?: string;
|
|
/**
|
|
* (node only) httpAgent instance to use when communicating with Algolia servers.
|
|
* https://github.com/algolia/algoliasearch-client-js#client-options
|
|
*/
|
|
httpAgent?: any;
|
|
/**
|
|
* read: array of read hosts to use to call Algolia servers, computed automatically
|
|
* write: array of read hosts to use to call Algolia servers, computed automatically
|
|
* https://github.com/algolia/algoliasearch-client-js#client-options
|
|
*/
|
|
hosts?: { read?: string[], write?: string[] };
|
|
}
|
|
/*
|
|
Interface describing options available for gettings the logs
|
|
*/
|
|
interface LogsOptions {
|
|
/**
|
|
* Specify the first entry to retrieve (0-based, 0 is the most recent log entry).
|
|
* default: 0
|
|
* https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs
|
|
*/
|
|
offset?: number;
|
|
/**
|
|
* Specify the maximum number of entries to retrieve starting at the offset.
|
|
* default: 10
|
|
* maximum: 1000
|
|
* https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs
|
|
*/
|
|
length?: number;
|
|
/**
|
|
* @deprecated
|
|
* Retrieve only logs with an HTTP code different than 200 or 201
|
|
* https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs
|
|
*/
|
|
onlyErrors?: boolean;
|
|
/**
|
|
* Specify the type of logs to retrieve
|
|
* 'query' Retrieve only the queries
|
|
* 'build' Retrieve only the build operations
|
|
* 'error' Retrieve only the errors (same as onlyErrors parameters)
|
|
* https://github.com/algolia/algoliasearch-client-js#get-logs---getlogs
|
|
*/
|
|
type?: string;
|
|
}
|
|
/**
|
|
* Describe the action object used for batch operation
|
|
*/
|
|
interface AlgoliaAction {
|
|
/**
|
|
* Type of the batch action
|
|
* values: addObject, updateObject, partialUpdateObject, partialUpdateObjectNoCreate, deleteObject
|
|
* https://github.com/algolia/algoliasearch-client-js#custom-batch---batch
|
|
*/
|
|
action: string;
|
|
/**
|
|
* Name of the index where the bact will be performed
|
|
* https://github.com/algolia/algoliasearch-client-js#custom-batch---batch
|
|
*/
|
|
indexName: string;
|
|
/**
|
|
* Object
|
|
* https://github.com/algolia/algoliasearch-client-js#custom-batch---batch
|
|
*/
|
|
body: {};
|
|
}
|
|
/**
|
|
* Describes the option used when creating user key
|
|
*/
|
|
interface AlgoliaUserKeyOptions {
|
|
/**
|
|
* Add a validity period. The key will be valid for a specific period of time (in seconds).
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
validity?: number;
|
|
/**
|
|
* Specify the maximum number of API calls allowed from an IP address per hour
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
maxQueriesPerIPPerHour?: number;
|
|
/**
|
|
* Specify the maximum number of hits this API key can retrieve in one call
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
maxHitsPerQuery?: boolean;
|
|
/**
|
|
* Specify the list of targeted indices
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
indexes?: string[];
|
|
/**
|
|
* Specify the list of referers
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
referers?: string[];
|
|
/**
|
|
* Specify the list of query parameters
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
queryParameters?: AlgoliaQueryParameters;
|
|
/**
|
|
* Specify a description to describe where the key is used.
|
|
* https://github.com/algolia/algoliasearch-client-js#add-user-key---adduserkey
|
|
*/
|
|
description?: string;
|
|
}
|
|
/**
|
|
* Describes option used when making operation on synonyms
|
|
*/
|
|
interface SynonymOption {
|
|
/**
|
|
* You can forward all settings updates to the slaves of an index
|
|
* https://github.com/algolia/algoliasearch-client-js#slave-settings
|
|
*/
|
|
forwardToSlaves?: boolean;
|
|
/**
|
|
* Replace all existing synonyms on the index with the content of the batch
|
|
* https://github.com/algolia/algoliasearch-client-js#batch-synonyms---batchsynonyms
|
|
*/
|
|
replaceExistingSynonyms?: boolean;
|
|
}
|
|
/**
|
|
* Describes options used when searching for synonyms
|
|
*/
|
|
interface SearchSynonymOptions {
|
|
/**
|
|
* The actual search query to find synonyms
|
|
* https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms
|
|
*/
|
|
query?: string;
|
|
/**
|
|
* The page to fetch when browsing through several pages of results
|
|
* default: 100
|
|
* https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Restrict the search to a specific type of synonym
|
|
* Use an empty string to search all types (default behavior)
|
|
* https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms
|
|
*/
|
|
type?: string;
|
|
/**
|
|
* Number of hits per page
|
|
* default: 100
|
|
* https://github.com/algolia/algoliasearch-client-js#search-synonyms---searchsynonyms
|
|
*/
|
|
hitsPerPage?: number
|
|
}
|
|
interface AlgoliaBrowseResponse {
|
|
cursor?: string,
|
|
hits: any[],
|
|
params: string,
|
|
query: string,
|
|
processingTimeMS: number
|
|
}
|
|
/**
|
|
* Describes a synonym object
|
|
*/
|
|
interface AlgoliaSynonym {
|
|
/**
|
|
* ObjectID of the synonym
|
|
* https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym
|
|
*/
|
|
objectID: string;
|
|
/**
|
|
* Type of synonym
|
|
* values: synonym,oneWaySynonym
|
|
* https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym
|
|
*/
|
|
type: string;
|
|
/**
|
|
* Values used for the synonym
|
|
* https://github.com/algolia/algoliasearch-client-js#save-synonym---savesynonym
|
|
*/
|
|
synonyms: string[];
|
|
}
|
|
/**
|
|
* Describes the options used when generating new api keys
|
|
*/
|
|
interface AlgoliaSecuredApiOptions {
|
|
/**
|
|
* Filter the query with numeric, facet or/and tag filters
|
|
* default: ""
|
|
* https://github.com/algolia/algoliasearch-client-js#filters-1
|
|
*/
|
|
filters?: string;
|
|
/**
|
|
* Defines the expiration date of the API key
|
|
* https://github.com/algolia/algoliasearch-client-js#valid-until
|
|
*/
|
|
validUntil?: number;
|
|
/**
|
|
* Restricts the key to a list of index names allowed for the secured API key
|
|
* https://github.com/algolia/algoliasearch-client-js#index-restriction
|
|
*/
|
|
restrictIndices?: string;
|
|
/**
|
|
* Allows you to restrict a single user to performing a maximum of N API calls per hour
|
|
* https://github.com/algolia/algoliasearch-client-js#user-rate-limiting
|
|
*/
|
|
userToken?: string;
|
|
}
|
|
|
|
/**
|
|
* Describes the settings available for configure your index
|
|
*/
|
|
interface AlgoliaIndexSettings {
|
|
/**
|
|
* The list of attributes you want index
|
|
* default: *
|
|
* https://github.com/algolia/algoliasearch-client-js#attributestoindex
|
|
*/
|
|
attributesToIndex?: string[];
|
|
/**
|
|
* The list of attributes you want to use for faceting
|
|
* default: null
|
|
* https://github.com/algolia/algoliasearch-client-js#attributesforfaceting
|
|
*/
|
|
attributesforFaceting?: string[];
|
|
/**
|
|
* The list of attributes that cannot be retrieved at query time
|
|
* default: null
|
|
* https://github.com/algolia/algoliasearch-client-js#unretrievableattributes
|
|
*/
|
|
unretrievableAttributes?: string[];
|
|
/**
|
|
* A string that contains the list of attributes you want to retrieve in order to minimize the size of the JSON answer
|
|
* default: *
|
|
* https://github.com/algolia/algoliasearch-client-js#attributestoretrieve
|
|
*/
|
|
attributesToRetrieve?: string[];
|
|
/**
|
|
* Controls the way results are sorted
|
|
* default: ['typo', 'geo', 'words', 'filters', 'proximity', 'attribute', 'exact', 'custom']
|
|
* https://github.com/algolia/algoliasearch-client-js#ranking
|
|
*/
|
|
ranking?: string[];
|
|
/**
|
|
* Lets you specify part of the ranking
|
|
* default: []
|
|
* https://github.com/algolia/algoliasearch-client-js#customranking
|
|
*/
|
|
customRanking?: string[];
|
|
/**
|
|
* The list of indices on which you want to replicate all write operations
|
|
* default: []
|
|
* https://github.com/algolia/algoliasearch-client-js#slaves
|
|
*/
|
|
slaves?: string[];
|
|
/**
|
|
* Limit the number of facet values returned for each facet
|
|
* default: ""
|
|
* https://github.com/algolia/algoliasearch-client-js#maxvaluesperfacet
|
|
*/
|
|
maxValuesPerFacet?: string;
|
|
/**
|
|
* Default list of attributes to highlight. If set to null, all indexed attributes are highlighted.
|
|
* default: null
|
|
* https://github.com/algolia/algoliasearch-client-js#attributestohighlight
|
|
*/
|
|
attributesToHighlight?: string[];
|
|
/**
|
|
* Default list of attributes to snippet alongside the number of words to return
|
|
* default: null
|
|
* https://github.com/algolia/algoliasearch-client-js#attributestosnippet
|
|
*/
|
|
attributesToSnippet?: string[];
|
|
/**
|
|
* Specify the string that is inserted before the highlighted parts in the query result
|
|
* default: <em>
|
|
* https://github.com/algolia/algoliasearch-client-js#highlightpretag
|
|
*/
|
|
highlightPreTag?: string;
|
|
/**
|
|
* Specify the string that is inserted after the highlighted parts in the query result
|
|
* default: </em>
|
|
* https://github.com/algolia/algoliasearch-client-js#highlightposttag
|
|
*/
|
|
highlightPostTag?: string;
|
|
/**
|
|
* String used as an ellipsis indicator when a snippet is truncated.
|
|
* default: …
|
|
* https://github.com/algolia/algoliasearch-client-js#snippetellipsistext
|
|
*/
|
|
snippetEllipsisText?: string;
|
|
/**
|
|
* If set to true, restrict arrays in highlights and snippets to items that matched the query at least partially else return all array items in highlights and snippets
|
|
* default: false
|
|
* https://github.com/algolia/algoliasearch-client-js#restricthighlightandsnippetarrays
|
|
*/
|
|
restrictHighlightAndSnippetArrays?: boolean;
|
|
/**
|
|
* Pagination parameter used to select the number of hits per page
|
|
* default: 20
|
|
* https://github.com/algolia/algoliasearch-client-js#hitsperpage
|
|
*/
|
|
hitsPerPage?: number;
|
|
/**
|
|
* The minimum number of characters needed to accept one typo
|
|
* default: 4
|
|
* https://github.com/algolia/algoliasearch-client-js#minwordsizefor1typo
|
|
*/
|
|
minWordSizefor1Typo?: number;
|
|
/**
|
|
* The minimum number of characters needed to accept two typos.
|
|
* default: 8
|
|
* https://github.com/algolia/algoliasearch-client-js#highlightposttag
|
|
*/
|
|
minWordSizefor2Typos?: number;
|
|
/**
|
|
* This option allows you to control the number of typos allowed in the result set
|
|
* default: true
|
|
* 'true' The typo tolerance is enabled and all matching hits are retrieved (default behavior).
|
|
* 'false' The typo tolerance is disabled. All results with typos will be hidden.
|
|
* 'min' Only keep results with the minimum number of typos. For example, if one result matches without typos, then all results with typos will be hidden.
|
|
* 'strict' Hits matching with 2 typos are not retrieved if there are some matching without typos.
|
|
* https://github.com/algolia/algoliasearch-client-js#typotolerance
|
|
*/
|
|
typoTolerance?: any;
|
|
/**
|
|
* If set to false, disables typo tolerance on numeric tokens (numbers).
|
|
* default: true
|
|
* https://github.com/algolia/algoliasearch-client-js#allowtyposonnumerictokens
|
|
*/
|
|
allowTyposOnNumericTokens?: boolean;
|
|
/**
|
|
* If set to true, plural won't be considered as a typo
|
|
* default: false
|
|
* https://github.com/algolia/algoliasearch-client-js#ignoreplurals
|
|
*/
|
|
ignorePlurals?: boolean;
|
|
/**
|
|
* List of attributes on which you want to disable typo tolerance
|
|
* default: ""
|
|
* https://github.com/algolia/algoliasearch-client-js#disabletypotoleranceonattributes
|
|
*/
|
|
disableTypoToleranceOnAttributes?: string;
|
|
/**
|
|
* Specify the separators (punctuation characters) to index.
|
|
* default: ""
|
|
* https://github.com/algolia/algoliasearch-client-js#separatorstoindex
|
|
*/
|
|
separatorsToIndex?: string;
|
|
/**
|
|
* Selects how the query words are interpreted
|
|
* default: 'prefixLast'
|
|
* 'prefixAll' All query words are interpreted as prefixes. This option is not recommended.
|
|
* 'prefixLast' Only the last word is interpreted as a prefix (default behavior).
|
|
* 'prefixNone' No query word is interpreted as a prefix. This option is not recommended.
|
|
* https://github.com/algolia/algoliasearch-client-js#querytype
|
|
*/
|
|
queryType?: any;
|
|
/**
|
|
* This option is used to select a strategy in order to avoid having an empty result page
|
|
* default: 'none'
|
|
* 'lastWords' When a query does not return any results, the last word will be added as optional
|
|
* 'firstWords' When a query does not return any results, the first word will be added as optional
|
|
* 'allOptional' When a query does not return any results, a second trial will be made with all words as optional
|
|
* 'none' No specific processing is done when a query does not return any results
|
|
* https://github.com/algolia/algoliasearch-client-js#removewordsifnoresults
|
|
*/
|
|
removeWordsIfNoResults?: string;
|
|
/**
|
|
* Enables the advanced query syntax
|
|
* default: false
|
|
* https://github.com/algolia/algoliasearch-client-js#advancedsyntax
|
|
*/
|
|
advancedSyntax?: boolean;
|
|
/**
|
|
* A string that contains the comma separated list of words that should be considered as optional when found in the query
|
|
* default: []
|
|
* https://github.com/algolia/algoliasearch-client-js#optionalwords
|
|
*/
|
|
optionalWords?: string[];
|
|
/**
|
|
* Remove stop words from the query before executing it
|
|
* default: false
|
|
* true|false: enable or disable stop words for all 41 supported languages; or
|
|
* a list of language ISO codes (as a comma-separated string) for which stop words should be enable
|
|
* https://github.com/algolia/algoliasearch-client-js#removestopwords
|
|
*/
|
|
removeStopWords?: string[];
|
|
/**
|
|
* List of attributes on which you want to disable prefix matching
|
|
* default: []
|
|
* https://github.com/algolia/algoliasearch-client-js#disableprefixonattributes
|
|
*/
|
|
disablePrefixOnAttributes?: string[];
|
|
/**
|
|
* List of attributes on which you want to disable the computation of exact criteria
|
|
* default: []
|
|
* https://github.com/algolia/algoliasearch-client-js#disableexactonattributes
|
|
*/
|
|
disableExactOnAttributes?: string[];
|
|
/**
|
|
* This parameter control how the exact ranking criterion is computed when the query contains one word
|
|
* default: attribute
|
|
* 'none': no exact on single word query
|
|
* 'word': exact set to 1 if the query word is found in the record
|
|
* 'attribute': exact set to 1 if there is an attribute containing a string equals to the query
|
|
* https://github.com/algolia/algoliasearch-client-js#exactonsinglewordquery
|
|
*/
|
|
exactOnSingleWordQuery?: string;
|
|
/**
|
|
* Specify the list of approximation that should be considered as an exact match in the ranking formula
|
|
* default: ['ignorePlurals', 'singleWordSynonym']
|
|
* 'ignorePlurals': alternative words added by the ignorePlurals feature
|
|
* 'singleWordSynonym': single-word synonym (For example "NY" = "NYC")
|
|
* 'multiWordsSynonym': multiple-words synonym
|
|
* https://github.com/algolia/algoliasearch-client-js#alternativesasexact
|
|
*/
|
|
alternativesAsExact?: any;
|
|
/**
|
|
* The name of the attribute used for the Distinct feature
|
|
* default: null
|
|
* https://github.com/algolia/algoliasearch-client-js#attributefordistinct
|
|
*/
|
|
attributeForDistinct?: string;
|
|
/**
|
|
* If set to 1, enables the distinct feature, disabled by default, if the attributeForDistinct index setting is set.
|
|
* https://github.com/algolia/algoliasearch-client-js#distinct
|
|
*/
|
|
distinct?: any;
|
|
/**
|
|
* All numerical attributes are automatically indexed as numerical filters
|
|
* default ''
|
|
* https://github.com/algolia/algoliasearch-client-js#numericattributestoindex
|
|
*/
|
|
numericAttributesToIndex?: string[];
|
|
/**
|
|
* Allows compression of big integer arrays.
|
|
* default: false
|
|
* https://github.com/algolia/algoliasearch-client-js#allowcompressionofintegerarray
|
|
*/
|
|
allowCompressionOfIntegerArray?: boolean;
|
|
/**
|
|
* Specify alternative corrections that you want to consider.
|
|
* default: []
|
|
* https://github.com/algolia/algoliasearch-client-js#altcorrections
|
|
*/
|
|
altCorrections?: [{}];
|
|
/**
|
|
* Configure the precision of the proximity ranking criterion
|
|
* default: 1
|
|
* https://github.com/algolia/algoliasearch-client-js#minproximity
|
|
*/
|
|
minProximity?: number;
|
|
/**
|
|
* This is an advanced use-case to define a token substitutable by a list of words without having the original token searchable
|
|
* default: ''
|
|
* https://github.com/algolia/algoliasearch-client-js#placeholders
|
|
*/
|
|
placeholders?: any;
|
|
}
|
|
|
|
interface AlgoliaQueryParameters {
|
|
/**
|
|
* Query string used to perform the search
|
|
* default: ''
|
|
* https://github.com/algolia/algoliasearch-client-js#query
|
|
*/
|
|
query?: string;
|
|
/**
|
|
* Filter the query with numeric, facet or/and tag filters
|
|
* default: ""
|
|
* https://github.com/algolia/algoliasearch-client-js#filters
|
|
*/
|
|
filters?: string;
|
|
/**
|
|
* A string that contains the list of attributes you want to retrieve in order to minimize the size of the JSON answer.
|
|
* default: *
|
|
* https://github.com/algolia/algoliasearch-client-js#attributestoretrieve
|
|
*/
|
|
attributesToRetrieve?: string[];
|
|
/**
|
|
* List of attributes you want to use for textual search
|
|
* default: attributeToIndex
|
|
* https://github.com/algolia/algoliasearch-client-js#restrictsearchableattributes
|
|
*/
|
|
restrictSearchableAttributes?: string[];
|
|
/**
|
|
* You can use facets to retrieve only a part of your attributes declared in attributesForFaceting attributes
|
|
* default: ""
|
|
* https://github.com/algolia/algoliasearch-client-js#facets
|
|
*/
|
|
facets?: string;
|
|
/**
|
|
* Limit the number of facet values returned for each facet.
|
|
* default: ""
|
|
* https://github.com/algolia/algoliasearch-client-js#maxvaluesperfacet
|
|
*/
|
|
maxValuesPerFacet?: string;
|
|
/**
|
|
* Default list of attributes to highlight. If set to null, all indexed attributes are highlighted.
|
|
* default: null
|
|
* https://github.com/algolia/algoliasearch-client-js#attributestohighlight
|
|
*/
|
|
attributesToHighlight?: string[];
|
|
/**
|
|
* Default list of attributes to snippet alongside the number of words to return
|
|
* default: null
|
|
* https://github.com/algolia/algoliasearch-client-js#attributestosnippet
|
|
*/
|
|
attributesToSnippet?: string[];
|
|
/**
|
|
* Specify the string that is inserted before the highlighted parts in the query result
|
|
* default: <em>
|
|
* https://github.com/algolia/algoliasearch-client-js#highlightpretag
|
|
*/
|
|
highlightPreTag?: string;
|
|
/**
|
|
* Specify the string that is inserted after the highlighted parts in the query result
|
|
* default: </em>
|
|
* https://github.com/algolia/algoliasearch-client-js#highlightposttag
|
|
*/
|
|
highlightPostTag?: string;
|
|
/**
|
|
* String used as an ellipsis indicator when a snippet is truncated.
|
|
* default: …
|
|
* https://github.com/algolia/algoliasearch-client-js#snippetellipsistext
|
|
*/
|
|
snippetEllipsisText?: string;
|
|
/**
|
|
* If set to true, restrict arrays in highlights and snippets to items that matched the query at least partially else return all array items in highlights and snippets
|
|
* default: false
|
|
* https://github.com/algolia/algoliasearch-client-js#restricthighlightandsnippetarrays
|
|
*/
|
|
restrictHighlightAndSnippetArrays?: boolean;
|
|
/**
|
|
* Pagination parameter used to select the number of hits per page
|
|
* default: 20
|
|
* https://github.com/algolia/algoliasearch-client-js#hitsperpage
|
|
*/
|
|
hitsPerPage?: number;
|
|
/**
|
|
* Pagination parameter used to select the page to retrieve.
|
|
* default: 0
|
|
* https://github.com/algolia/algoliasearch-client-js#page
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Offset of the first hit to return
|
|
* default: null
|
|
* https://github.com/algolia/algoliasearch-client-js#offset
|
|
*/
|
|
offset?: number;
|
|
/**
|
|
* Number of hits to return.
|
|
* default: null
|
|
* https://github.com/algolia/algoliasearch-client-js#length
|
|
*/
|
|
length?: number;
|
|
/**
|
|
* The minimum number of characters needed to accept one typo.
|
|
* default: 4
|
|
* https://github.com/algolia/algoliasearch-client-js#minwordsizefor1typo
|
|
*/
|
|
minWordSizefor1Typo?: number;
|
|
/**
|
|
* The minimum number of characters needed to accept two typo.
|
|
* fault: 8
|
|
* https://github.com/algolia/algoliasearch-client-js#minwordsizefor2typos
|
|
*/
|
|
minWordSizefor2Typos?: number;
|
|
/**
|
|
* This option allows you to control the number of typos allowed in the result set:
|
|
* default: true
|
|
* 'true' The typo tolerance is enabled and all matching hits are retrieved
|
|
* 'false' The typo tolerance is disabled. All results with typos will be hidden.
|
|
* 'min' Only keep results with the minimum number of typos
|
|
* 'strict' Hits matching with 2 typos are not retrieved if there are some matching without typos.
|
|
* https://github.com/algolia/algoliasearch-client-js#minwordsizefor2typos
|
|
*/
|
|
typoTolerance?: boolean;
|
|
/**
|
|
* If set to false, disables typo tolerance on numeric tokens (numbers).
|
|
* default:
|
|
* https://github.com/algolia/algoliasearch-client-js#allowtyposonnumerictokens
|
|
*/
|
|
allowTyposOnNumericTokens?: boolean;
|
|
/**
|
|
* If set to true, plural won't be considered as a typo
|
|
* default: false
|
|
* https://github.com/algolia/algoliasearch-client-js#ignoreplurals
|
|
*/
|
|
ignorePlurals?: boolean;
|
|
/**
|
|
* List of attributes on which you want to disable typo tolerance
|
|
* default: ""
|
|
* https://github.com/algolia/algoliasearch-client-js#disabletypotoleranceonattributes
|
|
*/
|
|
disableTypoToleranceOnAttributes?: string;
|
|
/**
|
|
* Search for entries around a given location
|
|
* default: ""
|
|
* https://github.com/algolia/algoliasearch-client-js#aroundlatlng
|
|
*/
|
|
aroundLatLng?: string;
|
|
/**
|
|
* Search for entries around a given latitude/longitude automatically computed from user IP address.
|
|
* default: ""
|
|
* https://github.com/algolia/algoliasearch-client-js#aroundlatlngviaip
|
|
*/
|
|
aroundLatLngViaIP?: string;
|
|
/**
|
|
* Control the radius associated with a geo search. Defined in meters.
|
|
* default: null
|
|
* You can specify aroundRadius=all if you want to compute the geo distance without filtering in a geo area
|
|
* https://github.com/algolia/algoliasearch-client-js#aroundradius
|
|
*/
|
|
aroundRadius?: any;
|
|
/**
|
|
* Control the precision of a geo search
|
|
* default: null
|
|
* https://github.com/algolia/algoliasearch-client-js#aroundprecision
|
|
*/
|
|
aroundPrecision?: number;
|
|
/**
|
|
* Define the minimum radius used for a geo search when aroundRadius is not set.
|
|
* default: null
|
|
* https://github.com/algolia/algoliasearch-client-js#minimumaroundradius
|
|
*/
|
|
minimumAroundRadius?: number;
|
|
/**
|
|
* Search entries inside a given area defined by the two extreme points of a rectangle
|
|
* default: null
|
|
* https://github.com/algolia/algoliasearch-client-js#insideboundingbox
|
|
*/
|
|
insideBoundingBox?: string;
|
|
/**
|
|
* Selects how the query words are interpreted
|
|
* default: 'prefixLast'
|
|
* 'prefixAll' All query words are interpreted as prefixes. This option is not recommended.
|
|
* 'prefixLast' Only the last word is interpreted as a prefix (default behavior).
|
|
* 'prefixNone' No query word is interpreted as a prefix. This option is not recommended.
|
|
* https://github.com/algolia/algoliasearch-client-js#querytype
|
|
*/
|
|
queryType?: any;
|
|
/**
|
|
* Search entries inside a given area defined by a set of points
|
|
* defauly: ''
|
|
* https://github.com/algolia/algoliasearch-client-js#insidepolygon
|
|
*/
|
|
insidePolygon?: string;
|
|
/**
|
|
* This option is used to select a strategy in order to avoid having an empty result page
|
|
* default: 'none'
|
|
* 'lastWords' When a query does not return any results, the last word will be added as optional
|
|
* 'firstWords' When a query does not return any results, the first word will be added as optional
|
|
* 'allOptional' When a query does not return any results, a second trial will be made with all words as optional
|
|
* 'none' No specific processing is done when a query does not return any results
|
|
* https://github.com/algolia/algoliasearch-client-js#removewordsifnoresults
|
|
*/
|
|
removeWordsIfNoResults?: string;
|
|
/**
|
|
* Enables the advanced query syntax
|
|
* default: false
|
|
* https://github.com/algolia/algoliasearch-client-js#advancedsyntax
|
|
*/
|
|
advancedSyntax?: boolean;
|
|
/**
|
|
* A string that contains the comma separated list of words that should be considered as optional when found in the query
|
|
* default: []
|
|
* https://github.com/algolia/algoliasearch-client-js#optionalwords
|
|
*/
|
|
optionalWords?: string[];
|
|
/**
|
|
* Remove stop words from the query before executing it
|
|
* default: false
|
|
* true|false: enable or disable stop words for all 41 supported languages; or
|
|
* a list of language ISO codes (as a comma-separated string) for which stop words should be enable
|
|
* https://github.com/algolia/algoliasearch-client-js#removestopwords
|
|
*/
|
|
removeStopWords?: string[];
|
|
/**
|
|
* List of attributes on which you want to disable the computation of exact criteria
|
|
* default: []
|
|
* https://github.com/algolia/algoliasearch-client-js#disableexactonattributes
|
|
*/
|
|
disableExactOnAttributes?: string[];
|
|
/**
|
|
* This parameter control how the exact ranking criterion is computed when the query contains one word
|
|
* default: attribute
|
|
* 'none': no exact on single word query
|
|
* 'word': exact set to 1 if the query word is found in the record
|
|
* 'attribute': exact set to 1 if there is an attribute containing a string equals to the query
|
|
* https://github.com/algolia/algoliasearch-client-js#exactonsinglewordquery
|
|
*/
|
|
exactOnSingleWordQuery?: string;
|
|
/**
|
|
* Specify the list of approximation that should be considered as an exact match in the ranking formula
|
|
* default: ['ignorePlurals', 'singleWordSynonym']
|
|
* 'ignorePlurals': alternative words added by the ignorePlurals feature
|
|
* 'singleWordSynonym': single-word synonym (For example "NY" = "NYC")
|
|
* 'multiWordsSynonym': multiple-words synonym
|
|
* https://github.com/algolia/algoliasearch-client-js#alternativesasexact
|
|
*/
|
|
alternativesAsExact?: any;
|
|
/**
|
|
* If set to 1, enables the distinct feature, disabled by default, if the attributeForDistinct index setting is set.
|
|
* https://github.com/algolia/algoliasearch-client-js#distinct
|
|
*/
|
|
distinct?: any;
|
|
/**
|
|
* If set to true, the result hits will contain ranking information in the _rankingInfo attribute.
|
|
* default: false
|
|
* https://github.com/algolia/algoliasearch-client-js#getrankinginfo
|
|
*/
|
|
getRankingInfo?: boolean;
|
|
/**
|
|
* All numerical attributes are automatically indexed as numerical filters
|
|
* default: ''
|
|
* https://github.com/algolia/algoliasearch-client-js#numericattributestoindex
|
|
*/
|
|
numericAttributesToIndex?: string[];
|
|
/**
|
|
* @deprecated please use filters instead
|
|
* A string that contains the comma separated list of numeric filters you want to apply.
|
|
* https://github.com/algolia/algoliasearch-client-js#numericfilters-deprecated
|
|
*/
|
|
numericFilters?: string[];
|
|
/**
|
|
* @deprecated
|
|
* Filter the query by a set of tags.
|
|
* https://github.com/algolia/algoliasearch-client-js#tagfilters-deprecated
|
|
*/
|
|
tagFilters?: string;
|
|
/**
|
|
* @deprecated
|
|
* Filter the query by a set of facets.
|
|
* https://github.com/algolia/algoliasearch-client-js#facetfilters-deprecated
|
|
*/
|
|
facetFilters?: string;
|
|
/**
|
|
* If set to false, this query will not be taken into account in the analytics feature.
|
|
* default true
|
|
* https://github.com/algolia/algoliasearch-client-js#analytics
|
|
*/
|
|
analytics?: boolean;
|
|
/**
|
|
* If set, tag your query with the specified identifiers
|
|
* default: null
|
|
* https://github.com/algolia/algoliasearch-client-js#analyticstags
|
|
*/
|
|
analyticsTags?: string[];
|
|
/**
|
|
* If set to false, the search will not use the synonyms defined for the targeted index.
|
|
* default: true
|
|
* https://github.com/algolia/algoliasearch-client-js#synonyms
|
|
*/
|
|
synonyms?: boolean;
|
|
/**
|
|
* If set to false, words matched via synonym expansion will not be replaced by the matched synonym in the highlighted result.
|
|
* default: true
|
|
* https://github.com/algolia/algoliasearch-client-js#replacesynonymsinhighlight
|
|
*/
|
|
replaceSynonymsInHighlight?: boolean;
|
|
/**
|
|
* Configure the precision of the proximity ranking criterion
|
|
* default: 1
|
|
* https://github.com/algolia/algoliasearch-client-js#minproximity
|
|
*/
|
|
minProximity?: number;
|
|
}
|
|
|
|
declare module "algoliasearch" {
|
|
function algoliasearch(applicationId: string, apiKey: string, options?: ClientOptions) : AlgoliaClient;
|
|
export = algoliasearch;
|
|
}
|