From 65e9864377d9d2109ab71c52ccb09b2727c765fb Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Thu, 10 Oct 2024 09:32:43 +0000 Subject: [PATCH] go 1.21 (generated) Co-authored-by: Pierre Millot --- .../packages/algoliasearch/index.d.ts | 1 - .../packages/algoliasearch/index.js | 1 - .../packages/algoliasearch/lite.d.ts | 1 - .../packages/algoliasearch/lite.js | 1 - .../packages/algoliasearch/lite/builds/browser.ts | 1 - .../packages/algoliasearch/lite/builds/node.ts | 1 - .../packages/algoliasearch/lite/src/liteClient.ts | 3 --- .../packages/client-abtesting/builds/browser.ts | 1 - .../packages/client-abtesting/builds/fetch.ts | 1 - .../packages/client-abtesting/builds/node.ts | 1 - .../packages/client-abtesting/index.d.ts | 1 - .../packages/client-abtesting/index.js | 1 - .../packages/client-abtesting/src/abtestingClient.ts | 1 - .../packages/client-analytics/builds/browser.ts | 1 - .../packages/client-analytics/builds/fetch.ts | 1 - .../packages/client-analytics/builds/node.ts | 1 - .../packages/client-analytics/index.d.ts | 1 - .../packages/client-analytics/index.js | 1 - .../packages/client-analytics/src/analyticsClient.ts | 1 - .../packages/client-insights/builds/browser.ts | 1 - .../packages/client-insights/builds/fetch.ts | 1 - .../packages/client-insights/builds/node.ts | 1 - .../packages/client-insights/index.d.ts | 1 - .../packages/client-insights/index.js | 1 - .../packages/client-insights/src/insightsClient.ts | 1 - .../packages/client-personalization/builds/browser.ts | 1 - .../packages/client-personalization/builds/fetch.ts | 1 - .../packages/client-personalization/builds/node.ts | 1 - .../packages/client-personalization/index.d.ts | 1 - .../packages/client-personalization/index.js | 1 - .../client-personalization/src/personalizationClient.ts | 1 - .../packages/client-query-suggestions/builds/browser.ts | 1 - .../packages/client-query-suggestions/builds/fetch.ts | 1 - .../packages/client-query-suggestions/builds/node.ts | 1 - .../packages/client-query-suggestions/index.d.ts | 1 - .../packages/client-query-suggestions/index.js | 1 - .../client-query-suggestions/src/querySuggestionsClient.ts | 1 - .../packages/client-search/builds/browser.ts | 1 - .../packages/client-search/builds/fetch.ts | 2 -- .../packages/client-search/builds/node.ts | 2 -- .../packages/client-search/index.d.ts | 1 - .../packages/client-search/index.js | 1 - .../packages/client-search/src/searchClient.ts | 2 -- .../packages/ingestion/builds/browser.ts | 1 - .../packages/ingestion/builds/fetch.ts | 1 - .../packages/ingestion/builds/node.ts | 1 - .../packages/ingestion/index.d.ts | 1 - .../packages/ingestion/index.js | 1 - .../packages/ingestion/src/ingestionClient.ts | 1 - .../packages/monitoring/builds/browser.ts | 1 - .../packages/monitoring/builds/fetch.ts | 1 - .../packages/monitoring/builds/node.ts | 1 - .../packages/monitoring/index.d.ts | 1 - .../packages/monitoring/index.js | 1 - .../packages/monitoring/src/monitoringClient.ts | 1 - .../packages/recommend/builds/browser.ts | 1 - .../packages/recommend/builds/fetch.ts | 1 - .../packages/recommend/builds/node.ts | 1 - .../packages/recommend/index.d.ts | 1 - .../packages/recommend/index.js | 1 - .../packages/recommend/src/recommendClient.ts | 2 -- .../algoliasearch/abtesting/config.py | 7 +++++-- .../algoliasearch/analytics/config.py | 7 +++++-- .../algoliasearch/ingestion/config.py | 7 +++++-- .../algoliasearch/insights/config.py | 7 +++++-- .../algoliasearch/monitoring/config.py | 7 +++++-- .../algoliasearch/personalization/config.py | 7 +++++-- .../algoliasearch/query_suggestions/config.py | 7 +++++-- .../algoliasearch/recommend/config.py | 7 +++++-- .../algoliasearch/search/config.py | 7 +++++-- docs/guides/go/go.mod | 2 +- docs/snippets/go/go.mod | 2 +- docs/snippets/javascript/src/abtesting.ts | 1 - docs/snippets/javascript/src/algoliasearch.ts | 1 - docs/snippets/javascript/src/analytics.ts | 1 - docs/snippets/javascript/src/ingestion.ts | 1 - docs/snippets/javascript/src/insights.ts | 1 - docs/snippets/javascript/src/monitoring.ts | 1 - docs/snippets/javascript/src/personalization.ts | 1 - docs/snippets/javascript/src/querySuggestions.ts | 1 - docs/snippets/javascript/src/recommend.ts | 1 - docs/snippets/javascript/src/search.ts | 1 - tests/output/javascript/src/benchmark/search.test.ts | 1 - tests/output/javascript/src/client/abtesting.test.ts | 2 +- tests/output/javascript/src/client/analytics.test.ts | 2 +- tests/output/javascript/src/client/ingestion.test.ts | 2 +- tests/output/javascript/src/client/insights.test.ts | 2 +- tests/output/javascript/src/client/monitoring.test.ts | 2 +- tests/output/javascript/src/client/personalization.test.ts | 2 +- .../output/javascript/src/client/querySuggestions.test.ts | 2 +- tests/output/javascript/src/client/recommend.test.ts | 2 +- tests/output/javascript/src/client/search.test.ts | 2 +- 92 files changed, 56 insertions(+), 107 deletions(-) diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/index.d.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/index.d.ts index 23eac31bdc3..e81a1cd3e76 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/index.d.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/index.d.ts @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-unresolved export * from './dist/node'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/index.js b/clients/algoliasearch-client-javascript/packages/algoliasearch/index.js index 0c06def1914..4a9cdb9efbf 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/index.js +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/index.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-commonjs,import/extensions module.exports = require('./dist/node.cjs'); diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite.d.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite.d.ts index 0401197d317..ea765f3bc9a 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite.d.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite.d.ts @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-unresolved export * from './dist/lite/node'; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite.js b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite.js index 08c02e8a8d0..ef1f99093e8 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite.js +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-commonjs,import/extensions module.exports = require('./dist/lite/builds/node.cjs'); diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/builds/browser.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/builds/browser.ts index 627e44347ce..0047a9e49e6 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/builds/browser.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/builds/browser.ts @@ -18,7 +18,6 @@ import { apiClientVersion, createLiteClient } from '../src/liteClient'; export * from '../model'; export { apiClientVersion } from '../src/liteClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function liteClient(appId: string, apiKey: string, options?: ClientOptions): LiteClient { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/builds/node.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/builds/node.ts index 948c1c230bb..0d0c803bfb2 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/builds/node.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/builds/node.ts @@ -19,7 +19,6 @@ import { createLiteClient } from '../src/liteClient'; export * from '../model'; export { apiClientVersion } from '../src/liteClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function liteClient(appId: string, apiKey: string, options?: ClientOptions): LiteClient { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/src/liteClient.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/src/liteClient.ts index 0bb3760e3e8..0fc05f99274 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/src/liteClient.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/src/liteClient.ts @@ -61,7 +61,6 @@ function getDefaultHosts(appId: string): Host[] { ); } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createLiteClient({ appId: appIdOption, apiKey: apiKeyOption, @@ -214,7 +213,6 @@ export function createLiteClient({ requests: getRecommendationsParams, }; - // eslint-disable-next-line no-param-reassign getRecommendationsParams = newSignatureRequest; } @@ -276,7 +274,6 @@ export function createLiteClient({ }), }; - // eslint-disable-next-line no-param-reassign searchMethodParams = newSignatureRequest; } diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/builds/browser.ts b/clients/algoliasearch-client-javascript/packages/client-abtesting/builds/browser.ts index ce05e026d4f..aee47c7d87d 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/builds/browser.ts +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/builds/browser.ts @@ -20,7 +20,6 @@ import { Region, REGIONS } from '../src/abtestingClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/abtestingClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function abtestingClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/builds/fetch.ts b/clients/algoliasearch-client-javascript/packages/client-abtesting/builds/fetch.ts index 8c8711df79f..16d3e1fcb3d 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/builds/fetch.ts +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/builds/fetch.ts @@ -20,7 +20,6 @@ import { Region, REGIONS } from '../src/abtestingClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/abtestingClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function abtestingClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/builds/node.ts b/clients/algoliasearch-client-javascript/packages/client-abtesting/builds/node.ts index 9b5208acfbf..d25e259991b 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/builds/node.ts +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/builds/node.ts @@ -21,7 +21,6 @@ import { Region, REGIONS } from '../src/abtestingClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/abtestingClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function abtestingClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/index.d.ts b/clients/algoliasearch-client-javascript/packages/client-abtesting/index.d.ts index 23eac31bdc3..e81a1cd3e76 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/index.d.ts +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/index.d.ts @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-unresolved export * from './dist/node'; diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/index.js b/clients/algoliasearch-client-javascript/packages/client-abtesting/index.js index 05d3d242d2d..21e26aad337 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/index.js +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/index.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-commonjs,import/extensions module.exports = require('./dist/builds/node.cjs'); diff --git a/clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts b/clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts index f0a4aede58a..74e1ba5f0b6 100644 --- a/clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts @@ -40,7 +40,6 @@ function getDefaultHosts(region?: Region): Host[] { return [{ url, accept: 'readWrite', protocol: 'https' }]; } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/builds/browser.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/builds/browser.ts index fd7877aa9c1..9323837065e 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/builds/browser.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/builds/browser.ts @@ -20,7 +20,6 @@ import { Region, REGIONS } from '../src/analyticsClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/analyticsClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function analyticsClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/builds/fetch.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/builds/fetch.ts index 02825a6c2b7..c6baa6e2b53 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/builds/fetch.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/builds/fetch.ts @@ -20,7 +20,6 @@ import { Region, REGIONS } from '../src/analyticsClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/analyticsClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function analyticsClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/builds/node.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/builds/node.ts index 9e3d3d23f43..1adcd4ce33d 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/builds/node.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/builds/node.ts @@ -21,7 +21,6 @@ import { Region, REGIONS } from '../src/analyticsClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/analyticsClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function analyticsClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/index.d.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/index.d.ts index 23eac31bdc3..e81a1cd3e76 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/index.d.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/index.d.ts @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-unresolved export * from './dist/node'; diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/index.js b/clients/algoliasearch-client-javascript/packages/client-analytics/index.js index 05d3d242d2d..21e26aad337 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/index.js +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/index.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-commonjs,import/extensions module.exports = require('./dist/builds/node.cjs'); diff --git a/clients/algoliasearch-client-javascript/packages/client-analytics/src/analyticsClient.ts b/clients/algoliasearch-client-javascript/packages/client-analytics/src/analyticsClient.ts index ceddb38e8aa..373fd7bc794 100644 --- a/clients/algoliasearch-client-javascript/packages/client-analytics/src/analyticsClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-analytics/src/analyticsClient.ts @@ -69,7 +69,6 @@ function getDefaultHosts(region?: Region): Host[] { return [{ url, accept: 'readWrite', protocol: 'https' }]; } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, diff --git a/clients/algoliasearch-client-javascript/packages/client-insights/builds/browser.ts b/clients/algoliasearch-client-javascript/packages/client-insights/builds/browser.ts index bfabd4a2ce8..3fece73cc7a 100644 --- a/clients/algoliasearch-client-javascript/packages/client-insights/builds/browser.ts +++ b/clients/algoliasearch-client-javascript/packages/client-insights/builds/browser.ts @@ -20,7 +20,6 @@ import { Region, REGIONS } from '../src/insightsClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/insightsClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function insightsClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-insights/builds/fetch.ts b/clients/algoliasearch-client-javascript/packages/client-insights/builds/fetch.ts index ff5bc33cf71..363f8626be0 100644 --- a/clients/algoliasearch-client-javascript/packages/client-insights/builds/fetch.ts +++ b/clients/algoliasearch-client-javascript/packages/client-insights/builds/fetch.ts @@ -20,7 +20,6 @@ import { Region, REGIONS } from '../src/insightsClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/insightsClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function insightsClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-insights/builds/node.ts b/clients/algoliasearch-client-javascript/packages/client-insights/builds/node.ts index 541cbed902e..b3bb7ceb170 100644 --- a/clients/algoliasearch-client-javascript/packages/client-insights/builds/node.ts +++ b/clients/algoliasearch-client-javascript/packages/client-insights/builds/node.ts @@ -21,7 +21,6 @@ import { Region, REGIONS } from '../src/insightsClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/insightsClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function insightsClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-insights/index.d.ts b/clients/algoliasearch-client-javascript/packages/client-insights/index.d.ts index 23eac31bdc3..e81a1cd3e76 100644 --- a/clients/algoliasearch-client-javascript/packages/client-insights/index.d.ts +++ b/clients/algoliasearch-client-javascript/packages/client-insights/index.d.ts @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-unresolved export * from './dist/node'; diff --git a/clients/algoliasearch-client-javascript/packages/client-insights/index.js b/clients/algoliasearch-client-javascript/packages/client-insights/index.js index 05d3d242d2d..21e26aad337 100644 --- a/clients/algoliasearch-client-javascript/packages/client-insights/index.js +++ b/clients/algoliasearch-client-javascript/packages/client-insights/index.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-commonjs,import/extensions module.exports = require('./dist/builds/node.cjs'); diff --git a/clients/algoliasearch-client-javascript/packages/client-insights/src/insightsClient.ts b/clients/algoliasearch-client-javascript/packages/client-insights/src/insightsClient.ts index 6a9be6c661a..780fcb567df 100644 --- a/clients/algoliasearch-client-javascript/packages/client-insights/src/insightsClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-insights/src/insightsClient.ts @@ -32,7 +32,6 @@ function getDefaultHosts(region?: Region): Host[] { return [{ url, accept: 'readWrite', protocol: 'https' }]; } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createInsightsClient({ appId: appIdOption, apiKey: apiKeyOption, diff --git a/clients/algoliasearch-client-javascript/packages/client-personalization/builds/browser.ts b/clients/algoliasearch-client-javascript/packages/client-personalization/builds/browser.ts index cf43bb16538..a373c9543e2 100644 --- a/clients/algoliasearch-client-javascript/packages/client-personalization/builds/browser.ts +++ b/clients/algoliasearch-client-javascript/packages/client-personalization/builds/browser.ts @@ -20,7 +20,6 @@ import { Region, REGIONS } from '../src/personalizationClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/personalizationClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function personalizationClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-personalization/builds/fetch.ts b/clients/algoliasearch-client-javascript/packages/client-personalization/builds/fetch.ts index 03098214de2..7d5c879d331 100644 --- a/clients/algoliasearch-client-javascript/packages/client-personalization/builds/fetch.ts +++ b/clients/algoliasearch-client-javascript/packages/client-personalization/builds/fetch.ts @@ -20,7 +20,6 @@ import { Region, REGIONS } from '../src/personalizationClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/personalizationClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function personalizationClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-personalization/builds/node.ts b/clients/algoliasearch-client-javascript/packages/client-personalization/builds/node.ts index 054fdc00bcf..d08aeadc13b 100644 --- a/clients/algoliasearch-client-javascript/packages/client-personalization/builds/node.ts +++ b/clients/algoliasearch-client-javascript/packages/client-personalization/builds/node.ts @@ -21,7 +21,6 @@ import { Region, REGIONS } from '../src/personalizationClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/personalizationClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function personalizationClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-personalization/index.d.ts b/clients/algoliasearch-client-javascript/packages/client-personalization/index.d.ts index 23eac31bdc3..e81a1cd3e76 100644 --- a/clients/algoliasearch-client-javascript/packages/client-personalization/index.d.ts +++ b/clients/algoliasearch-client-javascript/packages/client-personalization/index.d.ts @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-unresolved export * from './dist/node'; diff --git a/clients/algoliasearch-client-javascript/packages/client-personalization/index.js b/clients/algoliasearch-client-javascript/packages/client-personalization/index.js index 05d3d242d2d..21e26aad337 100644 --- a/clients/algoliasearch-client-javascript/packages/client-personalization/index.js +++ b/clients/algoliasearch-client-javascript/packages/client-personalization/index.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-commonjs,import/extensions module.exports = require('./dist/builds/node.cjs'); diff --git a/clients/algoliasearch-client-javascript/packages/client-personalization/src/personalizationClient.ts b/clients/algoliasearch-client-javascript/packages/client-personalization/src/personalizationClient.ts index 93721572648..6ddce316390 100644 --- a/clients/algoliasearch-client-javascript/packages/client-personalization/src/personalizationClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-personalization/src/personalizationClient.ts @@ -36,7 +36,6 @@ function getDefaultHosts(region: Region): Host[] { return [{ url, accept: 'readWrite', protocol: 'https' }]; } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption, diff --git a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/builds/browser.ts b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/builds/browser.ts index ff794b3eebe..8f10336dfad 100644 --- a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/builds/browser.ts +++ b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/builds/browser.ts @@ -20,7 +20,6 @@ import { Region, REGIONS } from '../src/querySuggestionsClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/querySuggestionsClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function querySuggestionsClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/builds/fetch.ts b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/builds/fetch.ts index 64ac74ef17c..439861d428f 100644 --- a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/builds/fetch.ts +++ b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/builds/fetch.ts @@ -20,7 +20,6 @@ import { Region, REGIONS } from '../src/querySuggestionsClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/querySuggestionsClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function querySuggestionsClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/builds/node.ts b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/builds/node.ts index 87563a44d16..5c3031adf54 100644 --- a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/builds/node.ts +++ b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/builds/node.ts @@ -21,7 +21,6 @@ import { Region, REGIONS } from '../src/querySuggestionsClient'; export * from '../model'; export { apiClientVersion, Region } from '../src/querySuggestionsClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function querySuggestionsClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/index.d.ts b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/index.d.ts index 23eac31bdc3..e81a1cd3e76 100644 --- a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/index.d.ts +++ b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/index.d.ts @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-unresolved export * from './dist/node'; diff --git a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/index.js b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/index.js index 05d3d242d2d..21e26aad337 100644 --- a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/index.js +++ b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/index.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-commonjs,import/extensions module.exports = require('./dist/builds/node.cjs'); diff --git a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/querySuggestionsClient.ts b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/querySuggestionsClient.ts index dd024e8dab5..bdc38125f3b 100644 --- a/clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/querySuggestionsClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/querySuggestionsClient.ts @@ -41,7 +41,6 @@ function getDefaultHosts(region: Region): Host[] { return [{ url, accept: 'readWrite', protocol: 'https' }]; } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption, diff --git a/clients/algoliasearch-client-javascript/packages/client-search/builds/browser.ts b/clients/algoliasearch-client-javascript/packages/client-search/builds/browser.ts index 1be152ad2da..f5960154824 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/builds/browser.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/builds/browser.ts @@ -18,7 +18,6 @@ import { apiClientVersion, createSearchClient } from '../src/searchClient'; export * from '../model'; export { apiClientVersion } from '../src/searchClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function searchClient(appId: string, apiKey: string, options?: ClientOptions): SearchClient { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); diff --git a/clients/algoliasearch-client-javascript/packages/client-search/builds/fetch.ts b/clients/algoliasearch-client-javascript/packages/client-search/builds/fetch.ts index 88326a665f9..870f515b6e3 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/builds/fetch.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/builds/fetch.ts @@ -27,7 +27,6 @@ import { import { createHmac } from 'node:crypto'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function searchClient(appId: string, apiKey: string, options?: ClientOptions): SearchClient { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); @@ -78,7 +77,6 @@ export function searchClient(appId: string, apiKey: string, options?: ClientOpti .sort() .reduce( (acc, key) => { - // eslint-disable-next-line no-param-reassign acc[key] = (mergedRestrictions as any)[key]; return acc; }, diff --git a/clients/algoliasearch-client-javascript/packages/client-search/builds/node.ts b/clients/algoliasearch-client-javascript/packages/client-search/builds/node.ts index 089e4f0b740..a1da87001f0 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/builds/node.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/builds/node.ts @@ -28,7 +28,6 @@ import { import { createHmac } from 'node:crypto'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function searchClient(appId: string, apiKey: string, options?: ClientOptions): SearchClient { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); @@ -79,7 +78,6 @@ export function searchClient(appId: string, apiKey: string, options?: ClientOpti .sort() .reduce( (acc, key) => { - // eslint-disable-next-line no-param-reassign acc[key] = (mergedRestrictions as any)[key]; return acc; }, diff --git a/clients/algoliasearch-client-javascript/packages/client-search/index.d.ts b/clients/algoliasearch-client-javascript/packages/client-search/index.d.ts index 23eac31bdc3..e81a1cd3e76 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/index.d.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/index.d.ts @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-unresolved export * from './dist/node'; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/index.js b/clients/algoliasearch-client-javascript/packages/client-search/index.js index 05d3d242d2d..21e26aad337 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/index.js +++ b/clients/algoliasearch-client-javascript/packages/client-search/index.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-commonjs,import/extensions module.exports = require('./dist/builds/node.cjs'); diff --git a/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts b/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts index b5ded289bec..cdf2b568d1a 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts @@ -180,7 +180,6 @@ function getDefaultHosts(appId: string): Host[] { ); } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, @@ -2546,7 +2545,6 @@ export function createSearchClient({ }), }; - // eslint-disable-next-line no-param-reassign searchMethodParams = newSignatureRequest; } diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/builds/browser.ts b/clients/algoliasearch-client-javascript/packages/ingestion/builds/browser.ts index d86c579ab09..f53cad1fed4 100644 --- a/clients/algoliasearch-client-javascript/packages/ingestion/builds/browser.ts +++ b/clients/algoliasearch-client-javascript/packages/ingestion/builds/browser.ts @@ -26,7 +26,6 @@ export { Region, } from '../src/ingestionClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function ingestionClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/builds/fetch.ts b/clients/algoliasearch-client-javascript/packages/ingestion/builds/fetch.ts index ee836ee528b..aa0491d69e4 100644 --- a/clients/algoliasearch-client-javascript/packages/ingestion/builds/fetch.ts +++ b/clients/algoliasearch-client-javascript/packages/ingestion/builds/fetch.ts @@ -26,7 +26,6 @@ export { Region, } from '../src/ingestionClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function ingestionClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/builds/node.ts b/clients/algoliasearch-client-javascript/packages/ingestion/builds/node.ts index ee4ebe1961a..0fc36d70fe9 100644 --- a/clients/algoliasearch-client-javascript/packages/ingestion/builds/node.ts +++ b/clients/algoliasearch-client-javascript/packages/ingestion/builds/node.ts @@ -27,7 +27,6 @@ export { Region, } from '../src/ingestionClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function ingestionClient( appId: string, apiKey: string, diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/index.d.ts b/clients/algoliasearch-client-javascript/packages/ingestion/index.d.ts index 23eac31bdc3..e81a1cd3e76 100644 --- a/clients/algoliasearch-client-javascript/packages/ingestion/index.d.ts +++ b/clients/algoliasearch-client-javascript/packages/ingestion/index.d.ts @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-unresolved export * from './dist/node'; diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/index.js b/clients/algoliasearch-client-javascript/packages/ingestion/index.js index 05d3d242d2d..21e26aad337 100644 --- a/clients/algoliasearch-client-javascript/packages/ingestion/index.js +++ b/clients/algoliasearch-client-javascript/packages/ingestion/index.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-commonjs,import/extensions module.exports = require('./dist/builds/node.cjs'); diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/src/ingestionClient.ts b/clients/algoliasearch-client-javascript/packages/ingestion/src/ingestionClient.ts index 241e8fc185b..c979827a78d 100644 --- a/clients/algoliasearch-client-javascript/packages/ingestion/src/ingestionClient.ts +++ b/clients/algoliasearch-client-javascript/packages/ingestion/src/ingestionClient.ts @@ -158,7 +158,6 @@ export function isSubscriptionTrigger(trigger: TaskCreateTrigger | Trigger): tri return trigger.type === 'subscription'; } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/builds/browser.ts b/clients/algoliasearch-client-javascript/packages/monitoring/builds/browser.ts index 49f2703ae81..649e54f7b79 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/builds/browser.ts +++ b/clients/algoliasearch-client-javascript/packages/monitoring/builds/browser.ts @@ -18,7 +18,6 @@ import { apiClientVersion, createMonitoringClient } from '../src/monitoringClien export * from '../model'; export { apiClientVersion } from '../src/monitoringClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function monitoringClient(appId: string, apiKey: string, options?: ClientOptions): MonitoringClient { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/builds/fetch.ts b/clients/algoliasearch-client-javascript/packages/monitoring/builds/fetch.ts index 446dd2f14fb..909ecb879c3 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/builds/fetch.ts +++ b/clients/algoliasearch-client-javascript/packages/monitoring/builds/fetch.ts @@ -18,7 +18,6 @@ import { createMonitoringClient } from '../src/monitoringClient'; export * from '../model'; export { apiClientVersion } from '../src/monitoringClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function monitoringClient(appId: string, apiKey: string, options?: ClientOptions): MonitoringClient { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/builds/node.ts b/clients/algoliasearch-client-javascript/packages/monitoring/builds/node.ts index e8c1578634c..bafa9840810 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/builds/node.ts +++ b/clients/algoliasearch-client-javascript/packages/monitoring/builds/node.ts @@ -19,7 +19,6 @@ import { createMonitoringClient } from '../src/monitoringClient'; export * from '../model'; export { apiClientVersion } from '../src/monitoringClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function monitoringClient(appId: string, apiKey: string, options?: ClientOptions): MonitoringClient { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/index.d.ts b/clients/algoliasearch-client-javascript/packages/monitoring/index.d.ts index 23eac31bdc3..e81a1cd3e76 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/index.d.ts +++ b/clients/algoliasearch-client-javascript/packages/monitoring/index.d.ts @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-unresolved export * from './dist/node'; diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/index.js b/clients/algoliasearch-client-javascript/packages/monitoring/index.js index 05d3d242d2d..21e26aad337 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/index.js +++ b/clients/algoliasearch-client-javascript/packages/monitoring/index.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-commonjs,import/extensions module.exports = require('./dist/builds/node.cjs'); diff --git a/clients/algoliasearch-client-javascript/packages/monitoring/src/monitoringClient.ts b/clients/algoliasearch-client-javascript/packages/monitoring/src/monitoringClient.ts index 24968081ccf..e39ceb1dda4 100644 --- a/clients/algoliasearch-client-javascript/packages/monitoring/src/monitoringClient.ts +++ b/clients/algoliasearch-client-javascript/packages/monitoring/src/monitoringClient.ts @@ -37,7 +37,6 @@ function getDefaultHosts(): Host[] { return [{ url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' }]; } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, diff --git a/clients/algoliasearch-client-javascript/packages/recommend/builds/browser.ts b/clients/algoliasearch-client-javascript/packages/recommend/builds/browser.ts index 6c7ff115c98..da2d7f2c132 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/builds/browser.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/builds/browser.ts @@ -18,7 +18,6 @@ import { apiClientVersion, createRecommendClient } from '../src/recommendClient' export * from '../model'; export { apiClientVersion } from '../src/recommendClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function recommendClient(appId: string, apiKey: string, options?: ClientOptions): RecommendClient { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); diff --git a/clients/algoliasearch-client-javascript/packages/recommend/builds/fetch.ts b/clients/algoliasearch-client-javascript/packages/recommend/builds/fetch.ts index d2d52d97a00..716ebf0e62b 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/builds/fetch.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/builds/fetch.ts @@ -18,7 +18,6 @@ import { createRecommendClient } from '../src/recommendClient'; export * from '../model'; export { apiClientVersion } from '../src/recommendClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function recommendClient(appId: string, apiKey: string, options?: ClientOptions): RecommendClient { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); diff --git a/clients/algoliasearch-client-javascript/packages/recommend/builds/node.ts b/clients/algoliasearch-client-javascript/packages/recommend/builds/node.ts index 389d2c0e1b3..d38a55abbd5 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/builds/node.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/builds/node.ts @@ -19,7 +19,6 @@ import { createRecommendClient } from '../src/recommendClient'; export * from '../model'; export { apiClientVersion } from '../src/recommendClient'; -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function recommendClient(appId: string, apiKey: string, options?: ClientOptions): RecommendClient { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); diff --git a/clients/algoliasearch-client-javascript/packages/recommend/index.d.ts b/clients/algoliasearch-client-javascript/packages/recommend/index.d.ts index 23eac31bdc3..e81a1cd3e76 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/index.d.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/index.d.ts @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-unresolved export * from './dist/node'; diff --git a/clients/algoliasearch-client-javascript/packages/recommend/index.js b/clients/algoliasearch-client-javascript/packages/recommend/index.js index 05d3d242d2d..21e26aad337 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/index.js +++ b/clients/algoliasearch-client-javascript/packages/recommend/index.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-commonjs,import/extensions module.exports = require('./dist/builds/node.cjs'); diff --git a/clients/algoliasearch-client-javascript/packages/recommend/src/recommendClient.ts b/clients/algoliasearch-client-javascript/packages/recommend/src/recommendClient.ts index b14ccac3898..50d30e31e9b 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/src/recommendClient.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/src/recommendClient.ts @@ -71,7 +71,6 @@ function getDefaultHosts(appId: string): Host[] { ); } -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type export function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, @@ -451,7 +450,6 @@ export function createRecommendClient({ requests: getRecommendationsParams, }; - // eslint-disable-next-line no-param-reassign getRecommendationsParams = newSignatureRequest; } diff --git a/clients/algoliasearch-client-python/algoliasearch/abtesting/config.py b/clients/algoliasearch-client-python/algoliasearch/abtesting/config.py index 47a1d418b5d..bf86abf4473 100644 --- a/clients/algoliasearch-client-python/algoliasearch/abtesting/config.py +++ b/clients/algoliasearch-client-python/algoliasearch/abtesting/config.py @@ -17,8 +17,11 @@ def __init__( user_agent = UserAgent().add("Abtesting") - assert app_id, "`app_id` is missing." - assert api_key, "`api_key` is missing." + if app_id is None or not app_id: + raise ValueError("`app_id` is missing.") + + if api_key is None or not api_key: + raise ValueError("`api_key` is missing.") self.headers = { "x-algolia-application-id": app_id, diff --git a/clients/algoliasearch-client-python/algoliasearch/analytics/config.py b/clients/algoliasearch-client-python/algoliasearch/analytics/config.py index 43865238764..ffdf6eff153 100644 --- a/clients/algoliasearch-client-python/algoliasearch/analytics/config.py +++ b/clients/algoliasearch-client-python/algoliasearch/analytics/config.py @@ -17,8 +17,11 @@ def __init__( user_agent = UserAgent().add("Analytics") - assert app_id, "`app_id` is missing." - assert api_key, "`api_key` is missing." + if app_id is None or not app_id: + raise ValueError("`app_id` is missing.") + + if api_key is None or not api_key: + raise ValueError("`api_key` is missing.") self.headers = { "x-algolia-application-id": app_id, diff --git a/clients/algoliasearch-client-python/algoliasearch/ingestion/config.py b/clients/algoliasearch-client-python/algoliasearch/ingestion/config.py index 225a31e3ff6..eab033954ba 100644 --- a/clients/algoliasearch-client-python/algoliasearch/ingestion/config.py +++ b/clients/algoliasearch-client-python/algoliasearch/ingestion/config.py @@ -14,8 +14,11 @@ def __init__( user_agent = UserAgent().add("Ingestion") - assert app_id, "`app_id` is missing." - assert api_key, "`api_key` is missing." + if app_id is None or not app_id: + raise ValueError("`app_id` is missing.") + + if api_key is None or not api_key: + raise ValueError("`api_key` is missing.") self.headers = { "x-algolia-application-id": app_id, diff --git a/clients/algoliasearch-client-python/algoliasearch/insights/config.py b/clients/algoliasearch-client-python/algoliasearch/insights/config.py index fc430ce9725..076c7ebb791 100644 --- a/clients/algoliasearch-client-python/algoliasearch/insights/config.py +++ b/clients/algoliasearch-client-python/algoliasearch/insights/config.py @@ -17,8 +17,11 @@ def __init__( user_agent = UserAgent().add("Insights") - assert app_id, "`app_id` is missing." - assert api_key, "`api_key` is missing." + if app_id is None or not app_id: + raise ValueError("`app_id` is missing.") + + if api_key is None or not api_key: + raise ValueError("`api_key` is missing.") self.headers = { "x-algolia-application-id": app_id, diff --git a/clients/algoliasearch-client-python/algoliasearch/monitoring/config.py b/clients/algoliasearch-client-python/algoliasearch/monitoring/config.py index 9bab7198d8e..1f4d3856e07 100644 --- a/clients/algoliasearch-client-python/algoliasearch/monitoring/config.py +++ b/clients/algoliasearch-client-python/algoliasearch/monitoring/config.py @@ -12,8 +12,11 @@ def __init__(self, app_id: Optional[str], api_key: Optional[str]) -> None: user_agent = UserAgent().add("Monitoring") - assert app_id, "`app_id` is missing." - assert api_key, "`api_key` is missing." + if app_id is None or not app_id: + raise ValueError("`app_id` is missing.") + + if api_key is None or not api_key: + raise ValueError("`api_key` is missing.") self.headers = { "x-algolia-application-id": app_id, diff --git a/clients/algoliasearch-client-python/algoliasearch/personalization/config.py b/clients/algoliasearch-client-python/algoliasearch/personalization/config.py index fa3cde3c540..077ea60a92f 100644 --- a/clients/algoliasearch-client-python/algoliasearch/personalization/config.py +++ b/clients/algoliasearch-client-python/algoliasearch/personalization/config.py @@ -14,8 +14,11 @@ def __init__( user_agent = UserAgent().add("Personalization") - assert app_id, "`app_id` is missing." - assert api_key, "`api_key` is missing." + if app_id is None or not app_id: + raise ValueError("`app_id` is missing.") + + if api_key is None or not api_key: + raise ValueError("`api_key` is missing.") self.headers = { "x-algolia-application-id": app_id, diff --git a/clients/algoliasearch-client-python/algoliasearch/query_suggestions/config.py b/clients/algoliasearch-client-python/algoliasearch/query_suggestions/config.py index e318f3c4232..d47b95ba759 100644 --- a/clients/algoliasearch-client-python/algoliasearch/query_suggestions/config.py +++ b/clients/algoliasearch-client-python/algoliasearch/query_suggestions/config.py @@ -14,8 +14,11 @@ def __init__( user_agent = UserAgent().add("QuerySuggestions") - assert app_id, "`app_id` is missing." - assert api_key, "`api_key` is missing." + if app_id is None or not app_id: + raise ValueError("`app_id` is missing.") + + if api_key is None or not api_key: + raise ValueError("`api_key` is missing.") self.headers = { "x-algolia-application-id": app_id, diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/config.py b/clients/algoliasearch-client-python/algoliasearch/recommend/config.py index ddcba84f87f..1c01a3c1836 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/config.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/config.py @@ -12,8 +12,11 @@ def __init__(self, app_id: Optional[str], api_key: Optional[str]) -> None: user_agent = UserAgent().add("Recommend") - assert app_id, "`app_id` is missing." - assert api_key, "`api_key` is missing." + if app_id is None or not app_id: + raise ValueError("`app_id` is missing.") + + if api_key is None or not api_key: + raise ValueError("`api_key` is missing.") self.headers = { "x-algolia-application-id": app_id, diff --git a/clients/algoliasearch-client-python/algoliasearch/search/config.py b/clients/algoliasearch-client-python/algoliasearch/search/config.py index ea2a9e8be45..4e2ff94a1bc 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/config.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/config.py @@ -12,8 +12,11 @@ def __init__(self, app_id: Optional[str], api_key: Optional[str]) -> None: user_agent = UserAgent().add("Search") - assert app_id, "`app_id` is missing." - assert api_key, "`api_key` is missing." + if app_id is None or not app_id: + raise ValueError("`app_id` is missing.") + + if api_key is None or not api_key: + raise ValueError("`api_key` is missing.") self.headers = { "x-algolia-application-id": app_id, diff --git a/docs/guides/go/go.mod b/docs/guides/go/go.mod index 0b9b084dfbf..305e65fe8f9 100644 --- a/docs/guides/go/go.mod +++ b/docs/guides/go/go.mod @@ -1,6 +1,6 @@ module snippets -go 1.21 +go 1.21.11 replace github.com/algolia/algoliasearch-client-go/v4 v4.0.0 => ../../../clients/algoliasearch-client-go diff --git a/docs/snippets/go/go.mod b/docs/snippets/go/go.mod index 0b9b084dfbf..305e65fe8f9 100644 --- a/docs/snippets/go/go.mod +++ b/docs/snippets/go/go.mod @@ -1,6 +1,6 @@ module snippets -go 1.21 +go 1.21.11 replace github.com/algolia/algoliasearch-client-go/v4 v4.0.0 => ../../../clients/algoliasearch-client-go diff --git a/docs/snippets/javascript/src/abtesting.ts b/docs/snippets/javascript/src/abtesting.ts index 1f643770154..4ee8659a9a3 100644 --- a/docs/snippets/javascript/src/abtesting.ts +++ b/docs/snippets/javascript/src/abtesting.ts @@ -1,5 +1,4 @@ // 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. -/* eslint no-console: ["error", { allow: ["log"] }] */ // >IMPORT import { abtestingClient } from '@algolia/client-abtesting'; diff --git a/docs/snippets/javascript/src/algoliasearch.ts b/docs/snippets/javascript/src/algoliasearch.ts index cd5a6f4785f..a7d9be09766 100644 --- a/docs/snippets/javascript/src/algoliasearch.ts +++ b/docs/snippets/javascript/src/algoliasearch.ts @@ -1,5 +1,4 @@ // 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. -/* eslint no-console: ["error", { allow: ["log"] }] */ // >IMPORT import { liteClient } from 'algoliasearch/lite'; diff --git a/docs/snippets/javascript/src/analytics.ts b/docs/snippets/javascript/src/analytics.ts index d33e3f3a16a..5e023d3420e 100644 --- a/docs/snippets/javascript/src/analytics.ts +++ b/docs/snippets/javascript/src/analytics.ts @@ -1,5 +1,4 @@ // 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. -/* eslint no-console: ["error", { allow: ["log"] }] */ // >IMPORT import { analyticsClient } from '@algolia/client-analytics'; diff --git a/docs/snippets/javascript/src/ingestion.ts b/docs/snippets/javascript/src/ingestion.ts index b668756775e..e28b2b52fa4 100644 --- a/docs/snippets/javascript/src/ingestion.ts +++ b/docs/snippets/javascript/src/ingestion.ts @@ -1,5 +1,4 @@ // 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. -/* eslint no-console: ["error", { allow: ["log"] }] */ // >IMPORT import { ingestionClient } from '@algolia/ingestion'; diff --git a/docs/snippets/javascript/src/insights.ts b/docs/snippets/javascript/src/insights.ts index 82cce9549a0..19ab9ef81c1 100644 --- a/docs/snippets/javascript/src/insights.ts +++ b/docs/snippets/javascript/src/insights.ts @@ -1,5 +1,4 @@ // 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. -/* eslint no-console: ["error", { allow: ["log"] }] */ // >IMPORT import { insightsClient } from '@algolia/client-insights'; diff --git a/docs/snippets/javascript/src/monitoring.ts b/docs/snippets/javascript/src/monitoring.ts index 860bb59b835..f3974279a42 100644 --- a/docs/snippets/javascript/src/monitoring.ts +++ b/docs/snippets/javascript/src/monitoring.ts @@ -1,5 +1,4 @@ // 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. -/* eslint no-console: ["error", { allow: ["log"] }] */ // >IMPORT import { monitoringClient } from '@algolia/monitoring'; diff --git a/docs/snippets/javascript/src/personalization.ts b/docs/snippets/javascript/src/personalization.ts index 3630f73028c..41f10cdd950 100644 --- a/docs/snippets/javascript/src/personalization.ts +++ b/docs/snippets/javascript/src/personalization.ts @@ -1,5 +1,4 @@ // 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. -/* eslint no-console: ["error", { allow: ["log"] }] */ // >IMPORT import { personalizationClient } from '@algolia/client-personalization'; diff --git a/docs/snippets/javascript/src/querySuggestions.ts b/docs/snippets/javascript/src/querySuggestions.ts index 660b102edb0..800c5f4f20b 100644 --- a/docs/snippets/javascript/src/querySuggestions.ts +++ b/docs/snippets/javascript/src/querySuggestions.ts @@ -1,5 +1,4 @@ // 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. -/* eslint no-console: ["error", { allow: ["log"] }] */ // >IMPORT import { querySuggestionsClient } from '@algolia/client-query-suggestions'; diff --git a/docs/snippets/javascript/src/recommend.ts b/docs/snippets/javascript/src/recommend.ts index 3a3d1ac6e55..1e5e12fb235 100644 --- a/docs/snippets/javascript/src/recommend.ts +++ b/docs/snippets/javascript/src/recommend.ts @@ -1,5 +1,4 @@ // 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. -/* eslint no-console: ["error", { allow: ["log"] }] */ // >IMPORT import { recommendClient } from '@algolia/recommend'; diff --git a/docs/snippets/javascript/src/search.ts b/docs/snippets/javascript/src/search.ts index d3ca617742d..143799b1506 100644 --- a/docs/snippets/javascript/src/search.ts +++ b/docs/snippets/javascript/src/search.ts @@ -1,5 +1,4 @@ // 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. -/* eslint no-console: ["error", { allow: ["log"] }] */ // >IMPORT import { searchClient } from '@algolia/client-search'; diff --git a/tests/output/javascript/src/benchmark/search.test.ts b/tests/output/javascript/src/benchmark/search.test.ts index 83fa72d6899..4252265d027 100644 --- a/tests/output/javascript/src/benchmark/search.test.ts +++ b/tests/output/javascript/src/benchmark/search.test.ts @@ -1,5 +1,4 @@ // 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. -/* eslint-disable @typescript-eslint/no-unused-vars */ import { describe, test } from 'vitest'; import { searchClient } from '@algolia/client-search'; diff --git a/tests/output/javascript/src/client/abtesting.test.ts b/tests/output/javascript/src/client/abtesting.test.ts index 21ea4d80810..94ea17929a5 100644 --- a/tests/output/javascript/src/client/abtesting.test.ts +++ b/tests/output/javascript/src/client/abtesting.test.ts @@ -1,5 +1,5 @@ // 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. -/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */ +/* eslint-disable eslint/no-unused-vars */ // @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines. import { describe, expect, test } from 'vitest'; diff --git a/tests/output/javascript/src/client/analytics.test.ts b/tests/output/javascript/src/client/analytics.test.ts index 57838a65731..86157e10aeb 100644 --- a/tests/output/javascript/src/client/analytics.test.ts +++ b/tests/output/javascript/src/client/analytics.test.ts @@ -1,5 +1,5 @@ // 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. -/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */ +/* eslint-disable eslint/no-unused-vars */ // @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines. import { describe, expect, test } from 'vitest'; diff --git a/tests/output/javascript/src/client/ingestion.test.ts b/tests/output/javascript/src/client/ingestion.test.ts index f93091d516e..63b863a9a40 100644 --- a/tests/output/javascript/src/client/ingestion.test.ts +++ b/tests/output/javascript/src/client/ingestion.test.ts @@ -1,5 +1,5 @@ // 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. -/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */ +/* eslint-disable eslint/no-unused-vars */ // @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines. import { describe, expect, test } from 'vitest'; diff --git a/tests/output/javascript/src/client/insights.test.ts b/tests/output/javascript/src/client/insights.test.ts index 82068e9d3d0..c0556be15f5 100644 --- a/tests/output/javascript/src/client/insights.test.ts +++ b/tests/output/javascript/src/client/insights.test.ts @@ -1,5 +1,5 @@ // 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. -/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */ +/* eslint-disable eslint/no-unused-vars */ // @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines. import { describe, expect, test } from 'vitest'; diff --git a/tests/output/javascript/src/client/monitoring.test.ts b/tests/output/javascript/src/client/monitoring.test.ts index 7d16ad00865..4db30ff7f21 100644 --- a/tests/output/javascript/src/client/monitoring.test.ts +++ b/tests/output/javascript/src/client/monitoring.test.ts @@ -1,5 +1,5 @@ // 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. -/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */ +/* eslint-disable eslint/no-unused-vars */ // @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines. import { describe, expect, test } from 'vitest'; diff --git a/tests/output/javascript/src/client/personalization.test.ts b/tests/output/javascript/src/client/personalization.test.ts index 8598202dd29..bd9e8e9442b 100644 --- a/tests/output/javascript/src/client/personalization.test.ts +++ b/tests/output/javascript/src/client/personalization.test.ts @@ -1,5 +1,5 @@ // 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. -/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */ +/* eslint-disable eslint/no-unused-vars */ // @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines. import { describe, expect, test } from 'vitest'; diff --git a/tests/output/javascript/src/client/querySuggestions.test.ts b/tests/output/javascript/src/client/querySuggestions.test.ts index e824ba57f98..4e420e34615 100644 --- a/tests/output/javascript/src/client/querySuggestions.test.ts +++ b/tests/output/javascript/src/client/querySuggestions.test.ts @@ -1,5 +1,5 @@ // 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. -/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */ +/* eslint-disable eslint/no-unused-vars */ // @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines. import { describe, expect, test } from 'vitest'; diff --git a/tests/output/javascript/src/client/recommend.test.ts b/tests/output/javascript/src/client/recommend.test.ts index 77dee448015..45030772fc4 100644 --- a/tests/output/javascript/src/client/recommend.test.ts +++ b/tests/output/javascript/src/client/recommend.test.ts @@ -1,5 +1,5 @@ // 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. -/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */ +/* eslint-disable eslint/no-unused-vars */ // @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines. import { describe, expect, test } from 'vitest'; diff --git a/tests/output/javascript/src/client/search.test.ts b/tests/output/javascript/src/client/search.test.ts index db52e7e9245..5e86ba9e305 100644 --- a/tests/output/javascript/src/client/search.test.ts +++ b/tests/output/javascript/src/client/search.test.ts @@ -1,5 +1,5 @@ // 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. -/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */ +/* eslint-disable eslint/no-unused-vars */ // @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines. import { describe, expect, test } from 'vitest';