Skip to content

Commit 88b6feb

Browse files
chore: generated code for commit 632827b. [skip ci]
Co-authored-by: Aymeric Giraudet <[email protected]>
1 parent 632827b commit 88b6feb

32 files changed

+116
-73
lines changed

clients/algoliasearch-client-go/algolia/abtesting/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/analytics/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/ingestion/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/insights/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/monitoring/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/personalization/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/query-suggestions/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/search/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/usage/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22

3+
import type { RecommendationsRequest } from './recommendationsRequest';
34
import type { SearchForFacetsOptions } from './searchForFacetsOptions';
45
import type { SearchForHitsOptions } from './searchForHitsOptions';
56
import type { SearchParamsObject } from './searchParamsObject';
@@ -22,6 +23,13 @@ export type CustomPostProps = {
2223
body?: Record<string, any>;
2324
};
2425

26+
/**
27+
* Recommend method signature compatible with the `algoliasearch` v4 package. When using this signature, extra computation will be required to make it match the new signature.
28+
*
29+
* @deprecated This signature will be removed from the next major version, we recommend using the `GetRecommendationsParams` type for performances and future proof reasons.
30+
*/
31+
export type LegacyGetRecommendationsParams = RecommendationsRequest[];
32+
2533
/**
2634
* In v4, the search parameters are wrapped in a `params` parameter.
2735
*

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import type {
1717

1818
import type {
1919
CustomPostProps,
20+
LegacyGetRecommendationsParams,
2021
LegacySearchMethodProps,
2122
} from '../model/clientMethodProps';
2223
import type { GetRecommendationsParams } from '../model/getRecommendationsParams';
@@ -168,9 +169,20 @@ export function createLiteClient({
168169
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
169170
*/
170171
getRecommendations(
171-
getRecommendationsParams: GetRecommendationsParams,
172+
getRecommendationsParams:
173+
| GetRecommendationsParams
174+
| LegacyGetRecommendationsParams,
172175
requestOptions?: RequestOptions
173176
): Promise<GetRecommendationsResponse> {
177+
if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {
178+
const newSignatureRequest: GetRecommendationsParams = {
179+
requests: getRecommendationsParams,
180+
};
181+
182+
// eslint-disable-next-line no-param-reassign
183+
getRecommendationsParams = newSignatureRequest;
184+
}
185+
174186
if (!getRecommendationsParams) {
175187
throw new Error(
176188
'Parameter `getRecommendationsParams` is required when calling `getRecommendations`.'

clients/algoliasearch-client-javascript/packages/recommend/model/clientMethodProps.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22

33
import type { RecommendModels } from './recommendModels';
4+
import type { RecommendationsRequest } from './recommendationsRequest';
45
import type { SearchRecommendRulesParams } from './searchRecommendRulesParams';
56

67
/**
@@ -121,6 +122,13 @@ export type GetRecommendStatusProps = {
121122
taskID: number;
122123
};
123124

125+
/**
126+
* Recommend method signature compatible with the `algoliasearch` v4 package. When using this signature, extra computation will be required to make it match the new signature.
127+
*
128+
* @deprecated This signature will be removed from the next major version, we recommend using the `GetRecommendationsParams` type for performances and future proof reasons.
129+
*/
130+
export type LegacyGetRecommendationsParams = RecommendationsRequest[];
131+
124132
/**
125133
* Properties for the `searchRecommendRules` method.
126134
*/

clients/algoliasearch-client-javascript/packages/recommend/src/recommendClient.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import type {
2323
DeleteRecommendRuleProps,
2424
GetRecommendRuleProps,
2525
GetRecommendStatusProps,
26+
LegacyGetRecommendationsParams,
2627
SearchRecommendRulesProps,
2728
} from '../model/clientMethodProps';
2829
import type { DeletedAtResponse } from '../model/deletedAtResponse';
@@ -429,9 +430,20 @@ export function createRecommendClient({
429430
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
430431
*/
431432
getRecommendations(
432-
getRecommendationsParams: GetRecommendationsParams,
433+
getRecommendationsParams:
434+
| GetRecommendationsParams
435+
| LegacyGetRecommendationsParams,
433436
requestOptions?: RequestOptions
434437
): Promise<GetRecommendationsResponse> {
438+
if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {
439+
const newSignatureRequest: GetRecommendationsParams = {
440+
requests: getRecommendationsParams,
441+
};
442+
443+
// eslint-disable-next-line no-param-reassign
444+
getRecommendationsParams = newSignatureRequest;
445+
}
446+
435447
if (!getRecommendationsParams) {
436448
throw new Error(
437449
'Parameter `getRecommendationsParams` is required when calling `getRecommendations`.'

clients/algoliasearch-client-swift/Sources/Ingestion/Models/DestinationIndexName.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public struct DestinationIndexName: Codable, JSONEncodable {
1313
/// Attributes from your source to exclude from Algolia records. Not all your data attributes will be useful for
1414
/// searching. Keeping your Algolia records small increases indexing and search performance. - Exclude nested
1515
/// attributes with `.` notation. For example, `foo.bar` indexes the `foo` attribute and all its children **except**
16-
/// the `bar` attribute. - Exclude attributes from arrays with `[i]`, where `i` is the index of the array element.
16+
/// the `bar` attribute. - Exclude attributes from arrays with `[i]`, where `i` is the index of the array element.
1717
/// For example, `foo.[0].bar` only excludes the `bar` attribute from the first element of the `foo` array, but
1818
/// indexes the complete `foo` attribute for all other elements. Use `*` as wildcard: `foo.[*].bar` excludes `bar`
1919
/// from all elements of the `foo` array.

clients/algoliasearch-client-swift/Sources/Search/Models/BaseIndexSettings.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
#endif
88

99
public struct BaseIndexSettings: Codable, JSONEncodable {
10-
/// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/).
10+
/// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/).
1111
/// Facets are attributes that let you categorize search results. They can be used for filtering search results. By
1212
/// default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** -
1313
/// `filterOnly(\"ATTRIBUTE\")`. Allows using this attribute as a filter, but doesn't evalue the facet values. -
@@ -16,7 +16,7 @@ public struct BaseIndexSettings: Codable, JSONEncodable {
1616
/// this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
1717
public var attributesForFaceting: [String]?
1818
/// Creates [replica
19-
/// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/).
19+
/// indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/).
2020
/// Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you
2121
/// want to offer a different ranking or sorting of your search results, you'll use replica indices. All index
2222
/// operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must
@@ -69,7 +69,7 @@ public struct BaseIndexSettings: Codable, JSONEncodable {
6969
/// Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters).
7070
/// Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For
7171
/// faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric
72-
/// attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`.
72+
/// attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`.
7373
/// **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
7474
public var numericAttributesForFiltering: [String]?
7575
/// Controls which separators are indexed. Separators are all non-letter characters except spaces and currency

clients/algoliasearch-client-swift/Sources/Search/Models/BrowseParamsObject.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public struct BrowseParamsObject: Codable, JSONEncodable {
2121
/// upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet
2222
/// attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>`
2323
/// (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and
24-
/// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`.
24+
// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`.
2525
/// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not
2626
/// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not
2727
/// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet
@@ -221,7 +221,7 @@ public struct BrowseParamsObject: Codable, JSONEncodable {
221221
/// matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. -
222222
/// `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
223223
public var alternativesAsExact: [SearchAlternativesAsExact]?
224-
/// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly.
224+
// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly.
225225
/// For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". -
226226
/// `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine`
227227
/// matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax`
@@ -261,7 +261,7 @@ public struct BrowseParamsObject: Codable, JSONEncodable {
261261
/// attribute is determined by the order in the `searchableAttributes` setting.
262262
public var attributeCriteriaComputedByMinProximity: Bool?
263263
public var renderingContent: SearchRenderingContent?
264-
/// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
264+
// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
265265
/// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
266266
public var enableReRanking: Bool?
267267
public var reRankingApplyFilter: SearchReRankingApplyFilter?

clients/algoliasearch-client-swift/Sources/Search/Models/DeleteByParams.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public struct DeleteByParams: Codable, JSONEncodable {
1414
/// upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet
1515
/// attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>`
1616
/// (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and
17-
/// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`.
17+
// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`.
1818
/// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not
1919
/// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not
2020
/// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet

0 commit comments

Comments
 (0)