mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-14 22:40:03 +08:00
feat(algolia): update definitions (#20627)
- ran prettier on the files - slaves -> replicas - SFFV - userkey -> apikey - options -> params - deleteBy
This commit is contained in:
committed by
Sheetal Nandi
parent
23af58d239
commit
3c804e4cbe
@@ -1,144 +1,153 @@
|
||||
import * as algoliasearch from "algoliasearch";
|
||||
import { ClientOptions, SynonymOption, AlgoliaUserKeyOptions, SearchSynonymOptions, AlgoliaResponse,
|
||||
AlgoliaSecuredApiOptions, AlgoliaIndexSettings, AlgoliaQueryParameters, AlgoliaIndex } from "algoliasearch";
|
||||
import * as algoliasearch from 'algoliasearch';
|
||||
import {
|
||||
ClientOptions,
|
||||
SynonymOption,
|
||||
AlgoliaApiKeyOptions,
|
||||
SearchSynonymOptions,
|
||||
AlgoliaResponse,
|
||||
AlgoliaSecuredApiOptions,
|
||||
AlgoliaIndexSettings,
|
||||
AlgoliaQueryParameters,
|
||||
AlgoliaIndex,
|
||||
} from 'algoliasearch';
|
||||
|
||||
let _algoliaResponse: AlgoliaResponse = {
|
||||
hits: [{}, {}],
|
||||
page: 0,
|
||||
nbHits: 12,
|
||||
nbPages: 6,
|
||||
hitsPerPage: 2,
|
||||
processingTimeMS: 32,
|
||||
query: "",
|
||||
params: "",
|
||||
hits: [{}, {}],
|
||||
page: 0,
|
||||
nbHits: 12,
|
||||
nbPages: 6,
|
||||
hitsPerPage: 2,
|
||||
processingTimeMS: 32,
|
||||
query: '',
|
||||
params: '',
|
||||
};
|
||||
|
||||
let _clientOptions: ClientOptions = {
|
||||
timeout: 12,
|
||||
protocol: "",
|
||||
httpAgent: "",
|
||||
timeout: 12,
|
||||
protocol: '',
|
||||
httpAgent: '',
|
||||
};
|
||||
|
||||
let _synonymOption: SynonymOption = {
|
||||
forwardToSlaves: false,
|
||||
replaceExistingSynonyms: false,
|
||||
forwardToReplicas: false,
|
||||
replaceExistingSynonyms: false,
|
||||
};
|
||||
|
||||
let _algoliaUserKeyOptions: AlgoliaUserKeyOptions = {
|
||||
validity: 0,
|
||||
maxQueriesPerIPPerHour: 0,
|
||||
indexes: [""],
|
||||
queryParameters: { attributesToRetrieve: ["algolia"] },
|
||||
description: "",
|
||||
let _algoliaApiKeyOptions: AlgoliaApiKeyOptions = {
|
||||
validity: 0,
|
||||
maxQueriesPerIPPerHour: 0,
|
||||
indexes: [''],
|
||||
queryParameters: { attributesToRetrieve: ['algolia'] },
|
||||
description: '',
|
||||
};
|
||||
|
||||
let _searchSynonymOptions: SearchSynonymOptions = {
|
||||
query: "",
|
||||
page: 0,
|
||||
type: "",
|
||||
hitsPerPage: 0,
|
||||
query: '',
|
||||
page: 0,
|
||||
type: '',
|
||||
hitsPerPage: 0,
|
||||
};
|
||||
|
||||
let _algoliaSecuredApiOptions: AlgoliaSecuredApiOptions = {
|
||||
filters: "",
|
||||
validUntil: 0,
|
||||
restrictIndices: "",
|
||||
userToken: "",
|
||||
filters: '',
|
||||
validUntil: 0,
|
||||
restrictIndices: '',
|
||||
userToken: '',
|
||||
};
|
||||
|
||||
let _algoliaIndexSettings: AlgoliaIndexSettings = {
|
||||
attributesToIndex: [""],
|
||||
attributesForFaceting: [""],
|
||||
unretrievableAttributes: [""],
|
||||
attributesToRetrieve: [""],
|
||||
ranking: [""],
|
||||
customRanking: [""],
|
||||
slaves: [""],
|
||||
maxValuesPerFacet: "",
|
||||
attributesToHighlight: [""],
|
||||
attributesToSnippet: [""],
|
||||
highlightPreTag: "",
|
||||
highlightPostTag: "",
|
||||
snippetEllipsisText: "",
|
||||
restrictHighlightAndSnippetArrays: false,
|
||||
hitsPerPage: 0,
|
||||
minWordSizefor1Typo: 0,
|
||||
minWordSizefor2Typos: 0,
|
||||
typoTolerance: false,
|
||||
allowTyposOnNumericTokens: false,
|
||||
ignorePlurals: false,
|
||||
disableTypoToleranceOnAttributes: "",
|
||||
separatorsToIndex: "",
|
||||
queryType: "",
|
||||
removeWordsIfNoResults: "",
|
||||
advancedSyntax: false,
|
||||
optionalWords: [""],
|
||||
removeStopWords: [""],
|
||||
disablePrefixOnAttributes: [""],
|
||||
disableExactOnAttributes: [""],
|
||||
exactOnSingleWordQuery: "",
|
||||
alternativesAsExact: false,
|
||||
attributeForDistinct: "",
|
||||
distinct: false,
|
||||
numericAttributesToIndex: [""],
|
||||
allowCompressionOfIntegerArray: false,
|
||||
altCorrections: [{}],
|
||||
minProximity: 0,
|
||||
placeholders: "",
|
||||
attributesToIndex: [''],
|
||||
attributesForFaceting: [''],
|
||||
unretrievableAttributes: [''],
|
||||
attributesToRetrieve: [''],
|
||||
ranking: [''],
|
||||
customRanking: [''],
|
||||
replicas: [''],
|
||||
maxValuesPerFacet: '',
|
||||
attributesToHighlight: [''],
|
||||
attributesToSnippet: [''],
|
||||
highlightPreTag: '',
|
||||
highlightPostTag: '',
|
||||
snippetEllipsisText: '',
|
||||
restrictHighlightAndSnippetArrays: false,
|
||||
hitsPerPage: 0,
|
||||
minWordSizefor1Typo: 0,
|
||||
minWordSizefor2Typos: 0,
|
||||
typoTolerance: false,
|
||||
allowTyposOnNumericTokens: false,
|
||||
ignorePlurals: false,
|
||||
disableTypoToleranceOnAttributes: '',
|
||||
separatorsToIndex: '',
|
||||
queryType: '',
|
||||
removeWordsIfNoResults: '',
|
||||
advancedSyntax: false,
|
||||
optionalWords: [''],
|
||||
removeStopWords: [''],
|
||||
disablePrefixOnAttributes: [''],
|
||||
disableExactOnAttributes: [''],
|
||||
exactOnSingleWordQuery: '',
|
||||
alternativesAsExact: false,
|
||||
attributeForDistinct: '',
|
||||
distinct: false,
|
||||
numericAttributesToIndex: [''],
|
||||
allowCompressionOfIntegerArray: false,
|
||||
altCorrections: [{}],
|
||||
minProximity: 0,
|
||||
placeholders: '',
|
||||
};
|
||||
|
||||
let _algoliaQueryParameters: AlgoliaQueryParameters = {
|
||||
query: "",
|
||||
filters: "",
|
||||
attributesToRetrieve: [""],
|
||||
restrictSearchableAttributes: [""],
|
||||
facets: "",
|
||||
maxValuesPerFacet: "",
|
||||
attributesToHighlight: [""],
|
||||
attributesToSnippet: [""],
|
||||
highlightPreTag: "",
|
||||
highlightPostTag: "",
|
||||
snippetEllipsisText: "",
|
||||
restrictHighlightAndSnippetArrays: false,
|
||||
hitsPerPage: 0,
|
||||
page: 0,
|
||||
offset: 0,
|
||||
length: 0,
|
||||
minWordSizefor1Typo: 0,
|
||||
minWordSizefor2Typos: 0,
|
||||
typoTolerance: false,
|
||||
allowTyposOnNumericTokens: false,
|
||||
ignorePlurals: false,
|
||||
disableTypoToleranceOnAttributes: "",
|
||||
aroundLatLng: "",
|
||||
aroundLatLngViaIP: "",
|
||||
aroundRadius: "",
|
||||
aroundPrecision: 0,
|
||||
minimumAroundRadius: 0,
|
||||
insideBoundingBox: "",
|
||||
queryType: "",
|
||||
insidePolygon: "",
|
||||
removeWordsIfNoResults: "",
|
||||
advancedSyntax: false,
|
||||
optionalWords: [""],
|
||||
removeStopWords: [""],
|
||||
disableExactOnAttributes: [""],
|
||||
exactOnSingleWordQuery: "",
|
||||
alternativesAsExact: true,
|
||||
distinct: 0,
|
||||
getRankingInfo: false,
|
||||
numericAttributesToIndex: [""],
|
||||
numericFilters: [""],
|
||||
tagFilters: "",
|
||||
facetFilters: "",
|
||||
analytics: false,
|
||||
analyticsTags: [""],
|
||||
synonyms: true,
|
||||
replaceSynonymsInHighlight: false,
|
||||
minProximity: 0,
|
||||
query: '',
|
||||
filters: '',
|
||||
attributesToRetrieve: [''],
|
||||
restrictSearchableAttributes: [''],
|
||||
facets: '',
|
||||
maxValuesPerFacet: '',
|
||||
attributesToHighlight: [''],
|
||||
attributesToSnippet: [''],
|
||||
highlightPreTag: '',
|
||||
highlightPostTag: '',
|
||||
snippetEllipsisText: '',
|
||||
restrictHighlightAndSnippetArrays: false,
|
||||
hitsPerPage: 0,
|
||||
page: 0,
|
||||
offset: 0,
|
||||
length: 0,
|
||||
minWordSizefor1Typo: 0,
|
||||
minWordSizefor2Typos: 0,
|
||||
typoTolerance: false,
|
||||
allowTyposOnNumericTokens: false,
|
||||
ignorePlurals: false,
|
||||
disableTypoToleranceOnAttributes: '',
|
||||
aroundLatLng: '',
|
||||
aroundLatLngViaIP: '',
|
||||
aroundRadius: '',
|
||||
aroundPrecision: 0,
|
||||
minimumAroundRadius: 0,
|
||||
insideBoundingBox: '',
|
||||
queryType: '',
|
||||
insidePolygon: '',
|
||||
removeWordsIfNoResults: '',
|
||||
advancedSyntax: false,
|
||||
optionalWords: [''],
|
||||
removeStopWords: [''],
|
||||
disableExactOnAttributes: [''],
|
||||
exactOnSingleWordQuery: '',
|
||||
alternativesAsExact: true,
|
||||
distinct: 0,
|
||||
getRankingInfo: false,
|
||||
numericAttributesToIndex: [''],
|
||||
numericFilters: [''],
|
||||
tagFilters: '',
|
||||
facetFilters: '',
|
||||
analytics: false,
|
||||
analyticsTags: [''],
|
||||
synonyms: true,
|
||||
replaceSynonymsInHighlight: false,
|
||||
minProximity: 0,
|
||||
};
|
||||
|
||||
let index: AlgoliaIndex = algoliasearch("", "").initIndex("");
|
||||
let index: AlgoliaIndex = algoliasearch('', '').initIndex('');
|
||||
|
||||
let search = index.search({query: ""});
|
||||
index.search({query: ""}, (err, res) => {});
|
||||
let search = index.search({ query: '' });
|
||||
index.search({ query: '' }, (err, res) => {});
|
||||
|
||||
3170
types/algoliasearch/index.d.ts
vendored
3170
types/algoliasearch/index.d.ts
vendored
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user