Skip to content

Commit 577293e

Browse files
chore: generated code for commit 588539c. [skip ci]
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 588539c commit 577293e

File tree

4 files changed

+0
-179
lines changed

4 files changed

+0
-179
lines changed

clients/algoliasearch-client-javascript/packages/algoliasearch-lite/model/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ export * from './reRankingApplyFilter';
5353
export * from './removeWordsIfNoResults';
5454
export * from './rule';
5555
export * from './scopeType';
56-
export * from './searchForFacetValuesRequest';
57-
export * from './searchForFacetValuesResponse';
58-
export * from './searchForFacetValuesResponseFacetHits';
5956
export * from './searchHits';
6057
export * from './searchMethodParams';
6158
export * from './searchParams';

clients/algoliasearch-client-javascript/packages/algoliasearch-lite/src/algoliasearchLiteClient.ts

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import type {
1313
QueryParameters,
1414
} from '@experimental-api-clients-automation/client-common';
1515

16-
import type { SearchForFacetValuesRequest } from '../model/searchForFacetValuesRequest';
17-
import type { SearchForFacetValuesResponse } from '../model/searchForFacetValuesResponse';
1816
import type { SearchMethodParams } from '../model/searchMethodParams';
1917
import type { SearchResponses } from '../model/searchResponses';
2018

@@ -164,58 +162,6 @@ export function createAlgoliasearchLiteClient(options: CreateClientOptions) {
164162
requestOptions
165163
);
166164
},
167-
168-
/**
169-
* Search for values of a given facet, optionally restricting the returned values to those contained in objects matching other search criteria.
170-
*
171-
* @summary Search for values of a given facet.
172-
* @param searchForFacetValues - The searchForFacetValues object.
173-
* @param searchForFacetValues.indexName - The index in which to perform the request.
174-
* @param searchForFacetValues.facetName - The facet name.
175-
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
176-
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
177-
*/
178-
searchForFacetValues(
179-
{
180-
indexName,
181-
facetName,
182-
searchForFacetValuesRequest,
183-
}: SearchForFacetValuesProps,
184-
requestOptions?: RequestOptions
185-
): Promise<SearchForFacetValuesResponse> {
186-
if (!indexName) {
187-
throw new Error(
188-
'Parameter `indexName` is required when calling `searchForFacetValues`.'
189-
);
190-
}
191-
192-
if (!facetName) {
193-
throw new Error(
194-
'Parameter `facetName` is required when calling `searchForFacetValues`.'
195-
);
196-
}
197-
198-
const requestPath = '/1/indexes/{indexName}/facets/{facetName}/query'
199-
.replace('{indexName}', encodeURIComponent(indexName))
200-
.replace('{facetName}', encodeURIComponent(facetName));
201-
const headers: Headers = {};
202-
const queryParameters: QueryParameters = {};
203-
204-
const request: Request = {
205-
method: 'POST',
206-
path: requestPath,
207-
data: searchForFacetValuesRequest,
208-
};
209-
210-
return transporter.request(
211-
request,
212-
{
213-
queryParameters,
214-
headers,
215-
},
216-
requestOptions
217-
);
218-
},
219165
};
220166
}
221167

@@ -237,15 +183,3 @@ export type PostProps = {
237183
*/
238184
body?: Record<string, any>;
239185
};
240-
241-
export type SearchForFacetValuesProps = {
242-
/**
243-
* The index in which to perform the request.
244-
*/
245-
indexName: string;
246-
/**
247-
* The facet name.
248-
*/
249-
facetName: string;
250-
searchForFacetValuesRequest?: SearchForFacetValuesRequest;
251-
};

specs/bundled/algoliasearch-lite.yml

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,78 +2078,3 @@ paths:
20782078
$ref: '#/components/responses/MethodNotAllowed'
20792079
'404':
20802080
$ref: '#/components/responses/IndexNotFound'
2081-
/1/indexes/{indexName}/facets/{facetName}/query:
2082-
post:
2083-
tags:
2084-
- algoliasearch-lite
2085-
operationId: searchForFacetValues
2086-
summary: Search for values of a given facet.
2087-
description: >-
2088-
Search for values of a given facet, optionally restricting the returned
2089-
values to those contained in objects matching other search criteria.
2090-
parameters:
2091-
- $ref: '#/components/parameters/IndexName'
2092-
- name: facetName
2093-
description: The facet name.
2094-
in: path
2095-
required: true
2096-
schema:
2097-
type: string
2098-
requestBody:
2099-
content:
2100-
application/json:
2101-
schema:
2102-
title: searchForFacetValuesRequest
2103-
type: object
2104-
additionalProperties: false
2105-
properties:
2106-
params:
2107-
$ref: '#/components/schemas/paramsAsString'
2108-
facetQuery:
2109-
type: string
2110-
description: Text to search inside the facet's values.
2111-
default: ''
2112-
maxFacetHits:
2113-
$ref: '#/components/schemas/maxFacetHits'
2114-
responses:
2115-
'200':
2116-
description: OK
2117-
content:
2118-
application/json:
2119-
schema:
2120-
title: searchForFacetValuesResponse
2121-
type: object
2122-
additionalProperties: false
2123-
required:
2124-
- facetHits
2125-
properties:
2126-
facetHits:
2127-
type: array
2128-
items:
2129-
type: object
2130-
additionalProperties: false
2131-
required:
2132-
- value
2133-
- highlighted
2134-
- count
2135-
properties:
2136-
value:
2137-
description: Raw value of the facet.
2138-
type: string
2139-
highlighted:
2140-
$ref: '#/components/schemas/highlightedValue'
2141-
count:
2142-
description: >-
2143-
How many objects contain this facet value. This
2144-
takes into account the extra search parameters
2145-
specified in the query. Like for a regular search
2146-
query, the counts may not be exhaustive.
2147-
type: integer
2148-
'400':
2149-
$ref: '#/components/responses/BadRequest'
2150-
'402':
2151-
$ref: '#/components/responses/FeatureNotEnabled'
2152-
'403':
2153-
$ref: '#/components/responses/MethodNotAllowed'
2154-
'404':
2155-
$ref: '#/components/responses/IndexNotFound'

tests/output/javascript/src/methods/requests/algoliasearch-lite.test.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -326,38 +326,3 @@ describe('search', () => {
326326
expect(req.searchParams).toStrictEqual(undefined);
327327
});
328328
});
329-
330-
describe('searchForFacetValues', () => {
331-
test('get searchForFacetValues results with minimal parameters', async () => {
332-
const req = (await client.searchForFacetValues({
333-
indexName: 'indexName',
334-
facetName: 'facetName',
335-
})) as unknown as EchoResponse;
336-
337-
expect(req.path).toEqual('/1/indexes/indexName/facets/facetName/query');
338-
expect(req.method).toEqual('POST');
339-
expect(req.data).toEqual(undefined);
340-
expect(req.searchParams).toStrictEqual(undefined);
341-
});
342-
343-
test('get searchForFacetValues results with all parameters', async () => {
344-
const req = (await client.searchForFacetValues({
345-
indexName: 'indexName',
346-
facetName: 'facetName',
347-
searchForFacetValuesRequest: {
348-
params: "query=foo&facetFilters=['bar']",
349-
facetQuery: 'foo',
350-
maxFacetHits: 42,
351-
},
352-
})) as unknown as EchoResponse;
353-
354-
expect(req.path).toEqual('/1/indexes/indexName/facets/facetName/query');
355-
expect(req.method).toEqual('POST');
356-
expect(req.data).toEqual({
357-
params: "query=foo&facetFilters=['bar']",
358-
facetQuery: 'foo',
359-
maxFacetHits: 42,
360-
});
361-
expect(req.searchParams).toStrictEqual(undefined);
362-
});
363-
});

0 commit comments

Comments
 (0)