Skip to content

Commit

Permalink
chore: generated code for commit fbc6674. [skip ci]
Browse files Browse the repository at this point in the history
Co-authored-by: Eunjae Lee <karis612@gmail.com>
  • Loading branch information
algolia-bot and eunjae-lee committed Apr 14, 2022
1 parent fbc6674 commit aecafb5
Show file tree
Hide file tree
Showing 86 changed files with 3,912 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import type { InitClientOptions } from '@experimental-api-clients-automation/client-common';
import {
createMemoryCache,
createFallbackableCache,
createBrowserLocalStorageCache,
} from '@experimental-api-clients-automation/client-common';
import { createXhrRequester } from '@experimental-api-clients-automation/requester-browser-xhr';

import {
createAlgoliasearchLiteApi,
apiClientVersion,
} from '../src/algoliasearchLiteApi';
import type { AlgoliasearchLiteApi } from '../src/algoliasearchLiteApi';

export * from '../src/algoliasearchLiteApi';

export function algoliasearchLiteApi(
appId: string,
apiKey: string,
options?: InitClientOptions
): AlgoliasearchLiteApi {
if (!appId) {
throw new Error('`appId` is missing.');
}

if (!apiKey) {
throw new Error('`apiKey` is missing.');
}

return createAlgoliasearchLiteApi({
appId,
apiKey,
timeouts: {
connect: 1,
read: 2,
write: 30,
},
requester: options?.requester ?? createXhrRequester(),
userAgents: [{ segment: 'Browser' }],
authMode: 'WithinQueryParameters',
responsesCache: options?.responsesCache ?? createMemoryCache(),
requestsCache:
options?.requestsCache ?? createMemoryCache({ serializable: false }),
hostsCache:
options?.hostsCache ??
createFallbackableCache({
caches: [
createBrowserLocalStorageCache({
key: `${apiClientVersion}-${appId}`,
}),
createMemoryCache(),
],
}),
...options,
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import type { InitClientOptions } from '@experimental-api-clients-automation/client-common';
import {
createMemoryCache,
createNullCache,
} from '@experimental-api-clients-automation/client-common';
import { createHttpRequester } from '@experimental-api-clients-automation/requester-node-http';

import { createAlgoliasearchLiteApi } from '../src/algoliasearchLiteApi';
import type { AlgoliasearchLiteApi } from '../src/algoliasearchLiteApi';

export * from '../src/algoliasearchLiteApi';

export function algoliasearchLiteApi(
appId: string,
apiKey: string,
options?: InitClientOptions
): AlgoliasearchLiteApi {
if (!appId) {
throw new Error('`appId` is missing.');
}

if (!apiKey) {
throw new Error('`apiKey` is missing.');
}

return createAlgoliasearchLiteApi({
appId,
apiKey,
timeouts: {
connect: 2,
read: 5,
write: 30,
},
requester: options?.requester ?? createHttpRequester(),
userAgents: [{ segment: 'Node.js', version: process.versions.node }],
responsesCache: options?.responsesCache ?? createNullCache(),
requestsCache: options?.requestsCache ?? createNullCache(),
hostsCache: options?.hostsCache ?? createMemoryCache(),
...options,
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line import/no-unresolved
export * from './dist/builds/node';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line import/no-commonjs,import/extensions
module.exports = require('./dist/algoliasearch-lite.cjs.node.js');
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export type Acl =
| 'addObject'
| 'analytics'
| 'browse'
| 'deleteIndex'
| 'deleteObject'
| 'editSettings'
| 'listIndexes'
| 'logs'
| 'personalization'
| 'recommendation'
| 'search'
| 'seeUnretrievableAttributes'
| 'settings'
| 'usage';
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Type of operation.
*/

export type Action =
| 'addObject'
| 'clear'
| 'delete'
| 'deleteObject'
| 'partialUpdateObject'
| 'partialUpdateObjectNoCreate'
| 'updateObject';
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export type AddApiKeyResponse = {
/**
* Key string.
*/
key: string;
/**
* Date of creation (ISO-8601 format).
*/
createdAt: string;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type AdvancedSyntaxFeatures = 'exactPhrase' | 'excludeWords';
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export type AlternativesAsExact =
| 'ignorePlurals'
| 'multiWordsSynonym'
| 'singleWordSynonym';
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/**
* Whether the pattern parameter must match the beginning or the end of the query string, or both, or none.
*/

export type Anchoring = 'contains' | 'endsWith' | 'is' | 'startsWith';
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import type { Acl } from './acl';

/**
* Api Key object.
*/
export type ApiKey = {
/**
* Set of permissions associated with the key.
*/
acl: Acl[];
/**
* A comment used to identify a key more easily in the dashboard. It is not interpreted by the API.
*/
description?: string;
/**
* Restrict this new API key to a list of indices or index patterns. If the list is empty, all indices are allowed.
*/
indexes?: string[];
/**
* Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced.
*/
maxHitsPerQuery?: number;
/**
* Maximum number of API calls per hour allowed from a given IP address or a user token.
*/
maxQueriesPerIPPerHour?: number;
/**
* URL-encoded query string. Force some query parameters to be applied for each query made with this API key.
*/
queryParameters?: string;
/**
* Restrict this new API key to specific referers. If empty or blank, defaults to all referers.
*/
referers?: string[];
/**
* Validity limit for this key in seconds. The key will automatically be removed after this period of time.
*/
validity?: number;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import type { AroundRadiusAll } from './aroundRadiusAll';

export type AroundRadius = AroundRadiusAll | number;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type AroundRadiusAll = 'all';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import type { BuiltInOperation } from './builtInOperation';

export type AttributeOrBuiltInOperation = BuiltInOperation | string;
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Automatic facet Filter.
*/
export type AutomaticFacetFilter = {
/**
* Attribute to filter on. This must match a facet placeholder in the Rule\'s pattern.
*/
facet: string;
/**
* Score for the filter. Typically used for optional or disjunctive filters.
*/
score?: number;
/**
* Whether the filter is disjunctive (true) or conjunctive (false).
*/
disjunctive?: boolean;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export type BaseBrowseResponse = {
/**
* Cursor indicating the location to resume browsing from. Must match the value returned by the previous call.
*/
cursor: string;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
export type BaseIndexSettings = {
/**
* Creates replicas, exact copies of an index.
*/
replicas?: string[];
/**
* Set the maximum number of hits accessible via pagination.
*/
paginationLimitedTo?: number;
/**
* A list of words for which you want to turn off typo tolerance.
*/
disableTypoToleranceOnWords?: string[];
/**
* Specify on which attributes to apply transliteration.
*/
attributesToTransliterate?: string[];
/**
* List of attributes on which to do a decomposition of camel case words.
*/
camelCaseAttributes?: string[];
/**
* Specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding.
*/
decompoundedAttributes?: Record<string, any>;
/**
* Sets the languages at the index level for language-specific processing such as tokenization and normalization.
*/
indexLanguages?: string[];
/**
* Whether promoted results should match the filters of the current search, except for geographic filters.
*/
filterPromotes?: boolean;
/**
* List of attributes on which you want to disable prefix matching.
*/
disablePrefixOnAttributes?: string[];
/**
* Enables compression of large integer arrays.
*/
allowCompressionOfIntegerArray?: boolean;
/**
* List of numeric attributes that can be used as numerical filters.
*/
numericAttributesForFiltering?: string[];
/**
* Lets you store custom data in your indices.
*/
userData?: Record<string, any>;
};
Loading

0 comments on commit aecafb5

Please sign in to comment.