Skip to content

Commit aecafb5

Browse files
chore: generated code for commit fbc6674. [skip ci]
Co-authored-by: Eunjae Lee <[email protected]>
1 parent fbc6674 commit aecafb5

File tree

86 files changed

+3912
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+3912
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import type { InitClientOptions } from '@experimental-api-clients-automation/client-common';
2+
import {
3+
createMemoryCache,
4+
createFallbackableCache,
5+
createBrowserLocalStorageCache,
6+
} from '@experimental-api-clients-automation/client-common';
7+
import { createXhrRequester } from '@experimental-api-clients-automation/requester-browser-xhr';
8+
9+
import {
10+
createAlgoliasearchLiteApi,
11+
apiClientVersion,
12+
} from '../src/algoliasearchLiteApi';
13+
import type { AlgoliasearchLiteApi } from '../src/algoliasearchLiteApi';
14+
15+
export * from '../src/algoliasearchLiteApi';
16+
17+
export function algoliasearchLiteApi(
18+
appId: string,
19+
apiKey: string,
20+
options?: InitClientOptions
21+
): AlgoliasearchLiteApi {
22+
if (!appId) {
23+
throw new Error('`appId` is missing.');
24+
}
25+
26+
if (!apiKey) {
27+
throw new Error('`apiKey` is missing.');
28+
}
29+
30+
return createAlgoliasearchLiteApi({
31+
appId,
32+
apiKey,
33+
timeouts: {
34+
connect: 1,
35+
read: 2,
36+
write: 30,
37+
},
38+
requester: options?.requester ?? createXhrRequester(),
39+
userAgents: [{ segment: 'Browser' }],
40+
authMode: 'WithinQueryParameters',
41+
responsesCache: options?.responsesCache ?? createMemoryCache(),
42+
requestsCache:
43+
options?.requestsCache ?? createMemoryCache({ serializable: false }),
44+
hostsCache:
45+
options?.hostsCache ??
46+
createFallbackableCache({
47+
caches: [
48+
createBrowserLocalStorageCache({
49+
key: `${apiClientVersion}-${appId}`,
50+
}),
51+
createMemoryCache(),
52+
],
53+
}),
54+
...options,
55+
});
56+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import type { InitClientOptions } from '@experimental-api-clients-automation/client-common';
2+
import {
3+
createMemoryCache,
4+
createNullCache,
5+
} from '@experimental-api-clients-automation/client-common';
6+
import { createHttpRequester } from '@experimental-api-clients-automation/requester-node-http';
7+
8+
import { createAlgoliasearchLiteApi } from '../src/algoliasearchLiteApi';
9+
import type { AlgoliasearchLiteApi } from '../src/algoliasearchLiteApi';
10+
11+
export * from '../src/algoliasearchLiteApi';
12+
13+
export function algoliasearchLiteApi(
14+
appId: string,
15+
apiKey: string,
16+
options?: InitClientOptions
17+
): AlgoliasearchLiteApi {
18+
if (!appId) {
19+
throw new Error('`appId` is missing.');
20+
}
21+
22+
if (!apiKey) {
23+
throw new Error('`apiKey` is missing.');
24+
}
25+
26+
return createAlgoliasearchLiteApi({
27+
appId,
28+
apiKey,
29+
timeouts: {
30+
connect: 2,
31+
read: 5,
32+
write: 30,
33+
},
34+
requester: options?.requester ?? createHttpRequester(),
35+
userAgents: [{ segment: 'Node.js', version: process.versions.node }],
36+
responsesCache: options?.responsesCache ?? createNullCache(),
37+
requestsCache: options?.requestsCache ?? createNullCache(),
38+
hostsCache: options?.hostsCache ?? createMemoryCache(),
39+
...options,
40+
});
41+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// eslint-disable-next-line import/no-unresolved
2+
export * from './dist/builds/node';
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// eslint-disable-next-line import/no-commonjs,import/extensions
2+
module.exports = require('./dist/algoliasearch-lite.cjs.node.js');
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export type Acl =
2+
| 'addObject'
3+
| 'analytics'
4+
| 'browse'
5+
| 'deleteIndex'
6+
| 'deleteObject'
7+
| 'editSettings'
8+
| 'listIndexes'
9+
| 'logs'
10+
| 'personalization'
11+
| 'recommendation'
12+
| 'search'
13+
| 'seeUnretrievableAttributes'
14+
| 'settings'
15+
| 'usage';
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* Type of operation.
3+
*/
4+
5+
export type Action =
6+
| 'addObject'
7+
| 'clear'
8+
| 'delete'
9+
| 'deleteObject'
10+
| 'partialUpdateObject'
11+
| 'partialUpdateObjectNoCreate'
12+
| 'updateObject';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export type AddApiKeyResponse = {
2+
/**
3+
* Key string.
4+
*/
5+
key: string;
6+
/**
7+
* Date of creation (ISO-8601 format).
8+
*/
9+
createdAt: string;
10+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export type AdvancedSyntaxFeatures = 'exactPhrase' | 'excludeWords';
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export type AlternativesAsExact =
2+
| 'ignorePlurals'
3+
| 'multiWordsSynonym'
4+
| 'singleWordSynonym';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* Whether the pattern parameter must match the beginning or the end of the query string, or both, or none.
3+
*/
4+
5+
export type Anchoring = 'contains' | 'endsWith' | 'is' | 'startsWith';
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import type { Acl } from './acl';
2+
3+
/**
4+
* Api Key object.
5+
*/
6+
export type ApiKey = {
7+
/**
8+
* Set of permissions associated with the key.
9+
*/
10+
acl: Acl[];
11+
/**
12+
* A comment used to identify a key more easily in the dashboard. It is not interpreted by the API.
13+
*/
14+
description?: string;
15+
/**
16+
* Restrict this new API key to a list of indices or index patterns. If the list is empty, all indices are allowed.
17+
*/
18+
indexes?: string[];
19+
/**
20+
* Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced.
21+
*/
22+
maxHitsPerQuery?: number;
23+
/**
24+
* Maximum number of API calls per hour allowed from a given IP address or a user token.
25+
*/
26+
maxQueriesPerIPPerHour?: number;
27+
/**
28+
* URL-encoded query string. Force some query parameters to be applied for each query made with this API key.
29+
*/
30+
queryParameters?: string;
31+
/**
32+
* Restrict this new API key to specific referers. If empty or blank, defaults to all referers.
33+
*/
34+
referers?: string[];
35+
/**
36+
* Validity limit for this key in seconds. The key will automatically be removed after this period of time.
37+
*/
38+
validity?: number;
39+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import type { AroundRadiusAll } from './aroundRadiusAll';
2+
3+
export type AroundRadius = AroundRadiusAll | number;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export type AroundRadiusAll = 'all';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import type { BuiltInOperation } from './builtInOperation';
2+
3+
export type AttributeOrBuiltInOperation = BuiltInOperation | string;
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Automatic facet Filter.
3+
*/
4+
export type AutomaticFacetFilter = {
5+
/**
6+
* Attribute to filter on. This must match a facet placeholder in the Rule\'s pattern.
7+
*/
8+
facet: string;
9+
/**
10+
* Score for the filter. Typically used for optional or disjunctive filters.
11+
*/
12+
score?: number;
13+
/**
14+
* Whether the filter is disjunctive (true) or conjunctive (false).
15+
*/
16+
disjunctive?: boolean;
17+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export type BaseBrowseResponse = {
2+
/**
3+
* Cursor indicating the location to resume browsing from. Must match the value returned by the previous call.
4+
*/
5+
cursor: string;
6+
};
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
export type BaseIndexSettings = {
2+
/**
3+
* Creates replicas, exact copies of an index.
4+
*/
5+
replicas?: string[];
6+
/**
7+
* Set the maximum number of hits accessible via pagination.
8+
*/
9+
paginationLimitedTo?: number;
10+
/**
11+
* A list of words for which you want to turn off typo tolerance.
12+
*/
13+
disableTypoToleranceOnWords?: string[];
14+
/**
15+
* Specify on which attributes to apply transliteration.
16+
*/
17+
attributesToTransliterate?: string[];
18+
/**
19+
* List of attributes on which to do a decomposition of camel case words.
20+
*/
21+
camelCaseAttributes?: string[];
22+
/**
23+
* Specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding.
24+
*/
25+
decompoundedAttributes?: Record<string, any>;
26+
/**
27+
* Sets the languages at the index level for language-specific processing such as tokenization and normalization.
28+
*/
29+
indexLanguages?: string[];
30+
/**
31+
* Whether promoted results should match the filters of the current search, except for geographic filters.
32+
*/
33+
filterPromotes?: boolean;
34+
/**
35+
* List of attributes on which you want to disable prefix matching.
36+
*/
37+
disablePrefixOnAttributes?: string[];
38+
/**
39+
* Enables compression of large integer arrays.
40+
*/
41+
allowCompressionOfIntegerArray?: boolean;
42+
/**
43+
* List of numeric attributes that can be used as numerical filters.
44+
*/
45+
numericAttributesForFiltering?: string[];
46+
/**
47+
* Lets you store custom data in your indices.
48+
*/
49+
userData?: Record<string, any>;
50+
};

0 commit comments

Comments
 (0)